Milena (Olena)  User documentation 2.0a Id
 All Classes Namespaces Functions Variables Typedefs Enumerator Groups Pages
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

Public Member Functions

 int_u_sat ()
 Constructor without argument.
 
 int_u_sat (int i)
 Constructor from an integer.
 
 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.

Definition at line 90 of file int_u_sat.hh.

Constructor & Destructor Documentation

template<unsigned n>
int_u_sat< n >::int_u_sat ( )
inline

Constructor without argument.

Definition at line 149 of file int_u_sat.hh.

template<unsigned n>
int_u_sat< n >::int_u_sat ( int  i)
inline

Constructor from an integer.

Definition at line 155 of file int_u_sat.hh.

Member Function Documentation

template<unsigned n>
int_u_sat< n >::operator int ( ) const
inline

Conversion to an integer.

Definition at line 170 of file int_u_sat.hh.

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

Self addition.

Definition at line 195 of file int_u_sat.hh.

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

Self subtraction.

Definition at line 205 of file int_u_sat.hh.

template<unsigned n>
int_u_sat< n > & int_u_sat< n >::operator= ( int  i)
inline

Assignment from an integer.

Definition at line 178 of file int_u_sat.hh.

Member Data Documentation

template<unsigned n>
const int_u_sat< n > int_u_sat< n >::one = 1
static

Unit value.

Definition at line 115 of file int_u_sat.hh.

template<unsigned n>
const int_u_sat< n > int_u_sat< n >::zero = 0
static

Zero value.

Definition at line 112 of file int_u_sat.hh.