public boolean isEmpty() { return getN() == 0; }
public boolean isEmpty() { return getN() == 0; }
public boolean isEmpty() { return getN() == 0; }
public boolean isEmpty() { return getN() == 0; }
public boolean isEmpty() { return getN() == 0; }
public int getSize() { return getM()*getN(); } public int getType()
public int getSize() { return getM()*getN(); } public int getType()
public int getSize() { return getM()*getN(); } public int getType()
public int getSize() { return getM() * getN(); }
public int getSize() { return getM() * getN(); }
/** * Convert a matlab {@link MLArray} to a {@link Matrix} * * @param mlArray * the matrlab matrix * @return the matrix */ public static Matrix asMat(MLArray mlArray) { final MLDouble mlArrayDbl = (MLDouble) mlArray; final int rows = mlArray.getM(); final int cols = mlArray.getN(); final Matrix mat = SparseMatrixFactoryMTJ.INSTANCE.createMatrix(rows, cols); for (int r = 0; r < rows; r++) { for (int c = 0; c < cols; c++) { mat.setElement(r, c, mlArrayDbl.get(r, c)); } } return mat; }
/** * Create a {@link Matrix} from a matlab {@link MLArray} * * @param mlArray * the matlab array * @return the matrix */ public static Matrix fromMatlab(MLArray mlArray) { final Matrix mat = new DenseMatrix(mlArray.getM(), mlArray.getN()); final MLDouble mlDouble = (MLDouble) mlArray; for (int i = 0; i < mat.rowCount(); i++) { for (int j = 0; j < mat.columnCount(); j++) { mat.put(i, j, mlDouble.get(i, j)); } } return mat; }
for (int index = 0; index < mlArray.getM() * mlArray.getN(); index++) { for (int i = 0; i < numOfFields; i++) {
for (int index = 0; index < mlArray.getM() * mlArray.getN(); index++) { for (int i = 0; i < numOfFields; i++) {