| double[][] da = new double[][]{{3,2,2},{2,3,-2}};
SVDResults svdr = SVDWrapper.denseSVD(da, 3);
output(svdr);
SparseDoubleMatrix2D matrix = new SparseDoubleMatrix2D(3, 2);
matrix.set(0, 0, 1);
matrix.set(0, 1, -1);
matrix.set(1, 0, 1);
matrix.set(1, 1, -1);
matrix.set(2, 0, Math.sqrt(3));
matrix.set(2, 1, 0);
SVDResults svdr2 = SVDWrapper.sparseSVD(matrix, 3);
output(svdr2);
}
|