Stan  1.3
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Pages
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 
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.