astar/NodeTable.h

Header of the layer astar, in the group Data structures; the same header on the site of Doxygen, its source on GitHub.

Description of the header

Header file for the class template NodeTable, the closed list of the searches: a map from the generated states to their canonical Node, taken from the set of data structures chosen [see Structures.h].

A NodeTable< NodeT > has a constructor taking the initial number of slots, the static slots_for( n ), the number of slots that holds n nodes without growing, find_or_insert( state , hash , make ), which looks up state, whose hash is hash, and inserts the node returned by make() if it is absent, returning the node of state and true if it has just been inserted, find( state , hash ), which returns nullptr if state has never been generated, prefetch( hash ), which brings in the cache the first slot probed for hash, so that a search can overlap the cache misses of the lookups of all the successors of a node, size() and bytes().

Author

Donato Meoli

Dipartimento di Informatica

Università di Pisa

Copyright

© by Donato Meoli