Package edu.uky.ai.planning.pg
Class NodeInstance
java.lang.Object
edu.uky.ai.planning.pg.NodeInstance
- All Implemented Interfaces:
Comparable<NodeInstance>
Represents a plan graph node at a specific level.
PlanGraph
saves
considerable memory by only using one object for each step and literal node,
rather than one object for every level at which those things appear. This
class is used when we need to refer to a specific node at a specific level,
usually when searching for a solution subgraph. For example, if the literal
node A has a level of 2, it indicates that A appears first at level 2, then
again at level 3, level 4, and all subsequence levels. If we need to refer
specifically to the literal A that appears at level 3, we would use this
class.- Author:
- Stephen G. Ware
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNodeInstance
(Node node, int level) Constructs a new node instance for the given node and level. -
Method Summary
-
Field Details
-
node
The plan graph node -
level
public final int levelThe level at which this node appears
-
-
Constructor Details
-
NodeInstance
Constructs a new node instance for the given node and level.- Parameters:
node
- a nodelevel
- a level in the plan graph
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
toString
-
compareTo
- Specified by:
compareTo
in interfaceComparable<NodeInstance>
-