mixmod  3.2.0
Mixture models for clustering and classification
 All Classes Namespaces Files Functions Variables Enumerations Friends
PredictOutput.h
1 /***************************************************************************
2  SRC/mixmod/DiscriminantAnalysis/Predict/PredictOutput.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 XEMPREDICTOUTPUT_H
26 #define XEMPREDICTOUTPUT_H
27 
28 #include "mixmod/Utilities/Util.h"
29 
30 namespace XEM {
31 
32 // pre-declaration
33 class Model;
34 class PredictModelOutput;
35 
44 
45 public:
46 
48  PredictOutput();
49 
51  PredictOutput(const PredictOutput & lOutput);
52 
54  PredictOutput(Model * estimation);
55 
57  virtual ~PredictOutput();
58 
60  bool operator ==(const PredictOutput & output) const;
61 
64  PredictModelOutput * getPredictModelOutput(unsigned int index) const;
65 
66  std::vector<PredictModelOutput *> const & getPredictModelOutput() const;
67 
68 private:
69 
70  // Vector containing output for each model
71  std::vector<PredictModelOutput *> _predictModelOutput;
72 };
73 
74 inline std::vector<PredictModelOutput *> const & PredictOutput::getPredictModelOutput() const {
75  return _predictModelOutput;
76 }
77 
78 inline PredictModelOutput * PredictOutput::getPredictModelOutput(unsigned int index) const {
79  if ( index <= _predictModelOutput.size() ) {
80  return _predictModelOutput[index];
81  }
82  else {
83  THROW(InputException, wrongCriterionPositionInGet);
84  }
85 }
86 
87 }
88 
89 #endif
Definition: PredictModelOutput.h:41
Definition: InputException.h:38
Definition: Model.h:50
Constants definitions, various utilities to describe models, and others...
bool operator==(const PredictOutput &output) const
Comparison operator.
Definition: PredictOutput.cpp:63
Definition: PredictOutput.h:43
virtual ~PredictOutput()
Destructor.
Definition: PredictOutput.cpp:54
PredictModelOutput * getPredictModelOutput(unsigned int index) const
Definition: PredictOutput.h:78
PredictOutput()
Default Constructor.
Definition: PredictOutput.cpp:34