mutable
A Database System for Research and Fast Prototyping
Loading...
Searching...
No Matches
Data Structures | Public Types | Public Member Functions | Static Public Attributes | Private Types | Private Attributes | Friends
m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context > Struct Template Reference

Tracks states and their presence in queues. More...

#include <HeuristicSearch.hpp>

Collaboration diagram for m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >:
[legend]

Data Structures

struct  comparator
 

‍comparator for map entries based on states' g + h value

More...
 
struct  Partitions
 
struct  Partitions< false >
 
struct  Partitions< true >
 

Public Types

using state_type = State
 
using expand_type = Expand
 

Public Member Functions

 StateManager (Context &... context)
 
 StateManager (const StateManager &)=delete
 
 StateManager (StateManager &&)=default
 
StateManageroperator= (StateManager &&)=default
 
partition_iterator partitions_begin ()
 
partition_iterator partitions_end ()
 
partition_const_iterator partitions_begin () const
 
partition_const_iterator partitions_end () const
 
partition_const_iterator partitions_cbegin () const
 
partition_const_iterator partitions_cend () const
 
partition_reverse_iterator partitions_rbegin ()
 
partition_reverse_iterator partitions_rend ()
 
partition_const_reverse_iterator partitions_rbegin () const
 
partition_const_reverse_iterator partitions_rend () const
 
partition_const_reverse_iterator partitions_crbegin () const
 
partition_const_reverse_iterator partitions_crend () const
 
range< partition_iteratorpartitions ()
 
range< partition_const_iteratorpartitions () const
 
std::size_t num_states_seen () const
 
std::size_t num_states_in_regular_queue () const
 
std::size_t num_states_in_beam_queue () const
 
float weighting_factor () const
 Returns the weighting factor for the heuristic value.
 
float weighting_factor (float new_factor)
 Set the weighting factor for the heuristic value and returns the old value.
 
void update_least_path_cost (double cost)
 Update the least_path_cost to cost.
 
template<bool ToBeamQueue>
void push (state_type state, double h, Context &... context)
 
void push_regular_queue (state_type state, double h, Context &... context)
 
void push_beam_queue (state_type state, double h, Context &... context)
 
bool is_regular_queue_empty () const
 
bool is_beam_queue_empty () const
 
bool queues_empty () const
 
std::pair< const state_type &, double > pop ()
 
map_type::iterator find (const state_type &state, Context &... context)
 
map_type::iterator end (const state_type &state, Context &... context)
 
map_type::const_iterator find (const state_type &state, Context &... context) const
 
map_type::const_iterator end (const state_type &state, Context &... context) const
 
void clear ()
 
void print_counters (std::ostream &out) const
 
map_typepartition (const state_type &state, Context &... context)
 
const map_typepartition (const state_type &state, Context &... context) const
 
void dump (std::ostream &out) const
 
void dump () const
 

Static Public Attributes

static constexpr bool has_regular_queue = HasRegularQueue
 
static constexpr bool has_beam_queue = HasBeamQueue
 
static constexpr bool detect_duplicates = true
 
static constexpr bool enable_cost_based_pruning = Config::PerformCostBasedPruning
 
static constexpr bool use_weighted_search = Config::PerformWeightedSearch
 

Private Types

using pointer_type = void *
 

‍type for a pointer to an entry in the map of states


 
using heap_type = typename Config::template heap_type< pointer_type, typename Config::template compare< comparator > >
 

‍the type of heap to implement the priority queues


 
using map_value_type = (new) DEF_COUNTER(duplicates) DEF_COUNTER(regular_to_beam) DEF_COUNTER(none_to_beam) DEF_COUNTER(discarded) DEF_COUNTER(cheaper) DEF_COUNTER(decrease_key) DEF_COUNTER(pruned_by_cost) public std::pair< const state_type, StateInfo >
 
using map_type = std::unordered_map< state_type, StateInfo, std::hash< state_type >, std::equal_to< state_type >, typename Config::template allocator_type< map_value_type > >
 
using partition_iterator = typename std::vector< map_type >::iterator
 
using partition_const_iterator = typename std::vector< map_type >::const_iterator
 
using partition_reverse_iterator = typename std::vector< map_type >::reverse_iterator
 
using partition_const_reverse_iterator = typename std::vector< map_type >::const_reverse_iterator
 

Private Attributes

Partitions< supports_partitioning< State, Context... > > partitions_
 

‍map of all states ever explored, mapping state to its info; partitioned by state partition id


 
heap_type regular_queue_
 

‍map of all states ever explored, mapping state to its info


 
heap_type beam_queue_
 
double least_path_cost = std::numeric_limits<double>::infinity()
 

‍the cost of the cheapest, complete path found yet; can be used for additional pruning


 
float weighting_factor_ = 1.f
 

‍the weighting factor for the heuistic value of a state


 

Friends

std::ostream & operator<< (std::ostream &out, const StateManager &SM)
 

Detailed Description

template<heuristic_search_state State, typename Expand, typename Heurisitc, bool HasRegularQueue, bool HasBeamQueue, typename Config, typename... Context>
struct m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >

Tracks states and their presence in queues.

Definition at line 101 of file HeuristicSearch.hpp.

Member Typedef Documentation

◆ expand_type

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
using m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::expand_type = Expand

Definition at line 106 of file HeuristicSearch.hpp.

◆ heap_type

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
using m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::heap_type = typename Config::template heap_type<pointer_type, typename Config::template compare<comparator> >
private

‍the type of heap to implement the priority queues

Definition at line 120 of file HeuristicSearch.hpp.

◆ map_type

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
using m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::map_type = std::unordered_map< state_type, StateInfo, std::hash<state_type>, std::equal_to<state_type>, typename Config::template allocator_type<map_value_type> >
private

Definition at line 166 of file HeuristicSearch.hpp.

◆ map_value_type

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
using m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::map_value_type = (new) DEF_COUNTER(duplicates) DEF_COUNTER(regular_to_beam) DEF_COUNTER(none_to_beam) DEF_COUNTER(discarded) DEF_COUNTER(cheaper) DEF_COUNTER(decrease_key) DEF_COUNTER(pruned_by_cost) public std::pair<const state_type, StateInfo>
private

Definition at line 165 of file HeuristicSearch.hpp.

◆ partition_const_iterator

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
using m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partition_const_iterator = typename std::vector<map_type>::const_iterator
private

Definition at line 175 of file HeuristicSearch.hpp.

◆ partition_const_reverse_iterator

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
using m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partition_const_reverse_iterator = typename std::vector<map_type>::const_reverse_iterator
private

Definition at line 177 of file HeuristicSearch.hpp.

◆ partition_iterator

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
using m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partition_iterator = typename std::vector<map_type>::iterator
private

Definition at line 174 of file HeuristicSearch.hpp.

◆ partition_reverse_iterator

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
using m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partition_reverse_iterator = typename std::vector<map_type>::reverse_iterator
private

Definition at line 176 of file HeuristicSearch.hpp.

◆ pointer_type

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
using m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::pointer_type = void*
private

‍type for a pointer to an entry in the map of states

Definition at line 116 of file HeuristicSearch.hpp.

◆ state_type

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
using m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::state_type = State

Definition at line 105 of file HeuristicSearch.hpp.

Constructor & Destructor Documentation

◆ StateManager() [1/3]

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::StateManager ( Context &...  context)
inline

Definition at line 270 of file HeuristicSearch.hpp.

◆ StateManager() [2/3]

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::StateManager ( const StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context > &  )
delete

◆ StateManager() [3/3]

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::StateManager ( StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context > &&  )
default

Member Function Documentation

◆ clear()

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
void m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::clear ( )
inline

◆ dump() [1/2]

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
void m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::dump ( ) const
inline

◆ dump() [2/2]

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
void m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::dump ( std::ostream &  out) const
inline

Definition at line 546 of file HeuristicSearch.hpp.

◆ end() [1/2]

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
map_type::iterator m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::end ( const state_type state,
Context &...  context 
)
inline

◆ end() [2/2]

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
map_type::const_iterator m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::end ( const state_type state,
Context &...  context 
) const
inline

◆ find() [1/2]

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
map_type::iterator m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::find ( const state_type state,
Context &...  context 
)
inline

◆ find() [2/2]

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
map_type::const_iterator m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::find ( const state_type state,
Context &...  context 
) const
inline

◆ is_beam_queue_empty()

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
bool m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::is_beam_queue_empty ( ) const
inline

◆ is_regular_queue_empty()

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
bool m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::is_regular_queue_empty ( ) const
inline

◆ num_states_in_beam_queue()

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
std::size_t m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::num_states_in_beam_queue ( ) const
inline

◆ num_states_in_regular_queue()

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
std::size_t m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::num_states_in_regular_queue ( ) const
inline

◆ num_states_seen()

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
std::size_t m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::num_states_seen ( ) const
inline

◆ operator=()

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
StateManager & m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::operator= ( StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context > &&  )
default

◆ partition() [1/2]

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
map_type & m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partition ( const state_type state,
Context &...  context 
)
inline

◆ partition() [2/2]

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
const map_type & m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partition ( const state_type state,
Context &...  context 
) const
inline

◆ partitions() [1/2]

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
range< partition_iterator > m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partitions ( )
inline

◆ partitions() [2/2]

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
range< partition_const_iterator > m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partitions ( ) const
inline

◆ partitions_begin() [1/2]

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
partition_iterator m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partitions_begin ( )
inline

◆ partitions_begin() [2/2]

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
partition_const_iterator m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partitions_begin ( ) const
inline

◆ partitions_cbegin()

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
partition_const_iterator m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partitions_cbegin ( ) const
inline

◆ partitions_cend()

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
partition_const_iterator m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partitions_cend ( ) const
inline

◆ partitions_crbegin()

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
partition_const_reverse_iterator m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partitions_crbegin ( ) const
inline

◆ partitions_crend()

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
partition_const_reverse_iterator m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partitions_crend ( ) const
inline

◆ partitions_end() [1/2]

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
partition_iterator m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partitions_end ( )
inline

◆ partitions_end() [2/2]

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
partition_const_iterator m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partitions_end ( ) const
inline

◆ partitions_rbegin() [1/2]

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
partition_reverse_iterator m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partitions_rbegin ( )
inline

◆ partitions_rbegin() [2/2]

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
partition_const_reverse_iterator m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partitions_rbegin ( ) const
inline

◆ partitions_rend() [1/2]

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
partition_reverse_iterator m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partitions_rend ( )
inline

◆ partitions_rend() [2/2]

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
partition_const_reverse_iterator m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partitions_rend ( ) const
inline

◆ pop()

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
std::pair< const state_type &, double > m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::pop ( )
inline

◆ print_counters()

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
void m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::print_counters ( std::ostream &  out) const
inline

Definition at line 520 of file HeuristicSearch.hpp.

References m::and, and m::X.

◆ push()

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
template<bool ToBeamQueue>
void m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::push ( state_type  state,
double  h,
Context &...  context 
)
inline

◆ push_beam_queue()

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
void m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::push_beam_queue ( state_type  state,
double  h,
Context &...  context 
)
inline

◆ push_regular_queue()

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
void m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::push_regular_queue ( state_type  state,
double  h,
Context &...  context 
)
inline

◆ queues_empty()

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
bool m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::queues_empty ( ) const
inline

◆ update_least_path_cost()

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
void m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::update_least_path_cost ( double  cost)
inline

◆ weighting_factor() [1/2]

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
float m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::weighting_factor ( ) const
inline

◆ weighting_factor() [2/2]

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
float m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::weighting_factor ( float  new_factor)
inline

Set the weighting factor for the heuristic value and returns the old value.

Definition at line 299 of file HeuristicSearch.hpp.

References M_insist, and m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::weighting_factor_.

Friends And Related Function Documentation

◆ operator<<

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
std::ostream & operator<< ( std::ostream &  out,
const StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context > &  SM 
)
friend

Definition at line 536 of file HeuristicSearch.hpp.

Field Documentation

◆ beam_queue_

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
heap_type m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::beam_queue_
private

◆ detect_duplicates

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
constexpr bool m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::detect_duplicates = true
staticconstexpr

◆ enable_cost_based_pruning

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
constexpr bool m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::enable_cost_based_pruning = Config::PerformCostBasedPruning
staticconstexpr

◆ has_beam_queue

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
constexpr bool m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::has_beam_queue = HasBeamQueue
staticconstexpr

Definition at line 108 of file HeuristicSearch.hpp.

◆ has_regular_queue

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
constexpr bool m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::has_regular_queue = HasRegularQueue
staticconstexpr

Definition at line 107 of file HeuristicSearch.hpp.

◆ least_path_cost

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
double m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::least_path_cost = std::numeric_limits<double>::infinity()
private

◆ partitions_

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
Partitions<supports_partitioning<State, Context...> > m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partitions_
private

‍map of all states ever explored, mapping state to its info; partitioned by state partition id

Definition at line 255 of file HeuristicSearch.hpp.

Referenced by m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::Partitions< true >::begin(), m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::Partitions< true >::cbegin(), m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::Partitions< true >::cend(), m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::Partitions< true >::clear(), m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::clear(), m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::Partitions< true >::crbegin(), m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::Partitions< true >::crend(), m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::Partitions< true >::end(), m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::num_states_seen(), m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::Partitions< true >::operator()(), m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partition(), m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partitions_begin(), m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partitions_cbegin(), m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partitions_cend(), m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partitions_crbegin(), m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partitions_crend(), m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partitions_end(), m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partitions_rbegin(), m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::partitions_rend(), m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::Partitions< true >::rbegin(), m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::Partitions< true >::rend(), m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::Partitions< true >::size(), and m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::Partitions< true >::~Partitions().

◆ regular_queue_

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
heap_type m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::regular_queue_
private

◆ use_weighted_search

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
constexpr bool m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::use_weighted_search = Config::PerformWeightedSearch
staticconstexpr

◆ weighting_factor_

template<heuristic_search_state State, typename Expand , typename Heurisitc , bool HasRegularQueue, bool HasBeamQueue, typename Config , typename... Context>
float m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::weighting_factor_ = 1.f
private

‍the weighting factor for the heuistic value of a state

Definition at line 267 of file HeuristicSearch.hpp.

Referenced by m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::weighting_factor().


The documentation for this struct was generated from the following file: