|
| template<class X , class Y , class FN > |
| auto | helpfn (const X &arg1, const Y &arg2, FN fn) |
| | helpfn Hilfsfunktion zur Implementierung von +,-,*,/ More...
|
| |
| template<class X , class Y , is_candidate_t< X, Y > * = nullptr> |
| auto | operator+ (const X &x, const Y &y) |
| |
| template<class X , class Y , is_candidate_t< X, Y > * = nullptr> |
| auto | operator- (const X &x, const Y &y) |
| |
| template<class X , class Y , is_candidate_t< X, Y > * = nullptr> |
| auto | operator* (const X &x, const Y &y) |
| |
| template<class X , class Y , is_candidate_t< X, Y > * = nullptr> |
| auto | operator/ (const X &x, const Y &y) |
| |
| template<typename X , typename Y , is_candidate_t< X, Y > * = nullptr> |
| bool | operator== (const X &x, const Y &y) |
| | operator == Vergleichsoperator More...
|
| |
| template<class X , class Y , is_candidate_t< X, Y > * = nullptr> |
| bool | operator!= (const X &r1, const Y &r2) |
| | operator != Vergleichsoperator More...
|
| |
| template<class T > |
| auto | pow (const Rational &r, T n) |
| | pow potenziere rationale Zahl More...
|
| |
| Rational | inverse (const Rational &r) |
| | invert inverse rationale Zahl More...
|
| |
| Rational | operator- (const Rational &r) |
| | negate eine rationale Zahl wird negiert More...
|
| |
| std::ostream & | operator<< (std::ostream &os, const Rational &r) |
| | operator << Ausgabe einer rationalen Zahl More...
|
| |
Rational Klasse für rationale Zahlen.
Definition at line 21 of file x011.h.
template<class X , class Y , class FN >
| auto helpfn |
( |
const X & |
arg1, |
|
|
const Y & |
arg2, |
|
|
FN |
fn |
|
) |
| |
|
friend |
helpfn Hilfsfunktion zur Implementierung von +,-,*,/
- Parameters
-
| arg1 | reelle, ganze oder rationale Zahl |
| arg2 | reelle, ganze oder rationale Zahl |
| fn | lambda Funktion für +,-,*,/ z.B. [](double &x, double y){ return x+=y; } |
Definition at line 165 of file x011.h.
template<class X , class Y , is_candidate_t< X, Y > * = nullptr>
| auto operator+ |
( |
const X & |
x, |
|
|
const Y & |
y |
|
) |
| |
|
friend |
Implementierung von +,-,*,/ Funktionen werden nur dann vom Compiler erzeugt, wenn Z oder Y eine rationale Zahl ist.
Definition at line 194 of file x011.h.
template<class T >
| constexpr bool nmx::apps::x011::Rational::is_int_like_v |
|
static |
Initial value:=
(std::is_arithmetic_v<T> &&std::is_integral_v<T>
&& !std::is_same_v<T, bool> && !std::is_same_v<T, char>)
Test: ist T eine ganze Zahl? std::is_arithmetic_v true wenn z.B. int, bool, float,... std::is_integral_v true wenn z.B. int, bool, char,...
Definition at line 78 of file x011.h.