java.lang.Object
dev.civl.gmc.seq.SequentialNode<STATE>
A Node in the state graph for the sequential depth first search.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetDepth()booleanbooleanintgetId()booleangetSeen()Returns the value of the seen flag associated to the given state.intGet the position of thisSequentialNodeon dfs stack or -1 if it is not on stack.getState()voidsetDepth(int depth) Setdepthto a given value.voidsetExpand(boolean expand) Setexpandto a given value.voidsetFullyExpanded(boolean value) SetfullyExpandedto a certain value.voidsetSeen(boolean value) Sets the "seen flag" to a given value.voidsetStackPosition(int stackPosition) Set the stack position field of theSequentialNode.
-
Constructor Details
-
SequentialNode
-
-
Method Details
-
setSeen
public void setSeen(boolean value) Sets the "seen flag" to a given value.The seen flag is intended to be used by a depth-first search algorithm, to mark that a state has been encountered in the search.
- Parameters:
value- the value you want to assign to the seen flag associated to that state
-
getSeen
public boolean getSeen()Returns the value of the seen flag associated to the given state.- Parameters:
state- any state in the state transition system- Returns:
- the value of that state's seen flag.
-
setStackPosition
public void setStackPosition(int stackPosition) Set the stack position field of the
SequentialNode.The "stack position" field is intended to be used by a depth-first search algorithm, to mark that a state is currently on the depth-first search stack.
The bottom element in the stack will have an index 0.
- Parameters:
value- The value assigned to the stack position filed.
-
getStackPosition
public int getStackPosition()Get the position of thisSequentialNodeon dfs stack or -1 if it is not on stack.- Returns:
- position of this state on dfs stack or -1
-
getFullyExpanded
public boolean getFullyExpanded()- Returns:
- true iff the target
SequentialNodehas been expanded.
-
setFullyExpanded
public void setFullyExpanded(boolean value) SetfullyExpandedto a certain value.- Parameters:
value- The value that is assigned tofullyExpandedfield.
-
setExpand
public void setExpand(boolean expand) Setexpandto a given value.- Parameters:
expand- The value that is assigned toexpand.
-
getExpand
public boolean getExpand()- Returns:
- the value of
expand.
-
getDepth
public int getDepth()- Returns:
- the value of
depth.
-
setDepth
public void setDepth(int depth) Setdepthto a given value.- Parameters:
depth- The value that is assigned todepth.
-
getState
- Returns:
- the STATE this
SequentialNodewraps.
-
getId
public int getId()
-