}
Properties props = System.getProperties();
Assignments assignments = null;
if (sparseVectors.size() > 0) {
SparseMatrix matrix = Matrices.asSparseMatrix(sparseVectors);
assignments = (numClusters > 0)
? clustering.cluster(matrix, numClusters, props)
: clustering.cluster(matrix, props);
} else {
Matrix matrix = Matrices.asMatrix(vectors);