Class AffineOperator

java.lang.Object
com.apple.foundationdb.linear.AffineOperator
All Implemented Interfaces:
VectorOperator

public class AffineOperator extends Object implements VectorOperator
Vector operator that applies/unapplies a linear operator and an addition to a vector.
  • Constructor Details

    • AffineOperator

      public AffineOperator(@Nullable LinearOperator linearOperator, @Nullable RealVector translationVector)
  • Method Details

    • getNumDimensions

      public int getNumDimensions()
      Description copied from interface: VectorOperator
      Returns the numbers of dimensions a vector must have to be able to be applied or apply-inverted.
      Specified by:
      getNumDimensions in interface VectorOperator
      Returns:
      the numbers of dimensions this vector operator supports; can be -1 if any number of dimensions is supported.
    • apply

      @Nonnull public RealVector apply(@Nonnull RealVector vector)
      Description copied from interface: VectorOperator
      Apply this operator to the vector passed in.
      Specified by:
      apply in interface VectorOperator
      Parameters:
      vector - the vector
      Returns:
      a new vector
    • invertedApply

      @Nonnull public RealVector invertedApply(@Nonnull RealVector vector)
      Description copied from interface: VectorOperator
      Apply the inverted operator to the vector passed in. applyInverted(apply(v)) == v should hold.
      Specified by:
      invertedApply in interface VectorOperator
      Parameters:
      vector - the vector
      Returns:
      a new vector
    • identity

      @Nonnull public static AffineOperator identity()