All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
modified_bessel_second_kind.hpp
Go to the documentation of this file.
#ifndef STAN_MATH_REV_SCAL_FUN_MODIFIED_BESSEL_SECOND_KIND_HPP
#define STAN_MATH_REV_SCAL_FUN_MODIFIED_BESSEL_SECOND_KIND_HPP
#include <stan/math/rev/core.hpp>
#include <stan/math/prim/scal/fun/modified_bessel_second_kind.hpp>
namespace stan {
namespace math {
namespace {
class modified_bessel_second_kind_dv_vari : public op_dv_vari {
public:
modified_bessel_second_kind_dv_vari(int a, vari* bvi) :
op_dv_vari(stan::math::modified_bessel_second_kind(a, bvi->val_),
a, bvi) {
}
void chain() {
bvi_->adj_ -= adj_
* (ad_ * stan::math::modified_bessel_second_kind(ad_, bvi_->val_)
/ bvi_->val_
+ stan::math::modified_bessel_second_kind(ad_ - 1, bvi_->val_));
}
};
}
inline var modified_bessel_second_kind(const int& v,
const var& a) {
return var(new modified_bessel_second_kind_dv_vari(v, a.vi_));
}
}
}
#endif
stan::math::modified_bessel_second_kind
fvar< T > modified_bessel_second_kind(int v, const fvar< T > &z)
Definition: modified_bessel_second_kind.hpp:15
core.hpp
modified_bessel_second_kind.hpp
stan::math::var
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
stan::math::var::vi_
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44

[ Stan Home Page ] © 2011–2015, Stan Development Team.