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 
00026 namespace shogun
00027 {
00031 class CGNPPLib: public CSGObject
00032 {
00033  public:
00035   CGNPPLib(void);
00036 
00044   CGNPPLib(float64_t* vector_y, CKernel* kernel, int32_t num_data, float64_t reg_const);
00045   virtual ~CGNPPLib();
00046 
00053   int8_t gnpp_mdm(float64_t *diag_H,
00054                float64_t *vector_c,
00055                float64_t *vector_y,
00056                int32_t dim,
00057                int32_t tmax,
00058                float64_t tolabs,
00059                float64_t tolrel,
00060                float64_t th,
00061                float64_t *alpha,
00062                int32_t  *ptr_t,
00063                float64_t *ptr_aHa11,
00064                float64_t *ptr_aHa22,
00065                float64_t **ptr_History,
00066                int32_t verb);
00067 
00074   int8_t gnpp_imdm(float64_t *diag_H,
00075                 float64_t *vector_c,
00076                 float64_t *vector_y,
00077                 int32_t dim, 
00078                 int32_t tmax,
00079                 float64_t tolabs,
00080                 float64_t tolrel,
00081                 float64_t th,
00082                 float64_t *alpha,
00083                 int32_t  *ptr_t, 
00084                 float64_t *ptr_aHa11,
00085                 float64_t *ptr_aHa22,
00086                 float64_t **ptr_History,
00087                 int32_t verb);
00088 
00090   inline virtual const char* get_name() const { return "GNPPLib"; }
00091 
00092  protected:
00099   float64_t* get_col(int64_t a, int64_t b);
00100 
00102   float64_t** kernel_columns;
00104   float64_t* cache_index;
00106   int32_t first_kernel_inx;
00108   int64_t Cache_Size;
00110   int32_t m_num_data;
00112   float64_t m_reg_const;
00114   float64_t* m_vector_y;
00116   CKernel* m_kernel;
00117 
00118 };
00119 }
00120 #endif // GNPPLIB_H__ 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation