Automatic Differentiation
 
Loading...
Searching...
No Matches
operator_logical_and.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_REV_CORE_OPERATOR_LOGICAL_AND_HPP
2#define STAN_MATH_REV_CORE_OPERATOR_LOGICAL_AND_HPP
3
6
7namespace stan {
8namespace math {
9
18inline bool operator&&(const var& x, const var& y) {
19 return x.val() && y.val();
20}
21
33template <typename Arith, require_arithmetic_t<Arith>* = nullptr>
34inline bool operator&&(const var& x, Arith y) {
35 return x.val() && y;
36}
37
49template <typename Arith, require_arithmetic_t<Arith>* = nullptr>
50inline bool operator&&(Arith x, const var& y) {
51 return x && y.val();
52}
53
54} // namespace math
55} // namespace stan
56#endif
bool operator&&(const fvar< T > &x, const fvar< T > &y)
Return the logical conjunction of the values of the two arguments as defined by &&.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...