Interface SquareMatrixSupport.RealSquareMatrix
-
- All Known Implementing Classes:
SquareMatrixSupport.ArrayRealSquareMatrix
- Enclosing class:
- SquareMatrixSupport
static interface SquareMatrixSupport.RealSquareMatrix
Define a real-valued square matrix.This matrix supports a scale to protect against overflow. The true value of any matrix value is multiplied by
2^scale
. This is readily performed usingMath.scalb(double, int)
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
dimension()
Gets the dimension for the rows and columns.double
get(int i, int j)
Gets the value.SquareMatrixSupport.RealSquareMatrix
power(int n)
Returns the result of multiplyingthis
with itselfn
times.int
scale()
Gets the scale of the matrix values.
-
-
-
Method Detail
-
dimension
int dimension()
Gets the dimension for the rows and columns.- Returns:
- the dimension
-
scale
int scale()
Gets the scale of the matrix values. The true value is the value returned fromget(int, int)
multiplied by2^scale
.- Returns:
- the scale
-
get
double get(int i, int j)
Gets the value. This is a scaled value. The true value is the value returned multiplied by2^scale
.- Parameters:
i
- Rowj
- Column- Returns:
- the value
- See Also:
scale()
-
power
SquareMatrixSupport.RealSquareMatrix power(int n)
Returns the result of multiplyingthis
with itselfn
times.- Parameters:
n
- raisethis
to powern
- Returns:
this^n
- Throws:
java.lang.IllegalArgumentException
- ifn < 0
-
-