mixmod  3.2.0
Mixture models for clustering and classification
 All Classes Namespaces Files Functions Variables Enumerations Friends
Proba.h
1 /***************************************************************************
2  SRC/mixmod/Kernel/IO/Proba.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 XEMProba_H
26 #define XEMProba_H
27 
32 #include <vector>
33 #include <iostream>
34 #include <stdint.h>
35 
36 namespace XEM {
37 
38 // pre-declaration
39 class Model;
40 
41 class Proba {
42 
43 public:
44 
46  Proba();
47 
49  Proba(int64_t nbSample, int64_t nbCluster);
50 
52  Proba(Model * model);
53 
54  Proba(const Proba & iProba);
55 
57  virtual ~Proba();
58 
60  bool operator ==(const Proba & proba) const;
61 
63  void edit(std::ostream & stream);
64 
66  double ** getTabProba() const;
67 
69  std::vector<std::vector<double> > getProba() const;
70 
72  void setProba(double ** proba, int64_t nbSample, int64_t nbCluster);
73  void setProba(std::vector<std::vector<double> > proba);
74 
76  int64_t getNbSample() const;
77  int64_t getNbCluster() const;
78 
80  void input(std::ifstream & flux);
81 
82 private:
83 
85  int64_t _nbSample;
86 
88  int64_t _nbCluster;
89 
91  std::vector<std::vector<double> > _proba;
92 
93 };
94 
95 inline std::vector<std::vector<double> > Proba::getProba() const {
96  return _proba;
97 }
98 
99 inline int64_t Proba::getNbSample() const {
100  return _nbSample;
101 }
102 
103 inline int64_t Proba::getNbCluster() const {
104  return _nbCluster;
105 }
106 
107 }
108 
109 #endif
bool operator==(const Proba &proba) const
Comparison operator.
Definition: Proba.cpp:129
int64_t getNbSample() const
Selector.
Definition: Proba.h:99
Proba()
Default constructor.
Definition: Proba.cpp:36
void setProba(double **proba, int64_t nbSample, int64_t nbCluster)
set Proba
double ** getTabProba() const
getProba
Definition: Proba.cpp:156
virtual ~Proba()
Destructor.
Definition: Proba.cpp:123
void edit(std::ostream &stream)
editProba
Definition: Proba.cpp:143
Definition: Model.h:50
void input(std::ifstream &flux)
input stream
Definition: Proba.cpp:165
Definition: Proba.h:41
std::vector< std::vector< double > > getProba() const
getProba
Definition: Proba.h:95