Stan
1.3
probability, sampling & optimization
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerator
Friends
Macros
Pages
src
stan
agrad
rev
fmax.hpp
Go to the documentation of this file.
1
#ifndef __STAN__AGRAD__REV__FMAX_HPP__
2
#define __STAN__AGRAD__REV__FMAX_HPP__
3
4
#include <
stan/agrad/rev/var.hpp
>
5
6
namespace
stan {
7
namespace
agrad {
8
26
inline
var
fmax
(
const
stan::agrad::var
& a,
27
const
stan::agrad::var
& b) {
28
return
a.
vi_
->
val_
> b.
vi_
->
val_
? a : b;
29
}
30
47
inline
var
fmax
(
const
stan::agrad::var
& a,
48
const
double
& b) {
49
return
a.
vi_
->
val_
>= b ? a :
var
(b);
50
}
51
68
inline
var
fmax
(
const
double
& a,
69
const
stan::agrad::var
& b) {
70
return
a > b.
vi_
->
val_
?
var
(a) : b;
71
}
72
73
}
74
}
75
#endif
[
Stan Home Page
]
© 2011–2013, Stan Development Team.