|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--org.abora.white.xpp.basic.Heaper
|
+--org.abora.white.spaces.basic.XnRegion
|
+--org.abora.white.spaces.cross.CrossRegion
|
+--org.abora.white.spaces.cross.GenericCrossRegion
Represents a region as a two-dimensional array of crosses of subregions. Was NOT.A.TYPE but that obstructed compilation. I think this might work better if the array is lexically sorted, but I am not sure there is any meaningful way to do so. Thus there is no sorting assumed in the algorithms, although the protocol may occasionally suggest that there might be. Eventually this implementation may save space by using NULL to represent repetitions of a sub region such that fetchBoxProjection (box, dim) == NULL only if box > 0 && boxProjection (box, dim)->isEqual (boxProjection (box - 1, dim)) && (dim == 0 || fetchBoxProjection (box, dim - 1) == NULL)
| Field Summary | |
protected int |
myCount
|
protected PtrArray |
myRegions
|
protected CrossSpace |
mySpace
|
| Constructor Summary | |
GenericCrossRegion(CrossSpace space,
int count,
PtrArray regions)
|
|
GenericCrossRegion(Rcvr receiver)
|
|
| Method Summary | |
int |
actualHashForEqual()
To avoid overly burdensome canonicalization rules, my hash is calculated from the hash of my projections |
Stepper |
actualStepper(OrderSpec order)
Only called if I've already said I'm enumerable in the originally stated order. |
XnRegion |
asSimpleRegion()
Return a simple region containing all positions contained by myself. |
int |
boxCount()
|
Stepper |
boxes()
Essential. |
XnRegion |
boxProjection(int box,
int dimension)
A region is at a given 2D place in the array |
BoxProjectionStepper |
boxProjectionStepper()
A stepper over all projections of all boxes in the region |
BoxStepper |
boxStepper()
A stepper over all boxes |
XnRegion |
complement()
Essential. |
CoordinateSpace |
coordinateSpace()
Essential. |
IntegerValue |
count()
How many positions do I contain? If I am not 'isFinite', then this message will BLAST. |
CrossSpace |
crossSpace()
|
ScruSet |
distinctions()
Break it up into a set of non-full distinctions. |
static CrossRegion |
empty(GenericCrossSpace space)
|
static CrossRegion |
full(GenericCrossSpace space,
PtrArray subSpaces)
Only used during construction; must pass the array in explicitly since the space isnt initialized yet |
boolean |
hasBoxProjection(XnRegion other,
int box,
int dimension)
Whether a region is at a given 2D place in the array. |
boolean |
hasMember(Position position)
Do I contain this position? More than anything else, the behavior of this message is the defining characteristic of an XuRegion. |
XnRegion |
intersect(XnRegion region)
Essential. |
boolean |
intersects(XnRegion other)
Essential. |
boolean |
isBox()
Whether this Region is a box, i.e. |
boolean |
isDistinction()
Am I a distinction. |
boolean |
isEmpty()
Every coordinate space has exactly one empty region. |
boolean |
isEnumerable(OrderSpec order)
See comment in XuRegion::stepper. |
boolean |
isEqual(Heaper other)
Two regions are equal iff they contain exactly the same set of positions |
boolean |
isFinite()
Essential. |
boolean |
isFull()
true if this is the largest possible region in this space -- the region that contains all positions in the space. |
boolean |
isSimple()
Am I a simple region. |
boolean |
isSubsetOf(XnRegion other)
I'm a subset of other if I don't have any positions that he doesn't. |
static CrossRegion |
make(CrossSpace space,
int count,
PtrArray regions)
|
void |
printOn(java.io.PrintWriter oo)
This should rarely be overridden. |
XnRegion |
projection(int index)
The answer is the projection of this region into the specified dimension of the cross space |
PtrArray |
projections()
Essential. |
PtrArray |
secretRegions()
The array holding the regions. |
void |
sendSelfTo(Xmtr xmtr)
|
Stepper |
simpleRegions(OrderSpec order)
Break myself up into a finite set of non-empty simple regions which, when unionWith'ed together will yield me. |
Position |
theOne()
Iff I contain exactly one position, return it. |
XnRegion |
unionWith(XnRegion region)
The result has as members exactly those positions which are members of either of the original two regions. |
| Methods inherited from class org.abora.white.spaces.cross.CrossRegion |
info, simpleUnion |
| Methods inherited from class org.abora.white.spaces.basic.XnRegion |
chooseMany, chooseMany, chooseOne, chooseOne, delta, disjointSimpleRegions, disjointSimpleRegions, immuSet, isEnumerable, minus, simpleRegions, stepper, stepper, with, without |
| Methods inherited from class org.abora.white.xpp.basic.Heaper |
destroy, destruct, equals, hashForEqual, printContentsOn, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected CrossSpace mySpace
protected int myCount
protected PtrArray myRegions
| Constructor Detail |
public GenericCrossRegion(CrossSpace space,
int count,
PtrArray regions)
public GenericCrossRegion(Rcvr receiver)
| Method Detail |
public CoordinateSpace coordinateSpace()
XnRegion
coordinateSpace in class CrossRegionpublic IntegerValue count()
XnRegion
count in class CrossRegionpublic XnRegion projection(int index)
CrossRegion
projection in class CrossRegionpublic PtrArray projections()
CrossRegion
projections in class CrossRegionpublic Position theOne()
XnRegion
theOne in class XnRegionpublic CrossSpace crossSpace()
public int boxCount()
public XnRegion boxProjection(int box,
int dimension)
public BoxProjectionStepper boxProjectionStepper()
public BoxStepper boxStepper()
public boolean hasBoxProjection(XnRegion other,
int box,
int dimension)
public PtrArray secretRegions()
public int actualHashForEqual()
CrossRegion
actualHashForEqual in class CrossRegionpublic boolean hasMember(Position position)
XnRegion
hasMember in class CrossRegionpublic boolean intersects(XnRegion other)
XnRegion
intersects in class XnRegionpublic boolean isDistinction()
XnRegion
isDistinction in class XnRegionpublic boolean isEmpty()
XnRegion
isEmpty in class CrossRegionpublic boolean isEnumerable(OrderSpec order)
XnRegion
isEnumerable in class CrossRegionpublic boolean isEqual(Heaper other)
XnRegion
isEqual in class CrossRegionpublic boolean isFinite()
XnRegion
isFinite in class CrossRegionpublic boolean isFull()
XnRegion
isFull in class XnRegionpublic boolean isSimple()
XnRegion
isSimple in class CrossRegionpublic boolean isSubsetOf(XnRegion other)
XnRegion
isSubsetOf in class XnRegionpublic XnRegion asSimpleRegion()
XnRegion
asSimpleRegion in class CrossRegionpublic XnRegion complement()
XnRegion
complement in class CrossRegionpublic XnRegion intersect(XnRegion region)
XnRegion
intersect in class CrossRegionpublic XnRegion unionWith(XnRegion region)
XnRegion
unionWith in class CrossRegionpublic void printOn(java.io.PrintWriter oo)
Heaper
printOn in class Heaperpublic Stepper boxes()
CrossRegion
boxes in class CrossRegionpublic ScruSet distinctions()
XnRegion
distinctions in class CrossRegionpublic boolean isBox()
CrossRegion
isBox in class CrossRegionpublic Stepper simpleRegions(OrderSpec order)
XnRegion
simpleRegions in class CrossRegionpublic Stepper actualStepper(OrderSpec order)
XnRegion
actualStepper in class CrossRegionpublic void sendSelfTo(Xmtr xmtr)
sendSelfTo in class Heaperpublic static CrossRegion empty(GenericCrossSpace space)
public static CrossRegion full(GenericCrossSpace space,
PtrArray subSpaces)
public static CrossRegion make(CrossSpace space,
int count,
PtrArray regions)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||