#include <ogdf/basic/Math.h>
List of all members.
Public Member Functions |
| bool | equald (double a, double b) |
Static Public Member Functions |
| static int | binomial (int n, int k) |
| static double | binomial (double n, double k) |
| static int | factorial (int n) |
| static double | factorial (double n) |
| static int | floorLog2 (int v) |
| | A fast method to obtain the rounded down binary logarithm of an 32-bit integer.
|
Static Public Attributes |
| static const double | pi |
| static const double | pi_2 |
| static const double | pi_4 |
| static const double | two_pi |
| static const double | e |
Detailed Description
Definition at line 54 of file Math.h.
Member Function Documentation
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 104 of file Math.h.
Member Data Documentation
The documentation for this class was generated from the following file: