gnpplib.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 GNPPLIB_H__ 
00016 #define GNPPLIB_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 
00029 class CGNPPLib: public CSGObject
00030 {
00031  public:
00039   CGNPPLib(float64_t* vector_y, CKernel* kernel, int32_t num_data, float64_t reg_const);
00040   virtual ~CGNPPLib();
00041 
00048   int8_t gnpp_mdm(float64_t *diag_H,
00049                float64_t *vector_c,
00050                float64_t *vector_y,
00051                int32_t dim,
00052                int32_t tmax,
00053                float64_t tolabs,
00054                float64_t tolrel,
00055                float64_t th,
00056                float64_t *alpha,
00057                int32_t  *ptr_t,
00058                float64_t *ptr_aHa11,
00059                float64_t *ptr_aHa22,
00060                float64_t **ptr_History,
00061                int32_t verb);
00062 
00069   int8_t gnpp_imdm(float64_t *diag_H,
00070                 float64_t *vector_c,
00071                 float64_t *vector_y,
00072                 int32_t dim, 
00073                 int32_t tmax,
00074                 float64_t tolabs,
00075                 float64_t tolrel,
00076                 float64_t th,
00077                 float64_t *alpha,
00078                 int32_t  *ptr_t, 
00079                 float64_t *ptr_aHa11,
00080                 float64_t *ptr_aHa22,
00081                 float64_t **ptr_History,
00082                 int32_t verb);
00083 
00085   inline virtual const char* get_name() const { return "GNPPLib"; }
00086 
00087  protected:
00094   float64_t* get_col(int64_t a, int64_t b);
00095 
00097   float64_t** kernel_columns;
00099   float64_t* cache_index;
00101   int32_t first_kernel_inx;
00103   int64_t Cache_Size;
00105   int32_t m_num_data;
00107   float64_t m_reg_const;
00109   float64_t* m_vector_y;
00111   CKernel* m_kernel;
00112 
00113 };
00114 
00115 #endif // GNPPLIB_H__ 
00116 

SHOGUN Machine Learning Toolbox - Documentation