problemscpp
A collection of my answers to algorithm problems in c++.
|
分数 更多...
#include <templates.h>
Public 成员函数 | |
Fraction (bool positive, long long numerator, long long denominator) | |
unsigned long long | get_denominator () const |
unsigned long long | get_numerator () const |
bool | is_positive () const |
Fraction | operator* (const Fraction &f) const |
Fraction | operator+ (const Fraction &f) const |
Fraction | operator- (const Fraction &f) const |
Fraction | operator/ (const Fraction &f) const |
Private 成员函数 | |
void | simplify () |
Private 属性 | |
unsigned long long | denominator |
分母 更多... | |
unsigned long long | numerator |
分子 更多... | |
bool | positive |
正负 更多... | |
友元 | |
ostream & | operator<< (ostream &os, const Fraction &frac) |
分数
在文件 templates.h 第 71 行定义.
Fraction::Fraction | ( | bool | positive, |
long long | numerator, | ||
long long | denominator | ||
) |
在文件 templates.cpp 第 401 行定义.
引用了 denominator, numerator, positive , 以及 simplify().
被这些函数引用 operator/().
unsigned long long Fraction::get_denominator | ( | ) | const |
unsigned long long Fraction::get_numerator | ( | ) | const |
bool Fraction::is_positive | ( | ) | const |
在文件 templates.cpp 第 438 行定义.
引用了 denominator, numerator , 以及 positive.
在文件 templates.cpp 第 414 行定义.
引用了 denominator, numerator , 以及 positive.
在文件 templates.cpp 第 426 行定义.
引用了 denominator, numerator , 以及 positive.
在文件 templates.cpp 第 450 行定义.
引用了 Fraction(), denominator, numerator , 以及 positive.
|
private |
|
friend |
在文件 templates.cpp 第 452 行定义.
|
private |
分母
在文件 templates.h 第 75 行定义.
被这些函数引用 Fraction(), get_denominator(), operator*(), operator+(), operator-(), operator/() , 以及 simplify().
|
private |
分子
在文件 templates.h 第 74 行定义.
被这些函数引用 Fraction(), get_numerator(), operator*(), operator+(), operator-(), operator/() , 以及 simplify().
|
private |
正负
在文件 templates.h 第 73 行定义.
被这些函数引用 Fraction(), is_positive(), operator*(), operator+(), operator-() , 以及 operator/().