|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.numericalmethod.suanshu.matrix.doubles.matrixtype.MatrixMathImpl<T>
com.numericalmethod.suanshu.matrix.doubles.matrixtype.MatrixStorageImpl<DenseMatrix>
com.numericalmethod.suanshu.matrix.doubles.matrixtype.dense.DenseMatrix
com.numericalmethod.suanshu.matrix.doubles.operation.Pow
public class Pow
This computes a square DenseMatrix A to the power of integer n, An.
To avoid overflow of double precision, we represent the result as a product of
An = basescale * B;
E.g.,
An = 1e100scale * B = 10100 * scale * B
All entries in B can be represented in double precision.
| Field Summary | |
|---|---|
Matrix |
B
a double precision matrix |
double |
base
the radix or base refers to the number b in an expression of the form bn |
int |
scale
the exponent |
| Constructor Summary | |
|---|---|
Pow(Matrix A,
int exponent)
Construct the matrix Aexponent so that
Aexponent = (1e100)scale * B
|
|
Pow(Matrix A,
int exponent,
double base)
Construct the matrix Aexponent so that
Aexponent = basescale * B
|
|
| Method Summary |
|---|
| Methods inherited from class com.numericalmethod.suanshu.matrix.doubles.matrixtype.dense.DenseMatrix |
|---|
add, deepCopy, getColumn, getColumn, getMatrixData, getRow, getRow, getSample, minus, multiply, multiply, ONE, overwrite, scaled, t, toDense, ZERO |
| Methods inherited from class com.numericalmethod.suanshu.matrix.doubles.matrixtype.MatrixStorageImpl |
|---|
equals, get, hashCode, set, setMatrixData |
| Methods inherited from class com.numericalmethod.suanshu.matrix.doubles.matrixtype.MatrixMathImpl |
|---|
add, call, minus, multiply, nCols, nRows, opposite, setColumn, setColumn, setRow, setRow, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final double base
b in an expression of the form bn
public final int scale
public final Matrix B
| Constructor Detail |
|---|
public Pow(Matrix A,
int exponent,
double base)
Aexponent so that
Aexponent = basescale * B
A - a matrixexponent - a positive integer exponentbase - the base to scale down the product to avoid overflow
public Pow(Matrix A,
int exponent)
Aexponent so that
Aexponent = (1e100)scale * B
A - a matrixexponent - a positive integer exponent
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||