/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
PhysicsTools/Utilities/interface/Exponential.h
19 строк
521 B
David
move away from boost shared_ptrs
23 авг 2019, 16:53
23 авг 2019, 16:53
12ff73e
Код
Авторство
О чём код?
#ifndef PhysicsTools_Utilities_Exponential_h #define PhysicsTools_Utilities_Exponential_h #include "PhysicsTools/Utilities/interface/Parameter.h" #include <cmath> namespace funct { struct Exponential { Exponential(const Parameter& l) : lambda(l.ptr()) {} Exponential(std::shared_ptr<double> l) : lambda(l) {} Exponential(double l) : lambda(new double(l)) {} double operator()(double x) const { return std::exp((*lambda) * x); } std::shared_ptr<double> lambda; }; } // namespace funct #endif