Class MatrixDimensionMismatchException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.apache.commons.math4.legacy.exception.MathRuntimeException
-
- org.apache.commons.math4.legacy.exception.MathIllegalArgumentException
-
- org.apache.commons.math4.legacy.exception.MultiDimensionMismatchException
-
- org.apache.commons.math4.legacy.linear.MatrixDimensionMismatchException
-
- All Implemented Interfaces:
Serializable
,ExceptionContextProvider
public class MatrixDimensionMismatchException extends MultiDimensionMismatchException
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MatrixDimensionMismatchException(int wrongRowDim, int wrongColDim, int expectedRowDim, int expectedColDim)
Construct an exception from the mismatched dimensions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getExpectedColumnDimension()
int
getExpectedRowDimension()
int
getWrongColumnDimension()
int
getWrongRowDimension()
-
Methods inherited from class org.apache.commons.math4.legacy.exception.MultiDimensionMismatchException
getExpectedDimension, getExpectedDimensions, getWrongDimension, getWrongDimensions
-
Methods inherited from class org.apache.commons.math4.legacy.exception.MathRuntimeException
getContext, getLocalizedMessage, getMessage
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
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 Detail
-
getWrongRowDimension
public int getWrongRowDimension()
- Returns:
- the expected row dimension.
-
getExpectedRowDimension
public int getExpectedRowDimension()
- Returns:
- the expected row dimension.
-
getWrongColumnDimension
public int getWrongColumnDimension()
- Returns:
- the wrong column dimension.
-
getExpectedColumnDimension
public int getExpectedColumnDimension()
- Returns:
- the expected column dimension.
-
-