Class Projection

    • Constructor Detail

      • Projection

        public Projection​(Vector v,
                          List<Vector> basis)
        Project a vector v onto a set of basis {wi}.
        Parameters:
        v - a vector
        basis - {wi}
      • Projection

        public Projection​(Vector v,
                          Vector[] basis)
        Project a vector v onto a set of basis {wi}.
        Parameters:
        v - a vector
        basis - {wi}
      • Projection

        public Projection​(Vector v,
                          Vector w)
        Project a vector v onto another vector.
        Parameters:
        v - a vector
        w - another vector
    • 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