DinverCore/GridSnoop.h
Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 **  This file is part of DinverCore.
00004 **
00005 **  This file may be distributed and/or modified under the terms of the
00006 **  GNU General Public License version 2 or 3 as published by the Free
00007 **  Software Foundation and appearing in the file LICENSE.GPL included
00008 **  in the packaging of this file.
00009 **
00010 **  This file is distributed in the hope that it will be useful, but WITHOUT
00011 **  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 **  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
00013 **  more details.
00014 **
00015 **  You should have received a copy of the GNU General Public License
00016 **  along with this program. If not, see <http://www.gnu.org/licenses/>.
00017 **
00018 **  See http://www.geopsy.org for more information.
00019 **
00020 **  Created : 2010-05-11
00021 **  Authors:
00022 **    Marc Wathelet (LGIT, Grenoble, France)
00023 **
00024 ***************************************************************************/
00025 
00026 #ifndef GRIDSNOOP_H
00027 #define GRIDSNOOP_H
00028 
00029 #include <QGpCoreTools.h>
00030 
00031 #include "DinverCoreDLLExport.h"
00032 #include "ForwardSignal.h"
00033 
00034 namespace DinverCore {
00035 
00036 class AbstractForward;
00037 class ReportWriter;
00038 class UniqueRandom;
00039 
00040 class DINVERCORE_EXPORT GridSnoop
00041 {
00042 public:
00043   GridSnoop();
00044   ~GridSnoop();
00045 
00046   bool openReport(const QString& fileName);
00047   void setForward(AbstractForward * forward);
00048   void setSeed(int seed);
00049   bool setThreadCount(int nThreads);
00050   void wake();
00051   void sleep();
00052   bool optimization();
00053 
00054   int variableParameterCount () const;
00055   uint checksum() const {return _parameterSpaceChecksum;}
00056 private:
00057   QVector<AbstractForward *> _forwards;
00058 
00059   ReportWriter * _report;
00060   uint _parameterSpaceChecksum;
00061 
00062   UniqueRandom * _generator;
00063   ForwardSignal _forwardSignal;
00064 
00065   double _bestMisfit;
00066 };
00067 
00068 } // namespace DinverCore
00069 #endif // GRIDSNOOP_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines