mutable
A Database System for Research and Fast Prototyping
Loading...
Searching...
No Matches
Data Structures | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes
m::pe::hs::search_states::Base< Actual > Struct Template Reference

A state in the search space. More...

#include <HeuristicSearchPlanEnumerator.hpp>

Inheritance diagram for m::pe::hs::search_states::Base< Actual >:
[legend]
Collaboration diagram for m::pe::hs::search_states::Base< Actual >:
[legend]

Data Structures

struct  state_counters_t
 

Public Types

using size_type = std::size_t
 
using actual_type = Actual
 

Public Member Functions

const Actual * parent () const
 
template<typename PlanTable >
bool is_bottom (const PlanTable &PT, const QueryGraph &G, const AdjacencyMatrix &M, const CostFunction &CF, const CardinalityEstimator &CE) const
 
template<typename PlanTable >
bool is_top (const PlanTable &PT, const QueryGraph &G, const AdjacencyMatrix &M, const CostFunction &CF, const CardinalityEstimator &CE) const
 
double g () const
 Returns the cost to reach this state from the initial state.
 
double decrease_g (const Actual *new_parent, double new_g) const
 Reduces the g value of the state.
 
bool operator== (const Base &other) const
 
bool operator!= (const Base &other) const
 
bool operator< (const Base &other) const
 
template<typename Callback , typename PlanTable >
void for_each_successor (Callback &&callback, PlanTable &PT, const QueryGraph &G, const AdjacencyMatrix &M, const CostFunction &CF, const CardinalityEstimator &CE) const
 Returns true iff this and other have the exact same Subproblems.
 
template<typename Callback >
void for_each_subproblem (Callback &&callback, const QueryGraph &G) const
 
M_LCOV_EXCL_START void dump (std::ostream &out) const
 
void dump () const
 
actual_typeactual ()
 
const actual_typeactual () const
 

Static Public Member Functions

static void RESET_STATE_COUNTERS ()
 
static unsigned NUM_STATES_GENERATED ()
 
static unsigned NUM_STATES_EXPANDED ()
 
static unsigned NUM_STATES_CONSTRUCTED ()
 
static unsigned NUM_STATES_DISPOSED ()
 
static void INCREMENT_NUM_STATES_GENERATED ()
 
static void INCREMENT_NUM_STATES_EXPANDED ()
 
static void INCREMENT_NUM_STATES_CONSTRUCTED ()
 
static void INCREMENT_NUM_STATES_DISPOSED ()
 
static state_counters_t STATE_COUNTERS ()
 
static state_counters_t STATE_COUNTERS (state_counters_t new_counters)
 

Private Attributes

friend CRTPBaseType< actual_type, TParams... >
 

Static Private Attributes

static state_counters_t state_counters_
 

Detailed Description

template<typename Actual>
struct m::pe::hs::search_states::Base< Actual >

A state in the search space.

A state consists of the accumulated costs of actions to reach this state from the from initial state and a desciption of the actual problem within the state. The problem is described as the sorted list of Subproblems yet to be joined.

Definition at line 80 of file HeuristicSearchPlanEnumerator.hpp.

Member Typedef Documentation

◆ actual_type

using m::crtp< Actual , Base , TParams >::actual_type = Actual
inherited

Definition at line 51 of file crtp.hpp.

◆ size_type

template<typename Actual >
using m::pe::hs::search_states::Base< Actual >::size_type = std::size_t

Definition at line 83 of file HeuristicSearchPlanEnumerator.hpp.

Member Function Documentation

◆ actual() [1/2]

actual_type & m::crtp< Actual , Base , TParams >::actual ( )
inlineinherited

Definition at line 52 of file crtp.hpp.

◆ actual() [2/2]

const actual_type & m::crtp< Actual , Base , TParams >::actual ( ) const
inlineinherited

Definition at line 53 of file crtp.hpp.

◆ decrease_g()

template<typename Actual >
double m::pe::hs::search_states::Base< Actual >::decrease_g ( const Actual *  new_parent,
double  new_g 
) const
inline

Reduces the g value of the state.

Definition at line 160 of file HeuristicSearchPlanEnumerator.hpp.

References m::crtp< Actual, Base >::actual().

◆ dump() [1/2]

template<typename Actual >
void m::pe::hs::search_states::Base< Actual >::dump ( ) const
inline

◆ dump() [2/2]

template<typename Actual >
M_LCOV_EXCL_START void m::pe::hs::search_states::Base< Actual >::dump ( std::ostream &  out) const
inline

◆ for_each_subproblem()

template<typename Actual >
template<typename Callback >
void m::pe::hs::search_states::Base< Actual >::for_each_subproblem ( Callback &&  callback,
const QueryGraph G 
) const
inline

◆ for_each_successor()

template<typename Actual >
template<typename Callback , typename PlanTable >
void m::pe::hs::search_states::Base< Actual >::for_each_successor ( Callback &&  callback,
PlanTable &  PT,
const QueryGraph G,
const AdjacencyMatrix M,
const CostFunction CF,
const CardinalityEstimator CE 
) const
inline

Returns true iff this and other have the exact same Subproblems.

Calls callback on every state reachable from this state by a single actions.

Definition at line 171 of file HeuristicSearchPlanEnumerator.hpp.

References m::crtp< Actual, Base >::actual().

◆ g()

template<typename Actual >
double m::pe::hs::search_states::Base< Actual >::g ( ) const
inline

Returns the cost to reach this state from the initial state.

Definition at line 155 of file HeuristicSearchPlanEnumerator.hpp.

References m::crtp< Actual, Base >::actual().

◆ INCREMENT_NUM_STATES_CONSTRUCTED()

template<typename Actual >
static void m::pe::hs::search_states::Base< Actual >::INCREMENT_NUM_STATES_CONSTRUCTED ( )
inlinestatic

◆ INCREMENT_NUM_STATES_DISPOSED()

template<typename Actual >
static void m::pe::hs::search_states::Base< Actual >::INCREMENT_NUM_STATES_DISPOSED ( )
inlinestatic

◆ INCREMENT_NUM_STATES_EXPANDED()

template<typename Actual >
static void m::pe::hs::search_states::Base< Actual >::INCREMENT_NUM_STATES_EXPANDED ( )
inlinestatic

◆ INCREMENT_NUM_STATES_GENERATED()

template<typename Actual >
static void m::pe::hs::search_states::Base< Actual >::INCREMENT_NUM_STATES_GENERATED ( )
inlinestatic

◆ is_bottom()

template<typename Actual >
template<typename PlanTable >
bool m::pe::hs::search_states::Base< Actual >::is_bottom ( const PlanTable &  PT,
const QueryGraph G,
const AdjacencyMatrix M,
const CostFunction CF,
const CardinalityEstimator CE 
) const
inline

◆ is_top()

template<typename Actual >
template<typename PlanTable >
bool m::pe::hs::search_states::Base< Actual >::is_top ( const PlanTable &  PT,
const QueryGraph G,
const AdjacencyMatrix M,
const CostFunction CF,
const CardinalityEstimator CE 
) const
inline

◆ NUM_STATES_CONSTRUCTED()

template<typename Actual >
static unsigned m::pe::hs::search_states::Base< Actual >::NUM_STATES_CONSTRUCTED ( )
inlinestatic

◆ NUM_STATES_DISPOSED()

template<typename Actual >
static unsigned m::pe::hs::search_states::Base< Actual >::NUM_STATES_DISPOSED ( )
inlinestatic

◆ NUM_STATES_EXPANDED()

template<typename Actual >
static unsigned m::pe::hs::search_states::Base< Actual >::NUM_STATES_EXPANDED ( )
inlinestatic

◆ NUM_STATES_GENERATED()

template<typename Actual >
static unsigned m::pe::hs::search_states::Base< Actual >::NUM_STATES_GENERATED ( )
inlinestatic

◆ operator!=()

template<typename Actual >
bool m::pe::hs::search_states::Base< Actual >::operator!= ( const Base< Actual > &  other) const
inline

◆ operator<()

template<typename Actual >
bool m::pe::hs::search_states::Base< Actual >::operator< ( const Base< Actual > &  other) const
inline

◆ operator==()

template<typename Actual >
bool m::pe::hs::search_states::Base< Actual >::operator== ( const Base< Actual > &  other) const
inline

◆ parent()

template<typename Actual >
const Actual * m::pe::hs::search_states::Base< Actual >::parent ( ) const
inline

◆ RESET_STATE_COUNTERS()

template<typename Actual >
static void m::pe::hs::search_states::Base< Actual >::RESET_STATE_COUNTERS ( )
inlinestatic

◆ STATE_COUNTERS() [1/2]

template<typename Actual >
static state_counters_t m::pe::hs::search_states::Base< Actual >::STATE_COUNTERS ( )
inlinestatic

◆ STATE_COUNTERS() [2/2]

template<typename Actual >
static state_counters_t m::pe::hs::search_states::Base< Actual >::STATE_COUNTERS ( state_counters_t  new_counters)
inlinestatic

Field Documentation

◆ CRTPBaseType< actual_type, TParams... >

friend m::crtp< Actual , Base , TParams >::Base < actual_type, TParams... >
privateinherited

Definition at line 57 of file crtp.hpp.

◆ state_counters_

template<typename Actual >
Base< Actual >::state_counters_t m::pe::hs::search_states::Base< Actual >::state_counters_
staticprivate

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