mixmod  3.2.0
Mixture models for clustering and classification
 All Classes Namespaces Files Functions Variables Enumerations Friends
DataDescription.h
1 /***************************************************************************
2  SRC/mixmod/Kernel/IO/DataDescription.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 XEMDATADESCRIPTION_H
27 #define XEMDATADESCRIPTION_H
28 
29 #include "mixmod/Kernel/IO/Description.h"
30 
31 namespace XEM {
32 
33 // pre-declaration
34 class Data;
35 class GaussianData;
36 class BinaryData;
37 class CompositeData;
38 
45 class DataDescription : public Description {
46 
47 public:
48 
51 
53  DataDescription(int64_t nbSample, int64_t nbColumn,
54  std::vector<ColumnDescription *> columnDescription,
55  FormatNumeric::FormatNumericFile format,
56  std::string filename, std::string infoName = "");
57 
60 
62  DataDescription(BinaryData * bData);
63 
66 
68  DataDescription(DataDescription & dataDescription);
69 
71  virtual ~DataDescription();
72 
74  DataDescription & operator=(const DataDescription & dataDescription);
75 
76  Data * getData() const;
77 
79  DataType getDataType() const;
80 
82  bool verifyData() const;
83 
84  void saveNumericValues(std::string fileName = "");
85 
86  void releaseData();
87 
88 private:
89 
90  Data * _data;
91 
93  Data * createData() const;
94 };
95 
96 inline Data * DataDescription::getData() const {
97  return _data;
98 }
99 
100 inline void DataDescription::saveNumericValues(std::string fileName) {
101  THROW(OtherException, internalMixmodError);
102 }
103 
104 inline void DataDescription::releaseData(){
105  _data = NULL;
106 }
107 
108 }
109 
110 #endif // XEMDATADESCRIPTION_H
DataType getDataType() const
is binary Data now changed to GetXEMDataType
Definition: DataDescription.cpp:217
DataDescription()
Default constructor.
Definition: DataDescription.cpp:40
Base class for Binary Data.
Definition: BinaryData.h:41
Definition: CompositeData.h:37
DataDescription & operator=(const DataDescription &dataDescription)
operator=
Definition: DataDescription.cpp:135
bool verifyData() const
verify data validity
Definition: DataDescription.cpp:239
virtual ~DataDescription()
Destructor.
Definition: DataDescription.cpp:159
Base class for Gaussian Data.
Definition: GaussianData.h:37
Definition: Description.h:42
Base class for Data.
Definition: Data.h:43
Definition: DataDescription.h:45