SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GNPPLib.h
Go to the documentation of this file.
1 /*-----------------------------------------------------------------------
2  *
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 3 of the License, or
6  * (at your option) any later version.
7  *
8  * Library of solvers for Generalized Nearest Point Problem (GNPP).
9  *
10  * Written (W) 1999-2008 Vojtech Franc, xfrancv@cmp.felk.cvut.cz
11  * Copyright (C) 1999-2008 Center for Machine Perception, CTU FEL Prague
12  *
13 -------------------------------------------------------------------- */
14 
15 #ifndef GNPPLIB_H__
16 #define GNPPLIB_H__
17 
18 #include <shogun/lib/config.h>
19 
20 #include <math.h>
21 #include <limits.h>
22 
23 #include <shogun/base/SGObject.h>
24 #include <shogun/io/SGIO.h>
25 #include <shogun/lib/common.h>
26 #include <shogun/kernel/Kernel.h>
27 
28 namespace shogun
29 {
33 class CGNPPLib: public CSGObject
34 {
35  public:
37  CGNPPLib();
38 
46  CGNPPLib(float64_t* vector_y, CKernel* kernel, int32_t num_data, float64_t reg_const);
47  virtual ~CGNPPLib();
48 
55  int8_t gnpp_mdm(float64_t *diag_H,
56  float64_t *vector_c,
57  float64_t *vector_y,
58  int32_t dim,
59  int32_t tmax,
60  float64_t tolabs,
61  float64_t tolrel,
62  float64_t th,
63  float64_t *alpha,
64  int32_t *ptr_t,
65  float64_t *ptr_aHa11,
66  float64_t *ptr_aHa22,
67  float64_t **ptr_History,
68  int32_t verb);
69 
76  int8_t gnpp_imdm(float64_t *diag_H,
77  float64_t *vector_c,
78  float64_t *vector_y,
79  int32_t dim,
80  int32_t tmax,
81  float64_t tolabs,
82  float64_t tolrel,
83  float64_t th,
84  float64_t *alpha,
85  int32_t *ptr_t,
86  float64_t *ptr_aHa11,
87  float64_t *ptr_aHa22,
88  float64_t **ptr_History,
89  int32_t verb);
90 
92  virtual const char* get_name() const { return "GNPPLib"; }
93 
94  protected:
101  float64_t* get_col(int64_t a, int64_t b);
102 
110  int64_t Cache_Size;
112  int32_t m_num_data;
119 
120 };
121 }
122 #endif // GNPPLIB_H__

SHOGUN Machine Learning Toolbox - Documentation