js/tsne.js
function (n) {
		if (typeof(n) === 'undefined' || isNaN(n)) {
			return [];
		}
		if (typeof ArrayBuffer === 'undefined') {
			// lacking browser support
			var arr = new Array(n);
			for (var i = 0; i < n; i++) {
				arr[i] = 0;
			}
			return arr;
		} else {
			return new Float64Array(n); // typed arrays are faster
		}
	}
function (n) {
		if (typeof(n) === 'undefined' || isNaN(n)) {
			return [];
		}
		if (typeof ArrayBuffer === 'undefined') {
			// lacking browser support
			var arr = new Array(n);
			for (var i = 0; i < n; i++) {
				arr[i] = 0;
			}
			return arr;
		} else {
			return new Float64Array(n); // typed arrays are faster
		}
	}
function ( n ) { if ( typeof ( n ) === 'undefined' || isNaN ( n ) ) { return [ ] ; } if ( typeof ArrayBuffer === 'undefined' ) { // lacking browser support var arr = new Array ( n ) ; for ( var i = 0 ; i < n ; i ++ ) { arr [ i ] = 0 ; } return arr ; } else { return new Float64Array ( n ) ; // typed arrays are faster } }
utilitity that creates contiguous vector of zeros of size n
utilitity that creates contiguous vector of zeros of size n