Class ComplexRing<C extends RingElem<C>>
java.lang.Object
edu.jas.poly.ComplexRing<C>
- Type Parameters:
C- base type.
- All Implemented Interfaces:
AbelianGroupFactory<Complex<C>>, ElemFactory<Complex<C>>, MonoidFactory<Complex<C>>, RingFactory<Complex<C>>, Serializable
Generic Complex ring factory implementing the RingFactory interface. Objects
of this class are immutable.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionComplexRing(RingFactory<C> ring) The constructor creates a ComplexRing object. -
Method Summary
Modifier and TypeMethodDescriptionCorresponding algebraic number ring.Characteristic of this ring.Copy Complex element c.booleanComparison with any other object.fromInteger(long a) Get a Complex element from a long.Get a Complex element from a BigInteger.Get a list of the generating elements.getIMAG()Get the i element.getONE()Get the one element.getZERO()Get the zero element.inthashCode()Hash code for this ComplexRing<C>.booleanQuery if this ring is associative.booleanQuery if this ring is commutative.booleanisField()Query if this ring is a field.booleanisFinite()Is this structure finite or infinite.Parse complex number from Reader.Parse complex number from string.random(int n) Complex number random.Complex number random.toScript()Get a scripting compatible string representation.toString()Get the String representation.Methods inherited from interface ElemFactory
valueOf
-
Field Details
-
random
-
logger
private static final org.apache.logging.log4j.Logger logger -
ring
Complex class elements factory data structure.
-
-
Constructor Details
-
ComplexRing
The constructor creates a ComplexRing object.- Parameters:
ring- factory for Complex real and imaginary parts.
-
-
Method Details
-
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:
-
algebraicRing
Corresponding algebraic number ring.- Returns:
- algebraic number ring. not jet possible.
-
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:
-
copy
-
getZERO
-
getONE
-
getIMAG
-
isCommutative
public boolean isCommutative()Query if this ring is commutative.- Specified by:
isCommutativein interfaceMonoidFactory<C extends RingElem<C>>- Returns:
- true.
-
isAssociative
public boolean isAssociative()Query if this ring is associative.- Specified by:
isAssociativein interfaceMonoidFactory<C extends RingElem<C>>- Returns:
- true.
-
isField
public boolean isField()Query if this ring is a field.- Specified by:
isFieldin interfaceRingFactory<C extends RingElem<C>>- Returns:
- true.
-
characteristic
Characteristic of this ring.- Specified by:
characteristicin interfaceRingFactory<C extends RingElem<C>>- Returns:
- characteristic of this ring.
-
fromInteger
Get a Complex element from a BigInteger.- Specified by:
fromIntegerin interfaceElemFactory<C extends RingElem<C>>- Parameters:
a- BigInteger.- Returns:
- a Complex<C>.
-
fromInteger
Get a Complex element from a long.- Specified by:
fromIntegerin interfaceElemFactory<C extends RingElem<C>>- Parameters:
a- long.- Returns:
- a Complex<C>.
-
toString
-
toScript
-
equals
-
hashCode
-
random
Complex number random. Random base numbers A and B are generated using random(n). Then R is the complex number with real part A and imaginary part B.- Specified by:
randomin interfaceElemFactory<C extends RingElem<C>>- Parameters:
n- such that 0 ≤ A, B ≤ (2n-1).- Returns:
- R.
-
random
Complex number random. Random base numbers A and B are generated using random(n). Then R is the complex number with real part A and imaginary part B.- Specified by:
randomin interfaceElemFactory<C extends RingElem<C>>- Parameters:
n- such that 0 ≤ A, B ≤ (2n-1).rnd- is a source for random bits.- Returns:
- R.
-
parse
-
parse
-