#include <CNormalFraction.h>
List of all members.
Constructor & Destructor Documentation
CNormalFraction::CNormalFraction |
( |
| ) |
|
CNormalFraction::~CNormalFraction |
( |
| ) |
[virtual] |
Member Function Documentation
bool CNormalFraction::cancel |
( |
| ) |
|
Cancel common items of mpNumerator and mpDenominator.
- Returns:
- true.
bool CNormalFraction::checkDenominatorOne |
( |
| ) |
const |
Check if the denominator of this fraction equals 1.
- Returns:
- bool
bool CNormalFraction::checkForFractions |
( |
| ) |
const |
Check if this fraction contains further fractions.
- Returns:
- bool.
bool CNormalFraction::checkIsOne |
( |
| ) |
const |
bool CNormalFraction::checkIsZero |
( |
| ) |
const |
bool CNormalFraction::checkNumeratorOne |
( |
| ) |
const |
Check if the numerator of this fraction equals 1.
- Returns:
- bool
Check if the denominator of this fraction equals 1.
- Returns:
- bool
CNormalBase * CNormalFraction::copy |
( |
| ) |
const [virtual] |
Returns a fraction that is 1/1. It creates a new fraction and sets the numerator and the denominator to a unit sum.
bool CNormalFraction::expand |
( |
const CNormalLcm & |
lcm | ) |
|
Expand this fraction by a lcm.
- Returns:
- true.
const CNormalLcm * CNormalFraction::findLcm |
( |
| ) |
const |
Find lcm of denominators of respective fractions contained in this fraction.
- Returns:
- pointer to lcm.
Retrieve the denominator of this fraction.
- Returns:
- mpDenominator.
const CNormalSum & CNormalFraction::getDenominator |
( |
| ) |
const |
Retrieve the denominator of this fraction.
- Returns:
- mpDenominator.
Retrieve the numerator of this fraction.
- Returns:
- mpNumerator.
const CNormalSum & CNormalFraction::getNumerator |
( |
| ) |
const |
Retrieve the numerator of this fraction.
- Returns:
- mpNumerator.
bool CNormalFraction::multiply |
( |
const C_FLOAT64 & |
number | ) |
|
Multiply this fraction with a number.
- Returns:
- true.
Multiply a fraction with an itempower.
- Returns:
- true.
Multiply this fraction by a lcm.
- Returns:
- CNormalSum*, pointer to result of multiplication ie. a normal sum. This fraction is useless now.
bool CNormalFraction::setDenominator |
( |
const CNormalSum & |
denominator | ) |
|
Set denominator of this fraction.
- Returns:
- true.
bool CNormalFraction::setDenominatorOne |
( |
| ) |
|
Set the denominator of this fraction equal 1.
- Returns:
- true.
bool CNormalFraction::setNumerator |
( |
const CNormalSum & |
numerator | ) |
|
Set numerator of this fraction
- Returns:
- true.
bool CNormalFraction::simplify |
( |
| ) |
[virtual] |
Check if numerator and denominator contain fractions, find lcm of respective denominators, expand this fraction by lcm and cancel.
- Returns:
- true
Implements CNormalBase.
std::string CNormalFraction::toString |
( |
| ) |
const [virtual] |
The documentation for this class was generated from the following files: