For IntelliJ IDEA,
Android Studio or Eclipse



/** * Return the correlation/covariance matrix * * @return the correlation or covariance matrix */ public double[][] getCorrelationMatrix() { return Matrices.getArray(m_correlation); }
/** * Creates a random vector. Numbers are drawn from a uniform distribution * between 0 and 1 * * @param size * Size of the vector */ public static Vector random(int size) { return random(new DenseVector(size)); }
public Matrix mult(Matrix B, DenseMatrix C) { if (pivots == null) return super.mult(B, C); checkMultAdd(B, C); C.set(B); LAPACK.getInstance().dlaswp(C.numColumns(), C.getData(), Matrices.ld(C.numRows()), 1, pivots.length, pivots, transposed ? -1 : 1); return C; }
public double getDouble(long... coordinates) { if (inv == null) { DenseMatrix A = new MTJDenseDoubleMatrix2D(getSource()).getWrappedObject(); DenseMatrix I = Matrices.identity((int) getSource().getColumnCount()); DenseMatrix AI = I.copy(); inv = new MTJDenseDoubleMatrix2D((DenseMatrix) A.solve(I, AI)); } return inv.getAsDouble(coordinates); }
/** * Creates a random matrix. Numbers are drawn from a uniform distribution * between 0 and 1 * * @param numRows * Number of rows * @param numColumns * Number of columns */ public static Matrix random(int numRows, int numColumns) { return random(new DenseMatrix(numRows, numColumns)); }
@Override public Matrix copy() { return Matrices.synchronizedMatrixByColumns(A.copy()); }
@Override public Vector copy() { return Matrices.synchronizedVector(x.copy()); }
@Override public Matrix copy() { return Matrices.synchronizedMatrixByRows(A.copy()); }
public Matrix transAmult(Matrix B, DenseMatrix C) { if (pivots == null) return super.transAmult(B, C); checkTransAmultAdd(B, C); C.set(B); LAPACK.getInstance().dlaswp(C.numColumns(), C.getData(), Matrices.ld(C.numRows()), 1, pivots.length, pivots, transposed ? 1 : -1); return C; }
public Matrix mult(Matrix B, DenseMatrix C) { if (pivots == null) return super.mult(B, C); checkMultAdd(B, C); C.set(B); LAPACK.getInstance().dlaswp(C.numColumns(), C.getData(), Matrices.ld(C.numRows()), 1, pivots.length, pivots, transposed ? -1 : 1); return C; }
/** * Creates a random vector. Numbers are drawn from a uniform distribution * between 0 and 1 * * @param size * Size of the vector */ public static Vector random(int size) { return random(new DenseVector(size)); }
public Matrix transAmult(Matrix B, DenseMatrix C) { if (pivots == null) return super.transAmult(B, C); checkTransAmultAdd(B, C); C.set(B); LAPACK.getInstance().dlaswp(C.numColumns(), C.getData(), Matrices.ld(C.numRows()), 1, pivots.length, pivots, transposed ? 1 : -1); return C; }
/** * Creates a random matrix. Numbers are drawn from a uniform distribution * between 0 and 1 * * @param numRows * Number of rows * @param numColumns * Number of columns */ public static Matrix random(int numRows, int numColumns) { return random(new DenseMatrix(numRows, numColumns)); }
/** * Return the correlation/covariance matrix * * @return the correlation or covariance matrix */ public double[][] getCorrelationMatrix() { return Matrices.getArray(m_correlation); }