LocARNA-1.9.2
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Static Public Attributes | Friends
LocARNA::InftyInt Class Reference

#include <infty_int.hh>

Inheritance diagram for LocARNA::InftyInt:
LocARNA::TaintedInftyInt LocARNA::FiniteInt

List of all members.

Public Member Functions

 InftyInt ()
 Construct empty.
 InftyInt (const base_type &x)
 Construct from base type.
 InftyInt (const FiniteInt &x)
 Construct from finite int.
 InftyInt (const TaintedInftyInt &x)
 Construct from potentially tainted.
InftyIntoperator= (TaintedInftyInt &x)
 Assignment from potentially tainted infty int.
InftyIntoperator+= (const FiniteInt &x)
InftyIntoperator-= (const FiniteInt &x)

Static Public Attributes

static const InftyInt neg_infty
 normalized negative infinity
static const InftyInt pos_infty
 normalized positive infinity

Friends

InftyInt operator+ (const InftyInt &x, const FiniteInt &y)
InftyInt operator- (const InftyInt &x, const FiniteInt &y)

Detailed Description

Potentially infinite value where finite values are integer. The representation of infinite values is normalized. Due to the normalization it is safe to add or subtract a second normal potentially infinite integer (thereby generating an non-normalized potentially infinite integer).


Constructor & Destructor Documentation

LocARNA::InftyInt::InftyInt ( const base_type x) [inline, explicit]

Construct from base type.

Parameters:
xvalue of base type
LocARNA::InftyInt::InftyInt ( const FiniteInt x) [inline, explicit]

Construct from finite int.

Parameters:
xvalue

Construct from potentially tainted.

Parameters:
xvalue
Note:
used for implicit type cast, untainting

Member Function Documentation

InftyInt & LocARNA::InftyInt::operator+= ( const FiniteInt x) [inline]

Add in place

Parameters:
xoperand
Returns:
*this after operation
InftyInt & LocARNA::InftyInt::operator-= ( const FiniteInt x) [inline]

Subtract in place

Parameters:
xoperand
Returns:
*this after operation
InftyInt& LocARNA::InftyInt::operator= ( TaintedInftyInt x) [inline]

Assignment from potentially tainted infty int.

Parameters:
xvalue
Returns:
*this

Friends And Related Function Documentation

InftyInt operator+ ( const InftyInt x,
const FiniteInt y 
) [friend]

Add

Parameters:
xoperand 1
yoperand 2
Returns:
x plus y
InftyInt operator- ( const InftyInt x,
const FiniteInt y 
) [friend]

Subtract

Parameters:
xoperand 1
yoperand 2
Returns:
x minus y

Member Data Documentation

Initial value:
 InftyInt(
        std::numeric_limits<TaintedInftyInt::base_type>::min() / 5 * 2)

normalized negative infinity

Initial value:
 InftyInt(
        -(std::numeric_limits<TaintedInftyInt::base_type>::min() / 5 * 2))

normalized positive infinity


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends