The Original CHomP Software
Static Public Member Functions | List of all members
chomp::homology::dummyRounding< numType > Class Template Reference

A dummy class for rounding operations which does not actually do any rounding. More...

#include <digraph.h>

Static Public Member Functions

static numType add_down (const numType &x, const numType &y)
 Adds two numbers with the result rounded downwards. More...
 
static numType add_up (const numType &x, const numType &y)
 Adds two numbers with the result rounded upwards. More...
 
static numType sub_down (const numType &x, const numType &y)
 Subtracts two numbers with the result rounded downwards. More...
 
static numType sub_up (const numType &x, const numType &y)
 Subtracts two numbers with the result rounded upwards. More...
 
static numType mul_down (const numType &x, const numType &y)
 Multiplies two numbers with the result rounded downwards. More...
 
static numType mul_up (const numType &x, const numType &y)
 Multiplies two numbers with the result rounded upwards. More...
 
static numType div_down (const numType &x, const numType &y)
 Divides two numbers with the result rounded downwards. More...
 
static numType div_down (const numType &x, int_t y)
 Divides a number by an integer with the result rounded downwards. More...
 
static numType div_up (const numType &x, const numType &y)
 Divides two numbers with the result rounded upwards. More...
 

Detailed Description

template<class numType>
class chomp::homology::dummyRounding< numType >

A dummy class for rounding operations which does not actually do any rounding.

Please, use it as a template for your own rounding classes.

Definition at line 68 of file digraph.h.

Member Function Documentation

◆ add_down()

template<class numType >
static numType chomp::homology::dummyRounding< numType >::add_down ( const numType &  x,
const numType &  y 
)
inlinestatic

Adds two numbers with the result rounded downwards.

Definition at line 72 of file digraph.h.

73 { return x + y; }

◆ add_up()

template<class numType >
static numType chomp::homology::dummyRounding< numType >::add_up ( const numType &  x,
const numType &  y 
)
inlinestatic

Adds two numbers with the result rounded upwards.

Definition at line 76 of file digraph.h.

77 { return x + y; }

◆ div_down() [1/2]

template<class numType >
static numType chomp::homology::dummyRounding< numType >::div_down ( const numType &  x,
const numType &  y 
)
inlinestatic

Divides two numbers with the result rounded downwards.

Definition at line 96 of file digraph.h.

97 { return x / y; }

◆ div_down() [2/2]

template<class numType >
static numType chomp::homology::dummyRounding< numType >::div_down ( const numType &  x,
int_t  y 
)
inlinestatic

Divides a number by an integer with the result rounded downwards.

Definition at line 100 of file digraph.h.

101 { return x / y; }

◆ div_up()

template<class numType >
static numType chomp::homology::dummyRounding< numType >::div_up ( const numType &  x,
const numType &  y 
)
inlinestatic

Divides two numbers with the result rounded upwards.

Definition at line 104 of file digraph.h.

105 { return x / y; }

◆ mul_down()

template<class numType >
static numType chomp::homology::dummyRounding< numType >::mul_down ( const numType &  x,
const numType &  y 
)
inlinestatic

Multiplies two numbers with the result rounded downwards.

Definition at line 88 of file digraph.h.

89 { return x * y; }

◆ mul_up()

template<class numType >
static numType chomp::homology::dummyRounding< numType >::mul_up ( const numType &  x,
const numType &  y 
)
inlinestatic

Multiplies two numbers with the result rounded upwards.

Definition at line 92 of file digraph.h.

93 { return x * y; }

◆ sub_down()

template<class numType >
static numType chomp::homology::dummyRounding< numType >::sub_down ( const numType &  x,
const numType &  y 
)
inlinestatic

Subtracts two numbers with the result rounded downwards.

Definition at line 80 of file digraph.h.

81 { return x - y; }

◆ sub_up()

template<class numType >
static numType chomp::homology::dummyRounding< numType >::sub_up ( const numType &  x,
const numType &  y 
)
inlinestatic

Subtracts two numbers with the result rounded upwards.

Definition at line 84 of file digraph.h.

85 { return x - y; }

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