1#ifndef STORM_UTILITY_CONSTANTS_H_
2#define STORM_UTILITY_CONSTANTS_H_
25template<
typename IndexType,
typename ValueType>
29template<
typename RationalType>
35template<
typename ValueType>
37 typedef std::less<ValueType>
type;
42 return (a == 0.0 && b > 0.0) || (b - a > 1e-17);
51template<
typename ValueType>
53 typedef std::greater<ValueType>
type;
58 return (b == 0.0 && a > 0.0) || (a - b > 1e-17);
68template<
typename ValueType>
71template<
typename ValueType>
74template<
typename ValueType>
77template<
typename ValueType>
80template<
typename ValueType>
83template<
typename ValueType>
84bool isOne(ValueType
const& a);
86template<
typename ValueType>
87bool isZero(ValueType
const& a);
89template<
typename ValueType>
90bool isNan(ValueType
const& a);
92template<
typename ValueType>
95template<
typename ValueType>
98template<
typename ValueType>
101template<
typename ValueType>
104template<
typename ValueType>
107template<
typename TargetType,
typename SourceType>
110template<
typename ValueType>
111std::pair<ValueType, ValueType>
asFraction(ValueType
const& number);
113template<
typename ValueType>
116template<
typename IndexType,
typename ValueType>
119template<
typename IndexType,
typename ValueType>
122template<
typename ValueType>
123std::pair<ValueType, ValueType>
minmax(std::vector<ValueType>
const& values);
125template<
typename ValueType>
126ValueType
minimum(std::vector<ValueType>
const& values);
128template<
typename ValueType>
129ValueType
maximum(std::vector<ValueType>
const& values);
131template<
typename K,
typename ValueType>
132std::pair<ValueType, ValueType>
minmax(std::map<K, ValueType>
const& values);
134template<
typename K,
typename ValueType>
135ValueType
minimum(std::map<K, ValueType>
const& values);
137template<
typename K,
typename ValueType>
138ValueType
maximum(std::map<K, ValueType>
const& values);
140template<
typename ValueType>
141ValueType
pow(ValueType
const& value, int_fast64_t exponent);
143template<
typename ValueType>
144ValueType
max(ValueType
const& first, ValueType
const& second);
146template<
typename ValueType>
147ValueType
min(ValueType
const& first, ValueType
const& second);
149template<
typename ValueType>
150ValueType
sqrt(ValueType
const& number);
152template<
typename ValueType>
153ValueType
abs(ValueType
const& number);
155template<
typename ValueType>
156ValueType
floor(ValueType
const& number);
158template<
typename ValueType>
159ValueType
ceil(ValueType
const& number);
161template<
typename ValueType>
162ValueType
round(ValueType
const& number);
164template<
typename ValueType>
165ValueType
log(ValueType
const& number);
167template<
typename ValueType>
168ValueType
log10(ValueType
const& number);
170template<
typename ValueType>
171ValueType
cos(ValueType
const& number);
173template<
typename ValueType>
174ValueType
sin(ValueType
const& number);
176template<
typename ValueType>
179template<
typename RationalType>
182template<
typename RationalType>
188template<
typename IntegerType>
189std::pair<IntegerType, IntegerType>
divide(IntegerType
const& dividend, IntegerType
const& divisor);
191template<
typename IntegerType>
192IntegerType
mod(IntegerType
const& first, IntegerType
const& second);
194template<
typename ValueType>
195std::string
to_string(ValueType
const& value);
ValueType max(ValueType const &first, ValueType const &second)
bool isOne(ValueType const &a)
NumberTraits< RationalType >::IntegerType denominator(RationalType const &number)
NumberTraits< RationalType >::IntegerType numerator(RationalType const &number)
bool isConstant(ValueType const &)
ValueType simplify(ValueType value)
ValueType min(ValueType const &first, ValueType const &second)
ValueType sin(ValueType const &number)
bool isAlmostZero(ValueType const &a)
bool isAlmostOne(ValueType const &a)
ValueType floor(ValueType const &number)
std::pair< ValueType, ValueType > asFraction(ValueType const &number)
bool isZero(ValueType const &a)
ValueType minimum(std::vector< ValueType > const &values)
ValueType ceil(ValueType const &number)
bool isInteger(ValueType const &number)
ValueType abs(ValueType const &number)
bool isNan(ValueType const &)
std::string to_string(ValueType const &value)
std::pair< ValueType, ValueType > minmax(std::vector< ValueType > const &values)
typename detail::ElementLess< ValueType >::type ElementLess
typename detail::ElementGreater< ValueType >::type ElementGreater
NumberTraits< ValueType >::IntegerType trunc(ValueType const &number)
std::pair< IntegerType, IntegerType > divide(IntegerType const ÷nd, IntegerType const &divisor)
(Integer-)Divides the dividend by the divisor and returns the result plus the remainder.
IntegerType mod(IntegerType const &first, IntegerType const &second)
ValueType pow(ValueType const &value, int_fast64_t exponent)
ValueType log(ValueType const &number)
ValueType maximum(std::vector< ValueType > const &values)
ValueType cos(ValueType const &number)
ValueType sqrt(ValueType const &number)
bool isInfinity(ValueType const &a)
ValueType log10(ValueType const &number)
ValueType round(ValueType const &number)
TargetType convertNumber(SourceType const &number)
bool operator()(double a, double b) const
bool operator()(double a, double b) const
std::greater< ValueType > type
std::less< ValueType > type