![]() |
mutable
A Database System for Research and Fast Prototyping
|
#include <HeuristicSearchPlanEnumerator.hpp>
Public Types | |
using | base_type = Base< SubproblemsArray > |
using | allocator_type = boost::container::node_allocator< Subproblem > |
using | size_type = typename base_type::size_type |
using | iterator = Subproblem * |
using | const_iterator = const Subproblem * |
using | actual_type = ConcreteType |
Public Member Functions | |
SubproblemsArray ()=default | |
template<typename PlanTable > | |
SubproblemsArray (const PlanTable &, const QueryGraph &G, const AdjacencyMatrix &, const CostFunction &, const CardinalityEstimator &, const SubproblemsArray *parent, double g, size_type size, Subproblem marked, Subproblem *subproblems) | |
Creates a state with cost g and given subproblems . | |
SubproblemsArray (const SubproblemsArray &)=delete | |
Copy c'tor. | |
template<typename PlanTable > | |
SubproblemsArray (const SubproblemsArray &other, const PlanTable &, const QueryGraph &, const AdjacencyMatrix &, const CostFunction &, const CardinalityEstimator &) | |
SubproblemsArray (SubproblemsArray &&other) | |
Move c'tor. | |
SubproblemsArray & | operator= (SubproblemsArray other) |
Assignment. | |
~SubproblemsArray () | |
D'tor. | |
const SubproblemsArray * | parent () const |
template<typename PlanTable > | |
bool | is_bottom (const PlanTable &, const QueryGraph &G, const AdjacencyMatrix &, const CostFunction &, const CardinalityEstimator &) const |
template<typename PlanTable > | |
bool | is_top (const PlanTable &, const QueryGraph &, const AdjacencyMatrix &, const CostFunction &, const CardinalityEstimator &) const |
double | g () const |
Subproblem | marked () const |
Subproblem | mark (const Subproblem new_marked) |
void | decrease_g (const SubproblemsArray *new_parent, double new_g) const |
size_type | size () 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 |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
template<typename Callback > | |
void | for_each_subproblem (Callback &&callback, const QueryGraph &) const |
bool | operator== (const SubproblemsArray &other) const |
Returns true iff this and other have the exact same Subproblem s. | |
bool | operator!= (const SubproblemsArray &other) const |
bool | operator< (const SubproblemsArray &other) const |
void | dump (std::ostream &out) const |
void | dump () const |
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 SubproblemsArray | Bottom (const PlanTable &PT, const QueryGraph &G, const AdjacencyMatrix &M, const CostFunction &CF, const CardinalityEstimator &CE) |
template<typename PlanTable > | |
static SubproblemsArray | Top (const PlanTable &PT, const QueryGraph &G, const AdjacencyMatrix &M, const CostFunction &CF, const CardinalityEstimator &CE) |
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 | |
const SubproblemsArray * | parent_ = nullptr |
double | g_ |
| |
size_type | size_ = 0 |
| |
Subproblem | marked_ |
| |
Subproblem * | subproblems_ = nullptr |
| |
friend | CRTPBaseType< actual_type, TParams... > |
Static Private Attributes | |
static allocator_type | allocator_ |
| |
static state_counters_t | state_counters_ |
Friends | |
void | swap (SubproblemsArray &first, SubproblemsArray &second) |
M_LCOV_EXCL_START friend std::ostream & | operator<< (std::ostream &out, const SubproblemsArray &S) |
Definition at line 196 of file HeuristicSearchPlanEnumerator.hpp.
|
inherited |
using m::pe::hs::search_states::SubproblemsArray::allocator_type = boost::container::node_allocator<Subproblem> |
Definition at line 199 of file HeuristicSearchPlanEnumerator.hpp.
Definition at line 198 of file HeuristicSearchPlanEnumerator.hpp.
Definition at line 202 of file HeuristicSearchPlanEnumerator.hpp.
Definition at line 201 of file HeuristicSearchPlanEnumerator.hpp.
Definition at line 200 of file HeuristicSearchPlanEnumerator.hpp.
|
default |
|
inline |
Creates a state with cost g
and given subproblems
.
Definition at line 238 of file HeuristicSearchPlanEnumerator.hpp.
References begin(), end(), g(), m::pe::hs::search_states::Base< SubproblemsArray >::INCREMENT_NUM_STATES_CONSTRUCTED(), M_insist, m::QueryGraph::num_sources(), parent_, size(), and subproblems_.
|
delete |
Copy c'tor.
|
inline |
Definition at line 258 of file HeuristicSearchPlanEnumerator.hpp.
References begin(), m::SmallBitset::begin(), end(), m::pe::hs::search_states::Base< SubproblemsArray >::INCREMENT_NUM_STATES_CONSTRUCTED(), M_insist, and subproblems_.
|
inline |
|
inline |
D'tor.
Definition at line 276 of file HeuristicSearchPlanEnumerator.hpp.
References allocator_, m::pe::hs::search_states::Base< SubproblemsArray >::INCREMENT_NUM_STATES_DISPOSED(), size_, and subproblems_.
|
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 365 of file HeuristicSearchPlanEnumerator.hpp.
References subproblems_.
Referenced by cbegin(), end(), and SubproblemsArray().
|
inline |
Definition at line 367 of file HeuristicSearchPlanEnumerator.hpp.
References subproblems_.
|
inlinestatic |
Definition at line 284 of file HeuristicSearchPlanEnumerator.hpp.
References allocator_, m::QueryGraph::num_sources(), m::SmallBitset::Singleton(), and SubproblemsArray().
|
inline |
Definition at line 369 of file HeuristicSearchPlanEnumerator.hpp.
References begin().
Referenced by m::pe::hs::expansions::BottomUpComplete::operator()(), m::pe::hs::expansions::TopDownComplete::operator()(), operator<(), and operator==().
|
inline |
Definition at line 370 of file HeuristicSearchPlanEnumerator.hpp.
References end().
Referenced by m::pe::hs::expansions::BottomUpComplete::operator()(), m::pe::hs::expansions::TopDownComplete::operator()(), operator<(), and operator==().
|
inline |
|
inline |
Definition at line 410 of file HeuristicSearchPlanEnumerator.hpp.
References dump().
Referenced by dump().
|
inline |
Definition at line 409 of file HeuristicSearchPlanEnumerator.hpp.
|
inline |
Definition at line 366 of file HeuristicSearchPlanEnumerator.hpp.
References begin(), and size().
Referenced by cend(), and SubproblemsArray().
|
inline |
Definition at line 368 of file HeuristicSearchPlanEnumerator.hpp.
|
inline |
Definition at line 373 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 335 of file HeuristicSearchPlanEnumerator.hpp.
References g_.
Referenced by decrease_g(), m::pe::hs::expansions::BottomUpComplete::operator()(), m::pe::hs::expansions::TopDownComplete::operator()(), and SubproblemsArray().
|
inlinestatic |
returns a reference to the class-wide allocator
Definition at line 210 of file HeuristicSearchPlanEnumerator.hpp.
References allocator_.
Referenced by m::pe::hs::expansions::BottomUpComplete::operator()(), and m::pe::hs::expansions::TopDownComplete::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.
|
inline |
Definition at line 322 of file HeuristicSearchPlanEnumerator.hpp.
References m::QueryGraph::num_sources(), and size().
|
inline |
Definition at line 329 of file HeuristicSearchPlanEnumerator.hpp.
References size().
|
inline |
Definition at line 337 of file HeuristicSearchPlanEnumerator.hpp.
References marked_.
|
inline |
Definition at line 336 of file HeuristicSearchPlanEnumerator.hpp.
References marked_.
Referenced by m::pe::hs::expansions::BottomUpComplete::operator()().
|
inlinestatic |
Definition at line 349 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 393 of file HeuristicSearchPlanEnumerator.hpp.
References operator==().
|
inlineinherited |
Definition at line 166 of file HeuristicSearchPlanEnumerator.hpp.
|
inline |
Definition at line 395 of file HeuristicSearchPlanEnumerator.hpp.
|
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 381 of file HeuristicSearchPlanEnumerator.hpp.
References cbegin(), cend(), M_insist, and size().
Referenced by operator!=().
|
inline |
Definition at line 346 of file HeuristicSearchPlanEnumerator.hpp.
References M_insist, size_, and subproblems_.
|
inline |
Definition at line 319 of file HeuristicSearchPlanEnumerator.hpp.
References parent_.
|
inline |
Definition at line 356 of file HeuristicSearchPlanEnumerator.hpp.
|
inlinestaticinherited |
Definition at line 106 of file HeuristicSearchPlanEnumerator.hpp.
|
inline |
Definition at line 345 of file HeuristicSearchPlanEnumerator.hpp.
References size_.
Referenced by end(), is_bottom(), is_top(), m::pe::hs::expansions::BottomUpComplete::operator()(), m::pe::hs::expansions::TopDownComplete::operator()(), operator==(), partition_id(), and SubproblemsArray().
|
inlinestaticinherited |
Definition at line 117 of file HeuristicSearchPlanEnumerator.hpp.
|
inlinestaticinherited |
Definition at line 118 of file HeuristicSearchPlanEnumerator.hpp.
|
inlinestatic |
Definition at line 301 of file HeuristicSearchPlanEnumerator.hpp.
References m::SmallBitset::All(), allocator_, m::QueryGraph::num_sources(), and SubproblemsArray().
|
friend |
Definition at line 400 of file HeuristicSearchPlanEnumerator.hpp.
|
friend |
Definition at line 225 of file HeuristicSearchPlanEnumerator.hpp.
Referenced by operator=(), and SubproblemsArray().
|
staticprivate |
class-wide allocator, used by all instances
Definition at line 206 of file HeuristicSearchPlanEnumerator.hpp.
Referenced by Bottom(), get_allocator(), Top(), and ~SubproblemsArray().
|
privateinherited |
|
mutableprivate |
the cost to reach this state from the initial state
Definition at line 215 of file HeuristicSearchPlanEnumerator.hpp.
Referenced by decrease_g(), and g().
|
private |
marked subproblem, used to avoid redundant paths
Definition at line 219 of file HeuristicSearchPlanEnumerator.hpp.
|
mutableprivate |
Definition at line 213 of file HeuristicSearchPlanEnumerator.hpp.
Referenced by decrease_g(), parent(), and SubproblemsArray().
|
private |
number of subproblems in this state
Definition at line 217 of file HeuristicSearchPlanEnumerator.hpp.
Referenced by operator[](), size(), and ~SubproblemsArray().
|
staticprivateinherited |
Definition at line 103 of file HeuristicSearchPlanEnumerator.hpp.
|
private |
array of subproblems
Definition at line 221 of file HeuristicSearchPlanEnumerator.hpp.
Referenced by begin(), operator[](), SubproblemsArray(), and ~SubproblemsArray().