Unsigned integer value class with saturation behavior. More...
#include <int_u_sat.hh>
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. |
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.
mln::value::int_u_sat< n >::int_u_sat | ( | ) | [inline] |
Constructor without argument.
Definition at line 149 of file int_u_sat.hh.
mln::value::int_u_sat< n >::int_u_sat | ( | int | i | ) | [inline] |
Constructor from an integer.
Definition at line 155 of file int_u_sat.hh.
mln::value::int_u_sat< n >::operator int | ( | ) | const [inline] |
Conversion to an integer.
Definition at line 170 of file int_u_sat.hh.
int_u_sat< n > & mln::value::int_u_sat< n >::operator+= | ( | int | i | ) | [inline] |
Self addition.
Definition at line 195 of file int_u_sat.hh.
int_u_sat< n > & mln::value::int_u_sat< n >::operator-= | ( | int | i | ) | [inline] |
Self subtraction.
Definition at line 205 of file int_u_sat.hh.
int_u_sat< n > & mln::value::int_u_sat< n >::operator= | ( | int | i | ) | [inline] |
Assignment from an integer.
Definition at line 178 of file int_u_sat.hh.
const int_u_sat< n > mln::value::int_u_sat< n >::one = 1 [static] |
Unit value.
Definition at line 115 of file int_u_sat.hh.
const int_u_sat< n > mln::value::int_u_sat< n >::zero = 0 [static] |
Zero value.
Definition at line 112 of file int_u_sat.hh.