| #define | COMPARE(OP) |
| Create logical comparison operator functions. | |
| #define | COMPARE_T(OP) |
| Create logical comparison operator functions. | |
| #define | COMPARE(OP) |
| Create logical comparison operator functions. | |
| #define | COMPARE_T(OP) |
| Create logical comparison operator functions. |
|
|
Value: template <typename Ldomain, typename Lvalue, typename Lvalidator, \ typename Rdomain, typename Rvalue, typename Rvalidator> \ bool \ operator OP (const probability<Ldomain,Lvalue,Lvalidator>& lhs, \ const probability<Rdomain,Rvalue,Rvalidator>& rhs) \ { return lhs.value_cast(log_domain()) OP rhs.value_cast(log_domain()); } This macro simplifies the creation of the necessary logical comparisons between two probability quantities as they are all essentially the same, differing only in the probability types being compared.
Operators include the full range of logical comparisons ( |
|
|
Value: template <typename Ldomain, typename Lvalue, typename Lvalidator, \ typename Rdomain, typename Rvalue, typename Rvalidator> \ bool \ operator OP (const likelihood<Ldomain,Lvalue,Lvalidator>& lhs, \ const likelihood<Rdomain,Rvalue,Rvalidator>& rhs) \ { return lhs.value_cast(log_domain()) OP rhs.value_cast(log_domain()); } \ template <typename Ldomain, typename Lvalue, typename Lvalidator, \ typename Rdomain, typename Rvalue, typename Rvalidator> \ bool \ operator OP (const likelihood<Ldomain,Lvalue,Lvalidator>& lhs, \ const probability<Rdomain,Rvalue,Rvalidator>& rhs) \ { return lhs.value_cast(log_domain()) OP rhs.value_cast(log_domain()); } \ template <typename Ldomain, typename Lvalue, typename Lvalidator, \ typename Rdomain, typename Rvalue, typename Rvalidator> \ bool \ operator OP (const probability<Ldomain,Lvalue,Lvalidator>& lhs, \ const likelihood<Rdomain,Rvalue,Rvalidator>& rhs) \ { return lhs.value_cast(log_domain()) OP rhs.value_cast(log_domain()); } This macro simplifies the creation of the necessary logical comparisons between two likelihood quantities as they are all essentially the same, differing only in the likelihood types being compared.
Operators include the full range of logical comparisons ( |
|
|
Value: template <typename Domain,typename Value,typename Validator,typename T> \ bool \ operator OP (const probability<Domain,Value,Validator>& lhs, const T& rhs)\ { \ function_requires< ConvertibleConcept<T,Value> >(); \ return lhs.value_cast(linear_domain()) OP rhs; \ } \ template <typename Domain,typename Value,typename Validator,typename T> \ bool \ operator OP (const T& lhs, const probability<Domain,Value,Validator>& rhs)\ { \ function_requires< ConvertibleConcept<T,Value> >(); \ return lhs OP rhs.value_cast(linear_domain()); \ } This macro simplifies the creation of the necessary logical comparisons between a probability quantity and another type as they are all essentially the same, differing only in the types being compared.
Operators include the full range of logical comparisons ( |
|
|
Value: template <typename Domain,typename Value,typename Validator,typename T> \ bool \ operator OP (const likelihood<Domain,Value,Validator>& lhs, const T& rhs) \ { \ function_requires< ConvertibleConcept<T,Value> >(); \ return lhs.value_cast(linear_domain()) OP rhs; \ } \ template <typename Domain,typename Value,typename Validator,typename T> \ bool \ operator OP (const T& lhs, const likelihood<Domain,Value,Validator>& rhs) \ { \ function_requires< ConvertibleConcept<T,Value> >(); \ return lhs OP rhs.value_cast(linear_domain()); \ } This macro simplifies the creation of the necessary logical comparisons between a likelihood quantity and another type as they are all essentially the same, differing only in the types being compared.
Operators include the full range of logical comparisons ( |
1.4.5