Column-oriented GPU-accelerated Database Management System
CoGaDB
/home/sebastian/gpudbms/trunk/hype-library/include/core/recomputation_heuristic.hpp
Go to the documentation of this file.
00001 /***********************************************************************************************************
00002 Copyright (c) 2012, Sebastian Breß, Otto-von-Guericke University of Magdeburg, Germany. All rights reserved.
00003 
00004 This program and accompanying materials are made available under the terms of the 
00005 GNU LESSER GENERAL PUBLIC LICENSE - Version 3, http://www.gnu.org/licenses/lgpl-3.0.txt
00006 ***********************************************************************************************************/
00007 #pragma once
00008 
00009 #include <iostream>
00010 #include <string>
00011 #include <vector>
00012 #include <memory>
00013 
00014 //hype includes
00015 #include <core/time_measurement.hpp>
00016 #include <config/global_definitions.hpp>
00017 #include <core/factory.hpp>
00018 
00019 namespace hype{
00020         namespace core{
00021 
00022 class Algorithm; //forward declaration
00023 
00024 class RecomputationHeuristic_Internal{
00025         public:
00026         bool recompute(Algorithm& algorithm);
00027         virtual bool internal_recompute(Algorithm& algorithm) = 0;
00028         virtual ~RecomputationHeuristic_Internal(){}
00029 
00030 protected:
00031         RecomputationHeuristic_Internal(const std::string& name);
00032 
00033 private:
00034         std::string name_;
00035         unsigned int length_of_training_phase_;
00036         bool is_initial_approximation_function_computed_;
00037         unsigned int samplecounter_;
00038 };
00039 
00040 //factory function
00041 const std::tr1::shared_ptr<RecomputationHeuristic_Internal> getNewRecomputationHeuristicbyName(std::string name);
00042 
00043 typedef core::Factory<RecomputationHeuristic_Internal, std::string> RecomputationHeuristicFactory; //aFactory;
00044 //typedef Loki::Singleton<RecomputationHeuristicFactory> RecomputationHeuristicFactorySingleton;
00045 
00046 
00047 class RecomputationHeuristicFactorySingleton{
00048         public:
00049                 static RecomputationHeuristicFactory& Instance();
00050 };
00051 
00052         }; //end namespace core
00053 }; //end namespace hype
00054 
00055 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines