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 
00027 class CGNPPLib: public CSGObject
00028 {
00029  public:
00037   CGNPPLib(float64_t* vector_y, CKernel* kernel, int32_t num_data, float64_t reg_const);
00038   ~CGNPPLib();
00039 
00046   int8_t gnpp_mdm(float64_t *diag_H,
00047                float64_t *vector_c,
00048                float64_t *vector_y,
00049                int32_t dim,
00050                int32_t tmax,
00051                float64_t tolabs,
00052                float64_t tolrel,
00053                float64_t th,
00054                float64_t *alpha,
00055                int32_t  *ptr_t,
00056                float64_t *ptr_aHa11,
00057                float64_t *ptr_aHa22,
00058                float64_t **ptr_History,
00059                int32_t verb);
00060 
00067   int8_t gnpp_imdm(float64_t *diag_H,
00068                 float64_t *vector_c,
00069                 float64_t *vector_y,
00070                 int32_t dim, 
00071                 int32_t tmax,
00072                 float64_t tolabs,
00073                 float64_t tolrel,
00074                 float64_t th,
00075                 float64_t *alpha,
00076                 int32_t  *ptr_t, 
00077                 float64_t *ptr_aHa11,
00078                 float64_t *ptr_aHa22,
00079                 float64_t **ptr_History,
00080                 int32_t verb);
00081 
00082  protected:
00089   float64_t* get_col(int64_t a, int64_t b);
00090 
00092   float64_t** kernel_columns;
00094   float64_t* cache_index;
00096   int32_t first_kernel_inx;
00098   int64_t Cache_Size;
00100   int32_t m_num_data;
00102   float64_t m_reg_const;
00104   float64_t* m_vector_y;
00106   CKernel* m_kernel;
00107 
00108 };
00109 
00110 #endif // GNPPLIB_H__ 
00111 

SHOGUN Machine Learning Toolbox - Documentation