Package com.apple.foundationdb.linear
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 Summary
Modifier and TypeMethodDescriptionapply(RealVector vector) Apply this operator to the vector passed in.intReturns the numbers of dimensions a vector must have to be able to be applied or apply-inverted.invertedApply(RealVector vector) Apply the inverted operator to the vector passed in.default Transformed<RealVector>transform(RealVector vector) Applies the operator to the vector that is passed in and creates a `Transformed` wrapper wrapping the result.default RealVectoruntransform(Transformed<RealVector> vector) Inverted-applies the operator to a transformed vector that is passed in and returns a naked (unwrapped)RealVector.
-
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
-1if any number of dimensions is supported.
-
apply
Apply this operator to the vector passed in.- Parameters:
vector- the vector- Returns:
- a new vector
-
invertedApply
Apply the inverted operator to the vector passed in.applyInverted(apply(v)) == vshould hold.- Parameters:
vector- the vector- Returns:
- a new vector
-
transform
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
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
-