| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Gaudi::Math::Digit< TYPE, N > Struct Template Reference

simple structure for evaluation of Nth digit for the integral type More...

#include <Digit.h>

Inheritance diagram for Gaudi::Math::Digit< TYPE, N >:

[legend]
Collaboration diagram for Gaudi::Math::Digit< TYPE, N >:
[legend]
List of all members.

Public Types

 value = Gaudi::Math::IPower<unsigned long long
enum  { value = Gaudi::Math::IPower<unsigned long long, value = Gaudi::Math::IPower<unsigned long long }

Public Member Functions

 BOOST_STATIC_ASSERT (boost::integer_traits< TYPE >::is_specialized)
 BOOST_STATIC_ASSERT (boost::integer_traits< TYPE >::is_integral)
 BOOST_STATIC_ASSERT (!boost::integer_traits< TYPE >::is_signed)
int operator() (const TYPE v) const

Detailed Description

template<class TYPE, unsigned int N>
struct Gaudi::Math::Digit< TYPE, N >

simple structure for evaluation of Nth digit for the integral type

   const unsigned int value  = ... ;
 
   Digit<unsigned int,5> digit5 ;
  
   const int dig5 = digit5 ( value ) ;

Attention:
the least significat decimal digit is numbered as #0
Author:
Vanya BELYAEV Ivan/BElyaev.nl
Date:
2008-07-31

Definition at line 341 of file Digit.h.


Member Enumeration Documentation

template<class TYPE, unsigned int N>
anonymous enum [inherited]

Enumerator:
value 
value 

Definition at line 196 of file Digit.h.

00196 { value = Gaudi::Math::IPower<unsigned long long,10,N>::value } ;


Member Function Documentation

template<class TYPE, unsigned int N>
Gaudi::Math::Digit< TYPE, N >::BOOST_STATIC_ASSERT ( boost::integer_traits< TYPE >::is_specialized   ) 

Reimplemented from Gaudi::Math::detail::_Digit< TYPE, N >.

template<class TYPE, unsigned int N>
Gaudi::Math::Digit< TYPE, N >::BOOST_STATIC_ASSERT ( boost::integer_traits< TYPE >::is_integral   ) 

Reimplemented from Gaudi::Math::detail::_Digit< TYPE, N >.

template<class TYPE, unsigned int N>
Gaudi::Math::Digit< TYPE, N >::BOOST_STATIC_ASSERT ( !boost::integer_traits< TYPE >::is_signed   ) 

Reimplemented from Gaudi::Math::detail::_Digit< TYPE, N >.

template<class TYPE, unsigned int N>
int Gaudi::Math::detail::_Digit< TYPE, N >::operator() ( const TYPE  v  )  const [inline, inherited]

Definition at line 198 of file Digit.h.

00198 { return (v/value)%10 ; }


The documentation for this struct was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:02:58 2011 for LHCbMath by doxygen 1.4.7