aima.core.search.framework.evalfunc.PathCostFunction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aima-core Show documentation
Show all versions of aima-core Show documentation
AIMA-Java Core Algorithms from the book Artificial Intelligence a Modern Approach 3rd Ed.
The newest version!
package aima.core.search.framework.evalfunc;
import aima.core.search.framework.Node;
/**
* Artificial Intelligence A Modern Approach (3rd Edition): page 78.
*
*
* @author Ciaran O'Reilly
*
*/
public class PathCostFunction {
public PathCostFunction() {
}
/**
*
* @param n
* @return the cost, traditionally denoted by g(n), of the path from the
* initial state to the node, as indicated by the parent pointers.
*/
public double g(Node n) {
return n.getPathCost();
}
}