Package no.uib.cipr.matrix.sparse

Examples of no.uib.cipr.matrix.sparse.CompRowMatrix.numColumns()


      testFile.deleteOnExit();
    BufferedWriter out = new BufferedWriter(new FileWriter(testFile));
    MatrixVectorWriter writer = new MatrixVectorWriter(out);
    MatrixInfo mi = new MatrixInfo(true, MatrixInfo.MatrixField.Real, MatrixInfo.MatrixSymmetry.General);
    writer.printMatrixInfo(mi);
    writer.printMatrixSize(new MatrixSize(mat.numColumns(), mat.numColumns(), mat.getData().length), mi);
    int[] rows = buildRowArray(mat);
    writer.printCoordinate(rows, mat.getColumnIndices(), mat.getData(), 1);
    out.close();
    CompRowMatrix newMat = new CompRowMatrix(new MatrixVectorReader(new FileReader(testFile)));
    MatrixTestAbstract.assertEquals(mat, newMat);
View Full Code Here


      testFile.deleteOnExit();
    BufferedWriter out = new BufferedWriter(new FileWriter(testFile));
    MatrixVectorWriter writer = new MatrixVectorWriter(out);
    MatrixInfo mi = new MatrixInfo(true, MatrixInfo.MatrixField.Real, MatrixInfo.MatrixSymmetry.General);
    writer.printMatrixInfo(mi);
    writer.printMatrixSize(new MatrixSize(mat.numColumns(), mat.numColumns(), mat.getData().length), mi);
    int[] rows = buildRowArray(mat);
    writer.printCoordinate(rows, mat.getColumnIndices(), mat.getData(), 1);
    out.close();
    CompRowMatrix newMat = new CompRowMatrix(new MatrixVectorReader(new FileReader(testFile)));
    MatrixTestAbstract.assertEquals(mat, newMat);
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.