|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdasher.CNodeManager
public abstract class CNodeManager
A NodeManager is used by the DasherModel to perform tasks which require some knowledge about the collection of Nodes besides the Model's highly general view. This includes the handling of output when the user enters or leaves a given node and extending the Model's tree of DasherNodes, either forwards or backwards, whenever necessary.
| Field Summary | |
|---|---|
protected int |
m_iID
Our unique ID |
| Constructor Summary | |
|---|---|
CNodeManager(int iID)
Creates a new NodeManager with a given ID |
|
| Method Summary | |
|---|---|
abstract void |
ClearNode(CDasherNode Node)
Removes all references to this node and deallocates storage if appropriate. |
void |
Enter(CDasherNode Node)
Signals that the user has entered a given Node. |
int |
GetID()
Gets our unique ID |
abstract CDasherNode |
GetRoot(CDasherNode Parent,
long iLower,
long iUpper,
int UserData)
Produces a new root Node belonging to this NodeManager |
void |
Leave(CDasherNode Node)
Signals that the user has left a given Node. |
void |
Output(CDasherNode Node,
java.util.ArrayList<CSymbolProb> Added,
int iNormalization)
Performs output appropriate to a given Node, if any. |
abstract void |
PopulateChildren(CDasherNode Node)
Fills this Node's child list. |
CDasherNode |
RebuildParent(CDasherNode Node,
int iGeneration)
Rebuild's the parent of a given Node. |
abstract void |
Ref()
Increment this manager's reference count. |
void |
Undo(CDasherNode Node)
Reverse or undo the output associated with a given Node |
abstract void |
Unref()
Decrement this manager's reference count. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int m_iID
| Constructor Detail |
|---|
public CNodeManager(int iID)
iID - ID to use| Method Detail |
|---|
public int GetID()
public abstract void Ref()
public abstract void Unref()
public abstract CDasherNode GetRoot(CDasherNode Parent,
long iLower,
long iUpper,
int UserData)
Parent - Parent to which the new root will be a childiLower - New node's lower probability bound with respect to its parentiUpper - New node's upper probability bound with respect to its parentUserData - Usage depends on the type of NodeManager
public abstract void PopulateChildren(CDasherNode Node)
Node - Node to populatepublic abstract void ClearNode(CDasherNode Node)
Node - Node to free
public void Output(CDasherNode Node,
java.util.ArrayList<CSymbolProb> Added,
int iNormalization)
This method will be called when a user enters a given Node.
This method is defined to do nothing in this class; if a subclass does not wish to take action at this point, it is safe to avoid overriding this.
Node - Node to outputAdded - CSymbolProbs detailing what has been output should
be added to this listiNormalization - Normalisation value (total to which
node probabilities always add up)public void Undo(CDasherNode Node)
This method is defined to do nothing in this class; if a subclass does not wish to take action at this point, it is safe to avoid overriding this.
Node - Node to undopublic void Enter(CDasherNode Node)
This method is defined to do nothing in this class; if a subclass does not wish to take action at this point, it is safe to avoid overriding this.
Node - public void Leave(CDasherNode Node)
This method is defined to do nothing in this class; if a subclass does not wish to take action at this point, it is safe to avoid overriding this.
Node - Node to be left
public CDasherNode RebuildParent(CDasherNode Node,
int iGeneration)
The new Node should have all of its children populated, one of which should be the supplied Node.
See CAlphabetManager for a concrete example.
Node - Node whose parent is to be rebuiltiGeneration - Tree depth of the node to be created
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||