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
precomp_v_vari.hpp
Go to the documentation of this file.
1
#ifndef __STAN__AGRAD__REV__PRECOMP_V_VARI_HPP__
2
#define __STAN__AGRAD__REV__PRECOMP_V_VARI_HPP__
3
4
#include <
stan/agrad/rev/vari.hpp
>
5
#include <
stan/agrad/rev/op/v_vari.hpp
>
6
7
namespace
stan {
8
namespace
agrad {
9
10
// use for single precomputed partials
11
class
precomp_v_vari
:
public
op_v_vari {
12
protected
:
13
double
da_
;
14
public
:
15
precomp_v_vari
(
double
val,
vari
* avi,
double
da)
16
: op_v_vari(val,avi),
17
da_
(da) {
18
}
19
void
chain
() {
20
avi_->adj_ += adj_ *
da_
;
21
}
22
};
23
24
}
25
}
26
#endif
[
Stan Home Page
]
© 2011–2013, Stan Development Team.