PBeFS
Parallel Best-First Search
Loading...
Searching...
No Matches
OpenList.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------------*/
2/*---------------------------- File OpenList.h -----------------------------*/
3/*--------------------------------------------------------------------------*/
29/*--------------------------------------------------------------------------*/
30/*------------------------------ DEFINITIONS -------------------------------*/
31/*--------------------------------------------------------------------------*/
32
33#ifndef __PBeFS_OpenList
34 #define __PBeFS_OpenList
35 /* self-identification: #endif at the end of the file */
36
37/*--------------------------------------------------------------------------*/
38/*-------------------------------- INCLUDES --------------------------------*/
39/*--------------------------------------------------------------------------*/
40
41#include <algorithm>
42#include <cstddef>
43
44#include <type_traits>
45
46#include <vector>
47
49
50/*--------------------------------------------------------------------------*/
51/*------------------------------- NAMESPACE --------------------------------*/
52/*--------------------------------------------------------------------------*/
53
55namespace PBeFS_di_unipi_it
56{
57
58/*--------------------------------------------------------------------------*/
59/*--------------------------------- TYPES ----------------------------------*/
60/*--------------------------------------------------------------------------*/
61
63enum class OpenKind {
67 };
68
69/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
71
72template< class NodeT >
73struct OpenEntry {
74
75 NodeT * node;
76 decltype( NodeT::g ) g;
77
79 [[nodiscard]] bool stale( void ) const noexcept {
80 return( node->closed || ( node->g != g ) );
81 }
82
83 }; // end( struct( OpenEntry ) )
84
85
86/*--------------------------------------------------------------------------*/
87
88} // end( namespace PBeFS_di_unipi_it )
89
90/*--------------------------------------------------------------------------*/
91
92// the structures of the chosen set [see Structures.h]
93#if defined( PBEFS_STRUCTURES_STD )
94 #include "PBeFS/astar/structures/std/OpenList.h"
95#elif defined( PBEFS_STRUCTURES_BOOST )
96 #include "PBeFS/astar/structures/boost/OpenList.h"
97#elif defined( PBEFS_STRUCTURES_ADS )
99#endif
100
101/*--------------------------------------------------------------------------*/
102
103#endif /* __PBeFS_OpenList */
104
105/*--------------------------------------------------------------------------*/
106/*-------------------------- End File OpenList.h ---------------------------*/
107/*--------------------------------------------------------------------------*/
Header file for the choice of the set of data structures of A*: the arena of the nodes (NodePool),...
namespace for the Parallel Best-First Search library
Definition AStar.h:83
OpenKind
the kind of OPEN list a search uses
Definition OpenList.h:63
@ buckets
BucketOpenList (integer costs only).
Definition OpenList.h:66
@ automatic
buckets for integer costs, heap otherwise
Definition OpenList.h:64
@ heap
HeapOpenList.
Definition OpenList.h:65
an entry of the OPEN list: the node and the g it had when pushed
Definition OpenList.h:73
NodeT * node
the node
Definition OpenList.h:75
decltype(NodeT::g) g
the g of the node when it was pushed
Definition OpenList.h:76
bool stale(void) const noexcept
true if the node has been closed or improved since it was pushed
Definition OpenList.h:79
Header file for the priority queues of the OPEN list of the set of data structures of ADS [see Struct...