Class BasicLinAlg<C extends RingElem<C>>

java.lang.Object
edu.jas.vector.BasicLinAlg<C>
Type Parameters:
C - coefficient type
All Implemented Interfaces:
Serializable

public class BasicLinAlg<C extends RingElem<C>> extends Object implements Serializable
Basic linear algebra methods. Implements Basic linear algebra computations and tests. Note: will eventually use wrong method dispatch in JRE when used with GenSolvablePolynomial.
See Also:
  • Field Details

    • logger

      private static final org.apache.logging.log4j.Logger logger
  • Constructor Details

    • BasicLinAlg

      public BasicLinAlg()
      Constructor.
  • Method Details

    • scalarProduct

      public C scalarProduct(List<C> G, List<C> F)
      Scalar product of vectors of ring elements.
      Parameters:
      G - a ring element list.
      F - a ring element list.
      Returns:
      the scalar product of G and F.
    • leftScalarProduct

      public List<C> leftScalarProduct(List<C> G, List<List<C>> F)
      Scalar product of vectors and a matrix of ring elements.
      Parameters:
      G - a ring element list.
      F - a list of ring element lists.
      Returns:
      the scalar product of G and F.
    • rightScalarProduct

      public List<C> rightScalarProduct(List<C> G, List<List<C>> F)
      Scalar product of vectors and a matrix of ring elements.
      Parameters:
      G - a ring element list.
      F - a list of ring element lists.
      Returns:
      the right scalar product of G and F.
    • vectorAdd

      public List<C> vectorAdd(List<C> a, List<C> b)
      Addition of vectors of ring elements.
      Parameters:
      a - a ring element list.
      b - a ring element list.
      Returns:
      a+b, the vector sum of a and b.
    • vectorNegate

      public List<C> vectorNegate(List<C> a)
      Negative of vectors of ring elements.
      Parameters:
      a - a ring element list.
      Returns:
      -a, the vector of -a.
    • vectorCombineRep

      public List<C> vectorCombineRep(List<C> a, List<C> b)
      Combination of vectors for reduction representation.
      Parameters:
      a - a ring element list.
      b - a ring element list.
      Returns:
      a-b, the vector difference of a and b, with one entry more.
    • vectorCombineSyz

      public List<C> vectorCombineSyz(List<C> a, List<C> b)
      Combination of vectors for syzygy representation.
      Parameters:
      a - a ring element list.
      b - a ring element list.
      Returns:
      (-a)+b, the vector sum of -a and b, with one entry more.
    • vectorCombineOld

      public List<C> vectorCombineOld(List<C> a, List<C> b)
      Combination of vectors for old representation.
      Parameters:
      a - a ring element list.
      b - a ring element list.
      Returns:
      -a-b, the vector difference of -a and b, with one entry more.
    • genVector

      public List<C> genVector(int n, C a)
      Generation of a vector of ring elements.
      Parameters:
      n - length of vector.
      a - a ring element to fill vector entries.
      Returns:
      V, a vector of length n and entries a.
    • genVector

      public List<C> genVector(int n, C a, List<C> A)
      Generation of a vector of ring elements.
      Parameters:
      n - length of vector.
      a - a ring element to fill vector entries.
      A - vector of starting first entries.
      Returns:
      V, a vector of length n and entries a, respectively A.
    • isZero

      public boolean isZero(List<C> a)
      Test vector of zero ring elements.
      Parameters:
      a - a ring element list.
      Returns:
      true, if all polynomial in a are zero, else false.
    • scalarProduct

      public List<C> scalarProduct(C p, List<C> F)
      Scalar product of ring element with vector of ring elements.
      Parameters:
      p - a ring element.
      F - a ring element list.
      Returns:
      the scalar product of p and F.
    • scalarProduct

      public List<C> scalarProduct(List<C> F, C p)
      Scalar product of vector of ring element with ring element.
      Parameters:
      F - a ring element list.
      p - a ring element.
      Returns:
      the scalar product of F and p.
    • leftProduct

      public GenVector<C> leftProduct(GenVector<C> G, GenMatrix<C> F)
      Product of a vector and a matrix of ring elements.
      Parameters:
      G - a vectors of ring elements.
      F - a matrix of ring element lists.
      Returns:
      the left product of G and F.
    • rightProduct

      public GenVector<C> rightProduct(GenVector<C> G, GenMatrix<C> F)
      Product of a vector and a matrix of ring elements.
      Parameters:
      G - a vector of element list.
      F - a matrix of ring element lists.
      Returns:
      the right product of G and F.