Interface VectorOperator

All Known Subinterfaces:
LinearOperator, RealMatrix
All Known Implementing Classes:
AffineOperator, ColumnMajorRealMatrix, FhtKacRotator, RowMajorRealMatrix

public interface VectorOperator
Interface that represents the root of all linear and affine operators including matrices. A vector operator can be applied to a vector. Mathematically, there is another operator that if applied to the resulting vector results in the original vector. Instead of modeling this duality of operators as two distinct operators with an apply(), we instead only use one operator object that has the ability to both apply() and to invertedApply(). The invariants apply(invertedApply(v)) == v and invertedApply(apply(v)) == v both hold.
  • Method Details

    • getNumDimensions

      int getNumDimensions()
      Returns the numbers of dimensions a vector must have to be able to be applied or apply-inverted.
      Returns:
      the numbers of dimensions this vector operator supports; can be -1 if any number of dimensions is supported.
    • apply

      @Nonnull RealVector apply(@Nonnull RealVector vector)
      Apply this operator to the vector passed in.
      Parameters:
      vector - the vector
      Returns:
      a new vector
    • invertedApply

      @Nonnull RealVector invertedApply(@Nonnull RealVector vector)
      Apply the inverted operator to the vector passed in. applyInverted(apply(v)) == v should hold.
      Parameters:
      vector - the vector
      Returns:
      a new vector
    • transform

      @Nonnull default Transformed<RealVector> transform(@Nonnull RealVector vector)
      Applies the operator to the vector that is passed in and creates a `Transformed` wrapper wrapping the result.
      Parameters:
      vector - the vector
      Returns:
      a Transformed-wrapped result
    • untransform

      @Nonnull default RealVector untransform(@Nonnull Transformed<RealVector> vector)
      Inverted-applies the operator to a transformed vector that is passed in and returns a naked (unwrapped) RealVector.
      Parameters:
      vector - the vector
      Returns:
      a Transformed-wrapped result