Interface SquareMatrixSupport.RealSquareMatrix
-
- All Known Implementing Classes:
SquareMatrixSupport.ArrayRealSquareMatrix
- Enclosing class:
- SquareMatrixSupport
static interface SquareMatrixSupport.RealSquareMatrixDefine 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 intdimension()Gets the dimension for the rows and columns.doubleget(int i, int j)Gets the value.SquareMatrixSupport.RealSquareMatrixpower(int n)Returns the result of multiplyingthiswith itselfntimes.intscale()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 multiplyingthiswith itselfntimes.- Parameters:
n- raisethisto powern- Returns:
this^n- Throws:
java.lang.IllegalArgumentException- ifn < 0
-
-