org.abora.white.spaces.basic
Class CoordinateSpace

java.lang.Object
  |
  +--org.abora.white.xpp.basic.Heaper
        |
        +--org.abora.white.spaces.basic.CoordinateSpace
Direct Known Subclasses:
BasicSpace, CrossSpace, FilterSpace, HeaperSpace, IntegerSpace, RealSpace, SequenceSpace

public abstract class CoordinateSpace
extends Heaper

A coordinate space represents (among other things) the domain space of a table. Corresponding to each coordinate space will be a set of objects of the following kinds:

Position -- The elements of the coordinate space.
Mapping -- (Add a description.)
OrderSpec -- The ways of specifying partial orders of this coordinate space's Positions.
XuRegion -- An XuRegion represents a set of Positions. The domain of a table is an XuRegion.

When defining a new coordinate space class, one generally defines new corresponing subclasses of each of the above classes. A kind of any of the above classes knows what coordinate space it is a part of (the "coordinateSpace()" message will yield an appropriate kind of CoordinateSpace). CoordinateSpace objects exist mostly just to represent this commonality. Coordinate spaces are disjoint--it is an error to use any of the generic protocol of any of the above classes if the objects in question are of two different coordinate spaces. For example, "dsp->of (pos)" is not an error iff "dsp->coordinateSpace()->isEqual (pos->coordinateSpace())".

Note that this class is not COPY or even PSEUDO_COPY. All of the instance variables for CoordinateSpace are basically cached quantities that require vary little actual state from the derived classes in order to be constructed. This realization allows a knot to be untangled when reading these objects from external storage.


Field Summary
protected  OrderSpec myAscending
           
protected  OrderSpec myDescending
           
protected  XnRegion myEmptyRegion
           
protected  XnRegion myFullRegion
           
protected  Dsp myIdentityDsp
           
 
Constructor Summary
protected CoordinateSpace()
           
protected CoordinateSpace(XnRegion emptyRegion, XnRegion fullRegion, Dsp identityDsp)
           
protected CoordinateSpace(XnRegion emptyRegion, XnRegion fullRegion, Dsp identityDsp, OrderSpec ascending)
           
protected CoordinateSpace(XnRegion emptyRegion, XnRegion fullRegion, Dsp identityDsp, OrderSpec ascending, OrderSpec descending)
           
 
Method Summary
 int actualHashForEqual()
          Defined by subclasses to produce the value returned by hashForEqual.
 OrderSpec ascending()
          Essential.
 Mapping completeMapping(XnRegion range)
          Essential.
 OrderSpec descending()
          The mirror image of the partial order returned by 'CoordinateSpace::ascending'.
 XnRegion emptyRegion()
          Essential.
 OrderSpec fetchAscending()
          The natural full-ordering of the coordinate space.
 OrderSpec fetchDescending()
          The mirror image of the partial order returned by 'CoordinateSpace::fetchAscending'.
 void finishCreate(XnRegion emptyRegion, XnRegion fullRegion, Dsp identityDsp, OrderSpec ascending, OrderSpec descending)
           
 XnRegion fullRegion()
          A full region in this coordinate space
 OrderSpec getAscending()
          Essential.
 OrderSpec getDescending()
          The mirror image of the partial order returned by 'CoordinateSpace::getAscending'.
 Dsp identityDsp()
          A Dsp which maps all positions in the coordinate space onto themselves
 Mapping identityMapping()
          Essential.
abstract  boolean isEqual(Heaper other)
          Return true if the two objects are equal.
 boolean verify(Heaper thing)
          tell whether this is a valid Position/XuRegion/Dsp/OrderSpec for this space
 
Methods inherited from class org.abora.white.xpp.basic.Heaper
destroy, destruct, equals, hashForEqual, printContentsOn, printOn, sendSelfTo, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

myEmptyRegion

protected XnRegion myEmptyRegion

myFullRegion

protected XnRegion myFullRegion

myIdentityDsp

protected Dsp myIdentityDsp

myAscending

protected OrderSpec myAscending

myDescending

protected OrderSpec myDescending
Constructor Detail

CoordinateSpace

protected CoordinateSpace(XnRegion emptyRegion,
                          XnRegion fullRegion,
                          Dsp identityDsp)

CoordinateSpace

protected CoordinateSpace(XnRegion emptyRegion,
                          XnRegion fullRegion,
                          Dsp identityDsp,
                          OrderSpec ascending)

CoordinateSpace

protected CoordinateSpace()

CoordinateSpace

protected CoordinateSpace(XnRegion emptyRegion,
                          XnRegion fullRegion,
                          Dsp identityDsp,
                          OrderSpec ascending,
                          OrderSpec descending)
Method Detail

actualHashForEqual

public int actualHashForEqual()
Description copied from class: Heaper
Defined by subclasses to produce the value returned by hashForEqual.

Overrides:
actualHashForEqual in class Heaper

ascending

public OrderSpec ascending()
Essential. The natural full-ordering of the coordinate space.


completeMapping

public Mapping completeMapping(XnRegion range)
Essential. A Mapping which maps each position in this space to every position in the range region. The region can be from any CoordinateSpace.


descending

public OrderSpec descending()
The mirror image of the partial order returned by 'CoordinateSpace::ascending'.


emptyRegion

public XnRegion emptyRegion()
Essential. An empty region in this coordinate space


fetchAscending

public OrderSpec fetchAscending()
The natural full-ordering of the coordinate space.


fetchDescending

public OrderSpec fetchDescending()
The mirror image of the partial order returned by 'CoordinateSpace::fetchAscending'.


fullRegion

public XnRegion fullRegion()
A full region in this coordinate space


getAscending

public OrderSpec getAscending()
Essential. The natural full-ordering of the coordinate space.


getDescending

public OrderSpec getDescending()
The mirror image of the partial order returned by 'CoordinateSpace::getAscending'.


identityDsp

public Dsp identityDsp()
A Dsp which maps all positions in the coordinate space onto themselves


identityMapping

public Mapping identityMapping()
Essential. A Mapping which maps all positions in the coordinate space onto themselves


isEqual

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

Specified by:
isEqual in class Heaper

verify

public boolean verify(Heaper thing)
tell whether this is a valid Position/XuRegion/Dsp/OrderSpec for this space


finishCreate

public void finishCreate(XnRegion emptyRegion,
                         XnRegion fullRegion,
                         Dsp identityDsp,
                         OrderSpec ascending,
                         OrderSpec descending)


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