00001 /* 00002 ------------------------------------------------------------------- 00003 00004 Copyright (C) 2006, 2007, 2008, 2009, Andrew W. Steiner 00005 00006 This file is part of O2scl. 00007 00008 O2scl is free software; you can redistribute it and/or modify 00009 it under the terms of the GNU General Public License as published by 00010 the Free Software Foundation; either version 3 of the License, or 00011 (at your option) any later version. 00012 00013 O2scl 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 00016 GNU General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with O2scl. If not, see <http://www.gnu.org/licenses/>. 00020 00021 ------------------------------------------------------------------- 00022 */ 00023 #ifndef O2SCL_MCARLO_INTE_H 00024 #define O2SCL_MCARLO_INTE_H 00025 00026 #include <iostream> 00027 #include <o2scl/collection.h> 00028 #include <o2scl/multi_inte.h> 00029 #include <o2scl/rnga.h> 00030 #include <o2scl/gsl_rnga.h> 00031 00032 #ifndef DOXYGENP 00033 namespace o2scl { 00034 #endif 00035 00036 /** 00037 \brief Monte-Carlo integration [abstract base] 00038 00039 This class provides the generic Monte Carlo parameters and the 00040 random number generator. The default type for the random number 00041 generator is a \ref gsl_rnga object. 00042 */ 00043 template<class param_t, class func_t, class rng_t=gsl_rnga, 00044 class vec_t=ovector_base> class mcarlo_inte : 00045 public multi_inte<param_t,func_t,vec_t> { 00046 00047 public: 00048 00049 mcarlo_inte() { 00050 n_points=1000; 00051 } 00052 00053 virtual ~mcarlo_inte() {} 00054 00055 /** 00056 \brief Number of integration points (default 1000) 00057 */ 00058 int n_points; 00059 00060 /// The random number generator 00061 rng_t def_rng; 00062 00063 /// Return string denoting type ("mcarlo_inte") 00064 virtual const char *type() { return "mcarlo_inte"; } 00065 00066 }; 00067 00068 #ifndef DOXYGENP 00069 } 00070 #endif 00071 00072 #endif 00073
Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.
Project hosting provided by
,
O2scl Sourceforge Project Page