org.abora.gold.spaces.basic
Class Dsp

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
Direct Known Subclasses:
CrossMapping, IdentityDsp, IntegerMapping, SequenceMapping

public 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.


Field Summary
 
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
Dsp()
           
 
Method Summary
 Mapping appliedAfter(Dsp dsp)
          For Dsp's, it is identical to compose.
 Dsp compose(Dsp other)
          Return the composition of the two Dsps.
 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.
 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.
 boolean isComplete()
          Essential.
 boolean isIdentity()
          Says whether this Dsp maps every Position onto itself
 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
 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.gold.spaces.basic.Mapping
actualHashForEqual, combine, domainSpace, export, info, inverseOfInt, make, make, make, make, make, ofInt, simplerMappings, unrestricted
 
Methods inherited from class org.abora.gold.xpp.basic.Heaper
abstractDeclarationFor, abstractTypeFor, addMethodAttributeToInOf, addPackage, addPackageCategory, allClientProtocolOn, argumentTypesFor, arrow, blast, blast, BLAST, cachePromiseNameTable, cachePromiseNameTableIn, canYouBecome, cast, cleanPromiseClasses, cleanupGarbage, clientClassesDo, clientFunctionsOn, clientMethodsOn, clientProtocol, clientProtocolDo, clientProtocolOn, clientProtocolOn, collectibleClasses, compare, compileClientSubclasses, compileConstantPromiseMethods, compileCreateFromRcvr, compileEQ, compileGeneratedClassMethod, compileGeneratedMethod, compileHook, compilePromise, compilePromiseDefaultMethods, compilePromiseFluidDeclarations, compilePromiseHandlers, compilePromiseMethods, compileRequestCreateMsgInArguments, compileRequestEvaluateMsgInReturningArguments, compileRPCSpecialistEvaluateMsgForReturningArguments, compileSendSelfTo, compileSendSelfToSendHook, compileStubbleMethods, compileSubclassStubbleMethods, computeMangle, computePreorder, constantTypeValue, convert, convertCopyDeclarations, convertDeferredDeclarations, convertProxyDeclarations, convertSubclassCopyDeclarations, convertSubclassDeferredDeclarations, convertSubclassProxyDeclarations, copyReferencesToType, create, create, create, create, create, create, create, create, create, create, createRequestClassArguments, definesProxyMethods, delete, deref, destroy, destruct, destructor, enum, enumFlags, equals, exportName, fetchAttribute, fetchPackage, fetchSuperCategory, fileOutClientProtocol, findCategory, findSenderAndReceiverMethods, findTailInto, flushPromiseNameTable, foo, freezeClientClasses, freezeClientProtocol, freezeStProtocol, frozenClasses, garbageCollect, garbageCollectFrom, gcOpportunity, gcOpportunity, generatedCategory, generatePromiseNames, getCategory, getOrMakePackage, getSuperCategory, handlerSignaturesFrom, hash, hashForEqual, hasProxyMethods, info_clientClasses, info_clientSideClasses, info_promiseClasses, info_stProtocol, inGC, initializedClasses, initializingClasses, initPackages, initStringHashSBoxes, inspectPieces, instanceSize, IntegerVar, isByProxy, isConstructed, isDestructed, isEqual, isEqualOrSubclassOf, isGenerated, isIntType, isKindOf, isRawType, isUnlocked, linkTimeNonInherited, make, makeClassTable, makeFillTable, makeRequestTable, mangle, markChildren, markCount, markInstances, mayBecome, mayBecomeAnySubclassOf, new1, newX, nonCopyVariables, notWorking, pack, packageClasses, packagingCategory, parseExportName, passe, pointerToStaticMember, pointerToStaticMember, pointerToVirtualMember, preorderMax, preorderNumber, printOn, PROBLEM, problems, promiseClass, promiseDefaultValue, promiseName, promiseNameTable, promiseToAbstract, registerPackageCategory, removeGeneratedCode, removeStubbleMethods, removeSubclassGeneratedCode, removeSubclassStubbleMethods, requestProcedure, requestProceduresFrom, returnTypeFor, rootName, scheduleTermination, sendProxyTo, sendSelfTo, serverNameFor, setGC, signal, signals, smalltalkSelector, stClientProtocol, stubbleSelectorTokenReturnsArguments, subclassNonCopyVariables, takeOop, togglePromiseName, togglePromiseOfParse, unimplemented, unmangle, verifyFreeze, wipeStubble
 
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
 

Constructor Detail

Dsp

public Dsp()
Method Detail

appliedAfter

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

Overrides:
appliedAfter in class Mapping

coordinateSpace

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

Overrides:
coordinateSpace in class Mapping

domain

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

Overrides:
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.

Overrides:
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.

Overrides:
isComplete in class Mapping

isIdentity

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

Overrides:
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.

Overrides:
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.

Overrides:
range in class Mapping

rangeSpace

public CoordinateSpace rangeSpace()
Same as the domain space

Overrides:
rangeSpace in class Mapping

simpleMappings

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

Overrides:
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

Overrides:
simpleRegionMappings in class Mapping

transformedBy

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

Overrides:
transformedBy in class Mapping

compose

public 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 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.

Overrides:
inverse in class Mapping

minus

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


ofAll

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

Overrides:
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.

Overrides:
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.

Overrides:
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

Overrides:
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))

Overrides:
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))

Overrides:
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.

Overrides:
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))



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