Column-oriented GPU-accelerated Database Management System
CoGaDB
|
This class represents an algorithm. It abstracts important features and encapsulates information of the algorithm. At the same time, it is highly adaptable. More...
#include <algorithm.hpp>
This class represents an algorithm. It abstracts important features and encapsulates information of the algorithm. At the same time, it is highly adaptable.
An algorithm gets assigned three things. First is a statistical method, which dictates an approximation function and takes care of recomputing the approximation function. Second is a recomputation heuristic, which decides, when to recompute an algorithm. Third is a statistic, which stores past observed execution tiems ofthe algorithm together with an abstraction of the input data set in a measurement pair list. This list is implemented by the class stemod::core::AlgorithmStatistics. The algorithm has to update it's statistics every time, a new observation (an instance of class stemod::core::MeasurementPair) is added. Hence, the Algorithm class provides the basis for the decision component, which is done by an optimization_criterion, which is implemented by drived classes of stemod::core::OptimizationCriterion.
Note that the statistical method and the recomputation statistic can be exchanged at run-time, because the Algortihm uses the pointer to implementation technique (or pimpl-idiom).
hype::core::Algorithm::Algorithm | ( | const std::string & | name_of_algorithm, |
const std::string & | name_of_statistical_method, | ||
const std::string & | name_of_recomputation_strategy, | ||
Operation & | operation, | ||
DeviceSpecification | comp_dev | ||
) |
Initializes Algorithm according to Parameters name_of_algorithm, name_of_statistical_method, name_of_recomputation_strategy.
name_of_algorithm | name of the algorithm, it has to be unique! |
name_of_statistical_method | the name of a supported statistical method |
name_of_recomputation_strategy | name of the recomputation strategy |
Destroys the Algorithm and writes the statistics to disc file.
bool hype::core::Algorithm::addMeasurementPair | ( | const MeasurementPair & | mp | ) |
References statistics_.
const DeviceSpecification hype::core::Algorithm::getDeviceSpecification | ( | ) | const throw () |
const EstimatedTime hype::core::Algorithm::getEstimatedExecutionTime | ( | const Tuple & | input_values | ) |
const LoadChangeEstimator& hype::core::Algorithm::getLoadChangeEstimator | ( | ) | const throw () |
const std::string hype::core::Algorithm::getName | ( | ) | const |
unsigned int hype::core::Algorithm::getNumberOfDecisionsforThisAlgorithm | ( | ) | const throw () |
unsigned int hype::core::Algorithm::getNumberOfTerminatedExecutions | ( | ) | const throw () |
uint64_t hype::core::Algorithm::getTimeOfLastExecution | ( | ) | const throw () |
double hype::core::Algorithm::getTotalExecutionTime | ( | ) | const throw () |
returns the total time this algorithm spend in execution
void hype::core::Algorithm::incrementNumberofDecisionsforThisAlgorithm | ( | ) | throw () |
bool hype::core::Algorithm::inRetrainingPhase | ( | ) | const throw () |
bool hype::core::Algorithm::inTrainingPhase | ( | ) | const throw () |
void hype::core::Algorithm::retrain | ( | ) |
bool hype::core::Algorithm::setRecomputationHeuristic | ( | std::tr1::shared_ptr< RecomputationHeuristic_Internal > | ptr_recomp_heuristic | ) |
bool hype::core::Algorithm::setStatisticalMethod | ( | std::tr1::shared_ptr< StatisticalMethod_Internal > | ptr_statistical_method | ) |
void hype::core::Algorithm::setTimeOfLastExecution | ( | uint64_t | new_timestamp | ) | throw () |
bool hype::core::Algorithm::is_in_retraining_phase_ [private] |
uint64_t hype::core::Algorithm::logical_timestamp_of_last_execution_ [private] |
std::string hype::core::Algorithm::name_ [private] |
Operation& hype::core::Algorithm::operation_ [private] |
std::tr1::shared_ptr<RecomputationHeuristic_Internal> hype::core::Algorithm::ptr_recomputation_heristic_ [private] |
std::tr1::shared_ptr<StatisticalMethod_Internal> hype::core::Algorithm::ptr_statistical_method_ [private] |
unsigned int hype::core::Algorithm::retraining_length_ [private] |
Referenced by getAlgorithmStatistics().