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.WeightedNode<A, S, C extends java.lang.Comparable<C>> |
Basic implementation of a node which does not which keeps information about
the cost. For problems which does not use actions, instances of
new WeightedNode<Void,S,C>
may be used.
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
WeightedNode(WeightedNode<A, S, C> previousNode, S state, A action, C cost, C estimation, C score)
Basic constructor for instantiating a new weighted node.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | compareTo(WeightedNode<A, S, C> o) | ||||||||||
C | getCost() | ||||||||||
C |
getEstimation()
Return the estimated cost to goal state from the current state.
| ||||||||||
C |
getScore()
Retrieves the total cost (typically f = g + h) of this node,
where g =
getCost() and
h = getEstimation() | ||||||||||
String | toString() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Basic constructor for instantiating a new weighted node.
previousNode | parent node |
---|---|
state | state of the node to be created |
action | action connecting the parent node and the current one |
cost | cost of the new node |
estimation | estimated cost between the current node and the goal |
score | score of the new node |
Return the estimated cost to goal state from the current state.
Retrieves the total cost (typically f = g + h) of this node,
where g = getCost()
and
h = getEstimation()