gmnplib.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef GMNPLIB_H__
00016 #define GMNPLIB_H__
00017
00018 #include <math.h>
00019 #include <limits.h>
00020
00021 #include "base/SGObject.h"
00022 #include "lib/io.h"
00023 #include "lib/common.h"
00024 #include "kernel/Kernel.h"
00025
00027 class CGMNPLib: public CSGObject
00028 {
00029 public:
00039 CGMNPLib(
00040 float64_t* vector_y, CKernel* kernel, int32_t num_data,
00041 int32_t num_virtual_data, int32_t num_classes, float64_t reg_const);
00042
00043 ~CGMNPLib();
00044
00054 int8_t gmnp_imdm(float64_t *vector_c,
00055 int32_t dim,
00056 int32_t tmax,
00057 float64_t tolabs,
00058 float64_t tolrel,
00059 float64_t th,
00060 float64_t *alpha,
00061 int32_t *ptr_t,
00062 float64_t **ptr_History,
00063 int32_t verb);
00064
00071 void get_indices2( int32_t *index, int32_t *c, int32_t i );
00072
00073 protected:
00079 float64_t *get_kernel_col( int32_t a );
00080
00087 float64_t* get_col( int32_t a, int32_t b );
00088
00095 float64_t kernel_fce( int32_t a, int32_t b );
00096
00097 protected:
00099 float64_t* diag_H;
00101 float64_t** kernel_columns;
00103 float64_t* cache_index;
00105 int32_t first_kernel_inx;
00107 int64_t Cache_Size;
00109 int32_t m_num_data;
00111 float64_t m_reg_const;
00113 float64_t* m_vector_y;
00115 CKernel* m_kernel;
00116
00118 int32_t first_virt_inx;
00120 float64_t *virt_columns[3];
00122 int32_t m_num_virt_data;
00124 int32_t m_num_classes;
00125 };
00126
00127
00128 #endif //GMNPLIB_H__