java.lang.Object | ||
↳ | es.usc.citius.hipster.model.AbstractNode<A, S, N extends es.usc.citius.hipster.model.AbstractNode<A, S, N>> | |
↳ | es.usc.citius.hipster.model.impl.ADStarNodeImpl<A, S, C extends java.lang.Comparable<C>> |
Interface defining the basic operations for Node
to be used with
ADStarForward
. Contains the declaration of the methods to retrieve
te cost elements of the node (G and V) and the definition of the ADStarNodeImpl.Key
to compare ADStarNodeImpl
elements.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
protected boolean | doUpdate | ||||||||||
protected C extends Comparable<C> | g | ||||||||||
protected Key<C extends Comparable<C>> | key | ||||||||||
protected C extends Comparable<C> | v |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ADStarNodeImpl(Transition<A, S> transition, ADStarNodeImpl<A, S, C> previousNode, C g, C v, Key<C> k)
Default constructor for ADStarNode.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int |
compareTo(ADStarNodeImpl<A, S, C> o)
Compares ADSTarNode instances attending to their
ADStarNode.Key
values. | ||||||||||
C | getCost() | ||||||||||
C |
getEstimation()
Return the estimated cost to goal state from the current state.
| ||||||||||
C |
getG()
Cost from beginning state.
| ||||||||||
C |
getScore()
Retrieves the total cost (typically f = g + h) of this node,
where g =
getCost() and
h = getEstimation() | ||||||||||
C |
getV()
Score to goal given as heuristic.
| ||||||||||
boolean |
isConsistent()
Returns if the node is in a consistent state or not.
| ||||||||||
boolean | isDoUpdate() | ||||||||||
ADStarNodeImpl<A, S, C> |
previousNode()
Method to retrieve the parent ADStarNode, the same
retrieved by
getFromState() . | ||||||||||
void | setAction(A action) | ||||||||||
void | setDoUpdate(boolean doUpdate) | ||||||||||
void | setG(C g) | ||||||||||
void | setKey(Key<C> key) | ||||||||||
void | setPreviousNode(ADStarNodeImpl<A, S, C> parent) | ||||||||||
void | setState(S state) | ||||||||||
void | setV(C v) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Default constructor for ADStarNode. Requires the transition used to reach the new one and the previous node. The current cost (G), score (V) and key to compare between ADStarNode instances are also required.
transition | incoming transition |
---|---|
previousNode | parent node |
g | accumulated cost from begin |
v | score to goal |
k | key value evaluated over G and V |
Compares ADSTarNode instances attending to their ADStarNode.Key
values.
o | ADStarNode instance |
---|
Return the estimated cost to goal state from the current state.
Cost from beginning state.
Retrieves the total cost (typically f = g + h) of this node,
where g = getCost()
and
h = getEstimation()
Score to goal given as heuristic.
Returns if the node is in a consistent state or not.
Method to retrieve the parent ADStarNode, the same
retrieved by getFromState()
.
ADStarNodeImpl
,