Index - All Packages - All Categories - All Classes
Class CanopyCrum
CanopyCrums form binary trees that acrete in a balanced fashion. No rebalancing ever happens. Things are simply added to the tree up to the point thta the tree is balanced, then the height of the tree gets extended at the root.
Essentially, when the join of two trees is asked for, if the two trees aren't already parts of a larger tree, the algorithm attempts to find a place in one tree into which the other tree could completely fit without violating the depth constraint on the tree. It then returns the nearest root that contains both trees. If it can't put one tree into the other, then it makes a new node that joins the two trees (probably with room to add other stuff deeper down).
myRefCount is only the count of Loafs or HCrums that point at the CanopyCrum. It doesn't include other CanopyCrums.
12/2/92 Ravi
PropJoints have been suspended, and their function has been replaced by flag words in the CanopyCrum. Any interesting Club or endorsement gets a bit, and there is a bit for "any other Club" and "any other endorsement". Any criteria not given a bit of their own require an exhaustive search. These flags are widded by ORing up the canopy. When we start using more sophisticated hashing strategies, we will probably need to reanimate PropJoints.
Package: Udanax-Gold
All Superclasses: Object Heaper Abraham
Immediate Subclasses: BertCrum SensorCrum
Protocols: Object
Categories: Xanadu-Be-Canopy
Class MethodsendorsementFlagLimit
Max number of special endorsement flags
endorsementsFlags: endorsements
Flag bits corresponding to endorsements
firstEndorsementsFlag
Rightmost flag for interesting endorsements
initTimeNonInherited
Overrides: Abraham class
linkTimeNonInherited
Overrides: Abraham class
otherClubsFlag
The flag for any other Clubs
otherEndorsementsFlag
Flag for all uninteresting endorsements
permissionsFlags: permissions
Flag bits corresponding to permissions
publicClubFlag
The flag for the Universal Public Club
useEndorsementFlags: endorsements
Use a special flag to look for any of the these endorsements
Instance MethodsaddPointer: ignored
Keep a refcount of diskful pointers to myself for disk space management. (Maybe backpointers later.)
another
Return another instance of the same
class for testing purposes.
Overridden by: BertCrum SensorCrum
canopyCache
Overridden by: BertCrum SensorCrum
changeCanopy
Figure out new props, etc. Return true if any changes may require further propagation
changeCanopy: change
Figure out new height, props, etc. Return true if any changes may require further propagation
Overridden by: SensorCrum
changeHeight
Figure out new height. Return true if changes may require further propagation
childArray
children
computeJoin: otherBCrum
Find a canopyCrum that is an anscestor to
both the receiver and otherBCrum. otherBCrum
is added to the canopy in a pseudo-balanced fashion.
This demonstrates the beauty and power of caching
in object-oriented systems.
contentsHash
This is only used by the TestPacker, so it includes all persistent state whether or not
it is semantically interesting--myRefCount is not semantically interesting.
Overrides: Abraham
create: flags
Make a canopyCrum for a root: it has no children.
Overrides: Abraham
Overridden by: SensorCrum
create: flags with: first with: second
prop must be empty
createRcvr: receiver
Overrides: Abraham
Overridden by: BertCrum SensorCrum
dismantle
Overrides: Abraham
displayString
Overrides: Object
Overridden by: SensorCrum
expand
split into two if possible, return the two leaves
fetchChild1
fetchChild2
fetchParent
flags
fullChange
Overridden by: BertCrum SensorCrum
heightDiff
includeCanopy: otherCanopy
Install otherCanopy at or below the receiver. If the otherCanopy fits in a lower branch, put it there. Otherwise, replace the shortest child with a new child that contains the shortest child and otherCanopy.
inspect
Overrides: Object
inspectSubCanopy: start
isLE: other
Return true if other is equal to the receiver
or an anscestor (through the parent links).
Use caches for efficiency.
isLeaf
joint
Return the abstracted information necessary to determine whether anything leafward may pass the filtering criteria.
makeNew
Overridden by: BertCrum SensorCrum
makeNewParent: first with: second
Make a new crum that contains both first and second.
This method just makes a new parent whose properties are empty. My client must bring my properties up to date
Overridden by: BertCrum SensorCrum
maxHeight
minHeight
ownFlags
propChanger: change with: prop
Return an AgendaItem to propagate properties.
NOTE: The AgendaItem returned is not yet scheduled. Doing so is up to my caller.
refCount
removePointer: ignored
Keep a refcount of diskful pointers to myself for disk space management. (Maybe backpointers later.)
Forget the object if it goes to zero.
sendSelfTo: xmtr
Overrides: Abraham
Overridden by: BertCrum SensorCrum
setOwnFlags: newFlags
setParent: p
verify1
BertCrum create verify1
verify2
BertCrum create verify2.
verifyHeight: height
Create a tree with maxHeight = height and minHeight = 2.
Index - All Packages - All Categories - All Classes