CMS 3D CMS Logo

Public Member Functions | Public Attributes | Static Public Attributes

function::SmoothStepFunction Struct Reference

#include <SmoothStepFunction.h>

List of all members.

Public Member Functions

double operator() (double x) const
 SmoothStepFunction (boost::shared_ptr< double > t)
 SmoothStepFunction (double t)
 SmoothStepFunction (const Parameter &t)

Public Attributes

boost::shared_ptr< double > trend

Static Public Attributes

static const unsigned int arguments = 1

Detailed Description

Definition at line 9 of file SmoothStepFunction.h.


Constructor & Destructor Documentation

function::SmoothStepFunction::SmoothStepFunction ( const Parameter &  t) [inline]

Definition at line 11 of file SmoothStepFunction.h.

References trend.

                                            : 
      trend(t.ptr()) { }
function::SmoothStepFunction::SmoothStepFunction ( boost::shared_ptr< double >  t) [inline]

Definition at line 13 of file SmoothStepFunction.h.

References trend.

                                                 : 
      trend(t) { }
function::SmoothStepFunction::SmoothStepFunction ( double  t) [inline]

Definition at line 15 of file SmoothStepFunction.h.

References trend.

                                : 
      trend(new double(t)){}

Member Function Documentation

double function::SmoothStepFunction::operator() ( double  x) const [inline]

Definition at line 17 of file SmoothStepFunction.h.

References funct::exp(), trend, and z.

                                      {
      double z = (x - 40)*(*trend);
      if(fabs(z)<0) return 0;
      return 2/(1+exp(-z)) -1;
    }

Member Data Documentation

const unsigned int function::SmoothStepFunction::arguments = 1 [static]

Definition at line 10 of file SmoothStepFunction.h.

boost::shared_ptr<double> function::SmoothStepFunction::trend

Definition at line 22 of file SmoothStepFunction.h.

Referenced by operator()(), and SmoothStepFunction().