js/tsne.js
function (X) {
		var N = X.length;
		var dist = zeros(N * N); // allocate contiguous array
		for (var i = 0; i < N; i++) {
			for (var j = i + 1; j < N; j++) {
				var d = L2(X[i], X[j]);
				dist[i * N + j] = d;
				dist[j * N + i] = d;
			}
		}
		return dist;
	}
function (X) {
		var N = X.length;
		var dist = zeros(N * N); // allocate contiguous array
		for (var i = 0; i < N; i++) {
			for (var j = i + 1; j < N; j++) {
				var d = L2(X[i], X[j]);
				dist[i * N + j] = d;
				dist[j * N + i] = d;
			}
		}
		return dist;
	}
function ( X ) { var N = X . length ; var dist = zeros ( N * N ) ; // allocate contiguous array for ( var i = 0 ; i < N ; i ++ ) { for ( var j = i + 1 ; j < N ; j ++ ) { var d = L2 ( X [ i ] , X [ j ] ) ; dist [ i * N + j ] = d ; dist [ j * N + i ] = d ; } } return dist ; }
compute pairwise distance in all vectors in X
compute pairwise distance in all vectors in X