OR-Tools  8.2
MathUtil

Detailed Description

Definition at line 29 of file mathutil.h.

Static Public Member Functions

template<typename IntegralType >
static IntegralType CeilOfRatio (IntegralType numerator, IntegralType denominator)
 
template<typename IntegralType >
static IntegralType FloorOfRatio (IntegralType numerator, IntegralType denominator)
 
static unsigned int GCD (unsigned int x, unsigned int y)
 
static unsigned int LeastCommonMultiple (unsigned int a, unsigned int b)
 
template<typename T >
static T Abs (const T x)
 
template<typename T >
static T Square (const T x)
 
static int64 GCD64 (int64 x, int64 y)
 
template<typename T >
static T IPow (T base, int exp)
 
template<class IntOut , class FloatIn >
static IntOut Round (FloatIn x)
 
static int64 FastInt64Round (double x)
 

Member Function Documentation

◆ Abs()

static T Abs ( const T  x)
inlinestatic

Definition at line 95 of file mathutil.h.

◆ CeilOfRatio()

static IntegralType CeilOfRatio ( IntegralType  numerator,
IntegralType  denominator 
)
inlinestatic

Definition at line 39 of file mathutil.h.

◆ FastInt64Round()

static int64 FastInt64Round ( double  x)
inlinestatic

Definition at line 138 of file mathutil.h.

◆ FloorOfRatio()

static IntegralType FloorOfRatio ( IntegralType  numerator,
IntegralType  denominator 
)
inlinestatic

Definition at line 53 of file mathutil.h.

◆ GCD()

static unsigned int GCD ( unsigned int  x,
unsigned int  y 
)
inlinestatic

Definition at line 68 of file mathutil.h.

◆ GCD64()

static int64 GCD64 ( int64  x,
int64  y 
)
inlinestatic

Definition at line 107 of file mathutil.h.

◆ IPow()

static T IPow ( base,
int  exp 
)
inlinestatic

Definition at line 119 of file mathutil.h.

◆ LeastCommonMultiple()

static unsigned int LeastCommonMultiple ( unsigned int  a,
unsigned int  b 
)
inlinestatic

Definition at line 79 of file mathutil.h.

◆ Round()

static IntOut Round ( FloatIn  x)
inlinestatic

Definition at line 124 of file mathutil.h.

◆ Square()

static T Square ( const T  x)
inlinestatic

Definition at line 101 of file mathutil.h.


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