Example usage for org.apache.commons.math3.linear HessenbergTransformer getP

List of usage examples for org.apache.commons.math3.linear HessenbergTransformer getP

Introduction

In this page you can find the example usage for org.apache.commons.math3.linear HessenbergTransformer getP.

Prototype

public RealMatrix getP() 

Source Link

Document

Returns the matrix P of the transform.

Usage

From source file:org.pmad.gmm.SchurTransformer.java

/**
 * Build the transformation to Schur form of a general real matrix.
 *
 * @param matrix matrix to transform//w  w  w  . j  a v  a2 s. c  o  m
 * @throws NonSquareMatrixException if the matrix is not square
 */
public SchurTransformer(final RealMatrix matrix) {
    if (!matrix.isSquare()) {
        throw new NonSquareMatrixException(matrix.getRowDimension(), matrix.getColumnDimension());
    }

    HessenbergTransformer transformer = new HessenbergTransformer(matrix);
    matrixT = transformer.getH().getData();
    matrixP = transformer.getP().getData();
    cachedT = null;
    cachedP = null;
    cachedPt = null;

    // transform matrix
    transform();
}