00001 /* 00002 * This program is free software; you can redistribute it and/or modify 00003 * it under the terms of the GNU General Public License as published by 00004 * the Free Software Foundation; either version 3 of the License, or 00005 * (at your option) any later version. 00006 * 00007 * Written (W) 1999-2008 Gunnar Raetsch 00008 * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society 00009 */ 00010 00011 #ifndef __PLIF_BASE_H__ 00012 #define __PLIF_BASE_H__ 00013 00014 #include <shogun/lib/common.h> 00015 #include <shogun/base/SGObject.h> 00016 #include <shogun/mathematics/Math.h> 00017 00018 namespace shogun 00019 { 00021 class CPlifBase : public CSGObject 00022 { 00023 public: 00025 CPlifBase() {}; 00026 virtual ~CPlifBase() {}; 00027 00036 virtual float64_t lookup_penalty( 00037 float64_t p_value, float64_t* svm_values) const =0; 00038 00047 virtual float64_t lookup_penalty( 00048 int32_t p_value, float64_t* svm_values) const =0; 00049 00054 virtual void penalty_clear_derivative()=0; 00055 00064 virtual void penalty_add_derivative( 00065 float64_t p_value, float64_t* svm_values, float64_t factor)=0 ; 00066 00073 virtual float64_t get_max_value() const = 0; 00074 00081 virtual float64_t get_min_value() const = 0; 00082 00087 virtual void get_used_svms(int32_t* num_svms, int32_t* svm_ids) = 0; 00088 00095 virtual bool uses_svm_values() const = 0; 00096 00103 virtual int32_t get_max_id() const = 0; 00104 00109 virtual void list_plif() const = 0 ; 00110 00111 }; 00112 } 00113 #endif