Geogram
Version 1.9.1-rc
A programming library of geometric algorithms
|
Defines numeric types used in Vorpaline. More...
Classes | |
struct | LimitsHelper |
Limits helper class that extends std::numeric_limits. More... | |
struct | LimitsHelper< T, true > |
Specialization of LimitsHelper for numeric types. More... | |
struct | Limits |
Extends std::numeric_limits with additional information. More... | |
Typedefs | |
typedef void * | pointer |
typedef int8_t | int8 |
typedef int16_t | int16 |
typedef int32_t | int32 |
typedef int64_t | int64 |
typedef uint8_t | uint8 |
typedef uint16_t | uint16 |
typedef uint32_t | uint32 |
typedef uint64_t | uint64 |
typedef float | float32 |
typedef double | float64 |
Functions | |
float32 | max_float32 () |
Gets 32 bits float maximum positive value. | |
float32 | min_float32 () |
Gets 32 bits float minimum negative value. | |
float64 | max_float64 () |
Gets 64 bits float maximum positive value. | |
float64 | min_float64 () |
Gets 64 bits float minimum negative value. | |
bool | is_nan (float32 x) |
Checks whether a 32 bits float is "not a number". | |
bool | is_nan (float64 x) |
Checks whether a 64 bits float is "not a number". | |
void | random_reset () |
Resets the random number generator. | |
int32 | random_int32 () |
Returns a 32 bits integer between 0 and RAND_MAX. | |
float32 | random_float32 () |
Returns a 32 bits float between 0 and 1. | |
float64 | random_float64 () |
Returns a 64 bits float between 0 and 1. | |
template<class T > | |
void | optimize_number_representation (T &x) |
place holder for optimizing internal number representation More... | |
template<class T > | |
Sign | ratio_compare (const T &a_num, const T &a_denom, const T &b_num, const T &b_denom) |
Compares two rational numbers given as separate numerators and denominators. More... | |
template<class T > | |
void | optimize_number_representation (rationalg< T > &x) |
template<class T > | |
void | optimize_number_representation (vecng< 2, T > &v) |
template<class T > | |
void | optimize_number_representation (vecng< 3, T > &v) |
template<class T > | |
void | optimize_number_representation (vec2Hg< T > &v) |
template<class T > | |
void | optimize_number_representation (vec3Hg< T > &v) |
template<> | |
void | optimize_number_representation (expansion_nt &x) |
template<> | |
Sign | ratio_compare (const expansion_nt &a_num, const expansion_nt &a_denom, const expansion_nt &b_num, const expansion_nt &b_denom) |
Compares two rational numbers given as separate numerators and denominators. Specialization for exact_nt. More... | |
Defines numeric types used in Vorpaline.
These types names have the form (u)int<size> or float<size>, where the (optional) u denotes an unsigned type, and the size is in bits.
typedef float GEO::Numeric::float32 |
typedef double GEO::Numeric::float64 |
typedef int16_t GEO::Numeric::int16 |
typedef int32_t GEO::Numeric::int32 |
typedef int64_t GEO::Numeric::int64 |
typedef int8_t GEO::Numeric::int8 |
typedef void* GEO::Numeric::pointer |
typedef uint16_t GEO::Numeric::uint16 |
typedef uint32_t GEO::Numeric::uint32 |
typedef uint64_t GEO::Numeric::uint64 |
typedef uint8_t GEO::Numeric::uint8 |
|
inline |
place holder for optimizing internal number representation
there are specializations for expansion_nt, rational_nt
Sign GEO::Numeric::ratio_compare | ( | const expansion_nt & | a_num, |
const expansion_nt & | a_denom, | ||
const expansion_nt & | b_num, | ||
const expansion_nt & | b_denom | ||
) |
Compares two rational numbers given as separate numerators and denominators. Specialization for exact_nt.
[in] | a_num,a_denom | defines a = a_num / a_denom |
[in] | b_num,b_denom | defines b = b_num / b_denom |
|
inline |