mln::value::int_u_sat< n > Struct Template Reference

Unsigned integer value class with saturation behavior. More...

#include <int_u_sat.hh>

Inheritance diagram for mln::value::int_u_sat< n >:

Inheritance graph

List of all members.

Public Member Functions

 int_u_sat (int i)
 Constructor from an integer.
 int_u_sat ()
 Constructor without argument.
 operator int () const
 Conversion to an integer.
int_u_sat< n > & operator+= (int i)
 Self addition.
int_u_sat< n > & operator-= (int i)
 Self subtraction.
int_u_sat< n > & operator= (int i)
 Assignment from an integer.

Static Public Attributes

static const int_u_sat< n > one = 1
 Unit value.
static const int_u_sat< n > zero = 0
 Zero value.


Detailed Description

template<unsigned n>
struct mln::value::int_u_sat< n >

Unsigned integer value class with saturation behavior.

The parameter is n the number of encoding bits.


Constructor & Destructor Documentation

template<unsigned n>
mln::value::int_u_sat< n >::int_u_sat (  )  [inline]

Constructor without argument.

template<unsigned n>
mln::value::int_u_sat< n >::int_u_sat ( int  i  )  [inline]

Constructor from an integer.


Member Function Documentation

template<unsigned n>
mln::value::int_u_sat< n >::operator int (  )  const [inline]

Conversion to an integer.

template<unsigned n>
int_u_sat< n > & mln::value::int_u_sat< n >::operator+= ( int  i  )  [inline]

Self addition.

template<unsigned n>
int_u_sat< n > & mln::value::int_u_sat< n >::operator-= ( int  i  )  [inline]

Self subtraction.

template<unsigned n>
int_u_sat< n > & mln::value::int_u_sat< n >::operator= ( int  i  )  [inline]

Assignment from an integer.


Member Data Documentation

template<unsigned n>
const int_u_sat< n > mln::value::int_u_sat< n >::one = 1 [inline, static]

Unit value.

template<unsigned n>
const int_u_sat< n > mln::value::int_u_sat< n >::zero = 0 [inline, static]

Zero value.


Generated on Tue Jul 14 16:33:21 2009 for Milena (Olena) by  doxygen 1.5.9