Class Decomposer

java.lang.Object
com.irurueta.algebra.Decomposer
Direct Known Subclasses:
CholeskyDecomposer, EconomyQRDecomposer, LUDecomposer, QRDecomposer, RQDecomposer, SingularValueDecomposer

public abstract class Decomposer extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Matrix
    Reference to input matrix to be decomposed.
    protected boolean
    Member indicating whether this decomposer instance is locked or not.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Constructor of this class.
    protected
    Decomposer(Matrix inputMatrix)
    Constructor of this class.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    This method computes matrix decomposition for each decomposer type.
    Returns decomposer type of this instance.
    Returns a reference to input matrix to be decomposed.
    abstract boolean
    Returns boolean indicating whether decomposition has been computed and results can be retrieved.
    boolean
    Returns boolean indicating whether this instance is locked or not.
    boolean
    Returns boolean indicating whether this instance is ready for decomposition computation.
    void
    setInputMatrix(Matrix inputMatrix)
    Sets reference to input matrix to be decomposed.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • inputMatrix

      protected Matrix inputMatrix
      Reference to input matrix to be decomposed.
    • locked

      protected boolean locked
      Member indicating whether this decomposer instance is locked or not. When locked, attempting to change parameters of this instance might raise a com.algebra.LockedException.
  • Constructor Details

    • Decomposer

      protected Decomposer()
      Constructor of this class.
    • Decomposer

      protected Decomposer(Matrix inputMatrix)
      Constructor of this class.
      Parameters:
      inputMatrix - Reference to input matrix to be decomposed.
  • Method Details

    • getDecomposerType

      public abstract DecomposerType getDecomposerType()
      Returns decomposer type of this instance. Decomposer type determines the algorithm being used for matrix decomposition. Depending on this type, after calling decompose() method, different object or matrices will be available for retrieval.
      Returns:
      Decomposer type of this instance.
    • getInputMatrix

      public Matrix getInputMatrix()
      Returns a reference to input matrix to be decomposed.
      Returns:
      Reference to input matrix to be decomposed.
    • setInputMatrix

      public void setInputMatrix(Matrix inputMatrix) throws LockedException
      Sets reference to input matrix to be decomposed.
      Parameters:
      inputMatrix - Reference to input matrix to be decomposed.
      Throws:
      LockedException - Exception thrown if attempting to call this method while this instance remains locked.
    • isReady

      public boolean isReady()
      Returns boolean indicating whether this instance is ready for decomposition computation. Attempting to call decompose() method when this instance is not ready will result on a NotReadyException being thrown.
      Returns:
      Boolean indicating whether this instance is ready for decomposition computation.
    • isLocked

      public boolean isLocked()
      Returns boolean indicating whether this instance is locked or not. When locked, attempting to change some parameters of this instance might raise a LockedException.
      Returns:
      Boolean indicating whether this instance is locked or not.
    • isDecompositionAvailable

      public abstract boolean isDecompositionAvailable()
      Returns boolean indicating whether decomposition has been computed and results can be retrieved. Attempting to retrieve decomposition results when not available, will probably raise a NotAvailableException.
      Returns:
      Boolean indicating whether decomposition has been computed and results can be retrieved.
    • decompose

      public abstract void decompose() throws NotReadyException, LockedException, DecomposerException
      This method computes matrix decomposition for each decomposer type. After execution of this method, different objects might be generated depending on decomposition type and decomposition results availability. Note: during execution of this method, this instance might become locked depending on subclass implementation.
      Throws:
      NotReadyException - Exception thrown if attempting to call this method when this instance is not yet ready for decomposition, usually because some data or parameter is missing.
      LockedException - Exception thrown if this decomposer is already locked before calling this method. Notice that this method will actually lock this instance while it is being executed.
      DecomposerException - Exception thrown if for any other reason decomposition fails while being executed, like when convergence or results cannot be obtained, etc.