List of usage examples for org.apache.commons.math3.linear AbstractRealMatrix getRowDimension
@Override public abstract int getRowDimension();
From source file:com.clust4j.utils.MatUtils.java
final static public void checkDims(final AbstractRealMatrix a) { int m = a.getRowDimension(); if (m < MIN_ACCEPTABLE_MAT_LEN) throw new IllegalArgumentException(MAT_DIM_ERR_MSG + m); //if(n < MIN_ACCEPTABLE_MAT_LEN) throw new IllegalArgumentException(MAT_DIM_ERR_MSG + n); }
From source file:com.clust4j.utils.MatUtils.java
final static public void checkDims(final AbstractRealMatrix a, final AbstractRealMatrix b) { checkDims(a);/*from ww w. ja va 2 s. c om*/ checkDims(b); int m1 = a.getRowDimension(), m2 = b.getRowDimension(); int n1 = a.getColumnDimension(), n2 = b.getColumnDimension(); if (m1 != m2) throw new DimensionMismatchException(m1, m2); if (n1 != n2) throw new DimensionMismatchException(n1, n2); }