use of cern.colt.matrix.doublealgo.DoubleMatrix2DComparator in project tdq-studio-se by Talend.
the class TestMatrix2D method doubleTest26.
/**
*/
public static void doubleTest26(int size) {
System.out.println("\n\n");
System.out.println("initializing...");
boolean dense = true;
DoubleMatrix2D A;
DoubleFactory2D factory;
if (dense)
factory = Factory2D.dense;
else
factory = Factory2D.sparse;
double value = 0.5;
A = factory.make(size, size, value);
Property.generateNonSingular(A);
cern.colt.Timer timer = new cern.colt.Timer().start();
DoubleMatrix2DComparator fun = new DoubleMatrix2DComparator() {
public int compare(DoubleMatrix2D a, DoubleMatrix2D b) {
return a.zSum() == b.zSum() ? 1 : 0;
}
};
System.out.println(A);
System.out.println(Algebra.ZERO.inverse(A));
timer.stop().display();
System.out.println("done.");
}
Aggregations