Examples of viewPart()


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

DoubleMatrix1D view1 = master.viewRow(0).viewSelection(indexes);
System.out.println("view1="+view1);
DoubleMatrix1D view2 = view1.viewPart(0,3);
System.out.println("view2="+view2);

view2.viewPart(0,2).assign(-1);
System.out.println("master replaced"+master);
System.out.println("flip1 replaced"+view1);
System.out.println("flip2 replaced"+view2);

View Full Code Here

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

DoubleMatrix1D view1 = master.viewRow(0).viewSelection(indexes);
System.out.println("view1="+view1);
DoubleMatrix1D view2 = view1.viewPart(0,3);
System.out.println("view2="+view2);

view2.viewPart(0,2).assign(-1);
System.out.println("master replaced"+master);
System.out.println("flip1 replaced"+view1);
System.out.println("flip2 replaced"+view2);

View Full Code Here

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

int columns = 5; // make a 4*5 matrix
DoubleMatrix2D master = new DenseDoubleMatrix2D(rows,columns);
System.out.println(master);
master.assign(1); // set all cells to 1
System.out.println("\n"+master);
master.viewPart(2,1,2,3).assign(2); // set [2,1] .. [3,3] to 2
System.out.println("\n"+master);

DoubleMatrix2D copyPart = master.viewPart(2,1,2,3).copy();
copyPart.assign(3); // modify an independent copy
copyPart.set(0,0,4);
View Full Code Here

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

int columns = 5; // make a 4*5 matrix
DoubleMatrix2D master = new DenseDoubleMatrix2D(rows,columns);
System.out.println(master);
master.assign(1); // set all cells to 1
System.out.println("\n"+master);
master.viewPart(2,0,2,3).assign(2); // set [2,1] .. [3,3] to 2
System.out.println("\n"+master);

DoubleMatrix2D flip1 = master.viewColumnFlip();
System.out.println("flip around columns="+flip1);
DoubleMatrix2D flip2 = flip1.viewRowFlip();
View Full Code Here

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

DoubleMatrix2D flip1 = master.viewColumnFlip();
System.out.println("flip around columns="+flip1);
DoubleMatrix2D flip2 = flip1.viewRowFlip();
System.out.println("further flip around rows="+flip2);

flip2.viewPart(0,0,2,2).assign(3);
System.out.println("master replaced"+master);
System.out.println("flip1 replaced"+flip1);
System.out.println("flip2 replaced"+flip2);

View Full Code Here

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

int rows = 4;
int columns = 5; // make a 4*5 matrix
DoubleMatrix2D master = Factory2D.ascending(rows,columns);
//master.assign(1); // set all cells to 1
System.out.println("\n"+master);
master.viewPart(2,0,2,3).assign(2); // set [2,1] .. [3,3] to 2
System.out.println("\n"+master);

int[] indexes = {0,1,3,0,1,2};
DoubleMatrix1D view1 = master.viewRow(0).viewSelection(indexes);
System.out.println("view1="+view1);
View Full Code Here

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

  cern.colt.matrix.doublealgo.Statistic.aggregate(matrix.viewDice(), aggr, rowStats.viewDice()); // aggregate an entire row at a time

  // turn into strings
  // tmp holds "matrix" plus "colStats" below (needed so that numbers in a columns can be decimal point aligned)
  DoubleMatrix2D tmp = matrix.like(matrix.rows()+aggr.length, matrix.columns());
  tmp.viewPart(0,0,matrix.rows(),matrix.columns()).assign(matrix);
  tmp.viewPart(matrix.rows(),0,aggr.length,matrix.columns()).assign(colStats);
  colStats = null;

  String[][] s1 = format(tmp); align(s1); tmp = null;
  String[][] s2 = format(rowStats); align(s2); rowStats = null;
View Full Code Here

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

  // turn into strings
  // tmp holds "matrix" plus "colStats" below (needed so that numbers in a columns can be decimal point aligned)
  DoubleMatrix2D tmp = matrix.like(matrix.rows()+aggr.length, matrix.columns());
  tmp.viewPart(0,0,matrix.rows(),matrix.columns()).assign(matrix);
  tmp.viewPart(matrix.rows(),0,aggr.length,matrix.columns()).assign(colStats);
  colStats = null;

  String[][] s1 = format(tmp); align(s1); tmp = null;
  String[][] s2 = format(rowStats); align(s2); rowStats = null;
View Full Code Here

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

  B.assign(A);
  timer.stop().display();

  timer.reset().start();
  System.out.print("now copying subrange... ");
  B.viewPart(0,0,rows,columns).assign(A.viewPart(0,0,rows,columns));
  timer.stop().display();
  //System.out.println(A);

  timer.reset().start();
  System.out.print("now copying selected... ");
View Full Code Here

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

  cern.colt.matrix.doublealgo.Statistic.aggregate(matrix.viewDice(), aggr, rowStats.viewDice()); // aggregate an entire row at a time

  // turn into strings
  // tmp holds "matrix" plus "colStats" below (needed so that numbers in a columns can be decimal point aligned)
  DoubleMatrix2D tmp = matrix.like(matrix.rows()+aggr.length, matrix.columns());
  tmp.viewPart(0,0,matrix.rows(),matrix.columns()).assign(matrix);
  tmp.viewPart(matrix.rows(),0,aggr.length,matrix.columns()).assign(colStats);
  colStats = null;

  String[][] s1 = format(tmp); align(s1); tmp = null;
  String[][] s2 = format(rowStats); align(s2); rowStats = null;
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.