Automatic Differentiation
 
Loading...
Searching...
No Matches
operator_not_equal.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_CORE_OPERATOR_NOT_EQUAL_HPP
2#define STAN_MATH_PRIM_CORE_OPERATOR_NOT_EQUAL_HPP
3
5#include <complex>
6
7namespace stan {
8namespace math {
9
20template <typename U, typename V, typename = require_any_autodiff_t<U, V>>
21inline bool operator!=(const std::complex<U>& x, const std::complex<V>& y) {
22 return !(x.real() == y.real() && x.imag() == y.imag());
23}
24
36template <typename U, typename V, typename = require_any_autodiff_t<U, V>>
37inline bool operator!=(const std::complex<U>& x, const V& y) {
38 return !(x.real() == y && x.imag() == 0);
39}
40
52template <typename U, typename V, typename = require_any_autodiff_t<U, V>>
53inline bool operator!=(const U& x, const std::complex<V>& y) {
54 return !(x == y.real() && 0 == y.imag());
55}
56
57} // namespace math
58} // namespace stan
59
60#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 ...