Open
Graph Drawing
Framework

 v.2012.05
 

ogdf::Math Class Reference

#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

static int ogdf::Math::binomial ( int  n,
int  k 
) [inline, static]

Definition at line 62 of file Math.h.

static double ogdf::Math::binomial ( double  n,
double  k 
) [inline, static]

Definition at line 71 of file Math.h.

bool ogdf::Math::equald ( double  a,
double  b 
) [inline]

Definition at line 92 of file Math.h.

static int ogdf::Math::factorial ( int  n) [inline, static]

Definition at line 80 of file Math.h.

static double ogdf::Math::factorial ( double  n) [inline, static]

Definition at line 86 of file Math.h.

static int ogdf::Math::floorLog2 ( int  v) [inline, static]

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:
vThe 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

const double ogdf::Math::e [static]

Definition at line 60 of file Math.h.

const double ogdf::Math::pi [static]

Definition at line 56 of file Math.h.

const double ogdf::Math::pi_2 [static]

Definition at line 57 of file Math.h.

const double ogdf::Math::pi_4 [static]

Definition at line 58 of file Math.h.

const double ogdf::Math::two_pi [static]

Definition at line 59 of file Math.h.


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