}
public static Pointer<smat> buildSparseMatrix2(SparseDoubleMatrix2D matrix) {
Pointer<smat> pSA = SvdLibrary.svdNewSMat(matrix.rows(), matrix.columns(), matrix.elements().size());
SparseCCDoubleMatrix2D cc_matrix = matrix.getColumnCompressed(true);
pSA.get().pointr().setCLongs(cc_matrix.getColumnPointers());
pSA.get().rowind().setCLongs(cc_matrix.getRowIndexes());
pSA.get().value().setDoubles(cc_matrix.getValues());
return pSA;
}