CMS 3D CMS Logo

List of all members | Public Member Functions
npstat::EquidistantInLinearSpace Class Reference

#include <EquidistantSequence.h>

Inheritance diagram for npstat::EquidistantInLinearSpace:

Public Member Functions

 EquidistantInLinearSpace (double minScale, double maxScale, unsigned nScales)
 
 EquidistantInLinearSpace ()=delete
 
virtual ~EquidistantInLinearSpace ()
 

Detailed Description

A sequence of points equidistant in linear space. Note that std::vector destructor is not virtual, so do not destroy this class by base pointer or reference.

Definition at line 22 of file EquidistantSequence.h.

Constructor & Destructor Documentation

◆ EquidistantInLinearSpace() [1/2]

npstat::EquidistantInLinearSpace::EquidistantInLinearSpace ( double  minScale,
double  maxScale,
unsigned  nScales 
)

Definition at line 7 of file EquidistantSequence.cc.

References mps_fire::i, fftjetcommon_cfi::maxScale, fftjetcommon_cfi::minScale, fftjetcommon_cfi::nScales, and push_back().

10  : std::vector<double>() {
11  switch (nScales) {
12  case 0:
13  break;
14 
15  case 1: {
16  this->reserve(nScales);
17  const double sc = (minScale == maxScale ? minScale : (minScale + maxScale) / 2.0);
18  push_back(sc);
19  } break;
20 
21  default: {
22  this->reserve(nScales);
23  const double step = (maxScale - minScale) / (nScales - 1);
25  for (unsigned i = 1; i < nScales - 1; ++i)
26  push_back(minScale + i * step);
28  } break;
29  }
30  }
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
step
Definition: StallMonitor.cc:98

◆ ~EquidistantInLinearSpace()

virtual npstat::EquidistantInLinearSpace::~EquidistantInLinearSpace ( )
inlinevirtual

Definition at line 25 of file EquidistantSequence.h.

25 {}

◆ EquidistantInLinearSpace() [2/2]

npstat::EquidistantInLinearSpace::EquidistantInLinearSpace ( )
delete