#include "Musimat.h"#include "float.h"Go to the source code of this file.
Functions | |
| ostream & | operator<< (ostream &os, Rational &r) |
| istream & | operator>> (istream &is, Rational &p) |
| RationalList | RealListToRationalList (RealList R) |
| Convert a RealList to a RationalList. | |
| ostream& operator<< | ( | ostream & | os, | |
| Rational & | r | |||
| ) |
| istream& operator>> | ( | istream & | is, | |
| Rational & | p | |||
| ) |
Definition at line 27 of file Rational.cpp.
References Rational::m_den, Rational::m_num, and Return.
00028 { 00029 char ch; 00030 is >> ch && (ch == '{' || ch == '(') 00031 && is >> p.m_num >> ch && ch == ',' 00032 && is >> p.m_den >> ch && (ch == '}' || ch == '('); 00033 Return is; 00034 }
| RationalList RealListToRationalList | ( | RealList | R | ) |
Convert a RealList to a RationalList.
| R | RealList |
Definition at line 36 of file Rational.cpp.
References For, Length(), and Return.
00037 { 00038 RationalList L; 00039 For (Integer i = 0; i < Length( R ); i++ ) { 00040 Rational x(R[i]); 00041 L[i] = x; 00042 } 00043 Return( L ); 00044 }
1.4.7