Package ch.akuhn.matrix

Examples of ch.akuhn.matrix.SparseMatrix.rowCount()


  public static void main(String... args) {
    Stopwatch.enter();
    Stopwatch.p();
    SparseMatrix A = Matrix.sparse(4000, 10000);
    Random rand = new Random(1);
    for (int i = 0; i < A.rowCount(); i++) {
      for (int j = 0; j < A.columnCount(); j++) {
        if (rand.nextDouble() > 0.2) continue;
        A.put(i, j, rand.nextDouble() * 23);
      }
    }
 
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.