dlvhex  2.5.0
OfflineModelBuilder< EvalGraphT > Class Template Reference

Template for offline model building of a ModelGraph based on an EvalGraph. More...

#include <include/dlvhex2/OfflineModelBuilder.h>

Inheritance diagram for OfflineModelBuilder< EvalGraphT >:
Collaboration diagram for OfflineModelBuilder< EvalGraphT >:

Data Structures

struct  OfflineModelBuildingProperties
 Properties of offline model building. More...

Public Types

typedef OfflineModelBuilder
< EvalGraphT > 
Self
typedef Base::EvalUnit EvalUnit
typedef Base::EvalUnitDep EvalUnitDep
typedef
Base::EvalUnitPropertyBundle 
EvalUnitPropertyBundle
typedef Base::MyModelGraph MyModelGraph
typedef Base::Model Model
typedef Base::ModelPropertyBundle ModelPropertyBundle
typedef Base::OptionalModel OptionalModel
typedef MyModelGraph::ModelList ModelList
typedef ModelList::const_iterator ModelListIterator
typedef boost::optional
< ModelListIterator
OptionalModelListIterator

Public Member Functions

 OfflineModelBuilder (ModelBuilderConfig< EvalGraphT > &cfg)
 Constructor.
virtual ~OfflineModelBuilder ()
 Destructor.
EvalGraphT & getEvalGraph ()
 Returns the internal evaluation graph.
MyModelGraphgetModelGraph ()
 Returns the internal model graph.
void printEvalGraphModelGraph (std::ostream &o)
 Prints both the evaluation and the model graph for debugging purposes.
void printModelBuildingPropertyMap (std::ostream &o)
 Prints the model building properties for debugging purposes.
virtual unsigned buildIModels (EvalUnit u)
 Builds the input models at the given.
virtual unsigned buildOModels (EvalUnit u)
 Builds the output models at the given.
virtual unsigned buildIModelsRecursively (EvalUnit u)
virtual unsigned buildOModelsRecursively (EvalUnit u)

Protected Types

typedef OnlineModelBuilder
< EvalGraphT > 
Base
typedef
boost::vector_property_map
< OfflineModelBuildingProperties
OfflineModelBuildingPropertyMap

Protected Member Functions

virtual OptionalModel getNextIModel (EvalUnit u)
 Get next input model (projected if projection is configured) at e given unit.

Protected Attributes

OfflineModelBuildingPropertyMap offmbp
 Properties of models.
boost::optional
< CAUAlgorithms::JoinRelevancePropertyMap
currentjrp
 For each call we need this storage, this is not threadsafe! (but the rest of model building is unlikely to be threadsafe as well).

Detailed Description

template<typename EvalGraphT>
class OfflineModelBuilder< EvalGraphT >

Template for offline model building of a ModelGraph based on an EvalGraph.

Definition at line 45 of file OfflineModelBuilder.h.


Member Typedef Documentation

template<typename EvalGraphT>
typedef OnlineModelBuilder<EvalGraphT> OfflineModelBuilder< EvalGraphT >::Base [protected]

Reimplemented from OnlineModelBuilder< EvalGraphT >.

Definition at line 50 of file OfflineModelBuilder.h.

template<typename EvalGraphT>
typedef Base::EvalUnit OfflineModelBuilder< EvalGraphT >::EvalUnit

Reimplemented from OnlineModelBuilder< EvalGraphT >.

Definition at line 55 of file OfflineModelBuilder.h.

template<typename EvalGraphT>
typedef Base::EvalUnitDep OfflineModelBuilder< EvalGraphT >::EvalUnitDep

Reimplemented from OnlineModelBuilder< EvalGraphT >.

Definition at line 56 of file OfflineModelBuilder.h.

template<typename EvalGraphT>
typedef Base::EvalUnitPropertyBundle OfflineModelBuilder< EvalGraphT >::EvalUnitPropertyBundle

Reimplemented from OnlineModelBuilder< EvalGraphT >.

Definition at line 57 of file OfflineModelBuilder.h.

template<typename EvalGraphT>
typedef Base::Model OfflineModelBuilder< EvalGraphT >::Model

Reimplemented from OnlineModelBuilder< EvalGraphT >.

Definition at line 59 of file OfflineModelBuilder.h.

template<typename EvalGraphT>
typedef MyModelGraph::ModelList OfflineModelBuilder< EvalGraphT >::ModelList

Reimplemented from OnlineModelBuilder< EvalGraphT >.

Definition at line 62 of file OfflineModelBuilder.h.

template<typename EvalGraphT>
typedef ModelList::const_iterator OfflineModelBuilder< EvalGraphT >::ModelListIterator

Definition at line 63 of file OfflineModelBuilder.h.

template<typename EvalGraphT>
typedef Base::ModelPropertyBundle OfflineModelBuilder< EvalGraphT >::ModelPropertyBundle

Reimplemented from OnlineModelBuilder< EvalGraphT >.

Definition at line 60 of file OfflineModelBuilder.h.

template<typename EvalGraphT>
typedef Base::MyModelGraph OfflineModelBuilder< EvalGraphT >::MyModelGraph

Reimplemented from OnlineModelBuilder< EvalGraphT >.

Definition at line 58 of file OfflineModelBuilder.h.

template<typename EvalGraphT>
typedef boost::vector_property_map<OfflineModelBuildingProperties> OfflineModelBuilder< EvalGraphT >::OfflineModelBuildingPropertyMap [protected]

Definition at line 87 of file OfflineModelBuilder.h.

template<typename EvalGraphT>
typedef Base::OptionalModel OfflineModelBuilder< EvalGraphT >::OptionalModel

Reimplemented from OnlineModelBuilder< EvalGraphT >.

Definition at line 61 of file OfflineModelBuilder.h.

template<typename EvalGraphT>
typedef boost::optional<ModelListIterator> OfflineModelBuilder< EvalGraphT >::OptionalModelListIterator

Reimplemented from OnlineModelBuilder< EvalGraphT >.

Definition at line 64 of file OfflineModelBuilder.h.

template<typename EvalGraphT>
typedef OfflineModelBuilder<EvalGraphT> OfflineModelBuilder< EvalGraphT >::Self

Reimplemented from OnlineModelBuilder< EvalGraphT >.

Definition at line 53 of file OfflineModelBuilder.h.


Constructor & Destructor Documentation

template<typename EvalGraphT>
OfflineModelBuilder< EvalGraphT >::OfflineModelBuilder ( ModelBuilderConfig< EvalGraphT > &  cfg) [inline]
template<typename EvalGraphT>
virtual OfflineModelBuilder< EvalGraphT >::~OfflineModelBuilder ( ) [inline, virtual]

Destructor.

Definition at line 110 of file OfflineModelBuilder.h.


Member Function Documentation

template<typename EvalGraphT>
unsigned OfflineModelBuilder< EvalGraphT >::buildIModels ( EvalUnit  u) [virtual]

Builds the input models at the given.

Parameters:
uUnit whose input models are to be computed.

Definition at line 135 of file OfflineModelBuilder.h.

References DBGLOG, CAUAlgorithms::findCAUs(), CAUAlgorithms::initJoinRelevance(), LOG, LOG_VSCOPE, CAUAlgorithms::logAPM(), CAUAlgorithms::logJRPM(), and CAUAlgorithms::markJoinRelevance().

template<typename EvalGraphT >
unsigned OfflineModelBuilder< EvalGraphT >::buildIModelsRecursively ( EvalUnit  u) [virtual]

Definition at line 254 of file OfflineModelBuilder.h.

References DBGLOG, LOG, LOG_VSCOPE, MT_IN, and printptr().

Referenced by main().

template<typename EvalGraphT >
unsigned OfflineModelBuilder< EvalGraphT >::buildOModels ( EvalUnit  u) [virtual]

Builds the output models at the given.

Parameters:
uUnit whose output models are to be computed.

Definition at line 218 of file OfflineModelBuilder.h.

References DBGLOG, CAUAlgorithms::initJoinRelevance(), LOG, and LOG_VSCOPE.

template<typename EvalGraphT >
unsigned OfflineModelBuilder< EvalGraphT >::buildOModelsRecursively ( EvalUnit  u) [virtual]

Definition at line 292 of file OfflineModelBuilder.h.

References DBGLOG, LOG, LOG_VSCOPE, MT_OUT, and printptr().

template<typename EvalGraphT>
EvalGraphT& OfflineModelBuilder< EvalGraphT >::getEvalGraph ( ) [inline]

Returns the internal evaluation graph.

Returns:
Evaluation graph.

Reimplemented from ModelBuilder< EvalGraphT >.

Definition at line 112 of file OfflineModelBuilder.h.

References ModelBuilder< EvalGraphT >::getEvalGraph().

Referenced by main().

template<typename EvalGraphT>
MyModelGraph& OfflineModelBuilder< EvalGraphT >::getModelGraph ( ) [inline]

Returns the internal model graph.

Returns:
Model graph.

Reimplemented from ModelBuilder< EvalGraphT >.

Definition at line 113 of file OfflineModelBuilder.h.

References ModelBuilder< EvalGraphT >::getModelGraph().

Referenced by main().

template<typename EvalGraphT >
OfflineModelBuilder< EvalGraphT >::OptionalModel OfflineModelBuilder< EvalGraphT >::getNextIModel ( EvalUnit  u) [protected, virtual]

Get next input model (projected if projection is configured) at e given unit.

Parameters:
uThe unit whose next input model shall be returned.
Returns:
Next input model at unit u.

Reimplemented from OnlineModelBuilder< EvalGraphT >.

Definition at line 323 of file OfflineModelBuilder.h.

References DBGLOG, LOG, LOG_VSCOPE, and MT_IN.

template<typename EvalGraphT>
void OfflineModelBuilder< EvalGraphT >::printEvalGraphModelGraph ( std::ostream &  o) [inline, virtual]

Prints both the evaluation and the model graph for debugging purposes.

Parameters:
oThe stream to print to.

Reimplemented from OnlineModelBuilder< EvalGraphT >.

Definition at line 114 of file OfflineModelBuilder.h.

References OnlineModelBuilder< EvalGraphT >::printEvalGraphModelGraph().

Referenced by main().

template<typename EvalGraphT>
void OfflineModelBuilder< EvalGraphT >::printModelBuildingPropertyMap ( std::ostream &  o) [inline, virtual]

Prints the model building properties for debugging purposes.

Parameters:
oThe stream to print to.

Reimplemented from OnlineModelBuilder< EvalGraphT >.

Definition at line 115 of file OfflineModelBuilder.h.

References OnlineModelBuilder< EvalGraphT >::printModelBuildingPropertyMap().


Field Documentation

template<typename EvalGraphT>
boost::optional<CAUAlgorithms::JoinRelevancePropertyMap> OfflineModelBuilder< EvalGraphT >::currentjrp [protected]

For each call we need this storage, this is not threadsafe! (but the rest of model building is unlikely to be threadsafe as well).

Definition at line 94 of file OfflineModelBuilder.h.

template<typename EvalGraphT>
OfflineModelBuildingPropertyMap OfflineModelBuilder< EvalGraphT >::offmbp [protected]

Properties of models.

Definition at line 92 of file OfflineModelBuilder.h.

Referenced by OfflineModelBuilder< EvalGraphT >::OfflineModelBuilder().


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