STL
Komplex Class Reference

#include <komplex.h>

Public Member Functions

 Komplex ()
 
 Komplex (double re, double im=0.0)
 
virtual ~Komplex ()
 
 Komplex (Komplex const &org)=default
 
Komplexoperator= (Komplex const &org)=default
 
double Get_re () const
 
void Set_re (double val)
 
double Get_im () const
 
void Set_im (double val)
 
Komplex operator+ (const Komplex &rhs) const
 
bool operator< (const Komplex &rhs) const
 
bool operator== (const Komplex &rhs) const
 

Detailed Description

Klasse fuer komplexe Zahlen zur Demonstration.

Definition at line 6 of file komplex.h.

Constructor & Destructor Documentation

◆ Komplex() [1/3]

Komplex::Komplex ( )

Default constructor

Definition at line 5 of file komplex.cpp.

◆ Komplex() [2/3]

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

Parameter constructor

Definition at line 11 of file komplex.cpp.

◆ ~Komplex()

Komplex::~Komplex ( )
virtual

Default destructor

Definition at line 17 of file komplex.cpp.

◆ Komplex() [3/3]

Komplex::Komplex ( Komplex const &  org)
default

Member Function Documentation

◆ Get_im()

double Komplex::Get_im ( ) const
inline

Abfrage des Imaginaerteils

Returns
Imaginaerteil

Definition at line 39 of file komplex.h.

Here is the caller graph for this function:

◆ Get_re()

double Komplex::Get_re ( ) const
inline

Abfrage des Realteils

Returns
Realteil

Definition at line 24 of file komplex.h.

Here is the caller graph for this function:

◆ operator+()

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 22 of file komplex.cpp.

◆ operator<()

bool Komplex::operator< ( const Komplex rhs) const
inline

Vergleicht die aktuelle Instanz mit einer zweiten komplexen Zahl

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

Definition at line 62 of file komplex.h.

◆ operator=()

Komplex& Komplex::operator= ( Komplex const &  org)
default

◆ operator==()

bool Komplex::operator== ( const Komplex rhs) const
inline

Vergleicht die aktuelle Instanz mit einer zweiten komplexen Zahl auf Gleichheit

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

Definition at line 70 of file komplex.h.

◆ Set_im()

void Komplex::Set_im ( double  val)
inline

Setzen des Realteils

Parameters
[in]valNew value to set

Definition at line 46 of file komplex.h.

◆ Set_re()

void Komplex::Set_re ( double  val)
inline

Abfrage des Realteils

Parameters
[in]valNew value to set

Definition at line 31 of file komplex.h.


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