Class Projection
- java.lang.Object
-
- dev.nm.algebra.linear.vector.doubles.operation.Projection
-
public class Projection extends Object
Project a vector v on another vector w or a set of vectors (basis) {wi}.- See Also:
- Wikipedia: Vector projection
-
-
Constructor Summary
Constructors Constructor Description Projection(Vector v, Vector w)
Project a vector v onto another vector.Projection(Vector v, Vector[] basis)
Project a vector v onto a set of basis {wi}.Projection(Vector v, List<Vector> basis)
Project a vector v onto a set of basis {wi}.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableVector
getOrthogonalVector()
Get the orthogonal vector which is equal to v minus the projection of v on {wi}.double
getProjectionLength(int i)
Get the length of v projected on each dimension {wi}.ImmutableVector
getProjectionVector(int i)
Get the i-th projected vector of v on {wi}.
-
-
-
Constructor Detail
-
Projection
public Projection(Vector v, List<Vector> basis)
Project a vector v onto a set of basis {wi}.- Parameters:
v
- a vectorbasis
- {wi}
-
Projection
public Projection(Vector v, Vector[] basis)
Project a vector v onto a set of basis {wi}.- Parameters:
v
- a vectorbasis
- {wi}
-
-
Method Detail
-
getOrthogonalVector
public ImmutableVector getOrthogonalVector()
Get the orthogonal vector which is equal to v minus the projection of v on {wi}.- Returns:
- the orthogonal vector
-
getProjectionLength
public double getProjectionLength(int i)
Get the length of v projected on each dimension {wi}.- Parameters:
i
- an index, counting from 0- Returns:
- the i-th projection length
-
getProjectionVector
public ImmutableVector getProjectionVector(int i)
Get the i-th projected vector of v on {wi}. It lies on the hyperplane of {wi}.- Parameters:
i
- an index, counting from 0- Returns:
- the i-th projection vector
-
-