dlvhex
2.5.0
|
Function templates related to Common Ancestor Units (CAUs). More...
Data Structures | |
class | AncestryMarkingVisitor |
class | RelevanceMarkingVisitor |
Typedefs | |
typedef std::set< int > | Ancestry |
typedef boost::vector_property_map < Ancestry > | AncestryPropertyMap |
Store for each eval unit the ancestry starting from some join. | |
typedef boost::vector_property_map < bool > | JoinRelevancePropertyMap |
Functions | |
template<typename EvalGraphT > | |
void | findCAUs (std::set< typename EvalGraphT::EvalUnit > &caus, const EvalGraphT &eg, typename EvalGraphT::EvalUnit u, AncestryPropertyMap &apm) |
Finds CAUs of a unit in an evaluation graph. | |
template<typename EvalGraphT > | |
void | findCAUs (std::set< typename EvalGraphT::EvalUnit > &caus, const EvalGraphT &eg, typename EvalGraphT::EvalUnit u) |
Finds CAUs of a unit in an evaluation graph. | |
DLVHEX_EXPORT void | logAPM (const AncestryPropertyMap &apm) |
Logs a given AncestryPropertyMap. | |
template<typename EvalGraphT > | |
void | initJoinRelevance (JoinRelevancePropertyMap &jr, const EvalGraphT &eg) |
Stores for each unit whether it is relevant for joining. | |
template<typename EvalGraphT > | |
void | markJoinRelevance (JoinRelevancePropertyMap &jr, const EvalGraphT &eg, typename EvalGraphT::EvalUnit u, const std::set< typename EvalGraphT::EvalUnit > &caus, const AncestryPropertyMap &apm) |
Given the results of findCAUs(caus, eg, u), mark all units between u and elements of caus as relevant (true), others as irrelevant (false) (do this by going from caus along a DFS through the reversed graph, marking everything that has an ancestry as relevant). | |
DLVHEX_EXPORT void | logJRPM (const JoinRelevancePropertyMap &jr) |
Function templates related to Common Ancestor Units (CAUs).
typedef std::set<int> CAUAlgorithms::Ancestry |
Definition at line 50 of file CAUAlgorithms.h.
typedef boost::vector_property_map<Ancestry> CAUAlgorithms::AncestryPropertyMap |
Store for each eval unit the ancestry starting from some join.
ancestry is stored in terms of join order integers (if a unit is reachable from multiple join orders, the set contains multiple values).
Definition at line 56 of file CAUAlgorithms.h.
typedef boost::vector_property_map<bool> CAUAlgorithms::JoinRelevancePropertyMap |
Definition at line 93 of file CAUAlgorithms.h.
void CAUAlgorithms::findCAUs | ( | std::set< typename EvalGraphT::EvalUnit > & | caus, |
const EvalGraphT & | eg, | ||
typename EvalGraphT::EvalUnit | u, | ||
AncestryPropertyMap & | apm | ||
) |
Finds CAUs of a unit in an evaluation graph.
caus | Output of the CAUs of u . |
eg | EvaluationGraph. |
u | The unit for which we want to find the CAUs. |
apm | The ancestry map used for finding the CAUs (this is required for a subsequent call to markJoinRelevance and for debugging). |
Definition at line 197 of file CAUAlgorithms.h.
References LOG_VSCOPE.
Referenced by BOOST_FIXTURE_TEST_CASE(), OfflineModelBuilder< EvalGraphT >::buildIModels(), and findCAUs().
void CAUAlgorithms::findCAUs | ( | std::set< typename EvalGraphT::EvalUnit > & | caus, |
const EvalGraphT & | eg, | ||
typename EvalGraphT::EvalUnit | u | ||
) |
Finds CAUs of a unit in an evaluation graph.
Uses an internal AncestryPropertyMap.
caus | Output of the CAUs of u . |
eg | EvaluationGraph. |
u | The unit for which we want to find the CAUs. |
Definition at line 77 of file CAUAlgorithms.h.
References findCAUs().
void CAUAlgorithms::initJoinRelevance | ( | JoinRelevancePropertyMap & | jr, |
const EvalGraphT & | eg | ||
) |
Stores for each unit whether it is relevant for joining.
If it is relevant, offline model building ensures to use a common omodel otherwise, offline model building just iterates over all omodels at that unit.
jrJoinRelevancePropertyMap. | |
u | EvalUnit. |
Definition at line 252 of file CAUAlgorithms.h.
Referenced by OfflineModelBuilder< EvalGraphT >::buildIModels(), OfflineModelBuilder< EvalGraphT >::buildOModels(), and markJoinRelevance().
void CAUAlgorithms::logAPM | ( | const AncestryPropertyMap & | apm | ) |
Logs a given AncestryPropertyMap.
apm | AncestryPropertyMap to log. |
Definition at line 43 of file CAUAlgorithms.cpp.
References DBGLOG, DBGLOG_SCOPE, and printset().
Referenced by BOOST_FIXTURE_TEST_CASE(), and OfflineModelBuilder< EvalGraphT >::buildIModels().
void CAUAlgorithms::logJRPM | ( | const JoinRelevancePropertyMap & | jr | ) |
Definition at line 56 of file CAUAlgorithms.cpp.
References DBGLOG, and DBGLOG_SCOPE.
Referenced by OfflineModelBuilder< EvalGraphT >::buildIModels(), and markJoinRelevance().
void CAUAlgorithms::markJoinRelevance | ( | JoinRelevancePropertyMap & | jr, |
const EvalGraphT & | eg, | ||
typename EvalGraphT::EvalUnit | u, | ||
const std::set< typename EvalGraphT::EvalUnit > & | caus, | ||
const AncestryPropertyMap & | apm | ||
) |
Given the results of findCAUs(caus, eg, u), mark all units between u and elements of caus as relevant (true), others as irrelevant (false) (do this by going from caus along a DFS through the reversed graph, marking everything that has an ancestry as relevant).
jr | JoinRelevancePropertyMap. |
eg | EvaluationGraph. |
u | EvalUnit. |
caus | CAUs of u . |
AncestryPropertyMap | AncestryPropertyMap. |
Definition at line 271 of file CAUAlgorithms.h.
References DBGLOG, initJoinRelevance(), and logJRPM().
Referenced by BOOST_FIXTURE_TEST_CASE(), and OfflineModelBuilder< EvalGraphT >::buildIModels().