BALL::MutableConstant< DataType > Class Template Reference

#include <BALL/MATHS/function.h>

List of all members.

Public Member Functions

Constructors and destructor
 MutableConstant ()
 MutableConstant (const MutableConstant< DataType > &constant)
 MutableConstant (DataType constant)
virtual ~MutableConstant ()
Assignment
MutableConstant< DataType > & operator= (const MutableConstant< DataType > &constant)
Predicates
bool operator== (const MutableConstant< DataType > &constant) const
Function realization
BALL_INLINE DataType operator() (const DataType &) const
Accessors
void setConstant (DataType constant)
const DataType & getConstant () const

Protected Attributes

DataType constant_

Detailed Description

template<typename DataType = float>
class BALL::MutableConstant< DataType >

Constant function class. This class represents constants that are not known at compile time but must be set at running time.


Constructor & Destructor Documentation

template<typename DataType >
BALL_INLINE BALL::MutableConstant< DataType >::MutableConstant ( )

Default constructor

template<typename DataType >
BALL_INLINE BALL::MutableConstant< DataType >::MutableConstant ( const MutableConstant< DataType > &  constant)

Copy constructor

template<typename DataType >
BALL_INLINE BALL::MutableConstant< DataType >::MutableConstant ( DataType  constant)

Detailed constructor

template<typename DataType >
BALL_INLINE BALL::MutableConstant< DataType >::~MutableConstant ( ) [virtual]

Destructor


Member Function Documentation

template<typename DataType = float>
const DataType& BALL::MutableConstant< DataType >::getConstant ( ) const [inline]

Get the constant argument of the constant

Returns:
a const reference to the constant argument
template<typename DataType = float>
BALL_INLINE DataType BALL::MutableConstant< DataType >::operator() ( const DataType &  ) const [inline]

Evaluation of this subterm

Parameters:
xthe point where to evaluate
Returns:
the function value
template<typename DataType >
BALL_INLINE MutableConstant< DataType > & BALL::MutableConstant< DataType >::operator= ( const MutableConstant< DataType > &  constant)

Assignment operator

References BALL::MutableConstant< DataType >::constant_.

template<typename DataType >
BALL_INLINE bool BALL::MutableConstant< DataType >::operator== ( const MutableConstant< DataType > &  constant) const

Equality operator

References BALL::MutableConstant< DataType >::constant_.

template<typename DataType = float>
void BALL::MutableConstant< DataType >::setConstant ( DataType  constant) [inline]

Set the constant argument of the constant


Member Data Documentation

template<typename DataType = float>
DataType BALL::MutableConstant< DataType >::constant_ [protected]