A bounds object represents a pair of integer bounds. More...
#include <bounds.hh>
Public Types  
enum  bound_type { strict, hint, infinite } 
Both bounds have one of these types. More...  
Public Member Functions  
bounds ()  
Initialize bounds to infinity in both directions.  
bounds (int value)  
Initialize bounds to a strict equality.  
bounds (int lower, int upper)  
Initialize bounds to a strict range.  
bounds (int lower, bound_type lt, int upper, bound_type ut)  
Initialize bounds to given range and types.  
int  lower (bool want_limit, int inf) 
Return lower bound.  
int  upper (bool want_limit, int inf) 
Return upper bound.  
double  lower (bool want_limit=false, double inf=std::numeric_limits< double >::infinity()) 
Return lower bound as double.  
double  upper (bool want_limit=false, double inf=std::numeric_limits< double >::infinity()) 
Return upper bound as double.  
bounds &  operator= (int value) 
Set to strict equality.  
Public Attributes  
int  lower_value 
The value of the lower bound, unless the lower bound is of type infinite.  
int  upper_value 
The value of the upper bound, unless the upper bound is of type infinite.  
bound_type  lower_type 
The type of the lower bound.  
bound_type  upper_type 
The type of the upper bound. 
A bounds object represents a pair of integer bounds.
Each bound can have three types, as specified by the enum bounds::bound_type.
Definition at line 35 of file bounds.hh.
enum bounds::bound_type 
Both bounds have one of these types.
bounds::bounds  (  int  value  )  [inline] 
bounds::bounds  (  int  lower,  
int  upper  
)  [inline] 
bounds::bounds  (  int  lower,  
bound_type  lt,  
int  upper,  
bound_type  ut  
)  [inline] 
double bounds::lower  (  bool  want_limit = false , 

double  inf = std::numeric_limits<double>::infinity()  
)  [inline] 
Return lower bound as double.
want_limit  whether a limit should be returned if it is only a hint.  
inf  the value to be used for infinity. 
Definition at line 152 of file bounds.hh.
References hint, lower_type, lower_value, and strict.
int bounds::lower  (  bool  want_limit,  
int  inf  
)  [inline] 
Return lower bound.
want_limit  whether a limit should be returned if it is only a hint.  
inf  the value to be used for infinity. 
Definition at line 124 of file bounds.hh.
References hint, lower_type, lower_value, and strict.
bounds& bounds::operator=  (  int  value  )  [inline] 
Set to strict equality.
The lower and upper bound will be set to the specified value.
value  the value that will be the new lower and upper bound. 
Definition at line 182 of file bounds.hh.
References lower_type, lower_value, strict, upper_type, and upper_value.
double bounds::upper  (  bool  want_limit = false , 

double  inf = std::numeric_limits<double>::infinity()  
)  [inline] 
Return upper bound as double.
want_limit  whether a limit should be returned if it is only a hint.  
inf  the value to be used for infinity. 
Definition at line 167 of file bounds.hh.
References hint, strict, upper_type, and upper_value.
int bounds::upper  (  bool  want_limit,  
int  inf  
)  [inline] 
Return upper bound.
want_limit  whether a limit should be returned if it is only a hint.  
inf  the value to be used for infinity. 
Definition at line 138 of file bounds.hh.
References hint, strict, upper_type, and upper_value.
The type of the lower bound.
Definition at line 79 of file bounds.hh.
Referenced by lower(), and operator=().
The type of the upper bound.
Definition at line 82 of file bounds.hh.
Referenced by operator=(), and upper().