Automatic Differentiation
 
Loading...
Searching...
No Matches
operator_not_equal.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_REV_CORE_OPERATOR_NOT_EQUAL_HPP
2#define STAN_MATH_REV_CORE_OPERATOR_NOT_EQUAL_HPP
3
8#include <complex>
9
10namespace stan {
11namespace math {
12
30inline bool operator!=(const var& a, const var& b) {
31 return a.val() != b.val();
32}
33
44template <typename Arith, require_arithmetic_t<Arith>* = nullptr>
45inline bool operator!=(const var& a, Arith b) {
46 return a.val() != b;
47}
48
59template <typename Arith, require_arithmetic_t<Arith>* = nullptr>
60inline bool operator!=(Arith a, const var& b) {
61 return a != b.val();
62}
63
73inline bool operator!=(const var& x, const std::complex<var>& z) {
74 return !(x == z.real() && 0 == z.imag());
75}
76
86inline bool operator!=(const std::complex<var>& z, const var& y) {
87 return !(z.real() == y && z.imag() == 0);
88}
89
90} // namespace math
91} // namespace stan
92#endif
bool operator!=(const fvar< T > &x, const fvar< T > &y)
Return true if the value of the two arguments are not equal as defined by !=.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...