/** * @param matrix The matrix to return as a String * @param format The format to use for each value in the matrix, eg "%f" */ public static String toString(SimpleMatrix matrix, String format) { ByteArrayOutputStream stream = new ByteArrayOutputStream(); MatrixIO.print(new PrintStream(stream), matrix.getMatrix(), format); return stream.toString(); }
@Override public void print() { MatrixIO.print(System.out, this); } }
@Override public void print() { MatrixIO.print(System.out, this); } }
/** * Prints the matrix to standard out with the specified precision. */ public void print(int numChar , int precision) { MatrixIO.print(System.out,mat,numChar,precision); }
/** * Prints the value of this matrix to the screen. For more options see * {@link UtilEjml} * */ @Override public void print() { MatrixIO.print(System.out,this); }
@Override public void print() { MatrixIO.print(System.out, this); } }
@Override public void print() { MatrixIO.print(System.out, this); } }
public void print() { MatrixIO.print(System.out,original,"%6.3f",row0,row1,col0,col1); } }
@Override public void print() { MatrixIO.print(System.out,this); }
@Override public void print() { MatrixIO.print(System.out, this); } }
@Override public void print() { MatrixIO.print(System.out, this); } }
@Override public void print() { MatrixIO.print(System.out, this); } }
@Override public void print() { MatrixIO.print(System.out, this); } }
@Override public void print() { MatrixIO.print(System.out, this); } }
/** * Prints the value of this matrix to the screen. For more options see * {@link UtilEjml} * */ @Override public void print() { MatrixIO.print(System.out,this); }
/** * <p> * Prints the value of this matrix to the screen using the same format as {@link java.io.PrintStream#printf). * </p> * * @param format The format which each element is printed uses. */ public void print( String format ) { MatrixIO.print(System.out,this,format); }
public static String denseMatrixToString(DenseMatrix64F mat) { ByteArrayOutputStream stream = new ByteArrayOutputStream(); MatrixIO.print(new PrintStream(stream), mat, "%13.6g"); return stream.toString(); }
public static String denseMatrixToString(DenseMatrix64F mat) { ByteArrayOutputStream stream = new ByteArrayOutputStream(); MatrixIO.print(new PrintStream(stream), mat, "%13.6g"); return stream.toString(); }
/** * @param matrix The matrix to return as a String * @param format The format to use for each value in the matrix, eg "%f" */ public static String toString(SimpleMatrix matrix, String format) { ByteArrayOutputStream stream = new ByteArrayOutputStream(); MatrixIO.print(new PrintStream(stream), matrix.getMatrix(), format); return stream.toString(); }
@ContinuousIntegrationTest(estimatedDuration = 0.0) @Test(timeout = 30000) public void errorSVD() { SingularValueDecomposition<DenseMatrix64F> dec = DecompositionFactory.svd(16, 16, true, true, true); DenseMatrix64F m = RandomMatrices.createRandom(16, 16, new Random(64)); MatrixIO.print(System.out, m,"%.10e"); dec.decompose(m); System.out.println("SVs="+Arrays.toString(dec.getSingularValues())); }