CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
npstat::addmul_right< T1, T2 > Struct Template Reference

#include <SimpleFunctors.h>

Public Member Functions

 addmul_right (const double weight)
 
 addmul_right ()=delete
 
T1 & operator() (T1 &left, const T2 &right) const
 

Private Attributes

double w_
 

Detailed Description

template<typename T1, typename T2>
struct npstat::addmul_right< T1, T2 >

In-place addition on the right side preceded by multiplication of the left argument by a double

Definition at line 262 of file SimpleFunctors.h.

Constructor & Destructor Documentation

◆ addmul_right() [1/2]

template<typename T1 , typename T2 >
npstat::addmul_right< T1, T2 >::addmul_right ( const double  weight)
inlineexplicit

Definition at line 263 of file SimpleFunctors.h.

263 : w_(weight) {}
Definition: weight.py:1

◆ addmul_right() [2/2]

template<typename T1 , typename T2 >
npstat::addmul_right< T1, T2 >::addmul_right ( )
delete

Member Function Documentation

◆ operator()()

template<typename T1 , typename T2 >
T1& npstat::addmul_right< T1, T2 >::operator() ( T1 &  left,
const T2 &  right 
) const
inline

Definition at line 265 of file SimpleFunctors.h.

References npstat::addmul_right< T1, T2 >::w_.

265 { return right += w_ * left; }

Member Data Documentation

◆ w_

template<typename T1 , typename T2 >
double npstat::addmul_right< T1, T2 >::w_
private

Definition at line 270 of file SimpleFunctors.h.

Referenced by npstat::addmul_right< T1, T2 >::operator()().