org.abora.white.spaces.basic
Class Dsp

java.lang.Object
  |
  +--org.abora.white.xpp.basic.Heaper
        |
        +--org.abora.white.spaces.basic.Mapping
              |
              +--org.abora.white.spaces.basic.Dsp
Direct Known Subclasses:
CrossMapping, IdentityDsp, IntegerMapping, SequenceMapping

public abstract class Dsp
extends Mapping

A Dsp is a mapping from a coordinate space to itself that preserves simple regions. Every coordinate space must have an identity Dsp (which maps all positions of that space onto themselves). Dsps are necessarily invertable and composable. (Removed from CoordinateSpace because Dsps are still internal.: Dsp -- The transformations that can be applied to positions and regions of this cordinate space. A Dsp is necessarily invertible but generally not order-preserving. The composition of two Dsps is always a Dsp. If you can subtract two Dsps, the result will be another Dsp. The Dsp of a Position in this space is always another Position in this space. The Dsp of a simple region is always another simple region.) Considering a Mapping as a set of pairs, a Dsp is one for which each position appears exactly once in the first elements of the pairs, and exactly once in the second elements. Composition of Dsps isn''t necessarily commutative, though there are currently no counter-examples. Therefore we must be extra careful to avoid embodying commutativity assumptions in our code, as we currently have no way of finding such bugs.


Constructor Summary
protected Dsp()
           
protected Dsp(Rcvr rcvr)
           
 
Method Summary
 Mapping appliedAfter(Dsp dsp)
          For Dsp's, it is identical to compose.
abstract  Dsp compose(Dsp other)
          Return the composition of the two Dsps.
abstract  CoordinateSpace coordinateSpace()
          the coordinate space of the domain and range of the Dsp
 XnRegion domain()
          Must be valid everywhere in the domain for a Dsp.
 Mapping fetchCombine(Mapping mapping)
          if I know how to combine the two into a single mapping, then I do so
 Dsp fetchDsp()
          if this is a Dsp or a Dsp retricted to some domain, return the underlying Dsp.
abstract  Mapping inverse()
          Return the inverse of this transformation.
 Dsp inverseCompose(Dsp other)
          Return the composition of my inverse with the other.
 Position inverseOf(Position pos)
          Since Dsps always represent a unique mapping in either direction, the permission to BLAST in the Mapping constract no longer applies.
 XnRegion inverseOfAll(XnRegion reg)
          Inverse transform a region.
 boolean isComplete()
          Essential.
abstract  boolean isIdentity()
          Says whether this Dsp maps every Position onto itself
abstract  Dsp minus(Dsp other)
          Return the difference of the two Dsps.
 Position of(Position pos)
          Since Dsps always represent a unique mapping in either direction, the permission to BLAST in the Mapping constract no longer applies.
abstract  XnRegion ofAll(XnRegion reg)
          If 'reg' is a simple region, then the result must also be simple
 Mapping preCompose(Dsp dsp)
          a->compose(b) is the same as b->preCompose(a).
 XnRegion range()
          Essential.
 CoordinateSpace rangeSpace()
          Same as the domain space
 Mapping restrict(XnRegion region)
          Essential.
 Mapping restrictRange(XnRegion region)
          Restrict the range.
 ImmuSet simpleMappings()
          A Dsp is a simpleMapping already, so this just returns the singleton set containing me
 ImmuSet simpleRegionMappings()
          The domain of a Dsp is the simple region covering the whole coordinate space, so I just return a singleton set containing myself
 Mapping transformedBy(Dsp dsp)
          For Dsp's, it is identical to preCompose.
 
Methods inherited from class org.abora.white.spaces.basic.Mapping
actualHashForEqual, combine, domainSpace, info, inverseOfInt, make, make, make, ofInt, simplerMappings, unrestricted
 
Methods inherited from class org.abora.white.xpp.basic.Heaper
destroy, destruct, equals, hashForEqual, isEqual, printContentsOn, printOn, sendSelfTo, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Dsp

protected Dsp()

Dsp

protected Dsp(Rcvr rcvr)
Method Detail

appliedAfter

public Mapping appliedAfter(Dsp dsp)
For Dsp's, it is identical to compose.

Specified by:
appliedAfter in class Mapping

coordinateSpace

public abstract CoordinateSpace coordinateSpace()
the coordinate space of the domain and range of the Dsp

Specified by:
coordinateSpace in class Mapping

domain

public XnRegion domain()
Must be valid everywhere in the domain for a Dsp.

Specified by:
domain in class Mapping

fetchDsp

public Dsp fetchDsp()
Description copied from class: Mapping
if this is a Dsp or a Dsp retricted to some domain, return the underlying Dsp. Otherwise NULL.

Specified by:
fetchDsp in class Mapping

isComplete

public boolean isComplete()
Description copied from class: Mapping
Essential. Return true if each Position in the domain is mapped to every Position in the range.

Specified by:
isComplete in class Mapping

isIdentity

public abstract boolean isIdentity()
Says whether this Dsp maps every Position onto itself

Specified by:
isIdentity in class Mapping

preCompose

public Mapping preCompose(Dsp dsp)
a->compose(b) is the same as b->preCompose(a). Don't use it, use compose instead.

Specified by:
preCompose in class Mapping

range

public XnRegion range()
Description copied from class: Mapping
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.

Specified by:
range in class Mapping

rangeSpace

public CoordinateSpace rangeSpace()
Same as the domain space

Specified by:
rangeSpace in class Mapping

simpleMappings

public ImmuSet simpleMappings()
A Dsp is a simpleMapping already, so this just returns the singleton set containing me

Specified by:
simpleMappings in class Mapping

simpleRegionMappings

public ImmuSet simpleRegionMappings()
The domain of a Dsp is the simple region covering the whole coordinate space, so I just return a singleton set containing myself

Specified by:
simpleRegionMappings in class Mapping

transformedBy

public Mapping transformedBy(Dsp dsp)
For Dsp's, it is identical to preCompose.

Specified by:
transformedBy in class Mapping

compose

public abstract Dsp compose(Dsp other)
Return the composition of the two Dsps. Two Dsps of the same space are always composable. (a->compose(b) ->minus(b))->isEqual (a) (a->compose(b) ->of(pos))->isEqual (a->of (b->of (pos))


inverse

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

Specified by:
inverse in class Mapping

minus

public abstract Dsp minus(Dsp other)
Return the difference of the two Dsps. (a->compose(b) ->minus(b))->isEqual (a)


ofAll

public abstract XnRegion ofAll(XnRegion reg)
If 'reg' is a simple region, then the result must also be simple

Specified by:
ofAll in class Mapping

restrict

public Mapping restrict(XnRegion region)
Description copied from class: Mapping
Essential. Restrict the domain. The domain of the result will be the intersection of my domain and 'region'. Otherwise we are the same.

Specified by:
restrict in class Mapping

restrictRange

public Mapping restrictRange(XnRegion region)
Description copied from class: Mapping
Restrict the range. The range of the result will be the intersection of my range and 'region'. Otherwise we are the same.

Specified by:
restrictRange in class Mapping

fetchCombine

public Mapping fetchCombine(Mapping mapping)
Description copied from class: Mapping
if I know how to combine the two into a single mapping, then I do so

Specified by:
fetchCombine in class Mapping

inverseOf

public Position inverseOf(Position pos)
Since Dsps always represent a unique mapping in either direction, the permission to BLAST in the Mapping constract no longer applies. a->inverseOf(b) ->isEqual (a->inverse()->of(b))

Specified by:
inverseOf in class Mapping

inverseOfAll

public XnRegion inverseOfAll(XnRegion reg)
Inverse transform a region. A simple region must yield a simple region. a->inverseOfAll(b) ->isEqual (a->inverseAll()->of(b))

Specified by:
inverseOfAll in class Mapping

of

public Position of(Position pos)
Since Dsps always represent a unique mapping in either direction, the permission to BLAST in the Mapping constract no longer applies.

Specified by:
of in class Mapping

inverseCompose

public Dsp inverseCompose(Dsp other)
Return the composition of my inverse with the other. a->inverseCompose(b) ->isEqual (a->inverse()->compose(b))



Copyright © 2003 David G Jones. All Rights Reserved.
Original Udanax-Gold - Copyright © 1979-1999 Udanax.com. All rights reserved.