org.abora.gold.cross
Class BoxAccumulator

java.lang.Object
  |
  +--org.abora.gold.java.AboraHeaper
        |
        +--org.abora.gold.xpp.basic.Heaper
              |
              +--org.abora.gold.collection.steppers.Accumulator
                    |
                    +--org.abora.gold.cross.BoxAccumulator

public class BoxAccumulator
extends Accumulator

was NOT.A.TYPE but this prevented compilation


Field Summary
protected  int myIndex
           
protected  PtrArray myRegions
           
protected  CrossSpace mySpace
           
protected static InstanceCache SomeAccumulators
           
 
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
BoxAccumulator(CrossSpace space, int expectedBoxCount)
           
BoxAccumulator(CrossSpace space, PtrArray regions, int expectedBoxCount)
           
BoxAccumulator(GenericCrossRegion region)
           
 
Method Summary
 void aboutToAdd()
          Make sure there is room to add a box
 void addAccumulatedBoxes(BoxAccumulator other)
          Add in all the boxes in another accumulator
 int addBox(BoxStepper box)
          Add the current box to the end of the array
 void addInverseTransformedBox(BoxStepper box, GenericCrossDsp dsp)
          Add the current box, transformed by the inverse of the dsp
 int addProjections(PtrArray projections, int boxIndex)
          Add a box to the end of the array
 int addSubstitutedBox(int current, int dimension, XnRegion newRegion)
          Add a new box which is just like a current one except for the projection on one dimension.
Return its index
 void addTransformedBox(BoxStepper box, GenericCrossDsp dsp)
          Add the current box, transformed by the dsp
 int boxCount()
           
 XnRegion boxProjection(int box, int dimension)
          Change a projection of a box
 Accumulator copy()
          Return a new Accumulator just like the current one, except that
from now on they accumulate separately
 void deleteBox(int box)
          Mark a box as deleted
 boolean distributeUnion(int added, int start, int stop)
          Take my box at added
and distribute it over my existing boxes from start to stop - 1
meanwhile taking pieces out of my box at remainder
and delete it if it becomes empty
Return true if there is still something left in the remainder
 int index()
           
static void initTimeNonInherited()
           
 void intersectWithBox(BoxStepper box)
          Intersect the current region with a box.
 boolean isDeleted(int box)
          Whether the box has been deleted
static void linkTimeNonInherited()
           
static Heaper make(CrossSpace space, int expectedBoxCount)
           
static Heaper make(GenericCrossRegion region)
           
 void mergeBoxes()
          merge boxes which differ in only one projection
 XnRegion region()
          The current region in the accumulator.
 void removeDeleted()
          Remove boxes which have been deleted
 PtrArray secretRegions()
           
 boolean splitUnion(int added, int current, int stop)
          Take my box at added
and union it with my box at current
delete it if it becomes empty
Return true if there is still something left in the added box
 void step(Heaper someObj)
          Accumulate a new object into the Accumulator
 void storeBoxProjection(int box, int dimension, XnRegion region)
          Change a projection of a box
 void tryMergeBoxes(int i, int j)
          If two boxes differ by only one projection, union the second into the first and delete the
second
 void unionWithBox(BoxStepper box)
          Add the current box to the accumulator
 void unionWithBoxes(BoxStepper boxes)
          Add a sequence of disjoint boxes to the accumulator
 Heaper value()
          Return the object that results from accumulating all those objects
 
Methods inherited from class org.abora.gold.collection.steppers.Accumulator
actualHashForEqual, isEqual, ptrArray
 
Methods inherited from class org.abora.gold.xpp.basic.Heaper
abstractDeclarationFor, abstractTypeFor, addMethodAttributeToInOf, addPackage, addPackageCategory, allClientProtocolOn, argumentTypesFor, arrow, blast, blast, BLAST, cachePromiseNameTable, cachePromiseNameTableIn, canYouBecome, cast, cleanPromiseClasses, cleanupGarbage, clientClassesDo, clientFunctionsOn, clientMethodsOn, clientProtocol, clientProtocolDo, clientProtocolOn, clientProtocolOn, collectibleClasses, compare, compileClientSubclasses, compileConstantPromiseMethods, compileCreateFromRcvr, compileEQ, compileGeneratedClassMethod, compileGeneratedMethod, compileHook, compilePromise, compilePromiseDefaultMethods, compilePromiseFluidDeclarations, compilePromiseHandlers, compilePromiseMethods, compileRequestCreateMsgInArguments, compileRequestEvaluateMsgInReturningArguments, compileRPCSpecialistEvaluateMsgForReturningArguments, compileSendSelfTo, compileSendSelfToSendHook, compileStubbleMethods, compileSubclassStubbleMethods, computeMangle, computePreorder, constantTypeValue, convert, convertCopyDeclarations, convertDeferredDeclarations, convertProxyDeclarations, convertSubclassCopyDeclarations, convertSubclassDeferredDeclarations, convertSubclassProxyDeclarations, copyReferencesToType, create, create, create, create, create, create, create, create, create, create, createRequestClassArguments, definesProxyMethods, delete, deref, destroy, destruct, destructor, enum, enumFlags, equals, exportName, fetchAttribute, fetchPackage, fetchSuperCategory, fileOutClientProtocol, findCategory, findSenderAndReceiverMethods, findTailInto, flushPromiseNameTable, foo, freezeClientClasses, freezeClientProtocol, freezeStProtocol, frozenClasses, garbageCollect, garbageCollectFrom, gcOpportunity, gcOpportunity, generatedCategory, generatePromiseNames, getCategory, getOrMakePackage, getSuperCategory, handlerSignaturesFrom, hash, hashForEqual, hasProxyMethods, info_clientClasses, info_clientSideClasses, info_promiseClasses, info_stProtocol, inGC, initializedClasses, initializingClasses, initPackages, initStringHashSBoxes, inspectPieces, instanceSize, IntegerVar, isByProxy, isConstructed, isDestructed, isEqual, isEqualOrSubclassOf, isGenerated, isIntType, isKindOf, isRawType, isUnlocked, make, makeClassTable, makeFillTable, makeRequestTable, mangle, markChildren, markCount, markInstances, mayBecome, mayBecomeAnySubclassOf, new1, newX, nonCopyVariables, notWorking, pack, packageClasses, packagingCategory, parseExportName, passe, pointerToStaticMember, pointerToStaticMember, pointerToVirtualMember, preorderMax, preorderNumber, printOn, PROBLEM, problems, promiseClass, promiseDefaultValue, promiseName, promiseNameTable, promiseToAbstract, registerPackageCategory, removeGeneratedCode, removeStubbleMethods, removeSubclassGeneratedCode, removeSubclassStubbleMethods, requestProcedure, requestProceduresFrom, returnTypeFor, rootName, scheduleTermination, sendProxyTo, sendSelfTo, serverNameFor, setGC, signal, signals, smalltalkSelector, stClientProtocol, stubbleSelectorTokenReturnsArguments, subclassNonCopyVariables, takeOop, togglePromiseName, togglePromiseOfParse, unimplemented, unmangle, verifyFreeze, wipeStubble
 
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

mySpace

protected CrossSpace mySpace

myRegions

protected PtrArray myRegions

myIndex

protected int myIndex

SomeAccumulators

protected static InstanceCache SomeAccumulators
Constructor Detail

BoxAccumulator

public BoxAccumulator(GenericCrossRegion region)

BoxAccumulator

public BoxAccumulator(CrossSpace space,
                      int expectedBoxCount)

BoxAccumulator

public BoxAccumulator(CrossSpace space,
                      PtrArray regions,
                      int expectedBoxCount)
Method Detail

copy

public Accumulator copy()
Description copied from class: Accumulator
Return a new Accumulator just like the current one, except that
from now on they accumulate separately

Overrides:
copy in class Accumulator

aboutToAdd

public void aboutToAdd()
Make sure there is room to add a box


addSubstitutedBox

public int addSubstitutedBox(int current,
                             int dimension,
                             XnRegion newRegion)
Add a new box which is just like a current one except for the projection on one dimension.
Return its index


boxCount

public int boxCount()

boxProjection

public XnRegion boxProjection(int box,
                              int dimension)
Change a projection of a box


deleteBox

public void deleteBox(int box)
Mark a box as deleted


distributeUnion

public boolean distributeUnion(int added,
                               int start,
                               int stop)
Take my box at added
and distribute it over my existing boxes from start to stop - 1
meanwhile taking pieces out of my box at remainder
and delete it if it becomes empty
Return true if there is still something left in the remainder


index

public int index()

isDeleted

public boolean isDeleted(int box)
Whether the box has been deleted


secretRegions

public PtrArray secretRegions()

splitUnion

public boolean splitUnion(int added,
                          int current,
                          int stop)
Take my box at added
and union it with my box at current
delete it if it becomes empty
Return true if there is still something left in the added box


storeBoxProjection

public void storeBoxProjection(int box,
                               int dimension,
                               XnRegion region)
Change a projection of a box


tryMergeBoxes

public void tryMergeBoxes(int i,
                          int j)
If two boxes differ by only one projection, union the second into the first and delete the
second


addAccumulatedBoxes

public void addAccumulatedBoxes(BoxAccumulator other)
Add in all the boxes in another accumulator


addBox

public int addBox(BoxStepper box)
Add the current box to the end of the array


addInverseTransformedBox

public void addInverseTransformedBox(BoxStepper box,
                                     GenericCrossDsp dsp)
Add the current box, transformed by the inverse of the dsp


addProjections

public int addProjections(PtrArray projections,
                          int boxIndex)
Add a box to the end of the array


addTransformedBox

public void addTransformedBox(BoxStepper box,
                              GenericCrossDsp dsp)
Add the current box, transformed by the dsp


intersectWithBox

public void intersectWithBox(BoxStepper box)
Intersect the current region with a box. May leave the result uncanonicalized


mergeBoxes

public void mergeBoxes()
merge boxes which differ in only one projection


region

public XnRegion region()
The current region in the accumulator. CLIENT MUST KNOW THAT IT IS CANONICAL


removeDeleted

public void removeDeleted()
Remove boxes which have been deleted


step

public void step(Heaper someObj)
Description copied from class: Accumulator
Accumulate a new object into the Accumulator

Overrides:
step in class Accumulator

unionWithBox

public void unionWithBox(BoxStepper box)
Add the current box to the accumulator


unionWithBoxes

public void unionWithBoxes(BoxStepper boxes)
Add a sequence of disjoint boxes to the accumulator


value

public Heaper value()
Description copied from class: Accumulator
Return the object that results from accumulating all those objects

Overrides:
value in class Accumulator

initTimeNonInherited

public static void initTimeNonInherited()

linkTimeNonInherited

public static void linkTimeNonInherited()

make

public static Heaper make(GenericCrossRegion region)

make

public static Heaper make(CrossSpace space,
                          int expectedBoxCount)


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