SHOGUN  4.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules 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__
int32_t first_kernel_inx
Definition: GMNPLib.h:148
float64_t * virt_columns[3]
Definition: GMNPLib.h:163
int32_t first_virt_inx
Definition: GMNPLib.h:161
class GMNPLib Library of solvers for Generalized Minimal Norm Problem (GMNP).
Definition: GMNPLib.h:64
float64_t * m_vector_y
Definition: GMNPLib.h:156
float64_t m_reg_const
Definition: GMNPLib.h:154
CKernel * m_kernel
Definition: GMNPLib.h:158
float64_t ** kernel_columns
Definition: GMNPLib.h:144
float64_t * get_col(int32_t a, int32_t b)
Definition: GMNPLib.cpp:212
int32_t m_num_classes
Definition: GMNPLib.h:167
float64_t * cache_index
Definition: GMNPLib.h:146
float64_t * diag_H
Definition: GMNPLib.h:142
virtual ~CGMNPLib()
Definition: GMNPLib.cpp:143
void get_indices2(int32_t *index, int32_t *c, int32_t i)
Definition: GMNPLib.cpp:194
int32_t m_num_data
Definition: GMNPLib.h:152
float64_t kernel_fce(int32_t a, int32_t b)
Definition: GMNPLib.cpp:477
Class SGObject is the base class of all shogun objects.
Definition: SGObject.h:112
double float64_t
Definition: common.h:50
int8_t gmnp_imdm(float64_t *vector_c, int32_t dim, int32_t tmax, float64_t tolabs, float64_t tolrel, float64_t th, float64_t *alpha, int32_t *ptr_t, float64_t **ptr_History, int32_t verb)
Definition: GMNPLib.cpp:260
int32_t m_num_virt_data
Definition: GMNPLib.h:165
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
The Kernel base class.
Definition: Kernel.h:158
float64_t * get_kernel_col(int32_t a)
Definition: GMNPLib.cpp:161
int64_t Cache_Size
Definition: GMNPLib.h:150
virtual const char * get_name() const
Definition: GMNPLib.h:138

SHOGUN Machine Learning Toolbox - Documentation