Index - All Packages - All Categories - All Classes

Class Mapping

A mapping is a general mapping from one coordinate space to another, with few of the guarantees provided by Dsps. In particular, the source and destination coordinate spaces can be different, and the mapping doesn't have to be everywhere defined (but it has to say where it is defined via "domain" and "range" messages). A mapping doesn't have to be unique--the same domain position may map to multiple range positions and vice versa. A mapping of a XuRegion must yield another XuRegion, but a mapping of a simple region doesn't have to yield a simple region.

A useful and valid way to think of a Mapping is as a (possibly infinite) set of pairs (a mathematical set, not a ScruSet). The domain region consists of the first elements of each pair, and the range region consists of the second elements.

A mapping is most useful as a representation of a version comparison of two different organizations of common elements. The mapping would tell how positions in one organization correspond to positions in the other.

Package: Udanax-Gold
All Superclasses: Object Heaper
Immediate Subclasses: CompositeMapping ConstantMapping Dsp EmptyMapping SimpleMapping
Protocols: Object
Categories: Xanadu-Spaces-Basic

Class Methods

infostProtocol



Overridden by: CrossMapping class IntegerMapping class SequenceMapping class

make: a with: b



Overridden by: CrossMapping class SequenceMapping class EmptyMapping class

make: cs with: rs with: mappings


makeCoordinateSpace: cs withCoordinateSpace: rs


makeCoordinateSpace: cs withRegion: values

Make a constant mapping from all positions in cs to all positions in values.

makeRegion: region with: mapping



Instance Methods

actualHashForEqual



Overridden by: CompositeMapping ConstantMapping GenericCrossDsp IdentityDsp FilterDsp IntegerMapping EmptyMapping SimpleMapping

appliedAfter: dsp

Defined by the equivalence:
M->transformedBy(D)->of(R) isEqual (M->of(D->of(R)))
for all regions R in the domainSpace of M. Equivalent to Dsp::compose, except that it is between a Mapping and a Dsp.

Overridden by: CompositeMapping ConstantMapping Dsp EmptyMapping SimpleMapping

combine: other

Essential. Result will do both mine and other's mappings. It will do my mapping where I am defined, and it will do the other's where his is defined. If we are both defined over some domain positions, then the result is a multi-valued mapping. If you think of a Mapping simply as a set of pairs (see class comment), then 'combine' yields a Mapping consisting of the union of these two sets.

coordinateSpace

the coordinate space of the domain of the Mapping

Overridden by: CompositeMapping ConstantMapping Dsp CrossMapping GenericCrossDsp IdentityDsp FilterDsp HeaperDsp IDDsp RealDsp IntegerMapping SequenceMapping EmptyMapping SimpleMapping

domain

Essential. region in which it is valid.

Overridden by: CompositeMapping ConstantMapping Dsp EmptyMapping SimpleMapping

domainSpace

The coordinate space of the domain of the Mapping

export


fetchCombine: mapping

if I know how to combine the two into a single mapping, then I do so

Overridden by: CompositeMapping ConstantMapping Dsp EmptyMapping SimpleMapping

fetchDsp

if this is a Dsp or a Dsp retricted to some domain, return the underlying Dsp. Otherwise nil.

Overridden by: CompositeMapping ConstantMapping Dsp EmptyMapping SimpleMapping

inverse

Essential. Return the inverse of this transformation. Considering the Mapping as a set of pairs (see class comment), return the Dsp which has the mirror image of all my pairs.

Overridden by: CompositeMapping ConstantMapping Dsp CrossMapping GenericCrossDsp IdentityDsp IntegerMapping SequenceMapping EmptyMapping SimpleMapping

inverseOf: after

Inverse transform a position. Must BLAST if there isn't a unique inverse.
'a->isEqual (this->of (b))' iff 'b->isEqual (this->inverseOf (a))'.

Overridden by: CompositeMapping ConstantMapping Dsp GenericCrossDsp IdentityDsp IntegerMapping SequenceMapping EmptyMapping SimpleMapping

inverseOfAll: after

Inverse transform of a region.
'a->isEqual (this->of (b))' iff 'b->isEqual (this->inverseOf (a))'.

Overridden by: CompositeMapping ConstantMapping Dsp GenericCrossDsp IdentityDsp IntegerMapping SequenceMapping EmptyMapping SimpleMapping

inverseOfInt: pos

Unboxed version of 'this->inverseOf (xuInteger(pos))'. See
discussion in the XuInteger class comment about boxed and unboxed
protocols

Overridden by: IntegerMapping

isComplete

Essential. Return true if each Position in the domain is mapped to every Position in the range.

Overridden by: CompositeMapping ConstantMapping Dsp EmptyMapping SimpleMapping

isIdentity

Essential. True if this is the identify mapping on the entire space.

Overridden by: CompositeMapping ConstantMapping Dsp CrossMapping GenericCrossDsp IdentityDsp IntegerMapping SequenceMapping EmptyMapping SimpleMapping

of: before

Transform a position. 'before' must be a Position of my domain space. Iff 'before' is in the domain region over which I am defined and it maps to a unique range Position then the result will be that Position. Otherwise BLAST. For example, if I map 1 to 4, 1 to 5, and 2 to 5 (and nothing else), then this method will yield 5 given 2, but BLAST given anything else. To find all the values 1 maps to, use the 'ofAll' operation on the singleton region whose member is 1.

Overridden by: CompositeMapping ConstantMapping Dsp GenericCrossDsp IdentityDsp IntegerMapping SequenceMapping EmptyMapping SimpleMapping

ofAll: before

Essential. Transform a region. The result region has exactly those positions which are the mappings of the positions in 'before'. This must be the case even if these positions cannot be enumerated. If the mapping for a given position is multiply defined, then (if that position is in 'before') all position it maps to must be in the result. Because of this property, the behavior of this method must be taken as really defining the nature of a particular mapping (with other method's behavior being defined in terms of this one), despite the fact that it would have been more natural to take Mapping::of(Position *) as the defining behavior.

Overridden by: CompositeMapping ConstantMapping Dsp CrossMapping GenericCrossDsp IdentityDsp IntegerMapping SequenceMapping EmptyMapping SimpleMapping

ofInt: pos

Unboxed version of 'this->of (xuInteger(pos))'. See discussion in the XuInteger class
comment about boxed and unboxed protocols

Overridden by: IntegerMapping

preCompose: dsp

There is no sensible explanation for what this message does on Mappings
which aren't Dsps. In the future, we will probably retire this message,
so don't use it.

Overridden by: CompositeMapping ConstantMapping Dsp EmptyMapping SimpleMapping

range

Essential. region in which inverse is valid. Same as the region that the domain region maps to. For you mathematicians, it is the image of the domain under the mapping.

Overridden by: CompositeMapping ConstantMapping Dsp EmptyMapping SimpleMapping

rangeSpace

The coordinate space of the range of the transformation

Overridden by: CompositeMapping ConstantMapping Dsp EmptyMapping SimpleMapping

restrict: region

Essential. Restrict the domain. The domain of the result will be the intersection of my domain and 'region'. Otherwise we are the same.

Overridden by: CompositeMapping ConstantMapping Dsp EmptyMapping SimpleMapping

restrictRange: region

Restrict the range. The range of the result will be the intersection of my range and 'region'. Otherwise we are the same.

Overridden by: CompositeMapping ConstantMapping Dsp EmptyMapping SimpleMapping

simpleMappings

return a set of simple mappings that would combine to this one

Overridden by: CompositeMapping ConstantMapping Dsp EmptyMapping SimpleMapping

simpleRegionMappings

return a set of mappings with simple regions as their domains that would combine
to this one.

Overridden by: CompositeMapping ConstantMapping Dsp EmptyMapping SimpleMapping

simplerMappings

Essential. Break this Mapping up into simpler Mappings which can be combined together to get this one.

transformedBy: dsp

Defined by the equivalence:
M->transformedBy(D)->of(R) isEqual (D->of(M->of(R)))
for all regions R in the domainSpace of M. Equivalent to Dsp::preCompose, except that it is between a Mapping and a Dsp.

Overridden by: CompositeMapping ConstantMapping Dsp EmptyMapping SimpleMapping

unrestricted

Essential. If this is a 'simpler' Mapping, and not isFull, then return a yet simpleMapping of some class from which you can get more information. Note that m->restrict (region)->unrestricted () is not necessarily the same as m, since information may be lost.


Index - All Packages - All Categories - All Classes