java.lang.Object
dev.civl.gmc.concurrent.ConcurrentNodeFactory<STATE,TRANSITION>
-
Constructor Summary
ConstructorsConstructorDescriptionConcurrentNodeFactory(ConcurrentStateManagerIF<STATE, TRANSITION> stateManager) -
Method Summary
Modifier and TypeMethodDescriptionImplements the fly-weight pattern.newStackEntry(ConcurrentNode<STATE> node, Collection<TRANSITION> transitions, boolean full) Construct a new stack entry which will be pushed onto the stack.int
-
Constructor Details
-
ConcurrentNodeFactory
-
-
Method Details
-
getNode
Implements the fly-weight pattern.- Parameters:
state-- Returns:
- the existing
mapped to the state, or a new
invalid reference
SequentialNodemapped to the state if there was no entry in the map for the key state. Note that theinvalid reference
SequentialNodewill always store the normalized or simplified version ofinvalid reference
SequentialNodestate.
-
newStackEntry
public StackEntry<STATE,TRANSITION> newStackEntry(ConcurrentNode<STATE> node, Collection<TRANSITION> transitions, boolean full) Construct a new stack entry which will be pushed onto the stack.- Parameters:
node- Thethat wraps the source state.invalid reference
SequentialNodetransitions- This could be the ample set or ample set complement of the source state.full- Whethertransitionsis ample set complement or not.- Returns:
- The newly constructed
StackEntry.
-
numOfSearchNodeSaved
public int numOfSearchNodeSaved()- Returns:
- the number of search nodes saved.
-