|
Template class Komplex with concepts
|
#include <komplex.h>
Public Member Functions | |
| Komplex () | |
| Komplex (T re, T im=0.0) | |
| Komplex (const Komplex< T > &org)=default | |
| Komplex (Komplex< T > &&org)=default | |
| Komplex< T > & | operator= (const Komplex< T > &rhs)=default |
| Komplex< T > & | operator= (Komplex< T > &&rhs)=default |
| ~Komplex ()=default | |
| T | Get_re () const |
| void | Set_re (T val) |
| T | Get_im () const |
| void | Set_im (T val) |
| Komplex< T > & | operator+= (const Komplex< T > &rhs) |
| Komplex< T > | operator+ (const Komplex< T > &rhs) const |
| bool | operator< (const Komplex< T > &rhs) const |
| bool | operator== (const Komplex< T > &rhs) const |
| bool | operator> (const Komplex< T > &rhs) const |
| Komplex () | |
| Komplex (T re, T im=0.0) | |
| Komplex (const Komplex< T > &org)=default | |
| Komplex (Komplex< T > &&org)=default | |
| Komplex< T > & | operator= (const Komplex< T > &rhs)=default |
| Komplex< T > & | operator= (Komplex< T > &&rhs)=default |
| ~Komplex ()=default | |
| T | Get_re () const |
| void | Set_re (T val) |
| T | Get_im () const |
| void | Set_im (T val) |
| Komplex< T > & | operator+= (const Komplex< T > &rhs) |
| Komplex< T > | operator+ (const Komplex< T > &rhs) const |
| bool | operator< (const Komplex< T > &rhs) const |
| bool | operator== (const Komplex< T > &rhs) const |
| bool | operator> (const Komplex< T > &rhs) const |
Friends | |
| template<class S > | |
| std::ostream & | operator<< (std::ostream &s, const Komplex< S > &rhs) |
| template<class S > | |
| std::ostream & | operator<< (std::ostream &s, const Komplex< S > &rhs) |
Template Klasse fuer komplexe Zahlen zur Demonstration.
| T | floating point type |
Default constructor initializes both components by zero.
Definition at line 25 of file komplex2.h.
Parameter constructor
| [in] | re | Realteil |
| [in] | im | Imaginaerteil (default value: 0.0) |
Definition at line 32 of file komplex2.h.
|
inline |
|
inline |
|
inline |
|
inline |
Addiert die aktuelle Instanz mit einer zweiten komplexen Zahl
| [in] | rhs | zweite komplexe Zahl |
*this + rhs Addiert die aktuelle Instanz mit einer zweiten komplexen Zahl
| [in] | rhs | zweite komplexe Zahl |
*this + rhs Addiert zur aktuellen Instanz eine zweite komplexe Zahl
| [in] | rhs | zweite komplexe Zahl |
*this += rhs Addiert zur aktuellen Instanz eine zweite komplexe Zahl
| [in] | rhs | zweite komplexe Zahl |
*this += rhs Definition at line 87 of file komplex2.h.
Definition at line 92 of file komplex2.h.
Definition at line 97 of file komplex2.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
friend |
Ausgabeoperator fuer die Klasse.
| [in] | s | ein beliebiger Ausgabestrom |
| [in] | rhs | die auszugebende Instanz |
|
friend |
Ausgabeoperator fuer die Klasse.
| [in] | s | ein beliebiger Ausgabestrom |
| [in] | rhs | die auszugebende Instanz |