public class

WeightedNodeFactory

extends Object
implements NodeFactory<A, S, N>
java.lang.Object
   ↳ es.usc.citius.hipster.model.function.impl.WeightedNodeFactory<A, S, C extends java.lang.Comparable<C>>

Class Overview

Implementation of NodeFactory for nodes of type WeightedNode. The new nodes have a cost which is the sum of the cost of the parent and the cost of the Transition between the parent node and the current one, calculated by a CostFunction. Also, the score is the sum of the cost of the node and the estimated cost to the goal, according to a HeuristicFunction.

Summary

Public Constructors
WeightedNodeFactory(CostFunction<A, S, C> costFunction, HeuristicFunction<S, C> heuristicFunction, BinaryOperation<C> costAccumulator)
Instantiates a node factory using a cost function, a heuristic function and a cost accumulator.
WeightedNodeFactory(CostFunction<A, S, C> costFunction, BinaryOperation<C> costAccumulator)
Instantiates a node factory using a cost function and a cost accumulator.
Public Methods
WeightedNode<A, S, C> makeNode(WeightedNode<A, S, C> fromNode, Transition<A, S> transition)
[Expand]
Inherited Methods
From class java.lang.Object
From interface es.usc.citius.hipster.model.function.NodeFactory

Public Constructors

public WeightedNodeFactory (CostFunction<A, S, C> costFunction, HeuristicFunction<S, C> heuristicFunction, BinaryOperation<C> costAccumulator)

Instantiates a node factory using a cost function, a heuristic function and a cost accumulator.

Parameters
costFunction cost function
heuristicFunction heuristic function
costAccumulator function to accumulate the cost elements

public WeightedNodeFactory (CostFunction<A, S, C> costFunction, BinaryOperation<C> costAccumulator)

Instantiates a node factory using a cost function and a cost accumulator. The heuristic function is considered to return always the identity element of the cost.

Parameters
costFunction cost function
costAccumulator function to accumulate the cost elements

Public Methods

public WeightedNode<A, S, C> makeNode (WeightedNode<A, S, C> fromNode, Transition<A, S> transition)