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