![]() |
mutable
A Database System for Research and Fast Prototyping
|
#include <HeuristicSearchPlanEnumerator.hpp>
Data Structures | |
struct | the_iterator |
Public Types | |
using | base_type = Base< SubproblemTableBottomUp > |
using | allocator_type = boost::container::node_allocator< Subproblem > |
using | size_type = typename base_type::size_type |
using | iterator = the_iterator< false > |
using | const_iterator = the_iterator< true > |
using | actual_type = ConcreteType |
Public Member Functions | |
SubproblemTableBottomUp ()=default | |
template<typename PlanTable > | |
SubproblemTableBottomUp (const PlanTable &, const QueryGraph &G, const AdjacencyMatrix &, const CostFunction &, const CardinalityEstimator &, double g, size_type size, Subproblem marker, Subproblem *table) | |
Creates a state with cost g and given table . | |
template<typename PlanTable > | |
SubproblemTableBottomUp (const PlanTable &PT, const QueryGraph &G, const AdjacencyMatrix &M, const CostFunction &CF, const CardinalityEstimator &CE) | |
Creates an initial state. | |
SubproblemTableBottomUp (const SubproblemTableBottomUp &)=delete | |
Copy c'tor. | |
template<typename PlanTable > | |
SubproblemTableBottomUp (const SubproblemTableBottomUp &other, const PlanTable &, const QueryGraph &G, const AdjacencyMatrix &, const CostFunction &, const CardinalityEstimator &) | |
SubproblemTableBottomUp (SubproblemTableBottomUp &&other) | |
Move c'tor. | |
SubproblemTableBottomUp & | operator= (SubproblemTableBottomUp other) |
Assignment. | |
~SubproblemTableBottomUp () | |
D'tor. | |
template<typename PlanTable > | |
bool | is_goal (const PlanTable &, const QueryGraph &, const AdjacencyMatrix &, const CostFunction &, const CardinalityEstimator &) const |
double | g () const |
Subproblem | marker () const |
void | decrease_g (double new_g) const |
size_type | size () const |
Subproblem & | operator[] (std::size_t idx) |
const Subproblem & | operator[] (std::size_t idx) const |
template<typename PlanTable > | |
unsigned | partition_id (const PlanTable &, const QueryGraph &, const AdjacencyMatrix &, const CostFunction &, const CardinalityEstimator &) const |
template<typename Callback > | |
void | for_each_subproblem (Callback &&callback, const QueryGraph &) const |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
bool | operator== (const SubproblemTableBottomUp &other) const |
Returns true iff this and other have the exact same Subproblem s. | |
bool | operator!= (const SubproblemTableBottomUp &other) const |
bool | operator< (const SubproblemTableBottomUp &) const |
void | dump (std::ostream &out) const |
void | dump () const |
const SubproblemTableBottomUp * | parent () const |
bool | is_bottom (const PlanTable &PT, const QueryGraph &G, const AdjacencyMatrix &M, const CostFunction &CF, const CardinalityEstimator &CE) const |
bool | is_top (const PlanTable &PT, const QueryGraph &G, const AdjacencyMatrix &M, const CostFunction &CF, const CardinalityEstimator &CE) const |
double | decrease_g (const SubproblemTableBottomUp *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 |
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 Subproblem s. | |
actual_type & | actual () |
const actual_type & | actual () const |
Static Public Member Functions | |
static allocator_type & | get_allocator () |
| |
template<typename PlanTable > | |
static unsigned | num_partitions (const PlanTable &, const QueryGraph &G, const AdjacencyMatrix &, const CostFunction &, const CardinalityEstimator &) |
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 | |
double | g_ |
| |
size_type | size_ = 0 |
| |
Subproblem | marker_ |
| |
Subproblem * | table_ = nullptr |
| |
friend | CRTPBaseType< actual_type, TParams... > |
Static Private Attributes | |
static allocator_type | allocator_ |
| |
static state_counters_t | state_counters_ |
Friends | |
void | swap (SubproblemTableBottomUp &first, SubproblemTableBottomUp &second) |
M_LCOV_EXCL_START friend std::ostream & | operator<< (std::ostream &out, const SubproblemTableBottomUp &S) |
Definition at line 415 of file HeuristicSearchPlanEnumerator.hpp.
|
inherited |
using m::pe::hs::search_states::SubproblemTableBottomUp::allocator_type = boost::container::node_allocator<Subproblem> |
Definition at line 418 of file HeuristicSearchPlanEnumerator.hpp.
Definition at line 417 of file HeuristicSearchPlanEnumerator.hpp.
Definition at line 481 of file HeuristicSearchPlanEnumerator.hpp.
Definition at line 480 of file HeuristicSearchPlanEnumerator.hpp.
Definition at line 419 of file HeuristicSearchPlanEnumerator.hpp.
|
default |
|
inline |
Creates a state with cost g
and given table
.
Definition at line 498 of file HeuristicSearchPlanEnumerator.hpp.
References m::pe::hs::search_states::Base< SubproblemTableBottomUp >::INCREMENT_NUM_STATES_CONSTRUCTED(), M_insist, m::QueryGraph::num_sources(), and size().
|
inline |
Creates an initial state.
Definition at line 512 of file HeuristicSearchPlanEnumerator.hpp.
References m::QueryGraph::num_sources(), m::SmallBitset::Singleton(), and table_.
|
delete |
Copy c'tor.
|
inline |
Definition at line 524 of file HeuristicSearchPlanEnumerator.hpp.
References m::pe::hs::search_states::Base< SubproblemTableBottomUp >::INCREMENT_NUM_STATES_CONSTRUCTED(), M_insist, m::QueryGraph::num_sources(), and table_.
|
inline |
|
inline |
D'tor.
Definition at line 542 of file HeuristicSearchPlanEnumerator.hpp.
References allocator_, m::pe::hs::search_states::Base< SubproblemTableBottomUp >::INCREMENT_NUM_STATES_DISPOSED(), size_, and table_.
|
inlineinherited |
Definition at line 52 of file crtp.hpp.
Referenced by m::pe::hs::search_states::Base< Actual >::operator!=(), m::pe::hs::search_states::Base< Actual >::operator<(), m::pe::hs::search_states::Base< Actual >::operator==(), and m::PlanTableBase< Actual >::operator==().
|
inlineinherited |
|
inline |
Definition at line 585 of file HeuristicSearchPlanEnumerator.hpp.
Referenced by cbegin().
|
inline |
Definition at line 587 of file HeuristicSearchPlanEnumerator.hpp.
|
inline |
Definition at line 589 of file HeuristicSearchPlanEnumerator.hpp.
References begin().
|
inline |
Definition at line 590 of file HeuristicSearchPlanEnumerator.hpp.
References end().
|
inlineinherited |
Reduces the g value of the state.
Definition at line 160 of file HeuristicSearchPlanEnumerator.hpp.
|
inline |
Definition at line 557 of file HeuristicSearchPlanEnumerator.hpp.
|
inline |
Definition at line 633 of file HeuristicSearchPlanEnumerator.hpp.
References dump().
Referenced by dump().
|
inline |
Definition at line 632 of file HeuristicSearchPlanEnumerator.hpp.
|
inline |
Definition at line 586 of file HeuristicSearchPlanEnumerator.hpp.
Referenced by cend().
|
inline |
Definition at line 588 of file HeuristicSearchPlanEnumerator.hpp.
|
inline |
Definition at line 578 of file HeuristicSearchPlanEnumerator.hpp.
|
inlineinherited |
Returns true
iff this
and other
have the exact same Subproblem
s.
Calls callback
on every state reachable from this state by a single actions.
Definition at line 171 of file HeuristicSearchPlanEnumerator.hpp.
|
inline |
Definition at line 555 of file HeuristicSearchPlanEnumerator.hpp.
References g_.
Referenced by m::pe::hs::expansions::BottomUpComplete::operator()().
|
inlinestatic |
returns a reference to the class-wide allocator
Definition at line 427 of file HeuristicSearchPlanEnumerator.hpp.
References allocator_.
Referenced by m::pe::hs::expansions::BottomUpComplete::operator()().
|
inlinestaticinherited |
Definition at line 114 of file HeuristicSearchPlanEnumerator.hpp.
|
inlinestaticinherited |
Definition at line 115 of file HeuristicSearchPlanEnumerator.hpp.
|
inlinestaticinherited |
Definition at line 113 of file HeuristicSearchPlanEnumerator.hpp.
|
inlinestaticinherited |
Definition at line 112 of file HeuristicSearchPlanEnumerator.hpp.
|
inlineinherited |
Definition at line 141 of file HeuristicSearchPlanEnumerator.hpp.
|
inline |
Definition at line 550 of file HeuristicSearchPlanEnumerator.hpp.
References size().
|
inlineinherited |
Definition at line 148 of file HeuristicSearchPlanEnumerator.hpp.
|
inline |
Definition at line 556 of file HeuristicSearchPlanEnumerator.hpp.
References marker_.
Referenced by m::pe::hs::expansions::BottomUpComplete::operator()().
|
inlinestatic |
Definition at line 563 of file HeuristicSearchPlanEnumerator.hpp.
References m::QueryGraph::num_sources().
|
inlinestaticinherited |
Definition at line 109 of file HeuristicSearchPlanEnumerator.hpp.
|
inlinestaticinherited |
Definition at line 110 of file HeuristicSearchPlanEnumerator.hpp.
|
inlinestaticinherited |
Definition at line 108 of file HeuristicSearchPlanEnumerator.hpp.
|
inlinestaticinherited |
Definition at line 107 of file HeuristicSearchPlanEnumerator.hpp.
|
inlineinherited |
Definition at line 165 of file HeuristicSearchPlanEnumerator.hpp.
|
inline |
Definition at line 616 of file HeuristicSearchPlanEnumerator.hpp.
References operator==().
|
inlineinherited |
Definition at line 166 of file HeuristicSearchPlanEnumerator.hpp.
|
inline |
Definition at line 618 of file HeuristicSearchPlanEnumerator.hpp.
References M_unreachable.
|
inline |
|
inlineinherited |
Definition at line 164 of file HeuristicSearchPlanEnumerator.hpp.
|
inline |
Returns true
iff this
and other
have the exact same Subproblem
s.
Definition at line 595 of file HeuristicSearchPlanEnumerator.hpp.
References M_insist, size(), m::T(), and m::X.
Referenced by operator!=().
|
inline |
Definition at line 559 of file HeuristicSearchPlanEnumerator.hpp.
|
inline |
Definition at line 560 of file HeuristicSearchPlanEnumerator.hpp.
References table_.
|
inlineinherited |
Definition at line 138 of file HeuristicSearchPlanEnumerator.hpp.
|
inline |
Definition at line 570 of file HeuristicSearchPlanEnumerator.hpp.
|
inlinestaticinherited |
Definition at line 106 of file HeuristicSearchPlanEnumerator.hpp.
|
inline |
Definition at line 558 of file HeuristicSearchPlanEnumerator.hpp.
References size_.
Referenced by is_goal(), m::pe::hs::expansions::BottomUpComplete::operator()(), operator==(), partition_id(), and SubproblemTableBottomUp().
|
inlinestaticinherited |
Definition at line 117 of file HeuristicSearchPlanEnumerator.hpp.
|
inlinestaticinherited |
Definition at line 118 of file HeuristicSearchPlanEnumerator.hpp.
|
friend |
Definition at line 623 of file HeuristicSearchPlanEnumerator.hpp.
|
friend |
Definition at line 486 of file HeuristicSearchPlanEnumerator.hpp.
Referenced by operator=(), and SubproblemTableBottomUp().
|
staticprivate |
class-wide allocator, used by all instances
Definition at line 423 of file HeuristicSearchPlanEnumerator.hpp.
Referenced by get_allocator(), and ~SubproblemTableBottomUp().
|
privateinherited |
|
mutableprivate |
the cost to reach this state from the initial state
Definition at line 431 of file HeuristicSearchPlanEnumerator.hpp.
Referenced by decrease_g(), and g().
|
private |
the last formed subproblem
Definition at line 435 of file HeuristicSearchPlanEnumerator.hpp.
Referenced by marker().
|
private |
number of subproblems in this state
Definition at line 433 of file HeuristicSearchPlanEnumerator.hpp.
Referenced by begin(), end(), operator[](), size(), and ~SubproblemTableBottomUp().
|
staticprivateinherited |
Definition at line 103 of file HeuristicSearchPlanEnumerator.hpp.
|
private |
array of subproblems
Definition at line 437 of file HeuristicSearchPlanEnumerator.hpp.
Referenced by begin(), end(), operator[](), SubproblemTableBottomUp(), and ~SubproblemTableBottomUp().