Examples of viewSelection()


Examples of cern.colt.matrix.DoubleMatrix1D.viewSelection()

double[] values = {0, 1, 2, 3};
DoubleMatrix1D matrix = new DenseDoubleMatrix1D(values);
System.out.println(matrix);

// Sum( x[i]*x[i] )
System.out.println(matrix.viewSelection(
  new cern.colt.function.DoubleProcedure() {
    public final boolean apply(double a) { return a % 2 == 0; }
  }
));
//--> 14
View Full Code Here

Examples of cern.colt.matrix.DoubleMatrix1D.viewSelection()

double[] values = {0, 1, 2, 3};
DoubleMatrix1D matrix = new DenseDoubleMatrix1D(values);
System.out.println(matrix);

// Sum( x[i]*x[i] )
System.out.println(matrix.viewSelection(
  new cern.colt.function.DoubleProcedure() {
    public final boolean apply(double a) { return a % 2 == 0; }
  }
));
//--> 14
View Full Code Here

Examples of cern.colt.matrix.DoubleMatrix2D.viewSelection()

  timer.stop().display();
  //System.out.println(A);

  timer.reset().start();
  System.out.print("now copying selected... ");
  B.viewSelection(null,null).assign(A.viewSelection(null,null));
  timer.stop().display();

  System.out.print("now sorting - quick version with precomputation... ");
  timer.reset().start();
  // THE QUICK VERSION (takes some 10 secs)
View Full Code Here

Examples of cern.colt.matrix.DoubleMatrix2D.viewSelection()

  timer.stop().display();
  //System.out.println(A);

  timer.reset().start();
  System.out.print("now copying selected... ");
  B.viewSelection(null,null).assign(A.viewSelection(null,null));
  timer.stop().display();

  System.out.print("now sorting - quick version with precomputation... ");
  timer.reset().start();
  // THE QUICK VERSION (takes some 10 secs)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.