Package edu.jas.vector
Class GenVectorModul<C extends RingElem<C>>
java.lang.Object
edu.jas.vector.GenVectorModul<C>
- All Implemented Interfaces:
AbelianGroupFactory<GenVector<C>>,ElemFactory<GenVector<C>>,ModulFactory<GenVector<C>,,C> Serializable
public class GenVectorModul<C extends RingElem<C>>
extends Object
implements ModulFactory<GenVector<C>,C>
GenVectorModul implements a generic vector factory with RingElem entries.
Vectors of n columns over C.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy vector.booleanComparison with any other object.fromInteger(long a) Get the vector for a.Get the vector for a.From List of coefficients.Get a list of the generating elements.getZERO()getZERO.inthashCode()Hash code for this vector module.booleanisFinite()Is this structure finite or infinite.Parse a vector from a Reader.Parse a vector from a String.random(int k) Random vector.random(int k, float q) Random vector.Random vector.Random vector.toScript()Get a scripting compatible string representation.toString()Get the String representation as RingElem.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface edu.jas.structure.ElemFactory
valueOf
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger logger -
coFac
-
cols
public final int cols -
ZERO
-
BASIS
-
random
-
DEFAULT_DENSITY
public static final float DEFAULT_DENSITY- See Also:
-
density
private final float density- See Also:
-
-
Constructor Details
-
GenVectorModul
Constructor for GenVectorModul.
-
-
Method Details
-
toString
Get the String representation as RingElem. -
toScript
Get a scripting compatible string representation.- Specified by:
toScriptin interfaceElemFactory<C extends RingElem<C>>- Returns:
- script compatible representation for this ElemFactory.
- See Also:
-
getZERO
getZERO.- Specified by:
getZEROin interfaceAbelianGroupFactory<C extends RingElem<C>>- Returns:
- ZERO.
-
generators
Get a list of the generating elements.- Specified by:
generatorsin interfaceElemFactory<C extends RingElem<C>>- Returns:
- list of generators for the algebraic structure.
- See Also:
-
isFinite
public boolean isFinite()Is this structure finite or infinite.- Specified by:
isFinitein interfaceElemFactory<C extends RingElem<C>>- Returns:
- true if this structure is finite, else false.
- See Also:
-
equals
Comparison with any other object. -
hashCode
public int hashCode()Hash code for this vector module. -
fromInteger
Get the vector for a.- Specified by:
fromIntegerin interfaceElemFactory<C extends RingElem<C>>- Parameters:
a- long- Returns:
- vector corresponding to a.
-
fromInteger
Get the vector for a.- Specified by:
fromIntegerin interfaceElemFactory<C extends RingElem<C>>- Parameters:
a- long- Returns:
- vector corresponding to a.
-
fromList
From List of coefficients. -
random
Random vector.- Specified by:
randomin interfaceElemFactory<C extends RingElem<C>>- Parameters:
k- size of random coefficients.- Returns:
- random vector.
-
random
Random vector. -
random
Random vector.- Specified by:
randomin interfaceElemFactory<C extends RingElem<C>>- Parameters:
k- size of random coefficients.random- is a source for random bits.- Returns:
- a random element.
-
random
Random vector.- Parameters:
k- size of random coefficients.q- density of nonzero coefficients.random- is a source for random bits.- Returns:
- a random element.
-
copy
copy vector.- Specified by:
copyin interfaceElemFactory<C extends RingElem<C>>- Parameters:
c- vector.- Returns:
- copy of vector c.
-
parse
Parse a vector from a String. Syntax: [ c, ..., c ]- Specified by:
parsein interfaceElemFactory<C extends RingElem<C>>- Parameters:
s- String with vector.- Returns:
- parsed vector.
-
parse
Parse a vector from a Reader.- Specified by:
parsein interfaceElemFactory<C extends RingElem<C>>- Parameters:
r- Reader containing a vector.- Returns:
- parsed vector.
-