|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--org.abora.gold.java.AboraHeaper
|
+--org.abora.gold.xpp.basic.Heaper
|
+--org.abora.gold.spaces.basic.Mapping
|
+--org.abora.gold.spaces.basic.Dsp
|
+--org.abora.gold.spaces.integers.IntegerMapping
Transforms integers by adding a (possibly negative) offset. In addition to the Dsp
protocol, an IntegerDsp will respond to "translation" with the offset that it is adding.
Old documentation indicated a possibility of a future upgrade of IntegerDsp which would
also optionally reflect (or negate) its input in addition to offsetting. This would
however be a non-upwards compatable change in that current clients already assume that the
answer to "translation" fully describes the IntegerDsp. If such a possibility is
introduced, it should be as a super-type of IntegerDsp, since it would have a weaker
contract. Then compatability problems can be caught by the type checker.
| Field Summary | |
protected IntegerVar |
myTranslation
|
protected static IntegerMapping |
TheIdentityIntegerMapping
|
| Fields inherited from class org.abora.gold.xpp.basic.Heaper |
AllBlasts, BecomeMap, GarbageCount, InGC, InitializedClasses, InitializingClasses, LastMemory, NextClientRequestNumber, NotOneElementSignal, PackageTable, PromiseNameTable, StringHashSBoxes |
| Fields inherited from class org.abora.gold.java.AboraHeaper |
ActiveClubs, CurrentAuthor, CurrentBertCanopyCache, CurrentBertCrum, CurrentChunk, CurrentGrandMap, CurrentKeyMaster, CurrentPacker, CurrentSensorCanopyCache, CurrentServer, CurrentSession, CurrentSessions, CurrentTrace, InitialEditClub, InitialOwner, InitialReadClub, InitialSponsor, InsideTransactionFlag |
| Constructor Summary | |
IntegerMapping(IntegerVar translation)
Initialize instance variables |
|
| Method Summary | |
int |
actualHashForEqual()
|
Dsp |
compose(Dsp other)
Return the composition of the two Dsps. |
CoordinateSpace |
coordinateSpace()
the coordinate space of the domain and range of the Dsp |
static Dsp |
identity()
|
static void |
info()
{IntegerVar CLIENT} translation |
static void |
initTimeNonInherited()
|
Mapping |
inverse()
Return the inverse of this transformation. |
Dsp |
inverseCompose(Dsp other)
Return the composition of my inverse with the other. a->inverseCompose(b) ->isEqual (a->inverse()->compose(b)) |
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)) |
XnRegion |
inverseOfAll(XnRegion reg)
Inverse transform a region. |
IntegerVar |
inverseOfInt(IntegerVar pos)
Unboxed version of 'this->inverseOf (xuInteger(pos))'. |
boolean |
isEqual(Heaper other)
Should have same offset and reversal |
boolean |
isIdentity()
Says whether this Dsp maps every Position onto itself |
static void |
linkTimeNonInherited()
|
static Heaper |
make()
|
static Heaper |
make(IntegerVar translate)
|
static Heaper |
make(Rcvr rcvr)
|
Dsp |
minus(Dsp other)
Return the difference of the two Dsps. (a->compose(b) ->minus(b))->isEqual (a) |
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. |
XnRegion |
ofAll(XnRegion reg)
If 'reg' is a simple region, then the result must also be simple |
IntegerVar |
ofInt(IntegerVar pos)
Unboxed version of 'this->of (xuInteger(pos))'. |
void |
printOn(java.io.PrintWriter aStream)
|
void |
sendIntegerMapping(Xmtr xmtr)
|
void |
sendSelfTo(Xmtr xmtr)
do nothing |
IntegerVar |
translation()
The offset which I add to a position. If my translation is 7, then this->of(4) is 11. |
| Methods inherited from class org.abora.gold.spaces.basic.Dsp |
appliedAfter, domain, fetchCombine, fetchDsp, isComplete, preCompose, range, rangeSpace, restrict, restrictRange, simpleMappings, simpleRegionMappings, transformedBy |
| Methods inherited from class org.abora.gold.spaces.basic.Mapping |
combine, domainSpace, export, make, make, make, make, make, simplerMappings, unrestricted |
| Methods inherited from class org.abora.gold.java.AboraHeaper |
asOop, basicInspect, displayString, error, hack, halt, inspect, knownBug, mightNotImplement, REQUIRES, shouldImplement, shouldNotImplement, stubbleForSubclassResponsibility, thingToDo, willNotImplement |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected IntegerVar myTranslation
protected static IntegerMapping TheIdentityIntegerMapping
| Constructor Detail |
public IntegerMapping(IntegerVar translation)
| Method Detail |
public void printOn(java.io.PrintWriter aStream)
printOn in class Heaperpublic Position inverseOf(Position pos)
Dsp
inverseOf in class Dsppublic XnRegion inverseOfAll(XnRegion reg)
Dsp
inverseOfAll in class Dsppublic IntegerVar inverseOfInt(IntegerVar pos)
Mapping
inverseOfInt in class Mappingpublic Position of(Position pos)
Dsp
of in class Dsppublic XnRegion ofAll(XnRegion reg)
Dsp
ofAll in class Dsppublic IntegerVar ofInt(IntegerVar pos)
Mapping
ofInt in class Mappingpublic CoordinateSpace coordinateSpace()
Dsp
coordinateSpace in class Dsppublic boolean isIdentity()
Dsp
isIdentity in class Dsppublic IntegerVar translation()
public int actualHashForEqual()
actualHashForEqual in class Mappingpublic boolean isEqual(Heaper other)
isEqual in class Heaperpublic Dsp compose(Dsp other)
Dsp
compose in class Dsppublic Mapping inverse()
Dsp
inverse in class Dsppublic Dsp inverseCompose(Dsp other)
Dsp
inverseCompose in class Dsppublic Dsp minus(Dsp other)
Dsp
minus in class Dsppublic void sendIntegerMapping(Xmtr xmtr)
public void sendSelfTo(Xmtr xmtr)
Heaper
sendSelfTo in class Heaperpublic static void initTimeNonInherited()
public static void linkTimeNonInherited()
public static Heaper make()
public static Heaper make(Rcvr rcvr)
public static Heaper make(IntegerVar translate)
public static Dsp identity()
public static void info()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||