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.boolean
Comparison 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.int
hashCode()
Hash code for this vector module.boolean
isFinite()
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, wait
Methods 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:
toScript
in interfaceElemFactory<C extends RingElem<C>>
- Returns:
- script compatible representation for this ElemFactory.
- See Also:
-
getZERO
getZERO.- Specified by:
getZERO
in interfaceAbelianGroupFactory<C extends RingElem<C>>
- Returns:
- ZERO.
-
generators
Get a list of the generating elements.- Specified by:
generators
in 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:
isFinite
in 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:
fromInteger
in interfaceElemFactory<C extends RingElem<C>>
- Parameters:
a
- long- Returns:
- vector corresponding to a.
-
fromInteger
Get the vector for a.- Specified by:
fromInteger
in interfaceElemFactory<C extends RingElem<C>>
- Parameters:
a
- long- Returns:
- vector corresponding to a.
-
fromList
From List of coefficients. -
random
Random vector.- Specified by:
random
in interfaceElemFactory<C extends RingElem<C>>
- Parameters:
k
- size of random coefficients.- Returns:
- random vector.
-
random
Random vector. -
random
Random vector.- Specified by:
random
in 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:
copy
in 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:
parse
in interfaceElemFactory<C extends RingElem<C>>
- Parameters:
s
- String with vector.- Returns:
- parsed vector.
-
parse
Parse a vector from a Reader.- Specified by:
parse
in interfaceElemFactory<C extends RingElem<C>>
- Parameters:
r
- Reader containing a vector.- Returns:
- parsed vector.
-