Hybrid Query Processing Engine for Coprocessing in Database Systems
HyPE
oneshot_computation.cpp
Go to the documentation of this file.
00001 
00002 #include <core/algorithm.hpp>
00003 #include <plugins/recomputation_heuristics/oneshot_computation.hpp>
00004 
00005 namespace hype{
00006    namespace core{
00007 
00008    Oneshotcomputation::Oneshotcomputation() : RecomputationHeuristic_Internal("Oneshot Recomputation"), once_(true), counter_(0) {
00009       //RecomputationHeuristicFactorySingleton::Instance().Register("Oneshot Recomputation",&Oneshotcomputation::create);
00010    }
00011 
00012    //returns false, because the base class takes care of the initial training phase
00013    bool Oneshotcomputation::internal_recompute(Algorithm& algorithm){
00014 //    //std::cout << "RECOMPUTE???" << std::endl;
00015 //    //static unsigned int counter=0;
00016 //    if(once_){
00017 //    counter_++;
00018 //    if(counter_>=200){
00019 //       counter_=0;
00020 //       //std::cout << "RECOMPUTE APPROXIMATION FUNCTION!!!" << std::endl;
00021 //       once_=false;
00022 //       return true;
00023 //    }
00024 //    }
00025       std::cout << algorithm.getName() << std::endl;
00026 
00027       return false;
00028       
00029    }
00030 
00031    }; //end namespace core
00032 }; //end namespace hype
00033 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines