Automatic Differentiation
 
Loading...
Searching...
No Matches
operator_equal.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_REV_CORE_OPERATOR_EQUAL_HPP
2#define STAN_MATH_REV_CORE_OPERATOR_EQUAL_HPP
3
6
7namespace stan {
8namespace math {
9
27inline bool operator==(const var& a, const var& b) {
28 return a.val() == b.val();
29}
30
41template <typename Arith, require_arithmetic_t<Arith>* = nullptr>
42inline bool operator==(const var& a, Arith b) {
43 return a.val() == b;
44}
45
55template <typename Arith, require_arithmetic_t<Arith>* = nullptr>
56inline bool operator==(Arith a, const var& b) {
57 return a == b.val();
58}
59
69inline bool operator==(const var& x, const std::complex<var>& z) {
70 return x == z.real() && 0 == z.imag();
71}
72
82inline bool operator==(const std::complex<var>& z, const var& y) {
83 return z.real() == y && z.imag() == 0;
84}
85
86} // namespace math
87} // namespace stan
88#endif
bool operator==(const fvar< T > &x, const fvar< T > &y)
Return true if the specified variables have equal values as defined by ==.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...