gmnplib.h

Go to the documentation of this file.
00001 /*-----------------------------------------------------------------------
00002  *
00003  * This program is free software; you can redistribute it and/or modify
00004  * it under the terms of the GNU General Public License as published by
00005  * the Free Software Foundation; either version 3 of the License, or
00006  * (at your option) any later version.
00007  *
00008  * Library of solvers for Generalized Nearest Point Problem (GNPP).
00009  *
00010  * Written (W) 1999-2008 Vojtech Franc, xfrancv@cmp.felk.cvut.cz
00011  * Copyright (C) 1999-2008 Center for Machine Perception, CTU FEL Prague 
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(DREAL* vector_y, CKernel* kernel, INT num_data, INT num_virtual_data, INT num_classes, DREAL reg_const);
00040 
00041         ~CGMNPLib();
00042 
00052         int gmnp_imdm(double *vector_c,
00053                 INT dim,
00054                 INT tmax,
00055                 double tolabs,
00056                 double tolrel,
00057                 double th,
00058                 double *alpha,
00059                 INT  *ptr_t,
00060                 double **ptr_History,
00061                 INT verb);
00062 
00069         void get_indices2( INT *index, INT *c, INT i );
00070 
00071     protected:
00077         DREAL *get_kernel_col( INT a );
00078 
00085         DREAL* get_col( INT a, INT b );
00086 
00093         double kernel_fce( INT a, INT b );
00094 
00095     protected:
00097         DREAL* diag_H;
00099         DREAL** kernel_columns;
00101         DREAL* cache_index;
00103         INT first_kernel_inx;
00105         LONG Cache_Size;
00107         INT m_num_data;
00109         DREAL m_reg_const;
00111         DREAL* m_vector_y;
00113         CKernel* m_kernel;
00114 
00116         INT first_virt_inx;
00118         DREAL *virt_columns[3];
00120         INT m_num_virt_data;
00122         INT m_num_classes;
00123 };
00124 
00125 
00126 #endif //GMNPLIB_H__

SHOGUN Machine Learning Toolbox - Documentation