Class BackPointerPath<N,​A,​V extends java.lang.Comparable<V>>

  • All Implemented Interfaces:
    org.api4.java.ai.graphsearch.problem.pathsearch.pathevaluation.IEvaluatedPath<N,​A,​V>, org.api4.java.common.attributedobjects.ScoredItem<V>, org.api4.java.datastructure.graph.ILabeledPath<N,​A>, org.api4.java.datastructure.graph.IPath<N>
    Direct Known Subclasses:
    GammaNode

    public class BackPointerPath<N,​A,​V extends java.lang.Comparable<V>>
    extends java.lang.Object
    implements org.api4.java.ai.graphsearch.problem.pathsearch.pathevaluation.IEvaluatedPath<N,​A,​V>
    • Constructor Detail

      • BackPointerPath

        public BackPointerPath​(N point)
      • BackPointerPath

        public BackPointerPath​(BackPointerPath<N,​A,​V> parent,
                               N point,
                               A edgeLabelToParent)
    • Method Detail

      • getHead

        public N getHead()
        Specified by:
        getHead in interface org.api4.java.datastructure.graph.IPath<N>
      • getScore

        public V getScore()
        Specified by:
        getScore in interface org.api4.java.common.attributedobjects.ScoredItem<N>
      • setScore

        public void setScore​(V internalLabel)
      • setAnnotation

        public void setAnnotation​(java.lang.String annotationName,
                                  java.lang.Object annotationValue)
      • getAnnotation

        public java.lang.Object getAnnotation​(java.lang.String annotationName)
      • getAnnotations

        public java.util.Map<java.lang.String,​java.lang.Object> getAnnotations()
      • isGoal

        public boolean isGoal()
      • setGoal

        public void setGoal​(boolean goal)
      • getNodes

        public java.util.List<N> getNodes()
        Specified by:
        getNodes in interface org.api4.java.datastructure.graph.IPath<N>
      • getString

        public java.lang.String getString()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getArcs

        public java.util.List<A> getArcs()
        Specified by:
        getArcs in interface org.api4.java.datastructure.graph.ILabeledPath<N,​A>
      • getEdgeLabelToParent

        public A getEdgeLabelToParent()
      • getRoot

        public N getRoot()
        Specified by:
        getRoot in interface org.api4.java.datastructure.graph.IPath<N>
      • getPathToParentOfHead

        public BackPointerPath<N,​A,​V> getPathToParentOfHead()
        Specified by:
        getPathToParentOfHead in interface org.api4.java.datastructure.graph.ILabeledPath<N,​A>
        Specified by:
        getPathToParentOfHead in interface org.api4.java.datastructure.graph.IPath<N>
      • getNumberOfNodes

        public int getNumberOfNodes()
        Specified by:
        getNumberOfNodes in interface org.api4.java.datastructure.graph.IPath<N>
      • isPoint

        public boolean isPoint()
        Specified by:
        isPoint in interface org.api4.java.datastructure.graph.IPath<N>
      • getPathFromChildOfRoot

        public BackPointerPath<N,​A,​V> getPathFromChildOfRoot()
        Specified by:
        getPathFromChildOfRoot in interface org.api4.java.datastructure.graph.ILabeledPath<N,​A>
        Specified by:
        getPathFromChildOfRoot in interface org.api4.java.datastructure.graph.IPath<N>
      • getInArc

        public A getInArc​(N node)
        Specified by:
        getInArc in interface org.api4.java.datastructure.graph.ILabeledPath<N,​A>
      • getOutArc

        public A getOutArc​(N node)
        Specified by:
        getOutArc in interface org.api4.java.datastructure.graph.ILabeledPath<N,​A>
      • containsNode

        public boolean containsNode​(N node)
        Specified by:
        containsNode in interface org.api4.java.datastructure.graph.IPath<N>
      • getUnmodifiableAccessor

        public org.api4.java.datastructure.graph.ILabeledPath<N,​A> getUnmodifiableAccessor()
        Specified by:
        getUnmodifiableAccessor in interface org.api4.java.datastructure.graph.ILabeledPath<N,​A>
        Specified by:
        getUnmodifiableAccessor in interface org.api4.java.datastructure.graph.IPath<N>
      • getParentOfHead

        public N getParentOfHead()
        Specified by:
        getParentOfHead in interface org.api4.java.datastructure.graph.IPath<N>
      • extend

        public void extend​(N newHead,
                           A arcToNewHead)
        Specified by:
        extend in interface org.api4.java.datastructure.graph.ILabeledPath<N,​A>
      • cutHead

        public void cutHead()
        Specified by:
        cutHead in interface org.api4.java.datastructure.graph.IPath<N>