public class

WeightedNode

extends AbstractNode<A, S, N extends AbstractNode<A, S, N>>
implements HeuristicNode<A, S, C extends Comparable<C>, N extends HeuristicNode<A, S, C, N>>
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>>

Class Overview

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.

Summary

[Expand]
Inherited Fields
From class es.usc.citius.hipster.model.AbstractNode
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
From class es.usc.citius.hipster.model.AbstractNode
From class java.lang.Object
From interface es.usc.citius.hipster.model.CostNode
From interface es.usc.citius.hipster.model.HeuristicNode
From interface es.usc.citius.hipster.model.Node
From interface java.lang.Comparable

Public Constructors

public WeightedNode (WeightedNode<A, S, C> previousNode, S state, A action, C cost, C estimation, C score)

Basic constructor for instantiating a new weighted node.

Parameters
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

Public Methods

public int compareTo (WeightedNode<A, S, C> o)

public C getCost ()

public C getEstimation ()

Return the estimated cost to goal state from the current state.

Returns
  • cost estimation.

public C getScore ()

Retrieves the total cost (typically f = g + h) of this node, where g = getCost() and h = getEstimation()

Returns
  • total cost (f function).

public String toString ()