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
using Math.scalb(double, int)
.
-
Method Details
-
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:
-
power
Returns the result of multiplyingthis
with itselfn
times.- Parameters:
n
- raisethis
to powern
- Returns:
this^n
- Throws:
IllegalArgumentException
- ifn < 0
-