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 (  )  [inline]

Default constructor

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

Copy constructor

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

Detailed constructor

template<typename DataType >
BALL_INLINE BALL::MutableConstant< DataType >::~MutableConstant (  )  [inline, 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:
x the point where to evaluate
Returns:
the function value
template<typename DataType >
BALL_INLINE MutableConstant< DataType > & BALL::MutableConstant< DataType >::operator= ( const MutableConstant< DataType > &  constant  )  [inline]

Assignment operator

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

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

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]