kde_cv_stat.h

00001 /* MLPACK 0.2
00002  *
00003  * Copyright (c) 2008, 2009 Alexander Gray,
00004  *                          Garry Boyer,
00005  *                          Ryan Riegel,
00006  *                          Nikolaos Vasiloglou,
00007  *                          Dongryeol Lee,
00008  *                          Chip Mappus, 
00009  *                          Nishant Mehta,
00010  *                          Hua Ouyang,
00011  *                          Parikshit Ram,
00012  *                          Long Tran,
00013  *                          Wee Chin Wong
00014  *
00015  * Copyright (c) 2008, 2009 Georgia Institute of Technology
00016  *
00017  * This program is free software; you can redistribute it and/or
00018  * modify it under the terms of the GNU General Public License as
00019  * published by the Free Software Foundation; either version 2 of the
00020  * License, or (at your option) any later version.
00021  *
00022  * This program is distributed in the hope that it will be useful, but
00023  * WITHOUT ANY WARRANTY; without even the implied warranty of
00024  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00025  * General Public License for more details.
00026  *
00027  * You should have received a copy of the GNU General Public License
00028  * along with this program; if not, write to the Free Software
00029  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00030  * 02110-1301, USA.
00031  */
00032 #ifndef KDE_CV_STAT_H
00033 #define KDE_CV_STAT_H
00034 
00035 template<typename TKernel>
00036 class VKdeCVStat {
00037  public:
00038 
00042   TKernel min_bandwidth_kernel_;
00043 
00047   TKernel max_bandwidth_kernel_;
00048 
00051   double weight_sum_;
00052 
00055   double get_weight_sum() {
00056     return weight_sum_;
00057   }
00058     
00059   void Init(const Matrix& dataset, index_t &start, index_t &count) {
00060   }
00061     
00062   void Init(const Matrix& dataset, index_t &start, index_t &count,
00063             const VKdeCVStat& left_stat, const VKdeCVStat& right_stat) {
00064   }
00065   
00066   VKdeCVStat() {
00067   }
00068     
00069   ~VKdeCVStat() {
00070   }
00071     
00072 };
00073 
00074 template<typename TKernelAux>
00075 class KdeCVStat {
00076  public:
00077 
00081   typename TKernelAux::TFarFieldExpansion first_farfield_expansion_;
00082   
00085   typename TKernelAux::TFarFieldExpansion second_farfield_expansion_;
00086 
00089   double get_weight_sum() {
00090     return first_farfield_expansion_.get_weight_sum();
00091   }
00092     
00093   void Init(const TKernelAux &first_ka, const TKernelAux &second_ka) {
00094     first_farfield_expansion_.Init(first_ka);
00095     second_farfield_expansion_.Init(second_ka);
00096   }
00097     
00098   void Init(const Matrix& dataset, index_t &start, index_t &count) {
00099   }
00100     
00101   void Init(const Matrix& dataset, index_t &start, index_t &count,
00102             const KdeCVStat& left_stat, const KdeCVStat& right_stat) {
00103   }
00104     
00105   void Init(const Vector& center, const TKernelAux &first_ka,
00106             const TKernelAux &second_ka) {
00107     first_farfield_expansion_.Init(center, first_ka);
00108     second_farfield_expansion_.Init(center, second_ka);
00109   }
00110     
00111   KdeCVStat() { }
00112     
00113   ~KdeCVStat() { }
00114     
00115 };
00116 
00117 #endif
Generated on Mon Jan 24 12:04:38 2011 for FASTlib by  doxygen 1.6.3