mixmod  3.2.0
Mixture models for clustering and classification
 All Classes Namespaces Files Functions Variables Enumerations Friends
LabelDescription.h
1 /***************************************************************************
2  SRC/mixmod/Kernel/IO/LabelDescription.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 
26 #ifndef XEMLABELDESCRIPTION_H
27 #define XEMLABELDESCRIPTION_H
28 
29 #include "mixmod/Kernel/IO/Description.h"
30 
31 namespace XEM {
32 
33 // pre-declaration
34 class Model;
35 class Label;
36 
43 class LabelDescription : public Description {
44 
45 public:
48 
50  LabelDescription(int64_t nbSample, int64_t nbColumn,
51  std::vector< ColumnDescription* > columnDescription,
52  FormatNumeric::FormatNumericFile format,
53  std::string filename, std::string infoName = "");
54 
56  LabelDescription(int64_t nbSample, std::vector<int64_t> vLabel);
57 
59  LabelDescription(Model * estimation);
60 
62  LabelDescription(LabelDescription & labelDescription);
63 
65  virtual ~LabelDescription();
66 
68  bool operator ==(const LabelDescription & labelDescription) const;
69 
71  LabelDescription & operator=(LabelDescription & labelDescription);
72 
73  const Label * getLabel() const;
74  Label * getLabel();
75 
76  const int64_t getNbCluster() const;
77 
78  void saveNumericValues(std::string fileName = "");
79 
80 private:
81 
82  Label * _label;
83  Label * createLabel();
84  int64_t _nbCluster;
85 };
86 
87 inline const Label * LabelDescription::getLabel() const {
88  return _label;
89 }
90 
91 inline Label * LabelDescription::getLabel() {
92  return _label;
93 }
94 
95 inline const int64_t LabelDescription::getNbCluster() const {
96  return _nbCluster;
97 }
98 
99 }
100 
101 #endif // XEMLABELDESCRIPTION_H
Definition: LabelDescription.h:43
LabelDescription()
Default constructor.
Definition: LabelDescription.cpp:40
Definition: Label.h:48
virtual ~LabelDescription()
Destructor.
Definition: LabelDescription.cpp:155
Definition: Model.h:50
LabelDescription & operator=(LabelDescription &labelDescription)
operator=
Definition: LabelDescription.cpp:119
Definition: Description.h:42
bool operator==(const LabelDescription &labelDescription) const
Comparison operator.
Definition: LabelDescription.cpp:134