Changeset 40 for trunk/src/histogram.h
 Timestamp:
 Feb 20, 2004, 3:03:25 PM (19 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/src/histogram.h
r13 r40 1 // $Id$ 2 3 #ifndef _THEP_CPPTOOLS_HISTOGRAM_ 4 #define _THEP_CPPTOOLS_HISTOGRAM_ 5 1 6 #include <fstream> 2 7 #include <iostream> … … 4 9 #include <gsl/gsl_histogram.h> 5 10 6 7 #ifndef _THEP_CPPTOOLS_HISTOGRAM_8 #define _THEP_CPPTOOLS_HISTOGRAM_9 11 10 12 namespace thep_cpp_tools … … 36 38 Returns the intensity corresponding to bin \a n. 37 39 */ 38 inline double get_intensity( const size_t& n ) const; 40 inline double get_intensity( const size_t& n ) const 41 { return gsl_histogram_get(h_,n); } 39 42 40 43 … … 42 45 Returns the range corresponding to bin \a n 43 46 */ 44 inline void get_range( const size_t& n, double& min, double& max ) const; 47 inline void get_range( const size_t& n, double& min, double& max ) const 48 { gsl_histogram_get_range(h_,n,&min,&max); } 45 49 46 50 … … 48 52 Returns the number of bins in the distribution. 49 53 */ 50 inline size_t get_bins() const ;54 inline size_t get_bins() const { return gsl_histogram_bins(h_); } 51 55 52 56 … … 61 65 the histogram. 62 66 */ 63 inline double get_probability( const double& r ); 67 inline double get_probability( const double& r ) 68 { return gsl_histogram_pdf_sample(p_,r); } 64 69 65 70 … … 86 91 }; 87 92 88 #include "histogram.h"89 93 90 94 }
Note: See TracChangeset
for help on using the changeset viewer.