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>, java.io.Serializable
public class GenVectorModul<C extends RingElem<C>> extends java.lang.Object implements ModulFactory<GenVector<C>,C>
GenVectorModul implements a generic vector factory with RingElem entries. Vectors of n columns over C.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description java.util.List<GenVector<C>>BASISRingFactory<C>coFacintcolsstatic floatDEFAULT_DENSITYGenVector<C>ZERO
-
Constructor Summary
Constructors Constructor and Description GenVectorModul(RingFactory<C> b, int s)Constructor for GenVectorModul.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description GenVector<C>copy(GenVector<C> c)copy vector.booleanequals(java.lang.Object other)Comparison with any other object.GenVector<C>fromInteger(java.math.BigInteger a)Get the vector for a.GenVector<C>fromInteger(long a)Get the vector for a.GenVector<C>fromList(java.util.List<C> v)From List of coefficients.java.util.List<GenVector<C>>generators()Get a list of the generating elements.GenVector<C>getZERO()getZERO.inthashCode()Hash code for this vector module.booleanisFinite()Is this structure finite or infinite.GenVector<C>parse(java.io.Reader r)Parse a vector from a Reader.GenVector<C>parse(java.lang.String s)Parse a vector from a String.GenVector<C>random(int k)Random vector.GenVector<C>random(int k, float q)Random vector.GenVector<C>random(int k, float q, java.util.Random random)Random vector.GenVector<C>random(int k, java.util.Random random)Random vector.java.lang.StringtoScript()Get a scripting compatible string representation.java.lang.StringtoString()Get the String representation as RingElem.
-
-
-
Field Detail
-
coFac
public final RingFactory<C extends RingElem<C>> coFac
-
cols
public final int cols
-
DEFAULT_DENSITY
public static final float DEFAULT_DENSITY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GenVectorModul
public GenVectorModul(RingFactory<C> b, int s)
Constructor for GenVectorModul.
-
-
Method Detail
-
toString
public java.lang.String toString()
Get the String representation as RingElem.- Overrides:
toStringin classjava.lang.Object- See Also:
Object.toString()
-
toScript
public java.lang.String toScript()
Get a scripting compatible string representation.- Specified by:
toScriptin interfaceElemFactory<GenVector<C extends RingElem<C>>>- Returns:
- script compatible representation for this ElemFactory.
- See Also:
ElemFactory.toScript()
-
generators
public java.util.List<GenVector<C>> generators()
Get a list of the generating elements.- Specified by:
generatorsin interfaceElemFactory<GenVector<C extends RingElem<C>>>- Returns:
- list of generators for the algebraic structure.
- See Also:
ElemFactory.generators()
-
isFinite
public boolean isFinite()
Is this structure finite or infinite.- Specified by:
isFinitein interfaceElemFactory<GenVector<C extends RingElem<C>>>- Returns:
- true if this structure is finite, else false.
- See Also:
ElemFactory.isFinite()
-
equals
public boolean equals(java.lang.Object other)
Comparison with any other object.- Overrides:
equalsin classjava.lang.Object- See Also:
Object.equals(java.lang.Object)
-
hashCode
public int hashCode()
Hash code for this vector module.- Overrides:
hashCodein classjava.lang.Object- See Also:
Object.hashCode()
-
fromInteger
public GenVector<C> fromInteger(long a)
Get the vector for a.- Specified by:
fromIntegerin interfaceElemFactory<GenVector<C extends RingElem<C>>>- Parameters:
a- long- Returns:
- vector corresponding to a.
-
fromInteger
public GenVector<C> fromInteger(java.math.BigInteger a)
Get the vector for a.- Specified by:
fromIntegerin interfaceElemFactory<GenVector<C extends RingElem<C>>>- Parameters:
a- long- Returns:
- vector corresponding to a.
-
random
public GenVector<C> random(int k, float q, java.util.Random 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.
-
parse
public GenVector<C> parse(java.lang.String s)
Parse a vector from a String. Syntax: [ c, ..., c ]
-
-
DMelt 3.0 © DataMelt by jWork.ORG