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 <shogun/lib/config.h>
19 
20 #include <shogun/base/SGObject.h>
21 #include <shogun/lib/common.h>
22 #include <shogun/kernel/Kernel.h>
23 
24 namespace shogun
25 {
64 class CGMNPLib: public CSGObject
65 {
66  public:
68  CGMNPLib();
69 
79  CGMNPLib(
80  float64_t* vector_y, CKernel* kernel, int32_t num_data,
81  int32_t num_virtual_data, int32_t num_classes, float64_t reg_const);
82 
83  virtual ~CGMNPLib();
84 
94  int8_t gmnp_imdm(float64_t *vector_c,
95  int32_t dim,
96  int32_t tmax,
97  float64_t tolabs,
98  float64_t tolrel,
99  float64_t th,
100  float64_t *alpha,
101  int32_t *ptr_t,
102  float64_t **ptr_History,
103  int32_t verb);
104 
111  void get_indices2( int32_t *index, int32_t *c, int32_t i );
112 
113  protected:
119  float64_t *get_kernel_col( int32_t a );
120 
127  float64_t* get_col( int32_t a, int32_t b );
128 
135  float64_t kernel_fce( int32_t a, int32_t b );
136 
138  virtual const char* get_name() const { return "GMNPLib"; }
139 
140  protected:
150  int64_t Cache_Size;
152  int32_t m_num_data;
159 
161  int32_t first_virt_inx;
167  int32_t m_num_classes;
168 };
169 }
170 #endif //GMNPLIB_H__

SHOGUN Machine Learning Toolbox - Documentation