SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GMNPLib.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 GMNPLIB_H__
16 #define GMNPLIB_H__
17 
18 #include <math.h>
19 #include <limits.h>
20 
21 #include <shogun/lib/config.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 {
68 class CGMNPLib: public CSGObject
69 {
70  public:
72  CGMNPLib();
73 
83  CGMNPLib(
84  float64_t* vector_y, CKernel* kernel, int32_t num_data,
85  int32_t num_virtual_data, int32_t num_classes, float64_t reg_const);
86 
87  virtual ~CGMNPLib();
88 
98  int8_t gmnp_imdm(float64_t *vector_c,
99  int32_t dim,
100  int32_t tmax,
101  float64_t tolabs,
102  float64_t tolrel,
103  float64_t th,
104  float64_t *alpha,
105  int32_t *ptr_t,
106  float64_t **ptr_History,
107  int32_t verb);
108 
115  void get_indices2( int32_t *index, int32_t *c, int32_t i );
116 
117  protected:
123  float64_t *get_kernel_col( int32_t a );
124 
131  float64_t* get_col( int32_t a, int32_t b );
132 
139  float64_t kernel_fce( int32_t a, int32_t b );
140 
142  virtual const char* get_name() const { return "GMNPLib"; }
143 
144  protected:
154  int64_t Cache_Size;
156  int32_t m_num_data;
163 
165  int32_t first_virt_inx;
171  int32_t m_num_classes;
172 };
173 }
174 #endif //GMNPLIB_H__

SHOGUN Machine Learning Toolbox - Documentation