Klasse Komplex
Public Member Functions | List of all members
Komplex Class Reference

#include <komplex.h>

Public Member Functions

 Komplex ()
 
 Komplex (double re, double im=0.0)
 
 Komplex (const Komplex &org)
 
virtual ~Komplex ()
 
Komplexoperator= (const Komplex &rhs)
 Assignment operator. More...
 
double Get_re () const
 
void Set_re (double val)
 
double Get_im () const
 
void Set_im (double val)
 
Komplexoperator+= (const Komplex &rhs)
 
Komplex operator+ (const Komplex &rhs) const
 
double abs () const
 

Detailed Description

Klasse fuer komplexe Zahlen zur Demonstration.

Definition at line 9 of file komplex.h.

Constructor & Destructor Documentation

Komplex::Komplex ( )

Default constructor

Definition at line 7 of file komplex.cpp.

Komplex::Komplex ( double  re,
double  im = 0.0 
)

Parameter constructor

Parameters
[in]reRealteil
[in]imImaginaerteil (default value: 0.0)

Definition at line 13 of file komplex.cpp.

Komplex::Komplex ( const Komplex org)

Copy constructor

Parameters
[in]orgInstance to copy from

Definition at line 19 of file komplex.cpp.

Komplex::~Komplex ( )
virtual

Default destructor

Definition at line 25 of file komplex.cpp.

Member Function Documentation

double Komplex::abs ( ) const
inline

Absolutbetrag

Returns
Euklidischer Abstand zu 0+0i

Definition at line 89 of file komplex.h.

double Komplex::Get_im ( ) const
inline

Abfrage des Imaginaerteils

Returns
Imaginaerteil

Definition at line 60 of file komplex.h.

double Komplex::Get_re ( ) const
inline

Abfrage des Realteils

Returns
Realteil

Definition at line 43 of file komplex.h.

Komplex Komplex::operator+ ( const Komplex rhs) const

Addiert die aktuelle Instanz mit einer zweiten komplexen Zahl

Parameters
[in]rhszweite komplexe Zahl
Returns
*this + rhs

Definition at line 54 of file komplex.cpp.

Komplex & Komplex::operator+= ( const Komplex rhs)

Addiert zur aktuellen Instanz eine zweiten komplexen Zahl

Parameters
[in]rhszweite komplexe Zahl
Returns
aktuelle Instanz

Definition at line 40 of file komplex.cpp.

Komplex & Komplex::operator= ( const Komplex rhs)

Assignment operator.

Parameters
[in]rhsInstance that is assigned to the members.
Returns
reference to the current instance.

Definition at line 30 of file komplex.cpp.

void Komplex::Set_im ( double  val)
inline

Setzen des Imaginaerteils

Parameters
[in]valNew value to set

Definition at line 68 of file komplex.h.

void Komplex::Set_re ( double  val)
inline

Setzen des Realteils

Parameters
[in]valNew value to set

Definition at line 51 of file komplex.h.


The documentation for this class was generated from the following files: