Record Class SVDResult<E>

java.lang.Object
java.lang.Record
org.episteme.core.mathematics.linearalgebra.matrices.solvers.SVDResult<E>
Type Parameters:
E - the element type
Record Components:
U - the left singular vectors
S - the singular values (as a vector)
V - the right singular vectors

public record SVDResult<E>(Matrix<E> U, Vector<E> S, Matrix<E> V) extends Record
Result of a Singular Value Decomposition (SVD).

A = U * S * V^T

  • Constructor Details

    • SVDResult

      public SVDResult(Matrix<E> U, Vector<E> S, Matrix<E> V)
      Creates an instance of a SVDResult record class.
      Parameters:
      U - the value for the U record component
      S - the value for the S record component
      V - the value for the V record component
  • Method Details

    • getU

      public Matrix<E> getU()
    • getS

      public Vector<E> getS()
    • getV

      public Matrix<E> getV()
    • getSingularValues

      public Vector<E> getSingularValues()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • U

      public Matrix<E> U()
      Returns the value of the U record component.
      Returns:
      the value of the U record component
    • S

      public Vector<E> S()
      Returns the value of the S record component.
      Returns:
      the value of the S record component
    • V

      public Matrix<E> V()
      Returns the value of the V record component.
      Returns:
      the value of the V record component