gz/math/Helpers.hh
static const uint16_t DPRCT_INF_UI16
Definition: gz/math/Helpers.hh:379
static const size_t IGN_FIVE_SIZE_T
size_t type with a value of 5
Definition: gz/math/Helpers.hh:242
static const uint16_t LOW_UI16
16bit unsigned integer lowest value. This is equivalent to IGN_UINT16_MIN, and is defined here for co...
Definition: gz/math/Helpers.hh:294
static const float LOW_F
Float low value, equivalent to -MAX_F.
Definition: gz/math/Helpers.hh:278
static const uint64_t MAX_UI64
64bit unsigned integer maximum value
Definition: gz/math/Helpers.hh:339
T setprecision(T... args)
bool isEven(const int _v)
Check if parameter is even.
Definition: gz/math/Helpers.hh:446
static const int64_t LOW_I64
64bit unsigned integer lowest value. This is equivalent to IGN_INT64_MIN, and is defined here for com...
Definition: gz/math/Helpers.hh:359
static const int32_t INF_I32
32-bit unsigned integer positive infinite value
Definition: gz/math/Helpers.hh:336
Definition: gz/math/AdditivelySeparableScalarField3.hh:27
STL class.
void sort2(T &_a, T &_b)
Sort two numbers, such that _a <= _b.
Definition: gz/math/Helpers.hh:600
static const int32_t LOW_I32
32bit unsigned integer lowest value. This is equivalent to IGN_INT32_MIN, and is defined here for com...
Definition: gz/math/Helpers.hh:333
static const uint32_t LOW_UI32
32bit unsigned integer lowest value. This is equivalent to IGN_UINT32_MIN, and is defined here for co...
Definition: gz/math/Helpers.hh:320
int parseInt(const std::string &_input)
parse string into an integer
Definition: gz/math/Helpers.hh:704
static const size_t IGN_THREE_SIZE_T
size_t type with a value of 3
Definition: gz/math/Helpers.hh:236
std::pair< int64_t, int64_t > timePointToSecNsec(const std::chrono::steady_clock::time_point &_time)
Convert a std::chrono::steady_clock::time_point to a seconds and nanoseconds pair.
Definition: gz/math/Helpers.hh:763
T min(const std::vector< T > &_values)
get the minimum value of vector of values
Definition: gz/math/Helpers.hh:542
static const uint64_t DPRCT_MAX_UI64
Definition: gz/math/Helpers.hh:392
static const uint32_t INF_UI32
32-bit unsigned integer positive infinite value
Definition: gz/math/Helpers.hh:323
bool equal(const T &_a, const T &_b, const T &_epsilon=T(1e-6))
check if two values are equal, within a tolerance
Definition: gz/math/Helpers.hh:556
static const uint16_t DPRCT_MIN_UI16
Definition: gz/math/Helpers.hh:377
static const uint64_t DPRCT_LOW_UI64
Definition: gz/math/Helpers.hh:394
std::chrono::steady_clock::time_point secNsecToTimePoint(const uint64_t &_sec, const uint64_t &_nanosec)
Convert seconds and nanoseconds to std::chrono::steady_clock::time_point.
Definition: gz/math/Helpers.hh:782
std::chrono::steady_clock::time_point stringToTimePoint(const std::string &_timeString)
Convert a string to a std::chrono::steady_clock::time_point.
Definition: gz/math/Helpers.hh:1101
std::tuple< Durations... > breakDownDurations(DurationIn d)
break down durations NOTE: the template arguments must be properly ordered according to magnitude and...
Definition: gz/math/Helpers.hh:831
T quiet_NaN(T... args)
std::tuple< PairInput, PairInput > Unpair(const PairOutput _key)
The reverse of the Pair function. Accepts a key, produced from the Pair function, and returns a tuple...
STL class.
T size(T... args)
static const uint64_t DPRCT_INF_UI64
Definition: gz/math/Helpers.hh:395
static const int32_t MAX_I32
32bit unsigned integer maximum value
Definition: gz/math/Helpers.hh:326
static const int64_t INF_I64
64-bit unsigned integer positive infinite value
Definition: gz/math/Helpers.hh:362
static const uint64_t LOW_UI64
64bit unsigned integer lowest value. This is equivalent to IGN_UINT64_MIN, and is defined here for co...
Definition: gz/math/Helpers.hh:346
static const size_t IGN_EIGHT_SIZE_T
size_t type with a value of 8
Definition: gz/math/Helpers.hh:251
T setfill(T... args)
static const double INF_D
Double positive infinite value.
Definition: gz/math/Helpers.hh:266
bool isOdd(const int _v)
Check if parameter is odd.
Definition: gz/math/Helpers.hh:462
T fpclassify(T... args)
T find_first_not_of(T... args)
std::chrono::steady_clock::duration secNsecToDuration(const uint64_t &_sec, const uint64_t &_nanosec)
Convert seconds and nanoseconds to std::chrono::steady_clock::duration.
Definition: gz/math/Helpers.hh:799
bool isPowerOfTwo(unsigned int _x)
Is this a power of 2?
Definition: gz/math/Helpers.hh:650
static const double LOW_D
Double low value, equivalent to -MAX_D.
Definition: gz/math/Helpers.hh:263
constexpr T IGN_MASSMATRIX3_DEFAULT_TOLERANCE
The default tolerance value used by MassMatrix3::IsValid(), MassMatrix3::IsPositive(),...
Definition: gz/math/Helpers.hh:40
static const uint64_t INF_UI64
64-bit unsigned integer positive infinite value
Definition: gz/math/Helpers.hh:349
#define IGN_FP_VOLATILE
Define IGN_FP_VOLATILE for FP equality comparisons Use volatile parameters when checking floating poi...
Definition: gz/math/Helpers.hh:196
T lowest(T... args)
std::chrono::steady_clock::duration stringToDuration(const std::string &_timeString)
Convert a string to a std::chrono::steady_clock::duration.
Definition: gz/math/Helpers.hh:1059
bool greaterOrNearEqual(const T &_a, const T &_b, const T &_epsilon=1e-6)
inequality test, within a tolerance
Definition: gz/math/Helpers.hh:579
void appendToStream(std::ostream &_out, T _number)
Append a number to a stream. Makes sure "-0" is returned as "0".
Definition: gz/math/Helpers.hh:626
T isnan(T... args)
PairOutput Pair(const PairInput _a, const PairInput _b)
A pairing function that maps two values to a unique third value. This is an implement of Szudzik's fu...
T stoi(T... args)
static const uint16_t DPRCT_LOW_UI16
Definition: gz/math/Helpers.hh:378
static const float INF_F
float positive infinite value
Definition: gz/math/Helpers.hh:281
T precision(const T &_a, const unsigned int &_precision)
get value at a specified precision
Definition: gz/math/Helpers.hh:590
static const size_t IGN_TWO_SIZE_T
size_t type with a value of 2
Definition: gz/math/Helpers.hh:233
static const uint16_t DPRCT_MAX_UI16
Definition: gz/math/Helpers.hh:376
bool isTimeString(const std::string &_timeString)
Check if the given string represents a time. An example time string is "0 00:00:00....
Definition: gz/math/Helpers.hh:925
static const uint16_t INF_UI16
16-bit unsigned integer positive infinite value
Definition: gz/math/Helpers.hh:297
T infinity(T... args)
STL class.
T isinf(T... args)
static const size_t IGN_SIX_SIZE_T
size_t type with a value of 6
Definition: gz/math/Helpers.hh:245
static const int NAN_I
Returns the representation of a quiet not a number (NAN)
Definition: gz/math/Helpers.hh:365
unsigned int roundUpPowerOfTwo(unsigned int _x)
Get the smallest power of two that is greater or equal to a given value.
Definition: gz/math/Helpers.hh:660
T clamp(T _v, T _min, T _max)
Simple clamping function.
Definition: gz/math/Helpers.hh:406
static const std::regex time_regex("^([0-9]+ ){0,1}" "(?:([1-9]:|[0-1][0-9]:|2[0-3]:){0,1}" "([0-9]:|[0-5][0-9]:)){0,1}" "(?:([0-9]|[0-5][0-9]){0,1}" "(\\.[0-9]{1,3}){0,1})$")
static const uint32_t DPRCT_MAX_UI32
Definition: gz/math/Helpers.hh:384
T erase(T... args)
static const uint64_t DPRCT_MIN_UI64
Definition: gz/math/Helpers.hh:393
static const uint32_t MAX_UI32
32bit unsigned integer maximum value
Definition: gz/math/Helpers.hh:313
static const int16_t INF_I16
16-bit unsigned integer positive infinite value
Definition: gz/math/Helpers.hh:310
static const uint32_t DPRCT_LOW_UI32
Definition: gz/math/Helpers.hh:386
std::pair< int64_t, int64_t > durationToSecNsec(const std::chrono::steady_clock::duration &_dur)
Convert a std::chrono::steady_clock::duration to a seconds and nanoseconds pair.
Definition: gz/math/Helpers.hh:811
std::string durationToString(const std::chrono::steady_clock::duration &_duration)
Convert a std::chrono::steady_clock::duration to a string.
Definition: gz/math/Helpers.hh:872
static const double MIN_D
Double min value. This value will be similar to 2.22507e-308.
Definition: gz/math/Helpers.hh:260
T regex_search(T... args)
T swap(T... args)
T min(T... args)
static const int16_t LOW_I16
16bit unsigned integer lowest value. This is equivalent to IGN_INT16_MIN, and is defined here for com...
Definition: gz/math/Helpers.hh:307
STL class.
static const size_t IGN_NINE_SIZE_T
size_t type with a value of 9
Definition: gz/math/Helpers.hh:254
static const uint32_t MIN_UI32
32bit unsigned integer minimum value
Definition: gz/math/Helpers.hh:316
T variance(const std::vector< T > &_values)
get variance of vector of values
Definition: gz/math/Helpers.hh:515
static const uint32_t DPRCT_MIN_UI32
Definition: gz/math/Helpers.hh:385
T round(T... args)
static const float MIN_F
Float minimum value. This value will be similar to 1.17549e-38.
Definition: gz/math/Helpers.hh:275
T stod(T... args)
static const int64_t MAX_I64
64bit unsigned integer maximum value
Definition: gz/math/Helpers.hh:352
T duration_cast(T... args)
static const size_t IGN_FOUR_SIZE_T
size_t type with a value of 4
Definition: gz/math/Helpers.hh:239
bool lessOrNearEqual(const T &_a, const T &_b, const T &_epsilon=1e-6)
inequality test, within a tolerance
Definition: gz/math/Helpers.hh:568
static const size_t IGN_ZERO_SIZE_T
size_t type with a value of 0
Definition: gz/math/Helpers.hh:227
bool splitTimeBasedOnTimeRegex(const std::string &_timeString, uint64_t &numberDays, uint64_t &numberHours, uint64_t &numberMinutes, uint64_t &numberSeconds, uint64_t &numberMilliseconds)
Split a std::chrono::steady_clock::duration to a string.
Definition: gz/math/Helpers.hh:976
static const double MAX_D
Double maximum value. This value will be similar to 1.79769e+308.
Definition: gz/math/Helpers.hh:257
static const size_t IGN_ONE_SIZE_T
size_t type with a value of 1
Definition: gz/math/Helpers.hh:230
std::string timePointToString(const std::chrono::steady_clock::time_point &_point)
Convert a std::chrono::steady_clock::time_point to a string.
Definition: gz/math/Helpers.hh:845
void sort3(T &_a, T &_b, T &_c)
Sort three numbers, such that _a <= _b <= _c.
Definition: gz/math/Helpers.hh:612
static const uint32_t DPRCT_INF_UI32
Definition: gz/math/Helpers.hh:387
T fixed(T... args)
static const float MAX_F
Float maximum value. This value will be similar to 3.40282e+38.
Definition: gz/math/Helpers.hh:272
T empty(T... args)
STL class.
T mean(const std::vector< T > &_values)
get mean of vector of values
Definition: gz/math/Helpers.hh:503
static const int64_t MIN_I64
64bit unsigned integer minimum value
Definition: gz/math/Helpers.hh:355
static const size_t IGN_SEVEN_SIZE_T
size_t type with a value of 7
Definition: gz/math/Helpers.hh:248
T setw(T... args)
static const uint16_t MIN_UI16
16bit unsigned integer minimum value
Definition: gz/math/Helpers.hh:290
T max(T... args)
int roundUpMultiple(int _num, int _multiple)
Round a number up to the nearest multiple. For example, if the input number is 12 and the multiple is...
Definition: gz/math/Helpers.hh:686
static const double NAN_D
Returns the representation of a quiet not a number (NAN)
Definition: gz/math/Helpers.hh:269
static const int16_t MAX_I16
16bit unsigned integer maximum value
Definition: gz/math/Helpers.hh:300
static const uint16_t MAX_UI16
16bit unsigned integer maximum value
Definition: gz/math/Helpers.hh:287
static const int16_t MIN_I16
16bit unsigned integer minimum value
Definition: gz/math/Helpers.hh:303
T max(const std::vector< T > &_values)
get the maximum value of vector of values
Definition: gz/math/Helpers.hh:529
double parseFloat(const std::string &_input)
parse string into float
Definition: gz/math/Helpers.hh:733
static const int32_t MIN_I32
32bit unsigned integer minimum value
Definition: gz/math/Helpers.hh:329
std::chrono::duration< uint64_t, std::ratio< 86400 > > days
This will exist in C++-20.
Definition: gz/math/Helpers.hh:821
static const uint64_t MIN_UI64
64bit unsigned integer minimum value
Definition: gz/math/Helpers.hh:342
static const float NAN_F
Returns the representation of a quiet not a number (NAN)
Definition: gz/math/Helpers.hh:284
T pow(T... args)