Most of the basic arithmetic and logical comparison operators are provided. The only thing missing at this point is checking for overflow errors and handling them appropriately.
Definition in file Infinite.h.
#include <limits.h>
#include <float.h>
#include <math.h>
#include <iostream>
#include "libgm/gm.h"
Include dependency graph for Infinite.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Classes | |
| class | Infinite |
| Infinite is a class that allows for values to be stored as negative or positive infinity in addition to standard integer/floating point values. More... | |
Functions | |
| template<class Type> Infinite< Type > | operator+ (const Infinite< Type > &x, const Infinite< Type > &y) |
| Binary addition for two Infinite objects. | |
| template<class Type> Infinite< Type > | operator+ (const Infinite< Type > &x, const Type &y) |
| Binary addition for one Infinite type object and one basic type object. | |
| template<class Type> Infinite< Type > | operator+ (const Type &x, const Infinite< Type > &y) |
| Binary addition for one basic type object and one Infinite type object. | |
| template<class Type> Infinite< Type > | operator- (const Infinite< Type > &x, const Infinite< Type > &y) |
| Binary subtraction for two Infinite objects. | |
| template<class Type> Infinite< Type > | operator- (const Infinite< Type > &x, const Type &y) |
| Binary subtraction for one Infinite type and one basic type object. | |
| template<class Type> Infinite< Type > | operator- (const Type &x, const Infinite< Type > &y) |
| Binary subtraction for one basic type and one Infinite type object. | |
| template<class Type> Infinite< Type > | operator * (const Infinite< Type > &x, const Infinite< Type > &y) |
| Binary multiply for two Infinite objects. | |
| template<class Type> Infinite< Type > | operator * (const Infinite< Type > &x, const Type &y) |
| Binary multiply for one Infinite type object and one basic type object. | |
| template<class Type> Infinite< Type > | operator * (const Type &x, const Infinite< Type > &y) |
| Binary multiply for one basic type object and one Infinite type object. | |
| template<class Type> Infinite< Type > | operator/ (const Infinite< Type > &x, const Infinite< Type > &y) |
| Binary divide for two Infinite objects. | |
| template<class Type> Infinite< Type > | operator/ (const Infinite< Type > &x, const Type &y) |
| Binary divide for one Infinite type object and one basic type object. | |
| template<class Type> Infinite< Type > | operator/ (const Type &x, const Infinite< Type > &y) |
| Binary divide for one basic type object and one Infinite type object. | |
| template<class Type> Infinite< Type > | operator^ (const Infinite< Type > &x, const Infinite< Type > &y) |
| Binary power op for two Infinite objects. | |
| template<class Type> Infinite< Type > | operator^ (const Infinite< Type > &x, const Type &y) |
| Binary power op for one Infinite type object and one basic type object. | |
| template<class Type> Infinite< Type > | operator^ (const Type &x, const Infinite< Type > &y) |
| Binary power op for one basic type object and one Infinite type object. | |
| template<class Type> bool | operator<= (const Infinite< Type > &x, const Infinite< Type > &y) |
| Binary Less-than-equal operator for two Infinite types. | |
| template<class Type> bool | operator<= (const Infinite< Type > &x, const Type &y) |
| Binary Less-than-equal operator for one Infinite and one basic object. | |
| template<class Type> bool | operator<= (const Type &x, const Infinite< Type > &y) |
| Binary Less-than-equal operator for one basic and one Infinite object. | |
| template<class Type> bool | operator>= (const Infinite< Type > &x, const Infinite< Type > &y) |
| Binary Greater-than-equal operator for two Infinite types. | |
| template<class Type> bool | operator>= (const Infinite< Type > &x, const Type &y) |
| Binary Greater-than-equal operator for one Infinite, one basic object. | |
| template<class Type> bool | operator>= (const Type &x, const Infinite< Type > &y) |
| Binary Greater-than-equal operator for one basic, one Infinite object. | |
| template<class Type> bool | operator< (const Infinite< Type > &x, const Infinite< Type > &y) |
| Binary Less-than operator for two Infinite types. | |
| template<class Type> bool | operator< (const Infinite< Type > &x, const Type &y) |
| Binary Less-than operator for one Infinite and one basic type object. | |
| template<class Type> bool | operator< (const Type &x, const Infinite< Type > &y) |
| Binary Less-than operator for one basic and one Infinite type object. | |
| template<class Type> bool | operator> (const Infinite< Type > &x, const Infinite< Type > &y) |
| Binary Greater-than operator for two Infinite type objects. | |
| template<class Type> bool | operator> (const Infinite< Type > &x, const Type &y) |
| Binary Greater-than operator for one Infinite and one basic type object. | |
| template<class Type> bool | operator> (const Type &x, const Infinite< Type > &y) |
| Binary Greater-than operator for one basic and one Infinite type object. | |
| template<class Type> bool | operator== (const Infinite< Type > &x, const Infinite< Type > &y) |
| Binary Equality comparison for two Infinite type objects. | |
| template<class Type> bool | operator== (const Infinite< Type > &x, const Type &y) |
| Binary Equality comparison for one Infinite and one basic type object. | |
| template<class Type> bool | operator== (const Type &x, const Infinite< Type > &y) |
| Binary Equality comparison for one basic and one Infinite type object. | |
| template<class Type> bool | operator!= (const Infinite< Type > &x, const Infinite< Type > &y) |
| Binary Inequality comparison for two Infinite type objects. | |
| template<class Type> bool | operator!= (const Infinite< Type > &x, const Type &y) |
| Binary Inequality comparison for one Infinite and one basic type object. | |
| template<class Type> bool | operator!= (const Type &x, const Infinite< Type > &y) |
| Binary Inequality comparison for one basic and one Infinite type object. | |
| template<class Type> std::ostream & | operator<< (std::ostream &s, const Infinite< Type > &x) |
| Basic output stream operator for printing out the value of the Infinite. | |
| template<class Type> std::istream & | operator>> (std::istream &s, Infinite< Type > &x) |
| Basic input stream operator to read in an Infinite value. | |
|
||||||||||||||||
|
Binary multiply for one basic type object and one Infinite type object.
Definition at line 252 of file Infinite.h. |
|
||||||||||||||||
|
Binary multiply for one Infinite type object and one basic type object.
Definition at line 244 of file Infinite.h. |
|
||||||||||||||||
|
Binary multiply for two Infinite objects.
Definition at line 236 of file Infinite.h. |
|
||||||||||||||||
|
Binary Inequality comparison for one basic and one Infinite type object.
Definition at line 437 of file Infinite.h. |
|
||||||||||||||||
|
Binary Inequality comparison for one Infinite and one basic type object.
Definition at line 430 of file Infinite.h. |
|
||||||||||||||||
|
Binary Inequality comparison for two Infinite type objects.
Definition at line 423 of file Infinite.h. |
|
||||||||||||||||
|
Binary addition for one basic type object and one Infinite type object.
Definition at line 204 of file Infinite.h. |
|
||||||||||||||||
|
Binary addition for one Infinite type object and one basic type object.
Definition at line 196 of file Infinite.h. |
|
||||||||||||||||
|
Binary addition for two Infinite objects.
Definition at line 188 of file Infinite.h. |
|
||||||||||||||||
|
Binary subtraction for one basic type and one Infinite type object.
Definition at line 228 of file Infinite.h. |
|
||||||||||||||||
|
Binary subtraction for one Infinite type and one basic type object.
Definition at line 220 of file Infinite.h. |
|
||||||||||||||||
|
Binary subtraction for two Infinite objects.
Definition at line 212 of file Infinite.h. |
|
||||||||||||||||
|
Binary divide for one basic type object and one Infinite type object.
Definition at line 276 of file Infinite.h. |
|
||||||||||||||||
|
Binary divide for one Infinite type object and one basic type object.
Definition at line 268 of file Infinite.h. |
|
||||||||||||||||
|
Binary divide for two Infinite objects.
Definition at line 260 of file Infinite.h. |
|
||||||||||||||||
|
Binary Less-than operator for one basic and one Infinite type object.
Definition at line 374 of file Infinite.h. |
|
||||||||||||||||
|
Binary Less-than operator for one Infinite and one basic type object.
Definition at line 367 of file Infinite.h. |
|
||||||||||||||||
|
Binary Less-than operator for two Infinite types.
Definition at line 360 of file Infinite.h. |
|
||||||||||||||||
|
Basic output stream operator for printing out the value of the Infinite.
Definition at line 444 of file Infinite.h. |
|
||||||||||||||||
|
Binary Less-than-equal operator for one basic and one Infinite object.
Definition at line 327 of file Infinite.h. |
|
||||||||||||||||
|
Binary Less-than-equal operator for one Infinite and one basic object.
Definition at line 320 of file Infinite.h. |
|
||||||||||||||||
|
Binary Less-than-equal operator for two Infinite types.
Definition at line 308 of file Infinite.h. |
|
||||||||||||||||
|
Binary Equality comparison for one basic and one Infinite type object.
Definition at line 416 of file Infinite.h. |
|
||||||||||||||||
|
Binary Equality comparison for one Infinite and one basic type object.
Definition at line 409 of file Infinite.h. |
|
||||||||||||||||
|
Binary Equality comparison for two Infinite type objects.
Definition at line 402 of file Infinite.h. References Infinite< Type >::val(). |
|
||||||||||||||||
|
Binary Greater-than operator for one basic and one Infinite type object.
Definition at line 395 of file Infinite.h. |
|
||||||||||||||||
|
Binary Greater-than operator for one Infinite and one basic type object.
Definition at line 388 of file Infinite.h. |
|
||||||||||||||||
|
Binary Greater-than operator for two Infinite type objects.
Definition at line 381 of file Infinite.h. |
|
||||||||||||||||
|
Binary Greater-than-equal operator for one basic, one Infinite object.
Definition at line 353 of file Infinite.h. |
|
||||||||||||||||
|
Binary Greater-than-equal operator for one Infinite, one basic object.
Definition at line 346 of file Infinite.h. |
|
||||||||||||||||
|
Binary Greater-than-equal operator for two Infinite types.
Definition at line 334 of file Infinite.h. References Infinite< Type >::hasInfiniteValue(), Infinite< Type >::isInfinite(), Infinite< Type >::isNegativeInfinite(), and Infinite< Type >::val(). |
|
||||||||||||||||
|
Basic input stream operator to read in an Infinite value.
Definition at line 456 of file Infinite.h. |
|
||||||||||||||||
|
Binary power op for one basic type object and one Infinite type object.
Definition at line 300 of file Infinite.h. |
|
||||||||||||||||
|
Binary power op for one Infinite type object and one basic type object.
Definition at line 292 of file Infinite.h. |
|
||||||||||||||||
|
Binary power op for two Infinite objects.
Definition at line 284 of file Infinite.h. |
1.3.4