edu.jas.structure
Interface ElemFactory<C extends Element<C>>
-
- All Superinterfaces:
- java.io.Serializable
- All Known Subinterfaces:
- AbelianGroupFactory<C>, AlgebraFactory<A,C>, FieldFactory<C>, ModularRingFactory<C>, ModulFactory<M,C>, MonoidFactory<C>, PolynomialRing<C>, RingFactory<C>
- All Known Implementing Classes:
- AlgebraicNumberRing, BigComplex, BigDecimal, BigInteger, BigOctonion, BigQuaternion, BigRational, ComplexAlgebraicRing, ComplexRing, ExprRingFactory, GenMatrixRing, GenPolynomialRing, GenSolvablePolynomialRing, GenVectorModul, GenWordPolynomialRing, LocalRing, LocalRing, LocalSolvablePolynomialRing, ModIntegerRing, ModLongRing, MultiVarPowerSeriesRing, ProductRing, QLRSolvablePolynomialRing, QuotientRing, QuotientRing, QuotSolvablePolynomialRing, RealAlgebraicRing, RealAlgebraicRing, RecSolvablePolynomialRing, ResidueRing, ResidueRing, ResidueSolvablePolynomialRing, SolvableLocalResidueRing, SolvableLocalRing, SolvableQuotientRing, SolvableResidueRing, UnivPowerSeriesRing, WordFactory
public interface ElemFactory<C extends Element<C>> extends java.io.SerializableElement factory interface. Defines embedding of integers, parsing and random element construction.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description Ccopy(C c)Create a copy of Element c.CfromInteger(java.math.BigInteger a)Get the Element for a.CfromInteger(long a)Get the Element for a.java.util.List<C>generators()Get a list of the generating elements.booleanisFinite()Is this structure finite or infinite.Cparse(java.io.Reader r)Parse from Reader.Cparse(java.lang.String s)Parse from String.Crandom(int n)Generate a random Element with size less equal to n.Crandom(int n, java.util.Random random)Generate a random Element with size less equal to n.java.lang.StringtoScript()Get a scripting compatible string representation.
-
-
-
Method Detail
-
generators
java.util.List<C> generators()
Get a list of the generating elements.- Returns:
- list of generators for the algebraic structure.
-
isFinite
boolean isFinite()
Is this structure finite or infinite.- Returns:
- true if this structure is finite, else false.
-
fromInteger
C fromInteger(long a)
Get the Element for a.- Parameters:
a- long- Returns:
- element corresponding to a.
-
fromInteger
C fromInteger(java.math.BigInteger a)
Get the Element for a.- Parameters:
a- java.math.BigInteger.- Returns:
- element corresponding to a.
-
random
C random(int n)
Generate a random Element with size less equal to n.- Parameters:
n-- Returns:
- a random element.
-
random
C random(int n, java.util.Random random)
Generate a random Element with size less equal to n.- Parameters:
n-random- is a source for random bits.- Returns:
- a random element.
-
parse
C parse(java.lang.String s)
Parse from String.- Parameters:
s- String.- Returns:
- a Element corresponding to s.
-
parse
C parse(java.io.Reader r)
Parse from Reader.- Parameters:
r- Reader.- Returns:
- the next Element found on r.
-
toScript
java.lang.String toScript()
Get a scripting compatible string representation.- Returns:
- script compatible representation for this ElemFactory.
-
-
DMelt 3.0 © DataMelt by jWork.ORG