CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
npstat::CoordinateSelector Class Reference

#include <CoordinateSelector.h>

Inheritance diagram for npstat::CoordinateSelector:
npstat::AbsMultivariateFunctor

Public Member Functions

 CoordinateSelector (const unsigned i)
 
unsigned maxDim () const
 
unsigned minDim () const
 
double operator() (const double *point, const unsigned dim) const
 
virtual ~CoordinateSelector ()
 
- Public Member Functions inherited from npstat::AbsMultivariateFunctor
virtual ~AbsMultivariateFunctor ()
 

Private Member Functions

 CoordinateSelector ()
 

Private Attributes

unsigned index_
 

Detailed Description

A trivial implementation of AbsMultivariateFunctor which selects an element with a certain index from the input array

Definition at line 25 of file CoordinateSelector.h.

Constructor & Destructor Documentation

npstat::CoordinateSelector::CoordinateSelector ( const unsigned  i)
inlineexplicit

Definition at line 28 of file CoordinateSelector.h.

28 : index_(i) {}
int i
Definition: DBlmapReader.cc:9
virtual npstat::CoordinateSelector::~CoordinateSelector ( )
inlinevirtual

Definition at line 30 of file CoordinateSelector.h.

30 {}
npstat::CoordinateSelector::CoordinateSelector ( )
private

Member Function Documentation

unsigned npstat::CoordinateSelector::maxDim ( ) const
inlinevirtual

Maximum expected dimensionality (will typically be equal to the minimum)

Reimplemented from npstat::AbsMultivariateFunctor.

Definition at line 41 of file CoordinateSelector.h.

41 {return UINT_MAX;}
unsigned npstat::CoordinateSelector::minDim ( ) const
inlinevirtual

Minimum expected dimensionality

Implements npstat::AbsMultivariateFunctor.

Definition at line 40 of file CoordinateSelector.h.

References index_.

40 {return index_ + 1U;}
double npstat::CoordinateSelector::operator() ( const double *  point,
const unsigned  dim 
) const
inlinevirtual

Function value

Implements npstat::AbsMultivariateFunctor.

Definition at line 32 of file CoordinateSelector.h.

References index_.

33  {
34  if (dim <= index_)
36  "In npstat::CoordinateSelector::operator(): "
37  "input array dimensionality is too small");
38  return point[index_];
39  }
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5

Member Data Documentation

unsigned npstat::CoordinateSelector::index_
private

Definition at line 45 of file CoordinateSelector.h.

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