Cantera  2.5.1
Public Member Functions | Public Attributes | List of all members
timesConstant< T > Struct Template Reference

Unary operator to multiply the argument by a constant. More...

#include <utilities.h>

Inherits unary_function< T, double >.

Public Member Functions

 timesConstant (T c)
 Constructor. More...
 
double operator() (T x)
 Parenthesis operator returning a double. More...
 

Public Attributes

m_c
 Stored constant value of time T. More...
 

Detailed Description

template<class T>
struct Cantera::timesConstant< T >

Unary operator to multiply the argument by a constant.

The form of this operator is designed for use by std::transform.

See also
scale().
Deprecated:
To be removed after Cantera 2.5. Replaceable with C++11 lambda.

Definition at line 35 of file utilities.h.

Constructor & Destructor Documentation

◆ timesConstant()

timesConstant ( c)
inline

Constructor.

Parameters
cConstant of templated type T that will be stored internally within the object and used in the multiplication operation

Definition at line 41 of file utilities.h.

Member Function Documentation

◆ operator()()

double operator() ( x)
inline

Parenthesis operator returning a double.

Parameters
xVariable of templated type T that will be used in the multiplication operator
Returns
a value of type double from the internal multiplication

Definition at line 52 of file utilities.h.

Member Data Documentation

◆ m_c

T m_c

Stored constant value of time T.

Definition at line 57 of file utilities.h.


The documentation for this struct was generated from the following file: