Class GammaNode<T,A>
- java.lang.Object
-
- ai.libs.jaicore.search.model.travesaltree.BackPointerPath<T,A,RStarK>
-
- ai.libs.jaicore.search.algorithms.standard.rstar.GammaNode<T,A>
-
- Type Parameters:
T
- problem state typeV
- 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.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addPredecessor(GammaNode<T,A> n)
Add a predecessor to this node.boolean
getAvoid()
double
getG()
GammaNode<T,A>
getParent()
java.util.Collection<GammaNode<T,A>>
getPredecessors()
void
setAvoid(boolean avoid)
void
setG(double g)
-
Methods inherited from class ai.libs.jaicore.search.model.travesaltree.BackPointerPath
containsNode, cutHead, extend, getAnnotation, getAnnotations, getArcs, getEdgeLabelToParent, getHead, getInArc, getNodes, getNumberOfNodes, getOutArc, getParentOfHead, getPathFromChildOfRoot, getPathToParentOfHead, getRoot, getScore, getString, getUnmodifiableAccessor, isGoal, isPoint, path, setAnnotation, setGoal, setParent, setScore, toString
-
-
-
-
Constructor Detail
-
GammaNode
public GammaNode(T point)
Constructor. Ignores parent node because we use the backpointer attribute.- Parameters:
point
-
-
-
Method Detail
-
getParent
public GammaNode<T,A> getParent()
- Overrides:
getParent
in classBackPointerPath<T,A,RStarK>
-
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.
-
-