Column-oriented GPU-accelerated Database Management System
CoGaDB
|
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 <map> 00013 #include <memory> 00014 00015 //hype includes 00016 #include <core/time_measurement.hpp> 00017 #include <core/factory.hpp> 00018 00019 00020 namespace hype{ 00021 namespace core{ 00022 00023 class Algorithm; //forward declaration 00024 00025 00026 class StatisticalMethod_Internal { 00029 public: 00030 virtual const EstimatedTime computeEstimation(const Tuple& input_values) = 0; 00031 00032 virtual bool recomuteApproximationFunction(Algorithm& algorithm) = 0; 00033 00034 virtual bool inTrainingPhase() const throw() = 0; 00035 00036 virtual void retrain() = 0; 00037 00038 virtual ~StatisticalMethod_Internal(){} 00039 00040 protected: 00041 StatisticalMethod_Internal(const std::string& name); 00042 00043 private: 00044 std::string name_; 00045 00046 }; 00047 00048 //factory function 00049 const std::tr1::shared_ptr<StatisticalMethod_Internal> getNewStatisticalMethodbyName(std::string name); 00050 00051 typedef core::Factory< StatisticalMethod_Internal, std::string> StatisticalMethodFactory; //aFactory; 00052 //typedef Loki::Singleton<StatisticalMethodFactory> StatisticalMethodFactorySingleton; 00053 00054 class StatisticalMethodFactorySingleton{ 00055 public: 00056 static StatisticalMethodFactory& Instance(); 00057 }; 00058 00059 00060 typedef std::tr1::shared_ptr<StatisticalMethod_Internal> StatisticalMethodPtr; 00061 typedef std::map<std::string,StatisticalMethodPtr> StatisticalMethodMap; 00062 00063 }; //end namespace core 00064 }; //end namespace hype 00065 00066