Package edu.jas.vector
Class BasicLinAlg<C extends RingElem<C>>
java.lang.Object
edu.jas.vector.BasicLinAlg<C>
- Type Parameters:
C
- coefficient type
- All Implemented Interfaces:
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGeneration of a vector of ring elements.Generation of a vector of ring elements.boolean
Test vector of zero ring elements.leftProduct
(GenVector<C> G, GenMatrix<C> F) Product of a vector and a matrix of ring elements.Scalar product of vectors and a matrix of ring elements.rightProduct
(GenVector<C> G, GenMatrix<C> F) Product of a vector and a matrix of ring elements.Scalar product of vectors and a matrix of ring elements.scalarProduct
(C p, List<C> F) Scalar product of ring element with vector of ring elements.scalarProduct
(List<C> F, C p) Scalar product of vector of ring element with ring element.scalarProduct
(List<C> G, List<C> F) Scalar product of vectors of ring elements.Addition of vectors of ring elements.vectorCombineOld
(List<C> a, List<C> b) Combination of vectors for old representation.vectorCombineRep
(List<C> a, List<C> b) Combination of vectors for reduction representation.vectorCombineSyz
(List<C> a, List<C> b) Combination of vectors for syzygy representation.vectorNegate
(List<C> a) Negative of vectors of ring elements.
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger logger
-
-
Constructor Details
-
BasicLinAlg
public BasicLinAlg()Constructor.
-
-
Method Details
-
scalarProduct
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
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
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
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
Negative of vectors of ring elements.- Parameters:
a
- a ring element list.- Returns:
- -a, the vector of -a.
-
vectorCombineRep
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
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
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
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
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
Test vector of zero ring elements.- Parameters:
a
- a ring element list.- Returns:
- true, if all polynomial in a are zero, else false.
-
scalarProduct
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
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
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
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.
-