DinverCore/GeneratorModels.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-12-22
00021 **  Authors:
00022 **    Marc Wathelet (LGIT, Grenoble, France)
00023 **
00024 ***************************************************************************/
00025 
00026 #ifndef GENERATORMODELS_H
00027 #define GENERATORMODELS_H
00028 
00029 #include <QGpCoreTools.h>
00030 
00031 #include "DinverCoreDLLExport.h"
00032 
00033 namespace DinverCore {
00034 
00035   class BestModels;
00036   class ActiveModels;
00037   class ScaledModels;
00038   class ModelSet;
00039   class RealSpace;
00040   class NewModel;
00041 
00042   class DINVERCORE_EXPORT GeneratorModels: public SharedObject
00043   {
00044   public:
00045     GeneratorModels(ModelSet * allModels);
00046     GeneratorModels(const GeneratorModels& o);
00047     ~GeneratorModels();
00048 
00049     const ActiveModels * activeModels() const {return _activeModels;}
00050     const BestModels * bestModels() const {return _bestModels;}
00051     BestModels * bestModels() {return _bestModels;}
00052     const ScaledModels * scaledModels() const {return _scaledModels;}
00053     int serialNumber() const {return _serialNumber;}
00054 
00055     void setBestModelCount(int nr);
00056     void setScaledModels(const RealSpace& parameterSpace);
00057     GeneratorModels * removeDeadModels() const;
00058     void clear();
00059 
00060     void commitStatistics(NewModel * m, double giveUp);
00061     void add(int modelIndex);
00062 
00063     int rejectedCount() const {return _rejectedCount;}
00064     int giveUpCount() const {return _giveUpCount;}
00065     int quarantinedCount() const {return _quarantinedCount;}
00066   private:
00067     int _serialNumber;
00068     static int _nextSerialNumber;
00069 
00070     BestModels * _bestModels;
00071     ActiveModels * _activeModels;
00072     ScaledModels * _scaledModels;
00073 
00074     int _giveUpCount;
00075     int _rejectedCount;
00076     int _quarantinedCount;
00077   };
00078 
00079 } // namespace DinverCore
00080 
00081 #endif // GENERATORMODELS_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines