mixmod  3.2.0
Mixture models for clustering and classification
 All Classes Namespaces Files Functions Variables Enumerations Friends
MAPAlgo.h
1 /***************************************************************************
2  SRC/mixmod/Kernel/Algo/MAPAlgo.h description
3  copyright : (C) MIXMOD Team - 2001-2016
4  email : contact@mixmod.org
5  ***************************************************************************/
6 
7 /***************************************************************************
8  This file is part of MIXMOD
9 
10  MIXMOD is free software: you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  MIXMOD is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with MIXMOD. If not, see <http://www.gnu.org/licenses/>.
22 
23  All informations available on : http://www.mixmod.org
24 ***************************************************************************/
25 #ifndef XEMMAPALGO_H
26 #define XEMMAPALGO_H
27 
28 #include "mixmod/Kernel/Algo/Algo.h"
29 
30 namespace XEM {
31 
37 class MAPAlgo : public Algo {
38 
39 public:
40 
42  MAPAlgo();
43 
44  // copy constructor
45  MAPAlgo(const MAPAlgo & mapAlgo);
46 
48  MAPAlgo(AlgoStopName algoStopName, double epsilon, int64_t nbIteration);
49 
51  virtual ~MAPAlgo();
52 
53 
55  virtual Algo * clone();
56 
58  virtual void run(Model *& model);
59 
60  virtual const AlgoName getAlgoName() const;
61 
62  virtual void setEpsilon(double epsilon);
63 
64  virtual const double getEpsilon() const;
65 
66 protected:
67 
69  int64_t _nbCluster;
70 };
71 
72 inline const AlgoName MAPAlgo::getAlgoName() const {
73  return MAP;
74 }
75 
76 inline const double MAPAlgo::getEpsilon() const {
77  THROW(OtherException, internalMixmodError);
78 }
79 
80 inline void MAPAlgo::setEpsilon(double eps) {
81  THROW(OtherException, internalMixmodError);
82 }
83 
84 }
85 
86 #endif
virtual Algo * clone()
clone
Definition: MAPAlgo.cpp:57
virtual ~MAPAlgo()
Destructor.
Definition: MAPAlgo.cpp:52
AlgoName
Enumeration of Algo type.
Definition: Util.h:319
Definition: Model.h:50
virtual void run(Model *&model)
Run method.
Definition: MAPAlgo.cpp:64
Derived class of XEMAlgo for MAP Algorithm.
Definition: MAPAlgo.h:37
Base class for Algorithm(s)
Definition: Algo.h:40
AlgoStopName
Enumeration of differents type of converge of algorithm (stop rule)
Definition: Util.h:291
MAPAlgo()
Default constructor.
Definition: MAPAlgo.cpp:33