Top Description Fields Constructors Methods
org.apache.commons.math3.exception

public Class DimensionMismatchException

extends MathIllegalNumberException
Class Inheritance
Known Direct Subclasses
org.apache.commons.math3.linear.NonSquareMatrixException, org.apache.commons.math3.linear.NonSquareOperatorException
Imports
org.apache.commons.math3.exception.util.LocalizedFormats, .Localizable

Exception to be thrown when two dimensions differ.
Since
2.2

Field Summary

Modifier and TypeField and Description
private final int
dimension

Correct dimension.

private static final long
Inherited from org.apache.commons.math3.exception.MathIllegalNumberException:
INTEGER_ZERO

Constructor Summary

AccessConstructor and Description
public
DimensionMismatchException(Localizable
Specific context information pattern.
specific
,
int
Wrong dimension.
wrong
,
int
Expected dimension.
expected
)

Construct an exception from the mismatched dimensions.

public
DimensionMismatchException(int
Wrong dimension.
wrong
,
int
Expected dimension.
expected
)

Construct an exception from the mismatched dimensions.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the expected dimension.
getDimension
()

Inherited from org.apache.commons.math3.exception.MathIllegalNumberException:
getArgument

Field Detail

dimensionback to summary
private final int dimension

Correct dimension.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.apache.commons.math3.exception.MathIllegalNumberException.serialVersionUID.

Serializable version Id.

Constructor Detail

DimensionMismatchExceptionback to summary
public DimensionMismatchException(Localizable specific, int wrong, int expected)

Construct an exception from the mismatched dimensions.

Parameters
specific:Localizable

Specific context information pattern.

wrong:int

Wrong dimension.

expected:int

Expected dimension.

DimensionMismatchExceptionback to summary
public DimensionMismatchException(int wrong, int expected)

Construct an exception from the mismatched dimensions.

Parameters
wrong:int

Wrong dimension.

expected:int

Expected dimension.

Method Detail

getDimensionback to summary
public int getDimension()
Returns:int

the expected dimension.