Loading [MathJax]/extensions/TeX/AMSsymbols.js
DGtal 2.0.0
DGtal::concepts::CBinner< T > Struct Template Reference

Aim: Represents an object that places a quantity into a bin, i.e. a functor that associates a natural integer to a continuous value. More...

#include <DGtal/math/CBinner.h>

Inheritance diagram for DGtal::concepts::CBinner< T >:
[legend]

Public Types

typedef T::Quantity Quantity
typedef T::Bin Bin

Public Member Functions

 BOOST_CONCEPT_ASSERT ((CEuclideanRing< Quantity >))
 BOOST_STATIC_ASSERT ((boost::is_integral< Bin >::value))
 BOOST_STATIC_ASSERT ((boost::is_unsigned< Bin >::value))
 BOOST_CONCEPT_USAGE (CBinner)
void checkConstConstraints () const

Private Attributes

myX
Quantity myQ
Bin myBin
T * myClone

Detailed Description

template<typename T>
struct DGtal::concepts::CBinner< T >

Aim: Represents an object that places a quantity into a bin, i.e. a functor that associates a natural integer to a continuous value.

Description of concept 'CBinner'

It is used for instance when computing an histogram over samples of a continuous random variable.

Refinement of boost::CopyConstructible

Associated types

Notation

  • X : A type that is a model of CBinner
  • x, y : object of type X

Definitions

Valid expressions and semantics

| Name | Expression | Type requirements | Return type | Precondition | Semantics | Post condition | Complexity | |----—|---------—|----------------—|------------—|-----------—|--------—|-------------—|---------—| | construction | X( m, M, n ) | m and M are Quantity, n is a Bin | | | | Constructs a binner with n bins and range from m to M | | | | apply | x( q ) | q is a Quantity | Bin | | returns the bin in which fall q | | |

Invariants

Models

Notes

Template Parameters
Tthe type that should be a model of CBinner.

Definition at line 97 of file CBinner.h.

Member Typedef Documentation

◆ Bin

template<typename T>
typedef T::Bin DGtal::concepts::CBinner< T >::Bin

Definition at line 102 of file CBinner.h.

◆ Quantity

template<typename T>
typedef T::Quantity DGtal::concepts::CBinner< T >::Quantity

Definition at line 101 of file CBinner.h.

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT()

template<typename T>
DGtal::concepts::CBinner< T >::BOOST_CONCEPT_ASSERT ( (CEuclideanRing< Quantity >) )

◆ BOOST_CONCEPT_USAGE()

template<typename T>
DGtal::concepts::CBinner< T >::BOOST_CONCEPT_USAGE ( CBinner< T > )
inline

Definition at line 108 of file CBinner.h.

109 {
110 myClone = new T( myQ, myQ, myBin );
112 }
Aim: Represents an object that places a quantity into a bin, i.e. a functor that associates a natural...
Definition CBinner.h:98
void checkConstConstraints() const
Definition CBinner.h:113

References checkConstConstraints(), myBin, myClone, and myQ.

◆ BOOST_STATIC_ASSERT() [1/2]

template<typename T>
DGtal::concepts::CBinner< T >::BOOST_STATIC_ASSERT ( (boost::is_integral< Bin >::value) )

◆ BOOST_STATIC_ASSERT() [2/2]

template<typename T>
DGtal::concepts::CBinner< T >::BOOST_STATIC_ASSERT ( (boost::is_unsigned< Bin >::value) )

◆ checkConstConstraints()

template<typename T>
void DGtal::concepts::CBinner< T >::checkConstConstraints ( ) const
inline

Definition at line 113 of file CBinner.h.

114 {
116 }
void sameType(const T &, const T &)

References myBin, myQ, myX, and DGtal::concepts::ConceptUtils::sameType().

Referenced by BOOST_CONCEPT_USAGE().

Field Documentation

◆ myBin

template<typename T>
Bin DGtal::concepts::CBinner< T >::myBin
private

Definition at line 121 of file CBinner.h.

Referenced by BOOST_CONCEPT_USAGE(), and checkConstConstraints().

◆ myClone

template<typename T>
T* DGtal::concepts::CBinner< T >::myClone
private

Definition at line 122 of file CBinner.h.

Referenced by BOOST_CONCEPT_USAGE().

◆ myQ

template<typename T>
Quantity DGtal::concepts::CBinner< T >::myQ
private

Definition at line 120 of file CBinner.h.

Referenced by BOOST_CONCEPT_USAGE(), and checkConstConstraints().

◆ myX

template<typename T>
T DGtal::concepts::CBinner< T >::myX
private

Definition at line 119 of file CBinner.h.

Referenced by checkConstConstraints().


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