|
Template class Komplex alt
|
#include <komplex.h>
Public Member Functions | |
| Komplex () | |
| Komplex (T re, T im=0.0) | |
| Komplex (const Komplex< T > &orig)=default | |
| Komplex< T > & | operator= (const Komplex< T > &rhs)=default |
| virtual | ~Komplex () |
| 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 Klasse fuer komplexe Zahlen zur Demonstration.
| T | floating point type |
|
inline |
|
inline |
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
|
inline |
|
inline |
|
friend |
Ausgabeoperator fuer die Klasse.
| [in] | s | ein beliebiger Ausgabestrom |
| [in] | rhs | die auszugebende Instanz |