|
||||||||
| 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.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
|
| Constructor Summary | |
Filter(FilterSpace cs)
|
|
Filter(Rcvr receiver)
|
|
| Method Summary | |
int |
actualHashForEqual()
Defined by subclasses to produce the value returned by hashForEqual. |
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. |
abstract 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)
|
abstract XnRegion |
complement()
Essential. |
XnRegion |
complexIntersect(XnRegion other)
|
XnRegion |
complexUnion(XnRegion other)
|
CoordinateSpace |
coordinateSpace()
Essential. |
IntegerValue |
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)
|
abstract 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. |
abstract Stepper |
intersectedFilters()
Essential. |
static Filter |
intersectionFilter(CoordinateSpace cs,
XnRegion region)
A filter that matches any region that intersects the given region. |
abstract boolean |
isAllFilter()
Essential. |
abstract boolean |
isAnyFilter()
Essential. |
abstract boolean |
isEmpty()
Every coordinate space has exactly one empty region. |
boolean |
isEnumerable(OrderSpec order)
See comment in XuRegion::stepper. |
abstract boolean |
isEqual(Heaper other)
Two regions are equal iff they contain exactly the same set of positions |
boolean |
isFinite()
Essential. |
abstract 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. |
abstract 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 |
abstract Filter |
pass(Joint parent)
The simplest filter for looking at the tree beneath the node. |
abstract XnRegion |
relevantRegion()
The region which is relevant to this filter, i.e. |
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. |
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. |
abstract 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.white.spaces.basic.XnRegion |
chooseMany, chooseMany, chooseOne, chooseOne, delta, disjointSimpleRegions, disjointSimpleRegions, immuSet, intersects, isDistinction, isEnumerable, minus, simpleRegions, stepper, stepper, theOne, with, without |
| Methods inherited from class org.abora.white.xpp.basic.Heaper |
destroy, destruct, equals, hashForEqual, printContentsOn, printOn, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected FilterSpace myCS
| Constructor Detail |
public Filter(FilterSpace cs)
public Filter(Rcvr receiver)
| Method Detail |
public abstract XnRegion complement()
XnRegion
complement in class XnRegionpublic XnRegion intersect(XnRegion other)
XnRegion
intersect in class XnRegionpublic XnRegion simpleUnion(XnRegion other)
XnRegiona->simpleUnion(b) satisfies the same specification
as (a->unionWith(b))->asSimpleRegion(). However, the two results do
not have to be the same region.
simpleUnion in class XnRegionpublic XnRegion unionWith(XnRegion other)
XnRegion
unionWith in class XnRegionpublic int actualHashForEqual()
Heaper
actualHashForEqual in class XnRegionpublic boolean hasMember(Position pos)
XnRegion
hasMember in class XnRegionpublic abstract boolean isAllFilter()
public abstract boolean isAnyFilter()
public abstract boolean isEmpty()
XnRegion
isEmpty in class XnRegionpublic boolean isEnumerable(OrderSpec order)
XnRegion
isEnumerable in class XnRegionpublic abstract boolean isEqual(Heaper other)
XnRegion
isEqual in class XnRegionpublic boolean isFinite()
XnRegion
isFinite in class XnRegionpublic abstract boolean isFull()
XnRegion
isFull in class XnRegionpublic boolean isSimple()
XnRegion
isSimple in class XnRegionpublic boolean isSubsetOf(XnRegion other)
XnRegion
isSubsetOf in class XnRegionpublic IntegerValue count()
XnRegion
count in class XnRegionpublic abstract Stepper intersectedFilters()
public abstract Stepper unionedFilters()
public XnRegion asSimpleRegion()
XnRegion
asSimpleRegion in class XnRegionpublic abstract XnRegion baseRegion()
public CoordinateSpace coordinateSpace()
XnRegion
coordinateSpace in class XnRegionpublic abstract XnRegion relevantRegion()
public boolean doesPass(Joint joint)
public boolean isSwitchedBy(RegionDelta delta)
public boolean isSwitchedOffBy(RegionDelta delta)
public boolean isSwitchedOnBy(RegionDelta delta)
public abstract boolean match(XnRegion region)
public abstract 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 abstract 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)
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 | |||||||