GSL1DMinimizerWrapper.h

Go to the documentation of this file.
00001 // @(#)root/mathmore:$Id: GSL1DMinimizerWrapper.h 22522 2008-03-07 16:07:51Z moneta $
00002 // Authors: L. Moneta, A. Zsenei   08/2005
00003  /**********************************************************************
00004   *                                                                    *
00005   * Copyright (c) 2004 moneta,  CERN/PH-SFT                            *
00006   *                                                                    *
00007   * This library is free software; you can redistribute it and/or      *
00008   * modify it under the terms of the GNU General Public License        *
00009   * as published by the Free Software Foundation; either version 2     *
00010   * of the License, or (at your option) any later version.             *
00011   *                                                                    *
00012   * This library is distributed in the hope that it will be useful,    *
00013   * but WITHOUT ANY WARRANTY; without even the implied warranty of     *
00014   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   *
00015   * General Public License for more details.                           *
00016   *                                                                    *
00017   * You should have received a copy of the GNU General Public License  *
00018   * along with this library (see file COPYING); if not, write          *
00019   * to the Free Software Foundation, Inc., 59 Temple Place, Suite      *
00020   * 330, Boston, MA 02111-1307 USA, or contact the author.             *
00021   *                                                                    *
00022   **********************************************************************/
00023 
00024 // Header file for class GSL1DMinimizerWrapper
00025 // 
00026 // Created by: moneta  at Wed Dec  1 17:25:44 2004
00027 // 
00028 // Last update: Wed Dec  1 17:25:44 2004
00029 // 
00030 #ifndef ROOT_Math_GSL1DMinimizerWrapper
00031 #define ROOT_Math_GSL1DMinimizerWrapper
00032 
00033 #include "gsl/gsl_min.h"
00034 
00035 
00036 namespace ROOT { 
00037 
00038 namespace Math { 
00039 
00040 /**
00041    wrapper class for gsl_min_fminimizer structure
00042    @ingroup Min1D
00043 */
00044 class GSL1DMinimizerWrapper {
00045 
00046 public: 
00047    GSL1DMinimizerWrapper( const gsl_min_fminimizer_type * T) 
00048    {
00049       fMinimizer = gsl_min_fminimizer_alloc(T); 
00050    }
00051    virtual ~GSL1DMinimizerWrapper() { 
00052       gsl_min_fminimizer_free(fMinimizer);
00053    }
00054 
00055 private:
00056 // usually copying is non trivial, so we make this unaccessible
00057    GSL1DMinimizerWrapper(const GSL1DMinimizerWrapper &); 
00058    GSL1DMinimizerWrapper & operator = (const GSL1DMinimizerWrapper &); 
00059 
00060 public: 
00061 
00062    gsl_min_fminimizer * Get() const { 
00063       return fMinimizer; 
00064    }
00065 
00066 
00067 private: 
00068 
00069    gsl_min_fminimizer * fMinimizer; 
00070 
00071 }; 
00072 
00073 } // end namespace Math
00074 } // end namespace ROOT
00075 
00076 #endif /* ROOT_Math_GSL1DMinimizerWrapper */

Generated on Tue Jul 5 14:34:55 2011 for ROOT_528-00b_version by  doxygen 1.5.1