A.I.M.S


AimsLinearCombination< T > Class Template Reference

The template class to make linear combinations. More...

#include <aims/utility/linearcomb.h>

Public Member Functions

Constructor and destructor
 AimsLinearCombination (float num1, float den1, float num2=0.0, float den2=1.0)
 The programmer should provide at least 2 parameters to the constructor: More...
 
virtual ~AimsLinearCombination ()
 Destructor does nothing. More...
 
Methods
AimsData< T > operator() (const AimsData< T > &data1, const AimsData< T > &data2)
 Return the combination of data1 and data2. More...
 
AimsData< T > operator() (const AimsData< T > &data1)
 Return the combination of data1. More...
 

Protected Attributes

Data
float _num1
 multiplicator for the first data More...
 
float _den1
 dividor for the first data More...
 
float _num2
 multiplicator for the second data More...
 
float _den2
 dividor for the second data More...
 

Detailed Description

template<class T>
class AimsLinearCombination< T >

The template class to make linear combinations.

This class is useful to make a linear combination num1*data1/den1+num2*data2/den2 because it goes through a float casting.

Definition at line 50 of file linearcomb.h.

Constructor & Destructor Documentation

template<class T >
AimsLinearCombination< T >::AimsLinearCombination ( float  num1,
float  den1,
float  num2 = 0.0,
float  den2 = 1.0 
)
inline

The programmer should provide at least 2 parameters to the constructor:

Parameters
num1multiplicator for the first data
den1dividor for the first data
num2multiplicator for the second data [default=0.0]
den2dividor for the second data [default=1.0]

Definition at line 73 of file linearcomb.h.

References ASSERT.

template<class T >
virtual AimsLinearCombination< T >::~AimsLinearCombination ( )
inlinevirtual

Destructor does nothing.

Definition at line 82 of file linearcomb.h.

Member Function Documentation

template<class T >
AimsData< T > AimsLinearCombination< T >::operator() ( const AimsData< T > &  data1,
const AimsData< T > &  data2 
)
inline
template<class T >
AimsData< T > AimsLinearCombination< T >::operator() ( const AimsData< T > &  data1)
inline

Member Data Documentation

template<class T >
float AimsLinearCombination< T >::_den1
protected

dividor for the first data

Definition at line 57 of file linearcomb.h.

template<class T >
float AimsLinearCombination< T >::_den2
protected

dividor for the second data

Definition at line 61 of file linearcomb.h.

template<class T >
float AimsLinearCombination< T >::_num1
protected

multiplicator for the first data

Definition at line 55 of file linearcomb.h.

template<class T >
float AimsLinearCombination< T >::_num2
protected

multiplicator for the second data

Definition at line 59 of file linearcomb.h.


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