org.abora.white.tumbler
Class SequenceMapping

java.lang.Object
  |
  +--org.abora.white.xpp.basic.Heaper
        |
        +--org.abora.white.spaces.basic.Mapping
              |
              +--org.abora.white.spaces.basic.Dsp
                    |
                    +--org.abora.white.tumbler.SequenceMapping

public class SequenceMapping
extends Dsp

Transforms a Sequence by shifting some amount, and then adding another Sequence to it.


Field Summary
protected  IntegerValue myShift
           
protected  Sequence myTranslation
           
 
Constructor Summary
SequenceMapping(IntegerValue shift, Sequence translation)
           
SequenceMapping(Rcvr receiver)
           
 
Method Summary
 Dsp compose(Dsp dsp)
          Return the composition of the two Dsps.
 CoordinateSpace coordinateSpace()
          the coordinate space of the domain and range of the Dsp
 Mapping inverse()
          Return the inverse of this transformation.
 Dsp inverseCompose(Dsp dsp)
          Return the composition of my inverse with the other.
 Position inverseOf(Position position)
          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 isEqual(Heaper other)
          Return true if the two objects are equal.
 boolean isIdentity()
          Says whether this Dsp maps every Position onto itself
static SequenceMapping make(IntegerValue shift, Sequence translation)
           
 Dsp minus(Dsp dsp)
          Return the difference of the two Dsps.
 Position of(Position position)
          Since Dsps always represent a unique mapping in either direction, the permission to BLAST in the Mapping constract no longer applies.
 XnRegion ofAll(XnRegion reg)
          If 'reg' is a simple region, then the result must also be simple
 void sendSelfTo(Xmtr xmtr)
           
 IntegerValue shift()
          The amount by which it shifts a sequence
 Sequence translation()
          What it adds to a sequence after shifting it
 
Methods inherited from class org.abora.white.spaces.basic.Dsp
appliedAfter, domain, fetchCombine, fetchDsp, isComplete, preCompose, range, rangeSpace, restrict, restrictRange, simpleMappings, simpleRegionMappings, transformedBy
 
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, printContentsOn, printOn, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

myShift

protected IntegerValue myShift

myTranslation

protected Sequence myTranslation
Constructor Detail

SequenceMapping

public SequenceMapping(IntegerValue shift,
                       Sequence translation)

SequenceMapping

public SequenceMapping(Rcvr receiver)
Method Detail

coordinateSpace

public CoordinateSpace coordinateSpace()
Description copied from class: Dsp
the coordinate space of the domain and range of the Dsp

Specified by:
coordinateSpace in class Dsp

isIdentity

public boolean isIdentity()
Description copied from class: Dsp
Says whether this Dsp maps every Position onto itself

Specified by:
isIdentity in class Dsp

shift

public IntegerValue shift()
The amount by which it shifts a sequence


translation

public Sequence translation()
What it adds to a sequence after shifting it


inverseOf

public Position inverseOf(Position position)
Description copied from class: Dsp
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))

Overrides:
inverseOf in class Dsp

inverseOfAll

public XnRegion inverseOfAll(XnRegion reg)
Description copied from class: Dsp
Inverse transform a region. A simple region must yield a simple region. a->inverseOfAll(b) ->isEqual (a->inverseAll()->of(b))

Overrides:
inverseOfAll in class Dsp

of

public Position of(Position position)
Description copied from class: Dsp
Since Dsps always represent a unique mapping in either direction, the permission to BLAST in the Mapping constract no longer applies.

Overrides:
of in class Dsp

ofAll

public XnRegion ofAll(XnRegion reg)
Description copied from class: Dsp
If 'reg' is a simple region, then the result must also be simple

Specified by:
ofAll in class Dsp

compose

public Dsp compose(Dsp dsp)
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))

Specified by:
compose in class Dsp

inverse

public Mapping inverse()
Description copied from class: Dsp
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 Dsp

inverseCompose

public Dsp inverseCompose(Dsp dsp)
Description copied from class: Dsp
Return the composition of my inverse with the other. a->inverseCompose(b) ->isEqual (a->inverse()->compose(b))

Overrides:
inverseCompose in class Dsp

minus

public Dsp minus(Dsp dsp)
Description copied from class: Dsp
Return the difference of the two Dsps. (a->compose(b) ->minus(b))->isEqual (a)

Specified by:
minus in class Dsp

sendSelfTo

public void sendSelfTo(Xmtr xmtr)
Overrides:
sendSelfTo in class Heaper

make

public static SequenceMapping make(IntegerValue shift,
                                   Sequence translation)

isEqual

public boolean isEqual(Heaper other)
Description copied from class: Heaper
Return true if the two objects are equal.

Specified by:
isEqual in class Heaper


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