PBeFS
Parallel Best-First Search
Loading...
Searching...
No Matches
Node.h File Reference

Header file for the class template Node, a node of the search graph, for the class template NodePool, the arena the nodes are allocated from, taken from the set of data structures chosen [see Structures.h], and for the infinite cost and the path to a goal. More...

#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <limits>
#include <memory>
#include <type_traits>
#include <vector>
#include "PBeFS/astar/Domain.h"
#include "PBeFS/astar/Structures.h"
#include "PBeFS/core/SearchUtils.h"

Go to the source code of this file.

Classes

struct  Node< State, Cost >
 a node of the search graph More...

Namespaces

namespace  PBeFS_di_unipi_it
 namespace for the Parallel Best-First Search library

Functions

template<class Cost>
constexpr Cost infinite_cost (void) noexcept
 the largest value of a cost type, used as "no incumbent yet"
template<class Cost>
requires std::is_integral_v< Cost >
constexpr std::uint64_t packed_fg (Cost g, Cost h) noexcept
 with integer costs, f = g + h in the high half of a word and the complement of g in the low one, so that the smaller word has the smaller f and, on the ties of f, the larger g, as the OPEN of AStar
template<class NodeT>
auto trace_path (const NodeT *goal)
 the states from the root to goal, following the parent pointers

Detailed Description

Header file for the class template Node, a node of the search graph, for the class template NodePool, the arena the nodes are allocated from, taken from the set of data structures chosen [see Structures.h], and for the infinite cost and the path to a goal.

A NodePool< NodeT > has a constructor taking the number of nodes of a chunk, allocate(), which returns a new uninitialized node, size() and bytes(); the nodes are never freed one by one, and their addresses never change, which the parent pointers rely on.

Author
Donato Meoli
Dipartimento di Informatica
Università di Pisa