Class Node

java.lang.Object
org.ddolib.ddo.core.mdd.Node

public final class Node extends Object
Represents an atomic node in a decision diagram.

By itself, a Node does not hold much interpretable information, but it serves as a building block for constructing decision diagrams. It stores edges, values, and auxiliary information used in dynamic programming, search, or pruning operations.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The edge terminating the longest path to this node.
    The list of edges leading to this node.
    double
    Overapproximation of the shortest path from this node to a terminal node.
    boolean
    Flag indicating if the node is above the exact cutset.
    boolean
    Flag indicating if the node is in the exact cutset.
    boolean
    Flag indicating if the node is marked.
    The length of the longest suffix of this node (used in local bound calculations).
    The type of this node (e.g., exact, relaxed).
    double
    The length of the longest path to this node.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Node(double value)
    Creates a new Node with the given value.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    Returns a string representation of this node, including its value, suffix, best edge, and parent edges.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • value

      public double value
      The length of the longest path to this node.
    • suffix

      public Double suffix
      The length of the longest suffix of this node (used in local bound calculations).
    • best

      public Edge best
      The edge terminating the longest path to this node.
    • edges

      public List<Edge> edges
      The list of edges leading to this node.
    • type

      public NodeType type
      The type of this node (e.g., exact, relaxed).
    • isMarked

      public boolean isMarked
      Flag indicating if the node is marked.
    • flb

      public double flb
      Overapproximation of the shortest path from this node to a terminal node.
    • isInExactCutSet

      public boolean isInExactCutSet
      Flag indicating if the node is in the exact cutset.
    • isAboveExactCutSet

      public boolean isAboveExactCutSet
      Flag indicating if the node is above the exact cutset.
  • Constructor Details

    • Node

      public Node(double value)
      Creates a new Node with the given value.

      Initializes suffix and best edge to null, creates an empty list of edges, sets the type to NodeType.EXACT, and marks the node as unmarked.

      Parameters:
      value - the initial value of the node (length of the longest path to this node)
  • Method Details

    • toString

      public String toString()
      Returns a string representation of this node, including its value, suffix, best edge, and parent edges.
      Overrides:
      toString in class Object
      Returns:
      a string describing the node
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object