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 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
      See Also:
    • scale

      public int scale()
      Get the exponential of the coefficient.
      Returns:
      the exponential of the coefficient
    • B

      public ImmutableMatrix B()
      Get the double precision matrix.
      Returns:
      the double precision matrix