Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | Namespace Members | Class Members | Related Pages

Parma_Polyhedra_Library::Native_Integer< T > Class Template Reference

A wrapper for unchecked native integer types. More...

List of all members.

Public Member Functions

Constructors
 Native_Integer ()
 Default constructor.
 Native_Integer (const signed char y)
 Direct initialization from a signed char value.
 Native_Integer (const short y)
 Direct initialization from a signed short value.
 Native_Integer (const int y)
 Direct initialization from an signed int value.
 Native_Integer (const long y)
 Direct initialization from a signed long value.
 Native_Integer (const long long y)
 Direct initialization from a signed long long value.
 Native_Integer (const unsigned char y)
 Direct initialization from an unsigned char value.
 Native_Integer (const unsigned short y)
 Direct initialization from an unsigned short value.
 Native_Integer (const unsigned int y)
 Direct initialization from an unsigned int value.
 Native_Integer (const unsigned long y)
 Direct initialization from an unsigned long value.
 Native_Integer (const unsigned long long y)
 Direct initialization from an unsigned long long value.
 Native_Integer (const float32_t y)
 Direct initialization from a 32 bits floating-point value.
 Native_Integer (const float64_t y)
 Direct initialization from a 64 bits floating-point value.
 Native_Integer (const mpq_class &y)
 Direct initialization from a GMP unbounded rational value.
 Native_Integer (const mpz_class &y)
 Direct initialization from a GMP unbounded integer value.
 Native_Integer (const char *y)
 Direct initialization from a C string value.
Accessors and Conversions
 operator T () const
 Conversion operator: returns a copy of the undelying native integer value.
T & raw_value ()
 Returns a reference to the underlying native integer value.
const T & raw_value () const
 Returns a const reference to the underlying native integer value.
Assignment Operators
Native_Integeroperator= (const Native_Integer &y)
 Assignment operator.
Native_Integeroperator+= (const Native_Integer &y)
 Add and assign operator.
Native_Integeroperator-= (const Native_Integer &y)
 Subtract and assign operator.
Native_Integeroperator *= (const Native_Integer &y)
 Multiply and assign operator.
Native_Integeroperator/= (const Native_Integer &y)
 Divide and assign operator.
Native_Integeroperator%= (const Native_Integer &y)
 Compute modulus and assign operator.
Increment and Decrement Operators
Native_Integeroperator++ ()
 Pre-increment operator.
Native_Integer operator++ (int)
 Post-increment operator.
Native_Integeroperator-- ()
 Pre-decrement operator.
Native_Integer operator-- (int)
 Post-decrement operator.

Related Functions

(Note that these are not member functions.)

Accessor Functions
const T & raw_value (const Native_Integer< T > &x)
 Returns a const reference to the underlying native integer value.
T & raw_value (Native_Integer< T > &x)
 Returns a reference to the underlying native integer value.
Memory Size Inspection Functions
size_t total_memory_in_bytes (const Native_Integer< T > &x)
 Returns the total size in bytes of the memory occupied by x.
size_t external_memory_in_bytes (const Native_Integer< T > &x)
 Returns the size in bytes of the memory managed by x.
Arithmetic Operators
Native_Integer< T > operator+ (const Native_Integer< T > &x)
 Unary plus operator.
Native_Integer< T > operator- (const Native_Integer< T > &x)
 Unary minus operator.
Native_Integer< T > operator+ (const Native_Integer< T > &x, const Native_Integer< T > &y)
 Addition operator.
Native_Integer< T > operator- (const Native_Integer< T > &x, const Native_Integer< T > &y)
 Subtraction operator.
Native_Integer< T > operator * (const Native_Integer< T > &x, const Native_Integer< T > &y)
 Multiplication operator.
Native_Integer< T > operator/ (const Native_Integer< T > &x, const Native_Integer< T > &y)
 Integer division operator.
Native_Integer< T > operator% (const Native_Integer< T > &x, const Native_Integer< T > &y)
 Modulus operator.
void negate (Native_Integer< T > &x)
 Assigns to x its negation.
void add_mul_assign (Native_Integer< T > &x, const Native_Integer< T > &y, const Native_Integer< T > &z)
 Assigns to x the value x + y * z.
void sub_mul_assign (Native_Integer< T > &x, const Native_Integer< T > &y, const Native_Integer< T > &z)
 Assigns to x the value x - y * z.
void gcd_assign (Native_Integer< T > &x, const Native_Integer< T > &y)
 Assigns to x the greatest common divisor of x and y.
void gcd_assign (Native_Integer< T > &x, const Native_Integer< T > &y, const Native_Integer< T > &z)
 Assigns to x the greatest common divisor of y and z.
void lcm_assign (Native_Integer< T > &x, const Native_Integer< T > &y)
 Assigns to x the least common multiple of x and y.
void lcm_assign (Native_Integer< T > &x, const Native_Integer< T > &y, const Native_Integer< T > &z)
 Assigns to x the least common multiple of y and z.
void exact_div_assign (Native_Integer< T > &x, const Native_Integer< T > &y)
 Assigns to x the integer division of x and y.
void exact_div_assign (Native_Integer< T > &x, const Native_Integer< T > &y, const Native_Integer< T > &z)
 Assigns to x the integer division of y and z.
void sqrt_assign (Native_Integer< T > &x)
 Assigns to x its integer square root.
void sqrt_assign (Native_Integer< T > &x, const Native_Integer< T > &y)
 Assigns to x the integer square root of y.
Relational Operators and Comparison Functions
bool operator== (const Native_Integer< T > &x, const Native_Integer< T > &y)
 Equality operator.
bool operator!= (const Native_Integer< T > &x, const Native_Integer< T > &y)
 Disequality operator.
bool operator>= (const Native_Integer< T > &x, const Native_Integer< T > &y)
 Greater than or equal to operator.
bool operator> (const Native_Integer< T > &x, const Native_Integer< T > &y)
 Greater than operator.
bool operator<= (const Native_Integer< T > &x, const Native_Integer< T > &y)
 Less than or equal to operator.
bool operator< (const Native_Integer< T > &x, const Native_Integer< T > &y)
 Less than operator.
int sgn (const Native_Integer< T > &x)
 Returns $-1$, $0$ or $1$ depending on whether the value of x is negative, zero or positive, respectively.
int cmp (const Native_Integer< T > &x, const Native_Integer< T > &y)
 Returns a negative, zero or positive value depending on whether x is lower than, equal to or greater than y, respectively.
Input-Output Operators
std::ostream & operator<< (std::ostream &os, const Native_Integer< T > &x)
 Output operator.
std::istream & operator>> (std::istream &is, Native_Integer< T > &x)
 Input operator.


Detailed Description

template<typename T>
class Parma_Polyhedra_Library::Native_Integer< T >

A wrapper for unchecked native integer types.

The wrapper and related functions implement an interface which is common to all kinds of coefficient types, therefore allowing for a uniform coding style.

Warning:
Native integer coefficients do not check for overflows and therefore are likely to produce unreliable results. We are currently using them as a tool to estimate the overhead incurred by the checked integral types.


Generated on Fri Dec 24 16:50:18 2004 for PPL by  doxygen 1.3.9.1-20041213