iRoCS Toolbox  1.1.0
SolutionInfo.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: solution info struct needed by Solver
26 ** $RCSfile$
27 ** $Revision: 476 $$Name$
28 ** $Date: 2004-08-26 10:36:59 +0200 (Thu, 26 Aug 2004) $
29 ** Copyright: GPL $Author: ronneber $
30 ** Description:
31 **
32 **
33 **
34 **-------------------------------------------------------------------------
35 **
36 ** $Log$
37 ** Revision 1.1 2004/08/26 08:36:59 ronneber
38 ** initital import
39 **
40 ** Revision 1.1 2003/05/19 11:20:04 ronneber
41 ** - moved to own File
42 **
43 **
44 **
45 **************************************************************************/
46 
47 #ifndef SOLUTIONINFO_HH
48 #define SOLUTIONINFO_HH
49 
50 #ifdef HAVE_CONFIG_H
51 #include <config.hh>
52 #endif
53 
54 #include <iostream>
55 
56 namespace svt
57 {
58  struct SolutionInfo
59  {
60  int iter; // number of iterations, that the solver needed
61  double nu; // resulting nu
62  double cost; // resulting cost
63  double obj; // value of objective function
64  double rho; // offset of hyperplane
65  double upper_bound_p; // upper bound for positive support vectors
66  double upper_bound_n; // upper bound for negative support vectors
67  int nSV; // number of support vectors
68  int nBSV; // number of bounded support vectors
69  double r; // for Solver_NU: fraction of support vectors???
70 
71  void print( std::ostream& os)
72  {
73  os << "#iter = " << iter << "\n"
74  "nu = " << nu << "\n"
75  "C = " << cost << "\n"
76  "obj = " << obj << ", rho = " << rho << "\n"
77  "nSV = " << nSV << ", nBSV = " << nBSV << "\n";
78  }
79 
80 
81 
82  };
83 
84 }
85 
86 
87 #endif
void print(std::ostream &os)
Definition: SolutionInfo.hh:71