|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.rubato.math.module.morphism.ModuleMorphism
org.rubato.math.module.morphism.ZAbstractMorphism
org.rubato.math.module.morphism.ZAffineMorphism
public final class ZAffineMorphism
Affine morphism in the Z. The morphism h is such that h(x) = a*x+b where a and b are integers.
Constructor Summary | |
---|---|
ZAffineMorphism(int a,
int b)
Creates an affine morphism h(x) = a*x+b. |
Method Summary | |
---|---|
ModuleElement |
atZero()
Returns the value of the morphism evaluated at the zero of the domain. |
int |
compareTo(ModuleMorphism object)
Compares two module morphisms. |
ModuleMorphism |
compose(ModuleMorphism morphism)
Returns the composition this* morphism . |
ModuleMorphism |
difference(ModuleMorphism morphism)
Returns the difference of this module morphism and morphism . |
boolean |
equals(java.lang.Object object)
Returns true iff this morphism is equal to object . |
ModuleMorphism |
fromXML(XMLReader reader,
org.w3c.dom.Element element)
Reads XML representation from reader starting with element . |
int |
getA()
Returns the linear part. |
int |
getB()
Returns the translation part. |
java.lang.String |
getElementTypeName()
Returns the value of the type attribute for this class. |
static XMLInputOutput<ModuleMorphism> |
getXMLInputOutput()
|
boolean |
isConstant()
Returns true iff this morphism is constant. |
boolean |
isIdentity()
Returns true iff this morphism is the identity morphism. |
boolean |
isLinear()
Returns true iff this is a linear morphism. |
boolean |
isModuleHomomorphism()
If true, then this is a module homomorphism. |
boolean |
isRingHomomorphism()
If true, then this is a ring homomorphism. |
int |
mapValue(int x)
The low-level map method. |
ModuleMorphism |
scaled(RingElement element)
Returns this module morphism scaled by element . |
ModuleMorphism |
sum(ModuleMorphism morphism)
Returns the sum of this module morphism and morphism . |
java.lang.String |
toString()
Returns a string representation of this morphism. |
void |
toXML(XMLWriter writer)
Outputs XML representation to writer . |
Methods inherited from class org.rubato.math.module.morphism.ZAbstractMorphism |
---|
getRingMorphism, map |
Methods inherited from class org.rubato.math.module.morphism.ModuleMorphism |
---|
clone, composable, getCodomain, getConstantMorphism, getConstantMorphism, getDomain, getIdentityMorphism, inDomain, isRingMorphism, power |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ZAffineMorphism(int a, int b)
Method Detail |
---|
public int mapValue(int x)
ZAbstractMorphism
mapValue
in class ZAbstractMorphism
public boolean isModuleHomomorphism()
ModuleMorphism
isModuleHomomorphism
in class ModuleMorphism
public boolean isRingHomomorphism()
ModuleMorphism
isRingHomomorphism
in class ModuleMorphism
public boolean isLinear()
ModuleMorphism
isLinear
in class ModuleMorphism
public boolean isIdentity()
ModuleMorphism
isIdentity
in class ModuleMorphism
public boolean isConstant()
ModuleMorphism
isConstant
in class ModuleMorphism
public ModuleMorphism compose(ModuleMorphism morphism) throws CompositionException
ModuleMorphism
morphism
.
compose
in class ModuleMorphism
CompositionException
- if composition could not be performedpublic ModuleMorphism sum(ModuleMorphism morphism) throws CompositionException
ModuleMorphism
morphism
.
sum
in class ModuleMorphism
CompositionException
- if sum could not be performedpublic ModuleMorphism difference(ModuleMorphism morphism) throws CompositionException
ModuleMorphism
morphism
.
difference
in class ModuleMorphism
CompositionException
- if difference could not be performedpublic ModuleMorphism scaled(RingElement element) throws CompositionException
ModuleMorphism
element
.
scaled
in class ModuleMorphism
CompositionException
public ModuleElement atZero()
ModuleMorphism
atZero
in class ModuleMorphism
public int compareTo(ModuleMorphism object)
ModuleMorphism
compareTo
in interface java.lang.Comparable<ModuleMorphism>
compareTo
in class ModuleMorphism
public boolean equals(java.lang.Object object)
ModuleMorphism
object
.
In general it is not possible to determine whether to functions
are the same, so this returns true iff both morphisms have
the same structure.
equals
in class ModuleMorphism
public java.lang.String toString()
ModuleMorphism
toString
in class ModuleMorphism
public void toXML(XMLWriter writer)
XMLInputOutput
writer
.
public ModuleMorphism fromXML(XMLReader reader, org.w3c.dom.Element element)
XMLInputOutput
reader
starting with element
.
public static XMLInputOutput<ModuleMorphism> getXMLInputOutput()
public java.lang.String getElementTypeName()
XMLInputOutput
public int getA()
public int getB()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |