Class GammaNode<T,​A>

  • Type Parameters:
    T - problem state type
    V - internal label type (in R* its RStarK)
    All Implemented Interfaces:
    org.api4.java.ai.graphsearch.problem.pathsearch.pathevaluation.IEvaluatedPath<T,​A,​RStarK>, org.api4.java.common.attributedobjects.ScoredItem<RStarK>, org.api4.java.datastructure.graph.ILabeledPath<T,​A>, org.api4.java.datastructure.graph.IPath<T>

    public class GammaNode<T,​A>
    extends BackPointerPath<T,​A,​RStarK>
    Node wrapper for usage in R*. Every node is equipped with path to its backpointer i.e. parent, the g-value and the AVOID label.
    • Field Detail

      • cLow

        protected java.util.HashMap<GammaNode<T,​A>,​java.lang.Double> cLow
        Maps from each successor s_ to the lowest cost for path(this, s_). This is either a heuristic estimate or the actual known lowest cost.
    • Constructor Detail

      • GammaNode

        public GammaNode​(T point)
        Constructor. Ignores parent node because we use the backpointer attribute.
        Parameters:
        point -
    • Method Detail

      • addPredecessor

        public boolean addPredecessor​(GammaNode<T,​A> n)
        Add a predecessor to this node.
        Parameters:
        n - The predecessor to be added.
        Returns:
        Returns true iff the predecessor could be added successfully.
      • getPredecessors

        public java.util.Collection<GammaNode<T,​A>> getPredecessors()
        Returns:
        The collection of all predecessors of this node.
      • getG

        public double getG()
        Returns:
        The value of g.
      • setG

        public void setG​(double g)
        Parameters:
        g - The new value of g.
      • getAvoid

        public boolean getAvoid()
        Returns:
        The value of the avoid flag of this node.
      • setAvoid

        public void setAvoid​(boolean avoid)
        Parameters:
        avoid - The new value of the avoid flag of this node.