Class MatrixDimensionMismatchException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
org.apache.commons.math3.exception.MathIllegalArgumentException
org.apache.commons.math3.exception.MultiDimensionMismatchException
org.apache.commons.math3.linear.MatrixDimensionMismatchException
- All Implemented Interfaces:
Serializable, ExceptionContextProvider
Exception to be thrown when either the number of rows or the number of
columns of a matrix do not match the expected values.
- Since:
- 3.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMatrixDimensionMismatchException(int wrongRowDim, int wrongColDim, int expectedRowDim, int expectedColDim) Construct an exception from the mismatched dimensions. -
Method Summary
Modifier and TypeMethodDescriptionintintintintMethods inherited from class MultiDimensionMismatchException
getExpectedDimension, getExpectedDimensions, getWrongDimension, getWrongDimensionsMethods inherited from class MathIllegalArgumentException
getContext, getLocalizedMessage, getMessageMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
MatrixDimensionMismatchException
public MatrixDimensionMismatchException(int wrongRowDim, int wrongColDim, int expectedRowDim, int expectedColDim) Construct an exception from the mismatched dimensions.- Parameters:
wrongRowDim- Wrong row dimension.wrongColDim- Wrong column dimension.expectedRowDim- Expected row dimension.expectedColDim- Expected column dimension.
-
-
Method Details
-
getWrongRowDimension
- Returns:
- the expected row dimension.
-
getExpectedRowDimension
- Returns:
- the expected row dimension.
-
getWrongColumnDimension
- Returns:
- the wrong column dimension.
-
getExpectedColumnDimension
- Returns:
- the expected column dimension.
-