CMS 3D CMS Logo

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

#include <SimpleFunctors.h>

Public Member Functions

 addmul_left (const double weight)
 
T1 & operator() (T1 &left, const T2 &right) const
 

Private Member Functions

 addmul_left ()=delete
 

Private Attributes

double w_
 

Detailed Description

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

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

Definition at line 240 of file SimpleFunctors.h.

Constructor & Destructor Documentation

◆ addmul_left() [1/2]

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

Definition at line 241 of file SimpleFunctors.h.

241 : w_(weight) {}

◆ addmul_left() [2/2]

template<typename T1 , typename T2 >
npstat::addmul_left< T1, T2 >::addmul_left ( )
privatedelete

Member Function Documentation

◆ operator()()

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

Definition at line 243 of file SimpleFunctors.h.

243 { return left += w_ * right; }

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

Member Data Documentation

◆ w_

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

Definition at line 247 of file SimpleFunctors.h.

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

npstat::addmul_left::w_
double w_
Definition: SimpleFunctors.h:247
weight
Definition: weight.py:1