Struct Growth

Struct Documentation

struct Growth

the order c^n n^p log^q n ( log log n )^r, and whether it is only an upper bound

Public Functions

inline double at(double n) const

the value at n, for n > e

Public Members

double c = 1

the base of the exponential

double p = 0

the power of n

double q = 0

the power of log n

double r = 0

the power of log log n

bool upper = false

O() rather than Theta()

Friends

inline friend std::partial_ordering operator<=>(const Growth &a, const Growth &b)

the order of the two functions for n large: lexicographic on c, p, q and r (upper is not compared)

inline friend bool operator==(const Growth &a, const Growth &b)