rational.cc File Reference

Implementation for class rational. More...

#include <ostream>
#include "rational.hh"
#include "euclid.hh"
Include dependency graph for rational.cc:

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &out, const rational &rat)
 Print a rational number to an output stream.

Detailed Description

Implementation for class rational.

Definition in file rational.cc.


Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const rational rat 
)

Print a rational number to an output stream.

A nominator of one will be omitted.

Parameters:
out the stream to which the number is written.
rat the rational number to be printed.
Returns:
a reference to the output stream.

Definition at line 41 of file rational.cc.

References rational::denom, and rational::nom.


Generated on Fri Aug 21 08:15:08 2009 for mqn2mps by  doxygen 1.6.0