|
||||||||
| 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.XnRegion
|
+--org.abora.gold.filter.Filter
A position in a FilterSpace is a region in the baseSpace, and a filter is a set of regions
in the baseSpace. It is often more useful to think of a Filter as a Boolean function whose
input is a region in the baseSpace, and of unions, intersections, and complements of
filters as ORs, ANDs, and NOTs of functions. Not all possible such functions can be
represented as Filters, since there is an uncountable infinity of them for any non-finite
CoordinateSpace. There are representations for some basic filters, and any filters
resulting from a finite sequence of unions, intersections, and complements among them. The
basic filters are:
subsetFilter(cs,R) -- all subsets of R (i.e. all R1 such that R1->isSubsetOf(R))
supersetFilter(cs,R) -- all supersets of R (i.e. all R1 such that R->isSubsetOf(R1))
Mathematically, this is all that is necessary, since other useful filters like
intersection filters can be generated from these. (e.g. intersectionFilter(R) is
subsetFilter(R->complement())->complement()). However, there are several more pseudo
constructors provided as shortcuts, including intersectionFilters, closedFilters,
emptyFilters, and intersections and unions of sets of filters.
| Field Summary | |
protected FilterSpace |
myCS
|
| Fields inherited from class org.abora.gold.spaces.basic.XnRegion |
CantMixCoordSpacesSignal, EmptyRegionSignal |
| 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 | |
Filter(FilterSpace cs)
|
|
Filter(Rcvr receiver)
|
|
| Method Summary | |
int |
actualHashForEqual()
|
Stepper |
actualStepper(OrderSpec order)
Only called if I've already said I'm enumerable in the originally stated order. |
static Filter |
andFilter(CoordinateSpace cs,
ScruSet subs)
A filter that matches only regions that all of the filters in the set would have matched. |
static Filter |
andFilterPrivate(FilterSpace cs,
ImmuSet subs)
assumes that the interactions between elements have already been removed |
XnRegion |
asSimpleRegion()
Return a simple region containing all positions contained by myself. If I am simple, then the result must be me. |
XnRegion |
baseRegion()
Essential. |
static Filter |
closedFilter(CoordinateSpace cs)
An filter that does match any region. |
static ImmuSet |
combineIntersect(ImmuSet set,
Filter filter)
keep going around doing intersections until there are no more special intersects |
static ImmuSet |
combineIntersect(ImmuSet a,
ImmuSet b)
|
static ImmuSet |
combineUnion(ImmuSet set,
Filter filter)
keep going around doing unions until there are no more special unions |
static ImmuSet |
combineUnion(ImmuSet a,
ImmuSet b)
|
XnRegion |
complement()
Essential. |
XnRegion |
complexIntersect(XnRegion other)
|
XnRegion |
complexUnion(XnRegion other)
|
CoordinateSpace |
coordinateSpace()
Essential. |
IntegerVar |
count()
How many positions do I contain? If I am not 'isFinite', then this message will BLAST. |
ScruSet |
distinctions()
Break it up into a set of non-full distinctions. |
static ImmuSet |
distributeIntersect(CoordinateSpace cs,
ImmuSet set,
Filter filter)
distribute the intersection of a filter with the union of a set of filters |
static ImmuSet |
distributeIntersect(CoordinateSpace cs,
ImmuSet a,
ImmuSet b)
distribute the intersection of two unions of sets of filters |
static ImmuSet |
distributeUnion(CoordinateSpace cs,
ImmuSet set,
Filter filter)
distribute the union of a filter with the intersection of a set of filters |
static ImmuSet |
distributeUnion(CoordinateSpace cs,
ImmuSet anded,
ImmuSet ored)
distribute the union of an intersection and a union of sets of filters |
boolean |
doesPass(Joint joint)
Whether there might be anything in the tree beneath the Joint that would pass the filter. |
Pair |
fetchCanonicalIntersect(Filter other)
return NULL, or the pair of canonical filters (left == new1 | self, right == new2 | other) |
Pair |
fetchCanonicalUnion(Filter other)
return NULL, or the pair of canonical filters (left == new1 | self, right == new2 | other) |
XnRegion |
fetchIntersect(XnRegion other)
|
Pair |
fetchPairIntersect(Filter other)
return the pair of canonical filters (left == new1 | self, right == new2 | other) |
Pair |
fetchPairUnion(Filter other)
return the pair of canonical filters (left == new1 | self, right == new2 | other) |
XnRegion |
fetchSpecialIntersect(XnRegion other)
|
XnRegion |
fetchSpecialSubset(XnRegion other)
return self or other if one is clearly a subset of the other, else NULL |
XnRegion |
fetchSpecialUnion(XnRegion other)
|
XnRegion |
fetchUnion(XnRegion other)
|
FilterSpace |
filterSpace()
|
Pair |
getPairIntersect(Filter other)
return the pair of canonical filters (left == new1 | self, right == new2 | other) |
Pair |
getPairUnion(Filter other)
return the pair of canonical filters (left == new1 | self, right == new2 | other) |
boolean |
hasMember(Position pos)
Do I contain this position? More than anything else, the behavior of this message is the defining characteristic of an XuRegion. |
static void |
info()
{XnRegion CLIENT} baseRegion {Stepper CLIENT of: Filter} intersectedFilters {BooleanVar CLIENT} isAllFilter {BooleanVar CLIENT} isAnyFilter {BooleanVar CLIENT} match: region {XnRegion} {Stepper CLIENT of: Filter} unionedFilters |
XnRegion |
intersect(XnRegion other)
Essential. |
Stepper |
intersectedFilters()
Essential. |
static Filter |
intersectionFilter(CoordinateSpace cs,
XnRegion region)
A filter that matches any region that intersects the given region. |
boolean |
isAllFilter()
Essential. |
boolean |
isAnyFilter()
Essential. |
boolean |
isEmpty()
Every coordinate space has exactly one empty region. |
boolean |
isEnumerable(OrderSpec order)
See comment in XuRegion::stepper. a->stepper(os) won't BLAST iff a->isEnumerable(os) |
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. |
boolean |
isSwitchedBy(RegionDelta delta)
Whether the change causes a change in the state of the filter. |
boolean |
isSwitchedOffBy(RegionDelta delta)
Whether the change switches the state of the filter from on to off. |
boolean |
isSwitchedOnBy(RegionDelta delta)
Whether the change switches the state of the filter from off to on. |
boolean |
match(XnRegion region)
Whether a region is inside this filter. |
static Filter |
notSubsetFilter(CoordinateSpace cs,
XnRegion region)
A filter matching any regions that is not a subset of the given region. |
static Filter |
notSupersetFilter(CoordinateSpace cs,
XnRegion region)
A filter that matches any region that is not a superset of the given region. |
static Filter |
openFilter(CoordinateSpace cs)
A filter that matches any region. |
static Filter |
orFilter(CoordinateSpace cs,
ScruSet subs)
A filter that matches any region that any of the filters in the set would have matched. |
static Filter |
orFilterPrivate(FilterSpace cs,
ImmuSet subs)
assumes that the interactions between elements have already been removed |
Filter |
pass(Joint parent)
The simplest filter for looking at the tree beneath the node. The Joint keeps the intersection and union of all the nodes beneath it, so the result of this message can be used to prune a search. |
XnRegion |
relevantRegion()
The region which is relevant to this filter, i.e. |
void |
sendSelfTo(Xmtr xmtr)
do nothing |
Stepper |
simpleRegions(OrderSpec order)
Break myself up into a finite set of non-empty simple regions which, when unionWith'ed together will yield me. |
XnRegion |
simpleUnion(XnRegion other)
The result must contain all positions contained by either of the two original regions, and the result must be simple. |
static Filter |
subsetFilter(CoordinateSpace cs,
XnRegion region)
A filter that matches any region that is a subset of the given region. |
static Filter |
supersetFilter(CoordinateSpace cs,
XnRegion region)
A region that matches any region that is a superset of the given region. |
Stepper |
unionedFilters()
Essential. |
XnRegion |
unionWith(XnRegion other)
The result has as members exactly those positions which are members of either of the original two regions. |
| Methods inherited from class org.abora.gold.spaces.basic.XnRegion |
asArray, chooseMany, chooseMany, chooseOne, chooseOne, delta, disjointSimpleRegions, disjointSimpleRegions, dox, immuSet, intersects, isDistinction, isEnumerable, mapping, minus, simpleRegions, stepper, stepper, theOne, with, without |
| 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 FilterSpace myCS
| Constructor Detail |
public Filter(FilterSpace cs)
public Filter(Rcvr receiver)
| Method Detail |
public XnRegion complement()
XnRegion
complement in class XnRegionpublic XnRegion intersect(XnRegion other)
XnRegion
intersect in class XnRegionpublic XnRegion simpleUnion(XnRegion other)
XnRegion
simpleUnion in class XnRegionpublic XnRegion unionWith(XnRegion other)
XnRegion
unionWith in class XnRegionpublic int actualHashForEqual()
actualHashForEqual in class XnRegionpublic boolean hasMember(Position pos)
XnRegion
hasMember in class XnRegionpublic boolean isAllFilter()
public boolean isAnyFilter()
public boolean isEmpty()
XnRegion
isEmpty in class XnRegionpublic boolean isEnumerable(OrderSpec order)
XnRegion
isEnumerable in class XnRegionpublic boolean isEqual(Heaper other)
XnRegion
isEqual in class XnRegionpublic boolean isFinite()
XnRegion
isFinite in class XnRegionpublic boolean isFull()
XnRegion
isFull in class XnRegionpublic boolean isSimple()
XnRegion
isSimple in class XnRegionpublic boolean isSubsetOf(XnRegion other)
XnRegion
isSubsetOf in class XnRegionpublic IntegerVar count()
XnRegion
count in class XnRegionpublic Stepper intersectedFilters()
public Stepper unionedFilters()
public XnRegion asSimpleRegion()
XnRegion
asSimpleRegion in class XnRegionpublic XnRegion baseRegion()
public CoordinateSpace coordinateSpace()
XnRegion
coordinateSpace in class XnRegionpublic XnRegion relevantRegion()
public boolean doesPass(Joint joint)
public boolean isSwitchedBy(RegionDelta delta)
public boolean isSwitchedOffBy(RegionDelta delta)
public boolean isSwitchedOnBy(RegionDelta delta)
public boolean match(XnRegion region)
public Filter pass(Joint parent)
public ScruSet distinctions()
XnRegion
distinctions in class XnRegionpublic Stepper simpleRegions(OrderSpec order)
XnRegion
simpleRegions in class XnRegionpublic XnRegion complexIntersect(XnRegion other)
public XnRegion complexUnion(XnRegion other)
public Pair fetchCanonicalIntersect(Filter other)
public Pair fetchCanonicalUnion(Filter other)
public XnRegion fetchIntersect(XnRegion other)
public Pair fetchPairIntersect(Filter other)
public Pair fetchPairUnion(Filter other)
public XnRegion fetchSpecialIntersect(XnRegion other)
public XnRegion fetchSpecialSubset(XnRegion other)
public XnRegion fetchSpecialUnion(XnRegion other)
public XnRegion fetchUnion(XnRegion other)
public Pair getPairIntersect(Filter other)
public Pair getPairUnion(Filter other)
public Stepper actualStepper(OrderSpec order)
XnRegion
actualStepper in class XnRegionpublic FilterSpace filterSpace()
public void sendSelfTo(Xmtr xmtr)
Heaper
sendSelfTo in class Heaper
public static Filter andFilter(CoordinateSpace cs,
ScruSet subs)
public static Filter closedFilter(CoordinateSpace cs)
public static Filter intersectionFilter(CoordinateSpace cs,
XnRegion region)
public static Filter notSubsetFilter(CoordinateSpace cs,
XnRegion region)
public static Filter notSupersetFilter(CoordinateSpace cs,
XnRegion region)
public static Filter openFilter(CoordinateSpace cs)
public static Filter orFilter(CoordinateSpace cs,
ScruSet subs)
public static Filter subsetFilter(CoordinateSpace cs,
XnRegion region)
public static Filter supersetFilter(CoordinateSpace cs,
XnRegion region)
public static Filter andFilterPrivate(FilterSpace cs,
ImmuSet subs)
public static ImmuSet combineIntersect(ImmuSet set,
Filter filter)
public static ImmuSet combineIntersect(ImmuSet a,
ImmuSet b)
public static ImmuSet combineUnion(ImmuSet set,
Filter filter)
public static ImmuSet combineUnion(ImmuSet a,
ImmuSet b)
public static ImmuSet distributeIntersect(CoordinateSpace cs,
ImmuSet set,
Filter filter)
public static ImmuSet distributeIntersect(CoordinateSpace cs,
ImmuSet a,
ImmuSet b)
public static ImmuSet distributeUnion(CoordinateSpace cs,
ImmuSet set,
Filter filter)
public static ImmuSet distributeUnion(CoordinateSpace cs,
ImmuSet anded,
ImmuSet ored)
public static Filter orFilterPrivate(FilterSpace cs,
ImmuSet subs)
public static void info()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||