A* pathfinding in graphs

A single graph may have different properties according to the PathContext used


var graph = new Graph[Node,WeightedLink]

var na = new Node(graph)
var nb = new Node(graph)
var nc = new Node(graph)
var nd = new Node(graph)
var ne = new Node(graph)

var lab = new WeightedLink(graph, na, nb, 2)
var lac = new WeightedLink(graph, na, nc, 3)
var lbd = new WeightedLink(graph, nb, nd, 1)
var lcd = new WeightedLink(graph, nc, nd, 3)
var lde = new WeightedLink(graph, nd, ne, 8)

var context = new WeightedPathContext(graph)

var path = na.path_to(ne, 100, context)
assert path != null else print "No possible path"

assert path.step == nb
assert path.step == nd
assert path.step == ne
assert path.at_end_of_path

All groups and modules

module a_star

a_star :: a_star

A* pathfinding in graphs
package_diagram a_star a_star serialization serialization a_star->serialization poset poset serialization->poset meta meta serialization->meta json json serialization->json ...poset ... ...poset->poset ...meta ... ...meta->meta ...json ... ...json->json


package core


Nit common library of core classes and methods
package json


read and write JSON formatted text
package meta


Simple user-defined meta-level to manipulate types of instances as object.
package parser_base


Simple base for hand-made parsers of all kinds
package poset


Pre order sets and partial order set (ie hierarchies)


package serialization


Abstract serialization services