aGrUM  0.13.2
gum::ExactPolicy< GUM_SCALAR > Class Template Reference

Class implementing exact approximation policy (meaning a value is approximate to itself). More...

#include <agrum/core/approximations/exactPolicy.h>

+ Inheritance diagram for gum::ExactPolicy< GUM_SCALAR >:
+ Collaboration diagram for gum::ExactPolicy< GUM_SCALAR >:

Public Member Functions

Constructors / Destructors
 ExactPolicy ()
 Default constructor. More...
 
Accessors/Modifiers
INLINE GUM_SCALAR fromExact (const GUM_SCALAR &value) const
 Convert value to approximation representation. More...
 
void combineAdd (const ApproximationPolicy< GUM_SCALAR > *ap)
 Combine using addition with the given gum::ApproximationPolicy. More...
 
void combineSub (const ApproximationPolicy< GUM_SCALAR > *ap)
 Combine using substraction with the given gum::ApproximationPolicy. More...
 
void combineMult (const ApproximationPolicy< GUM_SCALAR > *ap)
 Combine using multiplication with the given gum::ApproximationPolicy. More...
 
void combineDiv (const ApproximationPolicy< GUM_SCALAR > *ap)
 Combine using division with the given gum::ApproximationPolicy. More...
 
void combineMax (const ApproximationPolicy< GUM_SCALAR > *ap)
 Combine using max with the given gum::ApproximationPolicy. More...
 
void combineMin (const ApproximationPolicy< GUM_SCALAR > *ap)
 Combine using min with the given gum::ApproximationPolicy. More...
 

Detailed Description

template<typename GUM_SCALAR>
class gum::ExactPolicy< GUM_SCALAR >

Class implementing exact approximation policy (meaning a value is approximate to itself).

Template Parameters
GUM_SCALARThe type used for computations.

Definition at line 45 of file exactPolicy.h.

Constructor & Destructor Documentation

template<typename GUM_SCALAR >
gum::ExactPolicy< GUM_SCALAR >::ExactPolicy ( )

Default constructor.

Definition at line 35 of file exactPolicy_tpl.h.

35 {}

Member Function Documentation

template<typename GUM_SCALAR >
void gum::ExactPolicy< GUM_SCALAR >::combineAdd ( const ApproximationPolicy< GUM_SCALAR > *  ap)
virtual

Combine using addition with the given gum::ApproximationPolicy.

Parameters
apThe policy to combine with.

Implements gum::ApproximationPolicy< GUM_SCALAR >.

Definition at line 46 of file exactPolicy_tpl.h.

47  {}
template<typename GUM_SCALAR >
void gum::ExactPolicy< GUM_SCALAR >::combineDiv ( const ApproximationPolicy< GUM_SCALAR > *  ap)
virtual

Combine using division with the given gum::ApproximationPolicy.

Parameters
apThe policy to combine with.

Implements gum::ApproximationPolicy< GUM_SCALAR >.

Definition at line 63 of file exactPolicy_tpl.h.

64  {}
template<typename GUM_SCALAR >
void gum::ExactPolicy< GUM_SCALAR >::combineMax ( const ApproximationPolicy< GUM_SCALAR > *  ap)
virtual

Combine using max with the given gum::ApproximationPolicy.

Parameters
apThe policy to combine with.

Implements gum::ApproximationPolicy< GUM_SCALAR >.

Definition at line 68 of file exactPolicy_tpl.h.

69  {}
template<typename GUM_SCALAR >
void gum::ExactPolicy< GUM_SCALAR >::combineMin ( const ApproximationPolicy< GUM_SCALAR > *  ap)
virtual

Combine using min with the given gum::ApproximationPolicy.

Parameters
apThe policy to combine with.

Implements gum::ApproximationPolicy< GUM_SCALAR >.

Definition at line 73 of file exactPolicy_tpl.h.

74  {}
template<typename GUM_SCALAR >
void gum::ExactPolicy< GUM_SCALAR >::combineMult ( const ApproximationPolicy< GUM_SCALAR > *  ap)
virtual

Combine using multiplication with the given gum::ApproximationPolicy.

Parameters
apThe policy to combine with.

Implements gum::ApproximationPolicy< GUM_SCALAR >.

Definition at line 58 of file exactPolicy_tpl.h.

59  {}
template<typename GUM_SCALAR >
void gum::ExactPolicy< GUM_SCALAR >::combineSub ( const ApproximationPolicy< GUM_SCALAR > *  ap)
virtual

Combine using substraction with the given gum::ApproximationPolicy.

Parameters
apThe policy to combine with.

Implements gum::ApproximationPolicy< GUM_SCALAR >.

Definition at line 52 of file exactPolicy_tpl.h.

53  {}
template<typename GUM_SCALAR >
INLINE GUM_SCALAR gum::ExactPolicy< GUM_SCALAR >::fromExact ( const GUM_SCALAR &  value) const
virtual

Convert value to approximation representation.

Parameters
valueThe converted value.
Returns
The value approximation representation.

Implements gum::ApproximationPolicy< GUM_SCALAR >.

Definition at line 40 of file exactPolicy_tpl.h.

40  {
41  return value;
42  }

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