#include "fkt.h"
#include <cassert>
#include <iostream>
#include <string>
#include <vector>
Go to the source code of this file.
|
| double | sgn (const double x) |
| |
| float | sgn (const float x) |
| |
| size_t | sgn (const string x) |
| |
| void | copy_vek (const vector< int > &a, vector< int > &b) |
| |
| void | set_value (int &a) |
| |
| float | mypow (const float x, const int k) |
| |
◆ copy_vek()
| void copy_vek |
( |
const vector< int > & |
a, |
|
|
vector< int > & |
b |
|
) |
| |
Kopiert eine Vektor auf den anderen. Der Vektor b wird bei Bedarf reallokiert.
- Parameters
-
| [in] | a | zu kopierender Vektor |
| [out] | b | kopierter Vektor |
Definition at line 56 of file fkt.cpp.
◆ mypow()
| float mypow |
( |
const float |
x, |
|
|
const int |
k |
|
) |
| |
Meine eigene Powerfunktion. Rekursive Implementierung.
- Parameters
-
| [in] | x | reelle Zahl |
| [in] | k | ganze Zahl >=0 |
- Returns
- x^k
- Warning
- Bricht ab falls k < 0.
Definition at line 69 of file fkt.cpp.
◆ set_value()
| void set_value |
( |
int & |
a | ) |
|
Demonstration der Uebergabe via Refeerenz und Aenderung des Wertes der Variablen.
- Parameters
-
Definition at line 63 of file fkt.cpp.
◆ sgn() [1/3]
| double sgn |
( |
const double |
x | ) |
|
Signum-Funktion.
- Parameters
-
| [in] | x | doppelt genaue reelle Zahl |
- Returns
- Vorzeichen der Zahl (0 ==> 0)
Definition at line 9 of file fkt.cpp.
◆ sgn() [2/3]
| float sgn |
( |
const float |
x | ) |
|
Signum-Funktion.
- Parameters
-
| [in] | x | einfach genaue reelle Zahl |
- Returns
- Vorzeichen der Zahl (0 ==> 0)
Definition at line 28 of file fkt.cpp.
◆ sgn() [3/3]
| size_t sgn |
( |
const string |
x | ) |
|
Demonstration einer weiteren Signatur mit Funktion sgn.
- Parameters
-
- Returns
- Laenge des strings
Definition at line 47 of file fkt.cpp.