|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.rubato.math.module.morphism.ModuleMorphism
public abstract class ModuleMorphism
The abstract base class for morphisms in modules.
Any new type (subclass) of ModuleMorphism must be registered
with a dispatcher for reading from XML
(in the init method of Dispatcher
).
Constructor Summary | |
---|---|
ModuleMorphism(Module domain,
Module codomain)
Creates a new morphism with domain
and codomain |
Method Summary | |
---|---|
ModuleElement |
atZero()
Returns the value of the morphism evaluated at the zero of the domain. |
java.lang.Object |
clone()
ModuleMorphism objects cannot be changed, so clone returns the object itself. |
int |
compareTo(ModuleMorphism morphism)
Compares two module morphisms. |
static boolean |
composable(ModuleMorphism f,
ModuleMorphism g)
Returns true iff the composition f *g
is possible. |
ModuleMorphism |
compose(ModuleMorphism morphism)
Returns the composition this* morphism . |
ModuleMorphism |
difference(ModuleMorphism morphism)
Returns the difference of this module morphism and morphism . |
abstract boolean |
equals(java.lang.Object object)
Returns true iff this morphism is equal to object . |
Module |
getCodomain()
Returns the codomain of this morphism. |
ModuleMorphism |
getConstantMorphism(ModuleElement value)
Returns a constant morphism with the domain of this morphism that returns the specified constant value . |
static ModuleMorphism |
getConstantMorphism(Module module,
ModuleElement value)
Returns the constant value morphism in module . |
Module |
getDomain()
Returns the domain of this morphism. |
static ModuleMorphism |
getIdentityMorphism(Module module)
Returns the identity morphism in module . |
abstract ModuleMorphism |
getRingMorphism()
Returns the the ring morphism that transforms between the rings of the domain and codomain modules. |
boolean |
inDomain(ModuleElement x)
Returns true iff element x is in the domain of the morphism. |
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. |
boolean |
isRingMorphism()
If true, then this is a morphism between rings; |
abstract ModuleElement |
map(ModuleElement x)
Maps the element x . |
ModuleMorphism |
power(int n)
Returns this module morphism raise to the power n . |
ModuleMorphism |
scaled(RingElement element)
Returns this module morphism scaled by element . |
ModuleMorphism |
sum(ModuleMorphism morphism)
Returns the sum of this module morphism and morphism . |
abstract java.lang.String |
toString()
Returns a string representation of this morphism. |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.rubato.xml.XMLInputOutput |
---|
fromXML, getElementTypeName, toXML |
Constructor Detail |
---|
public ModuleMorphism(Module domain, Module codomain)
domain
and codomain as indicated.
Method Detail |
---|
public abstract ModuleElement map(ModuleElement x) throws MappingException
x
.
This must be implemented for each specific morphism type.
x
MappingException
- if mapping of element fails
public ModuleMorphism compose(ModuleMorphism morphism) throws CompositionException
morphism
.
CompositionException
- if composition could not be performedpublic ModuleMorphism sum(ModuleMorphism morphism) throws CompositionException
morphism
.
CompositionException
- if sum could not be performedpublic ModuleMorphism difference(ModuleMorphism morphism) throws CompositionException
morphism
.
CompositionException
- if difference could not be performedpublic ModuleMorphism scaled(RingElement element) throws CompositionException
element
.
CompositionException
public ModuleElement atZero()
public ModuleMorphism power(int n) throws CompositionException
n
.
The power must be non-negative and the domain must be equal
to the codomain.
CompositionException
- if power could not be performedpublic static ModuleMorphism getIdentityMorphism(Module module)
module
.
public static ModuleMorphism getConstantMorphism(Module module, ModuleElement value)
value
morphism in module
.
public ModuleMorphism getConstantMorphism(ModuleElement value)
value
.
public boolean isIdentity()
public boolean isConstant()
public final Module getDomain()
public final Module getCodomain()
public boolean isModuleHomomorphism()
public boolean isRingHomomorphism()
public boolean isRingMorphism()
public abstract ModuleMorphism getRingMorphism()
public boolean isLinear()
public static final boolean composable(ModuleMorphism f, ModuleMorphism g)
f
*g
is possible.
public boolean inDomain(ModuleElement x)
x
is in the domain of the morphism.
public int compareTo(ModuleMorphism morphism)
compareTo
in interface java.lang.Comparable<ModuleMorphism>
public abstract boolean equals(java.lang.Object object)
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 java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
public abstract java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |