iRoCS Toolbox  1.1.0
RequireMinimalTCModel.hh
Go to the documentation of this file.
1 /**************************************************************************
2  *
3  * Copyright (C) 2004-2015 Olaf Ronneberger, Florian Pigorsch, Jörg Mechnich,
4  * Thorsten Falk
5  *
6  * Image Analysis Lab, University of Freiburg, Germany
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software Foundation,
20  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  *
22  **************************************************************************/
23 
24 /**************************************************************************
25 ** Title:
26 ** $RCSfile$
27 ** $Revision: 4820 $$Name$
28 ** $Date: 2011-11-08 10:57:01 +0100 (Tue, 08 Nov 2011) $
29 ** Copyright: GPL $Author: tschmidt $
30 ** Description:
31 **
32 **
33 **
34 **-------------------------------------------------------------------------
35 **
36 ** $Log$
37 ** Revision 1.3 2005/01/28 14:29:34 fehr
38 ** some more include bugfixes
39 **
40 ** Revision 1.2 2005/01/28 14:03:30 fehr
41 ** some include bugfixing for external library use
42 **
43 ** Revision 1.1 2004/08/26 08:36:59 ronneber
44 ** initital import
45 **
46 **
47 **
48 **************************************************************************/
49 #ifndef REQUIREMINIMALTCMODEL_HH
50 #define REQUIREMINIMALTCMODEL_HH
51 
52 #ifdef HAVE_CONFIG_H
53 #include <config.hh>
54 #endif
55 
56 #include <vector>
57 
58 #include "RequireHelpers.hh"
60 #include "MinimalStData.hh"
61 
62 #include "../StDataASCII.hh"
63 
64 namespace svt_check
65 {
66 
67  /*======================================================================*/
72  /*======================================================================*/
73  template<typename TCMODEL>
75  {
77 
78  public:
80  {
81  if( false)
82  {
83  typedef typename TCMODEL::FV_type FV;
84 
85  TCMODEL m;
86  // access to Support vectors
87  size_t ui = m.size();
89 
90  FV* fv = m.supportVector( static_cast<int>(ui) );
92 
93 
94  // training info stuff
95  double d = m.getTrainingInfoValue( "");
97 
98  std::string s = m.trainingInfoPlainText();
100 
101  MinimalStData stdata;
102  m.saveTrainingInfo( stdata, "");
103 
104 
105  // loading and saving of parameters
106  m.saveParametersWithUIDs( stdata, "");
107 
108  std::vector<FV*> fvv;
109  m.loadParametersWithUIDs( stdata, fvv, "");
110 
111 
112  // Infos for fast retraining
113  std::vector<char> v;
114  bool f = m.isModelAffectedByLeftOutVectors( v);
116 
117 
118  }
119  }
120  };
121 }
122 
123 
124 #endif
Ensure that TCMODEL provides minimal functions to be used With Multiclass-Algortithms.
#define CHECK_CLASS_TEMPLATE1(c)
void avoidUnunsedVariableWarning(const T &)