32template<
typename ValueType>
122template<
typename ValueType>
126 std::make_pair(std::make_shared<dep_sd_t>(
sd),
value_t{1.0}));
143template<
typename ValueType>
145 os << u.
mean() <<
"+/-" << u.
sd();
159template<
typename ValueType1,
typename ValueType2>
162 if constexpr(!std::is_same_v<ValueType1, ValueType2>) {
165 if(lhs.
mean() != rhs.
mean())
return false;
166 if(lhs.
sd() != rhs.
sd())
return false;
167 if(lhs.
deps() != rhs.
deps())
return false;
182template<
typename ValueType1,
typename ValueType2>
185 return !(lhs == rhs);
200template<
typename ValueType1,
typename ValueType2>
218template<
typename ValueType1,
typename ValueType2>
234template<
typename ValueType1,
typename ValueType2>
237 return (lhs == rhs) || (lhs < rhs);
250template<
typename ValueType1,
typename ValueType2>
253 return (lhs == rhs) || (lhs > rhs);
Models an unceratin variable.
Definition uncertain.hpp:33
std::ostream & operator<<(std::ostream &os, const Uncertain< ValueType > &u)
Overload stream insertion to print uncertain variable.
Definition uncertain.hpp:144
bool operator<=(const Uncertain< ValueType1 > &lhs, const Uncertain< ValueType2 > &rhs)
Whether one variable is less than or equal to another.
Definition uncertain.hpp:235
bool operator>(const Uncertain< ValueType1 > &lhs, const Uncertain< ValueType2 > &rhs)
Whether one variable is greater than another.
Definition uncertain.hpp:219
Uncertain(value_t mean, value_t sd)
Construct an uncertain value from mean and standard deviation.
Definition uncertain.hpp:123
value_t mean() const
Definition uncertain.hpp:82
std::map< dep_sd_ptr, value_t > deps_map_t
Definition uncertain.hpp:48
bool operator>=(const Uncertain< ValueType1 > &lhs, const Uncertain< ValueType2 > &rhs)
Whether one variable is greater than or equal to another.
Definition uncertain.hpp:251
value_t dep_sd_t
Definition uncertain.hpp:42
bool operator<(const Uncertain< ValueType1 > &lhs, const Uncertain< ValueType2 > &rhs)
Whether one variable is less than another.
Definition uncertain.hpp:201
const deps_map_t & deps() const
Get the dependencies of the variable.
Definition uncertain.hpp:98
Uncertain< float > my_t
Definition uncertain.hpp:36
Uncertain() noexcept=default
Default ctor.
bool operator==(const Uncertain< ValueType1 > &lhs, const Uncertain< ValueType2 > &rhs)
Compare two variables for equality.
Definition uncertain.hpp:160
bool operator!=(const Uncertain< ValueType1 > &lhs, const Uncertain< ValueType2 > &rhs)
Compare two variables for inequality.
Definition uncertain.hpp:183
float value_t
Definition uncertain.hpp:39
value_t sd() const
Definition uncertain.hpp:90
std::shared_ptr< dep_sd_t > dep_sd_ptr
Definition uncertain.hpp:45
Modifies an unceratin variable.
Definition setter.hpp:19
The namespace that contains the implementation details of the library.
Definition operation_common.hpp:10
The primary namespace for the sigma library.
Definition operation_common.hpp:10
Uncertain< double > UDouble
Typedef for an uncertain double.
Definition uncertain.hpp:260
Uncertain< float > UFloat
Typedef for an uncertain float.
Definition uncertain.hpp:257
Uncertain< T > abs(const Uncertain< T > &a)
Absolute Value.
Definition basic.ipp:9