#include <ogdf/basic/Math.h>
List of all members.
Static Public Member Functions |
| static int | binomial (int n, int k) |
| | Returns \(n \choose k\).
|
| static double | binomial_d (int n, int k) |
| | Returns \(n \choose k\).
|
| static int | factorial (int n) |
| | Returns n!.
|
| static double | factorial_d (int n) |
| | Returns n!.
|
| static int | floorLog2 (int v) |
| | A fast method to obtain the rounded down binary logarithm of an 32-bit integer.
|
| static double | log2 (double x) |
| | Returns the logarithm of x to the base 2.
|
| static double | log4 (double x) |
| | Returns the logarithm of x to the base 4.
|
Static Public Attributes |
| static const double | e |
| | Euler's number.
|
| static const double | log_of_2 |
| | The constant log(2.0).
|
| static const double | log_of_4 |
| | The constant log(4.0).
|
| static const double | pi |
| | The constant \(\pi\).
|
| static const double | pi_2 |
| | The constant \(\frac{\pi}{2}\).
|
| static const double | pi_4 |
| | The constant \(\frac{\pi}{4}\).
|
| static const double | two_pi |
| | The constant \(2\pi\).
|
Detailed Description
Definition at line 55 of file Math.h.
Member Function Documentation
| static int ogdf::Math::binomial |
( |
int |
n, |
|
|
int |
k |
|
) |
| |
|
static |
| static double ogdf::Math::binomial_d |
( |
int |
n, |
|
|
int |
k |
|
) |
| |
|
static |
| static int ogdf::Math::factorial |
( |
int |
n | ) |
|
|
static |
| static double ogdf::Math::factorial_d |
( |
int |
n | ) |
|
|
static |
| static int ogdf::Math::floorLog2 |
( |
int |
v | ) |
|
|
inlinestatic |
A fast method to obtain the rounded down binary logarithm of an 32-bit integer.
This is based on http://en.wikipedia.org/wiki/Binary_logarithm
- Parameters:
-
| v | The number of which the binary logarithm is to be determined |
- Returns:
- The rounded down logarithm base 2 if v is positive, -1 otherwise
Definition at line 115 of file Math.h.
| static double ogdf::Math::log2 |
( |
double |
x | ) |
|
|
inlinestatic |
Returns the logarithm of x to the base 2.
Definition at line 80 of file Math.h.
| static double ogdf::Math::log4 |
( |
double |
x | ) |
|
|
inlinestatic |
Returns the logarithm of x to the base 4.
Definition at line 86 of file Math.h.
Member Data Documentation
| const double ogdf::Math::e |
|
static |
Euler's number.
Definition at line 71 of file Math.h.
| const double ogdf::Math::log_of_2 |
|
static |
The constant log(2.0).
Definition at line 74 of file Math.h.
| const double ogdf::Math::log_of_4 |
|
static |
The constant log(4.0).
Definition at line 77 of file Math.h.
| const double ogdf::Math::pi |
|
static |
The constant \(\pi\).
Definition at line 59 of file Math.h.
| const double ogdf::Math::pi_2 |
|
static |
The constant \(\frac{\pi}{2}\).
Definition at line 62 of file Math.h.
| const double ogdf::Math::pi_4 |
|
static |
The constant \(\frac{\pi}{4}\).
Definition at line 65 of file Math.h.
| const double ogdf::Math::two_pi |
|
static |
The constant \(2\pi\).
Definition at line 68 of file Math.h.
The documentation for this class was generated from the following file: