Class NodeInstance

java.lang.Object
edu.uky.ai.planning.pg.NodeInstance
All Implemented Interfaces:
Comparable<NodeInstance>

public class NodeInstance extends Object implements 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 Details

    • node

      public final Node node
      The plan graph node
    • level

      public final int level
      The level at which this node appears
  • Constructor Details

    • NodeInstance

      public NodeInstance(Node node, int level)
      Constructs a new node instance for the given node and level.
      Parameters:
      node - a node
      level - a level in the plan graph
  • Method Details