Package com.apple.foundationdb.linear
Class AffineOperator
java.lang.Object
com.apple.foundationdb.linear.AffineOperator
- All Implemented Interfaces:
VectorOperator
Vector operator that applies/unapplies a linear operator and an addition to a vector.
-
Constructor Summary
Constructors -
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.static AffineOperatoridentity()invertedApply(RealVector vector) Apply the inverted operator to the vector passed in.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.apple.foundationdb.linear.VectorOperator
transform, untransform
-
Constructor Details
-
AffineOperator
public AffineOperator(@Nullable LinearOperator linearOperator, @Nullable RealVector translationVector)
-
-
Method Details
-
getNumDimensions
public int getNumDimensions()Description copied from interface:VectorOperatorReturns the numbers of dimensions a vector must have to be able to be applied or apply-inverted.- Specified by:
getNumDimensionsin interfaceVectorOperator- Returns:
- the numbers of dimensions this vector operator supports; can be
-1if any number of dimensions is supported.
-
apply
Description copied from interface:VectorOperatorApply this operator to the vector passed in.- Specified by:
applyin interfaceVectorOperator- Parameters:
vector- the vector- Returns:
- a new vector
-
invertedApply
Description copied from interface:VectorOperatorApply the inverted operator to the vector passed in.applyInverted(apply(v)) == vshould hold.- Specified by:
invertedApplyin interfaceVectorOperator- Parameters:
vector- the vector- Returns:
- a new vector
-
identity
-