Package ch.akuhn.matrix

Examples of ch.akuhn.matrix.SparseMatrix


  }

  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);
      }
    }
    SingularValues singular = new SingularValues(A, 10).decompose();
    Stopwatch.p();
    Out.puts(singular.value);
View Full Code Here

TOP

Related Classes of ch.akuhn.matrix.SparseMatrix

Copyright © 2018 www.massapicom. 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.