timesConstant< T > Struct Template Reference

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

#include <utilities.h>

List of all members.

Public Member Functions

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

Public Attributes

m_c
 Storred constant value of time T.

Detailed Description

template<class T>
struct 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().

Definition at line 34 of file utilities.h.


Constructor & Destructor Documentation

timesConstant ( c  )  [inline]

Constructor.

Parameters:
c Constant of templated type T that will be storred internally within the object and used in the multiplication operation

Definition at line 42 of file utilities.h.


Member Function Documentation

double operator() ( x  )  [inline]

Parenthesis operator returning a double.

Parameters:
x Variable of templated type T that will be used in the mulitplication operator
Returns:
Returns a value of type double from the internal multiplication

Definition at line 52 of file utilities.h.

References timesConstant< T >::m_c.


Member Data Documentation

T m_c

Storred constant value of time T.

Definition at line 55 of file utilities.h.

Referenced by timesConstant< T >::operator()().


The documentation for this struct was generated from the following file:
Generated by  doxygen 1.6.3