mixmod  3.2.0
Mixture models for clustering and classification
 All Classes Namespaces Files Functions Variables Enumerations Friends
ClusteringMain.h
1 /***************************************************************************
2  SRC/mixmod/Clustering/ClusteringMain.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 XEMCLUSTERINGMMAIN_H
27 #define XEMCLUSTERINGMMAIN_H
28 
29 #include "mixmod/Utilities/Util.h"
30 
31 namespace XEM {
32 
33 class Model;
34 class ClusteringInput;
35 class ClusteringOutput;
36 
43 
44 public:
45 
48 
50  ClusteringMain(ClusteringInput * cInput, ClusteringOutput * output = NULL);
51 
53  virtual ~ClusteringMain();
54 
56  void run(int seed = -1);
57 
59  ClusteringInput * getInput() const;
60 
62  ClusteringOutput * getOutput() const;
63 
64  // Set output pointer to null
65  void setOutputNull();
66 
67 private:
68 
70  ClusteringInput * _input;
71 
73  ClusteringOutput * _output;
74 };
75 
77  if (_input)
78  return _input;
79  else
80  THROW(OtherException, nullPointerError);
81 }
82 
84  return _output;
85 }
86 
87 inline void ClusteringMain::setOutputNull() {
88  _output = NULL;
89 }
90 
91 }
92 
93 #endif
Definition: OtherException.h:37
Definition: ClusteringInput.h:42
Main class for Clustering using mixture model(s)
Definition: ClusteringMain.h:42
void run(int seed=-1)
Run clustering(s) task(s) described by _input. Fill _output.
Definition: ClusteringMain.cpp:60
Definition: ClusteringOutput.h:44
Constants definitions, various utilities to describe models, and others...
ClusteringMain()
Invalid default constructor: clustering input and output must be provided.
Definition: ClusteringMain.cpp:46
ClusteringOutput * getOutput() const
Return pointer to output.
Definition: ClusteringMain.h:83
ClusteringInput * getInput() const
Return pointer to input.
Definition: ClusteringMain.h:76
virtual ~ClusteringMain()
Destructor.
Definition: ClusteringMain.cpp:54