# Class Pow

All Implemented Interfaces:
Matrix, MatrixAccess, MatrixRing, MatrixTable, Densifiable, AbelianGroup<Matrix>, Monoid<Matrix>, Ring<Matrix>, Table, DeepCopyable

public class Pow extends DenseMatrix
This is a square matrix A to the power of an 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.
• ## Constructor Summary

Constructors
Constructor
Description
Pow(Matrix A, int n)
Construct the power matrix An so that An = (1e100)scale * B
Pow(Matrix A, int n, double base)
Construct the power matrix An so that An = basescale * B
• ## Method Summary

Modifier and Type
Method
Description
ImmutableMatrix
B()
Get the double precision matrix.
double
base()
Get the radix or base of the coefficient.
int
scale()
Get the exponential of the coefficient.

### Methods inherited from class dev.nm.algebra.linear.matrix.doubles.matrixtype.dense.DenseMatrix

add, deepCopy, equals, get, getColumn, getColumn, getRow, getRow, hashCode, minus, multiply, multiply, nCols, nRows, ONE, opposite, scaled, set, setColumn, setRow, t, toDense, toString, ZERO

### Methods inherited from class java.lang.Object

clone, finalize, getClass, notify, notifyAll, wait, wait, wait

### Methods inherited from interface dev.nm.algebra.linear.matrix.doubles.Matrix

toCSV
• ## Constructor Details

• ### Pow

public Pow(Matrix A, int n, double base)
Construct the power matrix An so that
An = basescale * B
Parameters:
A - a matrix
n - a positive integer exponent
base - the base to scale down the product to avoid overflow
• ### Pow

public Pow(Matrix A, int n)
Construct the power matrix An so that
An = (1e100)scale * B
Parameters:
A - a matrix
n - a positive integer exponent
• ## Method Details

• ### base

public double base()
Get the radix or base of the coefficient.
Returns:
the base