diff --git a/doc/api/html/_eigen_8dox.html b/doc/api/html/_eigen_8dox.html new file mode 100644 index 00000000000..aac1a38bbca --- /dev/null +++ b/doc/api/html/_eigen_8dox.html @@ -0,0 +1,116 @@ + + + + + + +Stan Math Library: doxygen/Eigen.dox File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
+
+Namespaces
+
+
doxygen/Eigen.dox File Reference
+
+
+ + + + + + + + +

+Namespaces

 Eigen
 (Expert) Numerical traits for algorithmic differentiation variables.
 
 Eigen::internal
 (Expert) Product traits for algorithmic differentiation variables.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/_eigen_8hpp.html b/doc/api/html/_eigen_8hpp.html new file mode 100644 index 00000000000..b7cabfc2125 --- /dev/null +++ b/doc/api/html/_eigen_8hpp.html @@ -0,0 +1,113 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/Eigen.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
Eigen.hpp File Reference
+
+
+
#include <Eigen/Dense>
+#include <Eigen/QR>
+#include <Eigen/src/Core/NumTraits.h>
+
+

Go to the source code of this file.

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/_eigen_8hpp_source.html b/doc/api/html/_eigen_8hpp_source.html new file mode 100644 index 00000000000..46961cfae00 --- /dev/null +++ b/doc/api/html/_eigen_8hpp_source.html @@ -0,0 +1,116 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/Eigen.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
Eigen.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_EIGEN_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_EIGEN_HPP
+
3 
+
4 #include <Eigen/Dense>
+
5 #include <Eigen/QR>
+
6 #include <Eigen/src/Core/NumTraits.h>
+
7 
+
8 #endif
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/_f32_8hpp.html b/doc/api/html/_f32_8hpp.html new file mode 100644 index 00000000000..5a16453086c --- /dev/null +++ b/doc/api/html/_f32_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/F32.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
F32.hpp File Reference
+
+
+
#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
stan::math::F32 (T a, T b, T c, T d, T e, T z, T precision=1e-6)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/_f32_8hpp_source.html b/doc/api/html/_f32_8hpp_source.html new file mode 100644 index 00000000000..d5794585e98 --- /dev/null +++ b/doc/api/html/_f32_8hpp_source.html @@ -0,0 +1,159 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/F32.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
F32.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_F32_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_F32_HPP
+
3 
+
4 #include <cmath>
+
5 
+
6 namespace stan {
+
7 
+
8  namespace math {
+
9 
+
10  template<typename T>
+
11  T F32(T a, T b, T c, T d, T e, T z, T precision = 1e-6) {
+
12  using std::exp;
+
13  using std::log;
+
14  using std::fabs;
+
15 
+
16  T F = 1.0;
+
17 
+
18  T tNew = 0.0;
+
19 
+
20  T logT = 0.0;
+
21 
+
22  T logZ = log(z);
+
23 
+
24  int k = 0.0;
+
25 
+
26  while (fabs(tNew) > precision || k == 0) {
+
27  T p = (a + k) * (b + k) * (c + k) / ( (d + k) * (e + k) * (k + 1) );
+
28 
+
29  // If a, b, or c is a negative integer then the series terminates
+
30  // after a finite number of interations
+
31  if (p == 0) break;
+
32 
+
33  logT += (p > 0 ? 1.0 : -1.0) * log(fabs(p)) + logZ;
+
34 
+
35  tNew = exp(logT);
+
36 
+
37  F += tNew;
+
38 
+
39  ++k;
+
40  }
+
41  return F;
+
42  }
+
43 
+
44  }
+
45 }
+
46 #endif
+
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:14
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+
T F32(T a, T b, T c, T d, T e, T z, T precision=1e-6)
Definition: F32.hpp:11
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/_l_d_l_t__alloc_8hpp.html b/doc/api/html/_l_d_l_t__alloc_8hpp.html new file mode 100644 index 00000000000..3d4cdfb1ea3 --- /dev/null +++ b/doc/api/html/_l_d_l_t__alloc_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/LDLT_alloc.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Classes | +Namespaces
+
+
LDLT_alloc.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/rev/core.hpp>
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  stan::math::LDLT_alloc< R, C >
 This object stores the actual (double typed) LDLT factorization of an Eigen::Matrix<var> along with pointers to its vari's which allow the *_ldlt functions to save memory. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/_l_d_l_t__alloc_8hpp_source.html b/doc/api/html/_l_d_l_t__alloc_8hpp_source.html new file mode 100644 index 00000000000..b6a87cb5b88 --- /dev/null +++ b/doc/api/html/_l_d_l_t__alloc_8hpp_source.html @@ -0,0 +1,162 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/LDLT_alloc.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
LDLT_alloc.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_LDLT_ALLOC_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_LDLT_ALLOC_HPP
+
3 
+ +
5 #include <stan/math/rev/core.hpp>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
19  template<int R, int C>
+
20  class LDLT_alloc : public chainable_alloc {
+
21  public:
+
22  LDLT_alloc() : N_(0) {}
+
23  explicit LDLT_alloc(const Eigen::Matrix<var, R, C> &A) : N_(0) {
+
24  compute(A);
+
25  }
+
26 
+
32  inline void compute(const Eigen::Matrix<var, R, C> &A) {
+
33  Eigen::Matrix<double, R, C> Ad(A.rows(), A.cols());
+
34 
+
35  N_ = A.rows();
+
36  _variA.resize(A.rows(), A.cols());
+
37 
+
38  for (size_t j = 0; j < N_; j++) {
+
39  for (size_t i = 0; i < N_; i++) {
+
40  Ad(i, j) = A(i, j).val();
+
41  _variA(i, j) = A(i, j).vi_;
+
42  }
+
43  }
+
44 
+
45  _ldlt.compute(Ad);
+
46  }
+
47 
+
49  inline double log_abs_det() const {
+
50  return _ldlt.vectorD().array().log().sum();
+
51  }
+
52 
+
53  size_t N_;
+
54  Eigen::LDLT<Eigen::Matrix<double, R, C> > _ldlt;
+
55  Eigen::Matrix<vari*, R, C> _variA;
+
56  };
+
57  }
+
58 }
+
59 #endif
+ + + +
Eigen::LDLT< Eigen::Matrix< double, R, C > > _ldlt
Definition: LDLT_alloc.hpp:54
+
This object stores the actual (double typed) LDLT factorization of an Eigen::Matrix<var> along with poi...
Definition: LDLT_alloc.hpp:20
+
LDLT_alloc(const Eigen::Matrix< var, R, C > &A)
Definition: LDLT_alloc.hpp:23
+ +
Eigen::Matrix< vari *, R, C > _variA
Definition: LDLT_alloc.hpp:55
+
A chainable_alloc is an object which is constructed and destructed normally but the memory lifespan i...
+
double log_abs_det() const
Compute the log(abs(det(A))). This is just a convenience function.
Definition: LDLT_alloc.hpp:49
+
void compute(const Eigen::Matrix< var, R, C > &A)
Compute the LDLT factorization and store pointers to the vari's of the matrix entries to be used when...
Definition: LDLT_alloc.hpp:32
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/_operands_and_partials_8hpp.html b/doc/api/html/_operands_and_partials_8hpp.html new file mode 100644 index 00000000000..c6e55f910cf --- /dev/null +++ b/doc/api/html/_operands_and_partials_8hpp.html @@ -0,0 +1,150 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/OperandsAndPartials.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Classes | +Namespaces
+
+
OperandsAndPartials.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <stan/math/fwd/scal/meta/is_fvar.hpp>
+#include <stan/math/fwd/scal/meta/partials_type.hpp>
+#include <stan/math/prim/scal/meta/is_vector.hpp>
+#include <stan/math/prim/mat/meta/is_vector.hpp>
+#include <stan/math/prim/arr/meta/is_vector.hpp>
+#include <stan/math/prim/arr/meta/length.hpp>
+#include <stan/math/prim/mat/meta/length.hpp>
+#include <stan/math/prim/scal/meta/length.hpp>
+#include <stan/math/prim/mat/meta/is_vector_like.hpp>
+#include <stan/math/prim/scal/meta/is_vector_like.hpp>
+#include <stan/math/prim/scal/meta/VectorView.hpp>
+#include <stan/math/prim/scal/meta/is_constant_struct.hpp>
+#include <stan/math/prim/scal/meta/contains_fvar.hpp>
+#include <stan/math/prim/scal/meta/partials_return_type.hpp>
+#include <stan/math/prim/scal/meta/partials_type.hpp>
+#include <stan/math/prim/scal/meta/return_type.hpp>
+#include <stan/math/rev/core.hpp>
+#include <stan/math/rev/scal/meta/is_var.hpp>
+#include <stan/math/rev/scal/meta/partials_type.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Classes

class  stan::math::partials_vari
 
struct  stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6 >
 A variable implementation that stores operands and derivatives with respect to the variable. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/_operands_and_partials_8hpp_source.html b/doc/api/html/_operands_and_partials_8hpp_source.html new file mode 100644 index 00000000000..bed7f8eb2ac --- /dev/null +++ b/doc/api/html/_operands_and_partials_8hpp_source.html @@ -0,0 +1,495 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/OperandsAndPartials.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
OperandsAndPartials.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_OPERANDSANDPARTIALS_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_OPERANDSANDPARTIALS_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ + + + + + + + + + + + + + + + +
21 #include <stan/math/rev/core.hpp>
+ + +
24 
+
25 namespace stan {
+
26  namespace math {
+
27 
+
28  class partials_vari : public vari {
+
29  private:
+
30  const size_t N_;
+
31  vari** operands_;
+
32  double* partials_;
+
33  public:
+
34  partials_vari(double value,
+
35  size_t N,
+
36  vari** operands, double* partials)
+
37  : vari(value),
+
38  N_(N),
+
39  operands_(operands),
+
40  partials_(partials) { }
+
41  void chain() {
+
42  for (size_t n = 0; n < N_; ++n)
+
43  operands_[n]->adj_ += adj_ * partials_[n];
+
44  }
+
45  };
+
46 
+
47  namespace {
+
48  template<typename T1, typename T2, typename T3,
+
49  bool is_vec = is_vector<T2>::value,
+
50  bool is_const = is_constant_struct<T2>::value>
+
51  struct incr_deriv {
+
52  inline T3 incr(T1 d_x, const T2& x_d ) {
+
53  return 0;
+
54  }
+
55  };
+
56  template<typename T1, typename T2, typename T3>
+
57  struct incr_deriv<T1, T2, T3, false, false> {
+
58  inline T3 incr(T1 d_x, const T2& x_d) {
+
59  return d_x[0]*x_d.d_;
+
60  }
+
61  };
+
62  template<typename T1, typename T2, typename T3>
+
63  struct incr_deriv<T1, T2, T3, true, false> {
+
64  inline T3 incr(T1 d_x, const T2& x_d) {
+
65  T3 temp = 0;
+
66  for (size_t n = 0; n < length(x_d); n++)
+
67  temp += d_x[n] * x_d[n].d_;
+
68  return temp;
+
69  }
+
70  };
+
71 
+
72  template<typename T_return_type, typename T_partials_return,
+
73  typename T1, typename T2, typename T3, typename T4,
+
74  typename T5, typename T6,
+ + +
77  struct partials_to_var {
+
78  inline
+
79  T_return_type to_var(double logp, size_t /* nvaris */,
+
80  vari** /* all_varis */,
+
81  T_partials_return* /* all_partials */,
+
82  const T1& x1, const T2& x2, const T3& x3,
+
83  const T4& x4, const T5& x5, const T6& x6,
+
84  VectorView<T_partials_return,
+
85  is_vector<T1>::value,
+
86  is_constant_struct<T1>::value> d_x1,
+
87  VectorView<T_partials_return,
+
88  is_vector<T2>::value,
+
89  is_constant_struct<T2>::value> d_x2,
+
90  VectorView<T_partials_return,
+
91  is_vector<T3>::value,
+
92  is_constant_struct<T3>::value> d_x3,
+
93  VectorView<T_partials_return,
+
94  is_vector<T4>::value,
+
95  is_constant_struct<T4>::value> d_x4,
+
96  VectorView<T_partials_return,
+
97  is_vector<T5>::value,
+
98  is_constant_struct<T5>::value> d_x5,
+
99  VectorView<T_partials_return,
+
100  is_vector<T6>::value,
+
101  is_constant_struct<T6>::value> d_x6) {
+
102  return logp;
+
103  }
+
104  };
+
105 
+
106  template<typename T_return_type, typename T_partials_return,
+
107  typename T1, typename T2, typename T3, typename T4,
+
108  typename T5, typename T6>
+
109  struct partials_to_var<T_return_type, T_partials_return,
+
110  T1, T2, T3, T4, T5, T6,
+
111  false, false> {
+
112  inline T_return_type to_var(T_partials_return logp, size_t nvaris,
+
113  vari** all_varis,
+
114  T_partials_return* all_partials,
+
115  const T1& x1, const T2& x2, const T3& x3,
+
116  const T4& x4, const T5& x5, const T6& x6,
+
117  VectorView<T_partials_return,
+
118  is_vector<T1>::value,
+
119  is_constant_struct<T1>::value> d_x1,
+
120  VectorView<T_partials_return,
+
121  is_vector<T2>::value,
+
122  is_constant_struct<T2>::value> d_x2,
+
123  VectorView<T_partials_return,
+
124  is_vector<T3>::value,
+
125  is_constant_struct<T3>::value> d_x3,
+
126  VectorView<T_partials_return,
+
127  is_vector<T4>::value,
+
128  is_constant_struct<T4>::value> d_x4,
+
129  VectorView<T_partials_return,
+
130  is_vector<T5>::value,
+
131  is_constant_struct<T5>::value> d_x5,
+
132  VectorView<T_partials_return,
+
133  is_vector<T6>::value,
+
134  is_constant_struct<T6>::value> d_x6) {
+
135  return var(new partials_vari(logp, nvaris, all_varis,
+
136  all_partials));
+
137  }
+
138  };
+
139 
+
140  template<typename T_return_type, typename T_partials_return,
+
141  typename T1, typename T2, typename T3, typename T4,
+
142  typename T5, typename T6>
+
143  struct partials_to_var<T_return_type, T_partials_return,
+
144  T1, T2, T3, T4, T5, T6,
+
145  true, false> {
+
146  inline T_return_type to_var(T_partials_return logp, size_t nvaris,
+
147  vari** all_varis,
+
148  T_partials_return* all_partials,
+
149  const T1& x1, const T2& x2, const T3& x3,
+
150  const T4& x4, const T5& x5, const T6& x6,
+
151  VectorView<T_partials_return,
+
152  is_vector<T1>::value,
+
153  is_constant_struct<T1>::value> d_x1,
+
154  VectorView<T_partials_return,
+
155  is_vector<T2>::value,
+
156  is_constant_struct<T2>::value> d_x2,
+
157  VectorView<T_partials_return,
+
158  is_vector<T3>::value,
+
159  is_constant_struct<T3>::value> d_x3,
+
160  VectorView<T_partials_return,
+
161  is_vector<T4>::value,
+
162  is_constant_struct<T4>::value> d_x4,
+
163  VectorView<T_partials_return,
+
164  is_vector<T5>::value,
+
165  is_constant_struct<T5>::value> d_x5,
+
166  VectorView<T_partials_return,
+
167  is_vector<T6>::value,
+
168  is_constant_struct<T6>::value> d_x6) {
+
169  T_partials_return temp_deriv = 0;
+
170  temp_deriv += incr_deriv<VectorView<T_partials_return,
+
171  is_vector<T1>::value,
+
172  is_constant_struct<T1>::value>,
+
173  T1, T_partials_return>().incr(d_x1, x1);
+
174  temp_deriv += incr_deriv<VectorView<T_partials_return,
+
175  is_vector<T2>::value,
+
176  is_constant_struct<T2>::value>,
+
177  T2, T_partials_return>().incr(d_x2, x2);
+
178  temp_deriv += incr_deriv<VectorView<T_partials_return,
+
179  is_vector<T3>::value,
+
180  is_constant_struct<T3>::value>,
+
181  T3, T_partials_return>().incr(d_x3, x3);
+
182  temp_deriv += incr_deriv<VectorView<T_partials_return,
+
183  is_vector<T4>::value,
+
184  is_constant_struct<T4>::value>,
+
185  T4, T_partials_return>().incr(d_x4, x4);
+
186  temp_deriv += incr_deriv<VectorView<T_partials_return,
+
187  is_vector<T5>::value,
+
188  is_constant_struct<T5>::value>,
+
189  T5, T_partials_return>().incr(d_x5, x5);
+
190  temp_deriv += incr_deriv<VectorView<T_partials_return,
+
191  is_vector<T6>::value,
+
192  is_constant_struct<T6>::value>,
+
193  T6, T_partials_return>().incr(d_x6, x6);
+
194  return stan::math::fvar<T_partials_return>(logp, temp_deriv);
+
195  }
+
196  };
+
197 
+
198  template<typename T,
+
199  bool is_vec = is_vector<T>::value,
+
200  bool is_const = is_constant_struct<T>::value,
+
201  bool contain_fvar = contains_fvar<T>::value>
+
202  struct set_varis {
+
203  inline size_t set(vari** /*varis*/, const T& /*x*/) {
+
204  return 0U;
+
205  }
+
206  };
+
207  template<typename T>
+
208  struct set_varis<T, true, false, false> {
+
209  inline size_t set(vari** varis, const T& x) {
+
210  for (size_t n = 0; n < length(x); n++)
+
211  varis[n] = x[n].vi_;
+
212  return length(x);
+
213  }
+
214  };
+
215  template<typename T>
+
216  struct set_varis<T, true, false, true> {
+
217  inline size_t set(vari** varis, const T& x) {
+
218  for (size_t n = 0; n < length(x); n++)
+
219  varis[n] = 0;
+
220  return length(x);
+
221  }
+
222  };
+
223  template<>
+
224  struct set_varis<var, false, false, false> {
+
225  inline size_t set(vari** varis, const var& x) {
+
226  varis[0] = x.vi_;
+
227  return (1);
+
228  }
+
229  };
+
230  }
+
231 
+
236  template<typename T1 = double, typename T2 = double, typename T3 = double,
+
237  typename T4 = double, typename T5 = double, typename T6 = double>
+ +
239  typedef
+ + +
242 
+
243  typedef
+ +
245 
+ +
247  size_t nvaris;
+ +
249  T_partials_return* all_partials;
+
250 
+ + + + + + + + + + + + + + + + + + +
269 
+
270  OperandsAndPartials(const T1& x1 = 0, const T2& x2 = 0, const T3& x3 = 0,
+
271  const T4& x4 = 0, const T5& x5 = 0, const T6& x6 = 0)
+
272  : nvaris(!is_constant_struct<T1>::value * length(x1) +
+
273  !is_constant_struct<T2>::value * length(x2) +
+
274  !is_constant_struct<T3>::value * length(x3) +
+
275  !is_constant_struct<T4>::value * length(x4) +
+
276  !is_constant_struct<T5>::value * length(x5) +
+
277  !is_constant_struct<T6>::value * length(x6)),
+
278  all_varis(static_cast<vari**>
+
279  (chainable::operator new
+
280  (sizeof(vari*) * nvaris))),
+
281  all_partials(static_cast<T_partials_return*>
+
282  (chainable::operator new
+
283  (sizeof(T_partials_return) * nvaris))),
+ + +
286  + (!is_constant_struct<T1>::value) * length(x1)),
+ +
288  + (!is_constant_struct<T1>::value) * length(x1)
+
289  + (!is_constant_struct<T2>::value) * length(x2)),
+ +
291  + (!is_constant_struct<T1>::value) * length(x1)
+
292  + (!is_constant_struct<T2>::value) * length(x2)
+
293  + (!is_constant_struct<T3>::value) * length(x3)),
+ +
295  + (!is_constant_struct<T1>::value) * length(x1)
+
296  + (!is_constant_struct<T2>::value) * length(x2)
+
297  + (!is_constant_struct<T3>::value) * length(x3)
+
298  + (!is_constant_struct<T4>::value) * length(x4)),
+ +
300  + (!is_constant_struct<T1>::value) * length(x1)
+
301  + (!is_constant_struct<T2>::value) * length(x2)
+
302  + (!is_constant_struct<T3>::value) * length(x3)
+
303  + (!is_constant_struct<T4>::value) * length(x4)
+
304  + (!is_constant_struct<T5>::value) * length(x5)) {
+
305  size_t base = 0;
+ +
307  base += set_varis<T1>().set(&all_varis[base], x1);
+ +
309  base += set_varis<T2>().set(&all_varis[base], x2);
+ +
311  base += set_varis<T3>().set(&all_varis[base], x3);
+ +
313  base += set_varis<T4>().set(&all_varis[base], x4);
+ +
315  base += set_varis<T5>().set(&all_varis[base], x5);
+ +
317  set_varis<T6>().set(&all_varis[base], x6);
+ +
319  }
+
320 
+ +
322  to_var(T_partials_return logp,
+
323  const T1& x1 = 0, const T2& x2 = 0, const T3& x3 = 0,
+
324  const T4& x4 = 0, const T5& x5 = 0, const T6& x6 = 0) {
+
325  return partials_to_var
+ +
327  T2, T3, T4, T5, T6>().to_var(logp, nvaris, all_varis,
+
328  all_partials,
+
329  x1, x2, x3, x4, x5, x6, d_x1, d_x2,
+
330  d_x3, d_x4, d_x5, d_x6);
+
331  }
+
332  };
+
333 
+
334 
+
335  }
+
336 }
+
337 
+
338 
+
339 #endif
+
VectorView< T_partials_return, is_vector< T6 >::value, is_constant_struct< T6 >::value > d_x6
+
stan::return_type< T1, T2, T3, T4, T5, T6 >::type T_return_type
+
Metaprogramming struct to detect whether a given type is constant in the mathematical sense (not the ...
Definition: is_constant.hpp:22
+ + + +
Abstract base class for variable implementations that handles memory management and applying the chai...
Definition: chainable.hpp:14
+ + +
The variable implementation base class.
Definition: vari.hpp:28
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+ +
void chain()
Apply the chain rule to this variable based on the variables on which it depends. ...
+ + +
stan::partials_return_type< T1, T2, T3, T4, T5, T6 >::type T_partials_return
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ + + +
var to_var(const double &x)
Converts argument to an automatic differentiation variable.
Definition: to_var.hpp:21
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ + +
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
VectorView< T_partials_return, is_vector< T4 >::value, is_constant_struct< T4 >::value > d_x4
+
void fill(T &x, const S &y)
Fill the specified container with the specified value.
Definition: fill.hpp:22
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
partials_vari(double value, size_t N, vari **operands, double *partials)
+ + + +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ + +
OperandsAndPartials(const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
double adj_
The adjoint of this variable, which is the partial derivative of this variable with respect to the ro...
Definition: vari.hpp:42
+ +
VectorView< T_partials_return, is_vector< T5 >::value, is_constant_struct< T5 >::value > d_x5
+
Metaprogram to calculate the base scalar return type resulting from promoting all the scalar types of...
+ + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+ +
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/_vector_builder_8hpp.html b/doc/api/html/_vector_builder_8hpp.html new file mode 100644 index 00000000000..b4a966a12f1 --- /dev/null +++ b/doc/api/html/_vector_builder_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/VectorBuilder.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Classes | +Namespaces
+
+
VectorBuilder.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/contains_vector.hpp>
+#include <stdexcept>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + + + + + +

+Classes

class  stan::VectorBuilderHelper< T1, used, is_vec >
 VectorBuilder allocates type T1 values to be used as intermediate values. More...
 
class  stan::VectorBuilderHelper< T1, true, false >
 
class  stan::VectorBuilderHelper< T1, true, true >
 
class  stan::VectorBuilder< used, T1, T2, T3, T4, T5, T6, T7 >
 
+ + + +

+Namespaces

 stan
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/_vector_builder_8hpp_source.html b/doc/api/html/_vector_builder_8hpp_source.html new file mode 100644 index 00000000000..0f470864806 --- /dev/null +++ b/doc/api/html/_vector_builder_8hpp_source.html @@ -0,0 +1,177 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/VectorBuilder.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
VectorBuilder.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_VECTORBUILDER_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_VECTORBUILDER_HPP
+
3 
+ +
5 #include <stdexcept>
+
6 #include <vector>
+
7 
+
8 namespace stan {
+
9 
+
27  template<typename T1, bool used, bool is_vec>
+ +
29  public:
+
30  explicit VectorBuilderHelper(size_t /* n */) { }
+
31  T1& operator[](size_t /* i */) {
+
32  throw std::logic_error("used is false. this should never be called");
+
33  }
+
34  };
+
35 
+
36  template<typename T1>
+
37  class VectorBuilderHelper<T1, true, false> {
+
38  private:
+
39  T1 x_;
+
40  public:
+
41  explicit VectorBuilderHelper(size_t /* n */) : x_(0.0) { }
+
42  T1& operator[](size_t /* i */) {
+
43  return x_;
+
44  }
+
45  };
+
46 
+
47  template<typename T1>
+
48  class VectorBuilderHelper<T1, true, true> {
+
49  private:
+
50  std::vector<T1> x_;
+
51  public:
+
52  explicit VectorBuilderHelper(size_t n) : x_(n) { }
+
53  T1& operator[](size_t i) {
+
54  return x_[i];
+
55  }
+
56  };
+
57 
+
58  template<bool used, typename T1, typename T2, typename T3 = double,
+
59  typename T4 = double, typename T5 = double, typename T6 = double,
+
60  typename T7 = double>
+
61  class VectorBuilder {
+
62  public:
+
63  VectorBuilderHelper<T1, used,
+ +
65  explicit VectorBuilder(size_t n) : a(n) { }
+
66  T1& operator[](size_t i) {
+
67  return a[i];
+
68  }
+
69  };
+
70 
+
71 }
+
72 #endif
+
73 
+ +
VectorBuilderHelper< T1, used, contains_vector< T2, T3, T4, T5, T6, T7 >::value > a
+ + +
VectorBuilder allocates type T1 values to be used as intermediate values.
+ + +
T1 & operator[](size_t i)
+ + + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/_vector_view_8hpp.html b/doc/api/html/_vector_view_8hpp.html new file mode 100644 index 00000000000..247bdc4e8ac --- /dev/null +++ b/doc/api/html/_vector_view_8hpp.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/VectorView.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Classes | +Namespaces
+
+
VectorView.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/scal/meta/scalar_type.hpp>
+#include <stan/math/prim/mat/meta/is_vector_like.hpp>
+#include <stan/math/prim/scal/meta/is_vector_like.hpp>
+#include <stdexcept>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + + + + +

+Classes

class  stan::VectorView< T, is_array, throw_if_accessed >
 VectorView is a template metaprogram that takes its argument and allows it to be used like a vector. More...
 
class  stan::VectorView< const T, is_array, throw_if_accessed >
 VectorView that has const correctness. More...
 
class  stan::VectorView< const double, false, false >
 
+ + + +

+Namespaces

 stan
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/_vector_view_8hpp_source.html b/doc/api/html/_vector_view_8hpp_source.html new file mode 100644 index 00000000000..921341ba7dc --- /dev/null +++ b/doc/api/html/_vector_view_8hpp_source.html @@ -0,0 +1,214 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/VectorView.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
VectorView.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_VECTORVIEW_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_VECTORVIEW_HPP
+
3 
+ + + + +
8 #include <stdexcept>
+
9 #include <vector>
+
10 
+
11 namespace stan {
+
12 
+
38  template <typename T,
+
39  bool is_array = stan::is_vector_like<T>::value,
+
40  bool throw_if_accessed = false>
+
41  class VectorView {
+
42  public:
+
43  typedef typename scalar_type<T>::type scalar_t;
+
44 
+
45  explicit VectorView(scalar_t& c) : x_(&c) { }
+
46 
+
47  explicit VectorView(std::vector<scalar_t>& v) : x_(&v[0]) { }
+
48 
+
49  template <int R, int C>
+
50  explicit VectorView(Eigen::Matrix<scalar_t, R, C>& m) : x_(&m(0)) { }
+
51 
+
52  explicit VectorView(scalar_t* x) : x_(x) { }
+
53 
+
54  scalar_t& operator[](int i) {
+
55  if (throw_if_accessed)
+
56  throw std::out_of_range("VectorView: this cannot be accessed");
+
57  if (is_array)
+
58  return x_[i];
+
59  else
+
60  return x_[0];
+
61  }
+
62  private:
+
63  scalar_t* x_;
+
64  };
+
65 
+
66 
+
71  template <typename T, bool is_array, bool throw_if_accessed>
+
72  class VectorView<const T, is_array, throw_if_accessed> {
+
73  public:
+
74  typedef typename scalar_type<T>::type scalar_t;
+
75 
+
76  explicit VectorView(const scalar_t& c) : x_(&c) { }
+
77 
+
78  explicit VectorView(const scalar_t* x) : x_(x) { }
+
79 
+
80  explicit VectorView(const std::vector<scalar_t>& v) : x_(&v[0]) { }
+
81 
+
82  template <int R, int C>
+
83  explicit VectorView(const Eigen::Matrix<scalar_t, R, C>& m) : x_(&m(0)) { }
+
84 
+
85  const scalar_t& operator[](int i) const {
+
86  if (throw_if_accessed)
+
87  throw std::out_of_range("VectorView: this cannot be accessed");
+
88  if (is_array)
+
89  return x_[i];
+
90  else
+
91  return x_[0];
+
92  }
+
93  private:
+
94  const scalar_t* x_;
+
95  };
+
96 
+
97  // simplify to hold value in common case where it's more efficient
+
98  template <>
+
99  class VectorView<const double, false, false> {
+
100  public:
+
101  explicit VectorView(double x) : x_(x) { }
+
102  double operator[](int /* i */) const {
+
103  return x_;
+
104  }
+
105  private:
+
106  const double x_;
+
107  };
+
108 
+
109 
+
110 
+
111 }
+
112 #endif
+
113 
+
scalar_t & operator[](int i)
Definition: VectorView.hpp:54
+
VectorView(scalar_t &c)
Definition: VectorView.hpp:45
+
scalar_type< T >::type scalar_t
Definition: VectorView.hpp:43
+ + +
scalar_type_helper< is_vector< T >::value, T >::type type
Definition: scalar_type.hpp:38
+
VectorView(std::vector< scalar_t > &v)
Definition: VectorView.hpp:47
+ + + + + + +
VectorView(Eigen::Matrix< scalar_t, R, C > &m)
Definition: VectorView.hpp:50
+
void out_of_range(const char *function, const int max, const int index, const char *msg1="", const char *msg2="")
Throw an out_of_range exception with a consistently formatted message.
+ + + + +
VectorView(scalar_t *x)
Definition: VectorView.hpp:52
+
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
VectorView(const Eigen::Matrix< scalar_t, R, C > &m)
Definition: VectorView.hpp:83
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/_vector_view_mvt_8hpp.html b/doc/api/html/_vector_view_mvt_8hpp.html new file mode 100644 index 00000000000..ec5535891bd --- /dev/null +++ b/doc/api/html/_vector_view_mvt_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/VectorViewMvt.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Classes | +Namespaces
+
+
VectorViewMvt.hpp File Reference
+
+
+
#include <stan/math/prim/mat/meta/is_vector_like.hpp>
+#include <stan/math/prim/scal/meta/is_vector_like.hpp>
+#include <stan/math/prim/scal/meta/scalar_type_pre.hpp>
+#include <stdexcept>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Classes

class  stan::VectorViewMvt< T, is_array, throw_if_accessed >
 
class  stan::VectorViewMvt< const T, is_array, throw_if_accessed >
 VectorViewMvt that has const correctness. More...
 
+ + + +

+Namespaces

 stan
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/_vector_view_mvt_8hpp_source.html b/doc/api/html/_vector_view_mvt_8hpp_source.html new file mode 100644 index 00000000000..37c2e8be60e --- /dev/null +++ b/doc/api/html/_vector_view_mvt_8hpp_source.html @@ -0,0 +1,184 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/VectorViewMvt.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
VectorViewMvt.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_VECTORVIEWMVT_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_VECTORVIEWMVT_HPP
+
3 
+ + + +
7 #include <stdexcept>
+
8 #include <vector>
+
9 
+
10 namespace stan {
+
11 
+
12  template <typename T, bool is_array
+ +
14  <typename stan::math::value_type<T>::type>::value,
+
15  bool throw_if_accessed = false>
+
16  class VectorViewMvt {
+
17  public:
+ +
19 
+
20  explicit VectorViewMvt(matrix_t& m) : x_(&m) { }
+
21 
+
22  explicit VectorViewMvt(std::vector<matrix_t>& vm) : x_(&vm[0]) { }
+
23 
+
24  matrix_t& operator[](int i) {
+
25  if (throw_if_accessed)
+
26  throw std::out_of_range("VectorViewMvt: this cannot be accessed");
+
27  if (is_array)
+
28  return x_[i];
+
29  else
+
30  return x_[0];
+
31  }
+
32  private:
+
33  matrix_t* x_;
+
34  };
+
35 
+
40  template <typename T, bool is_array, bool throw_if_accessed>
+
41  class VectorViewMvt<const T, is_array, throw_if_accessed> {
+
42  public:
+ +
44 
+
45  explicit VectorViewMvt(const matrix_t& m) : x_(&m) { }
+
46 
+
47  explicit VectorViewMvt(const std::vector<matrix_t>& vm) : x_(&vm[0]) { }
+
48 
+
49  const matrix_t& operator[](int i) const {
+
50  if (throw_if_accessed)
+
51  throw std::out_of_range("VectorViewMvt: this cannot be accessed");
+
52  if (is_array)
+
53  return x_[i];
+
54  else
+
55  return x_[0];
+
56  }
+
57  private:
+
58  const matrix_t* x_;
+
59  };
+
60 
+
61 
+
62 }
+
63 #endif
+
64 
+
scalar_type_helper_pre< is_vector< typename stan::math::value_type< T >::type >::value, typename stan::math::value_type< T >::type, T >::type type
+ + +
VectorViewMvt(std::vector< matrix_t > &vm)
+ +
matrix_t & operator[](int i)
+ + +
void out_of_range(const char *function, const int max, const int index, const char *msg1="", const char *msg2="")
Throw an out_of_range exception with a consistently formatted message.
+ +
VectorViewMvt(matrix_t &m)
+ +
scalar_type_pre< T >::type matrix_t
+ + +
Primary template class for metaprogram to compute the type of values stored in a container.
Definition: value_type.hpp:21
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/accumulator_8hpp.html b/doc/api/html/accumulator_8hpp.html new file mode 100644 index 00000000000..b231e89765a --- /dev/null +++ b/doc/api/html/accumulator_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/accumulator.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Classes | +Namespaces
+
+
accumulator.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/fun/sum.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_arithmetic.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  stan::math::accumulator< T >
 Class to accumulate values and eventually return their sum. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/accumulator_8hpp_source.html b/doc/api/html/accumulator_8hpp_source.html new file mode 100644 index 00000000000..722315b8478 --- /dev/null +++ b/doc/api/html/accumulator_8hpp_source.html @@ -0,0 +1,183 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/accumulator.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
accumulator.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_ACCUMULATOR_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_ACCUMULATOR_HPP
+
3 
+ + +
6 #include <boost/utility/enable_if.hpp>
+
7 #include <boost/type_traits/is_arithmetic.hpp>
+
8 #include <boost/type_traits/is_same.hpp>
+
9 #include <vector>
+
10 
+
11 namespace stan {
+
12  namespace math {
+
13 
+
24  template <typename T>
+
25  class accumulator {
+
26  private:
+
27  std::vector<T> buf_;
+
28 
+
29  public:
+ +
34  : buf_() {
+
35  }
+
36 
+ +
41 
+
52  template <typename S>
+
53  typename boost::enable_if<boost::is_arithmetic<S>, void>::type
+
54  add(S x) {
+
55  buf_.push_back(static_cast<T>(x));
+
56  }
+
57 
+
70  template <typename S>
+
71  typename boost::disable_if<boost::is_arithmetic<S>,
+
72  typename boost::enable_if<boost::is_same<S, T>,
+
73  void>::type >::type
+
74  add(const S& x) {
+
75  buf_.push_back(x);
+
76  }
+
77 
+
87  template <typename S, int R, int C>
+
88  void add(const Eigen::Matrix<S, R, C>& m) {
+
89  for (int i = 0; i < m.size(); ++i)
+
90  add(m(i));
+
91  }
+
92 
+
102  template <typename S>
+
103  void add(const std::vector<S>& xs) {
+
104  for (size_t i = 0; i < xs.size(); ++i)
+
105  add(xs[i]);
+
106  }
+
107 
+
113  T sum() const {
+
114  using math::sum;
+
115  return sum(buf_);
+
116  }
+
117  };
+
118 
+
119 
+
120 
+
121 
+
122  }
+
123 }
+
124 
+
125 #endif
+
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+
T sum() const
Return the sum of the accumulated values.
+
accumulator()
Construct an accumulator.
Definition: accumulator.hpp:33
+
boost::disable_if< boost::is_arithmetic< S >, typename boost::enable_if< boost::is_same< S, T >, void >::type >::type add(const S &x)
Add the specified non-arithmetic value to the buffer.
Definition: accumulator.hpp:74
+ +
Class to accumulate values and eventually return their sum.
Definition: accumulator.hpp:25
+ +
void add(const std::vector< S > &xs)
Recursively add each entry in the specified standard vector to the buffer.
+
void add(const Eigen::Matrix< S, R, C > &m)
Add each entry in the specified matrix, vector, or row vector of values to the buffer.
Definition: accumulator.hpp:88
+
~accumulator()
Destroy an accumulator.
Definition: accumulator.hpp:40
+
boost::enable_if< boost::is_arithmetic< S >, void >::type add(S x)
Add the specified arithmetic type value to the buffer after static casting it to the class type T...
Definition: accumulator.hpp:54
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/add_8hpp.html b/doc/api/html/add_8hpp.html new file mode 100644 index 00000000000..21c47ca9ea5 --- /dev/null +++ b/doc/api/html/add_8hpp.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/add.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
add.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/err/check_matching_dims.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + +

+Functions

template<typename T1 , typename T2 , int R, int C>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R, C > 
stan::math::add (const Eigen::Matrix< T1, R, C > &m1, const Eigen::Matrix< T2, R, C > &m2)
 Return the sum of the specified matrices. More...
 
template<typename T1 , typename T2 , int R, int C>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R, C > 
stan::math::add (const Eigen::Matrix< T1, R, C > &m, const T2 &c)
 Return the sum of the specified matrix and specified scalar. More...
 
template<typename T1 , typename T2 , int R, int C>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R, C > 
stan::math::add (const T1 &c, const Eigen::Matrix< T2, R, C > &m)
 Return the sum of the specified scalar and specified matrix. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/add_8hpp_source.html b/doc/api/html/add_8hpp_source.html new file mode 100644 index 00000000000..2c53f548d1f --- /dev/null +++ b/doc/api/html/add_8hpp_source.html @@ -0,0 +1,167 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/add.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
add.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_ADD_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_ADD_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+ + +
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
24  template <typename T1, typename T2, int R, int C>
+
25  inline
+
26  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R, C>
+
27  add(const Eigen::Matrix<T1, R, C>& m1,
+
28  const Eigen::Matrix<T2, R, C>& m2) {
+ +
30  "m1", m1,
+
31  "m2", m2);
+
32  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type,
+
33  R, C>
+
34  result(m1.rows(), m1.cols());
+
35  for (int i = 0; i < result.size(); ++i)
+
36  result(i) = m1(i) + m2(i);
+
37  return result;
+
38  }
+
39 
+
49  template <typename T1, typename T2, int R, int C>
+
50  inline
+
51  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R, C>
+
52  add(const Eigen::Matrix<T1, R, C>& m,
+
53  const T2& c) {
+
54  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type,
+
55  R, C>
+
56  result(m.rows(), m.cols());
+
57  for (int i = 0; i < result.size(); ++i)
+
58  result(i) = m(i) + c;
+
59  return result;
+
60  }
+
61 
+
71  template <typename T1, typename T2, int R, int C>
+
72  inline
+
73  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R, C>
+
74  add(const T1& c,
+
75  const Eigen::Matrix<T2, R, C>& m) {
+
76  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type,
+
77  R, C>
+
78  result(m.rows(), m.cols());
+
79  for (int i = 0; i < result.size(); ++i)
+
80  result(i) = c + m(i);
+
81  return result;
+
82  }
+
83 
+
84  }
+
85 }
+
86 #endif
+ +
bool check_matching_dims(const char *function, const char *name1, const Eigen::Matrix< T1, R1, C1 > &y1, const char *name2, const Eigen::Matrix< T2, R2, C2 > &y2)
Return true if the two matrices are of the same size.
+ +
Eigen::Matrix< typename boost::math::tools::promote_args< T1, T2 >::type, R, C > add(const Eigen::Matrix< T1, R, C > &m1, const Eigen::Matrix< T2, R, C > &m2)
Return the sum of the specified matrices.
Definition: add.hpp:27
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/annotated.html b/doc/api/html/annotated.html new file mode 100644 index 00000000000..deaee6f0199 --- /dev/null +++ b/doc/api/html/annotated.html @@ -0,0 +1,272 @@ + + + + + + +Stan Math Library: Class List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
+
Class List
+
+
+
Here are the classes, structs, unions and interfaces with brief descriptions:
+
[detail level 1234]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
oNboostReimplementing boost functionality
|\NmathReimplmeneting boost functionality for stan::math::var and and bugs in classification of integer types
oNEigen(Expert) Numerical traits for algorithmic differentiation variables
|oNinternal(Expert) Product traits for algorithmic differentiation variables
|oCNumTraits< stan::math::fvar< T > >Numerical traits template override for Eigen for automatic gradient variables
|\CNumTraits< stan::math::var >Numerical traits template override for Eigen for automatic gradient variables
oNstan
|oNmathMatrices and templated mathematical functions
|oCis_fvar< stan::math::fvar< T > >
|oCpartials_type< stan::math::fvar< T > >
|oCis_vector< const T >
|oCis_vector< std::vector< T > >
|oCis_vector< Eigen::Matrix< T, Eigen::Dynamic, 1 > >
|oCis_vector< Eigen::Matrix< T, 1, Eigen::Dynamic > >
|oCis_vector< Eigen::Block< T > >
|oCis_vector_like< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > >
|oCcontains_fvarMetaprogram to calculate the base scalar return type resulting from promoting all the scalar types of the template parameters
|oCcontains_nonconstant_struct
|oCcontains_vector
|oCerror_index
|oCis_constantMetaprogramming struct to detect whether a given type is constant in the mathematical sense (not the C++ const sense)
|oCis_constant_structMetaprogram to determine if a type has a base scalar type that can be assigned to type double
|oCis_constant_struct< std::vector< T > >
|oCis_constant_struct< Eigen::Matrix< T, R, C > >
|oCis_constant_struct< Eigen::Block< T > >
|oCis_fvar
|oCis_var
|oCis_var_or_arithmetic
|oCis_vector
|oCis_vector_like
|oCis_vector_like< T * >
|oCis_vector_like< const T >
|oCpartials_return_type
|oCpartials_type
|oCreturn_typeMetaprogram to calculate the base scalar return type resulting from promoting all the scalar types of the template parameters
|oCscalar_typeMetaprogram structure to determine the base scalar type of a template argument
|oCscalar_type< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > >
|oCscalar_type< T * >
|oCscalar_type_preMetaprogram structure to determine the type of first container of the base scalar type of a template argument
|oCsize_of_helper
|oCsize_of_helper< T, true >
|oCVectorBuilderHelperVectorBuilder allocates type T1 values to be used as intermediate values
|oCVectorBuilderHelper< T1, true, false >
|oCVectorBuilderHelper< T1, true, true >
|oCVectorBuilder
|oCVectorViewVectorView is a template metaprogram that takes its argument and allows it to be used like a vector
|oCVectorView< const T, is_array, throw_if_accessed >VectorView that has const correctness
|oCVectorView< const double, false, false >
|oCVectorViewMvt
|oCVectorViewMvt< const T, is_array, throw_if_accessed >VectorViewMvt that has const correctness
|oCis_var< stan::math::var >
|\Cpartials_type< stan::math::var >
\Nstd
 oCnumeric_limits< stan::math::fvar< T > >
 \Cnumeric_limits< stan::math::var >Specialization of numeric limits for var objects
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/append__col_8hpp.html b/doc/api/html/append__col_8hpp.html new file mode 100644 index 00000000000..6b40d6056d4 --- /dev/null +++ b/doc/api/html/append__col_8hpp.html @@ -0,0 +1,151 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/append_col.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
append_col.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/scal/meta/return_type.hpp>
+#include <stan/math/prim/scal/err/check_size_match.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + + + + + +

+Functions

template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
Eigen::Matrix< typename
+return_type< T1, T2 >::type,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::append_col (const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &B)
 Return the result of appending the second argument matrix after the first argument matrix, that is, putting them side by side, with the first matrix followed by the second matrix. More...
 
template<typename T1 , typename T2 , int C1, int C2>
Eigen::Matrix< typename
+return_type< T1, T2 >::type,
+1, Eigen::Dynamic > 
stan::math::append_col (const Eigen::Matrix< T1, 1, C1 > &A, const Eigen::Matrix< T2, 1, C2 > &B)
 Return the result of concatenaing the first row vector followed by the second row vector side by side, with the result being a row vector. More...
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::append_col (const Eigen::Matrix< T, R1, C1 > &A, const Eigen::Matrix< T, R2, C2 > &B)
 Return the result of appending the second argument matrix after the first argument matrix, that is, putting them side by side, with the first matrix followed by the second matrix. More...
 
template<typename T , int C1, int C2>
Eigen::Matrix< T,
+1, Eigen::Dynamic > 
stan::math::append_col (const Eigen::Matrix< T, 1, C1 > &A, const Eigen::Matrix< T, 1, C2 > &B)
 Return the result of concatenaing the first row vector followed by the second row vector side by side, with the result being a row vector. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/append__col_8hpp_source.html b/doc/api/html/append__col_8hpp_source.html new file mode 100644 index 00000000000..9e99366cee9 --- /dev/null +++ b/doc/api/html/append__col_8hpp_source.html @@ -0,0 +1,207 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/append_col.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
append_col.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_APPEND_COL_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_APPEND_COL_HPP
+
3 
+ + + +
7 #include <vector>
+
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
36  template <typename T1, typename T2, int R1, int C1, int R2, int C2>
+
37  inline Eigen::Matrix<typename return_type<T1, T2>::type,
+
38  Eigen::Dynamic, Eigen::Dynamic>
+
39  append_col(const Eigen::Matrix<T1, R1, C1>& A,
+
40  const Eigen::Matrix<T2, R2, C2>& B) {
+
41  using Eigen::Dynamic;
+
42  using Eigen::Matrix;
+ +
44 
+
45  int Arows = A.rows();
+
46  int Brows = B.rows();
+
47  int Acols = A.cols();
+
48  int Bcols = B.cols();
+
49  check_size_match("append_col",
+
50  "rows of A", Arows,
+
51  "rows of B", Brows);
+
52 
+
53  Matrix<typename return_type<T1, T2>::type, Dynamic, Dynamic>
+
54  result(Arows, Acols+Bcols);
+
55  for (int j = 0; j < Acols; j++)
+
56  for (int i = 0; i < Arows; i++)
+
57  result(i, j) = A(i, j);
+
58 
+
59  for (int j = Acols, k = 0; k < Bcols; j++, k++)
+
60  for (int i = 0; i < Arows; i++)
+
61  result(i, j) = B(i, k);
+
62  return result;
+
63  }
+
64 
+
82  template <typename T1, typename T2, int C1, int C2>
+
83  inline Eigen::Matrix<typename return_type<T1, T2>::type,
+
84  1, Eigen::Dynamic>
+
85  append_col(const Eigen::Matrix<T1, 1, C1>& A,
+
86  const Eigen::Matrix<T2, 1, C2>& B) {
+
87  using Eigen::Dynamic;
+
88  using Eigen::Matrix;
+
89 
+
90  int Asize = A.size();
+
91  int Bsize = B.size();
+
92  Matrix<typename return_type<T1, T2>::type, 1, Dynamic>
+
93  result(Asize + Bsize);
+
94  for (int i = 0; i < Asize; i++)
+
95  result(i) = A(i);
+
96  for (int i = 0, j = Asize; i < Bsize; i++, j++)
+
97  result(j) = B(i);
+
98  return result;
+
99  }
+
100 
+
101 
+
126  template <typename T, int R1, int C1, int R2, int C2>
+
127  inline Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
128  append_col(const Eigen::Matrix<T, R1, C1>& A,
+
129  const Eigen::Matrix<T, R2, C2>& B) {
+
130  using Eigen::Matrix;
+
131  using Eigen::Dynamic;
+
132 
+
133  check_size_match("append_col",
+
134  "rows of A", A.rows(),
+
135  "rows of B", B.rows());
+
136 
+
137  Matrix<T, Dynamic, Dynamic> result(A.rows(), A.cols()+B.cols());
+
138  result << A, B;
+
139  return result;
+
140  }
+
141 
+
158  template <typename T, int C1, int C2>
+
159  inline Eigen::Matrix<T, 1, Eigen::Dynamic>
+
160  append_col(const Eigen::Matrix<T, 1, C1>& A,
+
161  const Eigen::Matrix<T, 1, C2>& B) {
+
162  using Eigen::Matrix;
+
163  using Eigen::Dynamic;
+
164 
+
165  Matrix<T, 1, Dynamic> result(A.size()+B.size());
+
166  result << A, B;
+
167  return result;
+
168  }
+
169 
+
170  }
+
171 
+
172 }
+
173 
+
174 #endif
+ +
Eigen::Matrix< typename return_type< T1, T2 >::type, Eigen::Dynamic, Eigen::Dynamic > append_col(const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &B)
Return the result of appending the second argument matrix after the first argument matrix...
Definition: append_col.hpp:39
+ +
bool check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Return true if the provided sizes match.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/append__row_8hpp.html b/doc/api/html/append__row_8hpp.html new file mode 100644 index 00000000000..3f7b3a79006 --- /dev/null +++ b/doc/api/html/append__row_8hpp.html @@ -0,0 +1,151 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/append_row.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
append_row.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/scal/meta/return_type.hpp>
+#include <stan/math/prim/scal/err/check_size_match.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + + + + + +

+Functions

template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
Eigen::Matrix< typename
+return_type< T1, T2 >::type,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::append_row (const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &B)
 Return the result of stacking the rows of the first argument matrix on top of the second argument matrix. More...
 
template<typename T1 , typename T2 , int R1, int R2>
Eigen::Matrix< typename
+return_type< T1, T2 >::type,
+Eigen::Dynamic, 1 > 
stan::math::append_row (const Eigen::Matrix< T1, R1, 1 > &A, const Eigen::Matrix< T2, R2, 1 > &B)
 Return the result of stacking the first vector on top of the second vector, with the result being a vector. More...
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::append_row (const Eigen::Matrix< T, R1, C1 > &A, const Eigen::Matrix< T, R2, C2 > &B)
 Return the result of stacking the rows of the first argument matrix on top of the second argument matrix. More...
 
template<typename T , int R1, int R2>
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::append_row (const Eigen::Matrix< T, R1, 1 > &A, const Eigen::Matrix< T, R2, 1 > &B)
 Return the result of stacking the first vector on top of the second vector, with the result being a vector. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/append__row_8hpp_source.html b/doc/api/html/append__row_8hpp_source.html new file mode 100644 index 00000000000..155a20c95d3 --- /dev/null +++ b/doc/api/html/append__row_8hpp_source.html @@ -0,0 +1,208 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/append_row.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
append_row.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_APPEND_ROW_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_APPEND_ROW_HPP
+
3 
+ + + +
7 #include <vector>
+
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
34  template <typename T1, typename T2, int R1, int C1, int R2, int C2>
+
35  inline Eigen::Matrix<typename return_type<T1, T2>::type,
+
36  Eigen::Dynamic, Eigen::Dynamic>
+
37  append_row(const Eigen::Matrix<T1, R1, C1>& A,
+
38  const Eigen::Matrix<T2, R2, C2>& B) {
+
39  using Eigen::Dynamic;
+
40  using Eigen::Matrix;
+
41 
+
42  int Arows = A.rows();
+
43  int Brows = B.rows();
+
44  int Acols = A.cols();
+
45  int Bcols = B.cols();
+
46  check_size_match("append_row",
+
47  "columns of A", Acols,
+
48  "columns of B", Bcols);
+
49 
+
50  Matrix<typename return_type<T1, T2>::type, Dynamic, Dynamic>
+
51  result(Arows + Brows, Acols);
+
52  for (int j = 0; j < Acols; j++) {
+
53  for (int i = 0; i < Arows; i++)
+
54  result(i, j) = A(i, j);
+
55  for (int i = Arows, k = 0; k < Brows; i++, k++)
+
56  result(i, j) = B(k, j);
+
57  }
+
58  return result;
+
59  }
+
60 
+
61 
+
77  template <typename T1, typename T2, int R1, int R2>
+
78  inline Eigen::Matrix<typename return_type<T1, T2>::type,
+
79  Eigen::Dynamic, 1>
+
80  append_row(const Eigen::Matrix<T1, R1, 1>& A,
+
81  const Eigen::Matrix<T2, R2, 1>& B) {
+
82  using Eigen::Dynamic;
+
83  using Eigen::Matrix;
+
84 
+
85  int Asize = A.size();
+
86  int Bsize = B.size();
+
87  Matrix<typename return_type<T1, T2>::type, 1, Dynamic>
+
88  result(Asize + Bsize);
+
89  for (int i = 0; i < Asize; i++)
+
90  result(i) = A(i);
+
91  for (int i = 0, j = Asize; i < Bsize; i++, j++)
+
92  result(j) = B(i);
+
93  return result;
+
94  }
+
95 
+
96 
+
119  template <typename T, int R1, int C1, int R2, int C2>
+
120  inline Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
121  append_row(const Eigen::Matrix<T, R1, C1>& A,
+
122  const Eigen::Matrix<T, R2, C2>& B) {
+
123  using Eigen::Dynamic;
+
124  using Eigen::Matrix;
+
125 
+
126  check_size_match("append_row",
+
127  "columns of A", A.cols(),
+
128  "columns of B", B.cols());
+
129 
+
130  Matrix<T, Dynamic, Dynamic>
+
131  result(A.rows() + B.rows(), A.cols());
+
132  result << A, B;
+
133  return result;
+
134  }
+
135 
+
136 
+
153  template <typename T, int R1, int R2>
+
154  inline Eigen::Matrix<T, Eigen::Dynamic, 1>
+
155  append_row(const Eigen::Matrix<T, R1, 1>& A,
+
156  const Eigen::Matrix<T, R2, 1>& B) {
+
157  using Eigen::Dynamic;
+
158  using Eigen::Matrix;
+
159 
+
160  Matrix<T, Dynamic, 1> result(A.size()+B.size());
+
161  result << A, B;
+
162  return result;
+
163  }
+
164 
+
165  }
+
166 
+
167 }
+
168 
+
169 #endif
+ + +
Eigen::Matrix< typename return_type< T1, T2 >::type, Eigen::Dynamic, Eigen::Dynamic > append_row(const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &B)
Return the result of stacking the rows of the first argument matrix on top of the second argument mat...
Definition: append_row.hpp:37
+
bool check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Return true if the provided sizes match.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/arr_2meta_2container__view_8hpp.html b/doc/api/html/arr_2meta_2container__view_8hpp.html new file mode 100644 index 00000000000..08a77b3e118 --- /dev/null +++ b/doc/api/html/arr_2meta_2container__view_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/meta/container_view.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Classes | +Namespaces
+
+
container_view.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/container_view.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  stan::math::container_view< std::vector< T1 >, T2 >
 Template specialization for scalar view of array y with scalar type T2 with proper indexing inferred from input vector x of scalar type T1. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/arr_2meta_2container__view_8hpp_source.html b/doc/api/html/arr_2meta_2container__view_8hpp_source.html new file mode 100644 index 00000000000..e5e4b3ff049 --- /dev/null +++ b/doc/api/html/arr_2meta_2container__view_8hpp_source.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/meta/container_view.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
container_view.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_ARR_META_CONTAINER_VIEW_HPP
+
2 #define STAN_MATH_PRIM_ARR_META_CONTAINER_VIEW_HPP
+
3 
+ +
5 #include <vector>
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
19  template <typename T1, typename T2>
+
20  class container_view<std::vector<T1>, T2> {
+
21  public:
+
28  container_view(const std::vector<T1>& x, T2* y)
+
29  : y_(y) { }
+
30 
+
37  T2& operator[](int i) {
+
38  return y_[i];
+
39  }
+
40  private:
+
41  T2* y_;
+
42  };
+
43  }
+
44 }
+
45 
+
46 #endif
+
container_view(const std::vector< T1 > &x, T2 *y)
Constructor.
+
T2 & operator[](int i)
operator[](int i) returns reference to scalar view indexed at i
+
Primary template class for container view of array y with same structure as T1 and size as x...
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/arr_2meta_2get_8hpp.html b/doc/api/html/arr_2meta_2get_8hpp.html new file mode 100644 index 00000000000..643b4aa6cb3 --- /dev/null +++ b/doc/api/html/arr_2meta_2get_8hpp.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/meta/get.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
get.hpp File Reference
+
+
+
#include <cstdlib>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + +

+Namespaces

 stan
 
+ + + + +

+Functions

template<typename T >
stan::get (const std::vector< T > &x, size_t n)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/arr_2meta_2get_8hpp_source.html b/doc/api/html/arr_2meta_2get_8hpp_source.html new file mode 100644 index 00000000000..d817112ffe5 --- /dev/null +++ b/doc/api/html/arr_2meta_2get_8hpp_source.html @@ -0,0 +1,124 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/meta/get.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
get.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_ARR_META_GET_HPP
+
2 #define STAN_MATH_PRIM_ARR_META_GET_HPP
+
3 
+
4 #include <cstdlib>
+
5 #include <vector>
+
6 
+
7 namespace stan {
+
8 
+
9  template <typename T>
+
10  inline T get(const std::vector<T>& x, size_t n) {
+
11  return x[n];
+
12  }
+
13 
+
14 }
+
15 #endif
+
16 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/arr_2meta_2index__type_8hpp.html b/doc/api/html/arr_2meta_2index__type_8hpp.html new file mode 100644 index 00000000000..b9e580cc736 --- /dev/null +++ b/doc/api/html/arr_2meta_2index__type_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/meta/index_type.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Classes | +Namespaces
+
+
index_type.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/index_type.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + +

+Classes

struct  stan::math::index_type< std::vector< T > >
 Template metaprogram class to compute the type of index for a standard vector. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/arr_2meta_2index__type_8hpp_source.html b/doc/api/html/arr_2meta_2index__type_8hpp_source.html new file mode 100644 index 00000000000..630d3a077fd --- /dev/null +++ b/doc/api/html/arr_2meta_2index__type_8hpp_source.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/meta/index_type.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
index_type.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_ARR_META_INDEX_TYPE_HPP
+
2 #define STAN_MATH_PRIM_ARR_META_INDEX_TYPE_HPP
+
3 
+ +
5 #include <vector>
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
17  template <typename T>
+
18  struct index_type<std::vector<T> > {
+
22  typedef typename std::vector<T>::size_type type;
+
23  };
+
24 
+
25 
+
26  }
+
27 }
+
28 
+
29 
+
30 #endif
+ +
std::vector< T >::size_type type
Typedef for index of standard vectors.
Definition: index_type.hpp:22
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:19
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/arr_2meta_2is__vector_8hpp.html b/doc/api/html/arr_2meta_2is__vector_8hpp.html new file mode 100644 index 00000000000..a16ef0e057b --- /dev/null +++ b/doc/api/html/arr_2meta_2is__vector_8hpp.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/meta/is_vector.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Classes | +Namespaces
+
+
is_vector.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/is_vector.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + +

+Classes

struct  stan::is_vector< const T >
 
struct  stan::is_vector< std::vector< T > >
 
+ + + +

+Namespaces

 stan
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/arr_2meta_2is__vector_8hpp_source.html b/doc/api/html/arr_2meta_2is__vector_8hpp_source.html new file mode 100644 index 00000000000..e0f7ddfdf3b --- /dev/null +++ b/doc/api/html/arr_2meta_2is__vector_8hpp_source.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/meta/is_vector.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
is_vector.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_ARR_META_IS_VECTOR_HPP
+
2 #define STAN_MATH_PRIM_ARR_META_IS_VECTOR_HPP
+
3 
+ +
5 #include <vector>
+
6 
+
7 namespace stan {
+
8 
+
9  // FIXME: use boost::type_traits::remove_all_extents to
+
10  // extend to array/ptr types
+
11 
+
12  template <typename T>
+
13  struct is_vector<const T> {
+ +
15  typedef T type;
+
16  };
+
17  template <typename T>
+
18  struct is_vector<std::vector<T> > {
+
19  enum { value = 1 };
+
20  typedef T type;
+
21  };
+
22 }
+
23 #endif
+
24 
+ + + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/arr_2meta_2length_8hpp.html b/doc/api/html/arr_2meta_2length_8hpp.html new file mode 100644 index 00000000000..85f7948f2c9 --- /dev/null +++ b/doc/api/html/arr_2meta_2length_8hpp.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/meta/length.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
length.hpp File Reference
+
+
+
#include <cstdlib>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + +

+Namespaces

 stan
 
+ + + + +

+Functions

template<typename T >
size_t stan::length (const std::vector< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/arr_2meta_2length_8hpp_source.html b/doc/api/html/arr_2meta_2length_8hpp_source.html new file mode 100644 index 00000000000..6ba8b1aed27 --- /dev/null +++ b/doc/api/html/arr_2meta_2length_8hpp_source.html @@ -0,0 +1,124 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/meta/length.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
length.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_ARR_META_LENGTH_HPP
+
2 #define STAN_MATH_PRIM_ARR_META_LENGTH_HPP
+
3 
+
4 #include <cstdlib>
+
5 #include <vector>
+
6 
+
7 namespace stan {
+
8 
+
9  template <typename T>
+
10  size_t length(const std::vector<T>& x) {
+
11  return x.size();
+
12  }
+
13 }
+
14 #endif
+
15 
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/arr_8hpp.html b/doc/api/html/arr_8hpp.html new file mode 100644 index 00000000000..c20fa02de5e --- /dev/null +++ b/doc/api/html/arr_8hpp.html @@ -0,0 +1,110 @@ + + + + + + +Stan Math Library: stan/math/mix/arr.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
arr.hpp File Reference
+
+
+ +

Go to the source code of this file.

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/arr_8hpp_source.html b/doc/api/html/arr_8hpp_source.html new file mode 100644 index 00000000000..cfbca2fb4e7 --- /dev/null +++ b/doc/api/html/arr_8hpp_source.html @@ -0,0 +1,112 @@ + + + + + + +Stan Math Library: stan/math/mix/arr.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
arr.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_MIX_ARR_HPP
+
2 #define STAN_MATH_MIX_ARR_HPP
+
3 
+
4 #endif
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/array__builder_8hpp.html b/doc/api/html/array__builder_8hpp.html new file mode 100644 index 00000000000..46e7978db04 --- /dev/null +++ b/doc/api/html/array__builder_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/array_builder.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Classes | +Namespaces
+
+
array_builder.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/promoter.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + +

+Classes

struct  stan::math::array_builder< T >
 Structure for building up arrays in an expression (rather than in statements) using an argumentchaining add() method and a getter method array() to return the result. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/array__builder_8hpp_source.html b/doc/api/html/array__builder_8hpp_source.html new file mode 100644 index 00000000000..974a7950f63 --- /dev/null +++ b/doc/api/html/array__builder_8hpp_source.html @@ -0,0 +1,143 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/array_builder.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
array_builder.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_ARRAY_BUILDER_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_ARRAY_BUILDER_HPP
+
3 
+ +
5 #include <vector>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
15  template <typename T>
+
16  struct array_builder {
+
17  std::vector<T> x_;
+
18  array_builder() : x_() { }
+
19  template <typename F>
+
20  array_builder& add(const F& u) {
+
21  T t;
+ +
23  x_.push_back(t);
+
24  return *this;
+
25  }
+
26  std::vector<T> array() {
+
27  return x_;
+
28  }
+
29  };
+
30 
+
31  }
+
32 }
+
33 #endif
+ +
std::vector< T > array()
+
array_builder & add(const F &u)
+ + +
Structure for building up arrays in an expression (rather than in statements) using an argumentchaini...
+
static void promote(const F &u, T &t)
Definition: promoter.hpp:15
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/assign_8hpp.html b/doc/api/html/assign_8hpp.html new file mode 100644 index 00000000000..c92d97633e6 --- /dev/null +++ b/doc/api/html/assign_8hpp.html @@ -0,0 +1,158 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/assign.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
assign.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/scal/err/invalid_argument.hpp>
+#include <stan/math/prim/scal/err/check_size_match.hpp>
+#include <stan/math/prim/mat/err/check_matching_sizes.hpp>
+#include <stan/math/prim/mat/err/check_matching_dims.hpp>
+#include <iostream>
+#include <sstream>
+#include <stdexcept>
+#include <string>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

void stan::math::print_mat_size (int n, std::ostream &o)
 Helper function to return the matrix size as either "dynamic" or "1". More...
 
template<typename LHS , typename RHS >
void stan::math::assign (LHS &lhs, const RHS &rhs)
 Copy the right-hand side's value to the left-hand side variable. More...
 
template<typename LHS , typename RHS , int R1, int C1, int R2, int C2>
void stan::math::assign (Eigen::Matrix< LHS, R1, C1 > &x, const Eigen::Matrix< RHS, R2, C2 > &y)
 Copy the right-hand side's value to the left-hand side variable. More...
 
template<typename LHS , typename RHS , int R, int C>
void stan::math::assign (Eigen::Matrix< LHS, R, C > &x, const Eigen::Matrix< RHS, R, C > &y)
 Copy the right-hand side's value to the left-hand side variable. More...
 
template<typename LHS , typename RHS , int R, int C>
void stan::math::assign (Eigen::Block< LHS > x, const Eigen::Matrix< RHS, R, C > &y)
 Copy the right-hand side's value to the left-hand side variable. More...
 
template<typename LHS , typename RHS >
void stan::math::assign (std::vector< LHS > &x, const std::vector< RHS > &y)
 Copy the right-hand side's value to the left-hand side variable. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/assign_8hpp_source.html b/doc/api/html/assign_8hpp_source.html new file mode 100644 index 00000000000..055fd6f90ba --- /dev/null +++ b/doc/api/html/assign_8hpp_source.html @@ -0,0 +1,211 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/assign.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
assign.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_ASSIGN_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_ASSIGN_HPP
+
3 
+ + + + + +
9 #include <iostream>
+
10 #include <sstream>
+
11 #include <stdexcept>
+
12 #include <string>
+
13 #include <vector>
+
14 
+
15 namespace stan {
+
16 
+
17  namespace math {
+
18 
+
26  void print_mat_size(int n, std::ostream& o) {
+
27  if (n == Eigen::Dynamic)
+
28  o << "dynamically sized";
+
29  else
+
30  o << n;
+
31  }
+
32 
+
33  // Recursive assignment with size match checking and promotion
+
34 
+
49  template <typename LHS, typename RHS>
+
50  inline void
+
51  assign(LHS& lhs, const RHS& rhs) {
+
52  lhs = rhs;
+
53  }
+
54 
+
75  template <typename LHS, typename RHS, int R1, int C1, int R2, int C2>
+
76  inline void
+
77  assign(Eigen::Matrix<LHS, R1, C1>& x,
+
78  const Eigen::Matrix<RHS, R2, C2>& y) {
+
79  std::stringstream ss;
+
80  ss << "shapes must match, but found"
+
81  << " left-hand side rows=";
+
82  print_mat_size(R1, ss);
+
83  ss << "; left-hand side cols=";
+
84  print_mat_size(C1, ss);
+
85  ss << "; right-hand side rows=";
+
86  print_mat_size(R2, ss);
+
87  ss << "; right-hand side cols=";
+
88  print_mat_size(C2, ss);
+
89  std::string ss_str(ss.str());
+
90  invalid_argument("assign(Eigen::Matrix, Eigen::Matrix)",
+
91  "", "", ss_str.c_str());
+
92  }
+
93 
+
111  template <typename LHS, typename RHS, int R, int C>
+
112  inline void
+
113  assign(Eigen::Matrix<LHS, R, C>& x,
+
114  const Eigen::Matrix<RHS, R, C>& y) {
+ +
116  "left-hand-side", x,
+
117  "right-hand-side", y);
+
118  for (int i = 0; i < x.size(); ++i)
+
119  assign(x(i), y(i));
+
120  }
+
121 
+
140  template <typename LHS, typename RHS, int R, int C>
+
141  inline void
+
142  assign(Eigen::Block<LHS> x,
+
143  const Eigen::Matrix<RHS, R, C>& y) {
+ +
145  "left-hand side rows", x.rows(),
+
146  "right-hand side rows", y.rows());
+ +
148  "left-hand side cols", x.cols(),
+
149  "right-hand side cols", y.cols());
+
150  for (int n = 0; n < y.cols(); ++n)
+
151  for (int m = 0; m < y.rows(); ++m)
+
152  assign(x(m, n), y(m, n));
+
153  }
+
154 
+
155 
+
175  template <typename LHS, typename RHS>
+
176  inline void
+
177  assign(std::vector<LHS>& x, const std::vector<RHS>& y) {
+ +
179  "left-hand side", x,
+
180  "right-hand side", y);
+
181  for (size_t i = 0; i < x.size(); ++i)
+
182  assign(x[i], y[i]);
+
183  }
+
184 
+
185  }
+
186 }
+
187 #endif
+ + + + +
bool check_matching_dims(const char *function, const char *name1, const Eigen::Matrix< T1, R1, C1 > &y1, const char *name2, const Eigen::Matrix< T2, R2, C2 > &y2)
Return true if the two matrices are of the same size.
+
void invalid_argument(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw an invalid_argument exception with a consistently formatted message.
+
bool check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Return true if the provided sizes match.
+
bool check_matching_sizes(const char *function, const char *name1, const T_y1 &y1, const char *name2, const T_y2 &y2)
Return true if two structures at the same size.
+ +
void assign(LHS &lhs, const RHS &rhs)
Copy the right-hand side's value to the left-hand side variable.
Definition: assign.hpp:51
+
void print_mat_size(int n, std::ostream &o)
Helper function to return the matrix size as either "dynamic" or "1".
Definition: assign.hpp:26
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/autocorrelation_8hpp.html b/doc/api/html/autocorrelation_8hpp.html new file mode 100644 index 00000000000..534d139f9e8 --- /dev/null +++ b/doc/api/html/autocorrelation_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/autocorrelation.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
autocorrelation.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/mean.hpp>
+#include <unsupported/Eigen/FFT>
+#include <complex>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
void stan::math::autocorrelation (const std::vector< T > &y, std::vector< T > &ac, Eigen::FFT< T > &fft)
 Write autocorrelation estimates for every lag for the specified input sequence into the specified result using the specified FFT engine. More...
 
template<typename T >
void stan::math::autocorrelation (const std::vector< T > &y, std::vector< T > &ac)
 Write autocorrelation estimates for every lag for the specified input sequence into the specified result. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/autocorrelation_8hpp_source.html b/doc/api/html/autocorrelation_8hpp_source.html new file mode 100644 index 00000000000..246afba4b49 --- /dev/null +++ b/doc/api/html/autocorrelation_8hpp_source.html @@ -0,0 +1,205 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/autocorrelation.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
autocorrelation.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_AUTOCORRELATION_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_AUTOCORRELATION_HPP
+
3 
+ +
5 #include <unsupported/Eigen/FFT>
+
6 #include <complex>
+
7 #include <vector>
+
8 
+
9 
+
10 namespace stan {
+
11 
+
12  namespace math {
+
13 
+
14  namespace {
+
19  size_t fft_next_good_size(size_t N) {
+
20  if (N <= 2) return 2;
+
21  while (true) {
+
22  size_t m = N;
+
23  while ((m % 2) == 0) m /= 2;
+
24  while ((m % 3) == 0) m /= 3;
+
25  while ((m % 5) == 0) m /= 5;
+
26  if (m <= 1)
+
27  return N;
+
28  N++;
+
29  }
+
30  }
+
31  }
+
32 
+
53  template <typename T>
+
54  void autocorrelation(const std::vector<T>& y,
+
55  std::vector<T>& ac,
+
56  Eigen::FFT<T>& fft) {
+
57  using std::vector;
+
58  using std::complex;
+
59 
+
60  size_t N = y.size();
+
61  size_t M = fft_next_good_size(N);
+
62  size_t Mt2 = 2 * M;
+
63 
+
64 
+
65  vector<complex<T> > freqvec;
+
66 
+
67  // centered_signal = y-mean(y) followed by N zeroes
+
68  vector<T> centered_signal(y);
+
69  centered_signal.insert(centered_signal.end(), Mt2-N, 0.0);
+
70  T mean = stan::math::mean(y);
+
71  for (size_t i = 0; i < N; i++)
+
72  centered_signal[i] -= mean;
+
73 
+
74  fft.fwd(freqvec, centered_signal);
+
75  for (size_t i = 0; i < Mt2; ++i)
+
76  freqvec[i] = complex<T>(norm(freqvec[i]), 0.0);
+
77 
+
78  fft.inv(ac, freqvec);
+
79  ac.resize(N);
+
80 
+
81  /*
+
82  vector<T> mask_correction_factors;
+
83  vector<T> mask;
+
84  mask.insert(mask.end(), N, 1.0);
+
85  mask.insert(mask.end(), N, 0.0);
+
86 
+
87  freqvec.resize(0);
+
88  fft.fwd(freqvec, mask);
+
89  for (size_t i = 0; i < Nt2; ++i)
+
90  freqvec[i] = complex<T>(norm(freqvec[i]), 0.0);
+
91 
+
92  fft.inv(mask_correction_factors, freqvec);
+
93 
+
94  for (size_t i = 0; i < N; ++i) {
+
95  ac[i] /= mask_correction_factors[i];
+
96  }
+
97  */
+
98  for (size_t i = 0; i < N; ++i) {
+
99  ac[i] /= (N - i);
+
100  }
+
101  T var = ac[0];
+
102  for (size_t i = 0; i < N; ++i)
+
103  ac[i] /= var;
+
104  }
+
105 
+
122  template <typename T>
+
123  void autocorrelation(const std::vector<T>& y,
+
124  std::vector<T>& ac) {
+
125  Eigen::FFT<T> fft;
+
126  return autocorrelation(y, ac, fft);
+
127  }
+
128 
+
129 
+
130  }
+
131 }
+
132 
+
133 #endif
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+ +
boost::math::tools::promote_args< T >::type mean(const std::vector< T > &v)
Returns the sample mean (i.e., average) of the coefficients in the specified standard vector...
Definition: mean.hpp:23
+
void autocorrelation(const std::vector< T > &y, std::vector< T > &ac, Eigen::FFT< T > &fft)
Write autocorrelation estimates for every lag for the specified input sequence into the specified res...
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/autocovariance_8hpp.html b/doc/api/html/autocovariance_8hpp.html new file mode 100644 index 00000000000..f305851bdd1 --- /dev/null +++ b/doc/api/html/autocovariance_8hpp.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/autocovariance.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
autocovariance.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/autocorrelation.hpp>
+#include <stan/math/prim/mat/fun/variance.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
void stan::math::autocovariance (const std::vector< T > &y, std::vector< T > &acov, Eigen::FFT< T > &fft)
 Write autocovariance estimates for every lag for the specified input sequence into the specified result using the specified FFT engine. More...
 
template<typename T >
void stan::math::autocovariance (const std::vector< T > &y, std::vector< T > &acov)
 Write autocovariance estimates for every lag for the specified input sequence into the specified result. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/autocovariance_8hpp_source.html b/doc/api/html/autocovariance_8hpp_source.html new file mode 100644 index 00000000000..554c8f42e36 --- /dev/null +++ b/doc/api/html/autocovariance_8hpp_source.html @@ -0,0 +1,150 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/autocovariance.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
autocovariance.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_AUTOCOVARIANCE_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_AUTOCOVARIANCE_HPP
+
3 
+ + +
6 #include <vector>
+
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12 
+
33  template <typename T>
+
34  void autocovariance(const std::vector<T>& y,
+
35  std::vector<T>& acov,
+
36  Eigen::FFT<T>& fft) {
+
37  stan::math::autocorrelation(y, acov, fft);
+
38 
+
39  T var = stan::math::variance(y) * (y.size()-1) / y.size();
+
40  for (size_t i = 0; i < y.size(); i++) {
+
41  acov[i] *= var;
+
42  }
+
43  }
+
44 
+
61  template <typename T>
+
62  void autocovariance(const std::vector<T>& y,
+
63  std::vector<T>& acov) {
+
64  Eigen::FFT<T> fft;
+
65  autocovariance(y, acov, fft);
+
66  }
+
67 
+
68 
+
69  }
+
70 }
+
71 
+
72 #endif
+ + +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
boost::math::tools::promote_args< T >::type variance(const std::vector< T > &v)
Returns the sample variance (divide by length - 1) of the coefficients in the specified standard vect...
Definition: variance.hpp:24
+
void autocovariance(const std::vector< T > &y, std::vector< T > &acov, Eigen::FFT< T > &fft)
Write autocovariance estimates for every lag for the specified input sequence into the specified resu...
+
void autocorrelation(const std::vector< T > &y, std::vector< T > &ac, Eigen::FFT< T > &fft)
Write autocorrelation estimates for every lag for the specified input sequence into the specified res...
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/autodiffstackstorage_8hpp.html b/doc/api/html/autodiffstackstorage_8hpp.html new file mode 100644 index 00000000000..b6c8f77d378 --- /dev/null +++ b/doc/api/html/autodiffstackstorage_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/rev/core/autodiffstackstorage.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Classes | +Namespaces
+
+
autodiffstackstorage.hpp File Reference
+
+
+
#include <stan/math/memory/stack_alloc.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + +

+Classes

struct  stan::math::AutodiffStackStorage< ChainableT, ChainableAllocT >
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/autodiffstackstorage_8hpp_source.html b/doc/api/html/autodiffstackstorage_8hpp_source.html new file mode 100644 index 00000000000..b8c541159a8 --- /dev/null +++ b/doc/api/html/autodiffstackstorage_8hpp_source.html @@ -0,0 +1,174 @@ + + + + + + +Stan Math Library: stan/math/rev/core/autodiffstackstorage.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
autodiffstackstorage.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_AUTODIFFSTACKSTORAGE_HPP
+
2 #define STAN_MATH_REV_CORE_AUTODIFFSTACKSTORAGE_HPP
+
3 
+ +
5 #include <vector>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  template<typename ChainableT,
+
11  typename ChainableAllocT>
+ +
13  static std::vector<ChainableT*> var_stack_;
+
14  static std::vector<ChainableT*> var_nochain_stack_;
+
15  static std::vector<ChainableAllocT*> var_alloc_stack_;
+ +
17 
+
18  // nested positions
+
19  static std::vector<size_t> nested_var_stack_sizes_;
+
20  static std::vector<size_t> nested_var_nochain_stack_sizes_;
+
21  static std::vector<size_t> nested_var_alloc_stack_starts_;
+
22  };
+
23 
+
24  template<typename ChainableT, typename ChainableAllocT>
+
25  std::vector<ChainableT*>
+ +
27 
+
28  template<typename ChainableT, typename ChainableAllocT>
+
29  std::vector<ChainableT*>
+ +
31 
+
32  template<typename ChainableT, typename ChainableAllocT>
+
33  std::vector<ChainableAllocT*>
+ +
35 
+
36  template<typename ChainableT, typename ChainableAllocT>
+ + +
39 
+
40  template<typename ChainableT, typename ChainableAllocT>
+
41  std::vector<size_t>
+ +
43 
+
44  template<typename ChainableT, typename ChainableAllocT>
+
45  std::vector<size_t>
+ +
47  ::nested_var_nochain_stack_sizes_;
+
48 
+
49  template<typename ChainableT, typename ChainableAllocT>
+
50  std::vector<size_t>
+ +
52  ::nested_var_alloc_stack_starts_;
+
53 
+
54  }
+
55 }
+
56 #endif
+ +
static std::vector< ChainableAllocT * > var_alloc_stack_
+
static std::vector< ChainableT * > var_nochain_stack_
+
static std::vector< size_t > nested_var_nochain_stack_sizes_
+
static std::vector< size_t > nested_var_stack_sizes_
+ + +
static std::vector< ChainableT * > var_stack_
+
An instance of this class provides a memory pool through which blocks of raw memory may be allocated ...
Definition: stack_alloc.hpp:78
+
static std::vector< size_t > nested_var_alloc_stack_starts_
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/bc_s.png b/doc/api/html/bc_s.png new file mode 100644 index 00000000000..224b29aa984 Binary files /dev/null and b/doc/api/html/bc_s.png differ diff --git a/doc/api/html/bdwn.png b/doc/api/html/bdwn.png new file mode 100644 index 00000000000..940a0b95044 Binary files /dev/null and b/doc/api/html/bdwn.png differ diff --git a/doc/api/html/bernoulli__ccdf__log_8hpp.html b/doc/api/html/bernoulli__ccdf__log_8hpp.html new file mode 100644 index 00000000000..c022ec7ebd2 --- /dev/null +++ b/doc/api/html/bernoulli__ccdf__log_8hpp.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/bernoulli_ccdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
bernoulli_ccdf_log.hpp File Reference
+
+
+
#include <boost/random/bernoulli_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_bounded.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/inv_logit.hpp>
+#include <stan/math/prim/scal/fun/log1m.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_n , typename T_prob >
return_type< T_prob >::type stan::math::bernoulli_ccdf_log (const T_n &n, const T_prob &theta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/bernoulli__ccdf__log_8hpp_source.html b/doc/api/html/bernoulli__ccdf__log_8hpp_source.html new file mode 100644 index 00000000000..38b8b118d3b --- /dev/null +++ b/doc/api/html/bernoulli__ccdf__log_8hpp_source.html @@ -0,0 +1,219 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/bernoulli_ccdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
bernoulli_ccdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_BERNOULLI_CCDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_BERNOULLI_CCDF_LOG_HPP
+
3 
+
4 #include <boost/random/bernoulli_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + +
16 #include <cmath>
+
17 
+
18 namespace stan {
+
19 
+
20  namespace math {
+
21 
+
22  template <typename T_n, typename T_prob>
+
23  typename return_type<T_prob>::type
+
24  bernoulli_ccdf_log(const T_n& n, const T_prob& theta) {
+
25  static const char* function("stan::math::bernoulli_ccdf_log");
+ +
27  T_partials_return;
+
28 
+ + + + +
33 
+
34  // Ensure non-zero argument lenghts
+
35  if (!(stan::length(n) && stan::length(theta)))
+
36  return 0.0;
+
37 
+
38  T_partials_return P(0.0);
+
39 
+
40  // Validate arguments
+
41  check_finite(function, "Probability parameter", theta);
+
42  check_bounded(function, "Probability parameter", theta, 0.0, 1.0);
+
43  check_consistent_sizes(function,
+
44  "Random variable", n,
+
45  "Probability parameter", theta);
+
46 
+
47  // set up template expressions wrapping scalars into vector views
+
48  VectorView<const T_n> n_vec(n);
+
49  VectorView<const T_prob> theta_vec(theta);
+
50  size_t size = max_size(n, theta);
+
51 
+
52  // Compute vectorized cdf_log and gradient
+ +
54  using std::log;
+
55  OperandsAndPartials<T_prob> operands_and_partials(theta);
+
56 
+
57  // Explicit return for extreme values
+
58  // The gradients are technically ill-defined, but treated as zero
+
59  for (size_t i = 0; i < stan::length(n); i++) {
+
60  if (value_of(n_vec[i]) < 0)
+
61  return operands_and_partials.to_var(0.0, theta);
+
62  }
+
63 
+
64  for (size_t i = 0; i < size; i++) {
+
65  // Explicit results for extreme values
+
66  // The gradients are technically ill-defined, but treated as zero
+
67  if (value_of(n_vec[i]) >= 1) {
+
68  return operands_and_partials.to_var(stan::math::negative_infinity(),
+
69  theta);
+
70  } else {
+
71  const T_partials_return Pi = value_of(theta_vec[i]);
+
72 
+
73  P += log(Pi);
+
74 
+ +
76  operands_and_partials.d_x1[i] += 1 / Pi;
+
77  }
+
78  }
+
79 
+
80  return operands_and_partials.to_var(P, theta);
+
81  }
+
82  }
+
83 }
+
84 #endif
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
bool check_bounded(const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)
Return true if the value is between the low and high values, inclusively.
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
return_type< T_prob >::type bernoulli_ccdf_log(const T_n &n, const T_prob &theta)
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ + + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/bernoulli__cdf_8hpp.html b/doc/api/html/bernoulli__cdf_8hpp.html new file mode 100644 index 00000000000..d14a0128aa8 --- /dev/null +++ b/doc/api/html/bernoulli__cdf_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/bernoulli_cdf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
bernoulli_cdf.hpp File Reference
+
+
+
#include <boost/random/bernoulli_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_bounded.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/inv_logit.hpp>
+#include <stan/math/prim/scal/fun/log1m.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_n , typename T_prob >
return_type< T_prob >::type stan::math::bernoulli_cdf (const T_n &n, const T_prob &theta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/bernoulli__cdf_8hpp_source.html b/doc/api/html/bernoulli__cdf_8hpp_source.html new file mode 100644 index 00000000000..1906cacc7a7 --- /dev/null +++ b/doc/api/html/bernoulli__cdf_8hpp_source.html @@ -0,0 +1,219 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/bernoulli_cdf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
bernoulli_cdf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_BERNOULLI_CDF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_BERNOULLI_CDF_HPP
+
3 
+
4 #include <boost/random/bernoulli_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + +
16 
+
17 namespace stan {
+
18 
+
19  namespace math {
+
20 
+
21  // Bernoulli CDF
+
22  template <typename T_n, typename T_prob>
+
23  typename return_type<T_prob>::type
+
24  bernoulli_cdf(const T_n& n, const T_prob& theta) {
+
25  static const char* function("stan::math::bernoulli_cdf");
+ +
27  T_partials_return;
+
28 
+ + + + +
33 
+
34  // Ensure non-zero argument lenghts
+
35  if (!(stan::length(n) && stan::length(theta)))
+
36  return 1.0;
+
37 
+
38  T_partials_return P(1.0);
+
39 
+
40  // Validate arguments
+
41  check_finite(function, "Probability parameter", theta);
+
42  check_bounded(function, "Probability parameter", theta, 0.0, 1.0);
+
43  check_consistent_sizes(function,
+
44  "Random variable", n,
+
45  "Probability parameter", theta);
+
46 
+
47  // set up template expressions wrapping scalars into vector views
+
48  VectorView<const T_n> n_vec(n);
+
49  VectorView<const T_prob> theta_vec(theta);
+
50  size_t size = max_size(n, theta);
+
51 
+
52  // Compute vectorized CDF and gradient
+ +
54  OperandsAndPartials<T_prob> operands_and_partials(theta);
+
55 
+
56  // Explicit return for extreme values
+
57  // The gradients are technically ill-defined, but treated as zero
+
58  for (size_t i = 0; i < stan::length(n); i++) {
+
59  if (value_of(n_vec[i]) < 0)
+
60  return operands_and_partials.to_var(0.0, theta);
+
61  }
+
62 
+
63  for (size_t i = 0; i < size; i++) {
+
64  // Explicit results for extreme values
+
65  // The gradients are technically ill-defined, but treated as zero
+
66  if (value_of(n_vec[i]) >= 1)
+
67  continue;
+
68 
+
69  const T_partials_return Pi = 1 - value_of(theta_vec[i]);
+
70 
+
71  P *= Pi;
+
72 
+ +
74  operands_and_partials.d_x1[i] += - 1 / Pi;
+
75  }
+
76 
+ +
78  for (size_t i = 0; i < stan::length(theta); ++i)
+
79  operands_and_partials.d_x1[i] *= P;
+
80  }
+
81  return operands_and_partials.to_var(P, theta);
+
82  }
+
83 
+
84  } // namespace math
+
85 } // namespace stan
+
86 #endif
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
bool check_bounded(const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)
Return true if the value is between the low and high values, inclusively.
+
return_type< T_prob >::type bernoulli_cdf(const T_n &n, const T_prob &theta)
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ + + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/bernoulli__cdf__log_8hpp.html b/doc/api/html/bernoulli__cdf__log_8hpp.html new file mode 100644 index 00000000000..0778ebbf324 --- /dev/null +++ b/doc/api/html/bernoulli__cdf__log_8hpp.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/bernoulli_cdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
bernoulli_cdf_log.hpp File Reference
+
+
+
#include <boost/random/bernoulli_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_bounded.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/inv_logit.hpp>
+#include <stan/math/prim/scal/fun/log1m.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_n , typename T_prob >
return_type< T_prob >::type stan::math::bernoulli_cdf_log (const T_n &n, const T_prob &theta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/bernoulli__cdf__log_8hpp_source.html b/doc/api/html/bernoulli__cdf__log_8hpp_source.html new file mode 100644 index 00000000000..cd019e05c29 --- /dev/null +++ b/doc/api/html/bernoulli__cdf__log_8hpp_source.html @@ -0,0 +1,219 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/bernoulli_cdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
bernoulli_cdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_BERNOULLI_CDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_BERNOULLI_CDF_LOG_HPP
+
3 
+
4 #include <boost/random/bernoulli_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + +
16 #include <cmath>
+
17 
+
18 namespace stan {
+
19 
+
20  namespace math {
+
21 
+
22  template <typename T_n, typename T_prob>
+
23  typename return_type<T_prob>::type
+
24  bernoulli_cdf_log(const T_n& n, const T_prob& theta) {
+
25  static const char* function("stan::math::bernoulli_cdf_log");
+ +
27  T_partials_return;
+
28 
+ + + + +
33 
+
34  // Ensure non-zero argument lenghts
+
35  if (!(stan::length(n) && stan::length(theta)))
+
36  return 0.0;
+
37 
+
38  T_partials_return P(0.0);
+
39 
+
40  // Validate arguments
+
41  check_finite(function, "Probability parameter", theta);
+
42  check_bounded(function, "Probability parameter", theta, 0.0, 1.0);
+
43  check_consistent_sizes(function,
+
44  "Random variable", n,
+
45  "Probability parameter", theta);
+
46 
+
47  // set up template expressions wrapping scalars into vector views
+
48  VectorView<const T_n> n_vec(n);
+
49  VectorView<const T_prob> theta_vec(theta);
+
50  size_t size = max_size(n, theta);
+
51 
+
52  // Compute vectorized cdf_log and gradient
+ +
54  using std::log;
+
55  OperandsAndPartials<T_prob> operands_and_partials(theta);
+
56 
+
57  // Explicit return for extreme values
+
58  // The gradients are technically ill-defined, but treated as zero
+
59  for (size_t i = 0; i < stan::length(n); i++) {
+
60  if (value_of(n_vec[i]) < 0)
+
61  return operands_and_partials.to_var(stan::math::negative_infinity(),
+
62  theta);
+
63  }
+
64 
+
65  for (size_t i = 0; i < size; i++) {
+
66  // Explicit results for extreme values
+
67  // The gradients are technically ill-defined, but treated as zero
+
68  if (value_of(n_vec[i]) >= 1)
+
69  continue;
+
70 
+
71  const T_partials_return Pi = 1 - value_of(theta_vec[i]);
+
72 
+
73  P += log(Pi);
+
74 
+ +
76  operands_and_partials.d_x1[i] -= 1 / Pi;
+
77  }
+
78 
+
79  return operands_and_partials.to_var(P, theta);
+
80  }
+
81 
+
82  }
+
83 }
+
84 #endif
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
return_type< T_prob >::type bernoulli_cdf_log(const T_n &n, const T_prob &theta)
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
bool check_bounded(const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)
Return true if the value is between the low and high values, inclusively.
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ + + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/bernoulli__log_8hpp.html b/doc/api/html/bernoulli__log_8hpp.html new file mode 100644 index 00000000000..cfb71bd59a4 --- /dev/null +++ b/doc/api/html/bernoulli__log_8hpp.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/bernoulli_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
bernoulli_log.hpp File Reference
+
+
+
#include <boost/random/bernoulli_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_bounded.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/inv_logit.hpp>
+#include <stan/math/prim/scal/fun/log1m.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<bool propto, typename T_n , typename T_prob >
return_type< T_prob >::type stan::math::bernoulli_log (const T_n &n, const T_prob &theta)
 
template<typename T_y , typename T_prob >
return_type< T_prob >::type stan::math::bernoulli_log (const T_y &n, const T_prob &theta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/bernoulli__log_8hpp_source.html b/doc/api/html/bernoulli__log_8hpp_source.html new file mode 100644 index 00000000000..60883899b1e --- /dev/null +++ b/doc/api/html/bernoulli__log_8hpp_source.html @@ -0,0 +1,262 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/bernoulli_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
bernoulli_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_BERNOULLI_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_BERNOULLI_LOG_HPP
+
3 
+
4 #include <boost/random/bernoulli_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + +
16 #include <cmath>
+
17 
+
18 namespace stan {
+
19 
+
20  namespace math {
+
21 
+
22  // Bernoulli(n|theta) [0 <= n <= 1; 0 <= theta <= 1]
+
23  // FIXME: documentation
+
24  template <bool propto, typename T_n, typename T_prob>
+
25  typename return_type<T_prob>::type
+
26  bernoulli_log(const T_n& n,
+
27  const T_prob& theta) {
+
28  static const char* function("stan::math::bernoulli_log");
+ +
30  T_partials_return;
+
31 
+ + +
34  using stan::math::log1m;
+ + + +
38  using std::log;
+
39 
+
40  // check if any vectors are zero length
+
41  if (!(stan::length(n)
+
42  && stan::length(theta)))
+
43  return 0.0;
+
44 
+
45  // set up return value accumulator
+
46  T_partials_return logp(0.0);
+
47 
+
48  // validate args (here done over var, which should be OK)
+
49  check_bounded(function, "n", n, 0, 1);
+
50  check_finite(function, "Probability parameter", theta);
+
51  check_bounded(function, "Probability parameter", theta, 0.0, 1.0);
+
52  check_consistent_sizes(function,
+
53  "Random variable", n,
+
54  "Probability parameter", theta);
+
55 
+
56  // check if no variables are involved and prop-to
+ +
58  return 0.0;
+
59 
+
60  // set up template expressions wrapping scalars into vector views
+
61  VectorView<const T_n> n_vec(n);
+
62  VectorView<const T_prob> theta_vec(theta);
+
63  size_t N = max_size(n, theta);
+
64  OperandsAndPartials<T_prob> operands_and_partials(theta);
+
65 
+
66  if (length(theta) == 1) {
+
67  size_t sum = 0;
+
68  for (size_t n = 0; n < N; n++) {
+
69  sum += value_of(n_vec[n]);
+
70  }
+
71  const T_partials_return theta_dbl = value_of(theta_vec[0]);
+
72  // avoid nans when sum == N or sum == 0
+
73  if (sum == N) {
+
74  logp += N * log(theta_dbl);
+ +
76  operands_and_partials.d_x1[0] += N / theta_dbl;
+
77  } else if (sum == 0) {
+
78  logp += N * log1m(theta_dbl);
+ +
80  operands_and_partials.d_x1[0] += N / (theta_dbl - 1);
+
81  } else {
+
82  const T_partials_return log_theta = log(theta_dbl);
+
83  const T_partials_return log1m_theta = log1m(theta_dbl);
+
84 
+
85  logp += sum * log_theta;
+
86  logp += (N - sum) * log1m_theta;
+
87 
+
88  // gradient
+ +
90  operands_and_partials.d_x1[0] += sum / theta_dbl;
+
91  operands_and_partials.d_x1[0] += (N - sum) / (theta_dbl - 1);
+
92  }
+
93  }
+
94  } else {
+
95  for (size_t n = 0; n < N; n++) {
+
96  // pull out values of arguments
+
97  const int n_int = value_of(n_vec[n]);
+
98  const T_partials_return theta_dbl = value_of(theta_vec[n]);
+
99 
+
100  if (n_int == 1)
+
101  logp += log(theta_dbl);
+
102  else
+
103  logp += log1m(theta_dbl);
+
104 
+
105  // gradient
+ +
107  if (n_int == 1)
+
108  operands_and_partials.d_x1[n] += 1.0 / theta_dbl;
+
109  else
+
110  operands_and_partials.d_x1[n] += 1.0 / (theta_dbl - 1);
+
111  }
+
112  }
+
113  }
+
114  return operands_and_partials.to_var(logp, theta);
+
115  }
+
116 
+
117  template <typename T_y, typename T_prob>
+
118  inline
+ +
120  bernoulli_log(const T_y& n,
+
121  const T_prob& theta) {
+
122  return bernoulli_log<false>(n, theta);
+
123  }
+
124  } // namespace math
+
125 } // namespace stan
+
126 #endif
+ +
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
bool check_bounded(const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)
Return true if the value is between the low and high values, inclusively.
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+
return_type< T_prob >::type bernoulli_log(const T_n &n, const T_prob &theta)
+ + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ + + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
fvar< T > log1m(const fvar< T > &x)
Definition: log1m.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/bernoulli__logit__log_8hpp.html b/doc/api/html/bernoulli__logit__log_8hpp.html new file mode 100644 index 00000000000..710a27b53f1 --- /dev/null +++ b/doc/api/html/bernoulli__logit__log_8hpp.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/bernoulli_logit_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
bernoulli_logit_log.hpp File Reference
+
+
+
#include <boost/random/bernoulli_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_bounded.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/inv_logit.hpp>
+#include <stan/math/prim/scal/fun/log1m.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<bool propto, typename T_n , typename T_prob >
return_type< T_prob >::type stan::math::bernoulli_logit_log (const T_n &n, const T_prob &theta)
 
template<typename T_n , typename T_prob >
return_type< T_prob >::type stan::math::bernoulli_logit_log (const T_n &n, const T_prob &theta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/bernoulli__logit__log_8hpp_source.html b/doc/api/html/bernoulli__logit__log_8hpp_source.html new file mode 100644 index 00000000000..db7d7988d68 --- /dev/null +++ b/doc/api/html/bernoulli__logit__log_8hpp_source.html @@ -0,0 +1,248 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/bernoulli_logit_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
bernoulli_logit_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_BERNOULLI_LOGIT_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_BERNOULLI_LOGIT_LOG_HPP
+
3 
+
4 #include <boost/random/bernoulli_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + +
16 #include <cmath>
+
17 
+
18 namespace stan {
+
19 
+
20  namespace math {
+
21 
+
22  // Bernoulli(n|inv_logit(theta)) [0 <= n <= 1; -inf <= theta <= inf]
+
23  // FIXME: documentation
+
24  template <bool propto, typename T_n, typename T_prob>
+
25  typename return_type<T_prob>::type
+
26  bernoulli_logit_log(const T_n& n, const T_prob& theta) {
+
27  static const char* function("stan::math::bernoulli_logit_log");
+ +
29  T_partials_return;
+
30 
+ + + + + + +
37  using stan::math::log1p;
+ +
39  using std::exp;
+
40 
+
41  // check if any vectors are zero length
+
42  if (!(stan::length(n)
+
43  && stan::length(theta)))
+
44  return 0.0;
+
45 
+
46  // set up return value accumulator
+
47  T_partials_return logp(0.0);
+
48 
+
49  // validate args (here done over var, which should be OK)
+
50  check_bounded(function, "n", n, 0, 1);
+
51  check_not_nan(function, "Logit transformed probability parameter", theta);
+
52  check_consistent_sizes(function,
+
53  "Random variable", n,
+
54  "Probability parameter", theta);
+
55 
+
56  // check if no variables are involved and prop-to
+ +
58  return 0.0;
+
59 
+
60  // set up template expressions wrapping scalars into vector views
+
61  VectorView<const T_n> n_vec(n);
+
62  VectorView<const T_prob> theta_vec(theta);
+
63  size_t N = max_size(n, theta);
+
64  OperandsAndPartials<T_prob> operands_and_partials(theta);
+
65 
+
66  for (size_t n = 0; n < N; n++) {
+
67  // pull out values of arguments
+
68  const int n_int = value_of(n_vec[n]);
+
69  const T_partials_return theta_dbl = value_of(theta_vec[n]);
+
70 
+
71  // reusable subexpression values
+
72  const int sign = 2*n_int-1;
+
73  const T_partials_return ntheta = sign * theta_dbl;
+
74  const T_partials_return exp_m_ntheta = exp(-ntheta);
+
75 
+
76  // Handle extreme values gracefully using Taylor approximations.
+
77  static const double cutoff = 20.0;
+
78  if (ntheta > cutoff)
+
79  logp -= exp_m_ntheta;
+
80  else if (ntheta < -cutoff)
+
81  logp += ntheta;
+
82  else
+
83  logp -= log1p(exp_m_ntheta);
+
84 
+
85  // gradients
+ +
87  static const double cutoff = 20.0;
+
88  if (ntheta > cutoff)
+
89  operands_and_partials.d_x1[n] -= exp_m_ntheta;
+
90  else if (ntheta < -cutoff)
+
91  operands_and_partials.d_x1[n] += sign;
+
92  else
+
93  operands_and_partials.d_x1[n] += sign * exp_m_ntheta
+
94  / (exp_m_ntheta + 1);
+
95  }
+
96  }
+
97  return operands_and_partials.to_var(logp, theta);
+
98  }
+
99 
+
100  template <typename T_n,
+
101  typename T_prob>
+
102  inline
+ +
104  bernoulli_logit_log(const T_n& n,
+
105  const T_prob& theta) {
+
106  return bernoulli_logit_log<false>(n, theta);
+
107  }
+
108 
+
109  } // namespace math
+
110 } // namespace stan
+
111 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
int sign(const T &z)
Definition: sign.hpp:9
+
fvar< T > inv_logit(const fvar< T > &x)
Definition: inv_logit.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
bool check_bounded(const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)
Return true if the value is between the low and high values, inclusively.
+
return_type< T_prob >::type bernoulli_logit_log(const T_n &n, const T_prob &theta)
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
fvar< T > log1p(const fvar< T > &x)
Definition: log1p.hpp:16
+ + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/bernoulli__rng_8hpp.html b/doc/api/html/bernoulli__rng_8hpp.html new file mode 100644 index 00000000000..ad002069c01 --- /dev/null +++ b/doc/api/html/bernoulli__rng_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/bernoulli_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
bernoulli_rng.hpp File Reference
+
+
+
#include <boost/random/bernoulli_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_bounded.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/inv_logit.hpp>
+#include <stan/math/prim/scal/fun/log1m.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
int stan::math::bernoulli_rng (const double theta, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/bernoulli__rng_8hpp_source.html b/doc/api/html/bernoulli__rng_8hpp_source.html new file mode 100644 index 00000000000..07b0cd2740c --- /dev/null +++ b/doc/api/html/bernoulli__rng_8hpp_source.html @@ -0,0 +1,163 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/bernoulli_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
bernoulli_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_BERNOULLI_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_BERNOULLI_RNG_HPP
+
3 
+
4 #include <boost/random/bernoulli_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + +
16 
+
17 namespace stan {
+
18 
+
19  namespace math {
+
20 
+
21  template <class RNG>
+
22  inline int
+
23  bernoulli_rng(const double theta,
+
24  RNG& rng) {
+
25  using boost::variate_generator;
+
26  using boost::bernoulli_distribution;
+
27 
+
28  static const char* function("stan::math::bernoulli_rng");
+
29 
+ + +
32 
+
33  check_finite(function, "Probability parameter", theta);
+
34  check_bounded(function, "Probability parameter", theta, 0, 1);
+
35 
+
36  variate_generator<RNG&, bernoulli_distribution<> >
+
37  bernoulli_rng(rng, bernoulli_distribution<>(theta));
+
38  return bernoulli_rng();
+
39  }
+
40  }
+
41 }
+
42 #endif
+ +
bool check_bounded(const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)
Return true if the value is between the low and high values, inclusively.
+
int bernoulli_rng(const double theta, RNG &rng)
+ + + + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/beta__binomial__ccdf__log_8hpp.html b/doc/api/html/beta__binomial__ccdf__log_8hpp.html new file mode 100644 index 00000000000..2ef5cbde764 --- /dev/null +++ b/doc/api/html/beta__binomial__ccdf__log_8hpp.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/beta_binomial_ccdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
beta_binomial_ccdf_log.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/binomial_coefficient_log.hpp>
+#include <stan/math/prim/scal/fun/lbeta.hpp>
+#include <stan/math/prim/scal/fun/digamma.hpp>
+#include <stan/math/prim/scal/fun/lgamma.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/meta/contains_nonconstant_struct.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/prob/beta_rng.hpp>
+#include <stan/math/prim/scal/fun/F32.hpp>
+#include <stan/math/prim/scal/fun/grad_F32.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_n , typename T_N , typename T_size1 , typename T_size2 >
return_type< T_size1, T_size2 >
+::type 
stan::math::beta_binomial_ccdf_log (const T_n &n, const T_N &N, const T_size1 &alpha, const T_size2 &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/beta__binomial__ccdf__log_8hpp_source.html b/doc/api/html/beta__binomial__ccdf__log_8hpp_source.html new file mode 100644 index 00000000000..c17e9db4a82 --- /dev/null +++ b/doc/api/html/beta__binomial__ccdf__log_8hpp_source.html @@ -0,0 +1,295 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/beta_binomial_ccdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
beta_binomial_ccdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_BETA_BINOMIAL_CCDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_BETA_BINOMIAL_CCDF_LOG_HPP
+
3 
+ + + + + + + + + + + + + + + +
19 #include <cmath>
+
20 
+
21 namespace stan {
+
22 
+
23  namespace math {
+
24 
+
25  template <typename T_n, typename T_N,
+
26  typename T_size1, typename T_size2>
+
27  typename return_type<T_size1, T_size2>::type
+
28  beta_binomial_ccdf_log(const T_n& n, const T_N& N, const T_size1& alpha,
+
29  const T_size2& beta) {
+
30  static const char* function("stan::math::beta_binomial_ccdf_log");
+
31  typedef typename stan::partials_return_type<T_n, T_N, T_size1,
+
32  T_size2>::type
+
33  T_partials_return;
+
34 
+ + + + + +
40 
+
41  // Ensure non-zero argument lengths
+
42  if (!(stan::length(n) && stan::length(N) && stan::length(alpha)
+
43  && stan::length(beta)))
+
44  return 0.0;
+
45 
+
46  T_partials_return P(0.0);
+
47 
+
48  // Validate arguments
+
49  check_nonnegative(function, "Population size parameter", N);
+
50  check_positive_finite(function,
+
51  "First prior sample size parameter", alpha);
+
52  check_positive_finite(function,
+
53  "Second prior sample size parameter", beta);
+
54  check_consistent_sizes(function,
+
55  "Successes variable", n,
+
56  "Population size parameter", N,
+
57  "First prior sample size parameter", alpha,
+
58  "Second prior sample size parameter", beta);
+
59 
+
60  // Wrap arguments in vector views
+
61  VectorView<const T_n> n_vec(n);
+
62  VectorView<const T_N> N_vec(N);
+
63  VectorView<const T_size1> alpha_vec(alpha);
+
64  VectorView<const T_size2> beta_vec(beta);
+
65  size_t size = max_size(n, N, alpha, beta);
+
66 
+
67  // Compute vectorized cdf_log and gradient
+
68  using stan::math::lgamma;
+
69  using stan::math::lbeta;
+
70  using stan::math::digamma;
+
71  using std::exp;
+
72  using std::log;
+
73  using std::exp;
+
74 
+ +
76  operands_and_partials(alpha, beta);
+
77 
+
78  // Explicit return for extreme values
+
79  // The gradients are technically ill-defined, but treated as neg infinity
+
80  for (size_t i = 0; i < stan::length(n); i++) {
+
81  if (value_of(n_vec[i]) <= 0)
+
82  return operands_and_partials.to_var(0.0, alpha, beta);
+
83  }
+
84 
+
85  for (size_t i = 0; i < size; i++) {
+
86  // Explicit results for extreme values
+
87  // The gradients are technically ill-defined, but treated as zero
+
88  if (value_of(n_vec[i]) >= value_of(N_vec[i])) {
+
89  return operands_and_partials.to_var(stan::math::negative_infinity(),
+
90  alpha, beta);
+
91  }
+
92 
+
93  const T_partials_return n_dbl = value_of(n_vec[i]);
+
94  const T_partials_return N_dbl = value_of(N_vec[i]);
+
95  const T_partials_return alpha_dbl = value_of(alpha_vec[i]);
+
96  const T_partials_return beta_dbl = value_of(beta_vec[i]);
+
97 
+
98  const T_partials_return mu = alpha_dbl + n_dbl + 1;
+
99  const T_partials_return nu = beta_dbl + N_dbl - n_dbl - 1;
+
100 
+
101  const T_partials_return F = stan::math::F32((T_partials_return)1, mu,
+
102  -N_dbl + n_dbl + 1,
+
103  n_dbl + 2, 1 - nu,
+
104  (T_partials_return)1);
+
105 
+
106  T_partials_return C = lgamma(nu) - lgamma(N_dbl - n_dbl);
+
107  C += lgamma(mu) - lgamma(n_dbl + 2);
+
108  C += lgamma(N_dbl + 2) - lgamma(N_dbl + alpha_dbl + beta_dbl);
+
109  C = exp(C);
+
110 
+
111  C *= F / exp(lbeta(alpha_dbl, beta_dbl));
+
112  C /= N_dbl + 1;
+
113 
+
114  const T_partials_return Pi = C;
+
115 
+
116  P += log(Pi);
+
117 
+
118  T_partials_return dF[6];
+
119  T_partials_return digammaOne = 0;
+
120  T_partials_return digammaTwo = 0;
+
121 
+ +
123  digammaOne = digamma(mu + nu);
+
124  digammaTwo = digamma(alpha_dbl + beta_dbl);
+
125  stan::math::grad_F32(dF, (T_partials_return)1, mu, -N_dbl + n_dbl + 1,
+
126  n_dbl + 2, 1 - nu, (T_partials_return)1);
+
127  }
+ +
129  const T_partials_return g
+
130  = - C * (digamma(mu) - digammaOne + dF[1] / F
+
131  - digamma(alpha_dbl) + digammaTwo);
+
132  operands_and_partials.d_x1[i] -= g / Pi;
+
133  }
+ +
135  const T_partials_return g
+
136  = - C * (digamma(nu) - digammaOne - dF[4] / F - digamma(beta_dbl)
+
137  + digammaTwo);
+
138  operands_and_partials.d_x2[i] -= g / Pi;
+
139  }
+
140  }
+
141 
+
142  return operands_and_partials.to_var(P, alpha, beta);
+
143  }
+
144 
+
145  }
+
146 }
+
147 #endif
+ +
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > lbeta(const fvar< T > &x1, const fvar< T > &x2)
Definition: lbeta.hpp:16
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+ +
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ +
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + +
void grad_F32(T *g, T a, T b, T c, T d, T e, T z, T precision=1e-6)
Definition: grad_F32.hpp:11
+ +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+
return_type< T_size1, T_size2 >::type beta_binomial_ccdf_log(const T_n &n, const T_N &N, const T_size1 &alpha, const T_size2 &beta)
+
T F32(T a, T b, T c, T d, T e, T z, T precision=1e-6)
Definition: F32.hpp:11
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/beta__binomial__cdf_8hpp.html b/doc/api/html/beta__binomial__cdf_8hpp.html new file mode 100644 index 00000000000..49760f0d861 --- /dev/null +++ b/doc/api/html/beta__binomial__cdf_8hpp.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/beta_binomial_cdf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
beta_binomial_cdf.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/lbeta.hpp>
+#include <stan/math/prim/scal/fun/digamma.hpp>
+#include <stan/math/prim/scal/fun/lgamma.hpp>
+#include <stan/math/prim/scal/fun/binomial_coefficient_log.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/meta/contains_nonconstant_struct.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/prob/beta_rng.hpp>
+#include <stan/math/prim/scal/fun/F32.hpp>
+#include <stan/math/prim/scal/fun/grad_F32.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_n , typename T_N , typename T_size1 , typename T_size2 >
return_type< T_size1, T_size2 >
+::type 
stan::math::beta_binomial_cdf (const T_n &n, const T_N &N, const T_size1 &alpha, const T_size2 &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/beta__binomial__cdf_8hpp_source.html b/doc/api/html/beta__binomial__cdf_8hpp_source.html new file mode 100644 index 00000000000..bb8a11fbbe2 --- /dev/null +++ b/doc/api/html/beta__binomial__cdf_8hpp_source.html @@ -0,0 +1,304 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/beta_binomial_cdf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
beta_binomial_cdf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_BETA_BINOMIAL_CDF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_BETA_BINOMIAL_CDF_HPP
+
3 
+ + + + + + + + + + + + + + + +
19 #include <cmath>
+
20 
+
21 namespace stan {
+
22 
+
23  namespace math {
+
24 
+
25  // Beta-Binomial CDF
+
26  template <typename T_n, typename T_N,
+
27  typename T_size1, typename T_size2>
+
28  typename return_type<T_size1, T_size2>::type
+
29  beta_binomial_cdf(const T_n& n, const T_N& N, const T_size1& alpha,
+
30  const T_size2& beta) {
+
31  static const char* function("stan::math::beta_binomial_cdf");
+
32  typedef typename stan::partials_return_type<T_n, T_N, T_size1,
+
33  T_size2>::type
+
34  T_partials_return;
+
35 
+ + + + + +
41 
+
42  // Ensure non-zero argument lengths
+
43  if (!(stan::length(n) && stan::length(N) && stan::length(alpha)
+
44  && stan::length(beta)))
+
45  return 1.0;
+
46 
+
47  T_partials_return P(1.0);
+
48 
+
49  // Validate arguments
+
50  check_nonnegative(function, "Population size parameter", N);
+
51  check_positive_finite(function,
+
52  "First prior sample size parameter", alpha);
+
53  check_positive_finite(function,
+
54  "Second prior sample size parameter", beta);
+
55  check_consistent_sizes(function,
+
56  "Successes variable", n,
+
57  "Population size parameter", N,
+
58  "First prior sample size parameter", alpha,
+
59  "Second prior sample size parameter", beta);
+
60 
+
61  // Wrap arguments in vector views
+
62  VectorView<const T_n> n_vec(n);
+
63  VectorView<const T_N> N_vec(N);
+
64  VectorView<const T_size1> alpha_vec(alpha);
+
65  VectorView<const T_size2> beta_vec(beta);
+
66  size_t size = max_size(n, N, alpha, beta);
+
67 
+
68  // Compute vectorized CDF and gradient
+
69  using stan::math::lgamma;
+
70  using stan::math::lbeta;
+
71  using stan::math::digamma;
+
72  using std::exp;
+
73  using std::exp;
+
74 
+ +
76  operands_and_partials(alpha, beta);
+
77 
+
78  // Explicit return for extreme values
+
79  // The gradients are technically ill-defined, but treated as zero
+
80  for (size_t i = 0; i < stan::length(n); i++) {
+
81  if (value_of(n_vec[i]) <= 0)
+
82  return operands_and_partials.to_var(0.0, alpha, beta);
+
83  }
+
84 
+
85  for (size_t i = 0; i < size; i++) {
+
86  // Explicit results for extreme values
+
87  // The gradients are technically ill-defined, but treated as zero
+
88  if (value_of(n_vec[i]) >= value_of(N_vec[i])) {
+
89  continue;
+
90  }
+
91 
+
92  const T_partials_return n_dbl = value_of(n_vec[i]);
+
93  const T_partials_return N_dbl = value_of(N_vec[i]);
+
94  const T_partials_return alpha_dbl = value_of(alpha_vec[i]);
+
95  const T_partials_return beta_dbl = value_of(beta_vec[i]);
+
96 
+
97  const T_partials_return mu = alpha_dbl + n_dbl + 1;
+
98  const T_partials_return nu = beta_dbl + N_dbl - n_dbl - 1;
+
99 
+
100  const T_partials_return F = stan::math::F32((T_partials_return)1, mu,
+
101  -N_dbl + n_dbl + 1,
+
102  n_dbl + 2, 1 - nu,
+
103  (T_partials_return)1);
+
104 
+
105  T_partials_return C = lgamma(nu) - lgamma(N_dbl - n_dbl);
+
106  C += lgamma(mu) - lgamma(n_dbl + 2);
+
107  C += lgamma(N_dbl + 2) - lgamma(N_dbl + alpha_dbl + beta_dbl);
+
108  C = exp(C);
+
109 
+
110  C *= F / exp(lbeta(alpha_dbl, beta_dbl));
+
111  C /= N_dbl + 1;
+
112 
+
113  const T_partials_return Pi = 1 - C;
+
114 
+
115  P *= Pi;
+
116 
+
117  T_partials_return dF[6];
+
118  T_partials_return digammaOne = 0;
+
119  T_partials_return digammaTwo = 0;
+
120 
+ +
122  digammaOne = digamma(mu + nu);
+
123  digammaTwo = digamma(alpha_dbl + beta_dbl);
+
124  stan::math::grad_F32(dF, (T_partials_return)1, mu, -N_dbl + n_dbl + 1,
+
125  n_dbl + 2,
+
126  1 - nu, (T_partials_return)1);
+
127  }
+ +
129  const T_partials_return g
+
130  = - C * (digamma(mu) - digammaOne + dF[1] / F
+
131  - digamma(alpha_dbl) + digammaTwo);
+
132  operands_and_partials.d_x1[i]
+
133  += g / Pi;
+
134  }
+ +
136  const T_partials_return g
+
137  = - C * (digamma(nu) - digammaOne - dF[4] / F - digamma(beta_dbl)
+
138  + digammaTwo);
+
139  operands_and_partials.d_x2[i]
+
140  += g / Pi;
+
141  }
+
142  }
+
143 
+ +
145  for (size_t i = 0; i < stan::length(alpha); ++i)
+
146  operands_and_partials.d_x1[i] *= P;
+
147  }
+ +
149  for (size_t i = 0; i < stan::length(beta); ++i)
+
150  operands_and_partials.d_x2[i] *= P;
+
151  }
+
152 
+
153  return operands_and_partials.to_var(P, alpha, beta);
+
154  }
+
155 
+
156  }
+
157 }
+
158 #endif
+ +
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > lbeta(const fvar< T > &x1, const fvar< T > &x2)
Definition: lbeta.hpp:16
+ + +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+ +
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
return_type< T_size1, T_size2 >::type beta_binomial_cdf(const T_n &n, const T_N &N, const T_size1 &alpha, const T_size2 &beta)
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ +
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + +
void grad_F32(T *g, T a, T b, T c, T d, T e, T z, T precision=1e-6)
Definition: grad_F32.hpp:11
+ +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+
T F32(T a, T b, T c, T d, T e, T z, T precision=1e-6)
Definition: F32.hpp:11
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/beta__binomial__cdf__log_8hpp.html b/doc/api/html/beta__binomial__cdf__log_8hpp.html new file mode 100644 index 00000000000..30ff21bdbe2 --- /dev/null +++ b/doc/api/html/beta__binomial__cdf__log_8hpp.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/beta_binomial_cdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
beta_binomial_cdf_log.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/binomial_coefficient_log.hpp>
+#include <stan/math/prim/scal/fun/lbeta.hpp>
+#include <stan/math/prim/scal/fun/digamma.hpp>
+#include <stan/math/prim/scal/fun/lgamma.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/meta/contains_nonconstant_struct.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/prob/beta_rng.hpp>
+#include <stan/math/prim/scal/fun/F32.hpp>
+#include <stan/math/prim/scal/fun/grad_F32.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_n , typename T_N , typename T_size1 , typename T_size2 >
return_type< T_size1, T_size2 >
+::type 
stan::math::beta_binomial_cdf_log (const T_n &n, const T_N &N, const T_size1 &alpha, const T_size2 &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/beta__binomial__cdf__log_8hpp_source.html b/doc/api/html/beta__binomial__cdf__log_8hpp_source.html new file mode 100644 index 00000000000..b775c4216b5 --- /dev/null +++ b/doc/api/html/beta__binomial__cdf__log_8hpp_source.html @@ -0,0 +1,295 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/beta_binomial_cdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
beta_binomial_cdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_BETA_BINOMIAL_CDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_BETA_BINOMIAL_CDF_LOG_HPP
+
3 
+ + + + + + + + + + + + + + + +
19 #include <cmath>
+
20 
+
21 namespace stan {
+
22 
+
23  namespace math {
+
24 
+
25  template <typename T_n, typename T_N,
+
26  typename T_size1, typename T_size2>
+
27  typename return_type<T_size1, T_size2>::type
+
28  beta_binomial_cdf_log(const T_n& n, const T_N& N, const T_size1& alpha,
+
29  const T_size2& beta) {
+
30  static const char* function("stan::math::beta_binomial_cdf_log");
+
31  typedef typename stan::partials_return_type<T_n, T_N, T_size1,
+
32  T_size2>::type
+
33  T_partials_return;
+
34 
+ + + + + +
40 
+
41  // Ensure non-zero argument lengths
+
42  if (!(stan::length(n) && stan::length(N) && stan::length(alpha)
+
43  && stan::length(beta)))
+
44  return 0.0;
+
45 
+
46  T_partials_return P(0.0);
+
47 
+
48  // Validate arguments
+
49  check_nonnegative(function, "Population size parameter", N);
+
50  check_positive_finite(function,
+
51  "First prior sample size parameter", alpha);
+
52  check_positive_finite(function,
+
53  "Second prior sample size parameter", beta);
+
54  check_consistent_sizes(function,
+
55  "Successes variable", n,
+
56  "Population size parameter", N,
+
57  "First prior sample size parameter", alpha,
+
58  "Second prior sample size parameter", beta);
+
59 
+
60  // Wrap arguments in vector views
+
61  VectorView<const T_n> n_vec(n);
+
62  VectorView<const T_N> N_vec(N);
+
63  VectorView<const T_size1> alpha_vec(alpha);
+
64  VectorView<const T_size2> beta_vec(beta);
+
65  size_t size = max_size(n, N, alpha, beta);
+
66 
+
67  // Compute vectorized cdf_log and gradient
+
68  using stan::math::lgamma;
+
69  using stan::math::digamma;
+
70  using stan::math::lbeta;
+
71  using std::exp;
+
72  using std::log;
+
73  using std::exp;
+
74 
+ +
76  operands_and_partials(alpha, beta);
+
77 
+
78  // Explicit return for extreme values
+
79  // The gradients are technically ill-defined, but treated as neg infinity
+
80  for (size_t i = 0; i < stan::length(n); i++) {
+
81  if (value_of(n_vec[i]) <= 0)
+
82  return operands_and_partials.to_var(stan::math::negative_infinity(),
+
83  alpha, beta);
+
84  }
+
85 
+
86  for (size_t i = 0; i < size; i++) {
+
87  // Explicit results for extreme values
+
88  // The gradients are technically ill-defined, but treated as zero
+
89  if (value_of(n_vec[i]) >= value_of(N_vec[i])) {
+
90  continue;
+
91  }
+
92 
+
93  const T_partials_return n_dbl = value_of(n_vec[i]);
+
94  const T_partials_return N_dbl = value_of(N_vec[i]);
+
95  const T_partials_return alpha_dbl = value_of(alpha_vec[i]);
+
96  const T_partials_return beta_dbl = value_of(beta_vec[i]);
+
97 
+
98  const T_partials_return mu = alpha_dbl + n_dbl + 1;
+
99  const T_partials_return nu = beta_dbl + N_dbl - n_dbl - 1;
+
100 
+
101  const T_partials_return F = stan::math::F32((T_partials_return)1, mu,
+
102  -N_dbl + n_dbl + 1,
+
103  n_dbl + 2, 1 - nu,
+
104  (T_partials_return)1);
+
105 
+
106  T_partials_return C = lgamma(nu) - lgamma(N_dbl - n_dbl);
+
107  C += lgamma(mu) - lgamma(n_dbl + 2);
+
108  C += lgamma(N_dbl + 2) - lgamma(N_dbl + alpha_dbl + beta_dbl);
+
109  C = exp(C);
+
110 
+
111  C *= F / exp(lbeta(alpha_dbl, beta_dbl));
+
112  C /= N_dbl + 1;
+
113 
+
114  const T_partials_return Pi = 1 - C;
+
115 
+
116  P += log(Pi);
+
117 
+
118  T_partials_return dF[6];
+
119  T_partials_return digammaOne = 0;
+
120  T_partials_return digammaTwo = 0;
+
121 
+ +
123  digammaOne = digamma(mu + nu);
+
124  digammaTwo = digamma(alpha_dbl + beta_dbl);
+
125  stan::math::grad_F32(dF, (T_partials_return)1, mu, -N_dbl + n_dbl + 1,
+
126  n_dbl + 2, 1 - nu, (T_partials_return)1);
+
127  }
+ +
129  const T_partials_return g
+
130  = - C * (digamma(mu) - digammaOne + dF[1] / F
+
131  - digamma(alpha_dbl) + digammaTwo);
+
132  operands_and_partials.d_x1[i] += g / Pi;
+
133  }
+ +
135  const T_partials_return g
+
136  = - C * (digamma(nu) - digammaOne - dF[4] / F - digamma(beta_dbl)
+
137  + digammaTwo);
+
138  operands_and_partials.d_x2[i] += g / Pi;
+
139  }
+
140  }
+
141 
+
142  return operands_and_partials.to_var(P, alpha, beta);
+
143  }
+
144 
+
145  }
+
146 }
+
147 #endif
+ +
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > lbeta(const fvar< T > &x1, const fvar< T > &x2)
Definition: lbeta.hpp:16
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
return_type< T_size1, T_size2 >::type beta_binomial_cdf_log(const T_n &n, const T_N &N, const T_size1 &alpha, const T_size2 &beta)
+ +
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ +
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + +
void grad_F32(T *g, T a, T b, T c, T d, T e, T z, T precision=1e-6)
Definition: grad_F32.hpp:11
+ +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+
T F32(T a, T b, T c, T d, T e, T z, T precision=1e-6)
Definition: F32.hpp:11
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/beta__binomial__log_8hpp.html b/doc/api/html/beta__binomial__log_8hpp.html new file mode 100644 index 00000000000..98eb3a36e64 --- /dev/null +++ b/doc/api/html/beta__binomial__log_8hpp.html @@ -0,0 +1,149 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/beta_binomial_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
beta_binomial_log.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/lbeta.hpp>
+#include <stan/math/prim/scal/fun/digamma.hpp>
+#include <stan/math/prim/scal/fun/lgamma.hpp>
+#include <stan/math/prim/scal/fun/binomial_coefficient_log.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/meta/contains_nonconstant_struct.hpp>
+#include <stan/math/prim/scal/meta/VectorBuilder.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/prob/beta_rng.hpp>
+#include <stan/math/prim/scal/fun/F32.hpp>
+#include <stan/math/prim/scal/fun/grad_F32.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<bool propto, typename T_n , typename T_N , typename T_size1 , typename T_size2 >
return_type< T_size1, T_size2 >
+::type 
stan::math::beta_binomial_log (const T_n &n, const T_N &N, const T_size1 &alpha, const T_size2 &beta)
 
template<typename T_n , typename T_N , typename T_size1 , typename T_size2 >
return_type< T_size1, T_size2 >
+::type 
stan::math::beta_binomial_log (const T_n &n, const T_N &N, const T_size1 &alpha, const T_size2 &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/beta__binomial__log_8hpp_source.html b/doc/api/html/beta__binomial__log_8hpp_source.html new file mode 100644 index 00000000000..60e1e43841d --- /dev/null +++ b/doc/api/html/beta__binomial__log_8hpp_source.html @@ -0,0 +1,329 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/beta_binomial_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
beta_binomial_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_BETA_BINOMIAL_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_BETA_BINOMIAL_LOG_HPP
+
3 
+ + + + + + + + + + + + + + + + +
20 
+
21 namespace stan {
+
22 
+
23  namespace math {
+
24 
+
25  // BetaBinomial(n|alpha, beta) [alpha > 0; beta > 0; n >= 0]
+
26  template <bool propto,
+
27  typename T_n, typename T_N,
+
28  typename T_size1, typename T_size2>
+
29  typename return_type<T_size1, T_size2>::type
+
30  beta_binomial_log(const T_n& n,
+
31  const T_N& N,
+
32  const T_size1& alpha,
+
33  const T_size2& beta) {
+
34  static const char* function("stan::math::beta_binomial_log");
+ +
36  T_partials_return;
+
37 
+ + + + + +
43 
+
44  // check if any vectors are zero length
+
45  if (!(stan::length(n)
+
46  && stan::length(N)
+
47  && stan::length(alpha)
+
48  && stan::length(beta)))
+
49  return 0.0;
+
50 
+
51  T_partials_return logp(0.0);
+
52  check_nonnegative(function, "Population size parameter", N);
+
53  check_positive_finite(function,
+
54  "First prior sample size parameter", alpha);
+
55  check_positive_finite(function,
+
56  "Second prior sample size parameter", beta);
+
57  check_consistent_sizes(function,
+
58  "Successes variable", n,
+
59  "Population size parameter", N,
+
60  "First prior sample size parameter", alpha,
+
61  "Second prior sample size parameter", beta);
+
62 
+
63  // check if no variables are involved and prop-to
+ +
65  return 0.0;
+
66 
+ +
68  operands_and_partials(alpha, beta);
+
69 
+
70  VectorView<const T_n> n_vec(n);
+
71  VectorView<const T_N> N_vec(N);
+
72  VectorView<const T_size1> alpha_vec(alpha);
+
73  VectorView<const T_size2> beta_vec(beta);
+
74  size_t size = max_size(n, N, alpha, beta);
+
75 
+
76  for (size_t i = 0; i < size; i++) {
+
77  if (n_vec[i] < 0 || n_vec[i] > N_vec[i])
+
78  return operands_and_partials.to_var(LOG_ZERO, alpha, beta);
+
79  }
+
80 
+
81  using stan::math::lbeta;
+ +
83  using stan::math::digamma;
+
84 
+ +
86  T_partials_return, T_n, T_N>
+
87  normalizing_constant(max_size(N, n));
+
88  for (size_t i = 0; i < max_size(N, n); i++)
+ +
90  normalizing_constant[i]
+
91  = binomial_coefficient_log(N_vec[i], n_vec[i]);
+
92 
+ +
94  T_partials_return, T_n, T_N, T_size1, T_size2>
+
95  lbeta_numerator(size);
+
96  for (size_t i = 0; i < size; i++)
+ +
98  lbeta_numerator[i] = lbeta(n_vec[i] + value_of(alpha_vec[i]),
+
99  N_vec[i] - n_vec[i]
+
100  + value_of(beta_vec[i]));
+
101 
+ +
103  T_partials_return, T_size1, T_size2>
+
104  lbeta_denominator(max_size(alpha, beta));
+
105  for (size_t i = 0; i < max_size(alpha, beta); i++)
+ +
107  lbeta_denominator[i] = lbeta(value_of(alpha_vec[i]),
+
108  value_of(beta_vec[i]));
+
109 
+ +
111  T_partials_return, T_n, T_size1>
+
112  digamma_n_plus_alpha(max_size(n, alpha));
+
113  for (size_t i = 0; i < max_size(n, alpha); i++)
+ +
115  digamma_n_plus_alpha[i]
+
116  = digamma(n_vec[i] + value_of(alpha_vec[i]));
+
117 
+ +
119  T_partials_return, T_N, T_size1, T_size2>
+
120  digamma_N_plus_alpha_plus_beta(max_size(N, alpha, beta));
+
121  for (size_t i = 0; i < max_size(N, alpha, beta); i++)
+ +
123  digamma_N_plus_alpha_plus_beta[i]
+
124  = digamma(N_vec[i] + value_of(alpha_vec[i])
+
125  + value_of(beta_vec[i]));
+
126 
+ +
128  T_partials_return, T_size1, T_size2>
+
129  digamma_alpha_plus_beta(max_size(alpha, beta));
+
130  for (size_t i = 0; i < max_size(alpha, beta); i++)
+ +
132  digamma_alpha_plus_beta[i]
+
133  = digamma(value_of(alpha_vec[i]) + value_of(beta_vec[i]));
+
134 
+ +
136  T_partials_return, T_size1> digamma_alpha(length(alpha));
+
137  for (size_t i = 0; i < length(alpha); i++)
+ +
139  digamma_alpha[i] = digamma(value_of(alpha_vec[i]));
+
140 
+ +
142  T_partials_return, T_size2>
+
143  digamma_beta(length(beta));
+
144  for (size_t i = 0; i < length(beta); i++)
+ +
146  digamma_beta[i] = digamma(value_of(beta_vec[i]));
+
147 
+
148  for (size_t i = 0; i < size; i++) {
+ +
150  logp += normalizing_constant[i];
+ +
152  logp += lbeta_numerator[i] - lbeta_denominator[i];
+
153 
+ +
155  operands_and_partials.d_x1[i]
+
156  += digamma_n_plus_alpha[i]
+
157  - digamma_N_plus_alpha_plus_beta[i]
+
158  + digamma_alpha_plus_beta[i]
+
159  - digamma_alpha[i];
+ +
161  operands_and_partials.d_x2[i]
+
162  += digamma(value_of(N_vec[i]-n_vec[i]+beta_vec[i]))
+
163  - digamma_N_plus_alpha_plus_beta[i]
+
164  + digamma_alpha_plus_beta[i]
+
165  - digamma_beta[i];
+
166  }
+
167  return operands_and_partials.to_var(logp, alpha, beta);
+
168  }
+
169 
+
170  template <typename T_n,
+
171  typename T_N,
+
172  typename T_size1,
+
173  typename T_size2>
+ +
175  beta_binomial_log(const T_n& n, const T_N& N,
+
176  const T_size1& alpha, const T_size2& beta) {
+
177  return beta_binomial_log<false>(n, N, alpha, beta);
+
178  }
+
179 
+
180  }
+
181 }
+
182 #endif
+ +
fvar< T > binomial_coefficient_log(const fvar< T > &x1, const fvar< T > &x2)
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > lbeta(const fvar< T > &x1, const fvar< T > &x2)
Definition: lbeta.hpp:16
+ + +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+ +
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
const double LOG_ZERO
Definition: constants.hpp:175
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ +
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ +
A variable implementation that stores operands and derivatives with respect to the variable...
+
return_type< T_size1, T_size2 >::type beta_binomial_log(const T_n &n, const T_N &N, const T_size1 &alpha, const T_size2 &beta)
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + + + +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/beta__binomial__rng_8hpp.html b/doc/api/html/beta__binomial__rng_8hpp.html new file mode 100644 index 00000000000..ad2dd44f515 --- /dev/null +++ b/doc/api/html/beta__binomial__rng_8hpp.html @@ -0,0 +1,143 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/beta_binomial_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
beta_binomial_rng.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/binomial_coefficient_log.hpp>
+#include <stan/math/prim/scal/fun/digamma.hpp>
+#include <stan/math/prim/scal/fun/lbeta.hpp>
+#include <stan/math/prim/scal/fun/lgamma.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/prob/binomial_rng.hpp>
+#include <stan/math/prim/scal/prob/beta_rng.hpp>
+#include <stan/math/prim/scal/fun/F32.hpp>
+#include <stan/math/prim/scal/fun/grad_F32.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
int stan::math::beta_binomial_rng (const int N, const double alpha, const double beta, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/beta__binomial__rng_8hpp_source.html b/doc/api/html/beta__binomial__rng_8hpp_source.html new file mode 100644 index 00000000000..8d327a61528 --- /dev/null +++ b/doc/api/html/beta__binomial__rng_8hpp_source.html @@ -0,0 +1,176 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/beta_binomial_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
beta_binomial_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_BETA_BINOMIAL_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_BETA_BINOMIAL_RNG_HPP
+
3 
+ + + + + + + + + + + + + + + +
19 
+
20 namespace stan {
+
21 
+
22  namespace math {
+
23 
+
24  template <class RNG>
+
25  inline int
+
26  beta_binomial_rng(const int N,
+
27  const double alpha,
+
28  const double beta,
+
29  RNG& rng) {
+
30  static const char* function("stan::math::beta_binomial_rng");
+
31 
+ + +
34 
+
35  check_nonnegative(function, "Population size parameter", N);
+
36  check_positive_finite(function,
+
37  "First prior sample size parameter", alpha);
+
38  check_positive_finite(function,
+
39  "Second prior sample size parameter", beta);
+
40 
+
41  double a = stan::math::beta_rng(alpha, beta, rng);
+
42  while (a > 1 || a < 0)
+
43  a = stan::math::beta_rng(alpha, beta, rng);
+
44  return stan::math::binomial_rng(N, a, rng);
+
45  }
+
46  }
+
47 }
+
48 #endif
+ +
double beta_rng(const double alpha, const double beta, RNG &rng)
Definition: beta_rng.hpp:30
+ + +
int beta_binomial_rng(const int N, const double alpha, const double beta, RNG &rng)
+ + + + + + + + + +
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ + +
int binomial_rng(const int N, const double theta, RNG &rng)
+
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/beta__ccdf__log_8hpp.html b/doc/api/html/beta__ccdf__log_8hpp.html new file mode 100644 index 00000000000..b4d002fe07e --- /dev/null +++ b/doc/api/html/beta__ccdf__log_8hpp.html @@ -0,0 +1,152 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/beta_ccdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
beta_ccdf_log.hpp File Reference
+
+
+
#include <boost/math/special_functions/gamma.hpp>
+#include <boost/random/gamma_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_less_or_equal.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/log1m.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/fun/digamma.hpp>
+#include <stan/math/prim/scal/fun/lgamma.hpp>
+#include <stan/math/prim/scal/fun/lbeta.hpp>
+#include <stan/math/prim/scal/meta/contains_nonconstant_struct.hpp>
+#include <stan/math/prim/scal/meta/VectorView.hpp>
+#include <stan/math/prim/scal/meta/VectorBuilder.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/fun/grad_reg_inc_beta.hpp>
+#include <stan/math/prim/scal/fun/inc_beta.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_scale_succ , typename T_scale_fail >
return_type< T_y, T_scale_succ,
+T_scale_fail >::type 
stan::math::beta_ccdf_log (const T_y &y, const T_scale_succ &alpha, const T_scale_fail &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/beta__ccdf__log_8hpp_source.html b/doc/api/html/beta__ccdf__log_8hpp_source.html new file mode 100644 index 00000000000..752c1170129 --- /dev/null +++ b/doc/api/html/beta__ccdf__log_8hpp_source.html @@ -0,0 +1,301 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/beta_ccdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
beta_ccdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_BETA_CCDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_BETA_CCDF_LOG_HPP
+
3 
+
4 #include <boost/math/special_functions/gamma.hpp>
+
5 #include <boost/random/gamma_distribution.hpp>
+
6 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + + + +
26 #include <cmath>
+
27 
+
28 namespace stan {
+
29 
+
30  namespace math {
+
31 
+
32  template <typename T_y, typename T_scale_succ, typename T_scale_fail>
+
33  typename return_type<T_y, T_scale_succ, T_scale_fail>::type
+
34  beta_ccdf_log(const T_y& y, const T_scale_succ& alpha,
+
35  const T_scale_fail& beta) {
+
36  typedef typename stan::partials_return_type<T_y, T_scale_succ,
+
37  T_scale_fail>::type
+
38  T_partials_return;
+
39 
+
40  // Size checks
+
41  if ( !( stan::length(y) && stan::length(alpha)
+
42  && stan::length(beta) ) )
+
43  return 0.0;
+
44 
+
45  // Error checks
+
46  static const char* function("stan::math::beta_cdf");
+
47 
+ + + + +
52  using boost::math::tools::promote_args;
+ + +
55 
+
56  T_partials_return ccdf_log(0.0);
+
57 
+
58  check_positive_finite(function, "First shape parameter", alpha);
+
59  check_positive_finite(function, "Second shape parameter", beta);
+
60  check_not_nan(function, "Random variable", y);
+
61  check_nonnegative(function, "Random variable", y);
+
62  check_less_or_equal(function, "Random variable", y, 1);
+
63  check_consistent_sizes(function,
+
64  "Random variable", y,
+
65  "First shape parameter", alpha,
+
66  "Second shape parameter", beta);
+
67 
+
68  // Wrap arguments in vectors
+
69  VectorView<const T_y> y_vec(y);
+
70  VectorView<const T_scale_succ> alpha_vec(alpha);
+
71  VectorView<const T_scale_fail> beta_vec(beta);
+
72  size_t N = max_size(y, alpha, beta);
+
73 
+ +
75  operands_and_partials(y, alpha, beta);
+
76 
+
77  // Compute CDF and its gradients
+ +
79  using stan::math::digamma;
+
80  using stan::math::lbeta;
+
81  using std::pow;
+
82  using std::exp;
+
83  using std::log;
+
84  using std::exp;
+
85 
+
86  // Cache a few expensive function calls if alpha or beta is a parameter
+ +
88  T_scale_fail>::value,
+
89  T_partials_return, T_scale_succ, T_scale_fail>
+
90  digamma_alpha_vec(max_size(alpha, beta));
+ +
92  T_scale_fail>::value,
+
93  T_partials_return, T_scale_succ, T_scale_fail>
+
94  digamma_beta_vec(max_size(alpha, beta));
+ +
96  T_scale_fail>::value,
+
97  T_partials_return, T_scale_succ, T_scale_fail>
+
98  digamma_sum_vec(max_size(alpha, beta));
+
99 
+ +
101  for (size_t i = 0; i < N; i++) {
+
102  const T_partials_return alpha_dbl = value_of(alpha_vec[i]);
+
103  const T_partials_return beta_dbl = value_of(beta_vec[i]);
+
104 
+
105  digamma_alpha_vec[i] = digamma(alpha_dbl);
+
106  digamma_beta_vec[i] = digamma(beta_dbl);
+
107  digamma_sum_vec[i] = digamma(alpha_dbl + beta_dbl);
+
108  }
+
109  }
+
110 
+
111  // Compute vectorized CDFLog and gradient
+
112  for (size_t n = 0; n < N; n++) {
+
113  // Pull out values
+
114  const T_partials_return y_dbl = value_of(y_vec[n]);
+
115  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
116  const T_partials_return beta_dbl = value_of(beta_vec[n]);
+
117  const T_partials_return betafunc_dbl = exp(lbeta(alpha_dbl, beta_dbl));
+
118 
+
119  // Compute
+
120  const T_partials_return Pn = 1.0 - inc_beta(alpha_dbl, beta_dbl, y_dbl);
+
121 
+
122  ccdf_log += log(Pn);
+
123 
+ +
125  operands_and_partials.d_x1[n] -= pow(1-y_dbl, beta_dbl-1)
+
126  * pow(y_dbl, alpha_dbl-1) / betafunc_dbl / Pn;
+
127 
+
128  T_partials_return g1 = 0;
+
129  T_partials_return g2 = 0;
+
130 
+ +
132  stan::math::grad_reg_inc_beta(g1, g2, alpha_dbl, beta_dbl, y_dbl,
+
133  digamma_alpha_vec[n],
+
134  digamma_beta_vec[n],
+
135  digamma_sum_vec[n],
+
136  betafunc_dbl);
+
137  }
+ +
139  operands_and_partials.d_x2[n] -= g1 / Pn;
+ +
141  operands_and_partials.d_x3[n] -= g2 / Pn;
+
142  }
+
143 
+
144  return operands_and_partials.to_var(ccdf_log, y, alpha, beta);
+
145  }
+
146  }
+
147 }
+
148 #endif
+ + +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > lbeta(const fvar< T > &x1, const fvar< T > &x2)
Definition: lbeta.hpp:16
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
return_type< T_y, T_scale_succ, T_scale_fail >::type beta_ccdf_log(const T_y &y, const T_scale_succ &alpha, const T_scale_fail &beta)
+ + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > inc_beta(const fvar< T > &a, const fvar< T > &b, const fvar< T > &x)
Definition: inc_beta.hpp:20
+ + +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + +
bool check_less_or_equal(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is less or equal to high.
+ + + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
void grad_reg_inc_beta(T &g1, T &g2, T a, T b, T z, T digammaA, T digammaB, T digammaSum, T betaAB)
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/beta__cdf_8hpp.html b/doc/api/html/beta__cdf_8hpp.html new file mode 100644 index 00000000000..d3bce32de10 --- /dev/null +++ b/doc/api/html/beta__cdf_8hpp.html @@ -0,0 +1,155 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/beta_cdf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
beta_cdf.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/meta/VectorBuilder.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/meta/partials_return_type.hpp>
+#include <stan/math/prim/scal/meta/contains_nonconstant_struct.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_less_or_equal.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/log1m.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/fun/digamma.hpp>
+#include <stan/math/prim/scal/fun/inc_beta.hpp>
+#include <stan/math/prim/scal/fun/inc_beta_dda.hpp>
+#include <stan/math/prim/scal/fun/inc_beta_ddb.hpp>
+#include <stan/math/prim/scal/fun/inc_beta_ddz.hpp>
+#include <stan/math/prim/scal/fun/lgamma.hpp>
+#include <stan/math/prim/scal/fun/lbeta.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <boost/math/special_functions/gamma.hpp>
+#include <boost/random/gamma_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y , typename T_scale_succ , typename T_scale_fail >
return_type< T_y, T_scale_succ,
+T_scale_fail >::type 
stan::math::beta_cdf (const T_y &y, const T_scale_succ &alpha, const T_scale_fail &beta)
 Calculates the beta cumulative distribution function for the given variate and scale variables. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/beta__cdf_8hpp_source.html b/doc/api/html/beta__cdf_8hpp_source.html new file mode 100644 index 00000000000..ef7962e4c53 --- /dev/null +++ b/doc/api/html/beta__cdf_8hpp_source.html @@ -0,0 +1,313 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/beta_cdf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
beta_cdf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_BETA_CDF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_BETA_CDF_HPP
+
3 
+ + + + + +
9 
+ + + + + +
15 
+ + + + + + + + + + + +
27 
+
28 #include <boost/math/special_functions/gamma.hpp>
+
29 #include <boost/random/gamma_distribution.hpp>
+
30 #include <boost/random/variate_generator.hpp>
+
31 
+
32 #include <cmath>
+
33 
+
34 namespace stan {
+
35 
+
36  namespace math {
+
37 
+
50  template <typename T_y, typename T_scale_succ, typename T_scale_fail>
+
51  typename return_type<T_y, T_scale_succ, T_scale_fail>::type
+
52  beta_cdf(const T_y& y, const T_scale_succ& alpha,
+
53  const T_scale_fail& beta) {
+
54  typedef typename stan::partials_return_type<T_y, T_scale_succ,
+
55  T_scale_fail>::type
+
56  T_partials_return;
+
57 
+
58  // Size checks
+
59  if (!(stan::length(y) && stan::length(alpha)
+
60  && stan::length(beta)))
+
61  return 1.0;
+
62 
+
63  // Error checks
+
64  static const char* function("stan::math::beta_cdf");
+
65  using boost::math::tools::promote_args;
+
66 
+
67  T_partials_return P(1.0);
+
68 
+
69  check_positive_finite(function, "First shape parameter", alpha);
+
70  check_positive_finite(function, "Second shape parameter", beta);
+
71  check_not_nan(function, "Random variable", y);
+
72  check_consistent_sizes(function,
+
73  "Random variable", y,
+
74  "First shape parameter", alpha,
+
75  "Second shape parameter", beta);
+
76  check_nonnegative(function, "Random variable", y);
+
77  check_less_or_equal(function, "Random variable", y, 1);
+
78 
+
79  // Wrap arguments in vectors
+
80  VectorView<const T_y> y_vec(y);
+
81  VectorView<const T_scale_succ> alpha_vec(alpha);
+
82  VectorView<const T_scale_fail> beta_vec(beta);
+
83  size_t N = max_size(y, alpha, beta);
+
84 
+ +
86  operands_and_partials(y, alpha, beta);
+
87 
+
88  // Explicit return for extreme values
+
89  // The gradients are technically ill-defined, but treated as zero
+
90  for (size_t i = 0; i < stan::length(y); i++) {
+
91  if (value_of(y_vec[i]) <= 0)
+
92  return operands_and_partials.to_var(0.0, y, alpha, beta);
+
93  }
+
94 
+
95  // Compute CDF and its gradients
+
96 
+
97  // Cache a few expensive function calls if alpha or beta is a parameter
+ +
99  T_scale_fail>::value,
+
100  T_partials_return, T_scale_succ, T_scale_fail>
+
101  digamma_alpha_vec(max_size(alpha, beta));
+
102 
+ +
104  T_scale_fail>::value,
+
105  T_partials_return, T_scale_succ, T_scale_fail>
+
106  digamma_beta_vec(max_size(alpha, beta));
+
107 
+ +
109  T_scale_fail>::value,
+
110  T_partials_return, T_scale_succ, T_scale_fail>
+
111  digamma_sum_vec(max_size(alpha, beta));
+
112 
+ +
114  for (size_t n = 0; n < N; n++) {
+
115  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
116  const T_partials_return beta_dbl = value_of(beta_vec[n]);
+
117 
+
118  digamma_alpha_vec[n] = digamma(alpha_dbl);
+
119  digamma_beta_vec[n] = digamma(beta_dbl);
+
120  digamma_sum_vec[n] = digamma(alpha_dbl + beta_dbl);
+
121  }
+
122  }
+
123 
+
124  // Compute vectorized CDF and gradient
+
125  for (size_t n = 0; n < N; n++) {
+
126  // Explicit results for extreme values
+
127  // The gradients are technically ill-defined, but treated as zero
+
128  if (value_of(y_vec[n]) >= 1.0) continue;
+
129 
+
130  // Pull out values
+
131  const T_partials_return y_dbl = value_of(y_vec[n]);
+
132  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
133  const T_partials_return beta_dbl = value_of(beta_vec[n]);
+
134 
+
135  // Compute
+
136  const T_partials_return Pn = inc_beta(alpha_dbl, beta_dbl, y_dbl);
+
137 
+
138  P *= Pn;
+
139 
+ +
141  operands_and_partials.d_x1[n]
+
142  += inc_beta_ddz(alpha_dbl, beta_dbl, y_dbl) / Pn;
+
143 
+ +
145  operands_and_partials.d_x2[n]
+
146  += inc_beta_dda(alpha_dbl, beta_dbl, y_dbl,
+
147  digamma_alpha_vec[n], digamma_sum_vec[n]) / Pn;
+ +
149  operands_and_partials.d_x3[n]
+
150  += inc_beta_ddb(alpha_dbl, beta_dbl, y_dbl,
+
151  digamma_beta_vec[n], digamma_sum_vec[n]) / Pn;
+
152  }
+
153 
+ +
155  for (size_t n = 0; n < stan::length(y); ++n)
+
156  operands_and_partials.d_x1[n] *= P;
+
157  }
+ +
159  for (size_t n = 0; n < stan::length(alpha); ++n)
+
160  operands_and_partials.d_x2[n] *= P;
+
161  }
+ +
163  for (size_t n = 0; n < stan::length(beta); ++n)
+
164  operands_and_partials.d_x3[n] *= P;
+
165  }
+
166 
+
167  return operands_and_partials.to_var(P, y, alpha, beta);
+
168  }
+
169 
+
170  }
+
171 }
+
172 #endif
+ + +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
T inc_beta_dda(T a, T b, T z, T digamma_a, T digamma_ab)
Returns the partial derivative of the regularized incomplete beta function, I_{z}(a, b) with respect to a.
+ + + +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
T inc_beta_ddb(T a, T b, T z, T digamma_b, T digamma_ab)
Returns the partial derivative of the regularized incomplete beta function, I_{z}(a, b) with respect to b.
+
T inc_beta_ddz(T a, T b, T z)
Returns the partial derivative of the regularized incomplete beta function, I_{z}(a, b) with respect to z.
+ + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > inc_beta(const fvar< T > &a, const fvar< T > &b, const fvar< T > &x)
Definition: inc_beta.hpp:20
+ + +
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
return_type< T_y, T_scale_succ, T_scale_fail >::type beta_cdf(const T_y &y, const T_scale_succ &alpha, const T_scale_fail &beta)
Calculates the beta cumulative distribution function for the given variate and scale variables...
Definition: beta_cdf.hpp:52
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + +
bool check_less_or_equal(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is less or equal to high.
+ + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/beta__cdf__log_8hpp.html b/doc/api/html/beta__cdf__log_8hpp.html new file mode 100644 index 00000000000..ad87c902705 --- /dev/null +++ b/doc/api/html/beta__cdf__log_8hpp.html @@ -0,0 +1,151 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/beta_cdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
beta_cdf_log.hpp File Reference
+
+
+
#include <boost/math/special_functions/gamma.hpp>
+#include <boost/random/gamma_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_less_or_equal.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/log1m.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/fun/digamma.hpp>
+#include <stan/math/prim/scal/fun/lgamma.hpp>
+#include <stan/math/prim/scal/fun/lbeta.hpp>
+#include <stan/math/prim/scal/meta/contains_nonconstant_struct.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/meta/VectorBuilder.hpp>
+#include <stan/math/prim/scal/fun/grad_reg_inc_beta.hpp>
+#include <stan/math/prim/scal/fun/inc_beta.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_scale_succ , typename T_scale_fail >
return_type< T_y, T_scale_succ,
+T_scale_fail >::type 
stan::math::beta_cdf_log (const T_y &y, const T_scale_succ &alpha, const T_scale_fail &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/beta__cdf__log_8hpp_source.html b/doc/api/html/beta__cdf__log_8hpp_source.html new file mode 100644 index 00000000000..9d5368d29e4 --- /dev/null +++ b/doc/api/html/beta__cdf__log_8hpp_source.html @@ -0,0 +1,300 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/beta_cdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
beta_cdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_BETA_CDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_BETA_CDF_LOG_HPP
+
3 
+
4 #include <boost/math/special_functions/gamma.hpp>
+
5 #include <boost/random/gamma_distribution.hpp>
+
6 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + + +
25 #include <cmath>
+
26 
+
27 namespace stan {
+
28 
+
29  namespace math {
+
30 
+
31  template <typename T_y, typename T_scale_succ, typename T_scale_fail>
+
32  typename return_type<T_y, T_scale_succ, T_scale_fail>::type
+
33  beta_cdf_log(const T_y& y, const T_scale_succ& alpha,
+
34  const T_scale_fail& beta) {
+
35  typedef typename stan::partials_return_type<T_y, T_scale_succ,
+
36  T_scale_fail>::type
+
37  T_partials_return;
+
38 
+
39  // Size checks
+
40  if ( !( stan::length(y) && stan::length(alpha)
+
41  && stan::length(beta) ) )
+
42  return 0.0;
+
43 
+
44  // Error checks
+
45  static const char* function("stan::math::beta_cdf");
+
46 
+ + + + +
51  using boost::math::tools::promote_args;
+ + +
54 
+
55  T_partials_return cdf_log(0.0);
+
56 
+
57  check_positive_finite(function, "First shape parameter", alpha);
+
58  check_positive_finite(function, "Second shape parameter", beta);
+
59  check_not_nan(function, "Random variable", y);
+
60  check_nonnegative(function, "Random variable", y);
+
61  check_less_or_equal(function, "Random variable", y, 1);
+
62  check_consistent_sizes(function,
+
63  "Random variable", y,
+
64  "First shape parameter", alpha,
+
65  "Second shape parameter", beta);
+
66 
+
67  // Wrap arguments in vectors
+
68  VectorView<const T_y> y_vec(y);
+
69  VectorView<const T_scale_succ> alpha_vec(alpha);
+
70  VectorView<const T_scale_fail> beta_vec(beta);
+
71  size_t N = max_size(y, alpha, beta);
+
72 
+ +
74  operands_and_partials(y, alpha, beta);
+
75 
+
76  // Compute CDF and its gradients
+ +
78  using stan::math::digamma;
+
79  using stan::math::lbeta;
+
80  using std::pow;
+
81  using std::exp;
+
82  using std::log;
+
83  using std::exp;
+
84 
+
85  // Cache a few expensive function calls if alpha or beta is a parameter
+ +
87  T_scale_fail>::value,
+
88  T_partials_return, T_scale_succ, T_scale_fail>
+
89  digamma_alpha_vec(max_size(alpha, beta));
+
90 
+ +
92  T_scale_fail>::value,
+
93  T_partials_return, T_scale_succ, T_scale_fail>
+
94  digamma_beta_vec(max_size(alpha, beta));
+
95 
+ +
97  T_scale_fail>::value,
+
98  T_partials_return, T_scale_succ, T_scale_fail>
+
99  digamma_sum_vec(max_size(alpha, beta));
+
100 
+ +
102  for (size_t i = 0; i < N; i++) {
+
103  const T_partials_return alpha_dbl = value_of(alpha_vec[i]);
+
104  const T_partials_return beta_dbl = value_of(beta_vec[i]);
+
105 
+
106  digamma_alpha_vec[i] = digamma(alpha_dbl);
+
107  digamma_beta_vec[i] = digamma(beta_dbl);
+
108  digamma_sum_vec[i] = digamma(alpha_dbl + beta_dbl);
+
109  }
+
110  }
+
111 
+
112  // Compute vectorized CDFLog and gradient
+
113  for (size_t n = 0; n < N; n++) {
+
114  // Pull out values
+
115  const T_partials_return y_dbl = value_of(y_vec[n]);
+
116  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
117  const T_partials_return beta_dbl = value_of(beta_vec[n]);
+
118  const T_partials_return betafunc_dbl = exp(lbeta(alpha_dbl, beta_dbl));
+
119  // Compute
+
120  const T_partials_return Pn = inc_beta(alpha_dbl, beta_dbl, y_dbl);
+
121 
+
122  cdf_log += log(Pn);
+
123 
+ +
125  operands_and_partials.d_x1[n] += pow(1-y_dbl, beta_dbl-1)
+
126  * pow(y_dbl, alpha_dbl-1) / betafunc_dbl / Pn;
+
127 
+
128  T_partials_return g1 = 0;
+
129  T_partials_return g2 = 0;
+
130 
+ +
132  stan::math::grad_reg_inc_beta(g1, g2, alpha_dbl, beta_dbl, y_dbl,
+
133  digamma_alpha_vec[n],
+
134  digamma_beta_vec[n], digamma_sum_vec[n],
+
135  betafunc_dbl);
+
136  }
+ +
138  operands_and_partials.d_x2[n] += g1 / Pn;
+ +
140  operands_and_partials.d_x3[n] += g2 / Pn;
+
141  }
+
142 
+
143  return operands_and_partials.to_var(cdf_log, y, alpha, beta);
+
144  }
+
145 
+
146  }
+
147 }
+
148 #endif
+ + +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > lbeta(const fvar< T > &x1, const fvar< T > &x2)
Definition: lbeta.hpp:16
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > inc_beta(const fvar< T > &a, const fvar< T > &b, const fvar< T > &x)
Definition: inc_beta.hpp:20
+ + +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + +
return_type< T_y, T_scale_succ, T_scale_fail >::type beta_cdf_log(const T_y &y, const T_scale_succ &alpha, const T_scale_fail &beta)
+
bool check_less_or_equal(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is less or equal to high.
+ + + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
void grad_reg_inc_beta(T &g1, T &g2, T a, T b, T z, T digammaA, T digammaB, T digammaSum, T betaAB)
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/beta__log_8hpp.html b/doc/api/html/beta__log_8hpp.html new file mode 100644 index 00000000000..67fc4dfa744 --- /dev/null +++ b/doc/api/html/beta__log_8hpp.html @@ -0,0 +1,156 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/beta_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
beta_log.hpp File Reference
+
+
+
#include <boost/math/special_functions/gamma.hpp>
+#include <boost/random/gamma_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_less_or_equal.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/log1m.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/fun/digamma.hpp>
+#include <stan/math/prim/scal/fun/lgamma.hpp>
+#include <stan/math/prim/scal/fun/lbeta.hpp>
+#include <stan/math/prim/scal/meta/contains_nonconstant_struct.hpp>
+#include <stan/math/prim/scal/meta/VectorBuilder.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/fun/grad_reg_inc_beta.hpp>
+#include <stan/math/prim/scal/fun/inc_beta.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_scale_succ , typename T_scale_fail >
return_type< T_y, T_scale_succ,
+T_scale_fail >::type 
stan::math::beta_log (const T_y &y, const T_scale_succ &alpha, const T_scale_fail &beta)
 The log of the beta density for the specified scalar(s) given the specified sample size(s). More...
 
template<typename T_y , typename T_scale_succ , typename T_scale_fail >
return_type< T_y, T_scale_succ,
+T_scale_fail >::type 
stan::math::beta_log (const T_y &y, const T_scale_succ &alpha, const T_scale_fail &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/beta__log_8hpp_source.html b/doc/api/html/beta__log_8hpp_source.html new file mode 100644 index 00000000000..6e45bccb76b --- /dev/null +++ b/doc/api/html/beta__log_8hpp_source.html @@ -0,0 +1,352 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/beta_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
beta_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_BETA_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_BETA_LOG_HPP
+
3 
+
4 #include <boost/math/special_functions/gamma.hpp>
+
5 #include <boost/random/gamma_distribution.hpp>
+
6 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + + +
25 #include <cmath>
+
26 
+
27 namespace stan {
+
28 
+
29  namespace math {
+
30 
+
49  template <bool propto,
+
50  typename T_y, typename T_scale_succ, typename T_scale_fail>
+
51  typename return_type<T_y, T_scale_succ, T_scale_fail>::type
+
52  beta_log(const T_y& y,
+
53  const T_scale_succ& alpha, const T_scale_fail& beta) {
+
54  static const char* function("stan::math::beta_log");
+
55 
+
56  typedef typename stan::partials_return_type<T_y,
+
57  T_scale_succ,
+
58  T_scale_fail>::type
+
59  T_partials_return;
+
60 
+
61  using stan::math::digamma;
+
62  using stan::math::lgamma;
+
63 
+ +
65  using stan::is_vector;
+ + + + +
70  using stan::math::log1m;
+ + + + +
75  using std::log;
+
76 
+
77  // check if any vectors are zero length
+
78  if (!(stan::length(y)
+
79  && stan::length(alpha)
+
80  && stan::length(beta)))
+
81  return 0.0;
+
82 
+
83  // set up return value accumulator
+
84  T_partials_return logp(0.0);
+
85 
+
86  // validate args (here done over var, which should be OK)
+
87  check_positive_finite(function, "First shape parameter", alpha);
+
88  check_positive_finite(function, "Second shape parameter", beta);
+
89  check_not_nan(function, "Random variable", y);
+
90  check_consistent_sizes(function,
+
91  "Random variable", y,
+
92  "First shape parameter", alpha,
+
93  "Second shape parameter", beta);
+
94  check_nonnegative(function, "Random variable", y);
+
95  check_less_or_equal(function, "Random variable", y, 1);
+
96 
+
97  // check if no variables are involved and prop-to
+ +
99  return 0.0;
+
100 
+
101  VectorView<const T_y> y_vec(y);
+
102  VectorView<const T_scale_succ> alpha_vec(alpha);
+
103  VectorView<const T_scale_fail> beta_vec(beta);
+
104  size_t N = max_size(y, alpha, beta);
+
105 
+
106  for (size_t n = 0; n < N; n++) {
+
107  const T_partials_return y_dbl = value_of(y_vec[n]);
+
108  if (y_dbl < 0 || y_dbl > 1)
+
109  return LOG_ZERO;
+
110  }
+
111 
+
112  // set up template expressions wrapping scalars into vector views
+ +
114  operands_and_partials(y, alpha, beta);
+
115 
+ +
117  T_partials_return, T_y>
+
118  log_y(length(y));
+ +
120  T_partials_return, T_y>
+
121  log1m_y(length(y));
+
122 
+
123  for (size_t n = 0; n < length(y); n++) {
+ +
125  log_y[n] = log(value_of(y_vec[n]));
+ +
127  log1m_y[n] = log1m(value_of(y_vec[n]));
+
128  }
+
129 
+ +
131  T_partials_return, T_scale_succ>
+
132  lgamma_alpha(length(alpha));
+ +
134  T_partials_return, T_scale_succ>
+
135  digamma_alpha(length(alpha));
+
136  for (size_t n = 0; n < length(alpha); n++) {
+ +
138  lgamma_alpha[n] = lgamma(value_of(alpha_vec[n]));
+ +
140  digamma_alpha[n] = digamma(value_of(alpha_vec[n]));
+
141  }
+
142 
+ +
144  T_partials_return, T_scale_fail>
+
145  lgamma_beta(length(beta));
+ +
147  T_partials_return, T_scale_fail>
+
148  digamma_beta(length(beta));
+
149 
+
150  for (size_t n = 0; n < length(beta); n++) {
+ +
152  lgamma_beta[n] = lgamma(value_of(beta_vec[n]));
+ +
154  digamma_beta[n] = digamma(value_of(beta_vec[n]));
+
155  }
+
156 
+ +
158  T_partials_return, T_scale_succ, T_scale_fail>
+
159  lgamma_alpha_beta(max_size(alpha, beta));
+
160 
+ +
162  T_scale_fail>::value,
+
163  T_partials_return, T_scale_succ, T_scale_fail>
+
164  digamma_alpha_beta(max_size(alpha, beta));
+
165 
+
166  for (size_t n = 0; n < max_size(alpha, beta); n++) {
+
167  const T_partials_return alpha_beta = value_of(alpha_vec[n])
+
168  + value_of(beta_vec[n]);
+ +
170  lgamma_alpha_beta[n] = lgamma(alpha_beta);
+ +
172  digamma_alpha_beta[n] = digamma(alpha_beta);
+
173  }
+
174 
+
175  for (size_t n = 0; n < N; n++) {
+
176  // pull out values of arguments
+
177  const T_partials_return y_dbl = value_of(y_vec[n]);
+
178  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
179  const T_partials_return beta_dbl = value_of(beta_vec[n]);
+
180 
+
181  // log probability
+ +
183  logp += lgamma_alpha_beta[n];
+ +
185  logp -= lgamma_alpha[n];
+ +
187  logp -= lgamma_beta[n];
+ +
189  logp += (alpha_dbl-1.0) * log_y[n];
+ +
191  logp += (beta_dbl-1.0) * log1m_y[n];
+
192 
+
193  // gradients
+ +
195  operands_and_partials.d_x1[n] += (alpha_dbl-1)/y_dbl
+
196  + (beta_dbl-1)/(y_dbl-1);
+ +
198  operands_and_partials.d_x2[n]
+
199  += log_y[n] + digamma_alpha_beta[n] - digamma_alpha[n];
+ +
201  operands_and_partials.d_x3[n]
+
202  += log1m_y[n] + digamma_alpha_beta[n] - digamma_beta[n];
+
203  }
+
204  return operands_and_partials.to_var(logp, y, alpha, beta);
+
205  }
+
206 
+
207  template <typename T_y, typename T_scale_succ, typename T_scale_fail>
+ +
209  beta_log(const T_y& y, const T_scale_succ& alpha,
+
210  const T_scale_fail& beta) {
+
211  return beta_log<false>(y, alpha, beta);
+
212  }
+
213 
+
214  }
+
215 }
+
216 #endif
+ + +
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
return_type< T_y, T_scale_succ, T_scale_fail >::type beta_log(const T_y &y, const T_scale_succ &alpha, const T_scale_fail &beta)
The log of the beta density for the specified scalar(s) given the specified sample size(s)...
Definition: beta_log.hpp:52
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
const double LOG_ZERO
Definition: constants.hpp:175
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ +
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ + +
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + +
bool check_less_or_equal(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is less or equal to high.
+ + +
fvar< T > multiply_log(const fvar< T > &x1, const fvar< T > &x2)
+ + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
fvar< T > log1m(const fvar< T > &x)
Definition: log1m.hpp:16
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/beta__rng_8hpp.html b/doc/api/html/beta__rng_8hpp.html new file mode 100644 index 00000000000..eeb603703ca --- /dev/null +++ b/doc/api/html/beta__rng_8hpp.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/beta_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
beta_rng.hpp File Reference
+
+
+
#include <boost/math/special_functions/gamma.hpp>
+#include <boost/random/gamma_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_less_or_equal.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/log1m.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/fun/digamma.hpp>
+#include <stan/math/prim/scal/fun/lgamma.hpp>
+#include <stan/math/prim/scal/fun/lbeta.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/fun/grad_reg_inc_beta.hpp>
+#include <stan/math/prim/scal/fun/inc_beta.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
double stan::math::beta_rng (const double alpha, const double beta, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/beta__rng_8hpp_source.html b/doc/api/html/beta__rng_8hpp_source.html new file mode 100644 index 00000000000..3deabc6a786 --- /dev/null +++ b/doc/api/html/beta__rng_8hpp_source.html @@ -0,0 +1,180 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/beta_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
beta_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_BETA_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_BETA_RNG_HPP
+
3 
+
4 #include <boost/math/special_functions/gamma.hpp>
+
5 #include <boost/random/gamma_distribution.hpp>
+
6 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + +
23 
+
24 namespace stan {
+
25 
+
26  namespace math {
+
27 
+
28  template <class RNG>
+
29  inline double
+
30  beta_rng(const double alpha,
+
31  const double beta,
+
32  RNG& rng) {
+
33  using boost::variate_generator;
+
34  using boost::random::gamma_distribution;
+
35  // Error checks
+
36  static const char* function("stan::math::beta_rng");
+
37 
+ +
39 
+
40  check_positive_finite(function, "First shape parameter", alpha);
+
41  check_positive_finite(function, "Second shape parameter", beta);
+
42 
+
43  variate_generator<RNG&, gamma_distribution<> >
+
44  rng_gamma_alpha(rng, gamma_distribution<>(alpha, 1.0));
+
45  variate_generator<RNG&, gamma_distribution<> >
+
46  rng_gamma_beta(rng, gamma_distribution<>(beta, 1.0));
+
47  double a = rng_gamma_alpha();
+
48  double b = rng_gamma_beta();
+
49  return a / (a + b);
+
50  }
+
51 
+
52  }
+
53 }
+
54 #endif
+ + +
double beta_rng(const double alpha, const double beta, RNG &rng)
Definition: beta_rng.hpp:30
+ + + + + + + + + + + + + + +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/binomial__ccdf__log_8hpp.html b/doc/api/html/binomial__ccdf__log_8hpp.html new file mode 100644 index 00000000000..5817138ee73 --- /dev/null +++ b/doc/api/html/binomial__ccdf__log_8hpp.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/binomial_ccdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
binomial_ccdf_log.hpp File Reference
+
+
+
#include <boost/random/binomial_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_bounded.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_greater_or_equal.hpp>
+#include <stan/math/prim/scal/err/check_less_or_equal.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/inv_logit.hpp>
+#include <stan/math/prim/scal/fun/log1m.hpp>
+#include <stan/math/prim/scal/fun/log_inv_logit.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/fun/binomial_coefficient_log.hpp>
+#include <stan/math/prim/scal/fun/lbeta.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/fun/inc_beta.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_n , typename T_N , typename T_prob >
return_type< T_prob >::type stan::math::binomial_ccdf_log (const T_n &n, const T_N &N, const T_prob &theta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/binomial__ccdf__log_8hpp_source.html b/doc/api/html/binomial__ccdf__log_8hpp_source.html new file mode 100644 index 00000000000..7c26f4c2cc6 --- /dev/null +++ b/doc/api/html/binomial__ccdf__log_8hpp_source.html @@ -0,0 +1,255 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/binomial_ccdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
binomial_ccdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_BINOMIAL_CCDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_BINOMIAL_CCDF_LOG_HPP
+
3 
+
4 #include <boost/random/binomial_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + +
23 #include <cmath>
+
24 
+
25 namespace stan {
+
26 
+
27  namespace math {
+
28 
+
29  template <typename T_n, typename T_N, typename T_prob>
+
30  typename return_type<T_prob>::type
+
31  binomial_ccdf_log(const T_n& n, const T_N& N, const T_prob& theta) {
+
32  static const char* function("stan::math::binomial_ccdf_log");
+ +
34  T_partials_return;
+
35 
+ + + + + + +
42 
+
43  // Ensure non-zero arguments lenghts
+
44  if (!(stan::length(n) && stan::length(N) && stan::length(theta)))
+
45  return 0.0;
+
46 
+
47  T_partials_return P(0.0);
+
48 
+
49  // Validate arguments
+
50  check_nonnegative(function, "Population size parameter", N);
+
51  check_finite(function, "Probability parameter", theta);
+
52  check_bounded(function, "Probability parameter", theta, 0.0, 1.0);
+
53  check_consistent_sizes(function,
+
54  "Successes variable", n,
+
55  "Population size parameter", N,
+
56  "Probability parameter", theta);
+
57 
+
58  // Wrap arguments in vector views
+
59  VectorView<const T_n> n_vec(n);
+
60  VectorView<const T_N> N_vec(N);
+
61  VectorView<const T_prob> theta_vec(theta);
+
62  size_t size = max_size(n, N, theta);
+
63 
+
64  // Compute vectorized cdf_log and gradient
+ + +
67  using stan::math::lbeta;
+
68  using std::exp;
+
69  using std::pow;
+
70  using std::log;
+
71  using std::exp;
+
72 
+
73  OperandsAndPartials<T_prob> operands_and_partials(theta);
+
74 
+
75  // Explicit return for extreme values
+
76  // The gradients are technically ill-defined,
+
77  // but treated as negative infinity
+
78  for (size_t i = 0; i < stan::length(n); i++) {
+
79  if (value_of(n_vec[i]) < 0)
+
80  return operands_and_partials.to_var(0.0, theta);
+
81  }
+
82 
+
83  for (size_t i = 0; i < size; i++) {
+
84  // Explicit results for extreme values
+
85  // The gradients are technically ill-defined, but treated as zero
+
86  if (value_of(n_vec[i]) >= value_of(N_vec[i])) {
+
87  return operands_and_partials.to_var(stan::math::negative_infinity(),
+
88  theta);
+
89  }
+
90  const T_partials_return n_dbl = value_of(n_vec[i]);
+
91  const T_partials_return N_dbl = value_of(N_vec[i]);
+
92  const T_partials_return theta_dbl = value_of(theta_vec[i]);
+
93  const T_partials_return betafunc = exp(lbeta(N_dbl-n_dbl, n_dbl+1));
+
94  const T_partials_return Pi = 1.0 - inc_beta(N_dbl - n_dbl, n_dbl + 1,
+
95  1 - theta_dbl);
+
96 
+
97  P += log(Pi);
+
98 
+ +
100  operands_and_partials.d_x1[i] += pow(theta_dbl, n_dbl)
+
101  * pow(1-theta_dbl, N_dbl-n_dbl-1) / betafunc / Pi;
+
102  }
+
103 
+
104  return operands_and_partials.to_var(P, theta);
+
105  }
+
106  }
+
107 }
+
108 #endif
+
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > lbeta(const fvar< T > &x1, const fvar< T > &x2)
Definition: lbeta.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
bool check_bounded(const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)
Return true if the value is between the low and high values, inclusively.
+ +
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ +
fvar< T > inc_beta(const fvar< T > &a, const fvar< T > &b, const fvar< T > &x)
Definition: inc_beta.hpp:20
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ + + +
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ + + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
return_type< T_prob >::type binomial_ccdf_log(const T_n &n, const T_N &N, const T_prob &theta)
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/binomial__cdf_8hpp.html b/doc/api/html/binomial__cdf_8hpp.html new file mode 100644 index 00000000000..9ab6e7b14cd --- /dev/null +++ b/doc/api/html/binomial__cdf_8hpp.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/binomial_cdf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
binomial_cdf.hpp File Reference
+
+
+
#include <boost/random/binomial_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_bounded.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_greater_or_equal.hpp>
+#include <stan/math/prim/scal/err/check_less_or_equal.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/inv_logit.hpp>
+#include <stan/math/prim/scal/fun/log1m.hpp>
+#include <stan/math/prim/scal/fun/log_inv_logit.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/fun/binomial_coefficient_log.hpp>
+#include <stan/math/prim/scal/fun/lbeta.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/fun/inc_beta.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_n , typename T_N , typename T_prob >
return_type< T_prob >::type stan::math::binomial_cdf (const T_n &n, const T_N &N, const T_prob &theta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/binomial__cdf_8hpp_source.html b/doc/api/html/binomial__cdf_8hpp_source.html new file mode 100644 index 00000000000..47490afe3d1 --- /dev/null +++ b/doc/api/html/binomial__cdf_8hpp_source.html @@ -0,0 +1,259 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/binomial_cdf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
binomial_cdf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_BINOMIAL_CDF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_BINOMIAL_CDF_HPP
+
3 
+
4 #include <boost/random/binomial_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + +
23 #include <cmath>
+
24 
+
25 namespace stan {
+
26 
+
27  namespace math {
+
28 
+
29  // Binomial CDF
+
30  template <typename T_n, typename T_N, typename T_prob>
+
31  typename return_type<T_prob>::type
+
32  binomial_cdf(const T_n& n, const T_N& N, const T_prob& theta) {
+
33  static const char* function("stan::math::binomial_cdf");
+ +
35  T_partials_return;
+
36 
+ + + + + + +
43 
+
44  // Ensure non-zero arguments lenghts
+
45  if (!(stan::length(n) && stan::length(N) && stan::length(theta)))
+
46  return 1.0;
+
47 
+
48  T_partials_return P(1.0);
+
49 
+
50  // Validate arguments
+
51  check_nonnegative(function, "Population size parameter", N);
+
52  check_finite(function, "Probability parameter", theta);
+
53  check_bounded(function, "Probability parameter", theta, 0.0, 1.0);
+
54  check_consistent_sizes(function,
+
55  "Successes variable", n,
+
56  "Population size parameter", N,
+
57  "Probability parameter", theta);
+
58 
+
59 
+
60  // Wrap arguments in vector views
+
61  VectorView<const T_n> n_vec(n);
+
62  VectorView<const T_N> N_vec(N);
+
63  VectorView<const T_prob> theta_vec(theta);
+
64  size_t size = max_size(n, N, theta);
+
65 
+
66  // Compute vectorized CDF and gradient
+ + +
69  using stan::math::lbeta;
+
70  using std::exp;
+
71  using std::pow;
+
72  using std::exp;
+
73 
+
74  OperandsAndPartials<T_prob> operands_and_partials(theta);
+
75 
+
76  // Explicit return for extreme values
+
77  // The gradients are technically ill-defined, but treated as zero
+
78  for (size_t i = 0; i < stan::length(n); i++) {
+
79  if (value_of(n_vec[i]) < 0)
+
80  return operands_and_partials.to_var(0.0, theta);
+
81  }
+
82 
+
83  for (size_t i = 0; i < size; i++) {
+
84  // Explicit results for extreme values
+
85  // The gradients are technically ill-defined, but treated as zero
+
86  if (value_of(n_vec[i]) >= value_of(N_vec[i])) {
+
87  continue;
+
88  }
+
89 
+
90  const T_partials_return n_dbl = value_of(n_vec[i]);
+
91  const T_partials_return N_dbl = value_of(N_vec[i]);
+
92  const T_partials_return theta_dbl = value_of(theta_vec[i]);
+
93  const T_partials_return betafunc = exp(lbeta(N_dbl-n_dbl, n_dbl+1));
+
94  const T_partials_return Pi = inc_beta(N_dbl - n_dbl, n_dbl + 1,
+
95  1 - theta_dbl);
+
96 
+
97  P *= Pi;
+
98 
+ +
100  operands_and_partials.d_x1[i] -= pow(theta_dbl, n_dbl)
+
101  * pow(1-theta_dbl, N_dbl-n_dbl-1) / betafunc / Pi;
+
102  }
+
103 
+ +
105  for (size_t i = 0; i < stan::length(theta); ++i)
+
106  operands_and_partials.d_x1[i] *= P;
+
107  }
+
108 
+
109  return operands_and_partials.to_var(P, theta);
+
110  }
+
111 
+
112  }
+
113 }
+
114 #endif
+
return_type< T_prob >::type binomial_cdf(const T_n &n, const T_N &N, const T_prob &theta)
+
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > lbeta(const fvar< T > &x1, const fvar< T > &x2)
Definition: lbeta.hpp:16
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
bool check_bounded(const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)
Return true if the value is between the low and high values, inclusively.
+ +
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ +
fvar< T > inc_beta(const fvar< T > &a, const fvar< T > &b, const fvar< T > &x)
Definition: inc_beta.hpp:20
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ + + +
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ + + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/binomial__cdf__log_8hpp.html b/doc/api/html/binomial__cdf__log_8hpp.html new file mode 100644 index 00000000000..ca3db6c9655 --- /dev/null +++ b/doc/api/html/binomial__cdf__log_8hpp.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/binomial_cdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
binomial_cdf_log.hpp File Reference
+
+
+
#include <boost/random/binomial_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_bounded.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_greater_or_equal.hpp>
+#include <stan/math/prim/scal/err/check_less_or_equal.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/inv_logit.hpp>
+#include <stan/math/prim/scal/fun/log1m.hpp>
+#include <stan/math/prim/scal/fun/log_inv_logit.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/fun/binomial_coefficient_log.hpp>
+#include <stan/math/prim/scal/fun/lbeta.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/fun/inc_beta.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_n , typename T_N , typename T_prob >
return_type< T_prob >::type stan::math::binomial_cdf_log (const T_n &n, const T_N &N, const T_prob &theta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/binomial__cdf__log_8hpp_source.html b/doc/api/html/binomial__cdf__log_8hpp_source.html new file mode 100644 index 00000000000..531b18d25e7 --- /dev/null +++ b/doc/api/html/binomial__cdf__log_8hpp_source.html @@ -0,0 +1,256 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/binomial_cdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
binomial_cdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_BINOMIAL_CDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_BINOMIAL_CDF_LOG_HPP
+
3 
+
4 #include <boost/random/binomial_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + +
23 #include <cmath>
+
24 
+
25 namespace stan {
+
26 
+
27  namespace math {
+
28 
+
29  template <typename T_n, typename T_N, typename T_prob>
+
30  typename return_type<T_prob>::type
+
31  binomial_cdf_log(const T_n& n, const T_N& N, const T_prob& theta) {
+
32  static const char* function("stan::math::binomial_cdf_log");
+ +
34  T_partials_return;
+
35 
+ + + + + + +
42 
+
43  // Ensure non-zero arguments lenghts
+
44  if (!(stan::length(n) && stan::length(N) && stan::length(theta)))
+
45  return 0.0;
+
46 
+
47  T_partials_return P(0.0);
+
48 
+
49  // Validate arguments
+
50  check_nonnegative(function, "Population size parameter", N);
+
51  check_finite(function, "Probability parameter", theta);
+
52  check_bounded(function, "Probability parameter", theta, 0.0, 1.0);
+
53  check_consistent_sizes(function,
+
54  "Successes variable", n,
+
55  "Population size parameter", N,
+
56  "Probability parameter", theta);
+
57 
+
58  // Wrap arguments in vector views
+
59  VectorView<const T_n> n_vec(n);
+
60  VectorView<const T_N> N_vec(N);
+
61  VectorView<const T_prob> theta_vec(theta);
+
62  size_t size = max_size(n, N, theta);
+
63 
+
64  // Compute vectorized cdf_log and gradient
+ + +
67  using stan::math::lbeta;
+
68  using std::exp;
+
69  using std::pow;
+
70  using std::log;
+
71  using std::exp;
+
72 
+
73  OperandsAndPartials<T_prob> operands_and_partials(theta);
+
74 
+
75  // Explicit return for extreme values
+
76  // The gradients are technically ill-defined,
+
77  // but treated as negative infinity
+
78  for (size_t i = 0; i < stan::length(n); i++) {
+
79  if (value_of(n_vec[i]) < 0)
+
80  return operands_and_partials.to_var(stan::math::negative_infinity(),
+
81  theta);
+
82  }
+
83 
+
84  for (size_t i = 0; i < size; i++) {
+
85  // Explicit results for extreme values
+
86  // The gradients are technically ill-defined, but treated as zero
+
87  if (value_of(n_vec[i]) >= value_of(N_vec[i])) {
+
88  continue;
+
89  }
+
90  const T_partials_return n_dbl = value_of(n_vec[i]);
+
91  const T_partials_return N_dbl = value_of(N_vec[i]);
+
92  const T_partials_return theta_dbl = value_of(theta_vec[i]);
+
93  const T_partials_return betafunc = exp(lbeta(N_dbl-n_dbl, n_dbl+1));
+
94  const T_partials_return Pi = inc_beta(N_dbl - n_dbl, n_dbl + 1,
+
95  1 - theta_dbl);
+
96 
+
97  P += log(Pi);
+
98 
+ +
100  operands_and_partials.d_x1[i] -= pow(theta_dbl, n_dbl)
+
101  * pow(1-theta_dbl, N_dbl-n_dbl-1) / betafunc / Pi;
+
102  }
+
103 
+
104  return operands_and_partials.to_var(P, theta);
+
105  }
+
106 
+
107  }
+
108 }
+
109 #endif
+
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > lbeta(const fvar< T > &x1, const fvar< T > &x2)
Definition: lbeta.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
bool check_bounded(const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)
Return true if the value is between the low and high values, inclusively.
+ +
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ +
fvar< T > inc_beta(const fvar< T > &a, const fvar< T > &b, const fvar< T > &x)
Definition: inc_beta.hpp:20
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ + + +
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+
return_type< T_prob >::type binomial_cdf_log(const T_n &n, const T_N &N, const T_prob &theta)
+ + + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/binomial__log_8hpp.html b/doc/api/html/binomial__log_8hpp.html new file mode 100644 index 00000000000..70625d067ca --- /dev/null +++ b/doc/api/html/binomial__log_8hpp.html @@ -0,0 +1,151 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/binomial_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
binomial_log.hpp File Reference
+
+
+
#include <boost/random/binomial_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_bounded.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_greater_or_equal.hpp>
+#include <stan/math/prim/scal/err/check_less_or_equal.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/inv_logit.hpp>
+#include <stan/math/prim/scal/fun/log1m.hpp>
+#include <stan/math/prim/scal/fun/log_inv_logit.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/fun/binomial_coefficient_log.hpp>
+#include <stan/math/prim/scal/fun/lbeta.hpp>
+#include <stan/math/prim/scal/meta/VectorBuilder.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/fun/inc_beta.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<bool propto, typename T_n , typename T_N , typename T_prob >
return_type< T_prob >::type stan::math::binomial_log (const T_n &n, const T_N &N, const T_prob &theta)
 
template<typename T_n , typename T_N , typename T_prob >
return_type< T_prob >::type stan::math::binomial_log (const T_n &n, const T_N &N, const T_prob &theta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/binomial__log_8hpp_source.html b/doc/api/html/binomial__log_8hpp_source.html new file mode 100644 index 00000000000..bee704ce8a4 --- /dev/null +++ b/doc/api/html/binomial__log_8hpp_source.html @@ -0,0 +1,282 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/binomial_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
binomial_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_BINOMIAL_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_BINOMIAL_LOG_HPP
+
3 
+
4 #include <boost/random/binomial_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + + +
24 
+
25 
+
26 namespace stan {
+
27 
+
28  namespace math {
+
29 
+
30  // Binomial(n|N, theta) [N >= 0; 0 <= n <= N; 0 <= theta <= 1]
+
31  template <bool propto,
+
32  typename T_n,
+
33  typename T_N,
+
34  typename T_prob>
+
35  typename return_type<T_prob>::type
+
36  binomial_log(const T_n& n,
+
37  const T_N& N,
+
38  const T_prob& theta) {
+ +
40  T_partials_return;
+
41 
+
42  static const char* function("stan::math::binomial_log");
+
43 
+ + + + + + +
50 
+
51  // check if any vectors are zero length
+
52  if (!(stan::length(n)
+
53  && stan::length(N)
+
54  && stan::length(theta)))
+
55  return 0.0;
+
56 
+
57  T_partials_return logp = 0;
+
58  check_bounded(function, "Successes variable", n, 0, N);
+
59  check_nonnegative(function, "Population size parameter", N);
+
60  check_finite(function, "Probability parameter", theta);
+
61  check_bounded(function, "Probability parameter", theta, 0.0, 1.0);
+
62  check_consistent_sizes(function,
+
63  "Successes variable", n,
+
64  "Population size parameter", N,
+
65  "Probability parameter", theta);
+
66 
+
67 
+
68  // check if no variables are involved and prop-to
+ +
70  return 0.0;
+
71 
+
72  // set up template expressions wrapping scalars into vector views
+
73  VectorView<const T_n> n_vec(n);
+
74  VectorView<const T_N> N_vec(N);
+
75  VectorView<const T_prob> theta_vec(theta);
+
76  size_t size = max_size(n, N, theta);
+
77 
+
78  OperandsAndPartials<T_prob> operands_and_partials(theta);
+
79 
+ + +
82  using stan::math::log1m;
+
83 
+ +
85  for (size_t i = 0; i < size; ++i)
+
86  logp += binomial_coefficient_log(N_vec[i], n_vec[i]);
+
87  }
+
88 
+ +
90  for (size_t i = 0; i < length(theta); ++i)
+
91  log1m_theta[i] = log1m(value_of(theta_vec[i]));
+
92 
+
93  // no test for include_summand because return if not live
+
94  for (size_t i = 0; i < size; ++i)
+
95  logp += multiply_log(n_vec[i], value_of(theta_vec[i]))
+
96  + (N_vec[i] - n_vec[i]) * log1m_theta[i];
+
97 
+
98  if (length(theta) == 1) {
+
99  T_partials_return temp1 = 0;
+
100  T_partials_return temp2 = 0;
+
101  for (size_t i = 0; i < size; ++i) {
+
102  temp1 += n_vec[i];
+
103  temp2 += N_vec[i] - n_vec[i];
+
104  }
+ +
106  operands_and_partials.d_x1[0]
+
107  += temp1 / value_of(theta_vec[0])
+
108  - temp2 / (1.0 - value_of(theta_vec[0]));
+
109  }
+
110  } else {
+ +
112  for (size_t i = 0; i < size; ++i)
+
113  operands_and_partials.d_x1[i]
+
114  += n_vec[i] / value_of(theta_vec[i])
+
115  - (N_vec[i] - n_vec[i]) / (1.0 - value_of(theta_vec[i]));
+
116  }
+
117  }
+
118 
+
119  return operands_and_partials.to_var(logp, theta);
+
120  }
+
121 
+
122  template <typename T_n,
+
123  typename T_N,
+
124  typename T_prob>
+
125  inline
+ +
127  binomial_log(const T_n& n,
+
128  const T_N& N,
+
129  const T_prob& theta) {
+
130  return binomial_log<false>(n, N, theta);
+
131  }
+
132 
+
133  }
+
134 }
+
135 #endif
+
fvar< T > binomial_coefficient_log(const fvar< T > &x1, const fvar< T > &x2)
+
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
bool check_bounded(const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)
Return true if the value is between the low and high values, inclusively.
+
return_type< T_prob >::type binomial_log(const T_n &n, const T_N &N, const T_prob &theta)
+ +
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ + +
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+
fvar< T > multiply_log(const fvar< T > &x1, const fvar< T > &x2)
+ + +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ + + +
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ + + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
fvar< T > log1m(const fvar< T > &x)
Definition: log1m.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/binomial__logit__log_8hpp.html b/doc/api/html/binomial__logit__log_8hpp.html new file mode 100644 index 00000000000..e6803bc4c58 --- /dev/null +++ b/doc/api/html/binomial__logit__log_8hpp.html @@ -0,0 +1,151 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/binomial_logit_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
binomial_logit_log.hpp File Reference
+
+
+
#include <boost/random/binomial_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_bounded.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_greater_or_equal.hpp>
+#include <stan/math/prim/scal/err/check_less_or_equal.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/inv_logit.hpp>
+#include <stan/math/prim/scal/fun/log1m.hpp>
+#include <stan/math/prim/scal/fun/log_inv_logit.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/fun/binomial_coefficient_log.hpp>
+#include <stan/math/prim/scal/fun/lbeta.hpp>
+#include <stan/math/prim/scal/meta/VectorBuilder.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/fun/inc_beta.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<bool propto, typename T_n , typename T_N , typename T_prob >
return_type< T_prob >::type stan::math::binomial_logit_log (const T_n &n, const T_N &N, const T_prob &alpha)
 
template<typename T_n , typename T_N , typename T_prob >
return_type< T_prob >::type stan::math::binomial_logit_log (const T_n &n, const T_N &N, const T_prob &alpha)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/binomial__logit__log_8hpp_source.html b/doc/api/html/binomial__logit__log_8hpp_source.html new file mode 100644 index 00000000000..1a89c25968d --- /dev/null +++ b/doc/api/html/binomial__logit__log_8hpp_source.html @@ -0,0 +1,285 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/binomial_logit_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
binomial_logit_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_BINOMIAL_LOGIT_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_BINOMIAL_LOGIT_LOG_HPP
+
3 
+
4 #include <boost/random/binomial_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + + +
24 
+
25 
+
26 namespace stan {
+
27 
+
28  namespace math {
+
29 
+
30  // BinomialLogit(n|N, alpha) [N >= 0; 0 <= n <= N]
+
31  // BinomialLogit(n|N, alpha) = Binomial(n|N, inv_logit(alpha))
+
32  template <bool propto,
+
33  typename T_n,
+
34  typename T_N,
+
35  typename T_prob>
+
36  typename return_type<T_prob>::type
+
37  binomial_logit_log(const T_n& n,
+
38  const T_N& N,
+
39  const T_prob& alpha) {
+ +
41  T_partials_return;
+
42 
+
43  static const char* function("stan::math::binomial_logit_log");
+
44 
+ + + + + + +
51 
+
52  // check if any vectors are zero length
+
53  if (!(stan::length(n)
+
54  && stan::length(N)
+
55  && stan::length(alpha)))
+
56  return 0.0;
+
57 
+
58  T_partials_return logp = 0;
+
59  check_bounded(function, "Successes variable", n, 0, N);
+
60  check_nonnegative(function, "Population size parameter", N);
+
61  check_finite(function, "Probability parameter", alpha);
+
62  check_consistent_sizes(function,
+
63  "Successes variable", n,
+
64  "Population size parameter", N,
+
65  "Probability parameter", alpha);
+
66 
+
67  // check if no variables are involved and prop-to
+ +
69  return 0.0;
+
70 
+
71  // set up template expressions wrapping scalars into vector views
+
72  VectorView<const T_n> n_vec(n);
+
73  VectorView<const T_N> N_vec(N);
+
74  VectorView<const T_prob> alpha_vec(alpha);
+
75  size_t size = max_size(n, N, alpha);
+
76 
+
77  OperandsAndPartials<T_prob> operands_and_partials(alpha);
+
78 
+ + + +
82 
+ +
84  for (size_t i = 0; i < size; ++i)
+
85  logp += binomial_coefficient_log(N_vec[i], n_vec[i]);
+
86  }
+
87 
+ +
89  log_inv_logit_alpha(length(alpha));
+
90  for (size_t i = 0; i < length(alpha); ++i)
+
91  log_inv_logit_alpha[i] = log_inv_logit(value_of(alpha_vec[i]));
+
92 
+ +
94  log_inv_logit_neg_alpha(length(alpha));
+
95  for (size_t i = 0; i < length(alpha); ++i)
+
96  log_inv_logit_neg_alpha[i] = log_inv_logit(-value_of(alpha_vec[i]));
+
97 
+
98  for (size_t i = 0; i < size; ++i)
+
99  logp += n_vec[i] * log_inv_logit_alpha[i]
+
100  + (N_vec[i] - n_vec[i]) * log_inv_logit_neg_alpha[i];
+
101 
+
102  if (length(alpha) == 1) {
+
103  T_partials_return temp1 = 0;
+
104  T_partials_return temp2 = 0;
+
105  for (size_t i = 0; i < size; ++i) {
+
106  temp1 += n_vec[i];
+
107  temp2 += N_vec[i] - n_vec[i];
+
108  }
+ +
110  operands_and_partials.d_x1[0]
+
111  += temp1 * inv_logit(-value_of(alpha_vec[0]))
+
112  - temp2 * inv_logit(value_of(alpha_vec[0]));
+
113  }
+
114  } else {
+ +
116  for (size_t i = 0; i < size; ++i)
+
117  operands_and_partials.d_x1[i]
+
118  += n_vec[i] * inv_logit(-value_of(alpha_vec[i]))
+
119  - (N_vec[i] - n_vec[i]) * inv_logit(value_of(alpha_vec[i]));
+
120  }
+
121  }
+
122 
+
123  return operands_and_partials.to_var(logp, alpha);
+
124  }
+
125 
+
126  template <typename T_n,
+
127  typename T_N,
+
128  typename T_prob>
+
129  inline
+ +
131  binomial_logit_log(const T_n& n,
+
132  const T_N& N,
+
133  const T_prob& alpha) {
+
134  return binomial_logit_log<false>(n, N, alpha);
+
135  }
+
136  }
+
137 }
+
138 #endif
+
fvar< T > binomial_coefficient_log(const fvar< T > &x1, const fvar< T > &x2)
+
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > inv_logit(const fvar< T > &x)
Definition: inv_logit.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
bool check_bounded(const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)
Return true if the value is between the low and high values, inclusively.
+ +
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ + +
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ + + +
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ + + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
fvar< T > log_inv_logit(const fvar< T > &x)
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+
return_type< T_prob >::type binomial_logit_log(const T_n &n, const T_N &N, const T_prob &alpha)
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/binomial__rng_8hpp.html b/doc/api/html/binomial__rng_8hpp.html new file mode 100644 index 00000000000..e8c88c1ebbf --- /dev/null +++ b/doc/api/html/binomial__rng_8hpp.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/binomial_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
binomial_rng.hpp File Reference
+
+
+
#include <boost/random/binomial_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_bounded.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_greater_or_equal.hpp>
+#include <stan/math/prim/scal/err/check_less_or_equal.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/inv_logit.hpp>
+#include <stan/math/prim/scal/fun/log1m.hpp>
+#include <stan/math/prim/scal/fun/log_inv_logit.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/fun/binomial_coefficient_log.hpp>
+#include <stan/math/prim/scal/fun/lbeta.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/fun/inc_beta.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
int stan::math::binomial_rng (const int N, const double theta, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/binomial__rng_8hpp_source.html b/doc/api/html/binomial__rng_8hpp_source.html new file mode 100644 index 00000000000..51143c53bd6 --- /dev/null +++ b/doc/api/html/binomial__rng_8hpp_source.html @@ -0,0 +1,186 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/binomial_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
binomial_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_BINOMIAL_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_BINOMIAL_RNG_HPP
+
3 
+
4 #include <boost/random/binomial_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + +
23 
+
24 
+
25 namespace stan {
+
26 
+
27  namespace math {
+
28 
+
29  template <class RNG>
+
30  inline int
+
31  binomial_rng(const int N,
+
32  const double theta,
+
33  RNG& rng) {
+
34  using boost::variate_generator;
+
35  using boost::binomial_distribution;
+
36 
+
37  static const char* function("stan::math::binomial_rng");
+
38 
+ + + + +
43 
+
44  check_nonnegative(function, "Population size parameter", N);
+
45  check_finite(function, "Probability parameter", theta);
+
46  check_less_or_equal(function, "Probability parameter", theta, 1.0);
+
47  check_greater_or_equal(function, "Probability parameter", theta, 0.0);
+
48 
+
49  variate_generator<RNG&, binomial_distribution<> >
+
50  binomial_rng(rng, binomial_distribution<>(N, theta));
+
51  return binomial_rng();
+
52  }
+
53 
+
54  }
+
55 }
+
56 #endif
+
bool check_greater_or_equal(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is greater or equal than low.
+ + + + + + + + +
bool check_less_or_equal(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is less or equal to high.
+ +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + + + +
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ + + + +
int binomial_rng(const int N, const double theta, RNG &rng)
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/block_8hpp.html b/doc/api/html/block_8hpp.html new file mode 100644 index 00000000000..75eea242b49 --- /dev/null +++ b/doc/api/html/block_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/block.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
block.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/err/check_row_index.hpp>
+#include <stan/math/prim/mat/err/check_column_index.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::block (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m, size_t i, size_t j, size_t nrows, size_t ncols)
 Return a nrows x ncols submatrix starting at (i-1, j-1). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/block_8hpp_source.html b/doc/api/html/block_8hpp_source.html new file mode 100644 index 00000000000..1e2e1e29826 --- /dev/null +++ b/doc/api/html/block_8hpp_source.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/block.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
block.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_BLOCK_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_BLOCK_HPP
+
3 
+ + + +
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
20  template <typename T>
+
21  inline
+
22  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
23  block(const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>& m,
+
24  size_t i, size_t j, size_t nrows, size_t ncols) {
+ + +
27 
+
28  check_row_index("block", "i", m, i);
+
29  check_row_index("block", "i+nrows-1", m, i+nrows-1);
+
30  check_column_index("block", "j", m, j);
+
31  check_column_index("block", "j+ncols-1", m, j+ncols-1);
+
32  return m.block(i - 1, j - 1, nrows, ncols);
+
33  }
+
34 
+
35  }
+
36 }
+
37 #endif
+ +
bool check_row_index(const char *function, const char *name, const Eigen::Matrix< T_y, R, C > &y, size_t i)
Return true if the specified index is a valid row of the matrix.
+ + +
bool check_column_index(const char *function, const char *name, const Eigen::Matrix< T_y, R, C > &y, const size_t i)
Return true if the specified index is a valid column of the matrix.
+
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > block(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m, size_t i, size_t j, size_t nrows, size_t ncols)
Return a nrows x ncols submatrix starting at (i-1, j-1).
Definition: block.hpp:23
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/boost_8dox.html b/doc/api/html/boost_8dox.html new file mode 100644 index 00000000000..343f5237caa --- /dev/null +++ b/doc/api/html/boost_8dox.html @@ -0,0 +1,116 @@ + + + + + + +Stan Math Library: doxygen/boost.dox File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
+
+Namespaces
+
+
doxygen/boost.dox File Reference
+
+
+ + + + + + + + +

+Namespaces

 boost
 Reimplementing boost functionality.
 
 boost::math
 Reimplmeneting boost functionality for stan::math::var and and bugs in classification of integer types.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/boost__fpclassify_8hpp.html b/doc/api/html/boost__fpclassify_8hpp.html new file mode 100644 index 00000000000..24f24a409d5 --- /dev/null +++ b/doc/api/html/boost__fpclassify_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/boost_fpclassify.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
boost_fpclassify.hpp File Reference
+
+
+
#include <boost/math/special_functions/fpclassify.hpp>
+#include <stan/math/rev/core.hpp>
+
+

Go to the source code of this file.

+ + + + + + + + +

+Namespaces

 boost
 Reimplementing boost functionality.
 
 boost::math
 Reimplmeneting boost functionality for stan::math::var and and bugs in classification of integer types.
 
+ + + + + +

+Functions

template<>
int boost::math::fpclassify (const stan::math::var &v)
 Categorizes the given stan::math::var value. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/boost__fpclassify_8hpp_source.html b/doc/api/html/boost__fpclassify_8hpp_source.html new file mode 100644 index 00000000000..c3588a6173a --- /dev/null +++ b/doc/api/html/boost__fpclassify_8hpp_source.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/boost_fpclassify.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
boost_fpclassify.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_BOOST_FPCLASSIFY_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_BOOST_FPCLASSIFY_HPP
+
3 
+
4 #include <boost/math/special_functions/fpclassify.hpp>
+
5 #include <stan/math/rev/core.hpp>
+
6 
+
7 namespace boost {
+
8 
+
9  namespace math {
+
10 
+
22  template <>
+
23  inline
+
24  int fpclassify(const stan::math::var& v) {
+
25  return (boost::math::fpclassify)(v.val());
+
26  }
+
27 
+
28  }
+
29 }
+
30 #endif
+
31 
+ +
int fpclassify(const stan::math::var &v)
Categorizes the given stan::math::var value.
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
double val() const
Return the value of this variable.
Definition: var.hpp:234
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/boost__isfinite_8hpp.html b/doc/api/html/boost__isfinite_8hpp.html new file mode 100644 index 00000000000..f2de883a85f --- /dev/null +++ b/doc/api/html/boost__isfinite_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/boost_isfinite.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
boost_isfinite.hpp File Reference
+
+
+
#include <boost/math/special_functions/fpclassify.hpp>
+#include <stan/math/rev/core.hpp>
+
+

Go to the source code of this file.

+ + + + + + + + +

+Namespaces

 boost
 Reimplementing boost functionality.
 
 boost::math
 Reimplmeneting boost functionality for stan::math::var and and bugs in classification of integer types.
 
+ + + + + +

+Functions

template<>
bool boost::math::isfinite (const stan::math::var &v)
 Checks if the given number has finite value. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/boost__isfinite_8hpp_source.html b/doc/api/html/boost__isfinite_8hpp_source.html new file mode 100644 index 00000000000..0c46563cb59 --- /dev/null +++ b/doc/api/html/boost__isfinite_8hpp_source.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/boost_isfinite.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
boost_isfinite.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_BOOST_ISFINITE_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_BOOST_ISFINITE_HPP
+
3 
+
4 #include <boost/math/special_functions/fpclassify.hpp>
+
5 #include <stan/math/rev/core.hpp>
+
6 
+
7 namespace boost {
+
8 
+
9  namespace math {
+
10 
+
20  template <>
+
21  inline
+
22  bool isfinite(const stan::math::var& v) {
+
23  return (boost::math::isfinite)(v.val());
+
24  }
+
25 
+
26  }
+
27 }
+
28 #endif
+
29 
+ +
bool isfinite(const stan::math::var &v)
Checks if the given number has finite value.
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
double val() const
Return the value of this variable.
Definition: var.hpp:234
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/boost__isinf_8hpp.html b/doc/api/html/boost__isinf_8hpp.html new file mode 100644 index 00000000000..5188c6b65ab --- /dev/null +++ b/doc/api/html/boost__isinf_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/boost_isinf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
boost_isinf.hpp File Reference
+
+
+
#include <boost/math/special_functions/fpclassify.hpp>
+#include <stan/math/rev/core.hpp>
+
+

Go to the source code of this file.

+ + + + + + + + +

+Namespaces

 boost
 Reimplementing boost functionality.
 
 boost::math
 Reimplmeneting boost functionality for stan::math::var and and bugs in classification of integer types.
 
+ + + + + +

+Functions

template<>
bool boost::math::isinf (const stan::math::var &v)
 Checks if the given number is infinite. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/boost__isinf_8hpp_source.html b/doc/api/html/boost__isinf_8hpp_source.html new file mode 100644 index 00000000000..c191d8b6463 --- /dev/null +++ b/doc/api/html/boost__isinf_8hpp_source.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/boost_isinf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
boost_isinf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_BOOST_ISINF_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_BOOST_ISINF_HPP
+
3 
+
4 #include <boost/math/special_functions/fpclassify.hpp>
+
5 #include <stan/math/rev/core.hpp>
+
6 
+
7 namespace boost {
+
8 
+
9  namespace math {
+
10 
+
20  template <>
+
21  inline
+
22  bool isinf(const stan::math::var& v) {
+
23  return (boost::math::isinf)(v.val());
+
24  }
+
25 
+
26  }
+
27 }
+
28 #endif
+
29 
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
bool isinf(const stan::math::var &v)
Checks if the given number is infinite.
Definition: boost_isinf.hpp:22
+
double val() const
Return the value of this variable.
Definition: var.hpp:234
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/boost__isnan_8hpp.html b/doc/api/html/boost__isnan_8hpp.html new file mode 100644 index 00000000000..782ec8eb329 --- /dev/null +++ b/doc/api/html/boost__isnan_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/boost_isnan.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
boost_isnan.hpp File Reference
+
+
+
#include <boost/math/special_functions/fpclassify.hpp>
+#include <stan/math/rev/core.hpp>
+
+

Go to the source code of this file.

+ + + + + + + + +

+Namespaces

 boost
 Reimplementing boost functionality.
 
 boost::math
 Reimplmeneting boost functionality for stan::math::var and and bugs in classification of integer types.
 
+ + + + + +

+Functions

template<>
bool boost::math::isnan (const stan::math::var &v)
 Checks if the given number is NaN. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/boost__isnan_8hpp_source.html b/doc/api/html/boost__isnan_8hpp_source.html new file mode 100644 index 00000000000..204a38022b9 --- /dev/null +++ b/doc/api/html/boost__isnan_8hpp_source.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/boost_isnan.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
boost_isnan.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_BOOST_ISNAN_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_BOOST_ISNAN_HPP
+
3 
+
4 #include <boost/math/special_functions/fpclassify.hpp>
+
5 #include <stan/math/rev/core.hpp>
+
6 
+
7 namespace boost {
+
8 
+
9  namespace math {
+
10 
+
20  template <>
+
21  inline
+
22  bool isnan(const stan::math::var& v) {
+
23  return (boost::math::isnan)(v.val());
+
24  }
+
25 
+
26  }
+
27 }
+
28 #endif
+
29 
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
+
double val() const
Return the value of this variable.
Definition: var.hpp:234
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/boost__isnormal_8hpp.html b/doc/api/html/boost__isnormal_8hpp.html new file mode 100644 index 00000000000..af1042ff720 --- /dev/null +++ b/doc/api/html/boost__isnormal_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/boost_isnormal.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
boost_isnormal.hpp File Reference
+
+
+
#include <boost/math/special_functions/fpclassify.hpp>
+#include <stan/math/rev/core.hpp>
+
+

Go to the source code of this file.

+ + + + + + + + +

+Namespaces

 boost
 Reimplementing boost functionality.
 
 boost::math
 Reimplmeneting boost functionality for stan::math::var and and bugs in classification of integer types.
 
+ + + + + +

+Functions

template<>
bool boost::math::isnormal (const stan::math::var &v)
 Checks if the given number is normal. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/boost__isnormal_8hpp_source.html b/doc/api/html/boost__isnormal_8hpp_source.html new file mode 100644 index 00000000000..c02700ba146 --- /dev/null +++ b/doc/api/html/boost__isnormal_8hpp_source.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/boost_isnormal.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
boost_isnormal.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_BOOST_ISNORMAL_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_BOOST_ISNORMAL_HPP
+
3 
+
4 #include <boost/math/special_functions/fpclassify.hpp>
+
5 #include <stan/math/rev/core.hpp>
+
6 
+
7 namespace boost {
+
8 
+
9  namespace math {
+
10 
+
20  template <>
+
21  inline
+
22  bool isnormal(const stan::math::var& v) {
+
23  return (boost::math::isnormal)(v.val());
+
24  }
+
25 
+
26  }
+
27 }
+
28 #endif
+
29 
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
bool isnormal(const stan::math::var &v)
Checks if the given number is normal.
+
double val() const
Return the value of this variable.
Definition: var.hpp:234
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/calculate__chain_8hpp.html b/doc/api/html/calculate__chain_8hpp.html new file mode 100644 index 00000000000..1d0677e66b8 --- /dev/null +++ b/doc/api/html/calculate__chain_8hpp.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/calculate_chain.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
calculate_chain.hpp File Reference
+
+
+
#include <valarray>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + +

+Functions

double stan::math::calculate_chain (const double &x, const double &val)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/calculate__chain_8hpp_source.html b/doc/api/html/calculate__chain_8hpp_source.html new file mode 100644 index 00000000000..014fdc233f0 --- /dev/null +++ b/doc/api/html/calculate__chain_8hpp_source.html @@ -0,0 +1,123 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/calculate_chain.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
calculate_chain.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_CALCULATE_CHAIN_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_CALCULATE_CHAIN_HPP
+
3 
+
4 #include <valarray>
+
5 
+
6 namespace stan {
+
7  namespace math {
+
8  inline double calculate_chain(const double& x, const double& val) {
+
9  return std::exp(x - val); // works out to inv_logit(x)
+
10  }
+
11  }
+
12 }
+
13 #endif
+
double calculate_chain(const double &x, const double &val)
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/categorical__log_8hpp.html b/doc/api/html/categorical__log_8hpp.html new file mode 100644 index 00000000000..95986f0fdaa --- /dev/null +++ b/doc/api/html/categorical__log_8hpp.html @@ -0,0 +1,153 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/categorical_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
categorical_log.hpp File Reference
+
+
+
#include <boost/random/uniform_01.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/mat/err/check_simplex.hpp>
+#include <stan/math/prim/scal/err/check_bounded.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/mat/fun/sum.hpp>
+#include <stan/math/prim/mat/meta/index_type.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/meta/is_constant_struct.hpp>
+#include <cmath>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + +

+Functions

template<bool propto, typename T_prob >
boost::math::tools::promote_args
+< T_prob >::type 
stan::math::categorical_log (int n, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)
 
template<typename T_prob >
boost::math::tools::promote_args
+< T_prob >::type 
stan::math::categorical_log (const typename math::index_type< Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > >::type n, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)
 
template<bool propto, typename T_prob >
boost::math::tools::promote_args
+< T_prob >::type 
stan::math::categorical_log (const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)
 
template<typename T_prob >
boost::math::tools::promote_args
+< T_prob >::type 
stan::math::categorical_log (const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/categorical__log_8hpp_source.html b/doc/api/html/categorical__log_8hpp_source.html new file mode 100644 index 00000000000..785d4360be1 --- /dev/null +++ b/doc/api/html/categorical__log_8hpp_source.html @@ -0,0 +1,248 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/categorical_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
categorical_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_CATEGORICAL_LOG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_CATEGORICAL_LOG_HPP
+
3 
+
4 #include <boost/random/uniform_01.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + +
14 #include <cmath>
+
15 #include <vector>
+
16 
+
17 namespace stan {
+
18 
+
19  namespace math {
+
20 
+
21  // Categorical(n|theta) [0 < n <= N; 0 <= theta[n] <= 1; SUM theta = 1]
+
22  template <bool propto,
+
23  typename T_prob>
+
24  typename boost::math::tools::promote_args<T_prob>::type
+ +
26  const Eigen::Matrix<T_prob, Eigen::Dynamic, 1>& theta) {
+
27  static const char* function("stan::math::categorical_log");
+
28 
+ + +
31  using boost::math::tools::promote_args;
+ +
33  using std::log;
+
34 
+
35  int lb = 1;
+
36 
+
37  T_prob lp = 0.0;
+
38  check_bounded(function, "Number of categories", n, lb, theta.size());
+
39 
+ +
41  if (!check_simplex(function, "Probabilities parameter", theta))
+
42  return lp;
+
43  } else {
+
44  if (!check_simplex(function, "Probabilities parameter", theta))
+
45  return lp;
+
46  }
+
47 
+ +
49  return log(theta(n-1));
+
50  return 0.0;
+
51  }
+
52 
+
53  template <typename T_prob>
+
54  inline
+
55  typename boost::math::tools::promote_args<T_prob>::type
+
56  categorical_log(const typename
+
57  math::index_type<Eigen::Matrix<T_prob,
+
58  Eigen::Dynamic, 1> >::type n,
+
59  const Eigen::Matrix<T_prob, Eigen::Dynamic, 1>& theta) {
+
60  return categorical_log<false>(n, theta);
+
61  }
+
62 
+
63 
+
64  // Categorical(n|theta) [0 < n <= N; 0 <= theta[n] <= 1; SUM theta = 1]
+
65  template <bool propto,
+
66  typename T_prob>
+
67  typename boost::math::tools::promote_args<T_prob>::type
+
68  categorical_log(const std::vector<int>& ns,
+
69  const Eigen::Matrix<T_prob, Eigen::Dynamic, 1>& theta) {
+
70  static const char* function("stan::math::categorical_log");
+
71 
+
72  using boost::math::tools::promote_args;
+ + +
75  using stan::math::sum;
+ +
77  using std::log;
+
78 
+
79  int lb = 1;
+
80 
+
81  T_prob lp = 0.0;
+
82  for (size_t i = 0; i < ns.size(); ++i)
+
83  check_bounded(function, "element of outcome array", ns[i],
+
84  lb, theta.size());
+
85 
+ +
87  if (!check_simplex(function, "Probabilities parameter", theta))
+
88  return lp;
+
89  } else {
+
90  if (!check_simplex(function, "Probabilities parameter", theta))
+
91  return lp;
+
92  }
+
93 
+ +
95  return 0.0;
+
96 
+
97  if (ns.size() == 0)
+
98  return 0.0;
+
99 
+
100  Eigen::Matrix<T_prob, Eigen::Dynamic, 1> log_theta(theta.size());
+
101  for (int i = 0; i < theta.size(); ++i)
+
102  log_theta(i) = log(theta(i));
+
103 
+
104  Eigen::Matrix<typename boost::math::tools::promote_args<T_prob>::type,
+
105  Eigen::Dynamic, 1> log_theta_ns(ns.size());
+
106  for (size_t i = 0; i < ns.size(); ++i)
+
107  log_theta_ns(i) = log_theta(ns[i] - 1);
+
108 
+
109  return sum(log_theta_ns);
+
110  }
+
111 
+
112 
+
113  template <typename T_prob>
+
114  inline
+
115  typename boost::math::tools::promote_args<T_prob>::type
+
116  categorical_log(const std::vector<int>& ns,
+
117  const Eigen::Matrix<T_prob, Eigen::Dynamic, 1>& theta) {
+
118  return categorical_log<false>(ns, theta);
+
119  }
+
120 
+
121  }
+
122 }
+
123 #endif
+
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
bool check_bounded(const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)
Return true if the value is between the low and high values, inclusively.
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:19
+ +
boost::math::tools::promote_args< T_prob >::type categorical_log(int n, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)
+ + + +
bool check_simplex(const char *function, const char *name, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)
Return true if the specified vector is simplex.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/categorical__logit__log_8hpp.html b/doc/api/html/categorical__logit__log_8hpp.html new file mode 100644 index 00000000000..aa85f68b932 --- /dev/null +++ b/doc/api/html/categorical__logit__log_8hpp.html @@ -0,0 +1,150 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/categorical_logit_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
categorical_logit_log.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/check_bounded.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/arr/fun/log_sum_exp.hpp>
+#include <stan/math/prim/mat/fun/log_softmax.hpp>
+#include <stan/math/prim/mat/fun/log_sum_exp.hpp>
+#include <stan/math/prim/mat/fun/sum.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <boost/math/tools/promotion.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + +

+Functions

template<bool propto, typename T_prob >
boost::math::tools::promote_args
+< T_prob >::type 
stan::math::categorical_logit_log (int n, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &beta)
 
template<typename T_prob >
boost::math::tools::promote_args
+< T_prob >::type 
stan::math::categorical_logit_log (int n, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &beta)
 
template<bool propto, typename T_prob >
boost::math::tools::promote_args
+< T_prob >::type 
stan::math::categorical_logit_log (const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &beta)
 
template<typename T_prob >
boost::math::tools::promote_args
+< T_prob >::type 
stan::math::categorical_logit_log (const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/categorical__logit__log_8hpp_source.html b/doc/api/html/categorical__logit__log_8hpp_source.html new file mode 100644 index 00000000000..8b4f297819a --- /dev/null +++ b/doc/api/html/categorical__logit__log_8hpp_source.html @@ -0,0 +1,220 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/categorical_logit_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
categorical_logit_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_CATEGORICAL_LOGIT_LOG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_CATEGORICAL_LOGIT_LOG_HPP
+
3 
+ + + + + + + +
11 #include <boost/math/tools/promotion.hpp>
+
12 #include <vector>
+
13 
+
14 namespace stan {
+
15 
+
16  namespace math {
+
17 
+
18  // CategoricalLog(n|theta) [0 < n <= N, theta unconstrained], no checking
+
19  template <bool propto,
+
20  typename T_prob>
+
21  typename boost::math::tools::promote_args<T_prob>::type
+ +
23  const Eigen::Matrix<T_prob, Eigen::Dynamic, 1>&
+
24  beta) {
+
25  static const char* function("stan::math::categorical_logit_log");
+
26 
+ + + +
30 
+
31  check_bounded(function, "categorical outcome out of support", n,
+
32  1, beta.size());
+
33  check_finite(function, "log odds parameter", beta);
+
34 
+ +
36  return 0.0;
+
37 
+
38  // FIXME: wasteful vs. creating term (n-1) if not vectorized
+
39  return beta(n-1) - log_sum_exp(beta); // == log_softmax(beta)(n-1);
+
40  }
+
41 
+
42  template <typename T_prob>
+
43  inline
+
44  typename boost::math::tools::promote_args<T_prob>::type
+ +
46  const Eigen::Matrix<T_prob, Eigen::Dynamic, 1>&
+
47  beta) {
+
48  return categorical_logit_log<false>(n, beta);
+
49  }
+
50 
+
51  template <bool propto,
+
52  typename T_prob>
+
53  typename boost::math::tools::promote_args<T_prob>::type
+
54  categorical_logit_log(const std::vector<int>& ns,
+
55  const Eigen::Matrix<T_prob, Eigen::Dynamic, 1>&
+
56  beta) {
+
57  static const char* function("stan::math::categorical_logit_log");
+
58 
+ + + +
62  using stan::math::sum;
+
63 
+
64  for (size_t k = 0; k < ns.size(); ++k)
+
65  check_bounded(function, "categorical outcome out of support",
+
66  ns[k], 1, beta.size());
+
67  check_finite(function, "log odds parameter", beta);
+
68 
+ +
70  return 0.0;
+
71 
+
72  if (ns.size() == 0)
+
73  return 0.0;
+
74 
+
75  Eigen::Matrix<T_prob, Eigen::Dynamic, 1> log_softmax_beta
+
76  = log_softmax(beta);
+
77 
+
78  // FIXME: replace with more efficient sum()
+
79  Eigen::Matrix<typename boost::math::tools::promote_args<T_prob>::type,
+
80  Eigen::Dynamic, 1> results(ns.size());
+
81  for (size_t i = 0; i < ns.size(); ++i)
+
82  results[i] = log_softmax_beta(ns[i] - 1);
+
83  return sum(results);
+
84  }
+
85 
+
86  template <typename T_prob>
+
87  inline
+
88  typename boost::math::tools::promote_args<T_prob>::type
+
89  categorical_logit_log(const std::vector<int>& ns,
+
90  const Eigen::Matrix<T_prob, Eigen::Dynamic, 1>&
+
91  beta) {
+
92  return categorical_logit_log<false>(ns, beta);
+
93  }
+
94 
+
95 
+
96  }
+
97 }
+
98 #endif
+
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+
boost::math::tools::promote_args< T_prob >::type categorical_logit_log(int n, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &beta)
+
bool check_bounded(const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)
Return true if the value is between the low and high values, inclusively.
+
Eigen::Matrix< fvar< T >, Eigen::Dynamic, 1 > log_softmax(const Eigen::Matrix< fvar< T >, Eigen::Dynamic, 1 > &alpha)
Definition: log_softmax.hpp:16
+
fvar< T > log_sum_exp(const std::vector< fvar< T > > &v)
Definition: log_sum_exp.hpp:14
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ + + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/categorical__rng_8hpp.html b/doc/api/html/categorical__rng_8hpp.html new file mode 100644 index 00000000000..5fa78ae5da6 --- /dev/null +++ b/doc/api/html/categorical__rng_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/categorical_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
categorical_rng.hpp File Reference
+
+
+
#include <boost/random/uniform_01.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/mat/err/check_simplex.hpp>
+#include <stan/math/prim/scal/err/check_bounded.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/mat/fun/sum.hpp>
+#include <stan/math/prim/mat/meta/index_type.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
int stan::math::categorical_rng (const Eigen::Matrix< double, Eigen::Dynamic, 1 > &theta, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/categorical__rng_8hpp_source.html b/doc/api/html/categorical__rng_8hpp_source.html new file mode 100644 index 00000000000..ab3d402da68 --- /dev/null +++ b/doc/api/html/categorical__rng_8hpp_source.html @@ -0,0 +1,166 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/categorical_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
categorical_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_CATEGORICAL_RNG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_CATEGORICAL_RNG_HPP
+
3 
+
4 #include <boost/random/uniform_01.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + +
13 
+
14 namespace stan {
+
15 
+
16  namespace math {
+
17 
+
18  template <class RNG>
+
19  inline int
+
20  categorical_rng(const Eigen::Matrix<double, Eigen::Dynamic, 1>& theta,
+
21  RNG& rng) {
+
22  using boost::variate_generator;
+
23  using boost::uniform_01;
+ +
25 
+
26  static const char* function("stan::math::categorical_rng");
+
27 
+
28  check_simplex(function, "Probabilities parameter", theta);
+
29 
+
30  variate_generator<RNG&, uniform_01<> >
+
31  uniform01_rng(rng, uniform_01<>());
+
32 
+
33  Eigen::VectorXd index(theta.rows());
+
34  index.setZero();
+
35 
+
36  for (int i = 0; i < theta.rows(); i++) {
+
37  for (int j = i; j < theta.rows(); j++)
+
38  index(j) += theta(i, 0);
+
39  }
+
40 
+
41  double c = uniform01_rng();
+
42  int b = 0;
+
43  while (c > index(b, 0))
+
44  b++;
+
45  return b + 1;
+
46  }
+
47  }
+
48 }
+
49 #endif
+ + +
int categorical_rng(const Eigen::Matrix< double, Eigen::Dynamic, 1 > &theta, RNG &rng)
+ + + + +
bool check_simplex(const char *function, const char *name, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)
Return true if the specified vector is simplex.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cauchy__ccdf__log_8hpp.html b/doc/api/html/cauchy__ccdf__log_8hpp.html new file mode 100644 index 00000000000..37d9880ca2f --- /dev/null +++ b/doc/api/html/cauchy__ccdf__log_8hpp.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/cauchy_ccdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
cauchy_ccdf_log.hpp File Reference
+
+
+
#include <boost/random/cauchy_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/log1p.hpp>
+#include <stan/math/prim/scal/fun/square.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::cauchy_ccdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cauchy__ccdf__log_8hpp_source.html b/doc/api/html/cauchy__ccdf__log_8hpp_source.html new file mode 100644 index 00000000000..8007f0c8735 --- /dev/null +++ b/doc/api/html/cauchy__ccdf__log_8hpp_source.html @@ -0,0 +1,230 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/cauchy_ccdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
cauchy_ccdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_CAUCHY_CCDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_CAUCHY_CCDF_LOG_HPP
+
3 
+
4 #include <boost/random/cauchy_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + +
16 #include <cmath>
+
17 
+
18 namespace stan {
+
19 
+
20  namespace math {
+
21 
+
22  template <typename T_y, typename T_loc, typename T_scale>
+
23  typename return_type<T_y, T_loc, T_scale>::type
+
24  cauchy_ccdf_log(const T_y& y, const T_loc& mu, const T_scale& sigma) {
+ +
26  T_partials_return;
+
27 
+
28  // Size checks
+
29  if ( !( stan::length(y) && stan::length(mu)
+
30  && stan::length(sigma) ) )
+
31  return 0.0;
+
32 
+
33  static const char* function("stan::math::cauchy_cdf");
+
34 
+ + + + +
39  using boost::math::tools::promote_args;
+ +
41 
+
42  T_partials_return ccdf_log(0.0);
+
43 
+
44  check_not_nan(function, "Random variable", y);
+
45  check_finite(function, "Location parameter", mu);
+
46  check_positive_finite(function, "Scale parameter", sigma);
+
47  check_consistent_sizes(function,
+
48  "Random variable", y,
+
49  "Location parameter", mu,
+
50  "Scale Parameter", sigma);
+
51 
+
52  // Wrap arguments in vectors
+
53  VectorView<const T_y> y_vec(y);
+
54  VectorView<const T_loc> mu_vec(mu);
+
55  VectorView<const T_scale> sigma_vec(sigma);
+
56  size_t N = max_size(y, mu, sigma);
+
57 
+ +
59  operands_and_partials(y, mu, sigma);
+
60 
+
61  // Compute CDFLog and its gradients
+
62  using std::atan;
+
63  using stan::math::pi;
+
64  using std::log;
+
65 
+
66  // Compute vectorized CDF and gradient
+
67  for (size_t n = 0; n < N; n++) {
+
68  // Pull out values
+
69  const T_partials_return y_dbl = value_of(y_vec[n]);
+
70  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
71  const T_partials_return sigma_inv_dbl = 1.0 / value_of(sigma_vec[n]);
+
72  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
73  const T_partials_return z = (y_dbl - mu_dbl) * sigma_inv_dbl;
+
74 
+
75  // Compute
+
76  const T_partials_return Pn = 0.5 - atan(z) / pi();
+
77  ccdf_log += log(Pn);
+
78 
+
79  const T_partials_return rep_deriv = 1.0 / (Pn * pi()
+
80  * (z * z * sigma_dbl
+
81  + sigma_dbl));
+ +
83  operands_and_partials.d_x1[n] -= rep_deriv;
+ +
85  operands_and_partials.d_x2[n] += rep_deriv;
+ +
87  operands_and_partials.d_x3[n] += rep_deriv * z;
+
88  }
+
89  return operands_and_partials.to_var(ccdf_log, y, mu, sigma);
+
90  }
+
91  }
+
92 }
+
93 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
fvar< T > atan(const fvar< T > &x)
Definition: atan.hpp:12
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
double pi()
Return the value of pi.
Definition: constants.hpp:86
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
return_type< T_y, T_loc, T_scale >::type cauchy_ccdf_log(const T_y &y, const T_loc &mu, const T_scale &sigma)
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cauchy__cdf_8hpp.html b/doc/api/html/cauchy__cdf_8hpp.html new file mode 100644 index 00000000000..ecc7dfe3170 --- /dev/null +++ b/doc/api/html/cauchy__cdf_8hpp.html @@ -0,0 +1,143 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/cauchy_cdf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
cauchy_cdf.hpp File Reference
+
+
+
#include <boost/random/cauchy_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/log1p.hpp>
+#include <stan/math/prim/scal/fun/square.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::cauchy_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma)
 Calculates the cauchy cumulative distribution function for the given variate, location, and scale. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cauchy__cdf_8hpp_source.html b/doc/api/html/cauchy__cdf_8hpp_source.html new file mode 100644 index 00000000000..3a02d8071df --- /dev/null +++ b/doc/api/html/cauchy__cdf_8hpp_source.html @@ -0,0 +1,256 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/cauchy_cdf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
cauchy_cdf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_CAUCHY_CDF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_CAUCHY_CDF_HPP
+
3 
+
4 #include <boost/random/cauchy_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + +
16 #include <limits>
+
17 
+
18 namespace stan {
+
19 
+
20  namespace math {
+
21 
+
34  template <typename T_y, typename T_loc, typename T_scale>
+
35  typename return_type<T_y, T_loc, T_scale>::type
+
36  cauchy_cdf(const T_y& y, const T_loc& mu, const T_scale& sigma) {
+ +
38  T_partials_return;
+
39 
+
40  // Size checks
+
41  if ( !( stan::length(y) && stan::length(mu)
+
42  && stan::length(sigma) ) )
+
43  return 1.0;
+
44 
+
45  static const char* function("stan::math::cauchy_cdf");
+
46 
+ + + + +
51  using boost::math::tools::promote_args;
+ +
53 
+
54  T_partials_return P(1.0);
+
55 
+
56  check_not_nan(function, "Random variable", y);
+
57  check_finite(function, "Location parameter", mu);
+
58  check_positive_finite(function, "Scale parameter", sigma);
+
59  check_consistent_sizes(function,
+
60  "Random variable", y,
+
61  "Location parameter", mu,
+
62  "Scale Parameter", sigma);
+
63 
+
64  // Wrap arguments in vectors
+
65  VectorView<const T_y> y_vec(y);
+
66  VectorView<const T_loc> mu_vec(mu);
+
67  VectorView<const T_scale> sigma_vec(sigma);
+
68  size_t N = max_size(y, mu, sigma);
+
69 
+ +
71  operands_and_partials(y, mu, sigma);
+
72 
+
73  // Explicit return for extreme values
+
74  // The gradients are technically ill-defined, but treated as zero
+
75  for (size_t i = 0; i < stan::length(y); i++) {
+
76  if (value_of(y_vec[i]) == -std::numeric_limits<double>::infinity())
+
77  return operands_and_partials.to_var(0.0, y, mu, sigma);
+
78  }
+
79 
+
80  // Compute CDF and its gradients
+
81  using std::atan;
+
82  using stan::math::pi;
+
83 
+
84  // Compute vectorized CDF and gradient
+
85  for (size_t n = 0; n < N; n++) {
+
86  // Explicit results for extreme values
+
87  // The gradients are technically ill-defined, but treated as zero
+
88  if (value_of(y_vec[n]) == std::numeric_limits<double>::infinity()) {
+
89  continue;
+
90  }
+
91 
+
92  // Pull out values
+
93  const T_partials_return y_dbl = value_of(y_vec[n]);
+
94  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
95  const T_partials_return sigma_inv_dbl = 1.0 / value_of(sigma_vec[n]);
+
96 
+
97  const T_partials_return z = (y_dbl - mu_dbl) * sigma_inv_dbl;
+
98 
+
99  // Compute
+
100  const T_partials_return Pn = atan(z) / pi() + 0.5;
+
101 
+
102  P *= Pn;
+
103 
+ +
105  operands_and_partials.d_x1[n]
+
106  += sigma_inv_dbl / (pi() * (1.0 + z * z) * Pn);
+ +
108  operands_and_partials.d_x2[n]
+
109  += - sigma_inv_dbl / (pi() * (1.0 + z * z) * Pn);
+ +
111  operands_and_partials.d_x3[n]
+
112  += - z * sigma_inv_dbl / (pi() * (1.0 + z * z) * Pn);
+
113  }
+
114 
+ +
116  for (size_t n = 0; n < stan::length(y); ++n)
+
117  operands_and_partials.d_x1[n] *= P;
+
118  }
+ +
120  for (size_t n = 0; n < stan::length(mu); ++n)
+
121  operands_and_partials.d_x2[n] *= P;
+
122  }
+ +
124  for (size_t n = 0; n < stan::length(sigma); ++n)
+
125  operands_and_partials.d_x3[n] *= P;
+
126  }
+
127 
+
128  return operands_and_partials.to_var(P, y, mu, sigma);
+
129  }
+
130  }
+
131 }
+
132 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
fvar< T > atan(const fvar< T > &x)
Definition: atan.hpp:12
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
return_type< T_y, T_loc, T_scale >::type cauchy_cdf(const T_y &y, const T_loc &mu, const T_scale &sigma)
Calculates the cauchy cumulative distribution function for the given variate, location, and scale.
Definition: cauchy_cdf.hpp:36
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
double pi()
Return the value of pi.
Definition: constants.hpp:86
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cauchy__cdf__log_8hpp.html b/doc/api/html/cauchy__cdf__log_8hpp.html new file mode 100644 index 00000000000..9cce34341fb --- /dev/null +++ b/doc/api/html/cauchy__cdf__log_8hpp.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/cauchy_cdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
cauchy_cdf_log.hpp File Reference
+
+
+
#include <boost/random/cauchy_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/square.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/fun/log1p.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::cauchy_cdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cauchy__cdf__log_8hpp_source.html b/doc/api/html/cauchy__cdf__log_8hpp_source.html new file mode 100644 index 00000000000..fff65277ed6 --- /dev/null +++ b/doc/api/html/cauchy__cdf__log_8hpp_source.html @@ -0,0 +1,231 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/cauchy_cdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
cauchy_cdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_CAUCHY_CDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_CAUCHY_CDF_LOG_HPP
+
3 
+
4 #include <boost/random/cauchy_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + +
16 #include <cmath>
+
17 
+
18 namespace stan {
+
19 
+
20  namespace math {
+
21 
+
22  template <typename T_y, typename T_loc, typename T_scale>
+
23  typename return_type<T_y, T_loc, T_scale>::type
+
24  cauchy_cdf_log(const T_y& y, const T_loc& mu, const T_scale& sigma) {
+ +
26  T_partials_return;
+
27 
+
28  // Size checks
+
29  if ( !( stan::length(y) && stan::length(mu)
+
30  && stan::length(sigma) ) )
+
31  return 0.0;
+
32 
+
33  static const char* function("stan::math::cauchy_cdf");
+
34 
+ + + + +
39  using boost::math::tools::promote_args;
+ +
41 
+
42  T_partials_return cdf_log(0.0);
+
43 
+
44  check_not_nan(function, "Random variable", y);
+
45  check_finite(function, "Location parameter", mu);
+
46  check_positive_finite(function, "Scale parameter", sigma);
+
47  check_consistent_sizes(function,
+
48  "Random variable", y,
+
49  "Location parameter", mu,
+
50  "Scale Parameter", sigma);
+
51 
+
52  // Wrap arguments in vectors
+
53  VectorView<const T_y> y_vec(y);
+
54  VectorView<const T_loc> mu_vec(mu);
+
55  VectorView<const T_scale> sigma_vec(sigma);
+
56  size_t N = max_size(y, mu, sigma);
+
57 
+ +
59  operands_and_partials(y, mu, sigma);
+
60 
+
61  // Compute CDFLog and its gradients
+
62  using std::atan;
+
63  using stan::math::pi;
+
64  using std::log;
+
65 
+
66  // Compute vectorized CDF and gradient
+
67  for (size_t n = 0; n < N; n++) {
+
68  // Pull out values
+
69  const T_partials_return y_dbl = value_of(y_vec[n]);
+
70  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
71  const T_partials_return sigma_inv_dbl = 1.0 / value_of(sigma_vec[n]);
+
72  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
73 
+
74  const T_partials_return z = (y_dbl - mu_dbl) * sigma_inv_dbl;
+
75 
+
76  // Compute
+
77  const T_partials_return Pn = atan(z) / pi() + 0.5;
+
78  cdf_log += log(Pn);
+
79 
+
80  const T_partials_return rep_deriv
+
81  = 1.0 / (pi() * Pn * (z * z * sigma_dbl + sigma_dbl));
+ +
83  operands_and_partials.d_x1[n] += rep_deriv;
+ +
85  operands_and_partials.d_x2[n] -= rep_deriv;
+ +
87  operands_and_partials.d_x3[n] -= rep_deriv * z;
+
88  }
+
89  return operands_and_partials.to_var(cdf_log, y, mu, sigma);
+
90  }
+
91 
+
92  }
+
93 }
+
94 #endif
+ +
return_type< T_y, T_loc, T_scale >::type cauchy_cdf_log(const T_y &y, const T_loc &mu, const T_scale &sigma)
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
fvar< T > atan(const fvar< T > &x)
Definition: atan.hpp:12
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
double pi()
Return the value of pi.
Definition: constants.hpp:86
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cauchy__log_8hpp.html b/doc/api/html/cauchy__log_8hpp.html new file mode 100644 index 00000000000..d168576a12a --- /dev/null +++ b/doc/api/html/cauchy__log_8hpp.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/cauchy_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
cauchy_log.hpp File Reference
+
+
+
#include <boost/random/cauchy_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/square.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/fun/log1p.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/meta/VectorBuilder.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::cauchy_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 The log of the Cauchy density for the specified scalar(s) given the specified location parameter(s) and scale parameter(s). More...
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::cauchy_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cauchy__log_8hpp_source.html b/doc/api/html/cauchy__log_8hpp_source.html new file mode 100644 index 00000000000..5c9c4e94930 --- /dev/null +++ b/doc/api/html/cauchy__log_8hpp_source.html @@ -0,0 +1,277 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/cauchy_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
cauchy_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_CAUCHY_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_CAUCHY_LOG_HPP
+
3 
+
4 #include <boost/random/cauchy_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + +
17 #include <cmath>
+
18 
+
19 namespace stan {
+
20 
+
21  namespace math {
+
22 
+
40  template <bool propto,
+
41  typename T_y, typename T_loc, typename T_scale>
+
42  typename return_type<T_y, T_loc, T_scale>::type
+
43  cauchy_log(const T_y& y, const T_loc& mu, const T_scale& sigma) {
+
44  static const char* function("stan::math::cauchy_log");
+ +
46  T_partials_return;
+
47 
+ + + + + + +
54 
+
55  // check if any vectors are zero length
+
56  if (!(stan::length(y)
+
57  && stan::length(mu)
+
58  && stan::length(sigma)))
+
59  return 0.0;
+
60 
+
61  // set up return value accumulator
+
62  T_partials_return logp(0.0);
+
63 
+
64  // validate args (here done over var, which should be OK)
+
65  check_not_nan(function, "Random variable", y);
+
66  check_finite(function, "Location parameter", mu);
+
67  check_positive_finite(function, "Scale parameter", sigma);
+
68  check_consistent_sizes(function,
+
69  "Random variable", y,
+
70  "Location parameter", mu,
+
71  "Scale parameter", sigma);
+
72 
+
73  // check if no variables are involved and prop-to
+ +
75  return 0.0;
+
76 
+
77  using stan::math::log1p;
+
78  using stan::math::square;
+
79  using std::log;
+
80 
+
81  // set up template expressions wrapping scalars into vector views
+
82  VectorView<const T_y> y_vec(y);
+
83  VectorView<const T_loc> mu_vec(mu);
+
84  VectorView<const T_scale> sigma_vec(sigma);
+
85  size_t N = max_size(y, mu, sigma);
+
86 
+ +
88  VectorBuilder<true, T_partials_return,
+
89  T_scale> sigma_squared(length(sigma));
+ +
91  T_partials_return, T_scale> log_sigma(length(sigma));
+
92  for (size_t i = 0; i < length(sigma); i++) {
+
93  const T_partials_return sigma_dbl = value_of(sigma_vec[i]);
+
94  inv_sigma[i] = 1.0 / sigma_dbl;
+
95  sigma_squared[i] = sigma_dbl * sigma_dbl;
+ +
97  log_sigma[i] = log(sigma_dbl);
+
98  }
+
99  }
+
100 
+ +
102  operands_and_partials(y, mu, sigma);
+
103 
+
104  for (size_t n = 0; n < N; n++) {
+
105  // pull out values of arguments
+
106  const T_partials_return y_dbl = value_of(y_vec[n]);
+
107  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
108 
+
109  // reusable subexpression values
+
110  const T_partials_return y_minus_mu
+
111  = y_dbl - mu_dbl;
+
112  const T_partials_return y_minus_mu_squared
+
113  = y_minus_mu * y_minus_mu;
+
114  const T_partials_return y_minus_mu_over_sigma
+
115  = y_minus_mu * inv_sigma[n];
+
116  const T_partials_return y_minus_mu_over_sigma_squared
+
117  = y_minus_mu_over_sigma * y_minus_mu_over_sigma;
+
118 
+
119  // log probability
+ +
121  logp += NEG_LOG_PI;
+ +
123  logp -= log_sigma[n];
+ +
125  logp -= log1p(y_minus_mu_over_sigma_squared);
+
126 
+
127  // gradients
+ +
129  operands_and_partials.d_x1[n] -= 2 * y_minus_mu
+
130  / (sigma_squared[n] + y_minus_mu_squared);
+ +
132  operands_and_partials.d_x2[n] += 2 * y_minus_mu
+
133  / (sigma_squared[n] + y_minus_mu_squared);
+ +
135  operands_and_partials.d_x3[n]
+
136  += (y_minus_mu_squared - sigma_squared[n])
+
137  * inv_sigma[n] / (sigma_squared[n] + y_minus_mu_squared);
+
138  }
+
139  return operands_and_partials.to_var(logp, y, mu, sigma);
+
140  }
+
141 
+
142  template <typename T_y, typename T_loc, typename T_scale>
+
143  inline
+ +
145  cauchy_log(const T_y& y, const T_loc& mu, const T_scale& sigma) {
+
146  return cauchy_log<false>(y, mu, sigma);
+
147  }
+
148 
+
149 
+
150  }
+
151 }
+
152 #endif
+ +
const double NEG_LOG_PI
Definition: constants.hpp:186
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
return_type< T_y, T_loc, T_scale >::type cauchy_log(const T_y &y, const T_loc &mu, const T_scale &sigma)
The log of the Cauchy density for the specified scalar(s) given the specified location parameter(s) a...
Definition: cauchy_log.hpp:43
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
fvar< T > log1p(const fvar< T > &x)
Definition: log1p.hpp:16
+ + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cauchy__rng_8hpp.html b/doc/api/html/cauchy__rng_8hpp.html new file mode 100644 index 00000000000..a379a2e3a0b --- /dev/null +++ b/doc/api/html/cauchy__rng_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/cauchy_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
cauchy_rng.hpp File Reference
+
+
+
#include <boost/random/cauchy_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/log1p.hpp>
+#include <stan/math/prim/scal/fun/square.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
double stan::math::cauchy_rng (const double mu, const double sigma, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cauchy__rng_8hpp_source.html b/doc/api/html/cauchy__rng_8hpp_source.html new file mode 100644 index 00000000000..b579e985296 --- /dev/null +++ b/doc/api/html/cauchy__rng_8hpp_source.html @@ -0,0 +1,164 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/cauchy_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
cauchy_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_CAUCHY_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_CAUCHY_RNG_HPP
+
3 
+
4 #include <boost/random/cauchy_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + +
16 
+
17 namespace stan {
+
18 
+
19  namespace math {
+
20 
+
21  template <class RNG>
+
22  inline double
+
23  cauchy_rng(const double mu,
+
24  const double sigma,
+
25  RNG& rng) {
+
26  using boost::variate_generator;
+
27  using boost::random::cauchy_distribution;
+
28 
+
29  static const char* function("stan::math::cauchy_rng");
+
30 
+ + +
33 
+
34  check_finite(function, "Location parameter", mu);
+
35  check_positive_finite(function, "Scale parameter", sigma);
+
36 
+
37  variate_generator<RNG&, cauchy_distribution<> >
+
38  cauchy_rng(rng, cauchy_distribution<>(mu, sigma));
+
39  return cauchy_rng();
+
40  }
+
41  }
+
42 }
+
43 #endif
+ + + + +
double cauchy_rng(const double mu, const double sigma, RNG &rng)
Definition: cauchy_rng.hpp:23
+ +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + + + + +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/chainable_8hpp.html b/doc/api/html/chainable_8hpp.html new file mode 100644 index 00000000000..41b5049d2fe --- /dev/null +++ b/doc/api/html/chainable_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/core/chainable.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Classes | +Namespaces
+
+
chainable.hpp File Reference
+
+
+
#include <stan/math/rev/core/chainablestack.hpp>
+#include <cstddef>
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  stan::math::chainable
 Abstract base class for variable implementations that handles memory management and applying the chain rule. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/chainable_8hpp_source.html b/doc/api/html/chainable_8hpp_source.html new file mode 100644 index 00000000000..8bc6acc0f48 --- /dev/null +++ b/doc/api/html/chainable_8hpp_source.html @@ -0,0 +1,157 @@ + + + + + + +Stan Math Library: stan/math/rev/core/chainable.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
chainable.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_CHAINABLE_HPP
+
2 #define STAN_MATH_REV_CORE_CHAINABLE_HPP
+
3 
+ +
5 #include <cstddef>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
14  class chainable {
+
15  public:
+
20  chainable() { }
+
21 
+
26  virtual ~chainable() {
+
27  // handled automatically
+
28  }
+
29 
+
35  virtual void chain() {
+
36  }
+
37 
+
42  virtual void init_dependent() {
+
43  }
+
44 
+
49  virtual void set_zero_adjoint() {
+
50  }
+
51 
+
61  static inline void* operator new(size_t nbytes) {
+
62  return ChainableStack::memalloc_.alloc(nbytes);
+
63  }
+
64 
+
75  static inline void operator delete(void* /* ignore arg */) {
+
76  /* no op */
+
77  }
+
78  };
+
79 
+
80 
+
81 
+
82  }
+
83 }
+
84 #endif
+
chainable()
Construct a chainable object.
Definition: chainable.hpp:20
+
Abstract base class for variable implementations that handles memory management and applying the chai...
Definition: chainable.hpp:14
+ +
virtual void set_zero_adjoint()
Set the value of the adjoint for this chainable to its initial value.
Definition: chainable.hpp:49
+
virtual void init_dependent()
Initialize this chainable's adjoint value to make it the dependent variable in a gradient calculation...
Definition: chainable.hpp:42
+ +
virtual ~chainable()
Chainables are not destructible and should go on the function call stack or be allocated with operato...
Definition: chainable.hpp:26
+
void * alloc(size_t len)
Return a newly allocated block of memory of the appropriate size managed by the stack allocator...
+
virtual void chain()
Apply the chain rule to this variable based on the variables on which it depends. ...
Definition: chainable.hpp:35
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/chainable__alloc_8hpp.html b/doc/api/html/chainable__alloc_8hpp.html new file mode 100644 index 00000000000..87237e74001 --- /dev/null +++ b/doc/api/html/chainable__alloc_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/core/chainable_alloc.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Classes | +Namespaces
+
+
chainable_alloc.hpp File Reference
+
+
+
#include <stan/math/rev/core/chainablestack.hpp>
+#include <stdexcept>
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  stan::math::chainable_alloc
 A chainable_alloc is an object which is constructed and destructed normally but the memory lifespan is managed along with the arena allocator for the gradient calculation. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/chainable__alloc_8hpp_source.html b/doc/api/html/chainable__alloc_8hpp_source.html new file mode 100644 index 00000000000..261bfb07943 --- /dev/null +++ b/doc/api/html/chainable__alloc_8hpp_source.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/rev/core/chainable_alloc.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
chainable_alloc.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_CHAINABLE_ALLOC_HPP
+
2 #define STAN_MATH_REV_CORE_CHAINABLE_ALLOC_HPP
+
3 
+ +
5 #include <stdexcept>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10 
+ +
18  public:
+ +
20  ChainableStack::var_alloc_stack_.push_back(this);
+
21  }
+
22  virtual ~chainable_alloc() { }
+
23  };
+
24 
+
25  }
+
26 }
+
27 #endif
+
static std::vector< ChainableAllocT * > var_alloc_stack_
+ + +
A chainable_alloc is an object which is constructed and destructed normally but the memory lifespan i...
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/chainablestack_8hpp.html b/doc/api/html/chainablestack_8hpp.html new file mode 100644 index 00000000000..924c271b22e --- /dev/null +++ b/doc/api/html/chainablestack_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/rev/core/chainablestack.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Typedefs
+
+
chainablestack.hpp File Reference
+
+
+
#include <stan/math/rev/core/autodiffstackstorage.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + +

+Typedefs

typedef AutodiffStackStorage
+< chainable, chainable_alloc > 
stan::math::ChainableStack
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/chainablestack_8hpp_source.html b/doc/api/html/chainablestack_8hpp_source.html new file mode 100644 index 00000000000..4e64ae5ab2c --- /dev/null +++ b/doc/api/html/chainablestack_8hpp_source.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/rev/core/chainablestack.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
chainablestack.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_CHAINABLESTACK_HPP
+
2 #define STAN_MATH_REV_CORE_CHAINABLESTACK_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
9  // forward declaration of chainable
+
10  class chainable;
+ +
12 
+ +
14 
+
15  }
+
16 }
+
17 #endif
+
AutodiffStackStorage< chainable, chainable_alloc > ChainableStack
+ +
A chainable_alloc is an object which is constructed and destructed normally but the memory lifespan i...
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__bounded_8hpp.html b/doc/api/html/check__bounded_8hpp.html new file mode 100644 index 00000000000..ff97b9714a4 --- /dev/null +++ b/doc/api/html/check__bounded_8hpp.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_bounded.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Classes | +Namespaces | +Functions
+
+
check_bounded.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/domain_error.hpp>
+#include <stan/math/prim/scal/err/domain_error_vec.hpp>
+#include <stan/math/prim/scal/meta/max_size.hpp>
+#include <stan/math/prim/scal/meta/VectorView.hpp>
+#include <string>
+
+

Go to the source code of this file.

+ + + + + + +

+Classes

struct  stan::math::detail::bounded< T_y, T_low, T_high, y_is_vec >
 
struct  stan::math::detail::bounded< T_y, T_low, T_high, true >
 
+ + + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
 stan::math::detail
 
+ + + + + +

+Functions

template<typename T_y , typename T_low , typename T_high >
bool stan::math::check_bounded (const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)
 Return true if the value is between the low and high values, inclusively. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__bounded_8hpp_source.html b/doc/api/html/check__bounded_8hpp_source.html new file mode 100644 index 00000000000..7bfba1bc656 --- /dev/null +++ b/doc/api/html/check__bounded_8hpp_source.html @@ -0,0 +1,211 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_bounded.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_bounded.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_ERR_CHECK_BOUNDED_HPP
+
2 #define STAN_MATH_PRIM_SCAL_ERR_CHECK_BOUNDED_HPP
+
3 
+ + + + +
8 #include <string>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
13  namespace detail {
+
14 
+
15  // implemented using structs because there is no partial specialization
+
16  // for templated functions
+
17  //
+
18  // default implementation works for scalar T_y. T_low and T_high can
+
19  // be either scalar or vector
+
20  //
+
21  // throws if y, low, or high is nan
+
22  template <typename T_y, typename T_low, typename T_high,
+
23  bool y_is_vec>
+
24  struct bounded {
+
25  static bool check(const char* function,
+
26  const char* name,
+
27  const T_y& y,
+
28  const T_low& low,
+
29  const T_high& high) {
+
30  using stan::max_size;
+
31 
+
32  VectorView<const T_low> low_vec(low);
+
33  VectorView<const T_high> high_vec(high);
+
34  for (size_t n = 0; n < max_size(low, high); n++) {
+
35  if (!(low_vec[n] <= y && y <= high_vec[n])) {
+
36  std::stringstream msg;
+
37  msg << ", but must be between ";
+
38  msg << "(" << low_vec[n] << ", " << high_vec[n] << ")";
+
39  std::string msg_str(msg.str());
+
40  domain_error(function, name, y,
+
41  "is ", msg_str.c_str());
+
42  }
+
43  }
+
44  return true;
+
45  }
+
46  };
+
47 
+
48  template <typename T_y, typename T_low, typename T_high>
+
49  struct bounded<T_y, T_low, T_high, true> {
+
50  static bool check(const char* function,
+
51  const char* name,
+
52  const T_y& y,
+
53  const T_low& low,
+
54  const T_high& high) {
+
55  using stan::length;
+
56  using stan::get;
+
57 
+
58  VectorView<const T_low> low_vec(low);
+
59  VectorView<const T_high> high_vec(high);
+
60  for (size_t n = 0; n < length(y); n++) {
+
61  if (!(low_vec[n] <= get(y, n) && get(y, n) <= high_vec[n])) {
+
62  std::stringstream msg;
+
63  msg << ", but must be between ";
+
64  msg << "(" << low_vec[n] << ", " << high_vec[n] << ")";
+
65  std::string msg_str(msg.str());
+
66  domain_error_vec(function, name, y, n,
+
67  "is ", msg_str.c_str());
+
68  }
+
69  }
+
70  return true;
+
71  }
+
72  };
+
73  }
+
74 
+
94  template <typename T_y, typename T_low, typename T_high>
+
95  inline bool check_bounded(const char* function,
+
96  const char* name,
+
97  const T_y& y,
+
98  const T_low& low,
+
99  const T_high& high) {
+
100  return detail::bounded<T_y, T_low, T_high,
+ +
102  ::check(function, name, y, low, high);
+
103  }
+
104 
+
105  }
+
106 }
+
107 #endif
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
bool check_bounded(const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)
Return true if the value is between the low and high values, inclusively.
+
static bool check(const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)
+ + +
static bool check(const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)
+
void domain_error_vec(const char *function, const char *name, const T &y, const size_t i, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+
T get(const std::vector< T > &x, size_t n)
Definition: get.hpp:10
+
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__cholesky__factor_8hpp.html b/doc/api/html/check__cholesky__factor_8hpp.html new file mode 100644 index 00000000000..1fca7b829ff --- /dev/null +++ b/doc/api/html/check__cholesky__factor_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_cholesky_factor.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_cholesky_factor.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/scal/err/check_positive.hpp>
+#include <stan/math/prim/scal/err/check_less_or_equal.hpp>
+#include <stan/math/prim/mat/err/check_lower_triangular.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y >
bool stan::math::check_cholesky_factor (const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
 Return true if the specified matrix is a valid Cholesky factor. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__cholesky__factor_8hpp_source.html b/doc/api/html/check__cholesky__factor_8hpp_source.html new file mode 100644 index 00000000000..54ecaa307e9 --- /dev/null +++ b/doc/api/html/check__cholesky__factor_8hpp_source.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_cholesky_factor.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_cholesky_factor.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_CHOLESKY_FACTOR_HPP
+
2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_CHOLESKY_FACTOR_HPP
+
3 
+ + + + +
8 
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12  using Eigen::Dynamic;
+
34  template <typename T_y>
+
35  inline bool
+
36  check_cholesky_factor(const char* function,
+
37  const char* name,
+
38  const Eigen::Matrix<T_y, Dynamic, Dynamic>& y) {
+
39  check_less_or_equal(function, "columns and rows of Cholesky factor",
+
40  y.cols(), y.rows());
+
41  check_positive(function, "columns of Cholesky factor", y.cols());
+
42  check_lower_triangular(function, name, y);
+
43  for (int i = 0; i < y.cols(); ++i)
+
44  // FIXME: should report row
+
45  check_positive(function, name, y(i, i));
+
46  return true;
+
47  }
+
48 
+
49  }
+
50 }
+
51 #endif
+ + + +
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ +
bool check_less_or_equal(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is less or equal to high.
+
bool check_lower_triangular(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is lower triangular.
+
bool check_cholesky_factor(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is a valid Cholesky factor.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__cholesky__factor__corr_8hpp.html b/doc/api/html/check__cholesky__factor__corr_8hpp.html new file mode 100644 index 00000000000..7f9510275de --- /dev/null +++ b/doc/api/html/check__cholesky__factor__corr_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_cholesky_factor_corr.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_cholesky_factor_corr.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/scal/err/check_positive.hpp>
+#include <stan/math/prim/mat/err/check_lower_triangular.hpp>
+#include <stan/math/prim/mat/err/check_square.hpp>
+#include <stan/math/prim/mat/err/constraint_tolerance.hpp>
+#include <stan/math/prim/mat/err/check_unit_vector.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y >
bool stan::math::check_cholesky_factor_corr (const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
 Return true if the specified matrix is a valid Cholesky factor of a correlation matrix. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__cholesky__factor__corr_8hpp_source.html b/doc/api/html/check__cholesky__factor__corr_8hpp_source.html new file mode 100644 index 00000000000..90731215157 --- /dev/null +++ b/doc/api/html/check__cholesky__factor__corr_8hpp_source.html @@ -0,0 +1,153 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_cholesky_factor_corr.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_cholesky_factor_corr.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_CHOLESKY_FACTOR_CORR_HPP
+
2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_CHOLESKY_FACTOR_CORR_HPP
+
3 
+ + + + + + +
10 
+
11 namespace stan {
+
12 
+
13  namespace math {
+
14  using Eigen::Dynamic;
+
38  template <typename T_y>
+
39  bool
+
40  check_cholesky_factor_corr(const char* function,
+
41  const char* name,
+
42  const Eigen::Matrix<T_y, Dynamic, Dynamic>& y) {
+
43  check_square(function, name, y);
+
44  check_lower_triangular(function, name, y);
+
45  for (int i = 0; i < y.rows(); ++i)
+
46  check_positive(function, name, y(i, i));
+
47  for (int i = 0; i < y.rows(); ++i) {
+
48  Eigen::Matrix<T_y, Dynamic, 1>
+
49  y_i = y.row(i).transpose();
+
50  check_unit_vector(function, name, y_i);
+
51  }
+
52  return true;
+
53  }
+
54 
+
55  }
+
56 }
+
57 #endif
+ + + +
bool check_unit_vector(const char *function, const char *name, const Eigen::Matrix< T_prob, Dynamic, 1 > &theta)
Return true if the specified vector is unit vector.
+ +
bool check_cholesky_factor_corr(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is a valid Cholesky factor of a correlation matrix.
+
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ +
bool check_lower_triangular(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is lower triangular.
+
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__column__index_8hpp.html b/doc/api/html/check__column__index_8hpp.html new file mode 100644 index 00000000000..0fc9a3c7d09 --- /dev/null +++ b/doc/api/html/check__column__index_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_column_index.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_column_index.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/out_of_range.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/scal/meta/error_index.hpp>
+#include <sstream>
+#include <string>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y , int R, int C>
bool stan::math::check_column_index (const char *function, const char *name, const Eigen::Matrix< T_y, R, C > &y, const size_t i)
 Return true if the specified index is a valid column of the matrix. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__column__index_8hpp_source.html b/doc/api/html/check__column__index_8hpp_source.html new file mode 100644 index 00000000000..168b2cb2b6b --- /dev/null +++ b/doc/api/html/check__column__index_8hpp_source.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_column_index.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_column_index.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_COLUMN_INDEX_HPP
+
2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_COLUMN_INDEX_HPP
+
3 
+ + + +
7 #include <sstream>
+
8 #include <string>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
36  template <typename T_y, int R, int C>
+
37  inline bool check_column_index(const char* function,
+
38  const char* name,
+
39  const Eigen::Matrix<T_y, R, C>& y,
+
40  const size_t i) {
+ +
42  && i < static_cast<size_t>(y.cols()) + stan::error_index::value)
+
43  return true;
+
44 
+
45  std::stringstream msg;
+
46  msg << " for columns of " << name;
+
47  std::string msg_str(msg.str());
+
48  out_of_range(function,
+
49  y.cols(),
+
50  i,
+
51  msg_str.c_str());
+
52  return false;
+
53  }
+
54 
+
55  }
+
56 }
+
57 #endif
+ + +
void out_of_range(const char *function, const int max, const int index, const char *msg1="", const char *msg2="")
Throw an out_of_range exception with a consistently formatted message.
+ +
bool check_column_index(const char *function, const char *name, const Eigen::Matrix< T_y, R, C > &y, const size_t i)
Return true if the specified index is a valid column of the matrix.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__consistent__size_8hpp.html b/doc/api/html/check__consistent__size_8hpp.html new file mode 100644 index 00000000000..6fe299ce82b --- /dev/null +++ b/doc/api/html/check__consistent__size_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_consistent_size.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_consistent_size.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/invalid_argument.hpp>
+#include <stan/math/prim/scal/meta/size_of.hpp>
+#include <sstream>
+#include <string>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
bool stan::math::check_consistent_size (const char *function, const char *name, const T &x, size_t expected_size)
 Return true if the dimension of x is consistent, which is defined to be expected_size if x is a vector or 1 if x is not a vector. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__consistent__size_8hpp_source.html b/doc/api/html/check__consistent__size_8hpp_source.html new file mode 100644 index 00000000000..4feff75ee1d --- /dev/null +++ b/doc/api/html/check__consistent__size_8hpp_source.html @@ -0,0 +1,153 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_consistent_size.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_consistent_size.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_ERR_CHECK_CONSISTENT_SIZE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_ERR_CHECK_CONSISTENT_SIZE_HPP
+
3 
+ + +
6 #include <sstream>
+
7 #include <string>
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
28  template <typename T>
+
29  inline bool check_consistent_size(const char* function,
+
30  const char* name,
+
31  const T& x,
+
32  size_t expected_size) {
+ +
34  return true;
+
35  if (is_vector<T>::value && expected_size == stan::size_of(x))
+
36  return true;
+
37 
+
38  std::stringstream msg;
+
39  msg << ", expecting dimension = "
+
40  << expected_size
+
41  << "; a function was called with arguments of different "
+
42  << "scalar, array, vector, or matrix types, and they were not "
+
43  << "consistently sized; all arguments must be scalars or "
+
44  << "multidimensional values of the same shape.";
+
45  std::string msg_str(msg.str());
+
46 
+
47  invalid_argument(function, name, stan::size_of(x),
+
48  "has dimension = ",
+
49  msg_str.c_str());
+
50  return false;
+
51  }
+
52 
+
53  }
+
54 }
+
55 #endif
+ + + +
bool check_consistent_size(const char *function, const char *name, const T &x, size_t expected_size)
Return true if the dimension of x is consistent, which is defined to be expected_size if x is a vecto...
+
size_t size_of(const T &x)
Definition: size_of.hpp:27
+
void invalid_argument(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw an invalid_argument exception with a consistently formatted message.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__consistent__sizes_8hpp.html b/doc/api/html/check__consistent__sizes_8hpp.html new file mode 100644 index 00000000000..502b0353cdf --- /dev/null +++ b/doc/api/html/check__consistent__sizes_8hpp.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_consistent_sizes.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_consistent_sizes.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/check_consistent_size.hpp>
+#include <algorithm>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + + + + +

+Functions

template<typename T1 , typename T2 >
bool stan::math::check_consistent_sizes (const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
 Return true if the dimension of x1 is consistent with x2. More...
 
template<typename T1 , typename T2 , typename T3 >
bool stan::math::check_consistent_sizes (const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2, const char *name3, const T3 &x3)
 Return true if the dimension of x1, x2, and x3 are consistent. More...
 
template<typename T1 , typename T2 , typename T3 , typename T4 >
bool stan::math::check_consistent_sizes (const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2, const char *name3, const T3 &x3, const char *name4, const T4 &x4)
 Return true if the dimension of x1, x2, x3, and x4 are consistent. More...
 
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
bool stan::math::check_consistent_sizes (const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2, const char *name3, const T3 &x3, const char *name4, const T4 &x4, const char *name5, const T5 &x5)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__consistent__sizes_8hpp_source.html b/doc/api/html/check__consistent__sizes_8hpp_source.html new file mode 100644 index 00000000000..92c6356d20c --- /dev/null +++ b/doc/api/html/check__consistent__sizes_8hpp_source.html @@ -0,0 +1,202 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_consistent_sizes.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_consistent_sizes.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_ERR_CHECK_CONSISTENT_SIZES_HPP
+
2 #define STAN_MATH_PRIM_SCAL_ERR_CHECK_CONSISTENT_SIZES_HPP
+
3 
+ +
5 
+
6 #include <algorithm>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
30  template <typename T1, typename T2>
+
31  inline bool check_consistent_sizes(const char* function,
+
32  const char* name1,
+
33  const T1& x1,
+
34  const char* name2,
+
35  const T2& x2) {
+
36  using stan::is_vector;
+ + +
39  return check_consistent_size(function, name1, x1, max_size)
+
40  && check_consistent_size(function, name2, x2, max_size);
+
41  }
+
42 
+
65  template <typename T1, typename T2, typename T3>
+
66  inline bool check_consistent_sizes(const char* function,
+
67  const char* name1,
+
68  const T1& x1,
+
69  const char* name2,
+
70  const T2& x2,
+
71  const char* name3,
+
72  const T3& x3) {
+ + + +
76  return check_consistent_size(function, name1, x1, max_size)
+
77  && check_consistent_size(function, name2, x2, max_size)
+
78  && check_consistent_size(function, name3, x3, max_size);
+
79  }
+
80 
+
106  template <typename T1, typename T2, typename T3, typename T4>
+
107  inline bool check_consistent_sizes(const char* function,
+
108  const char* name1,
+
109  const T1& x1,
+
110  const char* name2,
+
111  const T2& x2,
+
112  const char* name3,
+
113  const T3& x3,
+
114  const char* name4,
+
115  const T4& x4) {
+
116  size_t max_size
+ + + +
120  is_vector<T4>::value * size_of(x4))));
+
121  return check_consistent_size(function, name1, x1, max_size)
+
122  && check_consistent_size(function, name2, x2, max_size)
+
123  && check_consistent_size(function, name3, x3, max_size)
+
124  && check_consistent_size(function, name4, x4, max_size);
+
125  }
+
126  template <typename T1, typename T2, typename T3, typename T4,
+
127  typename T5>
+
128  inline bool check_consistent_sizes(const char* function,
+
129  const char* name1,
+
130  const T1& x1,
+
131  const char* name2,
+
132  const T2& x2,
+
133  const char* name3,
+
134  const T3& x3,
+
135  const char* name4,
+
136  const T4& x4,
+
137  const char* name5,
+
138  const T5& x5) {
+
139  size_t max_size = std::max(size_of(x1),
+
140  std::max(size_of(x2),
+
141  std::max(size_of(x3),
+
142  std::max(size_of(x4),
+
143  size_of(x5)))));
+
144  return check_consistent_size(function, name1, x1, max_size)
+
145  && check_consistent_size(function, name2, x2, max_size)
+
146  && check_consistent_size(function, name3, x3, max_size)
+
147  && check_consistent_size(function, name4, x4, max_size)
+
148  && check_consistent_size(function, name5, x5, max_size);
+
149  }
+
150 
+
151  }
+
152 }
+
153 #endif
+ + +
bool check_consistent_size(const char *function, const char *name, const T &x, size_t expected_size)
Return true if the dimension of x is consistent, which is defined to be expected_size if x is a vecto...
+
size_t size_of(const T &x)
Definition: size_of.hpp:27
+
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+
int max(const std::vector< int > &x)
Returns the maximum coefficient in the specified column vector.
Definition: max.hpp:21
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__corr__matrix_8hpp.html b/doc/api/html/check__corr__matrix_8hpp.html new file mode 100644 index 00000000000..6a54cdd6d0f --- /dev/null +++ b/doc/api/html/check__corr__matrix_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_corr_matrix.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_corr_matrix.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/domain_error.hpp>
+#include <stan/math/prim/scal/err/check_positive_size.hpp>
+#include <stan/math/prim/mat/err/check_pos_definite.hpp>
+#include <stan/math/prim/mat/err/check_symmetric.hpp>
+#include <stan/math/prim/scal/err/check_size_match.hpp>
+#include <stan/math/prim/mat/err/constraint_tolerance.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/meta/index_type.hpp>
+#include <stan/math/prim/scal/meta/error_index.hpp>
+#include <sstream>
+#include <string>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y >
bool stan::math::check_corr_matrix (const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
 Return true if the specified matrix is a valid correlation matrix. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__corr__matrix_8hpp_source.html b/doc/api/html/check__corr__matrix_8hpp_source.html new file mode 100644 index 00000000000..60995fafcb4 --- /dev/null +++ b/doc/api/html/check__corr__matrix_8hpp_source.html @@ -0,0 +1,183 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_corr_matrix.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_corr_matrix.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_CORR_MATRIX_HPP
+
2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_CORR_MATRIX_HPP
+
3 
+ + + + + + + + + +
13 #include <sstream>
+
14 #include <string>
+
15 
+
16 namespace stan {
+
17 
+
18  namespace math {
+
19  using Eigen::Dynamic;
+
44  template <typename T_y>
+
45  inline bool
+
46  check_corr_matrix(const char* function,
+
47  const char* name,
+
48  const Eigen::Matrix<T_y, Dynamic, Dynamic>& y) {
+
49  using Eigen::Matrix;
+ +
51 
+
52  typedef typename index_type<Matrix<T_y, Dynamic, Dynamic> >::type size_t;
+
53 
+
54  check_size_match(function,
+
55  "Rows of correlation matrix", y.rows(),
+
56  "columns of correlation matrix", y.cols());
+
57  check_positive_size(function, name, "rows", y.rows());
+
58  check_symmetric(function, "y", y);
+
59 
+
60  for (size_t k = 0; k < y.rows(); ++k) {
+
61  if (!(fabs(y(k, k) - 1.0) <= CONSTRAINT_TOLERANCE)) {
+
62  std::ostringstream msg;
+
63  msg << "is not a valid correlation matrix. "
+
64  << name << "(" << stan::error_index::value + k
+
65  << "," << stan::error_index::value + k
+
66  << ") is ";
+
67  std::string msg_str(msg.str());
+
68  domain_error(function, name, y(k, k),
+
69  msg_str.c_str(),
+
70  ", but should be near 1.0");
+
71  return false;
+
72  }
+
73  }
+
74  stan::math::check_pos_definite(function, "y", y);
+
75  return true;
+
76  }
+
77 
+
78  }
+
79 }
+
80 #endif
+
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:14
+ +
bool check_positive_size(const char *function, const char *name, const char *expr, const int size)
Return true if size is positive.
+
bool check_symmetric(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is symmetric.
+ + +
const double CONSTRAINT_TOLERANCE
The tolerance for checking arithmetic bounds In rank and in simplexes.
+
bool check_pos_definite(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified square, symmetric matrix is positive definite.
+
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:19
+ + +
bool check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Return true if the provided sizes match.
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ + + + + +
bool check_corr_matrix(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is a valid correlation matrix.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__cov__matrix_8hpp.html b/doc/api/html/check__cov__matrix_8hpp.html new file mode 100644 index 00000000000..6b1ae365f5d --- /dev/null +++ b/doc/api/html/check__cov__matrix_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_cov_matrix.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_cov_matrix.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/err/check_pos_definite.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y >
bool stan::math::check_cov_matrix (const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
 Return true if the specified matrix is a valid covariance matrix. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__cov__matrix_8hpp_source.html b/doc/api/html/check__cov__matrix_8hpp_source.html new file mode 100644 index 00000000000..f1e1565f0f2 --- /dev/null +++ b/doc/api/html/check__cov__matrix_8hpp_source.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_cov_matrix.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_cov_matrix.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_COV_MATRIX_HPP
+
2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_COV_MATRIX_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8  namespace math {
+
9  using Eigen::Dynamic;
+
30  template <typename T_y>
+
31  inline bool
+
32  check_cov_matrix(const char* function,
+
33  const char* name,
+
34  const Eigen::Matrix<T_y, Dynamic, Dynamic>& y) {
+
35  check_pos_definite(function, name, y);
+
36  return true;
+
37  }
+
38 
+
39  }
+
40 }
+
41 #endif
+
bool check_cov_matrix(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is a valid covariance matrix.
+
bool check_pos_definite(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified square, symmetric matrix is positive definite.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__equal_8hpp.html b/doc/api/html/check__equal_8hpp.html new file mode 100644 index 00000000000..f8d062ca277 --- /dev/null +++ b/doc/api/html/check__equal_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_equal.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_equal.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/domain_error.hpp>
+#include <stan/math/prim/scal/err/domain_error_vec.hpp>
+#include <stan/math/prim/scal/meta/VectorView.hpp>
+#include <stan/math/prim/scal/meta/length.hpp>
+#include <stan/math/prim/scal/meta/get.hpp>
+#include <string>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y , typename T_eq >
bool stan::math::check_equal (const char *function, const char *name, const T_y &y, const T_eq &eq)
 Return true if y is equal to eq. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__equal_8hpp_source.html b/doc/api/html/check__equal_8hpp_source.html new file mode 100644 index 00000000000..f885583f9c4 --- /dev/null +++ b/doc/api/html/check__equal_8hpp_source.html @@ -0,0 +1,194 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_equal.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_equal.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_ERR_CHECK_EQUAL_HPP
+
2 #define STAN_MATH_PRIM_SCAL_ERR_CHECK_EQUAL_HPP
+
3 
+ + + + + +
9 #include <string>
+
10 
+
11 namespace stan {
+
12  namespace math {
+
13 
+
14  namespace {
+
15  template <typename T_y,
+
16  typename T_eq,
+
17  bool is_vec>
+
18  struct equal {
+
19  static bool check(const char* function,
+
20  const char* name,
+
21  const T_y& y,
+
22  const T_eq& eq) {
+
23  using stan::length;
+
24  VectorView<const T_eq> eq_vec(eq);
+
25  for (size_t n = 0; n < length(eq); n++) {
+
26  if (!(y == eq_vec[n])) {
+
27  std::stringstream msg;
+
28  msg << ", but must be equal to ";
+
29  msg << eq_vec[n];
+
30  std::string msg_str(msg.str());
+
31 
+
32  domain_error(function, name, y,
+
33  "is ", msg_str.c_str());
+
34  }
+
35  }
+
36  return true;
+
37  }
+
38  };
+
39 
+
40  // throws if y or eq is nan
+
41  template <typename T_y,
+
42  typename T_eq>
+
43  struct equal<T_y, T_eq, true> {
+
44  static bool check(const char* function,
+
45  const char* name,
+
46  const T_y& y,
+
47  const T_eq& eq) {
+
48  using stan::length;
+
49  using stan::get;
+
50  VectorView<const T_eq> eq_vec(eq);
+
51  for (size_t n = 0; n < length(y); n++) {
+
52  if (!(get(y, n) == eq_vec[n])) {
+
53  std::stringstream msg;
+
54  msg << ", but must be equal to ";
+
55  msg << eq_vec[n];
+
56  std::string msg_str(msg.str());
+
57  domain_error_vec(function, name, y, n,
+
58  "is ", msg_str.c_str());
+
59  }
+
60  }
+
61  return true;
+
62  }
+
63  };
+
64  }
+
65 
+
89  template <typename T_y, typename T_eq>
+
90  inline bool check_equal(const char* function,
+
91  const char* name,
+
92  const T_y& y,
+
93  const T_eq& eq) {
+
94  return equal<T_y, T_eq, is_vector_like<T_y>::value>
+
95  ::check(function, name, y, eq);
+
96  }
+
97  }
+
98 }
+
99 #endif
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+ + + +
void domain_error_vec(const char *function, const char *name, const T &y, const size_t i, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+
bool check_equal(const char *function, const char *name, const T_y &y, const T_eq &eq)
Return true if y is equal to eq.
Definition: check_equal.hpp:90
+
T get(const std::vector< T > &x, size_t n)
Definition: get.hpp:10
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__finite_8hpp.html b/doc/api/html/check__finite_8hpp.html new file mode 100644 index 00000000000..07ca1b7d565 --- /dev/null +++ b/doc/api/html/check__finite_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_finite.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_finite.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/domain_error.hpp>
+#include <stan/math/prim/scal/err/domain_error_vec.hpp>
+#include <stan/math/prim/scal/meta/length.hpp>
+#include <stan/math/prim/scal/meta/is_vector_like.hpp>
+#include <stan/math/prim/scal/fun/value_of_rec.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y >
bool stan::math::check_finite (const char *function, const char *name, const T_y &y)
 Return true if y is finite. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__finite_8hpp_source.html b/doc/api/html/check__finite_8hpp_source.html new file mode 100644 index 00000000000..80f74c44ba4 --- /dev/null +++ b/doc/api/html/check__finite_8hpp_source.html @@ -0,0 +1,174 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_finite.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_finite.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_ERR_CHECK_FINITE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_ERR_CHECK_FINITE_HPP
+
3 
+ + + + + +
9 #include <boost/math/special_functions/fpclassify.hpp>
+
10 
+
11 namespace stan {
+
12  namespace math {
+
13 
+
14  namespace {
+
15  template <typename T_y, bool is_vec>
+
16  struct finite {
+
17  static bool check(const char* function,
+
18  const char* name,
+
19  const T_y& y) {
+ + +
22  domain_error(function, name, y,
+
23  "is ", ", but must be finite!");
+
24  return true;
+
25  }
+
26  };
+
27 
+
28  template <typename T_y>
+
29  struct finite<T_y, true> {
+
30  static bool check(const char* function,
+
31  const char* name,
+
32  const T_y& y) {
+ +
34  using stan::length;
+
35  for (size_t n = 0; n < length(y); n++) {
+ +
37  domain_error_vec(function, name, y, n,
+
38  "is ", ", but must be finite!");
+
39  }
+
40  return true;
+
41  }
+
42  };
+
43  }
+
44 
+
61  template <typename T_y>
+
62  inline bool check_finite(const char* function,
+
63  const char* name,
+
64  const T_y& y) {
+
65  return finite<T_y, is_vector_like<T_y>::value>
+
66  ::check(function, name, y);
+
67  }
+
68  }
+
69 }
+
70 #endif
+
bool isfinite(const stan::math::var &v)
Checks if the given number has finite value.
+
double value_of_rec(const fvar< T > &v)
Return the value of the specified variable.
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+ + +
void domain_error_vec(const char *function, const char *name, const T &y, const size_t i, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+
T get(const std::vector< T > &x, size_t n)
Definition: get.hpp:10
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__greater_8hpp.html b/doc/api/html/check__greater_8hpp.html new file mode 100644 index 00000000000..81e93fd2dbf --- /dev/null +++ b/doc/api/html/check__greater_8hpp.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_greater.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_greater.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/domain_error.hpp>
+#include <stan/math/prim/scal/err/domain_error_vec.hpp>
+#include <stan/math/prim/scal/meta/is_vector_like.hpp>
+#include <stan/math/prim/scal/meta/VectorView.hpp>
+#include <stan/math/prim/scal/meta/length.hpp>
+#include <functional>
+#include <string>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y , typename T_low >
bool stan::math::check_greater (const char *function, const char *name, const T_y &y, const T_low &low)
 Return true if y is strictly greater than low. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__greater_8hpp_source.html b/doc/api/html/check__greater_8hpp_source.html new file mode 100644 index 00000000000..8d98f6383a4 --- /dev/null +++ b/doc/api/html/check__greater_8hpp_source.html @@ -0,0 +1,192 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_greater.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_greater.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_ERR_CHECK_GREATER_HPP
+
2 #define STAN_MATH_PRIM_SCAL_ERR_CHECK_GREATER_HPP
+
3 
+ + + + + +
9 #include <functional>
+
10 #include <string>
+
11 
+
12 namespace stan {
+
13  namespace math {
+
14 
+
15  namespace {
+
16  template <typename T_y,
+
17  typename T_low,
+
18  bool is_vec>
+
19  struct greater {
+
20  static bool check(const char* function,
+
21  const char* name,
+
22  const T_y& y,
+
23  const T_low& low) {
+
24  using stan::length;
+
25  VectorView<const T_low> low_vec(low);
+
26  for (size_t n = 0; n < length(low); n++) {
+
27  if (!(y > low_vec[n])) {
+
28  std::stringstream msg;
+
29  msg << ", but must be greater than ";
+
30  msg << low_vec[n];
+
31  std::string msg_str(msg.str());
+
32  domain_error(function, name, y,
+
33  "is ", msg_str.c_str());
+
34  }
+
35  }
+
36  return true;
+
37  }
+
38  };
+
39 
+
40  template <typename T_y,
+
41  typename T_low>
+
42  struct greater<T_y, T_low, true> {
+
43  static bool check(const char* function,
+
44  const char* name,
+
45  const T_y& y,
+
46  const T_low& low) {
+
47  using stan::length;
+
48  VectorView<const T_low> low_vec(low);
+
49  for (size_t n = 0; n < length(y); n++) {
+
50  if (!(stan::get(y, n) > low_vec[n])) {
+
51  std::stringstream msg;
+
52  msg << ", but must be greater than ";
+
53  msg << low_vec[n];
+
54  std::string msg_str(msg.str());
+
55  domain_error_vec(function, name, y, n,
+
56  "is ", msg_str.c_str());
+
57  }
+
58  }
+
59  return true;
+
60  }
+
61  };
+
62  }
+
63 
+
83  template <typename T_y, typename T_low>
+
84  inline bool check_greater(const char* function,
+
85  const char* name,
+
86  const T_y& y,
+
87  const T_low& low) {
+
88  return greater<T_y, T_low, is_vector_like<T_y>::value>
+
89  ::check(function, name, y, low);
+
90  }
+
91  }
+
92 }
+
93 #endif
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+ + + +
void domain_error_vec(const char *function, const char *name, const T &y, const size_t i, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+
T get(const std::vector< T > &x, size_t n)
Definition: get.hpp:10
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ + +
bool check_greater(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is strictly greater than low.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__greater__or__equal_8hpp.html b/doc/api/html/check__greater__or__equal_8hpp.html new file mode 100644 index 00000000000..dad0b7dd82f --- /dev/null +++ b/doc/api/html/check__greater__or__equal_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_greater_or_equal.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_greater_or_equal.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/length.hpp>
+#include <stan/math/prim/scal/meta/VectorView.hpp>
+#include <stan/math/prim/scal/meta/is_vector_like.hpp>
+#include <stan/math/prim/scal/err/domain_error_vec.hpp>
+#include <stan/math/prim/scal/err/domain_error.hpp>
+#include <string>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y , typename T_low >
bool stan::math::check_greater_or_equal (const char *function, const char *name, const T_y &y, const T_low &low)
 Return true if y is greater or equal than low. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__greater__or__equal_8hpp_source.html b/doc/api/html/check__greater__or__equal_8hpp_source.html new file mode 100644 index 00000000000..e98e728735d --- /dev/null +++ b/doc/api/html/check__greater__or__equal_8hpp_source.html @@ -0,0 +1,192 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_greater_or_equal.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_greater_or_equal.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_ERR_CHECK_GREATER_OR_EQUAL_HPP
+
2 #define STAN_MATH_PRIM_SCAL_ERR_CHECK_GREATER_OR_EQUAL_HPP
+
3 
+ + + + + +
9 #include <string>
+
10 
+
11 namespace stan {
+
12  namespace math {
+
13 
+
14  namespace {
+
15  template <typename T_y,
+
16  typename T_low,
+
17  bool is_vec>
+
18  struct greater_or_equal {
+
19  static bool check(const char* function,
+
20  const char* name,
+
21  const T_y& y,
+
22  const T_low& low) {
+
23  using stan::length;
+
24  VectorView<const T_low> low_vec(low);
+
25  for (size_t n = 0; n < length(low); n++) {
+
26  if (!(y >= low_vec[n])) {
+
27  std::stringstream msg;
+
28  msg << ", but must be greater than or equal to ";
+
29  msg << low_vec[n];
+
30  std::string msg_str(msg.str());
+
31  domain_error(function, name, y,
+
32  "is ", msg_str.c_str());
+
33  }
+
34  }
+
35  return true;
+
36  }
+
37  };
+
38 
+
39  template <typename T_y,
+
40  typename T_low>
+
41  struct greater_or_equal<T_y, T_low, true> {
+
42  static bool check(const char* function,
+
43  const char* name,
+
44  const T_y& y,
+
45  const T_low& low) {
+
46  using stan::length;
+
47  using stan::get;
+
48  VectorView<const T_low> low_vec(low);
+
49  for (size_t n = 0; n < length(y); n++) {
+
50  if (!(get(y, n) >= low_vec[n])) {
+
51  std::stringstream msg;
+
52  msg << ", but must be greater than or equal to ";
+
53  msg << low_vec[n];
+
54  std::string msg_str(msg.str());
+
55  domain_error_vec(function, name, y, n,
+
56  "is ", msg_str.c_str());
+
57  }
+
58  }
+
59  return true;
+
60  }
+
61  };
+
62  }
+
63 
+
83  template <typename T_y, typename T_low>
+
84  inline bool check_greater_or_equal(const char* function,
+
85  const char* name,
+
86  const T_y& y,
+
87  const T_low& low) {
+
88  return greater_or_equal<T_y, T_low, is_vector_like<T_y>::value>
+
89  ::check(function, name, y, low);
+
90  }
+
91  }
+
92 }
+
93 #endif
+
bool check_greater_or_equal(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is greater or equal than low.
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+ + + +
void domain_error_vec(const char *function, const char *name, const T &y, const size_t i, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+
T get(const std::vector< T > &x, size_t n)
Definition: get.hpp:10
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__ldlt__factor_8hpp.html b/doc/api/html/check__ldlt__factor_8hpp.html new file mode 100644 index 00000000000..2e2e8d3ca72 --- /dev/null +++ b/doc/api/html/check__ldlt__factor_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_ldlt_factor.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_ldlt_factor.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/scal/err/domain_error.hpp>
+#include <stan/math/prim/mat/fun/LDLT_factor.hpp>
+#include <sstream>
+#include <string>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T , int R, int C>
bool stan::math::check_ldlt_factor (const char *function, const char *name, stan::math::LDLT_factor< T, R, C > &A)
 Return true if the argument is a valid stan::math::LDLT_factor. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__ldlt__factor_8hpp_source.html b/doc/api/html/check__ldlt__factor_8hpp_source.html new file mode 100644 index 00000000000..af3deef2b02 --- /dev/null +++ b/doc/api/html/check__ldlt__factor_8hpp_source.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_ldlt_factor.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_ldlt_factor.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_LDLT_FACTOR_HPP
+
2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_LDLT_FACTOR_HPP
+
3 
+ + + +
7 #include <sstream>
+
8 #include <string>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
33  template <typename T, int R, int C>
+
34  inline bool check_ldlt_factor(const char* function,
+
35  const char* name,
+ +
37  if (!A.success()) {
+
38  std::ostringstream msg;
+
39  msg << "is not positive definite. "
+
40  << "last conditional variance is ";
+
41  std::string msg_str(msg.str());
+
42  const T too_small = A.vectorD().tail(1)(0);
+
43  domain_error(function, name, too_small,
+
44  msg_str.c_str(), ".");
+
45  return false;
+
46  }
+
47  return true;
+
48  }
+
49 
+
50  }
+
51 }
+
52 #endif
+ + +
Eigen::Matrix< T, Eigen::Dynamic, 1 > vectorD() const
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ + +
LDLT_factor is a thin wrapper on Eigen::LDLT to allow for reusing factorizations and efficient autodi...
Definition: LDLT_factor.hpp:58
+
bool check_ldlt_factor(const char *function, const char *name, stan::math::LDLT_factor< T, R, C > &A)
Return true if the argument is a valid stan::math::LDLT_factor.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__less_8hpp.html b/doc/api/html/check__less_8hpp.html new file mode 100644 index 00000000000..c09d3148e76 --- /dev/null +++ b/doc/api/html/check__less_8hpp.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_less.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_less.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/domain_error.hpp>
+#include <stan/math/prim/scal/err/domain_error_vec.hpp>
+#include <stan/math/prim/scal/meta/is_vector_like.hpp>
+#include <stan/math/prim/scal/meta/length.hpp>
+#include <stan/math/prim/scal/meta/VectorView.hpp>
+#include <functional>
+#include <string>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y , typename T_high >
bool stan::math::check_less (const char *function, const char *name, const T_y &y, const T_high &high)
 Return true if y is strictly less than high. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__less_8hpp_source.html b/doc/api/html/check__less_8hpp_source.html new file mode 100644 index 00000000000..2323939c6ee --- /dev/null +++ b/doc/api/html/check__less_8hpp_source.html @@ -0,0 +1,189 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_less.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_less.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_ERR_CHECK_LESS_HPP
+
2 #define STAN_MATH_PRIM_SCAL_ERR_CHECK_LESS_HPP
+
3 
+ + + + + +
9 #include <functional>
+
10 #include <string>
+
11 
+
12 namespace stan {
+
13  namespace math {
+
14 
+
15  namespace {
+
16  template <typename T_y, typename T_high, bool is_vec>
+
17  struct less {
+
18  static bool check(const char* function,
+
19  const char* name,
+
20  const T_y& y,
+
21  const T_high& high) {
+
22  using stan::length;
+
23  VectorView<const T_high> high_vec(high);
+
24  for (size_t n = 0; n < length(high); n++) {
+
25  if (!(y < high_vec[n])) {
+
26  std::stringstream msg;
+
27  msg << ", but must be less than ";
+
28  msg << high_vec[n];
+
29  std::string msg_str(msg.str());
+
30  domain_error(function, name, y,
+
31  "is ", msg_str.c_str());
+
32  }
+
33  }
+
34  return true;
+
35  }
+
36  };
+
37 
+
38  template <typename T_y, typename T_high>
+
39  struct less<T_y, T_high, true> {
+
40  static bool check(const char* function,
+
41  const char* name,
+
42  const T_y& y,
+
43  const T_high& high) {
+
44  using stan::length;
+
45  VectorView<const T_high> high_vec(high);
+
46  for (size_t n = 0; n < length(y); n++) {
+
47  if (!(stan::get(y, n) < high_vec[n])) {
+
48  std::stringstream msg;
+
49  msg << ", but must be less than ";
+
50  msg << high_vec[n];
+
51  std::string msg_str(msg.str());
+
52  domain_error_vec(function, name, y, n,
+
53  "is ", msg_str.c_str());
+
54  }
+
55  }
+
56  return true;
+
57  }
+
58  };
+
59  }
+
60 
+
80  template <typename T_y, typename T_high>
+
81  inline bool check_less(const char* function,
+
82  const char* name,
+
83  const T_y& y,
+
84  const T_high& high) {
+
85  return less<T_y, T_high, is_vector_like<T_y>::value>
+
86  ::check(function, name, y, high);
+
87  }
+
88  }
+
89 }
+
90 #endif
+
bool check_less(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is strictly less than high.
Definition: check_less.hpp:81
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+ + + +
void domain_error_vec(const char *function, const char *name, const T &y, const size_t i, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+
T get(const std::vector< T > &x, size_t n)
Definition: get.hpp:10
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__less__or__equal_8hpp.html b/doc/api/html/check__less__or__equal_8hpp.html new file mode 100644 index 00000000000..b29e216d26b --- /dev/null +++ b/doc/api/html/check__less__or__equal_8hpp.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_less_or_equal.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_less_or_equal.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/domain_error.hpp>
+#include <stan/math/prim/scal/err/domain_error_vec.hpp>
+#include <stan/math/prim/scal/meta/length.hpp>
+#include <stan/math/prim/scal/meta/get.hpp>
+#include <stan/math/prim/scal/meta/is_vector_like.hpp>
+#include <stan/math/prim/scal/meta/VectorView.hpp>
+#include <string>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y , typename T_high >
bool stan::math::check_less_or_equal (const char *function, const char *name, const T_y &y, const T_high &high)
 Return true if y is less or equal to high. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__less__or__equal_8hpp_source.html b/doc/api/html/check__less__or__equal_8hpp_source.html new file mode 100644 index 00000000000..4e522de5fc4 --- /dev/null +++ b/doc/api/html/check__less__or__equal_8hpp_source.html @@ -0,0 +1,190 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_less_or_equal.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_less_or_equal.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_ERR_CHECK_LESS_OR_EQUAL_HPP
+
2 #define STAN_MATH_PRIM_SCAL_ERR_CHECK_LESS_OR_EQUAL_HPP
+
3 
+ + + + + + +
10 #include <string>
+
11 
+
12 namespace stan {
+
13  namespace math {
+
14 
+
15  namespace {
+
16  template <typename T_y, typename T_high, bool is_vec>
+
17  struct less_or_equal {
+
18  static bool check(const char* function,
+
19  const char* name,
+
20  const T_y& y,
+
21  const T_high& high) {
+
22  using stan::length;
+
23  VectorView<const T_high> high_vec(high);
+
24  for (size_t n = 0; n < length(high); n++) {
+
25  if (!(y <= high_vec[n])) {
+
26  std::stringstream msg;
+
27  msg << ", but must be less than or equal to ";
+
28  msg << high_vec[n];
+
29  std::string msg_str(msg.str());
+
30  domain_error(function, name, y,
+
31  "is ", msg_str.c_str());
+
32  }
+
33  }
+
34  return true;
+
35  }
+
36  };
+
37 
+
38  template <typename T_y, typename T_high>
+
39  struct less_or_equal<T_y, T_high, true> {
+
40  static bool check(const char* function,
+
41  const char* name,
+
42  const T_y& y,
+
43  const T_high& high) {
+
44  using stan::length;
+
45  VectorView<const T_high> high_vec(high);
+
46  for (size_t n = 0; n < length(y); n++) {
+
47  if (!(stan::get(y, n) <= high_vec[n])) {
+
48  std::stringstream msg;
+
49  msg << ", but must be less than or equal to ";
+
50  msg << high_vec[n];
+
51  std::string msg_str(msg.str());
+
52  domain_error_vec(function, name, y, n,
+
53  "is ", msg_str.c_str());
+
54  }
+
55  }
+
56  return true;
+
57  }
+
58  };
+
59  }
+
60 
+
80  template <typename T_y, typename T_high>
+
81  inline bool check_less_or_equal(const char* function,
+
82  const char* name,
+
83  const T_y& y,
+
84  const T_high& high) {
+
85  return less_or_equal<T_y, T_high, is_vector_like<T_y>::value>
+
86  ::check(function, name, y, high);
+
87  }
+
88  }
+
89 }
+
90 #endif
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+ + + + +
void domain_error_vec(const char *function, const char *name, const T &y, const size_t i, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+
T get(const std::vector< T > &x, size_t n)
Definition: get.hpp:10
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+
bool check_less_or_equal(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is less or equal to high.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__lower__triangular_8hpp.html b/doc/api/html/check__lower__triangular_8hpp.html new file mode 100644 index 00000000000..994f78589f8 --- /dev/null +++ b/doc/api/html/check__lower__triangular_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_lower_triangular.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_lower_triangular.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/scal/meta/error_index.hpp>
+#include <stan/math/prim/scal/err/domain_error.hpp>
+#include <sstream>
+#include <string>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y >
bool stan::math::check_lower_triangular (const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
 Return true if the specified matrix is lower triangular. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__lower__triangular_8hpp_source.html b/doc/api/html/check__lower__triangular_8hpp_source.html new file mode 100644 index 00000000000..93ebd0da3a2 --- /dev/null +++ b/doc/api/html/check__lower__triangular_8hpp_source.html @@ -0,0 +1,152 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_lower_triangular.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_lower_triangular.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_LOWER_TRIANGULAR_HPP
+
2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_LOWER_TRIANGULAR_HPP
+
3 
+ + + +
7 #include <sstream>
+
8 #include <string>
+
9 
+
10 namespace stan {
+
11 
+
12  namespace math {
+
13  using Eigen::Dynamic;
+
33  template <typename T_y>
+
34  inline bool
+
35  check_lower_triangular(const char* function,
+
36  const char* name,
+
37  const Eigen::Matrix<T_y, Dynamic, Dynamic>& y) {
+
38  for (int n = 1; n < y.cols(); ++n) {
+
39  for (int m = 0; m < n && m < y.rows(); ++m) {
+
40  if (y(m, n) != 0) {
+
41  std::stringstream msg;
+
42  msg << "is not lower triangular;"
+
43  << " " << name << "[" << stan::error_index::value + m << ","
+
44  << stan::error_index::value + n << "]=";
+
45  std::string msg_str(msg.str());
+
46  domain_error(function, name, y(m, n),
+
47  msg_str.c_str());
+
48  return false;
+
49  }
+
50  }
+
51  }
+
52  return true;
+
53  }
+
54 
+
55  }
+
56 }
+
57 #endif
+ +
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ +
bool check_lower_triangular(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is lower triangular.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__matching__dims_8hpp.html b/doc/api/html/check__matching__dims_8hpp.html new file mode 100644 index 00000000000..e452cef04f8 --- /dev/null +++ b/doc/api/html/check__matching__dims_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_matching_dims.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_matching_dims.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/domain_error.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/scal/err/check_size_match.hpp>
+#include <sstream>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
bool stan::math::check_matching_dims (const char *function, const char *name1, const Eigen::Matrix< T1, R1, C1 > &y1, const char *name2, const Eigen::Matrix< T2, R2, C2 > &y2)
 Return true if the two matrices are of the same size. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__matching__dims_8hpp_source.html b/doc/api/html/check__matching__dims_8hpp_source.html new file mode 100644 index 00000000000..ceb93c400e1 --- /dev/null +++ b/doc/api/html/check__matching__dims_8hpp_source.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_matching_dims.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_matching_dims.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_MATCHING_DIMS_HPP
+
2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_MATCHING_DIMS_HPP
+
3 
+ + + +
7 #include <sstream>
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
36  template <typename T1, typename T2, int R1, int C1, int R2, int C2>
+
37  inline bool check_matching_dims(const char* function,
+
38  const char* name1,
+
39  const Eigen::Matrix<T1, R1, C1>& y1,
+
40  const char* name2,
+
41  const Eigen::Matrix<T2, R2, C2>& y2) {
+
42  check_size_match(function,
+
43  "Rows of ", name1, y1.rows(),
+
44  "rows of ", name2, y2.rows());
+
45  check_size_match(function,
+
46  "Columns of ", name1, y1.cols(),
+
47  "columns of ", name2, y2.cols());
+
48  return true;
+
49  }
+
50 
+
51  }
+
52 }
+
53 #endif
+ +
bool check_matching_dims(const char *function, const char *name1, const Eigen::Matrix< T1, R1, C1 > &y1, const char *name2, const Eigen::Matrix< T2, R2, C2 > &y2)
Return true if the two matrices are of the same size.
+
bool check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Return true if the provided sizes match.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__matching__sizes_8hpp.html b/doc/api/html/check__matching__sizes_8hpp.html new file mode 100644 index 00000000000..09aee7e4f9a --- /dev/null +++ b/doc/api/html/check__matching__sizes_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_matching_sizes.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_matching_sizes.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/domain_error.hpp>
+#include <stan/math/prim/scal/err/check_size_match.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y1 , typename T_y2 >
bool stan::math::check_matching_sizes (const char *function, const char *name1, const T_y1 &y1, const char *name2, const T_y2 &y2)
 Return true if two structures at the same size. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__matching__sizes_8hpp_source.html b/doc/api/html/check__matching__sizes_8hpp_source.html new file mode 100644 index 00000000000..50422d1027c --- /dev/null +++ b/doc/api/html/check__matching__sizes_8hpp_source.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_matching_sizes.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_matching_sizes.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_MATCHING_SIZES_HPP
+
2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_MATCHING_SIZES_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
28  template <typename T_y1, typename T_y2>
+
29  inline bool check_matching_sizes(const char* function,
+
30  const char* name1,
+
31  const T_y1& y1,
+
32  const char* name2,
+
33  const T_y2& y2) {
+
34  check_size_match(function,
+
35  "size of ", name1, y1.size(),
+
36  "size of ", name2, y2.size());
+
37  return true;
+
38  }
+
39 
+
40  }
+
41 }
+
42 #endif
+ +
bool check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Return true if the provided sizes match.
+
bool check_matching_sizes(const char *function, const char *name1, const T_y1 &y1, const char *name2, const T_y2 &y2)
Return true if two structures at the same size.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__multiplicable_8hpp.html b/doc/api/html/check__multiplicable_8hpp.html new file mode 100644 index 00000000000..d265585e485 --- /dev/null +++ b/doc/api/html/check__multiplicable_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_multiplicable.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_multiplicable.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/scal/err/check_size_match.hpp>
+#include <stan/math/prim/scal/err/check_positive_size.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T1 , typename T2 >
bool stan::math::check_multiplicable (const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
 Return true if the matrices can be multiplied. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__multiplicable_8hpp_source.html b/doc/api/html/check__multiplicable_8hpp_source.html new file mode 100644 index 00000000000..a7684cedfa9 --- /dev/null +++ b/doc/api/html/check__multiplicable_8hpp_source.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_multiplicable.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_multiplicable.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_MULTIPLICABLE_HPP
+
2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_MULTIPLICABLE_HPP
+
3 
+
4 
+ + + +
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
32  template <typename T1, typename T2>
+
33  inline bool check_multiplicable(const char* function,
+
34  const char* name1,
+
35  const T1& y1,
+
36  const char* name2,
+
37  const T2& y2) {
+
38  check_positive_size(function, name1, "rows()", y1.rows());
+
39  check_positive_size(function, name2, "cols()", y2.cols());
+
40  check_size_match(function,
+
41  "Columns of ", name1, y1.cols(),
+
42  "Rows of ", name2, y2.rows());
+
43  check_positive_size(function, name1, "cols()", y1.cols());
+
44  return true;
+
45  }
+
46  }
+
47 }
+
48 #endif
+ +
bool check_positive_size(const char *function, const char *name, const char *expr, const int size)
Return true if size is positive.
+
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+
bool check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Return true if the provided sizes match.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__nonnegative_8hpp.html b/doc/api/html/check__nonnegative_8hpp.html new file mode 100644 index 00000000000..4f6a4751158 --- /dev/null +++ b/doc/api/html/check__nonnegative_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_nonnegative.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_nonnegative.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/domain_error.hpp>
+#include <stan/math/prim/scal/err/domain_error_vec.hpp>
+#include <stan/math/prim/scal/meta/length.hpp>
+#include <stan/math/prim/scal/meta/value_type.hpp>
+#include <stan/math/prim/scal/meta/is_vector_like.hpp>
+#include <boost/type_traits/is_unsigned.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y >
bool stan::math::check_nonnegative (const char *function, const char *name, const T_y &y)
 Return true if y is non-negative. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__nonnegative_8hpp_source.html b/doc/api/html/check__nonnegative_8hpp_source.html new file mode 100644 index 00000000000..3dfd6863924 --- /dev/null +++ b/doc/api/html/check__nonnegative_8hpp_source.html @@ -0,0 +1,177 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_nonnegative.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_nonnegative.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_ERR_CHECK_NONNEGATIVE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_ERR_CHECK_NONNEGATIVE_HPP
+
3 
+ + + + + +
9 #include <boost/type_traits/is_unsigned.hpp>
+
10 
+
11 namespace stan {
+
12 
+
13  namespace math {
+
14 
+
15  namespace {
+
16  template <typename T_y, bool is_vec>
+
17  struct nonnegative {
+
18  static bool check(const char* function,
+
19  const char* name,
+
20  const T_y& y) {
+
21  // have to use not is_unsigned. is_signed will be false
+
22  // floating point types that have no unsigned versions.
+
23  if (!boost::is_unsigned<T_y>::value && !(y >= 0))
+
24  domain_error(function, name, y,
+
25  "is ", ", but must be >= 0!");
+
26  return true;
+
27  }
+
28  };
+
29 
+
30  template <typename T_y>
+
31  struct nonnegative<T_y, true> {
+
32  static bool check(const char* function,
+
33  const char* name,
+
34  const T_y& y) {
+
35  using stan::length;
+ +
37 
+
38  for (size_t n = 0; n < length(y); n++) {
+
39  if (!boost::is_unsigned<typename value_type<T_y>::type>::value
+
40  && !(stan::get(y, n) >= 0))
+
41  domain_error_vec(function, name, y, n,
+
42  "is ", ", but must be >= 0!");
+
43  }
+
44  return true;
+
45  }
+
46  };
+
47  }
+
48 
+
65  template <typename T_y>
+
66  inline bool check_nonnegative(const char* function,
+
67  const char* name,
+
68  const T_y& y) {
+
69  return nonnegative<T_y, is_vector_like<T_y>::value>
+
70  ::check(function, name, y);
+
71  }
+
72  }
+
73 }
+
74 #endif
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+ + +
void domain_error_vec(const char *function, const char *name, const T &y, const size_t i, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+
T get(const std::vector< T > &x, size_t n)
Definition: get.hpp:10
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ + + +
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+
Primary template class for metaprogram to compute the type of values stored in a container.
Definition: value_type.hpp:21
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__nonzero__size_8hpp.html b/doc/api/html/check__nonzero__size_8hpp.html new file mode 100644 index 00000000000..c75260a41b6 --- /dev/null +++ b/doc/api/html/check__nonzero__size_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_nonzero_size.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_nonzero_size.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/invalid_argument.hpp>
+#include <string>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y >
bool stan::math::check_nonzero_size (const char *function, const char *name, const T_y &y)
 Return true if the specified matrix/vector is of non-zero size. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__nonzero__size_8hpp_source.html b/doc/api/html/check__nonzero__size_8hpp_source.html new file mode 100644 index 00000000000..6835963baf8 --- /dev/null +++ b/doc/api/html/check__nonzero__size_8hpp_source.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_nonzero_size.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_nonzero_size.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_ERR_CHECK_NONZERO_SIZE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_ERR_CHECK_NONZERO_SIZE_HPP
+
3 
+ +
5 
+
6 #include <string>
+
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
30  template <typename T_y>
+
31  inline bool check_nonzero_size(const char* function,
+
32  const char* name,
+
33  const T_y& y) {
+
34  if (y.size() > 0)
+
35  return true;
+
36 
+
37  invalid_argument(function, name, 0,
+
38  "has size ",
+
39  ", but must have a non-zero size");
+
40  return false;
+
41  }
+
42 
+
43  }
+
44 }
+
45 #endif
+ +
bool check_nonzero_size(const char *function, const char *name, const T_y &y)
Return true if the specified matrix/vector is of non-zero size.
+
void invalid_argument(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw an invalid_argument exception with a consistently formatted message.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__not__nan_8hpp.html b/doc/api/html/check__not__nan_8hpp.html new file mode 100644 index 00000000000..48789fe1d01 --- /dev/null +++ b/doc/api/html/check__not__nan_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_not_nan.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_not_nan.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/length.hpp>
+#include <stan/math/prim/scal/meta/is_vector_like.hpp>
+#include <stan/math/prim/scal/err/domain_error.hpp>
+#include <stan/math/prim/scal/err/domain_error_vec.hpp>
+#include <stan/math/prim/scal/fun/value_of_rec.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y >
bool stan::math::check_not_nan (const char *function, const char *name, const T_y &y)
 Return true if y is not NaN. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__not__nan_8hpp_source.html b/doc/api/html/check__not__nan_8hpp_source.html new file mode 100644 index 00000000000..4b74004f1f1 --- /dev/null +++ b/doc/api/html/check__not__nan_8hpp_source.html @@ -0,0 +1,175 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_not_nan.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_not_nan.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_ERR_CHECK_NOT_NAN_HPP
+
2 #define STAN_MATH_PRIM_SCAL_ERR_CHECK_NOT_NAN_HPP
+
3 
+ + + + + +
9 #include <boost/math/special_functions/fpclassify.hpp>
+
10 
+
11 
+
12 namespace stan {
+
13  namespace math {
+
14 
+
15  namespace {
+
16  template <typename T_y, bool is_vec>
+
17  struct not_nan {
+
18  static bool check(const char* function,
+
19  const char* name,
+
20  const T_y& y) {
+ + +
23  domain_error(function, name, y,
+
24  "is ", ", but must not be nan!");
+
25  return true;
+
26  }
+
27  };
+
28 
+
29  template <typename T_y>
+
30  struct not_nan<T_y, true> {
+
31  static bool check(const char* function,
+
32  const char* name,
+
33  const T_y& y) {
+ +
35  for (size_t n = 0; n < stan::length(y); n++) {
+ +
37  domain_error_vec(function, name, y, n,
+
38  "is ", ", but must not be nan!");
+
39  }
+
40  return true;
+
41  }
+
42  };
+
43  }
+
44 
+
62  template <typename T_y>
+
63  inline bool check_not_nan(const char* function,
+
64  const char* name,
+
65  const T_y& y) {
+
66  return not_nan<T_y, is_vector_like<T_y>::value>
+
67  ::check(function, name, y);
+
68  }
+
69 
+
70  }
+
71 }
+
72 #endif
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+
double value_of_rec(const fvar< T > &v)
Return the value of the specified variable.
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+ +
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
+ +
void domain_error_vec(const char *function, const char *name, const T &y, const size_t i, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+
T get(const std::vector< T > &x, size_t n)
Definition: get.hpp:10
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__ordered_8hpp.html b/doc/api/html/check__ordered_8hpp.html new file mode 100644 index 00000000000..1c83be5d9bd --- /dev/null +++ b/doc/api/html/check__ordered_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_ordered.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_ordered.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/domain_error.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/meta/index_type.hpp>
+#include <stan/math/prim/scal/meta/error_index.hpp>
+#include <sstream>
+#include <string>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T_y >
bool stan::math::check_ordered (const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &y)
 Return true if the specified vector is sorted into strictly increasing order. More...
 
template<typename T_y >
bool stan::math::check_ordered (const char *function, const char *name, const std::vector< T_y > &y)
 Return true if the specified vector is sorted into strictly increasing order. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__ordered_8hpp_source.html b/doc/api/html/check__ordered_8hpp_source.html new file mode 100644 index 00000000000..c41cd95af73 --- /dev/null +++ b/doc/api/html/check__ordered_8hpp_source.html @@ -0,0 +1,190 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_ordered.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_ordered.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_ORDERED_HPP
+
2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_ORDERED_HPP
+
3 
+ + + + +
8 #include <sstream>
+
9 #include <string>
+
10 #include <vector>
+
11 
+
12 namespace stan {
+
13  namespace math {
+
14 
+
30  template <typename T_y>
+
31  bool check_ordered(const char* function,
+
32  const char* name,
+
33  const Eigen::Matrix<T_y, Eigen::Dynamic, 1>& y) {
+
34  using Eigen::Dynamic;
+
35  using Eigen::Matrix;
+ +
37 
+
38  typedef typename index_type<Matrix<T_y, Dynamic, 1> >::type size_t;
+
39 
+
40  if (y.size() == 0)
+
41  return true;
+
42 
+
43  for (size_t n = 1; n < y.size(); n++) {
+
44  if (!(y[n] > y[n-1])) {
+
45  std::ostringstream msg1;
+
46  msg1 << "is not a valid ordered vector."
+
47  << " The element at " << stan::error_index::value + n
+
48  << " is ";
+
49  std::string msg1_str(msg1.str());
+
50  std::ostringstream msg2;
+
51  msg2 << ", but should be greater than the previous element, "
+
52  << y[n-1];
+
53  std::string msg2_str(msg2.str());
+
54  domain_error(function, name, y[n],
+
55  msg1_str.c_str(), msg2_str.c_str());
+
56  return false;
+
57  }
+
58  }
+
59  return true;
+
60  }
+
61 
+
77  template <typename T_y>
+
78  bool check_ordered(const char* function,
+
79  const char* name,
+
80  const std::vector<T_y>& y) {
+
81  if (y.size() == 0)
+
82  return true;
+
83 
+
84  for (size_t n = 1; n < y.size(); n++) {
+
85  if (!(y[n] > y[n-1])) {
+
86  std::ostringstream msg1;
+
87  msg1 << "is not a valid ordered vector."
+
88  << " The element at " << stan::error_index::value + n
+
89  << " is ";
+
90  std::string msg1_str(msg1.str());
+
91  std::ostringstream msg2;
+
92  msg2 << ", but should be greater than the previous element, "
+
93  << y[n-1];
+
94  std::string msg2_str(msg2.str());
+
95  domain_error(function, name, y[n],
+
96  msg1_str.c_str(), msg2_str.c_str());
+
97  return false;
+
98  }
+
99  }
+
100  return true;
+
101  }
+
102  }
+
103 }
+
104 #endif
+
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:19
+ +
bool check_ordered(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &y)
Return true if the specified vector is sorted into strictly increasing order.
+ +
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__pos__definite_8hpp.html b/doc/api/html/check__pos__definite_8hpp.html new file mode 100644 index 00000000000..32f25600191 --- /dev/null +++ b/doc/api/html/check__pos__definite_8hpp.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_pos_definite.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_pos_definite.hpp File Reference
+
+
+
#include <stan/math/prim/mat/meta/get.hpp>
+#include <stan/math/prim/mat/meta/length.hpp>
+#include <stan/math/prim/mat/meta/is_vector.hpp>
+#include <stan/math/prim/mat/meta/is_vector_like.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/err/domain_error.hpp>
+#include <stan/math/prim/mat/err/check_symmetric.hpp>
+#include <stan/math/prim/mat/err/constraint_tolerance.hpp>
+#include <stan/math/prim/scal/err/check_positive_size.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/fun/value_of_rec.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + +

+Functions

template<typename T_y >
bool stan::math::check_pos_definite (const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
 Return true if the specified square, symmetric matrix is positive definite. More...
 
template<typename Derived >
bool stan::math::check_pos_definite (const char *function, const char *name, const Eigen::LDLT< Derived > &cholesky)
 Return true if the specified LDLT transform of a matrix is positive definite. More...
 
template<typename Derived >
bool stan::math::check_pos_definite (const char *function, const char *name, const Eigen::LLT< Derived > &cholesky)
 Return true if the specified LLT transform of a matrix is positive definite. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__pos__definite_8hpp_source.html b/doc/api/html/check__pos__definite_8hpp_source.html new file mode 100644 index 00000000000..35ef60b9aef --- /dev/null +++ b/doc/api/html/check__pos__definite_8hpp_source.html @@ -0,0 +1,195 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_pos_definite.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_pos_definite.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_POS_DEFINITE_HPP
+
2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_POS_DEFINITE_HPP
+
3 
+ + + + + + + + + + + +
15 namespace stan {
+
16 
+
17  namespace math {
+
18  using Eigen::Dynamic;
+
19 
+
36  template <typename T_y>
+
37  inline bool
+
38  check_pos_definite(const char* function,
+
39  const char* name,
+
40  const Eigen::Matrix<T_y, Dynamic, Dynamic>& y) {
+
41  check_symmetric(function, name, y);
+
42  check_positive_size(function, name, "rows", y.rows());
+
43 
+
44  if (y.rows() == 1 && !(y(0, 0) > CONSTRAINT_TOLERANCE))
+
45  domain_error(function, name, y, "is not positive definite: ");
+
46 
+
47  using Eigen::LDLT;
+
48  using Eigen::Matrix;
+
49  using Eigen::Dynamic;
+
50  LDLT< Matrix<double, Dynamic, Dynamic> > cholesky
+
51  = value_of_rec(y).ldlt();
+
52  if (cholesky.info() != Eigen::Success
+
53  || !cholesky.isPositive()
+
54  || (cholesky.vectorD().array() <= 0.0).any())
+
55  domain_error(function, name, y, "is not positive definite:\n");
+
56  check_not_nan(function, name, y);
+
57  return true;
+
58  }
+
59 
+
74  template <typename Derived>
+
75  inline bool
+
76  check_pos_definite(const char* function,
+
77  const char* name,
+
78  const Eigen::LDLT<Derived>& cholesky) {
+
79  if (cholesky.info() != Eigen::Success
+
80  || !cholesky.isPositive()
+
81  || !(cholesky.vectorD().array() > 0.0).all())
+
82  domain_error(function, "LDLT decomposition of", " failed", name);
+
83  return true;
+
84  }
+
85 
+
100  template <typename Derived>
+
101  inline bool
+
102  check_pos_definite(const char* function,
+
103  const char* name,
+
104  const Eigen::LLT<Derived>& cholesky) {
+
105  if (cholesky.info() != Eigen::Success
+
106  || !(cholesky.matrixLLT().diagonal().array() > 0.0).all())
+
107  domain_error(function, "Cholesky decomposition of", " failed", name);
+
108  return true;
+
109  }
+
110 
+
111  }
+
112 }
+
113 #endif
+ + +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+
bool check_positive_size(const char *function, const char *name, const char *expr, const int size)
Return true if size is positive.
+
double value_of_rec(const fvar< T > &v)
Return the value of the specified variable.
+ + +
bool check_symmetric(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is symmetric.
+ + + + +
const double CONSTRAINT_TOLERANCE
The tolerance for checking arithmetic bounds In rank and in simplexes.
+
bool check_pos_definite(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified square, symmetric matrix is positive definite.
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__pos__semidefinite_8hpp.html b/doc/api/html/check__pos__semidefinite_8hpp.html new file mode 100644 index 00000000000..bfdb34a481a --- /dev/null +++ b/doc/api/html/check__pos__semidefinite_8hpp.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_pos_semidefinite.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_pos_semidefinite.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/domain_error.hpp>
+#include <stan/math/prim/mat/err/check_symmetric.hpp>
+#include <stan/math/prim/mat/err/constraint_tolerance.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/err/check_positive_size.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/meta/index_type.hpp>
+#include <stan/math/prim/mat/fun/value_of_rec.hpp>
+#include <sstream>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y >
bool stan::math::check_pos_semidefinite (const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
 Return true if the specified matrix is positive definite. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__pos__semidefinite_8hpp_source.html b/doc/api/html/check__pos__semidefinite_8hpp_source.html new file mode 100644 index 00000000000..ab4297eae86 --- /dev/null +++ b/doc/api/html/check__pos__semidefinite_8hpp_source.html @@ -0,0 +1,165 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_pos_semidefinite.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_pos_semidefinite.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_POS_SEMIDEFINITE_HPP
+
2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_POS_SEMIDEFINITE_HPP
+
3 
+ + + + + + + + +
12 #include <sstream>
+
13 
+
14 namespace stan {
+
15 
+
16  namespace math {
+
17  using Eigen::Dynamic;
+
34  template <typename T_y>
+
35  inline bool
+
36  check_pos_semidefinite(const char* function,
+
37  const char* name,
+
38  const Eigen::Matrix<T_y, Dynamic, Dynamic>& y) {
+
39  check_symmetric(function, name, y);
+
40  check_positive_size(function, name, "rows", y.rows());
+
41 
+
42  if (y.rows() == 1 && !(y(0, 0) >= 0.0))
+
43  domain_error(function, name, y, "is not positive semi-definite: ");
+
44 
+
45  using Eigen::LDLT;
+
46  using Eigen::Matrix;
+
47  using Eigen::Dynamic;
+
48  LDLT<Matrix<double, Dynamic, Dynamic> > cholesky
+
49  = value_of_rec(y).ldlt();
+
50  if (cholesky.info() != Eigen::Success
+
51  || (cholesky.vectorD().array() < 0.0).any())
+
52  domain_error(function, name, y, "is not positive semi-definite:\n");
+
53  check_not_nan(function, name, y);
+
54  return true;
+
55  }
+
56 
+
57  }
+
58 }
+
59 #endif
+ + +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+
bool check_positive_size(const char *function, const char *name, const char *expr, const int size)
Return true if size is positive.
+
double value_of_rec(const fvar< T > &v)
Return the value of the specified variable.
+
bool check_pos_semidefinite(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is positive definite.
+
bool check_symmetric(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is symmetric.
+ + + +
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__positive_8hpp.html b/doc/api/html/check__positive_8hpp.html new file mode 100644 index 00000000000..b4019f29e3e --- /dev/null +++ b/doc/api/html/check__positive_8hpp.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_positive.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_positive.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/domain_error.hpp>
+#include <stan/math/prim/scal/err/domain_error_vec.hpp>
+#include <stan/math/prim/scal/meta/value_type.hpp>
+#include <stan/math/prim/scal/meta/length.hpp>
+#include <stan/math/prim/scal/meta/get.hpp>
+#include <stan/math/prim/scal/meta/is_vector_like.hpp>
+#include <boost/type_traits/is_unsigned.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y >
bool stan::math::check_positive (const char *function, const char *name, const T_y &y)
 Return true if y is positive. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__positive_8hpp_source.html b/doc/api/html/check__positive_8hpp_source.html new file mode 100644 index 00000000000..474f2516420 --- /dev/null +++ b/doc/api/html/check__positive_8hpp_source.html @@ -0,0 +1,181 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_positive.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_positive.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_ERR_CHECK_POSITIVE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_ERR_CHECK_POSITIVE_HPP
+
3 
+ + + + + + +
10 #include <boost/type_traits/is_unsigned.hpp>
+
11 
+
12 namespace stan {
+
13 
+
14  namespace math {
+
15 
+
16  namespace {
+
17 
+
18  template <typename T_y, bool is_vec>
+
19  struct positive {
+
20  static bool check(const char* function,
+
21  const char* name,
+
22  const T_y& y) {
+
23  // have to use not is_unsigned. is_signed will be false
+
24  // floating point types that have no unsigned versions.
+
25  if (!boost::is_unsigned<T_y>::value && !(y > 0))
+
26  domain_error(function, name, y,
+
27  "is ", ", but must be > 0!");
+
28  return true;
+
29  }
+
30  };
+
31 
+
32  template <typename T_y>
+
33  struct positive<T_y, true> {
+
34  static bool check(const char* function,
+
35  const char* name,
+
36  const T_y& y) {
+ +
38  using stan::length;
+
39  for (size_t n = 0; n < length(y); n++) {
+
40  if (!boost::is_unsigned<typename value_type<T_y>::type>::value
+
41  && !(stan::get(y, n) > 0))
+
42  domain_error_vec(function, name, y, n,
+
43  "is ", ", but must be > 0!");
+
44  }
+
45  return true;
+
46  }
+
47  };
+
48 
+
49  }
+
50 
+
67  template <typename T_y>
+
68  inline bool check_positive(const char* function,
+
69  const char* name,
+
70  const T_y& y) {
+
71  return positive<T_y, is_vector_like<T_y>::value>
+
72  ::check(function, name, y);
+
73  }
+
74 
+
75  }
+
76 }
+
77 #endif
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+ + + +
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+
void domain_error_vec(const char *function, const char *name, const T &y, const size_t i, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+
T get(const std::vector< T > &x, size_t n)
Definition: get.hpp:10
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ + + +
Primary template class for metaprogram to compute the type of values stored in a container.
Definition: value_type.hpp:21
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__positive__finite_8hpp.html b/doc/api/html/check__positive__finite_8hpp.html new file mode 100644 index 00000000000..fcd6a3ee7fb --- /dev/null +++ b/doc/api/html/check__positive__finite_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_positive_finite.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_positive_finite.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/check_positive.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y >
bool stan::math::check_positive_finite (const char *function, const char *name, const T_y &y)
 Return true if y is positive and finite. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__positive__finite_8hpp_source.html b/doc/api/html/check__positive__finite_8hpp_source.html new file mode 100644 index 00000000000..21163bfa8c0 --- /dev/null +++ b/doc/api/html/check__positive__finite_8hpp_source.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_positive_finite.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_positive_finite.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_ERR_CHECK_POSITIVE_FINITE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_ERR_CHECK_POSITIVE_FINITE_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
27  template <typename T_y>
+
28  inline bool check_positive_finite(const char* function,
+
29  const char* name,
+
30  const T_y& y) {
+
31  stan::math::check_positive(function, name, y);
+
32  stan::math::check_finite(function, name, y);
+
33 
+
34  return true;
+
35  }
+
36 
+
37  }
+
38 }
+
39 #endif
+ +
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__positive__ordered_8hpp.html b/doc/api/html/check__positive__ordered_8hpp.html new file mode 100644 index 00000000000..2ff38ee20aa --- /dev/null +++ b/doc/api/html/check__positive__ordered_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_positive_ordered.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_positive_ordered.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/domain_error.hpp>
+#include <stan/math/prim/mat/err/check_ordered.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/meta/index_type.hpp>
+#include <sstream>
+#include <string>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y >
bool stan::math::check_positive_ordered (const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &y)
 Return true if the specified vector contains non-negative values and is sorted into strictly increasing order. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__positive__ordered_8hpp_source.html b/doc/api/html/check__positive__ordered_8hpp_source.html new file mode 100644 index 00000000000..8c25b193e60 --- /dev/null +++ b/doc/api/html/check__positive__ordered_8hpp_source.html @@ -0,0 +1,162 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_positive_ordered.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_positive_ordered.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_POSITIVE_ORDERED_HPP
+
2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_POSITIVE_ORDERED_HPP
+
3 
+ + + + +
8 
+
9 #include <sstream>
+
10 #include <string>
+
11 
+
12 namespace stan {
+
13 
+
14  namespace math {
+
15 
+
30  template <typename T_y>
+
31  bool
+
32  check_positive_ordered(const char* function,
+
33  const char* name,
+
34  const Eigen::Matrix<T_y, Eigen::Dynamic, 1>& y) {
+
35  using Eigen::Dynamic;
+
36  using Eigen::Matrix;
+ +
38 
+
39  typedef typename index_type<Matrix<T_y, Dynamic, 1> >::type size_type;
+
40  if (y.size() == 0) {
+
41  return true;
+
42  }
+
43  if (y[0] < 0) {
+
44  std::ostringstream msg;
+
45  msg << "is not a valid positive_ordered vector."
+
46  << " The element at " << stan::error_index::value
+
47  << " is ";
+
48  std::string msg_str(msg.str());
+
49  domain_error(function, name, y[0],
+
50  msg_str.c_str(), ", but should be postive.");
+
51  return false;
+
52  }
+
53  check_ordered(function, name, y);
+
54  return true;
+
55  }
+
56  }
+
57 }
+
58 #endif
+ +
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:19
+ +
bool check_ordered(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &y)
Return true if the specified vector is sorted into strictly increasing order.
+ +
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ +
bool check_positive_ordered(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &y)
Return true if the specified vector contains non-negative values and is sorted into strictly increasi...
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__positive__size_8hpp.html b/doc/api/html/check__positive__size_8hpp.html new file mode 100644 index 00000000000..68c8a6444b9 --- /dev/null +++ b/doc/api/html/check__positive__size_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_positive_size.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_positive_size.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/invalid_argument.hpp>
+#include <sstream>
+#include <string>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

bool stan::math::check_positive_size (const char *function, const char *name, const char *expr, const int size)
 Return true if size is positive. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__positive__size_8hpp_source.html b/doc/api/html/check__positive__size_8hpp_source.html new file mode 100644 index 00000000000..5626ebe3267 --- /dev/null +++ b/doc/api/html/check__positive__size_8hpp_source.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_positive_size.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_positive_size.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_ERR_CHECK_POSITIVE_SIZE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_ERR_CHECK_POSITIVE_SIZE_HPP
+
3 
+ +
5 #include <sstream>
+
6 #include <string>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
23  inline bool check_positive_size(const char* function,
+
24  const char* name,
+
25  const char* expr,
+
26  const int size) {
+
27  if (size <= 0) {
+
28  std::stringstream msg;
+
29  msg << "; dimension size expression = " << expr;
+
30  std::string msg_str(msg.str());
+
31  invalid_argument(function, name, size,
+
32  "must have a positive size, but is ",
+
33  msg_str.c_str());
+
34  }
+
35  return true;
+
36  }
+
37 
+
38  }
+
39 }
+
40 #endif
+
bool check_positive_size(const char *function, const char *name, const char *expr, const int size)
Return true if size is positive.
+ +
void invalid_argument(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw an invalid_argument exception with a consistently formatted message.
+
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__range_8hpp.html b/doc/api/html/check__range_8hpp.html new file mode 100644 index 00000000000..23578c4912d --- /dev/null +++ b/doc/api/html/check__range_8hpp.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_range.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_range.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/out_of_range.hpp>
+#include <stan/math/prim/mat/meta/index_type.hpp>
+#include <stan/math/prim/scal/meta/error_index.hpp>
+#include <sstream>
+#include <string>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

bool stan::math::check_range (const char *function, const char *name, const int max, const int index, const int nested_level, const char *error_msg)
 Return true if specified index is within range. More...
 
bool stan::math::check_range (const char *function, const char *name, const int max, const int index, const char *error_msg)
 Return true if specified index is within range. More...
 
bool stan::math::check_range (const char *function, const char *name, const int max, const int index)
 Return true if specified index is within range. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__range_8hpp_source.html b/doc/api/html/check__range_8hpp_source.html new file mode 100644 index 00000000000..059a74b4a31 --- /dev/null +++ b/doc/api/html/check__range_8hpp_source.html @@ -0,0 +1,174 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_range.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_range.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_RANGE_HPP
+
2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_RANGE_HPP
+
3 
+ + + +
7 #include <sstream>
+
8 #include <string>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
29  inline bool check_range(const char* function,
+
30  const char* name,
+
31  const int max,
+
32  const int index,
+
33  const int nested_level,
+
34  const char* error_msg) {
+
35  if ((index >= stan::error_index::value)
+
36  && (index < max + stan::error_index::value))
+
37  return true;
+
38 
+
39  std::stringstream msg;
+
40  msg << "; index position = " << nested_level;
+
41  std::string msg_str(msg.str());
+
42 
+
43  out_of_range(function, max, index, msg_str.c_str(), error_msg);
+
44  return false;
+
45  }
+
46 
+
62  inline bool check_range(const char* function,
+
63  const char* name,
+
64  const int max,
+
65  const int index,
+
66  const char* error_msg) {
+
67  if ((index >= stan::error_index::value)
+
68  && (index < max + stan::error_index::value))
+
69  return true;
+
70 
+
71  out_of_range(function, max, index, error_msg);
+
72  return false;
+
73  }
+
74 
+
89  inline bool check_range(const char* function,
+
90  const char* name,
+
91  const int max,
+
92  const int index) {
+
93  if ((index >= stan::error_index::value)
+
94  && (index < max + stan::error_index::value))
+
95  return true;
+
96 
+
97  out_of_range(function, max, index);
+
98  return false;
+
99  }
+
100 
+
101 
+
102  }
+
103 }
+
104 #endif
+ +
bool check_range(const char *function, const char *name, const int max, const int index, const int nested_level, const char *error_msg)
Return true if specified index is within range.
Definition: check_range.hpp:29
+ + +
void out_of_range(const char *function, const int max, const int index, const char *msg1="", const char *msg2="")
Throw an out_of_range exception with a consistently formatted message.
+
int max(const std::vector< int > &x)
Returns the maximum coefficient in the specified column vector.
Definition: max.hpp:21
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__row__index_8hpp.html b/doc/api/html/check__row__index_8hpp.html new file mode 100644 index 00000000000..3a2c7d5d470 --- /dev/null +++ b/doc/api/html/check__row__index_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_row_index.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_row_index.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/out_of_range.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <sstream>
+#include <string>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y , int R, int C>
bool stan::math::check_row_index (const char *function, const char *name, const Eigen::Matrix< T_y, R, C > &y, size_t i)
 Return true if the specified index is a valid row of the matrix. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__row__index_8hpp_source.html b/doc/api/html/check__row__index_8hpp_source.html new file mode 100644 index 00000000000..3a7028c24c1 --- /dev/null +++ b/doc/api/html/check__row__index_8hpp_source.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_row_index.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_row_index.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_ROW_INDEX_HPP
+
2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_ROW_INDEX_HPP
+
3 
+ + +
6 
+
7 #include <sstream>
+
8 #include <string>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
31  template <typename T_y, int R, int C>
+
32  inline bool check_row_index(const char* function,
+
33  const char* name,
+
34  const Eigen::Matrix<T_y, R, C>& y,
+
35  size_t i) {
+ +
37  && i < static_cast<size_t>(y.rows()) + stan::error_index::value)
+
38  return true;
+
39 
+
40  std::stringstream msg;
+
41  msg << " for rows of " << name;
+
42  std::string msg_str(msg.str());
+
43  out_of_range(function,
+
44  y.rows(),
+
45  i,
+
46  msg_str.c_str());
+
47  return false;
+
48  }
+
49 
+
50  }
+
51 }
+
52 #endif
+ +
bool check_row_index(const char *function, const char *name, const Eigen::Matrix< T_y, R, C > &y, size_t i)
Return true if the specified index is a valid row of the matrix.
+ +
void out_of_range(const char *function, const int max, const int index, const char *msg1="", const char *msg2="")
Throw an out_of_range exception with a consistently formatted message.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__simplex_8hpp.html b/doc/api/html/check__simplex_8hpp.html new file mode 100644 index 00000000000..7336b3bb6d5 --- /dev/null +++ b/doc/api/html/check__simplex_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_simplex.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_simplex.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/domain_error.hpp>
+#include <stan/math/prim/mat/err/constraint_tolerance.hpp>
+#include <stan/math/prim/scal/err/check_nonzero_size.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/meta/index_type.hpp>
+#include <stan/math/prim/scal/meta/error_index.hpp>
+#include <sstream>
+#include <string>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_prob >
bool stan::math::check_simplex (const char *function, const char *name, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)
 Return true if the specified vector is simplex. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__simplex_8hpp_source.html b/doc/api/html/check__simplex_8hpp_source.html new file mode 100644 index 00000000000..c46cdbae137 --- /dev/null +++ b/doc/api/html/check__simplex_8hpp_source.html @@ -0,0 +1,179 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_simplex.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_simplex.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_SIMPLEX_HPP
+
2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_SIMPLEX_HPP
+
3 
+ + + + + + +
10 #include <sstream>
+
11 #include <string>
+
12 
+
13 namespace stan {
+
14 
+
15  namespace math {
+
16 
+
40  template <typename T_prob>
+
41  bool check_simplex(const char* function,
+
42  const char* name,
+
43  const Eigen::Matrix<T_prob, Eigen::Dynamic, 1>& theta) {
+
44  using Eigen::Dynamic;
+
45  using Eigen::Matrix;
+ +
47 
+
48  typedef typename index_type<Matrix<T_prob, Dynamic, 1> >::type size_t;
+
49 
+
50  check_nonzero_size(function, name, theta);
+
51  if (!(fabs(1.0 - theta.sum()) <= CONSTRAINT_TOLERANCE)) {
+
52  std::stringstream msg;
+
53  T_prob sum = theta.sum();
+
54  msg << "is not a valid simplex.";
+
55  msg.precision(10);
+
56  msg << " sum(" << name << ") = " << sum
+
57  << ", but should be ";
+
58  std::string msg_str(msg.str());
+
59  domain_error(function, name, 1.0,
+
60  msg_str.c_str());
+
61  return false;
+
62  }
+
63  for (size_t n = 0; n < theta.size(); n++) {
+
64  if (!(theta[n] >= 0)) {
+
65  std::ostringstream msg;
+
66  msg << "is not a valid simplex. "
+
67  << name << "[" << n + stan::error_index::value << "]"
+
68  << " = ";
+
69  std::string msg_str(msg.str());
+
70  domain_error(function, name, theta[n],
+
71  msg_str.c_str(),
+
72  ", but should be greater than or equal to 0");
+
73  return false;
+
74  }
+
75  }
+
76  return true;
+
77  }
+
78  }
+
79 }
+
80 #endif
+
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:14
+ +
const double CONSTRAINT_TOLERANCE
The tolerance for checking arithmetic bounds In rank and in simplexes.
+
bool check_nonzero_size(const char *function, const char *name, const T_y &y)
Return true if the specified matrix/vector is of non-zero size.
+
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:19
+ + +
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ + +
bool check_simplex(const char *function, const char *name, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)
Return true if the specified vector is simplex.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__size__match_8hpp.html b/doc/api/html/check__size__match_8hpp.html new file mode 100644 index 00000000000..bcdfc67a383 --- /dev/null +++ b/doc/api/html/check__size__match_8hpp.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_size_match.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_size_match.hpp File Reference
+
+
+
#include <boost/type_traits/common_type.hpp>
+#include <stan/math/prim/scal/err/invalid_argument.hpp>
+#include <stan/math/prim/scal/meta/likely.hpp>
+#include <sstream>
+#include <string>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T_size1 , typename T_size2 >
bool stan::math::check_size_match (const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
 Return true if the provided sizes match. More...
 
template<typename T_size1 , typename T_size2 >
bool stan::math::check_size_match (const char *function, const char *expr_i, const char *name_i, T_size1 i, const char *expr_j, const char *name_j, T_size2 j)
 Return true if the provided sizes match. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__size__match_8hpp_source.html b/doc/api/html/check__size__match_8hpp_source.html new file mode 100644 index 00000000000..764be4c27c1 --- /dev/null +++ b/doc/api/html/check__size__match_8hpp_source.html @@ -0,0 +1,170 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/check_size_match.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_size_match.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_ERR_CHECK_SIZE_MATCH_HPP
+
2 #define STAN_MATH_PRIM_SCAL_ERR_CHECK_SIZE_MATCH_HPP
+
3 
+
4 #include <boost/type_traits/common_type.hpp>
+ + +
7 #include <sstream>
+
8 #include <string>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
29  template <typename T_size1, typename T_size2>
+
30  inline bool check_size_match(const char* function,
+
31  const char* name_i,
+
32  T_size1 i,
+
33  const char* name_j,
+
34  T_size2 j) {
+
35  if (likely(i == static_cast<T_size1>(j)))
+
36  return true;
+
37 
+
38  std::ostringstream msg;
+
39  msg << ") and "
+
40  << name_j << " (" << j << ") must match in size";
+
41  std::string msg_str(msg.str());
+
42  invalid_argument(function, name_i, i,
+
43  "(", msg_str.c_str());
+
44  return false;
+
45  }
+
46 
+
47 
+
66  template <typename T_size1, typename T_size2>
+
67  inline bool check_size_match(const char* function,
+
68  const char* expr_i,
+
69  const char* name_i,
+
70  T_size1 i,
+
71  const char* expr_j,
+
72  const char* name_j,
+
73  T_size2 j) {
+
74  if (likely(i == static_cast<T_size1>(j)))
+
75  return true;
+
76  std::ostringstream updated_name;
+
77  updated_name << expr_i << name_i;
+
78  std::string updated_name_str(updated_name.str());
+
79  std::ostringstream msg;
+
80  msg << ") and "
+
81  << expr_j << name_j
+
82  << " (" << j << ") must match in size";
+
83  std::string msg_str(msg.str());
+
84  invalid_argument(function, updated_name_str.c_str(), i,
+
85  "(", msg_str.c_str());
+
86  return false;
+
87  }
+
88 
+
89  }
+
90 }
+
91 #endif
+ +
void invalid_argument(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw an invalid_argument exception with a consistently formatted message.
+
bool check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Return true if the provided sizes match.
+ +
#define likely(x)
Definition: likely.hpp:8
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__spsd__matrix_8hpp.html b/doc/api/html/check__spsd__matrix_8hpp.html new file mode 100644 index 00000000000..4a328eab93d --- /dev/null +++ b/doc/api/html/check__spsd__matrix_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_spsd_matrix.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_spsd_matrix.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/scal/err/check_positive_size.hpp>
+#include <stan/math/prim/mat/err/check_pos_semidefinite.hpp>
+#include <stan/math/prim/mat/err/check_symmetric.hpp>
+#include <stan/math/prim/mat/err/check_square.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y >
bool stan::math::check_spsd_matrix (const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
 Return true if the specified matrix is a square, symmetric, and positive semi-definite. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__spsd__matrix_8hpp_source.html b/doc/api/html/check__spsd__matrix_8hpp_source.html new file mode 100644 index 00000000000..349a8af1a24 --- /dev/null +++ b/doc/api/html/check__spsd__matrix_8hpp_source.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_spsd_matrix.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_spsd_matrix.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_SPSD_MATRIX_HPP
+
2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_SPSD_MATRIX_HPP
+
3 
+ + + + + +
9 
+
10 namespace stan {
+
11  namespace math {
+
12  using Eigen::Dynamic;
+
30  template <typename T_y>
+
31  inline bool
+
32  check_spsd_matrix(const char* function,
+
33  const char* name,
+
34  const Eigen::Matrix<T_y, Dynamic, Dynamic>& y) {
+
35  check_square(function, name, y);
+
36  check_positive_size(function, name, "rows()", y.rows());
+
37  check_symmetric(function, name, y);
+
38  check_pos_semidefinite(function, name, y);
+
39  return true;
+
40  }
+
41 
+
42  }
+
43 }
+
44 #endif
+
bool check_positive_size(const char *function, const char *name, const char *expr, const int size)
Return true if size is positive.
+
bool check_pos_semidefinite(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is positive definite.
+
bool check_symmetric(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is symmetric.
+ + + +
bool check_spsd_matrix(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is a square, symmetric, and positive semi-definite.
+
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__square_8hpp.html b/doc/api/html/check__square_8hpp.html new file mode 100644 index 00000000000..ef4921bb53f --- /dev/null +++ b/doc/api/html/check__square_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_square.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_square.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/scal/err/check_size_match.hpp>
+#include <sstream>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y >
bool stan::math::check_square (const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
 Return true if the specified matrix is square. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__square_8hpp_source.html b/doc/api/html/check__square_8hpp_source.html new file mode 100644 index 00000000000..b1a2fc4d588 --- /dev/null +++ b/doc/api/html/check__square_8hpp_source.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_square.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_square.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_SQUARE_HPP
+
2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_SQUARE_HPP
+
3 
+ + +
6 #include <sstream>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
26  template <typename T_y>
+
27  inline bool
+
28  check_square(const char* function,
+
29  const char* name,
+
30  const Eigen::Matrix<T_y, Eigen::Dynamic, Eigen::Dynamic>& y) {
+
31  check_size_match(function,
+
32  "Expecting a square matrix; rows of ", name, y.rows(),
+
33  "columns of ", name, y.cols());
+
34  return true;
+
35  }
+
36 
+
37  }
+
38 }
+
39 #endif
+ +
bool check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Return true if the provided sizes match.
+ +
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__std__vector__index_8hpp.html b/doc/api/html/check__std__vector__index_8hpp.html new file mode 100644 index 00000000000..f04f1e4b6bf --- /dev/null +++ b/doc/api/html/check__std__vector__index_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_std_vector_index.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_std_vector_index.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/out_of_range.hpp>
+#include <sstream>
+#include <string>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
bool stan::math::check_std_vector_index (const char *function, const char *name, const std::vector< T > &y, int i)
 Return true if the specified index is valid in std vector. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__std__vector__index_8hpp_source.html b/doc/api/html/check__std__vector__index_8hpp_source.html new file mode 100644 index 00000000000..efb5d1924dd --- /dev/null +++ b/doc/api/html/check__std__vector__index_8hpp_source.html @@ -0,0 +1,143 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_std_vector_index.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_std_vector_index.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_STD_VECTOR_INDEX_HPP
+
2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_STD_VECTOR_INDEX_HPP
+
3 
+ +
5 
+
6 #include <sstream>
+
7 #include <string>
+
8 #include <vector>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
29  template <typename T>
+
30  inline bool check_std_vector_index(const char* function,
+
31  const char* name,
+
32  const std::vector<T>& y,
+
33  int i) {
+
34  if (i >= static_cast<int>(stan::error_index::value)
+
35  && i < static_cast<int>(y.size() + stan::error_index::value))
+
36  return true;
+
37 
+
38  std::stringstream msg;
+
39  msg << " for " << name;
+
40  std::string msg_str(msg.str());
+
41  out_of_range(function, y.size(), i, msg_str.c_str());
+
42  return false;
+
43  }
+
44 
+
45  }
+
46 }
+
47 #endif
+ +
bool check_std_vector_index(const char *function, const char *name, const std::vector< T > &y, int i)
Return true if the specified index is valid in std vector.
+ +
void out_of_range(const char *function, const int max, const int index, const char *msg1="", const char *msg2="")
Throw an out_of_range exception with a consistently formatted message.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__symmetric_8hpp.html b/doc/api/html/check__symmetric_8hpp.html new file mode 100644 index 00000000000..cd18fbfea95 --- /dev/null +++ b/doc/api/html/check__symmetric_8hpp.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_symmetric.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_symmetric.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/domain_error.hpp>
+#include <stan/math/prim/mat/err/check_square.hpp>
+#include <stan/math/prim/mat/err/constraint_tolerance.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/meta/index_type.hpp>
+#include <stan/math/prim/mat/fun/value_of.hpp>
+#include <stan/math/prim/scal/meta/error_index.hpp>
+#include <sstream>
+#include <string>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y >
bool stan::math::check_symmetric (const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
 Return true if the specified matrix is symmetric. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__symmetric_8hpp_source.html b/doc/api/html/check__symmetric_8hpp_source.html new file mode 100644 index 00000000000..94056fb3fe0 --- /dev/null +++ b/doc/api/html/check__symmetric_8hpp_source.html @@ -0,0 +1,186 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_symmetric.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_symmetric.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_SYMMETRIC_HPP
+
2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_SYMMETRIC_HPP
+
3 
+ + + + + + + +
11 #include <sstream>
+
12 #include <string>
+
13 
+
14 namespace stan {
+
15 
+
16  namespace math {
+
17  using Eigen::Dynamic;
+
18 
+
36  template <typename T_y>
+
37  inline bool
+
38  check_symmetric(const char* function,
+
39  const char* name,
+
40  const Eigen::Matrix<T_y, Dynamic, Dynamic>& y) {
+
41  check_square(function, name, y);
+
42 
+
43  using Eigen::Matrix;
+ +
45  using std::fabs;
+
46 
+
47  typedef typename index_type<Matrix<T_y, Dynamic, Dynamic> >::type
+
48  size_type;
+
49 
+
50  size_type k = y.rows();
+
51  if (k == 1)
+
52  return true;
+
53  for (size_type m = 0; m < k; ++m) {
+
54  for (size_type n = m + 1; n < k; ++n) {
+
55  if (!(fabs(value_of(y(m, n)) - value_of(y(n, m)))
+ +
57  std::ostringstream msg1;
+
58  msg1 << "is not symmetric. "
+
59  << name << "[" << stan::error_index::value + m << ","
+
60  << stan::error_index::value +n << "] = ";
+
61  std::string msg1_str(msg1.str());
+
62  std::ostringstream msg2;
+
63  msg2 << ", but "
+
64  << name << "[" << stan::error_index::value +n << ","
+ +
66  << "] = " << y(n, m);
+
67  std::string msg2_str(msg2.str());
+
68  domain_error(function, name, y(m, n),
+
69  msg1_str.c_str(), msg2_str.c_str());
+
70  return false;
+
71  }
+
72  }
+
73  }
+
74  return true;
+
75  }
+
76 
+
77  }
+
78 }
+
79 #endif
+
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:14
+
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
bool check_symmetric(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is symmetric.
+ +
const double CONSTRAINT_TOLERANCE
The tolerance for checking arithmetic bounds In rank and in simplexes.
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:19
+ + +
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ + + + +
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__unit__vector_8hpp.html b/doc/api/html/check__unit__vector_8hpp.html new file mode 100644 index 00000000000..4e4dac6a86c --- /dev/null +++ b/doc/api/html/check__unit__vector_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_unit_vector.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_unit_vector.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/scal/err/domain_error.hpp>
+#include <stan/math/prim/mat/err/constraint_tolerance.hpp>
+#include <stan/math/prim/scal/err/check_nonzero_size.hpp>
+#include <sstream>
+#include <string>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_prob >
bool stan::math::check_unit_vector (const char *function, const char *name, const Eigen::Matrix< T_prob, Dynamic, 1 > &theta)
 Return true if the specified vector is unit vector. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__unit__vector_8hpp_source.html b/doc/api/html/check__unit__vector_8hpp_source.html new file mode 100644 index 00000000000..aac8dba85b2 --- /dev/null +++ b/doc/api/html/check__unit__vector_8hpp_source.html @@ -0,0 +1,151 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_unit_vector.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_unit_vector.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_UNIT_VECTOR_HPP
+
2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_UNIT_VECTOR_HPP
+
3 
+ + + + +
8 #include <sstream>
+
9 #include <string>
+
10 
+
11 namespace stan {
+
12 
+
13  namespace math {
+
14  using Eigen::Dynamic;
+
15 
+
37  template <typename T_prob>
+
38  bool check_unit_vector(const char* function,
+
39  const char* name,
+
40  const Eigen::Matrix<T_prob, Dynamic, 1>& theta) {
+
41  check_nonzero_size(function, name, theta);
+
42  T_prob ssq = theta.squaredNorm();
+
43  if (!(fabs(1.0 - ssq) <= CONSTRAINT_TOLERANCE)) {
+
44  std::stringstream msg;
+
45  msg << "is not a valid unit vector."
+
46  << " The sum of the squares of the elements should be 1, but is ";
+
47  std::string msg_str(msg.str());
+
48  domain_error(function, name, ssq, msg_str.c_str());
+
49  }
+
50  return true;
+
51  }
+
52 
+
53  }
+
54 }
+
55 #endif
+
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:14
+ +
bool check_unit_vector(const char *function, const char *name, const Eigen::Matrix< T_prob, Dynamic, 1 > &theta)
Return true if the specified vector is unit vector.
+
const double CONSTRAINT_TOLERANCE
The tolerance for checking arithmetic bounds In rank and in simplexes.
+
bool check_nonzero_size(const char *function, const char *name, const T_y &y)
Return true if the specified matrix/vector is of non-zero size.
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__vector_8hpp.html b/doc/api/html/check__vector_8hpp.html new file mode 100644 index 00000000000..080d77bde18 --- /dev/null +++ b/doc/api/html/check__vector_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_vector.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
check_vector.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/return_type.hpp>
+#include <stan/math/prim/scal/meta/scalar_type.hpp>
+#include <stan/math/prim/scal/err/invalid_argument.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <sstream>
+#include <string>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T , int R, int C>
bool stan::math::check_vector (const char *function, const char *name, const Eigen::Matrix< T, R, C > &x)
 Return true if the matrix is either a row vector or column vector. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/check__vector_8hpp_source.html b/doc/api/html/check__vector_8hpp_source.html new file mode 100644 index 00000000000..4b7423a1f96 --- /dev/null +++ b/doc/api/html/check__vector_8hpp_source.html @@ -0,0 +1,154 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/check_vector.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
check_vector.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_VECTOR_HPP
+
2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_VECTOR_HPP
+
3 
+ + + + +
8 #include <sstream>
+
9 #include <string>
+
10 
+
11 namespace stan {
+
12  namespace math {
+
13 
+
33  template <typename T, int R, int C>
+
34  inline bool check_vector(const char* function,
+
35  const char* name,
+
36  const Eigen::Matrix<T, R, C>& x) {
+
37  if (R == 1)
+
38  return true;
+
39  if (C == 1)
+
40  return true;
+
41  if (x.rows() == 1 || x.cols() == 1)
+
42  return true;
+
43 
+
44  std::ostringstream msg;
+
45  msg << ") has " << x.rows() << " rows and "
+
46  << x.cols() << " columns but it should be a vector so it should "
+
47  << "either have 1 row or 1 column";
+
48  std::string msg_str(msg.str());
+
49  invalid_argument(function,
+
50  name,
+
51  typename scalar_type<T>::type(),
+
52  "(", msg_str.c_str());
+
53  return false;
+
54  }
+
55 
+
56  }
+
57 }
+
58 #endif
+
bool check_vector(const char *function, const char *name, const Eigen::Matrix< T, R, C > &x)
Return true if the matrix is either a row vector or column vector.
+ +
scalar_type_helper< is_vector< T >::value, T >::type type
Definition: scalar_type.hpp:38
+ +
void invalid_argument(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw an invalid_argument exception with a consistently formatted message.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/chi__square__ccdf__log_8hpp.html b/doc/api/html/chi__square__ccdf__log_8hpp.html new file mode 100644 index 00000000000..9f17bd8f0a1 --- /dev/null +++ b/doc/api/html/chi__square__ccdf__log_8hpp.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/chi_square_ccdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
chi_square_ccdf_log.hpp File Reference
+
+
+
#include <boost/random/chi_squared_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/fun/gamma_p.hpp>
+#include <stan/math/prim/scal/fun/digamma.hpp>
+#include <stan/math/prim/scal/meta/VectorBuilder.hpp>
+#include <stan/math/prim/scal/fun/grad_reg_inc_gamma.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <cmath>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_dof >
return_type< T_y, T_dof >::type stan::math::chi_square_ccdf_log (const T_y &y, const T_dof &nu)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/chi__square__ccdf__log_8hpp_source.html b/doc/api/html/chi__square__ccdf__log_8hpp_source.html new file mode 100644 index 00000000000..0e6847feda4 --- /dev/null +++ b/doc/api/html/chi__square__ccdf__log_8hpp_source.html @@ -0,0 +1,267 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/chi_square_ccdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
chi_square_ccdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_CHI_SQUARE_CCDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_CHI_SQUARE_CCDF_LOG_HPP
+
3 
+
4 #include <boost/random/chi_squared_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + +
19 #include <cmath>
+
20 #include <limits>
+
21 
+
22 namespace stan {
+
23 
+
24  namespace math {
+
25 
+
26  template <typename T_y, typename T_dof>
+
27  typename return_type<T_y, T_dof>::type
+
28  chi_square_ccdf_log(const T_y& y, const T_dof& nu) {
+
29  static const char* function("stan::math::chi_square_ccdf_log");
+ +
31  T_partials_return;
+
32 
+ + + + + +
38 
+
39  T_partials_return ccdf_log(0.0);
+
40 
+
41  // Size checks
+
42  if (!(stan::length(y) && stan::length(nu)))
+
43  return ccdf_log;
+
44 
+
45  check_not_nan(function, "Random variable", y);
+
46  check_nonnegative(function, "Random variable", y);
+
47  check_positive_finite(function, "Degrees of freedom parameter", nu);
+
48  check_consistent_sizes(function,
+
49  "Random variable", y,
+
50  "Degrees of freedom parameter", nu);
+
51 
+
52  // Wrap arguments in vectors
+
53  VectorView<const T_y> y_vec(y);
+
54  VectorView<const T_dof> nu_vec(nu);
+
55  size_t N = max_size(y, nu);
+
56 
+ +
58  operands_and_partials(y, nu);
+
59 
+
60  // Explicit return for extreme values
+
61  // The gradients are technically ill-defined, but treated as zero
+
62  for (size_t i = 0; i < stan::length(y); i++) {
+
63  if (value_of(y_vec[i]) == 0)
+
64  return operands_and_partials.to_var(0.0, y, nu);
+
65  }
+
66 
+
67  // Compute ccdf_log and its gradients
+
68  using stan::math::gamma_p;
+
69  using stan::math::digamma;
+
70  using boost::math::tgamma;
+
71  using std::exp;
+
72  using std::pow;
+
73  using std::log;
+
74  using std::exp;
+
75 
+
76  // Cache a few expensive function calls if nu is a parameter
+ +
78  T_partials_return, T_dof> gamma_vec(stan::length(nu));
+ +
80  T_partials_return, T_dof> digamma_vec(stan::length(nu));
+
81 
+ +
83  for (size_t i = 0; i < stan::length(nu); i++) {
+
84  const T_partials_return alpha_dbl = value_of(nu_vec[i]) * 0.5;
+
85  gamma_vec[i] = tgamma(alpha_dbl);
+
86  digamma_vec[i] = digamma(alpha_dbl);
+
87  }
+
88  }
+
89 
+
90  // Compute vectorized ccdf_log and gradient
+
91  for (size_t n = 0; n < N; n++) {
+
92  // Explicit results for extreme values
+
93  // The gradients are technically ill-defined, but treated as zero
+
94  if (value_of(y_vec[n]) == std::numeric_limits<double>::infinity())
+
95  return operands_and_partials.to_var(stan::math::negative_infinity(),
+
96  y, nu);
+
97 
+
98  // Pull out values
+
99  const T_partials_return y_dbl = value_of(y_vec[n]);
+
100  const T_partials_return alpha_dbl = value_of(nu_vec[n]) * 0.5;
+
101  const T_partials_return beta_dbl = 0.5;
+
102 
+
103  // Compute
+
104  const T_partials_return Pn = 1.0 - gamma_p(alpha_dbl, beta_dbl * y_dbl);
+
105 
+
106  ccdf_log += log(Pn);
+
107 
+ +
109  operands_and_partials.d_x1[n] -= beta_dbl * exp(-beta_dbl * y_dbl)
+
110  * pow(beta_dbl * y_dbl, alpha_dbl-1) / tgamma(alpha_dbl) / Pn;
+ +
112  operands_and_partials.d_x2[n]
+
113  += 0.5 * stan::math::grad_reg_inc_gamma(alpha_dbl, beta_dbl
+
114  * y_dbl, gamma_vec[n],
+
115  digamma_vec[n]) / Pn;
+
116  }
+
117 
+
118  return operands_and_partials.to_var(ccdf_log, y, nu);
+
119  }
+
120  }
+
121 }
+
122 #endif
+ +
return_type< T_y, T_dof >::type chi_square_ccdf_log(const T_y &y, const T_dof &nu)
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
T grad_reg_inc_gamma(T a, T z, T g, T dig, T precision=1e-6)
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
fvar< T > gamma_p(const fvar< T > &x1, const fvar< T > &x2)
Definition: gamma_p.hpp:15
+ + + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
fvar< T > tgamma(const fvar< T > &x)
Definition: tgamma.hpp:15
+
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/chi__square__cdf_8hpp.html b/doc/api/html/chi__square__cdf_8hpp.html new file mode 100644 index 00000000000..83ae0879b08 --- /dev/null +++ b/doc/api/html/chi__square__cdf_8hpp.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/chi_square_cdf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
chi_square_cdf.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/fun/gamma_p.hpp>
+#include <stan/math/prim/scal/fun/digamma.hpp>
+#include <stan/math/prim/scal/meta/VectorBuilder.hpp>
+#include <stan/math/prim/scal/fun/grad_reg_inc_gamma.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <boost/random/chi_squared_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <cmath>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y , typename T_dof >
return_type< T_y, T_dof >::type stan::math::chi_square_cdf (const T_y &y, const T_dof &nu)
 Calculates the chi square cumulative distribution function for the given variate and degrees of freedom. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/chi__square__cdf_8hpp_source.html b/doc/api/html/chi__square__cdf_8hpp_source.html new file mode 100644 index 00000000000..fc53c359bb9 --- /dev/null +++ b/doc/api/html/chi__square__cdf_8hpp_source.html @@ -0,0 +1,272 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/chi_square_cdf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
chi_square_cdf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_CHI_SQUARE_CDF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_CHI_SQUARE_CDF_HPP
+
3 
+ + + + + + + + + + + + + +
17 #include <boost/random/chi_squared_distribution.hpp>
+
18 #include <boost/random/variate_generator.hpp>
+
19 #include <cmath>
+
20 #include <limits>
+
21 
+
22 namespace stan {
+
23 
+
24  namespace math {
+
25 
+
35  template <typename T_y, typename T_dof>
+
36  typename return_type<T_y, T_dof>::type
+
37  chi_square_cdf(const T_y& y, const T_dof& nu) {
+
38  static const char* function("stan::math::chi_square_cdf");
+ +
40  T_partials_return;
+
41 
+ + + + + +
47 
+
48  T_partials_return cdf(1.0);
+
49 
+
50  // Size checks
+
51  if (!(stan::length(y) && stan::length(nu)))
+
52  return cdf;
+
53 
+
54  check_not_nan(function, "Random variable", y);
+
55  check_nonnegative(function, "Random variable", y);
+
56  check_positive_finite(function, "Degrees of freedom parameter", nu);
+
57  check_consistent_sizes(function,
+
58  "Random variable", y,
+
59  "Degrees of freedom parameter", nu);
+
60 
+
61  // Wrap arguments in vectors
+
62  VectorView<const T_y> y_vec(y);
+
63  VectorView<const T_dof> nu_vec(nu);
+
64  size_t N = max_size(y, nu);
+
65 
+ +
67  operands_and_partials(y, nu);
+
68 
+
69  // Explicit return for extreme values
+
70  // The gradients are technically ill-defined, but treated as zero
+
71  for (size_t i = 0; i < stan::length(y); i++) {
+
72  if (value_of(y_vec[i]) == 0)
+
73  return operands_and_partials.to_var(0.0, y, nu);
+
74  }
+
75 
+
76  // Compute CDF and its gradients
+
77  using stan::math::gamma_p;
+
78  using stan::math::digamma;
+
79  using boost::math::tgamma;
+
80  using std::exp;
+
81  using std::pow;
+
82  using std::exp;
+
83 
+
84  // Cache a few expensive function calls if nu is a parameter
+ +
86  T_partials_return, T_dof> gamma_vec(stan::length(nu));
+ +
88  T_partials_return, T_dof> digamma_vec(stan::length(nu));
+
89 
+ +
91  for (size_t i = 0; i < stan::length(nu); i++) {
+
92  const T_partials_return alpha_dbl = value_of(nu_vec[i]) * 0.5;
+
93  gamma_vec[i] = tgamma(alpha_dbl);
+
94  digamma_vec[i] = digamma(alpha_dbl);
+
95  }
+
96  }
+
97 
+
98  // Compute vectorized CDF and gradient
+
99  for (size_t n = 0; n < N; n++) {
+
100  // Explicit results for extreme values
+
101  // The gradients are technically ill-defined, but treated as zero
+
102  if (value_of(y_vec[n]) == std::numeric_limits<double>::infinity())
+
103  continue;
+
104 
+
105  // Pull out values
+
106  const T_partials_return y_dbl = value_of(y_vec[n]);
+
107  const T_partials_return alpha_dbl = value_of(nu_vec[n]) * 0.5;
+
108  const T_partials_return beta_dbl = 0.5;
+
109 
+
110  // Compute
+
111  const T_partials_return Pn = gamma_p(alpha_dbl, beta_dbl * y_dbl);
+
112 
+
113  cdf *= Pn;
+
114 
+ +
116  operands_and_partials.d_x1[n] += beta_dbl * exp(-beta_dbl * y_dbl)
+
117  * pow(beta_dbl * y_dbl, alpha_dbl-1) / tgamma(alpha_dbl) / Pn;
+ +
119  operands_and_partials.d_x2[n]
+
120  -= 0.5 * stan::math::grad_reg_inc_gamma(alpha_dbl, beta_dbl
+
121  * y_dbl, gamma_vec[n],
+
122  digamma_vec[n]) / Pn;
+
123  }
+
124 
+ +
126  for (size_t n = 0; n < stan::length(y); ++n)
+
127  operands_and_partials.d_x1[n] *= cdf;
+
128  }
+ +
130  for (size_t n = 0; n < stan::length(nu); ++n)
+
131  operands_and_partials.d_x2[n] *= cdf;
+
132  }
+
133 
+
134  return operands_and_partials.to_var(cdf, y, nu);
+
135  }
+
136  }
+
137 }
+
138 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
T grad_reg_inc_gamma(T a, T z, T g, T dig, T precision=1e-6)
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
fvar< T > gamma_p(const fvar< T > &x1, const fvar< T > &x2)
Definition: gamma_p.hpp:15
+ + + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
return_type< T_y, T_dof >::type chi_square_cdf(const T_y &y, const T_dof &nu)
Calculates the chi square cumulative distribution function for the given variate and degrees of freed...
+
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
fvar< T > tgamma(const fvar< T > &x)
Definition: tgamma.hpp:15
+
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/chi__square__cdf__log_8hpp.html b/doc/api/html/chi__square__cdf__log_8hpp.html new file mode 100644 index 00000000000..434b7344076 --- /dev/null +++ b/doc/api/html/chi__square__cdf__log_8hpp.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/chi_square_cdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
chi_square_cdf_log.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/fun/gamma_p.hpp>
+#include <stan/math/prim/scal/fun/digamma.hpp>
+#include <stan/math/prim/scal/meta/VectorBuilder.hpp>
+#include <stan/math/prim/scal/fun/grad_reg_inc_gamma.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <boost/random/chi_squared_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <cmath>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_dof >
return_type< T_y, T_dof >::type stan::math::chi_square_cdf_log (const T_y &y, const T_dof &nu)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/chi__square__cdf__log_8hpp_source.html b/doc/api/html/chi__square__cdf__log_8hpp_source.html new file mode 100644 index 00000000000..751561bd223 --- /dev/null +++ b/doc/api/html/chi__square__cdf__log_8hpp_source.html @@ -0,0 +1,268 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/chi_square_cdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
chi_square_cdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_CHI_SQUARE_CDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_CHI_SQUARE_CDF_LOG_HPP
+
3 
+ + + + + + + + + + + + + +
17 #include <boost/random/chi_squared_distribution.hpp>
+
18 #include <boost/random/variate_generator.hpp>
+
19 #include <cmath>
+
20 #include <limits>
+
21 
+
22 namespace stan {
+
23 
+
24  namespace math {
+
25 
+
26  template <typename T_y, typename T_dof>
+
27  typename return_type<T_y, T_dof>::type
+
28  chi_square_cdf_log(const T_y& y, const T_dof& nu) {
+
29  static const char* function("stan::math::chi_square_cdf_log");
+ +
31  T_partials_return;
+
32 
+ + + + + +
38 
+
39  T_partials_return cdf_log(0.0);
+
40 
+
41  // Size checks
+
42  if (!(stan::length(y) && stan::length(nu)))
+
43  return cdf_log;
+
44 
+
45  check_not_nan(function, "Random variable", y);
+
46  check_nonnegative(function, "Random variable", y);
+
47  check_positive_finite(function, "Degrees of freedom parameter", nu);
+
48  check_consistent_sizes(function,
+
49  "Random variable", y,
+
50  "Degrees of freedom parameter", nu);
+
51 
+
52  // Wrap arguments in vectors
+
53  VectorView<const T_y> y_vec(y);
+
54  VectorView<const T_dof> nu_vec(nu);
+
55  size_t N = max_size(y, nu);
+
56 
+ +
58  operands_and_partials(y, nu);
+
59 
+
60  // Explicit return for extreme values
+
61  // The gradients are technically ill-defined, but treated as zero
+
62  for (size_t i = 0; i < stan::length(y); i++) {
+
63  if (value_of(y_vec[i]) == 0)
+
64  return operands_and_partials.to_var(stan::math::negative_infinity(),
+
65  y, nu);
+
66  }
+
67 
+
68  // Compute cdf_log and its gradients
+
69  using stan::math::gamma_p;
+
70  using stan::math::digamma;
+
71  using boost::math::tgamma;
+
72  using std::exp;
+
73  using std::pow;
+
74  using std::log;
+
75  using std::exp;
+
76 
+
77  // Cache a few expensive function calls if nu is a parameter
+ +
79  T_partials_return, T_dof> gamma_vec(stan::length(nu));
+ +
81  T_partials_return, T_dof> digamma_vec(stan::length(nu));
+
82 
+ +
84  for (size_t i = 0; i < stan::length(nu); i++) {
+
85  const T_partials_return alpha_dbl = value_of(nu_vec[i]) * 0.5;
+
86  gamma_vec[i] = tgamma(alpha_dbl);
+
87  digamma_vec[i] = digamma(alpha_dbl);
+
88  }
+
89  }
+
90 
+
91  // Compute vectorized cdf_log and gradient
+
92  for (size_t n = 0; n < N; n++) {
+
93  // Explicit results for extreme values
+
94  // The gradients are technically ill-defined, but treated as zero
+
95  if (value_of(y_vec[n]) == std::numeric_limits<double>::infinity())
+
96  return operands_and_partials.to_var(0.0, y, nu);
+
97 
+
98  // Pull out values
+
99  const T_partials_return y_dbl = value_of(y_vec[n]);
+
100  const T_partials_return alpha_dbl = value_of(nu_vec[n]) * 0.5;
+
101  const T_partials_return beta_dbl = 0.5;
+
102 
+
103  // Compute
+
104  const T_partials_return Pn = gamma_p(alpha_dbl, beta_dbl * y_dbl);
+
105 
+
106  cdf_log += log(Pn);
+
107 
+ +
109  operands_and_partials.d_x1[n] += beta_dbl * exp(-beta_dbl * y_dbl)
+
110  * pow(beta_dbl * y_dbl, alpha_dbl-1) / tgamma(alpha_dbl) / Pn;
+ +
112  operands_and_partials.d_x2[n]
+
113  -= 0.5 * stan::math::grad_reg_inc_gamma(alpha_dbl, beta_dbl
+
114  * y_dbl, gamma_vec[n],
+
115  digamma_vec[n]) / Pn;
+
116  }
+
117 
+
118  return operands_and_partials.to_var(cdf_log, y, nu);
+
119  }
+
120 
+
121  }
+
122 }
+
123 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
T grad_reg_inc_gamma(T a, T z, T g, T dig, T precision=1e-6)
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
A variable implementation that stores operands and derivatives with respect to the variable...
+
return_type< T_y, T_dof >::type chi_square_cdf_log(const T_y &y, const T_dof &nu)
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
fvar< T > gamma_p(const fvar< T > &x1, const fvar< T > &x2)
Definition: gamma_p.hpp:15
+ + + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
fvar< T > tgamma(const fvar< T > &x)
Definition: tgamma.hpp:15
+
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/chi__square__log_8hpp.html b/doc/api/html/chi__square__log_8hpp.html new file mode 100644 index 00000000000..2b5653ba677 --- /dev/null +++ b/doc/api/html/chi__square__log_8hpp.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/chi_square_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
chi_square_log.hpp File Reference
+
+
+
#include <boost/random/chi_squared_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/fun/gamma_p.hpp>
+#include <stan/math/prim/scal/fun/digamma.hpp>
+#include <stan/math/prim/scal/meta/VectorBuilder.hpp>
+#include <stan/math/prim/scal/fun/grad_reg_inc_gamma.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_dof >
return_type< T_y, T_dof >::type stan::math::chi_square_log (const T_y &y, const T_dof &nu)
 The log of a chi-squared density for y with the specified degrees of freedom parameter. More...
 
template<typename T_y , typename T_dof >
return_type< T_y, T_dof >::type stan::math::chi_square_log (const T_y &y, const T_dof &nu)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/chi__square__log_8hpp_source.html b/doc/api/html/chi__square__log_8hpp_source.html new file mode 100644 index 00000000000..97ba3fcc7ab --- /dev/null +++ b/doc/api/html/chi__square__log_8hpp_source.html @@ -0,0 +1,276 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/chi_square_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
chi_square_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_CHI_SQUARE_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_CHI_SQUARE_LOG_HPP
+
3 
+
4 #include <boost/random/chi_squared_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + +
19 #include <cmath>
+
20 
+
21 namespace stan {
+
22 
+
23  namespace math {
+
24 
+
44  template <bool propto,
+
45  typename T_y, typename T_dof>
+
46  typename return_type<T_y, T_dof>::type
+
47  chi_square_log(const T_y& y, const T_dof& nu) {
+
48  static const char* function("stan::math::chi_square_log");
+ +
50  T_partials_return;
+
51 
+
52  // check if any vectors are zero length
+
53  if (!(stan::length(y)
+
54  && stan::length(nu)))
+
55  return 0.0;
+
56 
+ + + + + +
62 
+
63  T_partials_return logp(0.0);
+
64  check_not_nan(function, "Random variable", y);
+
65  check_nonnegative(function, "Random variable", y);
+
66  check_positive_finite(function, "Degrees of freedom parameter", nu);
+
67  check_consistent_sizes(function,
+
68  "Random variable", y,
+
69  "Degrees of freedom parameter", nu);
+
70 
+
71 
+
72  // set up template expressions wrapping scalars into vector views
+
73  VectorView<const T_y> y_vec(y);
+
74  VectorView<const T_dof> nu_vec(nu);
+
75  size_t N = max_size(y, nu);
+
76 
+
77  for (size_t n = 0; n < length(y); n++)
+
78  if (value_of(y_vec[n]) < 0)
+
79  return LOG_ZERO;
+
80 
+
81  // check if no variables are involved and prop-to
+ +
83  return 0.0;
+
84 
+ +
86  using boost::math::lgamma;
+ +
88  using std::log;
+
89 
+ +
91  T_partials_return, T_y> log_y(length(y));
+
92  for (size_t i = 0; i < length(y); i++)
+ +
94  log_y[i] = log(value_of(y_vec[i]));
+
95 
+ +
97  T_partials_return, T_y> inv_y(length(y));
+
98  for (size_t i = 0; i < length(y); i++)
+ +
100  inv_y[i] = 1.0 / value_of(y_vec[i]);
+
101 
+ +
103  T_partials_return, T_dof> lgamma_half_nu(length(nu));
+ +
105  T_partials_return, T_dof>
+
106  digamma_half_nu_over_two(length(nu));
+
107 
+
108  for (size_t i = 0; i < length(nu); i++) {
+
109  T_partials_return half_nu = 0.5 * value_of(nu_vec[i]);
+ +
111  lgamma_half_nu[i] = lgamma(half_nu);
+ +
113  digamma_half_nu_over_two[i] = digamma(half_nu) * 0.5;
+
114  }
+
115 
+
116  OperandsAndPartials<T_y, T_dof> operands_and_partials(y, nu);
+
117 
+
118  for (size_t n = 0; n < N; n++) {
+
119  const T_partials_return y_dbl = value_of(y_vec[n]);
+
120  const T_partials_return half_y = 0.5 * y_dbl;
+
121  const T_partials_return nu_dbl = value_of(nu_vec[n]);
+
122  const T_partials_return half_nu = 0.5 * nu_dbl;
+ +
124  logp += nu_dbl * NEG_LOG_TWO_OVER_TWO - lgamma_half_nu[n];
+ +
126  logp += (half_nu-1.0) * log_y[n];
+ +
128  logp -= half_y;
+
129 
+ +
131  operands_and_partials.d_x1[n] += (half_nu-1.0)*inv_y[n] - 0.5;
+
132  }
+ +
134  operands_and_partials.d_x2[n] += NEG_LOG_TWO_OVER_TWO
+
135  - digamma_half_nu_over_two[n] + log_y[n]*0.5;
+
136  }
+
137  }
+
138  return operands_and_partials.to_var(logp, y, nu);
+
139  }
+
140 
+
141  template <typename T_y, typename T_dof>
+
142  inline
+ +
144  chi_square_log(const T_y& y, const T_dof& nu) {
+
145  return chi_square_log<false>(y, nu);
+
146  }
+
147 
+
148  }
+
149 }
+
150 #endif
+ +
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
const double LOG_ZERO
Definition: constants.hpp:175
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
return_type< T_y, T_dof >::type chi_square_log(const T_y &y, const T_dof &nu)
The log of a chi-squared density for y with the specified degrees of freedom parameter.
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + +
fvar< T > multiply_log(const fvar< T > &x1, const fvar< T > &x2)
+ + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
const double NEG_LOG_TWO_OVER_TWO
Definition: constants.hpp:191
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/chi__square__rng_8hpp.html b/doc/api/html/chi__square__rng_8hpp.html new file mode 100644 index 00000000000..5b5c6a7f7fb --- /dev/null +++ b/doc/api/html/chi__square__rng_8hpp.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/chi_square_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
chi_square_rng.hpp File Reference
+
+
+
#include <boost/random/chi_squared_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/fun/gamma_p.hpp>
+#include <stan/math/prim/scal/fun/digamma.hpp>
+#include <stan/math/prim/scal/fun/grad_reg_inc_gamma.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
double stan::math::chi_square_rng (const double nu, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/chi__square__rng_8hpp_source.html b/doc/api/html/chi__square__rng_8hpp_source.html new file mode 100644 index 00000000000..db6933c53b9 --- /dev/null +++ b/doc/api/html/chi__square__rng_8hpp_source.html @@ -0,0 +1,164 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/chi_square_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
chi_square_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_CHI_SQUARE_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_CHI_SQUARE_RNG_HPP
+
3 
+
4 #include <boost/random/chi_squared_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + +
18 
+
19 namespace stan {
+
20 
+
21  namespace math {
+
22 
+
23  template <class RNG>
+
24  inline double
+
25  chi_square_rng(const double nu,
+
26  RNG& rng) {
+
27  using boost::variate_generator;
+
28  using boost::random::chi_squared_distribution;
+
29 
+
30  static const char* function("stan::math::chi_square_rng");
+
31 
+ +
33 
+
34  check_positive_finite(function, "Degrees of freedom parameter", nu);
+
35 
+
36  variate_generator<RNG&, chi_squared_distribution<> >
+
37  chi_square_rng(rng, chi_squared_distribution<>(nu));
+
38  return chi_square_rng();
+
39  }
+
40  }
+
41 }
+
42 #endif
+ +
double chi_square_rng(const double nu, RNG &rng)
+ + + + + + + + + + + +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/child__type_8hpp.html b/doc/api/html/child__type_8hpp.html new file mode 100644 index 00000000000..0284563dedf --- /dev/null +++ b/doc/api/html/child__type_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/child_type.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Classes | +Namespaces
+
+
child_type.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Classes

struct  stan::math::child_type< T >
 Primary template class for metaprogram to compute child type of T. More...
 
struct  stan::math::child_type< T_struct< T_child > >
 Specialization for template classes / structs. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/child__type_8hpp_source.html b/doc/api/html/child__type_8hpp_source.html new file mode 100644 index 00000000000..33743d5a385 --- /dev/null +++ b/doc/api/html/child__type_8hpp_source.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/child_type.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
child_type.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_CHILD_TYPE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_CHILD_TYPE_HPP
+
3 
+
4 namespace stan {
+
5 
+
6  namespace math {
+
7 
+
18  template <typename T>
+
19  struct child_type {
+
20  typedef double type;
+
21  };
+
22 
+
33  template <template<typename> class T_struct, typename T_child>
+
34  struct child_type<T_struct<T_child> >{
+
35  typedef T_child type;
+
36  };
+
37 
+
38  }
+
39 }
+
40 
+
41 
+
42 #endif
+ + +
Primary template class for metaprogram to compute child type of T.
Definition: child_type.hpp:19
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cholesky__corr__constrain_8hpp.html b/doc/api/html/cholesky__corr__constrain_8hpp.html new file mode 100644 index 00000000000..d0a37206c29 --- /dev/null +++ b/doc/api/html/cholesky__corr__constrain_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/cholesky_corr_constrain.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
cholesky_corr_constrain.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/scal/fun/log1m.hpp>
+#include <stan/math/prim/scal/fun/square.hpp>
+#include <stan/math/prim/scal/fun/corr_constrain.hpp>
+#include <cmath>
+#include <iostream>
+#include <stdexcept>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::cholesky_corr_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y, int K)
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::cholesky_corr_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y, int K, T &lp)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cholesky__corr__constrain_8hpp_source.html b/doc/api/html/cholesky__corr__constrain_8hpp_source.html new file mode 100644 index 00000000000..1c5d8a38794 --- /dev/null +++ b/doc/api/html/cholesky__corr__constrain_8hpp_source.html @@ -0,0 +1,218 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/cholesky_corr_constrain.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
cholesky_corr_constrain.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_CHOLESKY_CORR_CONSTRAIN_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_CHOLESKY_CORR_CONSTRAIN_HPP
+
3 
+ + + + +
8 #include <cmath>
+
9 #include <iostream>
+
10 #include <stdexcept>
+
11 
+
12 namespace stan {
+
13 
+
14  namespace math {
+
15 
+
16  // CHOLESKY CORRELATION MATRIX
+
17 
+
18  template <typename T>
+
19  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
20  cholesky_corr_constrain(const Eigen::Matrix<T, Eigen::Dynamic, 1>& y,
+
21  int K) {
+
22  using std::sqrt;
+
23  using Eigen::Matrix;
+
24  using Eigen::Dynamic;
+
25  using stan::math::square;
+
26  int k_choose_2 = (K * (K - 1)) / 2;
+
27  if (k_choose_2 != y.size()) {
+
28  throw std::domain_error("y is not a valid unconstrained cholesky "
+
29  "correlation matrix."
+
30  "Require (K choose 2) elements in y.");
+
31  }
+
32  Matrix<T, Dynamic, 1> z(k_choose_2);
+
33  for (int i = 0; i < k_choose_2; ++i)
+
34  z(i) = corr_constrain(y(i));
+
35  Matrix<T, Dynamic, Dynamic> x(K, K);
+
36  if (K == 0) return x;
+
37  T zero(0);
+
38  for (int j = 1; j < K; ++j)
+
39  for (int i = 0; i < j; ++i)
+
40  x(i, j) = zero;
+
41  x(0, 0) = 1;
+
42  int k = 0;
+
43  for (int i = 1; i < K; ++i) {
+
44  x(i, 0) = z(k++);
+
45  T sum_sqs(square(x(i, 0)));
+
46  for (int j = 1; j < i; ++j) {
+
47  x(i, j) = z(k++) * sqrt(1.0 - sum_sqs);
+
48  sum_sqs += square(x(i, j));
+
49  }
+
50  x(i, i) = sqrt(1.0 - sum_sqs);
+
51  }
+
52  return x;
+
53  }
+
54 
+
55  // FIXME to match above after debugged
+
56  template <typename T>
+
57  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
58  cholesky_corr_constrain(const Eigen::Matrix<T, Eigen::Dynamic, 1>& y,
+
59  int K,
+
60  T& lp) {
+
61  using std::sqrt;
+
62  using Eigen::Matrix;
+
63  using Eigen::Dynamic;
+
64  using stan::math::log1m;
+
65  using stan::math::square;
+
66  int k_choose_2 = (K * (K - 1)) / 2;
+
67  if (k_choose_2 != y.size()) {
+
68  throw std::domain_error("y is not a valid unconstrained cholesky "
+
69  "correlation matrix."
+
70  " Require (K choose 2) elements in y.");
+
71  }
+
72  Matrix<T, Dynamic, 1> z(k_choose_2);
+
73  for (int i = 0; i < k_choose_2; ++i)
+
74  z(i) = corr_constrain(y(i), lp);
+
75  Matrix<T, Dynamic, Dynamic> x(K, K);
+
76  if (K == 0) return x;
+
77  T zero(0);
+
78  for (int j = 1; j < K; ++j)
+
79  for (int i = 0; i < j; ++i)
+
80  x(i, j) = zero;
+
81  x(0, 0) = 1;
+
82  int k = 0;
+
83  for (int i = 1; i < K; ++i) {
+
84  x(i, 0) = z(k++);
+
85  T sum_sqs = square(x(i, 0));
+
86  for (int j = 1; j < i; ++j) {
+
87  lp += 0.5 * log1m(sum_sqs);
+
88  x(i, j) = z(k++) * sqrt(1.0 - sum_sqs);
+
89  sum_sqs += square(x(i, j));
+
90  }
+
91  x(i, i) = sqrt(1.0 - sum_sqs);
+
92  }
+
93  return x;
+
94  }
+
95 
+
96  }
+
97 
+
98 }
+
99 
+
100 #endif
+
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+ +
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+ + +
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > cholesky_corr_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y, int K)
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ +
fvar< T > log1m(const fvar< T > &x)
Definition: log1m.hpp:16
+
T corr_constrain(const T x)
Return the result of transforming the specified scalar to have a valid correlation value between -1 a...
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cholesky__corr__free_8hpp.html b/doc/api/html/cholesky__corr__free_8hpp.html new file mode 100644 index 00000000000..e2178fc4fee --- /dev/null +++ b/doc/api/html/cholesky__corr__free_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/cholesky_corr_free.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
cholesky_corr_free.hpp File Reference
+
+
+
#include <stan/math/prim/mat/err/check_square.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/scal/fun/corr_constrain.hpp>
+#include <stan/math/prim/scal/fun/square.hpp>
+#include <stan/math/prim/scal/fun/corr_free.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::cholesky_corr_free (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cholesky__corr__free_8hpp_source.html b/doc/api/html/cholesky__corr__free_8hpp_source.html new file mode 100644 index 00000000000..b294f24b917 --- /dev/null +++ b/doc/api/html/cholesky__corr__free_8hpp_source.html @@ -0,0 +1,163 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/cholesky_corr_free.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
cholesky_corr_free.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_CHOLESKY_CORR_FREE_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_CHOLESKY_CORR_FREE_HPP
+
3 
+ + + + + +
9 #include <cmath>
+
10 
+
11 namespace stan {
+
12 
+
13  namespace math {
+
14 
+
15 
+
16  template <typename T>
+
17  Eigen::Matrix<T, Eigen::Dynamic, 1>
+
18  cholesky_corr_free(const Eigen::Matrix
+
19  <T, Eigen::Dynamic, Eigen::Dynamic>& x) {
+
20  using std::sqrt;
+
21  using Eigen::Matrix;
+
22  using Eigen::Dynamic;
+
23  using stan::math::square;
+
24 
+
25  stan::math::check_square("cholesky_corr_free", "x", x);
+
26  // should validate lower-triangular, unit lengths
+
27 
+
28  int K = (x.rows() * (x.rows() - 1)) / 2;
+
29  Matrix<T, Dynamic, 1> z(K);
+
30  int k = 0;
+
31  for (int i = 1; i < x.rows(); ++i) {
+
32  z(k++) = corr_free(x(i, 0));
+
33  double sum_sqs = square(x(i, 0));
+
34  for (int j = 1; j < i; ++j) {
+
35  z(k++) = corr_free(x(i, j) / sqrt(1.0 - sum_sqs));
+
36  sum_sqs += square(x(i, j));
+
37  }
+
38  }
+
39  return z;
+
40  }
+
41  }
+
42 
+
43 }
+
44 
+
45 #endif
+
Eigen::Matrix< T, Eigen::Dynamic, 1 > cholesky_corr_free(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &x)
+
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
T corr_free(const T y)
Return the unconstrained scalar that when transformed to a valid correlation produces the specified v...
Definition: corr_free.hpp:29
+ +
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+ + +
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cholesky__factor__constrain_8hpp.html b/doc/api/html/cholesky__factor__constrain_8hpp.html new file mode 100644 index 00000000000..183cbe2acb5 --- /dev/null +++ b/doc/api/html/cholesky__factor__constrain_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/cholesky_factor_constrain.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
cholesky_factor_constrain.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/fun/sum.hpp>
+#include <cmath>
+#include <stdexcept>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::cholesky_factor_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, int M, int N)
 Return the Cholesky factor of the specified size read from the specified vector. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::cholesky_factor_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, int M, int N, T &lp)
 Return the Cholesky factor of the specified size read from the specified vector and increment the specified log probability reference with the log Jacobian adjustment of the transform. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cholesky__factor__constrain_8hpp_source.html b/doc/api/html/cholesky__factor__constrain_8hpp_source.html new file mode 100644 index 00000000000..387d567147b --- /dev/null +++ b/doc/api/html/cholesky__factor__constrain_8hpp_source.html @@ -0,0 +1,187 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/cholesky_factor_constrain.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
cholesky_factor_constrain.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_CHOLESKY_FACTOR_CONSTRAIN_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_CHOLESKY_FACTOR_CONSTRAIN_HPP
+
3 
+ + +
6 #include <cmath>
+
7 #include <stdexcept>
+
8 #include <vector>
+
9 
+
10 namespace stan {
+
11 
+
12  namespace math {
+
13 
+
14  // CHOLESKY FACTOR
+
15 
+
27  template <typename T>
+
28  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
29  cholesky_factor_constrain(const Eigen::Matrix<T, Eigen::Dynamic, 1>& x,
+
30  int M,
+
31  int N) {
+
32  using std::exp;
+
33  if (M < N)
+
34  throw std::domain_error("cholesky_factor_constrain: "
+
35  "num rows must be >= num cols");
+
36  if (x.size() != ((N * (N + 1)) / 2 + (M - N) * N))
+
37  throw std::domain_error("cholesky_factor_constrain: x.size() must"
+
38  " be (N * (N + 1)) / 2 + (M - N) * N");
+
39  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> y(M, N);
+
40  T zero(0);
+
41  int pos = 0;
+
42  // upper square
+
43  for (int m = 0; m < N; ++m) {
+
44  for (int n = 0; n < m; ++n)
+
45  y(m, n) = x(pos++);
+
46  y(m, m) = exp(x(pos++));
+
47  for (int n = m + 1; n < N; ++n)
+
48  y(m, n) = zero;
+
49  }
+
50  // lower rectangle
+
51  for (int m = N; m < M; ++m)
+
52  for (int n = 0; n < N; ++n)
+
53  y(m, n) = x(pos++);
+
54  return y;
+
55  }
+
56 
+
71  template <typename T>
+
72  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
73  cholesky_factor_constrain(const Eigen::Matrix<T, Eigen::Dynamic, 1>& x,
+
74  int M,
+
75  int N,
+
76  T& lp) {
+
77  // cut-and-paste from above, so checks twice
+
78 
+
79  using stan::math::sum;
+
80  if (x.size() != ((N * (N + 1)) / 2 + (M - N) * N))
+
81  throw std::domain_error("cholesky_factor_constrain: x.size() "
+
82  "must be (k choose 2) + k");
+
83  int pos = 0;
+
84  std::vector<T> log_jacobians(N);
+
85  for (int n = 0; n < N; ++n) {
+
86  pos += n;
+
87  log_jacobians[n] = x(pos++);
+
88  }
+
89  lp += sum(log_jacobians); // optimized for autodiff vs. direct lp +=
+
90  return cholesky_factor_constrain(x, M, N);
+
91  }
+
92 
+
93 
+
94  }
+
95 
+
96 }
+
97 
+
98 #endif
+
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > cholesky_factor_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, int M, int N)
Return the Cholesky factor of the specified size read from the specified vector.
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cholesky__factor__free_8hpp.html b/doc/api/html/cholesky__factor__free_8hpp.html new file mode 100644 index 00000000000..ff05b2fcea6 --- /dev/null +++ b/doc/api/html/cholesky__factor__free_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/cholesky_factor_free.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
cholesky_factor_free.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/err/check_cholesky_factor.hpp>
+#include <cmath>
+#include <stdexcept>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::cholesky_factor_free (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &y)
 Return the unconstrained vector of parameters correspdonding to the specified Cholesky factor. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cholesky__factor__free_8hpp_source.html b/doc/api/html/cholesky__factor__free_8hpp_source.html new file mode 100644 index 00000000000..5c347c64854 --- /dev/null +++ b/doc/api/html/cholesky__factor__free_8hpp_source.html @@ -0,0 +1,158 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/cholesky_factor_free.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
cholesky_factor_free.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_CHOLESKY_FACTOR_FREE_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_CHOLESKY_FACTOR_FREE_HPP
+
3 
+ + +
6 #include <cmath>
+
7 #include <stdexcept>
+
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
22  template <typename T>
+
23  Eigen::Matrix<T, Eigen::Dynamic, 1>
+
24  cholesky_factor_free(const Eigen::Matrix
+
25  <T, Eigen::Dynamic, Eigen::Dynamic>& y) {
+
26  using std::log;
+
27  if (!stan::math::check_cholesky_factor("cholesky_factor_free", "y", y))
+
28  throw std::domain_error("cholesky_factor_free: "
+
29  "y is not a Cholesky factor");
+
30  int M = y.rows();
+
31  int N = y.cols();
+
32  Eigen::Matrix<T, Eigen::Dynamic, 1> x((N * (N + 1)) / 2 + (M - N) * N);
+
33  int pos = 0;
+
34  // lower triangle of upper square
+
35  for (int m = 0; m < N; ++m) {
+
36  for (int n = 0; n < m; ++n)
+
37  x(pos++) = y(m, n);
+
38  // diagonal of upper square
+
39  x(pos++) = log(y(m, m));
+
40  }
+
41  // lower rectangle
+
42  for (int m = N; m < M; ++m)
+
43  for (int n = 0; n < N; ++n)
+
44  x(pos++) = y(m, n);
+
45  return x;
+
46  }
+
47 
+
48 
+
49  }
+
50 
+
51 }
+
52 
+
53 #endif
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
Eigen::Matrix< T, Eigen::Dynamic, 1 > cholesky_factor_free(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &y)
Return the unconstrained vector of parameters correspdonding to the specified Cholesky factor...
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ +
bool check_cholesky_factor(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is a valid Cholesky factor.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classes.html b/doc/api/html/classes.html new file mode 100644 index 00000000000..33b650ed825 --- /dev/null +++ b/doc/api/html/classes.html @@ -0,0 +1,171 @@ + + + + + + +Stan Math Library: Class Index + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
+
Class Index
+
+
+
A | B | C | D | E | F | G | I | L | N | O | P | R | S | V | W
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  A  
+
chainable_alloc (stan::math)   index_type (stan::math)   op_vdv_vari (stan::math)   
  s  
+
child_type (stan::math)   index_type< const T > (stan::math)   op_vector_vari (stan::math)   
AutodiffStackStorage (stan::math)   child_type< T_struct< T_child > > (stan::math)   index_type< Eigen::Matrix< T, R, C > > (stan::math)   op_vv_vari (stan::math)   scalar_product_traits< double, stan::math::var > (Eigen::internal)   
  L  
+
cholesky_decompose_v_vari (stan::math)   index_type< std::vector< T > > (stan::math)   op_vvd_vari (stan::math)   scalar_product_traits< stan::math::var, double > (Eigen::internal)   
common_type (stan::math)   is_constant (stan)   op_vvv_vari (stan::math)   scalar_type (stan)   
LDLT_alloc (stan::math)   common_type< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > > (stan::math)   is_constant_struct (stan)   
  p  
+
scalar_type< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > > (stan)   
LDLT_factor (stan::math)   common_type< std::vector< T1 >, std::vector< T2 > > (stan::math)   is_constant_struct< Eigen::Block< T > > (stan)   scalar_type< T * > (stan)   
LDLT_factor< stan::math::var, R, C > (stan::math)   container_view (stan::math)   is_constant_struct< Eigen::Matrix< T, R, C > > (stan)   partials_return_type (stan)   scalar_type_pre (stan)   
LDLT_factor< T, R, C > (stan::math)   container_view< dummy, T2 > (stan::math)   is_constant_struct< std::vector< T > > (stan)   partials_type (stan)   seq_view (stan::math)   
  N  
+
container_view< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > > (stan::math)   is_fvar (stan)   partials_type< stan::math::fvar< T > > (stan)   seq_view< double, std::vector< int > > (stan::math)   
container_view< Eigen::Matrix< T1, R, C >, T2 > (stan::math)   is_fvar< stan::math::fvar< T > > (stan)   partials_type< stan::math::var > (stan)   seq_view< T, Eigen::Matrix< S, 1, Eigen::Dynamic > > (stan::math)   
NumTraits< stan::math::fvar< T > > (Eigen)   container_view< std::vector< Eigen::Matrix< T1, R, C > >, Eigen::Matrix< T2, R, C > > (stan::math)   is_var (stan)   partials_vari (stan::math)   seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > > (stan::math)   
NumTraits< stan::math::var > (Eigen)   container_view< std::vector< T1 >, T2 > (stan::math)   is_var< stan::math::var > (stan)   pass_type (stan::math)   seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > > (stan::math)   
  O  
+
contains_fvar (stan)   is_var_or_arithmetic (stan)   pass_type< double > (stan::math)   seq_view< T, std::vector< S > > (stan::math)   
contains_nonconstant_struct (stan)   is_vector (stan)   pass_type< int > (stan::math)   seq_view< T, std::vector< std::vector< T > > > (stan::math)   
OperandsAndPartials (stan::math)   contains_vector (stan)   is_vector< const T > (stan)   precomp_v_vari (stan::math)   seq_view< T, std::vector< T > > (stan::math)   
  V  
+
coupled_ode_observer (stan::math)   is_vector< Eigen::Block< T > > (stan)   precomp_vv_vari (stan::math)   significant_decimals_default_impl< stan::math::fvar< T >, false > (Eigen::internal)   
coupled_ode_system (stan::math)   is_vector< Eigen::Matrix< T, 1, Eigen::Dynamic > > (stan)   precomp_vvv_vari (stan::math)   significant_decimals_default_impl< stan::math::var, false > (Eigen::internal)   
VectorBuilder (stan)   coupled_ode_system< F, double, double > (stan::math)   is_vector< Eigen::Matrix< T, Eigen::Dynamic, 1 > > (stan)   precomputed_gradients_vari (stan::math)   size_of_helper (stan)   
VectorBuilderHelper (stan)   coupled_ode_system< F, double, stan::math::var > (stan::math)   is_vector< std::vector< T > > (stan)   promote_scalar_struct (stan::math)   size_of_helper< T, true > (stan)   
VectorBuilderHelper< T1, true, false > (stan)   coupled_ode_system< F, stan::math::var, double > (stan::math)   is_vector_like (stan)   promote_scalar_struct< T, Eigen::Matrix< S, 1,-1 > > (stan::math)   stack_alloc (stan::math)   
VectorBuilderHelper< T1, true, true > (stan)   coupled_ode_system< F, stan::math::var, stan::math::var > (stan::math)   is_vector_like< const T > (stan)   promote_scalar_struct< T, Eigen::Matrix< S,-1, 1 > > (stan::math)   store_type (stan::math)   
VectorView (stan)   
  d  
+
is_vector_like< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > > (stan)   promote_scalar_struct< T, Eigen::Matrix< S,-1,-1 > > (stan::math)   store_type< double > (stan::math)   
VectorView< const double, false, false > (stan)   is_vector_like< T * > (stan)   promote_scalar_struct< T, std::vector< S > > (stan::math)   store_type< int > (stan::math)   
VectorView< const T, is_array, throw_if_accessed > (stan)   dummy (stan::math)   
  n  
+
promote_scalar_struct< T, T > (stan::math)   stored_gradient_vari (stan::math)   
VectorViewMvt (stan)   
  e  
+
promote_scalar_type (stan::math)   sum_eigen_v_vari (stan::math)   
VectorViewMvt< const T, is_array, throw_if_accessed > (stan)   numeric_limits< stan::math::fvar< T > > (std)   promote_scalar_type< T, Eigen::Matrix< S, 1, Eigen::Dynamic > > (stan::math)   sum_v_vari (stan::math)   
  a  
+
error_index (stan)   numeric_limits< stan::math::var > (std)   promote_scalar_type< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > > (stan::math)   
  v  
+
  f  
+
  o  
+
promote_scalar_type< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > > (stan::math)   
accumulator (stan::math)   promote_scalar_type< T, std::vector< S > > (stan::math)   value_type (stan::math)   
array_builder (stan::math)   fvar (stan::math)   op_ddv_vari (stan::math)   promoter (stan::math)   value_type< const T > (stan::math)   
  b  
+
  g  
+
op_dv_vari (stan::math)   promoter< Eigen::Matrix< F, R, C >, Eigen::Matrix< T, R, C > > (stan::math)   value_type< Eigen::Matrix< T, R, C > > (stan::math)   
op_dvd_vari (stan::math)   promoter< Eigen::Matrix< T, R, C >, Eigen::Matrix< T, R, C > > (stan::math)   value_type< std::vector< T > > (stan::math)   
bounded (stan::math::detail)   general_matrix_matrix_product< Index, stan::math::var, LhsStorageOrder, ConjugateLhs, stan::math::var, RhsStorageOrder, ConjugateRhs, ColMajor > (Eigen::internal)   op_dvv_vari (stan::math)   promoter< std::vector< F >, std::vector< T > > (stan::math)   var (stan::math)   
bounded< T_y, T_low, T_high, true > (stan::math::detail)   general_matrix_vector_product< Index, stan::math::var, ColMajor, ConjugateLhs, stan::math::var, ConjugateRhs > (Eigen::internal)   op_matrix_vari (stan::math)   promoter< std::vector< T >, std::vector< T > > (stan::math)   vari (stan::math)   
  c  
+
general_matrix_vector_product< Index, stan::math::var, RowMajor, ConjugateLhs, stan::math::var, ConjugateRhs > (Eigen::internal)   op_v_vari (stan::math)   promoter< T, T > (stan::math)   
  w  
+
gevv_vvv_vari (stan::math)   op_vd_vari (stan::math)   
  r  
+
chainable (stan::math)   
  i  
+
op_vdd_vari (stan::math)   welford_covar_estimator (stan::math)   
return_type (stan)   
include_summand (stan::math)   
+
A | B | C | D | E | F | G | I | L | N | O | P | R | S | V | W
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1_vector_builder-members.html b/doc/api/html/classstan_1_1_vector_builder-members.html new file mode 100644 index 00000000000..6f466343ef7 --- /dev/null +++ b/doc/api/html/classstan_1_1_vector_builder-members.html @@ -0,0 +1,116 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::VectorBuilder< used, T1, T2, T3, T4, T5, T6, T7 > Member List
+
+
+ +

This is the complete list of members for stan::VectorBuilder< used, T1, T2, T3, T4, T5, T6, T7 >, including all inherited members.

+ + + + +
astan::VectorBuilder< used, T1, T2, T3, T4, T5, T6, T7 >
operator[](size_t i)stan::VectorBuilder< used, T1, T2, T3, T4, T5, T6, T7 >inline
VectorBuilder(size_t n)stan::VectorBuilder< used, T1, T2, T3, T4, T5, T6, T7 >inlineexplicit
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1_vector_builder.html b/doc/api/html/classstan_1_1_vector_builder.html new file mode 100644 index 00000000000..f302f6f965b --- /dev/null +++ b/doc/api/html/classstan_1_1_vector_builder.html @@ -0,0 +1,215 @@ + + + + + + +Stan Math Library: stan::VectorBuilder< used, T1, T2, T3, T4, T5, T6, T7 > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +Public Attributes | +List of all members
+
+
stan::VectorBuilder< used, T1, T2, T3, T4, T5, T6, T7 > Class Template Reference
+
+
+ +

#include <VectorBuilder.hpp>

+ + + + + + +

+Public Member Functions

 VectorBuilder (size_t n)
 
T1 & operator[] (size_t i)
 
+ + + +

+Public Attributes

VectorBuilderHelper< T1, used,
+contains_vector< T2, T3, T4,
+T5, T6, T7 >::value > 
a
 
+

Detailed Description

+

template<bool used, typename T1, typename T2, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double, typename T7 = double>
+class stan::VectorBuilder< used, T1, T2, T3, T4, T5, T6, T7 >

+ + +

Definition at line 61 of file VectorBuilder.hpp.

+

Constructor & Destructor Documentation

+ +
+
+
+template<bool used, typename T1, typename T2, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double, typename T7 = double>
+ + + + + +
+ + + + + + + + +
stan::VectorBuilder< used, T1, T2, T3, T4, T5, T6, T7 >::VectorBuilder (size_t n)
+
+inlineexplicit
+
+ +

Definition at line 65 of file VectorBuilder.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<bool used, typename T1, typename T2, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double, typename T7 = double>
+ + + + + +
+ + + + + + + + +
T1& stan::VectorBuilder< used, T1, T2, T3, T4, T5, T6, T7 >::operator[] (size_t i)
+
+inline
+
+ +

Definition at line 66 of file VectorBuilder.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+
+template<bool used, typename T1, typename T2, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double, typename T7 = double>
+ + + + +
VectorBuilderHelper<T1, used, contains_vector<T2, T3, T4, T5, T6, T7>::value> stan::VectorBuilder< used, T1, T2, T3, T4, T5, T6, T7 >::a
+
+ +

Definition at line 64 of file VectorBuilder.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1_vector_builder_helper-members.html b/doc/api/html/classstan_1_1_vector_builder_helper-members.html new file mode 100644 index 00000000000..26d610b46be --- /dev/null +++ b/doc/api/html/classstan_1_1_vector_builder_helper-members.html @@ -0,0 +1,115 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::VectorBuilderHelper< T1, used, is_vec > Member List
+
+
+ +

This is the complete list of members for stan::VectorBuilderHelper< T1, used, is_vec >, including all inherited members.

+ + + +
operator[](size_t)stan::VectorBuilderHelper< T1, used, is_vec >inline
VectorBuilderHelper(size_t)stan::VectorBuilderHelper< T1, used, is_vec >inlineexplicit
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1_vector_builder_helper.html b/doc/api/html/classstan_1_1_vector_builder_helper.html new file mode 100644 index 00000000000..50ad8c8b6ba --- /dev/null +++ b/doc/api/html/classstan_1_1_vector_builder_helper.html @@ -0,0 +1,200 @@ + + + + + + +Stan Math Library: stan::VectorBuilderHelper< T1, used, is_vec > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
stan::VectorBuilderHelper< T1, used, is_vec > Class Template Reference
+
+
+ +

VectorBuilder allocates type T1 values to be used as intermediate values. + More...

+ +

#include <VectorBuilder.hpp>

+ + + + + + +

+Public Member Functions

 VectorBuilderHelper (size_t)
 
T1 & operator[] (size_t)
 
+

Detailed Description

+

template<typename T1, bool used, bool is_vec>
+class stan::VectorBuilderHelper< T1, used, is_vec >

+ +

VectorBuilder allocates type T1 values to be used as intermediate values.

+

There are 2 template parameters:

+ +

These values are mutable.

+ +

Definition at line 28 of file VectorBuilder.hpp.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T1, bool used, bool is_vec>
+ + + + + +
+ + + + + + + + +
stan::VectorBuilderHelper< T1, used, is_vec >::VectorBuilderHelper (size_t )
+
+inlineexplicit
+
+ +

Definition at line 30 of file VectorBuilder.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T1, bool used, bool is_vec>
+ + + + + +
+ + + + + + + + +
T1& stan::VectorBuilderHelper< T1, used, is_vec >::operator[] (size_t )
+
+inline
+
+ +

Definition at line 31 of file VectorBuilder.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1_vector_builder_helper_3_01_t1_00_01true_00_01false_01_4-members.html b/doc/api/html/classstan_1_1_vector_builder_helper_3_01_t1_00_01true_00_01false_01_4-members.html new file mode 100644 index 00000000000..7ad2a7df95c --- /dev/null +++ b/doc/api/html/classstan_1_1_vector_builder_helper_3_01_t1_00_01true_00_01false_01_4-members.html @@ -0,0 +1,115 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::VectorBuilderHelper< T1, true, false > Member List
+
+
+ +

This is the complete list of members for stan::VectorBuilderHelper< T1, true, false >, including all inherited members.

+ + + +
operator[](size_t)stan::VectorBuilderHelper< T1, true, false >inline
VectorBuilderHelper(size_t)stan::VectorBuilderHelper< T1, true, false >inlineexplicit
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1_vector_builder_helper_3_01_t1_00_01true_00_01false_01_4.html b/doc/api/html/classstan_1_1_vector_builder_helper_3_01_t1_00_01true_00_01false_01_4.html new file mode 100644 index 00000000000..7f4830fcf7d --- /dev/null +++ b/doc/api/html/classstan_1_1_vector_builder_helper_3_01_t1_00_01true_00_01false_01_4.html @@ -0,0 +1,190 @@ + + + + + + +Stan Math Library: stan::VectorBuilderHelper< T1, true, false > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
stan::VectorBuilderHelper< T1, true, false > Class Template Reference
+
+
+ +

#include <VectorBuilder.hpp>

+ + + + + + +

+Public Member Functions

 VectorBuilderHelper (size_t)
 
T1 & operator[] (size_t)
 
+

Detailed Description

+

template<typename T1>
+class stan::VectorBuilderHelper< T1, true, false >

+ + +

Definition at line 37 of file VectorBuilder.hpp.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T1 >
+ + + + + +
+ + + + + + + + +
stan::VectorBuilderHelper< T1, true, false >::VectorBuilderHelper (size_t )
+
+inlineexplicit
+
+ +

Definition at line 41 of file VectorBuilder.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T1 >
+ + + + + +
+ + + + + + + + +
T1& stan::VectorBuilderHelper< T1, true, false >::operator[] (size_t )
+
+inline
+
+ +

Definition at line 42 of file VectorBuilder.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1_vector_builder_helper_3_01_t1_00_01true_00_01true_01_4-members.html b/doc/api/html/classstan_1_1_vector_builder_helper_3_01_t1_00_01true_00_01true_01_4-members.html new file mode 100644 index 00000000000..a8a13e8551f --- /dev/null +++ b/doc/api/html/classstan_1_1_vector_builder_helper_3_01_t1_00_01true_00_01true_01_4-members.html @@ -0,0 +1,115 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::VectorBuilderHelper< T1, true, true > Member List
+
+
+ +

This is the complete list of members for stan::VectorBuilderHelper< T1, true, true >, including all inherited members.

+ + + +
operator[](size_t i)stan::VectorBuilderHelper< T1, true, true >inline
VectorBuilderHelper(size_t n)stan::VectorBuilderHelper< T1, true, true >inlineexplicit
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1_vector_builder_helper_3_01_t1_00_01true_00_01true_01_4.html b/doc/api/html/classstan_1_1_vector_builder_helper_3_01_t1_00_01true_00_01true_01_4.html new file mode 100644 index 00000000000..84653dc0711 --- /dev/null +++ b/doc/api/html/classstan_1_1_vector_builder_helper_3_01_t1_00_01true_00_01true_01_4.html @@ -0,0 +1,190 @@ + + + + + + +Stan Math Library: stan::VectorBuilderHelper< T1, true, true > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
stan::VectorBuilderHelper< T1, true, true > Class Template Reference
+
+
+ +

#include <VectorBuilder.hpp>

+ + + + + + +

+Public Member Functions

 VectorBuilderHelper (size_t n)
 
T1 & operator[] (size_t i)
 
+

Detailed Description

+

template<typename T1>
+class stan::VectorBuilderHelper< T1, true, true >

+ + +

Definition at line 48 of file VectorBuilder.hpp.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T1 >
+ + + + + +
+ + + + + + + + +
stan::VectorBuilderHelper< T1, true, true >::VectorBuilderHelper (size_t n)
+
+inlineexplicit
+
+ +

Definition at line 52 of file VectorBuilder.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T1 >
+ + + + + +
+ + + + + + + + +
T1& stan::VectorBuilderHelper< T1, true, true >::operator[] (size_t i)
+
+inline
+
+ +

Definition at line 53 of file VectorBuilder.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1_vector_view-members.html b/doc/api/html/classstan_1_1_vector_view-members.html new file mode 100644 index 00000000000..c5ffc9e106c --- /dev/null +++ b/doc/api/html/classstan_1_1_vector_view-members.html @@ -0,0 +1,119 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::VectorView< T, is_array, throw_if_accessed > Member List
+
+
+ +

This is the complete list of members for stan::VectorView< T, is_array, throw_if_accessed >, including all inherited members.

+ + + + + + + +
operator[](int i)stan::VectorView< T, is_array, throw_if_accessed >inline
scalar_t typedefstan::VectorView< T, is_array, throw_if_accessed >
VectorView(scalar_t &c)stan::VectorView< T, is_array, throw_if_accessed >inlineexplicit
VectorView(std::vector< scalar_t > &v)stan::VectorView< T, is_array, throw_if_accessed >inlineexplicit
VectorView(Eigen::Matrix< scalar_t, R, C > &m)stan::VectorView< T, is_array, throw_if_accessed >inlineexplicit
VectorView(scalar_t *x)stan::VectorView< T, is_array, throw_if_accessed >inlineexplicit
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1_vector_view.html b/doc/api/html/classstan_1_1_vector_view.html new file mode 100644 index 00000000000..bbd7306af05 --- /dev/null +++ b/doc/api/html/classstan_1_1_vector_view.html @@ -0,0 +1,320 @@ + + + + + + +Stan Math Library: stan::VectorView< T, is_array, throw_if_accessed > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Types | +Public Member Functions | +List of all members
+
+
stan::VectorView< T, is_array, throw_if_accessed > Class Template Reference
+
+
+ +

VectorView is a template metaprogram that takes its argument and allows it to be used like a vector. + More...

+ +

#include <VectorView.hpp>

+ + + + +

+Public Types

typedef scalar_type< T >::type scalar_t
 
+ + + + + + + + + + + + +

+Public Member Functions

 VectorView (scalar_t &c)
 
 VectorView (std::vector< scalar_t > &v)
 
template<int R, int C>
 VectorView (Eigen::Matrix< scalar_t, R, C > &m)
 
 VectorView (scalar_t *x)
 
scalar_toperator[] (int i)
 
+

Detailed Description

+

template<typename T, bool is_array = stan::is_vector_like<T>::value, bool throw_if_accessed = false>
+class stan::VectorView< T, is_array, throw_if_accessed >

+ +

VectorView is a template metaprogram that takes its argument and allows it to be used like a vector.

+

There are three template parameters

+ +

For a scalar value, it broadcasts the single value when using operator[].

+

For a vector, operator[] looks into the value passed in. Note: this is not safe. It is possible to read past the size of an array.

+

Uses: Read arguments to prob functions as vectors, even if scalars, so they can be read by common code (and scalars automatically broadcast up to behave like vectors) : VectorView of immutable const array of double* (no allocation)

+

Build up derivatives into common storage : VectorView of mutable shared array (no allocation because allocated on auto-diff arena memory)

+ +

Definition at line 41 of file VectorView.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T, bool is_array = stan::is_vector_like<T>::value, bool throw_if_accessed = false>
+ + + + +
typedef scalar_type<T>::type stan::VectorView< T, is_array, throw_if_accessed >::scalar_t
+
+ +

Definition at line 43 of file VectorView.hpp.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T, bool is_array = stan::is_vector_like<T>::value, bool throw_if_accessed = false>
+ + + + + +
+ + + + + + + + +
stan::VectorView< T, is_array, throw_if_accessed >::VectorView (scalar_tc)
+
+inlineexplicit
+
+ +

Definition at line 45 of file VectorView.hpp.

+ +
+
+ +
+
+
+template<typename T, bool is_array = stan::is_vector_like<T>::value, bool throw_if_accessed = false>
+ + + + + +
+ + + + + + + + +
stan::VectorView< T, is_array, throw_if_accessed >::VectorView (std::vector< scalar_t > & v)
+
+inlineexplicit
+
+ +

Definition at line 47 of file VectorView.hpp.

+ +
+
+ +
+
+
+template<typename T, bool is_array = stan::is_vector_like<T>::value, bool throw_if_accessed = false>
+
+template<int R, int C>
+ + + + + +
+ + + + + + + + +
stan::VectorView< T, is_array, throw_if_accessed >::VectorView (Eigen::Matrix< scalar_t, R, C > & m)
+
+inlineexplicit
+
+ +

Definition at line 50 of file VectorView.hpp.

+ +
+
+ +
+
+
+template<typename T, bool is_array = stan::is_vector_like<T>::value, bool throw_if_accessed = false>
+ + + + + +
+ + + + + + + + +
stan::VectorView< T, is_array, throw_if_accessed >::VectorView (scalar_tx)
+
+inlineexplicit
+
+ +

Definition at line 52 of file VectorView.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T, bool is_array = stan::is_vector_like<T>::value, bool throw_if_accessed = false>
+ + + + + +
+ + + + + + + + +
scalar_t& stan::VectorView< T, is_array, throw_if_accessed >::operator[] (int i)
+
+inline
+
+ +

Definition at line 54 of file VectorView.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1_vector_view_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4-members.html b/doc/api/html/classstan_1_1_vector_view_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4-members.html new file mode 100644 index 00000000000..65f7c986795 --- /dev/null +++ b/doc/api/html/classstan_1_1_vector_view_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4-members.html @@ -0,0 +1,119 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::VectorView< const T, is_array, throw_if_accessed > Member List
+
+
+ +

This is the complete list of members for stan::VectorView< const T, is_array, throw_if_accessed >, including all inherited members.

+ + + + + + + +
operator[](int i) const stan::VectorView< const T, is_array, throw_if_accessed >inline
scalar_t typedefstan::VectorView< const T, is_array, throw_if_accessed >
VectorView(const scalar_t &c)stan::VectorView< const T, is_array, throw_if_accessed >inlineexplicit
VectorView(const scalar_t *x)stan::VectorView< const T, is_array, throw_if_accessed >inlineexplicit
VectorView(const std::vector< scalar_t > &v)stan::VectorView< const T, is_array, throw_if_accessed >inlineexplicit
VectorView(const Eigen::Matrix< scalar_t, R, C > &m)stan::VectorView< const T, is_array, throw_if_accessed >inlineexplicit
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1_vector_view_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html b/doc/api/html/classstan_1_1_vector_view_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html new file mode 100644 index 00000000000..7e085442da0 --- /dev/null +++ b/doc/api/html/classstan_1_1_vector_view_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html @@ -0,0 +1,310 @@ + + + + + + +Stan Math Library: stan::VectorView< const T, is_array, throw_if_accessed > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Types | +Public Member Functions | +List of all members
+
+
stan::VectorView< const T, is_array, throw_if_accessed > Class Template Reference
+
+
+ +

VectorView that has const correctness. + More...

+ +

#include <VectorView.hpp>

+ + + + +

+Public Types

typedef scalar_type< T >::type scalar_t
 
+ + + + + + + + + + + + +

+Public Member Functions

 VectorView (const scalar_t &c)
 
 VectorView (const scalar_t *x)
 
 VectorView (const std::vector< scalar_t > &v)
 
template<int R, int C>
 VectorView (const Eigen::Matrix< scalar_t, R, C > &m)
 
const scalar_toperator[] (int i) const
 
+

Detailed Description

+

template<typename T, bool is_array, bool throw_if_accessed>
+class stan::VectorView< const T, is_array, throw_if_accessed >

+ +

VectorView that has const correctness.

+ +

Definition at line 72 of file VectorView.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T , bool is_array, bool throw_if_accessed>
+ + + + +
typedef scalar_type<T>::type stan::VectorView< const T, is_array, throw_if_accessed >::scalar_t
+
+ +

Definition at line 74 of file VectorView.hpp.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T , bool is_array, bool throw_if_accessed>
+ + + + + +
+ + + + + + + + +
stan::VectorView< const T, is_array, throw_if_accessed >::VectorView (const scalar_tc)
+
+inlineexplicit
+
+ +

Definition at line 76 of file VectorView.hpp.

+ +
+
+ +
+
+
+template<typename T , bool is_array, bool throw_if_accessed>
+ + + + + +
+ + + + + + + + +
stan::VectorView< const T, is_array, throw_if_accessed >::VectorView (const scalar_tx)
+
+inlineexplicit
+
+ +

Definition at line 78 of file VectorView.hpp.

+ +
+
+ +
+
+
+template<typename T , bool is_array, bool throw_if_accessed>
+ + + + + +
+ + + + + + + + +
stan::VectorView< const T, is_array, throw_if_accessed >::VectorView (const std::vector< scalar_t > & v)
+
+inlineexplicit
+
+ +

Definition at line 80 of file VectorView.hpp.

+ +
+
+ +
+
+
+template<typename T , bool is_array, bool throw_if_accessed>
+
+template<int R, int C>
+ + + + + +
+ + + + + + + + +
stan::VectorView< const T, is_array, throw_if_accessed >::VectorView (const Eigen::Matrix< scalar_t, R, C > & m)
+
+inlineexplicit
+
+ +

Definition at line 83 of file VectorView.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T , bool is_array, bool throw_if_accessed>
+ + + + + +
+ + + + + + + + +
const scalar_t& stan::VectorView< const T, is_array, throw_if_accessed >::operator[] (int i) const
+
+inline
+
+ +

Definition at line 85 of file VectorView.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1_vector_view_3_01const_01double_00_01false_00_01false_01_4-members.html b/doc/api/html/classstan_1_1_vector_view_3_01const_01double_00_01false_00_01false_01_4-members.html new file mode 100644 index 00000000000..844401e1ff7 --- /dev/null +++ b/doc/api/html/classstan_1_1_vector_view_3_01const_01double_00_01false_00_01false_01_4-members.html @@ -0,0 +1,115 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::VectorView< const double, false, false > Member List
+
+
+ +

This is the complete list of members for stan::VectorView< const double, false, false >, including all inherited members.

+ + + +
operator[](int) const stan::VectorView< const double, false, false >inline
VectorView(double x)stan::VectorView< const double, false, false >inlineexplicit
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1_vector_view_3_01const_01double_00_01false_00_01false_01_4.html b/doc/api/html/classstan_1_1_vector_view_3_01const_01double_00_01false_00_01false_01_4.html new file mode 100644 index 00000000000..3d9e451468a --- /dev/null +++ b/doc/api/html/classstan_1_1_vector_view_3_01const_01double_00_01false_00_01false_01_4.html @@ -0,0 +1,186 @@ + + + + + + +Stan Math Library: stan::VectorView< const double, false, false > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
stan::VectorView< const double, false, false > Class Template Reference
+
+
+ +

#include <VectorView.hpp>

+ + + + + + +

+Public Member Functions

 VectorView (double x)
 
double operator[] (int) const
 
+

Detailed Description

+

template<>
+class stan::VectorView< const double, false, false >

+ + +

Definition at line 99 of file VectorView.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + +
stan::VectorView< const double, false, false >::VectorView (double x)
+
+inlineexplicit
+
+ +

Definition at line 101 of file VectorView.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + + +
double stan::VectorView< const double, false, false >::operator[] (int ) const
+
+inline
+
+ +

Definition at line 102 of file VectorView.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1_vector_view_mvt-members.html b/doc/api/html/classstan_1_1_vector_view_mvt-members.html new file mode 100644 index 00000000000..9bb3b0be93e --- /dev/null +++ b/doc/api/html/classstan_1_1_vector_view_mvt-members.html @@ -0,0 +1,117 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::VectorViewMvt< T, is_array, throw_if_accessed > Member List
+
+
+ +

This is the complete list of members for stan::VectorViewMvt< T, is_array, throw_if_accessed >, including all inherited members.

+ + + + + +
matrix_t typedefstan::VectorViewMvt< T, is_array, throw_if_accessed >
operator[](int i)stan::VectorViewMvt< T, is_array, throw_if_accessed >inline
VectorViewMvt(matrix_t &m)stan::VectorViewMvt< T, is_array, throw_if_accessed >inlineexplicit
VectorViewMvt(std::vector< matrix_t > &vm)stan::VectorViewMvt< T, is_array, throw_if_accessed >inlineexplicit
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1_vector_view_mvt.html b/doc/api/html/classstan_1_1_vector_view_mvt.html new file mode 100644 index 00000000000..cf407c7791f --- /dev/null +++ b/doc/api/html/classstan_1_1_vector_view_mvt.html @@ -0,0 +1,243 @@ + + + + + + +Stan Math Library: stan::VectorViewMvt< T, is_array, throw_if_accessed > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Types | +Public Member Functions | +List of all members
+
+
stan::VectorViewMvt< T, is_array, throw_if_accessed > Class Template Reference
+
+
+ +

#include <VectorViewMvt.hpp>

+ + + + +

+Public Types

typedef scalar_type_pre< T >::type matrix_t
 
+ + + + + + + +

+Public Member Functions

 VectorViewMvt (matrix_t &m)
 
 VectorViewMvt (std::vector< matrix_t > &vm)
 
matrix_toperator[] (int i)
 
+

Detailed Description

+

template<typename T, bool is_array = stan::is_vector_like <typename stan::math::value_type<T>::type>::value, bool throw_if_accessed = false>
+class stan::VectorViewMvt< T, is_array, throw_if_accessed >

+ + +

Definition at line 16 of file VectorViewMvt.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T, bool is_array = stan::is_vector_like <typename stan::math::value_type<T>::type>::value, bool throw_if_accessed = false>
+ + + + +
typedef scalar_type_pre<T>::type stan::VectorViewMvt< T, is_array, throw_if_accessed >::matrix_t
+
+ +

Definition at line 18 of file VectorViewMvt.hpp.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T, bool is_array = stan::is_vector_like <typename stan::math::value_type<T>::type>::value, bool throw_if_accessed = false>
+ + + + + +
+ + + + + + + + +
stan::VectorViewMvt< T, is_array, throw_if_accessed >::VectorViewMvt (matrix_tm)
+
+inlineexplicit
+
+ +

Definition at line 20 of file VectorViewMvt.hpp.

+ +
+
+ +
+
+
+template<typename T, bool is_array = stan::is_vector_like <typename stan::math::value_type<T>::type>::value, bool throw_if_accessed = false>
+ + + + + +
+ + + + + + + + +
stan::VectorViewMvt< T, is_array, throw_if_accessed >::VectorViewMvt (std::vector< matrix_t > & vm)
+
+inlineexplicit
+
+ +

Definition at line 22 of file VectorViewMvt.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T, bool is_array = stan::is_vector_like <typename stan::math::value_type<T>::type>::value, bool throw_if_accessed = false>
+ + + + + +
+ + + + + + + + +
matrix_t& stan::VectorViewMvt< T, is_array, throw_if_accessed >::operator[] (int i)
+
+inline
+
+ +

Definition at line 24 of file VectorViewMvt.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1_vector_view_mvt_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4-members.html b/doc/api/html/classstan_1_1_vector_view_mvt_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4-members.html new file mode 100644 index 00000000000..563f6f43be3 --- /dev/null +++ b/doc/api/html/classstan_1_1_vector_view_mvt_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4-members.html @@ -0,0 +1,117 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::VectorViewMvt< const T, is_array, throw_if_accessed > Member List
+
+
+ +

This is the complete list of members for stan::VectorViewMvt< const T, is_array, throw_if_accessed >, including all inherited members.

+ + + + + +
matrix_t typedefstan::VectorViewMvt< const T, is_array, throw_if_accessed >
operator[](int i) const stan::VectorViewMvt< const T, is_array, throw_if_accessed >inline
VectorViewMvt(const matrix_t &m)stan::VectorViewMvt< const T, is_array, throw_if_accessed >inlineexplicit
VectorViewMvt(const std::vector< matrix_t > &vm)stan::VectorViewMvt< const T, is_array, throw_if_accessed >inlineexplicit
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1_vector_view_mvt_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html b/doc/api/html/classstan_1_1_vector_view_mvt_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html new file mode 100644 index 00000000000..129f2619d99 --- /dev/null +++ b/doc/api/html/classstan_1_1_vector_view_mvt_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html @@ -0,0 +1,247 @@ + + + + + + +Stan Math Library: stan::VectorViewMvt< const T, is_array, throw_if_accessed > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Types | +Public Member Functions | +List of all members
+
+
stan::VectorViewMvt< const T, is_array, throw_if_accessed > Class Template Reference
+
+
+ +

VectorViewMvt that has const correctness. + More...

+ +

#include <VectorViewMvt.hpp>

+ + + + +

+Public Types

typedef scalar_type_pre< T >::type matrix_t
 
+ + + + + + + +

+Public Member Functions

 VectorViewMvt (const matrix_t &m)
 
 VectorViewMvt (const std::vector< matrix_t > &vm)
 
const matrix_toperator[] (int i) const
 
+

Detailed Description

+

template<typename T, bool is_array, bool throw_if_accessed>
+class stan::VectorViewMvt< const T, is_array, throw_if_accessed >

+ +

VectorViewMvt that has const correctness.

+ +

Definition at line 41 of file VectorViewMvt.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T , bool is_array, bool throw_if_accessed>
+ + + + +
typedef scalar_type_pre<T>::type stan::VectorViewMvt< const T, is_array, throw_if_accessed >::matrix_t
+
+ +

Definition at line 43 of file VectorViewMvt.hpp.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T , bool is_array, bool throw_if_accessed>
+ + + + + +
+ + + + + + + + +
stan::VectorViewMvt< const T, is_array, throw_if_accessed >::VectorViewMvt (const matrix_tm)
+
+inlineexplicit
+
+ +

Definition at line 45 of file VectorViewMvt.hpp.

+ +
+
+ +
+
+
+template<typename T , bool is_array, bool throw_if_accessed>
+ + + + + +
+ + + + + + + + +
stan::VectorViewMvt< const T, is_array, throw_if_accessed >::VectorViewMvt (const std::vector< matrix_t > & vm)
+
+inlineexplicit
+
+ +

Definition at line 47 of file VectorViewMvt.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T , bool is_array, bool throw_if_accessed>
+ + + + + +
+ + + + + + + + +
const matrix_t& stan::VectorViewMvt< const T, is_array, throw_if_accessed >::operator[] (int i) const
+
+inline
+
+ +

Definition at line 49 of file VectorViewMvt.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1_l_d_l_t__alloc-members.html b/doc/api/html/classstan_1_1math_1_1_l_d_l_t__alloc-members.html new file mode 100644 index 00000000000..c3e84343eed --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1_l_d_l_t__alloc-members.html @@ -0,0 +1,122 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::LDLT_alloc< R, C > Member List
+
+
+ +

This is the complete list of members for stan::math::LDLT_alloc< R, C >, including all inherited members.

+ + + + + + + + + + +
_ldltstan::math::LDLT_alloc< R, C >
_variAstan::math::LDLT_alloc< R, C >
chainable_alloc()stan::math::chainable_allocinline
compute(const Eigen::Matrix< var, R, C > &A)stan::math::LDLT_alloc< R, C >inline
LDLT_alloc()stan::math::LDLT_alloc< R, C >inline
LDLT_alloc(const Eigen::Matrix< var, R, C > &A)stan::math::LDLT_alloc< R, C >inlineexplicit
log_abs_det() const stan::math::LDLT_alloc< R, C >inline
N_stan::math::LDLT_alloc< R, C >
~chainable_alloc()stan::math::chainable_allocinlinevirtual
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1_l_d_l_t__alloc.html b/doc/api/html/classstan_1_1math_1_1_l_d_l_t__alloc.html new file mode 100644 index 00000000000..55e1b4f6b1c --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1_l_d_l_t__alloc.html @@ -0,0 +1,334 @@ + + + + + + +Stan Math Library: stan::math::LDLT_alloc< R, C > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +Public Attributes | +List of all members
+
+
stan::math::LDLT_alloc< R, C > Class Template Reference
+
+
+ +

This object stores the actual (double typed) LDLT factorization of an Eigen::Matrix<var> along with pointers to its vari's which allow the *_ldlt functions to save memory. + More...

+ +

#include <LDLT_alloc.hpp>

+
+Inheritance diagram for stan::math::LDLT_alloc< R, C >:
+
+
+ + +stan::math::chainable_alloc + +
+ + + + + + + + + + + + + + + + + +

+Public Member Functions

 LDLT_alloc ()
 
 LDLT_alloc (const Eigen::Matrix< var, R, C > &A)
 
void compute (const Eigen::Matrix< var, R, C > &A)
 Compute the LDLT factorization and store pointers to the vari's of the matrix entries to be used when chain() is called elsewhere. More...
 
double log_abs_det () const
 Compute the log(abs(det(A))). This is just a convenience function. More...
 
- Public Member Functions inherited from stan::math::chainable_alloc
 chainable_alloc ()
 
virtual ~chainable_alloc ()
 
+ + + + + + + +

+Public Attributes

size_t N_
 
Eigen::LDLT< Eigen::Matrix
+< double, R, C > > 
_ldlt
 
Eigen::Matrix< vari *, R, C > _variA
 
+

Detailed Description

+

template<int R, int C>
+class stan::math::LDLT_alloc< R, C >

+ +

This object stores the actual (double typed) LDLT factorization of an Eigen::Matrix<var> along with pointers to its vari's which allow the *_ldlt functions to save memory.

+

It is derived from a chainable_alloc object so that it is allocated on the stack but does not have a chain() function called.

+

This class should only be instantiated as part of an LDLT_factor object and is only used in *_ldlt functions.

+ +

Definition at line 20 of file LDLT_alloc.hpp.

+

Constructor & Destructor Documentation

+ +
+
+
+template<int R, int C>
+ + + + + +
+ + + + + + + +
stan::math::LDLT_alloc< R, C >::LDLT_alloc ()
+
+inline
+
+ +

Definition at line 22 of file LDLT_alloc.hpp.

+ +
+
+ +
+
+
+template<int R, int C>
+ + + + + +
+ + + + + + + + +
stan::math::LDLT_alloc< R, C >::LDLT_alloc (const Eigen::Matrix< var, R, C > & A)
+
+inlineexplicit
+
+ +

Definition at line 23 of file LDLT_alloc.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<int R, int C>
+ + + + + +
+ + + + + + + + +
void stan::math::LDLT_alloc< R, C >::compute (const Eigen::Matrix< var, R, C > & A)
+
+inline
+
+ +

Compute the LDLT factorization and store pointers to the vari's of the matrix entries to be used when chain() is called elsewhere.

+ +

Definition at line 32 of file LDLT_alloc.hpp.

+ +
+
+ +
+
+
+template<int R, int C>
+ + + + + +
+ + + + + + + +
double stan::math::LDLT_alloc< R, C >::log_abs_det () const
+
+inline
+
+ +

Compute the log(abs(det(A))). This is just a convenience function.

+ +

Definition at line 49 of file LDLT_alloc.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+
+template<int R, int C>
+ + + + +
Eigen::LDLT<Eigen::Matrix<double, R, C> > stan::math::LDLT_alloc< R, C >::_ldlt
+
+ +

Definition at line 54 of file LDLT_alloc.hpp.

+ +
+
+ +
+
+
+template<int R, int C>
+ + + + +
Eigen::Matrix<vari*, R, C> stan::math::LDLT_alloc< R, C >::_variA
+
+ +

Definition at line 55 of file LDLT_alloc.hpp.

+ +
+
+ +
+
+
+template<int R, int C>
+ + + + +
size_t stan::math::LDLT_alloc< R, C >::N_
+
+ +

Definition at line 53 of file LDLT_alloc.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1_l_d_l_t__alloc.png b/doc/api/html/classstan_1_1math_1_1_l_d_l_t__alloc.png new file mode 100644 index 00000000000..398a5d99610 Binary files /dev/null and b/doc/api/html/classstan_1_1math_1_1_l_d_l_t__alloc.png differ diff --git a/doc/api/html/classstan_1_1math_1_1_l_d_l_t__factor.html b/doc/api/html/classstan_1_1math_1_1_l_d_l_t__factor.html new file mode 100644 index 00000000000..b632f15b1e6 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1_l_d_l_t__factor.html @@ -0,0 +1,121 @@ + + + + + + +Stan Math Library: stan::math::LDLT_factor< T, R, C > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::LDLT_factor< T, R, C > Class Template Reference
+
+
+ +

#include <LDLT_factor.hpp>

+

Detailed Description

+

template<typename T, int R, int C>
+class stan::math::LDLT_factor< T, R, C >

+ + +

Definition at line 18 of file LDLT_factor.hpp.

+

The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4-members.html b/doc/api/html/classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4-members.html new file mode 100644 index 00000000000..4d4937f3372 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4-members.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::LDLT_factor< T, R, C > Member List
+
+
+ +

This is the complete list of members for stan::math::LDLT_factor< T, R, C >, including all inherited members.

+ + + + + + + + + + + + + + + + + +
_ldltPstan::math::LDLT_factor< T, R, C >
cols() const stan::math::LDLT_factor< T, R, C >inline
compute(const Eigen::Matrix< T, R, C > &A)stan::math::LDLT_factor< T, R, C >inline
inverse(Eigen::Matrix< T, R, C > &invA) const stan::math::LDLT_factor< T, R, C >inline
LDLT_factor()stan::math::LDLT_factor< T, R, C >inline
LDLT_factor(const Eigen::Matrix< T, R, C > &A)stan::math::LDLT_factor< T, R, C >inlineexplicit
log_abs_det() const stan::math::LDLT_factor< T, R, C >inline
matrixLDLT() const stan::math::LDLT_factor< T, R, C >inline
N_stan::math::LDLT_factor< T, R, C >
rows() const stan::math::LDLT_factor< T, R, C >inline
size_type typedefstan::math::LDLT_factor< T, R, C >
solve(const Eigen::MatrixBase< Rhs > &b) const stan::math::LDLT_factor< T, R, C >inline
solveRight(const Eigen::Matrix< T, R, C > &B) const stan::math::LDLT_factor< T, R, C >inline
success() const stan::math::LDLT_factor< T, R, C >inline
value_type typedefstan::math::LDLT_factor< T, R, C >
vectorD() const stan::math::LDLT_factor< T, R, C >inline
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html b/doc/api/html/classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html new file mode 100644 index 00000000000..36ad718cd2e --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html @@ -0,0 +1,593 @@ + + + + + + +Stan Math Library: stan::math::LDLT_factor< T, R, C > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Types | +Public Member Functions | +Public Attributes | +List of all members
+
+
stan::math::LDLT_factor< T, R, C > Class Template Reference
+
+
+ +

LDLT_factor is a thin wrapper on Eigen::LDLT to allow for reusing factorizations and efficient autodiff of things like log determinants and solutions to linear systems. + More...

+ +

#include <LDLT_factor.hpp>

+ + + + + + +

+Public Types

typedef size_t size_type
 
typedef double value_type
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 LDLT_factor ()
 
 LDLT_factor (const Eigen::Matrix< T, R, C > &A)
 
void compute (const Eigen::Matrix< T, R, C > &A)
 
bool success () const
 
log_abs_det () const
 
void inverse (Eigen::Matrix< T, R, C > &invA) const
 
template<typename Rhs >
const
+Eigen::internal::solve_retval
+< Eigen::LDLT< Eigen::Matrix
+< T, R, C > >, Rhs > 
solve (const Eigen::MatrixBase< Rhs > &b) const
 
Eigen::Matrix< T, R, C > solveRight (const Eigen::Matrix< T, R, C > &B) const
 
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
vectorD () const
 
Eigen::LDLT< Eigen::Matrix< T,
+R, C > > 
matrixLDLT () const
 
size_t rows () const
 
size_t cols () const
 
+ + + + + +

+Public Attributes

size_t N_
 
boost::shared_ptr< Eigen::LDLT
+< Eigen::Matrix< T, R, C > > > 
_ldltP
 
+

Detailed Description

+

template<int R, int C, typename T>
+class stan::math::LDLT_factor< T, R, C >

+ +

LDLT_factor is a thin wrapper on Eigen::LDLT to allow for reusing factorizations and efficient autodiff of things like log determinants and solutions to linear systems.

+

After the constructor and/or compute() is called users of LDLT_factor are responsible for calling success() to check whether the factorization has succeeded. Use of an LDLT_factor object (e.g., in mdivide_left_ldlt) is undefined if success() is false.

+

It's usage pattern is:

+
Eigen::Matrix<T, R, C> A1, A2;
+
+
LDLT_factor<T, R, C> ldlt_A1(A1);
+
LDLT_factor<T, R, C> ldlt_A2;
+
ldlt_A2.compute(A2);
+

Now, the caller should check that ldlt_A1.success() and ldlt_A2.success() are true or abort accordingly. Alternatively, call check_ldlt_factor().

+

Note that ldlt_A1 and ldlt_A2 are completely equivalent. They simply demonstrate two different ways to construct the factorization.

+

Now, the caller can use the LDLT_factor objects as needed. For instance

+
x1 = mdivide_left_ldlt(ldlt_A1, b1);
+
x2 = mdivide_right_ldlt(b2, ldlt_A2);
+
+
d1 = log_determinant_ldlt(ldlt_A1);
+
d2 = log_determinant_ldlt(ldlt_A2);
+
+

Definition at line 58 of file LDLT_factor.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<int R, int C, typename T >
+ + + + +
typedef size_t stan::math::LDLT_factor< T, R, C >::size_type
+
+ +

Definition at line 125 of file LDLT_factor.hpp.

+ +
+
+ +
+
+
+template<int R, int C, typename T >
+ + + + +
typedef double stan::math::LDLT_factor< T, R, C >::value_type
+
+ +

Definition at line 126 of file LDLT_factor.hpp.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+
+template<int R, int C, typename T >
+ + + + + +
+ + + + + + + +
stan::math::LDLT_factor< T, R, C >::LDLT_factor ()
+
+inline
+
+ +

Definition at line 60 of file LDLT_factor.hpp.

+ +
+
+ +
+
+
+template<int R, int C, typename T >
+ + + + + +
+ + + + + + + + +
stan::math::LDLT_factor< T, R, C >::LDLT_factor (const Eigen::Matrix< T, R, C > & A)
+
+inlineexplicit
+
+ +

Definition at line 63 of file LDLT_factor.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<int R, int C, typename T >
+ + + + + +
+ + + + + + + +
size_t stan::math::LDLT_factor< T, R, C >::cols () const
+
+inline
+
+ +

Definition at line 123 of file LDLT_factor.hpp.

+ +
+
+ +
+
+
+template<int R, int C, typename T >
+ + + + + +
+ + + + + + + + +
void stan::math::LDLT_factor< T, R, C >::compute (const Eigen::Matrix< T, R, C > & A)
+
+inline
+
+ +

Definition at line 68 of file LDLT_factor.hpp.

+ +
+
+ +
+
+
+template<int R, int C, typename T >
+ + + + + +
+ + + + + + + + +
void stan::math::LDLT_factor< T, R, C >::inverse (Eigen::Matrix< T, R, C > & invA) const
+
+inline
+
+ +

Definition at line 97 of file LDLT_factor.hpp.

+ +
+
+ +
+
+
+template<int R, int C, typename T >
+ + + + + +
+ + + + + + + +
T stan::math::LDLT_factor< T, R, C >::log_abs_det () const
+
+inline
+
+ +

Definition at line 93 of file LDLT_factor.hpp.

+ +
+
+ +
+
+
+template<int R, int C, typename T >
+ + + + + +
+ + + + + + + +
Eigen::LDLT<Eigen::Matrix<T, R, C> > stan::math::LDLT_factor< T, R, C >::matrixLDLT () const
+
+inline
+
+ +

Definition at line 118 of file LDLT_factor.hpp.

+ +
+
+ +
+
+
+template<int R, int C, typename T >
+ + + + + +
+ + + + + + + +
size_t stan::math::LDLT_factor< T, R, C >::rows () const
+
+inline
+
+ +

Definition at line 122 of file LDLT_factor.hpp.

+ +
+
+ +
+
+
+template<int R, int C, typename T >
+
+template<typename Rhs >
+ + + + + +
+ + + + + + + + +
const Eigen::internal::solve_retval<Eigen::LDLT< Eigen::Matrix<T, R, C> >, Rhs> stan::math::LDLT_factor< T, R, C >::solve (const Eigen::MatrixBase< Rhs > & b) const
+
+inline
+
+ +

Definition at line 105 of file LDLT_factor.hpp.

+ +
+
+ +
+
+
+template<int R, int C, typename T >
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<T, R, C> stan::math::LDLT_factor< T, R, C >::solveRight (const Eigen::Matrix< T, R, C > & B) const
+
+inline
+
+ +

Definition at line 110 of file LDLT_factor.hpp.

+ +
+
+ +
+
+
+template<int R, int C, typename T >
+ + + + + +
+ + + + + + + +
bool stan::math::LDLT_factor< T, R, C >::success () const
+
+inline
+
+ +

Definition at line 74 of file LDLT_factor.hpp.

+ +
+
+ +
+
+
+template<int R, int C, typename T >
+ + + + + +
+ + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::LDLT_factor< T, R, C >::vectorD () const
+
+inline
+
+ +

Definition at line 114 of file LDLT_factor.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+
+template<int R, int C, typename T >
+ + + + +
boost::shared_ptr< Eigen::LDLT< Eigen::Matrix<T, R, C> > > stan::math::LDLT_factor< T, R, C >::_ldltP
+
+ +

Definition at line 129 of file LDLT_factor.hpp.

+ +
+
+ +
+
+
+template<int R, int C, typename T >
+ + + + +
size_t stan::math::LDLT_factor< T, R, C >::N_
+
+ +

Definition at line 128 of file LDLT_factor.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4-members.html b/doc/api/html/classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4-members.html new file mode 100644 index 00000000000..8971a524caf --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4-members.html @@ -0,0 +1,124 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::LDLT_factor< stan::math::var, R, C > Member List
+
+
+ +

This is the complete list of members for stan::math::LDLT_factor< stan::math::var, R, C >, including all inherited members.

+ + + + + + + + + + + + +
_allocstan::math::LDLT_factor< stan::math::var, R, C >
cols() const stan::math::LDLT_factor< stan::math::var, R, C >inline
compute(const Eigen::Matrix< stan::math::var, R, C > &A)stan::math::LDLT_factor< stan::math::var, R, C >inline
LDLT_factor()stan::math::LDLT_factor< stan::math::var, R, C >inline
LDLT_factor(const Eigen::Matrix< stan::math::var, R, C > &A)stan::math::LDLT_factor< stan::math::var, R, C >inlineexplicit
rows() const stan::math::LDLT_factor< stan::math::var, R, C >inline
size_type typedefstan::math::LDLT_factor< stan::math::var, R, C >
solve(const Eigen::MatrixBase< Rhs > &b) const stan::math::LDLT_factor< stan::math::var, R, C >inline
success() const stan::math::LDLT_factor< stan::math::var, R, C >inline
value_type typedefstan::math::LDLT_factor< stan::math::var, R, C >
vectorD() const stan::math::LDLT_factor< stan::math::var, R, C >inline
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4.html b/doc/api/html/classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4.html new file mode 100644 index 00000000000..62e31c35b13 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4.html @@ -0,0 +1,491 @@ + + + + + + +Stan Math Library: stan::math::LDLT_factor< stan::math::var, R, C > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Types | +Public Member Functions | +Public Attributes | +List of all members
+
+
stan::math::LDLT_factor< stan::math::var, R, C > Class Template Reference
+
+
+ +

A template specialization of src/stan/math/matrix/LDLT_factor.hpp for stan::math::var which can be used with all the *_ldlt functions. + More...

+ +

#include <LDLT_factor.hpp>

+ + + + + + +

+Public Types

typedef size_t size_type
 
typedef stan::math::var value_type
 
+ + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 LDLT_factor ()
 Default constructor. More...
 
 LDLT_factor (const Eigen::Matrix< stan::math::var, R, C > &A)
 
void compute (const Eigen::Matrix< stan::math::var, R, C > &A)
 Use the LDLT_factor object to factorize a new matrix. More...
 
template<typename Rhs >
const
+Eigen::internal::solve_retval
+< Eigen::LDLT< Eigen::Matrix
+< double, R, C > >, Rhs > 
solve (const Eigen::MatrixBase< Rhs > &b) const
 Compute the actual numerical result of inv(A)*b. More...
 
bool success () const
 Determine whether the most recent factorization succeeded. More...
 
Eigen::VectorXd vectorD () const
 The entries of the diagonal matrix D. More...
 
size_t rows () const
 
size_t cols () const
 
+ + + + +

+Public Attributes

stan::math::LDLT_alloc< R, C > * _alloc
 The LDLT_alloc object actually contains the factorization but is derived from the chainable_alloc class so that it is allocated on the vari stack. More...
 
+

Detailed Description

+

template<int R, int C>
+class stan::math::LDLT_factor< stan::math::var, R, C >

+ +

A template specialization of src/stan/math/matrix/LDLT_factor.hpp for stan::math::var which can be used with all the *_ldlt functions.

+

The usage pattern is:

+
Eigen::Matrix<T, R, C> A1, A2;
+
+
LDLT_factor<T, R, C> ldlt_A1(A1);
+
LDLT_factor<T, R, C> ldlt_A2;
+
ldlt_A2.compute(A2);
+

Now, the caller should check that ldlt_A1.success() and ldlt_A2.success() are true or abort accordingly. Alternatively, call check_ldlt_factor(). The behaviour of using an LDLT_factor without success() returning true is undefined.

+

Note that ldlt_A1 and ldlt_A2 are completely equivalent. They simply demonstrate two different ways to construct the factorization.

+

Now, the caller can use the LDLT_factor objects as needed. For instance

+
x1 = mdivide_left_ldlt(ldlt_A1, b1);
+
x2 = mdivide_right_ldlt(b2, ldlt_A2);
+
+
d1 = log_determinant_ldlt(ldlt_A1);
+
d2 = log_determinant_ldlt(ldlt_A2);
+
+

Definition at line 45 of file LDLT_factor.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<int R, int C>
+ + + + +
typedef size_t stan::math::LDLT_factor< stan::math::var, R, C >::size_type
+
+ +

Definition at line 119 of file LDLT_factor.hpp.

+ +
+
+ +
+
+
+template<int R, int C>
+ + + + +
typedef stan::math::var stan::math::LDLT_factor< stan::math::var, R, C >::value_type
+
+ +

Definition at line 120 of file LDLT_factor.hpp.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+
+template<int R, int C>
+ + + + + +
+ + + + + + + +
stan::math::LDLT_factor< stan::math::var, R, C >::LDLT_factor ()
+
+inline
+
+ +

Default constructor.

+

The caller MUST call compute() after this. Any calls which use the LDLT_factor without calling compute() run the risk of crashing Stan from within Eigen.

+ +

Definition at line 52 of file LDLT_factor.hpp.

+ +
+
+ +
+
+
+template<int R, int C>
+ + + + + +
+ + + + + + + + +
stan::math::LDLT_factor< stan::math::var, R, C >::LDLT_factor (const Eigen::Matrix< stan::math::var, R, C > & A)
+
+inlineexplicit
+
+ +

Definition at line 54 of file LDLT_factor.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<int R, int C>
+ + + + + +
+ + + + + + + +
size_t stan::math::LDLT_factor< stan::math::var, R, C >::cols () const
+
+inline
+
+ +

Definition at line 117 of file LDLT_factor.hpp.

+ +
+
+ +
+
+
+template<int R, int C>
+ + + + + +
+ + + + + + + + +
void stan::math::LDLT_factor< stan::math::var, R, C >::compute (const Eigen::Matrix< stan::math::var, R, C > & A)
+
+inline
+
+ +

Use the LDLT_factor object to factorize a new matrix.

+

After calling this function, the user should call success() to check that the factorization was successful. If the factorization is not successful, the LDLT_factor is not valid and other functions should not be used.

+
Parameters
+ + +
AA symmetric positive definite matrix to factorize
+
+
+ +

Definition at line 67 of file LDLT_factor.hpp.

+ +
+
+ +
+
+
+template<int R, int C>
+ + + + + +
+ + + + + + + +
size_t stan::math::LDLT_factor< stan::math::var, R, C >::rows () const
+
+inline
+
+ +

Definition at line 116 of file LDLT_factor.hpp.

+ +
+
+ +
+
+
+template<int R, int C>
+
+template<typename Rhs >
+ + + + + +
+ + + + + + + + +
const Eigen::internal::solve_retval<Eigen::LDLT<Eigen::Matrix<double, R, C> >, Rhs> stan::math::LDLT_factor< stan::math::var, R, C >::solve (const Eigen::MatrixBase< Rhs > & b) const
+
+inline
+
+ +

Compute the actual numerical result of inv(A)*b.

+

Note that this isn't meant to handle any of the autodiff. This is a convenience function for the actual implementations in mdivide_left_ldlt.

+

Precondition: success() must return true. If success() returns false, this function runs the risk of crashing Stan from within Eigen.

+
Parameters
+ + +
bThe right handside. Note that this is templated such that Eigen's expression-templating magic can work properly here.
+
+
+ +

Definition at line 87 of file LDLT_factor.hpp.

+ +
+
+ +
+
+
+template<int R, int C>
+ + + + + +
+ + + + + + + +
bool stan::math::LDLT_factor< stan::math::var, R, C >::success () const
+
+inline
+
+ +

Determine whether the most recent factorization succeeded.

+

This should always be called after the object is constructed (with a matrix) or after compute() is called.

+ +

Definition at line 96 of file LDLT_factor.hpp.

+ +
+
+ +
+
+
+template<int R, int C>
+ + + + + +
+ + + + + + + +
Eigen::VectorXd stan::math::LDLT_factor< stan::math::var, R, C >::vectorD () const
+
+inline
+
+ +

The entries of the diagonal matrix D.

+

They should be strictly positive for a positive definite matrix.

+

Precondition: success() must return true. If success() returns false, this function runs the risk of crashing Stan from within Eigen.

+ +

Definition at line 112 of file LDLT_factor.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+
+template<int R, int C>
+ + + + +
stan::math::LDLT_alloc<R, C>* stan::math::LDLT_factor< stan::math::var, R, C >::_alloc
+
+ +

The LDLT_alloc object actually contains the factorization but is derived from the chainable_alloc class so that it is allocated on the vari stack.

+

This ensures that it's lifespan is longer than the LDLT_factor object which created it. This is needed because the factorization is required during the chain() calls which happen after an LDLT_factor object will most likely have been destroyed.

+ +

Definition at line 130 of file LDLT_factor.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1accumulator-members.html b/doc/api/html/classstan_1_1math_1_1accumulator-members.html new file mode 100644 index 00000000000..3c2f7e38703 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1accumulator-members.html @@ -0,0 +1,120 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::accumulator< T > Member List
+
+
+ +

This is the complete list of members for stan::math::accumulator< T >, including all inherited members.

+ + + + + + + + +
accumulator()stan::math::accumulator< T >inline
add(S x)stan::math::accumulator< T >inline
add(const S &x)stan::math::accumulator< T >inline
add(const Eigen::Matrix< S, R, C > &m)stan::math::accumulator< T >inline
add(const std::vector< S > &xs)stan::math::accumulator< T >inline
sum() const stan::math::accumulator< T >inline
~accumulator()stan::math::accumulator< T >inline
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1accumulator.html b/doc/api/html/classstan_1_1math_1_1accumulator.html new file mode 100644 index 00000000000..447ca4194b5 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1accumulator.html @@ -0,0 +1,443 @@ + + + + + + +Stan Math Library: stan::math::accumulator< T > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
stan::math::accumulator< T > Class Template Reference
+
+
+ +

Class to accumulate values and eventually return their sum. + More...

+ +

#include <accumulator.hpp>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 accumulator ()
 Construct an accumulator. More...
 
 ~accumulator ()
 Destroy an accumulator. More...
 
template<typename S >
boost::enable_if
+< boost::is_arithmetic< S >
+, void >::type 
add (S x)
 Add the specified arithmetic type value to the buffer after static casting it to the class type T. More...
 
template<typename S >
boost::disable_if
+< boost::is_arithmetic< S >
+, typename boost::enable_if
+< boost::is_same< S, T >, void >
+::type >::type 
add (const S &x)
 Add the specified non-arithmetic value to the buffer. More...
 
template<typename S , int R, int C>
void add (const Eigen::Matrix< S, R, C > &m)
 Add each entry in the specified matrix, vector, or row vector of values to the buffer. More...
 
template<typename S >
void add (const std::vector< S > &xs)
 Recursively add each entry in the specified standard vector to the buffer. More...
 
sum () const
 Return the sum of the accumulated values. More...
 
+

Detailed Description

+

template<typename T>
+class stan::math::accumulator< T >

+ +

Class to accumulate values and eventually return their sum.

+

If no values are ever added, the return value is 0.

+

This class is useful for speeding up auto-diff of long sums because it uses the sum() operation (either from stan::math or one defined by argument-dependent lookup.

+
Template Parameters
+ + +
TType of scalar added
+
+
+ +

Definition at line 25 of file accumulator.hpp.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T>
+ + + + + +
+ + + + + + + +
stan::math::accumulator< T >::accumulator ()
+
+inline
+
+ +

Construct an accumulator.

+ +

Definition at line 33 of file accumulator.hpp.

+ +
+
+ +
+
+
+template<typename T>
+ + + + + +
+ + + + + + + +
stan::math::accumulator< T >::~accumulator ()
+
+inline
+
+ +

Destroy an accumulator.

+ +

Definition at line 40 of file accumulator.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T>
+
+template<typename S >
+ + + + + +
+ + + + + + + + +
boost::enable_if<boost::is_arithmetic<S>, void>::type stan::math::accumulator< T >::add (x)
+
+inline
+
+ +

Add the specified arithmetic type value to the buffer after static casting it to the class type T.

+

See the Boost doc for boost::is_arithmetic for information on what counts as an arithmetic type.

+
Template Parameters
+ + +
SType of argument
+
+
+
Parameters
+ + +
xValue to add
+
+
+ +

Definition at line 54 of file accumulator.hpp.

+ +
+
+ +
+
+
+template<typename T>
+
+template<typename S >
+ + + + + +
+ + + + + + + + +
boost::disable_if<boost::is_arithmetic<S>, typename boost::enable_if<boost::is_same<S, T>, void>::type >::type stan::math::accumulator< T >::add (const S & x)
+
+inline
+
+ +

Add the specified non-arithmetic value to the buffer.

+

This function is disabled if the type S is arithmetic or if it's not the same as T.

+

See the Boost doc for boost::is_arithmetic for information on what counts as an arithmetic type.

+
Template Parameters
+ + +
SType of argument
+
+
+
Parameters
+ + +
xValue to add
+
+
+ +

Definition at line 74 of file accumulator.hpp.

+ +
+
+ +
+
+
+template<typename T>
+
+template<typename S , int R, int C>
+ + + + + +
+ + + + + + + + +
void stan::math::accumulator< T >::add (const Eigen::Matrix< S, R, C > & m)
+
+inline
+
+ +

Add each entry in the specified matrix, vector, or row vector of values to the buffer.

+
Template Parameters
+ + + + +
Stype of values in matrix
Rnumber of rows in matrix
Cnumber of columns in matrix
+
+
+
Parameters
+ + +
mMatrix of values to add
+
+
+ +

Definition at line 88 of file accumulator.hpp.

+ +
+
+ +
+
+
+template<typename T>
+
+template<typename S >
+ + + + + +
+ + + + + + + + +
void stan::math::accumulator< T >::add (const std::vector< S > & xs)
+
+inline
+
+ +

Recursively add each entry in the specified standard vector to the buffer.

+

This will allow vectors of primitives, auto-diff variables to be added; if the vector entries are collections, their elements are recursively added.

+
Template Parameters
+ + +
SType of value to recursively add.
+
+
+
Parameters
+ + +
xsVector of entries to add
+
+
+ +

Definition at line 103 of file accumulator.hpp.

+ +
+
+ +
+
+
+template<typename T>
+ + + + + +
+ + + + + + + +
T stan::math::accumulator< T >::sum () const
+
+inline
+
+ +

Return the sum of the accumulated values.

+
Returns
Sum of accumulated values.
+ +

Definition at line 113 of file accumulator.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1chainable-members.html b/doc/api/html/classstan_1_1math_1_1chainable-members.html new file mode 100644 index 00000000000..7d8bdd3540a --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1chainable-members.html @@ -0,0 +1,120 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::chainable Member List
+
+
+ +

This is the complete list of members for stan::math::chainable, including all inherited members.

+ + + + + + + + +
chain()stan::math::chainableinlinevirtual
chainable()stan::math::chainableinline
init_dependent()stan::math::chainableinlinevirtual
operator delete(void *)stan::math::chainableinlinestatic
operator new(size_t nbytes)stan::math::chainableinlinestatic
set_zero_adjoint()stan::math::chainableinlinevirtual
~chainable()stan::math::chainableinlinevirtual
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1chainable.html b/doc/api/html/classstan_1_1math_1_1chainable.html new file mode 100644 index 00000000000..aaddc635a04 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1chainable.html @@ -0,0 +1,393 @@ + + + + + + +Stan Math Library: stan::math::chainable Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +Static Public Member Functions | +List of all members
+
+
stan::math::chainable Class Reference
+
+
+ +

Abstract base class for variable implementations that handles memory management and applying the chain rule. + More...

+ +

#include <chainable.hpp>

+
+Inheritance diagram for stan::math::chainable:
+
+
+ + +stan::math::vari +stan::math::cholesky_decompose_v_vari +stan::math::gevv_vvv_vari +stan::math::op_ddv_vari +stan::math::op_dv_vari +stan::math::op_dvd_vari +stan::math::op_dvv_vari +stan::math::op_matrix_vari +stan::math::op_v_vari +stan::math::op_vd_vari +stan::math::op_vdd_vari +stan::math::op_vdv_vari +stan::math::op_vector_vari +stan::math::op_vv_vari +stan::math::op_vvd_vari +stan::math::op_vvv_vari +stan::math::partials_vari +stan::math::precomputed_gradients_vari +stan::math::stored_gradient_vari +stan::math::sum_v_vari + +
+ + + + + + + + + + + + + + + + + +

+Public Member Functions

 chainable ()
 Construct a chainable object. More...
 
virtual ~chainable ()
 Chainables are not destructible and should go on the function call stack or be allocated with operator new. More...
 
virtual void chain ()
 Apply the chain rule to this variable based on the variables on which it depends. More...
 
virtual void init_dependent ()
 Initialize this chainable's adjoint value to make it the dependent variable in a gradient calculation. More...
 
virtual void set_zero_adjoint ()
 Set the value of the adjoint for this chainable to its initial value. More...
 
+ + + + + + + +

+Static Public Member Functions

static void * operator new (size_t nbytes)
 Allocate memory from the underlying memory pool. More...
 
static void operator delete (void *)
 Delete a pointer from the underlying memory pool. More...
 
+

Detailed Description

+

Abstract base class for variable implementations that handles memory management and applying the chain rule.

+ +

Definition at line 14 of file chainable.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + +
stan::math::chainable::chainable ()
+
+inline
+
+ +

Construct a chainable object.

+

The implementation in this abstract base class is a no-op.

+ +

Definition at line 20 of file chainable.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
virtual stan::math::chainable::~chainable ()
+
+inlinevirtual
+
+ +

Chainables are not destructible and should go on the function call stack or be allocated with operator new.

+ +

Definition at line 26 of file chainable.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
virtual void stan::math::chainable::chain ()
+
+inlinevirtual
+
+ +

Apply the chain rule to this variable based on the variables on which it depends.

+

The base implementation in this class is a no-op.

+ +

Reimplemented in stan::math::precomputed_gradients_vari, stan::math::cholesky_decompose_v_vari, stan::math::stored_gradient_vari, stan::math::gevv_vvv_vari, stan::math::partials_vari, stan::math::sum_v_vari, stan::math::precomp_vvv_vari, stan::math::precomp_vv_vari, and stan::math::precomp_v_vari.

+ +

Definition at line 35 of file chainable.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
virtual void stan::math::chainable::init_dependent ()
+
+inlinevirtual
+
+ +

Initialize this chainable's adjoint value to make it the dependent variable in a gradient calculation.

+ +

Reimplemented in stan::math::vari.

+ +

Definition at line 42 of file chainable.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
static void stan::math::chainable::operator delete (void * )
+
+inlinestatic
+
+ +

Delete a pointer from the underlying memory pool.

+

This no-op implementation enables a subclass to throw exceptions in its constructor. An exception thrown in the constructor of a subclass will result in an error being raised, which is in turn caught and calls delete().

+

See the discussion of "plugging the memory leak" in: http://www.parashift.com/c++-faq/memory-pools.html

+ +

Definition at line 75 of file chainable.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
static void* stan::math::chainable::operator new (size_t nbytes)
+
+inlinestatic
+
+ +

Allocate memory from the underlying memory pool.

+

This memory is is managed by the gradient program and will be recovered as a whole. Classes should not be allocated with this operator if they have non-trivial destructors.

+
Parameters
+ + +
nbytesNumber of bytes to allocate.
+
+
+
Returns
Pointer to allocated bytes.
+ +

Definition at line 61 of file chainable.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
virtual void stan::math::chainable::set_zero_adjoint ()
+
+inlinevirtual
+
+ +

Set the value of the adjoint for this chainable to its initial value.

+ +

Reimplemented in stan::math::vari.

+ +

Definition at line 49 of file chainable.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1chainable.png b/doc/api/html/classstan_1_1math_1_1chainable.png new file mode 100644 index 00000000000..be28a03474f Binary files /dev/null and b/doc/api/html/classstan_1_1math_1_1chainable.png differ diff --git a/doc/api/html/classstan_1_1math_1_1chainable__alloc-members.html b/doc/api/html/classstan_1_1math_1_1chainable__alloc-members.html new file mode 100644 index 00000000000..c4d80d26236 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1chainable__alloc-members.html @@ -0,0 +1,115 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::chainable_alloc Member List
+
+
+ +

This is the complete list of members for stan::math::chainable_alloc, including all inherited members.

+ + + +
chainable_alloc()stan::math::chainable_allocinline
~chainable_alloc()stan::math::chainable_allocinlinevirtual
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1chainable__alloc.html b/doc/api/html/classstan_1_1math_1_1chainable__alloc.html new file mode 100644 index 00000000000..e0fea0cb33c --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1chainable__alloc.html @@ -0,0 +1,194 @@ + + + + + + +Stan Math Library: stan::math::chainable_alloc Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
stan::math::chainable_alloc Class Reference
+
+
+ +

A chainable_alloc is an object which is constructed and destructed normally but the memory lifespan is managed along with the arena allocator for the gradient calculation. + More...

+ +

#include <chainable_alloc.hpp>

+
+Inheritance diagram for stan::math::chainable_alloc:
+
+
+ + +stan::math::LDLT_alloc< R, C > + +
+ + + + + + +

+Public Member Functions

 chainable_alloc ()
 
virtual ~chainable_alloc ()
 
+

Detailed Description

+

A chainable_alloc is an object which is constructed and destructed normally but the memory lifespan is managed along with the arena allocator for the gradient calculation.

+

A chainable_alloc should never be created on the stack, only with a new call.

+ +

Definition at line 17 of file chainable_alloc.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + +
stan::math::chainable_alloc::chainable_alloc ()
+
+inline
+
+ +

Definition at line 19 of file chainable_alloc.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
virtual stan::math::chainable_alloc::~chainable_alloc ()
+
+inlinevirtual
+
+ +

Definition at line 22 of file chainable_alloc.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1chainable__alloc.png b/doc/api/html/classstan_1_1math_1_1chainable__alloc.png new file mode 100644 index 00000000000..a84b08a88b9 Binary files /dev/null and b/doc/api/html/classstan_1_1math_1_1chainable__alloc.png differ diff --git a/doc/api/html/classstan_1_1math_1_1cholesky__decompose__v__vari-members.html b/doc/api/html/classstan_1_1math_1_1cholesky__decompose__v__vari-members.html new file mode 100644 index 00000000000..9fd4cd91204 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1cholesky__decompose__v__vari-members.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::cholesky_decompose_v_vari Member List
+
+
+ +

This is the complete list of members for stan::math::cholesky_decompose_v_vari, including all inherited members.

+ + + + + + + + + + + + + + + + + +
adj_stan::math::vari
chain()stan::math::cholesky_decompose_v_variinlinevirtual
chainable()stan::math::chainableinline
cholesky_decompose_v_vari(const Eigen::Matrix< var,-1,-1 > &A, const Eigen::Matrix< double,-1,-1 > &L_A)stan::math::cholesky_decompose_v_variinline
init_dependent()stan::math::variinlinevirtual
M_stan::math::cholesky_decompose_v_vari
operator delete(void *)stan::math::chainableinlinestatic
operator new(size_t nbytes)stan::math::chainableinlinestatic
set_zero_adjoint()stan::math::variinlinevirtual
val_stan::math::vari
vari(const double x)stan::math::variinlineexplicit
vari(const double x, bool stacked)stan::math::variinline
variRefA_stan::math::cholesky_decompose_v_vari
variRefL_stan::math::cholesky_decompose_v_vari
~chainable()stan::math::chainableinlinevirtual
~vari()stan::math::variinlinevirtual
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1cholesky__decompose__v__vari.html b/doc/api/html/classstan_1_1math_1_1cholesky__decompose__v__vari.html new file mode 100644 index 00000000000..d24d4e6dbe3 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1cholesky__decompose__v__vari.html @@ -0,0 +1,300 @@ + + + + + + +Stan Math Library: stan::math::cholesky_decompose_v_vari Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +Public Attributes | +List of all members
+
+
stan::math::cholesky_decompose_v_vari Class Reference
+
+
+ +

#include <cholesky_decompose.hpp>

+
+Inheritance diagram for stan::math::cholesky_decompose_v_vari:
+
+
+ + +stan::math::vari +stan::math::chainable + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 cholesky_decompose_v_vari (const Eigen::Matrix< var,-1,-1 > &A, const Eigen::Matrix< double,-1,-1 > &L_A)
 
virtual void chain ()
 Apply the chain rule to this variable based on the variables on which it depends. More...
 
- Public Member Functions inherited from stan::math::vari
 vari (const double x)
 Construct a variable implementation from a value. More...
 
 vari (const double x, bool stacked)
 
virtual ~vari ()
 Throw an illegal argument exception. More...
 
virtual void init_dependent ()
 Initialize the adjoint for this (dependent) variable to 1. More...
 
virtual void set_zero_adjoint ()
 Set the adjoint value of this variable to 0. More...
 
- Public Member Functions inherited from stan::math::chainable
 chainable ()
 Construct a chainable object. More...
 
virtual ~chainable ()
 Chainables are not destructible and should go on the function call stack or be allocated with operator new. More...
 
+ + + + + + + + + + + + + + +

+Public Attributes

int M_
 
vari ** variRefA_
 
vari ** variRefL_
 
- Public Attributes inherited from stan::math::vari
const double val_
 The value of this variable. More...
 
double adj_
 The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable. More...
 
+ + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from stan::math::chainable
static void * operator new (size_t nbytes)
 Allocate memory from the underlying memory pool. More...
 
static void operator delete (void *)
 Delete a pointer from the underlying memory pool. More...
 
+

Detailed Description

+
+

Definition at line 18 of file cholesky_decompose.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
stan::math::cholesky_decompose_v_vari::cholesky_decompose_v_vari (const Eigen::Matrix< var,-1,-1 > & A,
const Eigen::Matrix< double,-1,-1 > & L_A 
)
+
+inline
+
+ +

Definition at line 41 of file cholesky_decompose.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
virtual void stan::math::cholesky_decompose_v_vari::chain ()
+
+inlinevirtual
+
+ +

Apply the chain rule to this variable based on the variables on which it depends.

+

The base implementation in this class is a no-op.

+ +

Reimplemented from stan::math::chainable.

+ +

Definition at line 78 of file cholesky_decompose.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
int stan::math::cholesky_decompose_v_vari::M_
+
+ +

Definition at line 20 of file cholesky_decompose.hpp.

+ +
+
+ +
+
+ + + + +
vari** stan::math::cholesky_decompose_v_vari::variRefA_
+
+ +

Definition at line 21 of file cholesky_decompose.hpp.

+ +
+
+ +
+
+ + + + +
vari** stan::math::cholesky_decompose_v_vari::variRefL_
+
+ +

Definition at line 22 of file cholesky_decompose.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1cholesky__decompose__v__vari.png b/doc/api/html/classstan_1_1math_1_1cholesky__decompose__v__vari.png new file mode 100644 index 00000000000..2604ba8d376 Binary files /dev/null and b/doc/api/html/classstan_1_1math_1_1cholesky__decompose__v__vari.png differ diff --git a/doc/api/html/classstan_1_1math_1_1container__view-members.html b/doc/api/html/classstan_1_1math_1_1container__view-members.html new file mode 100644 index 00000000000..7580f27c809 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1container__view-members.html @@ -0,0 +1,115 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::container_view< T1, T2 > Member List
+
+
+ +

This is the complete list of members for stan::math::container_view< T1, T2 >, including all inherited members.

+ + + +
container_view(const T1 &x, T2 *y)stan::math::container_view< T1, T2 >inline
operator[](int i)stan::math::container_view< T1, T2 >inline
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1container__view.html b/doc/api/html/classstan_1_1math_1_1container__view.html new file mode 100644 index 00000000000..0d419e9712c --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1container__view.html @@ -0,0 +1,230 @@ + + + + + + +Stan Math Library: stan::math::container_view< T1, T2 > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
stan::math::container_view< T1, T2 > Class Template Reference
+
+
+ +

Primary template class for container view of array y with same structure as T1 and size as x. + More...

+ +

#include <container_view.hpp>

+ + + + + + + + +

+Public Member Functions

 container_view (const T1 &x, T2 *y)
 Constructor. More...
 
T2 & operator[] (int i)
 operator[](int i) returns reference to view, indexed by i Specialization handle appropriate broadcasting if size of x is 1 More...
 
+

Detailed Description

+

template<typename T1, typename T2>
+class stan::math::container_view< T1, T2 >

+ +

Primary template class for container view of array y with same structure as T1 and size as x.

+
Template Parameters
+ + + +
T1type of view.
T2type of scalar returned by view.
+
+
+ +

Definition at line 21 of file container_view.hpp.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
stan::math::container_view< T1, T2 >::container_view (const T1 & x,
T2 * y 
)
+
+inline
+
+ +

Constructor.

+
Parameters
+ + + +
xobject from which size is to be inferred
yunderlying array
+
+
+ +

Definition at line 29 of file container_view.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + +
T2& stan::math::container_view< T1, T2 >::operator[] (int i)
+
+inline
+
+ +

operator[](int i) returns reference to view, indexed by i Specialization handle appropriate broadcasting if size of x is 1

+
Parameters
+ + +
iindex
+
+
+ +

Definition at line 39 of file container_view.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1container__view_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_ei01a1980462c3df2fa39d131bf0f86062.html b/doc/api/html/classstan_1_1math_1_1container__view_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_ei01a1980462c3df2fa39d131bf0f86062.html new file mode 100644 index 00000000000..f61967252dd --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1container__view_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_ei01a1980462c3df2fa39d131bf0f86062.html @@ -0,0 +1,115 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::container_view< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > > Member List
+
+
+ +

This is the complete list of members for stan::math::container_view< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > >, including all inherited members.

+ + + +
container_view(const Eigen::Matrix< T1, R, C > &x, T2 *y)stan::math::container_view< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > >inline
operator[](int i)stan::math::container_view< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > >inline
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1container__view_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_eif0a5cd6c4f7572d0a0485f479012b4cf.html b/doc/api/html/classstan_1_1math_1_1container__view_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_eif0a5cd6c4f7572d0a0485f479012b4cf.html new file mode 100644 index 00000000000..41fcacdeec7 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1container__view_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_eif0a5cd6c4f7572d0a0485f479012b4cf.html @@ -0,0 +1,233 @@ + + + + + + +Stan Math Library: stan::math::container_view< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
stan::math::container_view< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > > Class Template Reference
+
+
+ +

Template specialization for Eigen::Map view of array with scalar type T2 with size inferred from input Eigen::Matrix. + More...

+ +

#include <container_view.hpp>

+ + + + + + + + +

+Public Member Functions

 container_view (const Eigen::Matrix< T1, R, C > &x, T2 *y)
 Initialize Map dimensions with input matrix dimensions. More...
 
Eigen::Map< Eigen::Matrix< T2,
+R, C > > & 
operator[] (int i)
 operator[](int i) returns Eigen::Map y More...
 
+

Detailed Description

+

template<typename T1, typename T2, int R, int C>
+class stan::math::container_view< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > >

+ +

Template specialization for Eigen::Map view of array with scalar type T2 with size inferred from input Eigen::Matrix.

+
Template Parameters
+ + + + + +
T1scalar type of input matrix
T2scalar type of view.
Rrows of input matrix and view
Ccolumns of input matrix and view
+
+
+ +

Definition at line 23 of file container_view.hpp.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T1 , typename T2 , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
stan::math::container_view< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > >::container_view (const Eigen::Matrix< T1, R, C > & x,
T2 * y 
)
+
+inline
+
+ +

Initialize Map dimensions with input matrix dimensions.

+
Parameters
+ + + +
xinput matrix
yunderlying array
+
+
+ +

Definition at line 32 of file container_view.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T1 , typename T2 , int R, int C>
+ + + + + +
+ + + + + + + + +
Eigen::Map<Eigen::Matrix<T2, R, C> >& stan::math::container_view< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > >::operator[] (int i)
+
+inline
+
+ +

operator[](int i) returns Eigen::Map y

+
Parameters
+ + +
iindex
+
+
+ +

Definition at line 40 of file container_view.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1container__view_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_t2_01_4-members.html b/doc/api/html/classstan_1_1math_1_1container__view_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_t2_01_4-members.html new file mode 100644 index 00000000000..dcbc261ed99 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1container__view_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_t2_01_4-members.html @@ -0,0 +1,115 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::container_view< Eigen::Matrix< T1, R, C >, T2 > Member List
+
+
+ +

This is the complete list of members for stan::math::container_view< Eigen::Matrix< T1, R, C >, T2 >, including all inherited members.

+ + + +
container_view(const Eigen::Matrix< T1, R, C > &x, T2 *y)stan::math::container_view< Eigen::Matrix< T1, R, C >, T2 >inline
operator[](int i)stan::math::container_view< Eigen::Matrix< T1, R, C >, T2 >inline
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1container__view_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_t2_01_4.html b/doc/api/html/classstan_1_1math_1_1container__view_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_t2_01_4.html new file mode 100644 index 00000000000..aec2a737f23 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1container__view_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_t2_01_4.html @@ -0,0 +1,226 @@ + + + + + + +Stan Math Library: stan::math::container_view< Eigen::Matrix< T1, R, C >, T2 > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
stan::math::container_view< Eigen::Matrix< T1, R, C >, T2 > Class Template Reference
+
+
+ +

Template specialization for scalar view of array y with scalar type T2. + More...

+ +

#include <container_view.hpp>

+ + + + + + + + +

+Public Member Functions

 container_view (const Eigen::Matrix< T1, R, C > &x, T2 *y)
 Constructor. More...
 
T2 & operator[] (int i)
 operator[](int i) returns reference to scalar of type T2 at appropriate index i in array y More...
 
+

Detailed Description

+

template<typename T1, typename T2, int R, int C>
+class stan::math::container_view< Eigen::Matrix< T1, R, C >, T2 >

+ +

Template specialization for scalar view of array y with scalar type T2.

+
Template Parameters
+ + + + + +
T1scalar type of input matrix
T2scalar type returned by view.
Rrows of input matrix and view
Ccolumns of input matrix and view
+
+
+ +

Definition at line 58 of file container_view.hpp.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T1 , typename T2 , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
stan::math::container_view< Eigen::Matrix< T1, R, C >, T2 >::container_view (const Eigen::Matrix< T1, R, C > & x,
T2 * y 
)
+
+inline
+
+ +

Constructor.

+
Parameters
+ + + +
xinput matrix
yunderlying array
+
+
+ +

Definition at line 66 of file container_view.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T1 , typename T2 , int R, int C>
+ + + + + +
+ + + + + + + + +
T2& stan::math::container_view< Eigen::Matrix< T1, R, C >, T2 >::operator[] (int i)
+
+inline
+
+ +

operator[](int i) returns reference to scalar of type T2 at appropriate index i in array y

+ +

Definition at line 73 of file container_view.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1container__view_3_01dummy_00_01_t2_01_4-members.html b/doc/api/html/classstan_1_1math_1_1container__view_3_01dummy_00_01_t2_01_4-members.html new file mode 100644 index 00000000000..ecdffef175f --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1container__view_3_01dummy_00_01_t2_01_4-members.html @@ -0,0 +1,116 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::container_view< dummy, T2 > Member List
+
+
+ +

This is the complete list of members for stan::math::container_view< dummy, T2 >, including all inherited members.

+ + + + +
container_view(const T1 &x, scalar_t *y)stan::math::container_view< dummy, T2 >inline
operator[](int n) const stan::math::container_view< dummy, T2 >inline
scalar_t typedefstan::math::container_view< dummy, T2 >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1container__view_3_01dummy_00_01_t2_01_4.html b/doc/api/html/classstan_1_1math_1_1container__view_3_01dummy_00_01_t2_01_4.html new file mode 100644 index 00000000000..1d9dc44ac81 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1container__view_3_01dummy_00_01_t2_01_4.html @@ -0,0 +1,256 @@ + + + + + + +Stan Math Library: stan::math::container_view< dummy, T2 > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Types | +Public Member Functions | +List of all members
+
+
stan::math::container_view< dummy, T2 > Class Template Reference
+
+
+ +

Dummy type specialization, used in conjunction with struct dummy as described above. + More...

+ +

#include <container_view.hpp>

+ + + + +

+Public Types

typedef stan::scalar_type< T2 >
+::type 
scalar_t
 
+ + + + + + + + +

+Public Member Functions

template<typename T1 >
 container_view (const T1 &x, scalar_t *y)
 Nothing initialized. More...
 
scalar_t operator[] (int n) const
 operator[](int i) throws exception More...
 
+

Detailed Description

+

template<typename T2>
+class stan::math::container_view< dummy, T2 >

+ +

Dummy type specialization, used in conjunction with struct dummy as described above.

+
Template Parameters
+ + +
T2type of scalar returned by view
+
+
+ +

Definition at line 62 of file container_view.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T2 >
+ + + + +
typedef stan::scalar_type<T2>::type stan::math::container_view< dummy, T2 >::scalar_t
+
+ +

Definition at line 64 of file container_view.hpp.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T2 >
+
+template<typename T1 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
stan::math::container_view< dummy, T2 >::container_view (const T1 & x,
scalar_ty 
)
+
+inline
+
+ +

Nothing initialized.

+
Parameters
+ + + +
xinput object
yunderlying array
+
+
+ +

Definition at line 73 of file container_view.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T2 >
+ + + + + +
+ + + + + + + + +
scalar_t stan::math::container_view< dummy, T2 >::operator[] (int n) const
+
+inline
+
+ +

operator[](int i) throws exception

+
Parameters
+ + +
nindex
+
+
+ +

Definition at line 81 of file container_view.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1container__view_3_01std_1_1vector_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_24cce6d5dc07358cebfba9d000e25077.html b/doc/api/html/classstan_1_1math_1_1container__view_3_01std_1_1vector_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_24cce6d5dc07358cebfba9d000e25077.html new file mode 100644 index 00000000000..9b03a1dafa7 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1container__view_3_01std_1_1vector_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_24cce6d5dc07358cebfba9d000e25077.html @@ -0,0 +1,115 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::container_view< std::vector< Eigen::Matrix< T1, R, C > >, Eigen::Matrix< T2, R, C > > Member List
+
+
+ +

This is the complete list of members for stan::math::container_view< std::vector< Eigen::Matrix< T1, R, C > >, Eigen::Matrix< T2, R, C > >, including all inherited members.

+ + + +
container_view(const std::vector< Eigen::Matrix< T1, R, C > > &x, T2 *y)stan::math::container_view< std::vector< Eigen::Matrix< T1, R, C > >, Eigen::Matrix< T2, R, C > >inline
operator[](int i)stan::math::container_view< std::vector< Eigen::Matrix< T1, R, C > >, Eigen::Matrix< T2, R, C > >inline
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1container__view_3_01std_1_1vector_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_7f9efd46b00a4e97b56aae6ecc54dbcd.html b/doc/api/html/classstan_1_1math_1_1container__view_3_01std_1_1vector_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_7f9efd46b00a4e97b56aae6ecc54dbcd.html new file mode 100644 index 00000000000..7b7d8337582 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1container__view_3_01std_1_1vector_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_7f9efd46b00a4e97b56aae6ecc54dbcd.html @@ -0,0 +1,228 @@ + + + + + + +Stan Math Library: stan::math::container_view< std::vector< Eigen::Matrix< T1, R, C > >, Eigen::Matrix< T2, R, C > > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
stan::math::container_view< std::vector< Eigen::Matrix< T1, R, C > >, Eigen::Matrix< T2, R, C > > Class Template Reference
+
+
+ +

Template specialization for matrix view of array y with scalar type T2 with shape equal to x. + More...

+ +

#include <container_view.hpp>

+ + + + + + + + +

+Public Member Functions

 container_view (const std::vector< Eigen::Matrix< T1, R, C > > &x, T2 *y)
 Constructor assumes all matrix elements in std::vector are of same dimension. More...
 
Eigen::Map< Eigen::Matrix< T2,
+R, C > > & 
operator[] (int i)
 operator[](int i) returns matrix view of scalartype T2 at appropriate index i in array y More...
 
+

Detailed Description

+

template<typename T1, typename T2, int R, int C>
+class stan::math::container_view< std::vector< Eigen::Matrix< T1, R, C > >, Eigen::Matrix< T2, R, C > >

+ +

Template specialization for matrix view of array y with scalar type T2 with shape equal to x.

+
Template Parameters
+ + + + + +
T1scalar type of input vector of matrices
T2scalar type of matrix view
Rrows of input matrix and view
Ccolumns of input matrix and view
+
+
+ +

Definition at line 91 of file container_view.hpp.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T1 , typename T2 , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
stan::math::container_view< std::vector< Eigen::Matrix< T1, R, C > >, Eigen::Matrix< T2, R, C > >::container_view (const std::vector< Eigen::Matrix< T1, R, C > > & x,
T2 * y 
)
+
+inline
+
+ +

Constructor assumes all matrix elements in std::vector are of same dimension.

+

Initializes y_view as 1x1 matrix because no nullary constructor for Eigen::Map

+
Parameters
+ + + +
xinput matrix
yunderlying array
+
+
+ +

Definition at line 104 of file container_view.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T1 , typename T2 , int R, int C>
+ + + + + +
+ + + + + + + + +
Eigen::Map<Eigen::Matrix<T2, R, C> >& stan::math::container_view< std::vector< Eigen::Matrix< T1, R, C > >, Eigen::Matrix< T2, R, C > >::operator[] (int i)
+
+inline
+
+ +

operator[](int i) returns matrix view of scalartype T2 at appropriate index i in array y

+ +

Definition at line 119 of file container_view.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1container__view_3_01std_1_1vector_3_01_t1_01_4_00_01_t2_01_4-members.html b/doc/api/html/classstan_1_1math_1_1container__view_3_01std_1_1vector_3_01_t1_01_4_00_01_t2_01_4-members.html new file mode 100644 index 00000000000..257e95b950b --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1container__view_3_01std_1_1vector_3_01_t1_01_4_00_01_t2_01_4-members.html @@ -0,0 +1,115 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::container_view< std::vector< T1 >, T2 > Member List
+
+
+ +

This is the complete list of members for stan::math::container_view< std::vector< T1 >, T2 >, including all inherited members.

+ + + +
container_view(const std::vector< T1 > &x, T2 *y)stan::math::container_view< std::vector< T1 >, T2 >inline
operator[](int i)stan::math::container_view< std::vector< T1 >, T2 >inline
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1container__view_3_01std_1_1vector_3_01_t1_01_4_00_01_t2_01_4.html b/doc/api/html/classstan_1_1math_1_1container__view_3_01std_1_1vector_3_01_t1_01_4_00_01_t2_01_4.html new file mode 100644 index 00000000000..3288564f557 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1container__view_3_01std_1_1vector_3_01_t1_01_4_00_01_t2_01_4.html @@ -0,0 +1,230 @@ + + + + + + +Stan Math Library: stan::math::container_view< std::vector< T1 >, T2 > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
stan::math::container_view< std::vector< T1 >, T2 > Class Template Reference
+
+
+ +

Template specialization for scalar view of array y with scalar type T2 with proper indexing inferred from input vector x of scalar type T1. + More...

+ +

#include <container_view.hpp>

+ + + + + + + + +

+Public Member Functions

 container_view (const std::vector< T1 > &x, T2 *y)
 Constructor. More...
 
T2 & operator[] (int i)
 operator[](int i) returns reference to scalar view indexed at i More...
 
+

Detailed Description

+

template<typename T1, typename T2>
+class stan::math::container_view< std::vector< T1 >, T2 >

+ +

Template specialization for scalar view of array y with scalar type T2 with proper indexing inferred from input vector x of scalar type T1.

+
Template Parameters
+ + + +
T1scalar type of input vector
T2scalar type returned by view.
+
+
+ +

Definition at line 20 of file container_view.hpp.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
stan::math::container_view< std::vector< T1 >, T2 >::container_view (const std::vector< T1 > & x,
T2 * y 
)
+
+inline
+
+ +

Constructor.

+
Parameters
+ + + +
xinput vector
yunderlying array
+
+
+ +

Definition at line 28 of file container_view.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + +
T2& stan::math::container_view< std::vector< T1 >, T2 >::operator[] (int i)
+
+inline
+
+ +

operator[](int i) returns reference to scalar view indexed at i

+
Parameters
+ + +
iindex of scalar element
+
+
+ +

Definition at line 37 of file container_view.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1gevv__vvv__vari-members.html b/doc/api/html/classstan_1_1math_1_1gevv__vvv__vari-members.html new file mode 100644 index 00000000000..91b696e3292 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1gevv__vvv__vari-members.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::gevv_vvv_vari Member List
+
+
+ +

This is the complete list of members for stan::math::gevv_vvv_vari, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + +
adj_stan::math::vari
alpha_stan::math::gevv_vvv_variprotected
chain()stan::math::gevv_vvv_variinlinevirtual
chainable()stan::math::chainableinline
dotval_stan::math::gevv_vvv_variprotected
eval_gevv(const stan::math::var *alpha, const stan::math::var *v1, int stride1, const stan::math::var *v2, int stride2, size_t length, double *dotprod)stan::math::gevv_vvv_variinlineprotectedstatic
gevv_vvv_vari(const stan::math::var *alpha, const stan::math::var *v1, int stride1, const stan::math::var *v2, int stride2, size_t length)stan::math::gevv_vvv_variinline
init_dependent()stan::math::variinlinevirtual
length_stan::math::gevv_vvv_variprotected
operator delete(void *)stan::math::chainableinlinestatic
operator new(size_t nbytes)stan::math::chainableinlinestatic
set_zero_adjoint()stan::math::variinlinevirtual
v1_stan::math::gevv_vvv_variprotected
v2_stan::math::gevv_vvv_variprotected
val_stan::math::vari
vari(const double x)stan::math::variinlineexplicit
vari(const double x, bool stacked)stan::math::variinline
~chainable()stan::math::chainableinlinevirtual
~gevv_vvv_vari()stan::math::gevv_vvv_variinlinevirtual
~vari()stan::math::variinlinevirtual
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1gevv__vvv__vari.html b/doc/api/html/classstan_1_1math_1_1gevv__vvv__vari.html new file mode 100644 index 00000000000..89c334a8a9b --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1gevv__vvv__vari.html @@ -0,0 +1,495 @@ + + + + + + +Stan Math Library: stan::math::gevv_vvv_vari Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +Static Protected Member Functions | +Protected Attributes | +List of all members
+
+
stan::math::gevv_vvv_vari Class Reference
+
+
+ +

#include <gevv_vvv_vari.hpp>

+
+Inheritance diagram for stan::math::gevv_vvv_vari:
+
+
+ + +stan::math::vari +stan::math::chainable + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 gevv_vvv_vari (const stan::math::var *alpha, const stan::math::var *v1, int stride1, const stan::math::var *v2, int stride2, size_t length)
 
virtual ~gevv_vvv_vari ()
 
void chain ()
 Apply the chain rule to this variable based on the variables on which it depends. More...
 
- Public Member Functions inherited from stan::math::vari
 vari (const double x)
 Construct a variable implementation from a value. More...
 
 vari (const double x, bool stacked)
 
virtual ~vari ()
 Throw an illegal argument exception. More...
 
virtual void init_dependent ()
 Initialize the adjoint for this (dependent) variable to 1. More...
 
virtual void set_zero_adjoint ()
 Set the adjoint value of this variable to 0. More...
 
- Public Member Functions inherited from stan::math::chainable
 chainable ()
 Construct a chainable object. More...
 
virtual ~chainable ()
 Chainables are not destructible and should go on the function call stack or be allocated with operator new. More...
 
+ + + +

+Static Protected Member Functions

static double eval_gevv (const stan::math::var *alpha, const stan::math::var *v1, int stride1, const stan::math::var *v2, int stride2, size_t length, double *dotprod)
 
+ + + + + + + + + + + +

+Protected Attributes

stan::math::varialpha_
 
stan::math::vari ** v1_
 
stan::math::vari ** v2_
 
double dotval_
 
size_t length_
 
+ + + + + + + + + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from stan::math::chainable
static void * operator new (size_t nbytes)
 Allocate memory from the underlying memory pool. More...
 
static void operator delete (void *)
 Delete a pointer from the underlying memory pool. More...
 
- Public Attributes inherited from stan::math::vari
const double val_
 The value of this variable. More...
 
double adj_
 The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable. More...
 
+

Detailed Description

+
+

Definition at line 11 of file gevv_vvv_vari.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
stan::math::gevv_vvv_vari::gevv_vvv_vari (const stan::math::varalpha,
const stan::math::varv1,
int stride1,
const stan::math::varv2,
int stride2,
size_t length 
)
+
+inline
+
+ +

Definition at line 30 of file gevv_vvv_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
virtual stan::math::gevv_vvv_vari::~gevv_vvv_vari ()
+
+inlinevirtual
+
+ +

Definition at line 45 of file gevv_vvv_vari.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
void stan::math::gevv_vvv_vari::chain ()
+
+inlinevirtual
+
+ +

Apply the chain rule to this variable based on the variables on which it depends.

+

The base implementation in this class is a no-op.

+ +

Reimplemented from stan::math::chainable.

+ +

Definition at line 46 of file gevv_vvv_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static double stan::math::gevv_vvv_vari::eval_gevv (const stan::math::varalpha,
const stan::math::varv1,
int stride1,
const stan::math::varv2,
int stride2,
size_t length,
double * dotprod 
)
+
+inlinestaticprotected
+
+ +

Definition at line 18 of file gevv_vvv_vari.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
stan::math::vari* stan::math::gevv_vvv_vari::alpha_
+
+protected
+
+ +

Definition at line 13 of file gevv_vvv_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
double stan::math::gevv_vvv_vari::dotval_
+
+protected
+
+ +

Definition at line 16 of file gevv_vvv_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
size_t stan::math::gevv_vvv_vari::length_
+
+protected
+
+ +

Definition at line 17 of file gevv_vvv_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
stan::math::vari** stan::math::gevv_vvv_vari::v1_
+
+protected
+
+ +

Definition at line 14 of file gevv_vvv_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
stan::math::vari** stan::math::gevv_vvv_vari::v2_
+
+protected
+
+ +

Definition at line 15 of file gevv_vvv_vari.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1gevv__vvv__vari.png b/doc/api/html/classstan_1_1math_1_1gevv__vvv__vari.png new file mode 100644 index 00000000000..b3e321e034e Binary files /dev/null and b/doc/api/html/classstan_1_1math_1_1gevv__vvv__vari.png differ diff --git a/doc/api/html/classstan_1_1math_1_1op__ddv__vari-members.html b/doc/api/html/classstan_1_1math_1_1op__ddv__vari-members.html new file mode 100644 index 00000000000..f1d025be86b --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1op__ddv__vari-members.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::op_ddv_vari Member List
+
+
+ +

This is the complete list of members for stan::math::op_ddv_vari, including all inherited members.

+ + + + + + + + + + + + + + + + + +
ad_stan::math::op_ddv_variprotected
adj_stan::math::vari
bd_stan::math::op_ddv_variprotected
chain()stan::math::chainableinlinevirtual
chainable()stan::math::chainableinline
cvi_stan::math::op_ddv_variprotected
init_dependent()stan::math::variinlinevirtual
op_ddv_vari(double f, double a, double b, vari *cvi)stan::math::op_ddv_variinline
operator delete(void *)stan::math::chainableinlinestatic
operator new(size_t nbytes)stan::math::chainableinlinestatic
set_zero_adjoint()stan::math::variinlinevirtual
val_stan::math::vari
vari(const double x)stan::math::variinlineexplicit
vari(const double x, bool stacked)stan::math::variinline
~chainable()stan::math::chainableinlinevirtual
~vari()stan::math::variinlinevirtual
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1op__ddv__vari.html b/doc/api/html/classstan_1_1math_1_1op__ddv__vari.html new file mode 100644 index 00000000000..cd75fdd8545 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1op__ddv__vari.html @@ -0,0 +1,305 @@ + + + + + + +Stan Math Library: stan::math::op_ddv_vari Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +Protected Attributes | +List of all members
+
+
stan::math::op_ddv_vari Class Reference
+
+
+ +

#include <ddv_vari.hpp>

+
+Inheritance diagram for stan::math::op_ddv_vari:
+
+
+ + +stan::math::vari +stan::math::chainable + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 op_ddv_vari (double f, double a, double b, vari *cvi)
 
- Public Member Functions inherited from stan::math::vari
 vari (const double x)
 Construct a variable implementation from a value. More...
 
 vari (const double x, bool stacked)
 
virtual ~vari ()
 Throw an illegal argument exception. More...
 
virtual void init_dependent ()
 Initialize the adjoint for this (dependent) variable to 1. More...
 
virtual void set_zero_adjoint ()
 Set the adjoint value of this variable to 0. More...
 
- Public Member Functions inherited from stan::math::chainable
 chainable ()
 Construct a chainable object. More...
 
virtual ~chainable ()
 Chainables are not destructible and should go on the function call stack or be allocated with operator new. More...
 
virtual void chain ()
 Apply the chain rule to this variable based on the variables on which it depends. More...
 
+ + + + + + + +

+Protected Attributes

double ad_
 
double bd_
 
varicvi_
 
+ + + + + + + + + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from stan::math::chainable
static void * operator new (size_t nbytes)
 Allocate memory from the underlying memory pool. More...
 
static void operator delete (void *)
 Delete a pointer from the underlying memory pool. More...
 
- Public Attributes inherited from stan::math::vari
const double val_
 The value of this variable. More...
 
double adj_
 The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable. More...
 
+

Detailed Description

+
+

Definition at line 9 of file ddv_vari.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
stan::math::op_ddv_vari::op_ddv_vari (double f,
double a,
double b,
varicvi 
)
+
+inline
+
+ +

Definition at line 15 of file ddv_vari.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
double stan::math::op_ddv_vari::ad_
+
+protected
+
+ +

Definition at line 11 of file ddv_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
double stan::math::op_ddv_vari::bd_
+
+protected
+
+ +

Definition at line 12 of file ddv_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
vari* stan::math::op_ddv_vari::cvi_
+
+protected
+
+ +

Definition at line 13 of file ddv_vari.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1op__ddv__vari.png b/doc/api/html/classstan_1_1math_1_1op__ddv__vari.png new file mode 100644 index 00000000000..37b52724b80 Binary files /dev/null and b/doc/api/html/classstan_1_1math_1_1op__ddv__vari.png differ diff --git a/doc/api/html/classstan_1_1math_1_1op__dv__vari-members.html b/doc/api/html/classstan_1_1math_1_1op__dv__vari-members.html new file mode 100644 index 00000000000..72958cd1d5f --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1op__dv__vari-members.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::op_dv_vari Member List
+
+
+ +

This is the complete list of members for stan::math::op_dv_vari, including all inherited members.

+ + + + + + + + + + + + + + + + +
ad_stan::math::op_dv_variprotected
adj_stan::math::vari
bvi_stan::math::op_dv_variprotected
chain()stan::math::chainableinlinevirtual
chainable()stan::math::chainableinline
init_dependent()stan::math::variinlinevirtual
op_dv_vari(double f, double a, vari *bvi)stan::math::op_dv_variinline
operator delete(void *)stan::math::chainableinlinestatic
operator new(size_t nbytes)stan::math::chainableinlinestatic
set_zero_adjoint()stan::math::variinlinevirtual
val_stan::math::vari
vari(const double x)stan::math::variinlineexplicit
vari(const double x, bool stacked)stan::math::variinline
~chainable()stan::math::chainableinlinevirtual
~vari()stan::math::variinlinevirtual
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1op__dv__vari.html b/doc/api/html/classstan_1_1math_1_1op__dv__vari.html new file mode 100644 index 00000000000..889beffb6c9 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1op__dv__vari.html @@ -0,0 +1,275 @@ + + + + + + +Stan Math Library: stan::math::op_dv_vari Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +Protected Attributes | +List of all members
+
+
stan::math::op_dv_vari Class Reference
+
+
+ +

#include <dv_vari.hpp>

+
+Inheritance diagram for stan::math::op_dv_vari:
+
+
+ + +stan::math::vari +stan::math::chainable + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 op_dv_vari (double f, double a, vari *bvi)
 
- Public Member Functions inherited from stan::math::vari
 vari (const double x)
 Construct a variable implementation from a value. More...
 
 vari (const double x, bool stacked)
 
virtual ~vari ()
 Throw an illegal argument exception. More...
 
virtual void init_dependent ()
 Initialize the adjoint for this (dependent) variable to 1. More...
 
virtual void set_zero_adjoint ()
 Set the adjoint value of this variable to 0. More...
 
- Public Member Functions inherited from stan::math::chainable
 chainable ()
 Construct a chainable object. More...
 
virtual ~chainable ()
 Chainables are not destructible and should go on the function call stack or be allocated with operator new. More...
 
virtual void chain ()
 Apply the chain rule to this variable based on the variables on which it depends. More...
 
+ + + + + +

+Protected Attributes

double ad_
 
varibvi_
 
+ + + + + + + + + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from stan::math::chainable
static void * operator new (size_t nbytes)
 Allocate memory from the underlying memory pool. More...
 
static void operator delete (void *)
 Delete a pointer from the underlying memory pool. More...
 
- Public Attributes inherited from stan::math::vari
const double val_
 The value of this variable. More...
 
double adj_
 The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable. More...
 
+

Detailed Description

+
+

Definition at line 9 of file dv_vari.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
stan::math::op_dv_vari::op_dv_vari (double f,
double a,
varibvi 
)
+
+inline
+
+ +

Definition at line 14 of file dv_vari.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
double stan::math::op_dv_vari::ad_
+
+protected
+
+ +

Definition at line 11 of file dv_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
vari* stan::math::op_dv_vari::bvi_
+
+protected
+
+ +

Definition at line 12 of file dv_vari.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1op__dv__vari.png b/doc/api/html/classstan_1_1math_1_1op__dv__vari.png new file mode 100644 index 00000000000..f877648db6b Binary files /dev/null and b/doc/api/html/classstan_1_1math_1_1op__dv__vari.png differ diff --git a/doc/api/html/classstan_1_1math_1_1op__dvd__vari-members.html b/doc/api/html/classstan_1_1math_1_1op__dvd__vari-members.html new file mode 100644 index 00000000000..a8032594383 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1op__dvd__vari-members.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::op_dvd_vari Member List
+
+
+ +

This is the complete list of members for stan::math::op_dvd_vari, including all inherited members.

+ + + + + + + + + + + + + + + + + +
ad_stan::math::op_dvd_variprotected
adj_stan::math::vari
bvi_stan::math::op_dvd_variprotected
cd_stan::math::op_dvd_variprotected
chain()stan::math::chainableinlinevirtual
chainable()stan::math::chainableinline
init_dependent()stan::math::variinlinevirtual
op_dvd_vari(double f, double a, vari *bvi, double c)stan::math::op_dvd_variinline
operator delete(void *)stan::math::chainableinlinestatic
operator new(size_t nbytes)stan::math::chainableinlinestatic
set_zero_adjoint()stan::math::variinlinevirtual
val_stan::math::vari
vari(const double x)stan::math::variinlineexplicit
vari(const double x, bool stacked)stan::math::variinline
~chainable()stan::math::chainableinlinevirtual
~vari()stan::math::variinlinevirtual
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1op__dvd__vari.html b/doc/api/html/classstan_1_1math_1_1op__dvd__vari.html new file mode 100644 index 00000000000..98e2847643f --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1op__dvd__vari.html @@ -0,0 +1,305 @@ + + + + + + +Stan Math Library: stan::math::op_dvd_vari Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +Protected Attributes | +List of all members
+
+
stan::math::op_dvd_vari Class Reference
+
+
+ +

#include <dvd_vari.hpp>

+
+Inheritance diagram for stan::math::op_dvd_vari:
+
+
+ + +stan::math::vari +stan::math::chainable + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 op_dvd_vari (double f, double a, vari *bvi, double c)
 
- Public Member Functions inherited from stan::math::vari
 vari (const double x)
 Construct a variable implementation from a value. More...
 
 vari (const double x, bool stacked)
 
virtual ~vari ()
 Throw an illegal argument exception. More...
 
virtual void init_dependent ()
 Initialize the adjoint for this (dependent) variable to 1. More...
 
virtual void set_zero_adjoint ()
 Set the adjoint value of this variable to 0. More...
 
- Public Member Functions inherited from stan::math::chainable
 chainable ()
 Construct a chainable object. More...
 
virtual ~chainable ()
 Chainables are not destructible and should go on the function call stack or be allocated with operator new. More...
 
virtual void chain ()
 Apply the chain rule to this variable based on the variables on which it depends. More...
 
+ + + + + + + +

+Protected Attributes

double ad_
 
varibvi_
 
double cd_
 
+ + + + + + + + + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from stan::math::chainable
static void * operator new (size_t nbytes)
 Allocate memory from the underlying memory pool. More...
 
static void operator delete (void *)
 Delete a pointer from the underlying memory pool. More...
 
- Public Attributes inherited from stan::math::vari
const double val_
 The value of this variable. More...
 
double adj_
 The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable. More...
 
+

Detailed Description

+
+

Definition at line 9 of file dvd_vari.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
stan::math::op_dvd_vari::op_dvd_vari (double f,
double a,
varibvi,
double c 
)
+
+inline
+
+ +

Definition at line 15 of file dvd_vari.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
double stan::math::op_dvd_vari::ad_
+
+protected
+
+ +

Definition at line 11 of file dvd_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
vari* stan::math::op_dvd_vari::bvi_
+
+protected
+
+ +

Definition at line 12 of file dvd_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
double stan::math::op_dvd_vari::cd_
+
+protected
+
+ +

Definition at line 13 of file dvd_vari.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1op__dvd__vari.png b/doc/api/html/classstan_1_1math_1_1op__dvd__vari.png new file mode 100644 index 00000000000..183a02e25f1 Binary files /dev/null and b/doc/api/html/classstan_1_1math_1_1op__dvd__vari.png differ diff --git a/doc/api/html/classstan_1_1math_1_1op__dvv__vari-members.html b/doc/api/html/classstan_1_1math_1_1op__dvv__vari-members.html new file mode 100644 index 00000000000..6fedb664784 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1op__dvv__vari-members.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::op_dvv_vari Member List
+
+
+ +

This is the complete list of members for stan::math::op_dvv_vari, including all inherited members.

+ + + + + + + + + + + + + + + + + +
ad_stan::math::op_dvv_variprotected
adj_stan::math::vari
bvi_stan::math::op_dvv_variprotected
chain()stan::math::chainableinlinevirtual
chainable()stan::math::chainableinline
cvi_stan::math::op_dvv_variprotected
init_dependent()stan::math::variinlinevirtual
op_dvv_vari(double f, double a, vari *bvi, vari *cvi)stan::math::op_dvv_variinline
operator delete(void *)stan::math::chainableinlinestatic
operator new(size_t nbytes)stan::math::chainableinlinestatic
set_zero_adjoint()stan::math::variinlinevirtual
val_stan::math::vari
vari(const double x)stan::math::variinlineexplicit
vari(const double x, bool stacked)stan::math::variinline
~chainable()stan::math::chainableinlinevirtual
~vari()stan::math::variinlinevirtual
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1op__dvv__vari.html b/doc/api/html/classstan_1_1math_1_1op__dvv__vari.html new file mode 100644 index 00000000000..d6f4dfecd46 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1op__dvv__vari.html @@ -0,0 +1,305 @@ + + + + + + +Stan Math Library: stan::math::op_dvv_vari Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +Protected Attributes | +List of all members
+
+
stan::math::op_dvv_vari Class Reference
+
+
+ +

#include <dvv_vari.hpp>

+
+Inheritance diagram for stan::math::op_dvv_vari:
+
+
+ + +stan::math::vari +stan::math::chainable + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 op_dvv_vari (double f, double a, vari *bvi, vari *cvi)
 
- Public Member Functions inherited from stan::math::vari
 vari (const double x)
 Construct a variable implementation from a value. More...
 
 vari (const double x, bool stacked)
 
virtual ~vari ()
 Throw an illegal argument exception. More...
 
virtual void init_dependent ()
 Initialize the adjoint for this (dependent) variable to 1. More...
 
virtual void set_zero_adjoint ()
 Set the adjoint value of this variable to 0. More...
 
- Public Member Functions inherited from stan::math::chainable
 chainable ()
 Construct a chainable object. More...
 
virtual ~chainable ()
 Chainables are not destructible and should go on the function call stack or be allocated with operator new. More...
 
virtual void chain ()
 Apply the chain rule to this variable based on the variables on which it depends. More...
 
+ + + + + + + +

+Protected Attributes

double ad_
 
varibvi_
 
varicvi_
 
+ + + + + + + + + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from stan::math::chainable
static void * operator new (size_t nbytes)
 Allocate memory from the underlying memory pool. More...
 
static void operator delete (void *)
 Delete a pointer from the underlying memory pool. More...
 
- Public Attributes inherited from stan::math::vari
const double val_
 The value of this variable. More...
 
double adj_
 The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable. More...
 
+

Detailed Description

+
+

Definition at line 9 of file dvv_vari.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
stan::math::op_dvv_vari::op_dvv_vari (double f,
double a,
varibvi,
varicvi 
)
+
+inline
+
+ +

Definition at line 15 of file dvv_vari.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
double stan::math::op_dvv_vari::ad_
+
+protected
+
+ +

Definition at line 11 of file dvv_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
vari* stan::math::op_dvv_vari::bvi_
+
+protected
+
+ +

Definition at line 12 of file dvv_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
vari* stan::math::op_dvv_vari::cvi_
+
+protected
+
+ +

Definition at line 13 of file dvv_vari.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1op__dvv__vari.png b/doc/api/html/classstan_1_1math_1_1op__dvv__vari.png new file mode 100644 index 00000000000..4d36bfe297c Binary files /dev/null and b/doc/api/html/classstan_1_1math_1_1op__dvv__vari.png differ diff --git a/doc/api/html/classstan_1_1math_1_1op__matrix__vari-members.html b/doc/api/html/classstan_1_1math_1_1op__matrix__vari-members.html new file mode 100644 index 00000000000..9d29a83e568 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1op__matrix__vari-members.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::op_matrix_vari Member List
+
+
+ +

This is the complete list of members for stan::math::op_matrix_vari, including all inherited members.

+ + + + + + + + + + + + + + + + + + +
adj_stan::math::vari
chain()stan::math::chainableinlinevirtual
chainable()stan::math::chainableinline
init_dependent()stan::math::variinlinevirtual
op_matrix_vari(double f, const Eigen::Matrix< stan::math::var, R, C > &vs)stan::math::op_matrix_variinline
operator delete(void *)stan::math::chainableinlinestatic
operator new(size_t nbytes)stan::math::chainableinlinestatic
operator[](size_t n) const stan::math::op_matrix_variinline
set_zero_adjoint()stan::math::variinlinevirtual
size()stan::math::op_matrix_variinline
size_stan::math::op_matrix_variprotected
val_stan::math::vari
vari(const double x)stan::math::variinlineexplicit
vari(const double x, bool stacked)stan::math::variinline
vis_stan::math::op_matrix_variprotected
~chainable()stan::math::chainableinlinevirtual
~vari()stan::math::variinlinevirtual
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1op__matrix__vari.html b/doc/api/html/classstan_1_1math_1_1op__matrix__vari.html new file mode 100644 index 00000000000..bc9c919252c --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1op__matrix__vari.html @@ -0,0 +1,328 @@ + + + + + + +Stan Math Library: stan::math::op_matrix_vari Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +Protected Attributes | +List of all members
+
+
stan::math::op_matrix_vari Class Reference
+
+
+ +

#include <matrix_vari.hpp>

+
+Inheritance diagram for stan::math::op_matrix_vari:
+
+
+ + +stan::math::vari +stan::math::chainable + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

template<int R, int C>
 op_matrix_vari (double f, const Eigen::Matrix< stan::math::var, R, C > &vs)
 
varioperator[] (size_t n) const
 
size_t size ()
 
- Public Member Functions inherited from stan::math::vari
 vari (const double x)
 Construct a variable implementation from a value. More...
 
 vari (const double x, bool stacked)
 
virtual ~vari ()
 Throw an illegal argument exception. More...
 
virtual void init_dependent ()
 Initialize the adjoint for this (dependent) variable to 1. More...
 
virtual void set_zero_adjoint ()
 Set the adjoint value of this variable to 0. More...
 
- Public Member Functions inherited from stan::math::chainable
 chainable ()
 Construct a chainable object. More...
 
virtual ~chainable ()
 Chainables are not destructible and should go on the function call stack or be allocated with operator new. More...
 
virtual void chain ()
 Apply the chain rule to this variable based on the variables on which it depends. More...
 
+ + + + + +

+Protected Attributes

const size_t size_
 
vari ** vis_
 
+ + + + + + + + + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from stan::math::chainable
static void * operator new (size_t nbytes)
 Allocate memory from the underlying memory pool. More...
 
static void operator delete (void *)
 Delete a pointer from the underlying memory pool. More...
 
- Public Attributes inherited from stan::math::vari
const double val_
 The value of this variable. More...
 
double adj_
 The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable. More...
 
+

Detailed Description

+
+

Definition at line 12 of file matrix_vari.hpp.

+

Constructor & Destructor Documentation

+ +
+
+
+template<int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
stan::math::op_matrix_vari::op_matrix_vari (double f,
const Eigen::Matrix< stan::math::var, R, C > & vs 
)
+
+inline
+
+ +

Definition at line 18 of file matrix_vari.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + + +
vari* stan::math::op_matrix_vari::operator[] (size_t n) const
+
+inline
+
+ +

Definition at line 27 of file matrix_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
size_t stan::math::op_matrix_vari::size ()
+
+inline
+
+ +

Definition at line 30 of file matrix_vari.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
const size_t stan::math::op_matrix_vari::size_
+
+protected
+
+ +

Definition at line 14 of file matrix_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
vari** stan::math::op_matrix_vari::vis_
+
+protected
+
+ +

Definition at line 15 of file matrix_vari.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1op__matrix__vari.png b/doc/api/html/classstan_1_1math_1_1op__matrix__vari.png new file mode 100644 index 00000000000..6e073b61dbd Binary files /dev/null and b/doc/api/html/classstan_1_1math_1_1op__matrix__vari.png differ diff --git a/doc/api/html/classstan_1_1math_1_1op__v__vari-members.html b/doc/api/html/classstan_1_1math_1_1op__v__vari-members.html new file mode 100644 index 00000000000..c1a7d995f80 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1op__v__vari-members.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::op_v_vari Member List
+
+
+ +

This is the complete list of members for stan::math::op_v_vari, including all inherited members.

+ + + + + + + + + + + + + + + +
adj_stan::math::vari
avi_stan::math::op_v_variprotected
chain()stan::math::chainableinlinevirtual
chainable()stan::math::chainableinline
init_dependent()stan::math::variinlinevirtual
op_v_vari(double f, vari *avi)stan::math::op_v_variinline
operator delete(void *)stan::math::chainableinlinestatic
operator new(size_t nbytes)stan::math::chainableinlinestatic
set_zero_adjoint()stan::math::variinlinevirtual
val_stan::math::vari
vari(const double x)stan::math::variinlineexplicit
vari(const double x, bool stacked)stan::math::variinline
~chainable()stan::math::chainableinlinevirtual
~vari()stan::math::variinlinevirtual
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1op__v__vari.html b/doc/api/html/classstan_1_1math_1_1op__v__vari.html new file mode 100644 index 00000000000..18c2b4f59bb --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1op__v__vari.html @@ -0,0 +1,246 @@ + + + + + + +Stan Math Library: stan::math::op_v_vari Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +Protected Attributes | +List of all members
+
+
stan::math::op_v_vari Class Reference
+
+
+ +

#include <v_vari.hpp>

+
+Inheritance diagram for stan::math::op_v_vari:
+
+
+ + +stan::math::vari +stan::math::chainable +stan::math::precomp_v_vari + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 op_v_vari (double f, vari *avi)
 
- Public Member Functions inherited from stan::math::vari
 vari (const double x)
 Construct a variable implementation from a value. More...
 
 vari (const double x, bool stacked)
 
virtual ~vari ()
 Throw an illegal argument exception. More...
 
virtual void init_dependent ()
 Initialize the adjoint for this (dependent) variable to 1. More...
 
virtual void set_zero_adjoint ()
 Set the adjoint value of this variable to 0. More...
 
- Public Member Functions inherited from stan::math::chainable
 chainable ()
 Construct a chainable object. More...
 
virtual ~chainable ()
 Chainables are not destructible and should go on the function call stack or be allocated with operator new. More...
 
virtual void chain ()
 Apply the chain rule to this variable based on the variables on which it depends. More...
 
+ + + +

+Protected Attributes

variavi_
 
+ + + + + + + + + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from stan::math::chainable
static void * operator new (size_t nbytes)
 Allocate memory from the underlying memory pool. More...
 
static void operator delete (void *)
 Delete a pointer from the underlying memory pool. More...
 
- Public Attributes inherited from stan::math::vari
const double val_
 The value of this variable. More...
 
double adj_
 The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable. More...
 
+

Detailed Description

+
+

Definition at line 9 of file v_vari.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
stan::math::op_v_vari::op_v_vari (double f,
variavi 
)
+
+inline
+
+ +

Definition at line 13 of file v_vari.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
vari* stan::math::op_v_vari::avi_
+
+protected
+
+ +

Definition at line 11 of file v_vari.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1op__v__vari.png b/doc/api/html/classstan_1_1math_1_1op__v__vari.png new file mode 100644 index 00000000000..ba0e9542978 Binary files /dev/null and b/doc/api/html/classstan_1_1math_1_1op__v__vari.png differ diff --git a/doc/api/html/classstan_1_1math_1_1op__vd__vari-members.html b/doc/api/html/classstan_1_1math_1_1op__vd__vari-members.html new file mode 100644 index 00000000000..84127134cb7 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1op__vd__vari-members.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::op_vd_vari Member List
+
+
+ +

This is the complete list of members for stan::math::op_vd_vari, including all inherited members.

+ + + + + + + + + + + + + + + + +
adj_stan::math::vari
avi_stan::math::op_vd_variprotected
bd_stan::math::op_vd_variprotected
chain()stan::math::chainableinlinevirtual
chainable()stan::math::chainableinline
init_dependent()stan::math::variinlinevirtual
op_vd_vari(double f, vari *avi, double b)stan::math::op_vd_variinline
operator delete(void *)stan::math::chainableinlinestatic
operator new(size_t nbytes)stan::math::chainableinlinestatic
set_zero_adjoint()stan::math::variinlinevirtual
val_stan::math::vari
vari(const double x)stan::math::variinlineexplicit
vari(const double x, bool stacked)stan::math::variinline
~chainable()stan::math::chainableinlinevirtual
~vari()stan::math::variinlinevirtual
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1op__vd__vari.html b/doc/api/html/classstan_1_1math_1_1op__vd__vari.html new file mode 100644 index 00000000000..b0679021179 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1op__vd__vari.html @@ -0,0 +1,275 @@ + + + + + + +Stan Math Library: stan::math::op_vd_vari Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +Protected Attributes | +List of all members
+
+
stan::math::op_vd_vari Class Reference
+
+
+ +

#include <vd_vari.hpp>

+
+Inheritance diagram for stan::math::op_vd_vari:
+
+
+ + +stan::math::vari +stan::math::chainable + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 op_vd_vari (double f, vari *avi, double b)
 
- Public Member Functions inherited from stan::math::vari
 vari (const double x)
 Construct a variable implementation from a value. More...
 
 vari (const double x, bool stacked)
 
virtual ~vari ()
 Throw an illegal argument exception. More...
 
virtual void init_dependent ()
 Initialize the adjoint for this (dependent) variable to 1. More...
 
virtual void set_zero_adjoint ()
 Set the adjoint value of this variable to 0. More...
 
- Public Member Functions inherited from stan::math::chainable
 chainable ()
 Construct a chainable object. More...
 
virtual ~chainable ()
 Chainables are not destructible and should go on the function call stack or be allocated with operator new. More...
 
virtual void chain ()
 Apply the chain rule to this variable based on the variables on which it depends. More...
 
+ + + + + +

+Protected Attributes

variavi_
 
double bd_
 
+ + + + + + + + + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from stan::math::chainable
static void * operator new (size_t nbytes)
 Allocate memory from the underlying memory pool. More...
 
static void operator delete (void *)
 Delete a pointer from the underlying memory pool. More...
 
- Public Attributes inherited from stan::math::vari
const double val_
 The value of this variable. More...
 
double adj_
 The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable. More...
 
+

Detailed Description

+
+

Definition at line 9 of file vd_vari.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
stan::math::op_vd_vari::op_vd_vari (double f,
variavi,
double b 
)
+
+inline
+
+ +

Definition at line 14 of file vd_vari.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
vari* stan::math::op_vd_vari::avi_
+
+protected
+
+ +

Definition at line 11 of file vd_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
double stan::math::op_vd_vari::bd_
+
+protected
+
+ +

Definition at line 12 of file vd_vari.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1op__vd__vari.png b/doc/api/html/classstan_1_1math_1_1op__vd__vari.png new file mode 100644 index 00000000000..5e81ac9796c Binary files /dev/null and b/doc/api/html/classstan_1_1math_1_1op__vd__vari.png differ diff --git a/doc/api/html/classstan_1_1math_1_1op__vdd__vari-members.html b/doc/api/html/classstan_1_1math_1_1op__vdd__vari-members.html new file mode 100644 index 00000000000..c03b976607a --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1op__vdd__vari-members.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::op_vdd_vari Member List
+
+
+ +

This is the complete list of members for stan::math::op_vdd_vari, including all inherited members.

+ + + + + + + + + + + + + + + + + +
adj_stan::math::vari
avi_stan::math::op_vdd_variprotected
bd_stan::math::op_vdd_variprotected
cd_stan::math::op_vdd_variprotected
chain()stan::math::chainableinlinevirtual
chainable()stan::math::chainableinline
init_dependent()stan::math::variinlinevirtual
op_vdd_vari(double f, vari *avi, double b, double c)stan::math::op_vdd_variinline
operator delete(void *)stan::math::chainableinlinestatic
operator new(size_t nbytes)stan::math::chainableinlinestatic
set_zero_adjoint()stan::math::variinlinevirtual
val_stan::math::vari
vari(const double x)stan::math::variinlineexplicit
vari(const double x, bool stacked)stan::math::variinline
~chainable()stan::math::chainableinlinevirtual
~vari()stan::math::variinlinevirtual
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1op__vdd__vari.html b/doc/api/html/classstan_1_1math_1_1op__vdd__vari.html new file mode 100644 index 00000000000..e31b76fb059 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1op__vdd__vari.html @@ -0,0 +1,305 @@ + + + + + + +Stan Math Library: stan::math::op_vdd_vari Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +Protected Attributes | +List of all members
+
+
stan::math::op_vdd_vari Class Reference
+
+
+ +

#include <vdd_vari.hpp>

+
+Inheritance diagram for stan::math::op_vdd_vari:
+
+
+ + +stan::math::vari +stan::math::chainable + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 op_vdd_vari (double f, vari *avi, double b, double c)
 
- Public Member Functions inherited from stan::math::vari
 vari (const double x)
 Construct a variable implementation from a value. More...
 
 vari (const double x, bool stacked)
 
virtual ~vari ()
 Throw an illegal argument exception. More...
 
virtual void init_dependent ()
 Initialize the adjoint for this (dependent) variable to 1. More...
 
virtual void set_zero_adjoint ()
 Set the adjoint value of this variable to 0. More...
 
- Public Member Functions inherited from stan::math::chainable
 chainable ()
 Construct a chainable object. More...
 
virtual ~chainable ()
 Chainables are not destructible and should go on the function call stack or be allocated with operator new. More...
 
virtual void chain ()
 Apply the chain rule to this variable based on the variables on which it depends. More...
 
+ + + + + + + +

+Protected Attributes

variavi_
 
double bd_
 
double cd_
 
+ + + + + + + + + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from stan::math::chainable
static void * operator new (size_t nbytes)
 Allocate memory from the underlying memory pool. More...
 
static void operator delete (void *)
 Delete a pointer from the underlying memory pool. More...
 
- Public Attributes inherited from stan::math::vari
const double val_
 The value of this variable. More...
 
double adj_
 The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable. More...
 
+

Detailed Description

+
+

Definition at line 9 of file vdd_vari.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
stan::math::op_vdd_vari::op_vdd_vari (double f,
variavi,
double b,
double c 
)
+
+inline
+
+ +

Definition at line 15 of file vdd_vari.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
vari* stan::math::op_vdd_vari::avi_
+
+protected
+
+ +

Definition at line 11 of file vdd_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
double stan::math::op_vdd_vari::bd_
+
+protected
+
+ +

Definition at line 12 of file vdd_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
double stan::math::op_vdd_vari::cd_
+
+protected
+
+ +

Definition at line 13 of file vdd_vari.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1op__vdd__vari.png b/doc/api/html/classstan_1_1math_1_1op__vdd__vari.png new file mode 100644 index 00000000000..f6ded95ffd6 Binary files /dev/null and b/doc/api/html/classstan_1_1math_1_1op__vdd__vari.png differ diff --git a/doc/api/html/classstan_1_1math_1_1op__vdv__vari-members.html b/doc/api/html/classstan_1_1math_1_1op__vdv__vari-members.html new file mode 100644 index 00000000000..fcdf10f7dfc --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1op__vdv__vari-members.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::op_vdv_vari Member List
+
+
+ +

This is the complete list of members for stan::math::op_vdv_vari, including all inherited members.

+ + + + + + + + + + + + + + + + + +
adj_stan::math::vari
avi_stan::math::op_vdv_variprotected
bd_stan::math::op_vdv_variprotected
chain()stan::math::chainableinlinevirtual
chainable()stan::math::chainableinline
cvi_stan::math::op_vdv_variprotected
init_dependent()stan::math::variinlinevirtual
op_vdv_vari(double f, vari *avi, double b, vari *cvi)stan::math::op_vdv_variinline
operator delete(void *)stan::math::chainableinlinestatic
operator new(size_t nbytes)stan::math::chainableinlinestatic
set_zero_adjoint()stan::math::variinlinevirtual
val_stan::math::vari
vari(const double x)stan::math::variinlineexplicit
vari(const double x, bool stacked)stan::math::variinline
~chainable()stan::math::chainableinlinevirtual
~vari()stan::math::variinlinevirtual
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1op__vdv__vari.html b/doc/api/html/classstan_1_1math_1_1op__vdv__vari.html new file mode 100644 index 00000000000..27abb00e0d3 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1op__vdv__vari.html @@ -0,0 +1,305 @@ + + + + + + +Stan Math Library: stan::math::op_vdv_vari Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +Protected Attributes | +List of all members
+
+
stan::math::op_vdv_vari Class Reference
+
+
+ +

#include <vdv_vari.hpp>

+
+Inheritance diagram for stan::math::op_vdv_vari:
+
+
+ + +stan::math::vari +stan::math::chainable + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 op_vdv_vari (double f, vari *avi, double b, vari *cvi)
 
- Public Member Functions inherited from stan::math::vari
 vari (const double x)
 Construct a variable implementation from a value. More...
 
 vari (const double x, bool stacked)
 
virtual ~vari ()
 Throw an illegal argument exception. More...
 
virtual void init_dependent ()
 Initialize the adjoint for this (dependent) variable to 1. More...
 
virtual void set_zero_adjoint ()
 Set the adjoint value of this variable to 0. More...
 
- Public Member Functions inherited from stan::math::chainable
 chainable ()
 Construct a chainable object. More...
 
virtual ~chainable ()
 Chainables are not destructible and should go on the function call stack or be allocated with operator new. More...
 
virtual void chain ()
 Apply the chain rule to this variable based on the variables on which it depends. More...
 
+ + + + + + + +

+Protected Attributes

variavi_
 
double bd_
 
varicvi_
 
+ + + + + + + + + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from stan::math::chainable
static void * operator new (size_t nbytes)
 Allocate memory from the underlying memory pool. More...
 
static void operator delete (void *)
 Delete a pointer from the underlying memory pool. More...
 
- Public Attributes inherited from stan::math::vari
const double val_
 The value of this variable. More...
 
double adj_
 The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable. More...
 
+

Detailed Description

+
+

Definition at line 9 of file vdv_vari.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
stan::math::op_vdv_vari::op_vdv_vari (double f,
variavi,
double b,
varicvi 
)
+
+inline
+
+ +

Definition at line 15 of file vdv_vari.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
vari* stan::math::op_vdv_vari::avi_
+
+protected
+
+ +

Definition at line 11 of file vdv_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
double stan::math::op_vdv_vari::bd_
+
+protected
+
+ +

Definition at line 12 of file vdv_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
vari* stan::math::op_vdv_vari::cvi_
+
+protected
+
+ +

Definition at line 13 of file vdv_vari.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1op__vdv__vari.png b/doc/api/html/classstan_1_1math_1_1op__vdv__vari.png new file mode 100644 index 00000000000..3d3bb266bec Binary files /dev/null and b/doc/api/html/classstan_1_1math_1_1op__vdv__vari.png differ diff --git a/doc/api/html/classstan_1_1math_1_1op__vector__vari-members.html b/doc/api/html/classstan_1_1math_1_1op__vector__vari-members.html new file mode 100644 index 00000000000..2db0fad5415 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1op__vector__vari-members.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::op_vector_vari Member List
+
+
+ +

This is the complete list of members for stan::math::op_vector_vari, including all inherited members.

+ + + + + + + + + + + + + + + + + + +
adj_stan::math::vari
chain()stan::math::chainableinlinevirtual
chainable()stan::math::chainableinline
init_dependent()stan::math::variinlinevirtual
op_vector_vari(double f, const std::vector< stan::math::var > &vs)stan::math::op_vector_variinline
operator delete(void *)stan::math::chainableinlinestatic
operator new(size_t nbytes)stan::math::chainableinlinestatic
operator[](size_t n) const stan::math::op_vector_variinline
set_zero_adjoint()stan::math::variinlinevirtual
size()stan::math::op_vector_variinline
size_stan::math::op_vector_variprotected
val_stan::math::vari
vari(const double x)stan::math::variinlineexplicit
vari(const double x, bool stacked)stan::math::variinline
vis_stan::math::op_vector_variprotected
~chainable()stan::math::chainableinlinevirtual
~vari()stan::math::variinlinevirtual
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1op__vector__vari.html b/doc/api/html/classstan_1_1math_1_1op__vector__vari.html new file mode 100644 index 00000000000..e7544d4f347 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1op__vector__vari.html @@ -0,0 +1,325 @@ + + + + + + +Stan Math Library: stan::math::op_vector_vari Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +Protected Attributes | +List of all members
+
+
stan::math::op_vector_vari Class Reference
+
+
+ +

#include <vector_vari.hpp>

+
+Inheritance diagram for stan::math::op_vector_vari:
+
+
+ + +stan::math::vari +stan::math::chainable + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 op_vector_vari (double f, const std::vector< stan::math::var > &vs)
 
varioperator[] (size_t n) const
 
size_t size ()
 
- Public Member Functions inherited from stan::math::vari
 vari (const double x)
 Construct a variable implementation from a value. More...
 
 vari (const double x, bool stacked)
 
virtual ~vari ()
 Throw an illegal argument exception. More...
 
virtual void init_dependent ()
 Initialize the adjoint for this (dependent) variable to 1. More...
 
virtual void set_zero_adjoint ()
 Set the adjoint value of this variable to 0. More...
 
- Public Member Functions inherited from stan::math::chainable
 chainable ()
 Construct a chainable object. More...
 
virtual ~chainable ()
 Chainables are not destructible and should go on the function call stack or be allocated with operator new. More...
 
virtual void chain ()
 Apply the chain rule to this variable based on the variables on which it depends. More...
 
+ + + + + +

+Protected Attributes

const size_t size_
 
vari ** vis_
 
+ + + + + + + + + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from stan::math::chainable
static void * operator new (size_t nbytes)
 Allocate memory from the underlying memory pool. More...
 
static void operator delete (void *)
 Delete a pointer from the underlying memory pool. More...
 
- Public Attributes inherited from stan::math::vari
const double val_
 The value of this variable. More...
 
double adj_
 The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable. More...
 
+

Detailed Description

+
+

Definition at line 11 of file vector_vari.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
stan::math::op_vector_vari::op_vector_vari (double f,
const std::vector< stan::math::var > & vs 
)
+
+inline
+
+ +

Definition at line 16 of file vector_vari.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + + +
vari* stan::math::op_vector_vari::operator[] (size_t n) const
+
+inline
+
+ +

Definition at line 24 of file vector_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
size_t stan::math::op_vector_vari::size ()
+
+inline
+
+ +

Definition at line 27 of file vector_vari.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
const size_t stan::math::op_vector_vari::size_
+
+protected
+
+ +

Definition at line 13 of file vector_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
vari** stan::math::op_vector_vari::vis_
+
+protected
+
+ +

Definition at line 14 of file vector_vari.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1op__vector__vari.png b/doc/api/html/classstan_1_1math_1_1op__vector__vari.png new file mode 100644 index 00000000000..848560daec5 Binary files /dev/null and b/doc/api/html/classstan_1_1math_1_1op__vector__vari.png differ diff --git a/doc/api/html/classstan_1_1math_1_1op__vv__vari-members.html b/doc/api/html/classstan_1_1math_1_1op__vv__vari-members.html new file mode 100644 index 00000000000..3c6cd209b6b --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1op__vv__vari-members.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::op_vv_vari Member List
+
+
+ +

This is the complete list of members for stan::math::op_vv_vari, including all inherited members.

+ + + + + + + + + + + + + + + + +
adj_stan::math::vari
avi_stan::math::op_vv_variprotected
bvi_stan::math::op_vv_variprotected
chain()stan::math::chainableinlinevirtual
chainable()stan::math::chainableinline
init_dependent()stan::math::variinlinevirtual
op_vv_vari(double f, vari *avi, vari *bvi)stan::math::op_vv_variinline
operator delete(void *)stan::math::chainableinlinestatic
operator new(size_t nbytes)stan::math::chainableinlinestatic
set_zero_adjoint()stan::math::variinlinevirtual
val_stan::math::vari
vari(const double x)stan::math::variinlineexplicit
vari(const double x, bool stacked)stan::math::variinline
~chainable()stan::math::chainableinlinevirtual
~vari()stan::math::variinlinevirtual
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1op__vv__vari.html b/doc/api/html/classstan_1_1math_1_1op__vv__vari.html new file mode 100644 index 00000000000..f346383111e --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1op__vv__vari.html @@ -0,0 +1,276 @@ + + + + + + +Stan Math Library: stan::math::op_vv_vari Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +Protected Attributes | +List of all members
+
+
stan::math::op_vv_vari Class Reference
+
+
+ +

#include <vv_vari.hpp>

+
+Inheritance diagram for stan::math::op_vv_vari:
+
+
+ + +stan::math::vari +stan::math::chainable +stan::math::precomp_vv_vari + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 op_vv_vari (double f, vari *avi, vari *bvi)
 
- Public Member Functions inherited from stan::math::vari
 vari (const double x)
 Construct a variable implementation from a value. More...
 
 vari (const double x, bool stacked)
 
virtual ~vari ()
 Throw an illegal argument exception. More...
 
virtual void init_dependent ()
 Initialize the adjoint for this (dependent) variable to 1. More...
 
virtual void set_zero_adjoint ()
 Set the adjoint value of this variable to 0. More...
 
- Public Member Functions inherited from stan::math::chainable
 chainable ()
 Construct a chainable object. More...
 
virtual ~chainable ()
 Chainables are not destructible and should go on the function call stack or be allocated with operator new. More...
 
virtual void chain ()
 Apply the chain rule to this variable based on the variables on which it depends. More...
 
+ + + + + +

+Protected Attributes

variavi_
 
varibvi_
 
+ + + + + + + + + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from stan::math::chainable
static void * operator new (size_t nbytes)
 Allocate memory from the underlying memory pool. More...
 
static void operator delete (void *)
 Delete a pointer from the underlying memory pool. More...
 
- Public Attributes inherited from stan::math::vari
const double val_
 The value of this variable. More...
 
double adj_
 The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable. More...
 
+

Detailed Description

+
+

Definition at line 9 of file vv_vari.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
stan::math::op_vv_vari::op_vv_vari (double f,
variavi,
varibvi 
)
+
+inline
+
+ +

Definition at line 14 of file vv_vari.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
vari* stan::math::op_vv_vari::avi_
+
+protected
+
+ +

Definition at line 11 of file vv_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
vari* stan::math::op_vv_vari::bvi_
+
+protected
+
+ +

Definition at line 12 of file vv_vari.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1op__vv__vari.png b/doc/api/html/classstan_1_1math_1_1op__vv__vari.png new file mode 100644 index 00000000000..360843667e2 Binary files /dev/null and b/doc/api/html/classstan_1_1math_1_1op__vv__vari.png differ diff --git a/doc/api/html/classstan_1_1math_1_1op__vvd__vari-members.html b/doc/api/html/classstan_1_1math_1_1op__vvd__vari-members.html new file mode 100644 index 00000000000..36ccf4257c8 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1op__vvd__vari-members.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::op_vvd_vari Member List
+
+
+ +

This is the complete list of members for stan::math::op_vvd_vari, including all inherited members.

+ + + + + + + + + + + + + + + + + +
adj_stan::math::vari
avi_stan::math::op_vvd_variprotected
bvi_stan::math::op_vvd_variprotected
cd_stan::math::op_vvd_variprotected
chain()stan::math::chainableinlinevirtual
chainable()stan::math::chainableinline
init_dependent()stan::math::variinlinevirtual
op_vvd_vari(double f, vari *avi, vari *bvi, double c)stan::math::op_vvd_variinline
operator delete(void *)stan::math::chainableinlinestatic
operator new(size_t nbytes)stan::math::chainableinlinestatic
set_zero_adjoint()stan::math::variinlinevirtual
val_stan::math::vari
vari(const double x)stan::math::variinlineexplicit
vari(const double x, bool stacked)stan::math::variinline
~chainable()stan::math::chainableinlinevirtual
~vari()stan::math::variinlinevirtual
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1op__vvd__vari.html b/doc/api/html/classstan_1_1math_1_1op__vvd__vari.html new file mode 100644 index 00000000000..1e3b5d86e9d --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1op__vvd__vari.html @@ -0,0 +1,305 @@ + + + + + + +Stan Math Library: stan::math::op_vvd_vari Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +Protected Attributes | +List of all members
+
+
stan::math::op_vvd_vari Class Reference
+
+
+ +

#include <vvd_vari.hpp>

+
+Inheritance diagram for stan::math::op_vvd_vari:
+
+
+ + +stan::math::vari +stan::math::chainable + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 op_vvd_vari (double f, vari *avi, vari *bvi, double c)
 
- Public Member Functions inherited from stan::math::vari
 vari (const double x)
 Construct a variable implementation from a value. More...
 
 vari (const double x, bool stacked)
 
virtual ~vari ()
 Throw an illegal argument exception. More...
 
virtual void init_dependent ()
 Initialize the adjoint for this (dependent) variable to 1. More...
 
virtual void set_zero_adjoint ()
 Set the adjoint value of this variable to 0. More...
 
- Public Member Functions inherited from stan::math::chainable
 chainable ()
 Construct a chainable object. More...
 
virtual ~chainable ()
 Chainables are not destructible and should go on the function call stack or be allocated with operator new. More...
 
virtual void chain ()
 Apply the chain rule to this variable based on the variables on which it depends. More...
 
+ + + + + + + +

+Protected Attributes

variavi_
 
varibvi_
 
double cd_
 
+ + + + + + + + + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from stan::math::chainable
static void * operator new (size_t nbytes)
 Allocate memory from the underlying memory pool. More...
 
static void operator delete (void *)
 Delete a pointer from the underlying memory pool. More...
 
- Public Attributes inherited from stan::math::vari
const double val_
 The value of this variable. More...
 
double adj_
 The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable. More...
 
+

Detailed Description

+
+

Definition at line 9 of file vvd_vari.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
stan::math::op_vvd_vari::op_vvd_vari (double f,
variavi,
varibvi,
double c 
)
+
+inline
+
+ +

Definition at line 15 of file vvd_vari.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
vari* stan::math::op_vvd_vari::avi_
+
+protected
+
+ +

Definition at line 11 of file vvd_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
vari* stan::math::op_vvd_vari::bvi_
+
+protected
+
+ +

Definition at line 12 of file vvd_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
double stan::math::op_vvd_vari::cd_
+
+protected
+
+ +

Definition at line 13 of file vvd_vari.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1op__vvd__vari.png b/doc/api/html/classstan_1_1math_1_1op__vvd__vari.png new file mode 100644 index 00000000000..4b0a22b7cbd Binary files /dev/null and b/doc/api/html/classstan_1_1math_1_1op__vvd__vari.png differ diff --git a/doc/api/html/classstan_1_1math_1_1op__vvv__vari-members.html b/doc/api/html/classstan_1_1math_1_1op__vvv__vari-members.html new file mode 100644 index 00000000000..ee4b3cdac50 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1op__vvv__vari-members.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::op_vvv_vari Member List
+
+
+ +

This is the complete list of members for stan::math::op_vvv_vari, including all inherited members.

+ + + + + + + + + + + + + + + + + +
adj_stan::math::vari
avi_stan::math::op_vvv_variprotected
bvi_stan::math::op_vvv_variprotected
chain()stan::math::chainableinlinevirtual
chainable()stan::math::chainableinline
cvi_stan::math::op_vvv_variprotected
init_dependent()stan::math::variinlinevirtual
op_vvv_vari(double f, vari *avi, vari *bvi, vari *cvi)stan::math::op_vvv_variinline
operator delete(void *)stan::math::chainableinlinestatic
operator new(size_t nbytes)stan::math::chainableinlinestatic
set_zero_adjoint()stan::math::variinlinevirtual
val_stan::math::vari
vari(const double x)stan::math::variinlineexplicit
vari(const double x, bool stacked)stan::math::variinline
~chainable()stan::math::chainableinlinevirtual
~vari()stan::math::variinlinevirtual
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1op__vvv__vari.html b/doc/api/html/classstan_1_1math_1_1op__vvv__vari.html new file mode 100644 index 00000000000..d07eb177b8c --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1op__vvv__vari.html @@ -0,0 +1,306 @@ + + + + + + +Stan Math Library: stan::math::op_vvv_vari Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +Protected Attributes | +List of all members
+
+
stan::math::op_vvv_vari Class Reference
+
+
+ +

#include <vvv_vari.hpp>

+
+Inheritance diagram for stan::math::op_vvv_vari:
+
+
+ + +stan::math::vari +stan::math::chainable +stan::math::precomp_vvv_vari + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 op_vvv_vari (double f, vari *avi, vari *bvi, vari *cvi)
 
- Public Member Functions inherited from stan::math::vari
 vari (const double x)
 Construct a variable implementation from a value. More...
 
 vari (const double x, bool stacked)
 
virtual ~vari ()
 Throw an illegal argument exception. More...
 
virtual void init_dependent ()
 Initialize the adjoint for this (dependent) variable to 1. More...
 
virtual void set_zero_adjoint ()
 Set the adjoint value of this variable to 0. More...
 
- Public Member Functions inherited from stan::math::chainable
 chainable ()
 Construct a chainable object. More...
 
virtual ~chainable ()
 Chainables are not destructible and should go on the function call stack or be allocated with operator new. More...
 
virtual void chain ()
 Apply the chain rule to this variable based on the variables on which it depends. More...
 
+ + + + + + + +

+Protected Attributes

variavi_
 
varibvi_
 
varicvi_
 
+ + + + + + + + + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from stan::math::chainable
static void * operator new (size_t nbytes)
 Allocate memory from the underlying memory pool. More...
 
static void operator delete (void *)
 Delete a pointer from the underlying memory pool. More...
 
- Public Attributes inherited from stan::math::vari
const double val_
 The value of this variable. More...
 
double adj_
 The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable. More...
 
+

Detailed Description

+
+

Definition at line 10 of file vvv_vari.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
stan::math::op_vvv_vari::op_vvv_vari (double f,
variavi,
varibvi,
varicvi 
)
+
+inline
+
+ +

Definition at line 16 of file vvv_vari.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
vari* stan::math::op_vvv_vari::avi_
+
+protected
+
+ +

Definition at line 12 of file vvv_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
vari* stan::math::op_vvv_vari::bvi_
+
+protected
+
+ +

Definition at line 13 of file vvv_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
vari* stan::math::op_vvv_vari::cvi_
+
+protected
+
+ +

Definition at line 14 of file vvv_vari.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1op__vvv__vari.png b/doc/api/html/classstan_1_1math_1_1op__vvv__vari.png new file mode 100644 index 00000000000..50a24da3e5c Binary files /dev/null and b/doc/api/html/classstan_1_1math_1_1op__vvv__vari.png differ diff --git a/doc/api/html/classstan_1_1math_1_1partials__vari-members.html b/doc/api/html/classstan_1_1math_1_1partials__vari-members.html new file mode 100644 index 00000000000..0e74fdc9ce1 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1partials__vari-members.html @@ -0,0 +1,126 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::partials_vari Member List
+
+
+ +

This is the complete list of members for stan::math::partials_vari, including all inherited members.

+ + + + + + + + + + + + + + +
adj_stan::math::vari
chain()stan::math::partials_variinlinevirtual
chainable()stan::math::chainableinline
init_dependent()stan::math::variinlinevirtual
operator delete(void *)stan::math::chainableinlinestatic
operator new(size_t nbytes)stan::math::chainableinlinestatic
partials_vari(double value, size_t N, vari **operands, double *partials)stan::math::partials_variinline
set_zero_adjoint()stan::math::variinlinevirtual
val_stan::math::vari
vari(const double x)stan::math::variinlineexplicit
vari(const double x, bool stacked)stan::math::variinline
~chainable()stan::math::chainableinlinevirtual
~vari()stan::math::variinlinevirtual
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1partials__vari.html b/doc/api/html/classstan_1_1math_1_1partials__vari.html new file mode 100644 index 00000000000..30e523515b4 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1partials__vari.html @@ -0,0 +1,259 @@ + + + + + + +Stan Math Library: stan::math::partials_vari Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
stan::math::partials_vari Class Reference
+
+
+ +

#include <OperandsAndPartials.hpp>

+
+Inheritance diagram for stan::math::partials_vari:
+
+
+ + +stan::math::vari +stan::math::chainable + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 partials_vari (double value, size_t N, vari **operands, double *partials)
 
void chain ()
 Apply the chain rule to this variable based on the variables on which it depends. More...
 
- Public Member Functions inherited from stan::math::vari
 vari (const double x)
 Construct a variable implementation from a value. More...
 
 vari (const double x, bool stacked)
 
virtual ~vari ()
 Throw an illegal argument exception. More...
 
virtual void init_dependent ()
 Initialize the adjoint for this (dependent) variable to 1. More...
 
virtual void set_zero_adjoint ()
 Set the adjoint value of this variable to 0. More...
 
- Public Member Functions inherited from stan::math::chainable
 chainable ()
 Construct a chainable object. More...
 
virtual ~chainable ()
 Chainables are not destructible and should go on the function call stack or be allocated with operator new. More...
 
+ + + + + + + + + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from stan::math::chainable
static void * operator new (size_t nbytes)
 Allocate memory from the underlying memory pool. More...
 
static void operator delete (void *)
 Delete a pointer from the underlying memory pool. More...
 
- Public Attributes inherited from stan::math::vari
const double val_
 The value of this variable. More...
 
double adj_
 The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable. More...
 
+

Detailed Description

+
+

Definition at line 28 of file OperandsAndPartials.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
stan::math::partials_vari::partials_vari (double value,
size_t N,
vari ** operands,
double * partials 
)
+
+inline
+
+ +

Definition at line 34 of file OperandsAndPartials.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
void stan::math::partials_vari::chain ()
+
+inlinevirtual
+
+ +

Apply the chain rule to this variable based on the variables on which it depends.

+

The base implementation in this class is a no-op.

+ +

Reimplemented from stan::math::chainable.

+ +

Definition at line 41 of file OperandsAndPartials.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1partials__vari.png b/doc/api/html/classstan_1_1math_1_1partials__vari.png new file mode 100644 index 00000000000..d260e1b4844 Binary files /dev/null and b/doc/api/html/classstan_1_1math_1_1partials__vari.png differ diff --git a/doc/api/html/classstan_1_1math_1_1precomp__v__vari-members.html b/doc/api/html/classstan_1_1math_1_1precomp__v__vari-members.html new file mode 100644 index 00000000000..913dbe2a10d --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1precomp__v__vari-members.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::precomp_v_vari Member List
+
+
+ +

This is the complete list of members for stan::math::precomp_v_vari, including all inherited members.

+ + + + + + + + + + + + + + + + + +
adj_stan::math::vari
avi_stan::math::op_v_variprotected
chain()stan::math::precomp_v_variinlinevirtual
chainable()stan::math::chainableinline
da_stan::math::precomp_v_variprotected
init_dependent()stan::math::variinlinevirtual
op_v_vari(double f, vari *avi)stan::math::op_v_variinline
operator delete(void *)stan::math::chainableinlinestatic
operator new(size_t nbytes)stan::math::chainableinlinestatic
precomp_v_vari(double val, vari *avi, double da)stan::math::precomp_v_variinline
set_zero_adjoint()stan::math::variinlinevirtual
val_stan::math::vari
vari(const double x)stan::math::variinlineexplicit
vari(const double x, bool stacked)stan::math::variinline
~chainable()stan::math::chainableinlinevirtual
~vari()stan::math::variinlinevirtual
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1precomp__v__vari.html b/doc/api/html/classstan_1_1math_1_1precomp__v__vari.html new file mode 100644 index 00000000000..29b337f9983 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1precomp__v__vari.html @@ -0,0 +1,289 @@ + + + + + + +Stan Math Library: stan::math::precomp_v_vari Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +Protected Attributes | +List of all members
+
+
stan::math::precomp_v_vari Class Reference
+
+
+ +

#include <precomp_v_vari.hpp>

+
+Inheritance diagram for stan::math::precomp_v_vari:
+
+
+ + +stan::math::op_v_vari +stan::math::vari +stan::math::chainable + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 precomp_v_vari (double val, vari *avi, double da)
 
void chain ()
 Apply the chain rule to this variable based on the variables on which it depends. More...
 
- Public Member Functions inherited from stan::math::op_v_vari
 op_v_vari (double f, vari *avi)
 
- Public Member Functions inherited from stan::math::vari
 vari (const double x)
 Construct a variable implementation from a value. More...
 
 vari (const double x, bool stacked)
 
virtual ~vari ()
 Throw an illegal argument exception. More...
 
virtual void init_dependent ()
 Initialize the adjoint for this (dependent) variable to 1. More...
 
virtual void set_zero_adjoint ()
 Set the adjoint value of this variable to 0. More...
 
- Public Member Functions inherited from stan::math::chainable
 chainable ()
 Construct a chainable object. More...
 
virtual ~chainable ()
 Chainables are not destructible and should go on the function call stack or be allocated with operator new. More...
 
+ + + + + + +

+Protected Attributes

double da_
 
- Protected Attributes inherited from stan::math::op_v_vari
variavi_
 
+ + + + + + + + + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from stan::math::chainable
static void * operator new (size_t nbytes)
 Allocate memory from the underlying memory pool. More...
 
static void operator delete (void *)
 Delete a pointer from the underlying memory pool. More...
 
- Public Attributes inherited from stan::math::vari
const double val_
 The value of this variable. More...
 
double adj_
 The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable. More...
 
+

Detailed Description

+
+

Definition at line 11 of file precomp_v_vari.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
stan::math::precomp_v_vari::precomp_v_vari (double val,
variavi,
double da 
)
+
+inline
+
+ +

Definition at line 15 of file precomp_v_vari.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
void stan::math::precomp_v_vari::chain ()
+
+inlinevirtual
+
+ +

Apply the chain rule to this variable based on the variables on which it depends.

+

The base implementation in this class is a no-op.

+ +

Reimplemented from stan::math::chainable.

+ +

Definition at line 19 of file precomp_v_vari.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
double stan::math::precomp_v_vari::da_
+
+protected
+
+ +

Definition at line 13 of file precomp_v_vari.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1precomp__v__vari.png b/doc/api/html/classstan_1_1math_1_1precomp__v__vari.png new file mode 100644 index 00000000000..661b0b2b49e Binary files /dev/null and b/doc/api/html/classstan_1_1math_1_1precomp__v__vari.png differ diff --git a/doc/api/html/classstan_1_1math_1_1precomp__vv__vari-members.html b/doc/api/html/classstan_1_1math_1_1precomp__vv__vari-members.html new file mode 100644 index 00000000000..f3af9d1c8e2 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1precomp__vv__vari-members.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::precomp_vv_vari Member List
+
+
+ +

This is the complete list of members for stan::math::precomp_vv_vari, including all inherited members.

+ + + + + + + + + + + + + + + + + + + +
adj_stan::math::vari
avi_stan::math::op_vv_variprotected
bvi_stan::math::op_vv_variprotected
chain()stan::math::precomp_vv_variinlinevirtual
chainable()stan::math::chainableinline
da_stan::math::precomp_vv_variprotected
db_stan::math::precomp_vv_variprotected
init_dependent()stan::math::variinlinevirtual
op_vv_vari(double f, vari *avi, vari *bvi)stan::math::op_vv_variinline
operator delete(void *)stan::math::chainableinlinestatic
operator new(size_t nbytes)stan::math::chainableinlinestatic
precomp_vv_vari(double val, vari *avi, vari *bvi, double da, double db)stan::math::precomp_vv_variinline
set_zero_adjoint()stan::math::variinlinevirtual
val_stan::math::vari
vari(const double x)stan::math::variinlineexplicit
vari(const double x, bool stacked)stan::math::variinline
~chainable()stan::math::chainableinlinevirtual
~vari()stan::math::variinlinevirtual
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1precomp__vv__vari.html b/doc/api/html/classstan_1_1math_1_1precomp__vv__vari.html new file mode 100644 index 00000000000..39d0c34b22a --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1precomp__vv__vari.html @@ -0,0 +1,327 @@ + + + + + + +Stan Math Library: stan::math::precomp_vv_vari Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +Protected Attributes | +List of all members
+
+
stan::math::precomp_vv_vari Class Reference
+
+
+ +

#include <precomp_vv_vari.hpp>

+
+Inheritance diagram for stan::math::precomp_vv_vari:
+
+
+ + +stan::math::op_vv_vari +stan::math::vari +stan::math::chainable + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 precomp_vv_vari (double val, vari *avi, vari *bvi, double da, double db)
 
void chain ()
 Apply the chain rule to this variable based on the variables on which it depends. More...
 
- Public Member Functions inherited from stan::math::op_vv_vari
 op_vv_vari (double f, vari *avi, vari *bvi)
 
- Public Member Functions inherited from stan::math::vari
 vari (const double x)
 Construct a variable implementation from a value. More...
 
 vari (const double x, bool stacked)
 
virtual ~vari ()
 Throw an illegal argument exception. More...
 
virtual void init_dependent ()
 Initialize the adjoint for this (dependent) variable to 1. More...
 
virtual void set_zero_adjoint ()
 Set the adjoint value of this variable to 0. More...
 
- Public Member Functions inherited from stan::math::chainable
 chainable ()
 Construct a chainable object. More...
 
virtual ~chainable ()
 Chainables are not destructible and should go on the function call stack or be allocated with operator new. More...
 
+ + + + + + + + + + +

+Protected Attributes

double da_
 
double db_
 
- Protected Attributes inherited from stan::math::op_vv_vari
variavi_
 
varibvi_
 
+ + + + + + + + + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from stan::math::chainable
static void * operator new (size_t nbytes)
 Allocate memory from the underlying memory pool. More...
 
static void operator delete (void *)
 Delete a pointer from the underlying memory pool. More...
 
- Public Attributes inherited from stan::math::vari
const double val_
 The value of this variable. More...
 
double adj_
 The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable. More...
 
+

Detailed Description

+
+

Definition at line 11 of file precomp_vv_vari.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
stan::math::precomp_vv_vari::precomp_vv_vari (double val,
variavi,
varibvi,
double da,
double db 
)
+
+inline
+
+ +

Definition at line 16 of file precomp_vv_vari.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
void stan::math::precomp_vv_vari::chain ()
+
+inlinevirtual
+
+ +

Apply the chain rule to this variable based on the variables on which it depends.

+

The base implementation in this class is a no-op.

+ +

Reimplemented from stan::math::chainable.

+ +

Definition at line 23 of file precomp_vv_vari.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
double stan::math::precomp_vv_vari::da_
+
+protected
+
+ +

Definition at line 13 of file precomp_vv_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
double stan::math::precomp_vv_vari::db_
+
+protected
+
+ +

Definition at line 14 of file precomp_vv_vari.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1precomp__vv__vari.png b/doc/api/html/classstan_1_1math_1_1precomp__vv__vari.png new file mode 100644 index 00000000000..8fa18206c99 Binary files /dev/null and b/doc/api/html/classstan_1_1math_1_1precomp__vv__vari.png differ diff --git a/doc/api/html/classstan_1_1math_1_1precomp__vvv__vari-members.html b/doc/api/html/classstan_1_1math_1_1precomp__vvv__vari-members.html new file mode 100644 index 00000000000..50fdd788dea --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1precomp__vvv__vari-members.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::precomp_vvv_vari Member List
+
+
+ +

This is the complete list of members for stan::math::precomp_vvv_vari, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + +
adj_stan::math::vari
avi_stan::math::op_vvv_variprotected
bvi_stan::math::op_vvv_variprotected
chain()stan::math::precomp_vvv_variinlinevirtual
chainable()stan::math::chainableinline
cvi_stan::math::op_vvv_variprotected
da_stan::math::precomp_vvv_variprotected
db_stan::math::precomp_vvv_variprotected
dc_stan::math::precomp_vvv_variprotected
init_dependent()stan::math::variinlinevirtual
op_vvv_vari(double f, vari *avi, vari *bvi, vari *cvi)stan::math::op_vvv_variinline
operator delete(void *)stan::math::chainableinlinestatic
operator new(size_t nbytes)stan::math::chainableinlinestatic
precomp_vvv_vari(double val, vari *avi, vari *bvi, vari *cvi, double da, double db, double dc)stan::math::precomp_vvv_variinline
set_zero_adjoint()stan::math::variinlinevirtual
val_stan::math::vari
vari(const double x)stan::math::variinlineexplicit
vari(const double x, bool stacked)stan::math::variinline
~chainable()stan::math::chainableinlinevirtual
~vari()stan::math::variinlinevirtual
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1precomp__vvv__vari.html b/doc/api/html/classstan_1_1math_1_1precomp__vvv__vari.html new file mode 100644 index 00000000000..6bef071c222 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1precomp__vvv__vari.html @@ -0,0 +1,365 @@ + + + + + + +Stan Math Library: stan::math::precomp_vvv_vari Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +Protected Attributes | +List of all members
+
+
stan::math::precomp_vvv_vari Class Reference
+
+
+ +

#include <precomp_vvv_vari.hpp>

+
+Inheritance diagram for stan::math::precomp_vvv_vari:
+
+
+ + +stan::math::op_vvv_vari +stan::math::vari +stan::math::chainable + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 precomp_vvv_vari (double val, vari *avi, vari *bvi, vari *cvi, double da, double db, double dc)
 
void chain ()
 Apply the chain rule to this variable based on the variables on which it depends. More...
 
- Public Member Functions inherited from stan::math::op_vvv_vari
 op_vvv_vari (double f, vari *avi, vari *bvi, vari *cvi)
 
- Public Member Functions inherited from stan::math::vari
 vari (const double x)
 Construct a variable implementation from a value. More...
 
 vari (const double x, bool stacked)
 
virtual ~vari ()
 Throw an illegal argument exception. More...
 
virtual void init_dependent ()
 Initialize the adjoint for this (dependent) variable to 1. More...
 
virtual void set_zero_adjoint ()
 Set the adjoint value of this variable to 0. More...
 
- Public Member Functions inherited from stan::math::chainable
 chainable ()
 Construct a chainable object. More...
 
virtual ~chainable ()
 Chainables are not destructible and should go on the function call stack or be allocated with operator new. More...
 
+ + + + + + + + + + + + + + +

+Protected Attributes

double da_
 
double db_
 
double dc_
 
- Protected Attributes inherited from stan::math::op_vvv_vari
variavi_
 
varibvi_
 
varicvi_
 
+ + + + + + + + + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from stan::math::chainable
static void * operator new (size_t nbytes)
 Allocate memory from the underlying memory pool. More...
 
static void operator delete (void *)
 Delete a pointer from the underlying memory pool. More...
 
- Public Attributes inherited from stan::math::vari
const double val_
 The value of this variable. More...
 
double adj_
 The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable. More...
 
+

Detailed Description

+
+

Definition at line 11 of file precomp_vvv_vari.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
stan::math::precomp_vvv_vari::precomp_vvv_vari (double val,
variavi,
varibvi,
varicvi,
double da,
double db,
double dc 
)
+
+inline
+
+ +

Definition at line 17 of file precomp_vvv_vari.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
void stan::math::precomp_vvv_vari::chain ()
+
+inlinevirtual
+
+ +

Apply the chain rule to this variable based on the variables on which it depends.

+

The base implementation in this class is a no-op.

+ +

Reimplemented from stan::math::chainable.

+ +

Definition at line 25 of file precomp_vvv_vari.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
double stan::math::precomp_vvv_vari::da_
+
+protected
+
+ +

Definition at line 13 of file precomp_vvv_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
double stan::math::precomp_vvv_vari::db_
+
+protected
+
+ +

Definition at line 14 of file precomp_vvv_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
double stan::math::precomp_vvv_vari::dc_
+
+protected
+
+ +

Definition at line 15 of file precomp_vvv_vari.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1precomp__vvv__vari.png b/doc/api/html/classstan_1_1math_1_1precomp__vvv__vari.png new file mode 100644 index 00000000000..2bfda7c26d4 Binary files /dev/null and b/doc/api/html/classstan_1_1math_1_1precomp__vvv__vari.png differ diff --git a/doc/api/html/classstan_1_1math_1_1precomputed__gradients__vari-members.html b/doc/api/html/classstan_1_1math_1_1precomputed__gradients__vari-members.html new file mode 100644 index 00000000000..b46cee007ff --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1precomputed__gradients__vari-members.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::precomputed_gradients_vari Member List
+
+
+ +

This is the complete list of members for stan::math::precomputed_gradients_vari, including all inherited members.

+ + + + + + + + + + + + + + + + + + +
adj_stan::math::vari
chain()stan::math::precomputed_gradients_variinlinevirtual
chainable()stan::math::chainableinline
gradients_stan::math::precomputed_gradients_variprotected
init_dependent()stan::math::variinlinevirtual
operator delete(void *)stan::math::chainableinlinestatic
operator new(size_t nbytes)stan::math::chainableinlinestatic
precomputed_gradients_vari(double val, size_t size, vari **varis, double *gradients)stan::math::precomputed_gradients_variinline
precomputed_gradients_vari(double val, const std::vector< var > &vars, const std::vector< double > &gradients)stan::math::precomputed_gradients_variinline
set_zero_adjoint()stan::math::variinlinevirtual
size_stan::math::precomputed_gradients_variprotected
val_stan::math::vari
vari(const double x)stan::math::variinlineexplicit
vari(const double x, bool stacked)stan::math::variinline
varis_stan::math::precomputed_gradients_variprotected
~chainable()stan::math::chainableinlinevirtual
~vari()stan::math::variinlinevirtual
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1precomputed__gradients__vari.html b/doc/api/html/classstan_1_1math_1_1precomputed__gradients__vari.html new file mode 100644 index 00000000000..ca883cc8680 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1precomputed__gradients__vari.html @@ -0,0 +1,413 @@ + + + + + + +Stan Math Library: stan::math::precomputed_gradients_vari Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +Protected Attributes | +List of all members
+
+
stan::math::precomputed_gradients_vari Class Reference
+
+
+ +

A variable implementation taking a sequence of operands and partial derivatives with respect to the operands. + More...

+ +

#include <precomputed_gradients.hpp>

+
+Inheritance diagram for stan::math::precomputed_gradients_vari:
+
+
+ + +stan::math::vari +stan::math::chainable + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 precomputed_gradients_vari (double val, size_t size, vari **varis, double *gradients)
 Construct a precomputed vari with the specified value, operands, and gradients. More...
 
 precomputed_gradients_vari (double val, const std::vector< var > &vars, const std::vector< double > &gradients)
 Construct a precomputed vari with the specified value, operands, and gradients. More...
 
void chain ()
 Implements the chain rule for this variable, using the prestored operands and gradient. More...
 
- Public Member Functions inherited from stan::math::vari
 vari (const double x)
 Construct a variable implementation from a value. More...
 
 vari (const double x, bool stacked)
 
virtual ~vari ()
 Throw an illegal argument exception. More...
 
virtual void init_dependent ()
 Initialize the adjoint for this (dependent) variable to 1. More...
 
virtual void set_zero_adjoint ()
 Set the adjoint value of this variable to 0. More...
 
- Public Member Functions inherited from stan::math::chainable
 chainable ()
 Construct a chainable object. More...
 
virtual ~chainable ()
 Chainables are not destructible and should go on the function call stack or be allocated with operator new. More...
 
+ + + + + + + +

+Protected Attributes

const size_t size_
 
vari ** varis_
 
double * gradients_
 
+ + + + + + + + + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from stan::math::chainable
static void * operator new (size_t nbytes)
 Allocate memory from the underlying memory pool. More...
 
static void operator delete (void *)
 Delete a pointer from the underlying memory pool. More...
 
- Public Attributes inherited from stan::math::vari
const double val_
 The value of this variable. More...
 
double adj_
 The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable. More...
 
+

Detailed Description

+

A variable implementation taking a sequence of operands and partial derivatives with respect to the operands.

+

Stan users should use function precomputed_gradients() directly.

+ +

Definition at line 21 of file precomputed_gradients.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
stan::math::precomputed_gradients_vari::precomputed_gradients_vari (double val,
size_t size,
vari ** varis,
double * gradients 
)
+
+inline
+
+ +

Construct a precomputed vari with the specified value, operands, and gradients.

+
Parameters
+ + + + + +
[in]valThe value of the variable.
[in]sizeSize of operands and gradients
[in]varisOperand implementations.
[in]gradientsGradients with respect to operands.
+
+
+ +

Definition at line 37 of file precomputed_gradients.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
stan::math::precomputed_gradients_vari::precomputed_gradients_vari (double val,
const std::vector< var > & vars,
const std::vector< double > & gradients 
)
+
+inline
+
+ +

Construct a precomputed vari with the specified value, operands, and gradients.

+
Parameters
+ + + + +
[in]valThe value of the variable.
[in]varsVector of operands.
[in]gradientsVector of partial derivatives of value with respect to operands.
+
+
+
Exceptions
+ + +
std::invalid_argumentif the sizes of the vectors don't match.
+
+
+ +

Definition at line 58 of file precomputed_gradients.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
void stan::math::precomputed_gradients_vari::chain ()
+
+inlinevirtual
+
+ +

Implements the chain rule for this variable, using the prestored operands and gradient.

+ +

Reimplemented from stan::math::chainable.

+ +

Definition at line 79 of file precomputed_gradients.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
double* stan::math::precomputed_gradients_vari::gradients_
+
+protected
+
+ +

Definition at line 25 of file precomputed_gradients.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const size_t stan::math::precomputed_gradients_vari::size_
+
+protected
+
+ +

Definition at line 23 of file precomputed_gradients.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
vari** stan::math::precomputed_gradients_vari::varis_
+
+protected
+
+ +

Definition at line 24 of file precomputed_gradients.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1precomputed__gradients__vari.png b/doc/api/html/classstan_1_1math_1_1precomputed__gradients__vari.png new file mode 100644 index 00000000000..641a68b8f3b Binary files /dev/null and b/doc/api/html/classstan_1_1math_1_1precomputed__gradients__vari.png differ diff --git a/doc/api/html/classstan_1_1math_1_1seq__view-members.html b/doc/api/html/classstan_1_1math_1_1seq__view-members.html new file mode 100644 index 00000000000..dcf5ddbe3cf --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1seq__view-members.html @@ -0,0 +1,116 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::seq_view< T, S > Member List
+
+
+ +

This is the complete list of members for stan::math::seq_view< T, S >, including all inherited members.

+ + + + +
operator[](int n) const stan::math::seq_view< T, S >inline
seq_view(typename pass_type< S >::type x)stan::math::seq_view< T, S >inlineexplicit
size() const stan::math::seq_view< T, S >inline
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1seq__view.html b/doc/api/html/classstan_1_1math_1_1seq__view.html new file mode 100644 index 00000000000..6830ad88ac0 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1seq__view.html @@ -0,0 +1,219 @@ + + + + + + +Stan Math Library: stan::math::seq_view< T, S > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
stan::math::seq_view< T, S > Class Template Reference
+
+
+ +

#include <seq_view.hpp>

+ + + + + + + + +

+Public Member Functions

 seq_view (typename pass_type< S >::type x)
 
pass_type< T >::type operator[] (int n) const
 
int size () const
 
+

Detailed Description

+

template<typename T, typename S>
+class stan::math::seq_view< T, S >

+ + +

Definition at line 42 of file seq_view.hpp.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T , typename S >
+ + + + + +
+ + + + + + + + +
stan::math::seq_view< T, S >::seq_view (typename pass_type< S >::type x)
+
+inlineexplicit
+
+ +

Definition at line 46 of file seq_view.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T , typename S >
+ + + + + +
+ + + + + + + + +
pass_type<T>::type stan::math::seq_view< T, S >::operator[] (int n) const
+
+inline
+
+ +

Definition at line 50 of file seq_view.hpp.

+ +
+
+ +
+
+
+template<typename T , typename S >
+ + + + + +
+ + + + + + + +
int stan::math::seq_view< T, S >::size () const
+
+inline
+
+ +

Definition at line 53 of file seq_view.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00_01_eigen_1_1_dynamic_01_4_01_4-members.html b/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00_01_eigen_1_1_dynamic_01_4_01_4-members.html new file mode 100644 index 00000000000..c7d7c1b287c --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00_01_eigen_1_1_dynamic_01_4_01_4-members.html @@ -0,0 +1,116 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::seq_view< T, Eigen::Matrix< S, 1, Eigen::Dynamic > > Member List
+
+
+ +

This is the complete list of members for stan::math::seq_view< T, Eigen::Matrix< S, 1, Eigen::Dynamic > >, including all inherited members.

+ + + + +
operator[](int n) const stan::math::seq_view< T, Eigen::Matrix< S, 1, Eigen::Dynamic > >inline
seq_view(typename pass_type< Eigen::Matrix< S, 1, Eigen::Dynamic > >::type x)stan::math::seq_view< T, Eigen::Matrix< S, 1, Eigen::Dynamic > >inlineexplicit
size() const stan::math::seq_view< T, Eigen::Matrix< S, 1, Eigen::Dynamic > >inline
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00_01_eigen_1_1_dynamic_01_4_01_4.html b/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00_01_eigen_1_1_dynamic_01_4_01_4.html new file mode 100644 index 00000000000..61b69ec8d85 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00_01_eigen_1_1_dynamic_01_4_01_4.html @@ -0,0 +1,219 @@ + + + + + + +Stan Math Library: stan::math::seq_view< T, Eigen::Matrix< S, 1, Eigen::Dynamic > > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
stan::math::seq_view< T, Eigen::Matrix< S, 1, Eigen::Dynamic > > Class Template Reference
+
+
+ +

#include <seq_view.hpp>

+ + + + + + + + +

+Public Member Functions

 seq_view (typename pass_type< Eigen::Matrix< S, 1, Eigen::Dynamic > >::type x)
 
pass_type< T >::type operator[] (int n) const
 
int size () const
 
+

Detailed Description

+

template<typename T, typename S>
+class stan::math::seq_view< T, Eigen::Matrix< S, 1, Eigen::Dynamic > >

+ + +

Definition at line 78 of file seq_view.hpp.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T , typename S >
+ + + + + +
+ + + + + + + + +
stan::math::seq_view< T, Eigen::Matrix< S, 1, Eigen::Dynamic > >::seq_view (typename pass_type< Eigen::Matrix< S, 1, Eigen::Dynamic > >::type x)
+
+inlineexplicit
+
+ +

Definition at line 82 of file seq_view.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T , typename S >
+ + + + + +
+ + + + + + + + +
pass_type<T>::type stan::math::seq_view< T, Eigen::Matrix< S, 1, Eigen::Dynamic > >::operator[] (int n) const
+
+inline
+
+ +

Definition at line 87 of file seq_view.hpp.

+ +
+
+ +
+
+
+template<typename T , typename S >
+ + + + + +
+ + + + + + + +
int stan::math::seq_view< T, Eigen::Matrix< S, 1, Eigen::Dynamic > >::size () const
+
+inline
+
+ +

Definition at line 90 of file seq_view.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_011_01_4_01_4-members.html b/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_011_01_4_01_4-members.html new file mode 100644 index 00000000000..ab5d79cc9dd --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_011_01_4_01_4-members.html @@ -0,0 +1,116 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > > Member List
+
+
+ +

This is the complete list of members for stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > >, including all inherited members.

+ + + + +
operator[](int n) const stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > >inline
seq_view(typename pass_type< Eigen::Matrix< S, Eigen::Dynamic, 1 > >::type x)stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > >inlineexplicit
size() const stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > >inline
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_011_01_4_01_4.html b/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_011_01_4_01_4.html new file mode 100644 index 00000000000..923fa1b4f6b --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_011_01_4_01_4.html @@ -0,0 +1,219 @@ + + + + + + +Stan Math Library: stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > > Class Template Reference
+
+
+ +

#include <seq_view.hpp>

+ + + + + + + + +

+Public Member Functions

 seq_view (typename pass_type< Eigen::Matrix< S, Eigen::Dynamic, 1 > >::type x)
 
pass_type< T >::type operator[] (int n) const
 
int size () const
 
+

Detailed Description

+

template<typename T, typename S>
+class stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > >

+ + +

Definition at line 59 of file seq_view.hpp.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T , typename S >
+ + + + + +
+ + + + + + + + +
stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > >::seq_view (typename pass_type< Eigen::Matrix< S, Eigen::Dynamic, 1 > >::type x)
+
+inlineexplicit
+
+ +

Definition at line 63 of file seq_view.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T , typename S >
+ + + + + +
+ + + + + + + + +
pass_type<T>::type stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > >::operator[] (int n) const
+
+inline
+
+ +

Definition at line 68 of file seq_view.hpp.

+ +
+
+ +
+
+
+template<typename T , typename S >
+ + + + + +
+ + + + + + + +
int stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > >::size () const
+
+inline
+
+ +

Definition at line 71 of file seq_view.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4.html b/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4.html new file mode 100644 index 00000000000..3f70c7bfde9 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4.html @@ -0,0 +1,219 @@ + + + + + + +Stan Math Library: stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > > Class Template Reference
+
+
+ +

#include <seq_view.hpp>

+ + + + + + + + +

+Public Member Functions

 seq_view (typename pass_type< Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >::type x)
 
pass_type< T >::type operator[] (int n) const
 
int size () const
 
+

Detailed Description

+

template<typename T, typename S>
+class stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >

+ + +

Definition at line 99 of file seq_view.hpp.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T , typename S >
+ + + + + +
+ + + + + + + + +
stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >::seq_view (typename pass_type< Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >::type x)
+
+inlineexplicit
+
+ +

Definition at line 105 of file seq_view.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T , typename S >
+ + + + + +
+ + + + + + + + +
pass_type<T>::type stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >::operator[] (int n) const
+
+inline
+
+ +

Definition at line 110 of file seq_view.hpp.

+ +
+
+ +
+
+
+template<typename T , typename S >
+ + + + + +
+ + + + + + + +
int stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >::size () const
+
+inline
+
+ +

Definition at line 113 of file seq_view.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_085212abef8028c93e19b6c8ba8c0204d.html b/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_085212abef8028c93e19b6c8ba8c0204d.html new file mode 100644 index 00000000000..0d50df7a132 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_085212abef8028c93e19b6c8ba8c0204d.html @@ -0,0 +1,116 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > > Member List
+
+
+ +

This is the complete list of members for stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >, including all inherited members.

+ + + + +
operator[](int n) const stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >inline
seq_view(typename pass_type< Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >::type x)stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >inlineexplicit
size() const stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >inline
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4-members.html b/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4-members.html new file mode 100644 index 00000000000..cde2e2aaafb --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4-members.html @@ -0,0 +1,116 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::seq_view< T, std::vector< S > > Member List
+
+
+ +

This is the complete list of members for stan::math::seq_view< T, std::vector< S > >, including all inherited members.

+ + + + +
operator[](int n) const stan::math::seq_view< T, std::vector< S > >inline
seq_view(typename pass_type< std::vector< S > >::type x)stan::math::seq_view< T, std::vector< S > >inlineexplicit
size() const stan::math::seq_view< T, std::vector< S > >inline
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4.html b/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4.html new file mode 100644 index 00000000000..7f1d1ec2d1a --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4.html @@ -0,0 +1,219 @@ + + + + + + +Stan Math Library: stan::math::seq_view< T, std::vector< S > > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
stan::math::seq_view< T, std::vector< S > > Class Template Reference
+
+
+ +

#include <seq_view.hpp>

+ + + + + + + + +

+Public Member Functions

 seq_view (typename pass_type< std::vector< S > >::type x)
 
pass_type< T >::type operator[] (int n) const
 
int size () const
 
+

Detailed Description

+

template<typename T, typename S>
+class stan::math::seq_view< T, std::vector< S > >

+ + +

Definition at line 120 of file seq_view.hpp.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T , typename S >
+ + + + + +
+ + + + + + + + +
stan::math::seq_view< T, std::vector< S > >::seq_view (typename pass_type< std::vector< S > >::type x)
+
+inlineexplicit
+
+ +

Definition at line 125 of file seq_view.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T , typename S >
+ + + + + +
+ + + + + + + + +
pass_type<T>::type stan::math::seq_view< T, std::vector< S > >::operator[] (int n) const
+
+inline
+
+ +

Definition at line 130 of file seq_view.hpp.

+ +
+
+ +
+
+
+template<typename T , typename S >
+ + + + + +
+ + + + + + + +
int stan::math::seq_view< T, std::vector< S > >::size () const
+
+inline
+
+ +

Definition at line 133 of file seq_view.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01_t_01_4_01_4-members.html b/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01_t_01_4_01_4-members.html new file mode 100644 index 00000000000..82f5bcc7601 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01_t_01_4_01_4-members.html @@ -0,0 +1,116 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::seq_view< T, std::vector< T > > Member List
+
+
+ +

This is the complete list of members for stan::math::seq_view< T, std::vector< T > >, including all inherited members.

+ + + + +
operator[](int n) const stan::math::seq_view< T, std::vector< T > >inline
seq_view(typename pass_type< std::vector< T > >::type x)stan::math::seq_view< T, std::vector< T > >inlineexplicit
size() const stan::math::seq_view< T, std::vector< T > >inline
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01_t_01_4_01_4.html b/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01_t_01_4_01_4.html new file mode 100644 index 00000000000..fa27df5800e --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01_t_01_4_01_4.html @@ -0,0 +1,219 @@ + + + + + + +Stan Math Library: stan::math::seq_view< T, std::vector< T > > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
stan::math::seq_view< T, std::vector< T > > Class Template Reference
+
+
+ +

#include <seq_view.hpp>

+ + + + + + + + +

+Public Member Functions

 seq_view (typename pass_type< std::vector< T > >::type x)
 
pass_type< T >::type operator[] (int n) const
 
int size () const
 
+

Detailed Description

+

template<typename T>
+class stan::math::seq_view< T, std::vector< T > >

+ + +

Definition at line 141 of file seq_view.hpp.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
stan::math::seq_view< T, std::vector< T > >::seq_view (typename pass_type< std::vector< T > >::type x)
+
+inlineexplicit
+
+ +

Definition at line 145 of file seq_view.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
pass_type<T>::type stan::math::seq_view< T, std::vector< T > >::operator[] (int n) const
+
+inline
+
+ +

Definition at line 149 of file seq_view.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + +
int stan::math::seq_view< T, std::vector< T > >::size () const
+
+inline
+
+ +

Definition at line 152 of file seq_view.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01std_1_1vector_3_01_t_01_4_01_4_01_4-members.html b/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01std_1_1vector_3_01_t_01_4_01_4_01_4-members.html new file mode 100644 index 00000000000..02ce0e0c6a1 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01std_1_1vector_3_01_t_01_4_01_4_01_4-members.html @@ -0,0 +1,116 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::seq_view< T, std::vector< std::vector< T > > > Member List
+
+
+ +

This is the complete list of members for stan::math::seq_view< T, std::vector< std::vector< T > > >, including all inherited members.

+ + + + +
operator[](int n) const stan::math::seq_view< T, std::vector< std::vector< T > > >inline
seq_view(typename pass_type< std::vector< std::vector< T > > >::type x)stan::math::seq_view< T, std::vector< std::vector< T > > >inlineexplicit
size() const stan::math::seq_view< T, std::vector< std::vector< T > > >inline
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01std_1_1vector_3_01_t_01_4_01_4_01_4.html b/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01std_1_1vector_3_01_t_01_4_01_4_01_4.html new file mode 100644 index 00000000000..999ba1e2b6d --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01std_1_1vector_3_01_t_01_4_01_4_01_4.html @@ -0,0 +1,219 @@ + + + + + + +Stan Math Library: stan::math::seq_view< T, std::vector< std::vector< T > > > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
stan::math::seq_view< T, std::vector< std::vector< T > > > Class Template Reference
+
+
+ +

#include <seq_view.hpp>

+ + + + + + + + +

+Public Member Functions

 seq_view (typename pass_type< std::vector< std::vector< T > > >::type x)
 
pass_type< T >::type operator[] (int n) const
 
int size () const
 
+

Detailed Description

+

template<typename T>
+class stan::math::seq_view< T, std::vector< std::vector< T > > >

+ + +

Definition at line 160 of file seq_view.hpp.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
stan::math::seq_view< T, std::vector< std::vector< T > > >::seq_view (typename pass_type< std::vector< std::vector< T > > >::type x)
+
+inlineexplicit
+
+ +

Definition at line 165 of file seq_view.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
pass_type<T>::type stan::math::seq_view< T, std::vector< std::vector< T > > >::operator[] (int n) const
+
+inline
+
+ +

Definition at line 170 of file seq_view.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + +
int stan::math::seq_view< T, std::vector< std::vector< T > > >::size () const
+
+inline
+
+ +

Definition at line 173 of file seq_view.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1seq__view_3_01double_00_01std_1_1vector_3_01int_01_4_01_4-members.html b/doc/api/html/classstan_1_1math_1_1seq__view_3_01double_00_01std_1_1vector_3_01int_01_4_01_4-members.html new file mode 100644 index 00000000000..0a64e7b4f1c --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1seq__view_3_01double_00_01std_1_1vector_3_01int_01_4_01_4-members.html @@ -0,0 +1,116 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::seq_view< double, std::vector< int > > Member List
+
+
+ +

This is the complete list of members for stan::math::seq_view< double, std::vector< int > >, including all inherited members.

+ + + + +
operator[](int n) const stan::math::seq_view< double, std::vector< int > >inline
seq_view(pass_type< std::vector< int > >::type x)stan::math::seq_view< double, std::vector< int > >inlineexplicit
size() const stan::math::seq_view< double, std::vector< int > >inline
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1seq__view_3_01double_00_01std_1_1vector_3_01int_01_4_01_4.html b/doc/api/html/classstan_1_1math_1_1seq__view_3_01double_00_01std_1_1vector_3_01int_01_4_01_4.html new file mode 100644 index 00000000000..5df5ed53a0d --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1seq__view_3_01double_00_01std_1_1vector_3_01int_01_4_01_4.html @@ -0,0 +1,213 @@ + + + + + + +Stan Math Library: stan::math::seq_view< double, std::vector< int > > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
stan::math::seq_view< double, std::vector< int > > Class Template Reference
+
+
+ +

#include <seq_view.hpp>

+ + + + + + + + +

+Public Member Functions

 seq_view (pass_type< std::vector< int > >::type x)
 
pass_type< double >::type operator[] (int n) const
 
int size () const
 
+

Detailed Description

+

template<>
+class stan::math::seq_view< double, std::vector< int > >

+ + +

Definition at line 179 of file seq_view.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + +
stan::math::seq_view< double, std::vector< int > >::seq_view (pass_type< std::vector< int > >::type x)
+
+inlineexplicit
+
+ +

Definition at line 183 of file seq_view.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + + +
pass_type<double>::type stan::math::seq_view< double, std::vector< int > >::operator[] (int n) const
+
+inline
+
+ +

Definition at line 186 of file seq_view.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int stan::math::seq_view< double, std::vector< int > >::size () const
+
+inline
+
+ +

Definition at line 189 of file seq_view.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1stack__alloc-members.html b/doc/api/html/classstan_1_1math_1_1stack__alloc-members.html new file mode 100644 index 00000000000..65a048bc0b2 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1stack__alloc-members.html @@ -0,0 +1,122 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::stack_alloc Member List
+
+
+ +

This is the complete list of members for stan::math::stack_alloc, including all inherited members.

+ + + + + + + + + + +
alloc(size_t len)stan::math::stack_allocinline
alloc_array(size_t n)stan::math::stack_allocinline
bytes_allocated()stan::math::stack_allocinline
free_all()stan::math::stack_allocinline
recover_all()stan::math::stack_allocinline
recover_nested()stan::math::stack_allocinline
stack_alloc(size_t initial_nbytes=DEFAULT_INITIAL_NBYTES)stan::math::stack_allocinlineexplicit
start_nested()stan::math::stack_allocinline
~stack_alloc()stan::math::stack_allocinline
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1stack__alloc.html b/doc/api/html/classstan_1_1math_1_1stack__alloc.html new file mode 100644 index 00000000000..76019585fa3 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1stack__alloc.html @@ -0,0 +1,449 @@ + + + + + + +Stan Math Library: stan::math::stack_alloc Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
stan::math::stack_alloc Class Reference
+
+
+ +

An instance of this class provides a memory pool through which blocks of raw memory may be allocated and then collected simultaneously. + More...

+ +

#include <stack_alloc.hpp>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 stack_alloc (size_t initial_nbytes=DEFAULT_INITIAL_NBYTES)
 Construct a resizable stack allocator initially holding the specified number of bytes. More...
 
 ~stack_alloc ()
 Destroy this memory allocator. More...
 
void * alloc (size_t len)
 Return a newly allocated block of memory of the appropriate size managed by the stack allocator. More...
 
template<typename T >
T * alloc_array (size_t n)
 Allocate an array on the arena of the specified size to hold values of the specified template parameter type. More...
 
void recover_all ()
 Recover all the memory used by the stack allocator. More...
 
void start_nested ()
 Store current positions before doing nested operation so can recover back to start. More...
 
void recover_nested ()
 recover memory back to the last start_nested call. More...
 
void free_all ()
 Free all memory used by the stack allocator other than the initial block allocation back to the system. More...
 
size_t bytes_allocated ()
 Return number of bytes allocated to this instance by the heap. More...
 
+

Detailed Description

+

An instance of this class provides a memory pool through which blocks of raw memory may be allocated and then collected simultaneously.

+

This class is useful in settings where large numbers of small objects are allocated and then collected all at once. This may include objects whose destructors have no effect.

+

Memory is allocated on a stack of blocks. Each block allocated is twice as large as the previous one. The memory may be recovered, with the blocks being reused, or all blocks may be freed, resetting the stack of blocks to its original state.

+

Alignment up to 8 byte boundaries guaranteed for the first malloc, and after that it's up to the caller. On 64-bit architectures, all struct values should be padded to 8-byte boundaries if they contain an 8-byte member or a virtual function.

+ +

Definition at line 78 of file stack_alloc.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + +
stan::math::stack_alloc::stack_alloc (size_t initial_nbytes = DEFAULT_INITIAL_NBYTES)
+
+inlineexplicit
+
+ +

Construct a resizable stack allocator initially holding the specified number of bytes.

+
Parameters
+ + +
initial_nbytesInitial number of bytes for the allocator. Defaults to (1 << 16) = 64KB initial bytes.
+
+
+
Exceptions
+ + +
std::runtime_errorif the underlying malloc is not 8-byte aligned.
+
+
+ +

Definition at line 135 of file stack_alloc.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
stan::math::stack_alloc::~stack_alloc ()
+
+inline
+
+ +

Destroy this memory allocator.

+

This is implemented as a no-op as there is no destruction required.

+ +

Definition at line 151 of file stack_alloc.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + + +
void* stan::math::stack_alloc::alloc (size_t len)
+
+inline
+
+ +

Return a newly allocated block of memory of the appropriate size managed by the stack allocator.

+

The allocated pointer will be 8-byte aligned.

+

This function may call C++'s malloc() function, with any exceptions percolated throught this function.

+
Parameters
+ + +
lenNumber of bytes to allocate.
+
+
+
Returns
A pointer to the allocated memory.
+ +

Definition at line 170 of file stack_alloc.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
T* stan::math::stack_alloc::alloc_array (size_t n)
+
+inline
+
+ +

Allocate an array on the arena of the specified size to hold values of the specified template parameter type.

+
Template Parameters
+ + +
Ttype of entries in allocated array.
+
+
+
Parameters
+ + +
[in]nsize of array to allocate.
+
+
+
Returns
new array allocated on the arena.
+ +

Definition at line 190 of file stack_alloc.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
size_t stan::math::stack_alloc::bytes_allocated ()
+
+inline
+
+ +

Return number of bytes allocated to this instance by the heap.

+

This is not the same as the number of bytes allocated through calls to memalloc_. The latter number is not calculatable because space is wasted at the end of blocks if the next alloc request doesn't fit. (Perhaps we could trim down to what is actually used?)

+
Returns
number of bytes allocated to this instance
+ +

Definition at line 259 of file stack_alloc.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void stan::math::stack_alloc::free_all ()
+
+inline
+
+ +

Free all memory used by the stack allocator other than the initial block allocation back to the system.

+

Note: the destructor will free all memory.

+ +

Definition at line 239 of file stack_alloc.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void stan::math::stack_alloc::recover_all ()
+
+inline
+
+ +

Recover all the memory used by the stack allocator.

+

The stack of memory blocks allocated so far will be available for further allocations. To free memory back to the system, use the function free_all().

+ +

Definition at line 201 of file stack_alloc.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void stan::math::stack_alloc::recover_nested ()
+
+inline
+
+ +

recover memory back to the last start_nested call.

+ +

Definition at line 220 of file stack_alloc.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void stan::math::stack_alloc::start_nested ()
+
+inline
+
+ +

Store current positions before doing nested operation so can recover back to start.

+ +

Definition at line 211 of file stack_alloc.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1stored__gradient__vari-members.html b/doc/api/html/classstan_1_1math_1_1stored__gradient__vari-members.html new file mode 100644 index 00000000000..56c8288ee27 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1stored__gradient__vari-members.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::stored_gradient_vari Member List
+
+
+ +

This is the complete list of members for stan::math::stored_gradient_vari, including all inherited members.

+ + + + + + + + + + + + + + + + + +
adj_stan::math::vari
chain()stan::math::stored_gradient_variinlinevirtual
chainable()stan::math::chainableinline
dtrs_stan::math::stored_gradient_variprotected
init_dependent()stan::math::variinlinevirtual
operator delete(void *)stan::math::chainableinlinestatic
operator new(size_t nbytes)stan::math::chainableinlinestatic
partials_stan::math::stored_gradient_variprotected
set_zero_adjoint()stan::math::variinlinevirtual
size_stan::math::stored_gradient_variprotected
stored_gradient_vari(double value, size_t size, vari **dtrs, double *partials)stan::math::stored_gradient_variinline
val_stan::math::vari
vari(const double x)stan::math::variinlineexplicit
vari(const double x, bool stacked)stan::math::variinline
~chainable()stan::math::chainableinlinevirtual
~vari()stan::math::variinlinevirtual
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1stored__gradient__vari.html b/doc/api/html/classstan_1_1math_1_1stored__gradient__vari.html new file mode 100644 index 00000000000..572cf59fec2 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1stored__gradient__vari.html @@ -0,0 +1,352 @@ + + + + + + +Stan Math Library: stan::math::stored_gradient_vari Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +Protected Attributes | +List of all members
+
+
stan::math::stored_gradient_vari Class Reference
+
+
+ +

A var implementation that stores the daughter variable implementation pointers and the partial derivative with respect to the result explicitly in arrays constructed on the auto-diff memory stack. + More...

+ +

#include <stored_gradient_vari.hpp>

+
+Inheritance diagram for stan::math::stored_gradient_vari:
+
+
+ + +stan::math::vari +stan::math::chainable + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 stored_gradient_vari (double value, size_t size, vari **dtrs, double *partials)
 Construct a stored gradient vari with the specified value, size, daughter varis, and partial derivatives. More...
 
void chain ()
 Propagate derivatives through this vari with partial derivatives given for the daughter vari by the stored partials. More...
 
- Public Member Functions inherited from stan::math::vari
 vari (const double x)
 Construct a variable implementation from a value. More...
 
 vari (const double x, bool stacked)
 
virtual ~vari ()
 Throw an illegal argument exception. More...
 
virtual void init_dependent ()
 Initialize the adjoint for this (dependent) variable to 1. More...
 
virtual void set_zero_adjoint ()
 Set the adjoint value of this variable to 0. More...
 
- Public Member Functions inherited from stan::math::chainable
 chainable ()
 Construct a chainable object. More...
 
virtual ~chainable ()
 Chainables are not destructible and should go on the function call stack or be allocated with operator new. More...
 
+ + + + + + + +

+Protected Attributes

size_t size_
 
vari ** dtrs_
 
double * partials_
 
+ + + + + + + + + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from stan::math::chainable
static void * operator new (size_t nbytes)
 Allocate memory from the underlying memory pool. More...
 
static void operator delete (void *)
 Delete a pointer from the underlying memory pool. More...
 
- Public Attributes inherited from stan::math::vari
const double val_
 The value of this variable. More...
 
double adj_
 The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable. More...
 
+

Detailed Description

+

A var implementation that stores the daughter variable implementation pointers and the partial derivative with respect to the result explicitly in arrays constructed on the auto-diff memory stack.

+

Like a simplified version of OperandsAndPartials.

+ +

Definition at line 18 of file stored_gradient_vari.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
stan::math::stored_gradient_vari::stored_gradient_vari (double value,
size_t size,
vari ** dtrs,
double * partials 
)
+
+inline
+
+ +

Construct a stored gradient vari with the specified value, size, daughter varis, and partial derivatives.

+
Parameters
+ + + + + +
[in]valueValue of vari
[in]sizeNumber of daughters
[in]dtrsArray of pointers to daughters
[in]partialsPartial derivatives of value with respect to daughters.
+
+
+ +

Definition at line 35 of file stored_gradient_vari.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
void stan::math::stored_gradient_vari::chain ()
+
+inlinevirtual
+
+ +

Propagate derivatives through this vari with partial derivatives given for the daughter vari by the stored partials.

+ +

Reimplemented from stan::math::chainable.

+ +

Definition at line 49 of file stored_gradient_vari.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
vari** stan::math::stored_gradient_vari::dtrs_
+
+protected
+
+ +

Definition at line 21 of file stored_gradient_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
double* stan::math::stored_gradient_vari::partials_
+
+protected
+
+ +

Definition at line 22 of file stored_gradient_vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
size_t stan::math::stored_gradient_vari::size_
+
+protected
+
+ +

Definition at line 20 of file stored_gradient_vari.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1stored__gradient__vari.png b/doc/api/html/classstan_1_1math_1_1stored__gradient__vari.png new file mode 100644 index 00000000000..335f938f5e6 Binary files /dev/null and b/doc/api/html/classstan_1_1math_1_1stored__gradient__vari.png differ diff --git a/doc/api/html/classstan_1_1math_1_1sum__eigen__v__vari-members.html b/doc/api/html/classstan_1_1math_1_1sum__eigen__v__vari-members.html new file mode 100644 index 00000000000..3ed0d30d366 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1sum__eigen__v__vari-members.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::sum_eigen_v_vari Member List
+
+
+ +

This is the complete list of members for stan::math::sum_eigen_v_vari, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + +
adj_stan::math::vari
chain()stan::math::sum_v_variinlinevirtual
chainable()stan::math::chainableinline
init_dependent()stan::math::variinlinevirtual
length_stan::math::sum_v_variprotected
operator delete(void *)stan::math::chainableinlinestatic
operator new(size_t nbytes)stan::math::chainableinlinestatic
set_zero_adjoint()stan::math::variinlinevirtual
sum_eigen_v_vari(const Eigen::Matrix< var, R1, C1 > &v1)stan::math::sum_eigen_v_variinlineexplicit
sum_of_val(const Eigen::DenseBase< Derived > &v)stan::math::sum_eigen_v_variinlineprotectedstatic
stan::math::sum_v_vari::sum_of_val(const std::vector< var > &v)stan::math::sum_v_variinlineprotectedstatic
sum_v_vari(double value, vari **v, size_t length)stan::math::sum_v_variinlineexplicit
sum_v_vari(const std::vector< var > &v1)stan::math::sum_v_variinlineexplicit
v_stan::math::sum_v_variprotected
val_stan::math::vari
vari(const double x)stan::math::variinlineexplicit
vari(const double x, bool stacked)stan::math::variinline
~chainable()stan::math::chainableinlinevirtual
~vari()stan::math::variinlinevirtual
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1sum__eigen__v__vari.html b/doc/api/html/classstan_1_1math_1_1sum__eigen__v__vari.html new file mode 100644 index 00000000000..328a8eca597 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1sum__eigen__v__vari.html @@ -0,0 +1,264 @@ + + + + + + +Stan Math Library: stan::math::sum_eigen_v_vari Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +Static Protected Member Functions | +List of all members
+
+
stan::math::sum_eigen_v_vari Class Reference
+
+
+ +

Class for representing sums with constructors for Eigen. + More...

+ +

#include <sum.hpp>

+
+Inheritance diagram for stan::math::sum_eigen_v_vari:
+
+
+ + +stan::math::sum_v_vari +stan::math::vari +stan::math::chainable + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

template<int R1, int C1>
 sum_eigen_v_vari (const Eigen::Matrix< var, R1, C1 > &v1)
 
- Public Member Functions inherited from stan::math::sum_v_vari
 sum_v_vari (double value, vari **v, size_t length)
 
 sum_v_vari (const std::vector< var > &v1)
 
virtual void chain ()
 Apply the chain rule to this variable based on the variables on which it depends. More...
 
- Public Member Functions inherited from stan::math::vari
 vari (const double x)
 Construct a variable implementation from a value. More...
 
 vari (const double x, bool stacked)
 
virtual ~vari ()
 Throw an illegal argument exception. More...
 
virtual void init_dependent ()
 Initialize the adjoint for this (dependent) variable to 1. More...
 
virtual void set_zero_adjoint ()
 Set the adjoint value of this variable to 0. More...
 
- Public Member Functions inherited from stan::math::chainable
 chainable ()
 Construct a chainable object. More...
 
virtual ~chainable ()
 Chainables are not destructible and should go on the function call stack or be allocated with operator new. More...
 
+ + + + + + + +

+Static Protected Member Functions

template<typename Derived >
static double sum_of_val (const Eigen::DenseBase< Derived > &v)
 
- Static Protected Member Functions inherited from stan::math::sum_v_vari
static double sum_of_val (const std::vector< var > &v)
 
+ + + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from stan::math::chainable
static void * operator new (size_t nbytes)
 Allocate memory from the underlying memory pool. More...
 
static void operator delete (void *)
 Delete a pointer from the underlying memory pool. More...
 
- Public Attributes inherited from stan::math::vari
const double val_
 The value of this variable. More...
 
double adj_
 The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable. More...
 
- Protected Attributes inherited from stan::math::sum_v_vari
vari ** v_
 
size_t length_
 
+

Detailed Description

+

Class for representing sums with constructors for Eigen.

+

The chain() method and member variables are managed by the superclass sum_v_vari.

+ +

Definition at line 17 of file sum.hpp.

+

Constructor & Destructor Documentation

+ +
+
+
+template<int R1, int C1>
+ + + + + +
+ + + + + + + + +
stan::math::sum_eigen_v_vari::sum_eigen_v_vari (const Eigen::Matrix< var, R1, C1 > & v1)
+
+inlineexplicit
+
+ +

Definition at line 29 of file sum.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename Derived >
+ + + + + +
+ + + + + + + + +
static double stan::math::sum_eigen_v_vari::sum_of_val (const Eigen::DenseBase< Derived > & v)
+
+inlinestaticprotected
+
+ +

Definition at line 20 of file sum.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1sum__eigen__v__vari.png b/doc/api/html/classstan_1_1math_1_1sum__eigen__v__vari.png new file mode 100644 index 00000000000..f6b8d46a620 Binary files /dev/null and b/doc/api/html/classstan_1_1math_1_1sum__eigen__v__vari.png differ diff --git a/doc/api/html/classstan_1_1math_1_1sum__v__vari-members.html b/doc/api/html/classstan_1_1math_1_1sum__v__vari-members.html new file mode 100644 index 00000000000..4a98d2eff77 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1sum__v__vari-members.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::sum_v_vari Member List
+
+
+ +

This is the complete list of members for stan::math::sum_v_vari, including all inherited members.

+ + + + + + + + + + + + + + + + + + +
adj_stan::math::vari
chain()stan::math::sum_v_variinlinevirtual
chainable()stan::math::chainableinline
init_dependent()stan::math::variinlinevirtual
length_stan::math::sum_v_variprotected
operator delete(void *)stan::math::chainableinlinestatic
operator new(size_t nbytes)stan::math::chainableinlinestatic
set_zero_adjoint()stan::math::variinlinevirtual
sum_of_val(const std::vector< var > &v)stan::math::sum_v_variinlineprotectedstatic
sum_v_vari(double value, vari **v, size_t length)stan::math::sum_v_variinlineexplicit
sum_v_vari(const std::vector< var > &v1)stan::math::sum_v_variinlineexplicit
v_stan::math::sum_v_variprotected
val_stan::math::vari
vari(const double x)stan::math::variinlineexplicit
vari(const double x, bool stacked)stan::math::variinline
~chainable()stan::math::chainableinlinevirtual
~vari()stan::math::variinlinevirtual
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1sum__v__vari.html b/doc/api/html/classstan_1_1math_1_1sum__v__vari.html new file mode 100644 index 00000000000..887251d8a32 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1sum__v__vari.html @@ -0,0 +1,372 @@ + + + + + + +Stan Math Library: stan::math::sum_v_vari Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +Static Protected Member Functions | +Protected Attributes | +List of all members
+
+
stan::math::sum_v_vari Class Reference
+
+
+ +

Class for sums of variables constructed with standard vectors. + More...

+ +

#include <sum.hpp>

+
+Inheritance diagram for stan::math::sum_v_vari:
+
+
+ + +stan::math::vari +stan::math::chainable +stan::math::sum_eigen_v_vari + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 sum_v_vari (double value, vari **v, size_t length)
 
 sum_v_vari (const std::vector< var > &v1)
 
virtual void chain ()
 Apply the chain rule to this variable based on the variables on which it depends. More...
 
- Public Member Functions inherited from stan::math::vari
 vari (const double x)
 Construct a variable implementation from a value. More...
 
 vari (const double x, bool stacked)
 
virtual ~vari ()
 Throw an illegal argument exception. More...
 
virtual void init_dependent ()
 Initialize the adjoint for this (dependent) variable to 1. More...
 
virtual void set_zero_adjoint ()
 Set the adjoint value of this variable to 0. More...
 
- Public Member Functions inherited from stan::math::chainable
 chainable ()
 Construct a chainable object. More...
 
virtual ~chainable ()
 Chainables are not destructible and should go on the function call stack or be allocated with operator new. More...
 
+ + + +

+Static Protected Member Functions

static double sum_of_val (const std::vector< var > &v)
 
+ + + + + +

+Protected Attributes

vari ** v_
 
size_t length_
 
+ + + + + + + + + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from stan::math::chainable
static void * operator new (size_t nbytes)
 Allocate memory from the underlying memory pool. More...
 
static void operator delete (void *)
 Delete a pointer from the underlying memory pool. More...
 
- Public Attributes inherited from stan::math::vari
const double val_
 The value of this variable. More...
 
double adj_
 The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable. More...
 
+

Detailed Description

+

Class for sums of variables constructed with standard vectors.

+

There's an extension for Eigen matrices.

+ +

Definition at line 14 of file sum.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
stan::math::sum_v_vari::sum_v_vari (double value,
vari ** v,
size_t length 
)
+
+inlineexplicit
+
+ +

Definition at line 27 of file sum.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
stan::math::sum_v_vari::sum_v_vari (const std::vector< var > & v1)
+
+inlineexplicit
+
+ +

Definition at line 31 of file sum.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
virtual void stan::math::sum_v_vari::chain ()
+
+inlinevirtual
+
+ +

Apply the chain rule to this variable based on the variables on which it depends.

+

The base implementation in this class is a no-op.

+ +

Reimplemented from stan::math::chainable.

+ +

Definition at line 40 of file sum.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
static double stan::math::sum_v_vari::sum_of_val (const std::vector< var > & v)
+
+inlinestaticprotected
+
+ +

Definition at line 19 of file sum.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
size_t stan::math::sum_v_vari::length_
+
+protected
+
+ +

Definition at line 17 of file sum.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
vari** stan::math::sum_v_vari::v_
+
+protected
+
+ +

Definition at line 16 of file sum.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1sum__v__vari.png b/doc/api/html/classstan_1_1math_1_1sum__v__vari.png new file mode 100644 index 00000000000..268d86d8df4 Binary files /dev/null and b/doc/api/html/classstan_1_1math_1_1sum__v__vari.png differ diff --git a/doc/api/html/classstan_1_1math_1_1var-members.html b/doc/api/html/classstan_1_1math_1_1var-members.html new file mode 100644 index 00000000000..60068e0b057 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1var-members.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::var Member List
+
+
+ +

This is the complete list of members for stan::math::var, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
adj() const stan::math::varinline
grad(std::vector< var > &x, std::vector< double > &g)stan::math::varinline
grad()stan::math::varinline
is_uninitialized()stan::math::varinline
operator*()stan::math::varinline
operator*=(const var &b)stan::math::varinline
operator*=(const double b)stan::math::varinline
operator+=(const var &b)stan::math::varinline
operator+=(const double b)stan::math::varinline
operator-=(const var &b)stan::math::varinline
operator-=(const double b)stan::math::varinline
operator->()stan::math::varinline
operator/=(const var &b)stan::math::varinline
operator/=(const double b)stan::math::varinline
operator<<(std::ostream &os, const var &v)stan::math::varfriend
Scalar typedefstan::math::var
val() const stan::math::varinline
var()stan::math::varinline
var(vari *vi)stan::math::varinline
var(float x)stan::math::varinline
var(double x)stan::math::varinline
var(long double x)stan::math::varinline
var(bool x)stan::math::varinline
var(char x)stan::math::varinline
var(short x)stan::math::varinline
var(int x)stan::math::varinline
var(long x)stan::math::varinline
var(unsigned char x)stan::math::varinline
var(unsigned short x)stan::math::varinline
var(unsigned int x)stan::math::varinline
var(unsigned long x)stan::math::varinline
vi_stan::math::var
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1var.html b/doc/api/html/classstan_1_1math_1_1var.html new file mode 100644 index 00000000000..80b9486a486 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1var.html @@ -0,0 +1,1301 @@ + + + + + + +Stan Math Library: stan::math::var Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Types | +Public Member Functions | +Public Attributes | +Friends | +List of all members
+
+
stan::math::var Class Reference
+
+
+ +

Independent (input) and dependent (output) variables for gradients. + More...

+ +

#include <var.hpp>

+ + + + +

+Public Types

typedef double Scalar
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

bool is_uninitialized ()
 Return true if this variable has been declared, but not been defined. More...
 
 var ()
 Construct a variable for later assignment. More...
 
 var (vari *vi)
 Construct a variable from a pointer to a variable implementation. More...
 
 var (float x)
 Construct a variable from the specified arithmetic argument by constructing a new vari with the argument cast to double, and a zero adjoint. More...
 
 var (double x)
 Construct a variable from the specified arithmetic argument by constructing a new vari with the argument as a value and a zero adjoint. More...
 
 var (long double x)
 Construct a variable from the specified arithmetic argument by constructing a new vari with the argument cast to double, and a zero adjoint. More...
 
 var (bool x)
 Construct a variable from the specified arithmetic argument by constructing a new vari with the argument cast to double, and a zero adjoint. More...
 
 var (char x)
 Construct a variable from the specified arithmetic argument by constructing a new vari with the argument cast to double, and a zero adjoint. More...
 
 var (short x)
 Construct a variable from the specified arithmetic argument by constructing a new vari with the argument cast to double, and a zero adjoint. More...
 
 var (int x)
 Construct a variable from the specified arithmetic argument by constructing a new vari with the argument cast to double, and a zero adjoint. More...
 
 var (long x)
 Construct a variable from the specified arithmetic argument by constructing a new vari with the argument cast to double, and a zero adjoint. More...
 
 var (unsigned char x)
 Construct a variable from the specified arithmetic argument by constructing a new vari with the argument cast to double, and a zero adjoint. More...
 
 var (unsigned short x)
 Construct a variable from the specified arithmetic argument by constructing a new vari with the argument cast to double, and a zero adjoint. More...
 
 var (unsigned int x)
 Construct a variable from the specified arithmetic argument by constructing a new vari with the argument cast to double, and a zero adjoint. More...
 
 var (unsigned long x)
 Construct a variable from the specified arithmetic argument by constructing a new vari with the argument cast to double, and a zero adjoint. More...
 
double val () const
 Return the value of this variable. More...
 
double adj () const
 Return the derivative of the root expression with respect to this expression. More...
 
void grad (std::vector< var > &x, std::vector< double > &g)
 Compute the gradient of this (dependent) variable with respect to the specified vector of (independent) variables, assigning the specified vector to the gradient. More...
 
void grad ()
 Compute the gradient of this (dependent) variable with respect to all (independent) variables. More...
 
varioperator* ()
 Return a reference to underlying implementation of this variable. More...
 
varioperator-> ()
 Return a pointer to the underlying implementation of this variable. More...
 
varoperator+= (const var &b)
 The compound add/assignment operator for variables (C++). More...
 
varoperator+= (const double b)
 The compound add/assignment operator for scalars (C++). More...
 
varoperator-= (const var &b)
 The compound subtract/assignment operator for variables (C++). More...
 
varoperator-= (const double b)
 The compound subtract/assignment operator for scalars (C++). More...
 
varoperator*= (const var &b)
 The compound multiply/assignment operator for variables (C++). More...
 
varoperator*= (const double b)
 The compound multiply/assignment operator for scalars (C++). More...
 
varoperator/= (const var &b)
 The compound divide/assignment operator for variables (C++). More...
 
varoperator/= (const double b)
 The compound divide/assignment operator for scalars (C++). More...
 
+ + + + +

+Public Attributes

varivi_
 Pointer to the implementation of this variable. More...
 
+ + + + +

+Friends

std::ostream & operator<< (std::ostream &os, const var &v)
 Write the value of this auto-dif variable and its adjoint to the specified output stream. More...
 
+

Detailed Description

+

Independent (input) and dependent (output) variables for gradients.

+

This class acts as a smart pointer, with resources managed by an agenda-based memory manager scoped to a single gradient calculation.

+

An var is constructed with a double and used like any other scalar. Arithmetical functions like negation, addition, and subtraction, as well as a range of mathematical functions like exponentiation and powers are overridden to operate on var values objects.

+ +

Definition at line 32 of file var.hpp.

+

Member Typedef Documentation

+ +
+
+ + + + +
typedef double stan::math::var::Scalar
+
+ +

Definition at line 35 of file var.hpp.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + +
stan::math::var::var ()
+
+inline
+
+ +

Construct a variable for later assignment.

+

This is implemented as a no-op, leaving the underlying implementation dangling. Before an assignment, the behavior is thus undefined just as for a basic double.

+ +

Definition at line 66 of file var.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
stan::math::var::var (varivi)
+
+inline
+
+ +

Construct a variable from a pointer to a variable implementation.

+
Parameters
+ + +
viVariable implementation.
+
+
+ +

Definition at line 74 of file var.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
stan::math::var::var (float x)
+
+inline
+
+ +

Construct a variable from the specified arithmetic argument by constructing a new vari with the argument cast to double, and a zero adjoint.

+
Parameters
+ + +
xValue of the variable.
+
+
+ +

Definition at line 83 of file var.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
stan::math::var::var (double x)
+
+inline
+
+ +

Construct a variable from the specified arithmetic argument by constructing a new vari with the argument as a value and a zero adjoint.

+
Parameters
+ + +
xValue of the variable.
+
+
+ +

Definition at line 92 of file var.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
stan::math::var::var (long double x)
+
+inline
+
+ +

Construct a variable from the specified arithmetic argument by constructing a new vari with the argument cast to double, and a zero adjoint.

+
Parameters
+ + +
xValue of the variable.
+
+
+ +

Definition at line 101 of file var.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
stan::math::var::var (bool x)
+
+inline
+
+ +

Construct a variable from the specified arithmetic argument by constructing a new vari with the argument cast to double, and a zero adjoint.

+
Parameters
+ + +
xValue of the variable.
+
+
+ +

Definition at line 110 of file var.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
stan::math::var::var (char x)
+
+inline
+
+ +

Construct a variable from the specified arithmetic argument by constructing a new vari with the argument cast to double, and a zero adjoint.

+
Parameters
+ + +
xValue of the variable.
+
+
+ +

Definition at line 119 of file var.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
stan::math::var::var (short x)
+
+inline
+
+ +

Construct a variable from the specified arithmetic argument by constructing a new vari with the argument cast to double, and a zero adjoint.

+
Parameters
+ + +
xValue of the variable.
+
+
+ +

Definition at line 128 of file var.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
stan::math::var::var (int x)
+
+inline
+
+ +

Construct a variable from the specified arithmetic argument by constructing a new vari with the argument cast to double, and a zero adjoint.

+
Parameters
+ + +
xValue of the variable.
+
+
+ +

Definition at line 137 of file var.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
stan::math::var::var (long x)
+
+inline
+
+ +

Construct a variable from the specified arithmetic argument by constructing a new vari with the argument cast to double, and a zero adjoint.

+
Parameters
+ + +
xValue of the variable.
+
+
+ +

Definition at line 146 of file var.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
stan::math::var::var (unsigned char x)
+
+inline
+
+ +

Construct a variable from the specified arithmetic argument by constructing a new vari with the argument cast to double, and a zero adjoint.

+
Parameters
+ + +
xValue of the variable.
+
+
+ +

Definition at line 155 of file var.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
stan::math::var::var (unsigned short x)
+
+inline
+
+ +

Construct a variable from the specified arithmetic argument by constructing a new vari with the argument cast to double, and a zero adjoint.

+
Parameters
+ + +
xValue of the variable.
+
+
+ +

Definition at line 165 of file var.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
stan::math::var::var (unsigned int x)
+
+inline
+
+ +

Construct a variable from the specified arithmetic argument by constructing a new vari with the argument cast to double, and a zero adjoint.

+
Parameters
+ + +
xValue of the variable.
+
+
+ +

Definition at line 174 of file var.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
stan::math::var::var (unsigned long x)
+
+inline
+
+ +

Construct a variable from the specified arithmetic argument by constructing a new vari with the argument cast to double, and a zero adjoint.

+
Parameters
+ + +
xValue of the variable.
+
+
+ +

Definition at line 184 of file var.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
double stan::math::var::adj () const
+
+inline
+
+ +

Return the derivative of the root expression with respect to this expression.

+

This method only works after one of the grad() methods has been called.

+
Returns
Adjoint for this variable.
+ +

Definition at line 246 of file var.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void stan::math::var::grad (std::vector< var > & x,
std::vector< double > & g 
)
+
+inline
+
+ +

Compute the gradient of this (dependent) variable with respect to the specified vector of (independent) variables, assigning the specified vector to the gradient.

+

The grad() function does not recover memory. In Stan 2.4 and earlier, this function did recover memory.

+
Parameters
+ + + +
xVector of independent variables.
gGradient vector of partial derivatives of this variable with respect to x.
+
+
+ +

Definition at line 262 of file var.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void stan::math::var::grad ()
+
+inline
+
+ +

Compute the gradient of this (dependent) variable with respect to all (independent) variables.

+

The grad() function does not recover memory.

+ +

Definition at line 276 of file var.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool stan::math::var::is_uninitialized ()
+
+inline
+
+ +

Return true if this variable has been declared, but not been defined.

+

Any attempt to use an undefined variable's value or adjoint will result in a segmentation fault.

+
Returns
true if this variable does not yet have a defined variable.
+ +

Definition at line 55 of file var.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
vari& stan::math::var::operator* ()
+
+inline
+
+ +

Return a reference to underlying implementation of this variable.

+

If x is of type var, then applying this operator, *x, has the same behavior as *(x.vi_).

+

Warning: The returned reference does not track changes to this variable.

+
Returns
variable
+ +

Definition at line 294 of file var.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var & stan::math::var::operator*= (const varb)
+
+inline
+
+ +

The compound multiply/assignment operator for variables (C++).

+

If this variable is a and the argument is the variable b, then (a *= b) behaves exactly the same way as (a = a * b). Note that the result is an assignable lvalue.

+
Parameters
+ + +
bThe variable to multiply this variable by.
+
+
+
Returns
The result of multiplying this variable by the specified variable.
+ +

Definition at line 10 of file operator_multiply_equal.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var & stan::math::var::operator*= (const double b)
+
+inline
+
+ +

The compound multiply/assignment operator for scalars (C++).

+

If this variable is a and the argument is the scalar b, then (a *= b) behaves exactly the same way as (a = a * b). Note that the result is an assignable lvalue.

+
Parameters
+ + +
bThe scalar to multiply this variable by.
+
+
+
Returns
The result of multplying this variable by the specified variable.
+ +

Definition at line 15 of file operator_multiply_equal.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var & stan::math::var::operator+= (const varb)
+
+inline
+
+ +

The compound add/assignment operator for variables (C++).

+

If this variable is a and the argument is the variable b, then (a += b) behaves exactly the same way as (a = a + b), creating an intermediate variable representing (a + b).

+
Parameters
+ + +
bThe variable to add to this variable.
+
+
+
Returns
The result of adding the specified variable to this variable.
+ +

Definition at line 10 of file operator_plus_equal.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var & stan::math::var::operator+= (const double b)
+
+inline
+
+ +

The compound add/assignment operator for scalars (C++).

+

If this variable is a and the argument is the scalar b, then (a += b) behaves exactly the same way as (a = a + b). Note that the result is an assignable lvalue.

+
Parameters
+ + +
bThe scalar to add to this variable.
+
+
+
Returns
The result of adding the specified variable to this variable.
+ +

Definition at line 15 of file operator_plus_equal.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var & stan::math::var::operator-= (const varb)
+
+inline
+
+ +

The compound subtract/assignment operator for variables (C++).

+

If this variable is a and the argument is the variable b, then (a -= b) behaves exactly the same way as (a = a - b). Note that the result is an assignable lvalue.

+
Parameters
+ + +
bThe variable to subtract from this variable.
+
+
+
Returns
The result of subtracting the specified variable from this variable.
+ +

Definition at line 10 of file operator_minus_equal.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var & stan::math::var::operator-= (const double b)
+
+inline
+
+ +

The compound subtract/assignment operator for scalars (C++).

+

If this variable is a and the argument is the scalar b, then (a -= b) behaves exactly the same way as (a = a - b). Note that the result is an assignable lvalue.

+
Parameters
+ + +
bThe scalar to subtract from this variable.
+
+
+
Returns
The result of subtracting the specified variable from this variable.
+ +

Definition at line 15 of file operator_minus_equal.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
vari* stan::math::var::operator-> ()
+
+inline
+
+ +

Return a pointer to the underlying implementation of this variable.

+

If x is of type var, then applying this operator, x->, behaves the same way as x.vi_->.

+

Warning: The returned result does not track changes to this variable.

+ +

Definition at line 308 of file var.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var & stan::math::var::operator/= (const varb)
+
+inline
+
+ +

The compound divide/assignment operator for variables (C++).

+

If this variable is a and the argument is the variable b, then (a /= b) behaves exactly the same way as (a = a / b). Note that the result is an assignable lvalue.

+
Parameters
+ + +
bThe variable to divide this variable by.
+
+
+
Returns
The result of dividing this variable by the specified variable.
+ +

Definition at line 10 of file operator_divide_equal.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var & stan::math::var::operator/= (const double b)
+
+inline
+
+ +

The compound divide/assignment operator for scalars (C++).

+

If this variable is a and the argument is the scalar b, then (a /= b) behaves exactly the same way as (a = a / b). Note that the result is an assignable lvalue.

+
Parameters
+ + +
bThe scalar to divide this variable by.
+
+
+
Returns
The result of dividing this variable by the specified variable.
+ +

Definition at line 15 of file operator_divide_equal.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
double stan::math::var::val () const
+
+inline
+
+ +

Return the value of this variable.

+
Returns
The value of this variable.
+ +

Definition at line 234 of file var.hpp.

+ +
+
+

Friends And Related Function Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::ostream& operator<< (std::ostream & os,
const varv 
)
+
+friend
+
+ +

Write the value of this auto-dif variable and its adjoint to the specified output stream.

+
Parameters
+ + + +
osOutput stream to which to write.
vVariable to write.
+
+
+
Returns
Reference to the specified output stream.
+ +

Definition at line 423 of file var.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
vari* stan::math::var::vi_
+
+ +

Pointer to the implementation of this variable.

+

This value should not be modified, but may be accessed in var operators to construct vari instances.

+ +

Definition at line 44 of file var.hpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1vari-members.html b/doc/api/html/classstan_1_1math_1_1vari-members.html new file mode 100644 index 00000000000..ac589f199de --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1vari-members.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::vari Member List
+
+
+ +

This is the complete list of members for stan::math::vari, including all inherited members.

+ + + + + + + + + + + + + + + +
adj_stan::math::vari
chain()stan::math::chainableinlinevirtual
chainable()stan::math::chainableinline
init_dependent()stan::math::variinlinevirtual
operator delete(void *)stan::math::chainableinlinestatic
operator new(size_t nbytes)stan::math::chainableinlinestatic
operator<<(std::ostream &os, const vari *v)stan::math::varifriend
set_zero_adjoint()stan::math::variinlinevirtual
val_stan::math::vari
var classstan::math::varifriend
vari(const double x)stan::math::variinlineexplicit
vari(const double x, bool stacked)stan::math::variinline
~chainable()stan::math::chainableinlinevirtual
~vari()stan::math::variinlinevirtual
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1vari.html b/doc/api/html/classstan_1_1math_1_1vari.html new file mode 100644 index 00000000000..7b024a6359c --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1vari.html @@ -0,0 +1,482 @@ + + + + + + +Stan Math Library: stan::math::vari Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +Public Attributes | +Friends | +List of all members
+
+
stan::math::vari Class Reference
+
+
+ +

The variable implementation base class. + More...

+ +

#include <vari.hpp>

+
+Inheritance diagram for stan::math::vari:
+
+
+ + +stan::math::chainable +stan::math::cholesky_decompose_v_vari +stan::math::gevv_vvv_vari +stan::math::op_ddv_vari +stan::math::op_dv_vari +stan::math::op_dvd_vari +stan::math::op_dvv_vari +stan::math::op_matrix_vari +stan::math::op_v_vari +stan::math::op_vd_vari +stan::math::op_vdd_vari +stan::math::op_vdv_vari +stan::math::op_vector_vari +stan::math::op_vv_vari +stan::math::op_vvd_vari +stan::math::op_vvv_vari +stan::math::partials_vari +stan::math::precomputed_gradients_vari +stan::math::stored_gradient_vari +stan::math::sum_v_vari + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 vari (const double x)
 Construct a variable implementation from a value. More...
 
 vari (const double x, bool stacked)
 
virtual ~vari ()
 Throw an illegal argument exception. More...
 
virtual void init_dependent ()
 Initialize the adjoint for this (dependent) variable to 1. More...
 
virtual void set_zero_adjoint ()
 Set the adjoint value of this variable to 0. More...
 
- Public Member Functions inherited from stan::math::chainable
 chainable ()
 Construct a chainable object. More...
 
virtual ~chainable ()
 Chainables are not destructible and should go on the function call stack or be allocated with operator new. More...
 
virtual void chain ()
 Apply the chain rule to this variable based on the variables on which it depends. More...
 
+ + + + + + + +

+Public Attributes

const double val_
 The value of this variable. More...
 
double adj_
 The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable. More...
 
+ + + + + + +

+Friends

class var
 
std::ostream & operator<< (std::ostream &os, const vari *v)
 Insertion operator for vari. More...
 
+ + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from stan::math::chainable
static void * operator new (size_t nbytes)
 Allocate memory from the underlying memory pool. More...
 
static void operator delete (void *)
 Delete a pointer from the underlying memory pool. More...
 
+

Detailed Description

+

The variable implementation base class.

+

A variable implementation is constructed with a constant value. It also stores the adjoint for storing the partial derivative with respect to the root of the derivative tree.

+

The chain() method applies the chain rule. Concrete extensions of this class will represent base variables or the result of operations such as addition or subtraction. These extended classes will store operand variables and propagate derivative information via an implementation of chain().

+ +

Definition at line 28 of file vari.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + +
stan::math::vari::vari (const double x)
+
+inlineexplicit
+
+ +

Construct a variable implementation from a value.

+

The adjoint is initialized to zero.

+

All constructed variables are added to the stack. Variables should be constructed before variables on which they depend to insure proper partial derivative propagation. During derivative propagation, the chain() method of each variable will be called in the reverse order of construction.

+
Parameters
+ + +
xValue of the constructed variable.
+
+
+ +

Definition at line 56 of file vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
stan::math::vari::vari (const double x,
bool stacked 
)
+
+inline
+
+ +

Definition at line 62 of file vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
virtual stan::math::vari::~vari ()
+
+inlinevirtual
+
+ +

Throw an illegal argument exception.

+

Warning: Destructors should never called for var objects.

+
Exceptions
+ + +
Logicexception always.
+
+
+ +

Definition at line 78 of file vari.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
virtual void stan::math::vari::init_dependent ()
+
+inlinevirtual
+
+ +

Initialize the adjoint for this (dependent) variable to 1.

+

This operation is applied to the dependent variable before propagating derivatives.

+ +

Reimplemented from stan::math::chainable.

+ +

Definition at line 87 of file vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
virtual void stan::math::vari::set_zero_adjoint ()
+
+inlinevirtual
+
+ +

Set the adjoint value of this variable to 0.

+ +

Reimplemented from stan::math::chainable.

+ +

Definition at line 94 of file vari.hpp.

+ +
+
+

Friends And Related Function Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::ostream& operator<< (std::ostream & os,
const variv 
)
+
+friend
+
+ +

Insertion operator for vari.

+

Prints the current value and the adjoint value.

+
Parameters
+ + + +
os[in, out] ostream to modify
v[in] vari object to print.
+
+
+
Returns
The modified ostream.
+ +

Definition at line 107 of file vari.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
friend class var
+
+friend
+
+ +

Definition at line 30 of file vari.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
double stan::math::vari::adj_
+
+ +

The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable.

+ +

Definition at line 42 of file vari.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::vari::val_
+
+ +

The value of this variable.

+ +

Definition at line 36 of file vari.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1vari.png b/doc/api/html/classstan_1_1math_1_1vari.png new file mode 100644 index 00000000000..ede20907629 Binary files /dev/null and b/doc/api/html/classstan_1_1math_1_1vari.png differ diff --git a/doc/api/html/classstan_1_1math_1_1welford__covar__estimator-members.html b/doc/api/html/classstan_1_1math_1_1welford__covar__estimator-members.html new file mode 100644 index 00000000000..b268935adee --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1welford__covar__estimator-members.html @@ -0,0 +1,122 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::welford_covar_estimator Member List
+
+
+ +

This is the complete list of members for stan::math::welford_covar_estimator, including all inherited members.

+ + + + + + + + + + +
_mstan::math::welford_covar_estimatorprotected
_m2stan::math::welford_covar_estimatorprotected
_num_samplesstan::math::welford_covar_estimatorprotected
add_sample(const Eigen::VectorXd &q)stan::math::welford_covar_estimatorinline
num_samples()stan::math::welford_covar_estimatorinline
restart()stan::math::welford_covar_estimatorinline
sample_covariance(Eigen::MatrixXd &covar)stan::math::welford_covar_estimatorinline
sample_mean(Eigen::VectorXd &mean)stan::math::welford_covar_estimatorinline
welford_covar_estimator(int n)stan::math::welford_covar_estimatorinlineexplicit
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1welford__covar__estimator.html b/doc/api/html/classstan_1_1math_1_1welford__covar__estimator.html new file mode 100644 index 00000000000..8f3570fa2e7 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1welford__covar__estimator.html @@ -0,0 +1,370 @@ + + + + + + +Stan Math Library: stan::math::welford_covar_estimator Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +Protected Attributes | +List of all members
+
+
stan::math::welford_covar_estimator Class Reference
+
+
+ +

#include <welford_covar_estimator.hpp>

+ + + + + + + + + + + + + + +

+Public Member Functions

 welford_covar_estimator (int n)
 
void restart ()
 
void add_sample (const Eigen::VectorXd &q)
 
int num_samples ()
 
void sample_mean (Eigen::VectorXd &mean)
 
void sample_covariance (Eigen::MatrixXd &covar)
 
+ + + + + + + +

+Protected Attributes

double _num_samples
 
Eigen::VectorXd _m
 
Eigen::MatrixXd _m2
 
+

Detailed Description

+
+

Definition at line 11 of file welford_covar_estimator.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + +
stan::math::welford_covar_estimator::welford_covar_estimator (int n)
+
+inlineexplicit
+
+ +

Definition at line 13 of file welford_covar_estimator.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + + +
void stan::math::welford_covar_estimator::add_sample (const Eigen::VectorXd & q)
+
+inline
+
+ +

Definition at line 25 of file welford_covar_estimator.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int stan::math::welford_covar_estimator::num_samples ()
+
+inline
+
+ +

Definition at line 33 of file welford_covar_estimator.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void stan::math::welford_covar_estimator::restart ()
+
+inline
+
+ +

Definition at line 19 of file welford_covar_estimator.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void stan::math::welford_covar_estimator::sample_covariance (Eigen::MatrixXd & covar)
+
+inline
+
+ +

Definition at line 37 of file welford_covar_estimator.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void stan::math::welford_covar_estimator::sample_mean (Eigen::VectorXd & mean)
+
+inline
+
+ +

Definition at line 35 of file welford_covar_estimator.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
Eigen::VectorXd stan::math::welford_covar_estimator::_m
+
+protected
+
+ +

Definition at line 45 of file welford_covar_estimator.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
Eigen::MatrixXd stan::math::welford_covar_estimator::_m2
+
+protected
+
+ +

Definition at line 46 of file welford_covar_estimator.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
double stan::math::welford_covar_estimator::_num_samples
+
+protected
+
+ +

Definition at line 43 of file welford_covar_estimator.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1welford__var__estimator-members.html b/doc/api/html/classstan_1_1math_1_1welford__var__estimator-members.html new file mode 100644 index 00000000000..45d918d66f5 --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1welford__var__estimator-members.html @@ -0,0 +1,122 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan::math::welford_var_estimator Member List
+
+
+ +

This is the complete list of members for stan::math::welford_var_estimator, including all inherited members.

+ + + + + + + + + + +
_mstan::math::welford_var_estimatorprotected
_m2stan::math::welford_var_estimatorprotected
_num_samplesstan::math::welford_var_estimatorprotected
add_sample(const Eigen::VectorXd &q)stan::math::welford_var_estimatorinline
num_samples()stan::math::welford_var_estimatorinline
restart()stan::math::welford_var_estimatorinline
sample_mean(Eigen::VectorXd &mean)stan::math::welford_var_estimatorinline
sample_variance(Eigen::VectorXd &var)stan::math::welford_var_estimatorinline
welford_var_estimator(int n)stan::math::welford_var_estimatorinlineexplicit
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/classstan_1_1math_1_1welford__var__estimator.html b/doc/api/html/classstan_1_1math_1_1welford__var__estimator.html new file mode 100644 index 00000000000..c260b38359e --- /dev/null +++ b/doc/api/html/classstan_1_1math_1_1welford__var__estimator.html @@ -0,0 +1,370 @@ + + + + + + +Stan Math Library: stan::math::welford_var_estimator Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Public Member Functions | +Protected Attributes | +List of all members
+
+
stan::math::welford_var_estimator Class Reference
+
+
+ +

#include <welford_var_estimator.hpp>

+ + + + + + + + + + + + + + +

+Public Member Functions

 welford_var_estimator (int n)
 
void restart ()
 
void add_sample (const Eigen::VectorXd &q)
 
int num_samples ()
 
void sample_mean (Eigen::VectorXd &mean)
 
void sample_variance (Eigen::VectorXd &var)
 
+ + + + + + + +

+Protected Attributes

double _num_samples
 
Eigen::VectorXd _m
 
Eigen::VectorXd _m2
 
+

Detailed Description

+
+

Definition at line 11 of file welford_var_estimator.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + +
stan::math::welford_var_estimator::welford_var_estimator (int n)
+
+inlineexplicit
+
+ +

Definition at line 13 of file welford_var_estimator.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + + +
void stan::math::welford_var_estimator::add_sample (const Eigen::VectorXd & q)
+
+inline
+
+ +

Definition at line 25 of file welford_var_estimator.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int stan::math::welford_var_estimator::num_samples ()
+
+inline
+
+ +

Definition at line 33 of file welford_var_estimator.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void stan::math::welford_var_estimator::restart ()
+
+inline
+
+ +

Definition at line 19 of file welford_var_estimator.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void stan::math::welford_var_estimator::sample_mean (Eigen::VectorXd & mean)
+
+inline
+
+ +

Definition at line 35 of file welford_var_estimator.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void stan::math::welford_var_estimator::sample_variance (Eigen::VectorXd & var)
+
+inline
+
+ +

Definition at line 37 of file welford_var_estimator.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
Eigen::VectorXd stan::math::welford_var_estimator::_m
+
+protected
+
+ +

Definition at line 45 of file welford_var_estimator.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
Eigen::VectorXd stan::math::welford_var_estimator::_m2
+
+protected
+
+ +

Definition at line 46 of file welford_var_estimator.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
double stan::math::welford_var_estimator::_num_samples
+
+protected
+
+ +

Definition at line 43 of file welford_var_estimator.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/closed.png b/doc/api/html/closed.png new file mode 100644 index 00000000000..98cc2c909da Binary files /dev/null and b/doc/api/html/closed.png differ diff --git a/doc/api/html/col_8hpp.html b/doc/api/html/col_8hpp.html new file mode 100644 index 00000000000..49865680168 --- /dev/null +++ b/doc/api/html/col_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/col.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
col.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/err/check_column_index.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::col (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m, size_t j)
 Return the specified column of the specified matrix using start-at-1 indexing. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/col_8hpp_source.html b/doc/api/html/col_8hpp_source.html new file mode 100644 index 00000000000..d534e098192 --- /dev/null +++ b/doc/api/html/col_8hpp_source.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/col.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
col.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_COL_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_COL_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
21  template <typename T>
+
22  inline
+
23  Eigen::Matrix<T, Eigen::Dynamic, 1>
+
24  col(const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>& m,
+
25  size_t j) {
+
26  stan::math::check_column_index("col", "j", m, j);
+
27  return m.col(j - 1);
+
28  }
+
29 
+
30  }
+
31 }
+
32 #endif
+ +
Eigen::Matrix< T, Eigen::Dynamic, 1 > col(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m, size_t j)
Return the specified column of the specified matrix using start-at-1 indexing.
Definition: col.hpp:24
+ +
bool check_column_index(const char *function, const char *name, const Eigen::Matrix< T_y, R, C > &y, const size_t i)
Return true if the specified index is a valid column of the matrix.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cols_8hpp.html b/doc/api/html/cols_8hpp.html new file mode 100644 index 00000000000..cff4c757a98 --- /dev/null +++ b/doc/api/html/cols_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/cols.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
cols.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T , int R, int C>
int stan::math::cols (const Eigen::Matrix< T, R, C > &m)
 Return the number of columns in the specified matrix, vector, or row vector. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cols_8hpp_source.html b/doc/api/html/cols_8hpp_source.html new file mode 100644 index 00000000000..cb2419f43d8 --- /dev/null +++ b/doc/api/html/cols_8hpp_source.html @@ -0,0 +1,126 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/cols.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
cols.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_COLS_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_COLS_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
19  template <typename T, int R, int C>
+
20  inline int cols(const Eigen::Matrix<T, R, C>& m) {
+
21  return m.cols();
+
22  }
+
23 
+
24  }
+
25 }
+
26 #endif
+
int cols(const Eigen::Matrix< T, R, C > &m)
Return the number of columns in the specified matrix, vector, or row vector.
Definition: cols.hpp:20
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/common__type_8hpp.html b/doc/api/html/common__type_8hpp.html new file mode 100644 index 00000000000..cd62caa727b --- /dev/null +++ b/doc/api/html/common__type_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/common_type.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Classes | +Namespaces
+
+
common_type.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <boost/math/tools/promotion.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + + +

+Classes

struct  stan::math::common_type< T1, T2 >
 
struct  stan::math::common_type< std::vector< T1 >, std::vector< T2 > >
 
struct  stan::math::common_type< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > >
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/common__type_8hpp_source.html b/doc/api/html/common__type_8hpp_source.html new file mode 100644 index 00000000000..a99462b3316 --- /dev/null +++ b/doc/api/html/common__type_8hpp_source.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/common_type.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
common_type.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_COMMON_TYPE_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_COMMON_TYPE_HPP
+
3 
+ +
5 #include <boost/math/tools/promotion.hpp>
+
6 #include <vector>
+
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <typename T1, typename T2>
+
13  struct common_type {
+
14  typedef typename boost::math::tools::promote_args<T1, T2>::type type;
+
15  };
+
16 
+
17  template <typename T1, typename T2>
+
18  struct common_type<std::vector<T1>, std::vector<T2> > {
+
19  typedef std::vector<typename common_type<T1, T2>::type> type;
+
20  };
+
21 
+
22  template <typename T1, typename T2, int R, int C>
+
23  struct common_type<Eigen::Matrix<T1, R, C>, Eigen::Matrix<T2, R, C> > {
+
24  typedef Eigen::Matrix<typename common_type<T1, T2>::type, R, C> type;
+
25  };
+
26 
+
27  }
+
28 }
+
29 
+
30 
+
31 #endif
+
std::vector< typename common_type< T1, T2 >::type > type
Definition: common_type.hpp:19
+ +
Eigen::Matrix< typename common_type< T1, T2 >::type, R, C > type
Definition: common_type.hpp:24
+ +
boost::math::tools::promote_args< T1, T2 >::type type
Definition: common_type.hpp:14
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/constants_8hpp.html b/doc/api/html/constants_8hpp.html new file mode 100644 index 00000000000..b96a7a08d65 --- /dev/null +++ b/doc/api/html/constants_8hpp.html @@ -0,0 +1,225 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/constants.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions | +Variables
+
+
constants.hpp File Reference
+
+
+
#include <boost/math/constants/constants.hpp>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

double stan::math::pi ()
 Return the value of pi. More...
 
double stan::math::e ()
 Return the base of the natural logarithm. More...
 
double stan::math::sqrt2 ()
 Return the square root of two. More...
 
double stan::math::log10 ()
 Return natural logarithm of ten. More...
 
double stan::math::positive_infinity ()
 Return positive infinity. More...
 
double stan::math::negative_infinity ()
 Return negative infinity. More...
 
double stan::math::not_a_number ()
 Return (quiet) not-a-number. More...
 
double stan::math::machine_precision ()
 Returns the difference between 1.0 and the next value representable. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Variables

const double stan::math::E = boost::math::constants::e<double>()
 The base of the natural logarithm, $ e $. More...
 
const double stan::math::SQRT_2 = std::sqrt(2.0)
 The value of the square root of 2, $ \sqrt{2} $. More...
 
const double stan::math::INV_SQRT_2 = 1.0 / SQRT_2
 The value of 1 over the square root of 2, $ 1 / \sqrt{2} $. More...
 
const double stan::math::LOG_2 = std::log(2.0)
 The natural logarithm of 2, $ \log 2 $. More...
 
const double stan::math::LOG_10 = std::log(10.0)
 The natural logarithm of 10, $ \log 10 $. More...
 
const double stan::math::INFTY = std::numeric_limits<double>::infinity()
 Positive infinity. More...
 
const double stan::math::NEGATIVE_INFTY = - std::numeric_limits<double>::infinity()
 Negative infinity. More...
 
const double stan::math::NOT_A_NUMBER = std::numeric_limits<double>::quiet_NaN()
 (Quiet) not-a-number value. More...
 
const double stan::math::EPSILON = std::numeric_limits<double>::epsilon()
 Smallest positive value. More...
 
const double stan::math::NEGATIVE_EPSILON = - std::numeric_limits<double>::epsilon()
 Largest negative value (i.e., smallest absolute value). More...
 
const double stan::math::POISSON_MAX_RATE = std::pow(2.0, 30)
 Largest rate parameter allowed in Poisson RNG. More...
 
const double stan::math::LOG_PI_OVER_FOUR = std::log(boost::math::constants::pi<double>()) / 4.0
 Log pi divided by 4 $ \log \pi / 4 $. More...
 
const double stan::math::SQRT_PI = std::sqrt(boost::math::constants::pi<double>())
 
const double stan::math::SQRT_2_TIMES_SQRT_PI = SQRT_2 * SQRT_PI
 
const double stan::math::TWO_OVER_SQRT_PI = 2.0 / SQRT_PI
 
const double stan::math::NEG_TWO_OVER_SQRT_PI = -TWO_OVER_SQRT_PI
 
const double stan::math::INV_SQRT_TWO_PI = 1.0 / std::sqrt(2.0 * boost::math::constants::pi<double>())
 
const double stan::math::LOG_PI = std::log(boost::math::constants::pi<double>())
 
const double stan::math::LOG_SQRT_PI = std::log(SQRT_PI)
 
const double stan::math::LOG_ZERO = std::log(0.0)
 
const double stan::math::LOG_TWO = std::log(2.0)
 
const double stan::math::LOG_HALF = std::log(0.5)
 
const double stan::math::NEG_LOG_TWO = - LOG_TWO
 
const double stan::math::NEG_LOG_SQRT_TWO_PI = - std::log(std::sqrt(2.0 * boost::math::constants::pi<double>()))
 
const double stan::math::NEG_LOG_PI = - LOG_PI
 
const double stan::math::NEG_LOG_SQRT_PI = -std::log(std::sqrt(boost::math::constants::pi<double>()))
 
const double stan::math::NEG_LOG_TWO_OVER_TWO = - LOG_TWO / 2.0
 
const double stan::math::LOG_TWO_PI = LOG_TWO + LOG_PI
 
const double stan::math::NEG_LOG_TWO_PI = - LOG_TWO_PI
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/constants_8hpp_source.html b/doc/api/html/constants_8hpp_source.html new file mode 100644 index 00000000000..9e1c67e07a4 --- /dev/null +++ b/doc/api/html/constants_8hpp_source.html @@ -0,0 +1,265 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/constants.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
constants.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_CONSTANTS_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_CONSTANTS_HPP
+
3 
+
4 #include <boost/math/constants/constants.hpp>
+
5 #include <limits>
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
15  const double E = boost::math::constants::e<double>();
+
16 
+
21  const double SQRT_2 = std::sqrt(2.0);
+
22 
+
27  const double INV_SQRT_2 = 1.0 / SQRT_2;
+
28 
+
33  const double LOG_2 = std::log(2.0);
+
34 
+
39  const double LOG_10 = std::log(10.0);
+
40 
+
44  const double INFTY = std::numeric_limits<double>::infinity();
+
45 
+
49  const double NEGATIVE_INFTY
+
50  = - std::numeric_limits<double>::infinity();
+
51 
+
55  const double NOT_A_NUMBER
+
56  = std::numeric_limits<double>::quiet_NaN();
+
57 
+
61  const double EPSILON = std::numeric_limits<double>::epsilon();
+
62 
+
66  const double NEGATIVE_EPSILON
+
67  = - std::numeric_limits<double>::epsilon();
+
68 
+
72  const double POISSON_MAX_RATE = std::pow(2.0, 30);
+
73 
+
78  const double LOG_PI_OVER_FOUR
+
79  = std::log(boost::math::constants::pi<double>()) / 4.0;
+
80 
+
86  inline double pi() {
+
87  return boost::math::constants::pi<double>();
+
88  }
+
89 
+
95  inline double e() {
+
96  return E;
+
97  }
+
98 
+
104  inline double sqrt2() {
+
105  return SQRT_2;
+
106  }
+
107 
+
108 
+
114  inline double log10() {
+
115  return LOG_10;
+
116  }
+
117 
+
123  inline double positive_infinity() {
+
124  return INFTY;
+
125  }
+
126 
+
132  inline double negative_infinity() {
+
133  return NEGATIVE_INFTY;
+
134  }
+
135 
+
141  inline double not_a_number() {
+
142  return NOT_A_NUMBER;
+
143  }
+
144 
+
151  inline double machine_precision() {
+
152  return EPSILON;
+
153  }
+
154 
+
155  const double SQRT_PI
+
156  = std::sqrt(boost::math::constants::pi<double>());
+
157 
+ +
159 
+
160  const double TWO_OVER_SQRT_PI
+
161  = 2.0 / SQRT_PI;
+
162 
+ +
164 
+
165  const double INV_SQRT_TWO_PI
+
166  = 1.0 / std::sqrt(2.0 * boost::math::constants::pi<double>());
+
167 
+
168 
+
169  const double LOG_PI
+
170  = std::log(boost::math::constants::pi<double>());
+
171 
+
172  const double LOG_SQRT_PI
+ +
174 
+
175  const double LOG_ZERO = std::log(0.0);
+
176 
+
177  const double LOG_TWO = std::log(2.0);
+
178 
+
179  const double LOG_HALF = std::log(0.5);
+
180 
+
181  const double NEG_LOG_TWO = - LOG_TWO;
+
182 
+
183  const double NEG_LOG_SQRT_TWO_PI
+
184  = - std::log(std::sqrt(2.0 * boost::math::constants::pi<double>()));
+
185 
+
186  const double NEG_LOG_PI = - LOG_PI;
+
187 
+
188  const double NEG_LOG_SQRT_PI
+
189  = -std::log(std::sqrt(boost::math::constants::pi<double>()));
+
190 
+
191  const double NEG_LOG_TWO_OVER_TWO = - LOG_TWO / 2.0;
+
192 
+
193  const double LOG_TWO_PI = LOG_TWO + LOG_PI;
+
194 
+
195  const double NEG_LOG_TWO_PI = - LOG_TWO_PI;
+
196 
+
197  }
+
198 }
+
199 
+
200 #endif
+
const double LOG_2
The natural logarithm of 2, .
Definition: constants.hpp:33
+
const double NEG_LOG_PI
Definition: constants.hpp:186
+
const double LOG_HALF
Definition: constants.hpp:179
+
const double INV_SQRT_TWO_PI
Definition: constants.hpp:166
+
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
const double NOT_A_NUMBER
(Quiet) not-a-number value.
Definition: constants.hpp:56
+
const double LOG_PI
Definition: constants.hpp:170
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
const double NEG_LOG_SQRT_PI
Definition: constants.hpp:189
+
const double LOG_SQRT_PI
Definition: constants.hpp:173
+
const double LOG_10
The natural logarithm of 10, .
Definition: constants.hpp:39
+
fvar< T > log10(const fvar< T > &x)
Definition: log10.hpp:15
+
const double LOG_ZERO
Definition: constants.hpp:175
+
const double LOG_TWO
Definition: constants.hpp:177
+
const double LOG_TWO_PI
Definition: constants.hpp:193
+
double sqrt2()
Return the square root of two.
Definition: constants.hpp:104
+
const double TWO_OVER_SQRT_PI
Definition: constants.hpp:161
+
const double SQRT_2_TIMES_SQRT_PI
Definition: constants.hpp:158
+
const double SQRT_2
The value of the square root of 2, .
Definition: constants.hpp:21
+
const double INV_SQRT_2
The value of 1 over the square root of 2, .
Definition: constants.hpp:27
+
const double EPSILON
Smallest positive value.
Definition: constants.hpp:61
+
const double LOG_PI_OVER_FOUR
Log pi divided by 4 .
Definition: constants.hpp:79
+
double machine_precision()
Returns the difference between 1.0 and the next value representable.
Definition: constants.hpp:151
+
const double NEG_TWO_OVER_SQRT_PI
Definition: constants.hpp:163
+
const double POISSON_MAX_RATE
Largest rate parameter allowed in Poisson RNG.
Definition: constants.hpp:72
+
const double NEG_LOG_SQRT_TWO_PI
Definition: constants.hpp:184
+
double positive_infinity()
Return positive infinity.
Definition: constants.hpp:123
+
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+
const double E
The base of the natural logarithm, .
Definition: constants.hpp:15
+
const double NEG_LOG_TWO
Definition: constants.hpp:181
+
const double NEG_LOG_TWO_PI
Definition: constants.hpp:195
+
const double NEG_LOG_TWO_OVER_TWO
Definition: constants.hpp:191
+
const double INFTY
Positive infinity.
Definition: constants.hpp:44
+
double pi()
Return the value of pi.
Definition: constants.hpp:86
+
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
double not_a_number()
Return (quiet) not-a-number.
Definition: constants.hpp:141
+
const double NEGATIVE_INFTY
Negative infinity.
Definition: constants.hpp:50
+
const double NEGATIVE_EPSILON
Largest negative value (i.e., smallest absolute value).
Definition: constants.hpp:67
+
const double SQRT_PI
Definition: constants.hpp:156
+
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/constraint__tolerance_8hpp.html b/doc/api/html/constraint__tolerance_8hpp.html new file mode 100644 index 00000000000..18d0a5265a2 --- /dev/null +++ b/doc/api/html/constraint__tolerance_8hpp.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/constraint_tolerance.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Variables
+
+
constraint_tolerance.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Variables

const double stan::math::CONSTRAINT_TOLERANCE = 1E-8
 The tolerance for checking arithmetic bounds In rank and in simplexes. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/constraint__tolerance_8hpp_source.html b/doc/api/html/constraint__tolerance_8hpp_source.html new file mode 100644 index 00000000000..d8f705d9006 --- /dev/null +++ b/doc/api/html/constraint__tolerance_8hpp_source.html @@ -0,0 +1,121 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/constraint_tolerance.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
constraint_tolerance.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_CONSTRAINT_TOLERANCE_HPP
+
2 #define STAN_MATH_PRIM_MAT_ERR_CONSTRAINT_TOLERANCE_HPP
+
3 
+
4 namespace stan {
+
5  namespace math {
+
6 
+
11  const double CONSTRAINT_TOLERANCE = 1E-8;
+
12 
+
13  }
+
14 }
+
15 #endif
+
const double CONSTRAINT_TOLERANCE
The tolerance for checking arithmetic bounds In rank and in simplexes.
+
const double E
The base of the natural logarithm, .
Definition: constants.hpp:15
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/contains__fvar_8hpp.html b/doc/api/html/contains__fvar_8hpp.html new file mode 100644 index 00000000000..4aa03261a96 --- /dev/null +++ b/doc/api/html/contains__fvar_8hpp.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/contains_fvar.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Classes | +Namespaces
+
+
contains_fvar.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/is_fvar.hpp>
+#include <stan/math/prim/scal/meta/scalar_type.hpp>
+
+

Go to the source code of this file.

+ + + + + +

+Classes

struct  stan::contains_fvar< T1, T2, T3, T4, T5, T6 >
 Metaprogram to calculate the base scalar return type resulting from promoting all the scalar types of the template parameters. More...
 
+ + + +

+Namespaces

 stan
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/contains__fvar_8hpp_source.html b/doc/api/html/contains__fvar_8hpp_source.html new file mode 100644 index 00000000000..840d8d88f7d --- /dev/null +++ b/doc/api/html/contains__fvar_8hpp_source.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/contains_fvar.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
contains_fvar.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_CONTAINS_FVAR_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_CONTAINS_FVAR_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8 
+
13  template <typename T1,
+
14  typename T2 = double,
+
15  typename T3 = double,
+
16  typename T4 = double,
+
17  typename T5 = double,
+
18  typename T6 = double>
+
19  struct contains_fvar {
+
20  enum {
+ + + + + + +
27  };
+
28  };
+
29 
+
30 }
+
31 #endif
+
32 
+ + + + +
Metaprogram to calculate the base scalar return type resulting from promoting all the scalar types of...
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/contains__nonconstant__struct_8hpp.html b/doc/api/html/contains__nonconstant__struct_8hpp.html new file mode 100644 index 00000000000..41810082c6c --- /dev/null +++ b/doc/api/html/contains__nonconstant__struct_8hpp.html @@ -0,0 +1,125 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/contains_nonconstant_struct.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Classes | +Namespaces
+
+
contains_nonconstant_struct.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/is_constant_struct.hpp>
+
+

Go to the source code of this file.

+ + + + +

+Classes

struct  stan::contains_nonconstant_struct< T1, T2, T3, T4, T5, T6 >
 
+ + + +

+Namespaces

 stan
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/contains__nonconstant__struct_8hpp_source.html b/doc/api/html/contains__nonconstant__struct_8hpp_source.html new file mode 100644 index 00000000000..069db2ce799 --- /dev/null +++ b/doc/api/html/contains__nonconstant__struct_8hpp_source.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/contains_nonconstant_struct.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
contains_nonconstant_struct.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_CONTAINS_NONCONSTANT_STRUCT_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_CONTAINS_NONCONSTANT_STRUCT_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7 
+
8  template <typename T1,
+
9  typename T2 = double,
+
10  typename T3 = double,
+
11  typename T4 = double,
+
12  typename T5 = double,
+
13  typename T6 = double>
+ +
15  enum {
+ + + + + + +
22  };
+
23  };
+
24 
+
25 }
+
26 #endif
+
27 
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/contains__vector_8hpp.html b/doc/api/html/contains__vector_8hpp.html new file mode 100644 index 00000000000..47ac3d54c92 --- /dev/null +++ b/doc/api/html/contains__vector_8hpp.html @@ -0,0 +1,125 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/contains_vector.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Classes | +Namespaces
+
+
contains_vector.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/is_vector.hpp>
+
+

Go to the source code of this file.

+ + + + +

+Classes

struct  stan::contains_vector< T1, T2, T3, T4, T5, T6 >
 
+ + + +

+Namespaces

 stan
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/contains__vector_8hpp_source.html b/doc/api/html/contains__vector_8hpp_source.html new file mode 100644 index 00000000000..c767ed588cc --- /dev/null +++ b/doc/api/html/contains__vector_8hpp_source.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/contains_vector.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
contains_vector.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_CONTAINS_VECTOR_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_CONTAINS_VECTOR_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7 
+
8  template <typename T1,
+
9  typename T2 = double,
+
10  typename T3 = double,
+
11  typename T4 = double,
+
12  typename T5 = double,
+
13  typename T6 = double>
+
14  struct contains_vector {
+
15  enum {
+ + + + + + +
22  };
+
23  };
+
24 
+
25 }
+
26 #endif
+
27 
+ + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/core_2grad_8hpp.html b/doc/api/html/core_2grad_8hpp.html new file mode 100644 index 00000000000..fc2a8a94b09 --- /dev/null +++ b/doc/api/html/core_2grad_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/rev/core/grad.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
grad.hpp File Reference
+
+
+
#include <stan/math/rev/core/chainable.hpp>
+#include <stan/math/rev/core/chainable_alloc.hpp>
+#include <stan/math/rev/core/chainablestack.hpp>
+#include <stan/math/rev/core/empty_nested.hpp>
+#include <stan/math/rev/core/nested_size.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

static void stan::math::grad (chainable *vi)
 Compute the gradient for all variables starting from the specified root variable implementation. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/core_2grad_8hpp_source.html b/doc/api/html/core_2grad_8hpp_source.html new file mode 100644 index 00000000000..28dfae5a56a --- /dev/null +++ b/doc/api/html/core_2grad_8hpp_source.html @@ -0,0 +1,155 @@ + + + + + + +Stan Math Library: stan/math/rev/core/grad.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
grad.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_GRAD_HPP
+
2 #define STAN_MATH_REV_CORE_GRAD_HPP
+
3 
+ + + + + +
9 #include <vector>
+
10 
+
11 namespace stan {
+
12  namespace math {
+
13 
+
30  static void grad(chainable* vi) {
+
31  // simple reference implementation (intended as doc):
+
32  // vi->init_dependent();
+
33  // size_t end = var_stack_.size();
+
34  // size_t begin = empty_nested() ? 0 : end - nested_size();
+
35  // for (size_t i = end; --i > begin; )
+
36  // var_stack_[i]->chain();
+
37 
+
38  typedef std::vector<chainable*>::reverse_iterator it_t;
+
39  vi->init_dependent();
+
40  it_t begin = ChainableStack::var_stack_.rbegin();
+
41  it_t end = empty_nested()
+
42  ? ChainableStack::var_stack_.rend() : begin + nested_size();
+
43  for (it_t it = begin; it < end; ++it) {
+
44  (*it)->chain();
+
45  }
+
46  }
+
47 
+
48 
+
49  }
+
50 }
+
51 
+
52 #endif
+
static bool empty_nested()
Return true if there is no nested autodiff being executed.
+
Abstract base class for variable implementations that handles memory management and applying the chai...
Definition: chainable.hpp:14
+ +
static void grad(chainable *vi)
Compute the gradient for all variables starting from the specified root variable implementation.
Definition: grad.hpp:30
+ + +
virtual void init_dependent()
Initialize this chainable's adjoint value to make it the dependent variable in a gradient calculation...
Definition: chainable.hpp:42
+ +
static size_t nested_size()
Definition: nested_size.hpp:12
+ +
static std::vector< ChainableT * > var_stack_
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/corr__constrain_8hpp.html b/doc/api/html/corr__constrain_8hpp.html new file mode 100644 index 00000000000..dbb1569ac8d --- /dev/null +++ b/doc/api/html/corr__constrain_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/corr_constrain.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
corr_constrain.hpp File Reference
+
+
+
#include <stan/math/prim/scal/fun/log1m.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
stan::math::corr_constrain (const T x)
 Return the result of transforming the specified scalar to have a valid correlation value between -1 and 1 (inclusive). More...
 
template<typename T >
stan::math::corr_constrain (const T x, T &lp)
 Return the result of transforming the specified scalar to have a valid correlation value between -1 and 1 (inclusive). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/corr__constrain_8hpp_source.html b/doc/api/html/corr__constrain_8hpp_source.html new file mode 100644 index 00000000000..1000c417738 --- /dev/null +++ b/doc/api/html/corr__constrain_8hpp_source.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/corr_constrain.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
corr_constrain.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_CORR_CONSTRAIN_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_CORR_CONSTRAIN_HPP
+
3 
+ +
5 #include <cmath>
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
23  template <typename T>
+
24  inline
+
25  T corr_constrain(const T x) {
+
26  return tanh(x);
+
27  }
+
28 
+
41  template <typename T>
+
42  inline
+
43  T corr_constrain(const T x, T& lp) {
+
44  using stan::math::log1m;
+
45  T tanh_x = tanh(x);
+
46  lp += log1m(tanh_x * tanh_x);
+
47  return tanh_x;
+
48  }
+
49 
+
50  }
+
51 
+
52 }
+
53 
+
54 #endif
+
fvar< T > tanh(const fvar< T > &x)
Definition: tanh.hpp:14
+ +
fvar< T > log1m(const fvar< T > &x)
Definition: log1m.hpp:16
+
T corr_constrain(const T x)
Return the result of transforming the specified scalar to have a valid correlation value between -1 a...
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/corr__free_8hpp.html b/doc/api/html/corr__free_8hpp.html new file mode 100644 index 00000000000..b78c0f03662 --- /dev/null +++ b/doc/api/html/corr__free_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/corr_free.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
corr_free.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/check_bounded.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
stan::math::corr_free (const T y)
 Return the unconstrained scalar that when transformed to a valid correlation produces the specified value. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/corr__free_8hpp_source.html b/doc/api/html/corr__free_8hpp_source.html new file mode 100644 index 00000000000..81d375e39cb --- /dev/null +++ b/doc/api/html/corr__free_8hpp_source.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/corr_free.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
corr_free.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_CORR_FREE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_CORR_FREE_HPP
+
3 
+ +
5 #include <cmath>
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
27  template <typename T>
+
28  inline
+
29  T corr_free(const T y) {
+
30  stan::math::check_bounded<T, double, double>
+
31  ("stan::math::lub_free",
+
32  "Correlation variable", y, -1, 1);
+
33  return atanh(y);
+
34  }
+
35 
+
36  }
+
37 
+
38 }
+
39 
+
40 #endif
+
fvar< T > atanh(const fvar< T > &x)
Definition: atanh.hpp:13
+
T corr_free(const T y)
Return the unconstrained scalar that when transformed to a valid correlation produces the specified v...
Definition: corr_free.hpp:29
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/corr__matrix__constrain_8hpp.html b/doc/api/html/corr__matrix__constrain_8hpp.html new file mode 100644 index 00000000000..b1b2a6771b1 --- /dev/null +++ b/doc/api/html/corr__matrix__constrain_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/corr_matrix_constrain.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
corr_matrix_constrain.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/meta/index_type.hpp>
+#include <stan/math/prim/scal/fun/corr_constrain.hpp>
+#include <stan/math/prim/mat/fun/read_corr_matrix.hpp>
+#include <stdexcept>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::corr_matrix_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, typename math::index_type< Eigen::Matrix< T, Eigen::Dynamic, 1 > >::type k)
 Return the correlation matrix of the specified dimensionality derived from the specified vector of unconstrained values. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::corr_matrix_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, typename math::index_type< Eigen::Matrix< T, Eigen::Dynamic, 1 > >::type k, T &lp)
 Return the correlation matrix of the specified dimensionality derived from the specified vector of unconstrained values. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/corr__matrix__constrain_8hpp_source.html b/doc/api/html/corr__matrix__constrain_8hpp_source.html new file mode 100644 index 00000000000..1baa0f77903 --- /dev/null +++ b/doc/api/html/corr__matrix__constrain_8hpp_source.html @@ -0,0 +1,176 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/corr_matrix_constrain.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
corr_matrix_constrain.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_CORR_MATRIX_CONSTRAIN_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_CORR_MATRIX_CONSTRAIN_HPP
+
3 
+ + + + +
8 #include <stdexcept>
+
9 
+
10 namespace stan {
+
11 
+
12  namespace math {
+
13 
+
38  template <typename T>
+
39  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
40  corr_matrix_constrain(const Eigen::Matrix<T, Eigen::Dynamic, 1>& x,
+
41  typename math::index_type
+
42  <Eigen::Matrix<T, Eigen::Dynamic, 1> >::type k) {
+
43  using Eigen::Dynamic;
+
44  using Eigen::Matrix;
+ +
46  typedef typename index_type<Matrix<T, Dynamic, 1> >::type size_type;
+
47 
+
48  size_type k_choose_2 = (k * (k - 1)) / 2;
+
49  if (k_choose_2 != x.size())
+
50  throw std::invalid_argument("x is not a valid correlation matrix");
+
51  Eigen::Array<T, Eigen::Dynamic, 1> cpcs(k_choose_2);
+
52  for (size_type i = 0; i < k_choose_2; ++i)
+
53  cpcs[i] = corr_constrain(x[i]);
+
54  return read_corr_matrix(cpcs, k);
+
55  }
+
56 
+
76  template <typename T>
+
77  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
78  corr_matrix_constrain(const Eigen::Matrix<T, Eigen::Dynamic, 1>& x,
+
79  typename math::index_type
+
80  <Eigen::Matrix<T, Eigen::Dynamic, 1> >::type k,
+
81  T& lp) {
+
82  using Eigen::Array;
+
83  using Eigen::Dynamic;
+
84  using Eigen::Matrix;
+ +
86  typedef typename index_type<Matrix<T, Dynamic, 1> >::type size_type;
+
87 
+
88  size_type k_choose_2 = (k * (k - 1)) / 2;
+
89  if (k_choose_2 != x.size())
+
90  throw std::invalid_argument("x is not a valid correlation matrix");
+
91  Array<T, Dynamic, 1> cpcs(k_choose_2);
+
92  for (size_type i = 0; i < k_choose_2; ++i)
+
93  cpcs[i] = corr_constrain(x[i], lp);
+
94  return read_corr_matrix(cpcs, k, lp);
+
95  }
+
96 
+
97  }
+
98 
+
99 }
+
100 
+
101 #endif
+
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > corr_matrix_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, typename math::index_type< Eigen::Matrix< T, Eigen::Dynamic, 1 > >::type k)
Return the correlation matrix of the specified dimensionality derived from the specified vector of un...
+
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > read_corr_matrix(const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const size_t K)
Return the correlation matrix of the specified dimensionality corresponding to the specified canonica...
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:19
+ + +
void invalid_argument(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw an invalid_argument exception with a consistently formatted message.
+ + +
T corr_constrain(const T x)
Return the result of transforming the specified scalar to have a valid correlation value between -1 a...
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/corr__matrix__free_8hpp.html b/doc/api/html/corr__matrix__free_8hpp.html new file mode 100644 index 00000000000..4c468942a06 --- /dev/null +++ b/doc/api/html/corr__matrix__free_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/corr_matrix_free.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
corr_matrix_free.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/meta/index_type.hpp>
+#include <stan/math/prim/mat/err/constraint_tolerance.hpp>
+#include <boost/throw_exception.hpp>
+#include <cmath>
+#include <sstream>
+#include <stdexcept>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::corr_matrix_free (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &y)
 Return the vector of unconstrained partial correlations that define the specified correlation matrix when transformed. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/corr__matrix__free_8hpp_source.html b/doc/api/html/corr__matrix__free_8hpp_source.html new file mode 100644 index 00000000000..ff99c5edd1d --- /dev/null +++ b/doc/api/html/corr__matrix__free_8hpp_source.html @@ -0,0 +1,170 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/corr_matrix_free.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
corr_matrix_free.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_CORR_MATRIX_FREE_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_CORR_MATRIX_FREE_HPP
+
3 
+ + + +
7 #include <boost/throw_exception.hpp>
+
8 #include <cmath>
+
9 #include <sstream>
+
10 #include <stdexcept>
+
11 
+
12 namespace stan {
+
13 
+
14  namespace math {
+
15 
+
36  template <typename T>
+
37  Eigen::Matrix<T, Eigen::Dynamic, 1>
+
38  corr_matrix_free(const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>&
+
39  y) {
+
40  using Eigen::Array;
+
41  using Eigen::Dynamic;
+
42  using Eigen::Matrix;
+ +
44  typedef typename index_type<Matrix<T, Dynamic, 1> >::type size_type;
+
45 
+
46  size_type k = y.rows();
+
47  if (y.cols() != k)
+
48  throw std::domain_error("y is not a square matrix");
+
49  if (k == 0)
+
50  throw std::domain_error("y has no elements");
+
51  size_type k_choose_2 = (k * (k-1)) / 2;
+
52  Array<T, Dynamic, 1> x(k_choose_2);
+
53  Array<T, Dynamic, 1> sds(k);
+
54  bool successful = factor_cov_matrix(y, x, sds);
+
55  if (!successful)
+
56  throw std::runtime_error("factor_cov_matrix failed on y");
+
57  for (size_type i = 0; i < k; ++i) {
+
58  // sds on log scale unconstrained
+
59  if (fabs(sds[i] - 0.0) >= CONSTRAINT_TOLERANCE) {
+
60  std::stringstream s;
+
61  s << "all standard deviations must be zero."
+
62  << " found log(sd[" << i << "])=" << sds[i] << std::endl;
+
63  BOOST_THROW_EXCEPTION(std::runtime_error(s.str()));
+
64  }
+
65  }
+
66  return x.matrix();
+
67  }
+
68  }
+
69 
+
70 }
+
71 
+
72 #endif
+
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:14
+ +
const double CONSTRAINT_TOLERANCE
The tolerance for checking arithmetic bounds In rank and in simplexes.
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:19
+
bool factor_cov_matrix(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &Sigma, Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, Eigen::Array< T, Eigen::Dynamic, 1 > &sds)
This function is intended to make starting values, given a covariance matrix Sigma.
+ +
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ +
Eigen::Matrix< T, Eigen::Dynamic, 1 > corr_matrix_free(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &y)
Return the vector of unconstrained partial correlations that define the specified correlation matrix ...
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/coupled__ode__observer_8hpp.html b/doc/api/html/coupled__ode__observer_8hpp.html new file mode 100644 index 00000000000..1359554e06f --- /dev/null +++ b/doc/api/html/coupled__ode__observer_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/functor/coupled_ode_observer.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Classes | +Namespaces
+
+
coupled_ode_observer.hpp File Reference
+
+
+
#include <vector>
+
+

Go to the source code of this file.

+ + + + + +

+Classes

struct  stan::math::coupled_ode_observer
 Observer for the coupled states. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/coupled__ode__observer_8hpp_source.html b/doc/api/html/coupled__ode__observer_8hpp_source.html new file mode 100644 index 00000000000..dd339fe366a --- /dev/null +++ b/doc/api/html/coupled__ode__observer_8hpp_source.html @@ -0,0 +1,143 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/functor/coupled_ode_observer.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
coupled_ode_observer.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_ARR_FUNCTOR_COUPLED_ODE_OBSERVER_HPP
+
2 #define STAN_MATH_PRIM_ARR_FUNCTOR_COUPLED_ODE_OBSERVER_HPP
+
3 
+
4 #include <vector>
+
5 
+
6 namespace stan {
+
7 
+
8  namespace math {
+
9 
+ +
16  std::vector<std::vector<double> >& y_coupled_;
+
17  int n_;
+
18 
+
25  explicit coupled_ode_observer(std::vector<std::vector<double> >&
+
26  y_coupled)
+
27  : y_coupled_(y_coupled), n_(0) {
+
28  }
+
29 
+
36  void operator()(const std::vector<double>& coupled_state,
+
37  const double t) {
+
38  y_coupled_[n_] = coupled_state;
+
39  n_++;
+
40  }
+
41  };
+
42 
+
43  }
+
44 
+
45 }
+
46 
+
47 #endif
+
std::vector< std::vector< double > > & y_coupled_
+ +
Observer for the coupled states.
+
void operator()(const std::vector< double > &coupled_state, const double t)
Callback function for Boost's ODE solver to record values.
+
coupled_ode_observer(std::vector< std::vector< double > > &y_coupled)
Construct a coupled ODE observer from the specified coupled vector.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cov__matrix__constrain_8hpp.html b/doc/api/html/cov__matrix__constrain_8hpp.html new file mode 100644 index 00000000000..eec1a4744fb --- /dev/null +++ b/doc/api/html/cov__matrix__constrain_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/cov_matrix_constrain.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
cov_matrix_constrain.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/meta/index_type.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/mat/fun/multiply_lower_tri_self_transpose.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::cov_matrix_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, typename math::index_type< Eigen::Matrix< T, Eigen::Dynamic, 1 > >::type K)
 Return the symmetric, positive-definite matrix of dimensions K by K resulting from transforming the specified finite vector of size K plus (K choose 2). More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::cov_matrix_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, typename math::index_type< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > >::type K, T &lp)
 Return the symmetric, positive-definite matrix of dimensions K by K resulting from transforming the specified finite vector of size K plus (K choose 2). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cov__matrix__constrain_8hpp_source.html b/doc/api/html/cov__matrix__constrain_8hpp_source.html new file mode 100644 index 00000000000..f57883e4e1d --- /dev/null +++ b/doc/api/html/cov__matrix__constrain_8hpp_source.html @@ -0,0 +1,202 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/cov_matrix_constrain.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
cov_matrix_constrain.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_COV_MATRIX_CONSTRAIN_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_COV_MATRIX_CONSTRAIN_HPP
+
3 
+ + + + +
8 #include <cmath>
+
9 
+
10 namespace stan {
+
11 
+
12  namespace math {
+
13 
+
14  // COVARIANCE MATRIX
+
15 
+
28  template <typename T>
+
29  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
30  cov_matrix_constrain(const Eigen::Matrix<T, Eigen::Dynamic, 1>& x,
+
31  typename math::index_type
+
32  <Eigen::Matrix<T, Eigen::Dynamic, 1> >::type K) {
+
33  using std::exp;
+
34 
+
35  using Eigen::Dynamic;
+
36  using Eigen::Matrix;
+ + +
39  typedef typename index_type<Matrix<T, Dynamic, Dynamic> >::type size_type;
+
40 
+
41  Matrix<T, Dynamic, Dynamic> L(K, K);
+
42  if (x.size() != (K * (K + 1)) / 2)
+
43  throw std::domain_error("x.size() != K + (K choose 2)");
+
44  int i = 0;
+
45  for (size_type m = 0; m < K; ++m) {
+
46  for (int n = 0; n < m; ++n)
+
47  L(m, n) = x(i++);
+
48  L(m, m) = exp(x(i++));
+
49  for (size_type n = m + 1; n < K; ++n)
+
50  L(m, n) = 0.0;
+
51  }
+ +
53  }
+
54 
+
55 
+
68  template <typename T>
+
69  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
70  cov_matrix_constrain(const Eigen::Matrix<T, Eigen::Dynamic, 1>& x,
+
71  typename math::index_type<Eigen::Matrix<T,
+
72  Eigen::Dynamic,
+
73  Eigen::Dynamic> >::type K,
+
74  T& lp) {
+
75  using std::exp;
+
76  using std::log;
+
77 
+
78  using Eigen::Dynamic;
+
79  using Eigen::Matrix;
+ +
81  typedef typename index_type<Matrix<T, Dynamic, Dynamic> >::type size_type;
+
82 
+
83  if (x.size() != (K * (K + 1)) / 2)
+
84  throw std::domain_error("x.size() != K + (K choose 2)");
+
85  Matrix<T, Dynamic, Dynamic> L(K, K);
+
86  int i = 0;
+
87  for (size_type m = 0; m < K; ++m) {
+
88  for (size_type n = 0; n < m; ++n)
+
89  L(m, n) = x(i++);
+
90  L(m, m) = exp(x(i++));
+
91  for (size_type n = m + 1; n < K; ++n)
+
92  L(m, n) = 0.0;
+
93  }
+
94  // Jacobian for complete transform, including exp() above
+
95  lp += (K * stan::math::LOG_2); // needless constant; want propto
+
96  for (int k = 0; k < K; ++k)
+
97  lp += (K - k + 1) * log(L(k, k)); // only +1 because index from 0
+
98  return L * L.transpose();
+
99  // return tri_multiply_transpose(L);
+
100  }
+
101 
+
102  }
+
103 
+
104 }
+
105 
+
106 #endif
+
const double LOG_2
The natural logarithm of 2, .
Definition: constants.hpp:33
+ +
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > cov_matrix_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, typename math::index_type< Eigen::Matrix< T, Eigen::Dynamic, 1 > >::type K)
Return the symmetric, positive-definite matrix of dimensions K by K resulting from transforming the s...
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
Eigen::Matrix< fvar< T >, R, R > multiply_lower_tri_self_transpose(const Eigen::Matrix< fvar< T >, R, C > &m)
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:19
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cov__matrix__constrain__lkj_8hpp.html b/doc/api/html/cov__matrix__constrain__lkj_8hpp.html new file mode 100644 index 00000000000..b61dc10b614 --- /dev/null +++ b/doc/api/html/cov__matrix__constrain__lkj_8hpp.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/cov_matrix_constrain_lkj.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
cov_matrix_constrain_lkj.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/scal/fun/corr_constrain.hpp>
+#include <stan/math/prim/scal/fun/positive_constrain.hpp>
+#include <stan/math/prim/mat/fun/read_cov_matrix.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::cov_matrix_constrain_lkj (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, size_t k)
 Return the covariance matrix of the specified dimensionality derived from constraining the specified vector of unconstrained values. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::cov_matrix_constrain_lkj (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, size_t k, T &lp)
 Return the covariance matrix of the specified dimensionality derived from constraining the specified vector of unconstrained values and increment the specified log probability reference with the log absolute Jacobian determinant. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cov__matrix__constrain__lkj_8hpp_source.html b/doc/api/html/cov__matrix__constrain__lkj_8hpp_source.html new file mode 100644 index 00000000000..2c87e577f23 --- /dev/null +++ b/doc/api/html/cov__matrix__constrain__lkj_8hpp_source.html @@ -0,0 +1,164 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/cov_matrix_constrain_lkj.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
cov_matrix_constrain_lkj.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_COV_MATRIX_CONSTRAIN_LKJ_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_COV_MATRIX_CONSTRAIN_LKJ_HPP
+
3 
+ + + + +
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
32  template <typename T>
+
33  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
34  cov_matrix_constrain_lkj(const Eigen::Matrix<T, Eigen::Dynamic, 1>& x,
+
35  size_t k) {
+
36  size_t k_choose_2 = (k * (k - 1)) / 2;
+
37  Eigen::Array<T, Eigen::Dynamic, 1> cpcs(k_choose_2);
+
38  int pos = 0;
+
39  for (size_t i = 0; i < k_choose_2; ++i)
+
40  cpcs[i] = corr_constrain(x[pos++]);
+
41  Eigen::Array<T, Eigen::Dynamic, 1> sds(k);
+
42  for (size_t i = 0; i < k; ++i)
+
43  sds[i] = positive_constrain(x[pos++]);
+
44  return read_cov_matrix(cpcs, sds);
+
45  }
+
46 
+
71  template <typename T>
+
72  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
73  cov_matrix_constrain_lkj(const Eigen::Matrix<T, Eigen::Dynamic, 1>& x,
+
74  size_t k,
+
75  T& lp) {
+
76  size_t k_choose_2 = (k * (k - 1)) / 2;
+
77  Eigen::Array<T, Eigen::Dynamic, 1> cpcs(k_choose_2);
+
78  int pos = 0;
+
79  for (size_t i = 0; i < k_choose_2; ++i)
+
80  cpcs[i] = corr_constrain(x[pos++], lp);
+
81  Eigen::Array<T, Eigen::Dynamic, 1> sds(k);
+
82  for (size_t i = 0; i < k; ++i)
+
83  sds[i] = positive_constrain(x[pos++], lp);
+
84  return read_cov_matrix(cpcs, sds, lp);
+
85  }
+
86 
+
87  }
+
88 
+
89 }
+
90 
+
91 #endif
+
T positive_constrain(const T x)
Return the positive value for the specified unconstrained input.
+
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > read_cov_matrix(const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const Eigen::Array< T, Eigen::Dynamic, 1 > &sds, T &log_prob)
A generally worse alternative to call prior to evaluating the density of an elliptical distribution...
+ + + + +
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > cov_matrix_constrain_lkj(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, size_t k)
Return the covariance matrix of the specified dimensionality derived from constraining the specified ...
+
T corr_constrain(const T x)
Return the result of transforming the specified scalar to have a valid correlation value between -1 a...
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cov__matrix__free_8hpp.html b/doc/api/html/cov__matrix__free_8hpp.html new file mode 100644 index 00000000000..7205092b29b --- /dev/null +++ b/doc/api/html/cov__matrix__free_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/cov_matrix_free.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
cov_matrix_free.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/meta/index_type.hpp>
+#include <cmath>
+#include <stdexcept>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::cov_matrix_free (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &y)
 The covariance matrix derived from the symmetric view of the lower-triangular view of the K by K specified matrix is freed to return a vector of size K + (K choose 2). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cov__matrix__free_8hpp_source.html b/doc/api/html/cov__matrix__free_8hpp_source.html new file mode 100644 index 00000000000..370a6293796 --- /dev/null +++ b/doc/api/html/cov__matrix__free_8hpp_source.html @@ -0,0 +1,158 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/cov_matrix_free.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
cov_matrix_free.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_COV_MATRIX_FREE_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_COV_MATRIX_FREE_HPP
+
3 
+ + +
6 #include <cmath>
+
7 #include <stdexcept>
+
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
35  template <typename T>
+
36  Eigen::Matrix<T, Eigen::Dynamic, 1>
+
37  cov_matrix_free(const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>& y) {
+
38  using std::log;
+
39  int K = y.rows();
+
40  if (y.cols() != K)
+
41  throw std::domain_error("y is not a square matrix");
+
42  if (K == 0)
+
43  throw std::domain_error("y has no elements");
+
44  for (int k = 0; k < K; ++k)
+
45  if (!(y(k, k) > 0.0))
+
46  throw std::domain_error("y has non-positive diagonal");
+
47  Eigen::Matrix<T, Eigen::Dynamic, 1> x((K * (K + 1)) / 2);
+
48  // FIXME: see Eigen LDLT for rank-revealing version -- use that
+
49  // even if less efficient?
+
50  Eigen::LLT<Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> >
+
51  llt(y.rows());
+
52  llt.compute(y);
+
53  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> L = llt.matrixL();
+
54  int i = 0;
+
55  for (int m = 0; m < K; ++m) {
+
56  for (int n = 0; n < m; ++n)
+
57  x(i++) = L(m, n);
+
58  x(i++) = log(L(m, m));
+
59  }
+
60  return x;
+
61  }
+
62 
+
63  }
+
64 
+
65 }
+
66 
+
67 #endif
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ +
Eigen::Matrix< T, Eigen::Dynamic, 1 > cov_matrix_free(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &y)
The covariance matrix derived from the symmetric view of the lower-triangular view of the K by K spec...
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cov__matrix__free__lkj_8hpp.html b/doc/api/html/cov__matrix__free__lkj_8hpp.html new file mode 100644 index 00000000000..476ecc2ad0d --- /dev/null +++ b/doc/api/html/cov__matrix__free__lkj_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/cov_matrix_free_lkj.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
cov_matrix_free_lkj.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/meta/index_type.hpp>
+#include <stdexcept>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::cov_matrix_free_lkj (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &y)
 Return the vector of unconstrained partial correlations and deviations that transform to the specified covariance matrix. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cov__matrix__free__lkj_8hpp_source.html b/doc/api/html/cov__matrix__free__lkj_8hpp_source.html new file mode 100644 index 00000000000..deb851329b6 --- /dev/null +++ b/doc/api/html/cov__matrix__free__lkj_8hpp_source.html @@ -0,0 +1,161 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/cov_matrix_free_lkj.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
cov_matrix_free_lkj.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_COV_MATRIX_FREE_LKJ_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_COV_MATRIX_FREE_LKJ_HPP
+
3 
+ + +
6 #include <stdexcept>
+
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
30  template <typename T>
+
31  Eigen::Matrix<T, Eigen::Dynamic, 1>
+ +
33  const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>& y) {
+
34  using Eigen::Array;
+
35  using Eigen::Dynamic;
+
36  using Eigen::Matrix;
+ +
38  typedef typename index_type<Matrix<T, Dynamic, Dynamic> >::type size_type;
+
39 
+
40  size_type k = y.rows();
+
41  if (y.cols() != k)
+
42  throw std::domain_error("y is not a square matrix");
+
43  if (k == 0)
+
44  throw std::domain_error("y has no elements");
+
45  size_type k_choose_2 = (k * (k-1)) / 2;
+
46  Array<T, Dynamic, 1> cpcs(k_choose_2);
+
47  Array<T, Dynamic, 1> sds(k);
+
48  bool successful = factor_cov_matrix(y, cpcs, sds);
+
49  if (!successful)
+
50  throw std::runtime_error("factor_cov_matrix failed on y");
+
51  Matrix<T, Dynamic, 1> x(k_choose_2 + k);
+
52  size_type pos = 0;
+
53  for (size_type i = 0; i < k_choose_2; ++i)
+
54  x[pos++] = cpcs[i];
+
55  for (size_type i = 0; i < k; ++i)
+
56  x[pos++] = sds[i];
+
57  return x;
+
58  }
+
59 
+
60  }
+
61 
+
62 }
+
63 
+
64 #endif
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:19
+
bool factor_cov_matrix(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &Sigma, Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, Eigen::Array< T, Eigen::Dynamic, 1 > &sds)
This function is intended to make starting values, given a covariance matrix Sigma.
+ +
Eigen::Matrix< T, Eigen::Dynamic, 1 > cov_matrix_free_lkj(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &y)
Return the vector of unconstrained partial correlations and deviations that transform to the specifie...
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/csr__extract__u_8hpp.html b/doc/api/html/csr__extract__u_8hpp.html new file mode 100644 index 00000000000..bc82b8f07f0 --- /dev/null +++ b/doc/api/html/csr__extract__u_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/csr_extract_u.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
csr_extract_u.hpp File Reference
+
+
+
#include <stan/math.hpp>
+#include <Eigen/Sparse>
+#include <vector>
+#include <numeric>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
const std::vector< int > stan::math::csr_extract_u (const Eigen::SparseMatrix< T, Eigen::RowMajor > &A)
 Extract the NZE index for each entry from a sparse matrix. More...
 
template<typename T , int R, int C>
const std::vector< int > stan::math::csr_extract_u (const Eigen::Matrix< T, R, C > &A)
 Extract the NZE index for each entry from a sparse matrix. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/csr__extract__u_8hpp_source.html b/doc/api/html/csr__extract__u_8hpp_source.html new file mode 100644 index 00000000000..85eacc40455 --- /dev/null +++ b/doc/api/html/csr__extract__u_8hpp_source.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/csr_extract_u.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
csr_extract_u.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_CSR_EXTRACT_U_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_CSR_EXTRACT_U_HPP
+
3 
+
4 #include <stan/math.hpp>
+
5 #include <Eigen/Sparse>
+
6 #include <vector>
+
7 #include <numeric>
+
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
24  template <typename T>
+
25  const std::vector<int>
+
26  csr_extract_u(const Eigen::SparseMatrix<T, Eigen::RowMajor>& A) {
+
27  std::vector<int> u(A.outerSize() + 1); // last entry is garbage.
+
28  for (int nze = 0; nze <= A.outerSize(); ++nze)
+
29  u[nze] = *(A.outerIndexPtr() + nze) + stan::error_index::value;
+
30  return u;
+
31  }
+
32 
+
40  template <typename T, int R, int C>
+
41  const std::vector<int>
+
42  csr_extract_u(const Eigen::Matrix<T, R, C>& A) {
+
43  Eigen::SparseMatrix<T, Eigen::RowMajor> B = A.sparseView();
+
44  std::vector<int> u = csr_extract_u(B);
+
45  return u;
+
46  }
+
47  // end of csr_format group
+
49 
+
50  }
+
51 }
+
52 
+
53 #endif
+ + +
const std::vector< int > csr_extract_u(const Eigen::SparseMatrix< T, Eigen::RowMajor > &A)
Extract the NZE index for each entry from a sparse matrix.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/csr__extract__v_8hpp.html b/doc/api/html/csr__extract__v_8hpp.html new file mode 100644 index 00000000000..612a1484d40 --- /dev/null +++ b/doc/api/html/csr__extract__v_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/csr_extract_v.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
csr_extract_v.hpp File Reference
+
+
+
#include <stan/math.hpp>
+#include <Eigen/Sparse>
+#include <vector>
+#include <numeric>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
const std::vector< int > stan::math::csr_extract_v (const Eigen::SparseMatrix< T, Eigen::RowMajor > &A)
 Extract the column indexes for non-zero value from a sparse matrix. More...
 
template<typename T , int R, int C>
const std::vector< int > stan::math::csr_extract_v (const Eigen::Matrix< T, R, C > &A)
 Extract the column indexes for non-zero values from a dense matrix by converting to sparse and calling the sparse matrix extractor. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/csr__extract__v_8hpp_source.html b/doc/api/html/csr__extract__v_8hpp_source.html new file mode 100644 index 00000000000..933fb275b2b --- /dev/null +++ b/doc/api/html/csr__extract__v_8hpp_source.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/csr_extract_v.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
csr_extract_v.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_CSR_EXTRACT_V_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_CSR_EXTRACT_V_HPP
+
3 
+
4 #include <stan/math.hpp>
+
5 #include <Eigen/Sparse>
+
6 #include <vector>
+
7 #include <numeric>
+
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
25  template <typename T>
+
26  const std::vector<int>
+
27  csr_extract_v(const Eigen::SparseMatrix<T, Eigen::RowMajor>& A) {
+
28  std::vector<int> v(A.nonZeros());
+
29  for (int nze = 0; nze < A.nonZeros(); ++nze)
+
30  v[nze] = *(A.innerIndexPtr() + nze) + stan::error_index::value;
+
31  return v;
+
32  }
+
33 
+
43  template <typename T, int R, int C>
+
44  const std::vector<int>
+
45  csr_extract_v(const Eigen::Matrix<T, R, C>& A) {
+
46  Eigen::SparseMatrix<T, Eigen::RowMajor> B = A.sparseView();
+
47  std::vector<int> v = csr_extract_v(B);
+
48  return v;
+
49  }
+
50  // end of csr_format group
+
52  }
+
53 }
+
54 
+
55 #endif
+ +
const std::vector< int > csr_extract_v(const Eigen::SparseMatrix< T, Eigen::RowMajor > &A)
Extract the column indexes for non-zero value from a sparse matrix.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/csr__extract__w_8hpp.html b/doc/api/html/csr__extract__w_8hpp.html new file mode 100644 index 00000000000..d5408cf9574 --- /dev/null +++ b/doc/api/html/csr__extract__w_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/csr_extract_w.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
csr_extract_w.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <Eigen/Sparse>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<typename T >
const Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::csr_extract_w (const Eigen::SparseMatrix< T, Eigen::RowMajor > &A)
 
template<typename T , int R, int C>
const Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::csr_extract_w (const Eigen::Matrix< T, R, C > &A)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/csr__extract__w_8hpp_source.html b/doc/api/html/csr__extract__w_8hpp_source.html new file mode 100644 index 00000000000..39f4551cc13 --- /dev/null +++ b/doc/api/html/csr__extract__w_8hpp_source.html @@ -0,0 +1,155 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/csr_extract_w.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
csr_extract_w.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_CSR_EXTRACT_W_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_CSR_EXTRACT_W_HPP
+
3 
+ +
5 #include <Eigen/Sparse>
+
6 // #include <numeric>
+
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
16  /* Extract the non-zero values from a sparse matrix.
+
17  *
+
18  * @tparam T Type of matrix entries.
+
19  * @param[in] A sparse matrix.
+
20  * @return Vector of non-zero entries of A.
+
21  */
+
22  template <typename T>
+
23  const Eigen::Matrix<T, Eigen::Dynamic, 1>
+
24  csr_extract_w(const Eigen::SparseMatrix<T, Eigen::RowMajor>& A) {
+
25  Eigen::Matrix<T, Eigen::Dynamic, 1> w(A.nonZeros());
+
26  w.setZero();
+
27  for (int nze = 0; nze < A.nonZeros(); ++nze)
+
28  w[nze] = *(A.valuePtr() + nze);
+
29  return w;
+
30  }
+
31 
+
32  /* Extract the non-zero values from a dense matrix by converting
+
33  * to sparse and calling the sparse matrix extractor.
+
34  *
+
35  * @tparam T Type of matrix entries.
+
36  * @param[in] A dense matrix.
+
37  * @return Vector of non-zero entries of A.
+
38  */
+
39  template <typename T, int R, int C>
+
40  const Eigen::Matrix<T, Eigen::Dynamic, 1>
+
41  csr_extract_w(const Eigen::Matrix<T, R, C>& A) {
+
42  Eigen::SparseMatrix<T, Eigen::RowMajor> B = A.sparseView();
+
43  return csr_extract_w(B);
+
44  }
+
45  // end of csr_format group
+
47 
+
48  }
+
49 }
+
50 #endif
+
const Eigen::Matrix< T, Eigen::Dynamic, 1 > csr_extract_w(const Eigen::SparseMatrix< T, Eigen::RowMajor > &A)
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/csr__matrix__times__vector_8hpp.html b/doc/api/html/csr__matrix__times__vector_8hpp.html new file mode 100644 index 00000000000..b2f1953d258 --- /dev/null +++ b/doc/api/html/csr__matrix__times__vector_8hpp.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/csr_matrix_times_vector.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
csr_matrix_times_vector.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/csr_u_to_z.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/fun/dot_product.hpp>
+#include <stan/math/prim/scal/err/check_size_match.hpp>
+#include <stan/math/prim/scal/err/check_positive.hpp>
+#include <stan/math/prim/mat/err/check_range.hpp>
+#include <boost/math/tools/promotion.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T1 , typename T2 >
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type,
+Eigen::Dynamic, 1 > 
stan::math::csr_matrix_times_vector (const int &m, const int &n, const Eigen::Matrix< T1, Eigen::Dynamic, 1 > &w, const std::vector< int > &v, const std::vector< int > &u, const Eigen::Matrix< T2, Eigen::Dynamic, 1 > &b)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/csr__matrix__times__vector_8hpp_source.html b/doc/api/html/csr__matrix__times__vector_8hpp_source.html new file mode 100644 index 00000000000..01f15c6b427 --- /dev/null +++ b/doc/api/html/csr__matrix__times__vector_8hpp_source.html @@ -0,0 +1,186 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/csr_matrix_times_vector.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
csr_matrix_times_vector.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_CSR_MATRIX_TIMES_VECTOR_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_CSR_MATRIX_TIMES_VECTOR_HPP
+
3 
+ + + + + + +
10 #include <boost/math/tools/promotion.hpp>
+
11 #include <vector>
+
12 
+
13 namespace stan {
+
14 
+
15  namespace math {
+
75  template <typename T1, typename T2>
+
76  inline
+
77  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type,
+
78  Eigen::Dynamic, 1>
+ +
80  const int& n,
+
81  const Eigen::Matrix<T1, Eigen::Dynamic, 1>& w,
+
82  const std::vector<int>& v,
+
83  const std::vector<int>& u,
+
84  const Eigen::Matrix<T2, Eigen::Dynamic, 1>& b) {
+
85  typedef typename boost::math::tools::promote_args<T1, T2>::type
+
86  result_t;
+
87 
+
88  check_positive("csr_matrix_times_vector", "m", m);
+
89  check_positive("csr_matrix_times_vector", "n", n);
+
90  check_size_match("csr_matrix_times_vector", "n", n, "b", b.size());
+
91  check_size_match("csr_matrix_times_vector", "m", m, "u", u.size() - 1);
+
92  check_size_match("csr_matrix_times_vector", "w", w.size(), "v", v.size());
+
93  check_size_match("csr_matrix_times_vector", "u/z",
+
94  u[m - 1] + csr_u_to_z(u, m - 1) - 1, "v", v.size());
+
95  for (unsigned int i = 0; i < v.size(); ++i)
+
96  check_range("csr_matrix_times_vector", "v[]", n, v[i]);
+
97 
+
98  Eigen::Matrix<result_t, Eigen::Dynamic, 1> result(m);
+
99  result.setZero();
+
100  for (int row = 0; row < m; ++row) {
+
101  int idx = csr_u_to_z(u, row);
+
102  int row_end_in_w = (u[row] - stan::error_index::value) + idx;
+
103  int i = 0; // index into dot-product segment entries.
+
104  Eigen::Matrix<result_t, Eigen::Dynamic, 1> b_sub(idx);
+
105  b_sub.setZero();
+
106  for (int nze = u[row] - stan::error_index::value;
+
107  nze < row_end_in_w; ++nze, ++i) {
+
108  check_range("csr_matrix_times_vector", "j", n, v[nze]);
+
109  b_sub.coeffRef(i) = b.coeffRef(v[nze] - stan::error_index::value);
+
110  } // loop skipped when z is zero.
+
111  Eigen::Matrix<T1, Eigen::Dynamic, 1>
+
112  w_sub(w.segment(u[row] - stan::error_index::value, idx));
+
113  result.coeffRef(row) = dot_product(w_sub, b_sub);
+
114  }
+
115  return result;
+
116  }
+
117  // end of csr_format group
+
119 
+
120  }
+
121 
+
122 }
+
123 
+
124 #endif
+ + +
int csr_u_to_z(const std::vector< int > &u, int i)
Return the z vector computed from the specified u vector at the index for the z vector.
Definition: csr_u_to_z.hpp:24
+
bool check_range(const char *function, const char *name, const int max, const int index, const int nested_level, const char *error_msg)
Return true if specified index is within range.
Definition: check_range.hpp:29
+
Eigen::Matrix< T, 1, Eigen::Dynamic > row(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m, size_t i)
Return the specified row of the specified matrix, using start-at-1 indexing.
Definition: row.hpp:25
+ +
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+
bool check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Return true if the provided sizes match.
+
fvar< T > dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
Definition: dot_product.hpp:20
+ + + +
Eigen::Matrix< typename boost::math::tools::promote_args< T1, T2 >::type, Eigen::Dynamic, 1 > csr_matrix_times_vector(const int &m, const int &n, const Eigen::Matrix< T1, Eigen::Dynamic, 1 > &w, const std::vector< int > &v, const std::vector< int > &u, const Eigen::Matrix< T2, Eigen::Dynamic, 1 > &b)
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/csr__to__dense__matrix_8hpp.html b/doc/api/html/csr__to__dense__matrix_8hpp.html new file mode 100644 index 00000000000..c2729cff103 --- /dev/null +++ b/doc/api/html/csr__to__dense__matrix_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/csr_to_dense_matrix.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
csr_to_dense_matrix.hpp File Reference
+
+
+
#include <stan/math/prim/mat/err/check_range.hpp>
+#include <stan/math/prim/mat/fun/csr_u_to_z.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/fun/dot_product.hpp>
+#include <stan/math/prim/scal/err/check_size_match.hpp>
+#include <stan/math/prim/scal/err/check_positive.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::csr_to_dense_matrix (const int &m, const int &n, const Eigen::Matrix< T, Eigen::Dynamic, 1 > &w, const std::vector< int > &v, const std::vector< int > &u)
 Construct a dense Eigen matrix from the CSR format components. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/csr__to__dense__matrix_8hpp_source.html b/doc/api/html/csr__to__dense__matrix_8hpp_source.html new file mode 100644 index 00000000000..cdfbed0ea7e --- /dev/null +++ b/doc/api/html/csr__to__dense__matrix_8hpp_source.html @@ -0,0 +1,176 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/csr_to_dense_matrix.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
csr_to_dense_matrix.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_CSR_TO_DENSE_MATRIX_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_CSR_TO_DENSE_MATRIX_HPP
+
3 
+ + + + + + +
10 #include <vector>
+
11 
+
12 namespace stan {
+
13 
+
14  namespace math {
+
15 
+
33  template <typename T>
+
34  inline Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
35  csr_to_dense_matrix(const int& m,
+
36  const int& n,
+
37  const Eigen::Matrix<T, Eigen::Dynamic, 1>& w,
+
38  const std::vector<int>& v,
+
39  const std::vector<int>& u) {
+
40  using Eigen::Dynamic;
+
41  using Eigen::Matrix;
+
42 
+
43  check_positive("csr_to_dense_matrix", "m", m);
+
44  check_positive("csr_to_dense_matrix", "n", n);
+
45  check_size_match("csr_to_dense_matrix", "m", m, "u", u.size()-1);
+
46  check_size_match("csr_to_dense_matrix", "w", w.size(), "v", v.size());
+
47  check_size_match("csr_to_dense_matrix", "u/z",
+
48  u[m-1] + csr_u_to_z(u, m - 1) - 1,
+
49  "v", v.size());
+
50  for (size_t i = 0; i < v.size(); ++i)
+
51  check_range("csr_to_dense_matrix", "v[]", n, v[i]);
+
52 
+
53  Matrix<T, Dynamic, Dynamic> result(m, n);
+
54  result.setZero();
+
55  for (int row = 0; row < m; ++row) {
+
56  int row_end_in_w = (u[row] - stan::error_index::value)
+
57  + csr_u_to_z(u, row);
+
58  check_range("csr_to_dense_matrix", "w", w.size(), row_end_in_w);
+
59  for (int nze = u[row] - stan::error_index::value;
+
60  nze < row_end_in_w; ++nze) {
+
61  // row is row index, v[nze] is column index. w[nze] is entry value.
+
62  check_range("csr_to_dense_matrix", "j", n, v[nze]);
+
63  result(row, v[nze] - stan::error_index::value) = w(nze);
+
64  }
+
65  }
+
66  return result;
+
67  }
+
68  // end of csr_format group
+
70 
+
71  }
+
72 }
+
73 #endif
+ + +
int csr_u_to_z(const std::vector< int > &u, int i)
Return the z vector computed from the specified u vector at the index for the z vector.
Definition: csr_u_to_z.hpp:24
+
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > csr_to_dense_matrix(const int &m, const int &n, const Eigen::Matrix< T, Eigen::Dynamic, 1 > &w, const std::vector< int > &v, const std::vector< int > &u)
Construct a dense Eigen matrix from the CSR format components.
+
bool check_range(const char *function, const char *name, const int max, const int index, const int nested_level, const char *error_msg)
Return true if specified index is within range.
Definition: check_range.hpp:29
+
Eigen::Matrix< T, 1, Eigen::Dynamic > row(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m, size_t i)
Return the specified row of the specified matrix, using start-at-1 indexing.
Definition: row.hpp:25
+ +
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+
bool check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Return true if the provided sizes match.
+ + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/csr__u__to__z_8hpp.html b/doc/api/html/csr__u__to__z_8hpp.html new file mode 100644 index 00000000000..be4ae3b86a3 --- /dev/null +++ b/doc/api/html/csr__u__to__z_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/csr_u_to_z.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
csr_u_to_z.hpp File Reference
+
+
+
#include <stan/math/prim/mat/err/check_range.hpp>
+#include <stan/math/prim/scal/err/check_positive.hpp>
+#include <stdexcept>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

int stan::math::csr_u_to_z (const std::vector< int > &u, int i)
 Return the z vector computed from the specified u vector at the index for the z vector. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/csr__u__to__z_8hpp_source.html b/doc/api/html/csr__u__to__z_8hpp_source.html new file mode 100644 index 00000000000..8cbab917634 --- /dev/null +++ b/doc/api/html/csr__u__to__z_8hpp_source.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/csr_u_to_z.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
csr_u_to_z.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_CSR_U_TO_Z
+
2 #define STAN_MATH_PRIM_MAT_FUN_CSR_U_TO_Z
+
3 
+ + +
6 #include <stdexcept>
+
7 #include <vector>
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
24  int csr_u_to_z(const std::vector<int>& u, int i) {
+
25  check_positive("csr_u_to_z", "u.size()", u.size());
+
26  check_range("csr_u_to_z", "i", u.size(), i + 1, "index out of range");
+
27  return u[i + 1] - u[i];
+
28  }
+
29 
+
30  }
+
31 }
+
32 #endif
+ +
int csr_u_to_z(const std::vector< int > &u, int i)
Return the z vector computed from the specified u vector at the index for the z vector.
Definition: csr_u_to_z.hpp:24
+
bool check_range(const char *function, const char *name, const int max, const int index, const int nested_level, const char *error_msg)
Return true if specified index is within range.
Definition: check_range.hpp:29
+
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cumulative__sum_8hpp.html b/doc/api/html/cumulative__sum_8hpp.html new file mode 100644 index 00000000000..6ade8f55897 --- /dev/null +++ b/doc/api/html/cumulative__sum_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/cumulative_sum.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
cumulative_sum.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
std::vector< T > stan::math::cumulative_sum (const std::vector< T > &x)
 Return the cumulative sum of the specified vector. More...
 
template<typename T , int R, int C>
Eigen::Matrix< T, R, C > stan::math::cumulative_sum (const Eigen::Matrix< T, R, C > &m)
 Return the cumulative sum of the specified matrix. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/cumulative__sum_8hpp_source.html b/doc/api/html/cumulative__sum_8hpp_source.html new file mode 100644 index 00000000000..1657f8798b4 --- /dev/null +++ b/doc/api/html/cumulative__sum_8hpp_source.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/cumulative_sum.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
cumulative_sum.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_CUMULATIVE_SUM_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_CUMULATIVE_SUM_HPP
+
3 
+ +
5 #include <vector>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
21  template <typename T>
+
22  inline std::vector<T>
+
23  cumulative_sum(const std::vector<T>& x) {
+
24  std::vector<T> result(x.size());
+
25  if (x.size() == 0)
+
26  return result;
+
27  result[0] = x[0];
+
28  for (size_t i = 1; i < result.size(); ++i)
+
29  result[i] = x[i] + result[i-1];
+
30  return result;
+
31  }
+
32 
+
47  template <typename T, int R, int C>
+
48  inline Eigen::Matrix<T, R, C>
+
49  cumulative_sum(const Eigen::Matrix<T, R, C>& m) {
+
50  Eigen::Matrix<T, R, C> result(m.rows(), m.cols());
+
51  if (m.size() == 0)
+
52  return result;
+
53  result(0) = m(0);
+
54  for (int i = 1; i < result.size(); ++i)
+
55  result(i) = m(i) + result(i-1);
+
56  return result;
+
57  }
+
58  }
+
59 }
+
60 #endif
+
std::vector< T > cumulative_sum(const std::vector< T > &x)
Return the cumulative sum of the specified vector.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/ddv__vari_8hpp.html b/doc/api/html/ddv__vari_8hpp.html new file mode 100644 index 00000000000..98706f073a1 --- /dev/null +++ b/doc/api/html/ddv__vari_8hpp.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/rev/core/ddv_vari.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Classes | +Namespaces
+
+
ddv_vari.hpp File Reference
+
+
+
#include <stan/math/rev/core/vari.hpp>
+
+

Go to the source code of this file.

+ + + + +

+Classes

class  stan::math::op_ddv_vari
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/ddv__vari_8hpp_source.html b/doc/api/html/ddv__vari_8hpp_source.html new file mode 100644 index 00000000000..3c6fc593f42 --- /dev/null +++ b/doc/api/html/ddv__vari_8hpp_source.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/rev/core/ddv_vari.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
ddv_vari.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_DDV_VARI_HPP
+
2 #define STAN_MATH_REV_CORE_DDV_VARI_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
9  class op_ddv_vari : public vari {
+
10  protected:
+
11  double ad_;
+
12  double bd_;
+ +
14  public:
+
15  op_ddv_vari(double f, double a, double b, vari* cvi) :
+
16  vari(f),
+
17  ad_(a),
+
18  bd_(b),
+
19  cvi_(cvi) {
+
20  }
+
21  };
+
22 
+
23  }
+
24 }
+
25 #endif
+ +
op_ddv_vari(double f, double a, double b, vari *cvi)
Definition: ddv_vari.hpp:15
+ +
The variable implementation base class.
Definition: vari.hpp:28
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/derivative_8hpp.html b/doc/api/html/derivative_8hpp.html new file mode 100644 index 00000000000..07b5610ae7d --- /dev/null +++ b/doc/api/html/derivative_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/mix/mat/functor/derivative.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
derivative.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/rev/core.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T , typename F >
void stan::math::derivative (const F &f, const T &x, T &fx, T &dfx_dx)
 Return the derivative of the specified univariate function at the specified argument. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/derivative_8hpp_source.html b/doc/api/html/derivative_8hpp_source.html new file mode 100644 index 00000000000..bbdcb8185eb --- /dev/null +++ b/doc/api/html/derivative_8hpp_source.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/mix/mat/functor/derivative.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
derivative.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_MIX_MAT_FUNCTOR_DERIVATIVE_HPP
+
2 #define STAN_MATH_MIX_MAT_FUNCTOR_DERIVATIVE_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ +
6 #include <stan/math/rev/core.hpp>
+
7 #include <vector>
+
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
13  using Eigen::Dynamic;
+
14 
+
26  template <typename T, typename F>
+
27  void
+
28  derivative(const F& f,
+
29  const T& x,
+
30  T& fx,
+
31  T& dfx_dx) {
+
32  fvar<T> x_fvar = fvar<T>(x, 1.0);
+
33  fvar<T> fx_fvar = f(x_fvar);
+
34  fx = fx_fvar.val_;
+
35  dfx_dx = fx_fvar.d_;
+
36  }
+
37 
+
38  } // namespace math
+
39 } // namespace stan
+
40 #endif
+ + + + +
void derivative(const F &f, const T &x, T &fx, T &dfx_dx)
Return the derivative of the specified univariate function at the specified argument.
Definition: derivative.hpp:28
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/diag__matrix_8hpp.html b/doc/api/html/diag__matrix_8hpp.html new file mode 100644 index 00000000000..e15b44cf678 --- /dev/null +++ b/doc/api/html/diag__matrix_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/diag_matrix.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
diag_matrix.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::diag_matrix (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v)
 Return a square diagonal matrix with the specified vector of coefficients as the diagonal values. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/diag__matrix_8hpp_source.html b/doc/api/html/diag__matrix_8hpp_source.html new file mode 100644 index 00000000000..9edec7955eb --- /dev/null +++ b/doc/api/html/diag__matrix_8hpp_source.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/diag_matrix.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
diag_matrix.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_DIAG_MATRIX_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_DIAG_MATRIX_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
15  template <typename T>
+
16  inline
+
17  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
18  diag_matrix(const Eigen::Matrix<T, Eigen::Dynamic, 1>& v) {
+
19  return v.asDiagonal();
+
20  }
+
21 
+
22  }
+
23 }
+
24 #endif
+
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > diag_matrix(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v)
Return a square diagonal matrix with the specified vector of coefficients as the diagonal values...
Definition: diag_matrix.hpp:18
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/diag__post__multiply_8hpp.html b/doc/api/html/diag__post__multiply_8hpp.html new file mode 100644 index 00000000000..6a869f5ec64 --- /dev/null +++ b/doc/api/html/diag__post__multiply_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/diag_post_multiply.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
diag_post_multiply.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <boost/math/tools/promotion.hpp>
+#include <stdexcept>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R1, C1 > 
stan::math::diag_post_multiply (const Eigen::Matrix< T1, R1, C1 > &m1, const Eigen::Matrix< T2, R2, C2 > &m2)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/diag__post__multiply_8hpp_source.html b/doc/api/html/diag__post__multiply_8hpp_source.html new file mode 100644 index 00000000000..1aa91424dde --- /dev/null +++ b/doc/api/html/diag__post__multiply_8hpp_source.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/diag_post_multiply.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
diag_post_multiply.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_DIAG_POST_MULTIPLY_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_DIAG_POST_MULTIPLY_HPP
+
3 
+ +
5 #include <boost/math/tools/promotion.hpp>
+
6 #include <stdexcept>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  template <typename T1, typename T2, int R1, int C1, int R2, int C2>
+
12  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type,
+
13  R1, C1>
+
14  diag_post_multiply(const Eigen::Matrix<T1, R1, C1>& m1,
+
15  const Eigen::Matrix<T2, R2, C2>& m2) {
+
16  if (m2.cols() != 1 && m2.rows() != 1)
+
17  throw std::domain_error("m2 must be a vector");
+
18  int m1_cols = m1.cols();
+
19  if (m2.size() != m1_cols)
+
20  throw std::domain_error("m2 must have same length as m1 has columns");
+
21  int m1_rows = m1.rows();
+
22  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type,
+
23  R1, C1>
+
24  result(m1_rows, m1_cols);
+
25 
+
26  for (int j = 0; j < m1_cols; ++j)
+
27  for (int i = 0; i < m1_rows; ++i)
+
28  result(i, j) = m2(j) * m1(i, j);
+
29  return result;
+
30  }
+
31 
+
32  }
+
33 }
+
34 #endif
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ +
Eigen::Matrix< typename boost::math::tools::promote_args< T1, T2 >::type, R1, C1 > diag_post_multiply(const Eigen::Matrix< T1, R1, C1 > &m1, const Eigen::Matrix< T2, R2, C2 > &m2)
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/diag__pre__multiply_8hpp.html b/doc/api/html/diag__pre__multiply_8hpp.html new file mode 100644 index 00000000000..7a1387df328 --- /dev/null +++ b/doc/api/html/diag__pre__multiply_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/diag_pre_multiply.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
diag_pre_multiply.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <boost/math/tools/promotion.hpp>
+#include <stdexcept>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R2, C2 > 
stan::math::diag_pre_multiply (const Eigen::Matrix< T1, R1, C1 > &m1, const Eigen::Matrix< T2, R2, C2 > &m2)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/diag__pre__multiply_8hpp_source.html b/doc/api/html/diag__pre__multiply_8hpp_source.html new file mode 100644 index 00000000000..635912ab508 --- /dev/null +++ b/doc/api/html/diag__pre__multiply_8hpp_source.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/diag_pre_multiply.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
diag_pre_multiply.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_DIAG_PRE_MULTIPLY_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_DIAG_PRE_MULTIPLY_HPP
+
3 
+ +
5 #include <boost/math/tools/promotion.hpp>
+
6 #include <stdexcept>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  template <typename T1, typename T2, int R1, int C1, int R2, int C2>
+
12  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type,
+
13  R2, C2>
+
14  diag_pre_multiply(const Eigen::Matrix<T1, R1, C1>& m1,
+
15  const Eigen::Matrix<T2, R2, C2>& m2) {
+
16  if (m1.cols() != 1 && m1.rows() != 1)
+
17  throw std::domain_error("m1 must be a vector");
+
18  int m2_rows = m2.rows();
+
19  if (m1.size() != m2_rows)
+
20  throw std::domain_error("m1 must have same length as m2 has rows");
+
21  int m2_cols = m2.cols();
+
22  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type,
+
23  R2, C2>
+
24  result(m2_rows, m2_cols);
+
25  for (int j = 0; j < m2_cols; ++j)
+
26  for (int i = 0; i < m2_rows; ++i)
+
27  result(i, j) = m1(i) * m2(i, j);
+
28  return result;
+
29  }
+
30 
+
31  }
+
32 }
+
33 #endif
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ +
Eigen::Matrix< typename boost::math::tools::promote_args< T1, T2 >::type, R2, C2 > diag_pre_multiply(const Eigen::Matrix< T1, R1, C1 > &m1, const Eigen::Matrix< T2, R2, C2 > &m2)
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/diagonal_8hpp.html b/doc/api/html/diagonal_8hpp.html new file mode 100644 index 00000000000..48003bf5172 --- /dev/null +++ b/doc/api/html/diagonal_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/diagonal.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
diagonal.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::diagonal (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
 Return a column vector of the diagonal elements of the specified matrix. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/diagonal_8hpp_source.html b/doc/api/html/diagonal_8hpp_source.html new file mode 100644 index 00000000000..0c8cb865c90 --- /dev/null +++ b/doc/api/html/diagonal_8hpp_source.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/diagonal.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
diagonal.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_DIAGONAL_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_DIAGONAL_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
15  template <typename T>
+
16  inline
+
17  Eigen::Matrix<T, Eigen::Dynamic, 1>
+
18  diagonal(const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>& m) {
+
19  return m.diagonal();
+
20  }
+
21 
+
22  }
+
23 }
+
24 #endif
+
Eigen::Matrix< T, Eigen::Dynamic, 1 > diagonal(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
Return a column vector of the diagonal elements of the specified matrix.
Definition: diagonal.hpp:18
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dims_8hpp.html b/doc/api/html/dims_8hpp.html new file mode 100644 index 00000000000..db6b3b97186 --- /dev/null +++ b/doc/api/html/dims_8hpp.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/dims.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
dims.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + +

+Functions

template<typename T >
void stan::math::dims (const T &x, std::vector< int > &result)
 
template<typename T , int R, int C>
void stan::math::dims (const Eigen::Matrix< T, R, C > &x, std::vector< int > &result)
 
template<typename T >
void stan::math::dims (const std::vector< T > &x, std::vector< int > &result)
 
template<typename T >
std::vector< int > stan::math::dims (const T &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dims_8hpp_source.html b/doc/api/html/dims_8hpp_source.html new file mode 100644 index 00000000000..c1a6451630c --- /dev/null +++ b/doc/api/html/dims_8hpp_source.html @@ -0,0 +1,152 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/dims.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
dims.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_DIMS_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_DIMS_HPP
+
3 
+ +
5 #include <vector>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  template <typename T>
+
11  inline
+
12  void
+
13  dims(const T& x, std::vector<int>& result) {
+
14  /* no op */
+
15  }
+
16  template <typename T, int R, int C>
+
17  inline void
+
18  dims(const Eigen::Matrix<T, R, C>& x,
+
19  std::vector<int>& result) {
+
20  result.push_back(x.rows());
+
21  result.push_back(x.cols());
+
22  }
+
23  template <typename T>
+
24  inline void
+
25  dims(const std::vector<T>& x,
+
26  std::vector<int>& result) {
+
27  result.push_back(x.size());
+
28  if (x.size() > 0)
+
29  dims(x[0], result);
+
30  }
+
31 
+
32  template <typename T>
+
33  inline std::vector<int>
+
34  dims(const T& x) {
+
35  std::vector<int> result;
+
36  dims(x, result);
+
37  return result;
+
38  }
+
39 
+
40  }
+
41 }
+
42 #endif
+
void dims(const T &x, std::vector< int > &result)
Definition: dims.hpp:13
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_0d2e2987a83d97b0549ec6e08f6f3f41.html b/doc/api/html/dir_0d2e2987a83d97b0549ec6e08f6f3f41.html new file mode 100644 index 00000000000..f01ae3d4330 --- /dev/null +++ b/doc/api/html/dir_0d2e2987a83d97b0549ec6e08f6f3f41.html @@ -0,0 +1,110 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/meta Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
meta Directory Reference
+
+
+ + + + + + +

+Files

file  is_var.hpp [code]
 
file  partials_type.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_148120812de7344119b120632cfcec74.html b/doc/api/html/dir_148120812de7344119b120632cfcec74.html new file mode 100644 index 00000000000..3f320decfde --- /dev/null +++ b/doc/api/html/dir_148120812de7344119b120632cfcec74.html @@ -0,0 +1,280 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
fun Directory Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Files

file  abs.hpp [code]
 
file  acos.hpp [code]
 
file  acosh.hpp [code]
 
file  as_bool.hpp [code]
 
file  asin.hpp [code]
 
file  asinh.hpp [code]
 
file  atan.hpp [code]
 
file  atan2.hpp [code]
 
file  atanh.hpp [code]
 
file  bessel_first_kind.hpp [code]
 
file  bessel_second_kind.hpp [code]
 
file  binary_log_loss.hpp [code]
 
file  boost_fpclassify.hpp [code]
 
file  boost_isfinite.hpp [code]
 
file  boost_isinf.hpp [code]
 
file  boost_isnan.hpp [code]
 
file  boost_isnormal.hpp [code]
 
file  calculate_chain.hpp [code]
 
file  cbrt.hpp [code]
 
file  ceil.hpp [code]
 
file  cos.hpp [code]
 
file  cosh.hpp [code]
 
file  digamma.hpp [code]
 
file  erf.hpp [code]
 
file  erfc.hpp [code]
 
file  exp.hpp [code]
 
file  exp2.hpp [code]
 
file  expm1.hpp [code]
 
file  fabs.hpp [code]
 
file  falling_factorial.hpp [code]
 
file  fdim.hpp [code]
 
file  floor.hpp [code]
 
file  fma.hpp [code]
 
file  fmax.hpp [code]
 
file  fmin.hpp [code]
 
file  fmod.hpp [code]
 
file  gamma_p.hpp [code]
 
file  gamma_q.hpp [code]
 
file  grad_inc_beta.hpp [code]
 
file  hypot.hpp [code]
 
file  ibeta.hpp [code]
 
file  if_else.hpp [code]
 
file  inc_beta.hpp [code]
 
file  inv.hpp [code]
 
file  inv_cloglog.hpp [code]
 
file  inv_logit.hpp [code]
 
file  inv_Phi.hpp [code]
 
file  inv_sqrt.hpp [code]
 
file  inv_square.hpp [code]
 
file  is_inf.hpp [code]
 
file  is_nan.hpp [code]
 
file  is_uninitialized.hpp [code]
 
file  lgamma.hpp [code]
 
file  lmgamma.hpp [code]
 
file  log.hpp [code]
 
file  log10.hpp [code]
 
file  log1m.hpp [code]
 
file  log1m_exp.hpp [code]
 
file  log1p.hpp [code]
 
file  log1p_exp.hpp [code]
 
file  log2.hpp [code]
 
file  log_diff_exp.hpp [code]
 
file  log_falling_factorial.hpp [code]
 
file  log_mix.hpp [code]
 
file  log_rising_factorial.hpp [code]
 
file  log_sum_exp.hpp [code]
 
file  modified_bessel_first_kind.hpp [code]
 
file  modified_bessel_second_kind.hpp [code]
 
file  multiply_log.hpp [code]
 
file  owens_t.hpp [code]
 
file  Phi.hpp [code]
 
file  Phi_approx.hpp [code]
 
file  pow.hpp [code]
 
file  primitive_value.hpp [code]
 
file  rising_factorial.hpp [code]
 
file  round.hpp [code]
 
file  sin.hpp [code]
 
file  sinh.hpp [code]
 
file  sqrt.hpp [code]
 
file  square.hpp [code]
 
file  step.hpp [code]
 
file  tan.hpp [code]
 
file  tanh.hpp [code]
 
file  tgamma.hpp [code]
 
file  trunc.hpp [code]
 
file  value_of.hpp [code]
 
file  value_of_rec.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_1dcd98e7c4f45b41e0c83c911c6e550e.html b/doc/api/html/dir_1dcd98e7c4f45b41e0c83c911c6e550e.html new file mode 100644 index 00000000000..b89a9973767 --- /dev/null +++ b/doc/api/html/dir_1dcd98e7c4f45b41e0c83c911c6e550e.html @@ -0,0 +1,115 @@ + + + + + + +Stan Math Library: stan/math/rev/mat Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
mat Directory Reference
+
+
+ + + + + + +

+Directories

directory  fun
 
directory  functor
 
+ + + +

+Files

file  functor.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_20b155cb57d7a56b3d8d0cc440c20c67.html b/doc/api/html/dir_20b155cb57d7a56b3d8d0cc440c20c67.html new file mode 100644 index 00000000000..00feddfdaa9 --- /dev/null +++ b/doc/api/html/dir_20b155cb57d7a56b3d8d0cc440c20c67.html @@ -0,0 +1,110 @@ + + + + + + +Stan Math Library: stan/math/rev/scal Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
scal Directory Reference
+
+
+ + + + + + +

+Directories

directory  fun
 
directory  meta
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_218f7c98404744c2444933b45636fd56.html b/doc/api/html/dir_218f7c98404744c2444933b45636fd56.html new file mode 100644 index 00000000000..0d2182119d9 --- /dev/null +++ b/doc/api/html/dir_218f7c98404744c2444933b45636fd56.html @@ -0,0 +1,108 @@ + + + + + + +Stan Math Library: stan/math/fwd/arr Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
arr Directory Reference
+
+
+ + + + +

+Directories

directory  fun
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_28a36803b0e41c0a18a5eae798eb25aa.html b/doc/api/html/dir_28a36803b0e41c0a18a5eae798eb25aa.html new file mode 100644 index 00000000000..36b79eb66e5 --- /dev/null +++ b/doc/api/html/dir_28a36803b0e41c0a18a5eae798eb25aa.html @@ -0,0 +1,122 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/meta Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
meta Directory Reference
+
+
+ + + + + + + + + + + + + + + + + + +

+Files

file  container_view.hpp [code]
 
file  get.hpp [code]
 
file  index_type.hpp [code]
 
file  is_vector.hpp [code]
 
 
file  length.hpp [code]
 
file  seq_view.hpp [code]
 
file  value_type.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_30daf33388d282c0407cfa671c8eb4d2.html b/doc/api/html/dir_30daf33388d282c0407cfa671c8eb4d2.html new file mode 100644 index 00000000000..9a0a453b4a5 --- /dev/null +++ b/doc/api/html/dir_30daf33388d282c0407cfa671c8eb4d2.html @@ -0,0 +1,112 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/functor Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
functor Directory Reference
+
+
+ + + + + + + + +

+Files

file  coupled_ode_observer.hpp [code]
 
file  coupled_ode_system.hpp [code]
 
file  integrate_ode.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_319cc4632a97ed31368425a24c312e54.html b/doc/api/html/dir_319cc4632a97ed31368425a24c312e54.html new file mode 100644 index 00000000000..53673a47586 --- /dev/null +++ b/doc/api/html/dir_319cc4632a97ed31368425a24c312e54.html @@ -0,0 +1,121 @@ + + + + + + +Stan Math Library: stan/math Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
math Directory Reference
+
+
+ + + + + + + + + + + + +

+Directories

directory  fwd
 
directory  memory
 
directory  mix
 
directory  prim
 
directory  rev
 
+ + + +

+Files

file  version.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_33537a7d9c362fe85640e3fedc18370a.html b/doc/api/html/dir_33537a7d9c362fe85640e3fedc18370a.html new file mode 100644 index 00000000000..ce237760211 --- /dev/null +++ b/doc/api/html/dir_33537a7d9c362fe85640e3fedc18370a.html @@ -0,0 +1,110 @@ + + + + + + +Stan Math Library: stan/math/rev/arr Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
arr Directory Reference
+
+
+ + + + + + +

+Directories

directory  fun
 
directory  functor
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_3e64126bb31437bd14b43144ca4ca952.html b/doc/api/html/dir_3e64126bb31437bd14b43144ca4ca952.html new file mode 100644 index 00000000000..e01a77d1f1f --- /dev/null +++ b/doc/api/html/dir_3e64126bb31437bd14b43144ca4ca952.html @@ -0,0 +1,110 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
mat Directory Reference
+
+
+ + + + + + +

+Directories

directory  fun
 
directory  functor
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_432a6a494fb6b56de020084eb4b3c5f5.html b/doc/api/html/dir_432a6a494fb6b56de020084eb4b3c5f5.html new file mode 100644 index 00000000000..0ae3e39690d --- /dev/null +++ b/doc/api/html/dir_432a6a494fb6b56de020084eb4b3c5f5.html @@ -0,0 +1,116 @@ + + + + + + +Stan Math Library: stan/math/prim/mat Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
mat Directory Reference
+
+
+ + + + + + + + + + + + +

+Directories

directory  err
 
directory  fun
 
directory  functor
 
directory  meta
 
directory  prob
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_5988f0c3962c3bf159982d25a28dffb9.html b/doc/api/html/dir_5988f0c3962c3bf159982d25a28dffb9.html new file mode 100644 index 00000000000..6a3d92108b4 --- /dev/null +++ b/doc/api/html/dir_5988f0c3962c3bf159982d25a28dffb9.html @@ -0,0 +1,112 @@ + + + + + + +Stan Math Library: stan/math/prim Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
prim Directory Reference
+
+
+ + + + + + + + +

+Directories

directory  arr
 
directory  mat
 
directory  scal
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_5ad826fc69c5de8867ad775040807419.html b/doc/api/html/dir_5ad826fc69c5de8867ad775040807419.html new file mode 100644 index 00000000000..d2dfc3914e6 --- /dev/null +++ b/doc/api/html/dir_5ad826fc69c5de8867ad775040807419.html @@ -0,0 +1,404 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
fun Directory Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Files

file  accumulator.hpp [code]
 
file  add.hpp [code]
 
file  append_col.hpp [code]
 
file  append_row.hpp [code]
 
file  array_builder.hpp [code]
 
file  assign.hpp [code]
 
file  autocorrelation.hpp [code]
 
file  autocovariance.hpp [code]
 
file  block.hpp [code]
 
file  cholesky_corr_constrain.hpp [code]
 
file  cholesky_corr_free.hpp [code]
 
file  cholesky_decompose.hpp [code]
 
file  cholesky_factor_constrain.hpp [code]
 
file  cholesky_factor_free.hpp [code]
 
file  col.hpp [code]
 
file  cols.hpp [code]
 
file  columns_dot_product.hpp [code]
 
file  columns_dot_self.hpp [code]
 
file  common_type.hpp [code]
 
file  corr_matrix_constrain.hpp [code]
 
file  corr_matrix_free.hpp [code]
 
file  cov_matrix_constrain.hpp [code]
 
file  cov_matrix_constrain_lkj.hpp [code]
 
file  cov_matrix_free.hpp [code]
 
file  cov_matrix_free_lkj.hpp [code]
 
file  crossprod.hpp [code]
 
file  csr_extract_u.hpp [code]
 
file  csr_extract_v.hpp [code]
 
file  csr_extract_w.hpp [code]
 
file  csr_matrix_times_vector.hpp [code]
 
file  csr_to_dense_matrix.hpp [code]
 
file  csr_u_to_z.hpp [code]
 
file  cumulative_sum.hpp [code]
 
file  determinant.hpp [code]
 
file  diag_matrix.hpp [code]
 
file  diag_post_multiply.hpp [code]
 
file  diag_pre_multiply.hpp [code]
 
file  diagonal.hpp [code]
 
file  dims.hpp [code]
 
file  distance.hpp [code]
 
file  divide.hpp [code]
 
file  dot_product.hpp [code]
 
file  dot_self.hpp [code]
 
file  Eigen.hpp [code]
 
file  eigenvalues_sym.hpp [code]
 
file  eigenvectors_sym.hpp [code]
 
file  elt_divide.hpp [code]
 
file  elt_multiply.hpp [code]
 
file  exp.hpp [code]
 
file  factor_cov_matrix.hpp [code]
 
file  factor_U.hpp [code]
 
file  fill.hpp [code]
 
file  get_base1.hpp [code]
 
file  get_base1_lhs.hpp [code]
 
file  get_lp.hpp [code]
 
file  head.hpp [code]
 
file  initialize.hpp [code]
 
file  inverse.hpp [code]
 
file  inverse_spd.hpp [code]
 
file  LDLT_factor.hpp [code]
 
file  log.hpp [code]
 
file  log_determinant.hpp [code]
 
file  log_determinant_ldlt.hpp [code]
 
file  log_determinant_spd.hpp [code]
 
file  log_softmax.hpp [code]
 
file  log_sum_exp.hpp [code]
 
file  make_nu.hpp [code]
 
file  max.hpp [code]
 
file  mdivide_left.hpp [code]
 
file  mdivide_left_ldlt.hpp [code]
 
file  mdivide_left_spd.hpp [code]
 
file  mdivide_left_tri.hpp [code]
 
file  mdivide_left_tri_low.hpp [code]
 
file  mdivide_right.hpp [code]
 
file  mdivide_right_ldlt.hpp [code]
 
file  mdivide_right_spd.hpp [code]
 
file  mdivide_right_tri.hpp [code]
 
file  mdivide_right_tri_low.hpp [code]
 
file  mean.hpp [code]
 
file  min.hpp [code]
 
file  minus.hpp [code]
 
file  multiply.hpp [code]
 
file  multiply_lower_tri_self_transpose.hpp [code]
 
file  num_elements.hpp [code]
 
file  ordered_constrain.hpp [code]
 
file  ordered_free.hpp [code]
 
file  positive_ordered_constrain.hpp [code]
 
file  positive_ordered_free.hpp [code]
 
file  prod.hpp [code]
 
file  promote_common.hpp [code]
 
file  promote_scalar.hpp [code]
 
file  promote_scalar_type.hpp [code]
 
file  promoter.hpp [code]
 
file  qr_Q.hpp [code]
 
file  qr_R.hpp [code]
 
file  quad_form.hpp [code]
 
file  quad_form_diag.hpp [code]
 
file  quad_form_sym.hpp [code]
 
file  rank.hpp [code]
 
file  read_corr_L.hpp [code]
 
file  read_corr_matrix.hpp [code]
 
file  read_cov_L.hpp [code]
 
file  read_cov_matrix.hpp [code]
 
file  rep_matrix.hpp [code]
 
file  rep_row_vector.hpp [code]
 
file  rep_vector.hpp [code]
 
file  resize.hpp [code]
 
file  row.hpp [code]
 
file  rows.hpp [code]
 
file  rows_dot_product.hpp [code]
 
file  rows_dot_self.hpp [code]
 
file  sd.hpp [code]
 
file  segment.hpp [code]
 
file  simplex_constrain.hpp [code]
 
file  simplex_free.hpp [code]
 
file  singular_values.hpp [code]
 
file  size.hpp [code]
 
file  softmax.hpp [code]
 
file  sort.hpp [code]
 
file  sort_indices.hpp [code]
 
file  sort_indices_asc.hpp [code]
 
file  sort_indices_desc.hpp [code]
 
file  squared_distance.hpp [code]
 
file  stan_print.hpp [code]
 
file  sub_col.hpp [code]
 
file  sub_row.hpp [code]
 
file  subtract.hpp [code]
 
file  sum.hpp [code]
 
file  tail.hpp [code]
 
file  tcrossprod.hpp [code]
 
file  to_array_1d.hpp [code]
 
file  to_array_2d.hpp [code]
 
file  to_matrix.hpp [code]
 
file  to_row_vector.hpp [code]
 
file  to_vector.hpp [code]
 
file  trace.hpp [code]
 
file  trace_gen_inv_quad_form_ldlt.hpp [code]
 
file  trace_gen_quad_form.hpp [code]
 
file  trace_inv_quad_form_ldlt.hpp [code]
 
file  trace_quad_form.hpp [code]
 
file  transpose.hpp [code]
 
file  typedefs.hpp [code]
 
file  unit_vector_constrain.hpp [code]
 
file  unit_vector_free.hpp [code]
 
file  value_of.hpp [code]
 
file  value_of_rec.hpp [code]
 
file  variance.hpp [code]
 
file  welford_covar_estimator.hpp [code]
 
file  welford_var_estimator.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_5d16685896f16be8a05661ea8e564330.html b/doc/api/html/dir_5d16685896f16be8a05661ea8e564330.html new file mode 100644 index 00000000000..410d6d617c3 --- /dev/null +++ b/doc/api/html/dir_5d16685896f16be8a05661ea8e564330.html @@ -0,0 +1,119 @@ + + + + + + +Stan Math Library: stan/math/prim/scal Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
scal Directory Reference
+
+
+ + + + + + + + + + +

+Directories

directory  err
 
directory  fun
 
directory  meta
 
directory  prob
 
+ + + +

+Files

file  fun.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_655080d40d13dc2f4492986545ac5303.html b/doc/api/html/dir_655080d40d13dc2f4492986545ac5303.html new file mode 100644 index 00000000000..2c7a23a6b97 --- /dev/null +++ b/doc/api/html/dir_655080d40d13dc2f4492986545ac5303.html @@ -0,0 +1,110 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/functor Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
functor Directory Reference
+
+
+ + + + + + +

+Files

file  gradient.hpp [code]
 
file  jacobian.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_6f8f5e5381ee928d78cd9e6902b2133e.html b/doc/api/html/dir_6f8f5e5381ee928d78cd9e6902b2133e.html new file mode 100644 index 00000000000..d9b62f7d185 --- /dev/null +++ b/doc/api/html/dir_6f8f5e5381ee928d78cd9e6902b2133e.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/fwd/core Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
core Directory Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Files

file  fvar.hpp [code]
 
file  operator_addition.hpp [code]
 
file  operator_division.hpp [code]
 
file  operator_equal.hpp [code]
 
file  operator_greater_than.hpp [code]
 
file  operator_greater_than_or_equal.hpp [code]
 
file  operator_less_than.hpp [code]
 
file  operator_less_than_or_equal.hpp [code]
 
file  operator_multiplication.hpp [code]
 
file  operator_not_equal.hpp [code]
 
file  operator_subtraction.hpp [code]
 
file  operator_unary_minus.hpp [code]
 
file  std_numeric_limits.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_7020d6dce82e12d16aa8699efbddfd6f.html b/doc/api/html/dir_7020d6dce82e12d16aa8699efbddfd6f.html new file mode 100644 index 00000000000..c7bb35faf58 --- /dev/null +++ b/doc/api/html/dir_7020d6dce82e12d16aa8699efbddfd6f.html @@ -0,0 +1,110 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/functor Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
functor Directory Reference
+
+
+ + + + + + +

+Files

file  gradient.hpp [code]
 
file  jacobian.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_743dc9209199ec051d800495bac400e6.html b/doc/api/html/dir_743dc9209199ec051d800495bac400e6.html new file mode 100644 index 00000000000..bbe24e6ba8e --- /dev/null +++ b/doc/api/html/dir_743dc9209199ec051d800495bac400e6.html @@ -0,0 +1,110 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/functor Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
functor Directory Reference
+
+
+ + + + + + +

+Files

file  finite_diff_gradient.hpp [code]
 
file  finite_diff_hessian.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_799a9c0aad7d4ebf708e2eb7039efaab.html b/doc/api/html/dir_799a9c0aad7d4ebf708e2eb7039efaab.html new file mode 100644 index 00000000000..00582d82483 --- /dev/null +++ b/doc/api/html/dir_799a9c0aad7d4ebf708e2eb7039efaab.html @@ -0,0 +1,108 @@ + + + + + + +Stan Math Library: stan/math/mix/mat/fun Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
fun Directory Reference
+
+
+ + + + +

+Files

file  typedefs.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_7d7f4100b56de2553c5b686e97e2b25a.html b/doc/api/html/dir_7d7f4100b56de2553c5b686e97e2b25a.html new file mode 100644 index 00000000000..d54d09d3bf0 --- /dev/null +++ b/doc/api/html/dir_7d7f4100b56de2553c5b686e97e2b25a.html @@ -0,0 +1,110 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/meta Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
meta Directory Reference
+
+
+ + + + + + +

+Files

file  is_fvar.hpp [code]
 
file  partials_type.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_81fe1b6a702402bcbe6f5ecda25eb5ba.html b/doc/api/html/dir_81fe1b6a702402bcbe6f5ecda25eb5ba.html new file mode 100644 index 00000000000..631ce60e643 --- /dev/null +++ b/doc/api/html/dir_81fe1b6a702402bcbe6f5ecda25eb5ba.html @@ -0,0 +1,216 @@ + + + + + + +Stan Math Library: stan/math/rev/core Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
core Directory Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Files

file  autodiffstackstorage.hpp [code]
 
file  chainable.hpp [code]
 
file  chainable_alloc.hpp [code]
 
file  chainablestack.hpp [code]
 
file  ddv_vari.hpp [code]
 
file  dv_vari.hpp [code]
 
file  dvd_vari.hpp [code]
 
file  dvv_vari.hpp [code]
 
file  empty_nested.hpp [code]
 
file  gevv_vvv_vari.hpp [code]
 
file  grad.hpp [code]
 
file  matrix_vari.hpp [code]
 
file  nested_size.hpp [code]
 
file  operator_addition.hpp [code]
 
file  operator_divide_equal.hpp [code]
 
file  operator_division.hpp [code]
 
file  operator_equal.hpp [code]
 
file  operator_greater_than.hpp [code]
 
file  operator_greater_than_or_equal.hpp [code]
 
file  operator_less_than.hpp [code]
 
file  operator_less_than_or_equal.hpp [code]
 
file  operator_minus_equal.hpp [code]
 
file  operator_multiplication.hpp [code]
 
file  operator_multiply_equal.hpp [code]
 
file  operator_not_equal.hpp [code]
 
file  operator_plus_equal.hpp [code]
 
file  operator_subtraction.hpp [code]
 
file  operator_unary_decrement.hpp [code]
 
file  operator_unary_increment.hpp [code]
 
file  operator_unary_negative.hpp [code]
 
file  operator_unary_not.hpp [code]
 
file  operator_unary_plus.hpp [code]
 
file  precomp_v_vari.hpp [code]
 
file  precomp_vv_vari.hpp [code]
 
file  precomp_vvv_vari.hpp [code]
 
file  precomputed_gradients.hpp [code]
 
file  print_stack.hpp [code]
 
file  recover_memory.hpp [code]
 
file  recover_memory_nested.hpp [code]
 
file  set_zero_all_adjoints.hpp [code]
 
file  start_nested.hpp [code]
 
file  std_isinf.hpp [code]
 
file  std_isnan.hpp [code]
 
file  std_numeric_limits.hpp [code]
 
file  stored_gradient_vari.hpp [code]
 
file  v_vari.hpp [code]
 
file  var.hpp [code]
 
file  vari.hpp [code]
 
file  vd_vari.hpp [code]
 
file  vdd_vari.hpp [code]
 
file  vdv_vari.hpp [code]
 
file  vector_vari.hpp [code]
 
file  vv_vari.hpp [code]
 
file  vvd_vari.hpp [code]
 
file  vvv_vari.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_82934b92194f26ae20dadb4d4c124bbd.html b/doc/api/html/dir_82934b92194f26ae20dadb4d4c124bbd.html new file mode 100644 index 00000000000..7d1cb2ba6ac --- /dev/null +++ b/doc/api/html/dir_82934b92194f26ae20dadb4d4c124bbd.html @@ -0,0 +1,110 @@ + + + + + + +Stan Math Library: stan/math/mix/mat Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
mat Directory Reference
+
+
+ + + + + + +

+Directories

directory  fun
 
directory  functor
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_82be3cdab97da867fca677e38ff05410.html b/doc/api/html/dir_82be3cdab97da867fca677e38ff05410.html new file mode 100644 index 00000000000..2364feca89a --- /dev/null +++ b/doc/api/html/dir_82be3cdab97da867fca677e38ff05410.html @@ -0,0 +1,108 @@ + + + + + + +Stan Math Library: stan/math/rev/arr/functor Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
functor Directory Reference
+
+
+ + + + +

+Files

file  coupled_ode_system.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_8556235f6230370109c543504fb4ecb1.html b/doc/api/html/dir_8556235f6230370109c543504fb4ecb1.html new file mode 100644 index 00000000000..251a9f4a5d3 --- /dev/null +++ b/doc/api/html/dir_8556235f6230370109c543504fb4ecb1.html @@ -0,0 +1,266 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
fun Directory Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Files

file  abs.hpp [code]
 
file  acos.hpp [code]
 
file  acosh.hpp [code]
 
file  asin.hpp [code]
 
file  asinh.hpp [code]
 
file  atan.hpp [code]
 
file  atan2.hpp [code]
 
file  atanh.hpp [code]
 
file  bessel_first_kind.hpp [code]
 
file  bessel_second_kind.hpp [code]
 
file  binary_log_loss.hpp [code]
 
file  binomial_coefficient_log.hpp [code]
 
file  cbrt.hpp [code]
 
file  ceil.hpp [code]
 
file  cos.hpp [code]
 
file  cosh.hpp [code]
 
file  digamma.hpp [code]
 
file  erf.hpp [code]
 
file  erfc.hpp [code]
 
file  exp.hpp [code]
 
file  exp2.hpp [code]
 
file  expm1.hpp [code]
 
file  fabs.hpp [code]
 
file  falling_factorial.hpp [code]
 
file  fdim.hpp [code]
 
file  floor.hpp [code]
 
file  fma.hpp [code]
 
file  fmax.hpp [code]
 
file  fmin.hpp [code]
 
file  fmod.hpp [code]
 
file  gamma_p.hpp [code]
 
file  gamma_q.hpp [code]
 
file  grad_inc_beta.hpp [code]
 
file  hypot.hpp [code]
 
file  inc_beta.hpp [code]
 
file  inv.hpp [code]
 
file  inv_cloglog.hpp [code]
 
file  inv_logit.hpp [code]
 
file  inv_Phi.hpp [code]
 
file  inv_sqrt.hpp [code]
 
file  inv_square.hpp [code]
 
file  is_inf.hpp [code]
 
file  is_nan.hpp [code]
 
file  lbeta.hpp [code]
 
file  lgamma.hpp [code]
 
file  lmgamma.hpp [code]
 
file  log.hpp [code]
 
file  log10.hpp [code]
 
file  log1m.hpp [code]
 
file  log1m_exp.hpp [code]
 
file  log1m_inv_logit.hpp [code]
 
file  log1p.hpp [code]
 
file  log1p_exp.hpp [code]
 
file  log2.hpp [code]
 
file  log_diff_exp.hpp [code]
 
file  log_falling_factorial.hpp [code]
 
file  log_inv_logit.hpp [code]
 
file  log_mix.hpp [code]
 
file  log_rising_factorial.hpp [code]
 
file  log_sum_exp.hpp [code]
 
file  logit.hpp [code]
 
file  modified_bessel_first_kind.hpp [code]
 
file  modified_bessel_second_kind.hpp [code]
 
file  multiply_log.hpp [code]
 
file  owens_t.hpp [code]
 
file  Phi.hpp [code]
 
file  pow.hpp [code]
 
file  primitive_value.hpp [code]
 
file  rising_factorial.hpp [code]
 
file  round.hpp [code]
 
file  sin.hpp [code]
 
file  sinh.hpp [code]
 
file  sqrt.hpp [code]
 
file  square.hpp [code]
 
file  tan.hpp [code]
 
file  tanh.hpp [code]
 
file  tgamma.hpp [code]
 
file  trunc.hpp [code]
 
file  value_of.hpp [code]
 
file  value_of_rec.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_891b99f71c153bb46cf7117b6e9a16c0.html b/doc/api/html/dir_891b99f71c153bb46cf7117b6e9a16c0.html new file mode 100644 index 00000000000..150d57cf1ba --- /dev/null +++ b/doc/api/html/dir_891b99f71c153bb46cf7117b6e9a16c0.html @@ -0,0 +1,119 @@ + + + + + + +Stan Math Library: stan/math/fwd Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
fwd Directory Reference
+
+
+ + + + + + + + + + +

+Directories

directory  arr
 
directory  core
 
directory  mat
 
directory  scal
 
+ + + +

+Files

file  core.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_8f020a45171d0929a3f18f333461ed30.html b/doc/api/html/dir_8f020a45171d0929a3f18f333461ed30.html new file mode 100644 index 00000000000..ad9627d9d09 --- /dev/null +++ b/doc/api/html/dir_8f020a45171d0929a3f18f333461ed30.html @@ -0,0 +1,164 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
prob Directory Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Files

file  categorical_log.hpp [code]
 
file  categorical_logit_log.hpp [code]
 
file  categorical_rng.hpp [code]
 
file  dirichlet_log.hpp [code]
 
file  dirichlet_rng.hpp [code]
 
file  gaussian_dlm_obs_log.hpp [code]
 
file  inv_wishart_log.hpp [code]
 
file  inv_wishart_rng.hpp [code]
 
file  lkj_corr_cholesky_log.hpp [code]
 
file  lkj_corr_cholesky_rng.hpp [code]
 
file  lkj_corr_log.hpp [code]
 
file  lkj_corr_rng.hpp [code]
 
file  lkj_cov_log.hpp [code]
 
file  matrix_normal_prec_log.hpp [code]
 
file  multi_gp_cholesky_log.hpp [code]
 
file  multi_gp_log.hpp [code]
 
file  multi_normal_cholesky_log.hpp [code]
 
file  multi_normal_cholesky_rng.hpp [code]
 
file  multi_normal_log.hpp [code]
 
file  multi_normal_prec_log.hpp [code]
 
file  multi_normal_rng.hpp [code]
 
file  multi_student_t_log.hpp [code]
 
file  multi_student_t_rng.hpp [code]
 
file  multinomial_log.hpp [code]
 
file  multinomial_rng.hpp [code]
 
file  ordered_logistic_log.hpp [code]
 
file  ordered_logistic_rng.hpp [code]
 
file  wishart_log.hpp [code]
 
file  wishart_rng.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_9ec950271af1cddf056bfa055aaed7a2.html b/doc/api/html/dir_9ec950271af1cddf056bfa055aaed7a2.html new file mode 100644 index 00000000000..88154982158 --- /dev/null +++ b/doc/api/html/dir_9ec950271af1cddf056bfa055aaed7a2.html @@ -0,0 +1,170 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
meta Directory Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Files

file  child_type.hpp [code]
 
file  container_view.hpp [code]
 
file  contains_fvar.hpp [code]
 
file  contains_nonconstant_struct.hpp [code]
 
file  contains_vector.hpp [code]
 
file  error_index.hpp [code]
 
file  get.hpp [code]
 
file  include_summand.hpp [code]
 
file  index_type.hpp [code]
 
file  is_constant.hpp [code]
 
file  is_constant_struct.hpp [code]
 
file  is_fvar.hpp [code]
 
file  is_var.hpp [code]
 
file  is_var_or_arithmetic.hpp [code]
 
file  is_vector.hpp [code]
 
 
file  length.hpp [code]
 
file  length_mvt.hpp [code]
 
file  likely.hpp [code]
 
file  max_size.hpp [code]
 
file  max_size_mvt.hpp [code]
 
file  OperandsAndPartials.hpp [code]
 
file  partials_return_type.hpp [code]
 
file  partials_type.hpp [code]
 
file  return_type.hpp [code]
 
file  scalar_type.hpp [code]
 
file  scalar_type_pre.hpp [code]
 
file  size_of.hpp [code]
 
file  value_type.hpp [code]
 
file  VectorBuilder.hpp [code]
 
file  VectorView.hpp [code]
 
file  VectorViewMvt.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_a5746600e54a6139e3848ab2bae00bf9.html b/doc/api/html/dir_a5746600e54a6139e3848ab2bae00bf9.html new file mode 100644 index 00000000000..778a77c74ec --- /dev/null +++ b/doc/api/html/dir_a5746600e54a6139e3848ab2bae00bf9.html @@ -0,0 +1,408 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
prob Directory Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Files

file  bernoulli_ccdf_log.hpp [code]
 
file  bernoulli_cdf.hpp [code]
 
file  bernoulli_cdf_log.hpp [code]
 
file  bernoulli_log.hpp [code]
 
file  bernoulli_logit_log.hpp [code]
 
file  bernoulli_rng.hpp [code]
 
file  beta_binomial_ccdf_log.hpp [code]
 
file  beta_binomial_cdf.hpp [code]
 
file  beta_binomial_cdf_log.hpp [code]
 
file  beta_binomial_log.hpp [code]
 
file  beta_binomial_rng.hpp [code]
 
file  beta_ccdf_log.hpp [code]
 
file  beta_cdf.hpp [code]
 
file  beta_cdf_log.hpp [code]
 
file  beta_log.hpp [code]
 
file  beta_rng.hpp [code]
 
file  binomial_ccdf_log.hpp [code]
 
file  binomial_cdf.hpp [code]
 
file  binomial_cdf_log.hpp [code]
 
file  binomial_log.hpp [code]
 
file  binomial_logit_log.hpp [code]
 
file  binomial_rng.hpp [code]
 
file  cauchy_ccdf_log.hpp [code]
 
file  cauchy_cdf.hpp [code]
 
file  cauchy_cdf_log.hpp [code]
 
file  cauchy_log.hpp [code]
 
file  cauchy_rng.hpp [code]
 
file  chi_square_ccdf_log.hpp [code]
 
file  chi_square_cdf.hpp [code]
 
file  chi_square_cdf_log.hpp [code]
 
file  chi_square_log.hpp [code]
 
file  chi_square_rng.hpp [code]
 
file  double_exponential_ccdf_log.hpp [code]
 
file  double_exponential_cdf.hpp [code]
 
file  double_exponential_cdf_log.hpp [code]
 
file  double_exponential_log.hpp [code]
 
file  double_exponential_rng.hpp [code]
 
file  exp_mod_normal_ccdf_log.hpp [code]
 
file  exp_mod_normal_cdf.hpp [code]
 
file  exp_mod_normal_cdf_log.hpp [code]
 
file  exp_mod_normal_log.hpp [code]
 
file  exp_mod_normal_rng.hpp [code]
 
file  exponential_ccdf_log.hpp [code]
 
file  exponential_cdf.hpp [code]
 
file  exponential_cdf_log.hpp [code]
 
file  exponential_log.hpp [code]
 
file  exponential_rng.hpp [code]
 
file  frechet_ccdf_log.hpp [code]
 
file  frechet_cdf.hpp [code]
 
file  frechet_cdf_log.hpp [code]
 
file  frechet_log.hpp [code]
 
file  frechet_rng.hpp [code]
 
file  gamma_ccdf_log.hpp [code]
 
file  gamma_cdf.hpp [code]
 
file  gamma_cdf_log.hpp [code]
 
file  gamma_log.hpp [code]
 
file  gamma_rng.hpp [code]
 
file  gumbel_ccdf_log.hpp [code]
 
file  gumbel_cdf.hpp [code]
 
file  gumbel_cdf_log.hpp [code]
 
file  gumbel_log.hpp [code]
 
file  gumbel_rng.hpp [code]
 
file  hypergeometric_log.hpp [code]
 
file  hypergeometric_rng.hpp [code]
 
file  inv_chi_square_ccdf_log.hpp [code]
 
file  inv_chi_square_cdf.hpp [code]
 
file  inv_chi_square_cdf_log.hpp [code]
 
file  inv_chi_square_log.hpp [code]
 
file  inv_chi_square_rng.hpp [code]
 
file  inv_gamma_ccdf_log.hpp [code]
 
file  inv_gamma_cdf.hpp [code]
 
file  inv_gamma_cdf_log.hpp [code]
 
file  inv_gamma_log.hpp [code]
 
file  inv_gamma_rng.hpp [code]
 
file  logistic_ccdf_log.hpp [code]
 
file  logistic_cdf.hpp [code]
 
file  logistic_cdf_log.hpp [code]
 
file  logistic_log.hpp [code]
 
file  logistic_rng.hpp [code]
 
file  lognormal_ccdf_log.hpp [code]
 
file  lognormal_cdf.hpp [code]
 
file  lognormal_cdf_log.hpp [code]
 
file  lognormal_log.hpp [code]
 
file  lognormal_rng.hpp [code]
 
file  neg_binomial_2_ccdf_log.hpp [code]
 
file  neg_binomial_2_cdf.hpp [code]
 
file  neg_binomial_2_cdf_log.hpp [code]
 
file  neg_binomial_2_log.hpp [code]
 
file  neg_binomial_2_log_log.hpp [code]
 
file  neg_binomial_2_log_rng.hpp [code]
 
file  neg_binomial_2_rng.hpp [code]
 
file  neg_binomial_ccdf_log.hpp [code]
 
file  neg_binomial_cdf.hpp [code]
 
file  neg_binomial_cdf_log.hpp [code]
 
file  neg_binomial_log.hpp [code]
 
file  neg_binomial_rng.hpp [code]
 
file  normal_ccdf_log.hpp [code]
 
file  normal_cdf.hpp [code]
 
file  normal_cdf_log.hpp [code]
 
file  normal_log.hpp [code]
 
file  normal_rng.hpp [code]
 
file  pareto_ccdf_log.hpp [code]
 
file  pareto_cdf.hpp [code]
 
file  pareto_cdf_log.hpp [code]
 
file  pareto_log.hpp [code]
 
file  pareto_rng.hpp [code]
 
file  pareto_type_2_ccdf_log.hpp [code]
 
file  pareto_type_2_cdf.hpp [code]
 
file  pareto_type_2_cdf_log.hpp [code]
 
file  pareto_type_2_log.hpp [code]
 
file  pareto_type_2_rng.hpp [code]
 
file  poisson_ccdf_log.hpp [code]
 
file  poisson_cdf.hpp [code]
 
file  poisson_cdf_log.hpp [code]
 
file  poisson_log.hpp [code]
 
file  poisson_log_log.hpp [code]
 
file  poisson_log_rng.hpp [code]
 
file  poisson_rng.hpp [code]
 
file  rayleigh_ccdf_log.hpp [code]
 
file  rayleigh_cdf.hpp [code]
 
file  rayleigh_cdf_log.hpp [code]
 
file  rayleigh_log.hpp [code]
 
file  rayleigh_rng.hpp [code]
 
file  scaled_inv_chi_square_ccdf_log.hpp [code]
 
file  scaled_inv_chi_square_cdf.hpp [code]
 
file  scaled_inv_chi_square_cdf_log.hpp [code]
 
file  scaled_inv_chi_square_log.hpp [code]
 
file  scaled_inv_chi_square_rng.hpp [code]
 
file  skew_normal_ccdf_log.hpp [code]
 
file  skew_normal_cdf.hpp [code]
 
file  skew_normal_cdf_log.hpp [code]
 
file  skew_normal_log.hpp [code]
 
file  skew_normal_rng.hpp [code]
 
file  student_t_ccdf_log.hpp [code]
 
file  student_t_cdf.hpp [code]
 
file  student_t_cdf_log.hpp [code]
 
file  student_t_log.hpp [code]
 
file  student_t_rng.hpp [code]
 
file  uniform_ccdf_log.hpp [code]
 
file  uniform_cdf.hpp [code]
 
file  uniform_cdf_log.hpp [code]
 
file  uniform_log.hpp [code]
 
file  uniform_rng.hpp [code]
 
file  von_mises_log.hpp [code]
 
file  von_mises_rng.hpp [code]
 
file  weibull_ccdf_log.hpp [code]
 
file  weibull_cdf.hpp [code]
 
file  weibull_cdf_log.hpp [code]
 
file  weibull_log.hpp [code]
 
file  weibull_rng.hpp [code]
 
file  wiener_log.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_a6b1250f073d86cba6f454ffcb875238.html b/doc/api/html/dir_a6b1250f073d86cba6f454ffcb875238.html new file mode 100644 index 00000000000..e8a67125597 --- /dev/null +++ b/doc/api/html/dir_a6b1250f073d86cba6f454ffcb875238.html @@ -0,0 +1,116 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/meta Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
meta Directory Reference
+
+
+ + + + + + + + + + + + +

+Files

file  container_view.hpp [code]
 
file  get.hpp [code]
 
file  index_type.hpp [code]
 
file  is_vector.hpp [code]
 
file  length.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_a8d8e59947adb18b6db2afc7a0c714ad.html b/doc/api/html/dir_a8d8e59947adb18b6db2afc7a0c714ad.html new file mode 100644 index 00000000000..aab7c8bf5fe --- /dev/null +++ b/doc/api/html/dir_a8d8e59947adb18b6db2afc7a0c714ad.html @@ -0,0 +1,190 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
fun Directory Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Files

file  cholesky_decompose.hpp [code]
 
file  columns_dot_product.hpp [code]
 
file  columns_dot_self.hpp [code]
 
file  crossprod.hpp [code]
 
file  determinant.hpp [code]
 
file  divide.hpp [code]
 
file  dot_product.hpp [code]
 
file  dot_self.hpp [code]
 
file  Eigen_NumTraits.hpp [code]
 
file  grad.hpp [code]
 
file  initialize_variable.hpp [code]
 
file  LDLT_alloc.hpp [code]
 
file  LDLT_factor.hpp [code]
 
file  log_determinant.hpp [code]
 
file  log_determinant_ldlt.hpp [code]
 
file  log_determinant_spd.hpp [code]
 
file  log_softmax.hpp [code]
 
file  log_sum_exp.hpp [code]
 
file  mdivide_left.hpp [code]
 
file  mdivide_left_ldlt.hpp [code]
 
file  mdivide_left_spd.hpp [code]
 
file  mdivide_left_tri.hpp [code]
 
file  multiply.hpp [code]
 
file  multiply_lower_tri_self_transpose.hpp [code]
 
file  quad_form.hpp [code]
 
file  quad_form_sym.hpp [code]
 
file  rows_dot_product.hpp [code]
 
file  sd.hpp [code]
 
file  softmax.hpp [code]
 
file  sort_asc.hpp [code]
 
file  sort_desc.hpp [code]
 
file  squared_distance.hpp [code]
 
file  stan_print.hpp [code]
 
file  sum.hpp [code]
 
file  tcrossprod.hpp [code]
 
file  to_var.hpp [code]
 
file  trace_gen_inv_quad_form_ldlt.hpp [code]
 
file  trace_gen_quad_form.hpp [code]
 
file  trace_inv_quad_form_ldlt.hpp [code]
 
file  trace_quad_form.hpp [code]
 
file  typedefs.hpp [code]
 
file  variance.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_bb883dc0903982929c556428551f0258.html b/doc/api/html/dir_bb883dc0903982929c556428551f0258.html new file mode 100644 index 00000000000..089aada5b28 --- /dev/null +++ b/doc/api/html/dir_bb883dc0903982929c556428551f0258.html @@ -0,0 +1,122 @@ + + + + + + +Stan Math Library: stan/math/mix/mat/functor Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
functor Directory Reference
+
+
+ + + + + + + + + + + + + + + + + + +

+Files

file  derivative.hpp [code]
 
file  finite_diff_grad_hessian.hpp [code]
 
file  grad_hessian.hpp [code]
 
file  grad_tr_mat_times_hessian.hpp [code]
 
file  gradient_dot_vector.hpp [code]
 
file  hessian.hpp [code]
 
file  hessian_times_vector.hpp [code]
 
file  partial_derivative.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_be763dce0a16e40971b9a97563101a95.html b/doc/api/html/dir_be763dce0a16e40971b9a97563101a95.html new file mode 100644 index 00000000000..dc1975b7ed4 --- /dev/null +++ b/doc/api/html/dir_be763dce0a16e40971b9a97563101a95.html @@ -0,0 +1,110 @@ + + + + + + +Stan Math Library: stan/math/fwd/arr/fun Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
fun Directory Reference
+
+
+ + + + + + +

+Files

file  log_sum_exp.hpp [code]
 
file  sum.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_bf6b47bcef41e63aee7f2d3992c7c098.html b/doc/api/html/dir_bf6b47bcef41e63aee7f2d3992c7c098.html new file mode 100644 index 00000000000..728efd4d4d1 --- /dev/null +++ b/doc/api/html/dir_bf6b47bcef41e63aee7f2d3992c7c098.html @@ -0,0 +1,122 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/fun Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
fun Directory Reference
+
+
+ + + + + + + + + + + + + + + + + + +

+Files

file  dist.hpp [code]
 
file  dot.hpp [code]
 
file  dot_self.hpp [code]
 
file  log_sum_exp.hpp [code]
 
file  rep_array.hpp [code]
 
file  scaled_add.hpp [code]
 
file  sub.hpp [code]
 
file  sum.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_bffcb08b87b110cc77a7c00bbae4eda8.html b/doc/api/html/dir_bffcb08b87b110cc77a7c00bbae4eda8.html new file mode 100644 index 00000000000..98144d47370 --- /dev/null +++ b/doc/api/html/dir_bffcb08b87b110cc77a7c00bbae4eda8.html @@ -0,0 +1,119 @@ + + + + + + +Stan Math Library: stan/math/rev Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
rev Directory Reference
+
+
+ + + + + + + + + + +

+Directories

directory  arr
 
directory  core
 
directory  mat
 
directory  scal
 
+ + + +

+Files

file  core.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_c12f2883c22626af8d1d27f63bd1f6c6.html b/doc/api/html/dir_c12f2883c22626af8d1d27f63bd1f6c6.html new file mode 100644 index 00000000000..b2b6ef5a459 --- /dev/null +++ b/doc/api/html/dir_c12f2883c22626af8d1d27f63bd1f6c6.html @@ -0,0 +1,110 @@ + + + + + + +Stan Math Library: stan/math/rev/arr/fun Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
fun Directory Reference
+
+
+ + + + + + +

+Files

file  log_sum_exp.hpp [code]
 
file  sum.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_c4a9b5014dab4963a2c9a69f60759e2b.html b/doc/api/html/dir_c4a9b5014dab4963a2c9a69f60759e2b.html new file mode 100644 index 00000000000..4c533d24c1c --- /dev/null +++ b/doc/api/html/dir_c4a9b5014dab4963a2c9a69f60759e2b.html @@ -0,0 +1,110 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
scal Directory Reference
+
+
+ + + + + + +

+Directories

directory  fun
 
directory  meta
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_c573dec0eb9ab693199c7f09a7e778ee.html b/doc/api/html/dir_c573dec0eb9ab693199c7f09a7e778ee.html new file mode 100644 index 00000000000..28823f05a18 --- /dev/null +++ b/doc/api/html/dir_c573dec0eb9ab693199c7f09a7e778ee.html @@ -0,0 +1,112 @@ + + + + + + +Stan Math Library: stan/math/prim/arr Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
arr Directory Reference
+
+
+ + + + + + + + +

+Directories

directory  fun
 
directory  functor
 
directory  meta
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_cd91bf94114b93166baa07a51184242d.html b/doc/api/html/dir_cd91bf94114b93166baa07a51184242d.html new file mode 100644 index 00000000000..199505c4371 --- /dev/null +++ b/doc/api/html/dir_cd91bf94114b93166baa07a51184242d.html @@ -0,0 +1,172 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
fun Directory Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Files

file  columns_dot_product.hpp [code]
 
file  columns_dot_self.hpp [code]
 
file  crossprod.hpp [code]
 
file  determinant.hpp [code]
 
file  divide.hpp [code]
 
file  dot_product.hpp [code]
 
file  dot_self.hpp [code]
 
file  Eigen_NumTraits.hpp [code]
 
file  inverse.hpp [code]
 
file  log_determinant.hpp [code]
 
file  log_softmax.hpp [code]
 
file  log_sum_exp.hpp [code]
 
file  mdivide_left.hpp [code]
 
file  mdivide_left_ldlt.hpp [code]
 
file  mdivide_left_tri_low.hpp [code]
 
file  mdivide_right.hpp [code]
 
file  mdivide_right_tri_low.hpp [code]
 
file  multiply.hpp [code]
 
file  multiply_lower_tri_self_transpose.hpp [code]
 
file  qr_Q.hpp [code]
 
file  qr_R.hpp [code]
 
file  quad_form_sym.hpp [code]
 
file  rows_dot_product.hpp [code]
 
file  rows_dot_self.hpp [code]
 
file  softmax.hpp [code]
 
file  sort_asc.hpp [code]
 
file  sort_desc.hpp [code]
 
file  sum.hpp [code]
 
file  tcrossprod.hpp [code]
 
file  to_fvar.hpp [code]
 
file  trace_gen_quad_form.hpp [code]
 
file  trace_quad_form.hpp [code]
 
file  typedefs.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_cdd3f4f1b37d2b043170244117af2e90.html b/doc/api/html/dir_cdd3f4f1b37d2b043170244117af2e90.html new file mode 100644 index 00000000000..864d199128d --- /dev/null +++ b/doc/api/html/dir_cdd3f4f1b37d2b043170244117af2e90.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
err Directory Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Files

file  check_bounded.hpp [code]
 
file  check_consistent_size.hpp [code]
 
file  check_consistent_sizes.hpp [code]
 
file  check_equal.hpp [code]
 
file  check_finite.hpp [code]
 
file  check_greater.hpp [code]
 
file  check_greater_or_equal.hpp [code]
 
file  check_less.hpp [code]
 
file  check_less_or_equal.hpp [code]
 
file  check_nonnegative.hpp [code]
 
file  check_nonzero_size.hpp [code]
 
file  check_not_nan.hpp [code]
 
file  check_positive.hpp [code]
 
file  check_positive_finite.hpp [code]
 
file  check_positive_size.hpp [code]
 
file  check_size_match.hpp [code]
 
file  domain_error.hpp [code]
 
file  domain_error_vec.hpp [code]
 
file  invalid_argument.hpp [code]
 
file  invalid_argument_vec.hpp [code]
 
file  out_of_range.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_d0eeba40b2c7a8671625898b9437b305.html b/doc/api/html/dir_d0eeba40b2c7a8671625898b9437b305.html new file mode 100644 index 00000000000..5258be024f3 --- /dev/null +++ b/doc/api/html/dir_d0eeba40b2c7a8671625898b9437b305.html @@ -0,0 +1,292 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
fun Directory Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Files

file  abs.hpp [code]
 
file  as_bool.hpp [code]
 
file  bessel_first_kind.hpp [code]
 
file  bessel_second_kind.hpp [code]
 
file  binary_log_loss.hpp [code]
 
file  binomial_coefficient_log.hpp [code]
 
file  constants.hpp [code]
 
file  corr_constrain.hpp [code]
 
file  corr_free.hpp [code]
 
file  digamma.hpp [code]
 
file  divide.hpp [code]
 
file  exp2.hpp [code]
 
file  F32.hpp [code]
 
file  falling_factorial.hpp [code]
 
file  fdim.hpp [code]
 
file  gamma_p.hpp [code]
 
file  gamma_q.hpp [code]
 
file  grad_2F1.hpp [code]
 
file  grad_F32.hpp [code]
 
file  grad_inc_beta.hpp [code]
 
file  grad_reg_inc_beta.hpp [code]
 
file  grad_reg_inc_gamma.hpp [code]
 
file  ibeta.hpp [code]
 
file  identity_constrain.hpp [code]
 
file  identity_free.hpp [code]
 
file  if_else.hpp [code]
 
file  inc_beta.hpp [code]
 
file  inc_beta_dda.hpp [code]
 
file  inc_beta_ddb.hpp [code]
 
file  inc_beta_ddz.hpp [code]
 
file  int_step.hpp [code]
 
file  inv.hpp [code]
 
file  inv_cloglog.hpp [code]
 
file  inv_logit.hpp [code]
 
file  inv_Phi.hpp [code]
 
file  inv_sqrt.hpp [code]
 
file  inv_square.hpp [code]
 
file  inverse_softmax.hpp [code]
 
file  is_inf.hpp [code]
 
file  is_nan.hpp [code]
 
file  is_uninitialized.hpp [code]
 
file  lb_constrain.hpp [code]
 
file  lb_free.hpp [code]
 
file  lbeta.hpp [code]
 
file  lgamma.hpp [code]
 
file  lmgamma.hpp [code]
 
file  log1m.hpp [code]
 
file  log1m_exp.hpp [code]
 
file  log1m_inv_logit.hpp [code]
 
file  log1p.hpp [code]
 
file  log1p_exp.hpp [code]
 
file  log2.hpp [code]
 
file  log_diff_exp.hpp [code]
 
file  log_falling_factorial.hpp [code]
 
file  log_inv_logit.hpp [code]
 
file  log_mix.hpp [code]
 
file  log_rising_factorial.hpp [code]
 
file  log_sum_exp.hpp [code]
 
file  logical_and.hpp [code]
 
file  logical_eq.hpp [code]
 
file  logical_gt.hpp [code]
 
file  logical_gte.hpp [code]
 
file  logical_lt.hpp [code]
 
file  logical_lte.hpp [code]
 
file  logical_negation.hpp [code]
 
file  logical_neq.hpp [code]
 
file  logical_or.hpp [code]
 
file  logit.hpp [code]
 
file  lub_constrain.hpp [code]
 
file  lub_free.hpp [code]
 
file  modified_bessel_first_kind.hpp [code]
 
file  modified_bessel_second_kind.hpp [code]
 
file  modulus.hpp [code]
 
file  multiply_log.hpp [code]
 
file  owens_t.hpp [code]
 
file  Phi.hpp [code]
 
file  Phi_approx.hpp [code]
 
file  positive_constrain.hpp [code]
 
file  positive_free.hpp [code]
 
file  primitive_value.hpp [code]
 
file  prob_constrain.hpp [code]
 
file  prob_free.hpp [code]
 
file  promote_scalar.hpp [code]
 
file  promote_scalar_type.hpp [code]
 
file  rising_factorial.hpp [code]
 
file  sign.hpp [code]
 
file  square.hpp [code]
 
file  step.hpp [code]
 
file  trigamma.hpp [code]
 
file  ub_constrain.hpp [code]
 
file  ub_free.hpp [code]
 
file  value_of.hpp [code]
 
file  value_of_rec.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_db363a718912ec2005360e40fa2f7ce3.html b/doc/api/html/dir_db363a718912ec2005360e40fa2f7ce3.html new file mode 100644 index 00000000000..941cc74d4f9 --- /dev/null +++ b/doc/api/html/dir_db363a718912ec2005360e40fa2f7ce3.html @@ -0,0 +1,156 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
err Directory Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Files

file  check_cholesky_factor.hpp [code]
 
file  check_cholesky_factor_corr.hpp [code]
 
file  check_column_index.hpp [code]
 
file  check_corr_matrix.hpp [code]
 
file  check_cov_matrix.hpp [code]
 
file  check_ldlt_factor.hpp [code]
 
file  check_lower_triangular.hpp [code]
 
file  check_matching_dims.hpp [code]
 
file  check_matching_sizes.hpp [code]
 
file  check_multiplicable.hpp [code]
 
file  check_ordered.hpp [code]
 
file  check_pos_definite.hpp [code]
 
file  check_pos_semidefinite.hpp [code]
 
file  check_positive_ordered.hpp [code]
 
file  check_range.hpp [code]
 
file  check_row_index.hpp [code]
 
file  check_simplex.hpp [code]
 
file  check_spsd_matrix.hpp [code]
 
file  check_square.hpp [code]
 
file  check_std_vector_index.hpp [code]
 
file  check_symmetric.hpp [code]
 
file  check_unit_vector.hpp [code]
 
file  check_vector.hpp [code]
 
file  constraint_tolerance.hpp [code]
 
file  validate_non_negative_index.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_e5c5c73884f35f1a8b6aaf35aa89a18a.html b/doc/api/html/dir_e5c5c73884f35f1a8b6aaf35aa89a18a.html new file mode 100644 index 00000000000..b86188897c0 --- /dev/null +++ b/doc/api/html/dir_e5c5c73884f35f1a8b6aaf35aa89a18a.html @@ -0,0 +1,108 @@ + + + + + + +Stan Math Library: stan/math/memory Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
memory Directory Reference
+
+
+ + + + +

+Files

file  stack_alloc.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_e62873f54bf6d08bc8b340714288f60f.html b/doc/api/html/dir_e62873f54bf6d08bc8b340714288f60f.html new file mode 100644 index 00000000000..4950ca16812 --- /dev/null +++ b/doc/api/html/dir_e62873f54bf6d08bc8b340714288f60f.html @@ -0,0 +1,113 @@ + + + + + + +Stan Math Library: stan/math/mix Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
mix Directory Reference
+
+
+ + + + +

+Directories

directory  mat
 
+ + + +

+Files

file  arr.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dir_efcd2e41f112f3859788b485ea2ed7cf.html b/doc/api/html/dir_efcd2e41f112f3859788b485ea2ed7cf.html new file mode 100644 index 00000000000..4805d23d3c2 --- /dev/null +++ b/doc/api/html/dir_efcd2e41f112f3859788b485ea2ed7cf.html @@ -0,0 +1,113 @@ + + + + + + +Stan Math Library: stan Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
stan Directory Reference
+
+
+ + + + +

+Directories

directory  math
 
+ + + +

+Files

file  math.hpp [code]
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dirichlet__log_8hpp.html b/doc/api/html/dirichlet__log_8hpp.html new file mode 100644 index 00000000000..da9b53f55b0 --- /dev/null +++ b/doc/api/html/dirichlet__log_8hpp.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/dirichlet_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
dirichlet_log.hpp File Reference
+
+
+
#include <boost/math/special_functions/gamma.hpp>
+#include <boost/random/gamma_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/mat/err/check_simplex.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_positive.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

template<bool propto, typename T_prob , typename T_prior_sample_size >
boost::math::tools::promote_args
+< T_prob, T_prior_sample_size >
+::type 
stan::math::dirichlet_log (const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta, const Eigen::Matrix< T_prior_sample_size, Eigen::Dynamic, 1 > &alpha)
 The log of the Dirichlet density for the given theta and a vector of prior sample sizes, alpha. More...
 
template<typename T_prob , typename T_prior_sample_size >
boost::math::tools::promote_args
+< T_prob, T_prior_sample_size >
+::type 
stan::math::dirichlet_log (const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta, const Eigen::Matrix< T_prior_sample_size, Eigen::Dynamic, 1 > &alpha)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dirichlet__log_8hpp_source.html b/doc/api/html/dirichlet__log_8hpp_source.html new file mode 100644 index 00000000000..58e02a7013f --- /dev/null +++ b/doc/api/html/dirichlet__log_8hpp_source.html @@ -0,0 +1,182 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/dirichlet_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
dirichlet_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_DIRICHLET_LOG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_DIRICHLET_LOG_HPP
+
3 
+
4 #include <boost/math/special_functions/gamma.hpp>
+
5 #include <boost/random/gamma_distribution.hpp>
+
6 #include <boost/random/variate_generator.hpp>
+ + + + + + +
13 
+
14 namespace stan {
+
15 
+
16  namespace math {
+
17 
+
43  template <bool propto,
+
44  typename T_prob, typename T_prior_sample_size>
+
45  typename boost::math::tools::promote_args<T_prob, T_prior_sample_size>::type
+
46  dirichlet_log(const Eigen::Matrix<T_prob, Eigen::Dynamic, 1>& theta,
+
47  const Eigen::Matrix
+
48  <T_prior_sample_size, Eigen::Dynamic, 1>& alpha) {
+
49  static const char* function("stan::math::dirichlet_log");
+
50  using boost::math::lgamma;
+
51  using boost::math::tools::promote_args;
+ + + + +
56 
+
57  typename promote_args<T_prob, T_prior_sample_size>::type lp(0.0);
+
58  check_consistent_sizes(function,
+
59  "probabilities", theta,
+
60  "prior sample sizes", alpha);
+
61  check_positive(function, "prior sample sizes", alpha);
+
62  check_simplex(function, "probabilities", theta);
+
63 
+ +
65  lp += lgamma(alpha.sum());
+
66  for (int k = 0; k < alpha.rows(); ++k)
+
67  lp -= lgamma(alpha[k]);
+
68  }
+ +
70  for (int k = 0; k < theta.rows(); ++k)
+
71  lp += multiply_log(alpha[k]-1, theta[k]);
+
72  }
+
73  return lp;
+
74  }
+
75 
+
76  template <typename T_prob, typename T_prior_sample_size>
+
77  inline
+
78  typename boost::math::tools::promote_args<T_prob, T_prior_sample_size>::type
+
79  dirichlet_log(const Eigen::Matrix<T_prob, Eigen::Dynamic, 1>& theta,
+
80  const Eigen::Matrix
+
81  <T_prior_sample_size, Eigen::Dynamic, 1>& alpha) {
+
82  return dirichlet_log<false>(theta, alpha);
+
83  }
+
84  }
+
85 }
+
86 #endif
+ +
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
+ +
boost::math::tools::promote_args< T_prob, T_prior_sample_size >::type dirichlet_log(const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta, const Eigen::Matrix< T_prior_sample_size, Eigen::Dynamic, 1 > &alpha)
The log of the Dirichlet density for the given theta and a vector of prior sample sizes...
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ + +
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+
fvar< T > multiply_log(const fvar< T > &x1, const fvar< T > &x2)
+ +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
bool check_simplex(const char *function, const char *name, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)
Return true if the specified vector is simplex.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dirichlet__rng_8hpp.html b/doc/api/html/dirichlet__rng_8hpp.html new file mode 100644 index 00000000000..9f7f3eeb98c --- /dev/null +++ b/doc/api/html/dirichlet__rng_8hpp.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/dirichlet_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
dirichlet_rng.hpp File Reference
+
+
+
#include <boost/math/special_functions/gamma.hpp>
+#include <boost/random/gamma_distribution.hpp>
+#include <boost/random/uniform_real_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_positive.hpp>
+#include <stan/math/prim/mat/err/check_simplex.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/mat/fun/log_sum_exp.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<class RNG >
Eigen::VectorXd stan::math::dirichlet_rng (const Eigen::Matrix< double, Eigen::Dynamic, 1 > &alpha, RNG &rng)
 Return a draw from a Dirichlet distribution with specified parameters and pseudo-random number generator. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dirichlet__rng_8hpp_source.html b/doc/api/html/dirichlet__rng_8hpp_source.html new file mode 100644 index 00000000000..b30d16a852f --- /dev/null +++ b/doc/api/html/dirichlet__rng_8hpp_source.html @@ -0,0 +1,186 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/dirichlet_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
dirichlet_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_DIRICHLET_RNG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_DIRICHLET_RNG_HPP
+
3 
+
4 #include <boost/math/special_functions/gamma.hpp>
+
5 #include <boost/random/gamma_distribution.hpp>
+
6 #include <boost/random/uniform_real_distribution.hpp>
+
7 #include <boost/random/variate_generator.hpp>
+
8 
+ + + + + + + +
16 
+
17 #include <cmath>
+
18 
+
19 namespace stan {
+
20 
+
21  namespace math {
+
22 
+
44  template <class RNG>
+
45  inline Eigen::VectorXd
+
46  dirichlet_rng(const Eigen::Matrix<double, Eigen::Dynamic, 1>& alpha,
+
47  RNG& rng) {
+
48  using boost::variate_generator;
+
49  using boost::gamma_distribution;
+
50  using boost::random::uniform_real_distribution;
+
51  using Eigen::VectorXd;
+
52  using std::exp;
+
53  using std::log;
+
54 
+
55  // separate algorithm if any parameter is less than 1
+
56  if (alpha.minCoeff() < 1) {
+
57  variate_generator<RNG&, uniform_real_distribution<> >
+
58  uniform_rng(rng, uniform_real_distribution<>(0.0, 1.0));
+
59  VectorXd log_y(alpha.size());
+
60  for (int i = 0; i < alpha.size(); ++i) {
+
61  variate_generator<RNG&, gamma_distribution<> >
+
62  gamma_rng(rng, gamma_distribution<>(alpha(i) + 1, 1));
+
63  double log_u = log(uniform_rng());
+
64  log_y(i) = log(gamma_rng()) + log_u / alpha(i);
+
65  }
+
66  double log_sum_y = log_sum_exp(log_y);
+
67  VectorXd theta(alpha.size());
+
68  for (int i = 0; i < alpha.size(); ++i)
+
69  theta(i) = exp(log_y(i) - log_sum_y);
+
70  return theta;
+
71  }
+
72 
+
73  // standard normalized gamma algorithm
+
74  Eigen::VectorXd y(alpha.rows());
+
75  for (int i = 0; i < alpha.rows(); i++) {
+
76  variate_generator<RNG&, gamma_distribution<> >
+
77  gamma_rng(rng, gamma_distribution<>(alpha(i, 0), 1e-7));
+
78  y(i) = gamma_rng();
+
79  }
+
80  return y / y.sum();
+
81  }
+
82 
+
83  }
+
84 }
+
85 #endif
+ +
double gamma_rng(const double alpha, const double beta, RNG &rng)
Definition: gamma_rng.hpp:33
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
fvar< T > log_sum_exp(const std::vector< fvar< T > > &v)
Definition: log_sum_exp.hpp:14
+ + +
Eigen::VectorXd dirichlet_rng(const Eigen::Matrix< double, Eigen::Dynamic, 1 > &alpha, RNG &rng)
Return a draw from a Dirichlet distribution with specified parameters and pseudo-random number genera...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
double uniform_rng(const double alpha, const double beta, RNG &rng)
Definition: uniform_rng.hpp:22
+
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dist_8hpp.html b/doc/api/html/dist_8hpp.html new file mode 100644 index 00000000000..060b05141b1 --- /dev/null +++ b/doc/api/html/dist_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/fun/dist.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
dist.hpp File Reference
+
+
+
#include <vector>
+#include <cstddef>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + +

+Functions

double stan::math::dist (const std::vector< double > &x, const std::vector< double > &y)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dist_8hpp_source.html b/doc/api/html/dist_8hpp_source.html new file mode 100644 index 00000000000..f2baef8ebf1 --- /dev/null +++ b/doc/api/html/dist_8hpp_source.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/fun/dist.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
dist.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_ARR_FUN_DIST_HPP
+
2 #define STAN_MATH_PRIM_ARR_FUN_DIST_HPP
+
3 
+
4 #include <vector>
+
5 #include <cstddef>
+
6 #include <cmath>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  inline double dist(const std::vector<double>& x,
+
12  const std::vector<double>& y) {
+
13  using std::sqrt;
+
14  double result = 0;
+
15  for (size_t i = 0; i < x.size(); ++i) {
+
16  double diff = x[i] - y[i];
+
17  result += diff * diff;
+
18  }
+
19  return sqrt(result);
+
20  }
+
21 
+
22  }
+
23 }
+
24 
+
25 #endif
+
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
double dist(const std::vector< double > &x, const std::vector< double > &y)
Definition: dist.hpp:11
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/distance_8hpp.html b/doc/api/html/distance_8hpp.html new file mode 100644 index 00000000000..5ad46c0e615 --- /dev/null +++ b/doc/api/html/distance_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/distance.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
distance.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <boost/math/tools/promotion.hpp>
+#include <stan/math/prim/mat/fun/squared_distance.hpp>
+#include <stan/math/prim/mat/err/check_vector.hpp>
+#include <stan/math/prim/mat/err/check_matching_sizes.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T1 , int R1, int C1, typename T2 , int R2, int C2>
boost::math::tools::promote_args
+< T1, T2 >::type 
stan::math::distance (const Eigen::Matrix< T1, R1, C1 > &v1, const Eigen::Matrix< T2, R2, C2 > &v2)
 Returns the distance between the specified vectors. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/distance_8hpp_source.html b/doc/api/html/distance_8hpp_source.html new file mode 100644 index 00000000000..89034d60c05 --- /dev/null +++ b/doc/api/html/distance_8hpp_source.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/distance.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
distance.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_DISTANCE_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_DISTANCE_HPP
+
3 
+ +
5 
+
6 #include <boost/math/tools/promotion.hpp>
+ + + +
10 
+
11 namespace stan {
+
12  namespace math {
+
13 
+
23  template<typename T1, int R1, int C1, typename T2, int R2, int C2>
+
24  inline typename boost::math::tools::promote_args<T1, T2>::type
+
25  distance(const Eigen::Matrix<T1, R1, C1>& v1,
+
26  const Eigen::Matrix<T2, R2, C2>& v2) {
+
27  using std::sqrt;
+
28  stan::math::check_vector("distance", "v1", v1);
+
29  stan::math::check_vector("distance", "v2", v2);
+ +
31  "v1", v1,
+
32  "v2", v2);
+
33  return sqrt(squared_distance(v1, v2));
+
34  }
+
35  }
+
36 }
+
37 #endif
+
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
bool check_vector(const char *function, const char *name, const Eigen::Matrix< T, R, C > &x)
Return true if the matrix is either a row vector or column vector.
+
boost::math::tools::promote_args< T1, T2 >::type squared_distance(const Eigen::Matrix< T1, R1, C1 > &v1, const Eigen::Matrix< T2, R2, C2 > &v2)
Returns the squared distance between the specified vectors.
+ + +
bool check_matching_sizes(const char *function, const char *name1, const T_y1 &y1, const char *name2, const T_y2 &y2)
Return true if two structures at the same size.
+ + +
boost::math::tools::promote_args< T1, T2 >::type distance(const Eigen::Matrix< T1, R1, C1 > &v1, const Eigen::Matrix< T2, R2, C2 > &v2)
Returns the distance between the specified vectors.
Definition: distance.hpp:25
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/domain__error_8hpp.html b/doc/api/html/domain__error_8hpp.html new file mode 100644 index 00000000000..c03b71df18a --- /dev/null +++ b/doc/api/html/domain__error_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/domain_error.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
domain_error.hpp File Reference
+
+
+
#include <typeinfo>
+#include <string>
+#include <sstream>
+#include <stdexcept>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
void stan::math::domain_error (const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
 Throw a domain error with a consistently formatted message. More...
 
template<typename T >
void stan::math::domain_error (const char *function, const char *name, const T &y, const char *msg1)
 Throw a domain error with a consistently formatted message. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/domain__error_8hpp_source.html b/doc/api/html/domain__error_8hpp_source.html new file mode 100644 index 00000000000..a5adc3b492f --- /dev/null +++ b/doc/api/html/domain__error_8hpp_source.html @@ -0,0 +1,149 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/domain_error.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
domain_error.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_ERR_DOMAIN_ERROR_HPP
+
2 #define STAN_MATH_PRIM_SCAL_ERR_DOMAIN_ERROR_HPP
+
3 
+
4 #include <typeinfo>
+
5 #include <string>
+
6 #include <sstream>
+
7 #include <stdexcept>
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
31  template <typename T>
+
32  inline void domain_error(const char* function,
+
33  const char* name,
+
34  const T& y,
+
35  const char* msg1,
+
36  const char* msg2) {
+
37  std::ostringstream message;
+
38 
+
39  message << function << ": "
+
40  << name << " "
+
41  << msg1
+
42  << y
+
43  << msg2;
+
44 
+
45  throw std::domain_error(message.str());
+
46  }
+
47 
+
66  template <typename T>
+
67  inline void domain_error(const char* function,
+
68  const char* name,
+
69  const T& y,
+
70  const char* msg1) {
+
71  domain_error(function, name, y, msg1, "");
+
72  }
+
73 
+
74  }
+
75 }
+
76 #endif
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1)
Throw a domain error with a consistently formatted message.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/domain__error__vec_8hpp.html b/doc/api/html/domain__error__vec_8hpp.html new file mode 100644 index 00000000000..53b20503de9 --- /dev/null +++ b/doc/api/html/domain__error__vec_8hpp.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/domain_error_vec.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
domain_error_vec.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/domain_error.hpp>
+#include <stan/math/prim/scal/meta/value_type.hpp>
+#include <stan/math/prim/scal/meta/error_index.hpp>
+#include <stan/math/prim/scal/meta/get.hpp>
+#include <sstream>
+#include <string>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
void stan::math::domain_error_vec (const char *function, const char *name, const T &y, const size_t i, const char *msg1, const char *msg2)
 Throw a domain error with a consistently formatted message. More...
 
template<typename T >
void stan::math::domain_error_vec (const char *function, const char *name, const T &y, const size_t i, const char *msg)
 Throw a domain error with a consistently formatted message. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/domain__error__vec_8hpp_source.html b/doc/api/html/domain__error__vec_8hpp_source.html new file mode 100644 index 00000000000..9276fa6850e --- /dev/null +++ b/doc/api/html/domain__error__vec_8hpp_source.html @@ -0,0 +1,156 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/domain_error_vec.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
domain_error_vec.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_ERR_DOMAIN_ERROR_VEC_HPP
+
2 #define STAN_MATH_PRIM_SCAL_ERR_DOMAIN_ERROR_VEC_HPP
+
3 
+ + + + +
8 #include <sstream>
+
9 #include <string>
+
10 
+
11 namespace stan {
+
12 
+
13  namespace math {
+
14 
+
37  template <typename T>
+
38  inline void domain_error_vec(const char* function,
+
39  const char* name,
+
40  const T& y,
+
41  const size_t i,
+
42  const char* msg1,
+
43  const char* msg2) {
+
44  std::ostringstream vec_name_stream;
+
45  vec_name_stream << name
+
46  << "[" << stan::error_index::value + i << "]";
+
47  std::string vec_name(vec_name_stream.str());
+
48  domain_error(function, vec_name.c_str(), stan::get(y, i), msg1, msg2);
+
49  }
+
50 
+
72  template <typename T>
+
73  inline void domain_error_vec(const char* function,
+
74  const char* name,
+
75  const T& y,
+
76  const size_t i,
+
77  const char* msg) {
+
78  domain_error_vec(function, name, y, i, msg, "");
+
79  }
+
80 
+
81  }
+
82 }
+
83 #endif
+ + +
void domain_error_vec(const char *function, const char *name, const T &y, const size_t i, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+
T get(const std::vector< T > &x, size_t n)
Definition: get.hpp:10
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dot_8hpp.html b/doc/api/html/dot_8hpp.html new file mode 100644 index 00000000000..fbd602f82d9 --- /dev/null +++ b/doc/api/html/dot_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/fun/dot.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
dot.hpp File Reference
+
+
+
#include <vector>
+#include <cstddef>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + +

+Functions

double stan::math::dot (const std::vector< double > &x, const std::vector< double > &y)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dot_8hpp_source.html b/doc/api/html/dot_8hpp_source.html new file mode 100644 index 00000000000..c8aabb89d41 --- /dev/null +++ b/doc/api/html/dot_8hpp_source.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/fun/dot.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
dot.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_ARR_FUN_DOT_HPP
+
2 #define STAN_MATH_PRIM_ARR_FUN_DOT_HPP
+
3 
+
4 #include <vector>
+
5 #include <cstddef>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  // x' * y
+
11  inline double dot(const std::vector<double>& x,
+
12  const std::vector<double>& y) {
+
13  double sum = 0.0;
+
14  for (size_t i = 0; i < x.size(); ++i)
+
15  sum += x[i] * y[i];
+
16  return sum;
+
17  }
+
18 
+
19  }
+
20 }
+
21 
+
22 #endif
+
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+
double dot(const std::vector< double > &x, const std::vector< double > &y)
Definition: dot.hpp:11
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/double__exponential__ccdf__log_8hpp.html b/doc/api/html/double__exponential__ccdf__log_8hpp.html new file mode 100644 index 00000000000..765420c8796 --- /dev/null +++ b/doc/api/html/double__exponential__ccdf__log_8hpp.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/double_exponential_ccdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
double_exponential_ccdf_log.hpp File Reference
+
+
+
#include <boost/random/uniform_01.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/fun/log1m.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/fun/sign.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::double_exponential_ccdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/double__exponential__ccdf__log_8hpp_source.html b/doc/api/html/double__exponential__ccdf__log_8hpp_source.html new file mode 100644 index 00000000000..d166493ef04 --- /dev/null +++ b/doc/api/html/double__exponential__ccdf__log_8hpp_source.html @@ -0,0 +1,240 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/double_exponential_ccdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
double_exponential_ccdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_DOUBLE_EXPONENTIAL_CCDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_DOUBLE_EXPONENTIAL_CCDF_LOG_HPP
+
3 
+
4 #include <boost/random/uniform_01.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + +
16 #include <cmath>
+
17 
+
18 namespace stan {
+
19 
+
20  namespace math {
+
21 
+
22  template <typename T_y, typename T_loc, typename T_scale>
+
23  typename return_type<T_y, T_loc, T_scale>::type
+
24  double_exponential_ccdf_log(const T_y& y, const T_loc& mu,
+
25  const T_scale& sigma) {
+
26  static const char* function("stan::math::double_exponential_ccdf_log");
+ +
28  T_partials_return;
+
29 
+ + + + + +
35 
+
36  T_partials_return ccdf_log(0.0);
+
37 
+
38  // check if any vectors are zero length
+
39  if (!(stan::length(y)
+
40  && stan::length(mu)
+
41  && stan::length(sigma)))
+
42  return ccdf_log;
+
43 
+
44  check_not_nan(function, "Random variable", y);
+
45  check_finite(function, "Location parameter", mu);
+
46  check_positive_finite(function, "Scale parameter", sigma);
+
47  check_consistent_sizes(function,
+
48  "Random variable", y,
+
49  "Location parameter", mu,
+
50  "Scale Parameter", sigma);
+
51 
+
52  using std::log;
+
53  using std::exp;
+
54  using stan::math::log1m;
+
55  using std::exp;
+
56 
+ +
58  operands_and_partials(y, mu, sigma);
+
59 
+
60  VectorView<const T_y> y_vec(y);
+
61  VectorView<const T_loc> mu_vec(mu);
+
62  VectorView<const T_scale> sigma_vec(sigma);
+
63  const double log_half = std::log(0.5);
+
64  size_t N = max_size(y, mu, sigma);
+
65 
+
66  for (size_t n = 0; n < N; n++) {
+
67  const T_partials_return y_dbl = value_of(y_vec[n]);
+
68  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
69  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
70  const T_partials_return scaled_diff = (y_dbl - mu_dbl) / sigma_dbl;
+
71  const T_partials_return inv_sigma = 1.0 / sigma_dbl;
+
72  if (y_dbl < mu_dbl) {
+
73  // log ccdf
+
74  ccdf_log += log1m(0.5 * exp(scaled_diff));
+
75 
+
76  // gradients
+
77  const T_partials_return rep_deriv = 1.0
+
78  / (2.0 * exp(-scaled_diff) - 1.0);
+ +
80  operands_and_partials.d_x1[n] -= rep_deriv * inv_sigma;
+ +
82  operands_and_partials.d_x2[n] += rep_deriv * inv_sigma;
+ +
84  operands_and_partials.d_x3[n] += rep_deriv * scaled_diff
+
85  * inv_sigma;
+
86  } else {
+
87  // log ccdf
+
88  ccdf_log += log_half - scaled_diff;
+
89 
+
90  // gradients
+ +
92  operands_and_partials.d_x1[n] -= inv_sigma;
+ +
94  operands_and_partials.d_x2[n] += inv_sigma;
+ +
96  operands_and_partials.d_x3[n] += scaled_diff * inv_sigma;
+
97  }
+
98  }
+
99  return operands_and_partials.to_var(ccdf_log, y, mu, sigma);
+
100  }
+
101  }
+
102 }
+
103 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
return_type< T_y, T_loc, T_scale >::type double_exponential_ccdf_log(const T_y &y, const T_loc &mu, const T_scale &sigma)
+
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
fvar< T > log1m(const fvar< T > &x)
Definition: log1m.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/double__exponential__cdf_8hpp.html b/doc/api/html/double__exponential__cdf_8hpp.html new file mode 100644 index 00000000000..c6e9a4ed88d --- /dev/null +++ b/doc/api/html/double__exponential__cdf_8hpp.html @@ -0,0 +1,143 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/double_exponential_cdf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
double_exponential_cdf.hpp File Reference
+
+
+
#include <boost/random/uniform_01.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/fun/log1m.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/fun/sign.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::double_exponential_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma)
 Calculates the double exponential cumulative density function. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/double__exponential__cdf_8hpp_source.html b/doc/api/html/double__exponential__cdf_8hpp_source.html new file mode 100644 index 00000000000..d0168eab6cb --- /dev/null +++ b/doc/api/html/double__exponential__cdf_8hpp_source.html @@ -0,0 +1,235 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/double_exponential_cdf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
double_exponential_cdf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_DOUBLE_EXPONENTIAL_CDF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_DOUBLE_EXPONENTIAL_CDF_HPP
+
3 
+
4 #include <boost/random/uniform_01.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + +
16 #include <cmath>
+
17 
+
18 namespace stan {
+
19 
+
20  namespace math {
+
21 
+
36  template <typename T_y, typename T_loc, typename T_scale>
+
37  typename return_type<T_y, T_loc, T_scale>::type
+
38  double_exponential_cdf(const T_y& y,
+
39  const T_loc& mu, const T_scale& sigma) {
+
40  static const char* function("stan::math::double_exponential_cdf");
+ +
42  T_partials_return;
+
43 
+
44  // Size checks
+
45  if ( !( stan::length(y) && stan::length(mu)
+
46  && stan::length(sigma) ) )
+
47  return 1.0;
+
48 
+ + + + +
53  using boost::math::tools::promote_args;
+
54  using std::exp;
+
55 
+
56  T_partials_return cdf(1.0);
+
57 
+
58  check_not_nan(function, "Random variable", y);
+
59  check_finite(function, "Location parameter", mu);
+
60  check_positive_finite(function, "Scale parameter", sigma);
+
61 
+ +
63  operands_and_partials(y, mu, sigma);
+
64 
+
65  VectorView<const T_y> y_vec(y);
+
66  VectorView<const T_loc> mu_vec(mu);
+
67  VectorView<const T_scale> sigma_vec(sigma);
+
68  size_t N = max_size(y, mu, sigma);
+
69 
+
70  // cdf
+
71  for (size_t n = 0; n < N; n++) {
+
72  const T_partials_return y_dbl = value_of(y_vec[n]);
+
73  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
74  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
75  const T_partials_return scaled_diff = (y_dbl - mu_dbl) / (sigma_dbl);
+
76  const T_partials_return exp_scaled_diff = exp(scaled_diff);
+
77 
+
78  if (y_dbl < mu_dbl)
+
79  cdf *= exp_scaled_diff * 0.5;
+
80  else
+
81  cdf *= 1.0 - 0.5 / exp_scaled_diff;
+
82  }
+
83 
+
84  // gradients
+
85  for (size_t n = 0; n < N; n++) {
+
86  const T_partials_return y_dbl = value_of(y_vec[n]);
+
87  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
88  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
89  const T_partials_return scaled_diff = (y_dbl - mu_dbl) / sigma_dbl;
+
90  const T_partials_return exp_scaled_diff = exp(scaled_diff);
+
91  const T_partials_return inv_sigma = 1.0 / sigma_dbl;
+
92 
+
93  if (y_dbl < mu_dbl) {
+ +
95  operands_and_partials.d_x1[n] += inv_sigma * cdf;
+ +
97  operands_and_partials.d_x2[n] -= inv_sigma * cdf;
+ +
99  operands_and_partials.d_x3[n] -= scaled_diff * inv_sigma * cdf;
+
100  } else {
+
101  const T_partials_return rep_deriv = cdf * inv_sigma
+
102  / (2.0 * exp_scaled_diff - 1.0);
+ +
104  operands_and_partials.d_x1[n] += rep_deriv;
+ +
106  operands_and_partials.d_x2[n] -= rep_deriv;
+ +
108  operands_and_partials.d_x3[n] -= rep_deriv * scaled_diff;
+
109  }
+
110  }
+
111  return operands_and_partials.to_var(cdf, y, mu, sigma);
+
112  }
+
113  }
+
114 }
+
115 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
return_type< T_y, T_loc, T_scale >::type double_exponential_cdf(const T_y &y, const T_loc &mu, const T_scale &sigma)
Calculates the double exponential cumulative density function.
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + + +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/double__exponential__cdf__log_8hpp.html b/doc/api/html/double__exponential__cdf__log_8hpp.html new file mode 100644 index 00000000000..49baf1edaee --- /dev/null +++ b/doc/api/html/double__exponential__cdf__log_8hpp.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/double_exponential_cdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
double_exponential_cdf_log.hpp File Reference
+
+
+
#include <boost/random/uniform_01.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/fun/log1m.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/fun/sign.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::double_exponential_cdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/double__exponential__cdf__log_8hpp_source.html b/doc/api/html/double__exponential__cdf__log_8hpp_source.html new file mode 100644 index 00000000000..0768e3c9e8a --- /dev/null +++ b/doc/api/html/double__exponential__cdf__log_8hpp_source.html @@ -0,0 +1,240 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/double_exponential_cdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
double_exponential_cdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_DOUBLE_EXPONENTIAL_CDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_DOUBLE_EXPONENTIAL_CDF_LOG_HPP
+
3 
+
4 #include <boost/random/uniform_01.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + +
16 #include <cmath>
+
17 
+
18 namespace stan {
+
19 
+
20  namespace math {
+
21 
+
22  template <typename T_y, typename T_loc, typename T_scale>
+
23  typename return_type<T_y, T_loc, T_scale>::type
+
24  double_exponential_cdf_log(const T_y& y, const T_loc& mu,
+
25  const T_scale& sigma) {
+
26  static const char* function("stan::math::double_exponential_cdf_log");
+ +
28  T_partials_return;
+
29 
+ + + + + +
35 
+
36  T_partials_return cdf_log(0.0);
+
37 
+
38  // check if any vectors are zero length
+
39  if (!(stan::length(y)
+
40  && stan::length(mu)
+
41  && stan::length(sigma)))
+
42  return cdf_log;
+
43 
+
44  check_not_nan(function, "Random variable", y);
+
45  check_finite(function, "Location parameter", mu);
+
46  check_positive_finite(function, "Scale parameter", sigma);
+
47  check_consistent_sizes(function,
+
48  "Random variable", y,
+
49  "Location parameter", mu,
+
50  "Scale Parameter", sigma);
+
51 
+
52  using std::log;
+
53  using std::exp;
+
54  using stan::math::log1m;
+
55  using std::exp;
+
56 
+ +
58  operands_and_partials(y, mu, sigma);
+
59 
+
60  VectorView<const T_y> y_vec(y);
+
61  VectorView<const T_loc> mu_vec(mu);
+
62  VectorView<const T_scale> sigma_vec(sigma);
+
63  const double log_half = std::log(0.5);
+
64  size_t N = max_size(y, mu, sigma);
+
65 
+
66  for (size_t n = 0; n < N; n++) {
+
67  const T_partials_return y_dbl = value_of(y_vec[n]);
+
68  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
69  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
70  const T_partials_return scaled_diff = (y_dbl - mu_dbl) / sigma_dbl;
+
71  const T_partials_return inv_sigma = 1.0 / sigma_dbl;
+
72  if (y_dbl < mu_dbl) {
+
73  // log cdf
+
74  cdf_log += log_half + scaled_diff;
+
75 
+
76  // gradients
+ +
78  operands_and_partials.d_x1[n] += inv_sigma;
+ +
80  operands_and_partials.d_x2[n] -= inv_sigma;
+ +
82  operands_and_partials.d_x3[n] -= scaled_diff * inv_sigma;
+
83  } else {
+
84  // log cdf
+
85  cdf_log += log1m(0.5 * exp(-scaled_diff));
+
86 
+
87  // gradients
+
88  const T_partials_return rep_deriv = 1.0
+
89  / (2.0 * exp(scaled_diff) - 1.0);
+ +
91  operands_and_partials.d_x1[n] += rep_deriv * inv_sigma;
+ +
93  operands_and_partials.d_x2[n] -= rep_deriv * inv_sigma;
+ +
95  operands_and_partials.d_x3[n] -= rep_deriv * scaled_diff
+
96  * inv_sigma;
+
97  }
+
98  }
+
99  return operands_and_partials.to_var(cdf_log, y, mu, sigma);
+
100  }
+
101  }
+
102 }
+
103 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
return_type< T_y, T_loc, T_scale >::type double_exponential_cdf_log(const T_y &y, const T_loc &mu, const T_scale &sigma)
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
fvar< T > log1m(const fvar< T > &x)
Definition: log1m.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/double__exponential__log_8hpp.html b/doc/api/html/double__exponential__log_8hpp.html new file mode 100644 index 00000000000..afe57b8ac67 --- /dev/null +++ b/doc/api/html/double__exponential__log_8hpp.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/double_exponential_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
double_exponential_log.hpp File Reference
+
+
+
#include <boost/random/uniform_01.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/fun/log1m.hpp>
+#include <stan/math/prim/scal/meta/contains_nonconstant_struct.hpp>
+#include <stan/math/prim/scal/meta/VectorBuilder.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/fun/sign.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::double_exponential_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::double_exponential_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/double__exponential__log_8hpp_source.html b/doc/api/html/double__exponential__log_8hpp_source.html new file mode 100644 index 00000000000..f4f45f4999c --- /dev/null +++ b/doc/api/html/double__exponential__log_8hpp_source.html @@ -0,0 +1,277 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/double_exponential_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
double_exponential_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_DOUBLE_EXPONENTIAL_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_DOUBLE_EXPONENTIAL_LOG_HPP
+
3 
+
4 #include <boost/random/uniform_01.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + +
18 #include <cmath>
+
19 
+
20 namespace stan {
+
21 
+
22  namespace math {
+
23 
+
24  // DoubleExponential(y|mu, sigma) [sigma > 0]
+
25  // FIXME: add documentation
+
26  template <bool propto,
+
27  typename T_y, typename T_loc, typename T_scale>
+
28  typename return_type<T_y, T_loc, T_scale>::type
+
29  double_exponential_log(const T_y& y,
+
30  const T_loc& mu, const T_scale& sigma) {
+
31  static const char* function("stan::math::double_exponential_log");
+ +
33  T_partials_return;
+
34 
+ + + + + + +
41  using std::log;
+
42  using std::fabs;
+
43  using stan::math::sign;
+
44  using std::log;
+
45 
+
46  // check if any vectors are zero length
+
47  if (!(stan::length(y)
+
48  && stan::length(mu)
+
49  && stan::length(sigma)))
+
50  return 0.0;
+
51 
+
52  // set up return value accumulator
+
53  T_partials_return logp(0.0);
+
54  check_finite(function, "Random variable", y);
+
55  check_finite(function, "Location parameter", mu);
+
56  check_positive_finite(function, "Scale parameter", sigma);
+
57  check_consistent_sizes(function,
+
58  "Random variable", y,
+
59  "Location parameter", mu,
+
60  "Shape parameter", sigma);
+
61 
+
62  // check if no variables are involved and prop-to
+ +
64  return 0.0;
+
65 
+
66  // set up template expressions wrapping scalars into vector views
+
67  VectorView<const T_y> y_vec(y);
+
68  VectorView<const T_loc> mu_vec(mu);
+
69  VectorView<const T_scale> sigma_vec(sigma);
+
70  size_t N = max_size(y, mu, sigma);
+ +
72  operands_and_partials(y, mu, sigma);
+
73 
+ +
75  T_partials_return, T_scale> inv_sigma(length(sigma));
+ +
77  T_partials_return, T_scale>
+
78  inv_sigma_squared(length(sigma));
+ +
80  T_partials_return, T_scale> log_sigma(length(sigma));
+
81  for (size_t i = 0; i < length(sigma); i++) {
+
82  const T_partials_return sigma_dbl = value_of(sigma_vec[i]);
+ +
84  inv_sigma[i] = 1.0 / sigma_dbl;
+ +
86  log_sigma[i] = log(value_of(sigma_vec[i]));
+ +
88  inv_sigma_squared[i] = inv_sigma[i] * inv_sigma[i];
+
89  }
+
90 
+
91 
+
92  for (size_t n = 0; n < N; n++) {
+
93  const T_partials_return y_dbl = value_of(y_vec[n]);
+
94  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
95 
+
96  // reusable subexpressions values
+
97  const T_partials_return y_m_mu = y_dbl - mu_dbl;
+
98  const T_partials_return fabs_y_m_mu = fabs(y_m_mu);
+
99 
+
100  // log probability
+ +
102  logp += NEG_LOG_TWO;
+ +
104  logp -= log_sigma[n];
+ +
106  logp -= fabs_y_m_mu * inv_sigma[n];
+
107 
+
108  // gradients
+
109  T_partials_return sign_y_m_mu_times_inv_sigma(0);
+ +
111  sign_y_m_mu_times_inv_sigma = sign(y_m_mu) * inv_sigma[n];
+ +
113  operands_and_partials.d_x1[n] -= sign_y_m_mu_times_inv_sigma;
+
114  }
+ +
116  operands_and_partials.d_x2[n] += sign_y_m_mu_times_inv_sigma;
+
117  }
+ +
119  operands_and_partials.d_x3[n] += -inv_sigma[n] + fabs_y_m_mu
+
120  * inv_sigma_squared[n];
+
121  }
+
122  return operands_and_partials.to_var(logp, y, mu, sigma);
+
123  }
+
124 
+
125 
+
126  template <typename T_y, typename T_loc, typename T_scale>
+ +
128  double_exponential_log(const T_y& y, const T_loc& mu,
+
129  const T_scale& sigma) {
+
130  return double_exponential_log<false>(y, mu, sigma);
+
131  }
+
132  }
+
133 }
+
134 #endif
+ +
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:14
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
int sign(const T &z)
Definition: sign.hpp:9
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+
return_type< T_y, T_loc, T_scale >::type double_exponential_log(const T_y &y, const T_loc &mu, const T_scale &sigma)
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+
const double NEG_LOG_TWO
Definition: constants.hpp:181
+ + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/double__exponential__rng_8hpp.html b/doc/api/html/double__exponential__rng_8hpp.html new file mode 100644 index 00000000000..ab16653eea5 --- /dev/null +++ b/doc/api/html/double__exponential__rng_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/double_exponential_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Namespaces | +Functions
+
+
double_exponential_rng.hpp File Reference
+
+
+
#include <boost/random/uniform_01.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/fun/log1m.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/fun/sign.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
double stan::math::double_exponential_rng (const double mu, const double sigma, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/double__exponential__rng_8hpp_source.html b/doc/api/html/double__exponential__rng_8hpp_source.html new file mode 100644 index 00000000000..f0d26fdbd31 --- /dev/null +++ b/doc/api/html/double__exponential__rng_8hpp_source.html @@ -0,0 +1,176 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/double_exponential_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
double_exponential_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_DOUBLE_EXPONENTIAL_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_DOUBLE_EXPONENTIAL_RNG_HPP
+
3 
+
4 #include <boost/random/uniform_01.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + +
13 
+ + + +
17 
+
18 namespace stan {
+
19 
+
20  namespace math {
+
21 
+
22  template <class RNG>
+
23  inline double
+
24  double_exponential_rng(const double mu,
+
25  const double sigma,
+
26  RNG& rng) {
+
27  static const char* function("stan::math::double_exponential_rng");
+
28 
+
29  using boost::variate_generator;
+
30  using boost::random::uniform_01;
+
31  using std::log;
+
32  using std::abs;
+ + +
35  using stan::math::log1m;
+
36 
+
37  check_finite(function, "Location parameter", mu);
+
38  check_positive_finite(function, "Scale parameter", sigma);
+
39 
+
40  variate_generator<RNG&, uniform_01<> >
+
41  rng_unit_01(rng, uniform_01<>());
+
42  double a = 0;
+
43  double laplaceRN = rng_unit_01();
+
44  if (0.5 - laplaceRN > 0)
+
45  a = 1.0;
+
46  else if (0.5 - laplaceRN < 0)
+
47  a = -1.0;
+
48  return mu - sigma * a * log1m(2 * abs(0.5 - laplaceRN));
+
49  }
+
50  }
+
51 }
+
52 #endif
+ +
fvar< T > abs(const fvar< T > &x)
Definition: abs.hpp:15
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ + + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + + + +
double double_exponential_rng(const double mu, const double sigma, RNG &rng)
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
fvar< T > log1m(const fvar< T > &x)
Definition: log1m.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/doxygen.css b/doc/api/html/doxygen.css new file mode 100644 index 00000000000..f0f36f89f58 --- /dev/null +++ b/doc/api/html/doxygen.css @@ -0,0 +1,1366 @@ +/* The standard CSS for doxygen 1.8.6 */ + +body, table, div, p, dl { + font: 400 14px/22px Roboto,sans-serif; +} + +/* @group Heading Levels */ + +h1.groupheader { + font-size: 150%; +} + +.title { + font: 400 14px/28px Roboto,sans-serif; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h2.groupheader { + border-bottom: 1px solid #879ECB; + color: #354C7B; + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px cyan; +} + +dt { + font-weight: bold; +} + +div.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; +} + +p.startli, p.startdd { + margin-top: 2px; +} + +p.starttd { + margin-top: 0px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.qindex, div.navtab{ + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; +} + +div.qindex, div.navpath { + width: 100%; + line-height: 140%; +} + +div.navtab { + margin-right: 15px; +} + +/* @group Link Styling */ + +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #4665A2; +} + +a:hover { + text-decoration: underline; +} + +a.qindex { + font-weight: bold; +} + +a.qindexHL { + font-weight: bold; + background-color: #9CAFD4; + color: #ffffff; + border: 1px double #869DCA; +} + +.contents a.qindexHL:visited { + color: #ffffff; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} + +div.fragment { + padding: 4px 6px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} + +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line.glow { + background-color: cyan; + box-shadow: 0 0 10px cyan; +} + + +span.lineno { + padding-right: 4px; + text-align: right; + border-right: 2px solid #0F0; + background-color: #E8E8E8; + white-space: pre; +} +span.lineno a { + background-color: #D8D8D8; +} + +span.lineno a:hover { + background-color: #C8C8C8; +} + +div.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background-color: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +td.indexkey { + background-color: #EBEFF6; + font-weight: bold; + border: 1px solid #C4CFE5; + margin: 2px 0px 2px 0; + padding: 2px 10px; + white-space: nowrap; + vertical-align: top; +} + +td.indexvalue { + background-color: #EBEFF6; + border: 1px solid #C4CFE5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #EEF1F7; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #A3B4D7; +} + +th.dirtab { + background: #EBEFF6; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: cyan; + box-shadow: 0 0 15px cyan; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #F9FAFC; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memSeparator { + border-bottom: 1px solid #DEE4F0; + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight { + width: 100%; +} + +.memTemplParams { + color: #4665A2; + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtemplate { + font-size: 80%; + color: #4665A2; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px cyan; +} + +.memname { + font-weight: bold; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 0px 6px 0px; + color: #253555; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; + border-top-left-radius: 4px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 4px; + -moz-border-radius-topleft: 4px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 4px; + -webkit-border-top-left-radius: 4px; + +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 10px 2px 10px; + background-color: #FBFCFD; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: #FFFFFF; + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} +.paramname code { + line-height: 14px; +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: #728DC1; + border-top:1px solid #5373B4; + border-left:1px solid #5373B4; + border-right:1px solid #C4CFE5; + border-bottom:1px solid #C4CFE5; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view when not used as main index */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.even { + padding-left: 6px; + background-color: #F7F8FB; +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: #3D578C; +} + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: #2A3D61; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + /*width: 100%;*/ + margin-bottom: 10px; + border: 1px solid #A8B8D9; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #A8B8D9; + /*width: 100%;*/ +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + font-size: 90%; + color: #253555; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #A8B8D9; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:#8AA0CC; + border:solid 1px #C2CDE4; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#364D7C; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: #283A5D; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color:#6884BD; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#364D7C; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +dl +{ + padding: 0 0 0 10px; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ +dl.section +{ + margin-left: 0px; + padding-left: 0px; +} + +dl.note +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00D000; +} + +dl.deprecated +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #505050; +} + +dl.todo +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00C0E0; +} + +dl.test +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #3030E0; +} + +dl.bug +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectname +{ + font: 300% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font: 120% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #5373B4; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.diagraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #90A5CE; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#334975; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; +} + +dl.citelist dd { + margin:2px 0; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: #F4F6FA; + border: 1px solid #D8DFEE; + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 20px 10px 10px; + width: 200px; +} + +div.toc li { + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +div.toc h3 { + font: bold 12px/1.2 Arial,FreeSans,sans-serif; + color: #4665A2; + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 30px; +} + +div.toc li.level4 { + margin-left: 45px; +} + +.inherit_header { + font-weight: bold; + color: gray; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + white-space: nowrap; + background-color: white; + border: 1px solid gray; + border-radius: 4px 4px 4px 4px; + box-shadow: 1px 1px 7px gray; + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: grey; + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: #006318; +} + +#powerTip div { + margin: 0px; + padding: 0px; + font: 12px/16px Roboto,sans-serif; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: #ffffff; + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before { + border-top-color: #808080; + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: #ffffff; + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: #808080; + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: #ffffff; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: #ffffff; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + diff --git a/doc/api/html/doxygen.png b/doc/api/html/doxygen.png new file mode 100644 index 00000000000..3ff17d807fd Binary files /dev/null and b/doc/api/html/doxygen.png differ diff --git a/doc/api/html/dv__vari_8hpp.html b/doc/api/html/dv__vari_8hpp.html new file mode 100644 index 00000000000..d545dc752fe --- /dev/null +++ b/doc/api/html/dv__vari_8hpp.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/rev/core/dv_vari.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Classes | +Namespaces
+
+
dv_vari.hpp File Reference
+
+
+
#include <stan/math/rev/core/vari.hpp>
+
+

Go to the source code of this file.

+ + + + +

+Classes

class  stan::math::op_dv_vari
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dv__vari_8hpp_source.html b/doc/api/html/dv__vari_8hpp_source.html new file mode 100644 index 00000000000..2ebc96f4c1b --- /dev/null +++ b/doc/api/html/dv__vari_8hpp_source.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/rev/core/dv_vari.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
dv_vari.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_DV_VARI_HPP
+
2 #define STAN_MATH_REV_CORE_DV_VARI_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
9  class op_dv_vari : public vari {
+
10  protected:
+
11  double ad_;
+ +
13  public:
+
14  op_dv_vari(double f, double a, vari* bvi) :
+
15  vari(f),
+
16  ad_(a),
+
17  bvi_(bvi) {
+
18  }
+
19  };
+
20 
+
21  }
+
22 }
+
23 #endif
+ + +
The variable implementation base class.
Definition: vari.hpp:28
+ +
op_dv_vari(double f, double a, vari *bvi)
Definition: dv_vari.hpp:14
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dvd__vari_8hpp.html b/doc/api/html/dvd__vari_8hpp.html new file mode 100644 index 00000000000..3f662d3e57e --- /dev/null +++ b/doc/api/html/dvd__vari_8hpp.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/rev/core/dvd_vari.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Classes | +Namespaces
+
+
dvd_vari.hpp File Reference
+
+
+
#include <stan/math/rev/core/vari.hpp>
+
+

Go to the source code of this file.

+ + + + +

+Classes

class  stan::math::op_dvd_vari
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dvd__vari_8hpp_source.html b/doc/api/html/dvd__vari_8hpp_source.html new file mode 100644 index 00000000000..b88ded34173 --- /dev/null +++ b/doc/api/html/dvd__vari_8hpp_source.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/rev/core/dvd_vari.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
dvd_vari.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_DVD_VARI_HPP
+
2 #define STAN_MATH_REV_CORE_DVD_VARI_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
9  class op_dvd_vari : public vari {
+
10  protected:
+
11  double ad_;
+ +
13  double cd_;
+
14  public:
+
15  op_dvd_vari(double f, double a, vari* bvi, double c) :
+
16  vari(f),
+
17  ad_(a),
+
18  bvi_(bvi),
+
19  cd_(c) {
+
20  }
+
21  };
+
22 
+
23  }
+
24 }
+
25 #endif
+ + +
The variable implementation base class.
Definition: vari.hpp:28
+
op_dvd_vari(double f, double a, vari *bvi, double c)
Definition: dvd_vari.hpp:15
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dvv__vari_8hpp.html b/doc/api/html/dvv__vari_8hpp.html new file mode 100644 index 00000000000..d1d9729de24 --- /dev/null +++ b/doc/api/html/dvv__vari_8hpp.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/rev/core/dvv_vari.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+Classes | +Namespaces
+
+
dvv_vari.hpp File Reference
+
+
+
#include <stan/math/rev/core/vari.hpp>
+
+

Go to the source code of this file.

+ + + + +

+Classes

class  stan::math::op_dvv_vari
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dvv__vari_8hpp_source.html b/doc/api/html/dvv__vari_8hpp_source.html new file mode 100644 index 00000000000..50b26a8dbfb --- /dev/null +++ b/doc/api/html/dvv__vari_8hpp_source.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/rev/core/dvv_vari.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ + +
+
+
+
dvv_vari.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_DVV_VARI_HPP
+
2 #define STAN_MATH_REV_CORE_DVV_VARI_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
9  class op_dvv_vari : public vari {
+
10  protected:
+
11  double ad_;
+ + +
14  public:
+
15  op_dvv_vari(double f, double a, vari* bvi, vari* cvi) :
+
16  vari(f),
+
17  ad_(a),
+
18  bvi_(bvi),
+
19  cvi_(cvi) {
+
20  }
+
21  };
+
22 
+
23  }
+
24 }
+
25 #endif
+ + +
The variable implementation base class.
Definition: vari.hpp:28
+ + +
op_dvv_vari(double f, double a, vari *bvi, vari *cvi)
Definition: dvv_vari.hpp:15
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/dynsections.js b/doc/api/html/dynsections.js new file mode 100644 index 00000000000..2f15470d723 --- /dev/null +++ b/doc/api/html/dynsections.js @@ -0,0 +1,104 @@ +function toggleVisibility(linkObj) +{ + var base = $(linkObj).attr('id'); + var summary = $('#'+base+'-summary'); + var content = $('#'+base+'-content'); + var trigger = $('#'+base+'-trigger'); + var src=$(trigger).attr('src'); + if (content.is(':visible')===true) { + content.hide(); + summary.show(); + $(linkObj).addClass('closed').removeClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + content.show(); + summary.hide(); + $(linkObj).removeClass('closed').addClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); + } + return false; +} + +function updateStripes() +{ + $('table.directory tr'). + removeClass('even').filter(':visible:even').addClass('even'); +} +function toggleLevel(level) +{ + $('table.directory tr').each(function(){ + var l = this.id.split('_').length-1; + var i = $('#img'+this.id.substring(3)); + var a = $('#arr'+this.id.substring(3)); + if (l + + + + + +Stan Math Library: stan/math/prim/mat/fun/eigenvalues_sym.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
eigenvalues_sym.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::eigenvalues_sym (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
 Return the eigenvalues of the specified symmetric matrix in descending order of magnitude. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/eigenvalues__sym_8hpp_source.html b/doc/api/html/eigenvalues__sym_8hpp_source.html new file mode 100644 index 00000000000..cef59884e2a --- /dev/null +++ b/doc/api/html/eigenvalues__sym_8hpp_source.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/eigenvalues_sym.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
eigenvalues_sym.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_EIGENVALUES_SYM_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_EIGENVALUES_SYM_HPP
+
3 
+ + + +
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
20  template <typename T>
+
21  Eigen::Matrix<T, Eigen::Dynamic, 1>
+
22  eigenvalues_sym(const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>& m) {
+
23  stan::math::check_nonzero_size("eigenvalues_sym", "m", m);
+
24  stan::math::check_symmetric("eigenvalues_sym", "m", m);
+
25 
+
26  Eigen::SelfAdjointEigenSolver
+
27  <Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> >
+
28  solver(m, Eigen::EigenvaluesOnly);
+
29  return solver.eigenvalues();
+
30  }
+
31 
+
32  }
+
33 }
+
34 #endif
+
bool check_symmetric(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is symmetric.
+ +
bool check_nonzero_size(const char *function, const char *name, const T_y &y)
Return true if the specified matrix/vector is of non-zero size.
+ +
Eigen::Matrix< T, Eigen::Dynamic, 1 > eigenvalues_sym(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
Return the eigenvalues of the specified symmetric matrix in descending order of magnitude.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/eigenvectors__sym_8hpp.html b/doc/api/html/eigenvectors__sym_8hpp.html new file mode 100644 index 00000000000..61165d24508 --- /dev/null +++ b/doc/api/html/eigenvectors__sym_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/eigenvectors_sym.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
eigenvectors_sym.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::eigenvectors_sym (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/eigenvectors__sym_8hpp_source.html b/doc/api/html/eigenvectors__sym_8hpp_source.html new file mode 100644 index 00000000000..0df68313db9 --- /dev/null +++ b/doc/api/html/eigenvectors__sym_8hpp_source.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/eigenvectors_sym.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
eigenvectors_sym.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_EIGENVECTORS_SYM_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_EIGENVECTORS_SYM_HPP
+
3 
+ + + +
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  template <typename T>
+
12  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
13  eigenvectors_sym(const Eigen::Matrix
+
14  <T, Eigen::Dynamic, Eigen::Dynamic>& m) {
+
15  stan::math::check_nonzero_size("eigenvectors_sym", "m", m);
+
16  stan::math::check_symmetric("eigenvalues_sym", "m", m);
+
17 
+
18  Eigen::SelfAdjointEigenSolver
+
19  <Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> >
+
20  solver(m);
+
21  return solver.eigenvectors();
+
22  }
+
23 
+
24  }
+
25 }
+
26 #endif
+
bool check_symmetric(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is symmetric.
+ +
bool check_nonzero_size(const char *function, const char *name, const T_y &y)
Return true if the specified matrix/vector is of non-zero size.
+ +
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > eigenvectors_sym(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/elt__divide_8hpp.html b/doc/api/html/elt__divide_8hpp.html new file mode 100644 index 00000000000..a78b5fd0f3f --- /dev/null +++ b/doc/api/html/elt__divide_8hpp.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/elt_divide.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
elt_divide.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/err/check_matching_dims.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + +

+Functions

template<typename T1 , typename T2 , int R, int C>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R, C > 
stan::math::elt_divide (const Eigen::Matrix< T1, R, C > &m1, const Eigen::Matrix< T2, R, C > &m2)
 Return the elementwise division of the specified matrices. More...
 
template<typename T1 , typename T2 , int R, int C>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R, C > 
stan::math::elt_divide (const Eigen::Matrix< T1, R, C > &m, T2 s)
 Return the elementwise division of the specified matrix by the specified scalar. More...
 
template<typename T1 , typename T2 , int R, int C>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R, C > 
stan::math::elt_divide (T1 s, const Eigen::Matrix< T2, R, C > &m)
 Return the elementwise division of the specified scalar by the specified matrix. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/elt__divide_8hpp_source.html b/doc/api/html/elt__divide_8hpp_source.html new file mode 100644 index 00000000000..2ff9edcbce9 --- /dev/null +++ b/doc/api/html/elt__divide_8hpp_source.html @@ -0,0 +1,156 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/elt_divide.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
elt_divide.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_ELT_DIVIDE_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_ELT_DIVIDE_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+ + +
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
22  template <typename T1, typename T2, int R, int C>
+
23  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R, C>
+
24  elt_divide(const Eigen::Matrix<T1, R, C>& m1,
+
25  const Eigen::Matrix<T2, R, C>& m2) {
+ +
27  "m1", m1,
+
28  "m2", m2);
+
29  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type,
+
30  R, C> result(m1.rows(), m2.cols());
+
31  for (int i = 0; i < m1.size(); ++i)
+
32  result(i) = m1(i) / m2(i);
+
33  return result;
+
34  }
+
35 
+
48  template <typename T1, typename T2, int R, int C>
+
49  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R, C>
+
50  elt_divide(const Eigen::Matrix<T1, R, C>& m, T2 s) {
+
51  return m / s;
+
52  }
+
53 
+
66  template <typename T1, typename T2, int R, int C>
+
67  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R, C>
+
68  elt_divide(T1 s,
+
69  const Eigen::Matrix<T2, R, C>& m) {
+
70  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type,
+
71  R, C> result(m.rows(), m.cols());
+
72  for (int i = 0; i < m.size(); ++i)
+
73  result(i) = s / m(i);
+
74  return result;
+
75  }
+
76 
+
77  }
+
78 }
+
79 #endif
+ +
bool check_matching_dims(const char *function, const char *name1, const Eigen::Matrix< T1, R1, C1 > &y1, const char *name2, const Eigen::Matrix< T2, R2, C2 > &y2)
Return true if the two matrices are of the same size.
+ +
Eigen::Matrix< typename boost::math::tools::promote_args< T1, T2 >::type, R, C > elt_divide(const Eigen::Matrix< T1, R, C > &m1, const Eigen::Matrix< T2, R, C > &m2)
Return the elementwise division of the specified matrices.
Definition: elt_divide.hpp:24
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/elt__multiply_8hpp.html b/doc/api/html/elt__multiply_8hpp.html new file mode 100644 index 00000000000..1159fcf2b75 --- /dev/null +++ b/doc/api/html/elt__multiply_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/elt_multiply.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
elt_multiply.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/err/check_matching_dims.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T1 , typename T2 , int R, int C>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R, C > 
stan::math::elt_multiply (const Eigen::Matrix< T1, R, C > &m1, const Eigen::Matrix< T2, R, C > &m2)
 Return the elementwise multiplication of the specified matrices. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/elt__multiply_8hpp_source.html b/doc/api/html/elt__multiply_8hpp_source.html new file mode 100644 index 00000000000..47fa14cedea --- /dev/null +++ b/doc/api/html/elt__multiply_8hpp_source.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/elt_multiply.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
elt_multiply.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_ELT_MULTIPLY_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_ELT_MULTIPLY_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+ + +
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
23  template <typename T1, typename T2, int R, int C>
+
24  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R, C>
+
25  elt_multiply(const Eigen::Matrix<T1, R, C>& m1,
+
26  const Eigen::Matrix<T2, R, C>& m2) {
+
27  stan::math::check_matching_dims("elt_multiply",
+
28  "m1", m1,
+
29  "m2", m2);
+
30  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type,
+
31  R, C> result(m1.rows(), m2.cols());
+
32  for (int i = 0; i < m1.size(); ++i)
+
33  result(i) = m1(i) * m2(i);
+
34  return result;
+
35  }
+
36 
+
37  }
+
38 }
+
39 #endif
+ +
Eigen::Matrix< typename boost::math::tools::promote_args< T1, T2 >::type, R, C > elt_multiply(const Eigen::Matrix< T1, R, C > &m1, const Eigen::Matrix< T2, R, C > &m2)
Return the elementwise multiplication of the specified matrices.
+
bool check_matching_dims(const char *function, const char *name1, const Eigen::Matrix< T1, R1, C1 > &y1, const char *name2, const Eigen::Matrix< T2, R2, C2 > &y2)
Return true if the two matrices are of the same size.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/empty__nested_8hpp.html b/doc/api/html/empty__nested_8hpp.html new file mode 100644 index 00000000000..c9750726ea1 --- /dev/null +++ b/doc/api/html/empty__nested_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/rev/core/empty_nested.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
empty_nested.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

static bool stan::math::empty_nested ()
 Return true if there is no nested autodiff being executed. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/empty__nested_8hpp_source.html b/doc/api/html/empty__nested_8hpp_source.html new file mode 100644 index 00000000000..8ac801367b4 --- /dev/null +++ b/doc/api/html/empty__nested_8hpp_source.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/rev/core/empty_nested.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
empty_nested.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_EMPTY_NESTED_HPP
+
2 #define STAN_MATH_REV_CORE_EMPTY_NESTED_HPP
+
3 
+ + + +
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
14  static inline bool empty_nested() {
+ +
16  }
+
17 
+
18 
+
19  }
+
20 }
+
21 #endif
+
static bool empty_nested()
Return true if there is no nested autodiff being executed.
+ + +
static std::vector< size_t > nested_var_stack_sizes_
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/error__index_8hpp.html b/doc/api/html/error__index_8hpp.html new file mode 100644 index 00000000000..30b0de2fb1b --- /dev/null +++ b/doc/api/html/error__index_8hpp.html @@ -0,0 +1,124 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/error_index.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
error_index.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

struct  stan::error_index
 
+ + + +

+Namespaces

 stan
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/error__index_8hpp_source.html b/doc/api/html/error__index_8hpp_source.html new file mode 100644 index 00000000000..7c90864f1f5 --- /dev/null +++ b/doc/api/html/error__index_8hpp_source.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/error_index.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
error_index.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_ERROR_INDEX_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_ERROR_INDEX_HPP
+
3 
+
4 namespace stan {
+
5 
+
6  struct error_index {
+
7  enum { value =
+
8 #ifdef ERROR_INDEX
+
9 ERROR_INDEX
+
10 #else
+
11 1
+
12 #endif
+
13  };
+
14  };
+
15 
+
16 }
+
17 #endif
+
18 
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/exp__mod__normal__ccdf__log_8hpp.html b/doc/api/html/exp__mod__normal__ccdf__log_8hpp.html new file mode 100644 index 00000000000..d456236af61 --- /dev/null +++ b/doc/api/html/exp__mod__normal__ccdf__log_8hpp.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/exp_mod_normal_ccdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
exp_mod_normal_ccdf_log.hpp File Reference
+
+
+
#include <boost/random/normal_distribution.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_loc , typename T_scale , typename T_inv_scale >
return_type< T_y, T_loc,
+T_scale, T_inv_scale >::type 
stan::math::exp_mod_normal_ccdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_inv_scale &lambda)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/exp__mod__normal__ccdf__log_8hpp_source.html b/doc/api/html/exp__mod__normal__ccdf__log_8hpp_source.html new file mode 100644 index 00000000000..a0abab810d8 --- /dev/null +++ b/doc/api/html/exp__mod__normal__ccdf__log_8hpp_source.html @@ -0,0 +1,280 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/exp_mod_normal_ccdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
exp_mod_normal_ccdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_EXP_MOD_NORMAL_CCDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_EXP_MOD_NORMAL_CCDF_LOG_HPP
+
3 
+
4 #include <boost/random/normal_distribution.hpp>
+
5 #include <boost/math/special_functions/fpclassify.hpp>
+
6 #include <boost/random/variate_generator.hpp>
+ + + + + + + + +
15 #include <cmath>
+
16 
+
17 namespace stan {
+
18 
+
19  namespace math {
+
20 
+
21  template <typename T_y, typename T_loc, typename T_scale,
+
22  typename T_inv_scale>
+
23  typename return_type<T_y, T_loc, T_scale, T_inv_scale>::type
+
24  exp_mod_normal_ccdf_log(const T_y& y, const T_loc& mu, const T_scale& sigma,
+
25  const T_inv_scale& lambda) {
+
26  static const char* function("stan::math::exp_mod_normal_ccdf_log");
+
27  typedef typename stan::partials_return_type<T_y, T_loc, T_scale,
+
28  T_inv_scale>::type
+
29  T_partials_return;
+
30 
+ + + + + +
36 
+
37  T_partials_return ccdf_log(0.0);
+
38  // check if any vectors are zero length
+
39  if (!(stan::length(y)
+
40  && stan::length(mu)
+
41  && stan::length(sigma)
+
42  && stan::length(lambda)))
+
43  return ccdf_log;
+
44 
+
45  check_not_nan(function, "Random variable", y);
+
46  check_finite(function, "Location parameter", mu);
+
47  check_not_nan(function, "Scale parameter", sigma);
+
48  check_positive_finite(function, "Scale parameter", sigma);
+
49  check_positive_finite(function, "Inv_scale parameter", lambda);
+
50  check_not_nan(function, "Inv_scale parameter", lambda);
+
51  check_consistent_sizes(function,
+
52  "Random variable", y,
+
53  "Location parameter", mu,
+
54  "Scale parameter", sigma,
+
55  "Inv_scale paramter", lambda);
+
56 
+
57 
+ +
59  operands_and_partials(y, mu, sigma, lambda);
+
60 
+
61  using stan::math::SQRT_2;
+
62  using std::log;
+
63  using std::log;
+
64  using std::exp;
+
65 
+
66  VectorView<const T_y> y_vec(y);
+
67  VectorView<const T_loc> mu_vec(mu);
+
68  VectorView<const T_scale> sigma_vec(sigma);
+
69  VectorView<const T_inv_scale> lambda_vec(lambda);
+
70  size_t N = max_size(y, mu, sigma, lambda);
+
71  const double sqrt_pi = std::sqrt(stan::math::pi());
+
72  for (size_t n = 0; n < N; n++) {
+
73  if (boost::math::isinf(y_vec[n])) {
+
74  if (y_vec[n] > 0.0)
+
75  return operands_and_partials.to_var(stan::math::negative_infinity(),
+
76  y, mu, sigma, lambda);
+
77  else
+
78  return operands_and_partials.to_var(0.0, y, mu, sigma, lambda);
+
79  }
+
80 
+
81  const T_partials_return y_dbl = value_of(y_vec[n]);
+
82  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
83  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
84  const T_partials_return lambda_dbl = value_of(lambda_vec[n]);
+
85  const T_partials_return u = lambda_dbl * (y_dbl - mu_dbl);
+
86  const T_partials_return v = lambda_dbl * sigma_dbl;
+
87  const T_partials_return v_sq = v * v;
+
88  const T_partials_return scaled_diff = (y_dbl - mu_dbl)
+
89  / (SQRT_2 * sigma_dbl);
+
90  const T_partials_return scaled_diff_sq = scaled_diff * scaled_diff;
+
91  const T_partials_return erf_calc1 = 0.5 * (1 + erf(u / (v * SQRT_2)));
+
92  const T_partials_return erf_calc2 = 0.5 * (1 + erf(u / (v * SQRT_2)
+
93  - v / SQRT_2));
+
94 
+
95  const T_partials_return deriv_1 = lambda_dbl * exp(0.5 * v_sq - u)
+
96  * erf_calc2;
+
97  const T_partials_return deriv_2 = SQRT_2 / sqrt_pi * 0.5
+
98  * exp(0.5 * v_sq
+
99  - (-scaled_diff + (v / SQRT_2)) * (-scaled_diff
+
100  + (v / SQRT_2)) - u)
+
101  / sigma_dbl;
+
102  const T_partials_return deriv_3 = SQRT_2 / sqrt_pi * 0.5
+
103  * exp(-scaled_diff_sq) / sigma_dbl;
+
104 
+
105  const T_partials_return ccdf_ = 1.0 - erf_calc1 + exp(-u + v_sq * 0.5)
+
106  * (erf_calc2);
+
107 
+
108  ccdf_log += log(ccdf_);
+
109 
+ +
111  operands_and_partials.d_x1[n]
+
112  -= (deriv_1 - deriv_2 + deriv_3) / ccdf_;
+ +
114  operands_and_partials.d_x2[n]
+
115  -= (-deriv_1 + deriv_2 - deriv_3) / ccdf_;
+ +
117  operands_and_partials.d_x3[n]
+
118  -= (-deriv_1 * v - deriv_3 * scaled_diff * SQRT_2 - deriv_2
+
119  * sigma_dbl * SQRT_2
+
120  * (-SQRT_2 * 0.5 * (-lambda_dbl + scaled_diff * SQRT_2
+
121  / sigma_dbl)
+
122  - SQRT_2 * lambda_dbl))
+
123  / ccdf_;
+ +
125  operands_and_partials.d_x4[n] -= exp(0.5 * v_sq - u)
+
126  * (SQRT_2 / sqrt_pi * 0.5 * sigma_dbl
+
127  * exp(-(v / SQRT_2 - scaled_diff) * (v / SQRT_2 - scaled_diff))
+
128  - (v * sigma_dbl + mu_dbl - y_dbl) * erf_calc2)
+
129  / ccdf_;
+
130  }
+
131 
+
132  return operands_and_partials.to_var(ccdf_log, y, mu, sigma, lambda);
+
133  }
+
134  }
+
135 }
+
136 #endif
+
137 
+
138 
+
139 
+ +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
fvar< T > erf(const fvar< T > &x)
Definition: erf.hpp:14
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
const double SQRT_2
The value of the square root of 2, .
Definition: constants.hpp:21
+
bool isinf(const stan::math::var &v)
Checks if the given number is infinite.
Definition: boost_isinf.hpp:22
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
VectorView< T_partials_return, is_vector< T4 >::value, is_constant_struct< T4 >::value > d_x4
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
double pi()
Return the value of pi.
Definition: constants.hpp:86
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
return_type< T_y, T_loc, T_scale, T_inv_scale >::type exp_mod_normal_ccdf_log(const T_y &y, const T_loc &mu, const T_scale &sigma, const T_inv_scale &lambda)
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/exp__mod__normal__cdf_8hpp.html b/doc/api/html/exp__mod__normal__cdf_8hpp.html new file mode 100644 index 00000000000..ff9380cdd10 --- /dev/null +++ b/doc/api/html/exp__mod__normal__cdf_8hpp.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/exp_mod_normal_cdf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
exp_mod_normal_cdf.hpp File Reference
+
+
+
#include <boost/random/normal_distribution.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_loc , typename T_scale , typename T_inv_scale >
return_type< T_y, T_loc,
+T_scale, T_inv_scale >::type 
stan::math::exp_mod_normal_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_inv_scale &lambda)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/exp__mod__normal__cdf_8hpp_source.html b/doc/api/html/exp__mod__normal__cdf_8hpp_source.html new file mode 100644 index 00000000000..78d02443e3b --- /dev/null +++ b/doc/api/html/exp__mod__normal__cdf_8hpp_source.html @@ -0,0 +1,284 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/exp_mod_normal_cdf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
exp_mod_normal_cdf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_EXP_MOD_NORMAL_CDF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_EXP_MOD_NORMAL_CDF_HPP
+
3 
+
4 #include <boost/random/normal_distribution.hpp>
+
5 #include <boost/math/special_functions/fpclassify.hpp>
+
6 #include <boost/random/variate_generator.hpp>
+ + + + + + + + +
15 #include <cmath>
+
16 
+
17 namespace stan {
+
18 
+
19  namespace math {
+
20 
+
21  template <typename T_y, typename T_loc, typename T_scale,
+
22  typename T_inv_scale>
+
23  typename return_type<T_y, T_loc, T_scale, T_inv_scale>::type
+
24  exp_mod_normal_cdf(const T_y& y, const T_loc& mu, const T_scale& sigma,
+
25  const T_inv_scale& lambda) {
+
26  static const char* function("stan::math::exp_mod_normal_cdf");
+
27  typedef typename stan::partials_return_type<T_y, T_loc, T_scale,
+
28  T_inv_scale>::type
+
29  T_partials_return;
+
30 
+ + + + + +
36 
+
37  T_partials_return cdf(1.0);
+
38  // check if any vectors are zero length
+
39  if (!(stan::length(y)
+
40  && stan::length(mu)
+
41  && stan::length(sigma)
+
42  && stan::length(lambda)))
+
43  return cdf;
+
44 
+
45  check_not_nan(function, "Random variable", y);
+
46  check_finite(function, "Location parameter", mu);
+
47  check_not_nan(function, "Scale parameter", sigma);
+
48  check_positive_finite(function, "Scale parameter", sigma);
+
49  check_positive_finite(function, "Inv_scale parameter", lambda);
+
50  check_not_nan(function, "Inv_scale parameter", lambda);
+
51  check_consistent_sizes(function,
+
52  "Random variable", y,
+
53  "Location parameter", mu,
+
54  "Scale parameter", sigma,
+
55  "Inv_scale paramter", lambda);
+
56 
+ +
58  operands_and_partials(y, mu, sigma, lambda);
+
59 
+
60  using stan::math::SQRT_2;
+
61  using std::exp;
+
62 
+
63  VectorView<const T_y> y_vec(y);
+
64  VectorView<const T_loc> mu_vec(mu);
+
65  VectorView<const T_scale> sigma_vec(sigma);
+
66  VectorView<const T_inv_scale> lambda_vec(lambda);
+
67  size_t N = max_size(y, mu, sigma, lambda);
+
68  const double sqrt_pi = std::sqrt(stan::math::pi());
+
69  for (size_t n = 0; n < N; n++) {
+
70  if (boost::math::isinf(y_vec[n])) {
+
71  if (y_vec[n] < 0.0)
+
72  return operands_and_partials.to_var(0.0, y, mu, sigma, lambda);
+
73  }
+
74 
+
75  const T_partials_return y_dbl = value_of(y_vec[n]);
+
76  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
77  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
78  const T_partials_return lambda_dbl = value_of(lambda_vec[n]);
+
79  const T_partials_return u = lambda_dbl * (y_dbl - mu_dbl);
+
80  const T_partials_return v = lambda_dbl * sigma_dbl;
+
81  const T_partials_return v_sq = v * v;
+
82  const T_partials_return scaled_diff = (y_dbl - mu_dbl) / (SQRT_2
+
83  * sigma_dbl);
+
84  const T_partials_return scaled_diff_sq = scaled_diff * scaled_diff;
+
85  const T_partials_return erf_calc = 0.5 * (1 + erf(-v / SQRT_2
+
86  + scaled_diff));
+
87  const T_partials_return deriv_1 = lambda_dbl * exp(0.5 * v_sq - u)
+
88  * erf_calc;
+
89  const T_partials_return deriv_2 = SQRT_2 / sqrt_pi * 0.5
+
90  * exp(0.5 * v_sq - (scaled_diff - (v / SQRT_2))
+
91  * (scaled_diff - (v / SQRT_2)) - u) / sigma_dbl;
+
92  const T_partials_return deriv_3 = SQRT_2 / sqrt_pi * 0.5
+
93  * exp(-scaled_diff_sq) / sigma_dbl;
+
94 
+
95  const T_partials_return cdf_ = 0.5 * (1 + erf(u / (v * SQRT_2)))
+
96  - exp(-u + v_sq * 0.5) * (erf_calc);
+
97 
+
98  cdf *= cdf_;
+
99 
+ +
101  operands_and_partials.d_x1[n] += (deriv_1 - deriv_2 + deriv_3)
+
102  / cdf_;
+ +
104  operands_and_partials.d_x2[n] += (-deriv_1 + deriv_2 - deriv_3)
+
105  / cdf_;
+ +
107  operands_and_partials.d_x3[n] += (-deriv_1 * v - deriv_3
+
108  * scaled_diff * SQRT_2 - deriv_2
+
109  * sigma_dbl * SQRT_2
+
110  * (-SQRT_2 * 0.5
+
111  * (-lambda_dbl + scaled_diff
+
112  * SQRT_2 / sigma_dbl) - SQRT_2
+
113  * lambda_dbl)) / cdf_;
+ +
115  operands_and_partials.d_x4[n] += exp(0.5 * v_sq - u)
+
116  * (SQRT_2 / sqrt_pi * 0.5 * sigma_dbl
+
117  * exp(-(v / SQRT_2 - scaled_diff) * (v / SQRT_2 - scaled_diff))
+
118  - (v * sigma_dbl + mu_dbl - y_dbl) * erf_calc) / cdf_;
+
119  }
+
120 
+ +
122  for (size_t n = 0; n < stan::length(y); ++n)
+
123  operands_and_partials.d_x1[n] *= cdf;
+
124  }
+ +
126  for (size_t n = 0; n < stan::length(mu); ++n)
+
127  operands_and_partials.d_x2[n] *= cdf;
+
128  }
+ +
130  for (size_t n = 0; n < stan::length(sigma); ++n)
+
131  operands_and_partials.d_x3[n] *= cdf;
+
132  }
+ +
134  for (size_t n = 0; n < stan::length(lambda); ++n)
+
135  operands_and_partials.d_x4[n] *= cdf;
+
136  }
+
137 
+
138  return operands_and_partials.to_var(cdf, y, mu, sigma, lambda);
+
139  }
+
140  }
+
141 }
+
142 #endif
+
143 
+
144 
+
145 
+ +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
return_type< T_y, T_loc, T_scale, T_inv_scale >::type exp_mod_normal_cdf(const T_y &y, const T_loc &mu, const T_scale &sigma, const T_inv_scale &lambda)
+
fvar< T > erf(const fvar< T > &x)
Definition: erf.hpp:14
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
const double SQRT_2
The value of the square root of 2, .
Definition: constants.hpp:21
+
bool isinf(const stan::math::var &v)
Checks if the given number is infinite.
Definition: boost_isinf.hpp:22
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
VectorView< T_partials_return, is_vector< T4 >::value, is_constant_struct< T4 >::value > d_x4
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
double pi()
Return the value of pi.
Definition: constants.hpp:86
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/exp__mod__normal__cdf__log_8hpp.html b/doc/api/html/exp__mod__normal__cdf__log_8hpp.html new file mode 100644 index 00000000000..b82112cef29 --- /dev/null +++ b/doc/api/html/exp__mod__normal__cdf__log_8hpp.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/exp_mod_normal_cdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
exp_mod_normal_cdf_log.hpp File Reference
+
+
+
#include <boost/random/normal_distribution.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_loc , typename T_scale , typename T_inv_scale >
return_type< T_y, T_loc,
+T_scale, T_inv_scale >::type 
stan::math::exp_mod_normal_cdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_inv_scale &lambda)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/exp__mod__normal__cdf__log_8hpp_source.html b/doc/api/html/exp__mod__normal__cdf__log_8hpp_source.html new file mode 100644 index 00000000000..6360e9e1743 --- /dev/null +++ b/doc/api/html/exp__mod__normal__cdf__log_8hpp_source.html @@ -0,0 +1,280 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/exp_mod_normal_cdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
exp_mod_normal_cdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_EXP_MOD_NORMAL_CDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_EXP_MOD_NORMAL_CDF_LOG_HPP
+
3 
+
4 #include <boost/random/normal_distribution.hpp>
+
5 #include <boost/math/special_functions/fpclassify.hpp>
+
6 #include <boost/random/variate_generator.hpp>
+ + + + + + + + +
15 #include <cmath>
+
16 
+
17 namespace stan {
+
18 
+
19  namespace math {
+
20 
+
21  template <typename T_y, typename T_loc, typename T_scale,
+
22  typename T_inv_scale>
+
23  typename return_type<T_y, T_loc, T_scale, T_inv_scale>::type
+
24  exp_mod_normal_cdf_log(const T_y& y, const T_loc& mu, const T_scale& sigma,
+
25  const T_inv_scale& lambda) {
+
26  static const char* function("stan::math::exp_mod_normal_cdf_log");
+
27  typedef typename stan::partials_return_type<T_y, T_loc, T_scale,
+
28  T_inv_scale>::type
+
29  T_partials_return;
+
30 
+ + + + + +
36 
+
37  T_partials_return cdf_log(0.0);
+
38  // check if any vectors are zero length
+
39  if (!(stan::length(y)
+
40  && stan::length(mu)
+
41  && stan::length(sigma)
+
42  && stan::length(lambda)))
+
43  return cdf_log;
+
44 
+
45  check_not_nan(function, "Random variable", y);
+
46  check_finite(function, "Location parameter", mu);
+
47  check_not_nan(function, "Scale parameter", sigma);
+
48  check_positive_finite(function, "Scale parameter", sigma);
+
49  check_positive_finite(function, "Inv_scale parameter", lambda);
+
50  check_not_nan(function, "Inv_scale parameter", lambda);
+
51  check_consistent_sizes(function,
+
52  "Random variable", y,
+
53  "Location parameter", mu,
+
54  "Scale parameter", sigma,
+
55  "Inv_scale paramter", lambda);
+
56 
+ +
58  operands_and_partials(y, mu, sigma, lambda);
+
59 
+
60  using stan::math::SQRT_2;
+
61  using std::log;
+
62  using std::log;
+
63  using std::exp;
+
64 
+
65  VectorView<const T_y> y_vec(y);
+
66  VectorView<const T_loc> mu_vec(mu);
+
67  VectorView<const T_scale> sigma_vec(sigma);
+
68  VectorView<const T_inv_scale> lambda_vec(lambda);
+
69  size_t N = max_size(y, mu, sigma, lambda);
+
70  const double sqrt_pi = std::sqrt(stan::math::pi());
+
71  for (size_t n = 0; n < N; n++) {
+
72  if (boost::math::isinf(y_vec[n])) {
+
73  if (y_vec[n] < 0.0)
+
74  return operands_and_partials.to_var(stan::math::negative_infinity(),
+
75  y, mu, sigma, lambda);
+
76  else
+
77  return operands_and_partials.to_var(0.0, y, mu, sigma, lambda);
+
78  }
+
79 
+
80  const T_partials_return y_dbl = value_of(y_vec[n]);
+
81  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
82  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
83  const T_partials_return lambda_dbl = value_of(lambda_vec[n]);
+
84  const T_partials_return u = lambda_dbl * (y_dbl - mu_dbl);
+
85  const T_partials_return v = lambda_dbl * sigma_dbl;
+
86  const T_partials_return v_sq = v * v;
+
87  const T_partials_return scaled_diff = (y_dbl - mu_dbl)
+
88  / (SQRT_2 * sigma_dbl);
+
89  const T_partials_return scaled_diff_sq = scaled_diff * scaled_diff;
+
90  const T_partials_return erf_calc1 = 0.5 * (1 + erf(u / (v * SQRT_2)));
+
91  const T_partials_return erf_calc2 = 0.5 * (1 + erf(u / (v * SQRT_2) - v
+
92  / SQRT_2));
+
93  const T_partials_return deriv_1 = lambda_dbl * exp(0.5 * v_sq - u)
+
94  * erf_calc2;
+
95  const T_partials_return deriv_2 = SQRT_2 / sqrt_pi * 0.5
+
96  * exp(0.5 * v_sq - (-scaled_diff + (v / SQRT_2))
+
97  * (-scaled_diff + (v / SQRT_2)) - u) / sigma_dbl;
+
98  const T_partials_return deriv_3 = SQRT_2 / sqrt_pi * 0.5
+
99  * exp(-scaled_diff_sq) / sigma_dbl;
+
100 
+
101  const T_partials_return denom = erf_calc1 - erf_calc2
+
102  * exp(0.5 * v_sq - u);
+
103  const T_partials_return cdf_ = erf_calc1 - exp(-u + v_sq * 0.5)
+
104  * (erf_calc2);
+
105 
+
106  cdf_log += log(cdf_);
+
107 
+ +
109  operands_and_partials.d_x1[n] += (deriv_1 - deriv_2 + deriv_3)
+
110  / denom;
+ +
112  operands_and_partials.d_x2[n] += (-deriv_1 + deriv_2 - deriv_3)
+
113  / denom;
+ +
115  operands_and_partials.d_x3[n]
+
116  += (-deriv_1 * v - deriv_3 * scaled_diff
+
117  * SQRT_2 - deriv_2 * sigma_dbl * SQRT_2
+
118  * (-SQRT_2 * 0.5 * (-lambda_dbl + scaled_diff * SQRT_2
+
119  / sigma_dbl)
+
120  - SQRT_2 * lambda_dbl))
+
121  / denom;
+ +
123  operands_and_partials.d_x4[n]
+
124  += exp(0.5 * v_sq - u)
+
125  * (SQRT_2 / sqrt_pi * 0.5 * sigma_dbl
+
126  * exp(-(v / SQRT_2 - scaled_diff)
+
127  * (v / SQRT_2 - scaled_diff))
+
128  - (v * sigma_dbl + mu_dbl - y_dbl) * erf_calc2)
+
129  / denom;
+
130  }
+
131 
+
132  return operands_and_partials.to_var(cdf_log, y, mu, sigma, lambda);
+
133  }
+
134  }
+
135 }
+
136 #endif
+
137 
+
138 
+
139 
+ +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
fvar< T > erf(const fvar< T > &x)
Definition: erf.hpp:14
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
return_type< T_y, T_loc, T_scale, T_inv_scale >::type exp_mod_normal_cdf_log(const T_y &y, const T_loc &mu, const T_scale &sigma, const T_inv_scale &lambda)
+
const double SQRT_2
The value of the square root of 2, .
Definition: constants.hpp:21
+
bool isinf(const stan::math::var &v)
Checks if the given number is infinite.
Definition: boost_isinf.hpp:22
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
VectorView< T_partials_return, is_vector< T4 >::value, is_constant_struct< T4 >::value > d_x4
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
double pi()
Return the value of pi.
Definition: constants.hpp:86
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/exp__mod__normal__log_8hpp.html b/doc/api/html/exp__mod__normal__log_8hpp.html new file mode 100644 index 00000000000..7fb2ea3b661 --- /dev/null +++ b/doc/api/html/exp__mod__normal__log_8hpp.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/exp_mod_normal_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
exp_mod_normal_log.hpp File Reference
+
+
+
#include <boost/random/normal_distribution.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_inv_scale >
return_type< T_y, T_loc,
+T_scale, T_inv_scale >::type 
stan::math::exp_mod_normal_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_inv_scale &lambda)
 
template<typename T_y , typename T_loc , typename T_scale , typename T_inv_scale >
return_type< T_y, T_loc,
+T_scale, T_inv_scale >::type 
stan::math::exp_mod_normal_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_inv_scale &lambda)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/exp__mod__normal__log_8hpp_source.html b/doc/api/html/exp__mod__normal__log_8hpp_source.html new file mode 100644 index 00000000000..997a4489d56 --- /dev/null +++ b/doc/api/html/exp__mod__normal__log_8hpp_source.html @@ -0,0 +1,287 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/exp_mod_normal_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
exp_mod_normal_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_EXP_MOD_NORMAL_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_EXP_MOD_NORMAL_LOG_HPP
+
3 
+
4 #include <boost/random/normal_distribution.hpp>
+
5 #include <boost/math/special_functions/fpclassify.hpp>
+
6 #include <boost/random/variate_generator.hpp>
+ + + + + + + + +
15 #include <cmath>
+
16 
+
17 namespace stan {
+
18 
+
19  namespace math {
+
20 
+
21  template <bool propto,
+
22  typename T_y, typename T_loc, typename T_scale,
+
23  typename T_inv_scale>
+
24  typename return_type<T_y, T_loc, T_scale, T_inv_scale>::type
+
25  exp_mod_normal_log(const T_y& y, const T_loc& mu, const T_scale& sigma,
+
26  const T_inv_scale& lambda) {
+
27  static const char* function("stan::math::exp_mod_normal_log");
+
28  typedef typename stan::partials_return_type<T_y, T_loc, T_scale,
+
29  T_inv_scale>::type
+
30  T_partials_return;
+
31 
+ + + + + + + +
39  using std::log;
+
40 
+
41  // check if any vectors are zero length
+
42  if (!(stan::length(y)
+
43  && stan::length(mu)
+
44  && stan::length(sigma)
+
45  && stan::length(lambda)))
+
46  return 0.0;
+
47 
+
48  // set up return value accumulator
+
49  T_partials_return logp(0.0);
+
50 
+
51  // validate args (here done over var, which should be OK)
+
52  check_not_nan(function, "Random variable", y);
+
53  check_finite(function, "Location parameter", mu);
+
54  check_positive_finite(function, "Inv_scale parameter", lambda);
+
55  check_positive_finite(function, "Scale parameter", sigma);
+
56  check_consistent_sizes(function,
+
57  "Random variable", y,
+
58  "Location parameter", mu,
+
59  "Scale parameter", sigma,
+
60  "Inv_scale paramter", lambda);
+
61 
+
62  // check if no variables are involved and prop-to
+ +
64  return 0.0;
+
65 
+
66  using boost::math::erfc;
+
67  using std::sqrt;
+
68  using std::log;
+
69  using std::exp;
+
70 
+
71  // set up template expressions wrapping scalars into vector views
+ +
73  operands_and_partials(y, mu, sigma, lambda);
+
74 
+
75  VectorView<const T_y> y_vec(y);
+
76  VectorView<const T_loc> mu_vec(mu);
+
77  VectorView<const T_scale> sigma_vec(sigma);
+
78  VectorView<const T_inv_scale> lambda_vec(lambda);
+
79  size_t N = max_size(y, mu, sigma, lambda);
+
80 
+
81  for (size_t n = 0; n < N; n++) {
+
82  // pull out values of arguments
+
83  const T_partials_return y_dbl = value_of(y_vec[n]);
+
84  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
85  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
86  const T_partials_return lambda_dbl = value_of(lambda_vec[n]);
+
87 
+
88  const T_partials_return pi_dbl = boost::math::constants::pi<double>();
+
89 
+
90  // log probability
+ +
92  logp -= log(2.0);
+ +
94  logp += log(lambda_dbl);
+ +
96  logp += lambda_dbl
+
97  * (mu_dbl + 0.5 * lambda_dbl * sigma_dbl * sigma_dbl - y_dbl)
+
98  + log(erfc((mu_dbl + lambda_dbl * sigma_dbl
+
99  * sigma_dbl - y_dbl)
+
100  / (sqrt(2.0) * sigma_dbl)));
+
101 
+
102  // gradients
+
103  const T_partials_return deriv_logerfc
+
104  = -2.0 / sqrt(pi_dbl)
+
105  * exp(-(mu_dbl + lambda_dbl * sigma_dbl * sigma_dbl - y_dbl)
+
106  / (std::sqrt(2.0) * sigma_dbl)
+
107  * (mu_dbl + lambda_dbl * sigma_dbl * sigma_dbl - y_dbl)
+
108  / (sigma_dbl * std::sqrt(2.0)))
+
109  / erfc((mu_dbl + lambda_dbl * sigma_dbl * sigma_dbl
+
110  - y_dbl) / (sigma_dbl * std::sqrt(2.0)));
+
111 
+ +
113  operands_and_partials.d_x1[n]
+
114  += -lambda_dbl
+
115  + deriv_logerfc * -1.0 / (sigma_dbl * std::sqrt(2.0));
+ +
117  operands_and_partials.d_x2[n]
+
118  += lambda_dbl
+
119  + deriv_logerfc / (sigma_dbl * std::sqrt(2.0));
+ +
121  operands_and_partials.d_x3[n]
+
122  += sigma_dbl * lambda_dbl * lambda_dbl
+
123  + deriv_logerfc
+
124  * (-mu_dbl / (sigma_dbl * sigma_dbl * std::sqrt(2.0))
+
125  + lambda_dbl / std::sqrt(2.0)
+
126  + y_dbl / (sigma_dbl * sigma_dbl * std::sqrt(2.0)));
+ +
128  operands_and_partials.d_x4[n]
+
129  += 1 / lambda_dbl + lambda_dbl * sigma_dbl * sigma_dbl
+
130  + mu_dbl - y_dbl + deriv_logerfc * sigma_dbl / std::sqrt(2.0);
+
131  }
+
132  return operands_and_partials.to_var(logp, y, mu, sigma, lambda);
+
133  }
+
134 
+
135  template <typename T_y, typename T_loc, typename T_scale,
+
136  typename T_inv_scale>
+
137  inline
+ +
139  exp_mod_normal_log(const T_y& y, const T_loc& mu, const T_scale& sigma,
+
140  const T_inv_scale& lambda) {
+
141  return exp_mod_normal_log<false>(y, mu, sigma, lambda);
+
142  }
+
143  }
+
144 }
+
145 #endif
+
146 
+
147 
+
148 
+ +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+
return_type< T_y, T_loc, T_scale, T_inv_scale >::type exp_mod_normal_log(const T_y &y, const T_loc &mu, const T_scale &sigma, const T_inv_scale &lambda)
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
VectorView< T_partials_return, is_vector< T4 >::value, is_constant_struct< T4 >::value > d_x4
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
fvar< T > erfc(const fvar< T > &x)
Definition: erfc.hpp:14
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/exp__mod__normal__rng_8hpp.html b/doc/api/html/exp__mod__normal__rng_8hpp.html new file mode 100644 index 00000000000..7db9349ad5d --- /dev/null +++ b/doc/api/html/exp__mod__normal__rng_8hpp.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/exp_mod_normal_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
exp_mod_normal_rng.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
double stan::math::exp_mod_normal_rng (const double mu, const double sigma, const double lambda, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/exp__mod__normal__rng_8hpp_source.html b/doc/api/html/exp__mod__normal__rng_8hpp_source.html new file mode 100644 index 00000000000..96c4d205bf9 --- /dev/null +++ b/doc/api/html/exp__mod__normal__rng_8hpp_source.html @@ -0,0 +1,178 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/exp_mod_normal_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
exp_mod_normal_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_EXP_MOD_NORMAL_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_EXP_MOD_NORMAL_RNG_HPP
+
3 
+
4 #include <boost/random/normal_distribution.hpp>
+
5 #include <boost/math/special_functions/fpclassify.hpp>
+
6 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + +
22 
+
23 namespace stan {
+
24 
+
25  namespace math {
+
26 
+
27  template <class RNG>
+
28  inline double
+
29  exp_mod_normal_rng(const double mu,
+
30  const double sigma,
+
31  const double lambda,
+
32  RNG& rng) {
+
33  static const char* function("stan::math::exp_mod_normal_rng");
+
34 
+ + +
37 
+
38  check_finite(function, "Location parameter", mu);
+
39  check_positive_finite(function, "Inv_scale parameter", lambda);
+
40  check_positive_finite(function, "Scale parameter", sigma);
+
41 
+
42  return stan::math::normal_rng(mu, sigma, rng)
+
43  + stan::math::exponential_rng(lambda, rng);
+
44  }
+
45  }
+
46 }
+
47 #endif
+
48 
+
49 
+
50 
+ + + + + +
double exponential_rng(const double beta, RNG &rng)
+ +
double exp_mod_normal_rng(const double mu, const double sigma, const double lambda, RNG &rng)
+ + + + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + + + +
double normal_rng(const double mu, const double sigma, RNG &rng)
Definition: normal_rng.hpp:20
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/exponential__ccdf__log_8hpp.html b/doc/api/html/exponential__ccdf__log_8hpp.html new file mode 100644 index 00000000000..9acac0ee3e7 --- /dev/null +++ b/doc/api/html/exponential__ccdf__log_8hpp.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/exponential_ccdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
exponential_ccdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_inv_scale >
return_type< T_y, T_inv_scale >
+::type 
stan::math::exponential_ccdf_log (const T_y &y, const T_inv_scale &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/exponential__ccdf__log_8hpp_source.html b/doc/api/html/exponential__ccdf__log_8hpp_source.html new file mode 100644 index 00000000000..a91388299ab --- /dev/null +++ b/doc/api/html/exponential__ccdf__log_8hpp_source.html @@ -0,0 +1,208 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/exponential_ccdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
exponential_ccdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_EXPONENTIAL_CCDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_EXPONENTIAL_CCDF_LOG_HPP
+
3 
+
4 #include <boost/random/exponential_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + +
20 
+
21 namespace stan {
+
22 
+
23  namespace math {
+
24 
+
25  template <typename T_y, typename T_inv_scale>
+
26  typename return_type<T_y, T_inv_scale>::type
+
27  exponential_ccdf_log(const T_y& y, const T_inv_scale& beta) {
+ +
29  T_partials_return;
+
30 
+
31  static const char* function("stan::math::exponential_ccdf_log");
+
32 
+ + + +
36  using boost::math::tools::promote_args;
+ +
38 
+
39  T_partials_return ccdf_log(0.0);
+
40  // check if any vectors are zero length
+
41  if (!(stan::length(y)
+
42  && stan::length(beta)))
+
43  return ccdf_log;
+
44 
+
45  check_not_nan(function, "Random variable", y);
+
46  check_nonnegative(function, "Random variable", y);
+
47  check_positive_finite(function, "Inverse scale parameter", beta);
+
48 
+ +
50  operands_and_partials(y, beta);
+
51 
+
52  VectorView<const T_y> y_vec(y);
+
53  VectorView<const T_inv_scale> beta_vec(beta);
+
54  size_t N = max_size(y, beta);
+
55  for (size_t n = 0; n < N; n++) {
+
56  const T_partials_return beta_dbl = value_of(beta_vec[n]);
+
57  const T_partials_return y_dbl = value_of(y_vec[n]);
+
58  // log ccdf
+
59  ccdf_log += -beta_dbl * y_dbl;
+
60 
+
61  // gradients
+ +
63  operands_and_partials.d_x1[n] -= beta_dbl;
+ +
65  operands_and_partials.d_x2[n] -= y_dbl;
+
66  }
+
67  return operands_and_partials.to_var(ccdf_log, y, beta);
+
68  }
+
69  }
+
70 }
+
71 
+
72 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
return_type< T_y, T_inv_scale >::type exponential_ccdf_log(const T_y &y, const T_inv_scale &beta)
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + + +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/exponential__cdf_8hpp.html b/doc/api/html/exponential__cdf_8hpp.html new file mode 100644 index 00000000000..32db6ce807c --- /dev/null +++ b/doc/api/html/exponential__cdf_8hpp.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/exponential_cdf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
exponential_cdf.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y , typename T_inv_scale >
return_type< T_y, T_inv_scale >
+::type 
stan::math::exponential_cdf (const T_y &y, const T_inv_scale &beta)
 Calculates the exponential cumulative distribution function for the given y and beta. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/exponential__cdf_8hpp_source.html b/doc/api/html/exponential__cdf_8hpp_source.html new file mode 100644 index 00000000000..274c96e277e --- /dev/null +++ b/doc/api/html/exponential__cdf_8hpp_source.html @@ -0,0 +1,221 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/exponential_cdf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
exponential_cdf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_EXPONENTIAL_CDF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_EXPONENTIAL_CDF_HPP
+
3 
+
4 #include <boost/random/exponential_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + +
20 #include <cmath>
+
21 
+
22 namespace stan {
+
23 
+
24  namespace math {
+
25 
+
38  template <typename T_y, typename T_inv_scale>
+
39  typename return_type<T_y, T_inv_scale>::type
+
40  exponential_cdf(const T_y& y, const T_inv_scale& beta) {
+ +
42  T_partials_return;
+
43 
+
44  static const char* function("stan::math::exponential_cdf");
+
45 
+ + + +
49  using boost::math::tools::promote_args;
+ +
51  using std::exp;
+
52 
+
53  T_partials_return cdf(1.0);
+
54  // check if any vectors are zero length
+
55  if (!(stan::length(y)
+
56  && stan::length(beta)))
+
57  return cdf;
+
58 
+
59  check_not_nan(function, "Random variable", y);
+
60  check_nonnegative(function, "Random variable", y);
+
61  check_positive_finite(function, "Inverse scale parameter", beta);
+
62 
+ +
64  operands_and_partials(y, beta);
+
65 
+
66  VectorView<const T_y> y_vec(y);
+
67  VectorView<const T_inv_scale> beta_vec(beta);
+
68  size_t N = max_size(y, beta);
+
69  for (size_t n = 0; n < N; n++) {
+
70  const T_partials_return beta_dbl = value_of(beta_vec[n]);
+
71  const T_partials_return y_dbl = value_of(y_vec[n]);
+
72  const T_partials_return one_m_exp = 1.0 - exp(-beta_dbl * y_dbl);
+
73 
+
74  // cdf
+
75  cdf *= one_m_exp;
+
76  }
+
77 
+
78  for (size_t n = 0; n < N; n++) {
+
79  const T_partials_return beta_dbl = value_of(beta_vec[n]);
+
80  const T_partials_return y_dbl = value_of(y_vec[n]);
+
81  const T_partials_return one_m_exp = 1.0 - exp(-beta_dbl * y_dbl);
+
82 
+
83  // gradients
+
84  T_partials_return rep_deriv = exp(-beta_dbl * y_dbl) / one_m_exp;
+ +
86  operands_and_partials.d_x1[n] += rep_deriv * beta_dbl * cdf;
+ +
88  operands_and_partials.d_x2[n] += rep_deriv * y_dbl * cdf;
+
89  }
+
90 
+
91  return operands_and_partials.to_var(cdf, y, beta);
+
92  }
+
93  }
+
94 }
+
95 
+
96 #endif
+ +
return_type< T_y, T_inv_scale >::type exponential_cdf(const T_y &y, const T_inv_scale &beta)
Calculates the exponential cumulative distribution function for the given y and beta.
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + + +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/exponential__cdf__log_8hpp.html b/doc/api/html/exponential__cdf__log_8hpp.html new file mode 100644 index 00000000000..06c9dc3831f --- /dev/null +++ b/doc/api/html/exponential__cdf__log_8hpp.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/exponential_cdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
exponential_cdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_inv_scale >
return_type< T_y, T_inv_scale >
+::type 
stan::math::exponential_cdf_log (const T_y &y, const T_inv_scale &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/exponential__cdf__log_8hpp_source.html b/doc/api/html/exponential__cdf__log_8hpp_source.html new file mode 100644 index 00000000000..be1843e1e00 --- /dev/null +++ b/doc/api/html/exponential__cdf__log_8hpp_source.html @@ -0,0 +1,216 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/exponential_cdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
exponential_cdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_EXPONENTIAL_CDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_EXPONENTIAL_CDF_LOG_HPP
+
3 
+
4 #include <boost/random/exponential_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + +
20 #include <cmath>
+
21 
+
22 namespace stan {
+
23 
+
24  namespace math {
+
25 
+
26  template <typename T_y, typename T_inv_scale>
+
27  typename return_type<T_y, T_inv_scale>::type
+
28  exponential_cdf_log(const T_y& y, const T_inv_scale& beta) {
+
29  typedef
+ +
31  T_partials_return;
+
32 
+
33  static const char* function("stan::math::exponential_cdf_log");
+
34 
+ + + +
38  using boost::math::tools::promote_args;
+ +
40  using std::log;
+
41  using std::exp;
+
42 
+
43  T_partials_return cdf_log(0.0);
+
44  // check if any vectors are zero length
+
45  if (!(stan::length(y)
+
46  && stan::length(beta)))
+
47  return cdf_log;
+
48 
+
49  check_not_nan(function, "Random variable", y);
+
50  check_nonnegative(function, "Random variable", y);
+
51  check_positive_finite(function, "Inverse scale parameter", beta);
+
52 
+ +
54  operands_and_partials(y, beta);
+
55 
+
56  VectorView<const T_y> y_vec(y);
+
57  VectorView<const T_inv_scale> beta_vec(beta);
+
58  size_t N = max_size(y, beta);
+
59  for (size_t n = 0; n < N; n++) {
+
60  const T_partials_return beta_dbl = value_of(beta_vec[n]);
+
61  const T_partials_return y_dbl = value_of(y_vec[n]);
+
62  T_partials_return one_m_exp = 1.0 - exp(-beta_dbl * y_dbl);
+
63  // log cdf
+
64  cdf_log += log(one_m_exp);
+
65 
+
66  // gradients
+
67  T_partials_return rep_deriv = -exp(-beta_dbl * y_dbl) / one_m_exp;
+ +
69  operands_and_partials.d_x1[n] -= rep_deriv * beta_dbl;
+ +
71  operands_and_partials.d_x2[n] -= rep_deriv * y_dbl;
+
72  }
+
73  return operands_and_partials.to_var(cdf_log, y, beta);
+
74  }
+
75  }
+
76 }
+
77 
+
78 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + + +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
return_type< T_y, T_inv_scale >::type exponential_cdf_log(const T_y &y, const T_inv_scale &beta)
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/exponential__log_8hpp.html b/doc/api/html/exponential__log_8hpp.html new file mode 100644 index 00000000000..f3e6df5f7f9 --- /dev/null +++ b/doc/api/html/exponential__log_8hpp.html @@ -0,0 +1,151 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/exponential_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
exponential_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_inv_scale >
return_type< T_y, T_inv_scale >
+::type 
stan::math::exponential_log (const T_y &y, const T_inv_scale &beta)
 The log of an exponential density for y with the specified inverse scale parameter. More...
 
template<typename T_y , typename T_inv_scale >
return_type< T_y, T_inv_scale >
+::type 
stan::math::exponential_log (const T_y &y, const T_inv_scale &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/exponential__log_8hpp_source.html b/doc/api/html/exponential__log_8hpp_source.html new file mode 100644 index 00000000000..93393ea5276 --- /dev/null +++ b/doc/api/html/exponential__log_8hpp_source.html @@ -0,0 +1,232 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/exponential_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
exponential_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_EXPONENTIAL_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_EXPONENTIAL_LOG_HPP
+
3 
+
4 #include <boost/random/exponential_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + +
20 #include <cmath>
+
21 
+
22 namespace stan {
+
23 
+
24  namespace math {
+
25 
+
52  template <bool propto, typename T_y, typename T_inv_scale>
+
53  typename return_type<T_y, T_inv_scale>::type
+
54  exponential_log(const T_y& y, const T_inv_scale& beta) {
+
55  static const char* function("stan::math::exponential_log");
+ +
57  T_partials_return;
+
58 
+
59  // check if any vectors are zero length
+
60  if (!(stan::length(y)
+
61  && stan::length(beta)))
+
62  return 0.0;
+
63 
+ + + + +
68  using std::log;
+
69 
+
70  T_partials_return logp(0.0);
+
71  check_nonnegative(function, "Random variable", y);
+
72  check_positive_finite(function, "Inverse scale parameter", beta);
+
73  check_consistent_sizes(function,
+
74  "Random variable", y,
+
75  "Inverse scale parameter", beta);
+
76 
+
77 
+
78  // set up template expressions wrapping scalars into vector views
+
79  VectorView<const T_y> y_vec(y);
+
80  VectorView<const T_inv_scale> beta_vec(beta);
+
81  size_t N = max_size(y, beta);
+
82 
+ +
84  T_partials_return, T_inv_scale> log_beta(length(beta));
+
85  for (size_t i = 0; i < length(beta); i++)
+ +
87  log_beta[i] = log(value_of(beta_vec[i]));
+
88 
+ +
90  operands_and_partials(y, beta);
+
91 
+
92  for (size_t n = 0; n < N; n++) {
+
93  const T_partials_return beta_dbl = value_of(beta_vec[n]);
+
94  const T_partials_return y_dbl = value_of(y_vec[n]);
+ +
96  logp += log_beta[n];
+ +
98  logp -= beta_dbl * y_dbl;
+
99 
+ +
101  operands_and_partials.d_x1[n] -= beta_dbl;
+ +
103  operands_and_partials.d_x2[n] += 1 / beta_dbl - y_dbl;
+
104  }
+
105  return operands_and_partials.to_var(logp, y, beta);
+
106  }
+
107 
+
108  template <typename T_y, typename T_inv_scale>
+
109  inline
+ +
111  exponential_log(const T_y& y, const T_inv_scale& beta) {
+
112  return exponential_log<false>(y, beta);
+
113  }
+
114  }
+
115 }
+
116 
+
117 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ +
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
return_type< T_y, T_inv_scale >::type exponential_log(const T_y &y, const T_inv_scale &beta)
The log of an exponential density for y with the specified inverse scale parameter.
+
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/exponential__rng_8hpp.html b/doc/api/html/exponential__rng_8hpp.html new file mode 100644 index 00000000000..3e13b9eec9b --- /dev/null +++ b/doc/api/html/exponential__rng_8hpp.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/exponential_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
exponential_rng.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
double stan::math::exponential_rng (const double beta, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/exponential__rng_8hpp_source.html b/doc/api/html/exponential__rng_8hpp_source.html new file mode 100644 index 00000000000..c4d1dddf263 --- /dev/null +++ b/doc/api/html/exponential__rng_8hpp_source.html @@ -0,0 +1,169 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/exponential_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
exponential_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_EXPONENTIAL_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_EXPONENTIAL_RNG_HPP
+
3 
+
4 #include <boost/random/exponential_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + +
20 
+
21 namespace stan {
+
22 
+
23  namespace math {
+
24 
+
25  template <class RNG>
+
26  inline double
+
27  exponential_rng(const double beta,
+
28  RNG& rng) {
+
29  using boost::variate_generator;
+
30  using boost::exponential_distribution;
+
31 
+
32  static const char* function("stan::math::exponential_rng");
+
33 
+ +
35 
+
36  check_positive_finite(function, "Inverse scale parameter", beta);
+
37 
+
38  variate_generator<RNG&, exponential_distribution<> >
+
39  exp_rng(rng, exponential_distribution<>(beta));
+
40  return exp_rng();
+
41  }
+
42  }
+
43 }
+
44 
+
45 #endif
+ + + + +
double exponential_rng(const double beta, RNG &rng)
+ + + + + + + + + + +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/factor___u_8hpp.html b/doc/api/html/factor___u_8hpp.html new file mode 100644 index 00000000000..7a22011ba99 --- /dev/null +++ b/doc/api/html/factor___u_8hpp.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/factor_U.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
factor_U.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <cmath>
+#include <cstddef>
+#include <iostream>
+#include <limits>
+#include <stdexcept>
+#include <sstream>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
void stan::math::factor_U (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &U, Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs)
 This function is intended to make starting values, given a unit upper-triangular matrix U such that U'DU is a correlation matrix. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/factor___u_8hpp_source.html b/doc/api/html/factor___u_8hpp_source.html new file mode 100644 index 00000000000..5d0294c9a4b --- /dev/null +++ b/doc/api/html/factor___u_8hpp_source.html @@ -0,0 +1,169 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/factor_U.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
factor_U.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_FACTOR_U_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_FACTOR_U_HPP
+
3 
+ + +
6 
+
7 #include <cmath>
+
8 #include <cstddef>
+
9 #include <iostream>
+
10 #include <limits>
+
11 #include <stdexcept>
+
12 #include <sstream>
+
13 #include <vector>
+
14 
+
15 
+
16 namespace stan {
+
17 
+
18  namespace math {
+
19 
+
27  template<typename T>
+
28  void
+
29  factor_U(const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>& U,
+
30  Eigen::Array<T, Eigen::Dynamic, 1>& CPCs) {
+
31  size_t K = U.rows();
+
32  size_t position = 0;
+
33  size_t pull = K - 1;
+
34 
+
35  if (K == 2) {
+
36  CPCs(0) = atanh(U(0, 1));
+
37  return;
+
38  }
+
39 
+
40  Eigen::Array<T, 1, Eigen::Dynamic> temp = U.row(0).tail(pull);
+
41 
+
42  CPCs.head(pull) = temp;
+
43 
+
44  Eigen::Array<T, Eigen::Dynamic, 1> acc(K);
+
45  acc(0) = -0.0;
+
46  acc.tail(pull) = 1.0 - temp.square();
+
47  for (size_t i = 1; i < (K - 1); i++) {
+
48  position += pull;
+
49  pull--;
+
50  temp = U.row(i).tail(pull);
+
51  temp /= sqrt(acc.tail(pull) / acc(i));
+
52  CPCs.segment(position, pull) = temp;
+
53  acc.tail(pull) *= 1.0 - temp.square();
+
54  }
+
55  CPCs = 0.5 * ( (1.0 + CPCs) / (1.0 - CPCs) ).log(); // now unbounded
+
56  }
+
57 
+
58  }
+
59 
+
60 }
+
61 
+
62 #endif
+
fvar< T > atanh(const fvar< T > &x)
Definition: atanh.hpp:13
+
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
void factor_U(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &U, Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs)
This function is intended to make starting values, given a unit upper-triangular matrix U such that U...
Definition: factor_U.hpp:29
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/factor__cov__matrix_8hpp.html b/doc/api/html/factor__cov__matrix_8hpp.html new file mode 100644 index 00000000000..137395874d9 --- /dev/null +++ b/doc/api/html/factor__cov__matrix_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/factor_cov_matrix.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
factor_cov_matrix.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/fun/factor_U.hpp>
+#include <cstddef>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
bool stan::math::factor_cov_matrix (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &Sigma, Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, Eigen::Array< T, Eigen::Dynamic, 1 > &sds)
 This function is intended to make starting values, given a covariance matrix Sigma. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/factor__cov__matrix_8hpp_source.html b/doc/api/html/factor__cov__matrix_8hpp_source.html new file mode 100644 index 00000000000..93c8c3b51d1 --- /dev/null +++ b/doc/api/html/factor__cov__matrix_8hpp_source.html @@ -0,0 +1,157 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/factor_cov_matrix.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
factor_cov_matrix.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_FACTOR_COV_MATRIX_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_FACTOR_COV_MATRIX_HPP
+
3 
+ + +
6 #include <cstddef>
+
7 
+
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
25  template<typename T>
+
26  bool
+
27  factor_cov_matrix(const Eigen::Matrix
+
28  <T, Eigen::Dynamic, Eigen::Dynamic>& Sigma,
+
29  Eigen::Array<T, Eigen::Dynamic, 1>& CPCs,
+
30  Eigen::Array<T, Eigen::Dynamic, 1>& sds) {
+
31  size_t K = sds.rows();
+
32 
+
33  sds = Sigma.diagonal().array();
+
34  if ( (sds <= 0.0).any() ) return false;
+
35  sds = sds.sqrt();
+
36 
+
37  Eigen::DiagonalMatrix<T, Eigen::Dynamic> D(K);
+
38  D.diagonal() = sds.inverse();
+
39  sds = sds.log(); // now unbounded
+
40 
+
41  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> R = D * Sigma * D;
+
42  // to hopefully prevent pivoting due to floating point error
+
43  R.diagonal().setOnes();
+
44  Eigen::LDLT<Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> > ldlt;
+
45  ldlt = R.ldlt();
+
46  if (!ldlt.isPositive())
+
47  return false;
+
48  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> U = ldlt.matrixU();
+
49  factor_U(U, CPCs);
+
50  return true;
+
51  }
+
52 
+
53  }
+
54 
+
55 }
+
56 
+
57 #endif
+ +
bool factor_cov_matrix(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &Sigma, Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, Eigen::Array< T, Eigen::Dynamic, 1 > &sds)
This function is intended to make starting values, given a covariance matrix Sigma.
+
void factor_U(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &U, Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs)
This function is intended to make starting values, given a unit upper-triangular matrix U such that U...
Definition: factor_U.hpp:29
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/files.html b/doc/api/html/files.html new file mode 100644 index 00000000000..c4b3242c2c3 --- /dev/null +++ b/doc/api/html/files.html @@ -0,0 +1,1018 @@ + + + + + + +Stan Math Library: File List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
+
File List
+
+
+
Here is a list of all files with brief descriptions:
+
[detail level 123456]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\-stan
 o-math
 |o-fwd
 ||o+arr
 ||o+core
 ||o+mat
 ||o+scal
 ||\*core.hpp
 |o-memory
 ||\*stack_alloc.hpp
 |o-mix
 ||o+mat
 ||\*arr.hpp
 |o-prim
 ||o+arr
 ||o+mat
 ||\+scal
 |o-rev
 ||o+arr
 ||o+core
 ||o+mat
 ||o+scal
 ||\*core.hpp
 |\*version.hpp
 \*math.hpp
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fill_8hpp.html b/doc/api/html/fill_8hpp.html new file mode 100644 index 00000000000..c29df24c41e --- /dev/null +++ b/doc/api/html/fill_8hpp.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/fill.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
fill.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + +

+Functions

template<typename T , typename S >
void stan::math::fill (T &x, const S &y)
 Fill the specified container with the specified value. More...
 
template<typename T , int R, int C, typename S >
void stan::math::fill (Eigen::Matrix< T, R, C > &x, const S &y)
 Fill the specified container with the specified value. More...
 
template<typename T , typename S >
void stan::math::fill (std::vector< T > &x, const S &y)
 Fill the specified container with the specified value. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fill_8hpp_source.html b/doc/api/html/fill_8hpp_source.html new file mode 100644 index 00000000000..9a8f9da2ec2 --- /dev/null +++ b/doc/api/html/fill_8hpp_source.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/fill.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
fill.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_FILL_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_FILL_HPP
+
3 
+ +
5 #include <vector>
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
21  template <typename T, typename S>
+
22  void fill(T& x, const S& y) {
+
23  x = y;
+
24  }
+
25 
+
38  template <typename T, int R, int C, typename S>
+
39  void fill(Eigen::Matrix<T, R, C>& x, const S& y) {
+
40  x.fill(y);
+
41  }
+
42 
+
54  template <typename T, typename S>
+
55  void fill(std::vector<T>& x, const S& y) {
+
56  for (size_t i = 0; i < x.size(); ++i)
+
57  fill(x[i], y);
+
58  }
+
59 
+
60 
+
61 
+
62  }
+
63 }
+
64 #endif
+
void fill(T &x, const S &y)
Fill the specified container with the specified value.
Definition: fill.hpp:22
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/finite__diff__grad__hessian_8hpp.html b/doc/api/html/finite__diff__grad__hessian_8hpp.html new file mode 100644 index 00000000000..43ac87c34cd --- /dev/null +++ b/doc/api/html/finite__diff__grad__hessian_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/mix/mat/functor/finite_diff_grad_hessian.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
finite_diff_grad_hessian.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename F >
void stan::math::finite_diff_grad_hessian (const F &f, const Eigen::Matrix< double,-1, 1 > &x, double &fx, Eigen::Matrix< double,-1,-1 > &hess, std::vector< Eigen::Matrix< double,-1,-1 > > &grad_hess_fx, const double epsilon=1e-04)
 Calculate the value and the gradient of the hessian of the specified function at the specified argument using second-order autodiff and first-order finite difference. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/finite__diff__grad__hessian_8hpp_source.html b/doc/api/html/finite__diff__grad__hessian_8hpp_source.html new file mode 100644 index 00000000000..e7d856febaa --- /dev/null +++ b/doc/api/html/finite__diff__grad__hessian_8hpp_source.html @@ -0,0 +1,177 @@ + + + + + + +Stan Math Library: stan/math/mix/mat/functor/finite_diff_grad_hessian.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
finite_diff_grad_hessian.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_MIX_MAT_FUNCTOR_FINITE_DIFF_GRAD_HESSIAN_HPP
+
2 #define STAN_MATH_MIX_MAT_FUNCTOR_FINITE_DIFF_GRAD_HESSIAN_HPP
+
3 
+ +
5 #include <stan/math/rev/core.hpp>
+ +
7 #include <vector>
+
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
41  template <typename F>
+
42  void
+ +
44  const Eigen::Matrix<double, -1, 1>& x,
+
45  double& fx,
+
46  Eigen::Matrix<double, -1, -1>& hess,
+
47  std::vector<Eigen::Matrix<double, -1, -1> >&
+
48  grad_hess_fx,
+
49  const double epsilon = 1e-04) {
+
50  using Eigen::Matrix;
+
51  using Eigen::Dynamic;
+
52 
+
53  int d = x.size();
+
54  double dummy_fx_eval;
+
55 
+
56  Matrix<double, Dynamic, 1> x_temp(x);
+
57  Matrix<double, Dynamic, 1> grad_auto(d);
+
58  Matrix<double, Dynamic, Dynamic> hess_auto(d, d);
+
59  Matrix<double, Dynamic, Dynamic> hess_diff(d, d);
+
60 
+
61  hessian(f, x, fx, grad_auto, hess);
+
62  for (int i = 0; i < d; ++i) {
+
63  hess_diff.setZero();
+
64 
+
65  x_temp(i) = x(i) + 2.0 * epsilon;
+
66  hessian(f, x_temp, dummy_fx_eval, grad_auto, hess_auto);
+
67  hess_diff = -hess_auto;
+
68 
+
69  x_temp(i) = x(i) + -2.0 * epsilon;
+
70  hessian(f, x_temp, dummy_fx_eval, grad_auto, hess_auto);
+
71  hess_diff += hess_auto;
+
72 
+
73  x_temp(i) = x(i) + epsilon;
+
74  hessian(f, x_temp, dummy_fx_eval, grad_auto, hess_auto);
+
75  hess_diff += 8.0 * hess_auto;
+
76 
+
77  x_temp(i) = x(i) + -epsilon;
+
78  hessian(f, x_temp, dummy_fx_eval, grad_auto, hess_auto);
+
79  hess_diff -= 8.0 * hess_auto;
+
80 
+
81  x_temp(i) = x(i);
+
82  hess_diff /= 12.0 * epsilon;
+
83 
+
84  grad_hess_fx.push_back(hess_diff);
+
85  }
+
86  fx = f(x);
+
87  }
+
88 
+
89  }
+
90 }
+
91 #endif
+ +
void finite_diff_grad_hessian(const F &f, const Eigen::Matrix< double,-1, 1 > &x, double &fx, Eigen::Matrix< double,-1,-1 > &hess, std::vector< Eigen::Matrix< double,-1,-1 > > &grad_hess_fx, const double epsilon=1e-04)
Calculate the value and the gradient of the hessian of the specified function at the specified argume...
+ + +
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+
void hessian(const F &f, const Eigen::Matrix< double, Dynamic, 1 > &x, double &fx, Eigen::Matrix< double, Dynamic, 1 > &grad, Eigen::Matrix< double, Dynamic, Dynamic > &H)
Calculate the value, the gradient, and the Hessian, of the specified function at the specified argume...
Definition: hessian.hpp:46
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/finite__diff__gradient_8hpp.html b/doc/api/html/finite__diff__gradient_8hpp.html new file mode 100644 index 00000000000..2d9cbd30a8f --- /dev/null +++ b/doc/api/html/finite__diff__gradient_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/functor/finite_diff_gradient.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
finite_diff_gradient.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename F >
void stan::math::finite_diff_gradient (const F &f, const Eigen::Matrix< double,-1, 1 > &x, double &fx, Eigen::Matrix< double,-1, 1 > &grad_fx, const double epsilon=1e-03)
 Calculate the value and the gradient of the specified function at the specified argument using finite difference. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/finite__diff__gradient_8hpp_source.html b/doc/api/html/finite__diff__gradient_8hpp_source.html new file mode 100644 index 00000000000..3be23097b28 --- /dev/null +++ b/doc/api/html/finite__diff__gradient_8hpp_source.html @@ -0,0 +1,166 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/functor/finite_diff_gradient.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
finite_diff_gradient.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUNCTOR_FINITE_DIFF_GRADIENT_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUNCTOR_FINITE_DIFF_GRADIENT_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7 
+
8  namespace math {
+
9 
+
37  template <typename F>
+
38  void
+ +
40  const Eigen::Matrix<double, -1, 1>& x,
+
41  double& fx,
+
42  Eigen::Matrix<double, -1, 1>& grad_fx,
+
43  const double epsilon = 1e-03) {
+
44  using Eigen::Matrix;
+
45  using Eigen::Dynamic;
+
46  Matrix<double, Dynamic, 1> x_temp(x);
+
47 
+
48  int d = x.size();
+
49  grad_fx.resize(d);
+
50 
+
51  fx = f(x);
+
52 
+
53  for (int i = 0; i < d; ++i) {
+
54  double delta_f = 0.0;
+
55 
+
56  x_temp(i) = x(i) + 3.0 * epsilon;
+
57  delta_f = f(x_temp);
+
58 
+
59  x_temp(i) = x(i) + 2.0 * epsilon;
+
60  delta_f -= 9.0 * f(x_temp);
+
61 
+
62  x_temp(i) = x(i) + epsilon;
+
63  delta_f += 45.0 * f(x_temp);
+
64 
+
65  x_temp(i) = x(i) + -3.0 * epsilon;
+
66  delta_f -= f(x_temp);
+
67 
+
68  x_temp(i) = x(i) + -2.0 * epsilon;
+
69  delta_f += 9.0 * f(x_temp);
+
70 
+
71  x_temp(i) = x(i) + -epsilon;
+
72  delta_f -= 45.0 * f(x_temp);
+
73 
+
74  delta_f /= 60 * epsilon;
+
75 
+
76  x_temp(i) = x(i);
+
77  grad_fx(i) = delta_f;
+
78  }
+
79  }
+
80  }
+
81 }
+
82 #endif
+ +
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+
void finite_diff_gradient(const F &f, const Eigen::Matrix< double,-1, 1 > &x, double &fx, Eigen::Matrix< double,-1, 1 > &grad_fx, const double epsilon=1e-03)
Calculate the value and the gradient of the specified function at the specified argument using finite...
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/finite__diff__hessian_8hpp.html b/doc/api/html/finite__diff__hessian_8hpp.html new file mode 100644 index 00000000000..41780016bd7 --- /dev/null +++ b/doc/api/html/finite__diff__hessian_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/functor/finite_diff_hessian.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
finite_diff_hessian.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

template<typename F >
double stan::math::finite_diff_hess_helper (const F &f, const Eigen::Matrix< double, Eigen::Dynamic, 1 > &x, const int lambda, const double epsilon=1e-03)
 
template<typename F >
void stan::math::finite_diff_hessian (const F &f, const Eigen::Matrix< double,-1, 1 > &x, double &fx, Eigen::Matrix< double,-1, 1 > &grad_fx, Eigen::Matrix< double,-1,-1 > &hess_fx, const double epsilon=1e-03)
 Calculate the value and the Hessian of the specified function at the specified argument using second-order finite difference. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/finite__diff__hessian_8hpp_source.html b/doc/api/html/finite__diff__hessian_8hpp_source.html new file mode 100644 index 00000000000..1367f1c1d54 --- /dev/null +++ b/doc/api/html/finite__diff__hessian_8hpp_source.html @@ -0,0 +1,204 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/functor/finite_diff_hessian.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
finite_diff_hessian.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUNCTOR_FINITE_DIFF_HESSIAN_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUNCTOR_FINITE_DIFF_HESSIAN_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
11  template <typename F>
+
12  double
+ +
14  const Eigen::Matrix<double, Eigen::Dynamic, 1>& x,
+
15  const int lambda,
+
16  const double epsilon = 1e-03) {
+
17  using Eigen::Matrix;
+
18  using Eigen::Dynamic;
+
19 
+
20  Matrix<double, Dynamic, 1> x_temp(x);
+
21 
+
22  double grad = 0.0;
+
23  x_temp(lambda) = x(lambda) + 2.0 * epsilon;
+
24  grad = -f(x_temp);
+
25 
+
26  x_temp(lambda) = x(lambda) + -2.0 * epsilon;
+
27  grad += f(x_temp);
+
28 
+
29  x_temp(lambda) = x(lambda) + epsilon;
+
30  grad += 8.0 * f(x_temp);
+
31 
+
32  x_temp(lambda) = x(lambda) + -epsilon;
+
33  grad -= 8.0 * f(x_temp);
+
34 
+
35  return grad;
+
36  }
+
37 
+
65  template <typename F>
+
66  void
+
67  finite_diff_hessian(const F& f,
+
68  const Eigen::Matrix<double, -1, 1>& x,
+
69  double& fx,
+
70  Eigen::Matrix<double, -1, 1>& grad_fx,
+
71  Eigen::Matrix<double, -1, -1>& hess_fx,
+
72  const double epsilon = 1e-03) {
+
73  using Eigen::Matrix;
+
74  using Eigen::Dynamic;
+
75 
+
76  int d = x.size();
+
77 
+
78  Matrix<double, Dynamic, 1> x_temp(x);
+
79  hess_fx.resize(d, d);
+
80 
+
81  finite_diff_gradient(f, x, fx, grad_fx);
+
82  double f_diff(0.0);
+
83  for (int i = 0; i < d; ++i) {
+
84  for (int j = i; j < d; ++j) {
+
85  x_temp(i) += 2.0 * epsilon;
+
86  if (i != j) {
+
87  f_diff = -finite_diff_hess_helper(f, x_temp, j);
+
88  x_temp(i) = x(i) + -2.0 * epsilon;
+
89  f_diff += finite_diff_hess_helper(f, x_temp, j);
+
90  x_temp(i) = x(i) + epsilon;
+
91  f_diff += 8.0 * finite_diff_hess_helper(f, x_temp, j);
+
92  x_temp(i) = x(i) + -epsilon;
+
93  f_diff -= 8.0 * finite_diff_hess_helper(f, x_temp, j);
+
94  f_diff /= 12.0 * epsilon * 12.0 * epsilon;
+
95  } else {
+
96  f_diff = -f(x_temp);
+
97  f_diff -= 30 * fx;
+
98  x_temp(i) = x(i) + -2.0 * epsilon;
+
99  f_diff -= f(x_temp);
+
100  x_temp(i) = x(i) + epsilon;
+
101  f_diff += 16.0 * f(x_temp);
+
102  x_temp(i) = x(i) - epsilon;
+
103  f_diff += 16.0 * f(x_temp);
+
104  f_diff /= 12 * epsilon * epsilon;
+
105  }
+
106 
+
107  x_temp(i) = x(i);
+
108 
+
109  hess_fx(j, i) = f_diff;
+
110  hess_fx(i, j) = hess_fx(j, i);
+
111  }
+
112  }
+
113  }
+
114  }
+
115 }
+
116 #endif
+
static void grad(chainable *vi)
Compute the gradient for all variables starting from the specified root variable implementation.
Definition: grad.hpp:30
+ + +
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+
void finite_diff_gradient(const F &f, const Eigen::Matrix< double,-1, 1 > &x, double &fx, Eigen::Matrix< double,-1, 1 > &grad_fx, const double epsilon=1e-03)
Calculate the value and the gradient of the specified function at the specified argument using finite...
+
void finite_diff_hessian(const F &f, const Eigen::Matrix< double,-1, 1 > &x, double &fx, Eigen::Matrix< double,-1, 1 > &grad_fx, Eigen::Matrix< double,-1,-1 > &hess_fx, const double epsilon=1e-03)
Calculate the value and the Hessian of the specified function at the specified argument using second-...
+
double finite_diff_hess_helper(const F &f, const Eigen::Matrix< double, Eigen::Dynamic, 1 > &x, const int lambda, const double epsilon=1e-03)
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/form_0.png b/doc/api/html/form_0.png new file mode 100644 index 00000000000..12866991d5e Binary files /dev/null and b/doc/api/html/form_0.png differ diff --git a/doc/api/html/form_1.png b/doc/api/html/form_1.png new file mode 100644 index 00000000000..c49fca5a7e2 Binary files /dev/null and b/doc/api/html/form_1.png differ diff --git a/doc/api/html/form_10.png b/doc/api/html/form_10.png new file mode 100644 index 00000000000..035e5d8dff1 Binary files /dev/null and b/doc/api/html/form_10.png differ diff --git a/doc/api/html/form_100.png b/doc/api/html/form_100.png new file mode 100644 index 00000000000..23cd836ced0 Binary files /dev/null and b/doc/api/html/form_100.png differ diff --git a/doc/api/html/form_101.png b/doc/api/html/form_101.png new file mode 100644 index 00000000000..fb62d760a1c Binary files /dev/null and b/doc/api/html/form_101.png differ diff --git a/doc/api/html/form_102.png b/doc/api/html/form_102.png new file mode 100644 index 00000000000..3dafd7ee031 Binary files /dev/null and b/doc/api/html/form_102.png differ diff --git a/doc/api/html/form_103.png b/doc/api/html/form_103.png new file mode 100644 index 00000000000..b966bff600d Binary files /dev/null and b/doc/api/html/form_103.png differ diff --git a/doc/api/html/form_104.png b/doc/api/html/form_104.png new file mode 100644 index 00000000000..18cb1c9281a Binary files /dev/null and b/doc/api/html/form_104.png differ diff --git a/doc/api/html/form_105.png b/doc/api/html/form_105.png new file mode 100644 index 00000000000..90cc4215a27 Binary files /dev/null and b/doc/api/html/form_105.png differ diff --git a/doc/api/html/form_106.png b/doc/api/html/form_106.png new file mode 100644 index 00000000000..2106370faca Binary files /dev/null and b/doc/api/html/form_106.png differ diff --git a/doc/api/html/form_107.png b/doc/api/html/form_107.png new file mode 100644 index 00000000000..bbf39e5537e Binary files /dev/null and b/doc/api/html/form_107.png differ diff --git a/doc/api/html/form_108.png b/doc/api/html/form_108.png new file mode 100644 index 00000000000..3548063d29b Binary files /dev/null and b/doc/api/html/form_108.png differ diff --git a/doc/api/html/form_109.png b/doc/api/html/form_109.png new file mode 100644 index 00000000000..6310fd6776b Binary files /dev/null and b/doc/api/html/form_109.png differ diff --git a/doc/api/html/form_11.png b/doc/api/html/form_11.png new file mode 100644 index 00000000000..b6ab0e41f1b Binary files /dev/null and b/doc/api/html/form_11.png differ diff --git a/doc/api/html/form_110.png b/doc/api/html/form_110.png new file mode 100644 index 00000000000..3d995b4c0a1 Binary files /dev/null and b/doc/api/html/form_110.png differ diff --git a/doc/api/html/form_111.png b/doc/api/html/form_111.png new file mode 100644 index 00000000000..325a8d84c70 Binary files /dev/null and b/doc/api/html/form_111.png differ diff --git a/doc/api/html/form_112.png b/doc/api/html/form_112.png new file mode 100644 index 00000000000..727050fcabb Binary files /dev/null and b/doc/api/html/form_112.png differ diff --git a/doc/api/html/form_113.png b/doc/api/html/form_113.png new file mode 100644 index 00000000000..a2c432e99e1 Binary files /dev/null and b/doc/api/html/form_113.png differ diff --git a/doc/api/html/form_114.png b/doc/api/html/form_114.png new file mode 100644 index 00000000000..1fc7ffe97ab Binary files /dev/null and b/doc/api/html/form_114.png differ diff --git a/doc/api/html/form_115.png b/doc/api/html/form_115.png new file mode 100644 index 00000000000..66afc53d220 Binary files /dev/null and b/doc/api/html/form_115.png differ diff --git a/doc/api/html/form_116.png b/doc/api/html/form_116.png new file mode 100644 index 00000000000..fb1dc5d668f Binary files /dev/null and b/doc/api/html/form_116.png differ diff --git a/doc/api/html/form_117.png b/doc/api/html/form_117.png new file mode 100644 index 00000000000..d29fae0f13a Binary files /dev/null and b/doc/api/html/form_117.png differ diff --git a/doc/api/html/form_118.png b/doc/api/html/form_118.png new file mode 100644 index 00000000000..2e8cde97cf0 Binary files /dev/null and b/doc/api/html/form_118.png differ diff --git a/doc/api/html/form_119.png b/doc/api/html/form_119.png new file mode 100644 index 00000000000..ea1c0490f01 Binary files /dev/null and b/doc/api/html/form_119.png differ diff --git a/doc/api/html/form_12.png b/doc/api/html/form_12.png new file mode 100644 index 00000000000..5552abffc53 Binary files /dev/null and b/doc/api/html/form_12.png differ diff --git a/doc/api/html/form_120.png b/doc/api/html/form_120.png new file mode 100644 index 00000000000..00986076319 Binary files /dev/null and b/doc/api/html/form_120.png differ diff --git a/doc/api/html/form_121.png b/doc/api/html/form_121.png new file mode 100644 index 00000000000..d3abf5d9c64 Binary files /dev/null and b/doc/api/html/form_121.png differ diff --git a/doc/api/html/form_122.png b/doc/api/html/form_122.png new file mode 100644 index 00000000000..51858bb387a Binary files /dev/null and b/doc/api/html/form_122.png differ diff --git a/doc/api/html/form_123.png b/doc/api/html/form_123.png new file mode 100644 index 00000000000..058c8ed6806 Binary files /dev/null and b/doc/api/html/form_123.png differ diff --git a/doc/api/html/form_124.png b/doc/api/html/form_124.png new file mode 100644 index 00000000000..4fa4c1015ab Binary files /dev/null and b/doc/api/html/form_124.png differ diff --git a/doc/api/html/form_125.png b/doc/api/html/form_125.png new file mode 100644 index 00000000000..52f91afd52d Binary files /dev/null and b/doc/api/html/form_125.png differ diff --git a/doc/api/html/form_126.png b/doc/api/html/form_126.png new file mode 100644 index 00000000000..da44c6a42a6 Binary files /dev/null and b/doc/api/html/form_126.png differ diff --git a/doc/api/html/form_127.png b/doc/api/html/form_127.png new file mode 100644 index 00000000000..94e8b958041 Binary files /dev/null and b/doc/api/html/form_127.png differ diff --git a/doc/api/html/form_128.png b/doc/api/html/form_128.png new file mode 100644 index 00000000000..08369c05e55 Binary files /dev/null and b/doc/api/html/form_128.png differ diff --git a/doc/api/html/form_129.png b/doc/api/html/form_129.png new file mode 100644 index 00000000000..3fa5ae5bf74 Binary files /dev/null and b/doc/api/html/form_129.png differ diff --git a/doc/api/html/form_13.png b/doc/api/html/form_13.png new file mode 100644 index 00000000000..fc4f97582e8 Binary files /dev/null and b/doc/api/html/form_13.png differ diff --git a/doc/api/html/form_130.png b/doc/api/html/form_130.png new file mode 100644 index 00000000000..032508c25a9 Binary files /dev/null and b/doc/api/html/form_130.png differ diff --git a/doc/api/html/form_131.png b/doc/api/html/form_131.png new file mode 100644 index 00000000000..40481145f46 Binary files /dev/null and b/doc/api/html/form_131.png differ diff --git a/doc/api/html/form_132.png b/doc/api/html/form_132.png new file mode 100644 index 00000000000..3ca832ee5a5 Binary files /dev/null and b/doc/api/html/form_132.png differ diff --git a/doc/api/html/form_133.png b/doc/api/html/form_133.png new file mode 100644 index 00000000000..522cc847399 Binary files /dev/null and b/doc/api/html/form_133.png differ diff --git a/doc/api/html/form_134.png b/doc/api/html/form_134.png new file mode 100644 index 00000000000..6274b72e363 Binary files /dev/null and b/doc/api/html/form_134.png differ diff --git a/doc/api/html/form_135.png b/doc/api/html/form_135.png new file mode 100644 index 00000000000..3c0d97bc481 Binary files /dev/null and b/doc/api/html/form_135.png differ diff --git a/doc/api/html/form_136.png b/doc/api/html/form_136.png new file mode 100644 index 00000000000..c7ba332215c Binary files /dev/null and b/doc/api/html/form_136.png differ diff --git a/doc/api/html/form_137.png b/doc/api/html/form_137.png new file mode 100644 index 00000000000..d2659d08182 Binary files /dev/null and b/doc/api/html/form_137.png differ diff --git a/doc/api/html/form_138.png b/doc/api/html/form_138.png new file mode 100644 index 00000000000..cb95d48f25a Binary files /dev/null and b/doc/api/html/form_138.png differ diff --git a/doc/api/html/form_139.png b/doc/api/html/form_139.png new file mode 100644 index 00000000000..1b6bc6e956d Binary files /dev/null and b/doc/api/html/form_139.png differ diff --git a/doc/api/html/form_14.png b/doc/api/html/form_14.png new file mode 100644 index 00000000000..4e779b33c66 Binary files /dev/null and b/doc/api/html/form_14.png differ diff --git a/doc/api/html/form_140.png b/doc/api/html/form_140.png new file mode 100644 index 00000000000..597abc95b1c Binary files /dev/null and b/doc/api/html/form_140.png differ diff --git a/doc/api/html/form_141.png b/doc/api/html/form_141.png new file mode 100644 index 00000000000..e8aaebd09bc Binary files /dev/null and b/doc/api/html/form_141.png differ diff --git a/doc/api/html/form_142.png b/doc/api/html/form_142.png new file mode 100644 index 00000000000..d2d3d4b2b92 Binary files /dev/null and b/doc/api/html/form_142.png differ diff --git a/doc/api/html/form_143.png b/doc/api/html/form_143.png new file mode 100644 index 00000000000..f2378b9fea4 Binary files /dev/null and b/doc/api/html/form_143.png differ diff --git a/doc/api/html/form_144.png b/doc/api/html/form_144.png new file mode 100644 index 00000000000..9616e756255 Binary files /dev/null and b/doc/api/html/form_144.png differ diff --git a/doc/api/html/form_145.png b/doc/api/html/form_145.png new file mode 100644 index 00000000000..9134f88b82b Binary files /dev/null and b/doc/api/html/form_145.png differ diff --git a/doc/api/html/form_146.png b/doc/api/html/form_146.png new file mode 100644 index 00000000000..52ef0980885 Binary files /dev/null and b/doc/api/html/form_146.png differ diff --git a/doc/api/html/form_147.png b/doc/api/html/form_147.png new file mode 100644 index 00000000000..5b589d7714d Binary files /dev/null and b/doc/api/html/form_147.png differ diff --git a/doc/api/html/form_148.png b/doc/api/html/form_148.png new file mode 100644 index 00000000000..0524e454ab3 Binary files /dev/null and b/doc/api/html/form_148.png differ diff --git a/doc/api/html/form_149.png b/doc/api/html/form_149.png new file mode 100644 index 00000000000..1b36caf31cc Binary files /dev/null and b/doc/api/html/form_149.png differ diff --git a/doc/api/html/form_15.png b/doc/api/html/form_15.png new file mode 100644 index 00000000000..449b04d88a2 Binary files /dev/null and b/doc/api/html/form_15.png differ diff --git a/doc/api/html/form_150.png b/doc/api/html/form_150.png new file mode 100644 index 00000000000..d867b905f79 Binary files /dev/null and b/doc/api/html/form_150.png differ diff --git a/doc/api/html/form_151.png b/doc/api/html/form_151.png new file mode 100644 index 00000000000..c37be646b92 Binary files /dev/null and b/doc/api/html/form_151.png differ diff --git a/doc/api/html/form_152.png b/doc/api/html/form_152.png new file mode 100644 index 00000000000..77a399bad56 Binary files /dev/null and b/doc/api/html/form_152.png differ diff --git a/doc/api/html/form_153.png b/doc/api/html/form_153.png new file mode 100644 index 00000000000..1a32cda9283 Binary files /dev/null and b/doc/api/html/form_153.png differ diff --git a/doc/api/html/form_154.png b/doc/api/html/form_154.png new file mode 100644 index 00000000000..4559da627fd Binary files /dev/null and b/doc/api/html/form_154.png differ diff --git a/doc/api/html/form_155.png b/doc/api/html/form_155.png new file mode 100644 index 00000000000..ba7ef733387 Binary files /dev/null and b/doc/api/html/form_155.png differ diff --git a/doc/api/html/form_156.png b/doc/api/html/form_156.png new file mode 100644 index 00000000000..ac31c6cb87b Binary files /dev/null and b/doc/api/html/form_156.png differ diff --git a/doc/api/html/form_157.png b/doc/api/html/form_157.png new file mode 100644 index 00000000000..a816331be9d Binary files /dev/null and b/doc/api/html/form_157.png differ diff --git a/doc/api/html/form_158.png b/doc/api/html/form_158.png new file mode 100644 index 00000000000..767912e58ba Binary files /dev/null and b/doc/api/html/form_158.png differ diff --git a/doc/api/html/form_159.png b/doc/api/html/form_159.png new file mode 100644 index 00000000000..d9162dd3d7a Binary files /dev/null and b/doc/api/html/form_159.png differ diff --git a/doc/api/html/form_16.png b/doc/api/html/form_16.png new file mode 100644 index 00000000000..c79d9bf3922 Binary files /dev/null and b/doc/api/html/form_16.png differ diff --git a/doc/api/html/form_160.png b/doc/api/html/form_160.png new file mode 100644 index 00000000000..1f7d37bcba6 Binary files /dev/null and b/doc/api/html/form_160.png differ diff --git a/doc/api/html/form_161.png b/doc/api/html/form_161.png new file mode 100644 index 00000000000..4f395f24905 Binary files /dev/null and b/doc/api/html/form_161.png differ diff --git a/doc/api/html/form_162.png b/doc/api/html/form_162.png new file mode 100644 index 00000000000..de838a9c691 Binary files /dev/null and b/doc/api/html/form_162.png differ diff --git a/doc/api/html/form_163.png b/doc/api/html/form_163.png new file mode 100644 index 00000000000..4f93e8a4f96 Binary files /dev/null and b/doc/api/html/form_163.png differ diff --git a/doc/api/html/form_164.png b/doc/api/html/form_164.png new file mode 100644 index 00000000000..4e0626f2e50 Binary files /dev/null and b/doc/api/html/form_164.png differ diff --git a/doc/api/html/form_165.png b/doc/api/html/form_165.png new file mode 100644 index 00000000000..307c064e7bd Binary files /dev/null and b/doc/api/html/form_165.png differ diff --git a/doc/api/html/form_166.png b/doc/api/html/form_166.png new file mode 100644 index 00000000000..62826b29b1d Binary files /dev/null and b/doc/api/html/form_166.png differ diff --git a/doc/api/html/form_167.png b/doc/api/html/form_167.png new file mode 100644 index 00000000000..d4fbc33475a Binary files /dev/null and b/doc/api/html/form_167.png differ diff --git a/doc/api/html/form_168.png b/doc/api/html/form_168.png new file mode 100644 index 00000000000..5c17c2417bc Binary files /dev/null and b/doc/api/html/form_168.png differ diff --git a/doc/api/html/form_169.png b/doc/api/html/form_169.png new file mode 100644 index 00000000000..6d080f2a65e Binary files /dev/null and b/doc/api/html/form_169.png differ diff --git a/doc/api/html/form_17.png b/doc/api/html/form_17.png new file mode 100644 index 00000000000..2f405c749a7 Binary files /dev/null and b/doc/api/html/form_17.png differ diff --git a/doc/api/html/form_170.png b/doc/api/html/form_170.png new file mode 100644 index 00000000000..515fb4e2c6f Binary files /dev/null and b/doc/api/html/form_170.png differ diff --git a/doc/api/html/form_171.png b/doc/api/html/form_171.png new file mode 100644 index 00000000000..50638dd4ae4 Binary files /dev/null and b/doc/api/html/form_171.png differ diff --git a/doc/api/html/form_172.png b/doc/api/html/form_172.png new file mode 100644 index 00000000000..4fff1095968 Binary files /dev/null and b/doc/api/html/form_172.png differ diff --git a/doc/api/html/form_173.png b/doc/api/html/form_173.png new file mode 100644 index 00000000000..32334e701f5 Binary files /dev/null and b/doc/api/html/form_173.png differ diff --git a/doc/api/html/form_174.png b/doc/api/html/form_174.png new file mode 100644 index 00000000000..12ca52d9217 Binary files /dev/null and b/doc/api/html/form_174.png differ diff --git a/doc/api/html/form_175.png b/doc/api/html/form_175.png new file mode 100644 index 00000000000..c2e1f14474d Binary files /dev/null and b/doc/api/html/form_175.png differ diff --git a/doc/api/html/form_176.png b/doc/api/html/form_176.png new file mode 100644 index 00000000000..a50760edd32 Binary files /dev/null and b/doc/api/html/form_176.png differ diff --git a/doc/api/html/form_177.png b/doc/api/html/form_177.png new file mode 100644 index 00000000000..6a97c30e82a Binary files /dev/null and b/doc/api/html/form_177.png differ diff --git a/doc/api/html/form_178.png b/doc/api/html/form_178.png new file mode 100644 index 00000000000..69283e7bda9 Binary files /dev/null and b/doc/api/html/form_178.png differ diff --git a/doc/api/html/form_179.png b/doc/api/html/form_179.png new file mode 100644 index 00000000000..625ed605e16 Binary files /dev/null and b/doc/api/html/form_179.png differ diff --git a/doc/api/html/form_18.png b/doc/api/html/form_18.png new file mode 100644 index 00000000000..2007734526c Binary files /dev/null and b/doc/api/html/form_18.png differ diff --git a/doc/api/html/form_180.png b/doc/api/html/form_180.png new file mode 100644 index 00000000000..1b17c9b062e Binary files /dev/null and b/doc/api/html/form_180.png differ diff --git a/doc/api/html/form_181.png b/doc/api/html/form_181.png new file mode 100644 index 00000000000..29ad9bd69b5 Binary files /dev/null and b/doc/api/html/form_181.png differ diff --git a/doc/api/html/form_182.png b/doc/api/html/form_182.png new file mode 100644 index 00000000000..bf838e94138 Binary files /dev/null and b/doc/api/html/form_182.png differ diff --git a/doc/api/html/form_183.png b/doc/api/html/form_183.png new file mode 100644 index 00000000000..0a132d8a41f Binary files /dev/null and b/doc/api/html/form_183.png differ diff --git a/doc/api/html/form_184.png b/doc/api/html/form_184.png new file mode 100644 index 00000000000..ddfbe0a9951 Binary files /dev/null and b/doc/api/html/form_184.png differ diff --git a/doc/api/html/form_185.png b/doc/api/html/form_185.png new file mode 100644 index 00000000000..c2adb2a47ee Binary files /dev/null and b/doc/api/html/form_185.png differ diff --git a/doc/api/html/form_186.png b/doc/api/html/form_186.png new file mode 100644 index 00000000000..4d459edf1e9 Binary files /dev/null and b/doc/api/html/form_186.png differ diff --git a/doc/api/html/form_187.png b/doc/api/html/form_187.png new file mode 100644 index 00000000000..6d0fdf0159b Binary files /dev/null and b/doc/api/html/form_187.png differ diff --git a/doc/api/html/form_188.png b/doc/api/html/form_188.png new file mode 100644 index 00000000000..02a3afa16fe Binary files /dev/null and b/doc/api/html/form_188.png differ diff --git a/doc/api/html/form_189.png b/doc/api/html/form_189.png new file mode 100644 index 00000000000..a35c8a29da6 Binary files /dev/null and b/doc/api/html/form_189.png differ diff --git a/doc/api/html/form_19.png b/doc/api/html/form_19.png new file mode 100644 index 00000000000..05b947a3655 Binary files /dev/null and b/doc/api/html/form_19.png differ diff --git a/doc/api/html/form_190.png b/doc/api/html/form_190.png new file mode 100644 index 00000000000..c0b309cd4e3 Binary files /dev/null and b/doc/api/html/form_190.png differ diff --git a/doc/api/html/form_191.png b/doc/api/html/form_191.png new file mode 100644 index 00000000000..fc68c6cd619 Binary files /dev/null and b/doc/api/html/form_191.png differ diff --git a/doc/api/html/form_192.png b/doc/api/html/form_192.png new file mode 100644 index 00000000000..6736a8b9141 Binary files /dev/null and b/doc/api/html/form_192.png differ diff --git a/doc/api/html/form_193.png b/doc/api/html/form_193.png new file mode 100644 index 00000000000..20f8feaf11e Binary files /dev/null and b/doc/api/html/form_193.png differ diff --git a/doc/api/html/form_194.png b/doc/api/html/form_194.png new file mode 100644 index 00000000000..500ea6a169d Binary files /dev/null and b/doc/api/html/form_194.png differ diff --git a/doc/api/html/form_195.png b/doc/api/html/form_195.png new file mode 100644 index 00000000000..85828b5bf2c Binary files /dev/null and b/doc/api/html/form_195.png differ diff --git a/doc/api/html/form_196.png b/doc/api/html/form_196.png new file mode 100644 index 00000000000..9cccfb94f11 Binary files /dev/null and b/doc/api/html/form_196.png differ diff --git a/doc/api/html/form_197.png b/doc/api/html/form_197.png new file mode 100644 index 00000000000..63108e109c9 Binary files /dev/null and b/doc/api/html/form_197.png differ diff --git a/doc/api/html/form_198.png b/doc/api/html/form_198.png new file mode 100644 index 00000000000..60a3ec6758a Binary files /dev/null and b/doc/api/html/form_198.png differ diff --git a/doc/api/html/form_199.png b/doc/api/html/form_199.png new file mode 100644 index 00000000000..beb84e02217 Binary files /dev/null and b/doc/api/html/form_199.png differ diff --git a/doc/api/html/form_2.png b/doc/api/html/form_2.png new file mode 100644 index 00000000000..83f1abf0891 Binary files /dev/null and b/doc/api/html/form_2.png differ diff --git a/doc/api/html/form_20.png b/doc/api/html/form_20.png new file mode 100644 index 00000000000..13c99170d6f Binary files /dev/null and b/doc/api/html/form_20.png differ diff --git a/doc/api/html/form_200.png b/doc/api/html/form_200.png new file mode 100644 index 00000000000..f9eb082dd5f Binary files /dev/null and b/doc/api/html/form_200.png differ diff --git a/doc/api/html/form_201.png b/doc/api/html/form_201.png new file mode 100644 index 00000000000..fed0a703a67 Binary files /dev/null and b/doc/api/html/form_201.png differ diff --git a/doc/api/html/form_202.png b/doc/api/html/form_202.png new file mode 100644 index 00000000000..dd8dbdac593 Binary files /dev/null and b/doc/api/html/form_202.png differ diff --git a/doc/api/html/form_203.png b/doc/api/html/form_203.png new file mode 100644 index 00000000000..d6e5741e0fc Binary files /dev/null and b/doc/api/html/form_203.png differ diff --git a/doc/api/html/form_204.png b/doc/api/html/form_204.png new file mode 100644 index 00000000000..be265140fb0 Binary files /dev/null and b/doc/api/html/form_204.png differ diff --git a/doc/api/html/form_205.png b/doc/api/html/form_205.png new file mode 100644 index 00000000000..f68b812e3c7 Binary files /dev/null and b/doc/api/html/form_205.png differ diff --git a/doc/api/html/form_206.png b/doc/api/html/form_206.png new file mode 100644 index 00000000000..1ecc5ef7e27 Binary files /dev/null and b/doc/api/html/form_206.png differ diff --git a/doc/api/html/form_207.png b/doc/api/html/form_207.png new file mode 100644 index 00000000000..dba582cac77 Binary files /dev/null and b/doc/api/html/form_207.png differ diff --git a/doc/api/html/form_208.png b/doc/api/html/form_208.png new file mode 100644 index 00000000000..2f800949972 Binary files /dev/null and b/doc/api/html/form_208.png differ diff --git a/doc/api/html/form_209.png b/doc/api/html/form_209.png new file mode 100644 index 00000000000..2f800949972 Binary files /dev/null and b/doc/api/html/form_209.png differ diff --git a/doc/api/html/form_21.png b/doc/api/html/form_21.png new file mode 100644 index 00000000000..76dd0492cbc Binary files /dev/null and b/doc/api/html/form_21.png differ diff --git a/doc/api/html/form_210.png b/doc/api/html/form_210.png new file mode 100644 index 00000000000..5d3c01cb24a Binary files /dev/null and b/doc/api/html/form_210.png differ diff --git a/doc/api/html/form_211.png b/doc/api/html/form_211.png new file mode 100644 index 00000000000..76e7a7e36f6 Binary files /dev/null and b/doc/api/html/form_211.png differ diff --git a/doc/api/html/form_212.png b/doc/api/html/form_212.png new file mode 100644 index 00000000000..4ad49df5860 Binary files /dev/null and b/doc/api/html/form_212.png differ diff --git a/doc/api/html/form_213.png b/doc/api/html/form_213.png new file mode 100644 index 00000000000..a9c6f372f46 Binary files /dev/null and b/doc/api/html/form_213.png differ diff --git a/doc/api/html/form_214.png b/doc/api/html/form_214.png new file mode 100644 index 00000000000..ff5f2cce16c Binary files /dev/null and b/doc/api/html/form_214.png differ diff --git a/doc/api/html/form_215.png b/doc/api/html/form_215.png new file mode 100644 index 00000000000..2bcfb504db9 Binary files /dev/null and b/doc/api/html/form_215.png differ diff --git a/doc/api/html/form_216.png b/doc/api/html/form_216.png new file mode 100644 index 00000000000..305ac76b4b8 Binary files /dev/null and b/doc/api/html/form_216.png differ diff --git a/doc/api/html/form_217.png b/doc/api/html/form_217.png new file mode 100644 index 00000000000..15c244126ac Binary files /dev/null and b/doc/api/html/form_217.png differ diff --git a/doc/api/html/form_218.png b/doc/api/html/form_218.png new file mode 100644 index 00000000000..ac9dc7306fd Binary files /dev/null and b/doc/api/html/form_218.png differ diff --git a/doc/api/html/form_219.png b/doc/api/html/form_219.png new file mode 100644 index 00000000000..8cf71304386 Binary files /dev/null and b/doc/api/html/form_219.png differ diff --git a/doc/api/html/form_22.png b/doc/api/html/form_22.png new file mode 100644 index 00000000000..05ba539f121 Binary files /dev/null and b/doc/api/html/form_22.png differ diff --git a/doc/api/html/form_220.png b/doc/api/html/form_220.png new file mode 100644 index 00000000000..21d787e0f70 Binary files /dev/null and b/doc/api/html/form_220.png differ diff --git a/doc/api/html/form_221.png b/doc/api/html/form_221.png new file mode 100644 index 00000000000..621d9b3211b Binary files /dev/null and b/doc/api/html/form_221.png differ diff --git a/doc/api/html/form_222.png b/doc/api/html/form_222.png new file mode 100644 index 00000000000..c56812bb992 Binary files /dev/null and b/doc/api/html/form_222.png differ diff --git a/doc/api/html/form_223.png b/doc/api/html/form_223.png new file mode 100644 index 00000000000..e31730ddebe Binary files /dev/null and b/doc/api/html/form_223.png differ diff --git a/doc/api/html/form_224.png b/doc/api/html/form_224.png new file mode 100644 index 00000000000..b31967891a7 Binary files /dev/null and b/doc/api/html/form_224.png differ diff --git a/doc/api/html/form_225.png b/doc/api/html/form_225.png new file mode 100644 index 00000000000..1c0733c4781 Binary files /dev/null and b/doc/api/html/form_225.png differ diff --git a/doc/api/html/form_226.png b/doc/api/html/form_226.png new file mode 100644 index 00000000000..a5875fae77a Binary files /dev/null and b/doc/api/html/form_226.png differ diff --git a/doc/api/html/form_227.png b/doc/api/html/form_227.png new file mode 100644 index 00000000000..c384ae48d20 Binary files /dev/null and b/doc/api/html/form_227.png differ diff --git a/doc/api/html/form_228.png b/doc/api/html/form_228.png new file mode 100644 index 00000000000..cbdbe3d500b Binary files /dev/null and b/doc/api/html/form_228.png differ diff --git a/doc/api/html/form_229.png b/doc/api/html/form_229.png new file mode 100644 index 00000000000..97437df1058 Binary files /dev/null and b/doc/api/html/form_229.png differ diff --git a/doc/api/html/form_23.png b/doc/api/html/form_23.png new file mode 100644 index 00000000000..0431c03b1a4 Binary files /dev/null and b/doc/api/html/form_23.png differ diff --git a/doc/api/html/form_230.png b/doc/api/html/form_230.png new file mode 100644 index 00000000000..e55dd90b869 Binary files /dev/null and b/doc/api/html/form_230.png differ diff --git a/doc/api/html/form_231.png b/doc/api/html/form_231.png new file mode 100644 index 00000000000..900403677e5 Binary files /dev/null and b/doc/api/html/form_231.png differ diff --git a/doc/api/html/form_232.png b/doc/api/html/form_232.png new file mode 100644 index 00000000000..49f91948ed8 Binary files /dev/null and b/doc/api/html/form_232.png differ diff --git a/doc/api/html/form_233.png b/doc/api/html/form_233.png new file mode 100644 index 00000000000..8aa6bef7cd3 Binary files /dev/null and b/doc/api/html/form_233.png differ diff --git a/doc/api/html/form_234.png b/doc/api/html/form_234.png new file mode 100644 index 00000000000..8c4b767ba40 Binary files /dev/null and b/doc/api/html/form_234.png differ diff --git a/doc/api/html/form_235.png b/doc/api/html/form_235.png new file mode 100644 index 00000000000..3ae73642a5e Binary files /dev/null and b/doc/api/html/form_235.png differ diff --git a/doc/api/html/form_236.png b/doc/api/html/form_236.png new file mode 100644 index 00000000000..3d2f4689774 Binary files /dev/null and b/doc/api/html/form_236.png differ diff --git a/doc/api/html/form_237.png b/doc/api/html/form_237.png new file mode 100644 index 00000000000..a8efee6ed05 Binary files /dev/null and b/doc/api/html/form_237.png differ diff --git a/doc/api/html/form_238.png b/doc/api/html/form_238.png new file mode 100644 index 00000000000..8298e294b63 Binary files /dev/null and b/doc/api/html/form_238.png differ diff --git a/doc/api/html/form_239.png b/doc/api/html/form_239.png new file mode 100644 index 00000000000..7d410cc71ba Binary files /dev/null and b/doc/api/html/form_239.png differ diff --git a/doc/api/html/form_24.png b/doc/api/html/form_24.png new file mode 100644 index 00000000000..6d17d2141a1 Binary files /dev/null and b/doc/api/html/form_24.png differ diff --git a/doc/api/html/form_240.png b/doc/api/html/form_240.png new file mode 100644 index 00000000000..30c5deee8d9 Binary files /dev/null and b/doc/api/html/form_240.png differ diff --git a/doc/api/html/form_241.png b/doc/api/html/form_241.png new file mode 100644 index 00000000000..1d17155810f Binary files /dev/null and b/doc/api/html/form_241.png differ diff --git a/doc/api/html/form_242.png b/doc/api/html/form_242.png new file mode 100644 index 00000000000..346abab9fd1 Binary files /dev/null and b/doc/api/html/form_242.png differ diff --git a/doc/api/html/form_243.png b/doc/api/html/form_243.png new file mode 100644 index 00000000000..e7f0eca751a Binary files /dev/null and b/doc/api/html/form_243.png differ diff --git a/doc/api/html/form_244.png b/doc/api/html/form_244.png new file mode 100644 index 00000000000..bb4b2905534 Binary files /dev/null and b/doc/api/html/form_244.png differ diff --git a/doc/api/html/form_245.png b/doc/api/html/form_245.png new file mode 100644 index 00000000000..f5d52f9fb25 Binary files /dev/null and b/doc/api/html/form_245.png differ diff --git a/doc/api/html/form_246.png b/doc/api/html/form_246.png new file mode 100644 index 00000000000..ada39bff338 Binary files /dev/null and b/doc/api/html/form_246.png differ diff --git a/doc/api/html/form_247.png b/doc/api/html/form_247.png new file mode 100644 index 00000000000..b5c33089cda Binary files /dev/null and b/doc/api/html/form_247.png differ diff --git a/doc/api/html/form_248.png b/doc/api/html/form_248.png new file mode 100644 index 00000000000..2cc41e5a121 Binary files /dev/null and b/doc/api/html/form_248.png differ diff --git a/doc/api/html/form_249.png b/doc/api/html/form_249.png new file mode 100644 index 00000000000..bf411b1a48e Binary files /dev/null and b/doc/api/html/form_249.png differ diff --git a/doc/api/html/form_25.png b/doc/api/html/form_25.png new file mode 100644 index 00000000000..5ada5b63262 Binary files /dev/null and b/doc/api/html/form_25.png differ diff --git a/doc/api/html/form_250.png b/doc/api/html/form_250.png new file mode 100644 index 00000000000..faab72db0ac Binary files /dev/null and b/doc/api/html/form_250.png differ diff --git a/doc/api/html/form_251.png b/doc/api/html/form_251.png new file mode 100644 index 00000000000..4de1d8a4c0a Binary files /dev/null and b/doc/api/html/form_251.png differ diff --git a/doc/api/html/form_252.png b/doc/api/html/form_252.png new file mode 100644 index 00000000000..0841ce7084f Binary files /dev/null and b/doc/api/html/form_252.png differ diff --git a/doc/api/html/form_253.png b/doc/api/html/form_253.png new file mode 100644 index 00000000000..436ed47ff31 Binary files /dev/null and b/doc/api/html/form_253.png differ diff --git a/doc/api/html/form_254.png b/doc/api/html/form_254.png new file mode 100644 index 00000000000..4ee2d3255d3 Binary files /dev/null and b/doc/api/html/form_254.png differ diff --git a/doc/api/html/form_255.png b/doc/api/html/form_255.png new file mode 100644 index 00000000000..e362a5206cd Binary files /dev/null and b/doc/api/html/form_255.png differ diff --git a/doc/api/html/form_256.png b/doc/api/html/form_256.png new file mode 100644 index 00000000000..20dbe82a9ab Binary files /dev/null and b/doc/api/html/form_256.png differ diff --git a/doc/api/html/form_257.png b/doc/api/html/form_257.png new file mode 100644 index 00000000000..a8a6cc82d28 Binary files /dev/null and b/doc/api/html/form_257.png differ diff --git a/doc/api/html/form_258.png b/doc/api/html/form_258.png new file mode 100644 index 00000000000..a3a640baacd Binary files /dev/null and b/doc/api/html/form_258.png differ diff --git a/doc/api/html/form_259.png b/doc/api/html/form_259.png new file mode 100644 index 00000000000..ed25edca35f Binary files /dev/null and b/doc/api/html/form_259.png differ diff --git a/doc/api/html/form_26.png b/doc/api/html/form_26.png new file mode 100644 index 00000000000..5d0cff5832b Binary files /dev/null and b/doc/api/html/form_26.png differ diff --git a/doc/api/html/form_260.png b/doc/api/html/form_260.png new file mode 100644 index 00000000000..2c1cb8ed573 Binary files /dev/null and b/doc/api/html/form_260.png differ diff --git a/doc/api/html/form_261.png b/doc/api/html/form_261.png new file mode 100644 index 00000000000..5ed1bc3b5d9 Binary files /dev/null and b/doc/api/html/form_261.png differ diff --git a/doc/api/html/form_262.png b/doc/api/html/form_262.png new file mode 100644 index 00000000000..a09374247c7 Binary files /dev/null and b/doc/api/html/form_262.png differ diff --git a/doc/api/html/form_263.png b/doc/api/html/form_263.png new file mode 100644 index 00000000000..6102b5693ae Binary files /dev/null and b/doc/api/html/form_263.png differ diff --git a/doc/api/html/form_264.png b/doc/api/html/form_264.png new file mode 100644 index 00000000000..583111b7192 Binary files /dev/null and b/doc/api/html/form_264.png differ diff --git a/doc/api/html/form_265.png b/doc/api/html/form_265.png new file mode 100644 index 00000000000..620adeb0b71 Binary files /dev/null and b/doc/api/html/form_265.png differ diff --git a/doc/api/html/form_266.png b/doc/api/html/form_266.png new file mode 100644 index 00000000000..28ad7c18b57 Binary files /dev/null and b/doc/api/html/form_266.png differ diff --git a/doc/api/html/form_267.png b/doc/api/html/form_267.png new file mode 100644 index 00000000000..691e9b7e1b5 Binary files /dev/null and b/doc/api/html/form_267.png differ diff --git a/doc/api/html/form_268.png b/doc/api/html/form_268.png new file mode 100644 index 00000000000..1d36c50b852 Binary files /dev/null and b/doc/api/html/form_268.png differ diff --git a/doc/api/html/form_269.png b/doc/api/html/form_269.png new file mode 100644 index 00000000000..a5bbe068d72 Binary files /dev/null and b/doc/api/html/form_269.png differ diff --git a/doc/api/html/form_27.png b/doc/api/html/form_27.png new file mode 100644 index 00000000000..cc69e3121d2 Binary files /dev/null and b/doc/api/html/form_27.png differ diff --git a/doc/api/html/form_270.png b/doc/api/html/form_270.png new file mode 100644 index 00000000000..07930060562 Binary files /dev/null and b/doc/api/html/form_270.png differ diff --git a/doc/api/html/form_271.png b/doc/api/html/form_271.png new file mode 100644 index 00000000000..e385dee79ab Binary files /dev/null and b/doc/api/html/form_271.png differ diff --git a/doc/api/html/form_272.png b/doc/api/html/form_272.png new file mode 100644 index 00000000000..cab123c9742 Binary files /dev/null and b/doc/api/html/form_272.png differ diff --git a/doc/api/html/form_273.png b/doc/api/html/form_273.png new file mode 100644 index 00000000000..171f724068c Binary files /dev/null and b/doc/api/html/form_273.png differ diff --git a/doc/api/html/form_274.png b/doc/api/html/form_274.png new file mode 100644 index 00000000000..e256d5fe2e7 Binary files /dev/null and b/doc/api/html/form_274.png differ diff --git a/doc/api/html/form_275.png b/doc/api/html/form_275.png new file mode 100644 index 00000000000..60dac2ca9f2 Binary files /dev/null and b/doc/api/html/form_275.png differ diff --git a/doc/api/html/form_276.png b/doc/api/html/form_276.png new file mode 100644 index 00000000000..d58c117c0fc Binary files /dev/null and b/doc/api/html/form_276.png differ diff --git a/doc/api/html/form_277.png b/doc/api/html/form_277.png new file mode 100644 index 00000000000..0368f5ebea1 Binary files /dev/null and b/doc/api/html/form_277.png differ diff --git a/doc/api/html/form_278.png b/doc/api/html/form_278.png new file mode 100644 index 00000000000..993e2cac9a0 Binary files /dev/null and b/doc/api/html/form_278.png differ diff --git a/doc/api/html/form_279.png b/doc/api/html/form_279.png new file mode 100644 index 00000000000..ac3c19556cc Binary files /dev/null and b/doc/api/html/form_279.png differ diff --git a/doc/api/html/form_28.png b/doc/api/html/form_28.png new file mode 100644 index 00000000000..d2cbe14a8ce Binary files /dev/null and b/doc/api/html/form_28.png differ diff --git a/doc/api/html/form_280.png b/doc/api/html/form_280.png new file mode 100644 index 00000000000..d85e3cbe053 Binary files /dev/null and b/doc/api/html/form_280.png differ diff --git a/doc/api/html/form_281.png b/doc/api/html/form_281.png new file mode 100644 index 00000000000..59e9e034ac4 Binary files /dev/null and b/doc/api/html/form_281.png differ diff --git a/doc/api/html/form_282.png b/doc/api/html/form_282.png new file mode 100644 index 00000000000..68f01c9f189 Binary files /dev/null and b/doc/api/html/form_282.png differ diff --git a/doc/api/html/form_283.png b/doc/api/html/form_283.png new file mode 100644 index 00000000000..9bfa6aace8a Binary files /dev/null and b/doc/api/html/form_283.png differ diff --git a/doc/api/html/form_284.png b/doc/api/html/form_284.png new file mode 100644 index 00000000000..460d472cf53 Binary files /dev/null and b/doc/api/html/form_284.png differ diff --git a/doc/api/html/form_285.png b/doc/api/html/form_285.png new file mode 100644 index 00000000000..f44fdd782b7 Binary files /dev/null and b/doc/api/html/form_285.png differ diff --git a/doc/api/html/form_286.png b/doc/api/html/form_286.png new file mode 100644 index 00000000000..64580b425e4 Binary files /dev/null and b/doc/api/html/form_286.png differ diff --git a/doc/api/html/form_287.png b/doc/api/html/form_287.png new file mode 100644 index 00000000000..7a1607d78c0 Binary files /dev/null and b/doc/api/html/form_287.png differ diff --git a/doc/api/html/form_288.png b/doc/api/html/form_288.png new file mode 100644 index 00000000000..8a118b905a8 Binary files /dev/null and b/doc/api/html/form_288.png differ diff --git a/doc/api/html/form_289.png b/doc/api/html/form_289.png new file mode 100644 index 00000000000..8cb260d9965 Binary files /dev/null and b/doc/api/html/form_289.png differ diff --git a/doc/api/html/form_29.png b/doc/api/html/form_29.png new file mode 100644 index 00000000000..f812c4971cc Binary files /dev/null and b/doc/api/html/form_29.png differ diff --git a/doc/api/html/form_290.png b/doc/api/html/form_290.png new file mode 100644 index 00000000000..4ba112dc9c8 Binary files /dev/null and b/doc/api/html/form_290.png differ diff --git a/doc/api/html/form_291.png b/doc/api/html/form_291.png new file mode 100644 index 00000000000..2b04154565e Binary files /dev/null and b/doc/api/html/form_291.png differ diff --git a/doc/api/html/form_292.png b/doc/api/html/form_292.png new file mode 100644 index 00000000000..0d49b5c1ccd Binary files /dev/null and b/doc/api/html/form_292.png differ diff --git a/doc/api/html/form_293.png b/doc/api/html/form_293.png new file mode 100644 index 00000000000..07967041590 Binary files /dev/null and b/doc/api/html/form_293.png differ diff --git a/doc/api/html/form_294.png b/doc/api/html/form_294.png new file mode 100644 index 00000000000..254b50f24e6 Binary files /dev/null and b/doc/api/html/form_294.png differ diff --git a/doc/api/html/form_295.png b/doc/api/html/form_295.png new file mode 100644 index 00000000000..8a358812ba5 Binary files /dev/null and b/doc/api/html/form_295.png differ diff --git a/doc/api/html/form_296.png b/doc/api/html/form_296.png new file mode 100644 index 00000000000..94759ecbd61 Binary files /dev/null and b/doc/api/html/form_296.png differ diff --git a/doc/api/html/form_297.png b/doc/api/html/form_297.png new file mode 100644 index 00000000000..6cf1be44ff5 Binary files /dev/null and b/doc/api/html/form_297.png differ diff --git a/doc/api/html/form_298.png b/doc/api/html/form_298.png new file mode 100644 index 00000000000..97cc19a6ce8 Binary files /dev/null and b/doc/api/html/form_298.png differ diff --git a/doc/api/html/form_299.png b/doc/api/html/form_299.png new file mode 100644 index 00000000000..b3b4bbb0927 Binary files /dev/null and b/doc/api/html/form_299.png differ diff --git a/doc/api/html/form_3.png b/doc/api/html/form_3.png new file mode 100644 index 00000000000..dedb2f88e92 Binary files /dev/null and b/doc/api/html/form_3.png differ diff --git a/doc/api/html/form_30.png b/doc/api/html/form_30.png new file mode 100644 index 00000000000..3807f5011bf Binary files /dev/null and b/doc/api/html/form_30.png differ diff --git a/doc/api/html/form_300.png b/doc/api/html/form_300.png new file mode 100644 index 00000000000..6c5e0e23eb1 Binary files /dev/null and b/doc/api/html/form_300.png differ diff --git a/doc/api/html/form_301.png b/doc/api/html/form_301.png new file mode 100644 index 00000000000..fb66eb387d6 Binary files /dev/null and b/doc/api/html/form_301.png differ diff --git a/doc/api/html/form_302.png b/doc/api/html/form_302.png new file mode 100644 index 00000000000..c5a484d3d01 Binary files /dev/null and b/doc/api/html/form_302.png differ diff --git a/doc/api/html/form_303.png b/doc/api/html/form_303.png new file mode 100644 index 00000000000..f65c211f034 Binary files /dev/null and b/doc/api/html/form_303.png differ diff --git a/doc/api/html/form_304.png b/doc/api/html/form_304.png new file mode 100644 index 00000000000..63bec1844d6 Binary files /dev/null and b/doc/api/html/form_304.png differ diff --git a/doc/api/html/form_305.png b/doc/api/html/form_305.png new file mode 100644 index 00000000000..08815edf6c6 Binary files /dev/null and b/doc/api/html/form_305.png differ diff --git a/doc/api/html/form_306.png b/doc/api/html/form_306.png new file mode 100644 index 00000000000..b6db50836ec Binary files /dev/null and b/doc/api/html/form_306.png differ diff --git a/doc/api/html/form_307.png b/doc/api/html/form_307.png new file mode 100644 index 00000000000..62e3070d5f9 Binary files /dev/null and b/doc/api/html/form_307.png differ diff --git a/doc/api/html/form_308.png b/doc/api/html/form_308.png new file mode 100644 index 00000000000..eae47eca8c5 Binary files /dev/null and b/doc/api/html/form_308.png differ diff --git a/doc/api/html/form_309.png b/doc/api/html/form_309.png new file mode 100644 index 00000000000..602a2e4084f Binary files /dev/null and b/doc/api/html/form_309.png differ diff --git a/doc/api/html/form_31.png b/doc/api/html/form_31.png new file mode 100644 index 00000000000..9314cd91148 Binary files /dev/null and b/doc/api/html/form_31.png differ diff --git a/doc/api/html/form_310.png b/doc/api/html/form_310.png new file mode 100644 index 00000000000..558ff04f08f Binary files /dev/null and b/doc/api/html/form_310.png differ diff --git a/doc/api/html/form_311.png b/doc/api/html/form_311.png new file mode 100644 index 00000000000..0d4a7718c08 Binary files /dev/null and b/doc/api/html/form_311.png differ diff --git a/doc/api/html/form_312.png b/doc/api/html/form_312.png new file mode 100644 index 00000000000..88f8bbf8fd4 Binary files /dev/null and b/doc/api/html/form_312.png differ diff --git a/doc/api/html/form_313.png b/doc/api/html/form_313.png new file mode 100644 index 00000000000..8c3a97e07e7 Binary files /dev/null and b/doc/api/html/form_313.png differ diff --git a/doc/api/html/form_314.png b/doc/api/html/form_314.png new file mode 100644 index 00000000000..84a744fa5b8 Binary files /dev/null and b/doc/api/html/form_314.png differ diff --git a/doc/api/html/form_315.png b/doc/api/html/form_315.png new file mode 100644 index 00000000000..0645d57b6a9 Binary files /dev/null and b/doc/api/html/form_315.png differ diff --git a/doc/api/html/form_316.png b/doc/api/html/form_316.png new file mode 100644 index 00000000000..51d7690d4d0 Binary files /dev/null and b/doc/api/html/form_316.png differ diff --git a/doc/api/html/form_317.png b/doc/api/html/form_317.png new file mode 100644 index 00000000000..ac795207a77 Binary files /dev/null and b/doc/api/html/form_317.png differ diff --git a/doc/api/html/form_318.png b/doc/api/html/form_318.png new file mode 100644 index 00000000000..7de26b741a4 Binary files /dev/null and b/doc/api/html/form_318.png differ diff --git a/doc/api/html/form_319.png b/doc/api/html/form_319.png new file mode 100644 index 00000000000..f63ab9907a4 Binary files /dev/null and b/doc/api/html/form_319.png differ diff --git a/doc/api/html/form_32.png b/doc/api/html/form_32.png new file mode 100644 index 00000000000..5eebd5aa2e1 Binary files /dev/null and b/doc/api/html/form_32.png differ diff --git a/doc/api/html/form_320.png b/doc/api/html/form_320.png new file mode 100644 index 00000000000..683e9e8c767 Binary files /dev/null and b/doc/api/html/form_320.png differ diff --git a/doc/api/html/form_321.png b/doc/api/html/form_321.png new file mode 100644 index 00000000000..aba23b2394d Binary files /dev/null and b/doc/api/html/form_321.png differ diff --git a/doc/api/html/form_322.png b/doc/api/html/form_322.png new file mode 100644 index 00000000000..a29c9c6e773 Binary files /dev/null and b/doc/api/html/form_322.png differ diff --git a/doc/api/html/form_323.png b/doc/api/html/form_323.png new file mode 100644 index 00000000000..05658b572bf Binary files /dev/null and b/doc/api/html/form_323.png differ diff --git a/doc/api/html/form_324.png b/doc/api/html/form_324.png new file mode 100644 index 00000000000..35d93c18b6f Binary files /dev/null and b/doc/api/html/form_324.png differ diff --git a/doc/api/html/form_325.png b/doc/api/html/form_325.png new file mode 100644 index 00000000000..577be513ce8 Binary files /dev/null and b/doc/api/html/form_325.png differ diff --git a/doc/api/html/form_326.png b/doc/api/html/form_326.png new file mode 100644 index 00000000000..d12dfc3d451 Binary files /dev/null and b/doc/api/html/form_326.png differ diff --git a/doc/api/html/form_327.png b/doc/api/html/form_327.png new file mode 100644 index 00000000000..09bc6f43dd0 Binary files /dev/null and b/doc/api/html/form_327.png differ diff --git a/doc/api/html/form_328.png b/doc/api/html/form_328.png new file mode 100644 index 00000000000..c44e62c7345 Binary files /dev/null and b/doc/api/html/form_328.png differ diff --git a/doc/api/html/form_329.png b/doc/api/html/form_329.png new file mode 100644 index 00000000000..50af6dcee7b Binary files /dev/null and b/doc/api/html/form_329.png differ diff --git a/doc/api/html/form_33.png b/doc/api/html/form_33.png new file mode 100644 index 00000000000..eeaae733f65 Binary files /dev/null and b/doc/api/html/form_33.png differ diff --git a/doc/api/html/form_330.png b/doc/api/html/form_330.png new file mode 100644 index 00000000000..9a306c5b5f3 Binary files /dev/null and b/doc/api/html/form_330.png differ diff --git a/doc/api/html/form_331.png b/doc/api/html/form_331.png new file mode 100644 index 00000000000..eaee0904a45 Binary files /dev/null and b/doc/api/html/form_331.png differ diff --git a/doc/api/html/form_332.png b/doc/api/html/form_332.png new file mode 100644 index 00000000000..fcb31ac5732 Binary files /dev/null and b/doc/api/html/form_332.png differ diff --git a/doc/api/html/form_333.png b/doc/api/html/form_333.png new file mode 100644 index 00000000000..e776c8606f7 Binary files /dev/null and b/doc/api/html/form_333.png differ diff --git a/doc/api/html/form_334.png b/doc/api/html/form_334.png new file mode 100644 index 00000000000..4b5f808b92c Binary files /dev/null and b/doc/api/html/form_334.png differ diff --git a/doc/api/html/form_335.png b/doc/api/html/form_335.png new file mode 100644 index 00000000000..17002b52552 Binary files /dev/null and b/doc/api/html/form_335.png differ diff --git a/doc/api/html/form_336.png b/doc/api/html/form_336.png new file mode 100644 index 00000000000..ef144185ea9 Binary files /dev/null and b/doc/api/html/form_336.png differ diff --git a/doc/api/html/form_337.png b/doc/api/html/form_337.png new file mode 100644 index 00000000000..d9a0dbafa62 Binary files /dev/null and b/doc/api/html/form_337.png differ diff --git a/doc/api/html/form_338.png b/doc/api/html/form_338.png new file mode 100644 index 00000000000..40df5186a6f Binary files /dev/null and b/doc/api/html/form_338.png differ diff --git a/doc/api/html/form_339.png b/doc/api/html/form_339.png new file mode 100644 index 00000000000..1fad984be01 Binary files /dev/null and b/doc/api/html/form_339.png differ diff --git a/doc/api/html/form_34.png b/doc/api/html/form_34.png new file mode 100644 index 00000000000..3d506939b49 Binary files /dev/null and b/doc/api/html/form_34.png differ diff --git a/doc/api/html/form_340.png b/doc/api/html/form_340.png new file mode 100644 index 00000000000..292b7b19a8c Binary files /dev/null and b/doc/api/html/form_340.png differ diff --git a/doc/api/html/form_341.png b/doc/api/html/form_341.png new file mode 100644 index 00000000000..3a876fedc8c Binary files /dev/null and b/doc/api/html/form_341.png differ diff --git a/doc/api/html/form_342.png b/doc/api/html/form_342.png new file mode 100644 index 00000000000..f026ad61fa1 Binary files /dev/null and b/doc/api/html/form_342.png differ diff --git a/doc/api/html/form_343.png b/doc/api/html/form_343.png new file mode 100644 index 00000000000..63cf1d0e6c2 Binary files /dev/null and b/doc/api/html/form_343.png differ diff --git a/doc/api/html/form_344.png b/doc/api/html/form_344.png new file mode 100644 index 00000000000..748e936fecb Binary files /dev/null and b/doc/api/html/form_344.png differ diff --git a/doc/api/html/form_345.png b/doc/api/html/form_345.png new file mode 100644 index 00000000000..168f59fda29 Binary files /dev/null and b/doc/api/html/form_345.png differ diff --git a/doc/api/html/form_346.png b/doc/api/html/form_346.png new file mode 100644 index 00000000000..ad08c91608a Binary files /dev/null and b/doc/api/html/form_346.png differ diff --git a/doc/api/html/form_347.png b/doc/api/html/form_347.png new file mode 100644 index 00000000000..058cc29702d Binary files /dev/null and b/doc/api/html/form_347.png differ diff --git a/doc/api/html/form_348.png b/doc/api/html/form_348.png new file mode 100644 index 00000000000..d298a2b2e83 Binary files /dev/null and b/doc/api/html/form_348.png differ diff --git a/doc/api/html/form_349.png b/doc/api/html/form_349.png new file mode 100644 index 00000000000..a8137a721d5 Binary files /dev/null and b/doc/api/html/form_349.png differ diff --git a/doc/api/html/form_35.png b/doc/api/html/form_35.png new file mode 100644 index 00000000000..c4c4b20a108 Binary files /dev/null and b/doc/api/html/form_35.png differ diff --git a/doc/api/html/form_350.png b/doc/api/html/form_350.png new file mode 100644 index 00000000000..56d518cb66e Binary files /dev/null and b/doc/api/html/form_350.png differ diff --git a/doc/api/html/form_351.png b/doc/api/html/form_351.png new file mode 100644 index 00000000000..e285cf3210c Binary files /dev/null and b/doc/api/html/form_351.png differ diff --git a/doc/api/html/form_352.png b/doc/api/html/form_352.png new file mode 100644 index 00000000000..9f115cb4b13 Binary files /dev/null and b/doc/api/html/form_352.png differ diff --git a/doc/api/html/form_353.png b/doc/api/html/form_353.png new file mode 100644 index 00000000000..8afe1d9489d Binary files /dev/null and b/doc/api/html/form_353.png differ diff --git a/doc/api/html/form_354.png b/doc/api/html/form_354.png new file mode 100644 index 00000000000..55ec4173978 Binary files /dev/null and b/doc/api/html/form_354.png differ diff --git a/doc/api/html/form_355.png b/doc/api/html/form_355.png new file mode 100644 index 00000000000..fff9c13ae7e Binary files /dev/null and b/doc/api/html/form_355.png differ diff --git a/doc/api/html/form_356.png b/doc/api/html/form_356.png new file mode 100644 index 00000000000..9c065d0ae1e Binary files /dev/null and b/doc/api/html/form_356.png differ diff --git a/doc/api/html/form_357.png b/doc/api/html/form_357.png new file mode 100644 index 00000000000..c1490648cac Binary files /dev/null and b/doc/api/html/form_357.png differ diff --git a/doc/api/html/form_358.png b/doc/api/html/form_358.png new file mode 100644 index 00000000000..360527a0510 Binary files /dev/null and b/doc/api/html/form_358.png differ diff --git a/doc/api/html/form_359.png b/doc/api/html/form_359.png new file mode 100644 index 00000000000..b7cf64608e5 Binary files /dev/null and b/doc/api/html/form_359.png differ diff --git a/doc/api/html/form_36.png b/doc/api/html/form_36.png new file mode 100644 index 00000000000..17e8b30b55d Binary files /dev/null and b/doc/api/html/form_36.png differ diff --git a/doc/api/html/form_360.png b/doc/api/html/form_360.png new file mode 100644 index 00000000000..8f03c036ebd Binary files /dev/null and b/doc/api/html/form_360.png differ diff --git a/doc/api/html/form_361.png b/doc/api/html/form_361.png new file mode 100644 index 00000000000..bf033d0569d Binary files /dev/null and b/doc/api/html/form_361.png differ diff --git a/doc/api/html/form_362.png b/doc/api/html/form_362.png new file mode 100644 index 00000000000..3c544d09710 Binary files /dev/null and b/doc/api/html/form_362.png differ diff --git a/doc/api/html/form_363.png b/doc/api/html/form_363.png new file mode 100644 index 00000000000..3429d0eb57a Binary files /dev/null and b/doc/api/html/form_363.png differ diff --git a/doc/api/html/form_364.png b/doc/api/html/form_364.png new file mode 100644 index 00000000000..b7b28325d8e Binary files /dev/null and b/doc/api/html/form_364.png differ diff --git a/doc/api/html/form_365.png b/doc/api/html/form_365.png new file mode 100644 index 00000000000..2baf8e2154a Binary files /dev/null and b/doc/api/html/form_365.png differ diff --git a/doc/api/html/form_366.png b/doc/api/html/form_366.png new file mode 100644 index 00000000000..d07546c911a Binary files /dev/null and b/doc/api/html/form_366.png differ diff --git a/doc/api/html/form_367.png b/doc/api/html/form_367.png new file mode 100644 index 00000000000..c49e9ed784d Binary files /dev/null and b/doc/api/html/form_367.png differ diff --git a/doc/api/html/form_368.png b/doc/api/html/form_368.png new file mode 100644 index 00000000000..a7c8c8afd9b Binary files /dev/null and b/doc/api/html/form_368.png differ diff --git a/doc/api/html/form_369.png b/doc/api/html/form_369.png new file mode 100644 index 00000000000..639ab7fbaae Binary files /dev/null and b/doc/api/html/form_369.png differ diff --git a/doc/api/html/form_37.png b/doc/api/html/form_37.png new file mode 100644 index 00000000000..29000552869 Binary files /dev/null and b/doc/api/html/form_37.png differ diff --git a/doc/api/html/form_370.png b/doc/api/html/form_370.png new file mode 100644 index 00000000000..e98c3e0e6ca Binary files /dev/null and b/doc/api/html/form_370.png differ diff --git a/doc/api/html/form_371.png b/doc/api/html/form_371.png new file mode 100644 index 00000000000..c9ae28b21dc Binary files /dev/null and b/doc/api/html/form_371.png differ diff --git a/doc/api/html/form_372.png b/doc/api/html/form_372.png new file mode 100644 index 00000000000..36614d0d568 Binary files /dev/null and b/doc/api/html/form_372.png differ diff --git a/doc/api/html/form_373.png b/doc/api/html/form_373.png new file mode 100644 index 00000000000..dfb619de6a6 Binary files /dev/null and b/doc/api/html/form_373.png differ diff --git a/doc/api/html/form_374.png b/doc/api/html/form_374.png new file mode 100644 index 00000000000..418aa088f4c Binary files /dev/null and b/doc/api/html/form_374.png differ diff --git a/doc/api/html/form_375.png b/doc/api/html/form_375.png new file mode 100644 index 00000000000..cb0ba3201c9 Binary files /dev/null and b/doc/api/html/form_375.png differ diff --git a/doc/api/html/form_376.png b/doc/api/html/form_376.png new file mode 100644 index 00000000000..75c159aceba Binary files /dev/null and b/doc/api/html/form_376.png differ diff --git a/doc/api/html/form_377.png b/doc/api/html/form_377.png new file mode 100644 index 00000000000..76356bf75c0 Binary files /dev/null and b/doc/api/html/form_377.png differ diff --git a/doc/api/html/form_378.png b/doc/api/html/form_378.png new file mode 100644 index 00000000000..99b3e3b481a Binary files /dev/null and b/doc/api/html/form_378.png differ diff --git a/doc/api/html/form_379.png b/doc/api/html/form_379.png new file mode 100644 index 00000000000..9f5cda5e743 Binary files /dev/null and b/doc/api/html/form_379.png differ diff --git a/doc/api/html/form_38.png b/doc/api/html/form_38.png new file mode 100644 index 00000000000..48fe7d4d8a8 Binary files /dev/null and b/doc/api/html/form_38.png differ diff --git a/doc/api/html/form_380.png b/doc/api/html/form_380.png new file mode 100644 index 00000000000..931cc4cce6f Binary files /dev/null and b/doc/api/html/form_380.png differ diff --git a/doc/api/html/form_381.png b/doc/api/html/form_381.png new file mode 100644 index 00000000000..a686d07a44f Binary files /dev/null and b/doc/api/html/form_381.png differ diff --git a/doc/api/html/form_382.png b/doc/api/html/form_382.png new file mode 100644 index 00000000000..c51d5ea7fef Binary files /dev/null and b/doc/api/html/form_382.png differ diff --git a/doc/api/html/form_383.png b/doc/api/html/form_383.png new file mode 100644 index 00000000000..bcaa3b4f077 Binary files /dev/null and b/doc/api/html/form_383.png differ diff --git a/doc/api/html/form_384.png b/doc/api/html/form_384.png new file mode 100644 index 00000000000..9c1ed35fed0 Binary files /dev/null and b/doc/api/html/form_384.png differ diff --git a/doc/api/html/form_385.png b/doc/api/html/form_385.png new file mode 100644 index 00000000000..e5eedc28e47 Binary files /dev/null and b/doc/api/html/form_385.png differ diff --git a/doc/api/html/form_386.png b/doc/api/html/form_386.png new file mode 100644 index 00000000000..192ea6e1fd8 Binary files /dev/null and b/doc/api/html/form_386.png differ diff --git a/doc/api/html/form_387.png b/doc/api/html/form_387.png new file mode 100644 index 00000000000..3ea169b778c Binary files /dev/null and b/doc/api/html/form_387.png differ diff --git a/doc/api/html/form_388.png b/doc/api/html/form_388.png new file mode 100644 index 00000000000..579297b9502 Binary files /dev/null and b/doc/api/html/form_388.png differ diff --git a/doc/api/html/form_389.png b/doc/api/html/form_389.png new file mode 100644 index 00000000000..54c9bbfc077 Binary files /dev/null and b/doc/api/html/form_389.png differ diff --git a/doc/api/html/form_39.png b/doc/api/html/form_39.png new file mode 100644 index 00000000000..ed96a5e156e Binary files /dev/null and b/doc/api/html/form_39.png differ diff --git a/doc/api/html/form_390.png b/doc/api/html/form_390.png new file mode 100644 index 00000000000..b6e0772e2d0 Binary files /dev/null and b/doc/api/html/form_390.png differ diff --git a/doc/api/html/form_391.png b/doc/api/html/form_391.png new file mode 100644 index 00000000000..342e040540e Binary files /dev/null and b/doc/api/html/form_391.png differ diff --git a/doc/api/html/form_392.png b/doc/api/html/form_392.png new file mode 100644 index 00000000000..030566e4550 Binary files /dev/null and b/doc/api/html/form_392.png differ diff --git a/doc/api/html/form_393.png b/doc/api/html/form_393.png new file mode 100644 index 00000000000..c33ee84bc10 Binary files /dev/null and b/doc/api/html/form_393.png differ diff --git a/doc/api/html/form_394.png b/doc/api/html/form_394.png new file mode 100644 index 00000000000..d7c690311a2 Binary files /dev/null and b/doc/api/html/form_394.png differ diff --git a/doc/api/html/form_395.png b/doc/api/html/form_395.png new file mode 100644 index 00000000000..fb2a21e2571 Binary files /dev/null and b/doc/api/html/form_395.png differ diff --git a/doc/api/html/form_396.png b/doc/api/html/form_396.png new file mode 100644 index 00000000000..df3ede60484 Binary files /dev/null and b/doc/api/html/form_396.png differ diff --git a/doc/api/html/form_397.png b/doc/api/html/form_397.png new file mode 100644 index 00000000000..50aecb4b051 Binary files /dev/null and b/doc/api/html/form_397.png differ diff --git a/doc/api/html/form_398.png b/doc/api/html/form_398.png new file mode 100644 index 00000000000..95b782872ec Binary files /dev/null and b/doc/api/html/form_398.png differ diff --git a/doc/api/html/form_399.png b/doc/api/html/form_399.png new file mode 100644 index 00000000000..06efdb67a1a Binary files /dev/null and b/doc/api/html/form_399.png differ diff --git a/doc/api/html/form_4.png b/doc/api/html/form_4.png new file mode 100644 index 00000000000..3684c79977e Binary files /dev/null and b/doc/api/html/form_4.png differ diff --git a/doc/api/html/form_40.png b/doc/api/html/form_40.png new file mode 100644 index 00000000000..f52a1bd4f78 Binary files /dev/null and b/doc/api/html/form_40.png differ diff --git a/doc/api/html/form_400.png b/doc/api/html/form_400.png new file mode 100644 index 00000000000..637bd05b288 Binary files /dev/null and b/doc/api/html/form_400.png differ diff --git a/doc/api/html/form_401.png b/doc/api/html/form_401.png new file mode 100644 index 00000000000..8191963e195 Binary files /dev/null and b/doc/api/html/form_401.png differ diff --git a/doc/api/html/form_402.png b/doc/api/html/form_402.png new file mode 100644 index 00000000000..81a655cb423 Binary files /dev/null and b/doc/api/html/form_402.png differ diff --git a/doc/api/html/form_403.png b/doc/api/html/form_403.png new file mode 100644 index 00000000000..b85bc7d6c8a Binary files /dev/null and b/doc/api/html/form_403.png differ diff --git a/doc/api/html/form_404.png b/doc/api/html/form_404.png new file mode 100644 index 00000000000..6f206fac224 Binary files /dev/null and b/doc/api/html/form_404.png differ diff --git a/doc/api/html/form_405.png b/doc/api/html/form_405.png new file mode 100644 index 00000000000..5a53aa3ef89 Binary files /dev/null and b/doc/api/html/form_405.png differ diff --git a/doc/api/html/form_406.png b/doc/api/html/form_406.png new file mode 100644 index 00000000000..587bc4096be Binary files /dev/null and b/doc/api/html/form_406.png differ diff --git a/doc/api/html/form_407.png b/doc/api/html/form_407.png new file mode 100644 index 00000000000..ad1f0e39f9f Binary files /dev/null and b/doc/api/html/form_407.png differ diff --git a/doc/api/html/form_408.png b/doc/api/html/form_408.png new file mode 100644 index 00000000000..83a4720269d Binary files /dev/null and b/doc/api/html/form_408.png differ diff --git a/doc/api/html/form_409.png b/doc/api/html/form_409.png new file mode 100644 index 00000000000..35f675b8c0e Binary files /dev/null and b/doc/api/html/form_409.png differ diff --git a/doc/api/html/form_41.png b/doc/api/html/form_41.png new file mode 100644 index 00000000000..23094dfc5e8 Binary files /dev/null and b/doc/api/html/form_41.png differ diff --git a/doc/api/html/form_410.png b/doc/api/html/form_410.png new file mode 100644 index 00000000000..4dfd0e8a83c Binary files /dev/null and b/doc/api/html/form_410.png differ diff --git a/doc/api/html/form_411.png b/doc/api/html/form_411.png new file mode 100644 index 00000000000..e67d615d206 Binary files /dev/null and b/doc/api/html/form_411.png differ diff --git a/doc/api/html/form_412.png b/doc/api/html/form_412.png new file mode 100644 index 00000000000..5beb57ec984 Binary files /dev/null and b/doc/api/html/form_412.png differ diff --git a/doc/api/html/form_413.png b/doc/api/html/form_413.png new file mode 100644 index 00000000000..17be92c08e4 Binary files /dev/null and b/doc/api/html/form_413.png differ diff --git a/doc/api/html/form_414.png b/doc/api/html/form_414.png new file mode 100644 index 00000000000..43a1e6423e3 Binary files /dev/null and b/doc/api/html/form_414.png differ diff --git a/doc/api/html/form_415.png b/doc/api/html/form_415.png new file mode 100644 index 00000000000..f127b2d8f39 Binary files /dev/null and b/doc/api/html/form_415.png differ diff --git a/doc/api/html/form_416.png b/doc/api/html/form_416.png new file mode 100644 index 00000000000..351cd836a24 Binary files /dev/null and b/doc/api/html/form_416.png differ diff --git a/doc/api/html/form_417.png b/doc/api/html/form_417.png new file mode 100644 index 00000000000..10fb28120ce Binary files /dev/null and b/doc/api/html/form_417.png differ diff --git a/doc/api/html/form_418.png b/doc/api/html/form_418.png new file mode 100644 index 00000000000..1ae92da0742 Binary files /dev/null and b/doc/api/html/form_418.png differ diff --git a/doc/api/html/form_419.png b/doc/api/html/form_419.png new file mode 100644 index 00000000000..8b9789db87b Binary files /dev/null and b/doc/api/html/form_419.png differ diff --git a/doc/api/html/form_42.png b/doc/api/html/form_42.png new file mode 100644 index 00000000000..a5d5acf2d88 Binary files /dev/null and b/doc/api/html/form_42.png differ diff --git a/doc/api/html/form_420.png b/doc/api/html/form_420.png new file mode 100644 index 00000000000..14ec9ca8234 Binary files /dev/null and b/doc/api/html/form_420.png differ diff --git a/doc/api/html/form_421.png b/doc/api/html/form_421.png new file mode 100644 index 00000000000..0f38847308e Binary files /dev/null and b/doc/api/html/form_421.png differ diff --git a/doc/api/html/form_422.png b/doc/api/html/form_422.png new file mode 100644 index 00000000000..d00fba6a8e6 Binary files /dev/null and b/doc/api/html/form_422.png differ diff --git a/doc/api/html/form_423.png b/doc/api/html/form_423.png new file mode 100644 index 00000000000..3f2ccbcb150 Binary files /dev/null and b/doc/api/html/form_423.png differ diff --git a/doc/api/html/form_424.png b/doc/api/html/form_424.png new file mode 100644 index 00000000000..89e6fb9fbc9 Binary files /dev/null and b/doc/api/html/form_424.png differ diff --git a/doc/api/html/form_425.png b/doc/api/html/form_425.png new file mode 100644 index 00000000000..a74d02c25e8 Binary files /dev/null and b/doc/api/html/form_425.png differ diff --git a/doc/api/html/form_426.png b/doc/api/html/form_426.png new file mode 100644 index 00000000000..5fbe035a198 Binary files /dev/null and b/doc/api/html/form_426.png differ diff --git a/doc/api/html/form_427.png b/doc/api/html/form_427.png new file mode 100644 index 00000000000..62602c772f2 Binary files /dev/null and b/doc/api/html/form_427.png differ diff --git a/doc/api/html/form_428.png b/doc/api/html/form_428.png new file mode 100644 index 00000000000..e954840bb73 Binary files /dev/null and b/doc/api/html/form_428.png differ diff --git a/doc/api/html/form_429.png b/doc/api/html/form_429.png new file mode 100644 index 00000000000..42f103ce74a Binary files /dev/null and b/doc/api/html/form_429.png differ diff --git a/doc/api/html/form_43.png b/doc/api/html/form_43.png new file mode 100644 index 00000000000..9197b95911b Binary files /dev/null and b/doc/api/html/form_43.png differ diff --git a/doc/api/html/form_430.png b/doc/api/html/form_430.png new file mode 100644 index 00000000000..930c22bff7a Binary files /dev/null and b/doc/api/html/form_430.png differ diff --git a/doc/api/html/form_431.png b/doc/api/html/form_431.png new file mode 100644 index 00000000000..685a73a7600 Binary files /dev/null and b/doc/api/html/form_431.png differ diff --git a/doc/api/html/form_432.png b/doc/api/html/form_432.png new file mode 100644 index 00000000000..277b0d89ec8 Binary files /dev/null and b/doc/api/html/form_432.png differ diff --git a/doc/api/html/form_433.png b/doc/api/html/form_433.png new file mode 100644 index 00000000000..2f2b2980b06 Binary files /dev/null and b/doc/api/html/form_433.png differ diff --git a/doc/api/html/form_434.png b/doc/api/html/form_434.png new file mode 100644 index 00000000000..d601240bbc0 Binary files /dev/null and b/doc/api/html/form_434.png differ diff --git a/doc/api/html/form_435.png b/doc/api/html/form_435.png new file mode 100644 index 00000000000..3fc3ba33b72 Binary files /dev/null and b/doc/api/html/form_435.png differ diff --git a/doc/api/html/form_436.png b/doc/api/html/form_436.png new file mode 100644 index 00000000000..75c5c642ce8 Binary files /dev/null and b/doc/api/html/form_436.png differ diff --git a/doc/api/html/form_437.png b/doc/api/html/form_437.png new file mode 100644 index 00000000000..9bbd183ca74 Binary files /dev/null and b/doc/api/html/form_437.png differ diff --git a/doc/api/html/form_438.png b/doc/api/html/form_438.png new file mode 100644 index 00000000000..16ee24b08d6 Binary files /dev/null and b/doc/api/html/form_438.png differ diff --git a/doc/api/html/form_439.png b/doc/api/html/form_439.png new file mode 100644 index 00000000000..fe27e76d2c5 Binary files /dev/null and b/doc/api/html/form_439.png differ diff --git a/doc/api/html/form_44.png b/doc/api/html/form_44.png new file mode 100644 index 00000000000..e65e8f4bc14 Binary files /dev/null and b/doc/api/html/form_44.png differ diff --git a/doc/api/html/form_440.png b/doc/api/html/form_440.png new file mode 100644 index 00000000000..095189a1e3c Binary files /dev/null and b/doc/api/html/form_440.png differ diff --git a/doc/api/html/form_441.png b/doc/api/html/form_441.png new file mode 100644 index 00000000000..43292072ebe Binary files /dev/null and b/doc/api/html/form_441.png differ diff --git a/doc/api/html/form_442.png b/doc/api/html/form_442.png new file mode 100644 index 00000000000..36c3af365bc Binary files /dev/null and b/doc/api/html/form_442.png differ diff --git a/doc/api/html/form_443.png b/doc/api/html/form_443.png new file mode 100644 index 00000000000..3b5e28b5c74 Binary files /dev/null and b/doc/api/html/form_443.png differ diff --git a/doc/api/html/form_444.png b/doc/api/html/form_444.png new file mode 100644 index 00000000000..ea53f570395 Binary files /dev/null and b/doc/api/html/form_444.png differ diff --git a/doc/api/html/form_445.png b/doc/api/html/form_445.png new file mode 100644 index 00000000000..6a382ace54e Binary files /dev/null and b/doc/api/html/form_445.png differ diff --git a/doc/api/html/form_446.png b/doc/api/html/form_446.png new file mode 100644 index 00000000000..a7503210c20 Binary files /dev/null and b/doc/api/html/form_446.png differ diff --git a/doc/api/html/form_447.png b/doc/api/html/form_447.png new file mode 100644 index 00000000000..3576feb218d Binary files /dev/null and b/doc/api/html/form_447.png differ diff --git a/doc/api/html/form_448.png b/doc/api/html/form_448.png new file mode 100644 index 00000000000..3621afd8e46 Binary files /dev/null and b/doc/api/html/form_448.png differ diff --git a/doc/api/html/form_45.png b/doc/api/html/form_45.png new file mode 100644 index 00000000000..320e4654de8 Binary files /dev/null and b/doc/api/html/form_45.png differ diff --git a/doc/api/html/form_46.png b/doc/api/html/form_46.png new file mode 100644 index 00000000000..29ad8563a3a Binary files /dev/null and b/doc/api/html/form_46.png differ diff --git a/doc/api/html/form_47.png b/doc/api/html/form_47.png new file mode 100644 index 00000000000..9ca8cdc02fd Binary files /dev/null and b/doc/api/html/form_47.png differ diff --git a/doc/api/html/form_48.png b/doc/api/html/form_48.png new file mode 100644 index 00000000000..2b896383ed8 Binary files /dev/null and b/doc/api/html/form_48.png differ diff --git a/doc/api/html/form_49.png b/doc/api/html/form_49.png new file mode 100644 index 00000000000..41af07f8965 Binary files /dev/null and b/doc/api/html/form_49.png differ diff --git a/doc/api/html/form_5.png b/doc/api/html/form_5.png new file mode 100644 index 00000000000..fa3ab0fca60 Binary files /dev/null and b/doc/api/html/form_5.png differ diff --git a/doc/api/html/form_50.png b/doc/api/html/form_50.png new file mode 100644 index 00000000000..59076f2f223 Binary files /dev/null and b/doc/api/html/form_50.png differ diff --git a/doc/api/html/form_51.png b/doc/api/html/form_51.png new file mode 100644 index 00000000000..bbd094c81d5 Binary files /dev/null and b/doc/api/html/form_51.png differ diff --git a/doc/api/html/form_52.png b/doc/api/html/form_52.png new file mode 100644 index 00000000000..c0cb1d78f5a Binary files /dev/null and b/doc/api/html/form_52.png differ diff --git a/doc/api/html/form_53.png b/doc/api/html/form_53.png new file mode 100644 index 00000000000..fca7f61d058 Binary files /dev/null and b/doc/api/html/form_53.png differ diff --git a/doc/api/html/form_54.png b/doc/api/html/form_54.png new file mode 100644 index 00000000000..56be852c679 Binary files /dev/null and b/doc/api/html/form_54.png differ diff --git a/doc/api/html/form_55.png b/doc/api/html/form_55.png new file mode 100644 index 00000000000..4eac5fb1ce6 Binary files /dev/null and b/doc/api/html/form_55.png differ diff --git a/doc/api/html/form_56.png b/doc/api/html/form_56.png new file mode 100644 index 00000000000..8cede4677b2 Binary files /dev/null and b/doc/api/html/form_56.png differ diff --git a/doc/api/html/form_57.png b/doc/api/html/form_57.png new file mode 100644 index 00000000000..911cb6a304a Binary files /dev/null and b/doc/api/html/form_57.png differ diff --git a/doc/api/html/form_58.png b/doc/api/html/form_58.png new file mode 100644 index 00000000000..0f7b7dafe01 Binary files /dev/null and b/doc/api/html/form_58.png differ diff --git a/doc/api/html/form_59.png b/doc/api/html/form_59.png new file mode 100644 index 00000000000..5ae216be4a7 Binary files /dev/null and b/doc/api/html/form_59.png differ diff --git a/doc/api/html/form_6.png b/doc/api/html/form_6.png new file mode 100644 index 00000000000..a8187ac55e6 Binary files /dev/null and b/doc/api/html/form_6.png differ diff --git a/doc/api/html/form_60.png b/doc/api/html/form_60.png new file mode 100644 index 00000000000..413fe39f46d Binary files /dev/null and b/doc/api/html/form_60.png differ diff --git a/doc/api/html/form_61.png b/doc/api/html/form_61.png new file mode 100644 index 00000000000..816caf5e406 Binary files /dev/null and b/doc/api/html/form_61.png differ diff --git a/doc/api/html/form_62.png b/doc/api/html/form_62.png new file mode 100644 index 00000000000..ed655e39c94 Binary files /dev/null and b/doc/api/html/form_62.png differ diff --git a/doc/api/html/form_63.png b/doc/api/html/form_63.png new file mode 100644 index 00000000000..2efb8d9dd1e Binary files /dev/null and b/doc/api/html/form_63.png differ diff --git a/doc/api/html/form_64.png b/doc/api/html/form_64.png new file mode 100644 index 00000000000..fac61ab5159 Binary files /dev/null and b/doc/api/html/form_64.png differ diff --git a/doc/api/html/form_65.png b/doc/api/html/form_65.png new file mode 100644 index 00000000000..f5587e74ccc Binary files /dev/null and b/doc/api/html/form_65.png differ diff --git a/doc/api/html/form_66.png b/doc/api/html/form_66.png new file mode 100644 index 00000000000..114c058788b Binary files /dev/null and b/doc/api/html/form_66.png differ diff --git a/doc/api/html/form_67.png b/doc/api/html/form_67.png new file mode 100644 index 00000000000..b91aceb7871 Binary files /dev/null and b/doc/api/html/form_67.png differ diff --git a/doc/api/html/form_68.png b/doc/api/html/form_68.png new file mode 100644 index 00000000000..9601c21b13b Binary files /dev/null and b/doc/api/html/form_68.png differ diff --git a/doc/api/html/form_69.png b/doc/api/html/form_69.png new file mode 100644 index 00000000000..059c3ba55ca Binary files /dev/null and b/doc/api/html/form_69.png differ diff --git a/doc/api/html/form_7.png b/doc/api/html/form_7.png new file mode 100644 index 00000000000..f7053c89fad Binary files /dev/null and b/doc/api/html/form_7.png differ diff --git a/doc/api/html/form_70.png b/doc/api/html/form_70.png new file mode 100644 index 00000000000..bb013294d91 Binary files /dev/null and b/doc/api/html/form_70.png differ diff --git a/doc/api/html/form_71.png b/doc/api/html/form_71.png new file mode 100644 index 00000000000..24c442d5699 Binary files /dev/null and b/doc/api/html/form_71.png differ diff --git a/doc/api/html/form_72.png b/doc/api/html/form_72.png new file mode 100644 index 00000000000..00e3048e1dc Binary files /dev/null and b/doc/api/html/form_72.png differ diff --git a/doc/api/html/form_73.png b/doc/api/html/form_73.png new file mode 100644 index 00000000000..a9d25ec8120 Binary files /dev/null and b/doc/api/html/form_73.png differ diff --git a/doc/api/html/form_74.png b/doc/api/html/form_74.png new file mode 100644 index 00000000000..3fedb9b611e Binary files /dev/null and b/doc/api/html/form_74.png differ diff --git a/doc/api/html/form_75.png b/doc/api/html/form_75.png new file mode 100644 index 00000000000..6ec0e14a24e Binary files /dev/null and b/doc/api/html/form_75.png differ diff --git a/doc/api/html/form_76.png b/doc/api/html/form_76.png new file mode 100644 index 00000000000..f458fb4c987 Binary files /dev/null and b/doc/api/html/form_76.png differ diff --git a/doc/api/html/form_77.png b/doc/api/html/form_77.png new file mode 100644 index 00000000000..fd07fb0c8d8 Binary files /dev/null and b/doc/api/html/form_77.png differ diff --git a/doc/api/html/form_78.png b/doc/api/html/form_78.png new file mode 100644 index 00000000000..3ebf0c222aa Binary files /dev/null and b/doc/api/html/form_78.png differ diff --git a/doc/api/html/form_79.png b/doc/api/html/form_79.png new file mode 100644 index 00000000000..e50815b154f Binary files /dev/null and b/doc/api/html/form_79.png differ diff --git a/doc/api/html/form_8.png b/doc/api/html/form_8.png new file mode 100644 index 00000000000..0f2a560e4cf Binary files /dev/null and b/doc/api/html/form_8.png differ diff --git a/doc/api/html/form_80.png b/doc/api/html/form_80.png new file mode 100644 index 00000000000..04a1cbf9f8d Binary files /dev/null and b/doc/api/html/form_80.png differ diff --git a/doc/api/html/form_81.png b/doc/api/html/form_81.png new file mode 100644 index 00000000000..8c1926d750f Binary files /dev/null and b/doc/api/html/form_81.png differ diff --git a/doc/api/html/form_82.png b/doc/api/html/form_82.png new file mode 100644 index 00000000000..927405cb565 Binary files /dev/null and b/doc/api/html/form_82.png differ diff --git a/doc/api/html/form_83.png b/doc/api/html/form_83.png new file mode 100644 index 00000000000..61fec4313fc Binary files /dev/null and b/doc/api/html/form_83.png differ diff --git a/doc/api/html/form_84.png b/doc/api/html/form_84.png new file mode 100644 index 00000000000..123a384cbfa Binary files /dev/null and b/doc/api/html/form_84.png differ diff --git a/doc/api/html/form_85.png b/doc/api/html/form_85.png new file mode 100644 index 00000000000..3a71db77dc6 Binary files /dev/null and b/doc/api/html/form_85.png differ diff --git a/doc/api/html/form_86.png b/doc/api/html/form_86.png new file mode 100644 index 00000000000..f6c67c3bd12 Binary files /dev/null and b/doc/api/html/form_86.png differ diff --git a/doc/api/html/form_87.png b/doc/api/html/form_87.png new file mode 100644 index 00000000000..91ccd567c31 Binary files /dev/null and b/doc/api/html/form_87.png differ diff --git a/doc/api/html/form_88.png b/doc/api/html/form_88.png new file mode 100644 index 00000000000..c0eea2e085f Binary files /dev/null and b/doc/api/html/form_88.png differ diff --git a/doc/api/html/form_89.png b/doc/api/html/form_89.png new file mode 100644 index 00000000000..cbd2ccff9e2 Binary files /dev/null and b/doc/api/html/form_89.png differ diff --git a/doc/api/html/form_9.png b/doc/api/html/form_9.png new file mode 100644 index 00000000000..2f398a3dc24 Binary files /dev/null and b/doc/api/html/form_9.png differ diff --git a/doc/api/html/form_90.png b/doc/api/html/form_90.png new file mode 100644 index 00000000000..02747558de4 Binary files /dev/null and b/doc/api/html/form_90.png differ diff --git a/doc/api/html/form_91.png b/doc/api/html/form_91.png new file mode 100644 index 00000000000..1232d9ea460 Binary files /dev/null and b/doc/api/html/form_91.png differ diff --git a/doc/api/html/form_92.png b/doc/api/html/form_92.png new file mode 100644 index 00000000000..ee41ca096e2 Binary files /dev/null and b/doc/api/html/form_92.png differ diff --git a/doc/api/html/form_93.png b/doc/api/html/form_93.png new file mode 100644 index 00000000000..21bc2820bee Binary files /dev/null and b/doc/api/html/form_93.png differ diff --git a/doc/api/html/form_94.png b/doc/api/html/form_94.png new file mode 100644 index 00000000000..0ae0f46b8c1 Binary files /dev/null and b/doc/api/html/form_94.png differ diff --git a/doc/api/html/form_95.png b/doc/api/html/form_95.png new file mode 100644 index 00000000000..4e1a99901fe Binary files /dev/null and b/doc/api/html/form_95.png differ diff --git a/doc/api/html/form_96.png b/doc/api/html/form_96.png new file mode 100644 index 00000000000..da708532b41 Binary files /dev/null and b/doc/api/html/form_96.png differ diff --git a/doc/api/html/form_97.png b/doc/api/html/form_97.png new file mode 100644 index 00000000000..5413cdac9f7 Binary files /dev/null and b/doc/api/html/form_97.png differ diff --git a/doc/api/html/form_98.png b/doc/api/html/form_98.png new file mode 100644 index 00000000000..f51d734ccf6 Binary files /dev/null and b/doc/api/html/form_98.png differ diff --git a/doc/api/html/form_99.png b/doc/api/html/form_99.png new file mode 100644 index 00000000000..96c50f6a537 Binary files /dev/null and b/doc/api/html/form_99.png differ diff --git a/doc/api/html/formula.repository b/doc/api/html/formula.repository new file mode 100644 index 00000000000..6ce6b9538b2 --- /dev/null +++ b/doc/api/html/formula.repository @@ -0,0 +1,449 @@ +\form#0:\[ \mbox{fma}(x, y, z) = \begin{cases} x\cdot y+z & \mbox{if } -\infty\leq x, y, z \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#1:\[ \frac{\partial\, \mbox{fma}(x, y, z)}{\partial x} = \begin{cases} y & \mbox{if } -\infty\leq x, y, z \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#2:\[ \frac{\partial\, \mbox{fma}(x, y, z)}{\partial y} = \begin{cases} x & \mbox{if } -\infty\leq x, y, z \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#3:\[ \frac{\partial\, \mbox{fma}(x, y, z)}{\partial z} = \begin{cases} 1 & \mbox{if } -\infty\leq x, y, z \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#4:\[ \mbox{log\_mix}(\theta, \lambda_1, \lambda_2) = \log \left( \theta \exp(\lambda_1) + (1 - \theta) \exp(\lambda_2) \right). \] +\form#5:\[ \frac{\partial}{\partial \theta} \mbox{log\_mix}(\theta, \lambda_1, \lambda_2) = \dfrac{\exp(\lambda_1) - \exp(\lambda_2)} {\left( \theta \exp(\lambda_1) + (1 - \theta) \exp(\lambda_2) \right)} \] +\form#6:\[ \frac{\partial}{\partial \lambda_1} \mbox{log\_mix}(\theta, \lambda_1, \lambda_2) = \dfrac{\theta \exp(\lambda_1)} {\left( \theta \exp(\lambda_1) + (1 - \theta) \exp(\lambda_2) \right)} \] +\form#7:\[ \frac{\partial}{\partial \lambda_2} \mbox{log\_mix}(\theta, \lambda_1, \lambda_2) = \dfrac{\theta \exp(\lambda_2)} {\left( \theta \exp(\lambda_1) + (1 - \theta) \exp(\lambda_2) \right)} \] +\form#8:$\log \sum_{n=1}^N \exp(x_n) = \max(x) + \log \sum_{n=1}^N \exp(x_n - \max(x))$ +\form#9:$L$ +\form#10:$A$ +\form#11:$A = L \times L^T$ +\form#12:${k \choose 2} = \frac{k(k-1)}{2}$ +\form#13:$k \choose 2$ +\form#14:$k \choose 2 + k$ +\form#15:$k$ +\form#16:$ \log \mbox{softmax}(y) \ = \ y - \log \sum_{k=1}^K \exp(y_k) \ = \ y - \mbox{log\_sum\_exp}(y). $ +\form#17:$ \frac{\partial}{\partial y_m} \mbox{softmax}(y)[k] = \left\{ \begin{array}{ll} 1 - \mbox{softmax}(y)[m] & \mbox{ if } m = k, \mbox{ and} \\[6pt] \mbox{softmax}(y)[m] & \mbox{ if } m \neq k. \end{array} \right. $ +\form#18:$ \mbox{softmax}(y) = \frac{\exp(y)} {\sum_{k=1}^K \exp(y_k)}, $ +\form#19:$ \begin{array}{l} \displaystyle \frac{\partial}{\partial y_m} \mbox{softmax}(y)[k] \\[8pt] \displaystyle \mbox{ } \ \ \ = \left\{ \begin{array}{ll} \mbox{softmax}(y)[k] - \mbox{softmax}(y)[k] \times \mbox{softmax}(y)[m] & \mbox{ if } m = k, \mbox{ and} \\[6pt] \mbox{softmax}(y)[k] * \mbox{softmax}(y)[m] & \mbox{ if } m \neq k. \end{array} \right. \end{array} $ +\form#20:\begin{eqnarray*} \theta &\sim& \mbox{\sf{Dirichlet}} (\alpha_1, \ldots, \alpha_k) \\ \log (p (\theta \, |\, \alpha_1, \ldots, \alpha_k) ) &=& \log \left( \frac{\Gamma(\alpha_1 + \cdots + \alpha_k)}{\Gamma(\alpha_1) \cdots \Gamma(\alpha_k)} \theta_1^{\alpha_1 - 1} \cdots \theta_k^{\alpha_k - 1} \right) \\ &=& \log (\Gamma(\alpha_1 + \cdots + \alpha_k)) - \log(\Gamma(\alpha_1)) - \cdots - \log(\Gamma(\alpha_k)) + (\alpha_1 - 1) \log (\theta_1) + \cdots + (\alpha_k - 1) \log (\theta_k) \end{eqnarray*} +\form#21:$t = 1:T$ +\form#22:\begin{eqnarray*} y_t & \sim N(F' \theta_t, V) \\ \theta_t & \sim N(G \theta_{t-1}, W) \\ \theta_0 & \sim N(m_0, C_0) \end{eqnarray*} +\form#23:\begin{eqnarray*} y_t & \sim N(F' \theta_t, diag(V)) \\ \theta_t & \sim N(G \theta_{t-1}, W) \\ \theta_0 & \sim N(m_0, C_0) \end{eqnarray*} +\form#24:\begin{eqnarray*} W &\sim& \mbox{\sf{Inv-Wishart}}_{\nu} (S) \\ \log (p (W \, |\, \nu, S) ) &=& \log \left( \left(2^{\nu k/2} \pi^{k (k-1) /4} \prod_{i=1}^k{\Gamma (\frac{\nu + 1 - i}{2})} \right)^{-1} \times \left| S \right|^{\nu/2} \left| W \right|^{-(\nu + k + 1) / 2} \times \exp (-\frac{1}{2} \mbox{tr} (S W^{-1})) \right) \\ &=& -\frac{\nu k}{2}\log(2) - \frac{k (k-1)}{4} \log(\pi) - \sum_{i=1}^{k}{\log (\Gamma (\frac{\nu+1-i}{2}))} +\frac{\nu}{2} \log(\det(S)) - \frac{\nu+k+1}{2}\log (\det(W)) - \frac{1}{2} \mbox{tr}(S W^{-1}) \end{eqnarray*} +\form#25:\begin{eqnarray*} W &\sim& \mbox{\sf{Wishart}}_{\nu} (S) \\ \log (p (W \, |\, \nu, S) ) &=& \log \left( \left(2^{\nu k/2} \pi^{k (k-1) /4} \prod_{i=1}^k{\Gamma (\frac{\nu + 1 - i}{2})} \right)^{-1} \times \left| S \right|^{-\nu/2} \left| W \right|^{(\nu - k - 1) / 2} \times \exp (-\frac{1}{2} \mbox{tr} (S^{-1} W)) \right) \\ &=& -\frac{\nu k}{2}\log(2) - \frac{k (k-1)}{4} \log(\pi) - \sum_{i=1}^{k}{\log (\Gamma (\frac{\nu+1-i}{2}))} -\frac{\nu}{2} \log(\det(S)) + \frac{\nu-k-1}{2}\log (\det(W)) - \frac{1}{2} \mbox{tr} (S^{-1}W) \end{eqnarray*} +\form#26:\[ \mbox{bessel\_first\_kind}(v, x) = \begin{cases} J_v(x) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{error} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#27:\[ \frac{\partial\, \mbox{bessel\_first\_kind}(v, x)}{\partial x} = \begin{cases} \frac{\partial\, J_v(x)}{\partial x} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{error} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#28:\[ J_v(x)=\left(\frac{1}{2}x\right)^v \sum_{k=0}^\infty \frac{\left(-\frac{1}{4}x^2\right)^k}{k!\, \Gamma(v+k+1)} \] +\form#29:\[ \frac{\partial \, J_v(x)}{\partial x} = \frac{v}{x}J_v(x)-J_{v+1}(x) \] +\form#30:\[ \mbox{bessel\_second\_kind}(v, x) = \begin{cases} \textrm{error} & \mbox{if } x \leq 0 \\ Y_v(x) & \mbox{if } x > 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#31:\[ \frac{\partial\, \mbox{bessel\_second\_kind}(v, x)}{\partial x} = \begin{cases} \textrm{error} & \mbox{if } x \leq 0 \\ \frac{\partial\, Y_v(x)}{\partial x} & \mbox{if } x > 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#32:\[ Y_v(x)=\frac{J_v(x)\cos(v\pi)-J_{-v}(x)}{\sin(v\pi)} \] +\form#33:\[ \frac{\partial \, Y_v(x)}{\partial x} = \frac{v}{x}Y_v(x)-Y_{v+1}(x) \] +\form#34:$\hat{y} \in [0, 1]$ +\form#35:$y \in \{ 0, 1 \}$ +\form#36:$\mbox{logloss}(1, \hat{y}) = -\log \hat{y} $ +\form#37:$\mbox{logloss}(0, \hat{y}) = -\log (1 - \hat{y}) $ +\form#38:${N \choose n}$ +\form#39:$0 \leq n \leq N$ +\form#40:${N \choose n} = \frac{N!}{n! (N-n)!}$ +\form#41:$ \log {N \choose n} = \log \ \Gamma(N+1) - \log \Gamma(n+1) - \log \Gamma(N-n+1)$ +\form#42:\[ \mbox{binomial\_coefficient\_log}(x, y) = \begin{cases} \textrm{error} & \mbox{if } y > x \textrm{ or } y < 0\\ \ln\Gamma(x+1) & \mbox{if } 0\leq y \leq x \\ \quad -\ln\Gamma(y+1)& \\ \quad -\ln\Gamma(x-y+1)& \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#43:\[ \frac{\partial\, \mbox{binomial\_coefficient\_log}(x, y)}{\partial x} = \begin{cases} \textrm{error} & \mbox{if } y > x \textrm{ or } y < 0\\ \Psi(x+1) & \mbox{if } 0\leq y \leq x \\ \quad -\Psi(x-y+1)& \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#44:\[ \frac{\partial\, \mbox{binomial\_coefficient\_log}(x, y)}{\partial y} = \begin{cases} \textrm{error} & \mbox{if } y > x \textrm{ or } y < 0\\ -\Psi(y+1) & \mbox{if } 0\leq y \leq x \\ \quad +\Psi(x-y+1)& \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#45:$ e $ +\form#46:$ \sqrt{2} $ +\form#47:$ 1 / \sqrt{2} $ +\form#48:$ \log 2 $ +\form#49:$ \log 10 $ +\form#50:$ \log \pi / 4 $ +\form#51:$f(x) = \tanh x = \frac{\exp(2x) - 1}{\exp(2x) + 1}$ +\form#52:$\log | \frac{d}{dx} \tanh x | = \log (1 - \tanh^2 x)$ +\form#53:$ f^{-1}(y) = \mbox{atanh}\, y = \frac{1}{2} \log \frac{y + 1}{y - 1}$ +\form#54:\[ \mbox{digamma}(x) = \begin{cases} \textrm{error} & \mbox{if } x\in \{\dots, -3, -2, -1, 0\}\\ \Psi(x) & \mbox{if } x\not\in \{\dots, -3, -2, -1, 0\}\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#55:\[ \frac{\partial\, \mbox{digamma}(x)}{\partial x} = \begin{cases} \textrm{error} & \mbox{if } x\in \{\dots, -3, -2, -1, 0\}\\ \frac{\partial\, \Psi(x)}{\partial x} & \mbox{if } x\not\in \{\dots, -3, -2, -1, 0\}\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#56:\[ \Psi(x)=\frac{\Gamma'(x)}{\Gamma(x)} \] +\form#57:\[ \frac{\partial \, \Psi(x)}{\partial x} = \frac{\Gamma''(x)\Gamma(x)-(\Gamma'(x))^2}{\Gamma^2(x)} \] +\form#58:\[ \mbox{falling\_factorial}(x, n) = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ (x)_n & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +\form#59:\[ \frac{\partial\, \mbox{falling\_factorial}(x, n)}{\partial x} = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ \frac{\partial\, (x)_n}{\partial x} & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +\form#60:\[ \frac{\partial\, \mbox{falling\_factorial}(x, n)}{\partial n} = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ \frac{\partial\, (x)_n}{\partial n} & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +\form#61:\[ (x)_n=\frac{\Gamma(x+1)}{\Gamma(x-n+1)} \] +\form#62:\[ \frac{\partial \, (x)_n}{\partial x} = (x)_n\Psi(x+1) \] +\form#63:\[ \frac{\partial \, (x)_n}{\partial n} = -(x)_n\Psi(n+1) \] +\form#64:\[ \mbox{gamma\_p}(a, z) = \begin{cases} \textrm{error} & \mbox{if } a\leq 0 \textrm{ or } z < 0\\ P(a, z) & \mbox{if } a > 0, z \geq 0 \\[6pt] \textrm{NaN} & \mbox{if } a = \textrm{NaN or } z = \textrm{NaN} \end{cases} \] +\form#65:\[ \frac{\partial\, \mbox{gamma\_p}(a, z)}{\partial a} = \begin{cases} \textrm{error} & \mbox{if } a\leq 0 \textrm{ or } z < 0\\ \frac{\partial\, P(a, z)}{\partial a} & \mbox{if } a > 0, z \geq 0 \\[6pt] \textrm{NaN} & \mbox{if } a = \textrm{NaN or } z = \textrm{NaN} \end{cases} \] +\form#66:\[ \frac{\partial\, \mbox{gamma\_p}(a, z)}{\partial z} = \begin{cases} \textrm{error} & \mbox{if } a\leq 0 \textrm{ or } z < 0\\ \frac{\partial\, P(a, z)}{\partial z} & \mbox{if } a > 0, z \geq 0 \\[6pt] \textrm{NaN} & \mbox{if } a = \textrm{NaN or } z = \textrm{NaN} \end{cases} \] +\form#67:\[ P(a, z)=\frac{1}{\Gamma(a)}\int_0^zt^{a-1}e^{-t}dt \] +\form#68:\[ \frac{\partial \, P(a, z)}{\partial a} = -\frac{\Psi(a)}{\Gamma^2(a)}\int_0^zt^{a-1}e^{-t}dt + \frac{1}{\Gamma(a)}\int_0^z (a-1)t^{a-2}e^{-t}dt \] +\form#69:\[ \frac{\partial \, P(a, z)}{\partial z} = \frac{z^{a-1}e^{-z}}{\Gamma(a)} \] +\form#70:\[ \mbox{gamma\_q}(a, z) = \begin{cases} \textrm{error} & \mbox{if } a\leq 0 \textrm{ or } z < 0\\ Q(a, z) & \mbox{if } a > 0, z \geq 0 \\[6pt] \textrm{NaN} & \mbox{if } a = \textrm{NaN or } z = \textrm{NaN} \end{cases} \] +\form#71:\[ \frac{\partial\, \mbox{gamma\_q}(a, z)}{\partial a} = \begin{cases} \textrm{error} & \mbox{if } a\leq 0 \textrm{ or } z < 0\\ \frac{\partial\, Q(a, z)}{\partial a} & \mbox{if } a > 0, z \geq 0 \\[6pt] \textrm{NaN} & \mbox{if } a = \textrm{NaN or } z = \textrm{NaN} \end{cases} \] +\form#72:\[ \frac{\partial\, \mbox{gamma\_q}(a, z)}{\partial z} = \begin{cases} \textrm{error} & \mbox{if } a\leq 0 \textrm{ or } z < 0\\ \frac{\partial\, Q(a, z)}{\partial z} & \mbox{if } a > 0, z \geq 0 \\[6pt] \textrm{NaN} & \mbox{if } a = \textrm{NaN or } z = \textrm{NaN} \end{cases} \] +\form#73:\[ Q(a, z)=\frac{1}{\Gamma(a)}\int_z^\infty t^{a-1}e^{-t}dt \] +\form#74:\[ \frac{\partial \, Q(a, z)}{\partial a} = -\frac{\Psi(a)}{\Gamma^2(a)}\int_z^\infty t^{a-1}e^{-t}dt + \frac{1}{\Gamma(a)}\int_z^\infty (a-1)t^{a-2}e^{-t}dt \] +\form#75:\[ \frac{\partial \, Q(a, z)}{\partial z} = -\frac{z^{a-1}e^{-z}}{\Gamma(a)} \] +\form#76:\[ \mbox{int\_step}(x) = \begin{cases} 0 & \mbox{if } x \leq 0 \\ 1 & \mbox{if } x > 0 \\[6pt] 0 & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#77:\[ \mbox{inv\_cloglog}(y) = \begin{cases} \mbox{cloglog}^{-1}(y) & \mbox{if } -\infty\leq y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } y = \textrm{NaN} \end{cases} \] +\form#78:\[ \frac{\partial\, \mbox{inv\_cloglog}(y)}{\partial y} = \begin{cases} \frac{\partial\, \mbox{cloglog}^{-1}(y)}{\partial y} & \mbox{if } -\infty\leq y\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } y = \textrm{NaN} \end{cases} \] +\form#79:\[ \mbox{cloglog}^{-1}(y) = 1 - \exp \left( - \exp(y) \right) \] +\form#80:\[ \frac{\partial \, \mbox{cloglog}^{-1}(y)}{\partial y} = \exp(y-\exp(y)) \] +\form#81:$\mbox{logit}^{-1}(x) = \frac{1}{1 + \exp(-x)}$ +\form#82:\[ \mbox{inv\_logit}(y) = \begin{cases} \mbox{logit}^{-1}(y) & \mbox{if } -\infty\leq y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } y = \textrm{NaN} \end{cases} \] +\form#83:\[ \frac{\partial\, \mbox{inv\_logit}(y)}{\partial y} = \begin{cases} \frac{\partial\, \mbox{logit}^{-1}(y)}{\partial y} & \mbox{if } -\infty\leq y\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } y = \textrm{NaN} \end{cases} \] +\form#84:\[ \mbox{logit}^{-1}(y) = \frac{1}{1 + \exp(-y)} \] +\form#85:\[ \frac{\partial \, \mbox{logit}^{-1}(y)}{\partial y} = \frac{\exp(y)}{(\exp(y)+1)^2} \] +\form#86:$\Phi(x) = \int_{-\infty}^x \mbox{\sf Norm}(x|0, 1) \ dx = p$ +\form#87:$\mbox{inverse\_softmax}(x)[i] = \log x[i]$ +\form#88:$f(x) = \exp(x) + L$ +\form#89:$a > 0$ +\form#90:$b > 0$ +\form#91:$\mbox{B}(a, b) = \frac{\Gamma(a) \Gamma(b)}{\Gamma(a+b)}$ +\form#92:$\log \mbox{B}(a, b) = \log \Gamma(a) + \log \Gamma(b) - \log \Gamma(a+b)$ +\form#93:\[ \mbox{lbeta}(\alpha, \beta) = \begin{cases} \ln\int_0^1 u^{\alpha - 1} (1 - u)^{\beta - 1} \, du & \mbox{if } \alpha, \beta>0 \\[6pt] \textrm{NaN} & \mbox{if } \alpha = \textrm{NaN or } \beta = \textrm{NaN} \end{cases} \] +\form#94:\[ \frac{\partial\, \mbox{lbeta}(\alpha, \beta)}{\partial \alpha} = \begin{cases} \Psi(\alpha)-\Psi(\alpha+\beta) & \mbox{if } \alpha, \beta>0 \\[6pt] \textrm{NaN} & \mbox{if } \alpha = \textrm{NaN or } \beta = \textrm{NaN} \end{cases} \] +\form#95:\[ \frac{\partial\, \mbox{lbeta}(\alpha, \beta)}{\partial \beta} = \begin{cases} \Psi(\beta)-\Psi(\alpha+\beta) & \mbox{if } \alpha, \beta>0 \\[6pt] \textrm{NaN} & \mbox{if } \alpha = \textrm{NaN or } \beta = \textrm{NaN} \end{cases} \] +\form#96:\[ \mbox{lgamma}(x) = \begin{cases} \textrm{error} & \mbox{if } x\in \{\dots, -3, -2, -1, 0\}\\ \ln\Gamma(x) & \mbox{if } x\not\in \{\dots, -3, -2, -1, 0\}\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#97:\[ \frac{\partial\, \mbox{lgamma}(x)}{\partial x} = \begin{cases} \textrm{error} & \mbox{if } x\in \{\dots, -3, -2, -1, 0\}\\ \Psi(x) & \mbox{if } x\not\in \{\dots, -3, -2, -1, 0\}\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#98:$\Gamma_k(x)$ +\form#99:$x$ +\form#100:$\Gamma_k(x) = \pi^{k(k-1)/4} \, \prod_{j=1}^k \Gamma(x + (1 - j)/2)$ +\form#101:$\Gamma()$ +\form#102:\[ \mbox{lmgamma}(n, x) = \begin{cases} \textrm{error} & \mbox{if } x\in \{\dots, -3, -2, -1, 0\}\\ \ln\Gamma_n(x) & \mbox{if } x\not\in \{\dots, -3, -2, -1, 0\}\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#103:\[ \frac{\partial\, \mbox{lmgamma}(n, x)}{\partial x} = \begin{cases} \textrm{error} & \mbox{if } x\in \{\dots, -3, -2, -1, 0\}\\ \frac{\partial\, \ln\Gamma_n(x)}{\partial x} & \mbox{if } x\not\in \{\dots, -3, -2, -1, 0\}\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#104:\[ \ln\Gamma_n(x) = \pi^{n(n-1)/4} \, \prod_{j=1}^n \Gamma(x + (1 - j)/2) \] +\form#105:\[ \frac{\partial \, \ln\Gamma_n(x)}{\partial x} = \sum_{j=1}^n \Psi(x + (1 - j) / 2) \] +\form#106:\[ \mbox{log1m}(x) = \begin{cases} \ln(1-x) & \mbox{if } x \leq 1 \\ \textrm{NaN} & \mbox{if } x > 1\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#107:\[ \frac{\partial\, \mbox{log1m}(x)}{\partial x} = \begin{cases} -\frac{1}{1-x} & \mbox{if } x \leq 1 \\ \textrm{NaN} & \mbox{if } x > 1\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#108:\[ \mbox{log1m\_exp}(x) = \begin{cases} \ln(1-\exp(x)) & \mbox{if } x < 0 \\ \textrm{NaN} & \mbox{if } x \geq 0\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#109:\[ \frac{\partial\, \mbox{asinh}(x)}{\partial x} = \begin{cases} -\frac{\exp(x)}{1-\exp(x)} & \mbox{if } x < 0 \\ \textrm{NaN} & \mbox{if } x \geq 0\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#110:\[ \mbox{log1m\_inv\_logit}(x) = \begin{cases} -\ln(\exp(x)+1) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#111:\[ \frac{\partial\, \mbox{log1m\_inv\_logit}(x)}{\partial x} = \begin{cases} -\frac{\exp(x)}{\exp(x)+1} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#112:\[ \mbox{log1p}(x) = \begin{cases} \textrm{NaN} & \mbox{if } x < -1\\ \ln(1+x)& \mbox{if } x\geq -1 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#113:\[ \frac{\partial\, \mbox{log1p}(x)}{\partial x} = \begin{cases} \textrm{NaN} & \mbox{if } x < -1\\ \frac{1}{1+x} & \mbox{if } x\geq -1 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#114:\[ \mbox{log1p\_exp}(x) = \begin{cases} \ln(1+\exp(x)) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#115:\[ \frac{\partial\, \mbox{log1p\_exp}(x)}{\partial x} = \begin{cases} \frac{\exp(x)}{1+\exp(x)} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#116:\[ \mbox{log\_diff\_exp}(x, y) = \begin{cases} \textrm{NaN} & \mbox{if } x \leq y\\ \ln(\exp(x)-\exp(y)) & \mbox{if } x > y \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#117:\[ \frac{\partial\, \mbox{log\_diff\_exp}(x, y)}{\partial x} = \begin{cases} \textrm{NaN} & \mbox{if } x \leq y\\ \frac{\exp(x)}{\exp(x)-\exp(y)} & \mbox{if } x > y \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#118:\[ \frac{\partial\, \mbox{log\_diff\_exp}(x, y)}{\partial y} = \begin{cases} \textrm{NaN} & \mbox{if } x \leq y\\ -\frac{\exp(y)}{\exp(x)-\exp(y)} & \mbox{if } x > y \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#119:\[ \mbox{log\_falling\_factorial}(x, n) = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ \ln (x)_n & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +\form#120:\[ \frac{\partial\, \mbox{log\_falling\_factorial}(x, n)}{\partial x} = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ \Psi(x) & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +\form#121:\[ \frac{\partial\, \mbox{log\_falling\_factorial}(x, n)}{\partial n} = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ -\Psi(n) & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +\form#122:\[ \mbox{log\_inv\_logit}(x) = \begin{cases} \ln\left(\frac{1}{1+\exp(-x)}\right)& \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#123:\[ \frac{\partial\, \mbox{log\_inv\_logit}(x)}{\partial x} = \begin{cases} \frac{1}{1+\exp(x)} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#124:\[ \mbox{log\_mix}(\theta, \lambda_1, \lambda_2) = \log \left( \theta \lambda_1 + (1 - \theta) \lambda_2 \right). \] +\form#125:\[ \frac{\partial}{\partial \theta} \mbox{log\_mix}(\theta, \lambda_1, \lambda_2) = FIXME \] +\form#126:\[ \frac{\partial}{\partial \lambda_1} \mbox{log\_mix}(\theta, \lambda_1, \lambda_2) = FIXME \] +\form#127:\[ \frac{\partial}{\partial \lambda_2} \mbox{log\_mix}(\theta, \lambda_1, \lambda_2) = FIXME \] +\form#128:\[ \mbox{log\_rising\_factorial}(x, n) = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ \ln x^{(n)} & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +\form#129:\[ \frac{\partial\, \mbox{log\_rising\_factorial}(x, n)}{\partial x} = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ \Psi(x+n) - \Psi(x) & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +\form#130:\[ \frac{\partial\, \mbox{log\_rising\_factorial}(x, n)}{\partial n} = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ \Psi(x+n) & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +\form#131:$\log (\exp(a) + \exp(b)) = m + \log(\exp(a-m) + \exp(b-m))$ +\form#132:$m = max(a, b)$ +\form#133:\[ \mbox{log\_sum\_exp}(x, y) = \begin{cases} \ln(\exp(x)+\exp(y)) & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#134:\[ \frac{\partial\, \mbox{log\_sum\_exp}(x, y)}{\partial x} = \begin{cases} \frac{\exp(x)}{\exp(x)+\exp(y)} & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#135:\[ \frac{\partial\, \mbox{log\_sum\_exp}(x, y)}{\partial y} = \begin{cases} \frac{\exp(y)}{\exp(x)+\exp(y)} & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#136:\[ \mbox{operator\&\&}(x, y) = \begin{cases} 0 & \mbox{if } x = 0 \textrm{ or } y=0 \\ 1 & \mbox{if } x, y \neq 0 \\[6pt] 1 & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#137:\[ \mbox{operator||}(x, y) = \begin{cases} 0 & \mbox{if } x, y=0 \\ 1 & \mbox{if } x \neq 0 \textrm{ or } y\neq0\\[6pt] 1 & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#138:$x \in [0, 1]$ +\form#139:$\mbox{logit}(x) = \log \left( \frac{x}{1 - x} \right)$ +\form#140:\[ \mbox{logit}(x) = \begin{cases} \textrm{NaN}& \mbox{if } x < 0 \textrm{ or } x > 1\\ \ln\frac{x}{1-x} & \mbox{if } 0\leq x \leq 1 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#141:\[ \frac{\partial\, \mbox{logit}(x)}{\partial x} = \begin{cases} \textrm{NaN}& \mbox{if } x < 0 \textrm{ or } x > 1\\ \frac{1}{x-x^2}& \mbox{if } 0\leq x\leq 1 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#142:$f(x) = L + (U - L) \mbox{logit}^{-1}(x)$ +\form#143:$\log \left| \frac{d}{dx} \left( L + (U-L) \mbox{logit}^{-1}(x) \right) \right|$ +\form#144:$ {} = \log | (U-L) \, (\mbox{logit}^{-1}(x)) \, (1 - \mbox{logit}^{-1}(x)) |$ +\form#145:$ {} = \log (U - L) + \log (\mbox{logit}^{-1}(x)) + \log (1 - \mbox{logit}^{-1}(x))$ +\form#146:$f^{-1}(y) = \mbox{logit}(\frac{y - L}{U - L})$ +\form#147:$U$ +\form#148:\[ \mbox{modified\_bessel\_first\_kind}(v, z) = \begin{cases} I_v(z) & \mbox{if } -\infty\leq z \leq \infty \\[6pt] \textrm{error} & \mbox{if } z = \textrm{NaN} \end{cases} \] +\form#149:\[ \frac{\partial\, \mbox{modified\_bessel\_first\_kind}(v, z)}{\partial z} = \begin{cases} \frac{\partial\, I_v(z)}{\partial z} & \mbox{if } -\infty\leq z\leq \infty \\[6pt] \textrm{error} & \mbox{if } z = \textrm{NaN} \end{cases} \] +\form#150:\[ {I_v}(z) = \left(\frac{1}{2}z\right)^v\sum_{k=0}^\infty \frac{\left(\frac{1}{4}z^2\right)^k}{k!\Gamma(v+k+1)} \] +\form#151:\[ \frac{\partial \, I_v(z)}{\partial z} = I_{v-1}(z)-\frac{v}{z}I_v(z) \] +\form#152:\[ \mbox{modified\_bessel\_second\_kind}(v, z) = \begin{cases} \textrm{error} & \mbox{if } z \leq 0 \\ K_v(z) & \mbox{if } z > 0 \\[6pt] \textrm{NaN} & \mbox{if } z = \textrm{NaN} \end{cases} \] +\form#153:\[ \frac{\partial\, \mbox{modified\_bessel\_second\_kind}(v, z)}{\partial z} = \begin{cases} \textrm{error} & \mbox{if } z \leq 0 \\ \frac{\partial\, K_v(z)}{\partial z} & \mbox{if } z > 0 \\[6pt] \textrm{NaN} & \mbox{if } z = \textrm{NaN} \end{cases} \] +\form#154:\[ {K_v}(z) = \frac{\pi}{2}\cdot\frac{I_{-v}(z) - I_{v}(z)}{\sin(v\pi)} \] +\form#155:\[ \frac{\partial \, K_v(z)}{\partial z} = -\frac{v}{z}K_v(z)-K_{v-1}(z) \] +\form#156:$ a * \log b $ +\form#157:\[ \mbox{multiply\_log}(x, y) = \begin{cases} 0 & \mbox{if } x=y=0\\ x\ln y & \mbox{if } x, y\neq0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#158:\[ \frac{\partial\, \mbox{multiply\_log}(x, y)}{\partial x} = \begin{cases} \infty & \mbox{if } x=y=0\\ \ln y & \mbox{if } x, y\neq 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#159:\[ \frac{\partial\, \mbox{multiply\_log}(x, y)}{\partial y} = \begin{cases} \infty & \mbox{if } x=y=0\\ \frac{x}{y} & \mbox{if } x, y\neq 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#160:\[ \mbox{owens\_t}(h, a) = \begin{cases} \mbox{owens\_t}(h, a) & \mbox{if } -\infty\leq h, a \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } h = \textrm{NaN or } a = \textrm{NaN} \end{cases} \] +\form#161:\[ \frac{\partial\, \mbox{owens\_t}(h, a)}{\partial h} = \begin{cases} \frac{\partial\, \mbox{owens\_t}(h, a)}{\partial h} & \mbox{if } -\infty\leq h, a\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } h = \textrm{NaN or } a = \textrm{NaN} \end{cases} \] +\form#162:\[ \frac{\partial\, \mbox{owens\_t}(h, a)}{\partial a} = \begin{cases} \frac{\partial\, \mbox{owens\_t}(h, a)}{\partial a} & \mbox{if } -\infty\leq h, a\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } h = \textrm{NaN or } a = \textrm{NaN} \end{cases} \] +\form#163:\[ \mbox{owens\_t}(h, a) = \frac{1}{2\pi} \int_0^a \frac{\exp(-\frac{1}{2}h^2(1+x^2))}{1+x^2}dx \] +\form#164:\[ \frac{\partial \, \mbox{owens\_t}(h, a)}{\partial h} = -\frac{1}{2\sqrt{2\pi}} \operatorname{erf}\left(\frac{ha}{\sqrt{2}}\right) \exp\left(-\frac{h^2}{2}\right) \] +\form#165:\[ \frac{\partial \, \mbox{owens\_t}(h, a)}{\partial a} = \frac{\exp\left(-\frac{1}{2}h^2(1+a^2)\right)}{2\pi (1+a^2)} \] +\form#166:$\Phi(x) = \int_{-\infty}^x \mbox{\sf Norm}(x|0, 1) \ dx$ +\form#167:$f(x) = \exp(x)$ +\form#168:$\log | \frac{d}{dx} \mbox{exp}(x) | = \log | \mbox{exp}(x) | = x$ +\form#169:$f$ +\form#170:$f^{-1}(x) = \log(x)$ +\form#171:$f(x) = \mbox{logit}^{-1}(x) = \frac{1}{1 + \exp(x)}$ +\form#172:$\log | \frac{d}{dx} \mbox{logit}^{-1}(x) |$ +\form#173:$\log ((\mbox{logit}^{-1}(x)) (1 - \mbox{logit}^{-1}(x))$ +\form#174:$\log (\mbox{logit}^{-1}(x)) + \log (1 - \mbox{logit}^{-1}(x))$ +\form#175:$f^{-1}(y) = \mbox{logit}(y) = \frac{1 - y}{y}$ +\form#176:\[ \mbox{rising\_factorial}(x, n) = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ x^{(n)} & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +\form#177:\[ \frac{\partial\, \mbox{rising\_factorial}(x, n)}{\partial x} = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ \frac{\partial\, x^{(n)}}{\partial x} & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +\form#178:\[ \frac{\partial\, \mbox{rising\_factorial}(x, n)}{\partial n} = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ \frac{\partial\, x^{(n)}}{\partial n} & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +\form#179:\[ x^{(n)}=\frac{\Gamma(x+n)}{\Gamma(x)} \] +\form#180:\[ \frac{\partial \, x^{(n)}}{\partial x} = x^{(n)}(\Psi(x+n)-\Psi(x)) \] +\form#181:\[ \frac{\partial \, x^{(n)}}{\partial n} = (x)_n\Psi(x+n) \] +\form#182:$\mbox{square}(x) = x^2$ +\form#183:\[ \mbox{step}(x) = \begin{cases} 0 & \mbox{if } x \leq 0 \\ 1 & \mbox{if } x > 0 \\[6pt] 0 & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#184:\[ \mbox{trigamma}(x) = \begin{cases} \textrm{error} & \mbox{if } x\in \{\dots, -3, -2, -1, 0\}\\ \Psi_1(x) & \mbox{if } x\not\in \{\dots, -3, -2, -1, 0\}\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#185:\[ \frac{\partial\, \mbox{trigamma}(x)}{\partial x} = \begin{cases} \textrm{error} & \mbox{if } x\in \{\dots, -3, -2, -1, 0\}\\ \frac{\partial\, \Psi_1(x)}{\partial x} & \mbox{if } x\not\in \{\dots, -3, -2, -1, 0\}\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#186:\[ \Psi_1(x)=\sum_{n=0}^\infty \frac{1}{(x+n)^2} \] +\form#187:\[ \frac{\partial \, \Psi_1(x)}{\partial x} = -2\sum_{n=0}^\infty \frac{1}{(x+n)^3} \] +\form#188:$f(x) = U - \exp(x)$ +\form#189:$ \log | \frac{d}{dx} -\mbox{exp}(x) + U | = \log | -\mbox{exp}(x) + 0 | = x$ +\form#190:$f^{-1}(y) = \log -(y - U)$ +\form#191:$\frac{1}{\pi}\arctan\left(\frac{y-\mu}{\sigma}\right) + \frac{1}{2}$ +\form#192:\begin{eqnarray*} y &\sim& \chi^2_\nu \\ \log (p (y \, |\, \nu)) &=& \log \left( \frac{2^{-\nu / 2}}{\Gamma (\nu / 2)} y^{\nu / 2 - 1} \exp^{- y / 2} \right) \\ &=& - \frac{\nu}{2} \log(2) - \log (\Gamma (\nu / 2)) + (\frac{\nu}{2} - 1) \log(y) - \frac{y}{2} \\ & & \mathrm{ where } \; y \ge 0 \end{eqnarray*} +\form#193:$ f(y|\mu, \sigma) = \begin{cases} \ \frac{1}{2} \exp\left(\frac{y-\mu}{\sigma}\right), \mbox{if } y < \mu \\ 1 - \frac{1}{2} \exp\left(-\frac{y-\mu}{\sigma}\right), \mbox{if } y \ge \mu \ \end{cases}$ +\form#194:\begin{eqnarray*} y &\sim& \mbox{\sf{Expon}}(\beta) \\ \log (p (y \, |\, \beta) ) &=& \log \left( \beta \exp^{-\beta y} \right) \\ &=& \log (\beta) - \beta y \\ & & \mathrm{where} \; y > 0 \end{eqnarray*} +\form#195:\begin{eqnarray*} y &\sim& \mbox{\sf{Gamma}}(\alpha, \beta) \\ \log (p (y \, |\, \alpha, \beta) ) &=& \log \left( \frac{\beta^\alpha}{\Gamma(\alpha)} y^{\alpha - 1} \exp^{- \beta y} \right) \\ &=& \alpha \log(\beta) - \log(\Gamma(\alpha)) + (\alpha - 1) \log(y) - \beta y\\ & & \mathrm{where} \; y > 0 \end{eqnarray*} +\form#196:\begin{eqnarray*} y &\sim& \mbox{\sf{Inv-}}\chi^2_\nu \\ \log (p (y \, |\, \nu)) &=& \log \left( \frac{2^{-\nu / 2}}{\Gamma (\nu / 2)} y^{- (\nu / 2 + 1)} \exp^{-1 / (2y)} \right) \\ &=& - \frac{\nu}{2} \log(2) - \log (\Gamma (\nu / 2)) - (\frac{\nu}{2} + 1) \log(y) - \frac{1}{2y} \\ & & \mathrm{ where } \; y > 0 \end{eqnarray*} +\form#197:$\Phi(x) = \frac{1}{\sqrt{2 \pi}} \int_{-\inf}^x e^{-t^2/2} dt$ +\form#198:\begin{eqnarray*} y &\sim& \mbox{\sf{Inv-}}\chi^2(\nu, s^2) \\ \log (p (y \, |\, \nu, s)) &=& \log \left( \frac{(\nu / 2)^{\nu / 2}}{\Gamma (\nu / 2)} s^\nu y^{- (\nu / 2 + 1)} \exp^{-\nu s^2 / (2y)} \right) \\ &=& \frac{\nu}{2} \log(\frac{\nu}{2}) - \log (\Gamma (\nu / 2)) + \nu \log(s) - (\frac{\nu}{2} + 1) \log(y) - \frac{\nu s^2}{2y} \\ & & \mathrm{ where } \; y > 0 \end{eqnarray*} +\form#199:\begin{eqnarray*} y &\sim& t_{\nu} (\mu, \sigma^2) \\ \log (p (y \, |\, \nu, \mu, \sigma) ) &=& \log \left( \frac{\Gamma((\nu + 1) /2)} {\Gamma(\nu/2)\sqrt{\nu \pi} \sigma} \left( 1 + \frac{1}{\nu} (\frac{y - \mu}{\sigma})^2 \right)^{-(\nu + 1)/2} \right) \\ &=& \log( \Gamma( (\nu+1)/2 )) - \log (\Gamma (\nu/2) - \frac{1}{2} \log(\nu \pi) - \log(\sigma) -\frac{\nu + 1}{2} \log (1 + \frac{1}{\nu} (\frac{y - \mu}{\sigma})^2) \end{eqnarray*} +\form#200:\begin{eqnarray*} y &\sim& \mbox{\sf{U}}(\alpha, \beta) \\ \log (p (y \, |\, \alpha, \beta)) &=& \log \left( \frac{1}{\beta-\alpha} \right) \\ &=& \log (1) - \log (\beta - \alpha) \\ &=& -\log (\beta - \alpha) \\ & & \mathrm{ where } \; y \in [\alpha, \beta], \log(0) \; \mathrm{otherwise} \end{eqnarray*} +\form#201:$y$ +\form#202:$\alpha$ +\form#203:$\tau$ +\form#204:$\beta$ +\form#205:$\delta$ +\form#206:$ \frac{d x_n}{dt} $ +\form#207:\[ \frac{d x_{N+m}}{dt} = \frac{d}{dt} \frac{\partial x_1}{\partial \theta_m} \] +\form#208:\[ \frac{d x_{N+n}}{dt} = \frac{d}{dt} \frac{\partial x_1}{\partial y0_n} \] +\form#209:\[ \frac{d x_{N + n}}{dt} = \frac{d}{dt} \frac{\partial x_1}{\partial y0_n} \] +\form#210:\[ \frac{d x_{N+N+m}}{dt} = \frac{d}{dt} \frac{\partial x_1}{\partial \theta_m} \] +\form#211:$\frac{\partial}{\partial x} (x+y) = 1$ +\form#212:$\frac{\partial}{\partial y} (x+y) = 1$ +\form#213:\[ \mbox{operator+}(x, y) = \begin{cases} x+y & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#214:\[ \frac{\partial\, \mbox{operator+}(x, y)}{\partial x} = \begin{cases} 1 & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#215:\[ \frac{\partial\, \mbox{operator+}(x, y)}{\partial y} = \begin{cases} 1 & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#216:$\frac{d}{dx} (x + c) = 1$ +\form#217:$\frac{d}{dy} (c + y) = 1$ +\form#218:$\frac{\partial}{\partial x} (x/y) = 1/y$ +\form#219:$\frac{\partial}{\partial y} (x/y) = -x / y^2$ +\form#220:\[ \mbox{operator/}(x, y) = \begin{cases} \frac{x}{y} & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#221:\[ \frac{\partial\, \mbox{operator/}(x, y)}{\partial x} = \begin{cases} \frac{1}{y} & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#222:\[ \frac{\partial\, \mbox{operator/}(x, y)}{\partial y} = \begin{cases} -\frac{x}{y^2} & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#223:$\frac{\partial}{\partial x} (x/c) = 1/c$ +\form#224:$\frac{d}{d y} (c/y) = -c / y^2$ +\form#225:\[ \mbox{operator==}(x, y) = \begin{cases} 0 & \mbox{if } x \neq y\\ 1 & \mbox{if } x = y \\[6pt] 0 & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#226:\[ \mbox{operator\textgreater}(x, y) = \begin{cases} 0 & \mbox{if } x \leq y\\ 1 & \mbox{if } x > y \\[6pt] 0 & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#227:\[ \mbox{operator\textgreater=}(x, y) = \begin{cases} 0 & \mbox{if } x < y\\ 1 & \mbox{if } x \geq y \\[6pt] 0 & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#228:\[ \mbox{operator\textless}(x, y) = \begin{cases} 0 & \mbox{if } x \geq y \\ 1 & \mbox{if } x < y \\[6pt] 0 & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#229:\[ \mbox{operator\textless=}(x, y) = \begin{cases} 0 & \mbox{if } x > y\\ 1 & \mbox{if } x \leq y \\[6pt] 0 & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#230:$\frac{\partial}{\partial x} (x * y) = y$ +\form#231:$\frac{\partial}{\partial y} (x * y) = x$ +\form#232:\[ \mbox{operator*}(x, y) = \begin{cases} xy & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#233:\[ \frac{\partial\, \mbox{operator*}(x, y)}{\partial x} = \begin{cases} y & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#234:\[ \frac{\partial\, \mbox{operator*}(x, y)}{\partial y} = \begin{cases} x & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#235:$\frac{\partial}{\partial x} (x * c) = c$ +\form#236:$\frac{\partial}{\partial y} (c * y) = c$ +\form#237:\[ \mbox{operator!=}(x, y) = \begin{cases} 0 & \mbox{if } x = y\\ 1 & \mbox{if } x \neq y \\[6pt] 0 & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#238:$\frac{\partial}{\partial x} (x-y) = 1$ +\form#239:$\frac{\partial}{\partial y} (x-y) = -1$ +\form#240:\[ \mbox{operator-}(x, y) = \begin{cases} x-y & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#241:\[ \frac{\partial\, \mbox{operator-}(x, y)}{\partial x} = \begin{cases} 1 & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#242:\[ \frac{\partial\, \mbox{operator-}(x, y)}{\partial y} = \begin{cases} -1 & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#243:$\frac{\partial}{\partial x} (x-c) = 1$ +\form#244:$\frac{\partial}{\partial y} (c-y) = -1$ +\form#245:$\frac{d}{dx} -x = -1$ +\form#246:\[ \mbox{operator-}(x) = \begin{cases} -x & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#247:\[ \frac{\partial\, \mbox{operator-}(x)}{\partial x} = \begin{cases} -1 & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#248:\[ \mbox{operator!}(x) = \begin{cases} 0 & \mbox{if } x \neq 0 \\ 1 & \mbox{if } x = 0 \\[6pt] 0 & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#249:$\frac{d}{dx} +x = \frac{d}{dx} x = 1$ +\form#250:\[ \mbox{operator+}(x) = \begin{cases} x & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#251:\[ \frac{\partial\, \mbox{operator+}(x)}{\partial x} = \begin{cases} 1 & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#252:\[ \mbox{abs}(x) = \begin{cases} |x| & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#253:\[ \frac{\partial\, \mbox{abs}(x)}{\partial x} = \begin{cases} -1 & \mbox{if } x < 0 \\ 0 & \mbox{if } x = 0 \\ 1 & \mbox{if } x > 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#254:$\frac{d}{dx} \arccos x = \frac{-1}{\sqrt{1 - x^2}}$ +\form#255:\[ \mbox{acos}(x) = \begin{cases} \textrm{NaN} & \mbox{if } x < -1\\ \arccos(x) & \mbox{if } -1\leq x\leq 1 \\ \textrm{NaN} & \mbox{if } x > 1\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#256:\[ \frac{\partial\, \mbox{acos}(x)}{\partial x} = \begin{cases} \textrm{NaN} & \mbox{if } x < -1\\ \frac{\partial\, \arccos(x)}{\partial x} & \mbox{if } -1\leq x\leq 1 \\ \textrm{NaN} & \mbox{if } x < -1\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#257:\[ \frac{\partial \, \arccos(x)}{\partial x} = -\frac{1}{\sqrt{1-x^2}} \] +\form#258:$\frac{d}{dx} \mbox{acosh}(x) = \frac{x}{x^2 - 1}$ +\form#259:\[ \mbox{acosh}(x) = \begin{cases} \textrm{NaN} & \mbox{if } x < 1 \\ \cosh^{-1}(x) & \mbox{if } x \geq 1 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#260:\[ \frac{\partial\, \mbox{acosh}(x)}{\partial x} = \begin{cases} \textrm{NaN} & \mbox{if } x < 1 \\ \frac{\partial\, \cosh^{-1}(x)}{\partial x} & \mbox{if } x \geq 1 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#261:\[ \cosh^{-1}(x)=\ln\left(x+\sqrt{x^2-1}\right) \] +\form#262:\[ \frac{\partial \, \cosh^{-1}(x)}{\partial x} = \frac{1}{\sqrt{x^2-1}} \] +\form#263:$\frac{d}{dx} \arcsin x = \frac{1}{\sqrt{1 - x^2}}$ +\form#264:\[ \mbox{asin}(x) = \begin{cases} \textrm{NaN} & \mbox{if } x < -1\\ \arcsin(x) & \mbox{if } -1\leq x\leq 1 \\ \textrm{NaN} & \mbox{if } x > 1\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#265:\[ \frac{\partial\, \mbox{asin}(x)}{\partial x} = \begin{cases} \textrm{NaN} & \mbox{if } x < -1\\ \frac{\partial\, \arcsin(x)}{\partial x} & \mbox{if } -1\leq x\leq 1 \\ \textrm{NaN} & \mbox{if } x < -1\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#266:\[ \frac{\partial \, \arcsin(x)}{\partial x} = \frac{1}{\sqrt{1-x^2}} \] +\form#267:$\frac{d}{dx} \mbox{asinh}(x) = \frac{x}{x^2 + 1}$ +\form#268:\[ \mbox{asinh}(x) = \begin{cases} \sinh^{-1}(x) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#269:\[ \frac{\partial\, \mbox{asinh}(x)}{\partial x} = \begin{cases} \frac{\partial\, \sinh^{-1}(x)}{\partial x} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#270:\[ \sinh^{-1}(x)=\ln\left(x+\sqrt{x^2+1}\right) \] +\form#271:\[ \frac{\partial \, \sinh^{-1}(x)}{\partial x} = \frac{1}{\sqrt{x^2+1}} \] +\form#272:$\frac{d}{dx} \arctan x = \frac{1}{1 + x^2}$ +\form#273:\[ \mbox{atan}(x) = \begin{cases} \arctan(x) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#274:\[ \frac{\partial\, \mbox{atan}(x)}{\partial x} = \begin{cases} \frac{\partial\, \arctan(x)}{\partial x} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#275:\[ \frac{\partial \, \arctan(x)}{\partial x} = \frac{1}{x^2+1} \] +\form#276:$ \frac{\partial}{\partial x} \arctan \frac{x}{y} = \frac{y}{x^2 + y^2}$ +\form#277:$ \frac{\partial}{\partial y} \arctan \frac{x}{y} = \frac{-x}{x^2 + y^2}$ +\form#278:$ \frac{d}{d x} \arctan \frac{x}{c} = \frac{c}{x^2 + c^2}$ +\form#279:$ \frac{\partial}{\partial y} \arctan \frac{c}{y} = \frac{-c}{c^2 + y^2}$ +\form#280:\[ \mbox{atan2}(x, y) = \begin{cases} \arctan\left(\frac{x}{y}\right) & \mbox{if } -\infty\leq x \leq \infty, -\infty\leq y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#281:\[ \frac{\partial\, \mbox{atan2}(x, y)}{\partial x} = \begin{cases} \frac{y}{x^2+y^2} & \mbox{if } -\infty\leq x\leq \infty, -\infty\leq y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#282:\[ \frac{\partial\, \mbox{atan2}(x, y)}{\partial y} = \begin{cases} -\frac{x}{x^2+y^2} & \mbox{if } -\infty\leq x\leq \infty, -\infty\leq y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#283:$\frac{d}{dx} \mbox{atanh}(x) = \frac{1}{1 - x^2}$ +\form#284:\[ \mbox{atanh}(x) = \begin{cases} \textrm{NaN} & \mbox{if } x < -1\\ \tanh^{-1}(x) & \mbox{if } -1\leq x \leq 1 \\ \textrm{NaN} & \mbox{if } x > 1\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#285:\[ \frac{\partial\, \mbox{atanh}(x)}{\partial x} = \begin{cases} \textrm{NaN} & \mbox{if } x < -1\\ \frac{\partial\, \tanh^{-1}(x)}{\partial x} & \mbox{if } -1\leq x\leq 1 \\ \textrm{NaN} & \mbox{if } x > 1\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#286:\[ \tanh^{-1}(x)=\frac{1}{2}\ln\left(\frac{1+x}{1-x}\right) \] +\form#287:\[ \frac{\partial \, \tanh^{-1}(x)}{\partial x} = \frac{1}{1-x^2} \] +\form#288:$\hat{y}$ +\form#289:$\frac{d}{d\hat{y}} \mbox{logloss}(1, \hat{y}) = - \frac{1}{\hat{y}}$ +\form#290:$\frac{d}{d\hat{y}} \mbox{logloss}(0, \hat{y}) = \frac{1}{1 - \hat{y}}$ +\form#291:\[ \mbox{binary\_log\_loss}(y, \hat{y}) = \begin{cases} y \log \hat{y} + (1 - y) \log (1 - \hat{y}) & \mbox{if } 0\leq \hat{y}\leq 1, y\in\{ 0, 1 \}\\[6pt] \textrm{NaN} & \mbox{if } \hat{y} = \textrm{NaN} \end{cases} \] +\form#292:\[ \frac{\partial\, \mbox{binary\_log\_loss}(y, \hat{y})}{\partial \hat{y}} = \begin{cases} \frac{y}{\hat{y}}-\frac{1-y}{1-\hat{y}} & \mbox{if } 0\leq \hat{y}\leq 1, y\in\{ 0, 1 \}\\[6pt] \textrm{NaN} & \mbox{if } \hat{y} = \textrm{NaN} \end{cases} \] +\form#293:$\frac{d}{dx} x^{1/3} = \frac{1}{3 x^{2/3}}$ +\form#294:\[ \mbox{cbrt}(x) = \begin{cases} \sqrt[3]{x} & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#295:\[ \frac{\partial\, \mbox{cbrt}(x)}{\partial x} = \begin{cases} \frac{1}{3x^{2/3}} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#296:$\frac{d}{dx} {\lceil x \rceil} = 0$ +\form#297:\[ \mbox{ceil}(x) = \begin{cases} \lceil x\rceil & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#298:\[ \frac{\partial\, \mbox{ceil}(x)}{\partial x} = \begin{cases} 0 & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#299:$\frac{d}{dx} \cos x = - \sin x$ +\form#300:\[ \mbox{cos}(x) = \begin{cases} \cos(x) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#301:\[ \frac{\partial\, \mbox{cos}(x)}{\partial x} = \begin{cases} -\sin(x) & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#302:$\frac{d}{dx} \cosh x = \sinh x$ +\form#303:\[ \mbox{cosh}(x) = \begin{cases} \cosh(x) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#304:\[ \frac{\partial\, \mbox{cosh}(x)}{\partial x} = \begin{cases} \sinh(x) & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#305:$\frac{d}{dx} \mbox{erf}(x) = \frac{2}{\sqrt{\pi}} \exp(-x^2)$ +\form#306:\[ \mbox{erf}(x) = \begin{cases} \operatorname{erf}(x) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#307:\[ \frac{\partial\, \mbox{erf}(x)}{\partial x} = \begin{cases} \frac{\partial\, \operatorname{erf}(x)}{\partial x} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#308:\[ \operatorname{erf}(x)=\frac{2}{\sqrt{\pi}}\int_0^x e^{-t^2}dt \] +\form#309:\[ \frac{\partial \, \operatorname{erf}(x)}{\partial x} = \frac{2}{\sqrt{\pi}} e^{-x^2} \] +\form#310:$\frac{d}{dx} \mbox{erfc}(x) = - \frac{2}{\sqrt{\pi}} \exp(-x^2)$ +\form#311:\[ \mbox{erfc}(x) = \begin{cases} \operatorname{erfc}(x) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#312:\[ \frac{\partial\, \mbox{erfc}(x)}{\partial x} = \begin{cases} \frac{\partial\, \operatorname{erfc}(x)}{\partial x} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#313:\[ \operatorname{erfc}(x)=\frac{2}{\sqrt{\pi}}\int_x^\infty e^{-t^2}dt \] +\form#314:\[ \frac{\partial \, \operatorname{erfc}(x)}{\partial x} = -\frac{2}{\sqrt{\pi}} e^{-x^2} \] +\form#315:\[ \mbox{exp}(x) = \begin{cases} e^x & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#316:\[ \frac{\partial\, \mbox{exp}(x)}{\partial x} = \begin{cases} e^x & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#317:$\frac{d}{dx} 2^x = (\log 2) 2^x$ +\form#318:\[ \mbox{exp2}(x) = \begin{cases} 2^x & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#319:\[ \frac{\partial\, \mbox{exp2}(x)}{\partial x} = \begin{cases} 2^x\ln2 & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#320:$\frac{d}{dx} \exp(a) - 1 = \exp(a)$ +\form#321:\[ \mbox{expm1}(x) = \begin{cases} e^x-1 & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#322:\[ \frac{\partial\, \mbox{expm1}(x)}{\partial x} = \begin{cases} e^x & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#323:$\frac{d}{dx}|x| = \mbox{sgn}(x)$ +\form#324:$\mbox{sgn}(x)$ +\form#325:$x < 0$ +\form#326:$x == 0$ +\form#327:$x == 1$ +\form#328:\[ \mbox{fabs}(x) = \begin{cases} |x| & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#329:\[ \frac{\partial\, \mbox{fabs}(x)}{\partial x} = \begin{cases} -1 & \mbox{if } x < 0 \\ 0 & \mbox{if } x = 0 \\ 1 & \mbox{if } x > 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#330:$\frac{\partial}{\partial x} \mbox{fdim}(x, y) = 0.0$ +\form#331:$x < y$ +\form#332:$\frac{\partial}{\partial x} \mbox{fdim}(x, y) = 1.0$ +\form#333:$x \geq y$ +\form#334:$\frac{\partial}{\partial y} \mbox{fdim}(x, y) = 0.0$ +\form#335:$\frac{\partial}{\partial y} \mbox{fdim}(x, y) = -\lfloor\frac{x}{y}\rfloor$ +\form#336:\[ \mbox{fdim}(x, y) = \begin{cases} 0 & \mbox{if } x < y\\ x-y & \mbox{if } x \geq y \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#337:\[ \frac{\partial\, \mbox{fdim}(x, y)}{\partial x} = \begin{cases} 0 & \mbox{if } x < y \\ 1 & \mbox{if } x \geq y \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#338:\[ \frac{\partial\, \mbox{fdim}(x, y)}{\partial y} = \begin{cases} 0 & \mbox{if } x < y \\ -\lfloor\frac{x}{y}\rfloor & \mbox{if } x \geq y \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#339:$\frac{d}{d y} \mbox{fdim}(c, y) = 0.0$ +\form#340:$c < y$ +\form#341:$\frac{d}{d y} \mbox{fdim}(c, y) = -\lfloor\frac{c}{y}\rfloor$ +\form#342:$c \geq y$ +\form#343:$\frac{d}{d x} \mbox{fdim}(x, c) = 0.0$ +\form#344:$x < c$ +\form#345:$\frac{d}{d x} \mbox{fdim}(x, c) = 1.0$ +\form#346:$x \geq yc$ +\form#347:$\frac{d}{dx} {\lfloor x \rfloor} = 0$ +\form#348:\[ \mbox{floor}(x) = \begin{cases} \lfloor x \rfloor & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#349:\[ \frac{\partial\, \mbox{floor}(x)}{\partial x} = \begin{cases} 0 & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#350:$\frac{\partial}{\partial x} (x * y) + z = y$ +\form#351:$\frac{\partial}{\partial y} (x * y) + z = x$ +\form#352:$\frac{\partial}{\partial z} (x * y) + z = 1$ +\form#353:$\frac{\partial}{\partial x} (x * y) + c = y$ +\form#354:$\frac{\partial}{\partial y} (x * y) + c = x$ +\form#355:$\frac{\partial}{\partial x} (x * c) + z = c$ +\form#356:$\frac{\partial}{\partial z} (x * c) + z = 1$ +\form#357:$\frac{d}{d x} (x * c) + d = c$ +\form#358:$\frac{d}{d y} (c * y) + d = c$ +\form#359:$\frac{\partial}{\partial z} (c * d) + z = 1$ +\form#360:$\frac{\partial}{\partial y} (c * y) + z = c$ +\form#361:$\frac{\partial}{\partial z} (c * y) + z = 1$ +\form#362:\[ \mbox{fmax}(x, y) = \begin{cases} x & \mbox{if } x \geq y \\ y & \mbox{if } x < y \\[6pt] x & \mbox{if } -\infty\leq x\leq \infty, y = \textrm{NaN}\\ y & \mbox{if } -\infty\leq y\leq \infty, x = \textrm{NaN}\\ \textrm{NaN} & \mbox{if } x, y = \textrm{NaN} \end{cases} \] +\form#363:\[ \frac{\partial\, \mbox{fmax}(x, y)}{\partial x} = \begin{cases} 1 & \mbox{if } x \geq y \\ 0 & \mbox{if } x < y \\[6pt] 1 & \mbox{if } -\infty\leq x\leq \infty, y = \textrm{NaN}\\ 0 & \mbox{if } -\infty\leq y\leq \infty, x = \textrm{NaN}\\ \textrm{NaN} & \mbox{if } x, y = \textrm{NaN} \end{cases} \] +\form#364:\[ \frac{\partial\, \mbox{fmax}(x, y)}{\partial y} = \begin{cases} 0 & \mbox{if } x \geq y \\ 1 & \mbox{if } x < y \\[6pt] 0 & \mbox{if } -\infty\leq x\leq \infty, y = \textrm{NaN}\\ 1 & \mbox{if } -\infty\leq y\leq \infty, x = \textrm{NaN}\\ \textrm{NaN} & \mbox{if } x, y = \textrm{NaN} \end{cases} \] +\form#365:\[ \mbox{fmin}(x, y) = \begin{cases} x & \mbox{if } x \leq y \\ y & \mbox{if } x > y \\[6pt] x & \mbox{if } -\infty\leq x\leq \infty, y = \textrm{NaN}\\ y & \mbox{if } -\infty\leq y\leq \infty, x = \textrm{NaN}\\ \textrm{NaN} & \mbox{if } x, y = \textrm{NaN} \end{cases} \] +\form#366:\[ \frac{\partial\, \mbox{fmin}(x, y)}{\partial x} = \begin{cases} 1 & \mbox{if } x \leq y \\ 0 & \mbox{if } x > y \\[6pt] 1 & \mbox{if } -\infty\leq x\leq \infty, y = \textrm{NaN}\\ 0 & \mbox{if } -\infty\leq y\leq \infty, x = \textrm{NaN}\\ \textrm{NaN} & \mbox{if } x, y = \textrm{NaN} \end{cases} \] +\form#367:\[ \frac{\partial\, \mbox{fmin}(x, y)}{\partial y} = \begin{cases} 0 & \mbox{if } x \leq y \\ 1 & \mbox{if } x > y \\[6pt] 0 & \mbox{if } -\infty\leq x\leq \infty, y = \textrm{NaN}\\ 1 & \mbox{if } -\infty\leq y\leq \infty, x = \textrm{NaN}\\ \textrm{NaN} & \mbox{if } x, y = \textrm{NaN} \end{cases} \] +\form#368:$x = y$ +\form#369:$\frac{\partial}{\partial x} \mbox{fmod}(x, y) = 1$ +\form#370:$\frac{\partial}{\partial y} \mbox{fmod}(x, y) = -\lfloor \frac{x}{y} \rfloor$ +\form#371:\[ \mbox{fmod}(x, y) = \begin{cases} x - \lfloor \frac{x}{y}\rfloor y & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#372:\[ \frac{\partial\, \mbox{fmod}(x, y)}{\partial x} = \begin{cases} 1 & \mbox{if } -\infty\leq x, y\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#373:\[ \frac{\partial\, \mbox{fmod}(x, y)}{\partial y} = \begin{cases} -\lfloor \frac{x}{y}\rfloor & \mbox{if } -\infty\leq x, y\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#374:$\frac{d}{d x} \mbox{fmod}(x, c) = \frac{1}{c}$ +\form#375:$\frac{d}{d y} \mbox{fmod}(c, y) = -\lfloor \frac{c}{y} \rfloor$ +\form#376:$\frac{\partial}{\partial x} \sqrt{x^2 + y^2} = \frac{x}{\sqrt{x^2 + y^2}}$ +\form#377:$\frac{\partial}{\partial y} \sqrt{x^2 + y^2} = \frac{y}{\sqrt{x^2 + y^2}}$ +\form#378:$\frac{d}{d x} \sqrt{x^2 + c^2} = \frac{x}{\sqrt{x^2 + c^2}}$ +\form#379:$\frac{d}{d y} \sqrt{c^2 + y^2} = \frac{y}{\sqrt{c^2 + y^2}}$ +\form#380:\[ \mbox{hypot}(x, y) = \begin{cases} \textrm{NaN} & \mbox{if } x < 0 \text{ or } y < 0 \\ \sqrt{x^2+y^2} & \mbox{if } x, y\geq 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#381:\[ \frac{\partial\, \mbox{hypot}(x, y)}{\partial x} = \begin{cases} \textrm{NaN} & \mbox{if } x < 0 \text{ or } y < 0 \\ \frac{x}{\sqrt{x^2+y^2}} & \mbox{if } x, y\geq 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#382:\[ \frac{\partial\, \mbox{hypot}(x, y)}{\partial y} = \begin{cases} \textrm{NaN} & \mbox{if } x < 0 \text{ or } y < 0 \\ \frac{y}{\sqrt{x^2+y^2}} & \mbox{if } x, y\geq 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#383:\[ \mbox{inv}(x) = \begin{cases} \frac{1}{x} & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#384:\[ \frac{\partial\, \mbox{inv}(x)}{\partial x} = \begin{cases} -\frac{1}{x^2} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#385:$\frac{d}{dx} \mbox{cloglog}^{-1}(x) = \exp (x - \exp (x))$ +\form#386:$\frac{d}{dx} \mbox{logit}^{-1}(x) = \mbox{logit}^{-1}(x) (1 - \mbox{logit}^{-1}(x))$ +\form#387:\[ \mbox{inv\_sqrt}(x) = \begin{cases} \frac{1}{\sqrt{x}} & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#388:\[ \frac{\partial\, \mbox{inv\_sqrt}(x)}{\partial x} = \begin{cases} -\frac{1}{2\sqrt{x^3}} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#389:\[ \mbox{inv\_square}(x) = \begin{cases} \frac{1}{x^2} & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#390:\[ \frac{\partial\, \mbox{inv\_square}(x)}{\partial x} = \begin{cases} -\frac{2}{x^3} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#391:$\frac{d}{dx} \Gamma(x) = \psi^{(0)}(x)$ +\form#392:$\frac{d}{dx} \log x = \frac{1}{x}$ +\form#393:\[ \mbox{log}(x) = \begin{cases} \textrm{NaN} & \mbox{if } x < 0\\ \ln(x) & \mbox{if } x \geq 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#394:\[ \frac{\partial\, \mbox{log}(x)}{\partial x} = \begin{cases} \textrm{NaN} & \mbox{if } x < 0\\ \frac{1}{x} & \mbox{if } x\geq 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#395:$\frac{d}{dx} \log_{10} x = \frac{1}{x \log 10}$ +\form#396:\[ \mbox{log10}(x) = \begin{cases} \textrm{NaN} & \mbox{if } x < 0\\ \log_{10}(x) & \mbox{if } x \geq 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#397:\[ \frac{\partial\, \mbox{log10}(x)}{\partial x} = \begin{cases} \textrm{NaN} & \mbox{if } x < 0\\ \frac{1}{x \ln10} & \mbox{if } x\geq 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#398:$\frac{d}{dx} \log (1 - x) = -\frac{1}{1 - x}$ +\form#399:$\frac{d}{dx} \log (1 + x) = \frac{1}{1 + x}$ +\form#400:$\frac{d}{dx} \log_2 x = \frac{1}{x \log 2}$ +\form#401:\[ \mbox{log2}(x) = \begin{cases} \textrm{NaN} & \mbox{if } x < 0 \\ \log_2(x) & \mbox{if } x\geq 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#402:\[ \frac{\partial\, \mbox{log2}(x)}{\partial x} = \begin{cases} \textrm{NaN} & \mbox{if } x < 0 \\ \frac{1}{x\ln2} & \mbox{if } x\geq 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#403:$\frac{d}{dx} \Phi(x) = \mbox{\sf Norm}(x|0, 1) = \frac{1}{\sqrt{2\pi}} \exp(-\frac{1}{2} x^2)$ +\form#404:\[ \mbox{Phi}(x) = \begin{cases} 0 & \mbox{if } x < -37.5 \\ \Phi(x) & \mbox{if } -37.5 \leq x \leq 8.25 \\ 1 & \mbox{if } x > 8.25 \\[6pt] \textrm{error} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#405:\[ \frac{\partial\, \mbox{Phi}(x)}{\partial x} = \begin{cases} 0 & \mbox{if } x < -27.5 \\ \frac{\partial\, \Phi(x)}{\partial x} & \mbox{if } -27.5 \leq x \leq 27.5 \\ 0 & \mbox{if } x > 27.5 \\[6pt] \textrm{error} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#406:\[ \Phi(x) = \frac{1}{\sqrt{2\pi}} \int_{0}^{x} e^{-t^2/2} dt \] +\form#407:\[ \frac{\partial \, \Phi(x)}{\partial x} = \frac{e^{-x^2/2}}{\sqrt{2\pi}} \] +\form#408:\[ \mbox{Phi\_approx}(x) = \begin{cases} \Phi_{\mbox{\footnotesize approx}}(x) & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#409:\[ \frac{\partial\, \mbox{Phi\_approx}(x)}{\partial x} = \begin{cases} \frac{\partial\, \Phi_{\mbox{\footnotesize approx}}(x)}{\partial x} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#410:\[ \Phi_{\mbox{\footnotesize approx}}(x) = \mbox{logit}^{-1}(0.07056 \, x^3 + 1.5976 \, x) \] +\form#411:\[ \frac{\partial \, \Phi_{\mbox{\footnotesize approx}}(x)}{\partial x} = -\Phi_{\mbox{\footnotesize approx}}^2(x) e^{-0.07056x^3 - 1.5976x}(-0.21168x^2-1.5976) \] +\form#412:$\frac{\partial}{\partial x} \mbox{pow}(x, y) = y x^{y-1}$ +\form#413:$\frac{\partial}{\partial y} \mbox{pow}(x, y) = x^y \ \log x$ +\form#414:\[ \mbox{pow}(x, y) = \begin{cases} x^y & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#415:\[ \frac{\partial\, \mbox{pow}(x, y)}{\partial x} = \begin{cases} yx^{y-1} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#416:\[ \frac{\partial\, \mbox{pow}(x, y)}{\partial y} = \begin{cases} x^y\ln x & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +\form#417:$\frac{d}{dx} \mbox{pow}(x, c) = c x^{c-1}$ +\form#418:$\frac{d}{d y} \mbox{pow}(c, y) = c^y \log c $ +\form#419:$\frac{d}{dx} \mbox{round}(x) = 0$ +\form#420:\[ \mbox{round}(x) = \begin{cases} \lceil x \rceil & \mbox{if } x-\lfloor x\rfloor \geq 0.5 \\ \lfloor x \rfloor & \mbox{if } x-\lfloor x\rfloor < 0.5 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#421:\[ \frac{\partial\, \mbox{round}(x)}{\partial x} = \begin{cases} 0 & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#422:$\frac{d}{dx} \sin x = \cos x$ +\form#423:\[ \mbox{sin}(x) = \begin{cases} \sin(x) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#424:\[ \frac{\partial\, \mbox{sin}(x)}{\partial x} = \begin{cases} \cos(x) & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#425:$\frac{d}{dx} \sinh x = \cosh x$ +\form#426:\[ \mbox{sinh}(x) = \begin{cases} \sinh(x) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#427:\[ \frac{\partial\, \mbox{sinh}(x)}{\partial x} = \begin{cases} \cosh(x) & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#428:$\frac{d}{dx} \sqrt{x} = \frac{1}{2 \sqrt{x}}$ +\form#429:\[ \mbox{sqrt}(x) = \begin{cases} \textrm{NaN} & x < 0 \\ \sqrt{x} & \mbox{if } x\geq 0\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#430:\[ \frac{\partial\, \mbox{sqrt}(x)}{\partial x} = \begin{cases} \textrm{NaN} & x < 0 \\ \frac{1}{2\sqrt{x}} & x\geq 0\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#431:\[ \mbox{square}(x) = \begin{cases} x^2 & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#432:\[ \frac{\partial\, \mbox{square}(x)}{\partial x} = \begin{cases} 2x & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#433:$\mbox{step}(x) = 0$ +\form#434:$\frac{d}{dx} \tan x = \sec^2 x$ +\form#435:\[ \mbox{tan}(x) = \begin{cases} \tan(x) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#436:\[ \frac{\partial\, \mbox{tan}(x)}{\partial x} = \begin{cases} \sec^2(x) & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#437:$\frac{d}{dx} \tanh x = \frac{1}{\cosh^2 x}$ +\form#438:\[ \mbox{tanh}(x) = \begin{cases} \tanh(x) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#439:\[ \frac{\partial\, \mbox{tanh}(x)}{\partial x} = \begin{cases} \mbox{sech}^2(x) & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#440:$\frac{d}{dx} \Gamma(x) = \Gamma(x) \Psi^{(0)}(x)$ +\form#441:$\Psi^{(0)}(x)$ +\form#442:\[ \mbox{tgamma}(x) = \begin{cases} \textrm{error} & \mbox{if } x\in \{\dots, -3, -2, -1, 0\}\\ \Gamma(x) & \mbox{if } x\not\in \{\dots, -3, -2, -1, 0\}\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#443:\[ \frac{\partial\, \mbox{tgamma}(x)}{\partial x} = \begin{cases} \textrm{error} & \mbox{if } x\in \{\dots, -3, -2, -1, 0\}\\ \frac{\partial\, \Gamma(x)}{\partial x} & \mbox{if } x\not\in \{\dots, -3, -2, -1, 0\}\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#444:\[ \Gamma(x)=\int_0^{\infty} u^{x - 1} \exp(-u) \, du \] +\form#445:\[ \frac{\partial \, \Gamma(x)}{\partial x} = \Gamma(x)\Psi(x) \] +\form#446:$\frac{d}{dx} \mbox{trunc}(x) = 0$ +\form#447:\[ \mbox{trunc}(x) = \begin{cases} \lfloor x \rfloor & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +\form#448:\[ \frac{\partial\, \mbox{trunc}(x)}{\partial x} = \begin{cases} 0 & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] diff --git a/doc/api/html/frechet__ccdf__log_8hpp.html b/doc/api/html/frechet__ccdf__log_8hpp.html new file mode 100644 index 00000000000..eb74ad1c9b0 --- /dev/null +++ b/doc/api/html/frechet__ccdf__log_8hpp.html @@ -0,0 +1,149 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/frechet_ccdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
frechet_ccdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
stan::math::frechet_ccdf_log (const T_y &y, const T_shape &alpha, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/frechet__ccdf__log_8hpp_source.html b/doc/api/html/frechet__ccdf__log_8hpp_source.html new file mode 100644 index 00000000000..40100e53d41 --- /dev/null +++ b/doc/api/html/frechet__ccdf__log_8hpp_source.html @@ -0,0 +1,233 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/frechet_ccdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
frechet_ccdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_FRECHET_CCDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_FRECHET_CCDF_LOG_HPP
+
3 
+
4 #include <boost/random/weibull_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + +
23 #include <cmath>
+
24 
+
25 namespace stan {
+
26 
+
27  namespace math {
+
28 
+
29  template <typename T_y, typename T_shape, typename T_scale>
+
30  typename return_type<T_y, T_shape, T_scale>::type
+
31  frechet_ccdf_log(const T_y& y, const T_shape& alpha, const T_scale& sigma) {
+ +
33  T_partials_return;
+
34 
+
35  static const char* function("stan::math::frechet_ccdf_log");
+
36 
+ + + +
40  using boost::math::tools::promote_args;
+ +
42 
+
43  // check if any vectors are zero length
+
44  if (!(stan::length(y)
+
45  && stan::length(alpha)
+
46  && stan::length(sigma)))
+
47  return 0.0;
+
48 
+
49  T_partials_return ccdf_log(0.0);
+
50  check_positive(function, "Random variable", y);
+
51  check_positive_finite(function, "Shape parameter", alpha);
+
52  check_positive_finite(function, "Scale parameter", sigma);
+
53 
+ +
55  operands_and_partials(y, alpha, sigma);
+
56 
+
57  using stan::math::log1m;
+
58  using std::log;
+
59  using std::exp;
+
60  VectorView<const T_y> y_vec(y);
+
61  VectorView<const T_scale> sigma_vec(sigma);
+
62  VectorView<const T_shape> alpha_vec(alpha);
+
63  size_t N = max_size(y, sigma, alpha);
+
64 
+
65  for (size_t n = 0; n < N; n++) {
+
66  const T_partials_return y_dbl = value_of(y_vec[n]);
+
67  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
68  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
69  const T_partials_return pow_ = pow(sigma_dbl / y_dbl, alpha_dbl);
+
70  const T_partials_return exp_ = exp(-pow_);
+
71 
+
72  // ccdf_log
+
73  ccdf_log += log1m(exp_);
+
74 
+
75  // gradients
+
76  const T_partials_return rep_deriv_ = pow_ / (1.0 / exp_ - 1);
+ +
78  operands_and_partials.d_x1[n] -= alpha_dbl / y_dbl * rep_deriv_;
+ +
80  operands_and_partials.d_x2[n] -= log(y_dbl / sigma_dbl) * rep_deriv_;
+ +
82  operands_and_partials.d_x3[n] += alpha_dbl / sigma_dbl * rep_deriv_;
+
83  }
+
84 
+
85  return operands_and_partials.to_var(ccdf_log, y, alpha, sigma);
+
86  }
+
87  }
+
88 }
+
89 #endif
+ + + +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ + + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + + +
return_type< T_y, T_shape, T_scale >::type frechet_ccdf_log(const T_y &y, const T_shape &alpha, const T_scale &sigma)
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
fvar< T > log1m(const fvar< T > &x)
Definition: log1m.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/frechet__cdf_8hpp.html b/doc/api/html/frechet__cdf_8hpp.html new file mode 100644 index 00000000000..7fc159f28db --- /dev/null +++ b/doc/api/html/frechet__cdf_8hpp.html @@ -0,0 +1,149 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/frechet_cdf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
frechet_cdf.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
stan::math::frechet_cdf (const T_y &y, const T_shape &alpha, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/frechet__cdf_8hpp_source.html b/doc/api/html/frechet__cdf_8hpp_source.html new file mode 100644 index 00000000000..cb69a27643c --- /dev/null +++ b/doc/api/html/frechet__cdf_8hpp_source.html @@ -0,0 +1,242 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/frechet_cdf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
frechet_cdf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_FRECHET_CDF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_FRECHET_CDF_HPP
+
3 
+
4 #include <boost/random/weibull_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + +
23 #include <cmath>
+
24 
+
25 namespace stan {
+
26 
+
27  namespace math {
+
28 
+
29  template <typename T_y, typename T_shape, typename T_scale>
+
30  typename return_type<T_y, T_shape, T_scale>::type
+
31  frechet_cdf(const T_y& y, const T_shape& alpha, const T_scale& sigma) {
+ +
33  T_partials_return;
+
34 
+
35  static const char* function("stan::math::frechet_cdf");
+
36 
+ + + +
40  using boost::math::tools::promote_args;
+ +
42  using std::log;
+
43  using std::exp;
+
44 
+
45  // check if any vectors are zero length
+
46  if (!(stan::length(y)
+
47  && stan::length(alpha)
+
48  && stan::length(sigma)))
+
49  return 1.0;
+
50 
+
51  T_partials_return cdf(1.0);
+
52  check_positive(function, "Random variable", y);
+
53  check_positive_finite(function, "Shape parameter", alpha);
+
54  check_positive_finite(function, "Scale parameter", sigma);
+
55 
+ +
57  operands_and_partials(y, alpha, sigma);
+
58 
+
59  VectorView<const T_y> y_vec(y);
+
60  VectorView<const T_scale> sigma_vec(sigma);
+
61  VectorView<const T_shape> alpha_vec(alpha);
+
62  size_t N = max_size(y, sigma, alpha);
+
63  for (size_t n = 0; n < N; n++) {
+
64  const T_partials_return y_dbl = value_of(y_vec[n]);
+
65  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
66  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
67  const T_partials_return pow_ = pow(sigma_dbl / y_dbl, alpha_dbl);
+
68  const T_partials_return cdf_ = exp(-pow_);
+
69 
+
70  // cdf
+
71  cdf *= cdf_;
+
72 
+
73  // gradients
+ +
75  operands_and_partials.d_x1[n] += pow_ * alpha_dbl / y_dbl;
+ +
77  operands_and_partials.d_x2[n] += pow_ * log(y_dbl / sigma_dbl);
+ +
79  operands_and_partials.d_x3[n] -= pow_ * alpha_dbl / sigma_dbl;
+
80  }
+
81 
+ +
83  for (size_t n = 0; n < stan::length(y); ++n)
+
84  operands_and_partials.d_x1[n] *= cdf;
+
85  }
+ +
87  for (size_t n = 0; n < stan::length(alpha); ++n)
+
88  operands_and_partials.d_x2[n] *= cdf;
+
89  }
+ +
91  for (size_t n = 0; n < stan::length(sigma); ++n)
+
92  operands_and_partials.d_x3[n] *= cdf;
+
93  }
+
94 
+
95  return operands_and_partials.to_var(cdf, y, alpha, sigma);
+
96  }
+
97  }
+
98 }
+
99 #endif
+ + + +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ + + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + + + +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
return_type< T_y, T_shape, T_scale >::type frechet_cdf(const T_y &y, const T_shape &alpha, const T_scale &sigma)
Definition: frechet_cdf.hpp:31
+
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/frechet__cdf__log_8hpp.html b/doc/api/html/frechet__cdf__log_8hpp.html new file mode 100644 index 00000000000..e86412c9cae --- /dev/null +++ b/doc/api/html/frechet__cdf__log_8hpp.html @@ -0,0 +1,149 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/frechet_cdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
frechet_cdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
stan::math::frechet_cdf_log (const T_y &y, const T_shape &alpha, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/frechet__cdf__log_8hpp_source.html b/doc/api/html/frechet__cdf__log_8hpp_source.html new file mode 100644 index 00000000000..6af822a14e4 --- /dev/null +++ b/doc/api/html/frechet__cdf__log_8hpp_source.html @@ -0,0 +1,226 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/frechet_cdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
frechet_cdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_FRECHET_CDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_FRECHET_CDF_LOG_HPP
+
3 
+
4 #include <boost/random/weibull_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + +
23 #include <cmath>
+
24 
+
25 namespace stan {
+
26 
+
27  namespace math {
+
28 
+
29  template <typename T_y, typename T_shape, typename T_scale>
+
30  typename return_type<T_y, T_shape, T_scale>::type
+
31  frechet_cdf_log(const T_y& y, const T_shape& alpha, const T_scale& sigma) {
+ +
33  T_partials_return;
+
34 
+
35  static const char* function("stan::math::frechet_cdf_log");
+
36 
+ + + +
40  using boost::math::tools::promote_args;
+ +
42  using std::log;
+
43 
+
44  // check if any vectors are zero length
+
45  if (!(stan::length(y)
+
46  && stan::length(alpha)
+
47  && stan::length(sigma)))
+
48  return 0.0;
+
49 
+
50  T_partials_return cdf_log(0.0);
+
51  check_positive(function, "Random variable", y);
+
52  check_positive_finite(function, "Shape parameter", alpha);
+
53  check_positive_finite(function, "Scale parameter", sigma);
+
54 
+ +
56  operands_and_partials(y, alpha, sigma);
+
57 
+
58  VectorView<const T_y> y_vec(y);
+
59  VectorView<const T_scale> sigma_vec(sigma);
+
60  VectorView<const T_shape> alpha_vec(alpha);
+
61  size_t N = max_size(y, sigma, alpha);
+
62  for (size_t n = 0; n < N; n++) {
+
63  const T_partials_return y_dbl = value_of(y_vec[n]);
+
64  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
65  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
66  const T_partials_return pow_ = pow(sigma_dbl / y_dbl, alpha_dbl);
+
67 
+
68  // cdf_log
+
69  cdf_log -= pow_;
+
70 
+
71  // gradients
+ +
73  operands_and_partials.d_x1[n] += pow_ * alpha_dbl / y_dbl;
+ +
75  operands_and_partials.d_x2[n] += pow_ * log(y_dbl / sigma_dbl);
+ +
77  operands_and_partials.d_x3[n] -= pow_ * alpha_dbl / sigma_dbl;
+
78  }
+
79 
+
80  return operands_and_partials.to_var(cdf_log, y, alpha, sigma);
+
81  }
+
82  }
+
83 }
+
84 #endif
+ + + +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ + + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + + + +
return_type< T_y, T_shape, T_scale >::type frechet_cdf_log(const T_y &y, const T_shape &alpha, const T_scale &sigma)
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/frechet__log_8hpp.html b/doc/api/html/frechet__log_8hpp.html new file mode 100644 index 00000000000..6497e0a81a2 --- /dev/null +++ b/doc/api/html/frechet__log_8hpp.html @@ -0,0 +1,153 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/frechet_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
frechet_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
stan::math::frechet_log (const T_y &y, const T_shape &alpha, const T_scale &sigma)
 
template<typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
stan::math::frechet_log (const T_y &y, const T_shape &alpha, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/frechet__log_8hpp_source.html b/doc/api/html/frechet__log_8hpp_source.html new file mode 100644 index 00000000000..511a524f893 --- /dev/null +++ b/doc/api/html/frechet__log_8hpp_source.html @@ -0,0 +1,292 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/frechet_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
frechet_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_FRECHET_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_FRECHET_LOG_HPP
+
3 
+
4 #include <boost/random/weibull_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + +
23 #include <cmath>
+
24 
+
25 namespace stan {
+
26 
+
27  namespace math {
+
28 
+
29  // Frechet(y|alpha, sigma) [y > 0; alpha > 0; sigma > 0]
+
30  // FIXME: document
+
31  template <bool propto,
+
32  typename T_y, typename T_shape, typename T_scale>
+
33  typename return_type<T_y, T_shape, T_scale>::type
+
34  frechet_log(const T_y& y, const T_shape& alpha, const T_scale& sigma) {
+
35  static const char* function("stan::math::frechet_log");
+ +
37  T_partials_return;
+
38 
+ + + + + + +
45  using std::log;
+
46 
+
47  // check if any vectors are zero length
+
48  if (!(stan::length(y)
+
49  && stan::length(alpha)
+
50  && stan::length(sigma)))
+
51  return 0.0;
+
52 
+
53  // set up return value accumulator
+
54  T_partials_return logp(0.0);
+
55  check_positive(function, "Random variable", y);
+
56  check_positive_finite(function, "Shape parameter", alpha);
+
57  check_positive_finite(function, "Scale parameter", sigma);
+
58  check_consistent_sizes(function,
+
59  "Random variable", y,
+
60  "Shape parameter", alpha,
+
61  "Scale parameter", sigma);
+
62 
+
63  // check if no variables are involved and prop-to
+ +
65  return 0.0;
+
66 
+
67  VectorView<const T_y> y_vec(y);
+
68  VectorView<const T_shape> alpha_vec(alpha);
+
69  VectorView<const T_scale> sigma_vec(sigma);
+
70  size_t N = max_size(y, alpha, sigma);
+
71 
+ +
73  T_partials_return, T_shape> log_alpha(length(alpha));
+
74  for (size_t i = 0; i < length(alpha); i++)
+ +
76  log_alpha[i] = log(value_of(alpha_vec[i]));
+
77 
+ +
79  T_partials_return, T_y> log_y(length(y));
+
80  for (size_t i = 0; i < length(y); i++)
+ +
82  log_y[i] = log(value_of(y_vec[i]));
+
83 
+ +
85  T_partials_return, T_scale> log_sigma(length(sigma));
+
86  for (size_t i = 0; i < length(sigma); i++)
+ +
88  log_sigma[i] = log(value_of(sigma_vec[i]));
+
89 
+ +
91  T_partials_return, T_y> inv_y(length(y));
+
92  for (size_t i = 0; i < length(y); i++)
+ +
94  inv_y[i] = 1.0 / value_of(y_vec[i]);
+
95 
+ +
97  T_partials_return, T_y, T_shape, T_scale>
+
98  sigma_div_y_pow_alpha(N);
+
99  for (size_t i = 0; i < N; i++)
+ +
101  const T_partials_return alpha_dbl = value_of(alpha_vec[i]);
+
102  sigma_div_y_pow_alpha[i] = pow(inv_y[i] * value_of(sigma_vec[i]),
+
103  alpha_dbl);
+
104  }
+
105 
+ +
107  operands_and_partials(y, alpha, sigma);
+
108  for (size_t n = 0; n < N; n++) {
+
109  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+ +
111  logp += log_alpha[n];
+ +
113  logp -= (alpha_dbl+1.0)*log_y[n];
+ +
115  logp += alpha_dbl*log_sigma[n];
+ +
117  logp -= sigma_div_y_pow_alpha[n];
+
118 
+ +
120  const T_partials_return inv_y_dbl = value_of(inv_y[n]);
+
121  operands_and_partials.d_x1[n]
+
122  += -(alpha_dbl+1.0) * inv_y_dbl
+
123  + alpha_dbl * sigma_div_y_pow_alpha[n] * inv_y_dbl;
+
124  }
+ +
126  operands_and_partials.d_x2[n]
+
127  += 1.0/alpha_dbl
+
128  + (1.0 - sigma_div_y_pow_alpha[n]) * (log_sigma[n] - log_y[n]);
+ +
130  operands_and_partials.d_x3[n]
+
131  += alpha_dbl / value_of(sigma_vec[n])
+
132  * (1 - sigma_div_y_pow_alpha[n]);
+
133  }
+
134  return operands_and_partials.to_var(logp, y, alpha, sigma);
+
135  }
+
136 
+
137  template <typename T_y, typename T_shape, typename T_scale>
+
138  inline
+ +
140  frechet_log(const T_y& y, const T_shape& alpha, const T_scale& sigma) {
+
141  return frechet_log<false>(y, alpha, sigma);
+
142  }
+
143  }
+
144 }
+
145 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ + +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ +
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
return_type< T_y, T_shape, T_scale >::type frechet_log(const T_y &y, const T_shape &alpha, const T_scale &sigma)
Definition: frechet_log.hpp:34
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + + +
fvar< T > multiply_log(const fvar< T > &x1, const fvar< T > &x2)
+ + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/frechet__rng_8hpp.html b/doc/api/html/frechet__rng_8hpp.html new file mode 100644 index 00000000000..3b2c8bd3e74 --- /dev/null +++ b/doc/api/html/frechet__rng_8hpp.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/frechet_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
frechet_rng.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
double stan::math::frechet_rng (const double alpha, const double sigma, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/frechet__rng_8hpp_source.html b/doc/api/html/frechet__rng_8hpp_source.html new file mode 100644 index 00000000000..18b246573b4 --- /dev/null +++ b/doc/api/html/frechet__rng_8hpp_source.html @@ -0,0 +1,183 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/frechet_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
frechet_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_FRECHET_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_FRECHET_RNG_HPP
+
3 
+
4 #include <boost/random/weibull_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + +
23 
+
24 namespace stan {
+
25 
+
26  namespace math {
+
27 
+
28  template <class RNG>
+
29  inline double
+
30  frechet_rng(const double alpha,
+
31  const double sigma,
+
32  RNG& rng) {
+
33  using boost::variate_generator;
+
34  using boost::random::weibull_distribution;
+
35 
+
36  static const char* function("stan::math::frechet_rng");
+
37 
+ + + +
41 
+
42  check_finite(function, "Shape parameter", alpha);
+
43  check_positive(function, "Shape parameter", alpha);
+
44  check_not_nan(function, "Scale parameter", sigma);
+
45  check_positive(function, "Scale parameter", sigma);
+
46 
+
47  variate_generator<RNG&, weibull_distribution<> >
+
48  weibull_rng(rng, weibull_distribution<>(alpha, 1.0/sigma));
+
49  return 1.0 / weibull_rng();
+
50  }
+
51  }
+
52 }
+
53 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ + + + + + + +
double frechet_rng(const double alpha, const double sigma, RNG &rng)
Definition: frechet_rng.hpp:30
+
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ + + +
double weibull_rng(const double alpha, const double sigma, RNG &rng)
Definition: weibull_rng.hpp:24
+ + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/ftv2blank.png b/doc/api/html/ftv2blank.png new file mode 100644 index 00000000000..63c605bb4c3 Binary files /dev/null and b/doc/api/html/ftv2blank.png differ diff --git a/doc/api/html/ftv2cl.png b/doc/api/html/ftv2cl.png new file mode 100644 index 00000000000..132f6577bf7 Binary files /dev/null and b/doc/api/html/ftv2cl.png differ diff --git a/doc/api/html/ftv2doc.png b/doc/api/html/ftv2doc.png new file mode 100644 index 00000000000..17edabff95f Binary files /dev/null and b/doc/api/html/ftv2doc.png differ diff --git a/doc/api/html/ftv2folderclosed.png b/doc/api/html/ftv2folderclosed.png new file mode 100644 index 00000000000..bb8ab35edce Binary files /dev/null and b/doc/api/html/ftv2folderclosed.png differ diff --git a/doc/api/html/ftv2folderopen.png b/doc/api/html/ftv2folderopen.png new file mode 100644 index 00000000000..d6c7f676a3b Binary files /dev/null and b/doc/api/html/ftv2folderopen.png differ diff --git a/doc/api/html/ftv2lastnode.png b/doc/api/html/ftv2lastnode.png new file mode 100644 index 00000000000..63c605bb4c3 Binary files /dev/null and b/doc/api/html/ftv2lastnode.png differ diff --git a/doc/api/html/ftv2link.png b/doc/api/html/ftv2link.png new file mode 100644 index 00000000000..17edabff95f Binary files /dev/null and b/doc/api/html/ftv2link.png differ diff --git a/doc/api/html/ftv2mlastnode.png b/doc/api/html/ftv2mlastnode.png new file mode 100644 index 00000000000..0b63f6d38c4 Binary files /dev/null and b/doc/api/html/ftv2mlastnode.png differ diff --git a/doc/api/html/ftv2mnode.png b/doc/api/html/ftv2mnode.png new file mode 100644 index 00000000000..0b63f6d38c4 Binary files /dev/null and b/doc/api/html/ftv2mnode.png differ diff --git a/doc/api/html/ftv2mo.png b/doc/api/html/ftv2mo.png new file mode 100644 index 00000000000..4bfb80f76e6 Binary files /dev/null and b/doc/api/html/ftv2mo.png differ diff --git a/doc/api/html/ftv2node.png b/doc/api/html/ftv2node.png new file mode 100644 index 00000000000..63c605bb4c3 Binary files /dev/null and b/doc/api/html/ftv2node.png differ diff --git a/doc/api/html/ftv2ns.png b/doc/api/html/ftv2ns.png new file mode 100644 index 00000000000..72e3d71c289 Binary files /dev/null and b/doc/api/html/ftv2ns.png differ diff --git a/doc/api/html/ftv2plastnode.png b/doc/api/html/ftv2plastnode.png new file mode 100644 index 00000000000..c6ee22f937a Binary files /dev/null and b/doc/api/html/ftv2plastnode.png differ diff --git a/doc/api/html/ftv2pnode.png b/doc/api/html/ftv2pnode.png new file mode 100644 index 00000000000..c6ee22f937a Binary files /dev/null and b/doc/api/html/ftv2pnode.png differ diff --git a/doc/api/html/ftv2splitbar.png b/doc/api/html/ftv2splitbar.png new file mode 100644 index 00000000000..fe895f2c581 Binary files /dev/null and b/doc/api/html/ftv2splitbar.png differ diff --git a/doc/api/html/ftv2vertline.png b/doc/api/html/ftv2vertline.png new file mode 100644 index 00000000000..63c605bb4c3 Binary files /dev/null and b/doc/api/html/ftv2vertline.png differ diff --git a/doc/api/html/fun_8hpp.html b/doc/api/html/fun_8hpp.html new file mode 100644 index 00000000000..12b63763fd0 --- /dev/null +++ b/doc/api/html/fun_8hpp.html @@ -0,0 +1,202 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
fun.hpp File Reference
+
+
+
#include <stan/math/prim/scal/fun/abs.hpp>
+#include <stan/math/prim/scal/fun/as_bool.hpp>
+#include <stan/math/prim/scal/fun/bessel_first_kind.hpp>
+#include <stan/math/prim/scal/fun/bessel_second_kind.hpp>
+#include <stan/math/prim/scal/fun/binary_log_loss.hpp>
+#include <stan/math/prim/scal/fun/binomial_coefficient_log.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/corr_constrain.hpp>
+#include <stan/math/prim/scal/fun/corr_free.hpp>
+#include <stan/math/prim/scal/fun/digamma.hpp>
+#include <stan/math/prim/scal/fun/divide.hpp>
+#include <stan/math/prim/scal/fun/exp2.hpp>
+#include <stan/math/prim/scal/fun/F32.hpp>
+#include <stan/math/prim/scal/fun/falling_factorial.hpp>
+#include <stan/math/prim/scal/fun/fdim.hpp>
+#include <stan/math/prim/scal/fun/gamma_p.hpp>
+#include <stan/math/prim/scal/fun/gamma_q.hpp>
+#include <stan/math/prim/scal/fun/grad_2F1.hpp>
+#include <stan/math/prim/scal/fun/grad_F32.hpp>
+#include <stan/math/prim/scal/fun/grad_inc_beta.hpp>
+#include <stan/math/prim/scal/fun/grad_reg_inc_beta.hpp>
+#include <stan/math/prim/scal/fun/grad_reg_inc_gamma.hpp>
+#include <stan/math/prim/scal/fun/ibeta.hpp>
+#include <stan/math/prim/scal/fun/identity_constrain.hpp>
+#include <stan/math/prim/scal/fun/identity_free.hpp>
+#include <stan/math/prim/scal/fun/if_else.hpp>
+#include <stan/math/prim/scal/fun/inc_beta.hpp>
+#include <stan/math/prim/scal/fun/inc_beta_dda.hpp>
+#include <stan/math/prim/scal/fun/inc_beta_ddb.hpp>
+#include <stan/math/prim/scal/fun/inc_beta_ddz.hpp>
+#include <stan/math/prim/scal/fun/int_step.hpp>
+#include <stan/math/prim/scal/fun/inv.hpp>
+#include <stan/math/prim/scal/fun/inv_cloglog.hpp>
+#include <stan/math/prim/scal/fun/inv_logit.hpp>
+#include <stan/math/prim/scal/fun/inv_sqrt.hpp>
+#include <stan/math/prim/scal/fun/inv_square.hpp>
+#include <stan/math/prim/scal/fun/inverse_softmax.hpp>
+#include <stan/math/prim/scal/fun/is_inf.hpp>
+#include <stan/math/prim/scal/fun/is_nan.hpp>
+#include <stan/math/prim/scal/fun/is_uninitialized.hpp>
+#include <stan/math/prim/scal/fun/lb_constrain.hpp>
+#include <stan/math/prim/scal/fun/lb_free.hpp>
+#include <stan/math/prim/scal/fun/lbeta.hpp>
+#include <stan/math/prim/scal/fun/lgamma.hpp>
+#include <stan/math/prim/scal/fun/lmgamma.hpp>
+#include <stan/math/prim/scal/fun/log1m.hpp>
+#include <stan/math/prim/scal/fun/log1m_exp.hpp>
+#include <stan/math/prim/scal/fun/log1m_inv_logit.hpp>
+#include <stan/math/prim/scal/fun/log1p.hpp>
+#include <stan/math/prim/scal/fun/log1p_exp.hpp>
+#include <stan/math/prim/scal/fun/log2.hpp>
+#include <stan/math/prim/scal/fun/log_diff_exp.hpp>
+#include <stan/math/prim/scal/fun/log_falling_factorial.hpp>
+#include <stan/math/prim/scal/fun/log_inv_logit.hpp>
+#include <stan/math/prim/scal/fun/log_mix.hpp>
+#include <stan/math/prim/scal/fun/log_rising_factorial.hpp>
+#include <stan/math/prim/scal/fun/log_sum_exp.hpp>
+#include <stan/math/prim/scal/fun/logical_and.hpp>
+#include <stan/math/prim/scal/fun/logical_eq.hpp>
+#include <stan/math/prim/scal/fun/logical_gt.hpp>
+#include <stan/math/prim/scal/fun/logical_gte.hpp>
+#include <stan/math/prim/scal/fun/logical_lt.hpp>
+#include <stan/math/prim/scal/fun/logical_lte.hpp>
+#include <stan/math/prim/scal/fun/logical_negation.hpp>
+#include <stan/math/prim/scal/fun/logical_neq.hpp>
+#include <stan/math/prim/scal/fun/logical_or.hpp>
+#include <stan/math/prim/scal/fun/logit.hpp>
+#include <stan/math/prim/scal/fun/lub_constrain.hpp>
+#include <stan/math/prim/scal/fun/lub_free.hpp>
+#include <stan/math/prim/scal/fun/modified_bessel_first_kind.hpp>
+#include <stan/math/prim/scal/fun/modified_bessel_second_kind.hpp>
+#include <stan/math/prim/scal/fun/modulus.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/fun/owens_t.hpp>
+#include <stan/math/prim/scal/fun/Phi.hpp>
+#include <stan/math/prim/scal/fun/Phi_approx.hpp>
+#include <stan/math/prim/scal/fun/positive_constrain.hpp>
+#include <stan/math/prim/scal/fun/positive_free.hpp>
+#include <stan/math/prim/scal/fun/primitive_value.hpp>
+#include <stan/math/prim/scal/fun/prob_constrain.hpp>
+#include <stan/math/prim/scal/fun/prob_free.hpp>
+#include <stan/math/prim/scal/fun/promote_scalar.hpp>
+#include <stan/math/prim/scal/fun/promote_scalar_type.hpp>
+#include <stan/math/prim/scal/fun/rising_factorial.hpp>
+#include <stan/math/prim/scal/fun/sign.hpp>
+#include <stan/math/prim/scal/fun/square.hpp>
+#include <stan/math/prim/scal/fun/step.hpp>
+#include <stan/math/prim/scal/fun/trigamma.hpp>
+#include <stan/math/prim/scal/fun/ub_constrain.hpp>
+#include <stan/math/prim/scal/fun/ub_free.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/fun/value_of_rec.hpp>
+
+

Go to the source code of this file.

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fun_8hpp_source.html b/doc/api/html/fun_8hpp_source.html new file mode 100644 index 00000000000..5be1b59d241 --- /dev/null +++ b/doc/api/html/fun_8hpp_source.html @@ -0,0 +1,297 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
fun.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_HPP
+
3 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
96 
+
97 #endif
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions.html b/doc/api/html/functions.html new file mode 100644 index 00000000000..9efac616323 --- /dev/null +++ b/doc/api/html/functions.html @@ -0,0 +1,168 @@ + + + + + + +Stan Math Library: Class Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- _ -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_a.html b/doc/api/html/functions_a.html new file mode 100644 index 00000000000..2e888bdd789 --- /dev/null +++ b/doc/api/html/functions_a.html @@ -0,0 +1,215 @@ + + + + + + +Stan Math Library: Class Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- a -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_b.html b/doc/api/html/functions_b.html new file mode 100644 index 00000000000..01b80040e47 --- /dev/null +++ b/doc/api/html/functions_b.html @@ -0,0 +1,161 @@ + + + + + + +Stan Math Library: Class Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- b -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_c.html b/doc/api/html/functions_c.html new file mode 100644 index 00000000000..b73276e7502 --- /dev/null +++ b/doc/api/html/functions_c.html @@ -0,0 +1,206 @@ + + + + + + +Stan Math Library: Class Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- c -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_d.html b/doc/api/html/functions_d.html new file mode 100644 index 00000000000..17e9e95f689 --- /dev/null +++ b/doc/api/html/functions_d.html @@ -0,0 +1,205 @@ + + + + + + +Stan Math Library: Class Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- d -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_e.html b/doc/api/html/functions_e.html new file mode 100644 index 00000000000..35f497a55b8 --- /dev/null +++ b/doc/api/html/functions_e.html @@ -0,0 +1,153 @@ + + + + + + +Stan Math Library: Class Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- e -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_eval.html b/doc/api/html/functions_eval.html new file mode 100644 index 00000000000..f9ea1e148d9 --- /dev/null +++ b/doc/api/html/functions_eval.html @@ -0,0 +1,214 @@ + + + + + + +Stan Math Library: Class Members - Enumerator + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+  + +

- a -

+ + +

- h -

+ + +

- i -

+ + +

- l -

+ + +

- m -

+ + +

- r -

+ + +

- v -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_f.html b/doc/api/html/functions_f.html new file mode 100644 index 00000000000..e6f58807dca --- /dev/null +++ b/doc/api/html/functions_f.html @@ -0,0 +1,156 @@ + + + + + + +Stan Math Library: Class Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- f -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_func.html b/doc/api/html/functions_func.html new file mode 100644 index 00000000000..7969c6b7bba --- /dev/null +++ b/doc/api/html/functions_func.html @@ -0,0 +1,175 @@ + + + + + + +Stan Math Library: Class Members - Functions + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+  + +

- a -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_func_b.html b/doc/api/html/functions_func_b.html new file mode 100644 index 00000000000..332ad3b8bf4 --- /dev/null +++ b/doc/api/html/functions_func_b.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: Class Members - Functions + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+  + +

- b -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_func_c.html b/doc/api/html/functions_func_c.html new file mode 100644 index 00000000000..8792c1bee50 --- /dev/null +++ b/doc/api/html/functions_func_c.html @@ -0,0 +1,192 @@ + + + + + + +Stan Math Library: Class Members - Functions + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+  + +

- c -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_func_d.html b/doc/api/html/functions_func_d.html new file mode 100644 index 00000000000..46a51e725a6 --- /dev/null +++ b/doc/api/html/functions_func_d.html @@ -0,0 +1,155 @@ + + + + + + +Stan Math Library: Class Members - Functions + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+  + +

- d -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_func_e.html b/doc/api/html/functions_func_e.html new file mode 100644 index 00000000000..166e00d4a69 --- /dev/null +++ b/doc/api/html/functions_func_e.html @@ -0,0 +1,150 @@ + + + + + + +Stan Math Library: Class Members - Functions + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+  + +

- e -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_func_f.html b/doc/api/html/functions_func_f.html new file mode 100644 index 00000000000..e2891008fd8 --- /dev/null +++ b/doc/api/html/functions_func_f.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: Class Members - Functions + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+  + +

- f -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_func_g.html b/doc/api/html/functions_func_g.html new file mode 100644 index 00000000000..5e088c1918f --- /dev/null +++ b/doc/api/html/functions_func_g.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: Class Members - Functions + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+  + +

- g -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_func_h.html b/doc/api/html/functions_func_h.html new file mode 100644 index 00000000000..e9f897a5801 --- /dev/null +++ b/doc/api/html/functions_func_h.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: Class Members - Functions + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+  + +

- h -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_func_i.html b/doc/api/html/functions_func_i.html new file mode 100644 index 00000000000..e025a505b62 --- /dev/null +++ b/doc/api/html/functions_func_i.html @@ -0,0 +1,161 @@ + + + + + + +Stan Math Library: Class Members - Functions + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+  + +

- i -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_func_l.html b/doc/api/html/functions_func_l.html new file mode 100644 index 00000000000..c0e84d85dee --- /dev/null +++ b/doc/api/html/functions_func_l.html @@ -0,0 +1,156 @@ + + + + + + +Stan Math Library: Class Members - Functions + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+  + +

- l -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_func_m.html b/doc/api/html/functions_func_m.html new file mode 100644 index 00000000000..2a54f3840e5 --- /dev/null +++ b/doc/api/html/functions_func_m.html @@ -0,0 +1,152 @@ + + + + + + +Stan Math Library: Class Members - Functions + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+  + +

- m -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_func_n.html b/doc/api/html/functions_func_n.html new file mode 100644 index 00000000000..9c419dd25d9 --- /dev/null +++ b/doc/api/html/functions_func_n.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: Class Members - Functions + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+  + +

- n -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_func_o.html b/doc/api/html/functions_func_o.html new file mode 100644 index 00000000000..20acde1e41f --- /dev/null +++ b/doc/api/html/functions_func_o.html @@ -0,0 +1,251 @@ + + + + + + +Stan Math Library: Class Members - Functions + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+  + +

- o -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_func_p.html b/doc/api/html/functions_func_p.html new file mode 100644 index 00000000000..16957e34115 --- /dev/null +++ b/doc/api/html/functions_func_p.html @@ -0,0 +1,172 @@ + + + + + + +Stan Math Library: Class Members - Functions + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+  + +

- p -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_func_q.html b/doc/api/html/functions_func_q.html new file mode 100644 index 00000000000..0a694645a91 --- /dev/null +++ b/doc/api/html/functions_func_q.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: Class Members - Functions + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+  + +

- q -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_func_r.html b/doc/api/html/functions_func_r.html new file mode 100644 index 00000000000..ba2fd4bac43 --- /dev/null +++ b/doc/api/html/functions_func_r.html @@ -0,0 +1,166 @@ + + + + + + +Stan Math Library: Class Members - Functions + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+  + +

- r -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_func_s.html b/doc/api/html/functions_func_s.html new file mode 100644 index 00000000000..7714df97832 --- /dev/null +++ b/doc/api/html/functions_func_s.html @@ -0,0 +1,222 @@ + + + + + + +Stan Math Library: Class Members - Functions + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+  + +

- s -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_func_t.html b/doc/api/html/functions_func_t.html new file mode 100644 index 00000000000..482dce4e34f --- /dev/null +++ b/doc/api/html/functions_func_t.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: Class Members - Functions + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+  + +

- t -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_func_v.html b/doc/api/html/functions_func_v.html new file mode 100644 index 00000000000..5eb206204e7 --- /dev/null +++ b/doc/api/html/functions_func_v.html @@ -0,0 +1,172 @@ + + + + + + +Stan Math Library: Class Members - Functions + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+  + +

- v -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_func_w.html b/doc/api/html/functions_func_w.html new file mode 100644 index 00000000000..34fca92ea7d --- /dev/null +++ b/doc/api/html/functions_func_w.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: Class Members - Functions + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+  + +

- w -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_func_~.html b/doc/api/html/functions_func_~.html new file mode 100644 index 00000000000..a86849e1ec0 --- /dev/null +++ b/doc/api/html/functions_func_~.html @@ -0,0 +1,159 @@ + + + + + + +Stan Math Library: Class Members - Functions + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+  + +

- ~ -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_g.html b/doc/api/html/functions_g.html new file mode 100644 index 00000000000..27434cf6d85 --- /dev/null +++ b/doc/api/html/functions_g.html @@ -0,0 +1,153 @@ + + + + + + +Stan Math Library: Class Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- g -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_h.html b/doc/api/html/functions_h.html new file mode 100644 index 00000000000..d6c36e82e84 --- /dev/null +++ b/doc/api/html/functions_h.html @@ -0,0 +1,172 @@ + + + + + + +Stan Math Library: Class Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- h -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_i.html b/doc/api/html/functions_i.html new file mode 100644 index 00000000000..536c6b201bf --- /dev/null +++ b/doc/api/html/functions_i.html @@ -0,0 +1,204 @@ + + + + + + +Stan Math Library: Class Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- i -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_l.html b/doc/api/html/functions_l.html new file mode 100644 index 00000000000..ed8a4e7b573 --- /dev/null +++ b/doc/api/html/functions_l.html @@ -0,0 +1,172 @@ + + + + + + +Stan Math Library: Class Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- l -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_m.html b/doc/api/html/functions_m.html new file mode 100644 index 00000000000..dbba0c3393a --- /dev/null +++ b/doc/api/html/functions_m.html @@ -0,0 +1,195 @@ + + + + + + +Stan Math Library: Class Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- m -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_n.html b/doc/api/html/functions_n.html new file mode 100644 index 00000000000..ce5596e0492 --- /dev/null +++ b/doc/api/html/functions_n.html @@ -0,0 +1,179 @@ + + + + + + +Stan Math Library: Class Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- n -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_o.html b/doc/api/html/functions_o.html new file mode 100644 index 00000000000..c53d5daf812 --- /dev/null +++ b/doc/api/html/functions_o.html @@ -0,0 +1,259 @@ + + + + + + +Stan Math Library: Class Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- o -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_p.html b/doc/api/html/functions_p.html new file mode 100644 index 00000000000..08383d0e055 --- /dev/null +++ b/doc/api/html/functions_p.html @@ -0,0 +1,178 @@ + + + + + + +Stan Math Library: Class Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- p -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_q.html b/doc/api/html/functions_q.html new file mode 100644 index 00000000000..b3de0b79294 --- /dev/null +++ b/doc/api/html/functions_q.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: Class Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- q -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_r.html b/doc/api/html/functions_r.html new file mode 100644 index 00000000000..cd63b4666bf --- /dev/null +++ b/doc/api/html/functions_r.html @@ -0,0 +1,203 @@ + + + + + + +Stan Math Library: Class Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- r -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_rela.html b/doc/api/html/functions_rela.html new file mode 100644 index 00000000000..19621f82c39 --- /dev/null +++ b/doc/api/html/functions_rela.html @@ -0,0 +1,122 @@ + + + + + + +Stan Math Library: Class Members - Related Functions + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_s.html b/doc/api/html/functions_s.html new file mode 100644 index 00000000000..319b1755695 --- /dev/null +++ b/doc/api/html/functions_s.html @@ -0,0 +1,247 @@ + + + + + + +Stan Math Library: Class Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- s -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_t.html b/doc/api/html/functions_t.html new file mode 100644 index 00000000000..2d006192937 --- /dev/null +++ b/doc/api/html/functions_t.html @@ -0,0 +1,213 @@ + + + + + + +Stan Math Library: Class Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- t -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_type.html b/doc/api/html/functions_type.html new file mode 100644 index 00000000000..8cf90b4b254 --- /dev/null +++ b/doc/api/html/functions_type.html @@ -0,0 +1,248 @@ + + + + + + +Stan Math Library: Class Members - Typedefs + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+  + +

- l -

+ + +

- m -

+ + +

- n -

+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- v -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_v.html b/doc/api/html/functions_v.html new file mode 100644 index 00000000000..1a8ac2fb248 --- /dev/null +++ b/doc/api/html/functions_v.html @@ -0,0 +1,246 @@ + + + + + + +Stan Math Library: Class Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- v -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_vars.html b/doc/api/html/functions_vars.html new file mode 100644 index 00000000000..419c42fc6f9 --- /dev/null +++ b/doc/api/html/functions_vars.html @@ -0,0 +1,559 @@ + + + + + + +Stan Math Library: Class Members - Variables + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+  + +

- _ -

+ + +

- a -

+ + +

- b -

+ + +

- c -

+ + +

- d -

+ + +

- f -

+ + +

- g -

+ + +

- h -

+ + +

- i -

+ + +

- l -

+ + +

- m -

+ + +

- n -

+ + +

- p -

+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- v -

+ + +

- x -

+ + +

- y -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_w.html b/doc/api/html/functions_w.html new file mode 100644 index 00000000000..65a6f4e0e39 --- /dev/null +++ b/doc/api/html/functions_w.html @@ -0,0 +1,150 @@ + + + + + + +Stan Math Library: Class Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- w -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_x.html b/doc/api/html/functions_x.html new file mode 100644 index 00000000000..7dbe06bc200 --- /dev/null +++ b/doc/api/html/functions_x.html @@ -0,0 +1,157 @@ + + + + + + +Stan Math Library: Class Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- x -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_y.html b/doc/api/html/functions_y.html new file mode 100644 index 00000000000..9a836a1f0bf --- /dev/null +++ b/doc/api/html/functions_y.html @@ -0,0 +1,157 @@ + + + + + + +Stan Math Library: Class Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- y -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functions_~.html b/doc/api/html/functions_~.html new file mode 100644 index 00000000000..ffd99cee8d6 --- /dev/null +++ b/doc/api/html/functions_~.html @@ -0,0 +1,162 @@ + + + + + + +Stan Math Library: Class Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- ~ -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functor_8hpp.html b/doc/api/html/functor_8hpp.html new file mode 100644 index 00000000000..f5e523fa67f --- /dev/null +++ b/doc/api/html/functor_8hpp.html @@ -0,0 +1,112 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/functor.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
functor.hpp File Reference
+
+
+ +

Go to the source code of this file.

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/functor_8hpp_source.html b/doc/api/html/functor_8hpp_source.html new file mode 100644 index 00000000000..548d59fc619 --- /dev/null +++ b/doc/api/html/functor_8hpp_source.html @@ -0,0 +1,117 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/functor.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
functor.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUNCTOR_HPP
+
2 #define STAN_MATH_REV_MAT_FUNCTOR_HPP
+
3 
+ + +
6 
+
7 #endif
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fvar_8hpp.html b/doc/api/html/fvar_8hpp.html new file mode 100644 index 00000000000..bef36a1b3ea --- /dev/null +++ b/doc/api/html/fvar_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/fwd/core/fvar.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
fvar.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/likely.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <ostream>
+
+

Go to the source code of this file.

+ + + + +

+Classes

struct  stan::math::fvar< T >
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fvar_8hpp_source.html b/doc/api/html/fvar_8hpp_source.html new file mode 100644 index 00000000000..ea3273411f0 --- /dev/null +++ b/doc/api/html/fvar_8hpp_source.html @@ -0,0 +1,278 @@ + + + + + + +Stan Math Library: stan/math/fwd/core/fvar.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
fvar.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_CORE_FVAR_HPP
+
2 #define STAN_MATH_FWD_CORE_FVAR_HPP
+
3 
+ +
5 #include <boost/math/special_functions/fpclassify.hpp>
+
6 #include <ostream>
+
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  struct fvar {
+
14  T val_; // value
+
15  T d_; // tangent (aka derivative)
+
16 
+
17  T val() const { return val_; }
+
18  T tangent() const { return d_; }
+
19 
+
20  typedef fvar value_type;
+
21 
+
22  fvar() : val_(0.0), d_(0.0) { }
+
23 
+
24  fvar(const fvar<T>& x)
+
25  : val_(x.val_), d_(x.d_) {
+
26  }
+
27 
+
28  // TV and TD must be assignable to T
+
29  template <typename TV, typename TD>
+
30  fvar(const TV& val, const TD& deriv) : val_(val), d_(deriv) {
+
31  if (unlikely(boost::math::isnan(val)))
+
32  d_ = val;
+
33  }
+
34 
+
35  // TV must be assignable to T
+
36  template <typename TV>
+
37  fvar(const TV& val) // NOLINT
+
38  : val_(val), d_(0.0) {
+
39  if (unlikely(boost::math::isnan(val)))
+
40  d_ = val;
+
41  }
+
42 
+
43 
+
44  inline
+
45  fvar<T>&
+
46  operator+=(const fvar<T>& x2) {
+
47  val_ += x2.val_;
+
48  d_ += x2.d_;
+
49  return *this;
+
50  }
+
51 
+
52  inline
+
53  fvar<T>&
+
54  operator+=(double x2) {
+
55  val_ += x2;
+
56  return *this;
+
57  }
+
58 
+
59  inline
+
60  fvar<T>&
+
61  operator-=(const fvar<T>& x2) {
+
62  val_ -= x2.val_;
+
63  d_ -= x2.d_;
+
64  return *this;
+
65  }
+
66 
+
67  inline
+
68  fvar<T>&
+
69  operator-=(double x2) {
+
70  val_ -= x2;
+
71  return *this;
+
72  }
+
73 
+
74  inline
+
75  fvar<T>&
+
76  operator*=(const fvar<T>& x2) {
+
77  d_ = d_ * x2.val_ + val_ * x2.d_;
+
78  val_ *= x2.val_;
+
79  return *this;
+
80  }
+
81 
+
82  inline
+
83  fvar<T>&
+
84  operator*=(double x2) {
+
85  val_ *= x2;
+
86  d_ *= x2;
+
87  return *this;
+
88  }
+
89 
+
90  // SPEEDUP: specialize for T2 == var with d_ function
+
91 
+
92  inline
+
93  fvar<T>&
+
94  operator/=(const fvar<T>& x2) {
+
95  d_ = (d_ * x2.val_ - val_ * x2.d_) / (x2.val_ * x2.val_);
+
96  val_ /= x2.val_;
+
97  return *this;
+
98  }
+
99 
+
100  inline
+
101  fvar<T>&
+
102  operator/=(double x2) {
+
103  val_ /= x2;
+
104  d_ /= x2;
+
105  return *this;
+
106  }
+
107 
+
108  inline
+
109  fvar<T>&
+ +
111  ++val_;
+
112  return *this;
+
113  }
+
114 
+
115  inline
+
116  fvar<T>
+
117  operator++(int /*dummy*/) {
+
118  fvar<T> result(val_, d_);
+
119  ++val_;
+
120  return result;
+
121  }
+
122 
+
123  inline
+
124  fvar<T>&
+ +
126  --val_;
+
127  return *this;
+
128  }
+
129  inline
+
130  fvar<T>
+
131  operator--(int /*dummy*/) {
+
132  fvar<T> result(val_, d_);
+
133  --val_;
+
134  return result;
+
135  }
+
136 
+
137  friend
+
138  std::ostream&
+
139  operator<<(std::ostream& os, const fvar<T>& v) {
+
140  return os << v.val_;
+
141  }
+
142  };
+
143  }
+
144 }
+
145 #endif
+ +
fvar< T > & operator-=(const fvar< T > &x2)
Definition: fvar.hpp:61
+
fvar< T > & operator/=(double x2)
Definition: fvar.hpp:102
+
T tangent() const
Definition: fvar.hpp:18
+
fvar< T > operator--(int)
Definition: fvar.hpp:131
+
fvar(const fvar< T > &x)
Definition: fvar.hpp:24
+
fvar< T > & operator+=(const fvar< T > &x2)
Definition: fvar.hpp:46
+
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
+
fvar< T > & operator++()
Definition: fvar.hpp:110
+
#define unlikely(x)
Definition: likely.hpp:9
+ +
fvar value_type
Definition: fvar.hpp:20
+
fvar< T > & operator--()
Definition: fvar.hpp:125
+
fvar< T > operator++(int)
Definition: fvar.hpp:117
+ +
fvar< T > & operator-=(double x2)
Definition: fvar.hpp:69
+
fvar(const TV &val)
Definition: fvar.hpp:37
+
T val() const
Definition: fvar.hpp:17
+
fvar< T > & operator+=(double x2)
Definition: fvar.hpp:54
+
fvar< T > & operator*=(const fvar< T > &x2)
Definition: fvar.hpp:76
+ +
fvar< T > & operator*=(double x2)
Definition: fvar.hpp:84
+
fvar(const TV &val, const TD &deriv)
Definition: fvar.hpp:30
+
fvar< T > & operator/=(const fvar< T > &x2)
Definition: fvar.hpp:94
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2arr_2fun_2log__sum__exp_8hpp.html b/doc/api/html/fwd_2arr_2fun_2log__sum__exp_8hpp.html new file mode 100644 index 00000000000..cb6927a4e43 --- /dev/null +++ b/doc/api/html/fwd_2arr_2fun_2log__sum__exp_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/fwd/arr/fun/log_sum_exp.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_sum_exp.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <stan/math/prim/arr/fun/log_sum_exp.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::log_sum_exp (const std::vector< fvar< T > > &v)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2arr_2fun_2log__sum__exp_8hpp_source.html b/doc/api/html/fwd_2arr_2fun_2log__sum__exp_8hpp_source.html new file mode 100644 index 00000000000..9b63101b3b8 --- /dev/null +++ b/doc/api/html/fwd_2arr_2fun_2log__sum__exp_8hpp_source.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/fwd/arr/fun/log_sum_exp.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_sum_exp.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_ARR_FUN_LOG_SUM_EXP_HPP
+
2 #define STAN_MATH_FWD_ARR_FUN_LOG_SUM_EXP_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ +
6 #include <vector>
+
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  fvar<T>
+
14  log_sum_exp(const std::vector<fvar<T> >& v) {
+ +
16  using std::exp;
+
17  std::vector<T> vals(v.size());
+
18  for (size_t i = 0; i < v.size(); ++i)
+
19  vals[i] = v[i].val_;
+
20  T deriv(0.0);
+
21  T denominator(0.0);
+
22  for (size_t i = 0; i < v.size(); ++i) {
+
23  T exp_vi = exp(vals[i]);
+
24  denominator += exp_vi;
+
25  deriv += v[i].d_ * exp_vi;
+
26  }
+
27  return fvar<T>(log_sum_exp(vals), deriv / denominator);
+
28  }
+
29 
+
30  }
+
31 }
+
32 #endif
+ +
fvar< T > log_sum_exp(const std::vector< fvar< T > > &v)
Definition: log_sum_exp.hpp:14
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2arr_2fun_2sum_8hpp.html b/doc/api/html/fwd_2arr_2fun_2sum_8hpp.html new file mode 100644 index 00000000000..2b3570bb43a --- /dev/null +++ b/doc/api/html/fwd_2arr_2fun_2sum_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/fwd/arr/fun/sum.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
sum.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <stan/math/prim/arr/fun/sum.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
fvar< T > stan::math::sum (const std::vector< fvar< T > > &m)
 Return the sum of the entries of the specified standard vector. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2arr_2fun_2sum_8hpp_source.html b/doc/api/html/fwd_2arr_2fun_2sum_8hpp_source.html new file mode 100644 index 00000000000..47834578d11 --- /dev/null +++ b/doc/api/html/fwd_2arr_2fun_2sum_8hpp_source.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/fwd/arr/fun/sum.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
sum.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_ARR_FUN_SUM_HPP
+
2 #define STAN_MATH_FWD_ARR_FUN_SUM_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ +
6 #include <vector>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
19  template <typename T>
+
20  inline fvar<T> sum(const std::vector<fvar<T> >& m) {
+
21  using stan::math::sum;
+
22  if (m.size() == 0)
+
23  return 0.0;
+
24  std::vector<T> vals(m.size());
+
25  std::vector<T> tans(m.size());
+
26  for (size_t i = 0; i < m.size(); ++i) {
+
27  vals[i] = m[i].val();
+
28  tans[i] = m[i].tangent();
+
29  }
+
30  return fvar<T>(sum(vals), sum(tans));
+
31  }
+
32 
+
33  }
+
34 }
+
35 #endif
+
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2core_2operator__addition_8hpp.html b/doc/api/html/fwd_2core_2operator__addition_8hpp.html new file mode 100644 index 00000000000..d78991d1900 --- /dev/null +++ b/doc/api/html/fwd_2core_2operator__addition_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/fwd/core/operator_addition.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_addition.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
fvar< T > stan::math::operator+ (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::operator+ (const double x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::operator+ (const fvar< T > &x1, const double x2)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2core_2operator__addition_8hpp_source.html b/doc/api/html/fwd_2core_2operator__addition_8hpp_source.html new file mode 100644 index 00000000000..63eb49c851a --- /dev/null +++ b/doc/api/html/fwd_2core_2operator__addition_8hpp_source.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/fwd/core/operator_addition.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_addition.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_CORE_OPERATOR_ADDITION_HPP
+
2 #define STAN_MATH_FWD_CORE_OPERATOR_ADDITION_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7 
+
8  namespace math {
+
9 
+
10  template <typename T>
+
11  inline
+
12  fvar<T>
+
13  operator+(const fvar<T>& x1, const fvar<T>& x2) {
+
14  return fvar<T>(x1.val_ + x2.val_, x1.d_ + x2.d_);
+
15  }
+
16 
+
17  template <typename T>
+
18  inline
+
19  fvar<T>
+
20  operator+(const double x1, const fvar<T>& x2) {
+
21  return fvar<T>(x1 + x2.val_, x2.d_);
+
22  }
+
23 
+
24  template <typename T>
+
25  inline
+
26  fvar<T>
+
27  operator+(const fvar<T>& x1, const double x2) {
+
28  return fvar<T>(x1.val_ + x2, x1.d_);
+
29  }
+
30  }
+
31 }
+
32 #endif
+ + + +
fvar< T > operator+(const fvar< T > &x1, const fvar< T > &x2)
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2core_2operator__division_8hpp.html b/doc/api/html/fwd_2core_2operator__division_8hpp.html new file mode 100644 index 00000000000..be90fe002a9 --- /dev/null +++ b/doc/api/html/fwd_2core_2operator__division_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/fwd/core/operator_division.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_division.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
fvar< T > stan::math::operator/ (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::operator/ (const fvar< T > &x1, const double x2)
 
template<typename T >
fvar< T > stan::math::operator/ (const double x1, const fvar< T > &x2)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2core_2operator__division_8hpp_source.html b/doc/api/html/fwd_2core_2operator__division_8hpp_source.html new file mode 100644 index 00000000000..6a87edc2bc7 --- /dev/null +++ b/doc/api/html/fwd_2core_2operator__division_8hpp_source.html @@ -0,0 +1,149 @@ + + + + + + +Stan Math Library: stan/math/fwd/core/operator_division.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_division.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_CORE_OPERATOR_DIVISION_HPP
+
2 #define STAN_MATH_FWD_CORE_OPERATOR_DIVISION_HPP
+
3 
+ +
5 
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
11  template <typename T>
+
12  inline
+
13  fvar<T>
+
14  operator/(const fvar<T>& x1, const fvar<T>& x2) {
+
15  return fvar<T>(x1.val_ / x2.val_,
+
16  (x1.d_ * x2.val_ - x1.val_ * x2.d_) / (x2.val_ * x2.val_));
+
17  }
+
18 
+
19  template <typename T>
+
20  inline
+
21  fvar<T>
+
22  operator/(const fvar<T>& x1, const double x2) {
+
23  return fvar<T>(x1.val_ / x2,
+
24  x1.d_ / x2);
+
25  }
+
26 
+
27  template <typename T>
+
28  inline
+
29  fvar<T>
+
30  operator/(const double x1, const fvar<T>& x2) {
+
31  return fvar<T>(x1 / x2.val_,
+
32  - x1 * x2.d_ / (x2.val_ * x2.val_));
+
33  }
+
34  }
+
35 }
+
36 #endif
+
fvar< T > operator/(const fvar< T > &x1, const fvar< T > &x2)
+ + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2core_2operator__equal_8hpp.html b/doc/api/html/fwd_2core_2operator__equal_8hpp.html new file mode 100644 index 00000000000..35b40ebaa80 --- /dev/null +++ b/doc/api/html/fwd_2core_2operator__equal_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/fwd/core/operator_equal.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_equal.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
bool stan::math::operator== (const fvar< T > &x, const fvar< T > &y)
 
template<typename T >
bool stan::math::operator== (const fvar< T > &x, double y)
 
template<typename T >
bool stan::math::operator== (double x, const fvar< T > &y)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2core_2operator__equal_8hpp_source.html b/doc/api/html/fwd_2core_2operator__equal_8hpp_source.html new file mode 100644 index 00000000000..060dee27fb2 --- /dev/null +++ b/doc/api/html/fwd_2core_2operator__equal_8hpp_source.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/fwd/core/operator_equal.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_equal.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_CORE_OPERATOR_EQUAL_HPP
+
2 #define STAN_MATH_FWD_CORE_OPERATOR_EQUAL_HPP
+
3 
+ +
5 
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
11  template <typename T>
+
12  inline
+
13  bool
+
14  operator==(const fvar<T>& x, const fvar<T>& y) {
+
15  return x.val_ == y.val_;
+
16  }
+
17 
+
18  template <typename T>
+
19  inline
+
20  bool
+
21  operator==(const fvar<T>& x, double y) {
+
22  return x.val_ == y;
+
23  }
+
24 
+
25  template <typename T>
+
26  inline
+
27  bool
+
28  operator==(double x, const fvar<T>& y) {
+
29  return x == y.val_;
+
30  }
+
31  }
+
32 }
+
33 #endif
+ + +
bool operator==(const fvar< T > &x, const fvar< T > &y)
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2core_2operator__greater__than_8hpp.html b/doc/api/html/fwd_2core_2operator__greater__than_8hpp.html new file mode 100644 index 00000000000..6ac3c9884b5 --- /dev/null +++ b/doc/api/html/fwd_2core_2operator__greater__than_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/fwd/core/operator_greater_than.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_greater_than.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
bool stan::math::operator> (const fvar< T > &x, const fvar< T > &y)
 
template<typename T >
bool stan::math::operator> (const fvar< T > &x, double y)
 
template<typename T >
bool stan::math::operator> (double x, const fvar< T > &y)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2core_2operator__greater__than_8hpp_source.html b/doc/api/html/fwd_2core_2operator__greater__than_8hpp_source.html new file mode 100644 index 00000000000..46d900c7624 --- /dev/null +++ b/doc/api/html/fwd_2core_2operator__greater__than_8hpp_source.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/fwd/core/operator_greater_than.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_greater_than.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_CORE_OPERATOR_GREATER_THAN_HPP
+
2 #define STAN_MATH_FWD_CORE_OPERATOR_GREATER_THAN_HPP
+
3 
+ +
5 
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
11  template <typename T>
+
12  inline
+
13  bool
+
14  operator>(const fvar<T>& x, const fvar<T>& y) {
+
15  return x.val_ > y.val_;
+
16  }
+
17 
+
18  template <typename T>
+
19  inline
+
20  bool
+
21  operator>(const fvar<T>& x, double y) {
+
22  return x.val_ > y;
+
23  }
+
24 
+
25  template <typename T>
+
26  inline
+
27  bool
+
28  operator>(double x, const fvar<T>& y) {
+
29  return x > y.val_;
+
30  }
+
31  }
+
32 }
+
33 #endif
+ + +
bool operator>(const fvar< T > &x, const fvar< T > &y)
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2core_2operator__greater__than__or__equal_8hpp.html b/doc/api/html/fwd_2core_2operator__greater__than__or__equal_8hpp.html new file mode 100644 index 00000000000..4ec1e3a0fd2 --- /dev/null +++ b/doc/api/html/fwd_2core_2operator__greater__than__or__equal_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/fwd/core/operator_greater_than_or_equal.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_greater_than_or_equal.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
bool stan::math::operator>= (const fvar< T > &x, const fvar< T > &y)
 
template<typename T >
bool stan::math::operator>= (const fvar< T > &x, double y)
 
template<typename T >
bool stan::math::operator>= (double x, const fvar< T > &y)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2core_2operator__greater__than__or__equal_8hpp_source.html b/doc/api/html/fwd_2core_2operator__greater__than__or__equal_8hpp_source.html new file mode 100644 index 00000000000..6499df6535c --- /dev/null +++ b/doc/api/html/fwd_2core_2operator__greater__than__or__equal_8hpp_source.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/fwd/core/operator_greater_than_or_equal.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_greater_than_or_equal.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_CORE_OPERATOR_GREATER_THAN_OR_EQUAL_HPP
+
2 #define STAN_MATH_FWD_CORE_OPERATOR_GREATER_THAN_OR_EQUAL_HPP
+
3 
+ +
5 
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
11  template <typename T>
+
12  inline
+
13  bool
+
14  operator>=(const fvar<T>& x, const fvar<T>& y) {
+
15  return x.val_ >= y.val_;
+
16  }
+
17 
+
18  template <typename T>
+
19  inline
+
20  bool
+
21  operator>=(const fvar<T>& x, double y) {
+
22  return x.val_ >= y;
+
23  }
+
24 
+
25  template <typename T>
+
26  inline
+
27  bool
+
28  operator>=(double x, const fvar<T>& y) {
+
29  return x >= y.val_;
+
30  }
+
31  }
+
32 }
+
33 #endif
+ + +
bool operator>=(const fvar< T > &x, const fvar< T > &y)
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2core_2operator__less__than_8hpp.html b/doc/api/html/fwd_2core_2operator__less__than_8hpp.html new file mode 100644 index 00000000000..eb3c2a6c041 --- /dev/null +++ b/doc/api/html/fwd_2core_2operator__less__than_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/fwd/core/operator_less_than.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_less_than.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
bool stan::math::operator< (const fvar< T > &x, double y)
 
template<typename T >
bool stan::math::operator< (double x, const fvar< T > &y)
 
template<typename T >
bool stan::math::operator< (const fvar< T > &x, const fvar< T > &y)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2core_2operator__less__than_8hpp_source.html b/doc/api/html/fwd_2core_2operator__less__than_8hpp_source.html new file mode 100644 index 00000000000..cdb74f2953b --- /dev/null +++ b/doc/api/html/fwd_2core_2operator__less__than_8hpp_source.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/fwd/core/operator_less_than.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_less_than.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_CORE_OPERATOR_LESS_THAN_HPP
+
2 #define STAN_MATH_FWD_CORE_OPERATOR_LESS_THAN_HPP
+
3 
+ +
5 
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
11  template <typename T>
+
12  inline bool operator<(const fvar<T>& x,
+
13  double y) {
+
14  return x.val_ < y;
+
15  }
+
16 
+
17  template <typename T>
+
18  inline bool operator<(double x,
+
19  const fvar<T>& y) {
+
20  return x < y.val_;
+
21  }
+
22 
+
23  template <typename T>
+
24  inline bool operator<(const fvar<T>& x,
+
25  const fvar<T>& y) {
+
26  return x.val_ < y.val_;
+
27  }
+
28  }
+
29 }
+
30 #endif
+ + +
bool operator<(const fvar< T > &x, double y)
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2core_2operator__less__than__or__equal_8hpp.html b/doc/api/html/fwd_2core_2operator__less__than__or__equal_8hpp.html new file mode 100644 index 00000000000..66def0aab0f --- /dev/null +++ b/doc/api/html/fwd_2core_2operator__less__than__or__equal_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/fwd/core/operator_less_than_or_equal.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_less_than_or_equal.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
bool stan::math::operator<= (const fvar< T > &x, const fvar< T > &y)
 
template<typename T >
bool stan::math::operator<= (const fvar< T > &x, double y)
 
template<typename T >
bool stan::math::operator<= (double x, const fvar< T > &y)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2core_2operator__less__than__or__equal_8hpp_source.html b/doc/api/html/fwd_2core_2operator__less__than__or__equal_8hpp_source.html new file mode 100644 index 00000000000..ff019f916cb --- /dev/null +++ b/doc/api/html/fwd_2core_2operator__less__than__or__equal_8hpp_source.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/fwd/core/operator_less_than_or_equal.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_less_than_or_equal.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_CORE_OPERATOR_LESS_THAN_OR_EQUAL_HPP
+
2 #define STAN_MATH_FWD_CORE_OPERATOR_LESS_THAN_OR_EQUAL_HPP
+
3 
+ +
5 
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
11  template <typename T>
+
12  inline
+
13  bool
+
14  operator<=(const fvar<T>& x, const fvar<T>& y) {
+
15  return x.val_ <= y.val_;
+
16  }
+
17 
+
18  template <typename T>
+
19  inline
+
20  bool
+
21  operator<=(const fvar<T>& x, double y) {
+
22  return x.val_ <= y;
+
23  }
+
24 
+
25  template <typename T>
+
26  inline
+
27  bool
+
28  operator<=(double x, const fvar<T>& y) {
+
29  return x <= y.val_;
+
30  }
+
31  }
+
32 }
+
33 #endif
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2core_2operator__multiplication_8hpp.html b/doc/api/html/fwd_2core_2operator__multiplication_8hpp.html new file mode 100644 index 00000000000..fad884bc86b --- /dev/null +++ b/doc/api/html/fwd_2core_2operator__multiplication_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/fwd/core/operator_multiplication.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_multiplication.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
fvar< T > stan::math::operator* (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::operator* (double x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::operator* (const fvar< T > &x1, double x2)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2core_2operator__multiplication_8hpp_source.html b/doc/api/html/fwd_2core_2operator__multiplication_8hpp_source.html new file mode 100644 index 00000000000..d062623f67e --- /dev/null +++ b/doc/api/html/fwd_2core_2operator__multiplication_8hpp_source.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan/math/fwd/core/operator_multiplication.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_multiplication.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_CORE_OPERATOR_MULTIPLICATION_HPP
+
2 #define STAN_MATH_FWD_CORE_OPERATOR_MULTIPLICATION_HPP
+
3 
+ +
5 
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
11  template <typename T>
+
12  inline
+
13  fvar<T>
+
14  operator*(const fvar<T>& x1, const fvar<T>& x2) {
+
15  return fvar<T>(x1.val_ * x2.val_,
+
16  x1.d_ * x2.val_ + x1.val_ * x2.d_);
+
17  }
+
18 
+
19  template <typename T>
+
20  inline
+
21  fvar<T>
+
22  operator*(double x1, const fvar<T>& x2) {
+
23  return fvar<T>(x1 * x2.val_, x1 * x2.d_);
+
24  }
+
25 
+
26  template <typename T>
+
27  inline
+
28  fvar<T>
+
29  operator*(const fvar<T>& x1, double x2) {
+
30  return fvar<T>(x1.val_ * x2, x1.d_ * x2);
+
31  }
+
32  }
+
33 }
+
34 #endif
+ + + +
fvar< T > operator*(const fvar< T > &x1, const fvar< T > &x2)
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2core_2operator__not__equal_8hpp.html b/doc/api/html/fwd_2core_2operator__not__equal_8hpp.html new file mode 100644 index 00000000000..eb9ab8a0edd --- /dev/null +++ b/doc/api/html/fwd_2core_2operator__not__equal_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/fwd/core/operator_not_equal.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_not_equal.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
bool stan::math::operator!= (const fvar< T > &x, const fvar< T > &y)
 
template<typename T >
bool stan::math::operator!= (const fvar< T > &x, double y)
 
template<typename T >
bool stan::math::operator!= (double x, const fvar< T > &y)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2core_2operator__not__equal_8hpp_source.html b/doc/api/html/fwd_2core_2operator__not__equal_8hpp_source.html new file mode 100644 index 00000000000..d0112860cf5 --- /dev/null +++ b/doc/api/html/fwd_2core_2operator__not__equal_8hpp_source.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/fwd/core/operator_not_equal.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_not_equal.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_CORE_OPERATOR_NOT_EQUAL_HPP
+
2 #define STAN_MATH_FWD_CORE_OPERATOR_NOT_EQUAL_HPP
+
3 
+ +
5 
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
11  template <typename T>
+
12  inline
+
13  bool
+
14  operator!=(const fvar<T>& x, const fvar<T>& y) {
+
15  return x.val_ != y.val_;
+
16  }
+
17 
+
18  template <typename T>
+
19  inline
+
20  bool
+
21  operator!=(const fvar<T>& x, double y) {
+
22  return x.val_ != y;
+
23  }
+
24 
+
25  template <typename T>
+
26  inline
+
27  bool
+
28  operator!=(double x, const fvar<T>& y) {
+
29  return x != y.val_;
+
30  }
+
31  }
+
32 }
+
33 #endif
+
bool operator!=(const fvar< T > &x, const fvar< T > &y)
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2core_2operator__subtraction_8hpp.html b/doc/api/html/fwd_2core_2operator__subtraction_8hpp.html new file mode 100644 index 00000000000..84607281173 --- /dev/null +++ b/doc/api/html/fwd_2core_2operator__subtraction_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/fwd/core/operator_subtraction.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_subtraction.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
fvar< T > stan::math::operator- (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::operator- (const double x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::operator- (const fvar< T > &x1, const double x2)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2core_2operator__subtraction_8hpp_source.html b/doc/api/html/fwd_2core_2operator__subtraction_8hpp_source.html new file mode 100644 index 00000000000..ab8164a065f --- /dev/null +++ b/doc/api/html/fwd_2core_2operator__subtraction_8hpp_source.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/fwd/core/operator_subtraction.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_subtraction.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_CORE_OPERATOR_SUBTRACTION_HPP
+
2 #define STAN_MATH_FWD_CORE_OPERATOR_SUBTRACTION_HPP
+
3 
+ +
5 
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
11  template <typename T>
+
12  inline
+
13  fvar<T>
+
14  operator-(const fvar<T>& x1, const fvar<T>& x2) {
+
15  return fvar<T>(x1.val_ - x2.val_, x1.d_ - x2.d_);
+
16  }
+
17 
+
18  template <typename T>
+
19  inline
+
20  fvar<T>
+
21  operator-(const double x1, const fvar<T>& x2) {
+
22  return fvar<T>(x1 - x2.val_, -x2.d_);
+
23  }
+
24 
+
25  template <typename T>
+
26  inline
+
27  fvar<T>
+
28  operator-(const fvar<T>& x1, const double x2) {
+
29  return fvar<T>(x1.val_ - x2, x1.d_);
+
30  }
+
31  }
+
32 }
+
33 #endif
+
fvar< T > operator-(const fvar< T > &x1, const fvar< T > &x2)
+ + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2core_2std__numeric__limits_8hpp.html b/doc/api/html/fwd_2core_2std__numeric__limits_8hpp.html new file mode 100644 index 00000000000..4b21e378ad8 --- /dev/null +++ b/doc/api/html/fwd_2core_2std__numeric__limits_8hpp.html @@ -0,0 +1,126 @@ + + + + + + +Stan Math Library: stan/math/fwd/core/std_numeric_limits.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
std_numeric_limits.hpp File Reference
+
+
+
#include <stan/math/fwd/core/fvar.hpp>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + +

+Classes

struct  std::numeric_limits< stan::math::fvar< T > >
 
+ + + +

+Namespaces

 std
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2core_2std__numeric__limits_8hpp_source.html b/doc/api/html/fwd_2core_2std__numeric__limits_8hpp_source.html new file mode 100644 index 00000000000..be1bd78d938 --- /dev/null +++ b/doc/api/html/fwd_2core_2std__numeric__limits_8hpp_source.html @@ -0,0 +1,177 @@ + + + + + + +Stan Math Library: stan/math/fwd/core/std_numeric_limits.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
std_numeric_limits.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_CORE_STD_NUMERIC_LIMITS_HPP
+
2 #define STAN_MATH_FWD_CORE_STD_NUMERIC_LIMITS_HPP
+
3 
+ +
5 #include <limits>
+
6 
+
7 namespace std {
+
8 
+
9  template <typename T>
+
10 
+
11  struct numeric_limits<stan::math::fvar<T> > {
+
12  static const bool is_specialized = true;
+ + +
15  static const int digits = numeric_limits<double>::digits;
+
16  static const int digits10 = numeric_limits<double>::digits10;
+
17  static const bool is_signed = numeric_limits<double>::is_signed;
+
18  static const bool is_integer = numeric_limits<double>::is_integer;
+
19  static const bool is_exact = numeric_limits<double>::is_exact;
+
20  static const int radix = numeric_limits<double>::radix;
+ +
22  return numeric_limits<double>::epsilon(); }
+ +
24  return numeric_limits<double>::round_error(); }
+
25 
+
26  static const int min_exponent = numeric_limits<double>::min_exponent;
+
27  static const int min_exponent10 = numeric_limits<double>::min_exponent10;
+
28  static const int max_exponent = numeric_limits<double>::max_exponent;
+
29  static const int max_exponent10 = numeric_limits<double>::max_exponent10;
+
30 
+
31  static const bool has_infinity = numeric_limits<double>::has_infinity;
+
32  static const bool has_quiet_NaN = numeric_limits<double>::has_quiet_NaN;
+
33  static const bool has_signaling_NaN =
+
34  numeric_limits<double>::has_signaling_NaN;
+
35  static const float_denorm_style has_denorm =
+
36  numeric_limits<double>::has_denorm;
+
37  static const bool has_denorm_loss = numeric_limits<double>::has_denorm_loss;
+ +
39  return numeric_limits<double>::infinity(); }
+ +
41  return numeric_limits<double>::quiet_NaN(); }
+ +
43  return numeric_limits<double>::signaling_NaN(); }
+ +
45  return numeric_limits<double>::denorm_min(); }
+
46 
+
47  static const bool is_iec559 = numeric_limits<double>::is_iec559;
+
48  static const bool is_bounded = numeric_limits<double>::is_bounded;
+
49  static const bool is_modulo = numeric_limits<double>::is_modulo;
+
50 
+
51  static const bool traps = numeric_limits<double>::traps;
+
52  static const bool tinyness_before = numeric_limits<double>::tinyness_before;
+
53  static const float_round_style round_style =
+
54  numeric_limits<double>::round_style;
+
55  };
+
56 }
+
57 #endif
+ + + +
int min(const std::vector< int > &x)
Returns the minimum coefficient in the specified column vector.
Definition: min.hpp:20
+ + + +
int max(const std::vector< int > &x)
Returns the maximum coefficient in the specified column vector.
Definition: max.hpp:21
+
static stan::math::fvar< T > signaling_NaN()
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2core_8hpp.html b/doc/api/html/fwd_2core_8hpp.html new file mode 100644 index 00000000000..58ced488b6f --- /dev/null +++ b/doc/api/html/fwd_2core_8hpp.html @@ -0,0 +1,123 @@ + + + + + + +Stan Math Library: stan/math/fwd/core.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
core.hpp File Reference
+
+
+ +

Go to the source code of this file.

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2core_8hpp_source.html b/doc/api/html/fwd_2core_8hpp_source.html new file mode 100644 index 00000000000..22505ac13fd --- /dev/null +++ b/doc/api/html/fwd_2core_8hpp_source.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/fwd/core.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
core.hpp
+
+
+Go to the documentation of this file.
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2_eigen___num_traits_8hpp.html b/doc/api/html/fwd_2mat_2fun_2_eigen___num_traits_8hpp.html new file mode 100644 index 00000000000..a78b43347ac --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2_eigen___num_traits_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/Eigen_NumTraits.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
Eigen_NumTraits.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + + +

+Classes

struct  Eigen::NumTraits< stan::math::fvar< T > >
 Numerical traits template override for Eigen for automatic gradient variables. More...
 
struct  Eigen::internal::significant_decimals_default_impl< stan::math::fvar< T >, false >
 Implemented this for printing to stream. More...
 
+ + + + + + + +

+Namespaces

 Eigen
 (Expert) Numerical traits for algorithmic differentiation variables.
 
 Eigen::internal
 (Expert) Product traits for algorithmic differentiation variables.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2_eigen___num_traits_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2_eigen___num_traits_8hpp_source.html new file mode 100644 index 00000000000..b650f90bca7 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2_eigen___num_traits_8hpp_source.html @@ -0,0 +1,184 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/Eigen_NumTraits.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
Eigen_NumTraits.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_EIGEN_NUMTRAITS_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_EIGEN_NUMTRAITS_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ +
6 #include <limits>
+
7 
+
8 namespace Eigen {
+
9 
+
14  template <typename T>
+
15  struct NumTraits<stan::math::fvar<T> > {
+ +
22 
+ +
29 
+ +
36 
+
43  inline static Real epsilon() {
+
44  return std::numeric_limits<double>::epsilon();
+
45  }
+
46 
+
50  inline static Real dummy_precision() {
+
51  return 1e-12; // copied from NumTraits.h values for double
+
52  }
+
53 
+
60  inline static Real highest() {
+ +
62  }
+
63 
+
70  inline static Real lowest() {
+ +
72  }
+
73 
+
78  enum {
+
79  IsInteger = 0,
+
80  IsSigned = 1,
+
81  IsComplex = 0,
+
82  RequireInitialization = 1,
+
83  ReadCost = 1,
+
84  AddCost = 1,
+
85  MulCost = 1,
+
86  HasFloatingPoint = 1
+
87  };
+
88  };
+
89 
+
90  namespace internal {
+
94  template<typename T>
+
95  struct significant_decimals_default_impl<stan::math::fvar<T>, false> {
+
96  static inline int run() {
+
97  using std::ceil;
+
98  using std::log;
+
99  return cast<double, int>
+
100  (ceil(-log(std::numeric_limits<double>::epsilon())
+
101  / log(10.0)));
+
102  }
+
103  };
+
104 
+
105  }
+
106 }
+
107 
+
108 #endif
+
stan::math::fvar< T > NonInteger
Non-integer valued variables.
+ + +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
static Real dummy_precision()
Return dummy precision.
+
static Real highest()
Return standard library's highest for double-precision floating point, std::numeric_limits<double>max...
+
static Real lowest()
Return standard library's lowest for double-precision floating point, &#45;std::numeric_limits<double...
+
stan::math::fvar< T > Real
Real-valued variables.
+
stan::math::fvar< T > Nested
Nested variables.
+ +
int max(const std::vector< int > &x)
Returns the maximum coefficient in the specified column vector.
Definition: max.hpp:21
+
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+
static Real epsilon()
Return standard library's epsilon for double-precision floating point, std::numeric_limits<double>::e...
+
fvar< T > ceil(const fvar< T > &x)
Definition: ceil.hpp:11
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2columns__dot__product_8hpp.html b/doc/api/html/fwd_2mat_2fun_2columns__dot__product_8hpp.html new file mode 100644 index 00000000000..80ca8677ec6 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2columns__dot__product_8hpp.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/columns_dot_product.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
columns_dot_product.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, 1, C1 > stan::math::columns_dot_product (const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, 1, C1 > stan::math::columns_dot_product (const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, 1, C1 > stan::math::columns_dot_product (const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2columns__dot__product_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2columns__dot__product_8hpp_source.html new file mode 100644 index 00000000000..59656194e1d --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2columns__dot__product_8hpp_source.html @@ -0,0 +1,186 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/columns_dot_product.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
columns_dot_product.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_COLUMNS_DOT_PRODUCT_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_COLUMNS_DOT_PRODUCT_HPP
+
3 
+ + + + + +
9 #include <stan/math/fwd/core.hpp>
+
10 #include <vector>
+
11 
+
12 namespace stan {
+
13  namespace math {
+
14 
+
15  template<typename T, int R1, int C1, int R2, int C2>
+
16  inline
+
17  Eigen::Matrix<fvar<T>, 1, C1>
+
18  columns_dot_product(const Eigen::Matrix<fvar<T>, R1, C1>& v1,
+
19  const Eigen::Matrix<fvar<T>, R2, C2>& v2) {
+
20  stan::math::check_matching_dims("columns_dot_product",
+
21  "v1", v1,
+
22  "v2", v2);
+
23  Eigen::Matrix<fvar<T>, 1, C1> ret(1, v1.cols());
+
24  for (size_type j = 0; j < v1.cols(); ++j) {
+
25  Eigen::Matrix<fvar<T>, R1, C1> ccol1 = v1.col(j);
+
26  Eigen::Matrix<fvar<T>, R2, C2> ccol2 = v2.col(j);
+
27  ret(0, j) = dot_product(ccol1, ccol2);
+
28  }
+
29  return ret;
+
30  }
+
31 
+
32  template<typename T, int R1, int C1, int R2, int C2>
+
33  inline
+
34  Eigen::Matrix<fvar<T>, 1, C1>
+
35  columns_dot_product(const Eigen::Matrix<fvar<T>, R1, C1>& v1,
+
36  const Eigen::Matrix<double, R2, C2>& v2) {
+
37  stan::math::check_matching_dims("columns_dot_product",
+
38  "v1", v1,
+
39  "v2", v2);
+
40  Eigen::Matrix<fvar<T>, 1, C1> ret(1, v1.cols());
+
41  for (size_type j = 0; j < v1.cols(); ++j) {
+
42  Eigen::Matrix<fvar<T>, R1, C1> ccol1 = v1.col(j);
+
43  Eigen::Matrix<double, R2, C2> ccol = v2.col(j);
+
44  ret(0, j) = dot_product(ccol1, ccol);
+
45  }
+
46  return ret;
+
47  }
+
48 
+
49  template<typename T, int R1, int C1, int R2, int C2>
+
50  inline
+
51  Eigen::Matrix<fvar<T>, 1, C1>
+
52  columns_dot_product(const Eigen::Matrix<double, R1, C1>& v1,
+
53  const Eigen::Matrix<fvar<T>, R2, C2>& v2) {
+
54  stan::math::check_matching_dims("columns_dot_product",
+
55  "v1", v1,
+
56  "v2", v2);
+
57  Eigen::Matrix<fvar<T>, 1, C1> ret(1, v1.cols());
+
58  for (size_type j = 0; j < v1.cols(); ++j) {
+
59  Eigen::Matrix<double, R1, C1> ccol = v1.col(j);
+
60  Eigen::Matrix<fvar<T>, R2, C2> ccol2 = v2.col(j);
+
61  ret(0, j) = dot_product(ccol, ccol2);
+
62  }
+
63  return ret;
+
64  }
+
65  }
+
66 }
+
67 #endif
+
Eigen::Matrix< fvar< T >, 1, C1 > columns_dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
+ + + +
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
bool check_matching_dims(const char *function, const char *name1, const Eigen::Matrix< T1, R1, C1 > &y1, const char *name2, const Eigen::Matrix< T2, R2, C2 > &y2)
Return true if the two matrices are of the same size.
+ +
fvar< T > dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
Definition: dot_product.hpp:20
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2columns__dot__self_8hpp.html b/doc/api/html/fwd_2mat_2fun_2columns__dot__self_8hpp.html new file mode 100644 index 00000000000..a122d90e92c --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2columns__dot__self_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/columns_dot_self.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
columns_dot_self.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, 1, C > stan::math::columns_dot_self (const Eigen::Matrix< fvar< T >, R, C > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2columns__dot__self_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2columns__dot__self_8hpp_source.html new file mode 100644 index 00000000000..02a93ef28ba --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2columns__dot__self_8hpp_source.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/columns_dot_self.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
columns_dot_self.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_COLUMNS_DOT_SELF_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_COLUMNS_DOT_SELF_HPP
+
3 
+ + +
6 #include <stan/math/fwd/core.hpp>
+ +
8 #include <vector>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
13  template<typename T, int R, int C>
+
14  inline Eigen::Matrix<fvar<T>, 1, C>
+
15  columns_dot_self(const Eigen::Matrix<fvar<T>, R, C>& x) {
+
16  Eigen::Matrix<fvar<T>, 1, C> ret(1, x.cols());
+
17  for (size_type i = 0; i < x.cols(); i++) {
+
18  Eigen::Matrix<fvar<T>, R, 1> ccol = x.col(i);
+
19  ret(0, i) = dot_self(ccol);
+
20  }
+
21  return ret;
+
22  }
+
23  }
+
24 }
+
25 #endif
+ +
fvar< T > dot_self(const Eigen::Matrix< fvar< T >, R, C > &v)
Definition: dot_self.hpp:16
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+ + +
Eigen::Matrix< fvar< T >, 1, C > columns_dot_self(const Eigen::Matrix< fvar< T >, R, C > &x)
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2crossprod_8hpp.html b/doc/api/html/fwd_2mat_2fun_2crossprod_8hpp.html new file mode 100644 index 00000000000..bebb1a10675 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2crossprod_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/crossprod.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
crossprod.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, C, C > stan::math::crossprod (const Eigen::Matrix< fvar< T >, R, C > &m)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2crossprod_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2crossprod_8hpp_source.html new file mode 100644 index 00000000000..3b70064dcef --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2crossprod_8hpp_source.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/crossprod.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
crossprod.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_CROSSPROD_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_CROSSPROD_HPP
+
3 
+ + + + + +
9 #include <vector>
+
10 
+
11 namespace stan {
+
12  namespace math {
+
13 
+
14  template<typename T, int R, int C>
+
15  inline
+
16  Eigen::Matrix<fvar<T>, C, C>
+
17  crossprod(const Eigen::Matrix<fvar<T>, R, C>& m) {
+
18  if (m.rows() == 0)
+
19  return Eigen::Matrix<fvar<T>, C, C>(0, 0);
+ +
21  }
+
22 
+
23  }
+
24 }
+
25 #endif
+ +
Eigen::Matrix< fvar< T >, R1, C1 > multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m, const fvar< T > &c)
Definition: multiply.hpp:20
+ + +
Eigen::Matrix< fvar< T >, C, C > crossprod(const Eigen::Matrix< fvar< T >, R, C > &m)
Definition: crossprod.hpp:17
+ +
Eigen::Matrix< T, C, R > transpose(const Eigen::Matrix< T, R, C > &m)
Definition: transpose.hpp:12
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2determinant_8hpp.html b/doc/api/html/fwd_2mat_2fun_2determinant_8hpp.html new file mode 100644 index 00000000000..88e78d0e79a --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2determinant_8hpp.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/determinant.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
determinant.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T , int R, int C>
fvar< T > stan::math::determinant (const Eigen::Matrix< fvar< T >, R, C > &m)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2determinant_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2determinant_8hpp_source.html new file mode 100644 index 00000000000..b96de4d3051 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2determinant_8hpp_source.html @@ -0,0 +1,172 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/determinant.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
determinant.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_DETERMINANT_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_DETERMINANT_HPP
+
3 
+ +
5 #include <stan/math/fwd/core.hpp>
+ + + + + + +
12 #include <boost/math/tools/promotion.hpp>
+
13 #include <vector>
+
14 
+
15 namespace stan {
+
16  namespace math {
+
17 
+
18  template<typename T, int R, int C>
+
19  inline
+
20  fvar<T>
+
21  determinant(const Eigen::Matrix<fvar<T>, R, C>& m) {
+ +
23  using stan::math::inverse;
+
24 
+
25  stan::math::check_square("determinant", "m", m);
+
26  Eigen::Matrix<T, R, C> m_deriv(m.rows(), m.cols());
+
27  Eigen::Matrix<T, R, C> m_val(m.rows(), m.cols());
+
28 
+
29  for (size_type i = 0; i < m.rows(); i++) {
+
30  for (size_type j = 0; j < m.cols(); j++) {
+
31  m_deriv(i, j) = m(i, j).d_;
+
32  m_val(i, j) = m(i, j).val_;
+
33  }
+
34  }
+
35 
+
36  Eigen::Matrix<T, R, C> m_inv = inverse<T>(m_val);
+
37  m_deriv = multiply(m_inv, m_deriv);
+
38 
+
39  fvar<T> result;
+
40  result.val_ = m_val.determinant();
+
41  result.d_ = result.val_ * m_deriv.trace();
+
42 
+
43  // FIXME: I think this will overcopy compared to retur fvar<T>(...);
+
44  return result;
+
45  }
+
46  }
+
47 }
+
48 #endif
+ + + + +
Eigen::Matrix< fvar< T >, R1, C1 > multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m, const fvar< T > &c)
Definition: multiply.hpp:20
+ +
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
Eigen::Matrix< fvar< T >, R, C > inverse(const Eigen::Matrix< fvar< T >, R, C > &m)
Definition: inverse.hpp:20
+ +
fvar< T > determinant(const Eigen::Matrix< fvar< T >, R, C > &m)
Definition: determinant.hpp:21
+ + + +
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2divide_8hpp.html b/doc/api/html/fwd_2mat_2fun_2divide_8hpp.html new file mode 100644 index 00000000000..64c3bef16fe --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2divide_8hpp.html @@ -0,0 +1,152 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/divide.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
divide.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T1 , typename T2 >
stan::return_type< T1, T2 >::type stan::math::divide (const T1 &v, const T2 &c)
 
template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, R, C > stan::math::divide (const Eigen::Matrix< fvar< T >, R, C > &v, const fvar< T > &c)
 
template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, R, C > stan::math::divide (const Eigen::Matrix< fvar< T >, R, C > &v, const double c)
 
template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, R, C > stan::math::divide (const Eigen::Matrix< double, R, C > &v, const fvar< T > &c)
 
template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, R, C > stan::math::operator/ (const Eigen::Matrix< fvar< T >, R, C > &v, const fvar< T > &c)
 
template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, R, C > stan::math::operator/ (const Eigen::Matrix< fvar< T >, R, C > &v, const double c)
 
template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, R, C > stan::math::operator/ (const Eigen::Matrix< double, R, C > &v, const fvar< T > &c)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2divide_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2divide_8hpp_source.html new file mode 100644 index 00000000000..d97cf87d0a4 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2divide_8hpp_source.html @@ -0,0 +1,192 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/divide.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
divide.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_DIVIDE_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_DIVIDE_HPP
+
3 
+ +
5 #include <stan/math/fwd/core.hpp>
+ + + +
9 #include <vector>
+
10 
+
11 namespace stan {
+
12  namespace math {
+
13 
+
14  template <typename T1, typename T2>
+
15  inline
+ +
17  divide(const T1& v, const T2& c) {
+
18  return v / c;
+
19  }
+
20 
+
21  template <typename T, int R, int C>
+
22  inline Eigen::Matrix<fvar<T>, R, C>
+
23  divide(const Eigen::Matrix<fvar<T>, R, C>& v, const fvar<T>& c) {
+
24  Eigen::Matrix<fvar<T>, R, C> res(v.rows(), v.cols());
+
25  for (int i = 0; i < v.rows(); i++) {
+
26  for (int j = 0; j < v.cols(); j++)
+
27  res(i, j) = v(i, j) / c;
+
28  }
+
29  return res;
+
30  }
+
31 
+
32  template <typename T, int R, int C>
+
33  inline Eigen::Matrix<fvar<T>, R, C>
+
34  divide(const Eigen::Matrix<fvar<T>, R, C>& v, const double c) {
+
35  Eigen::Matrix<fvar<T>, R, C>
+
36  res(v.rows(), v.cols());
+
37  for (int i = 0; i < v.rows(); i++) {
+
38  for (int j = 0; j < v.cols(); j++)
+
39  res(i, j) = v(i, j) / c;
+
40  }
+
41  return res;
+
42  }
+
43 
+
44  template <typename T, int R, int C>
+
45  inline Eigen::Matrix<fvar<T>, R, C>
+
46  divide(const Eigen::Matrix<double, R, C>& v, const fvar<T>& c) {
+
47  Eigen::Matrix<fvar<T>, R, C>
+
48  res(v.rows(), v.cols());
+
49  for (int i = 0; i < v.rows(); i++) {
+
50  for (int j = 0; j < v.cols(); j++)
+
51  res(i, j) = v(i, j) / c;
+
52  }
+
53  return res;
+
54  }
+
55 
+
56  template <typename T, int R, int C>
+
57  inline Eigen::Matrix<fvar<T>, R, C>
+
58  operator/(const Eigen::Matrix<fvar<T>, R, C>& v, const fvar<T>& c) {
+
59  return divide(v, c);
+
60  }
+
61 
+
62  template <typename T, int R, int C>
+
63  inline Eigen::Matrix<fvar<T>, R, C>
+
64  operator/(const Eigen::Matrix<fvar<T>, R, C>& v, const double c) {
+
65  return divide(v, c);
+
66  }
+
67 
+
68  template <typename T, int R, int C>
+
69  inline Eigen::Matrix<fvar<T>, R, C>
+
70  operator/(const Eigen::Matrix<double, R, C>& v, const fvar<T>& c) {
+
71  return divide(v, c);
+
72  }
+
73  }
+
74 }
+
75 #endif
+ + +
fvar< T > operator/(const fvar< T > &x1, const fvar< T > &x2)
+
stan::return_type< T1, T2 >::type divide(const T1 &v, const T2 &c)
Definition: divide.hpp:17
+ +
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2dot__product_8hpp.html b/doc/api/html/fwd_2mat_2fun_2dot__product_8hpp.html new file mode 100644 index 00000000000..ad4f8396af6 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2dot__product_8hpp.html @@ -0,0 +1,168 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/dot_product.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
dot_product.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , int R1, int C1, int R2, int C2>
fvar< T > stan::math::dot_product (const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
 
template<typename T , int R1, int C1, int R2, int C2>
fvar< T > stan::math::dot_product (const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)
 
template<typename T , int R1, int C1, int R2, int C2>
fvar< T > stan::math::dot_product (const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
 
template<typename T , int R1, int C1, int R2, int C2>
fvar< T > stan::math::dot_product (const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2, size_type &length)
 
template<typename T , int R1, int C1, int R2, int C2>
fvar< T > stan::math::dot_product (const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2, size_type &length)
 
template<typename T , int R1, int C1, int R2, int C2>
fvar< T > stan::math::dot_product (const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2, size_type &length)
 
template<typename T >
fvar< T > stan::math::dot_product (const std::vector< fvar< T > > &v1, const std::vector< fvar< T > > &v2)
 
template<typename T >
fvar< T > stan::math::dot_product (const std::vector< double > &v1, const std::vector< fvar< T > > &v2)
 
template<typename T >
fvar< T > stan::math::dot_product (const std::vector< fvar< T > > &v1, const std::vector< double > &v2)
 
template<typename T >
fvar< T > stan::math::dot_product (const std::vector< fvar< T > > &v1, const std::vector< fvar< T > > &v2, size_type &length)
 
template<typename T >
fvar< T > stan::math::dot_product (const std::vector< double > &v1, const std::vector< fvar< T > > &v2, size_type &length)
 
template<typename T >
fvar< T > stan::math::dot_product (const std::vector< fvar< T > > &v1, const std::vector< double > &v2, size_type &length)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2dot__product_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2dot__product_8hpp_source.html new file mode 100644 index 00000000000..4512928dac8 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2dot__product_8hpp_source.html @@ -0,0 +1,312 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/dot_product.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
dot_product.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_DOT_PRODUCT_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_DOT_PRODUCT_HPP
+
3 
+ + + + + + +
10 #include <vector>
+
11 
+
12 namespace stan {
+
13  namespace math {
+
14 
+
15  // dot_product for vec (in matrix) * vec (in matrix);
+
16  // does all combos of row row, col col, row col, col row
+
17  template<typename T, int R1, int C1, int R2, int C2>
+
18  inline
+
19  fvar<T>
+
20  dot_product(const Eigen::Matrix<fvar<T>, R1, C1>& v1,
+
21  const Eigen::Matrix<fvar<T>, R2, C2>& v2) {
+
22  stan::math::check_vector("dot_product", "v1", v1);
+
23  stan::math::check_vector("dot_product", "v2", v2);
+ +
25  "v1", v1,
+
26  "v2", v2);
+
27 
+
28  fvar<T> ret(0, 0);
+
29  for (size_type i = 0; i < v1.size(); i++)
+
30  ret += v1(i) * v2(i);
+
31  return ret;
+
32  }
+
33 
+
34  template<typename T, int R1, int C1, int R2, int C2>
+
35  inline
+
36  fvar<T>
+
37  dot_product(const Eigen::Matrix<fvar<T>, R1, C1>& v1,
+
38  const Eigen::Matrix<double, R2, C2>& v2) {
+
39  stan::math::check_vector("dot_product", "v1", v1);
+
40  stan::math::check_vector("dot_product", "v2", v2);
+ +
42  "v1", v1,
+
43  "v2", v2);
+
44 
+
45  fvar<T> ret(0, 0);
+
46  for (size_type i = 0; i < v1.size(); i++)
+
47  ret += v1(i) * v2(i);
+
48  return ret;
+
49  }
+
50 
+
51  template<typename T, int R1, int C1, int R2, int C2>
+
52  inline
+
53  fvar<T>
+
54  dot_product(const Eigen::Matrix<double, R1, C1>& v1,
+
55  const Eigen::Matrix<fvar<T>, R2, C2>& v2) {
+
56  stan::math::check_vector("dot_product", "v1", v1);
+
57  stan::math::check_vector("dot_product", "v2", v2);
+ +
59  "v1", v1,
+
60  "v2", v2);
+
61 
+
62  fvar<T> ret(0, 0);
+
63  for (size_type i = 0; i < v1.size(); i++)
+
64  ret += v1(i) * v2(i);
+
65  return ret;
+
66  }
+
67 
+
68  template<typename T, int R1, int C1, int R2, int C2>
+
69  inline
+
70  fvar<T>
+
71  dot_product(const Eigen::Matrix<fvar<T>, R1, C1>& v1,
+
72  const Eigen::Matrix<fvar<T>, R2, C2>& v2,
+
73  size_type& length) {
+
74  stan::math::check_vector("dot_product", "v1", v1);
+
75  stan::math::check_vector("dot_product", "v2", v2);
+
76 
+
77  fvar<T> ret(0, 0);
+
78  for (size_type i = 0; i < length; i++)
+
79  ret += v1(i) * v2(i);
+
80  return ret;
+
81  }
+
82 
+
83  template<typename T, int R1, int C1, int R2, int C2>
+
84  inline
+
85  fvar<T>
+
86  dot_product(const Eigen::Matrix<fvar<T>, R1, C1>& v1,
+
87  const Eigen::Matrix<double, R2, C2>& v2,
+
88  size_type& length) {
+
89  stan::math::check_vector("dot_product", "v1", v1);
+
90  stan::math::check_vector("dot_product", "v2", v2);
+
91 
+
92  fvar<T> ret(0, 0);
+
93  for (size_type i = 0; i < length; i++)
+
94  ret += v1(i) * v2(i);
+
95  return ret;
+
96  }
+
97 
+
98  template<typename T, int R1, int C1, int R2, int C2>
+
99  inline
+
100  fvar<T>
+
101  dot_product(const Eigen::Matrix<double, R1, C1>& v1,
+
102  const Eigen::Matrix<fvar<T>, R2, C2>& v2,
+
103  size_type& length) {
+
104  stan::math::check_vector("dot_product", "v1", v1);
+
105  stan::math::check_vector("dot_product", "v2", v2);
+
106 
+
107  fvar<T> ret(0, 0);
+
108  for (size_type i = 0; i < length; i++)
+
109  ret += v1(i) * v2(i);
+
110  return ret;
+
111  }
+
112 
+
113  template<typename T>
+
114  inline
+
115  fvar<T>
+
116  dot_product(const std::vector<fvar<T> >& v1,
+
117  const std::vector<fvar<T> >& v2) {
+
118  stan::math::check_matching_sizes("dot_product",
+
119  "v1", v1,
+
120  "v2", v2);
+
121  fvar<T> ret(0, 0);
+
122  for (size_t i = 0; i < v1.size(); i++)
+
123  ret += v1.at(i) * v2.at(i);
+
124  return ret;
+
125  }
+
126 
+
127  template<typename T>
+
128  inline
+
129  fvar<T>
+
130  dot_product(const std::vector<double>& v1,
+
131  const std::vector<fvar<T> >& v2) {
+
132  stan::math::check_matching_sizes("dot_product",
+
133  "v1", v1,
+
134  "v2", v2);
+
135  fvar<T> ret(0, 0);
+
136  for (size_t i = 0; i < v1.size(); i++)
+
137  ret += v1.at(i) * v2.at(i);
+
138  return ret;
+
139  }
+
140 
+
141  template<typename T>
+
142  inline
+
143  fvar<T>
+
144  dot_product(const std::vector<fvar<T> >& v1,
+
145  const std::vector<double>& v2) {
+
146  stan::math::check_matching_sizes("dot_product",
+
147  "v1", v1,
+
148  "v2", v2);
+
149  fvar<T> ret(0, 0);
+
150  for (size_t i = 0; i < v1.size(); i++)
+
151  ret += v1.at(i) * v2.at(i);
+
152  return ret;
+
153  }
+
154 
+
155  template<typename T>
+
156  inline
+
157  fvar<T>
+
158  dot_product(const std::vector<fvar<T> >& v1,
+
159  const std::vector<fvar<T> >& v2,
+
160  size_type& length) {
+
161  fvar<T> ret(0, 0);
+
162  for (size_type i = 0; i < length; i++)
+
163  ret += v1.at(i) * v2.at(i);
+
164  return ret;
+
165  }
+
166 
+
167  template<typename T>
+
168  inline
+
169  fvar<T>
+
170  dot_product(const std::vector<double>& v1,
+
171  const std::vector<fvar<T> >& v2,
+
172  size_type& length) {
+
173  fvar<T> ret(0, 0);
+
174  for (size_type i = 0; i < length; i++)
+
175  ret += v1.at(i) * v2.at(i);
+
176  return ret;
+
177  }
+
178 
+
179  template<typename T>
+
180  inline
+
181  fvar<T>
+
182  dot_product(const std::vector<fvar<T> >& v1,
+
183  const std::vector<double>& v2,
+
184  size_type& length) {
+
185  fvar<T> ret(0, 0);
+
186  for (size_type i = 0; i < length; i++)
+
187  ret += v1.at(i) * v2.at(i);
+
188  return ret;
+
189  }
+
190  }
+
191 }
+
192 #endif
+ +
bool check_vector(const char *function, const char *name, const Eigen::Matrix< T, R, C > &x)
Return true if the matrix is either a row vector or column vector.
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+ +
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
bool check_matching_sizes(const char *function, const char *name1, const T_y1 &y1, const char *name2, const T_y2 &y2)
Return true if two structures at the same size.
+
fvar< T > dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
Definition: dot_product.hpp:20
+ + + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2dot__self_8hpp.html b/doc/api/html/fwd_2mat_2fun_2dot__self_8hpp.html new file mode 100644 index 00000000000..1ef96c5162f --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2dot__self_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/dot_self.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
dot_self.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T , int R, int C>
fvar< T > stan::math::dot_self (const Eigen::Matrix< fvar< T >, R, C > &v)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2dot__self_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2dot__self_8hpp_source.html new file mode 100644 index 00000000000..b5fa7d13581 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2dot__self_8hpp_source.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/dot_self.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
dot_self.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_DOT_SELF_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_DOT_SELF_HPP
+
3 
+ + + +
7 #include <stan/math/fwd/core.hpp>
+ +
9 #include <vector>
+
10 
+
11 namespace stan {
+
12  namespace math {
+
13 
+
14  template<typename T, int R, int C>
+
15  inline fvar<T>
+
16  dot_self(const Eigen::Matrix<fvar<T>, R, C>& v) {
+
17  stan::math::check_vector("dot_self",
+
18  "v", v);
+
19  return dot_product(v, v);
+
20  }
+
21  }
+
22 }
+
23 #endif
+ +
bool check_vector(const char *function, const char *name, const Eigen::Matrix< T, R, C > &x)
Return true if the matrix is either a row vector or column vector.
+
fvar< T > dot_self(const Eigen::Matrix< fvar< T >, R, C > &v)
Definition: dot_self.hpp:16
+ +
fvar< T > dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
Definition: dot_product.hpp:20
+ + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2inverse_8hpp.html b/doc/api/html/fwd_2mat_2fun_2inverse_8hpp.html new file mode 100644 index 00000000000..12f8e7ccc6d --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2inverse_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/inverse.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inverse.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/fun/multiply.hpp>
+#include <stan/math/fwd/core.hpp>
+#include <stan/math/fwd/mat/fun/to_fvar.hpp>
+#include <stan/math/fwd/mat/fun/multiply.hpp>
+#include <stan/math/prim/mat/fun/inverse.hpp>
+#include <stan/math/prim/mat/err/check_square.hpp>
+#include <boost/math/tools/promotion.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, R, C > stan::math::inverse (const Eigen::Matrix< fvar< T >, R, C > &m)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2inverse_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2inverse_8hpp_source.html new file mode 100644 index 00000000000..c8272f2c7d8 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2inverse_8hpp_source.html @@ -0,0 +1,165 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/inverse.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inverse.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_INVERSE_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_INVERSE_HPP
+
3 
+ + +
6 #include <stan/math/fwd/core.hpp>
+ + + + +
11 #include <boost/math/tools/promotion.hpp>
+
12 #include <vector>
+
13 
+
14 namespace stan {
+
15  namespace math {
+
16 
+
17  template<typename T, int R, int C>
+
18  inline
+
19  Eigen::Matrix<fvar<T>, R, C>
+
20  inverse(const Eigen::Matrix<fvar<T>, R, C>& m) {
+ + +
23  using stan::math::inverse;
+
24  stan::math::check_square("inverse", "m", m);
+
25  Eigen::Matrix<T, R, C> m_deriv(m.rows(), m.cols());
+
26  Eigen::Matrix<T, R, C> m_inv(m.rows(), m.cols());
+
27 
+
28  for (size_type i = 0; i < m.rows(); i++) {
+
29  for (size_type j = 0; j < m.cols(); j++) {
+
30  m_inv(i, j) = m(i, j).val_;
+
31  m_deriv(i, j) = m(i, j).d_;
+
32  }
+
33  }
+
34 
+
35  m_inv = stan::math::inverse(m_inv);
+
36 
+
37  m_deriv = multiply(multiply(m_inv, m_deriv), m_inv);
+
38  m_deriv = -m_deriv;
+
39 
+
40  return to_fvar(m_inv, m_deriv);
+
41  }
+
42  }
+
43 }
+
44 #endif
+ + +
Eigen::Matrix< fvar< T >, R1, C1 > multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m, const fvar< T > &c)
Definition: multiply.hpp:20
+ +
fvar< T > to_fvar(const T &x)
Definition: to_fvar.hpp:16
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
Eigen::Matrix< fvar< T >, R, C > inverse(const Eigen::Matrix< fvar< T >, R, C > &m)
Definition: inverse.hpp:20
+ + + +
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2log__determinant_8hpp.html b/doc/api/html/fwd_2mat_2fun_2log__determinant_8hpp.html new file mode 100644 index 00000000000..8da2b88883f --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2log__determinant_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/log_determinant.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_determinant.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/fwd/core.hpp>
+#include <stan/math/fwd/mat/fun/typedefs.hpp>
+#include <stan/math/fwd/mat/fun/determinant.hpp>
+#include <stan/math/fwd/scal/fun/fabs.hpp>
+#include <stan/math/fwd/scal/fun/log.hpp>
+#include <stan/math/prim/mat/err/check_square.hpp>
+#include <boost/math/tools/promotion.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T , int R, int C>
fvar< T > stan::math::log_determinant (const Eigen::Matrix< fvar< T >, R, C > &m)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2log__determinant_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2log__determinant_8hpp_source.html new file mode 100644 index 00000000000..d37f080cf3a --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2log__determinant_8hpp_source.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/log_determinant.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_determinant.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_LOG_DETERMINANT_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_LOG_DETERMINANT_HPP
+
3 
+ +
5 #include <stan/math/fwd/core.hpp>
+ + + + + +
11 #include <boost/math/tools/promotion.hpp>
+
12 #include <vector>
+
13 
+
14 namespace stan {
+
15  namespace math {
+
16 
+
17  template<typename T, int R, int C>
+
18  inline
+
19  fvar<T>
+
20  log_determinant(const Eigen::Matrix<fvar<T>, R, C>& m) {
+
21  stan::math::check_square("log_determinant", "m", m);
+
22 
+ +
24  }
+
25  }
+
26 }
+
27 #endif
+ + +
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:14
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
fvar< T > log_determinant(const Eigen::Matrix< fvar< T >, R, C > &m)
+ +
fvar< T > determinant(const Eigen::Matrix< fvar< T >, R, C > &m)
Definition: determinant.hpp:21
+ +
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2log__softmax_8hpp.html b/doc/api/html/fwd_2mat_2fun_2log__softmax_8hpp.html new file mode 100644 index 00000000000..b4dfd855e9b --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2log__softmax_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/log_softmax.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_softmax.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
Eigen::Matrix< fvar< T >
+, Eigen::Dynamic, 1 > 
stan::math::log_softmax (const Eigen::Matrix< fvar< T >, Eigen::Dynamic, 1 > &alpha)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2log__softmax_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2log__softmax_8hpp_source.html new file mode 100644 index 00000000000..3c7a047e898 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2log__softmax_8hpp_source.html @@ -0,0 +1,175 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/log_softmax.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_softmax.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_LOG_SOFTMAX_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_LOG_SOFTMAX_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ + + + +
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
13  template <typename T>
+
14  inline
+
15  Eigen::Matrix<fvar<T>, Eigen::Dynamic, 1>
+
16  log_softmax(const Eigen::Matrix<fvar<T>, Eigen::Dynamic, 1>& alpha) {
+
17  using stan::math::softmax;
+ +
19  using Eigen::Matrix;
+
20  using Eigen::Dynamic;
+
21 
+
22  Matrix<T, Dynamic, 1> alpha_t(alpha.size());
+
23  for (int k = 0; k < alpha.size(); ++k)
+
24  alpha_t(k) = alpha(k).val_;
+
25 
+
26  Matrix<T, Dynamic, 1> softmax_alpha_t = softmax(alpha_t);
+
27  Matrix<T, Dynamic, 1> log_softmax_alpha_t = log_softmax(alpha_t);
+
28 
+
29  Matrix<fvar<T>, Dynamic, 1> log_softmax_alpha(alpha.size());
+
30  for (int k = 0; k < alpha.size(); ++k) {
+
31  log_softmax_alpha(k).val_ = log_softmax_alpha_t(k);
+
32  log_softmax_alpha(k).d_ = 0;
+
33  }
+
34 
+
35  // for each input position
+
36  for (int m = 0; m < alpha.size(); ++m) {
+
37  T negative_alpha_m_d_times_softmax_alpha_t_m
+
38  = - alpha(m).d_ * softmax_alpha_t(m);
+
39  // for each output position
+
40  for (int k = 0; k < alpha.size(); ++k) {
+
41  // chain from input to output
+
42  if (m == k)
+
43  log_softmax_alpha(k).d_
+
44  += alpha(m).d_
+
45  + negative_alpha_m_d_times_softmax_alpha_t_m;
+
46  else
+
47  log_softmax_alpha(k).d_
+
48  += negative_alpha_m_d_times_softmax_alpha_t_m;
+
49  }
+
50  }
+
51 
+
52  return log_softmax_alpha;
+
53  }
+
54 
+
55 
+
56  }
+
57 }
+
58 
+
59 #endif
+ +
Eigen::Matrix< fvar< T >, Eigen::Dynamic, 1 > softmax(const Eigen::Matrix< fvar< T >, Eigen::Dynamic, 1 > &alpha)
Definition: softmax.hpp:14
+ +
Eigen::Matrix< fvar< T >, Eigen::Dynamic, 1 > log_softmax(const Eigen::Matrix< fvar< T >, Eigen::Dynamic, 1 > &alpha)
Definition: log_softmax.hpp:16
+ + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2log__sum__exp_8hpp.html b/doc/api/html/fwd_2mat_2fun_2log__sum__exp_8hpp.html new file mode 100644 index 00000000000..94b412ae89a --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2log__sum__exp_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/log_sum_exp.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_sum_exp.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T , int R, int C>
fvar< T > stan::math::log_sum_exp (const Eigen::Matrix< fvar< T >, R, C > &v)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2log__sum__exp_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2log__sum__exp_8hpp_source.html new file mode 100644 index 00000000000..37c2058e2e9 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2log__sum__exp_8hpp_source.html @@ -0,0 +1,159 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/log_sum_exp.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_sum_exp.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_LOG_SUM_EXP_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_LOG_SUM_EXP_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ + + + +
9 #include <vector>
+
10 
+
11 namespace stan {
+
12 
+
13  namespace math {
+
14 
+
15  // FIXME: cut-and-paste from fwd/log_sum_exp.hpp; should
+
16  // be able to generalize
+
17  template <typename T, int R, int C>
+
18  fvar<T>
+
19  log_sum_exp(const Eigen::Matrix<fvar<T>, R, C>& v) {
+ + +
22  using stan::math::exp;
+
23  using std::exp;
+
24  using stan::math::log;
+
25  using std::log;
+
26 
+
27  Eigen::Matrix<T, 1, Eigen::Dynamic> vals(v.size());
+
28  for (int i = 0; i < v.size(); ++i)
+
29  vals[i] = v(i).val_;
+
30  T deriv(0.0);
+
31  T denominator(0.0);
+
32  for (int i = 0; i < v.size(); ++i) {
+
33  T exp_vi = exp(vals[i]);
+
34  denominator += exp_vi;
+
35  deriv += v(i).d_ * exp_vi;
+
36  }
+
37  return fvar<T>(log_sum_exp(vals), deriv / denominator);
+
38  }
+
39 
+
40  }
+
41 }
+
42 #endif
+ + +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
fvar< T > log_sum_exp(const std::vector< fvar< T > > &v)
Definition: log_sum_exp.hpp:14
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2mdivide__left_8hpp.html b/doc/api/html/fwd_2mat_2fun_2mdivide__left_8hpp.html new file mode 100644 index 00000000000..eceb38039c8 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2mdivide__left_8hpp.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/mdivide_left.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
mdivide_left.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C2 > stan::math::mdivide_left (const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C2 > stan::math::mdivide_left (const Eigen::Matrix< double, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C2 > stan::math::mdivide_left (const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2mdivide__left_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2mdivide__left_8hpp_source.html new file mode 100644 index 00000000000..f60855c9c6d --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2mdivide__left_8hpp_source.html @@ -0,0 +1,252 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/mdivide_left.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
mdivide_left.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_MDIVIDE_LEFT_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_MDIVIDE_LEFT_HPP
+
3 
+ + + +
7 #include <stan/math/fwd/core.hpp>
+ + + + + + + + +
16 #include <vector>
+
17 
+
18 namespace stan {
+
19  namespace math {
+
20 
+
21  template <typename T, int R1, int C1, int R2, int C2>
+
22  inline
+
23  Eigen::Matrix<fvar<T>, R1, C2>
+
24  mdivide_left(const Eigen::Matrix<fvar<T>, R1, C1> &A,
+
25  const Eigen::Matrix<fvar<T>, R2, C2> &b) {
+ + +
28  stan::math::check_square("mdivide_left", "A", A);
+
29  stan::math::check_multiplicable("mdivide_left",
+
30  "A", A,
+
31  "b", b);
+
32 
+
33  Eigen::Matrix<T, R1, C2> inv_A_mult_b(A.rows(), b.cols());
+
34  Eigen::Matrix<T, R1, C2> inv_A_mult_deriv_b(A.rows(), b.cols());
+
35  Eigen::Matrix<T, R1, C1> inv_A_mult_deriv_A(A.rows(), A.cols());
+
36  Eigen::Matrix<T, R1, C1> val_A(A.rows(), A.cols());
+
37  Eigen::Matrix<T, R1, C1> deriv_A(A.rows(), A.cols());
+
38  Eigen::Matrix<T, R2, C2> val_b(b.rows(), b.cols());
+
39  Eigen::Matrix<T, R2, C2> deriv_b(b.rows(), b.cols());
+
40 
+
41  for (int j = 0; j < A.cols(); j++) {
+
42  for (int i = 0; i < A.rows(); i++) {
+
43  val_A(i, j) = A(i, j).val_;
+
44  deriv_A(i, j) = A(i, j).d_;
+
45  }
+
46  }
+
47 
+
48  for (int j = 0; j < b.cols(); j++) {
+
49  for (int i = 0; i < b.rows(); i++) {
+
50  val_b(i, j) = b(i, j).val_;
+
51  deriv_b(i, j) = b(i, j).d_;
+
52  }
+
53  }
+
54 
+
55  inv_A_mult_b = mdivide_left(val_A, val_b);
+
56  inv_A_mult_deriv_b = mdivide_left(val_A, deriv_b);
+
57  inv_A_mult_deriv_A = mdivide_left(val_A, deriv_A);
+
58 
+
59  Eigen::Matrix<T, R1, C2> deriv(A.rows(), b.cols());
+
60  deriv = inv_A_mult_deriv_b - multiply(inv_A_mult_deriv_A, inv_A_mult_b);
+
61 
+
62  return stan::math::to_fvar(inv_A_mult_b, deriv);
+
63  }
+
64 
+
65  template <typename T, int R1, int C1, int R2, int C2>
+
66  inline
+
67  Eigen::Matrix<fvar<T>, R1, C2>
+
68  mdivide_left(const Eigen::Matrix<double, R1, C1> &A,
+
69  const Eigen::Matrix<fvar<T>, R2, C2> &b) {
+ + +
72  stan::math::check_square("mdivide_left", "A", A);
+
73  stan::math::check_multiplicable("mdivide_left",
+
74  "A", A,
+
75  "b", b);
+
76 
+
77  Eigen::Matrix<T, R2, C2> val_b(b.rows(), b.cols());
+
78  Eigen::Matrix<T, R2, C2> deriv_b(b.rows(), b.cols());
+
79 
+
80  for (int j = 0; j < b.cols(); j++) {
+
81  for (int i = 0; i < b.rows(); i++) {
+
82  val_b(i, j) = b(i, j).val_;
+
83  deriv_b(i, j) = b(i, j).d_;
+
84  }
+
85  }
+
86 
+
87  return stan::math::to_fvar(mdivide_left(A, val_b),
+
88  mdivide_left(A, deriv_b));
+
89  }
+
90 
+
91  template <typename T, int R1, int C1, int R2, int C2>
+
92  inline
+
93  Eigen::Matrix<fvar<T>, R1, C2>
+
94  mdivide_left(const Eigen::Matrix<fvar<T>, R1, C1> &A,
+
95  const Eigen::Matrix<double, R2, C2> &b) {
+ + +
98  stan::math::check_square("mdivide_left", "A", A);
+
99  stan::math::check_multiplicable("mdivide_left",
+
100  "A", A,
+
101  "b", b);
+
102 
+
103  Eigen::Matrix<T, R1, C2>
+
104  inv_A_mult_b(A.rows(), b.cols());
+
105  Eigen::Matrix<T, R1, C1> inv_A_mult_deriv_A(A.rows(), A.cols());
+
106  Eigen::Matrix<T, R1, C1> val_A(A.rows(), A.cols());
+
107  Eigen::Matrix<T, R1, C1> deriv_A(A.rows(), A.cols());
+
108 
+
109  for (int j = 0; j < A.cols(); j++) {
+
110  for (int i = 0; i < A.rows(); i++) {
+
111  val_A(i, j) = A(i, j).val_;
+
112  deriv_A(i, j) = A(i, j).d_;
+
113  }
+
114  }
+
115 
+
116  inv_A_mult_b = mdivide_left(val_A, b);
+
117  inv_A_mult_deriv_A = mdivide_left(val_A, deriv_A);
+
118 
+
119  Eigen::Matrix<T, R1, C2> deriv(A.rows(), b.cols());
+
120  deriv = -multiply(inv_A_mult_deriv_A, inv_A_mult_b);
+
121 
+
122  return stan::math::to_fvar(inv_A_mult_b, deriv);
+
123  }
+
124  }
+
125 }
+
126 #endif
+
Eigen::Matrix< fvar< T >, R1, C2 > mdivide_left(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
+ + + + +
Eigen::Matrix< fvar< T >, R1, C1 > multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m, const fvar< T > &c)
Definition: multiply.hpp:20
+ +
fvar< T > to_fvar(const T &x)
Definition: to_fvar.hpp:16
+
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+ + + + +
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2mdivide__left__ldlt_8hpp.html b/doc/api/html/fwd_2mat_2fun_2mdivide__left__ldlt_8hpp.html new file mode 100644 index 00000000000..f7acbbbb521 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2mdivide__left__ldlt_8hpp.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/mdivide_left_ldlt.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
mdivide_left_ldlt.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<int R1, int C1, int R2, int C2, typename T2 >
Eigen::Matrix< fvar< T2 >, R1, C2 > stan::math::mdivide_left_ldlt (const stan::math::LDLT_factor< double, R1, C1 > &A, const Eigen::Matrix< fvar< T2 >, R2, C2 > &b)
 Returns the solution of the system Ax=b given an LDLT_factor of A. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2mdivide__left__ldlt_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2mdivide__left__ldlt_8hpp_source.html new file mode 100644 index 00000000000..0beb17d6a82 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2mdivide__left__ldlt_8hpp_source.html @@ -0,0 +1,155 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/mdivide_left_ldlt.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
mdivide_left_ldlt.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_MDIVIDE_LEFT_LDLT_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_MDIVIDE_LEFT_LDLT_HPP
+
3 
+ + + + + + +
10 #include <boost/math/tools/promotion.hpp>
+
11 
+
12 namespace stan {
+
13  namespace math {
+
14 
+
23  template <int R1, int C1, int R2, int C2, typename T2>
+
24  inline Eigen::Matrix<fvar<T2>, R1, C2>
+ +
26  const Eigen::Matrix<fvar<T2>, R2, C2> &b) {
+
27  stan::math::check_multiplicable("mdivide_left_ldlt",
+
28  "A", A,
+
29  "b", b);
+
30 
+
31  Eigen::Matrix<T2, R2, C2> b_val(b.rows(), b.cols());
+
32  Eigen::Matrix<T2, R2, C2> b_der(b.rows(), b.cols());
+
33  for (int i = 0; i < b.rows(); i++)
+
34  for (int j = 0; j < b.cols(); j++) {
+
35  b_val(i, j) = b(i, j).val_;
+
36  b_der(i, j) = b(i, j).d_;
+
37  }
+
38 
+
39  return to_fvar(mdivide_left_ldlt(A, b_val),
+
40  mdivide_left_ldlt(A, b_der));
+
41  }
+
42  }
+
43 }
+
44 #endif
+ + +
fvar< T > to_fvar(const T &x)
Definition: to_fvar.hpp:16
+ + +
Eigen::Matrix< fvar< T2 >, R1, C2 > mdivide_left_ldlt(const stan::math::LDLT_factor< double, R1, C1 > &A, const Eigen::Matrix< fvar< T2 >, R2, C2 > &b)
Returns the solution of the system Ax=b given an LDLT_factor of A.
+
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+ + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2mdivide__left__tri__low_8hpp.html b/doc/api/html/fwd_2mat_2fun_2mdivide__left__tri__low_8hpp.html new file mode 100644 index 00000000000..e306a79924f --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2mdivide__left__tri__low_8hpp.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/mdivide_left_tri_low.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
mdivide_left_tri_low.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C1 > stan::math::mdivide_left_tri_low (const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C1 > stan::math::mdivide_left_tri_low (const Eigen::Matrix< double, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C1 > stan::math::mdivide_left_tri_low (const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2mdivide__left__tri__low_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2mdivide__left__tri__low_8hpp_source.html new file mode 100644 index 00000000000..dc6c1af2396 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2mdivide__left__tri__low_8hpp_source.html @@ -0,0 +1,268 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/mdivide_left_tri_low.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
mdivide_left_tri_low.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_MDIVIDE_LEFT_TRI_LOW_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_MDIVIDE_LEFT_TRI_LOW_HPP
+
3 
+ + + + + + + + +
12 #include <stan/math/fwd/core.hpp>
+ +
14 #include <vector>
+
15 
+
16 namespace stan {
+
17  namespace math {
+
18 
+
19  template<typename T, int R1, int C1, int R2, int C2>
+
20  inline
+
21  Eigen::Matrix<fvar<T>, R1, C1>
+
22  mdivide_left_tri_low(const Eigen::Matrix<fvar<T>, R1, C1>& A,
+
23  const Eigen::Matrix<fvar<T>, R2, C2>& b) {
+ + +
26  stan::math::check_square("mdivide_left_tri_low", "A", A);
+
27  stan::math::check_multiplicable("mdivide_left_tri_low",
+
28  "A", A,
+
29  "b", b);
+
30 
+
31  Eigen::Matrix<T, R1, C2> inv_A_mult_b(A.rows(), b.cols());
+
32  Eigen::Matrix<T, R1, C2> inv_A_mult_deriv_b(A.rows(), b.cols());
+
33  Eigen::Matrix<T, R1, C1> inv_A_mult_deriv_A(A.rows(), A.cols());
+
34  Eigen::Matrix<T, R1, C1> val_A(A.rows(), A.cols());
+
35  Eigen::Matrix<T, R1, C1> deriv_A(A.rows(), A.cols());
+
36  Eigen::Matrix<T, R2, C2> val_b(b.rows(), b.cols());
+
37  Eigen::Matrix<T, R2, C2> deriv_b(b.rows(), b.cols());
+
38  val_A.setZero();
+
39  deriv_A.setZero();
+
40 
+
41  for (size_type j = 0; j < A.cols(); j++) {
+
42  for (size_type i = j; i < A.rows(); i++) {
+
43  val_A(i, j) = A(i, j).val_;
+
44  deriv_A(i, j) = A(i, j).d_;
+
45  }
+
46  }
+
47 
+
48  for (size_type j = 0; j < b.cols(); j++) {
+
49  for (size_type i = 0; i < b.rows(); i++) {
+
50  val_b(i, j) = b(i, j).val_;
+
51  deriv_b(i, j) = b(i, j).d_;
+
52  }
+
53  }
+
54 
+
55  inv_A_mult_b = mdivide_left(val_A, val_b);
+
56  inv_A_mult_deriv_b = mdivide_left(val_A, deriv_b);
+
57  inv_A_mult_deriv_A = mdivide_left(val_A, deriv_A);
+
58 
+
59  Eigen::Matrix<T, R1, C2> deriv(A.rows(), b.cols());
+
60  deriv = inv_A_mult_deriv_b - multiply(inv_A_mult_deriv_A, inv_A_mult_b);
+
61 
+
62  return stan::math::to_fvar(inv_A_mult_b, deriv);
+
63  }
+
64 
+
65  template<typename T, int R1, int C1, int R2, int C2>
+
66  inline
+
67  Eigen::Matrix<fvar<T>, R1, C1>
+
68  mdivide_left_tri_low(const Eigen::Matrix<double, R1, C1>& A,
+
69  const Eigen::Matrix<fvar<T>, R2, C2>& b) {
+ + +
72  stan::math::check_square("mdivide_left_tri_low", "A", A);
+
73  stan::math::check_multiplicable("mdivide_left_tri_low",
+
74  "A", A,
+
75  "b", b);
+
76 
+
77  Eigen::Matrix<T, R1, C2> inv_A_mult_b(A.rows(), b.cols());
+
78  Eigen::Matrix<T, R1, C2> inv_A_mult_deriv_b(A.rows(), b.cols());
+
79  Eigen::Matrix<T, R2, C2> val_b(b.rows(), b.cols());
+
80  Eigen::Matrix<T, R2, C2> deriv_b(b.rows(), b.cols());
+
81  Eigen::Matrix<double, R1, C1> val_A(A.rows(), A.cols());
+
82  val_A.setZero();
+
83 
+
84  for (size_type j = 0; j < A.cols(); j++) {
+
85  for (size_type i = j; i < A.rows(); i++) {
+
86  val_A(i, j) = A(i, j);
+
87  }
+
88  }
+
89 
+
90  for (size_type j = 0; j < b.cols(); j++) {
+
91  for (size_type i = 0; i < b.rows(); i++) {
+
92  val_b(i, j) = b(i, j).val_;
+
93  deriv_b(i, j) = b(i, j).d_;
+
94  }
+
95  }
+
96 
+
97  inv_A_mult_b = mdivide_left(val_A, val_b);
+
98  inv_A_mult_deriv_b = mdivide_left(val_A, deriv_b);
+
99 
+
100  Eigen::Matrix<T, R1, C2> deriv(A.rows(), b.cols());
+
101  deriv = inv_A_mult_deriv_b;
+
102 
+
103  return stan::math::to_fvar(inv_A_mult_b, deriv);
+
104  }
+
105 
+
106  template<typename T, int R1, int C1, int R2, int C2>
+
107  inline
+
108  Eigen::Matrix<fvar<T>, R1, C1>
+
109  mdivide_left_tri_low(const Eigen::Matrix<fvar<T>, R1, C1>& A,
+
110  const Eigen::Matrix<double, R2, C2>& b) {
+
111  using stan::math::multiply;
+ +
113  stan::math::check_square("mdivide_left_tri_low", "A", A);
+
114  stan::math::check_multiplicable("mdivide_left_tri_low",
+
115  "A", A,
+
116  "b", b);
+
117 
+
118  Eigen::Matrix<T, R1, C2> inv_A_mult_b(A.rows(), b.cols());
+
119  Eigen::Matrix<T, R1, C1> inv_A_mult_deriv_A(A.rows(), A.cols());
+
120  Eigen::Matrix<T, R1, C1> val_A(A.rows(), A.cols());
+
121  Eigen::Matrix<T, R1, C1> deriv_A(A.rows(), A.cols());
+
122  val_A.setZero();
+
123  deriv_A.setZero();
+
124 
+
125  for (size_type j = 0; j < A.cols(); j++) {
+
126  for (size_type i = j; i < A.rows(); i++) {
+
127  val_A(i, j) = A(i, j).val_;
+
128  deriv_A(i, j) = A(i, j).d_;
+
129  }
+
130  }
+
131 
+
132  inv_A_mult_b = mdivide_left(val_A, b);
+
133  inv_A_mult_deriv_A = mdivide_left(val_A, deriv_A);
+
134 
+
135  Eigen::Matrix<T, R1, C2> deriv(A.rows(), b.cols());
+
136  deriv = -multiply(inv_A_mult_deriv_A, inv_A_mult_b);
+
137 
+
138  return stan::math::to_fvar(inv_A_mult_b, deriv);
+
139  }
+
140  }
+
141 }
+
142 #endif
+
Eigen::Matrix< fvar< T >, R1, C2 > mdivide_left(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
+ + + +
Eigen::Matrix< fvar< T >, R1, C1 > multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m, const fvar< T > &c)
Definition: multiply.hpp:20
+ +
fvar< T > to_fvar(const T &x)
Definition: to_fvar.hpp:16
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+ + + +
Eigen::Matrix< fvar< T >, R1, C1 > mdivide_left_tri_low(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
+
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2mdivide__right_8hpp.html b/doc/api/html/fwd_2mat_2fun_2mdivide__right_8hpp.html new file mode 100644 index 00000000000..7c007224c39 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2mdivide__right_8hpp.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/mdivide_right.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
mdivide_right.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C2 > stan::math::mdivide_right (const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C2 > stan::math::mdivide_right (const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C2 > stan::math::mdivide_right (const Eigen::Matrix< double, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2mdivide__right_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2mdivide__right_8hpp_source.html new file mode 100644 index 00000000000..505aea3a021 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2mdivide__right_8hpp_source.html @@ -0,0 +1,253 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/mdivide_right.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
mdivide_right.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_MDIVIDE_RIGHT_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_MDIVIDE_RIGHT_HPP
+
3 
+ + + + + +
9 #include <stan/math/fwd/core.hpp>
+ + + + + + +
16 #include <vector>
+
17 
+
18 namespace stan {
+
19  namespace math {
+
20 
+
21  template <typename T, int R1, int C1, int R2, int C2>
+
22  inline
+
23  Eigen::Matrix<fvar<T>, R1, C2>
+
24  mdivide_right(const Eigen::Matrix<fvar<T>, R1, C1> &A,
+
25  const Eigen::Matrix<fvar<T>, R2, C2> &b) {
+ + +
28  stan::math::check_square("mdivide_right", "b", b);
+
29  stan::math::check_multiplicable("mdivide_right",
+
30  "A", A,
+
31  "b", b);
+
32 
+
33  Eigen::Matrix<T, R1, C2> A_mult_inv_b(A.rows(), b.cols());
+
34  Eigen::Matrix<T, R1, C2> deriv_A_mult_inv_b(A.rows(), b.cols());
+
35  Eigen::Matrix<T, R2, C2> deriv_b_mult_inv_b(b.rows(), b.cols());
+
36  Eigen::Matrix<T, R1, C1> val_A(A.rows(), A.cols());
+
37  Eigen::Matrix<T, R1, C1> deriv_A(A.rows(), A.cols());
+
38  Eigen::Matrix<T, R2, C2> val_b(b.rows(), b.cols());
+
39  Eigen::Matrix<T, R2, C2> deriv_b(b.rows(), b.cols());
+
40 
+
41  for (int j = 0; j < A.cols(); j++) {
+
42  for (int i = 0; i < A.rows(); i++) {
+
43  val_A(i, j) = A(i, j).val_;
+
44  deriv_A(i, j) = A(i, j).d_;
+
45  }
+
46  }
+
47 
+
48  for (int j = 0; j < b.cols(); j++) {
+
49  for (int i = 0; i < b.rows(); i++) {
+
50  val_b(i, j) = b(i, j).val_;
+
51  deriv_b(i, j) = b(i, j).d_;
+
52  }
+
53  }
+
54 
+
55  A_mult_inv_b = mdivide_right(val_A, val_b);
+
56  deriv_A_mult_inv_b = mdivide_right(deriv_A, val_b);
+
57  deriv_b_mult_inv_b = mdivide_right(deriv_b, val_b);
+
58 
+
59  Eigen::Matrix<T, R1, C2> deriv(A.rows(), b.cols());
+
60  deriv = deriv_A_mult_inv_b - multiply(A_mult_inv_b, deriv_b_mult_inv_b);
+
61 
+
62  return stan::math::to_fvar(A_mult_inv_b, deriv);
+
63  }
+
64 
+
65  template <typename T, int R1, int C1, int R2, int C2>
+
66  inline
+
67  Eigen::Matrix<fvar<T>, R1, C2>
+
68  mdivide_right(const Eigen::Matrix<fvar<T>, R1, C1> &A,
+
69  const Eigen::Matrix<double, R2, C2> &b) {
+ + +
72  stan::math::check_square("mdivide_right", "b", b);
+
73  stan::math::check_multiplicable("mdivide_right",
+
74  "A", A,
+
75  "b", b);
+
76 
+
77  Eigen::Matrix<T, R2, C2> deriv_b_mult_inv_b(b.rows(), b.cols());
+
78  Eigen::Matrix<T, R1, C1> val_A(A.rows(), A.cols());
+
79  Eigen::Matrix<T, R1, C1> deriv_A(A.rows(), A.cols());
+
80 
+
81  for (int j = 0; j < A.cols(); j++) {
+
82  for (int i = 0; i < A.rows(); i++) {
+
83  val_A(i, j) = A(i, j).val_;
+
84  deriv_A(i, j) = A(i, j).d_;
+
85  }
+
86  }
+
87 
+
88  return stan::math::to_fvar(mdivide_right(val_A, b),
+
89  mdivide_right(deriv_A, b));
+
90  }
+
91 
+
92  template <typename T, int R1, int C1, int R2, int C2>
+
93  inline
+
94  Eigen::Matrix<fvar<T>, R1, C2>
+
95  mdivide_right(const Eigen::Matrix<double, R1, C1> &A,
+
96  const Eigen::Matrix<fvar<T>, R2, C2> &b) {
+ + +
99  stan::math::check_square("mdivide_right", "b", b);
+
100  stan::math::check_multiplicable("mdivide_right",
+
101  "A", A,
+
102  "b", b);
+
103  Eigen::Matrix<T, R1, C2>
+
104  A_mult_inv_b(A.rows(), b.cols());
+
105  Eigen::Matrix<T, R2, C2> deriv_b_mult_inv_b(b.rows(), b.cols());
+
106  Eigen::Matrix<T, R2, C2> val_b(b.rows(), b.cols());
+
107  Eigen::Matrix<T, R2, C2> deriv_b(b.rows(), b.cols());
+
108 
+
109  for (int j = 0; j < b.cols(); j++) {
+
110  for (int i = 0; i < b.rows(); i++) {
+
111  val_b(i, j) = b(i, j).val_;
+
112  deriv_b(i, j) = b(i, j).d_;
+
113  }
+
114  }
+
115 
+
116  A_mult_inv_b = mdivide_right(A, val_b);
+
117  deriv_b_mult_inv_b = mdivide_right(deriv_b, val_b);
+
118 
+
119  Eigen::Matrix<T, R1, C2>
+
120  deriv(A.rows(), b.cols());
+
121  deriv = -multiply(A_mult_inv_b, deriv_b_mult_inv_b);
+
122 
+
123  return stan::math::to_fvar(A_mult_inv_b, deriv);
+
124  }
+
125  }
+
126 }
+
127 #endif
+ + + + +
Eigen::Matrix< fvar< T >, R1, C1 > multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m, const fvar< T > &c)
Definition: multiply.hpp:20
+ +
fvar< T > to_fvar(const T &x)
Definition: to_fvar.hpp:16
+
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+ + + + + +
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+
Eigen::Matrix< fvar< T >, R1, C2 > mdivide_right(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2mdivide__right__tri__low_8hpp.html b/doc/api/html/fwd_2mat_2fun_2mdivide__right__tri__low_8hpp.html new file mode 100644 index 00000000000..29fd3a373ee --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2mdivide__right__tri__low_8hpp.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/mdivide_right_tri_low.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
mdivide_right_tri_low.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C1 > stan::math::mdivide_right_tri_low (const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C2 > stan::math::mdivide_right_tri_low (const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C2 > stan::math::mdivide_right_tri_low (const Eigen::Matrix< double, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2mdivide__right__tri__low_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2mdivide__right__tri__low_8hpp_source.html new file mode 100644 index 00000000000..180f094613a --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2mdivide__right__tri__low_8hpp_source.html @@ -0,0 +1,264 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/mdivide_right_tri_low.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
mdivide_right_tri_low.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_MDIVIDE_RIGHT_TRI_LOW_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_MDIVIDE_RIGHT_TRI_LOW_HPP
+
3 
+ + + + + + + + + +
13 #include <stan/math/fwd/core.hpp>
+
14 #include <vector>
+
15 
+
16 namespace stan {
+
17  namespace math {
+
18 
+
19  template<typename T, int R1, int C1, int R2, int C2>
+
20  inline
+
21  Eigen::Matrix<fvar<T>, R1, C1>
+
22  mdivide_right_tri_low(const Eigen::Matrix<fvar<T>, R1, C1>& A,
+
23  const Eigen::Matrix<fvar<T>, R2, C2>& b) {
+ + +
26  stan::math::check_square("mdivide_right_tri_low", "b", b);
+
27  stan::math::check_multiplicable("mdivide_right_tri_low",
+
28  "A", A,
+
29  "b", b);
+
30 
+
31  Eigen::Matrix<T, R1, C2> A_mult_inv_b(A.rows(), b.cols());
+
32  Eigen::Matrix<T, R1, C2> deriv_A_mult_inv_b(A.rows(), b.cols());
+
33  Eigen::Matrix<T, R2, C2> deriv_b_mult_inv_b(b.rows(), b.cols());
+
34  Eigen::Matrix<T, R1, C1> val_A(A.rows(), A.cols());
+
35  Eigen::Matrix<T, R1, C1> deriv_A(A.rows(), A.cols());
+
36  Eigen::Matrix<T, R2, C2> val_b(b.rows(), b.cols());
+
37  Eigen::Matrix<T, R2, C2> deriv_b(b.rows(), b.cols());
+
38  val_b.setZero();
+
39  deriv_b.setZero();
+
40 
+
41  for (size_type j = 0; j < A.cols(); j++) {
+
42  for (size_type i = 0; i < A.rows(); i++) {
+
43  val_A(i, j) = A(i, j).val_;
+
44  deriv_A(i, j) = A(i, j).d_;
+
45  }
+
46  }
+
47 
+
48  for (size_type j = 0; j < b.cols(); j++) {
+
49  for (size_type i = j; i < b.rows(); i++) {
+
50  val_b(i, j) = b(i, j).val_;
+
51  deriv_b(i, j) = b(i, j).d_;
+
52  }
+
53  }
+
54 
+
55  A_mult_inv_b = mdivide_right(val_A, val_b);
+
56  deriv_A_mult_inv_b = mdivide_right(deriv_A, val_b);
+
57  deriv_b_mult_inv_b = mdivide_right(deriv_b, val_b);
+
58 
+
59  Eigen::Matrix<T, R1, C2> deriv(A.rows(), b.cols());
+
60  deriv = deriv_A_mult_inv_b - multiply(A_mult_inv_b, deriv_b_mult_inv_b);
+
61 
+
62  return stan::math::to_fvar(A_mult_inv_b, deriv);
+
63  }
+
64 
+
65  template <typename T, int R1, int C1, int R2, int C2>
+
66  inline
+
67  Eigen::Matrix<fvar<T>, R1, C2>
+
68  mdivide_right_tri_low(const Eigen::Matrix<fvar<T>, R1, C1> &A,
+
69  const Eigen::Matrix<double, R2, C2> &b) {
+ + +
72  stan::math::check_square("mdivide_right_tri_low", "b", b);
+
73  stan::math::check_multiplicable("mdivide_right_tri_low",
+
74  "A", A,
+
75  "b", b);
+
76 
+
77  Eigen::Matrix<T, R2, C2> deriv_b_mult_inv_b(b.rows(), b.cols());
+
78  Eigen::Matrix<T, R1, C1> val_A(A.rows(), A.cols());
+
79  Eigen::Matrix<T, R1, C1> deriv_A(A.rows(), A.cols());
+
80  Eigen::Matrix<T, R2, C2> val_b(b.rows(), b.cols());
+
81  val_b.setZero();
+
82 
+
83  for (int j = 0; j < A.cols(); j++) {
+
84  for (int i = 0; i < A.rows(); i++) {
+
85  val_A(i, j) = A(i, j).val_;
+
86  deriv_A(i, j) = A(i, j).d_;
+
87  }
+
88  }
+
89 
+
90  for (size_type j = 0; j < b.cols(); j++) {
+
91  for (size_type i = j; i < b.rows(); i++) {
+
92  val_b(i, j) = b(i, j);
+
93  }
+
94  }
+
95 
+
96  return stan::math::to_fvar(mdivide_right(val_A, val_b),
+
97  mdivide_right(deriv_A, val_b));
+
98  }
+
99 
+
100  template <typename T, int R1, int C1, int R2, int C2>
+
101  inline
+
102  Eigen::Matrix<fvar<T>, R1, C2>
+
103  mdivide_right_tri_low(const Eigen::Matrix<double, R1, C1> &A,
+
104  const Eigen::Matrix<fvar<T>, R2, C2> &b) {
+
105  using stan::math::multiply;
+ +
107  stan::math::check_square("mdivide_right_tri_low", "b", b);
+
108  stan::math::check_multiplicable("mdivide_right_tri_low",
+
109  "A", A,
+
110  "b", b);
+
111 
+
112  Eigen::Matrix<T, R1, C2>
+
113  A_mult_inv_b(A.rows(), b.cols());
+
114  Eigen::Matrix<T, R2, C2> deriv_b_mult_inv_b(b.rows(), b.cols());
+
115  Eigen::Matrix<T, R2, C2> val_b(b.rows(), b.cols());
+
116  Eigen::Matrix<T, R2, C2> deriv_b(b.rows(), b.cols());
+
117  val_b.setZero();
+
118  deriv_b.setZero();
+
119 
+
120  for (int j = 0; j < b.cols(); j++) {
+
121  for (int i = j; i < b.rows(); i++) {
+
122  val_b(i, j) = b(i, j).val_;
+
123  deriv_b(i, j) = b(i, j).d_;
+
124  }
+
125  }
+
126 
+
127  A_mult_inv_b = mdivide_right(A, val_b);
+
128  deriv_b_mult_inv_b = mdivide_right(deriv_b, val_b);
+
129 
+
130  Eigen::Matrix<T, R1, C2>
+
131  deriv(A.rows(), b.cols());
+
132  deriv = -multiply(A_mult_inv_b, deriv_b_mult_inv_b);
+
133 
+
134  return stan::math::to_fvar(A_mult_inv_b, deriv);
+
135  }
+
136  }
+
137 }
+
138 #endif
+ + + +
Eigen::Matrix< fvar< T >, R1, C1 > multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m, const fvar< T > &c)
Definition: multiply.hpp:20
+ +
fvar< T > to_fvar(const T &x)
Definition: to_fvar.hpp:16
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+ + + + +
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+
Eigen::Matrix< fvar< T >, R1, C2 > mdivide_right(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
+ + +
Eigen::Matrix< fvar< T >, R1, C1 > mdivide_right_tri_low(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2multiply_8hpp.html b/doc/api/html/fwd_2mat_2fun_2multiply_8hpp.html new file mode 100644 index 00000000000..af1b192ab3d --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2multiply_8hpp.html @@ -0,0 +1,170 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/multiply.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
multiply.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , int R1, int C1>
Eigen::Matrix< fvar< T >, R1, C1 > stan::math::multiply (const Eigen::Matrix< fvar< T >, R1, C1 > &m, const fvar< T > &c)
 
template<typename T , int R2, int C2>
Eigen::Matrix< fvar< T >, R2, C2 > stan::math::multiply (const Eigen::Matrix< fvar< T >, R2, C2 > &m, const double c)
 
template<typename T , int R1, int C1>
Eigen::Matrix< fvar< T >, R1, C1 > stan::math::multiply (const Eigen::Matrix< double, R1, C1 > &m, const fvar< T > &c)
 
template<typename T , int R1, int C1>
Eigen::Matrix< fvar< T >, R1, C1 > stan::math::multiply (const fvar< T > &c, const Eigen::Matrix< fvar< T >, R1, C1 > &m)
 
template<typename T , int R1, int C1>
Eigen::Matrix< fvar< T >, R1, C1 > stan::math::multiply (const double c, const Eigen::Matrix< fvar< T >, R1, C1 > &m)
 
template<typename T , int R1, int C1>
Eigen::Matrix< fvar< T >, R1, C1 > stan::math::multiply (const fvar< T > &c, const Eigen::Matrix< double, R1, C1 > &m)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C2 > stan::math::multiply (const Eigen::Matrix< fvar< T >, R1, C1 > &m1, const Eigen::Matrix< fvar< T >, R2, C2 > &m2)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C2 > stan::math::multiply (const Eigen::Matrix< fvar< T >, R1, C1 > &m1, const Eigen::Matrix< double, R2, C2 > &m2)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C2 > stan::math::multiply (const Eigen::Matrix< double, R1, C1 > &m1, const Eigen::Matrix< fvar< T >, R2, C2 > &m2)
 
template<typename T , int C1, int R2>
fvar< T > stan::math::multiply (const Eigen::Matrix< fvar< T >, 1, C1 > &rv, const Eigen::Matrix< fvar< T >, R2, 1 > &v)
 
template<typename T , int C1, int R2>
fvar< T > stan::math::multiply (const Eigen::Matrix< fvar< T >, 1, C1 > &rv, const Eigen::Matrix< double, R2, 1 > &v)
 
template<typename T , int C1, int R2>
fvar< T > stan::math::multiply (const Eigen::Matrix< double, 1, C1 > &rv, const Eigen::Matrix< fvar< T >, R2, 1 > &v)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2multiply_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2multiply_8hpp_source.html new file mode 100644 index 00000000000..e597e8809a8 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2multiply_8hpp_source.html @@ -0,0 +1,286 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/multiply.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
multiply.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_MULTIPLY_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_MULTIPLY_HPP
+
3 
+ + + +
7 #include <stan/math/fwd/core.hpp>
+ + + +
11 #include <boost/math/tools/promotion.hpp>
+
12 #include <vector>
+
13 
+
14 namespace stan {
+
15  namespace math {
+
16 
+
17  template<typename T, int R1, int C1>
+
18  inline
+
19  Eigen::Matrix<fvar<T>, R1, C1>
+
20  multiply(const Eigen::Matrix<fvar<T>, R1, C1>& m, const fvar<T>& c) {
+
21  Eigen::Matrix<fvar<T>, R1, C1> res(m.rows(), m.cols());
+
22  for (int i = 0; i < m.rows(); i++) {
+
23  for (int j = 0; j < m.cols(); j++)
+
24  res(i, j) = c * m(i, j);
+
25  }
+
26  return res;
+
27  }
+
28 
+
29  template<typename T, int R2, int C2>
+
30  inline
+
31  Eigen::Matrix<fvar<T>, R2, C2>
+
32  multiply(const Eigen::Matrix<fvar<T>, R2, C2>& m, const double c) {
+
33  Eigen::Matrix<fvar<T>, R2, C2> res(m.rows(), m.cols());
+
34  for (int i = 0; i < m.rows(); i++) {
+
35  for (int j = 0; j < m.cols(); j++)
+
36  res(i, j) = c * m(i, j);
+
37  }
+
38  return res;
+
39  }
+
40 
+
41  template<typename T, int R1, int C1>
+
42  inline
+
43  Eigen::Matrix<fvar<T>, R1, C1>
+
44  multiply(const Eigen::Matrix<double, R1, C1>& m, const fvar<T>& c) {
+
45  Eigen::Matrix<fvar<T>, R1, C1> res(m.rows(), m.cols());
+
46  for (int i = 0; i < m.rows(); i++) {
+
47  for (int j = 0; j < m.cols(); j++)
+
48  res(i, j) = c * m(i, j);
+
49  }
+
50  return res;
+
51  }
+
52 
+
53  template<typename T, int R1, int C1>
+
54  inline
+
55  Eigen::Matrix<fvar<T>, R1, C1>
+
56  multiply(const fvar<T>& c, const Eigen::Matrix<fvar<T>, R1, C1>& m) {
+
57  return multiply(m, c);
+
58  }
+
59 
+
60  template<typename T, int R1, int C1>
+
61  inline
+
62  Eigen::Matrix<fvar<T>, R1, C1>
+
63  multiply(const double c, const Eigen::Matrix<fvar<T>, R1, C1>& m) {
+
64  return multiply(m, c);
+
65  }
+
66 
+
67  template<typename T, int R1, int C1>
+
68  inline
+
69  Eigen::Matrix<fvar<T>, R1, C1>
+
70  multiply(const fvar<T>& c, const Eigen::Matrix<double, R1, C1>& m) {
+
71  return multiply(m, c);
+
72  }
+
73 
+
74  template<typename T, int R1, int C1, int R2, int C2>
+
75  inline
+
76  Eigen::Matrix<fvar<T>, R1, C2>
+
77  multiply(const Eigen::Matrix<fvar<T>, R1, C1>& m1,
+
78  const Eigen::Matrix<fvar<T>, R2, C2>& m2) {
+ +
80  "m1", m1,
+
81  "m2", m2);
+
82  Eigen::Matrix<fvar<T>, R1, C2> result(m1.rows(), m2.cols());
+
83  for (size_type i = 0; i < m1.rows(); i++) {
+
84  Eigen::Matrix<fvar<T>, 1, C1> crow = m1.row(i);
+
85  for (size_type j = 0; j < m2.cols(); j++) {
+
86  Eigen::Matrix<fvar<T>, R2, 1> ccol = m2.col(j);
+
87  result(i, j) = stan::math::dot_product(crow, ccol);
+
88  }
+
89  }
+
90  return result;
+
91  }
+
92 
+
93  template<typename T, int R1, int C1, int R2, int C2>
+
94  inline
+
95  Eigen::Matrix<fvar<T>, R1, C2>
+
96  multiply(const Eigen::Matrix<fvar<T>, R1, C1>& m1,
+
97  const Eigen::Matrix<double, R2, C2>& m2) {
+ +
99  "m1", m1,
+
100  "m2", m2);
+
101  Eigen::Matrix<fvar<T>, R1, C2> result(m1.rows(), m2.cols());
+
102  for (size_type i = 0; i < m1.rows(); i++) {
+
103  Eigen::Matrix<fvar<T>, 1, C1> crow = m1.row(i);
+
104  for (size_type j = 0; j < m2.cols(); j++) {
+
105  Eigen::Matrix<double, R2, 1> ccol = m2.col(j);
+
106  result(i, j) = stan::math::dot_product(crow, ccol);
+
107  }
+
108  }
+
109  return result;
+
110  }
+
111 
+
112  template<typename T, int R1, int C1, int R2, int C2>
+
113  inline
+
114  Eigen::Matrix<fvar<T>, R1, C2>
+
115  multiply(const Eigen::Matrix<double, R1, C1>& m1,
+
116  const Eigen::Matrix<fvar<T>, R2, C2>& m2) {
+ +
118  "m1", m1,
+
119  "m2", m2);
+
120  Eigen::Matrix<fvar<T>, R1, C2> result(m1.rows(), m2.cols());
+
121  for (size_type i = 0; i < m1.rows(); i++) {
+
122  Eigen::Matrix<double, 1, C1> crow = m1.row(i);
+
123  for (size_type j = 0; j < m2.cols(); j++) {
+
124  Eigen::Matrix<fvar<T>, R2, 1> ccol = m2.col(j);
+
125  result(i, j) = stan::math::dot_product(crow, ccol);
+
126  }
+
127  }
+
128  return result;
+
129  }
+
130 
+
131  template <typename T, int C1, int R2>
+
132  inline
+
133  fvar<T>
+
134  multiply(const Eigen::Matrix<fvar<T>, 1, C1>& rv,
+
135  const Eigen::Matrix<fvar<T>, R2, 1>& v) {
+
136  if (rv.size() != v.size())
+
137  throw std::domain_error("row vector and vector must be same length "
+
138  "in multiply");
+
139  return dot_product(rv, v);
+
140  }
+
141 
+
142  template <typename T, int C1, int R2>
+
143  inline
+
144  fvar<T>
+
145  multiply(const Eigen::Matrix<fvar<T>, 1, C1>& rv,
+
146  const Eigen::Matrix<double, R2, 1>& v) {
+
147  if (rv.size() != v.size())
+
148  throw std::domain_error("row vector and vector must be same length "
+
149  "in multiply");
+
150  return dot_product(rv, v);
+
151  }
+
152 
+
153  template <typename T, int C1, int R2>
+
154  inline
+
155  fvar<T>
+
156  multiply(const Eigen::Matrix<double, 1, C1>& rv,
+
157  const Eigen::Matrix<fvar<T>, R2, 1>& v) {
+
158  if (rv.size() != v.size())
+
159  throw std::domain_error("row vector and vector must be same length "
+
160  "in multiply");
+
161  return dot_product(rv, v);
+
162  }
+
163  }
+
164 }
+
165 #endif
+ + + +
Eigen::Matrix< fvar< T >, R1, C1 > multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m, const fvar< T > &c)
Definition: multiply.hpp:20
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+ +
fvar< T > dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
Definition: dot_product.hpp:20
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2multiply__lower__tri__self__transpose_8hpp.html b/doc/api/html/fwd_2mat_2fun_2multiply__lower__tri__self__transpose_8hpp.html new file mode 100644 index 00000000000..3481749f4b6 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2multiply__lower__tri__self__transpose_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/multiply_lower_tri_self_transpose.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
multiply_lower_tri_self_transpose.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, R, R > stan::math::multiply_lower_tri_self_transpose (const Eigen::Matrix< fvar< T >, R, C > &m)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2multiply__lower__tri__self__transpose_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2multiply__lower__tri__self__transpose_8hpp_source.html new file mode 100644 index 00000000000..cd4dfe9305e --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2multiply__lower__tri__self__transpose_8hpp_source.html @@ -0,0 +1,151 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/multiply_lower_tri_self_transpose.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
multiply_lower_tri_self_transpose.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_MULTIPLY_LOWER_TRI_SELF_TRANSPOSE_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_MULTIPLY_LOWER_TRI_SELF_TRANSPOSE_HPP
+
3 
+ + + + + +
9 #include <vector>
+
10 
+
11 namespace stan {
+
12  namespace math {
+
13 
+
14  template<typename T, int R, int C>
+
15  inline
+
16  Eigen::Matrix<fvar<T>, R, R>
+
17  multiply_lower_tri_self_transpose(const Eigen::Matrix<fvar<T>, R, C>& m) {
+
18  if (m.rows() == 0)
+
19  return Eigen::Matrix<fvar<T>, R, R>(0, 0);
+
20  Eigen::Matrix<fvar<T>, R, C> L(m.rows(), m.cols());
+
21  L.setZero();
+
22 
+
23  for (size_type i = 0; i < m.rows(); i++) {
+
24  for (size_type j = 0; (j < i + 1) && (j < m.cols()); j++)
+
25  L(i, j) = m(i, j);
+
26  }
+
27 
+ +
29  }
+
30 
+
31  }
+
32 }
+
33 #endif
+ +
Eigen::Matrix< fvar< T >, R1, C1 > multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m, const fvar< T > &c)
Definition: multiply.hpp:20
+ + +
Eigen::Matrix< fvar< T >, R, R > multiply_lower_tri_self_transpose(const Eigen::Matrix< fvar< T >, R, C > &m)
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+ +
Eigen::Matrix< T, C, R > transpose(const Eigen::Matrix< T, R, C > &m)
Definition: transpose.hpp:12
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2qr___q_8hpp.html b/doc/api/html/fwd_2mat_2fun_2qr___q_8hpp.html new file mode 100644 index 00000000000..3c778bf7077 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2qr___q_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/qr_Q.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
qr_Q.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
Eigen::Matrix< fvar< T >
+, Eigen::Dynamic,
+Eigen::Dynamic > 
stan::math::qr_Q (const Eigen::Matrix< fvar< T >, Eigen::Dynamic, Eigen::Dynamic > &m)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2qr___q_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2qr___q_8hpp_source.html new file mode 100644 index 00000000000..d68116e5bd9 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2qr___q_8hpp_source.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/qr_Q.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
qr_Q.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_QR_Q_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_QR_Q_HPP
+
3 
+ +
5 #include <Eigen/QR>
+ + +
8 #include <stan/math/fwd/core.hpp>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
13  template <typename T>
+
14  Eigen::Matrix<fvar<T>, Eigen::Dynamic, Eigen::Dynamic>
+
15  qr_Q(const Eigen::Matrix<fvar<T>, Eigen::Dynamic, Eigen::Dynamic>& m) {
+
16  typedef Eigen::Matrix<fvar<T>, Eigen::Dynamic, Eigen::Dynamic>
+
17  matrix_fwd_t;
+
18  stan::math::check_nonzero_size("qr_Q", "m", m);
+
19  stan::math::check_greater_or_equal("qr_Q", "m.rows()", m.rows(),
+
20  m.cols());
+
21  Eigen::HouseholderQR< matrix_fwd_t > qr(m.rows(), m.cols());
+
22  qr.compute(m);
+
23  matrix_fwd_t Q = qr.householderQ();
+
24  for (int i = 0; i < m.cols(); i++)
+
25  if (qr.matrixQR()(i, i) < 0.0)
+
26  Q.col(i) *= -1.0;
+
27  return Q;
+
28  }
+
29  }
+
30 }
+
31 #endif
+
bool check_greater_or_equal(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is greater or equal than low.
+ +
Eigen::Matrix< fvar< T >, Eigen::Dynamic, Eigen::Dynamic > qr_Q(const Eigen::Matrix< fvar< T >, Eigen::Dynamic, Eigen::Dynamic > &m)
Definition: qr_Q.hpp:15
+
bool check_nonzero_size(const char *function, const char *name, const T_y &y)
Return true if the specified matrix/vector is of non-zero size.
+ + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2qr___r_8hpp.html b/doc/api/html/fwd_2mat_2fun_2qr___r_8hpp.html new file mode 100644 index 00000000000..8daaef0279a --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2qr___r_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/qr_R.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
qr_R.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
Eigen::Matrix< fvar< T >
+, Eigen::Dynamic,
+Eigen::Dynamic > 
stan::math::qr_R (const Eigen::Matrix< fvar< T >, Eigen::Dynamic, Eigen::Dynamic > &m)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2qr___r_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2qr___r_8hpp_source.html new file mode 100644 index 00000000000..2dc8ea146ea --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2qr___r_8hpp_source.html @@ -0,0 +1,150 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/qr_R.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
qr_R.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_QR_R_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_QR_R_HPP
+
3 
+ +
5 #include <Eigen/QR>
+ + +
8 #include <stan/math/fwd/core.hpp>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
13  template <typename T>
+
14  Eigen::Matrix<fvar<T>, Eigen::Dynamic, Eigen::Dynamic>
+
15  qr_R(const Eigen::Matrix<fvar<T>, Eigen::Dynamic, Eigen::Dynamic>& m) {
+
16  typedef Eigen::Matrix<fvar<T>, Eigen::Dynamic, Eigen::Dynamic>
+
17  matrix_fwd_t;
+
18  stan::math::check_nonzero_size("qr_R", "m", m);
+
19  stan::math::check_greater_or_equal("qr_R", "m.rows()", m.rows(),
+
20  m.cols());
+
21  Eigen::HouseholderQR< matrix_fwd_t > qr(m.rows(), m.cols());
+
22  qr.compute(m);
+
23  matrix_fwd_t R = qr.matrixQR().topLeftCorner(m.rows(), m.cols());
+
24  for (int i = 0; i < R.rows(); i++) {
+
25  for (int j = 0; j < i; j++)
+
26  R(i, j) = 0.0;
+
27  if (i < R.cols() && R(i, i) < 0.0)
+
28  R.row(i) *= -1.0;
+
29  }
+
30  return R;
+
31  }
+
32  }
+
33 }
+
34 #endif
+
bool check_greater_or_equal(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is greater or equal than low.
+ +
Eigen::Matrix< fvar< T >, Eigen::Dynamic, Eigen::Dynamic > qr_R(const Eigen::Matrix< fvar< T >, Eigen::Dynamic, Eigen::Dynamic > &m)
Definition: qr_R.hpp:15
+
bool check_nonzero_size(const char *function, const char *name, const T_y &y)
Return true if the specified matrix/vector is of non-zero size.
+ + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2quad__form__sym_8hpp.html b/doc/api/html/fwd_2mat_2fun_2quad__form__sym_8hpp.html new file mode 100644 index 00000000000..d0f1d6ab667 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2quad__form__sym_8hpp.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/quad_form_sym.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
quad_form_sym.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + +

+Functions

template<int RA, int CA, int RB, int CB, typename T >
Eigen::Matrix< fvar< T >, CB, CB > stan::math::quad_form_sym (const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< double, RB, CB > &B)
 
template<int RA, int CA, int RB, typename T >
fvar< T > stan::math::quad_form_sym (const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< double, RB, 1 > &B)
 
template<int RA, int CA, int RB, int CB, typename T >
Eigen::Matrix< fvar< T >, CB, CB > stan::math::quad_form_sym (const Eigen::Matrix< double, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, CB > &B)
 
template<int RA, int CA, int RB, typename T >
fvar< T > stan::math::quad_form_sym (const Eigen::Matrix< double, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, 1 > &B)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2quad__form__sym_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2quad__form__sym_8hpp_source.html new file mode 100644 index 00000000000..87a08457cb6 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2quad__form__sym_8hpp_source.html @@ -0,0 +1,186 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/quad_form_sym.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
quad_form_sym.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_QUAD_FORM_SYM_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_QUAD_FORM_SYM_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ + + +
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
12  template<int RA, int CA, int RB, int CB, typename T>
+
13  inline Eigen::Matrix<fvar<T>, CB, CB>
+
14  quad_form_sym(const Eigen::Matrix<fvar<T>, RA, CA>& A,
+
15  const Eigen::Matrix<double, RB, CB>& B) {
+
16  check_square("quad_form_sym", "A", A);
+
17  check_multiplicable("quad_form_sym",
+
18  "A", A,
+
19  "B", B);
+
20  check_symmetric("quad_form_sym", "A", A);
+
21  Eigen::Matrix<fvar<T>, CB, CB>
+
22  ret(multiply(transpose(B), multiply(A, B)));
+
23  return T(0.5) * (ret + transpose(ret));
+
24  }
+
25 
+
26  template<int RA, int CA, int RB, typename T>
+
27  inline fvar<T>
+
28  quad_form_sym(const Eigen::Matrix<fvar<T>, RA, CA>& A,
+
29  const Eigen::Matrix<double, RB, 1>& B) {
+
30  check_square("quad_form_sym", "A", A);
+
31  check_multiplicable("quad_form_sym",
+
32  "A", A,
+
33  "B", B);
+
34  check_symmetric("quad_form_sym", "A", A);
+
35  return dot_product(B, multiply(A, B));
+
36  }
+
37  template<int RA, int CA, int RB, int CB, typename T>
+
38  inline Eigen::Matrix<fvar<T>, CB, CB>
+
39  quad_form_sym(const Eigen::Matrix<double, RA, CA>& A,
+
40  const Eigen::Matrix<fvar<T>, RB, CB>& B) {
+
41  check_square("quad_form_sym", "A", A);
+
42  check_multiplicable("quad_form_sym",
+
43  "A", A,
+
44  "B", B);
+
45  check_symmetric("quad_form_sym", "A", A);
+
46  Eigen::Matrix<fvar<T>, CB, CB>
+
47  ret(multiply(transpose(B), multiply(A, B)));
+
48  return T(0.5) * (ret + transpose(ret));
+
49  }
+
50 
+
51  template<int RA, int CA, int RB, typename T>
+
52  inline fvar<T>
+
53  quad_form_sym(const Eigen::Matrix<double, RA, CA>& A,
+
54  const Eigen::Matrix<fvar<T>, RB, 1>& B) {
+
55  check_square("quad_form_sym", "A", A);
+
56  check_multiplicable("quad_form_sym",
+
57  "A", A,
+
58  "B", B);
+
59  check_symmetric("quad_form_sym", "A", A);
+
60  return dot_product(B, multiply(A, B));
+
61  }
+
62  }
+
63 }
+
64 
+
65 #endif
+
66 
+ +
Eigen::Matrix< fvar< T >, R1, C1 > multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m, const fvar< T > &c)
Definition: multiply.hpp:20
+
bool check_symmetric(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is symmetric.
+ + +
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+ +
fvar< T > dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
Definition: dot_product.hpp:20
+
Eigen::Matrix< fvar< T >, CB, CB > quad_form_sym(const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< double, RB, CB > &B)
+
Eigen::Matrix< T, C, R > transpose(const Eigen::Matrix< T, R, C > &m)
Definition: transpose.hpp:12
+
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2rows__dot__product_8hpp.html b/doc/api/html/fwd_2mat_2fun_2rows__dot__product_8hpp.html new file mode 100644 index 00000000000..cd460da7b90 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2rows__dot__product_8hpp.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/rows_dot_product.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
rows_dot_product.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, 1 > stan::math::rows_dot_product (const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, 1 > stan::math::rows_dot_product (const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, 1 > stan::math::rows_dot_product (const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2rows__dot__product_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2rows__dot__product_8hpp_source.html new file mode 100644 index 00000000000..ae395b35840 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2rows__dot__product_8hpp_source.html @@ -0,0 +1,186 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/rows_dot_product.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
rows_dot_product.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_ROWS_DOT_PRODUCT_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_ROWS_DOT_PRODUCT_HPP
+
3 
+ + + + + +
9 #include <stan/math/fwd/core.hpp>
+
10 #include <vector>
+
11 
+
12 namespace stan {
+
13  namespace math {
+
14 
+
15  template<typename T, int R1, int C1, int R2, int C2>
+
16  inline
+
17  Eigen::Matrix<fvar<T>, R1, 1>
+
18  rows_dot_product(const Eigen::Matrix<fvar<T>, R1, C1>& v1,
+
19  const Eigen::Matrix<fvar<T>, R2, C2>& v2) {
+
20  stan::math::check_matching_dims("rows_dot_product",
+
21  "v1", v1,
+
22  "v2", v2);
+
23  Eigen::Matrix<fvar<T>, R1, 1> ret(v1.rows(), 1);
+
24  for (size_type j = 0; j < v1.rows(); ++j) {
+
25  Eigen::Matrix<fvar<T>, R1, C1> crow1 = v1.row(j);
+
26  Eigen::Matrix<fvar<T>, R2, C2> crow2 = v2.row(j);
+
27  ret(j, 0) = dot_product(crow1, crow2);
+
28  }
+
29  return ret;
+
30  }
+
31 
+
32  template<typename T, int R1, int C1, int R2, int C2>
+
33  inline
+
34  Eigen::Matrix<fvar<T>, R1, 1>
+
35  rows_dot_product(const Eigen::Matrix<double, R1, C1>& v1,
+
36  const Eigen::Matrix<fvar<T>, R2, C2>& v2) {
+
37  stan::math::check_matching_dims("rows_dot_product",
+
38  "v1", v1,
+
39  "v2", v2);
+
40  Eigen::Matrix<fvar<T>, R1, 1> ret(v1.rows(), 1);
+
41  for (size_type j = 0; j < v1.rows(); ++j) {
+
42  Eigen::Matrix<double, R1, C1> crow = v1.row(j);
+
43  Eigen::Matrix<fvar<T>, R2, C2> crow2 = v2.row(j);
+
44  ret(j, 0) = dot_product(crow, crow2);
+
45  }
+
46  return ret;
+
47  }
+
48 
+
49  template<typename T, int R1, int C1, int R2, int C2>
+
50  inline
+
51  Eigen::Matrix<fvar<T>, R1, 1>
+
52  rows_dot_product(const Eigen::Matrix<fvar<T>, R1, C1>& v1,
+
53  const Eigen::Matrix<double, R2, C2>& v2) {
+
54  stan::math::check_matching_dims("rows_dot_product",
+
55  "v1", v1,
+
56  "v2", v2);
+
57  Eigen::Matrix<fvar<T>, R1, 1> ret(v1.rows(), 1);
+
58  for (size_type j = 0; j < v1.rows(); ++j) {
+
59  Eigen::Matrix<fvar<T>, R1, C1> crow1 = v1.row(j);
+
60  Eigen::Matrix<double, R2, C2> crow = v2.row(j);
+
61  ret(j, 0) = dot_product(crow1, crow);
+
62  }
+
63  return ret;
+
64  }
+
65  }
+
66 }
+
67 #endif
+ + + +
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
bool check_matching_dims(const char *function, const char *name1, const Eigen::Matrix< T1, R1, C1 > &y1, const char *name2, const Eigen::Matrix< T2, R2, C2 > &y2)
Return true if the two matrices are of the same size.
+ +
fvar< T > dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
Definition: dot_product.hpp:20
+ +
Eigen::Matrix< fvar< T >, R1, 1 > rows_dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2rows__dot__self_8hpp.html b/doc/api/html/fwd_2mat_2fun_2rows__dot__self_8hpp.html new file mode 100644 index 00000000000..532ef40b79f --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2rows__dot__self_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/rows_dot_self.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
rows_dot_self.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, R, 1 > stan::math::rows_dot_self (const Eigen::Matrix< fvar< T >, R, C > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2rows__dot__self_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2rows__dot__self_8hpp_source.html new file mode 100644 index 00000000000..140bc248e3d --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2rows__dot__self_8hpp_source.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/rows_dot_self.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
rows_dot_self.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_ROWS_DOT_SELF_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_ROWS_DOT_SELF_HPP
+
3 
+ + +
6 #include <stan/math/fwd/core.hpp>
+ +
8 #include <vector>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
13  template<typename T, int R, int C>
+
14  inline Eigen::Matrix<fvar<T>, R, 1>
+
15  rows_dot_self(const Eigen::Matrix<fvar<T>, R, C>& x) {
+
16  Eigen::Matrix<fvar<T>, R, 1> ret(x.rows(), 1);
+
17  for (size_type i = 0; i < x.rows(); i++) {
+
18  Eigen::Matrix<fvar<T>, 1, C> crow = x.row(i);
+
19  ret(i, 0) = dot_self(crow);
+
20  }
+
21  return ret;
+
22  }
+
23  }
+
24 }
+
25 #endif
+ +
Eigen::Matrix< fvar< T >, R, 1 > rows_dot_self(const Eigen::Matrix< fvar< T >, R, C > &x)
+
fvar< T > dot_self(const Eigen::Matrix< fvar< T >, R, C > &v)
Definition: dot_self.hpp:16
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+ + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2softmax_8hpp.html b/doc/api/html/fwd_2mat_2fun_2softmax_8hpp.html new file mode 100644 index 00000000000..b66055400f4 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2softmax_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/softmax.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
softmax.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
Eigen::Matrix< fvar< T >
+, Eigen::Dynamic, 1 > 
stan::math::softmax (const Eigen::Matrix< fvar< T >, Eigen::Dynamic, 1 > &alpha)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2softmax_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2softmax_8hpp_source.html new file mode 100644 index 00000000000..2ed8b0ddbdc --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2softmax_8hpp_source.html @@ -0,0 +1,171 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/softmax.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
softmax.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_SOFTMAX_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_SOFTMAX_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ + +
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  template <typename T>
+
12  inline
+
13  Eigen::Matrix<fvar<T>, Eigen::Dynamic, 1>
+
14  softmax(const Eigen::Matrix<fvar<T>, Eigen::Dynamic, 1>& alpha) {
+
15  using stan::math::softmax;
+
16  using Eigen::Matrix;
+
17  using Eigen::Dynamic;
+
18 
+
19  Matrix<T, Dynamic, 1> alpha_t(alpha.size());
+
20  for (int k = 0; k < alpha.size(); ++k)
+
21  alpha_t(k) = alpha(k).val_;
+
22 
+
23  Matrix<T, Dynamic, 1> softmax_alpha_t = softmax(alpha_t);
+
24 
+
25  Matrix<fvar<T>, Dynamic, 1> softmax_alpha(alpha.size());
+
26  for (int k = 0; k < alpha.size(); ++k) {
+
27  softmax_alpha(k).val_ = softmax_alpha_t(k);
+
28  softmax_alpha(k).d_ = 0;
+
29  }
+
30 
+
31  // for each input position
+
32  for (int m = 0; m < alpha.size(); ++m) {
+
33  // for each output position
+
34  T negative_alpha_m_d_times_softmax_alpha_t_m
+
35  = - alpha(m).d_ * softmax_alpha_t(m);
+
36  for (int k = 0; k < alpha.size(); ++k) {
+
37  // chain from input to output
+
38  if (m == k) {
+
39  softmax_alpha(k).d_
+
40  += softmax_alpha_t(k)
+
41  * (alpha(m).d_
+
42  + negative_alpha_m_d_times_softmax_alpha_t_m);
+
43  } else {
+
44  softmax_alpha(k).d_
+
45  += negative_alpha_m_d_times_softmax_alpha_t_m
+
46  * softmax_alpha_t(k);
+
47  }
+
48  }
+
49  }
+
50 
+
51  return softmax_alpha;
+
52  }
+
53 
+
54 
+
55  }
+
56 }
+
57 
+
58 #endif
+ +
Eigen::Matrix< fvar< T >, Eigen::Dynamic, 1 > softmax(const Eigen::Matrix< fvar< T >, Eigen::Dynamic, 1 > &alpha)
Definition: softmax.hpp:14
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2sort__asc_8hpp.html b/doc/api/html/fwd_2mat_2fun_2sort__asc_8hpp.html new file mode 100644 index 00000000000..b1d4dfce29e --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2sort__asc_8hpp.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/sort_asc.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
sort_asc.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <algorithm>
+#include <functional>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<typename T >
std::vector< fvar< T > > stan::math::sort_asc (std::vector< fvar< T > > xs)
 
template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, R, C > stan::math::sort_asc (Eigen::Matrix< fvar< T >, R, C > xs)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2sort__asc_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2sort__asc_8hpp_source.html new file mode 100644 index 00000000000..9d9afd71dc2 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2sort__asc_8hpp_source.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/sort_asc.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
sort_asc.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_SORT_ASC_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_SORT_ASC_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ +
6 #include <algorithm> // std::sort
+
7 #include <functional> // std::greater
+
8 #include <vector>
+
9 
+
10 namespace stan {
+
11 
+
12  namespace math {
+
13 
+
14  template <typename T>
+
15  inline
+
16  std::vector< fvar<T> >
+
17  sort_asc(std::vector< fvar<T> > xs) {
+
18  std::sort(xs.begin(), xs.end());
+
19  return xs;
+
20  }
+
21 
+
22  template <typename T, int R, int C>
+
23  inline
+
24  typename Eigen::Matrix<fvar<T>, R, C>
+
25  sort_asc(Eigen::Matrix<fvar<T>, R, C> xs) {
+
26  std::sort(xs.data(), xs.data()+xs.size());
+
27  return xs;
+
28  }
+
29 
+
30  }
+
31 }
+
32 #endif
+ + +
std::vector< fvar< T > > sort_asc(std::vector< fvar< T > > xs)
Definition: sort_asc.hpp:17
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2sort__desc_8hpp.html b/doc/api/html/fwd_2mat_2fun_2sort__desc_8hpp.html new file mode 100644 index 00000000000..2a9c4b6340b --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2sort__desc_8hpp.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/sort_desc.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
sort_desc.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <algorithm>
+#include <functional>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<typename T >
std::vector< fvar< T > > stan::math::sort_desc (std::vector< fvar< T > > xs)
 
template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, R, C > stan::math::sort_desc (Eigen::Matrix< fvar< T >, R, C > xs)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2sort__desc_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2sort__desc_8hpp_source.html new file mode 100644 index 00000000000..b50a3fbe2de --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2sort__desc_8hpp_source.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/sort_desc.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
sort_desc.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_SORT_DESC_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_SORT_DESC_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ +
6 #include <algorithm> // std::sort
+
7 #include <functional> // std::greater
+
8 #include <vector>
+
9 
+
10 namespace stan {
+
11 
+
12  namespace math {
+
13 
+
14  template <typename T>
+
15  inline
+
16  std::vector< fvar<T> >
+
17  sort_desc(std::vector< fvar<T> > xs) {
+
18  std::sort(xs.begin(), xs.end(), std::greater< fvar<T> >());
+
19  return xs;
+
20  }
+
21 
+
22  template <typename T, int R, int C>
+
23  inline
+
24  typename Eigen::Matrix<fvar<T>, R, C>
+
25  sort_desc(Eigen::Matrix<fvar<T>, R, C> xs) {
+
26  std::sort(xs.data(), xs.data()+xs.size(), std::greater< fvar<T> >());
+
27  return xs;
+
28  }
+
29 
+
30  }
+
31 }
+
32 #endif
+ +
std::vector< fvar< T > > sort_desc(std::vector< fvar< T > > xs)
Definition: sort_desc.hpp:17
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2sum_8hpp.html b/doc/api/html/fwd_2mat_2fun_2sum_8hpp.html new file mode 100644 index 00000000000..0db74ddca57 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2sum_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/sum.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
sum.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T , int R, int C>
fvar< T > stan::math::sum (const Eigen::Matrix< fvar< T >, R, C > &m)
 Return the sum of the entries of the specified matrix. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2sum_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2sum_8hpp_source.html new file mode 100644 index 00000000000..d17b7750509 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2sum_8hpp_source.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/sum.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
sum.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_SUM_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_SUM_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ + +
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
20  template <typename T, int R, int C>
+
21  inline fvar<T> sum(const Eigen::Matrix<fvar<T>, R, C>& m) {
+
22  using stan::math::sum;
+
23  if (m.size() == 0)
+
24  return 0.0;
+
25  Eigen::Matrix<T, Eigen::Dynamic, 1> vals(m.size());
+
26  Eigen::Matrix<T, Eigen::Dynamic, 1> tans(m.size());
+
27  for (int i = 0; i < m.size(); ++i) {
+
28  vals(i) = m(i).val();
+
29  tans(i) = m(i).tangent();
+
30  }
+
31  return fvar<T>(sum(vals), sum(tans));
+
32  }
+
33 
+
34  }
+
35 }
+
36 #endif
+
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+ + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2tcrossprod_8hpp.html b/doc/api/html/fwd_2mat_2fun_2tcrossprod_8hpp.html new file mode 100644 index 00000000000..032bce23380 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2tcrossprod_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/tcrossprod.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
tcrossprod.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, R, R > stan::math::tcrossprod (const Eigen::Matrix< fvar< T >, R, C > &m)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2tcrossprod_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2tcrossprod_8hpp_source.html new file mode 100644 index 00000000000..0aea4cdb3d4 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2tcrossprod_8hpp_source.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/tcrossprod.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
tcrossprod.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_TCROSSPROD_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_TCROSSPROD_HPP
+
3 
+ + + + + +
9 #include <vector>
+
10 
+
11 namespace stan {
+
12  namespace math {
+
13 
+
14  template<typename T, int R, int C>
+
15  inline
+
16  Eigen::Matrix<fvar<T>, R, R>
+
17  tcrossprod(const Eigen::Matrix<fvar<T>, R, C>& m) {
+
18  if (m.rows() == 0)
+
19  return Eigen::Matrix<fvar<T>, R, R>(0, 0);
+ +
21  }
+
22 
+
23  }
+
24 }
+
25 #endif
+ +
Eigen::Matrix< fvar< T >, R1, C1 > multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m, const fvar< T > &c)
Definition: multiply.hpp:20
+ +
Eigen::Matrix< fvar< T >, R, R > tcrossprod(const Eigen::Matrix< fvar< T >, R, C > &m)
Definition: tcrossprod.hpp:17
+ + +
Eigen::Matrix< T, C, R > transpose(const Eigen::Matrix< T, R, C > &m)
Definition: transpose.hpp:12
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2trace__gen__quad__form_8hpp.html b/doc/api/html/fwd_2mat_2fun_2trace__gen__quad__form_8hpp.html new file mode 100644 index 00000000000..aab93ae5c63 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2trace__gen__quad__form_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/trace_gen_quad_form.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
trace_gen_quad_form.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<int RD, int CD, int RA, int CA, int RB, int CB, typename T >
fvar< T > stan::math::trace_gen_quad_form (const Eigen::Matrix< fvar< T >, RD, CD > &D, const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, CB > &B)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2trace__gen__quad__form_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2trace__gen__quad__form_8hpp_source.html new file mode 100644 index 00000000000..5908b2ef778 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2trace__gen__quad__form_8hpp_source.html @@ -0,0 +1,157 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/trace_gen_quad_form.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
trace_gen_quad_form.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_TRACE_GEN_QUAD_FORM_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_TRACE_GEN_QUAD_FORM_HPP
+
3 
+ + + + + + +
10 
+
11 namespace stan {
+
12  namespace math {
+
13  template<int RD, int CD, int RA, int CA, int RB, int CB, typename T>
+
14  inline fvar<T>
+
15  trace_gen_quad_form(const Eigen::Matrix<fvar<T>, RD, CD> &D,
+
16  const Eigen::Matrix<fvar<T>, RA, CA> &A,
+
17  const Eigen::Matrix<fvar<T>, RB, CB> &B) {
+ + +
20 
+
21  stan::math::check_square("trace_gen_quad_form", "A", A);
+
22  stan::math::check_square("trace_gen_quad_form", "D", D);
+
23  stan::math::check_multiplicable("trace_gen_quad_form",
+
24  "A", A,
+
25  "B", B);
+
26  stan::math::check_multiplicable("trace_gen_quad_form",
+
27  "B", B,
+
28  "D", D);
+ +
30  multiply(A, B)));
+
31  }
+
32  }
+
33 }
+
34 
+
35 #endif
+
36 
+ + +
Eigen::Matrix< fvar< T >, R1, C1 > multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m, const fvar< T > &c)
Definition: multiply.hpp:20
+ + +
fvar< T > trace_gen_quad_form(const Eigen::Matrix< fvar< T >, RD, CD > &D, const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, CB > &B)
+ +
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+
T trace(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
Returns the trace of the specified matrix.
Definition: trace.hpp:20
+
Eigen::Matrix< T, C, R > transpose(const Eigen::Matrix< T, R, C > &m)
Definition: transpose.hpp:12
+
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2trace__quad__form_8hpp.html b/doc/api/html/fwd_2mat_2fun_2trace__quad__form_8hpp.html new file mode 100644 index 00000000000..d246507e87c --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2trace__quad__form_8hpp.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/trace_quad_form.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
trace_quad_form.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<int RA, int CA, int RB, int CB, typename T >
fvar< T > stan::math::trace_quad_form (const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, CB > &B)
 
template<int RA, int CA, int RB, int CB, typename T >
fvar< T > stan::math::trace_quad_form (const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< double, RB, CB > &B)
 
template<int RA, int CA, int RB, int CB, typename T >
fvar< T > stan::math::trace_quad_form (const Eigen::Matrix< double, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, CB > &B)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2trace__quad__form_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2trace__quad__form_8hpp_source.html new file mode 100644 index 00000000000..ac778ee95c9 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2trace__quad__form_8hpp_source.html @@ -0,0 +1,177 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/trace_quad_form.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
trace_quad_form.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_TRACE_QUAD_FORM_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_TRACE_QUAD_FORM_HPP
+
3 
+
4 #include <boost/type_traits.hpp>
+ + + + + + +
11 #include <stan/math/fwd/core.hpp>
+
12 
+
13 namespace stan {
+
14  namespace math {
+
15 
+
16  template<int RA, int CA, int RB, int CB, typename T>
+
17  inline fvar<T>
+
18  trace_quad_form(const Eigen::Matrix<fvar<T>, RA, CA> &A,
+
19  const Eigen::Matrix<fvar<T>, RB, CB> &B) {
+
20  check_square("trace_quad_form", "A", A);
+
21  check_multiplicable("trace_quad_form",
+
22  "A", A,
+
23  "B", B);
+
24  return trace(multiply(transpose(B),
+
25  multiply(A, B)));
+
26  }
+
27 
+
28  template<int RA, int CA, int RB, int CB, typename T>
+
29  inline fvar<T>
+
30  trace_quad_form(const Eigen::Matrix<fvar<T>, RA, CA> &A,
+
31  const Eigen::Matrix<double, RB, CB> &B) {
+
32  check_square("trace_quad_form", "A", A);
+
33  check_multiplicable("trace_quad_form",
+
34  "A", A,
+
35  "B", B);
+
36  return trace(multiply(transpose(B),
+
37  multiply(A, B)));
+
38  }
+
39 
+
40  template<int RA, int CA, int RB, int CB, typename T>
+
41  inline fvar<T>
+
42  trace_quad_form(const Eigen::Matrix<double, RA, CA> &A,
+
43  const Eigen::Matrix<fvar<T>, RB, CB> &B) {
+
44  check_square("trace_quad_form", "A", A);
+
45  check_multiplicable("trace_quad_form",
+
46  "A", A,
+
47  "B", B);
+
48  return trace(multiply(transpose(B),
+
49  multiply(A, B)));
+
50  }
+
51  }
+
52 }
+
53 
+
54 #endif
+
55 
+ + + +
fvar< T > trace_quad_form(const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, CB > &B)
+
Eigen::Matrix< fvar< T >, R1, C1 > multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m, const fvar< T > &c)
Definition: multiply.hpp:20
+ + + +
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+
T trace(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
Returns the trace of the specified matrix.
Definition: trace.hpp:20
+
Eigen::Matrix< T, C, R > transpose(const Eigen::Matrix< T, R, C > &m)
Definition: transpose.hpp:12
+
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2typedefs_8hpp.html b/doc/api/html/fwd_2mat_2fun_2typedefs_8hpp.html new file mode 100644 index 00000000000..6b1e01c71cb --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2typedefs_8hpp.html @@ -0,0 +1,156 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/typedefs.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
typedefs.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + + + + +

+Typedefs

typedef Eigen::Matrix< double,
+Eigen::Dynamic, Eigen::Dynamic >
+::Index 
stan::math::size_type
 Type for sizes and indexes in an Eigen matrix with double e. More...
 
typedef Eigen::Matrix< fvar
+< double >, Eigen::Dynamic,
+Eigen::Dynamic > 
stan::math::matrix_fd
 
typedef Eigen::Matrix< fvar
+< fvar< double >
+ >, Eigen::Dynamic,
+Eigen::Dynamic > 
stan::math::matrix_ffd
 
typedef Eigen::Matrix< fvar
+< double >, Eigen::Dynamic, 1 > 
stan::math::vector_fd
 
typedef Eigen::Matrix< fvar
+< fvar< double >
+ >, Eigen::Dynamic, 1 > 
stan::math::vector_ffd
 
typedef Eigen::Matrix< fvar
+< double >, 1, Eigen::Dynamic > 
stan::math::row_vector_fd
 
typedef Eigen::Matrix< fvar
+< fvar< double >
+ >, 1, Eigen::Dynamic > 
stan::math::row_vector_ffd
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2fun_2typedefs_8hpp_source.html b/doc/api/html/fwd_2mat_2fun_2typedefs_8hpp_source.html new file mode 100644 index 00000000000..a2d1916d1b2 --- /dev/null +++ b/doc/api/html/fwd_2mat_2fun_2typedefs_8hpp_source.html @@ -0,0 +1,159 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/typedefs.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
typedefs.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_TYPEDEFS_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_TYPEDEFS_HPP
+
3 
+ +
5 #include <stan/math/fwd/core.hpp>
+ +
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  typedef
+
12  Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>::Index
+ +
14 
+
15  typedef
+
16  Eigen::Matrix<fvar<double>, Eigen::Dynamic, Eigen::Dynamic>
+ +
18 
+
19  typedef
+
20  Eigen::Matrix<fvar<fvar<double> >, Eigen::Dynamic, Eigen::Dynamic>
+ +
22 
+
23  typedef
+
24  Eigen::Matrix<fvar<double>, Eigen::Dynamic, 1>
+ +
26 
+
27  typedef
+
28  Eigen::Matrix<fvar<fvar<double> >, Eigen::Dynamic, 1>
+ +
30 
+
31  typedef
+
32  Eigen::Matrix<fvar<double>, 1, Eigen::Dynamic>
+ +
34 
+
35  typedef
+
36  Eigen::Matrix<fvar<fvar<double> >, 1, Eigen::Dynamic>
+ +
38 
+
39  }
+
40 }
+
41 #endif
+ +
Eigen::Matrix< fvar< double >, Eigen::Dynamic, 1 > vector_fd
Definition: typedefs.hpp:25
+
Eigen::Matrix< fvar< double >, Eigen::Dynamic, Eigen::Dynamic > matrix_fd
Definition: typedefs.hpp:17
+ +
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
Eigen::Matrix< fvar< fvar< double > >, Eigen::Dynamic, Eigen::Dynamic > matrix_ffd
Definition: typedefs.hpp:21
+
Eigen::Matrix< fvar< double >, 1, Eigen::Dynamic > row_vector_fd
Definition: typedefs.hpp:33
+ +
Eigen::Matrix< fvar< fvar< double > >, 1, Eigen::Dynamic > row_vector_ffd
Definition: typedefs.hpp:37
+
Eigen::Matrix< fvar< fvar< double > >, Eigen::Dynamic, 1 > vector_ffd
Definition: typedefs.hpp:29
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2functor_2gradient_8hpp.html b/doc/api/html/fwd_2mat_2functor_2gradient_8hpp.html new file mode 100644 index 00000000000..f838150ffb7 --- /dev/null +++ b/doc/api/html/fwd_2mat_2functor_2gradient_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/functor/gradient.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
gradient.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T , typename F >
void stan::math::gradient (const F &f, const Eigen::Matrix< T, Dynamic, 1 > &x, T &fx, Eigen::Matrix< T, Dynamic, 1 > &grad_fx)
 Calculate the value and the gradient of the specified function at the specified argument. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2functor_2gradient_8hpp_source.html b/doc/api/html/fwd_2mat_2functor_2gradient_8hpp_source.html new file mode 100644 index 00000000000..22d42560cde --- /dev/null +++ b/doc/api/html/fwd_2mat_2functor_2gradient_8hpp_source.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/functor/gradient.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
gradient.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUNCTOR_GRADIENT_HPP
+
2 #define STAN_MATH_FWD_MAT_FUNCTOR_GRADIENT_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ +
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
11  using Eigen::Dynamic;
+
12 
+
42  template <typename T, typename F>
+
43  void
+
44  gradient(const F& f,
+
45  const Eigen::Matrix<T, Dynamic, 1>& x,
+
46  T& fx,
+
47  Eigen::Matrix<T, Dynamic, 1>& grad_fx) {
+
48  Eigen::Matrix<fvar<T>, Dynamic, 1> x_fvar(x.size());
+
49  grad_fx.resize(x.size());
+
50  for (int i = 0; i < x.size(); ++i) {
+
51  for (int k = 0; k < x.size(); ++k)
+
52  x_fvar(k) = fvar<T>(x(k), k == i);
+
53  fvar<T> fx_fvar = f(x_fvar);
+
54  if (i == 0) fx = fx_fvar.val_;
+
55  grad_fx(i) = fx_fvar.d_;
+
56  }
+
57  }
+
58 
+
59  } // namespace math
+
60 } // namespace stan
+
61 #endif
+ + + + +
void gradient(const F &f, const Eigen::Matrix< T, Dynamic, 1 > &x, T &fx, Eigen::Matrix< T, Dynamic, 1 > &grad_fx)
Calculate the value and the gradient of the specified function at the specified argument.
Definition: gradient.hpp:44
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2functor_2jacobian_8hpp.html b/doc/api/html/fwd_2mat_2functor_2jacobian_8hpp.html new file mode 100644 index 00000000000..1f19afbfd3e --- /dev/null +++ b/doc/api/html/fwd_2mat_2functor_2jacobian_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/functor/jacobian.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
jacobian.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T , typename F >
void stan::math::jacobian (const F &f, const Eigen::Matrix< T, Dynamic, 1 > &x, Eigen::Matrix< T, Dynamic, 1 > &fx, Eigen::Matrix< T, Dynamic, Dynamic > &J)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2mat_2functor_2jacobian_8hpp_source.html b/doc/api/html/fwd_2mat_2functor_2jacobian_8hpp_source.html new file mode 100644 index 00000000000..a68b2ff0f17 --- /dev/null +++ b/doc/api/html/fwd_2mat_2functor_2jacobian_8hpp_source.html @@ -0,0 +1,156 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/functor/jacobian.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
jacobian.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUNCTOR_JACOBIAN_HPP
+
2 #define STAN_MATH_FWD_MAT_FUNCTOR_JACOBIAN_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ +
6 #include <vector>
+
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  using Eigen::Dynamic;
+
13 
+
14  template <typename T, typename F>
+
15  void
+
16  jacobian(const F& f,
+
17  const Eigen::Matrix<T, Dynamic, 1>& x,
+
18  Eigen::Matrix<T, Dynamic, 1>& fx,
+
19  Eigen::Matrix<T, Dynamic, Dynamic>& J) {
+
20  using Eigen::Matrix;
+
21  using stan::math::fvar;
+
22  Matrix<fvar<T>, Dynamic, 1> x_fvar(x.size());
+
23  for (int i = 0; i < x.size(); ++i) {
+
24  for (int k = 0; k < x.size(); ++k)
+
25  x_fvar(k) = fvar<T>(x(k), i == k);
+
26  Matrix<fvar<T>, Dynamic, 1> fx_fvar
+
27  = f(x_fvar);
+
28  if (i == 0) {
+
29  J.resize(x.size(), fx_fvar.size());
+
30  fx.resize(fx_fvar.size());
+
31  for (int k = 0; k < fx_fvar.size(); ++k)
+
32  fx(k) = fx_fvar(k).val_;
+
33  }
+
34  for (int k = 0; k < fx_fvar.size(); ++k) {
+
35  J(i, k) = fx_fvar(k).d_;
+
36  }
+
37  }
+
38  }
+
39 
+
40  } // namespace math
+
41 } // namespace stan
+
42 #endif
+ + + + +
void jacobian(const F &f, const Eigen::Matrix< T, Dynamic, 1 > &x, Eigen::Matrix< T, Dynamic, 1 > &fx, Eigen::Matrix< T, Dynamic, Dynamic > &J)
Definition: jacobian.hpp:16
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2_phi_8hpp.html b/doc/api/html/fwd_2scal_2fun_2_phi_8hpp.html new file mode 100644 index 00000000000..fd6d06c8b59 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2_phi_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/Phi.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
Phi.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::Phi (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2_phi_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2_phi_8hpp_source.html new file mode 100644 index 00000000000..ab9f7188b3f --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2_phi_8hpp_source.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/Phi.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
Phi.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_PHI_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_PHI_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ + +
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
13  template <typename T>
+
14  inline fvar<T> Phi(const fvar<T>& x) {
+
15  using stan::math::Phi;
+
16  using std::exp;
+
17  using std::sqrt;
+
18  T xv = x.val_;
+
19  return fvar<T>(Phi(xv),
+
20  x.d_ * exp(xv * xv / -2.0) / sqrt(2.0 * stan::math::pi()));
+
21  }
+
22  }
+
23 }
+
24 #endif
+ + +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
fvar< T > Phi(const fvar< T > &x)
Definition: Phi.hpp:14
+ +
double pi()
Return the value of pi.
Definition: constants.hpp:86
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2abs_8hpp.html b/doc/api/html/fwd_2scal_2fun_2abs_8hpp.html new file mode 100644 index 00000000000..a7516f31389 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2abs_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/abs.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
abs.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::abs (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2abs_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2abs_8hpp_source.html new file mode 100644 index 00000000000..66f7efcbc75 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2abs_8hpp_source.html @@ -0,0 +1,150 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/abs.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
abs.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_ABS_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_ABS_HPP
+
3 
+ +
5 #include <stan/math/fwd/core.hpp>
+ + + + +
10 
+
11 namespace stan {
+
12  namespace math {
+
13 
+
14  template<typename T>
+
15  inline fvar<T> abs(const fvar<T>& x) {
+
16  using stan::math::abs;
+ +
18  if (x.val_ > 0.0)
+
19  return x;
+
20  else if (x.val_ < 0.0)
+
21  return fvar<T>(-x.val_, -x.d_);
+
22  else if (x.val_ == 0.0)
+
23  return fvar<T>(0, 0);
+
24  else
+ +
26  }
+
27 
+
28  }
+
29 }
+
30 #endif
+
fvar< T > abs(const fvar< T > &x)
Definition: abs.hpp:15
+ + +
const double NOT_A_NUMBER
(Quiet) not-a-number value.
Definition: constants.hpp:56
+
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ + + + + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2acos_8hpp.html b/doc/api/html/fwd_2scal_2fun_2acos_8hpp.html new file mode 100644 index 00000000000..62dbb216f55 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2acos_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/acos.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
acos.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <stan/math/prim/scal/fun/square.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::acos (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2acos_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2acos_8hpp_source.html new file mode 100644 index 00000000000..0893e0f35ef --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2acos_8hpp_source.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/acos.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
acos.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_ACOS_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_ACOS_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ +
6 #include <cmath>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  template <typename T>
+
12  inline
+
13  fvar<T>
+
14  acos(const fvar<T>& x) {
+
15  using std::acos;
+
16  using std::sqrt;
+
17  using stan::math::square;
+
18  return fvar<T>(acos(x.val_), x.d_ / -sqrt(1 - square(x.val_)));
+
19  }
+
20 
+
21  }
+
22 }
+
23 #endif
+ + +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+ +
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+
var acos(const var &a)
Return the principal value of the arc cosine of a variable, in radians (cmath).
Definition: acos.hpp:59
+ +
fvar< T > acos(const fvar< T > &x)
Definition: acos.hpp:14
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2acosh_8hpp.html b/doc/api/html/fwd_2scal_2fun_2acosh_8hpp.html new file mode 100644 index 00000000000..f33c12b9de8 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2acosh_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/acosh.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
acosh.hpp File Reference
+
+
+
#include <math.h>
+#include <stan/math/fwd/core.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/square.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::acosh (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2acosh_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2acosh_8hpp_source.html new file mode 100644 index 00000000000..0034aedf69f --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2acosh_8hpp_source.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/acosh.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
acosh.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_ACOSH_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_ACOSH_HPP
+
3 
+
4 #include <math.h>
+
5 #include <stan/math/fwd/core.hpp>
+ + +
8 #include <cmath>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
13  template <typename T>
+
14  inline fvar<T> acosh(const fvar<T>& x) {
+ +
16  using stan::math::square;
+
17  using std::sqrt;
+ +
19  return fvar<T>(acosh(x.val_),
+
20  x.d_ / sqrt(square(x.val_) - 1));
+
21  }
+
22 
+
23  }
+
24 }
+
25 #endif
+ + +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
const double NOT_A_NUMBER
(Quiet) not-a-number value.
Definition: constants.hpp:56
+ +
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+ +
var acosh(const var &a)
The inverse hyperbolic cosine function for variables (C99).
Definition: acosh.hpp:68
+ +
fvar< T > acosh(const fvar< T > &x)
Definition: acosh.hpp:14
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2asin_8hpp.html b/doc/api/html/fwd_2scal_2fun_2asin_8hpp.html new file mode 100644 index 00000000000..10ee98fa16a --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2asin_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/asin.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
asin.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <stan/math/prim/scal/fun/square.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::asin (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2asin_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2asin_8hpp_source.html new file mode 100644 index 00000000000..70a7ab4a127 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2asin_8hpp_source.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/asin.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
asin.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_ASIN_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_ASIN_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ +
6 #include <cmath>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  template <typename T>
+
12  inline fvar<T> asin(const fvar<T>& x) {
+
13  using std::asin;
+
14  using std::sqrt;
+
15  using stan::math::square;
+
16  return fvar<T>(asin(x.val_), x.d_ / sqrt(1 - square(x.val_)));
+
17  }
+
18 
+
19  }
+
20 }
+
21 #endif
+ + +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+ +
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+
var asin(const var &a)
Return the principal value of the arc sine, in radians, of the specified variable (cmath)...
Definition: asin.hpp:58
+ +
fvar< T > asin(const fvar< T > &x)
Definition: asin.hpp:12
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2asinh_8hpp.html b/doc/api/html/fwd_2scal_2fun_2asinh_8hpp.html new file mode 100644 index 00000000000..0d561ca63b2 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2asinh_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/asinh.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
asinh.hpp File Reference
+
+
+
#include <math.h>
+#include <stan/math/fwd/core.hpp>
+#include <stan/math/prim/scal/fun/square.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::asinh (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2asinh_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2asinh_8hpp_source.html new file mode 100644 index 00000000000..b2587ca6391 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2asinh_8hpp_source.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/asinh.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
asinh.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_ASINH_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_ASINH_HPP
+
3 
+
4 #include <math.h>
+
5 #include <stan/math/fwd/core.hpp>
+ +
7 #include <cmath>
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline fvar<T> asinh(const fvar<T>& x) {
+ +
15  using std::sqrt;
+
16  using stan::math::square;
+
17  return fvar<T>(asinh(x.val_), x.d_ / sqrt(square(x.val_) + 1));
+
18  }
+
19 
+
20  }
+
21 }
+
22 #endif
+ + +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+ +
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+ +
fvar< T > asinh(const fvar< T > &x)
Definition: asinh.hpp:13
+
var asinh(const var &a)
The inverse hyperbolic sine function for variables (C99).
Definition: asinh.hpp:67
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2atan2_8hpp.html b/doc/api/html/fwd_2scal_2fun_2atan2_8hpp.html new file mode 100644 index 00000000000..bb55f22f219 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2atan2_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/atan2.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
atan2.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <stan/math/prim/scal/fun/square.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
fvar< T > stan::math::atan2 (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::atan2 (const double x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::atan2 (const fvar< T > &x1, const double x2)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2atan2_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2atan2_8hpp_source.html new file mode 100644 index 00000000000..f7a6b199a5a --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2atan2_8hpp_source.html @@ -0,0 +1,154 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/atan2.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
atan2.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_ATAN2_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_ATAN2_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ +
6 #include <cmath>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  template <typename T>
+
12  inline fvar<T> atan2(const fvar<T>& x1, const fvar<T>& x2) {
+
13  using std::atan2;
+
14  using stan::math::square;
+
15  return fvar<T>(atan2(x1.val_, x2.val_),
+
16  (x1.d_ * x2.val_ - x1.val_ * x2.d_) /
+
17  (square(x2.val_) + square(x1.val_)));
+
18  }
+
19 
+
20  template <typename T>
+
21  inline fvar<T> atan2(const double x1, const fvar<T>& x2) {
+
22  using std::atan2;
+
23  using stan::math::square;
+
24  return fvar<T>(atan2(x1, x2.val_),
+
25  (-x1 * x2.d_) / (square(x1) + square(x2.val_)));
+
26  }
+
27 
+
28  template <typename T>
+
29  inline fvar<T> atan2(const fvar<T>& x1, const double x2) {
+
30  using std::atan2;
+
31  using stan::math::square;
+
32  return fvar<T>(atan2(x1.val_, x2),
+
33  (x1.d_ * x2) / (square(x2) + square(x1.val_)));
+
34  }
+
35 
+
36  }
+
37 }
+
38 #endif
+ + +
fvar< T > atan2(const fvar< T > &x1, const fvar< T > &x2)
Definition: atan2.hpp:12
+ +
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+
var atan2(const double a, const var &b)
Return the principal value of the arc tangent, in radians, of the first scalar divided by the second ...
Definition: atan2.hpp:119
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2atan_8hpp.html b/doc/api/html/fwd_2scal_2fun_2atan_8hpp.html new file mode 100644 index 00000000000..e7e0c16cc05 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2atan_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/atan.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
atan.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <stan/math/prim/scal/fun/square.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::atan (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2atan_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2atan_8hpp_source.html new file mode 100644 index 00000000000..529a23ecabd --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2atan_8hpp_source.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/atan.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
atan.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_ATAN_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_ATAN_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ +
6 #include <cmath>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  template <typename T>
+
12  inline fvar<T> atan(const fvar<T>& x) {
+
13  using std::atan;
+
14  using stan::math::square;
+
15  return fvar<T>(atan(x.val_), x.d_ / (1 + square(x.val_)));
+
16  }
+
17 
+
18  }
+
19 }
+
20 #endif
+ + + +
fvar< T > atan(const fvar< T > &x)
Definition: atan.hpp:12
+
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+ +
var atan(const var &a)
Return the principal value of the arc tangent, in radians, of the specified variable (cmath)...
Definition: atan.hpp:55
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2atanh_8hpp.html b/doc/api/html/fwd_2scal_2fun_2atanh_8hpp.html new file mode 100644 index 00000000000..db4eb2d0f26 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2atanh_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/atanh.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
atanh.hpp File Reference
+
+
+
#include <math.h>
+#include <stan/math/fwd/core.hpp>
+#include <stan/math/prim/scal/fun/square.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::atanh (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2atanh_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2atanh_8hpp_source.html new file mode 100644 index 00000000000..41eb2b490a0 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2atanh_8hpp_source.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/atanh.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
atanh.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_ATANH_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_ATANH_HPP
+
3 
+
4 #include <math.h>
+
5 #include <stan/math/fwd/core.hpp>
+ +
7 #include <cmath>
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline fvar<T> atanh(const fvar<T>& x) {
+ +
15  using stan::math::square;
+
16  return fvar<T>(atanh(x.val_), x.d_ / (1 - square(x.val_)));
+
17  }
+
18 
+
19  }
+
20 }
+
21 #endif
+ + +
fvar< T > atanh(const fvar< T > &x)
Definition: atanh.hpp:13
+ +
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+ +
var atanh(const var &a)
The inverse hyperbolic tangent function for variables (C99).
Definition: atanh.hpp:70
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2bessel__first__kind_8hpp.html b/doc/api/html/fwd_2scal_2fun_2bessel__first__kind_8hpp.html new file mode 100644 index 00000000000..c591e9e18c1 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2bessel__first__kind_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/bessel_first_kind.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
bessel_first_kind.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::bessel_first_kind (int v, const fvar< T > &z)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2bessel__first__kind_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2bessel__first__kind_8hpp_source.html new file mode 100644 index 00000000000..e83f3a0601f --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2bessel__first__kind_8hpp_source.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/bessel_first_kind.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
bessel_first_kind.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_BESSEL_FIRST_KIND_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_BESSEL_FIRST_KIND_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline
+
14  fvar<T>
+
15  bessel_first_kind(int v, const fvar<T>& z) {
+ +
17 
+
18  T bessel_first_kind_z(bessel_first_kind(v, z.val_));
+
19  return fvar<T>(bessel_first_kind_z,
+
20  v * z.d_ * bessel_first_kind_z / z.val_
+
21  - z.d_ * bessel_first_kind(v + 1, z.val_));
+
22  }
+
23  }
+
24 }
+
25 #endif
+ + +
fvar< T > bessel_first_kind(int v, const fvar< T > &z)
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2bessel__second__kind_8hpp.html b/doc/api/html/fwd_2scal_2fun_2bessel__second__kind_8hpp.html new file mode 100644 index 00000000000..fc55b7310d7 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2bessel__second__kind_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/bessel_second_kind.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
bessel_second_kind.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::bessel_second_kind (int v, const fvar< T > &z)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2bessel__second__kind_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2bessel__second__kind_8hpp_source.html new file mode 100644 index 00000000000..46c7737996d --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2bessel__second__kind_8hpp_source.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/bessel_second_kind.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
bessel_second_kind.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_BESSEL_SECOND_KIND_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_BESSEL_SECOND_KIND_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline
+
14  fvar<T>
+
15  bessel_second_kind(int v, const fvar<T>& z) {
+ +
17 
+
18  T bessel_second_kind_z(bessel_second_kind(v, z.val_));
+
19  return fvar<T>(bessel_second_kind_z,
+
20  v * z.d_ * bessel_second_kind_z / z.val_
+
21  - z.d_ * bessel_second_kind(v + 1, z.val_));
+
22  }
+
23  }
+
24 }
+
25 #endif
+ + +
fvar< T > bessel_second_kind(int v, const fvar< T > &z)
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2binary__log__loss_8hpp.html b/doc/api/html/fwd_2scal_2fun_2binary__log__loss_8hpp.html new file mode 100644 index 00000000000..fe79bfcbcd8 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2binary__log__loss_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/binary_log_loss.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
binary_log_loss.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::binary_log_loss (const int y, const fvar< T > &y_hat)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2binary__log__loss_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2binary__log__loss_8hpp_source.html new file mode 100644 index 00000000000..6a3d725dbd2 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2binary__log__loss_8hpp_source.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/binary_log_loss.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
binary_log_loss.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_BINARY_LOG_LOSS_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_BINARY_LOG_LOSS_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline
+
14  fvar<T>
+
15  binary_log_loss(const int y, const fvar<T>& y_hat) {
+ +
17 
+
18  if (y)
+
19  return fvar<T>(binary_log_loss(y, y_hat.val_),
+
20  -y_hat.d_ / y_hat.val_);
+
21  else
+
22  return fvar<T>(binary_log_loss(y, y_hat.val_),
+
23  y_hat.d_ / (1.0 - y_hat.val_));
+
24  }
+
25  }
+
26 }
+
27 #endif
+ + +
fvar< T > binary_log_loss(const int y, const fvar< T > &y_hat)
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2binomial__coefficient__log_8hpp.html b/doc/api/html/fwd_2scal_2fun_2binomial__coefficient__log_8hpp.html new file mode 100644 index 00000000000..0277a4842b0 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2binomial__coefficient__log_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/binomial_coefficient_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
binomial_coefficient_log.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <boost/math/special_functions/digamma.hpp>
+#include <stan/math/prim/scal/fun/binomial_coefficient_log.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
fvar< T > stan::math::binomial_coefficient_log (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::binomial_coefficient_log (const fvar< T > &x1, const double x2)
 
template<typename T >
fvar< T > stan::math::binomial_coefficient_log (const double x1, const fvar< T > &x2)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2binomial__coefficient__log_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2binomial__coefficient__log_8hpp_source.html new file mode 100644 index 00000000000..b2ca9447919 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2binomial__coefficient__log_8hpp_source.html @@ -0,0 +1,207 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/binomial_coefficient_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
binomial_coefficient_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_BINOMIAL_COEFFICIENT_LOG_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_BINOMIAL_COEFFICIENT_LOG_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+
6 #include <boost/math/special_functions/digamma.hpp>
+ +
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
13  template <typename T>
+
14  inline
+
15  fvar<T>
+
16  binomial_coefficient_log(const fvar<T>& x1, const fvar<T>& x2) {
+ +
18  using std::log;
+ +
20  const double cutoff = 1000;
+
21  if ((x1.val_ < cutoff) || (x1.val_ - x2.val_ < cutoff)) {
+ +
23  x1.d_ * digamma(x1.val_ + 1)
+
24  - x2.d_ * digamma(x2.val_ + 1)
+
25  - (x1.d_ - x2.d_) * digamma(x1.val_ - x2.val_ + 1));
+
26  } else {
+ +
28  x2.d_ * log(x1.val_ - x2.val_)
+
29  + x2.val_ * (x1.d_ - x2.d_) / (x1.val_ - x2.val_)
+
30  + x1.d_ * log(x1.val_ / (x1.val_ - x2.val_))
+
31  + (x1.val_ + 0.5) / (x1.val_ / (x1.val_ - x2.val_))
+
32  * (x1.d_ * (x1.val_ - x2.val_)
+
33  - (x1.d_ - x2.d_) * x1.val_)
+
34  / ((x1.val_ - x2.val_) * (x1.val_ - x2.val_))
+
35  - x1.d_ / (12.0 * x1.val_ * x1.val_)
+
36  - x2.d_
+
37  + (x1.d_ - x2.d_) / (12.0 * (x1.val_ - x2.val_)
+
38  * (x1.val_ - x2.val_))
+
39  - digamma(x2.val_ + 1) * x2.d_);
+
40  }
+
41  }
+
42 
+
43  template <typename T>
+
44  inline
+
45  fvar<T>
+
46  binomial_coefficient_log(const fvar<T>& x1, const double x2) {
+ +
48  using std::log;
+ +
50  const double cutoff = 1000;
+
51  if ((x1.val_ < cutoff) || (x1.val_ - x2 < cutoff)) {
+
52  return fvar<T>(binomial_coefficient_log(x1.val_, x2),
+
53  x1.d_ * digamma(x1.val_ + 1)
+
54  - x1.d_ * digamma(x1.val_ - x2 + 1));
+
55  } else {
+
56  return fvar<T>(binomial_coefficient_log(x1.val_, x2),
+
57  x2 * x1.d_ / (x1.val_ - x2)
+
58  + x1.d_ * log(x1.val_ / (x1.val_ - x2))
+
59  + (x1.val_ + 0.5) / (x1.val_ / (x1.val_ - x2))
+
60  * (x1.d_ * (x1.val_ - x2) - x1.d_ * x1.val_)
+
61  / ((x1.val_ - x2) * (x1.val_ - x2))
+
62  - x1.d_ / (12.0 * x1.val_ * x1.val_)
+
63  + x1.d_ / (12.0 * (x1.val_ - x2) * (x1.val_ - x2)));
+
64  }
+
65  }
+
66 
+
67  template <typename T>
+
68  inline
+
69  fvar<T>
+
70  binomial_coefficient_log(const double x1, const fvar<T>& x2) {
+ +
72  using std::log;
+ +
74  const double cutoff = 1000;
+
75  if ((x1 < cutoff) || (x1 - x2.val_ < cutoff)) {
+
76  return fvar<T>(binomial_coefficient_log(x1, x2.val_),
+
77  -x2.d_ * digamma(x2.val_ + 1)
+
78  - x2.d_ * digamma(x1 - x2.val_ + 1));
+
79  } else {
+
80  return fvar<T>(binomial_coefficient_log(x1, x2.val_),
+
81  x2.d_ * log(x1 - x2.val_)
+
82  + x2.val_ * -x2.d_ / (x1 - x2.val_)
+
83  - x2.d_
+
84  - x2.d_ / (12.0 * (x1 - x2.val_) * (x1 - x2.val_))
+
85  + x2.d_ * (x1 + 0.5) / (x1 - x2.val_)
+
86  - digamma(x2.val_ + 1) * x2.d_);
+
87  }
+
88  }
+
89  }
+
90 }
+
91 #endif
+ + +
fvar< T > binomial_coefficient_log(const fvar< T > &x1, const fvar< T > &x2)
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ + + +
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2cbrt_8hpp.html b/doc/api/html/fwd_2scal_2fun_2cbrt_8hpp.html new file mode 100644 index 00000000000..c57dbbc143f --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2cbrt_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/cbrt.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
cbrt.hpp File Reference
+
+
+
#include <math.h>
+#include <stan/math/fwd/core.hpp>
+#include <stan/math/prim/scal/fun/square.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::cbrt (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2cbrt_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2cbrt_8hpp_source.html new file mode 100644 index 00000000000..a25c3ade821 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2cbrt_8hpp_source.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/cbrt.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
cbrt.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_CBRT_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_CBRT_HPP
+
3 
+
4 #include <math.h>
+
5 #include <stan/math/fwd/core.hpp>
+ +
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  template <typename T>
+
12  inline
+
13  fvar<T>
+
14  cbrt(const fvar<T>& x) {
+ +
16  using stan::math::square;
+
17  return fvar<T>(cbrt(x.val_),
+
18  x.d_ / (square(cbrt(x.val_)) * 3.0));
+
19  }
+
20 
+
21  }
+
22 }
+
23 #endif
+ + +
fvar< T > cbrt(const fvar< T > &x)
Definition: cbrt.hpp:14
+ +
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+ + +
var cbrt(const var &a)
Returns the cube root of the specified variable (C99).
Definition: cbrt.hpp:56
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2ceil_8hpp.html b/doc/api/html/fwd_2scal_2fun_2ceil_8hpp.html new file mode 100644 index 00000000000..34c3761b2ed --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2ceil_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/ceil.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
ceil.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::ceil (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2ceil_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2ceil_8hpp_source.html new file mode 100644 index 00000000000..d188f3f9a9b --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2ceil_8hpp_source.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/ceil.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
ceil.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_CEIL_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_CEIL_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 #include <cmath>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  template <typename T>
+
11  inline fvar<T> ceil(const fvar<T>& x) {
+
12  using std::ceil;
+
13  return fvar<T>(ceil(x.val_), 0);
+
14  }
+
15 
+
16  }
+
17 }
+
18 #endif
+ + +
var ceil(const var &a)
Return the ceiling of the specified variable (cmath).
Definition: ceil.hpp:60
+
fvar< T > ceil(const fvar< T > &x)
Definition: ceil.hpp:11
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2cos_8hpp.html b/doc/api/html/fwd_2scal_2fun_2cos_8hpp.html new file mode 100644 index 00000000000..f1eaa50b93d --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2cos_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/cos.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
cos.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::cos (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2cos_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2cos_8hpp_source.html new file mode 100644 index 00000000000..c8a5abfa81c --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2cos_8hpp_source.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/cos.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
cos.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_COS_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_COS_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 #include <cmath>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  template <typename T>
+
11  inline
+
12  fvar<T>
+
13  cos(const fvar<T>& x) {
+
14  using std::sin;
+
15  using std::cos;
+
16  return fvar<T>(cos(x.val_), x.d_ * -sin(x.val_));
+
17  }
+
18 
+
19  }
+
20 }
+
21 #endif
+
fvar< T > cos(const fvar< T > &x)
Definition: cos.hpp:13
+ + +
var cos(const var &a)
Return the cosine of a radian-scaled variable (cmath).
Definition: cos.hpp:49
+
fvar< T > sin(const fvar< T > &x)
Definition: sin.hpp:14
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2cosh_8hpp.html b/doc/api/html/fwd_2scal_2fun_2cosh_8hpp.html new file mode 100644 index 00000000000..4dcdd4b238d --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2cosh_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/cosh.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
cosh.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::cosh (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2cosh_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2cosh_8hpp_source.html new file mode 100644 index 00000000000..6f15e3a7048 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2cosh_8hpp_source.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/cosh.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
cosh.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_COSH_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_COSH_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 #include <cmath>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  template <typename T>
+
11  inline
+
12  fvar<T>
+
13  cosh(const fvar<T>& x) {
+
14  using std::sinh;
+
15  using std::cosh;
+
16  return fvar<T>(cosh(x.val_), x.d_ * sinh(x.val_));
+
17  }
+
18 
+
19  }
+
20 }
+
21 #endif
+ + +
fvar< T > cosh(const fvar< T > &x)
Definition: cosh.hpp:13
+ +
var cosh(const var &a)
Return the hyperbolic cosine of the specified variable (cmath).
Definition: cosh.hpp:50
+
fvar< T > sinh(const fvar< T > &x)
Definition: sinh.hpp:14
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2digamma_8hpp.html b/doc/api/html/fwd_2scal_2fun_2digamma_8hpp.html new file mode 100644 index 00000000000..12200fe7039 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2digamma_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/digamma.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
digamma.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::digamma (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2digamma_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2digamma_8hpp_source.html new file mode 100644 index 00000000000..5e40d4b8095 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2digamma_8hpp_source.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/digamma.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
digamma.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_DIGAMMA_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_DIGAMMA_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ + +
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
13  template <typename T>
+
14  inline
+
15  fvar<T>
+
16  digamma(const fvar<T>& x) {
+
17  using stan::math::digamma;
+ +
19  return fvar<T>(digamma(x.val_), x.d_ * trigamma(x.val_));
+
20  }
+
21  }
+
22 }
+
23 #endif
+
T trigamma(T x)
Definition: trigamma.hpp:50
+ + + + + + +
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2erf_8hpp.html b/doc/api/html/fwd_2scal_2fun_2erf_8hpp.html new file mode 100644 index 00000000000..6c116f0f3bc --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2erf_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/erf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
erf.hpp File Reference
+
+
+
#include <math.h>
+#include <stan/math/fwd/core.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/square.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::erf (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2erf_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2erf_8hpp_source.html new file mode 100644 index 00000000000..77cb6047047 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2erf_8hpp_source.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/erf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
erf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_ERF_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_ERF_HPP
+
3 
+
4 #include <math.h>
+
5 #include <stan/math/fwd/core.hpp>
+ + +
8 #include <cmath>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
13  template <typename T>
+
14  inline fvar<T> erf(const fvar<T>& x) {
+ +
16  using std::sqrt;
+
17  using std::exp;
+
18  using stan::math::square;
+
19  return fvar<T>(erf(x.val_), x.d_ * exp(-square(x.val_))
+ +
21  }
+
22 
+
23  }
+
24 }
+
25 #endif
+
var erf(const var &a)
The error function for variables (C99).
Definition: erf.hpp:68
+ + +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+ +
fvar< T > erf(const fvar< T > &x)
Definition: erf.hpp:14
+
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+
const double TWO_OVER_SQRT_PI
Definition: constants.hpp:161
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2erfc_8hpp.html b/doc/api/html/fwd_2scal_2fun_2erfc_8hpp.html new file mode 100644 index 00000000000..99fb6570fe8 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2erfc_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/erfc.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
erfc.hpp File Reference
+
+
+
#include <math.h>
+#include <stan/math/fwd/core.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/square.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::erfc (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2erfc_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2erfc_8hpp_source.html new file mode 100644 index 00000000000..4d76b2400ea --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2erfc_8hpp_source.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/erfc.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
erfc.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_ERFC_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_ERFC_HPP
+
3 
+
4 #include <math.h>
+
5 #include <stan/math/fwd/core.hpp>
+ + +
8 #include <cmath>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
13  template <typename T>
+
14  inline fvar<T> erfc(const fvar<T>& x) {
+ +
16  using std::sqrt;
+
17  using std::exp;
+
18  using stan::math::square;
+
19  return fvar<T>(erfc(x.val_), -x.d_ * exp(-square(x.val_))
+ +
21  }
+
22  }
+
23 }
+
24 #endif
+ + +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
var erfc(const var &a)
The complementary error function for variables (C99).
Definition: erfc.hpp:68
+ +
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+
const double TWO_OVER_SQRT_PI
Definition: constants.hpp:161
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ +
fvar< T > erfc(const fvar< T > &x)
Definition: erfc.hpp:14
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2exp2_8hpp.html b/doc/api/html/fwd_2scal_2fun_2exp2_8hpp.html new file mode 100644 index 00000000000..f66f1e37d8d --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2exp2_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/exp2.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
exp2.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::exp2 (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2exp2_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2exp2_8hpp_source.html new file mode 100644 index 00000000000..1e6534c3a41 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2exp2_8hpp_source.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/exp2.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
exp2.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_EXP2_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_EXP2_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ + +
7 #include <cmath>
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline fvar<T>
+
14  exp2(const fvar<T>& x) {
+
15  using stan::math::exp2;
+
16  using std::log;
+
17  return fvar<T>(exp2(x.val_), x.d_ * exp2(x.val_) * stan::math::LOG_2);
+
18  }
+
19 
+
20  }
+
21 }
+
22 #endif
+
const double LOG_2
The natural logarithm of 2, .
Definition: constants.hpp:33
+ + +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
fvar< T > exp2(const fvar< T > &x)
Definition: exp2.hpp:14
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2exp_8hpp.html b/doc/api/html/fwd_2scal_2fun_2exp_8hpp.html new file mode 100644 index 00000000000..fd93530b9b5 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2exp_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/exp.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
exp.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::exp (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2exp_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2exp_8hpp_source.html new file mode 100644 index 00000000000..454d69e65d2 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2exp_8hpp_source.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/exp.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
exp.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_EXP_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_EXP_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 #include <cmath>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9  template <typename T>
+
10  inline fvar<T> exp(const fvar<T>& x) {
+
11  using std::exp;
+
12  return fvar<T>(exp(x.val_), x.d_ * exp(x.val_));
+
13  }
+
14 
+
15  }
+
16 }
+
17 #endif
+ + +
var exp(const var &a)
Return the exponentiation of the specified variable (cmath).
Definition: exp.hpp:44
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2expm1_8hpp.html b/doc/api/html/fwd_2scal_2fun_2expm1_8hpp.html new file mode 100644 index 00000000000..6797d24a86a --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2expm1_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/expm1.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
expm1.hpp File Reference
+
+
+
#include <math.h>
+#include <stan/math/fwd/core.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::expm1 (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2expm1_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2expm1_8hpp_source.html new file mode 100644 index 00000000000..d1c688a25d3 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2expm1_8hpp_source.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/expm1.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
expm1.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_EXPM1_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_EXPM1_HPP
+
3 
+
4 #include <math.h>
+
5 #include <stan/math/fwd/core.hpp>
+
6 #include <cmath>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  template <typename T>
+
12  inline fvar<T> expm1(const fvar<T>& x) {
+
13  using std::exp;
+ +
15  return fvar<T>(expm1(x.val_), x.d_ * exp(x.val_));
+
16  }
+
17 
+
18  }
+
19 }
+
20 #endif
+ + +
var expm1(const stan::math::var &a)
The exponentiation of the specified variable minus 1 (C99).
Definition: expm1.hpp:57
+
fvar< T > expm1(const fvar< T > &x)
Definition: expm1.hpp:12
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2fabs_8hpp.html b/doc/api/html/fwd_2scal_2fun_2fabs_8hpp.html new file mode 100644 index 00000000000..72e19119a9b --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2fabs_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/fabs.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
fabs.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::fabs (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2fabs_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2fabs_8hpp_source.html new file mode 100644 index 00000000000..23139c4abc3 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2fabs_8hpp_source.html @@ -0,0 +1,152 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/fabs.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
fabs.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_FABS_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_FABS_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ + + +
8 #include <cmath>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
13  template<typename T>
+
14  inline fvar<T> fabs(const fvar<T>& x) {
+
15  using std::fabs;
+ + +
18 
+ + +
21  else if (x.val_ > 0.0)
+
22  return x;
+
23  else if (x.val_ < 0.0)
+
24  return fvar<T>(-x.val_, -x.d_);
+
25  else
+
26  return fvar<T>(0, 0);
+
27  }
+
28 
+
29  }
+
30 }
+
31 #endif
+ + +
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:14
+
const double NOT_A_NUMBER
(Quiet) not-a-number value.
Definition: constants.hpp:56
+
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
+
#define unlikely(x)
Definition: likely.hpp:9
+ +
var fabs(const var &a)
Return the absolute value of the variable (cmath).
Definition: fabs.hpp:50
+ + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2falling__factorial_8hpp.html b/doc/api/html/fwd_2scal_2fun_2falling__factorial_8hpp.html new file mode 100644 index 00000000000..b48f1bafd0c --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2falling__factorial_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/falling_factorial.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
falling_factorial.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <stan/math/prim/scal/fun/falling_factorial.hpp>
+#include <boost/math/special_functions/digamma.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
fvar< T > stan::math::falling_factorial (const fvar< T > &x, const fvar< T > &n)
 
template<typename T >
fvar< T > stan::math::falling_factorial (const fvar< T > &x, const double n)
 
template<typename T >
fvar< T > stan::math::falling_factorial (const double x, const fvar< T > &n)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2falling__factorial_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2falling__factorial_8hpp_source.html new file mode 100644 index 00000000000..8b1f48ad230 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2falling__factorial_8hpp_source.html @@ -0,0 +1,162 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/falling_factorial.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
falling_factorial.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_FALLING_FACTORIAL_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_FALLING_FACTORIAL_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ +
7 #include <boost/math/special_functions/digamma.hpp>
+
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
13  template<typename T>
+
14  inline fvar<T>
+
15  falling_factorial(const fvar<T>& x, const fvar<T>& n) {
+ + +
18 
+
19  T falling_fact(falling_factorial(x.val_, n.val_));
+
20  return fvar<T>(falling_fact, falling_fact * digamma(x.val_ + 1) * x.d_
+
21  - falling_fact * digamma(n.val_ + 1) * n.d_);
+
22  }
+
23 
+
24  template<typename T>
+
25  inline fvar<T>
+
26  falling_factorial(const fvar<T>& x, const double n) {
+ + +
29 
+
30  T falling_fact(falling_factorial(x.val_, n));
+
31  return fvar<T>(falling_fact,
+
32  falling_fact * digamma(x.val_ + 1) * x.d_);
+
33  }
+
34 
+
35  template<typename T>
+
36  inline fvar<T>
+
37  falling_factorial(const double x, const fvar<T>& n) {
+ + +
40 
+
41  T falling_fact(falling_factorial(x, n.val_));
+
42  return fvar<T>(falling_fact,
+
43  -falling_fact * digamma(n.val_ + 1) * n.d_);
+
44  }
+
45  }
+
46 }
+
47 #endif
+ + + + +
fvar< T > falling_factorial(const fvar< T > &x, const fvar< T > &n)
+ +
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2fdim_8hpp.html b/doc/api/html/fwd_2scal_2fun_2fdim_8hpp.html new file mode 100644 index 00000000000..12bd2565cd5 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2fdim_8hpp.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/fdim.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
fdim.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
fvar< T > stan::math::fdim (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::fdim (const fvar< T > &x1, const double x2)
 
template<typename T >
fvar< T > stan::math::fdim (const double x1, const fvar< T > &x2)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2fdim_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2fdim_8hpp_source.html new file mode 100644 index 00000000000..f92fc8a9b1b --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2fdim_8hpp_source.html @@ -0,0 +1,158 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/fdim.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
fdim.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_FDIM_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_FDIM_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  template <typename T>
+
11  inline fvar<T> fdim(const fvar<T>& x1, const fvar<T>& x2) {
+
12  using stan::math::fdim;
+
13  using std::floor;
+
14  if (x1.val_ < x2.val_)
+
15  return fvar<T>(fdim(x1.val_, x2.val_), 0);
+
16  else
+
17  return fvar<T>(fdim(x1.val_, x2.val_),
+
18  x1.d_ - x2.d_ * floor(x1.val_ / x2.val_));
+
19  }
+
20 
+
21  template <typename T>
+
22  inline fvar<T> fdim(const fvar<T>& x1, const double x2) {
+
23  using stan::math::fdim;
+
24  using std::floor;
+
25  if (x1.val_ < x2)
+
26  return fvar<T>(fdim(x1.val_, x2), 0);
+
27  else
+
28  return fvar<T>(fdim(x1.val_, x2), x1.d_);
+
29  }
+
30 
+
31  template <typename T>
+
32  inline fvar<T> fdim(const double x1, const fvar<T>& x2) {
+
33  using stan::math::fdim;
+
34  using std::floor;
+
35  if (x1 < x2.val_)
+
36  return fvar<T>(fdim(x1, x2.val_), 0);
+
37  else
+
38  return fvar<T>(fdim(x1, x2.val_), x2.d_ * -floor(x1 / x2.val_));
+
39  }
+
40 
+
41  }
+
42 }
+
43 #endif
+ + + +
fvar< T > fdim(const fvar< T > &x1, const fvar< T > &x2)
Definition: fdim.hpp:11
+
fvar< T > floor(const fvar< T > &x)
Definition: floor.hpp:11
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2floor_8hpp.html b/doc/api/html/fwd_2scal_2fun_2floor_8hpp.html new file mode 100644 index 00000000000..23271f63376 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2floor_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/floor.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
floor.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::floor (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2floor_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2floor_8hpp_source.html new file mode 100644 index 00000000000..7870f2a3844 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2floor_8hpp_source.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/floor.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
floor.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_FLOOR_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_FLOOR_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 #include <cmath>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  template <typename T>
+
11  inline fvar<T> floor(const fvar<T>& x) {
+
12  using std::floor;
+
13  return fvar<T>(floor(x.val_), 0);
+
14  }
+
15 
+
16  }
+
17 }
+
18 #endif
+ +
var floor(const var &a)
Return the floor of the specified variable (cmath).
Definition: floor.hpp:60
+ +
fvar< T > floor(const fvar< T > &x)
Definition: floor.hpp:11
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2fma_8hpp.html b/doc/api/html/fwd_2scal_2fun_2fma_8hpp.html new file mode 100644 index 00000000000..4d84b2463d3 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2fma_8hpp.html @@ -0,0 +1,170 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/fma.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
fma.hpp File Reference
+
+
+
#include <math.h>
+#include <stan/math/fwd/core.hpp>
+#include <stan/math/prim/scal/meta/return_type.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T1 , typename T2 , typename T3 >
fvar< typename
+stan::return_type< T1, T2, T3 >
+::type > 
stan::math::fma (const fvar< T1 > &x1, const fvar< T2 > &x2, const fvar< T3 > &x3)
 The fused multiply-add operation (C99). More...
 
template<typename T1 , typename T2 , typename T3 >
fvar< typename
+stan::return_type< T1, T2, T3 >
+::type > 
stan::math::fma (const T1 &x1, const fvar< T2 > &x2, const fvar< T3 > &x3)
 See all-var input signature for details on the function and derivatives. More...
 
template<typename T1 , typename T2 , typename T3 >
fvar< typename
+stan::return_type< T1, T2, T3 >
+::type > 
stan::math::fma (const fvar< T1 > &x1, const T2 &x2, const fvar< T3 > &x3)
 See all-var input signature for details on the function and derivatives. More...
 
template<typename T1 , typename T2 , typename T3 >
fvar< typename
+stan::return_type< T1, T2, T3 >
+::type > 
stan::math::fma (const fvar< T1 > &x1, const fvar< T2 > &x2, const T3 &x3)
 See all-var input signature for details on the function and derivatives. More...
 
template<typename T1 , typename T2 , typename T3 >
fvar< typename
+stan::return_type< T1, T2, T3 >
+::type > 
stan::math::fma (const T1 &x1, const T2 &x2, const fvar< T3 > &x3)
 See all-var input signature for details on the function and derivatives. More...
 
template<typename T1 , typename T2 , typename T3 >
fvar< typename
+stan::return_type< T1, T2, T3 >
+::type > 
stan::math::fma (const fvar< T1 > &x1, const T2 &x2, const T3 &x3)
 See all-var input signature for details on the function and derivatives. More...
 
template<typename T1 , typename T2 , typename T3 >
fvar< typename
+stan::return_type< T1, T2, T3 >
+::type > 
stan::math::fma (const T1 &x1, const fvar< T2 > &x2, const T3 &x3)
 See all-var input signature for details on the function and derivatives. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2fma_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2fma_8hpp_source.html new file mode 100644 index 00000000000..753c1c46c98 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2fma_8hpp_source.html @@ -0,0 +1,192 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/fma.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
fma.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_FMA_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_FMA_HPP
+
3 
+
4 #include <math.h>
+
5 #include <stan/math/fwd/core.hpp>
+ +
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
58  template <typename T1, typename T2, typename T3>
+
59  inline
+
60  fvar<typename stan::return_type<T1, T2, T3>::type>
+
61  fma(const fvar<T1>& x1, const fvar<T2>& x2, const fvar<T3>& x3) {
+ + +
64  (fma(x1.val_, x2.val_, x3.val_),
+
65  x1.d_ * x2.val_ + x2.d_ * x1.val_ + x3.d_);
+
66  }
+
67 
+
71  template <typename T1, typename T2, typename T3>
+
72  inline
+
73  fvar<typename stan::return_type<T1, T2, T3>::type>
+
74  fma(const T1& x1, const fvar<T2>& x2, const fvar<T3>& x3) {
+ + +
77  (fma(x1, x2.val_, x3.val_), x2.d_ * x1 + x3.d_);
+
78  }
+
79 
+
83  template <typename T1, typename T2, typename T3>
+
84  inline
+
85  fvar<typename stan::return_type<T1, T2, T3>::type>
+
86  fma(const fvar<T1>& x1, const T2& x2, const fvar<T3>& x3) {
+ + +
89  (fma(x1.val_, x2, x3.val_), x1.d_ * x2 + x3.d_);
+
90  }
+
91 
+
95  template <typename T1, typename T2, typename T3>
+
96  inline
+
97  fvar<typename stan::return_type<T1, T2, T3>::type>
+
98  fma(const fvar<T1>& x1, const fvar<T2>& x2, const T3& x3) {
+ + +
101  (fma(x1.val_, x2.val_, x3), x1.d_ * x2.val_ + x2.d_ * x1.val_);
+
102  }
+
103 
+
107  template <typename T1, typename T2, typename T3>
+
108  inline
+
109  fvar<typename stan::return_type<T1, T2, T3>::type>
+
110  fma(const T1& x1, const T2& x2, const fvar<T3>& x3) {
+
111  using ::fma;
+ +
113  (fma(x1, x2, x3.val_), x3.d_);
+
114  }
+
115 
+
119  template <typename T1, typename T2, typename T3>
+
120  inline
+
121  fvar<typename stan::return_type<T1, T2, T3>::type>
+
122  fma(const fvar<T1>& x1, const T2& x2, const T3& x3) {
+
123  using ::fma;
+ +
125  (fma(x1.val_, x2, x3), x1.d_ * x2);
+
126  }
+
127 
+
131  template <typename T1, typename T2, typename T3>
+
132  inline
+
133  fvar<typename stan::return_type<T1, T2, T3>::type>
+
134  fma(const T1& x1, const fvar<T2>& x2, const T3& x3) {
+
135  using ::fma;
+ +
137  (fma(x1, x2.val_, x3), x2.d_ * x1);
+
138  }
+
139 
+
140  }
+
141 }
+
142 #endif
+ + + + +
fvar< typename stan::return_type< T1, T2, T3 >::type > fma(const fvar< T1 > &x1, const fvar< T2 > &x2, const fvar< T3 > &x3)
The fused multiply-add operation (C99).
Definition: fma.hpp:61
+
var fma(const double &a, const stan::math::var &b, const stan::math::var &c)
The fused multiply-add function for a value and two variables (C99).
Definition: fma.hpp:280
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2fmax_8hpp.html b/doc/api/html/fwd_2scal_2fun_2fmax_8hpp.html new file mode 100644 index 00000000000..db2503edd98 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2fmax_8hpp.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/fmax.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
fmax.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
fvar< T > stan::math::fmax (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::fmax (const double x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::fmax (const fvar< T > &x1, const double x2)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2fmax_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2fmax_8hpp_source.html new file mode 100644 index 00000000000..1144e48b45a --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2fmax_8hpp_source.html @@ -0,0 +1,192 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/fmax.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
fmax.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_FMAX_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_FMAX_HPP
+
3 
+
4 #include <math.h>
+
5 #include <stan/math/fwd/core.hpp>
+ + +
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline fvar<T> fmax(const fvar<T>& x1, const fvar<T>& x2) {
+ + +
16  if (unlikely(boost::math::isnan(x1.val_))) {
+
17  if (boost::math::isnan(x2.val_))
+
18  return fvar<T>(fmax(x1.val_, x2.val_), NOT_A_NUMBER);
+
19  else
+
20  return fvar<T>(x2.val_, x2.d_);
+
21  } else if (unlikely(boost::math::isnan(x2.val_))) {
+
22  return fvar<T>(x1.val_, x1.d_);
+
23  } else if (x1.val_ > x2.val_) {
+
24  return fvar<T>(x1.val_, x1.d_);
+
25  } else if (x1.val_ == x2.val_) {
+
26  return fvar<T>(x1.val_, NOT_A_NUMBER);
+
27  } else {
+
28  return fvar<T>(x2.val_, x2.d_);
+
29  }
+
30  }
+
31 
+
32  template <typename T>
+
33  inline fvar<T> fmax(const double x1, const fvar<T>& x2) {
+ + +
36  if (unlikely(boost::math::isnan(x1))) {
+
37  if (boost::math::isnan(x2.val_))
+
38  return fvar<T>(fmax(x1, x2.val_), NOT_A_NUMBER);
+
39  else
+
40  return fvar<T>(x2.val_, x2.d_);
+
41  } else if (unlikely(boost::math::isnan(x2.val_))) {
+
42  return fvar<T>(x1, 0.0);
+
43  } else if (x1 > x2.val_) {
+
44  return fvar<T>(x1, 0.0);
+
45  } else if (x1 == x2.val_) {
+
46  return fvar<T>(x2.val_, NOT_A_NUMBER);
+
47  } else {
+
48  return fvar<T>(x2.val_, x2.d_);
+
49  }
+
50  }
+
51 
+
52  template <typename T>
+
53  inline fvar<T> fmax(const fvar<T>& x1, const double x2) {
+ + +
56  if (unlikely(boost::math::isnan(x1.val_))) {
+
57  if (boost::math::isnan(x2))
+
58  return fvar<T>(fmax(x1.val_, x2), NOT_A_NUMBER);
+
59  else
+
60  return fvar<T>(x2, 0.0);
+
61  } else if (unlikely(boost::math::isnan(x2))) {
+
62  return fvar<T>(x1.val_, x1.d_);
+
63  } else if (x1.val_ > x2) {
+
64  return fvar<T>(x1.val_, x1.d_);
+
65  } else if (x1.val_ == x2) {
+
66  return fvar<T>(x1.val_, NOT_A_NUMBER);
+
67  } else {
+
68  return fvar<T>(x2, 0.0);
+
69  }
+
70  }
+
71  }
+
72 }
+
73 #endif
+ + +
const double NOT_A_NUMBER
(Quiet) not-a-number value.
Definition: constants.hpp:56
+
var fmax(const double &a, const stan::math::var &b)
Returns the maximum of a scalar and variable, promoting the scalar to a variable if it is larger (C99...
Definition: fmax.hpp:127
+
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
+
#define unlikely(x)
Definition: likely.hpp:9
+ + + +
fvar< T > fmax(const fvar< T > &x1, const fvar< T > &x2)
Definition: fmax.hpp:13
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2fmin_8hpp.html b/doc/api/html/fwd_2scal_2fun_2fmin_8hpp.html new file mode 100644 index 00000000000..af489d1a84e --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2fmin_8hpp.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/fmin.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
fmin.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
fvar< T > stan::math::fmin (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::fmin (const double x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::fmin (const fvar< T > &x1, const double x2)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2fmin_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2fmin_8hpp_source.html new file mode 100644 index 00000000000..de7cd10a8dc --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2fmin_8hpp_source.html @@ -0,0 +1,193 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/fmin.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
fmin.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_FMIN_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_FMIN_HPP
+
3 
+
4 #include <math.h>
+
5 #include <stan/math/fwd/core.hpp>
+ + +
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline fvar<T> fmin(const fvar<T>& x1, const fvar<T>& x2) {
+ + +
16  if (unlikely(boost::math::isnan(x1.val_))) {
+
17  if (boost::math::isnan(x2.val_))
+
18  return fvar<T>(fmin(x1.val_, x2.val_), NOT_A_NUMBER);
+
19  else
+
20  return fvar<T>(x2.val_, x2.d_);
+
21  } else if (unlikely(boost::math::isnan(x2.val_))) {
+
22  return fvar<T>(x1.val_, x1.d_);
+
23  } else if (x1.val_ < x2.val_) {
+
24  return fvar<T>(x1.val_, x1.d_);
+
25  } else if (x1.val_ == x2.val_) {
+
26  return fvar<T>(x1.val_, NOT_A_NUMBER);
+
27  } else {
+
28  return fvar<T>(x2.val_, x2.d_);
+
29  }
+
30  }
+
31 
+
32  template <typename T>
+
33  inline fvar<T> fmin(const double x1, const fvar<T>& x2) {
+ + +
36  if (unlikely(boost::math::isnan(x1))) {
+
37  if (boost::math::isnan(x2.val_))
+
38  return fvar<T>(fmin(x1, x2.val_), NOT_A_NUMBER);
+
39  else
+
40  return fvar<T>(x2.val_, x2.d_);
+
41  } else if (unlikely(boost::math::isnan(x2.val_))) {
+
42  return fvar<T>(x1, 0.0);
+
43  } else if (x1 < x2.val_) {
+
44  return fvar<T>(x1, 0.0);
+
45  } else if (x1 == x2.val_) {
+
46  return fvar<T>(x2.val_, NOT_A_NUMBER);
+
47  } else {
+
48  return fvar<T>(x2.val_, x2.d_);
+
49  }
+
50  }
+
51 
+
52  template <typename T>
+
53  inline fvar<T> fmin(const fvar<T>& x1, const double x2) {
+ + +
56  if (unlikely(boost::math::isnan(x1.val_))) {
+
57  if (boost::math::isnan(x2))
+
58  return fvar<T>(fmin(x1.val_, x2), NOT_A_NUMBER);
+
59  else
+
60  return fvar<T>(x2, 0.0);
+
61  } else if (unlikely(boost::math::isnan(x2))) {
+
62  return fvar<T>(x1.val_, x1.d_);
+
63  } else if (x1.val_ < x2) {
+
64  return fvar<T>(x1.val_, x1.d_);
+
65  } else if (x1.val_ == x2) {
+
66  return fvar<T>(x1.val_, NOT_A_NUMBER);
+
67  } else {
+
68  return fvar<T>(x2, 0.0);
+
69  }
+
70  }
+
71 
+
72  }
+
73 }
+
74 #endif
+
fvar< T > fmin(const fvar< T > &x1, const fvar< T > &x2)
Definition: fmin.hpp:13
+ + +
const double NOT_A_NUMBER
(Quiet) not-a-number value.
Definition: constants.hpp:56
+
var fmin(double a, const stan::math::var &b)
Returns the minimum of a scalar and variable, promoting the scalar to a variable if it is larger (C99...
Definition: fmin.hpp:120
+
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
+
#define unlikely(x)
Definition: likely.hpp:9
+ + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2fmod_8hpp.html b/doc/api/html/fwd_2scal_2fun_2fmod_8hpp.html new file mode 100644 index 00000000000..42e487378f4 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2fmod_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/fmod.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
fmod.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
fvar< T > stan::math::fmod (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::fmod (const fvar< T > &x1, const double x2)
 
template<typename T >
fvar< T > stan::math::fmod (const double x1, const fvar< T > &x2)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2fmod_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2fmod_8hpp_source.html new file mode 100644 index 00000000000..7d9260a286d --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2fmod_8hpp_source.html @@ -0,0 +1,167 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/fmod.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
fmod.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_FMOD_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_FMOD_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ + +
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
13  template <typename T>
+
14  inline
+
15  fvar<T>
+
16  fmod(const fvar<T>& x1, const fvar<T>& x2) {
+
17  using std::fmod;
+
18  using std::floor;
+
19  return fvar<T>(fmod(x1.val_, x2.val_),
+
20  x1.d_ - x2.d_ * floor(x1.val_ / x2.val_));
+
21  }
+
22 
+
23  template <typename T>
+
24  inline
+
25  fvar<T>
+
26  fmod(const fvar<T>& x1, const double x2) {
+
27  using std::fmod;
+ + +
30  || boost::math::isnan(x2)))
+
31  return fvar<T>(fmod(x1.val_, x2), stan::math::NOT_A_NUMBER);
+
32  else
+
33  return fvar<T>(fmod(x1.val_, x2), x1.d_ / x2);
+
34  }
+
35 
+
36  template <typename T>
+
37  inline
+
38  fvar<T>
+
39  fmod(const double x1, const fvar<T>& x2) {
+
40  using std::fmod;
+
41  using std::floor;
+
42  return fvar<T>(fmod(x1, x2.val_), -x2.d_ * floor(x1 / x2.val_));
+
43  }
+
44  }
+
45 }
+
46 #endif
+ + +
const double NOT_A_NUMBER
(Quiet) not-a-number value.
Definition: constants.hpp:56
+
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > fmod(const fvar< T > &x1, const fvar< T > &x2)
Definition: fmod.hpp:16
+
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
+
#define unlikely(x)
Definition: likely.hpp:9
+ +
var fmod(const double a, const var &b)
Return the floating point remainder after dividing the first scalar by the second variable (cmath)...
Definition: fmod.hpp:137
+ +
fvar< T > floor(const fvar< T > &x)
Definition: floor.hpp:11
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2gamma__p_8hpp.html b/doc/api/html/fwd_2scal_2fun_2gamma__p_8hpp.html new file mode 100644 index 00000000000..3b819ca8457 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2gamma__p_8hpp.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/gamma_p.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
gamma_p.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
fvar< T > stan::math::gamma_p (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::gamma_p (const fvar< T > &x1, const double x2)
 
template<typename T >
fvar< T > stan::math::gamma_p (const double x1, const fvar< T > &x2)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2gamma__p_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2gamma__p_8hpp_source.html new file mode 100644 index 00000000000..26b80a7fee5 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2gamma__p_8hpp_source.html @@ -0,0 +1,222 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/gamma_p.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
gamma_p.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_GAMMA_P_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_GAMMA_P_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline
+
14  fvar<T>
+
15  gamma_p(const fvar<T>& x1, const fvar<T>& x2) {
+
16  using stan::math::gamma_p;
+
17  using std::log;
+
18  using std::exp;
+
19  using std::pow;
+
20  using std::fabs;
+
21  using boost::math::tgamma;
+ +
23 
+
24  T u = gamma_p(x1.val_, x2.val_);
+
25 
+
26  T S = 0;
+
27  T s = 1;
+
28  T l = log(x2.val_);
+
29  T g = tgamma(x1.val_);
+
30  T dig = digamma(x1.val_);
+
31 
+
32  int k = 0;
+
33  T delta = s / (x1.val_ * x1.val_);
+
34 
+
35  while (fabs(delta) > 1e-6) {
+
36  S += delta;
+
37  ++k;
+
38  s *= -x2.val_ / k;
+
39  delta = s / ((k + x1.val_) * (k + x1.val_));
+
40  }
+
41 
+
42  T der1 = u * (dig - l) + exp(x1.val_ * l) * S / g;
+
43  T der2 = exp(-x2.val_) * pow(x2.val_, x1.val_ - 1.0) / g;
+
44 
+
45  return fvar<T>(u, x1.d_ * -der1 + x2.d_ * der2);
+
46  }
+
47 
+
48  template <typename T>
+
49  inline
+
50  fvar<T>
+
51  gamma_p(const fvar<T>& x1, const double x2) {
+
52  using stan::math::gamma_p;
+
53  using std::log;
+
54  using std::exp;
+
55  using std::pow;
+
56  using std::fabs;
+
57  using boost::math::tgamma;
+ +
59 
+
60  T u = gamma_p(x1.val_, x2);
+
61 
+
62  T S = 0.0;
+
63  double s = 1.0;
+
64  double l = log(x2);
+
65  T g = tgamma(x1.val_);
+
66  T dig = digamma(x1.val_);
+
67 
+
68  int k = 0;
+
69  T delta = s / (x1.val_ * x1.val_);
+
70 
+
71  while (fabs(delta) > 1e-6) {
+
72  S += delta;
+
73  ++k;
+
74  s *= -x2 / k;
+
75  delta = s / ((k + x1.val_) * (k + x1.val_));
+
76  }
+
77 
+
78  T der1 = u * (dig - l) + exp(x1.val_ * l) * S / g;
+
79 
+
80  return fvar<T>(u, x1.d_ * -der1);
+
81  }
+
82 
+
83  template <typename T>
+
84  inline
+
85  fvar<T>
+
86  gamma_p(const double x1, const fvar<T>& x2) {
+
87  using stan::math::gamma_p;
+
88  using std::exp;
+
89  using std::pow;
+
90 
+
91  T u = gamma_p(x1, x2.val_);
+
92 
+
93  double g = boost::math::tgamma(x1);
+
94 
+
95  T der2 = exp(-x2.val_) * pow(x2.val_, x1 - 1.0) / g;
+
96 
+
97  return fvar<T>(u, x2.d_ * der2);
+
98  }
+
99  }
+
100 }
+
101 #endif
+ + +
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:14
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
fvar< T > gamma_p(const fvar< T > &x1, const fvar< T > &x2)
Definition: gamma_p.hpp:15
+ +
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
fvar< T > tgamma(const fvar< T > &x)
Definition: tgamma.hpp:15
+ +
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2gamma__q_8hpp.html b/doc/api/html/fwd_2scal_2fun_2gamma__q_8hpp.html new file mode 100644 index 00000000000..4169023e96e --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2gamma__q_8hpp.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/gamma_q.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
gamma_q.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
fvar< T > stan::math::gamma_q (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::gamma_q (const fvar< T > &x1, const double x2)
 
template<typename T >
fvar< T > stan::math::gamma_q (const double x1, const fvar< T > &x2)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2gamma__q_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2gamma__q_8hpp_source.html new file mode 100644 index 00000000000..d2f1978252a --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2gamma__q_8hpp_source.html @@ -0,0 +1,222 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/gamma_q.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
gamma_q.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_GAMMA_Q_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_GAMMA_Q_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline
+
14  fvar<T>
+
15  gamma_q(const fvar<T>& x1, const fvar<T>& x2) {
+
16  using stan::math::gamma_q;
+
17  using std::log;
+
18  using std::exp;
+
19  using std::pow;
+
20  using std::fabs;
+
21  using boost::math::tgamma;
+ +
23 
+
24  T u = gamma_q(x1.val_, x2.val_);
+
25 
+
26  T S = 0;
+
27  T s = 1;
+
28  T l = log(x2.val_);
+
29  T g = tgamma(x1.val_);
+
30  T dig = digamma(x1.val_);
+
31 
+
32  int k = 0;
+
33  T delta = s / (x1.val_ * x1.val_);
+
34 
+
35  while (fabs(delta) > 1e-6) {
+
36  S += delta;
+
37  ++k;
+
38  s *= -x2.val_ / k;
+
39  delta = s / ((k + x1.val_) * (k + x1.val_));
+
40  }
+
41 
+
42  T der1 = (1.0 - u) * (dig - l) + exp(x1.val_ * l) * S / g;
+
43  T der2 = -exp(-x2.val_) * pow(x2.val_, x1.val_ - 1.0) / g;
+
44 
+
45  return fvar<T>(u, x1.d_ * der1 + x2.d_ * der2);
+
46  }
+
47 
+
48  template <typename T>
+
49  inline
+
50  fvar<T>
+
51  gamma_q(const fvar<T>& x1, const double x2) {
+
52  using stan::math::gamma_q;
+
53  using std::log;
+
54  using std::exp;
+
55  using std::pow;
+
56  using std::fabs;
+
57  using boost::math::tgamma;
+ +
59 
+
60  T u = gamma_q(x1.val_, x2);
+
61 
+
62  T S = 0;
+
63  double s = 1;
+
64  double l = log(x2);
+
65  T g = tgamma(x1.val_);
+
66  T dig = digamma(x1.val_);
+
67 
+
68  int k = 0;
+
69  T delta = s / (x1.val_ * x1.val_);
+
70 
+
71  while (fabs(delta) > 1e-6) {
+
72  S += delta;
+
73  ++k;
+
74  s *= -x2 / k;
+
75  delta = s / ((k + x1.val_) * (k + x1.val_));
+
76  }
+
77 
+
78  T der1 = (1.0 - u) * (dig - l) + exp(x1.val_ * l) * S / g;
+
79 
+
80  return fvar<T>(u, x1.d_ * der1);
+
81  }
+
82 
+
83  template <typename T>
+
84  inline
+
85  fvar<T>
+
86  gamma_q(const double x1, const fvar<T>& x2) {
+
87  using stan::math::gamma_q;
+
88  using std::exp;
+
89  using std::pow;
+
90 
+
91  T u = gamma_q(x1, x2.val_);
+
92 
+
93  double g = boost::math::tgamma(x1);
+
94 
+
95  T der2 = -exp(-x2.val_) * pow(x2.val_, x1 - 1.0) / g;
+
96 
+
97  return fvar<T>(u, x2.d_ * der2);
+
98  }
+
99  }
+
100 }
+
101 #endif
+ + +
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:14
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ + +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
fvar< T > tgamma(const fvar< T > &x)
Definition: tgamma.hpp:15
+
fvar< T > gamma_q(const fvar< T > &x1, const fvar< T > &x2)
Definition: gamma_q.hpp:15
+ +
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2grad__inc__beta_8hpp.html b/doc/api/html/fwd_2scal_2fun_2grad__inc__beta_8hpp.html new file mode 100644 index 00000000000..17f38eab903 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2grad__inc__beta_8hpp.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/grad_inc_beta.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
grad_inc_beta.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
void stan::math::grad_inc_beta (stan::math::fvar< T > &g1, stan::math::fvar< T > &g2, stan::math::fvar< T > a, stan::math::fvar< T > b, stan::math::fvar< T > z)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2grad__inc__beta_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2grad__inc__beta_8hpp_source.html new file mode 100644 index 00000000000..db591a066bb --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2grad__inc__beta_8hpp_source.html @@ -0,0 +1,180 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/grad_inc_beta.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
grad_inc_beta.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_GRAD_INC_BETA_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_GRAD_INC_BETA_HPP
+
3 
+ + + + + + + +
11 #include <stan/math/fwd/core.hpp>
+ + +
14 #include <cmath>
+
15 
+
16 namespace stan {
+
17  namespace math {
+
18 
+
19  // Gradient of the incomplete beta function beta(a, b, z)
+
20  // with respect to the first two arguments, using the
+
21  // equivalence to a hypergeometric function.
+
22  // See http://dlmf.nist.gov/8.17#ii
+
23  template<typename T>
+ + + + + + + +
31  using stan::math::log1m;
+
32 
+
33  stan::math::fvar<T> c1 = log(z);
+
34  stan::math::fvar<T> c2 = log1m(z);
+
35  stan::math::fvar<T> c3 = exp(lbeta(a, b)) * inc_beta(a, b, z);
+
36 
+
37  stan::math::fvar<T> C = exp(a * c1 + b * c2) / a;
+
38 
+
39  stan::math::fvar<T> dF1 = 0;
+
40  stan::math::fvar<T> dF2 = 0;
+
41 
+
42  if (value_of(value_of(C)))
+
43  stan::math::grad_2F1(dF1, dF2, a + b,
+ +
45  a + 1, z);
+
46 
+
47  g1 = (c1 - 1.0 / a) * c3 + C * (dF1 + dF2);
+
48  g2 = c2 * c3 + C * dF1;
+
49  }
+
50 
+
51  }
+
52 }
+
53 #endif
+ + + +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
fvar< T > lbeta(const fvar< T > &x1, const fvar< T > &x2)
Definition: lbeta.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
fvar< T > inc_beta(const fvar< T > &a, const fvar< T > &b, const fvar< T > &x)
Definition: inc_beta.hpp:20
+
void grad_inc_beta(stan::math::fvar< T > &g1, stan::math::fvar< T > &g2, stan::math::fvar< T > a, stan::math::fvar< T > b, stan::math::fvar< T > z)
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ + + + + +
fvar< T > log1m(const fvar< T > &x)
Definition: log1m.hpp:16
+ +
void grad_2F1(T &gradA, T &gradC, T a, T b, T c, T z, T precision=1e-6)
Definition: grad_2F1.hpp:13
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2hypot_8hpp.html b/doc/api/html/fwd_2scal_2fun_2hypot_8hpp.html new file mode 100644 index 00000000000..f89315e703a --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2hypot_8hpp.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/hypot.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
hypot.hpp File Reference
+
+
+
#include <math.h>
+#include <stan/math/fwd/core.hpp>
+#include <stan/math/prim/scal/fun/inv.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
fvar< T > stan::math::hypot (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::hypot (const fvar< T > &x1, const double x2)
 
template<typename T >
fvar< T > stan::math::hypot (const double x1, const fvar< T > &x2)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2hypot_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2hypot_8hpp_source.html new file mode 100644 index 00000000000..365cf4c156c --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2hypot_8hpp_source.html @@ -0,0 +1,158 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/hypot.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
hypot.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_HYPOT_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_HYPOT_HPP
+
3 
+
4 #include <math.h>
+
5 #include <stan/math/fwd/core.hpp>
+ +
7 #include <cmath>
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline fvar<T> hypot(const fvar<T>& x1, const fvar<T>& x2) {
+ +
15  using std::sqrt;
+
16  using stan::math::inv;
+
17  T u = hypot(x1.val_, x2.val_);
+
18  return fvar<T>(u, (x1.d_ * x1.val_ + x2.d_ * x2.val_) * inv(u));
+
19  }
+
20 
+
21  template <typename T>
+
22  inline fvar<T> hypot(const fvar<T>& x1, const double x2) {
+ +
24  using std::sqrt;
+
25  using stan::math::inv;
+
26  T u = hypot(x1.val_, x2);
+
27  return fvar<T>(u, (x1.d_ * x1.val_) * inv(u));
+
28  }
+
29 
+
30  template <typename T>
+
31  inline fvar<T> hypot(const double x1, const fvar<T>& x2) {
+ +
33  using std::sqrt;
+
34  using stan::math::inv;
+
35  T u = hypot(x1, x2.val_);
+
36  return fvar<T>(u, (x2.d_ * x2.val_) * inv(u));
+
37  }
+
38 
+
39  }
+
40 }
+
41 #endif
+ + +
fvar< T > hypot(const fvar< T > &x1, const fvar< T > &x2)
Definition: hypot.hpp:13
+
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+ + + +
fvar< T > inv(const fvar< T > &x)
Definition: inv.hpp:15
+
var hypot(double a, const var &b)
Returns the length of the hypoteneuse of a right triangle with sides of the specified lengths (C99)...
Definition: hypot.hpp:116
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2inc__beta_8hpp.html b/doc/api/html/fwd_2scal_2fun_2inc__beta_8hpp.html new file mode 100644 index 00000000000..d931459a96f --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2inc__beta_8hpp.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/inc_beta.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inc_beta.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::inc_beta (const fvar< T > &a, const fvar< T > &b, const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2inc__beta_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2inc__beta_8hpp_source.html new file mode 100644 index 00000000000..b9099b2ea5d --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2inc__beta_8hpp_source.html @@ -0,0 +1,173 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/inc_beta.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inc_beta.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_INC_BETA_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_INC_BETA_HPP
+
3 
+
4 #include <boost/math/special_functions/beta.hpp>
+ + + + + + +
11 #include <stan/math/fwd/core.hpp>
+ + +
14 
+
15 namespace stan {
+
16 
+
17  namespace math {
+
18 
+
19  template<typename T>
+
20  inline fvar<T> inc_beta(const fvar<T>& a,
+
21  const fvar<T>& b,
+
22  const fvar<T>& x) {
+
23  using stan::math::digamma;
+ + +
26  using stan::math::lbeta;
+
27  using stan::math::digamma;
+
28  using stan::math::lbeta;
+
29  using stan::math::pow;
+
30  using std::exp;
+
31  using std::pow;
+
32 
+
33  T d_a; T d_b; T d_x;
+
34 
+
35  grad_reg_inc_beta(d_a, d_b, a.val_, b.val_, x.val_,
+
36  digamma(a.val_), digamma(b.val_),
+
37  digamma(a.val_+b.val_),
+
38  exp(lbeta(a.val_, b.val_)));
+
39  d_x = pow((1-x.val_), b.val_-1)*pow(x.val_, a.val_-1)
+
40  / exp(lbeta(a.val_, b.val_));
+
41  return fvar<T>(inc_beta(a.val_, b.val_, x.val_),
+
42  a.d_ * d_a + b.d_ * d_b + x.d_ * d_x);
+
43  }
+
44  }
+
45 }
+
46 
+
47 #endif
+ + +
fvar< T > lbeta(const fvar< T > &x1, const fvar< T > &x2)
Definition: lbeta.hpp:16
+ + + + +
fvar< T > inc_beta(const fvar< T > &a, const fvar< T > &b, const fvar< T > &x)
Definition: inc_beta.hpp:20
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ + +
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+ +
void grad_reg_inc_beta(T &g1, T &g2, T a, T b, T z, T digammaA, T digammaB, T digammaSum, T betaAB)
+ + +
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2inv_8hpp.html b/doc/api/html/fwd_2scal_2fun_2inv_8hpp.html new file mode 100644 index 00000000000..b4a57df85f8 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2inv_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/inv.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::inv (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2inv_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2inv_8hpp_source.html new file mode 100644 index 00000000000..6edf3695f93 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2inv_8hpp_source.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/inv.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_INV_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_INV_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline
+
14  fvar<T>
+
15  inv(const fvar<T>& x) {
+
16  using stan::math::square;
+
17  return fvar<T>(1 / x.val_, -x.d_ / square(x.val_));
+
18  }
+
19  }
+
20 }
+
21 #endif
+ + + +
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+ + +
fvar< T > inv(const fvar< T > &x)
Definition: inv.hpp:15
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2inv___phi_8hpp.html b/doc/api/html/fwd_2scal_2fun_2inv___phi_8hpp.html new file mode 100644 index 00000000000..82817efbec2 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2inv___phi_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/inv_Phi.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv_Phi.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::inv_Phi (const fvar< T > &p)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2inv___phi_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2inv___phi_8hpp_source.html new file mode 100644 index 00000000000..45755a91dfc --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2inv___phi_8hpp_source.html @@ -0,0 +1,143 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/inv_Phi.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv_Phi.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_INV_PHI_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_INV_PHI_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ + + +
9 
+
10 namespace stan {
+
11 
+
12  namespace math {
+
13 
+
14  template <typename T>
+
15  inline fvar<T> inv_Phi(const fvar<T>& p) {
+
16  using stan::math::inv_Phi;
+
17  using std::exp;
+
18  T xv = inv_Phi(p.val_);
+
19  return fvar<T>(xv,
+
20  p.d_ / exp(-0.5 * square(xv)) * SQRT_2_TIMES_SQRT_PI);
+
21  }
+
22  }
+
23 }
+
24 #endif
+ + +
fvar< T > inv_Phi(const fvar< T > &p)
Definition: inv_Phi.hpp:15
+ +
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+
const double SQRT_2_TIMES_SQRT_PI
Definition: constants.hpp:158
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2inv__cloglog_8hpp.html b/doc/api/html/fwd_2scal_2fun_2inv__cloglog_8hpp.html new file mode 100644 index 00000000000..c7e56ef09c2 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2inv__cloglog_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/inv_cloglog.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv_cloglog.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::inv_cloglog (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2inv__cloglog_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2inv__cloglog_8hpp_source.html new file mode 100644 index 00000000000..cb2476ae8c9 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2inv__cloglog_8hpp_source.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/inv_cloglog.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv_cloglog.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_INV_CLOGLOG_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_INV_CLOGLOG_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline
+
14  fvar<T>
+
15  inv_cloglog(const fvar<T>& x) {
+
16  using std::exp;
+ +
18  return fvar<T>(inv_cloglog(x.val_), x.d_ * exp(x.val_ - exp(x.val_)));
+
19  }
+
20  }
+
21 }
+
22 #endif
+ + + + +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
fvar< T > inv_cloglog(const fvar< T > &x)
Definition: inv_cloglog.hpp:15
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2inv__logit_8hpp.html b/doc/api/html/fwd_2scal_2fun_2inv__logit_8hpp.html new file mode 100644 index 00000000000..5a594ca5186 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2inv__logit_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/inv_logit.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv_logit.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::inv_logit (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2inv__logit_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2inv__logit_8hpp_source.html new file mode 100644 index 00000000000..748a96d73a6 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2inv__logit_8hpp_source.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/inv_logit.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv_logit.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_INV_LOGIT_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_INV_LOGIT_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline
+
14  fvar<T>
+
15  inv_logit(const fvar<T>& x) {
+
16  using std::exp;
+
17  using std::pow;
+ +
19  return fvar<T>(inv_logit(x.val_),
+
20  x.d_ * inv_logit(x.val_) * (1 - inv_logit(x.val_)));
+
21  }
+
22  }
+
23 }
+
24 #endif
+ + +
fvar< T > inv_logit(const fvar< T > &x)
Definition: inv_logit.hpp:15
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2inv__sqrt_8hpp.html b/doc/api/html/fwd_2scal_2fun_2inv__sqrt_8hpp.html new file mode 100644 index 00000000000..be2d5570c72 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2inv__sqrt_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/inv_sqrt.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv_sqrt.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <boost/math/tools/promotion.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::inv_sqrt (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2inv__sqrt_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2inv__sqrt_8hpp_source.html new file mode 100644 index 00000000000..6dd1e9b695a --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2inv__sqrt_8hpp_source.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/inv_sqrt.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv_sqrt.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_INV_SQRT_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_INV_SQRT_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+
6 #include <boost/math/tools/promotion.hpp>
+
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline
+
14  fvar<T>
+
15  inv_sqrt(const fvar<T>& x) {
+
16  using std::sqrt;
+
17  T sqrt_x(sqrt(x.val_));
+
18  return fvar<T>(1 / sqrt_x, -0.5 * x.d_ / (x.val_ * sqrt_x));
+
19  }
+
20  }
+
21 }
+
22 #endif
+ +
fvar< T > inv_sqrt(const fvar< T > &x)
Definition: inv_sqrt.hpp:15
+ +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2inv__square_8hpp.html b/doc/api/html/fwd_2scal_2fun_2inv__square_8hpp.html new file mode 100644 index 00000000000..424a4131cfb --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2inv__square_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/inv_square.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv_square.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::inv_square (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2inv__square_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2inv__square_8hpp_source.html new file mode 100644 index 00000000000..63d98c31b03 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2inv__square_8hpp_source.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/inv_square.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv_square.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_INV_SQUARE_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_INV_SQUARE_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline
+
14  fvar<T>
+
15  inv_square(const fvar<T>& x) {
+
16  using stan::math::square;
+
17  T square_x(square(x.val_));
+
18  return fvar<T>(1 / square_x, -2 * x.d_ / (square_x * x.val_));
+
19  }
+
20  }
+
21 }
+
22 #endif
+ + + +
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+ +
fvar< T > inv_square(const fvar< T > &x)
Definition: inv_square.hpp:15
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2is__inf_8hpp.html b/doc/api/html/fwd_2scal_2fun_2is__inf_8hpp.html new file mode 100644 index 00000000000..9977908eb96 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2is__inf_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/is_inf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
is_inf.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
int stan::math::is_inf (const fvar< T > &x)
 Returns 1 if the input's value is infinite and 0 otherwise. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2is__inf_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2is__inf_8hpp_source.html new file mode 100644 index 00000000000..43b47a2ebd2 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2is__inf_8hpp_source.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/is_inf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
is_inf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_IS_INF_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_IS_INF_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ +
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
19  template <typename T>
+
20  inline
+
21  int
+
22  is_inf(const fvar<T>& x) {
+
23  using stan::math::is_inf;
+
24  return is_inf(x.val());
+
25  }
+
26 
+
27  }
+
28 }
+
29 
+
30 #endif
+ + +
int is_inf(const fvar< T > &x)
Returns 1 if the input's value is infinite and 0 otherwise.
Definition: is_inf.hpp:22
+
T val() const
Definition: fvar.hpp:17
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2is__nan_8hpp.html b/doc/api/html/fwd_2scal_2fun_2is__nan_8hpp.html new file mode 100644 index 00000000000..7fc27897d11 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2is__nan_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/is_nan.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
is_nan.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
int stan::math::is_nan (const fvar< T > &x)
 Returns 1 if the input's value is NaN and 0 otherwise. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2is__nan_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2is__nan_8hpp_source.html new file mode 100644 index 00000000000..7e90d497ba4 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2is__nan_8hpp_source.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/is_nan.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
is_nan.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_IS_NAN_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_IS_NAN_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ +
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
19  template <typename T>
+
20  inline
+
21  int
+
22  is_nan(const fvar<T>& x) {
+
23  using stan::math::is_nan;
+
24  return is_nan(x.val());
+
25  }
+
26 
+
27  }
+
28 }
+
29 
+
30 #endif
+ + +
T val() const
Definition: fvar.hpp:17
+
int is_nan(const fvar< T > &x)
Returns 1 if the input's value is NaN and 0 otherwise.
Definition: is_nan.hpp:22
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2lbeta_8hpp.html b/doc/api/html/fwd_2scal_2fun_2lbeta_8hpp.html new file mode 100644 index 00000000000..a8a7560b531 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2lbeta_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/lbeta.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
lbeta.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <boost/math/special_functions/digamma.hpp>
+#include <stan/math/prim/scal/fun/lbeta.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
fvar< T > stan::math::lbeta (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::lbeta (const double x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::lbeta (const fvar< T > &x1, const double x2)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2lbeta_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2lbeta_8hpp_source.html new file mode 100644 index 00000000000..50f28a3b1bc --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2lbeta_8hpp_source.html @@ -0,0 +1,161 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/lbeta.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
lbeta.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_LBETA_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_LBETA_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+
6 #include <boost/math/special_functions/digamma.hpp>
+ +
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
13  template <typename T>
+
14  inline
+
15  fvar<T>
+
16  lbeta(const fvar<T>& x1, const fvar<T>& x2) {
+
17  using stan::math::lbeta;
+ +
19  return fvar<T>(lbeta(x1.val_, x2.val_),
+
20  x1.d_ * digamma(x1.val_)
+
21  + x2.d_ * digamma(x2.val_)
+
22  - (x1.d_ + x2.d_) * digamma(x1.val_ + x2.val_));
+
23  }
+
24 
+
25  template <typename T>
+
26  inline
+
27  fvar<T>
+
28  lbeta(const double x1, const fvar<T>& x2) {
+
29  using stan::math::lbeta;
+ +
31  return fvar<T>(lbeta(x1, x2.val_),
+
32  x2.d_ * digamma(x2.val_) - x2.d_ * digamma(x1 + x2.val_));
+
33  }
+
34 
+
35  template <typename T>
+
36  inline
+
37  fvar<T>
+
38  lbeta(const fvar<T>& x1, const double x2) {
+
39  using stan::math::lbeta;
+ +
41  return fvar<T>(lbeta(x1.val_, x2),
+
42  x1.d_ * digamma(x1.val_) - x1.d_ * digamma(x1.val_ + x2));
+
43  }
+
44  }
+
45 }
+
46 #endif
+ + +
fvar< T > lbeta(const fvar< T > &x1, const fvar< T > &x2)
Definition: lbeta.hpp:16
+ + + +
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2lgamma_8hpp.html b/doc/api/html/fwd_2scal_2fun_2lgamma_8hpp.html new file mode 100644 index 00000000000..ed01b8f89bd --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2lgamma_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/lgamma.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
lgamma.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <boost/math/special_functions/digamma.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::lgamma (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2lgamma_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2lgamma_8hpp_source.html new file mode 100644 index 00000000000..f2fa48dca2d --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2lgamma_8hpp_source.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/lgamma.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
lgamma.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_LGAMMA_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_LGAMMA_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+
6 #include <boost/math/special_functions/digamma.hpp>
+
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline
+
14  fvar<T>
+
15  lgamma(const fvar<T>& x) {
+ +
17  using boost::math::lgamma;
+
18  return fvar<T>(lgamma(x.val_), x.d_ * digamma(x.val_));
+
19  }
+
20  }
+
21 }
+
22 #endif
+ + +
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
+
var lgamma(const stan::math::var &a)
The log gamma function for variables (C99).
Definition: lgamma.hpp:35
+ + +
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2lmgamma_8hpp.html b/doc/api/html/fwd_2scal_2fun_2lmgamma_8hpp.html new file mode 100644 index 00000000000..14c788df499 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2lmgamma_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/lmgamma.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
lmgamma.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< typename
+stan::return_type< T, int >
+::type > 
stan::math::lmgamma (int x1, const fvar< T > &x2)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2lmgamma_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2lmgamma_8hpp_source.html new file mode 100644 index 00000000000..bf958f1aba5 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2lmgamma_8hpp_source.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/lmgamma.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
lmgamma.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_LMGAMMA_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_LMGAMMA_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ + + +
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
13  template <typename T>
+
14  inline
+
15  fvar<typename stan::return_type<T, int>::type>
+
16  lmgamma(int x1, const fvar<T>& x2) {
+
17  using stan::math::lmgamma;
+
18  using stan::math::digamma;
+
19  using std::log;
+
20  T deriv = 0;
+
21  for (int count = 1; count < x1 + 1; count++)
+
22  deriv += x2.d_ * digamma(x2.val_ + (1.0 - count) / 2.0);
+
23  return fvar<typename
+ +
25  }
+
26  }
+
27 }
+
28 #endif
+ + + +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ + +
fvar< typename stan::return_type< T, int >::type > lmgamma(int x1, const fvar< T > &x2)
Definition: lmgamma.hpp:16
+ +
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2log10_8hpp.html b/doc/api/html/fwd_2scal_2fun_2log10_8hpp.html new file mode 100644 index 00000000000..69293fa9a04 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2log10_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/log10.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log10.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::log10 (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2log10_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2log10_8hpp_source.html new file mode 100644 index 00000000000..e30a0dcc292 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2log10_8hpp_source.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/log10.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log10.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_LOG10_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_LOG10_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline
+
14  fvar<T>
+
15  log10(const fvar<T>& x) {
+
16  using std::log;
+
17  using std::log10;
+ +
19  if (x.val_ < 0.0)
+ +
21  else
+
22  return fvar<T>(log10(x.val_), x.d_ / (x.val_ * stan::math::LOG_10));
+
23  }
+
24  }
+
25 }
+
26 #endif
+ + +
const double NOT_A_NUMBER
(Quiet) not-a-number value.
Definition: constants.hpp:56
+
var log10(const var &a)
Return the base 10 log of the specified variable (cmath).
Definition: log10.hpp:54
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
const double LOG_10
The natural logarithm of 10, .
Definition: constants.hpp:39
+
fvar< T > log10(const fvar< T > &x)
Definition: log10.hpp:15
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2log1m_8hpp.html b/doc/api/html/fwd_2scal_2fun_2log1m_8hpp.html new file mode 100644 index 00000000000..e1e3ad8b08f --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2log1m_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/log1m.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log1m.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::log1m (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2log1m_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2log1m_8hpp_source.html new file mode 100644 index 00000000000..be477faa4a4 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2log1m_8hpp_source.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/log1m.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log1m.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_LOG1M_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_LOG1M_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ + +
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
13  template <typename T>
+
14  inline
+
15  fvar<T>
+
16  log1m(const fvar<T>& x) {
+
17  using stan::math::log1m;
+ +
19  if (x.val_ > 1.0)
+ +
21  else
+
22  return fvar<T>(log1m(x.val_), -x.d_ / (1 - x.val_));
+
23  }
+
24  }
+
25 }
+
26 #endif
+ + +
const double NOT_A_NUMBER
(Quiet) not-a-number value.
Definition: constants.hpp:56
+ + + +
fvar< T > log1m(const fvar< T > &x)
Definition: log1m.hpp:16
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2log1m__exp_8hpp.html b/doc/api/html/fwd_2scal_2fun_2log1m__exp_8hpp.html new file mode 100644 index 00000000000..dfac25bb5d7 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2log1m__exp_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/log1m_exp.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log1m_exp.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::log1m_exp (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2log1m__exp_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2log1m__exp_8hpp_source.html new file mode 100644 index 00000000000..0131cc3e6f9 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2log1m__exp_8hpp_source.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/log1m_exp.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log1m_exp.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_LOG1M_EXP_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_LOG1M_EXP_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ + + +
8 #include <cmath>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
13  template <typename T>
+
14  inline
+
15  fvar<T>
+
16  log1m_exp(const fvar<T>& x) {
+ + + +
20  if (x.val_ >= 0)
+
21  return fvar<T>(NOT_A_NUMBER);
+
22  return fvar<T>(log1m_exp(x.val_), x.d_ / -expm1(-x.val_));
+
23  }
+
24 
+
25  }
+
26 }
+
27 #endif
+ + + +
const double NOT_A_NUMBER
(Quiet) not-a-number value.
Definition: constants.hpp:56
+
fvar< T > expm1(const fvar< T > &x)
Definition: expm1.hpp:12
+ +
fvar< T > log1m_exp(const fvar< T > &x)
Definition: log1m_exp.hpp:16
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2log1m__inv__logit_8hpp.html b/doc/api/html/fwd_2scal_2fun_2log1m__inv__logit_8hpp.html new file mode 100644 index 00000000000..10099e64c93 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2log1m__inv__logit_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/log1m_inv_logit.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log1m_inv_logit.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::log1m_inv_logit (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2log1m__inv__logit_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2log1m__inv__logit_8hpp_source.html new file mode 100644 index 00000000000..945830d4046 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2log1m__inv__logit_8hpp_source.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/log1m_inv_logit.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log1m_inv_logit.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_LOG1M_INV_LOGIT_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_LOG1M_INV_LOGIT_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline
+
14  fvar<T>
+ +
16  using std::exp;
+ +
18  return fvar<T>(log1m_inv_logit(x.val_),
+
19  -x.d_ / (1 + exp(-x.val_)));
+
20  }
+
21  }
+
22 }
+
23 #endif
+
fvar< T > log1m_inv_logit(const fvar< T > &x)
+ + + +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2log1p_8hpp.html b/doc/api/html/fwd_2scal_2fun_2log1p_8hpp.html new file mode 100644 index 00000000000..a536fc50d0a --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2log1p_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/log1p.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log1p.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::log1p (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2log1p_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2log1p_8hpp_source.html new file mode 100644 index 00000000000..e2ddff7f30a --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2log1p_8hpp_source.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/log1p.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log1p.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_LOG1P_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_LOG1P_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ + +
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
13  template <typename T>
+
14  inline
+
15  fvar<T>
+
16  log1p(const fvar<T>& x) {
+
17  using stan::math::log1p;
+ +
19  if (x.val_ < -1.0)
+ +
21  else
+
22  return fvar<T>(log1p(x.val_), x.d_ / (1 + x.val_));
+
23  }
+
24  }
+
25 }
+
26 #endif
+ + +
const double NOT_A_NUMBER
(Quiet) not-a-number value.
Definition: constants.hpp:56
+ + +
fvar< T > log1p(const fvar< T > &x)
Definition: log1p.hpp:16
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2log1p__exp_8hpp.html b/doc/api/html/fwd_2scal_2fun_2log1p__exp_8hpp.html new file mode 100644 index 00000000000..6cb7c80c2cd --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2log1p__exp_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/log1p_exp.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log1p_exp.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::log1p_exp (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2log1p__exp_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2log1p__exp_8hpp_source.html new file mode 100644 index 00000000000..86a75ab6557 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2log1p__exp_8hpp_source.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/log1p_exp.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log1p_exp.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_LOG1P_EXP_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_LOG1P_EXP_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  template <typename T>
+
11  inline
+
12  fvar<T>
+
13  log1p_exp(const fvar<T>& x) {
+ +
15  using std::exp;
+
16  return fvar<T>(log1p_exp(x.val_), x.d_ / (1 + exp(-x.val_)));
+
17  }
+
18 
+
19  }
+
20 }
+
21 #endif
+ + + +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ +
fvar< T > log1p_exp(const fvar< T > &x)
Definition: log1p_exp.hpp:13
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2log2_8hpp.html b/doc/api/html/fwd_2scal_2fun_2log2_8hpp.html new file mode 100644 index 00000000000..e188f8f616a --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2log2_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/log2.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log2.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::log2 (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2log2_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2log2_8hpp_source.html new file mode 100644 index 00000000000..8b6c93b31c5 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2log2_8hpp_source.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/log2.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log2.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_LOG2_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_LOG2_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ + +
8 
+
9 
+
10 namespace stan {
+
11 
+
12  namespace math {
+
13 
+
14  template <typename T>
+
15  inline
+
16  fvar<T>
+
17  log2(const fvar<T>& x) {
+
18  using std::log;
+
19  using stan::math::log2;
+ +
21  if (x.val_ < 0.0)
+ +
23  else
+
24  return fvar<T>(log2(x.val_), x.d_ / (x.val_ * stan::math::LOG_2));
+
25  }
+
26  }
+
27 }
+
28 #endif
+
const double LOG_2
The natural logarithm of 2, .
Definition: constants.hpp:33
+ + +
const double NOT_A_NUMBER
(Quiet) not-a-number value.
Definition: constants.hpp:56
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ + + +
fvar< T > log2(const fvar< T > &x)
Definition: log2.hpp:17
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2log_8hpp.html b/doc/api/html/fwd_2scal_2fun_2log_8hpp.html new file mode 100644 index 00000000000..aa01e01c18d --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2log_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::log (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2log_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2log_8hpp_source.html new file mode 100644 index 00000000000..a9f91fe2852 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2log_8hpp_source.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_LOG_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_LOG_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline
+
14  fvar<T>
+
15  log(const fvar<T>& x) {
+
16  using std::log;
+ +
18  if (x.val_ < 0.0)
+ +
20  else
+
21  return fvar<T>(log(x.val_), x.d_ / x.val_);
+
22  }
+
23  }
+
24 }
+
25 #endif
+ + +
const double NOT_A_NUMBER
(Quiet) not-a-number value.
Definition: constants.hpp:56
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
var log(const var &a)
Return the natural log of the specified variable (cmath).
Definition: log.hpp:50
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2log__diff__exp_8hpp.html b/doc/api/html/fwd_2scal_2fun_2log__diff__exp_8hpp.html new file mode 100644 index 00000000000..9bdf5cddf44 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2log__diff__exp_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/log_diff_exp.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_diff_exp.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
fvar< T > stan::math::log_diff_exp (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T1 , typename T2 >
fvar< T2 > stan::math::log_diff_exp (const T1 &x1, const fvar< T2 > &x2)
 
template<typename T1 , typename T2 >
fvar< T1 > stan::math::log_diff_exp (const fvar< T1 > &x1, const T2 &x2)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2log__diff__exp_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2log__diff__exp_8hpp_source.html new file mode 100644 index 00000000000..72e05e6505e --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2log__diff__exp_8hpp_source.html @@ -0,0 +1,165 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/log_diff_exp.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_diff_exp.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_LOG_DIFF_EXP_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_LOG_DIFF_EXP_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ + +
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
13  template <typename T> inline fvar<T>
+
14  log_diff_exp(const fvar<T>& x1, const fvar<T>& x2) {
+ + +
17  using std::exp;
+
18  if (x1.val_ <= x2.val_)
+ +
20  return fvar<T>(log_diff_exp(x1.val_, x2.val_),
+
21  x1.d_ / (1 - exp(x2.val_ - x1.val_))
+
22  + x2.d_ / (1 - exp(x1.val_ - x2.val_)));
+
23  }
+
24 
+
25  template <typename T1, typename T2> inline fvar<T2>
+
26  log_diff_exp(const T1& x1, const fvar<T2>& x2) {
+ + +
29  using std::exp;
+
30  if (x1 <= x2.val_)
+ +
32  return fvar<T2>(log_diff_exp(x1, x2.val_),
+
33  x2.d_ / (1 - exp(x1 - x2.val_)));
+
34  }
+
35 
+
36  template <typename T1, typename T2> inline fvar<T1>
+
37  log_diff_exp(const fvar<T1>& x1, const T2& x2) {
+ + +
40  using std::exp;
+
41  if (x1.val_ <= x2)
+ +
43  return fvar<T1>(log_diff_exp(x1.val_, x2),
+
44  x1.d_ / (1 - exp(x2 - x1.val_)));
+
45  }
+
46  }
+
47 }
+
48 #endif
+ + + +
const double NOT_A_NUMBER
(Quiet) not-a-number value.
Definition: constants.hpp:56
+
fvar< T > log_diff_exp(const fvar< T > &x1, const fvar< T > &x2)
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2log__falling__factorial_8hpp.html b/doc/api/html/fwd_2scal_2fun_2log__falling__factorial_8hpp.html new file mode 100644 index 00000000000..a2c53ced18d --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2log__falling__factorial_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/log_falling_factorial.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_falling_factorial.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <stan/math/prim/scal/fun/log_falling_factorial.hpp>
+#include <boost/math/special_functions/digamma.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
fvar< T > stan::math::log_falling_factorial (const fvar< T > &x, const fvar< T > &n)
 
template<typename T >
fvar< T > stan::math::log_falling_factorial (const double x, const fvar< T > &n)
 
template<typename T >
fvar< T > stan::math::log_falling_factorial (const fvar< T > &x, const double n)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2log__falling__factorial_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2log__falling__factorial_8hpp_source.html new file mode 100644 index 00000000000..fc4a0a27b90 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2log__falling__factorial_8hpp_source.html @@ -0,0 +1,159 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/log_falling_factorial.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_falling_factorial.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_LOG_FALLING_FACTORIAL_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_LOG_FALLING_FACTORIAL_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ +
7 #include <boost/math/special_functions/digamma.hpp>
+
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
13  template<typename T>
+
14  inline fvar<T>
+
15  log_falling_factorial(const fvar<T>& x, const fvar<T>& n) {
+ + +
18 
+ +
20  digamma(x.val_ + 1) * x.d_ - digamma(n.val_ + 1) * n.d_);
+
21  }
+
22 
+
23  template<typename T>
+
24  inline fvar<T>
+
25  log_falling_factorial(const double x, const fvar<T>& n) {
+ + +
28 
+
29  return fvar<T>(log_falling_factorial(x, n.val_),
+
30  -digamma(n.val_ + 1) * n.d_);
+
31  }
+
32 
+
33  template<typename T>
+
34  inline fvar<T>
+
35  log_falling_factorial(const fvar<T>& x, const double n) {
+ + +
38 
+
39  return fvar<T>(log_falling_factorial(x.val_, n),
+
40  digamma(x.val_ + 1) * x.d_);
+
41  }
+
42  }
+
43 }
+
44 #endif
+ +
fvar< T > log_falling_factorial(const fvar< T > &x, const fvar< T > &n)
+ + + + +
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2log__inv__logit_8hpp.html b/doc/api/html/fwd_2scal_2fun_2log__inv__logit_8hpp.html new file mode 100644 index 00000000000..b22aca045b6 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2log__inv__logit_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/log_inv_logit.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_inv_logit.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::log_inv_logit (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2log__inv__logit_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2log__inv__logit_8hpp_source.html new file mode 100644 index 00000000000..8cc73969721 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2log__inv__logit_8hpp_source.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/log_inv_logit.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_inv_logit.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_LOG_INV_LOGIT_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_LOG_INV_LOGIT_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline
+
14  fvar<T>
+
15  log_inv_logit(const fvar<T>& x) {
+
16  using std::exp;
+ +
18  return fvar<T>(log_inv_logit(x.val_),
+
19  x.d_ / (1 + exp(x.val_)));
+
20  }
+
21  }
+
22 }
+
23 #endif
+ + + + +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
fvar< T > log_inv_logit(const fvar< T > &x)
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2log__mix_8hpp.html b/doc/api/html/fwd_2scal_2fun_2log__mix_8hpp.html new file mode 100644 index 00000000000..20449f37fd3 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2log__mix_8hpp.html @@ -0,0 +1,155 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/log_mix.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_mix.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/fun/log_mix.hpp>
+#include <boost/math/tools/promotion.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T_theta , typename T_lambda1 , typename T_lambda2 , int N>
void stan::math::log_mix_partial_helper (const T_theta &theta, const T_lambda1 &lambda1, const T_lambda2 &lambda2, typename promote_args< T_theta, T_lambda1, T_lambda2 >::type(&partials_array)[N])
 
template<typename T >
fvar< T > stan::math::log_mix (const fvar< T > &theta, const fvar< T > &lambda1, const fvar< T > &lambda2)
 Return the log mixture density with specified mixing proportion and log densities and its derivative at each. More...
 
template<typename T >
fvar< T > stan::math::log_mix (const fvar< T > &theta, const fvar< T > &lambda1, const double lambda2)
 
template<typename T >
fvar< T > stan::math::log_mix (const fvar< T > &theta, const double lambda1, const fvar< T > &lambda2)
 
template<typename T >
fvar< T > stan::math::log_mix (const double theta, const fvar< T > &lambda1, const fvar< T > &lambda2)
 
template<typename T >
fvar< T > stan::math::log_mix (const fvar< T > &theta, const double lambda1, const double lambda2)
 
template<typename T >
fvar< T > stan::math::log_mix (const double theta, const fvar< T > &lambda1, const double lambda2)
 
template<typename T >
fvar< T > stan::math::log_mix (const double theta, const double lambda1, const fvar< T > &lambda2)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2log__mix_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2log__mix_8hpp_source.html new file mode 100644 index 00000000000..e1df5c3eef0 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2log__mix_8hpp_source.html @@ -0,0 +1,356 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/log_mix.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_mix.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_LOG_MIX_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_LOG_MIX_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ + +
7 #include <boost/math/tools/promotion.hpp>
+
8 #include <cmath>
+
9 
+
10 namespace stan {
+
11 
+
12  namespace math {
+
13  using boost::math::tools::promote_args;
+
14  using boost::is_same;
+
15 
+
16  /* Returns an array of size N with partials of log_mix wrt to its
+
17  * parameters instantiated as fvar<T>
+
18  *
+
19  * @tparam T_theta theta scalar type
+
20  * @tparam T_lambda1 lambda_1 scalar type
+
21  * @tparam T_lambda2 lambda_2 scalar type
+
22  *
+
23  * @param[in] N output array size
+
24  * @param[in] theta_d mixing proportion theta
+
25  * @param[in] lambda1_d log_density with mixing proportion theta
+
26  * @param[in] lambda2_d log_density with mixing proportion 1.0 - theta
+
27  * @param[out] partials_array array of partials derivatives
+
28  */
+
29  template <typename T_theta, typename T_lambda1, typename T_lambda2, int N>
+
30  inline void
+
31  log_mix_partial_helper(const T_theta& theta,
+
32  const T_lambda1& lambda1,
+
33  const T_lambda2& lambda2,
+
34  typename
+
35  promote_args<T_theta, T_lambda1, T_lambda2>::type
+
36  (&partials_array)[N]) {
+
37  typedef typename promote_args<T_theta, T_lambda1, T_lambda2>::type
+
38  partial_return_type;
+
39  using std::exp;
+
40 
+
41  typename promote_args<T_lambda1, T_lambda2>::type lam2_m_lam1
+
42  = lambda2 - lambda1;
+
43  typename promote_args<T_lambda1, T_lambda2>::type exp_lam2_m_lam1
+
44  = exp(lam2_m_lam1);
+
45  typename promote_args<T_lambda1, T_lambda2>::type one_m_exp_lam2_m_lam1
+
46  = 1.0 - exp_lam2_m_lam1;
+
47  typename promote_args<double, T_theta>::type one_m_t = 1.0 - theta;
+
48  partial_return_type one_m_t_prod_exp_lam2_m_lam1
+
49  = one_m_t * exp_lam2_m_lam1;
+
50  partial_return_type t_plus_one_m_t_prod_exp_lam2_m_lam1
+
51  = theta + one_m_t_prod_exp_lam2_m_lam1;
+
52  partial_return_type one_d_t_plus_one_m_t_prod_exp_lam2_m_lam1
+
53  = 1.0 / t_plus_one_m_t_prod_exp_lam2_m_lam1;
+
54 
+
55  unsigned int offset = 0;
+
56  if (is_same<T_theta, partial_return_type>::value) {
+
57  partials_array[offset]
+
58  = one_m_exp_lam2_m_lam1
+
59  * one_d_t_plus_one_m_t_prod_exp_lam2_m_lam1;
+
60  ++offset;
+
61  }
+
62  if (is_same<T_lambda1, partial_return_type>::value) {
+
63  partials_array[offset]
+
64  = theta * one_d_t_plus_one_m_t_prod_exp_lam2_m_lam1;
+
65  ++offset;
+
66  }
+
67  if (is_same<T_lambda2, partial_return_type>::value) {
+
68  partials_array[offset]
+
69  = one_m_t_prod_exp_lam2_m_lam1
+
70  * one_d_t_plus_one_m_t_prod_exp_lam2_m_lam1;
+
71  }
+
72  }
+
73 
+
113  template <typename T>
+
114  inline
+
115  fvar<T>
+
116  log_mix(const fvar<T>& theta, const fvar<T>& lambda1,
+
117  const fvar<T>& lambda2) {
+
118  using stan::math::log_mix;
+
119  using stan::math::value_of;
+
120 
+
121  if (lambda1.val_ > lambda2.val_) {
+
122  fvar<T> partial_deriv_array[3];
+
123  log_mix_partial_helper(theta, lambda1, lambda2, partial_deriv_array);
+
124  return fvar<T>(log_mix(theta.val_, lambda1.val_, lambda2.val_),
+
125  theta.d_ * value_of(partial_deriv_array[0])
+
126  + lambda1.d_ * value_of(partial_deriv_array[1])
+
127  + lambda2.d_ * value_of(partial_deriv_array[2]));
+
128  } else {
+
129  fvar<T> partial_deriv_array[3];
+
130  log_mix_partial_helper(1.0 - theta, lambda2, lambda1,
+
131  partial_deriv_array);
+
132  return fvar<T>(log_mix(theta.val_, lambda1.val_, lambda2.val_),
+
133  -theta.d_ * value_of(partial_deriv_array[0])
+
134  + lambda1.d_ * value_of(partial_deriv_array[2])
+
135  + lambda2.d_ * value_of(partial_deriv_array[1]));
+
136  }
+
137  }
+
138 
+
139  template <typename T>
+
140  inline
+
141  fvar<T>
+
142  log_mix(const fvar<T>& theta, const fvar<T>& lambda1,
+
143  const double lambda2) {
+
144  using stan::math::log_mix;
+
145  using stan::math::value_of;
+
146 
+
147  if (lambda1.val_ > lambda2) {
+
148  fvar<T> partial_deriv_array[2];
+
149  log_mix_partial_helper(theta, lambda1, lambda2,
+
150  partial_deriv_array);
+
151  return fvar<T>(log_mix(theta.val_, lambda1.val_, lambda2),
+
152  theta.d_ * value_of(partial_deriv_array[0])
+
153  + lambda1.d_ * value_of(partial_deriv_array[1]));
+
154  } else {
+
155  fvar<T> partial_deriv_array[2];
+
156  log_mix_partial_helper(1.0 - theta, lambda2, lambda1,
+
157  partial_deriv_array);
+
158  return fvar<T>(log_mix(theta.val_, lambda1.val_, lambda2),
+
159  -theta.d_ * value_of(partial_deriv_array[0])
+
160  + lambda1.d_ * value_of(partial_deriv_array[1]));
+
161  }
+
162  }
+
163 
+
164  template<typename T>
+
165  inline
+
166  fvar<T>
+
167  log_mix(const fvar<T>& theta, const double lambda1,
+
168  const fvar<T>& lambda2) {
+
169  using stan::math::log_mix;
+
170  using stan::math::value_of;
+
171 
+
172  if (lambda1 > lambda2.val_) {
+
173  fvar<T> partial_deriv_array[2];
+
174  log_mix_partial_helper(theta, lambda1, lambda2,
+
175  partial_deriv_array);
+
176  return fvar<T>(log_mix(theta.val_, lambda1, lambda2.val_),
+
177  theta.d_ * value_of(partial_deriv_array[0])
+
178  + lambda2.d_ * value_of(partial_deriv_array[1]));
+
179  } else {
+
180  fvar<T> partial_deriv_array[2];
+
181  log_mix_partial_helper(1.0 - theta, lambda2, lambda1,
+
182  partial_deriv_array);
+
183  return fvar<T>(log_mix(theta.val_, lambda1, lambda2.val_),
+
184  -theta.d_ * value_of(partial_deriv_array[0])
+
185  + lambda2.d_ * value_of(partial_deriv_array[1]));
+
186  }
+
187  }
+
188 
+
189  template<typename T>
+
190  inline
+
191  fvar<T>
+
192  log_mix(const double theta, const fvar<T>& lambda1,
+
193  const fvar<T>& lambda2) {
+
194  using stan::math::log_mix;
+
195  using stan::math::value_of;
+
196 
+
197  if (lambda1.val_ > lambda2.val_) {
+
198  fvar<T> partial_deriv_array[2];
+
199  log_mix_partial_helper(theta, lambda1, lambda2, partial_deriv_array);
+
200  return fvar<T>(log_mix(theta, lambda1.val_, lambda2.val_),
+
201  lambda1.d_ * value_of(partial_deriv_array[0])
+
202  + lambda2.d_ * value_of(partial_deriv_array[1]));
+
203  } else {
+
204  fvar<T> partial_deriv_array[2];
+
205  log_mix_partial_helper(1.0 - theta, lambda2, lambda1,
+
206  partial_deriv_array);
+
207  return fvar<T>(log_mix(theta, lambda1.val_, lambda2.val_),
+
208  lambda1.d_ * value_of(partial_deriv_array[1])
+
209  + lambda2.d_ * value_of(partial_deriv_array[0]));
+
210  }
+
211  }
+
212 
+
213  template<typename T>
+
214  inline
+
215  fvar<T>
+
216  log_mix(const fvar<T>& theta, const double lambda1, const double lambda2) {
+
217  using stan::math::log_mix;
+
218  using stan::math::value_of;
+
219 
+
220  if (lambda1 > lambda2) {
+
221  fvar<T> partial_deriv_array[1];
+
222  log_mix_partial_helper(theta, lambda1, lambda2, partial_deriv_array);
+
223  return fvar<T>(log_mix(theta.val_, lambda1, lambda2),
+
224  theta.d_ * value_of(partial_deriv_array[0]));
+
225  } else {
+
226  fvar<T> partial_deriv_array[1];
+
227  log_mix_partial_helper(1.0 - theta, lambda2, lambda1,
+
228  partial_deriv_array);
+
229  return fvar<T>(log_mix(theta.val_, lambda1, lambda2),
+
230  -theta.d_ * value_of(partial_deriv_array[0]));
+
231  }
+
232  }
+
233 
+
234  template<typename T>
+
235  inline
+
236  fvar<T>
+
237  log_mix(const double theta, const fvar<T>& lambda1, const double lambda2) {
+
238  using stan::math::log_mix;
+
239  using stan::math::value_of;
+
240 
+
241  if (lambda1.val_ > lambda2) {
+
242  fvar<T> partial_deriv_array[1];
+
243  log_mix_partial_helper(theta, lambda1, lambda2, partial_deriv_array);
+
244  return fvar<T>(log_mix(theta, lambda1.val_, lambda2),
+
245  lambda1.d_ * value_of(partial_deriv_array[0]));
+
246  } else {
+
247  fvar<T> partial_deriv_array[1];
+
248  log_mix_partial_helper(1.0 - theta, lambda2, lambda1,
+
249  partial_deriv_array);
+
250  return fvar<T>(log_mix(theta, lambda1.val_, lambda2),
+
251  lambda1.d_ * value_of(partial_deriv_array[0]));
+
252  }
+
253  }
+
254 
+
255  template<typename T>
+
256  inline
+
257  fvar<T>
+
258  log_mix(const double theta, const double lambda1, const fvar<T>& lambda2) {
+
259  using stan::math::log_mix;
+
260  using stan::math::value_of;
+
261 
+
262  if (lambda1 > lambda2.val_) {
+
263  fvar<T> partial_deriv_array[1];
+
264  log_mix_partial_helper(theta, lambda1, lambda2, partial_deriv_array);
+
265  return fvar<T>(log_mix(theta, lambda1, lambda2.val_),
+
266  lambda2.d_ * value_of(partial_deriv_array[0]));
+
267  } else {
+
268  fvar<T> partial_deriv_array[1];
+
269  log_mix_partial_helper(1.0 - theta, lambda2, lambda1,
+
270  partial_deriv_array);
+
271  return fvar<T>(log_mix(theta, lambda1, lambda2.val_),
+
272  lambda2.d_ * value_of(partial_deriv_array[0]));
+
273  }
+
274  }
+
275  }
+
276 }
+
277 #endif
+ + +
void log_mix_partial_helper(const T_theta &theta, const T_lambda1 &lambda1, const T_lambda2 &lambda2, typename promote_args< T_theta, T_lambda1, T_lambda2 >::type(&partials_array)[N])
Definition: log_mix.hpp:31
+
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ + +
fvar< T > log_mix(const fvar< T > &theta, const fvar< T > &lambda1, const fvar< T > &lambda2)
Return the log mixture density with specified mixing proportion and log densities and its derivative ...
Definition: log_mix.hpp:116
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2log__rising__factorial_8hpp.html b/doc/api/html/fwd_2scal_2fun_2log__rising__factorial_8hpp.html new file mode 100644 index 00000000000..01631899918 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2log__rising__factorial_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/log_rising_factorial.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_rising_factorial.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <stan/math/prim/scal/fun/log_rising_factorial.hpp>
+#include <boost/math/special_functions/digamma.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
fvar< T > stan::math::log_rising_factorial (const fvar< T > &x, const fvar< T > &n)
 
template<typename T >
fvar< T > stan::math::log_rising_factorial (const fvar< T > &x, const double n)
 
template<typename T >
fvar< T > stan::math::log_rising_factorial (const double x, const fvar< T > &n)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2log__rising__factorial_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2log__rising__factorial_8hpp_source.html new file mode 100644 index 00000000000..cbd44337270 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2log__rising__factorial_8hpp_source.html @@ -0,0 +1,163 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/log_rising_factorial.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_rising_factorial.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_LOG_RISING_FACTORIAL_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_LOG_RISING_FACTORIAL_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ +
7 #include <boost/math/special_functions/digamma.hpp>
+
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
13  template<typename T>
+
14  inline
+
15  fvar<T>
+
16  log_rising_factorial(const fvar<T>& x, const fvar<T>& n) {
+ + +
19 
+ +
21  (digamma(x.val_ + n.val_) * (x.d_ + n.d_)
+
22  - digamma(x.val_) * x.d_));
+
23  }
+
24 
+
25  template<typename T>
+
26  inline
+
27  fvar<T>
+
28  log_rising_factorial(const fvar<T>& x, const double n) {
+ + +
31 
+
32  return fvar<T>(log_rising_factorial(x.val_, n),
+
33  (digamma(x.val_ + n) - digamma(x.val_)) * x.d_);
+
34  }
+
35 
+
36  template<typename T>
+
37  inline
+
38  fvar<T>
+
39  log_rising_factorial(const double x, const fvar<T>& n) {
+ + +
42 
+
43  return fvar<T>(log_rising_factorial(x, n.val_),
+
44  (digamma(x + n.val_) * n.d_));
+
45  }
+
46  }
+
47 }
+
48 #endif
+ + + + +
fvar< T > log_rising_factorial(const fvar< T > &x, const fvar< T > &n)
+ +
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2log__sum__exp_8hpp.html b/doc/api/html/fwd_2scal_2fun_2log__sum__exp_8hpp.html new file mode 100644 index 00000000000..b758beffd7b --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2log__sum__exp_8hpp.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/log_sum_exp.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_sum_exp.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
fvar< T > stan::math::log_sum_exp (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::log_sum_exp (const double x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::log_sum_exp (const fvar< T > &x1, const double x2)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2log__sum__exp_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2log__sum__exp_8hpp_source.html new file mode 100644 index 00000000000..bc6bcbf276a --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2log__sum__exp_8hpp_source.html @@ -0,0 +1,160 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/log_sum_exp.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_sum_exp.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_LOG_SUM_EXP_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_LOG_SUM_EXP_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline
+
14  fvar<T>
+
15  log_sum_exp(const fvar<T>& x1, const fvar<T>& x2) {
+ +
17  using std::exp;
+
18  return fvar<T>(log_sum_exp(x1.val_, x2.val_),
+
19  x1.d_ / (1 + exp(x2.val_ - x1.val_))
+
20  + x2.d_ / (exp(x1.val_ - x2.val_) + 1));
+
21  }
+
22 
+
23  template <typename T>
+
24  inline
+
25  fvar<T>
+
26  log_sum_exp(const double x1, const fvar<T>& x2) {
+ +
28  using std::exp;
+
29  return fvar<T>(log_sum_exp(x1, x2.val_),
+
30  x2.d_ / (exp(x1 - x2.val_) + 1));
+
31  }
+
32 
+
33  template <typename T>
+
34  inline
+
35  fvar<T>
+
36  log_sum_exp(const fvar<T>& x1, const double x2) {
+ +
38  using std::exp;
+
39  return fvar<T>(log_sum_exp(x1.val_, x2),
+
40  x1.d_ / (1 + exp(x2 - x1.val_)));
+
41  }
+
42 
+
43  }
+
44 }
+
45 #endif
+ + +
fvar< T > log_sum_exp(const std::vector< fvar< T > > &v)
Definition: log_sum_exp.hpp:14
+ + +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2logit_8hpp.html b/doc/api/html/fwd_2scal_2fun_2logit_8hpp.html new file mode 100644 index 00000000000..11c7643f5bf --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2logit_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/logit.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
logit.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::logit (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2logit_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2logit_8hpp_source.html new file mode 100644 index 00000000000..173e531fecd --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2logit_8hpp_source.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/logit.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
logit.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_LOGIT_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_LOGIT_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ + + +
9 
+
10 namespace stan {
+
11 
+
12  namespace math {
+
13 
+
14  template <typename T>
+
15  inline
+
16  fvar<T>
+
17  logit(const fvar<T>& x) {
+
18  using stan::math::logit;
+
19  using stan::math::square;
+ +
21  if (x.val_ > 1 || x.val_ < 0)
+ +
23  else
+
24  return fvar<T>(logit(x.val_), x.d_ / (x.val_ - square(x.val_)));
+
25  }
+
26  }
+
27 }
+
28 #endif
+ + +
const double NOT_A_NUMBER
(Quiet) not-a-number value.
Definition: constants.hpp:56
+ +
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+ +
fvar< T > logit(const fvar< T > &x)
Definition: logit.hpp:17
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2modified__bessel__first__kind_8hpp.html b/doc/api/html/fwd_2scal_2fun_2modified__bessel__first__kind_8hpp.html new file mode 100644 index 00000000000..ba049e96995 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2modified__bessel__first__kind_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/modified_bessel_first_kind.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
modified_bessel_first_kind.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::modified_bessel_first_kind (int v, const fvar< T > &z)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2modified__bessel__first__kind_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2modified__bessel__first__kind_8hpp_source.html new file mode 100644 index 00000000000..fe948fed3df --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2modified__bessel__first__kind_8hpp_source.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/modified_bessel_first_kind.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
modified_bessel_first_kind.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_MODIFIED_BESSEL_FIRST_KIND_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_MODIFIED_BESSEL_FIRST_KIND_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline
+
14  fvar<T>
+ + +
17 
+
18  T modified_bessel_first_kind_z(modified_bessel_first_kind(v, z.val_));
+
19  return fvar<T>(modified_bessel_first_kind_z,
+
20  -v * z.d_ * modified_bessel_first_kind_z / z.val_
+
21  + z.d_ * modified_bessel_first_kind(v - 1, z.val_));
+
22  }
+
23  }
+
24 }
+
25 #endif
+ + + +
fvar< T > modified_bessel_first_kind(int v, const fvar< T > &z)
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2modified__bessel__second__kind_8hpp.html b/doc/api/html/fwd_2scal_2fun_2modified__bessel__second__kind_8hpp.html new file mode 100644 index 00000000000..f72fbc76cae --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2modified__bessel__second__kind_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/modified_bessel_second_kind.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
modified_bessel_second_kind.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::modified_bessel_second_kind (int v, const fvar< T > &z)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2modified__bessel__second__kind_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2modified__bessel__second__kind_8hpp_source.html new file mode 100644 index 00000000000..c6c7cac2439 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2modified__bessel__second__kind_8hpp_source.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/modified_bessel_second_kind.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
modified_bessel_second_kind.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_MODIFIED_BESSEL_SECOND_KIND_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_MODIFIED_BESSEL_SECOND_KIND_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline
+
14  fvar<T>
+ + +
17 
+
18  T modified_bessel_second_kind_z(modified_bessel_second_kind(v, z.val_));
+
19  return fvar<T>(modified_bessel_second_kind_z,
+
20  -v * z.d_ * modified_bessel_second_kind_z / z.val_
+
21  - z.d_ * modified_bessel_second_kind(v - 1, z.val_));
+
22  }
+
23  }
+
24 }
+
25 #endif
+
fvar< T > modified_bessel_second_kind(int v, const fvar< T > &z)
+ + + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2multiply__log_8hpp.html b/doc/api/html/fwd_2scal_2fun_2multiply__log_8hpp.html new file mode 100644 index 00000000000..9e04a1cafe3 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2multiply__log_8hpp.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/multiply_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
multiply_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
fvar< T > stan::math::multiply_log (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::multiply_log (const double x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::multiply_log (const fvar< T > &x1, const double x2)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2multiply__log_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2multiply__log_8hpp_source.html new file mode 100644 index 00000000000..d4ec33476fb --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2multiply__log_8hpp_source.html @@ -0,0 +1,158 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/multiply_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
multiply_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_MULTIPLY_LOG_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_MULTIPLY_LOG_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline
+
14  fvar<T>
+
15  multiply_log(const fvar<T>& x1, const fvar<T>& x2) {
+ +
17  using std::log;
+
18  return fvar<T>(multiply_log(x1.val_, x2.val_),
+
19  x1.d_ * log(x2.val_) + x1.val_ * x2.d_ / x2.val_);
+
20  }
+
21 
+
22  template <typename T>
+
23  inline
+
24  fvar<T>
+
25  multiply_log(const double x1, const fvar<T>& x2) {
+ +
27  using std::log;
+
28  return fvar<T>(multiply_log(x1, x2.val_),
+
29  x1 * x2.d_ / x2.val_);
+
30  }
+
31 
+
32  template <typename T>
+
33  inline
+
34  fvar<T>
+
35  multiply_log(const fvar<T>& x1, const double x2) {
+ +
37  using std::log;
+
38  return fvar<T>(multiply_log(x1.val_, x2),
+
39  x1.d_ * log(x2));
+
40  }
+
41  }
+
42 }
+
43 #endif
+ + +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ + +
fvar< T > multiply_log(const fvar< T > &x1, const fvar< T > &x2)
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2owens__t_8hpp.html b/doc/api/html/fwd_2scal_2fun_2owens__t_8hpp.html new file mode 100644 index 00000000000..1c207fc9166 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2owens__t_8hpp.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/owens_t.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
owens_t.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
fvar< T > stan::math::owens_t (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::owens_t (const double x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::owens_t (const fvar< T > &x1, const double x2)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2owens__t_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2owens__t_8hpp_source.html new file mode 100644 index 00000000000..bf4e7842fd6 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2owens__t_8hpp_source.html @@ -0,0 +1,188 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/owens_t.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
owens_t.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_OWENS_T_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_OWENS_T_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ + + +
8 #include <cmath>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
13  template <typename T>
+
14  inline fvar<T> owens_t(const fvar<T>& x1, const fvar<T>& x2) {
+
15  using stan::math::owens_t;
+
16  using stan::math::pi;
+ + +
19  using stan::math::square;
+
20  using std::exp;
+ +
22 
+
23  T neg_x1_sq_div_2 = -square(x1.val_) * 0.5;
+
24  T one_p_x2_sq = 1.0 + square(x2.val_);
+
25  return fvar<T>(owens_t(x1.val_, x2.val_),
+
26  - x1.d_
+
27  * (erf(x2.val_ * x1.val_ * INV_SQRT_2)
+
28  * exp(neg_x1_sq_div_2) * INV_SQRT_TWO_PI * 0.5)
+
29  + x2.d_ * exp(neg_x1_sq_div_2 * one_p_x2_sq)
+
30  / (one_p_x2_sq * 2.0 * pi()));
+
31  }
+
32 
+
33  template <typename T>
+
34  inline fvar<T> owens_t(const double x1, const fvar<T>& x2) {
+
35  using stan::math::owens_t;
+
36  using stan::math::pi;
+
37  using stan::math::square;
+
38  using std::exp;
+
39 
+
40  T neg_x1_sq_div_2 = -square(x1) * 0.5;
+
41  T one_p_x2_sq = 1.0 + square(x2.val_);
+
42  return fvar<T>(owens_t(x1, x2.val_),
+
43  x2.d_ * exp(neg_x1_sq_div_2 * one_p_x2_sq)
+
44  / (one_p_x2_sq * 2.0 * pi()));
+
45  }
+
46 
+
47  template <typename T>
+
48  inline fvar<T> owens_t(const fvar<T>& x1, const double x2) {
+
49  using stan::math::owens_t;
+
50  using stan::math::pi;
+
51  using stan::math::square;
+ + +
54  using std::exp;
+ +
56 
+
57  T neg_x1_sq_div_2 = -square(x1.val_) * 0.5;
+
58  return fvar<T>(owens_t(x1.val_, x2),
+
59  -x1.d_ * (erf(x2 * x1.val_ * INV_SQRT_2)
+
60  * exp(neg_x1_sq_div_2)
+
61  * INV_SQRT_TWO_PI * 0.5));
+
62  }
+
63 
+
64  }
+
65 }
+
66 #endif
+
const double INV_SQRT_TWO_PI
Definition: constants.hpp:166
+ + + +
fvar< T > erf(const fvar< T > &x)
Definition: erf.hpp:14
+
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+
fvar< T > owens_t(const fvar< T > &x1, const fvar< T > &x2)
Definition: owens_t.hpp:14
+ +
const double INV_SQRT_2
The value of 1 over the square root of 2, .
Definition: constants.hpp:27
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ + +
double pi()
Return the value of pi.
Definition: constants.hpp:86
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2pow_8hpp.html b/doc/api/html/fwd_2scal_2fun_2pow_8hpp.html new file mode 100644 index 00000000000..6e3649b12e4 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2pow_8hpp.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/pow.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
pow.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
fvar< T > stan::math::pow (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::pow (const double x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > stan::math::pow (const fvar< T > &x1, const double x2)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2pow_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2pow_8hpp_source.html new file mode 100644 index 00000000000..a81f10f0ef0 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2pow_8hpp_source.html @@ -0,0 +1,191 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/pow.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
pow.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_POW_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_POW_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ + + + +
10 
+
11 namespace stan {
+
12 
+
13  namespace math {
+
14 
+
15  template <typename T>
+
16  inline
+
17  fvar<T>
+
18  pow(const fvar<T>& x1, const fvar<T>& x2) {
+
19  using std::pow;
+
20  using std::log;
+
21  T pow_x1_x2(pow(x1.val_, x2.val_));
+
22  return fvar<T>(pow_x1_x2,
+
23  (x2.d_ * log(x1.val_)
+
24  + x2.val_ * x1.d_ / x1.val_) * pow_x1_x2);
+
25  }
+
26 
+
27  template <typename T>
+
28  inline
+
29  fvar<T>
+
30  pow(const double x1, const fvar<T>& x2) {
+
31  using std::pow;
+
32  using std::log;
+
33  T u = pow(x1, x2.val_);
+
34  return fvar<T>(u, x2.d_ * log(x1) * u);
+
35  }
+
36 
+
37  template <typename T>
+
38  inline
+
39  fvar<T>
+
40  pow(const fvar<T>& x1, const double x2) {
+
41  using std::pow;
+
42  using stan::math::sqrt;
+
43  using stan::math::inv;
+ + +
46  using std::sqrt;
+
47  using stan::math::square;
+
48 
+
49  if (x2 == -2)
+
50  return inv_square(x1);
+
51  if (x2 == -1)
+
52  return inv(x1);
+
53  if (x2 == -0.5)
+
54  return inv_sqrt(x1);
+
55  if (x2 == 0.5)
+
56  return sqrt(x1);
+
57  if (x2 == 1.0)
+
58  return x1;
+
59  if (x2 == 2.0)
+
60  return square(x1);
+
61 
+
62  return fvar<T>(pow(x1.val_, x2),
+
63  x1.d_ * x2 * pow(x1.val_, x2 - 1));
+
64  }
+
65  }
+
66 }
+
67 #endif
+ +
fvar< T > inv_sqrt(const fvar< T > &x)
Definition: inv_sqrt.hpp:15
+ +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
var pow(const double base, const var &exponent)
Return the base scalar raised to the power of the exponent variable (cmath).
Definition: pow.hpp:141
+
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+ + + +
fvar< T > inv_square(const fvar< T > &x)
Definition: inv_square.hpp:15
+ +
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+ +
fvar< T > inv(const fvar< T > &x)
Definition: inv.hpp:15
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2primitive__value_8hpp.html b/doc/api/html/fwd_2scal_2fun_2primitive__value_8hpp.html new file mode 100644 index 00000000000..f9a0c8aff11 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2primitive__value_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/primitive_value.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
primitive_value.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
double stan::math::primitive_value (const fvar< T > &v)
 Return the primitive value of the specified forward-mode autodiff variable. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2primitive__value_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2primitive__value_8hpp_source.html new file mode 100644 index 00000000000..e7e060fa870 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2primitive__value_8hpp_source.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/primitive_value.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
primitive_value.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_PRIMITIVE_VALUE_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_PRIMITIVE_VALUE_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ +
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
11 
+
21  template <typename T>
+
22  inline double primitive_value(const fvar<T>& v) {
+ +
24  return primitive_value(v.val_);
+
25  }
+
26 
+
27 
+
28  }
+
29 
+
30 }
+
31 
+
32 #endif
+ + +
double primitive_value(const fvar< T > &v)
Return the primitive value of the specified forward-mode autodiff variable.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2rising__factorial_8hpp.html b/doc/api/html/fwd_2scal_2fun_2rising__factorial_8hpp.html new file mode 100644 index 00000000000..adf688d6235 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2rising__factorial_8hpp.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/rising_factorial.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
rising_factorial.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
fvar< T > stan::math::rising_factorial (const fvar< T > &x, const fvar< T > &n)
 
template<typename T >
fvar< T > stan::math::rising_factorial (const fvar< T > &x, const double n)
 
template<typename T >
fvar< T > stan::math::rising_factorial (const double x, const fvar< T > &n)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2rising__factorial_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2rising__factorial_8hpp_source.html new file mode 100644 index 00000000000..91b4ce8b9b4 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2rising__factorial_8hpp_source.html @@ -0,0 +1,167 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/rising_factorial.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
rising_factorial.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_RISING_FACTORIAL_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_RISING_FACTORIAL_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ + +
7 #include <iostream>
+
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
13  template<typename T>
+
14  inline
+
15  fvar<T>
+
16  rising_factorial(const fvar<T>& x, const fvar<T>& n) {
+ +
18 
+
19  T rising_fact(rising_factorial(x.val_, n.val_));
+
20  return fvar<T>(rising_fact,
+
21  rising_fact * (digamma(x.val_ + n.val_)
+
22  * (x.d_ + n.d_) - digamma(x.val_) * x.d_));
+
23  }
+
24 
+
25  template<typename T>
+
26  inline
+
27  fvar<T>
+
28  rising_factorial(const fvar<T>& x, const double n) {
+ + +
31 
+
32  T rising_fact(rising_factorial(x.val_, n));
+
33  return fvar<T>(rising_fact,
+
34  rising_fact * x.d_
+
35  * (digamma(x.val_ + n) - digamma(x.val_)));
+
36  }
+
37 
+
38  template<typename T>
+
39  inline
+
40  fvar<T>
+
41  rising_factorial(const double x, const fvar<T>& n) {
+ + +
44 
+
45  T rising_fact(rising_factorial(x, n.val_));
+
46  return fvar<T>(rising_fact,
+
47  rising_fact * (digamma(x + n.val_) * n.d_));
+
48  }
+
49  }
+
50 }
+
51 #endif
+ + + + + +
fvar< T > rising_factorial(const fvar< T > &x, const fvar< T > &n)
+ +
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2round_8hpp.html b/doc/api/html/fwd_2scal_2fun_2round_8hpp.html new file mode 100644 index 00000000000..a03e075f011 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2round_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/round.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
round.hpp File Reference
+
+
+
#include <math.h>
+#include <stan/math/fwd/core.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::round (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2round_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2round_8hpp_source.html new file mode 100644 index 00000000000..c31a09d8fa6 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2round_8hpp_source.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/round.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
round.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_ROUND_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_ROUND_HPP
+
3 
+
4 #include <math.h>
+
5 #include <stan/math/fwd/core.hpp>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  template <typename T>
+
11  inline fvar<T> round(const fvar<T>& x) {
+ +
13  return fvar<T>(round(x.val_), 0);
+
14  }
+
15 
+
16  }
+
17 }
+
18 #endif
+ +
fvar< T > round(const fvar< T > &x)
Definition: round.hpp:11
+
var round(const var &a)
Returns the rounded form of the specified variable (C99).
Definition: round.hpp:57
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2sin_8hpp.html b/doc/api/html/fwd_2scal_2fun_2sin_8hpp.html new file mode 100644 index 00000000000..f9e50ccb4f2 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2sin_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/sin.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
sin.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::sin (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2sin_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2sin_8hpp_source.html new file mode 100644 index 00000000000..009f0214239 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2sin_8hpp_source.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/sin.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
sin.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_SIN_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_SIN_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
11  template <typename T>
+
12  inline
+
13  fvar<T>
+
14  sin(const fvar<T>& x) {
+
15  using std::sin;
+
16  using std::cos;
+
17  return fvar<T>(sin(x.val_),
+
18  x.d_ * cos(x.val_));
+
19  }
+
20  }
+
21 }
+
22 #endif
+
fvar< T > cos(const fvar< T > &x)
Definition: cos.hpp:13
+
var sin(const var &a)
Return the sine of a radian-scaled variable (cmath).
Definition: sin.hpp:49
+ + +
fvar< T > sin(const fvar< T > &x)
Definition: sin.hpp:14
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2sinh_8hpp.html b/doc/api/html/fwd_2scal_2fun_2sinh_8hpp.html new file mode 100644 index 00000000000..b30a687281d --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2sinh_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/sinh.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
sinh.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::sinh (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2sinh_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2sinh_8hpp_source.html new file mode 100644 index 00000000000..d7ef217adfa --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2sinh_8hpp_source.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/sinh.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
sinh.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_SINH_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_SINH_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
11  template <typename T>
+
12  inline
+
13  fvar<T>
+
14  sinh(const fvar<T>& x) {
+
15  using std::sinh;
+
16  using std::cosh;
+
17  return fvar<T>(sinh(x.val_),
+
18  x.d_ * cosh(x.val_));
+
19  }
+
20  }
+
21 }
+
22 #endif
+ + +
fvar< T > cosh(const fvar< T > &x)
Definition: cosh.hpp:13
+ +
fvar< T > sinh(const fvar< T > &x)
Definition: sinh.hpp:14
+
var sinh(const var &a)
Return the hyperbolic sine of the specified variable (cmath).
Definition: sinh.hpp:49
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2sqrt_8hpp.html b/doc/api/html/fwd_2scal_2fun_2sqrt_8hpp.html new file mode 100644 index 00000000000..de02a7fe2c1 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2sqrt_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/sqrt.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
sqrt.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::sqrt (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2sqrt_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2sqrt_8hpp_source.html new file mode 100644 index 00000000000..c1954de5859 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2sqrt_8hpp_source.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/sqrt.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
sqrt.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_SQRT_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_SQRT_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline
+
14  fvar<T>
+
15  sqrt(const fvar<T>& x) {
+
16  using std::sqrt;
+ +
18  return fvar<T>(sqrt(x.val_), 0.5 * x.d_ * inv_sqrt(x.val_));
+
19  }
+
20  }
+
21 }
+
22 #endif
+ +
fvar< T > inv_sqrt(const fvar< T > &x)
Definition: inv_sqrt.hpp:15
+ +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
var sqrt(const var &a)
Return the square root of the specified variable (cmath).
Definition: sqrt.hpp:50
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2square_8hpp.html b/doc/api/html/fwd_2scal_2fun_2square_8hpp.html new file mode 100644 index 00000000000..1a56e3c9c7d --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2square_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/square.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
square.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::square (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2square_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2square_8hpp_source.html new file mode 100644 index 00000000000..1e75dde5b1a --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2square_8hpp_source.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/square.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
square.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_SQUARE_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_SQUARE_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+ +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline
+
14  fvar<T>
+
15  square(const fvar<T>& x) {
+
16  using stan::math::square;
+
17  return fvar<T>(square(x.val_),
+
18  x.d_ * 2 * x.val_);
+
19  }
+
20  }
+
21 }
+
22 #endif
+ + + +
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2tan_8hpp.html b/doc/api/html/fwd_2scal_2fun_2tan_8hpp.html new file mode 100644 index 00000000000..3f70d6909bc --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2tan_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/tan.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
tan.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::tan (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2tan_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2tan_8hpp_source.html new file mode 100644 index 00000000000..e6c96f5e5c4 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2tan_8hpp_source.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/tan.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
tan.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_TAN_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_TAN_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
11  template <typename T>
+
12  inline
+
13  fvar<T>
+
14  tan(const fvar<T>& x) {
+
15  using std::cos;
+
16  using std::tan;
+
17  return fvar<T>(tan(x.val_), x.d_ / (cos(x.val_) * cos(x.val_)));
+
18  }
+
19  }
+
20 }
+
21 #endif
+
fvar< T > cos(const fvar< T > &x)
Definition: cos.hpp:13
+ + + +
fvar< T > tan(const fvar< T > &x)
Definition: tan.hpp:14
+
var tan(const var &a)
Return the tangent of a radian-scaled variable (cmath).
Definition: tan.hpp:49
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2tanh_8hpp.html b/doc/api/html/fwd_2scal_2fun_2tanh_8hpp.html new file mode 100644 index 00000000000..1564a2b8775 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2tanh_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/tanh.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
tanh.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::tanh (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2tanh_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2tanh_8hpp_source.html new file mode 100644 index 00000000000..5299d5e487d --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2tanh_8hpp_source.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/tanh.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
tanh.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_TANH_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_TANH_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
11  template <typename T>
+
12  inline
+
13  fvar<T>
+
14  tanh(const fvar<T>& x) {
+
15  using std::tanh;
+
16  T u = tanh(x.val_);
+
17  return fvar<T>(u, x.d_ * (1 - u * u));
+
18  }
+
19  }
+
20 }
+
21 #endif
+ + + +
fvar< T > tanh(const fvar< T > &x)
Definition: tanh.hpp:14
+
var tanh(const var &a)
Return the hyperbolic tangent of the specified variable (cmath).
Definition: tanh.hpp:50
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2tgamma_8hpp.html b/doc/api/html/fwd_2scal_2fun_2tgamma_8hpp.html new file mode 100644 index 00000000000..d47f972797d --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2tgamma_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/tgamma.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
tgamma.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <boost/math/special_functions/digamma.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::tgamma (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2tgamma_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2tgamma_8hpp_source.html new file mode 100644 index 00000000000..790f9fbcc69 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2tgamma_8hpp_source.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/tgamma.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
tgamma.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_TGAMMA_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_TGAMMA_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+
6 #include <boost/math/special_functions/digamma.hpp>
+
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline
+
14  fvar<T>
+
15  tgamma(const fvar<T>& x) {
+ +
17  using boost::math::tgamma;
+
18  T u = tgamma(x.val_);
+
19  return fvar<T>(u, x.d_ * u * digamma(x.val_));
+
20  }
+
21  }
+
22 }
+
23 #endif
+
var tgamma(const stan::math::var &a)
Return the Gamma function applied to the specified variable (C99).
Definition: tgamma.hpp:65
+ + + +
fvar< T > tgamma(const fvar< T > &x)
Definition: tgamma.hpp:15
+ +
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2trunc_8hpp.html b/doc/api/html/fwd_2scal_2fun_2trunc_8hpp.html new file mode 100644 index 00000000000..8ac93e27840 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2trunc_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/trunc.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
trunc.hpp File Reference
+
+
+
#include <math.h>
+#include <stan/math/fwd/core.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::trunc (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2trunc_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2trunc_8hpp_source.html new file mode 100644 index 00000000000..98cdbdf8e46 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2trunc_8hpp_source.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/trunc.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
trunc.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_TRUNC_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_TRUNC_HPP
+
3 
+
4 #include <math.h>
+
5 #include <stan/math/fwd/core.hpp>
+
6 
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  template <typename T>
+
12  inline fvar<T> trunc(const fvar<T>& x) {
+ +
14  return fvar<T>(trunc(x.val_), 0);
+
15  }
+
16 
+
17  }
+
18 }
+
19 #endif
+
var trunc(const var &a)
Returns the truncatation of the specified variable (C99).
Definition: trunc.hpp:60
+ +
fvar< T > trunc(const fvar< T > &x)
Definition: trunc.hpp:12
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2value__of_8hpp.html b/doc/api/html/fwd_2scal_2fun_2value__of_8hpp.html new file mode 100644 index 00000000000..f6bf66fd572 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2value__of_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/value_of.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
value_of.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
stan::math::value_of (const fvar< T > &v)
 Return the value of the specified variable. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2value__of_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2value__of_8hpp_source.html new file mode 100644 index 00000000000..3332cd185cb --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2value__of_8hpp_source.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/value_of.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
value_of.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_VALUE_OF_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_VALUE_OF_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
15  template<typename T>
+
16  inline T value_of(const fvar<T>& v) {
+
17  return v.val_;
+
18  }
+
19 
+
20  }
+
21 }
+
22 #endif
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2value__of__rec_8hpp.html b/doc/api/html/fwd_2scal_2fun_2value__of__rec_8hpp.html new file mode 100644 index 00000000000..274b2124f88 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2value__of__rec_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/value_of_rec.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
value_of_rec.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
double stan::math::value_of_rec (const fvar< T > &v)
 Return the value of the specified variable. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2fun_2value__of__rec_8hpp_source.html b/doc/api/html/fwd_2scal_2fun_2value__of__rec_8hpp_source.html new file mode 100644 index 00000000000..cc8cfe65359 --- /dev/null +++ b/doc/api/html/fwd_2scal_2fun_2value__of__rec_8hpp_source.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/fun/value_of_rec.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
value_of_rec.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_VALUE_OF_REC_HPP
+
2 #define STAN_MATH_FWD_SCAL_FUN_VALUE_OF_REC_HPP
+
3 
+ +
5 #include <stan/math/fwd/core.hpp>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
20  template <typename T>
+
21  inline double value_of_rec(const fvar<T>& v) {
+ +
23  return value_of_rec(v.val_);
+
24  }
+
25 
+
26 
+
27  }
+
28 }
+
29 #endif
+ +
double value_of_rec(const fvar< T > &v)
Return the value of the specified variable.
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2meta_2is__fvar_8hpp.html b/doc/api/html/fwd_2scal_2meta_2is__fvar_8hpp.html new file mode 100644 index 00000000000..79d62195095 --- /dev/null +++ b/doc/api/html/fwd_2scal_2meta_2is__fvar_8hpp.html @@ -0,0 +1,126 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/meta/is_fvar.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
is_fvar.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

struct  stan::is_fvar< stan::math::fvar< T > >
 
+ + + +

+Namespaces

 stan
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2meta_2is__fvar_8hpp_source.html b/doc/api/html/fwd_2scal_2meta_2is__fvar_8hpp_source.html new file mode 100644 index 00000000000..04b9f38a23d --- /dev/null +++ b/doc/api/html/fwd_2scal_2meta_2is__fvar_8hpp_source.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/meta/is_fvar.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
is_fvar.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_META_IS_FVAR_HPP
+
2 #define STAN_MATH_FWD_SCAL_META_IS_FVAR_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ +
6 
+
7 namespace stan {
+
8 
+
9  template <typename T>
+
10  struct is_fvar<stan::math::fvar<T> > {
+
11  enum { value = true };
+
12  };
+
13 
+
14 }
+
15 #endif
+ + + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2meta_2partials__type_8hpp.html b/doc/api/html/fwd_2scal_2meta_2partials__type_8hpp.html new file mode 100644 index 00000000000..715ae0774b2 --- /dev/null +++ b/doc/api/html/fwd_2scal_2meta_2partials__type_8hpp.html @@ -0,0 +1,126 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/meta/partials_type.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
partials_type.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

struct  stan::partials_type< stan::math::fvar< T > >
 
+ + + +

+Namespaces

 stan
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/fwd_2scal_2meta_2partials__type_8hpp_source.html b/doc/api/html/fwd_2scal_2meta_2partials__type_8hpp_source.html new file mode 100644 index 00000000000..3028d9b9e50 --- /dev/null +++ b/doc/api/html/fwd_2scal_2meta_2partials__type_8hpp_source.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/fwd/scal/meta/partials_type.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
partials_type.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_META_PARTIALS_TYPE_HPP
+
2 #define STAN_MATH_FWD_SCAL_META_PARTIALS_TYPE_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ +
6 
+
7 namespace stan {
+
8 
+
9  template <typename T>
+
10  struct partials_type<stan::math::fvar<T> > {
+
11  typedef T type;
+
12  };
+
13 
+
14 }
+
15 #endif
+
16 
+ + + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/gamma__ccdf__log_8hpp.html b/doc/api/html/gamma__ccdf__log_8hpp.html new file mode 100644 index 00000000000..ecc6b81c21d --- /dev/null +++ b/doc/api/html/gamma__ccdf__log_8hpp.html @@ -0,0 +1,153 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/gamma_ccdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
gamma_ccdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_shape , typename T_inv_scale >
return_type< T_y, T_shape,
+T_inv_scale >::type 
stan::math::gamma_ccdf_log (const T_y &y, const T_shape &alpha, const T_inv_scale &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/gamma__ccdf__log_8hpp_source.html b/doc/api/html/gamma__ccdf__log_8hpp_source.html new file mode 100644 index 00000000000..441964bc24f --- /dev/null +++ b/doc/api/html/gamma__ccdf__log_8hpp_source.html @@ -0,0 +1,300 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/gamma_ccdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
gamma_ccdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_GAMMA_CCDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_GAMMA_CCDF_LOG_HPP
+
3 
+ + + + + + + + + + + + + + + + + + + + +
24 #include <boost/random/gamma_distribution.hpp>
+
25 #include <boost/random/variate_generator.hpp>
+
26 #include <cmath>
+
27 #include <limits>
+
28 
+
29 namespace stan {
+
30 
+
31  namespace math {
+
32 
+
33  template <typename T_y, typename T_shape, typename T_inv_scale>
+
34  typename return_type<T_y, T_shape, T_inv_scale>::type
+
35  gamma_ccdf_log(const T_y& y, const T_shape& alpha,
+
36  const T_inv_scale& beta) {
+
37  // Size checks
+
38  if (!(stan::length(y) && stan::length(alpha) && stan::length(beta)))
+
39  return 0.0;
+
40 
+
41  typedef typename stan::partials_return_type<T_y, T_shape,
+
42  T_inv_scale>::type
+
43  T_partials_return;
+
44 
+
45  // Error checks
+
46  static const char* function("stan::math::gamma_ccdf_log");
+
47 
+ + + + + + + +
55  using boost::math::tools::promote_args;
+
56  using std::exp;
+
57 
+
58  T_partials_return P(0.0);
+
59 
+
60  check_positive_finite(function, "Shape parameter", alpha);
+
61  check_positive_finite(function, "Scale parameter", beta);
+
62  check_not_nan(function, "Random variable", y);
+
63  check_nonnegative(function, "Random variable", y);
+
64  check_consistent_sizes(function,
+
65  "Random variable", y,
+
66  "Shape parameter", alpha,
+
67  "Scale Parameter", beta);
+
68 
+
69  // Wrap arguments in vectors
+
70  VectorView<const T_y> y_vec(y);
+
71  VectorView<const T_shape> alpha_vec(alpha);
+
72  VectorView<const T_inv_scale> beta_vec(beta);
+
73  size_t N = max_size(y, alpha, beta);
+
74 
+ +
76  operands_and_partials(y, alpha, beta);
+
77 
+
78  // Explicit return for extreme values
+
79  // The gradients are technically ill-defined, but treated as zero
+
80 
+
81  for (size_t i = 0; i < stan::length(y); i++) {
+
82  if (value_of(y_vec[i]) == 0)
+
83  return operands_and_partials.to_var(0.0, y, alpha, beta);
+
84  }
+
85 
+
86  // Compute ccdf_log and its gradients
+
87  using stan::math::gamma_p;
+
88  using stan::math::digamma;
+
89  using boost::math::tgamma;
+
90  using std::exp;
+
91  using std::pow;
+
92  using std::log;
+
93 
+
94  // Cache a few expensive function calls if nu is a parameter
+ +
96  T_partials_return, T_shape> gamma_vec(stan::length(alpha));
+ +
98  T_partials_return, T_shape>
+
99  digamma_vec(stan::length(alpha));
+
100 
+ +
102  for (size_t i = 0; i < stan::length(alpha); i++) {
+
103  const T_partials_return alpha_dbl = value_of(alpha_vec[i]);
+
104  gamma_vec[i] = tgamma(alpha_dbl);
+
105  digamma_vec[i] = digamma(alpha_dbl);
+
106  }
+
107  }
+
108 
+
109  // Compute vectorized ccdf_log and gradient
+
110  for (size_t n = 0; n < N; n++) {
+
111  // Explicit results for extreme values
+
112  // The gradients are technically ill-defined, but treated as zero
+
113  if (value_of(y_vec[n]) == std::numeric_limits<double>::infinity())
+
114  return operands_and_partials.to_var(stan::math::negative_infinity(),
+
115  y, alpha, beta);
+
116 
+
117  // Pull out values
+
118  const T_partials_return y_dbl = value_of(y_vec[n]);
+
119  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
120  const T_partials_return beta_dbl = value_of(beta_vec[n]);
+
121 
+
122  // Compute
+
123  const T_partials_return Pn = 1.0 - gamma_p(alpha_dbl, beta_dbl * y_dbl);
+
124 
+
125  P += log(Pn);
+
126 
+ +
128  operands_and_partials.d_x1[n] -= beta_dbl * exp(-beta_dbl * y_dbl)
+
129  * pow(beta_dbl * y_dbl, alpha_dbl-1) / tgamma(alpha_dbl) / Pn;
+ +
131  operands_and_partials.d_x2[n]
+
132  += stan::math::grad_reg_inc_gamma(alpha_dbl, beta_dbl
+
133  * y_dbl, gamma_vec[n],
+
134  digamma_vec[n]) / Pn;
+ +
136  operands_and_partials.d_x3[n] -= y_dbl * exp(-beta_dbl * y_dbl)
+
137  * pow(beta_dbl * y_dbl, alpha_dbl-1) / tgamma(alpha_dbl) / Pn;
+
138  }
+
139 
+
140  return operands_and_partials.to_var(P, y, alpha, beta);
+
141  }
+
142  }
+
143 }
+
144 
+
145 #endif
+ +
bool check_greater_or_equal(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is greater or equal than low.
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
T grad_reg_inc_gamma(T a, T z, T g, T dig, T precision=1e-6)
+ + + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ + +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+
return_type< T_y, T_shape, T_inv_scale >::type gamma_ccdf_log(const T_y &y, const T_shape &alpha, const T_inv_scale &beta)
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + +
bool check_less_or_equal(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is less or equal to high.
+ +
fvar< T > gamma_p(const fvar< T > &x1, const fvar< T > &x2)
Definition: gamma_p.hpp:15
+ + + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ + +
fvar< T > tgamma(const fvar< T > &x)
Definition: tgamma.hpp:15
+
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/gamma__cdf_8hpp.html b/doc/api/html/gamma__cdf_8hpp.html new file mode 100644 index 00000000000..b620060acb1 --- /dev/null +++ b/doc/api/html/gamma__cdf_8hpp.html @@ -0,0 +1,154 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/gamma_cdf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
gamma_cdf.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y , typename T_shape , typename T_inv_scale >
return_type< T_y, T_shape,
+T_inv_scale >::type 
stan::math::gamma_cdf (const T_y &y, const T_shape &alpha, const T_inv_scale &beta)
 The cumulative density function for a gamma distribution for y with the specified shape and inverse scale parameters. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/gamma__cdf_8hpp_source.html b/doc/api/html/gamma__cdf_8hpp_source.html new file mode 100644 index 00000000000..f016f8ad77d --- /dev/null +++ b/doc/api/html/gamma__cdf_8hpp_source.html @@ -0,0 +1,307 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/gamma_cdf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
gamma_cdf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_GAMMA_CDF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_GAMMA_CDF_HPP
+
3 
+ + + + + + + + + + + + + + + + + + + + +
24 #include <boost/random/gamma_distribution.hpp>
+
25 #include <boost/random/variate_generator.hpp>
+
26 #include <cmath>
+
27 #include <limits>
+
28 
+
29 namespace stan {
+
30 
+
31  namespace math {
+
32 
+
47  template <typename T_y, typename T_shape, typename T_inv_scale>
+
48  typename return_type<T_y, T_shape, T_inv_scale>::type
+
49  gamma_cdf(const T_y& y, const T_shape& alpha, const T_inv_scale& beta) {
+
50  // Size checks
+
51  if (!(stan::length(y) && stan::length(alpha) && stan::length(beta)))
+
52  return 1.0;
+
53  typedef typename stan::partials_return_type<T_y, T_shape,
+
54  T_inv_scale>::type
+
55  T_partials_return;
+
56 
+
57  // Error checks
+
58  static const char* function("stan::math::gamma_cdf");
+
59 
+ + + + + + + +
67  using boost::math::tools::promote_args;
+
68  using std::exp;
+
69 
+
70  T_partials_return P(1.0);
+
71 
+
72  check_positive_finite(function, "Shape parameter", alpha);
+
73  check_positive_finite(function, "Scale parameter", beta);
+
74  check_not_nan(function, "Random variable", y);
+
75  check_nonnegative(function, "Random variable", y);
+
76  check_consistent_sizes(function,
+
77  "Random variable", y,
+
78  "Shape parameter", alpha,
+
79  "Scale Parameter", beta);
+
80 
+
81  // Wrap arguments in vectors
+
82  VectorView<const T_y> y_vec(y);
+
83  VectorView<const T_shape> alpha_vec(alpha);
+
84  VectorView<const T_inv_scale> beta_vec(beta);
+
85  size_t N = max_size(y, alpha, beta);
+
86 
+ +
88  operands_and_partials(y, alpha, beta);
+
89 
+
90  // Explicit return for extreme values
+
91  // The gradients are technically ill-defined, but treated as zero
+
92 
+
93  for (size_t i = 0; i < stan::length(y); i++) {
+
94  if (value_of(y_vec[i]) == 0)
+
95  return operands_and_partials.to_var(0.0, y, alpha, beta);
+
96  }
+
97 
+
98  // Compute CDF and its gradients
+
99  using stan::math::gamma_p;
+
100  using stan::math::digamma;
+
101  using boost::math::tgamma;
+
102  using std::exp;
+
103  using std::pow;
+
104 
+
105  // Cache a few expensive function calls if nu is a parameter
+ +
107  T_partials_return, T_shape> gamma_vec(stan::length(alpha));
+ +
109  T_partials_return, T_shape>
+
110  digamma_vec(stan::length(alpha));
+
111 
+ +
113  for (size_t i = 0; i < stan::length(alpha); i++) {
+
114  const T_partials_return alpha_dbl = value_of(alpha_vec[i]);
+
115  gamma_vec[i] = tgamma(alpha_dbl);
+
116  digamma_vec[i] = digamma(alpha_dbl);
+
117  }
+
118  }
+
119 
+
120  // Compute vectorized CDF and gradient
+
121  for (size_t n = 0; n < N; n++) {
+
122  // Explicit results for extreme values
+
123  // The gradients are technically ill-defined, but treated as zero
+
124  if (value_of(y_vec[n]) == std::numeric_limits<double>::infinity())
+
125  continue;
+
126 
+
127  // Pull out values
+
128  const T_partials_return y_dbl = value_of(y_vec[n]);
+
129  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
130  const T_partials_return beta_dbl = value_of(beta_vec[n]);
+
131 
+
132  // Compute
+
133  const T_partials_return Pn = gamma_p(alpha_dbl, beta_dbl * y_dbl);
+
134 
+
135  P *= Pn;
+
136 
+ +
138  operands_and_partials.d_x1[n] += beta_dbl * exp(-beta_dbl * y_dbl)
+
139  * pow(beta_dbl * y_dbl, alpha_dbl-1) / tgamma(alpha_dbl) / Pn;
+ +
141  operands_and_partials.d_x2[n]
+
142  -= stan::math::grad_reg_inc_gamma(alpha_dbl, beta_dbl
+
143  * y_dbl, gamma_vec[n],
+
144  digamma_vec[n]) / Pn;
+ +
146  operands_and_partials.d_x3[n] += y_dbl * exp(-beta_dbl * y_dbl)
+
147  * pow(beta_dbl * y_dbl, alpha_dbl-1) / tgamma(alpha_dbl) / Pn;
+
148  }
+
149 
+ +
151  for (size_t n = 0; n < stan::length(y); ++n)
+
152  operands_and_partials.d_x1[n] *= P;
+
153  }
+ +
155  for (size_t n = 0; n < stan::length(alpha); ++n)
+
156  operands_and_partials.d_x2[n] *= P;
+
157  }
+ +
159  for (size_t n = 0; n < stan::length(beta); ++n)
+
160  operands_and_partials.d_x3[n] *= P;
+
161  }
+
162 
+
163  return operands_and_partials.to_var(P, y, alpha, beta);
+
164  }
+
165  }
+
166 }
+
167 
+
168 #endif
+ +
bool check_greater_or_equal(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is greater or equal than low.
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
T grad_reg_inc_gamma(T a, T z, T g, T dig, T precision=1e-6)
+ + + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ + +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + +
bool check_less_or_equal(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is less or equal to high.
+
return_type< T_y, T_shape, T_inv_scale >::type gamma_cdf(const T_y &y, const T_shape &alpha, const T_inv_scale &beta)
The cumulative density function for a gamma distribution for y with the specified shape and inverse s...
Definition: gamma_cdf.hpp:49
+ +
fvar< T > gamma_p(const fvar< T > &x1, const fvar< T > &x2)
Definition: gamma_p.hpp:15
+ + + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ + +
fvar< T > tgamma(const fvar< T > &x)
Definition: tgamma.hpp:15
+
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/gamma__cdf__log_8hpp.html b/doc/api/html/gamma__cdf__log_8hpp.html new file mode 100644 index 00000000000..dd4b1500c0c --- /dev/null +++ b/doc/api/html/gamma__cdf__log_8hpp.html @@ -0,0 +1,153 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/gamma_cdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
gamma_cdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_shape , typename T_inv_scale >
return_type< T_y, T_shape,
+T_inv_scale >::type 
stan::math::gamma_cdf_log (const T_y &y, const T_shape &alpha, const T_inv_scale &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/gamma__cdf__log_8hpp_source.html b/doc/api/html/gamma__cdf__log_8hpp_source.html new file mode 100644 index 00000000000..d25b56517b8 --- /dev/null +++ b/doc/api/html/gamma__cdf__log_8hpp_source.html @@ -0,0 +1,298 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/gamma_cdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
gamma_cdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_GAMMA_CDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_GAMMA_CDF_LOG_HPP
+
3 
+
4 #include <boost/random/gamma_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + + + + +
26 #include <cmath>
+
27 #include <limits>
+
28 
+
29 namespace stan {
+
30 
+
31  namespace math {
+
32 
+
33  template <typename T_y, typename T_shape, typename T_inv_scale>
+
34  typename return_type<T_y, T_shape, T_inv_scale>::type
+
35  gamma_cdf_log(const T_y& y, const T_shape& alpha, const T_inv_scale& beta) {
+
36  // Size checks
+
37  if (!(stan::length(y) && stan::length(alpha) && stan::length(beta)))
+
38  return 0.0;
+
39  typedef typename stan::partials_return_type<T_y, T_shape,
+
40  T_inv_scale>::type
+
41  T_partials_return;
+
42 
+
43  // Error checks
+
44  static const char* function("stan::math::gamma_cdf_log");
+
45 
+ + + + + + + +
53  using boost::math::tools::promote_args;
+
54  using std::exp;
+
55 
+
56  T_partials_return P(0.0);
+
57 
+
58  check_positive_finite(function, "Shape parameter", alpha);
+
59  check_positive_finite(function, "Scale parameter", beta);
+
60  check_not_nan(function, "Random variable", y);
+
61  check_nonnegative(function, "Random variable", y);
+
62  check_consistent_sizes(function,
+
63  "Random variable", y,
+
64  "Shape parameter", alpha,
+
65  "Scale Parameter", beta);
+
66 
+
67  // Wrap arguments in vectors
+
68  VectorView<const T_y> y_vec(y);
+
69  VectorView<const T_shape> alpha_vec(alpha);
+
70  VectorView<const T_inv_scale> beta_vec(beta);
+
71  size_t N = max_size(y, alpha, beta);
+
72 
+ +
74  operands_and_partials(y, alpha, beta);
+
75 
+
76  // Explicit return for extreme values
+
77  // The gradients are technically ill-defined, but treated as zero
+
78 
+
79  for (size_t i = 0; i < stan::length(y); i++) {
+
80  if (value_of(y_vec[i]) == 0)
+
81  return operands_and_partials.to_var(stan::math::negative_infinity(),
+
82  y, alpha, beta);
+
83  }
+
84 
+
85  // Compute cdf_log and its gradients
+
86  using stan::math::gamma_p;
+
87  using stan::math::digamma;
+
88  using boost::math::tgamma;
+
89  using std::exp;
+
90  using std::pow;
+
91  using std::log;
+
92 
+
93  // Cache a few expensive function calls if nu is a parameter
+ +
95  T_partials_return, T_shape> gamma_vec(stan::length(alpha));
+ +
97  T_partials_return, T_shape>
+
98  digamma_vec(stan::length(alpha));
+
99 
+ +
101  for (size_t i = 0; i < stan::length(alpha); i++) {
+
102  const T_partials_return alpha_dbl = value_of(alpha_vec[i]);
+
103  gamma_vec[i] = tgamma(alpha_dbl);
+
104  digamma_vec[i] = digamma(alpha_dbl);
+
105  }
+
106  }
+
107 
+
108  // Compute vectorized cdf_log and gradient
+
109  for (size_t n = 0; n < N; n++) {
+
110  // Explicit results for extreme values
+
111  // The gradients are technically ill-defined, but treated as zero
+
112  if (value_of(y_vec[n]) == std::numeric_limits<double>::infinity())
+
113  return operands_and_partials.to_var(0.0, y, alpha, beta);
+
114 
+
115  // Pull out values
+
116  const T_partials_return y_dbl = value_of(y_vec[n]);
+
117  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
118  const T_partials_return beta_dbl = value_of(beta_vec[n]);
+
119 
+
120  // Compute
+
121  const T_partials_return Pn = gamma_p(alpha_dbl, beta_dbl * y_dbl);
+
122 
+
123  P += log(Pn);
+
124 
+ +
126  operands_and_partials.d_x1[n] += beta_dbl * exp(-beta_dbl * y_dbl)
+
127  * pow(beta_dbl * y_dbl, alpha_dbl-1) / tgamma(alpha_dbl) / Pn;
+ +
129  operands_and_partials.d_x2[n]
+
130  -= stan::math::grad_reg_inc_gamma(alpha_dbl, beta_dbl
+
131  * y_dbl, gamma_vec[n],
+
132  digamma_vec[n]) / Pn;
+ +
134  operands_and_partials.d_x3[n] += y_dbl * exp(-beta_dbl * y_dbl)
+
135  * pow(beta_dbl * y_dbl, alpha_dbl-1) / tgamma(alpha_dbl) / Pn;
+
136  }
+
137 
+
138  return operands_and_partials.to_var(P, y, alpha, beta);
+
139  }
+
140  }
+
141 }
+
142 
+
143 #endif
+ +
bool check_greater_or_equal(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is greater or equal than low.
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
return_type< T_y, T_shape, T_inv_scale >::type gamma_cdf_log(const T_y &y, const T_shape &alpha, const T_inv_scale &beta)
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
T grad_reg_inc_gamma(T a, T z, T g, T dig, T precision=1e-6)
+ + + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ + +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + +
bool check_less_or_equal(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is less or equal to high.
+ +
fvar< T > gamma_p(const fvar< T > &x1, const fvar< T > &x2)
Definition: gamma_p.hpp:15
+ + + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ + +
fvar< T > tgamma(const fvar< T > &x)
Definition: tgamma.hpp:15
+
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/gamma__log_8hpp.html b/doc/api/html/gamma__log_8hpp.html new file mode 100644 index 00000000000..c401107fe32 --- /dev/null +++ b/doc/api/html/gamma__log_8hpp.html @@ -0,0 +1,152 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/gamma_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
gamma_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_shape , typename T_inv_scale >
return_type< T_y, T_shape,
+T_inv_scale >::type 
stan::math::gamma_log (const T_y &y, const T_shape &alpha, const T_inv_scale &beta)
 The log of a gamma density for y with the specified shape and inverse scale parameters. More...
 
template<typename T_y , typename T_shape , typename T_inv_scale >
return_type< T_y, T_shape,
+T_inv_scale >::type 
stan::math::gamma_log (const T_y &y, const T_shape &alpha, const T_inv_scale &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/gamma__log_8hpp_source.html b/doc/api/html/gamma__log_8hpp_source.html new file mode 100644 index 00000000000..2a809e85f44 --- /dev/null +++ b/doc/api/html/gamma__log_8hpp_source.html @@ -0,0 +1,295 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/gamma_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
gamma_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_GAMMA_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_GAMMA_LOG_HPP
+
3 
+
4 #include <boost/random/gamma_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + +
21 #include <cmath>
+
22 
+
23 namespace stan {
+
24 
+
25  namespace math {
+
26 
+
49  template <bool propto,
+
50  typename T_y, typename T_shape, typename T_inv_scale>
+
51  typename return_type<T_y, T_shape, T_inv_scale>::type
+
52  gamma_log(const T_y& y, const T_shape& alpha, const T_inv_scale& beta) {
+
53  static const char* function("stan::math::gamma_log");
+
54  typedef typename stan::partials_return_type<T_y, T_shape,
+
55  T_inv_scale>::type
+
56  T_partials_return;
+
57 
+ + + + + + +
64 
+
65  // check if any vectors are zero length
+
66  if (!(stan::length(y)
+
67  && stan::length(alpha)
+
68  && stan::length(beta)))
+
69  return 0.0;
+
70 
+
71  // set up return value accumulator
+
72  T_partials_return logp(0.0);
+
73 
+
74  // validate args (here done over var, which should be OK)
+
75  check_not_nan(function, "Random variable", y);
+
76  check_positive_finite(function, "Shape parameter", alpha);
+
77  check_positive_finite(function, "Inverse scale parameter", beta);
+
78  check_consistent_sizes(function,
+
79  "Random variable", y,
+
80  "Shape parameter", alpha,
+
81  "Inverse scale parameter", beta);
+
82 
+
83  // check if no variables are involved and prop-to
+ +
85  return 0.0;
+
86 
+
87  // set up template expressions wrapping scalars into vector views
+
88  VectorView<const T_y> y_vec(y);
+
89  VectorView<const T_shape> alpha_vec(alpha);
+
90  VectorView<const T_inv_scale> beta_vec(beta);
+
91 
+
92  for (size_t n = 0; n < length(y); n++) {
+
93  const T_partials_return y_dbl = value_of(y_vec[n]);
+
94  if (y_dbl < 0)
+
95  return LOG_ZERO;
+
96  }
+
97 
+
98  size_t N = max_size(y, alpha, beta);
+ +
100  operands_and_partials(y, alpha, beta);
+
101 
+
102  using boost::math::lgamma;
+ +
104  using boost::math::digamma;
+
105  using std::log;
+
106 
+ +
108  T_partials_return, T_y> log_y(length(y));
+ +
110  for (size_t n = 0; n < length(y); n++) {
+
111  if (value_of(y_vec[n]) > 0)
+
112  log_y[n] = log(value_of(y_vec[n]));
+
113  }
+
114  }
+
115 
+ +
117  T_partials_return, T_shape> lgamma_alpha(length(alpha));
+ +
119  T_partials_return, T_shape> digamma_alpha(length(alpha));
+
120  for (size_t n = 0; n < length(alpha); n++) {
+ +
122  lgamma_alpha[n] = lgamma(value_of(alpha_vec[n]));
+ +
124  digamma_alpha[n] = digamma(value_of(alpha_vec[n]));
+
125  }
+
126 
+ +
128  T_partials_return, T_inv_scale> log_beta(length(beta));
+ +
130  for (size_t n = 0; n < length(beta); n++)
+
131  log_beta[n] = log(value_of(beta_vec[n]));
+
132  }
+
133 
+
134  for (size_t n = 0; n < N; n++) {
+
135  // pull out values of arguments
+
136  const T_partials_return y_dbl = value_of(y_vec[n]);
+
137  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
138  const T_partials_return beta_dbl = value_of(beta_vec[n]);
+
139 
+ +
141  logp -= lgamma_alpha[n];
+ +
143  logp += alpha_dbl * log_beta[n];
+ +
145  logp += (alpha_dbl-1.0) * log_y[n];
+ +
147  logp -= beta_dbl * y_dbl;
+
148 
+
149  // gradients
+ +
151  operands_and_partials.d_x1[n] += (alpha_dbl-1)/y_dbl - beta_dbl;
+ +
153  operands_and_partials.d_x2[n] += -digamma_alpha[n] + log_beta[n]
+
154  + log_y[n];
+ +
156  operands_and_partials.d_x3[n] += alpha_dbl / beta_dbl - y_dbl;
+
157  }
+
158  return operands_and_partials.to_var(logp, y, alpha, beta);
+
159  }
+
160 
+
161  template <typename T_y, typename T_shape, typename T_inv_scale>
+
162  inline
+ +
164  gamma_log(const T_y& y, const T_shape& alpha, const T_inv_scale& beta) {
+
165  return gamma_log<false>(y, alpha, beta);
+
166  }
+
167  }
+
168 }
+
169 
+
170 #endif
+ +
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
const double LOG_ZERO
Definition: constants.hpp:175
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ + +
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + +
fvar< T > multiply_log(const fvar< T > &x1, const fvar< T > &x2)
+ + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
return_type< T_y, T_shape, T_inv_scale >::type gamma_log(const T_y &y, const T_shape &alpha, const T_inv_scale &beta)
The log of a gamma density for y with the specified shape and inverse scale parameters.
Definition: gamma_log.hpp:52
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/gamma__rng_8hpp.html b/doc/api/html/gamma__rng_8hpp.html new file mode 100644 index 00000000000..ade6b7d8062 --- /dev/null +++ b/doc/api/html/gamma__rng_8hpp.html @@ -0,0 +1,150 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/gamma_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
gamma_rng.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
double stan::math::gamma_rng (const double alpha, const double beta, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/gamma__rng_8hpp_source.html b/doc/api/html/gamma__rng_8hpp_source.html new file mode 100644 index 00000000000..6250eb0b4ea --- /dev/null +++ b/doc/api/html/gamma__rng_8hpp_source.html @@ -0,0 +1,189 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/gamma_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
gamma_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_GAMMA_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_GAMMA_RNG_HPP
+
3 
+
4 #include <boost/random/gamma_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + + + + +
26 
+
27 namespace stan {
+
28 
+
29  namespace math {
+
30 
+
31  template <class RNG>
+
32  inline double
+
33  gamma_rng(const double alpha,
+
34  const double beta,
+
35  RNG& rng) {
+
36  using boost::variate_generator;
+
37  using boost::gamma_distribution;
+
38 
+
39  static const char* function("stan::math::gamma_rng");
+
40 
+ +
42 
+
43  check_positive_finite(function, "Shape parameter", alpha);
+
44  check_positive_finite(function, "Inverse scale parameter", beta);
+
45 
+
46  /*
+
47  the boost gamma distribution is defined by
+
48  shape and scale, whereas the stan one is defined
+
49  by shape and rate
+
50  */
+
51  variate_generator<RNG&, gamma_distribution<> >
+
52  gamma_rng(rng, gamma_distribution<>(alpha, 1.0 / beta));
+
53  return gamma_rng();
+
54  }
+
55 
+
56  }
+
57 }
+
58 
+
59 #endif
+ +
double gamma_rng(const double alpha, const double beta, RNG &rng)
Definition: gamma_rng.hpp:33
+ + + + + + + + + + + + + + + + + + + +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/gaussian__dlm__obs__log_8hpp.html b/doc/api/html/gaussian__dlm__obs__log_8hpp.html new file mode 100644 index 00000000000..c8f603ce97d --- /dev/null +++ b/doc/api/html/gaussian__dlm__obs__log_8hpp.html @@ -0,0 +1,173 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/gaussian_dlm_obs_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
gaussian_dlm_obs_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_F , typename T_G , typename T_V , typename T_W , typename T_m0 , typename T_C0 >
return_type< T_y, typename
+return_type< T_F, T_G, T_V,
+T_W, T_m0, T_C0 >::type >
+::type 
stan::math::gaussian_dlm_obs_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_F, Eigen::Dynamic, Eigen::Dynamic > &F, const Eigen::Matrix< T_G, Eigen::Dynamic, Eigen::Dynamic > &G, const Eigen::Matrix< T_V, Eigen::Dynamic, Eigen::Dynamic > &V, const Eigen::Matrix< T_W, Eigen::Dynamic, Eigen::Dynamic > &W, const Eigen::Matrix< T_m0, Eigen::Dynamic, 1 > &m0, const Eigen::Matrix< T_C0, Eigen::Dynamic, Eigen::Dynamic > &C0)
 The log of a Gaussian dynamic linear model (GDLM). More...
 
template<typename T_y , typename T_F , typename T_G , typename T_V , typename T_W , typename T_m0 , typename T_C0 >
return_type< T_y, typename
+return_type< T_F, T_G, T_V,
+T_W, T_m0, T_C0 >::type >
+::type 
stan::math::gaussian_dlm_obs_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_F, Eigen::Dynamic, Eigen::Dynamic > &F, const Eigen::Matrix< T_G, Eigen::Dynamic, Eigen::Dynamic > &G, const Eigen::Matrix< T_V, Eigen::Dynamic, Eigen::Dynamic > &V, const Eigen::Matrix< T_W, Eigen::Dynamic, Eigen::Dynamic > &W, const Eigen::Matrix< T_m0, Eigen::Dynamic, 1 > &m0, const Eigen::Matrix< T_C0, Eigen::Dynamic, Eigen::Dynamic > &C0)
 
template<bool propto, typename T_y , typename T_F , typename T_G , typename T_V , typename T_W , typename T_m0 , typename T_C0 >
return_type< T_y, typename
+return_type< T_F, T_G, T_V,
+T_W, T_m0, T_C0 >::type >
+::type 
stan::math::gaussian_dlm_obs_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_F, Eigen::Dynamic, Eigen::Dynamic > &F, const Eigen::Matrix< T_G, Eigen::Dynamic, Eigen::Dynamic > &G, const Eigen::Matrix< T_V, Eigen::Dynamic, 1 > &V, const Eigen::Matrix< T_W, Eigen::Dynamic, Eigen::Dynamic > &W, const Eigen::Matrix< T_m0, Eigen::Dynamic, 1 > &m0, const Eigen::Matrix< T_C0, Eigen::Dynamic, Eigen::Dynamic > &C0)
 The log of a Gaussian dynamic linear model (GDLM) with uncorrelated observation disturbances. More...
 
template<typename T_y , typename T_F , typename T_G , typename T_V , typename T_W , typename T_m0 , typename T_C0 >
return_type< T_y, typename
+return_type< T_F, T_G, T_V,
+T_W, T_m0, T_C0 >::type >
+::type 
stan::math::gaussian_dlm_obs_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_F, Eigen::Dynamic, Eigen::Dynamic > &F, const Eigen::Matrix< T_G, Eigen::Dynamic, Eigen::Dynamic > &G, const Eigen::Matrix< T_V, Eigen::Dynamic, 1 > &V, const Eigen::Matrix< T_W, Eigen::Dynamic, Eigen::Dynamic > &W, const Eigen::Matrix< T_m0, Eigen::Dynamic, 1 > &m0, const Eigen::Matrix< T_C0, Eigen::Dynamic, Eigen::Dynamic > &C0)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/gaussian__dlm__obs__log_8hpp_source.html b/doc/api/html/gaussian__dlm__obs__log_8hpp_source.html new file mode 100644 index 00000000000..ff88224e8d6 --- /dev/null +++ b/doc/api/html/gaussian__dlm__obs__log_8hpp_source.html @@ -0,0 +1,541 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/gaussian_dlm_obs_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
gaussian_dlm_obs_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_GAUSSIAN_DLM_OBS_LOG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_GAUSSIAN_DLM_OBS_LOG_HPP
+
3 
+
4 #include <boost/random/normal_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + + +
24 
+ + +
27 
+
28 /*
+
29  TODO: time-varying system matrices
+
30  TODO: use sequential processing even for non-diagonal obs
+
31  covariance.
+
32  TODO: add constant terms in observation.
+
33 */
+
34 
+
35 namespace stan {
+
36  namespace math {
+
70  template <bool propto,
+
71  typename T_y,
+
72  typename T_F, typename T_G,
+
73  typename T_V, typename T_W,
+
74  typename T_m0, typename T_C0
+
75  >
+
76  typename return_type<
+
77  T_y,
+
78  typename return_type<T_F, T_G, T_V, T_W, T_m0, T_C0>::type >::type
+
79  gaussian_dlm_obs_log(const Eigen::Matrix
+
80  <T_y, Eigen::Dynamic, Eigen::Dynamic>& y,
+
81  const Eigen::Matrix
+
82  <T_F, Eigen::Dynamic, Eigen::Dynamic>& F,
+
83  const Eigen::Matrix
+
84  <T_G, Eigen::Dynamic, Eigen::Dynamic>& G,
+
85  const Eigen::Matrix
+
86  <T_V, Eigen::Dynamic, Eigen::Dynamic>& V,
+
87  const Eigen::Matrix
+
88  <T_W, Eigen::Dynamic, Eigen::Dynamic>& W,
+
89  const Eigen::Matrix<T_m0, Eigen::Dynamic, 1>& m0,
+
90  const Eigen::Matrix
+
91  <T_C0, Eigen::Dynamic, Eigen::Dynamic>& C0) {
+
92  static const char* function("stan::math::gaussian_dlm_obs_log");
+
93  typedef typename return_type<
+
94  T_y,
+ +
96  T_lp lp(0.0);
+
97 
+
98  using stan::math::add;
+ + + + + + + + +
107  using stan::math::multiply;
+ +
109  using stan::math::subtract;
+ +
111  using stan::math::transpose;
+
112 
+
113  int r = y.rows(); // number of variables
+
114  int T = y.cols(); // number of observations
+
115  int n = G.rows(); // number of states
+
116 
+
117  // check y
+
118  check_finite(function, "y", y);
+
119  check_not_nan(function, "y", y);
+
120  // check F
+
121  check_size_match(function,
+
122  "columns of F", F.cols(),
+
123  "rows of y", y.rows());
+
124  check_size_match(function,
+
125  "rows of F", F.rows(),
+
126  "rows of G", G.rows());
+
127  check_finite(function, "F", F);
+
128  // check G
+
129  check_square(function, "G", G);
+
130  check_finite(function, "G", G);
+
131  // check V
+
132  check_size_match(function,
+
133  "rows of V", V.rows(),
+
134  "rows of y", y.rows());
+
135  // TODO(anyone): incorporate support for infinite V
+
136  check_finite(function, "V", V);
+
137  check_spsd_matrix(function, "V", V);
+
138  // check W
+
139  check_size_match(function,
+
140  "rows of W", W.rows(),
+
141  "rows of G", G.rows());
+
142  // TODO(anyone): incorporate support for infinite W
+
143  check_finite(function, "W", W);
+
144  check_spsd_matrix(function, "W", W);
+
145  // check m0
+
146  check_size_match(function,
+
147  "size of m0", m0.size(),
+
148  "rows of G", G.rows());
+
149  check_finite(function, "m0", m0);
+
150  // check C0
+
151  check_size_match(function,
+
152  "rows of C0", C0.rows(),
+
153  "rows of G", G.rows());
+
154  check_cov_matrix(function, "C0", C0);
+
155  check_finite(function, "C0", C0);
+
156 
+
157  if (y.cols() == 0 || y.rows() == 0)
+
158  return lp;
+
159 
+ +
161  lp -= 0.5 * LOG_TWO_PI * r * T;
+
162  }
+
163 
+ +
165  Eigen::Matrix<T_lp, Eigen::Dynamic, 1> m(n);
+
166  Eigen::Matrix<T_lp, Eigen::Dynamic, Eigen::Dynamic> C(n, n);
+
167 
+
168  // TODO(anyone): how to recast matrices
+
169  for (int i = 0; i < m0.size(); i++) {
+
170  m(i) = m0(i);
+
171  }
+
172  for (int i = 0; i < C0.rows(); i++) {
+
173  for (int j = 0; j < C0.cols(); j++) {
+
174  C(i, j) = C0(i, j);
+
175  }
+
176  }
+
177 
+
178  Eigen::Matrix<typename return_type<T_y>::type,
+
179  Eigen::Dynamic, 1> yi(r);
+
180  Eigen::Matrix<T_lp, Eigen::Dynamic, 1> a(n);
+
181  Eigen::Matrix<T_lp, Eigen::Dynamic, Eigen::Dynamic> R(n, n);
+
182  Eigen::Matrix<T_lp, Eigen::Dynamic, 1> f(r);
+
183  Eigen::Matrix<T_lp, Eigen::Dynamic, Eigen::Dynamic> Q(r, r);
+
184  Eigen::Matrix<T_lp, Eigen::Dynamic, Eigen::Dynamic> Q_inv(r, r);
+
185  Eigen::Matrix<T_lp, Eigen::Dynamic, 1> e(r);
+
186  Eigen::Matrix<T_lp, Eigen::Dynamic, Eigen::Dynamic> A(n, r);
+
187 
+
188  for (int i = 0; i < y.cols(); i++) {
+
189  yi = y.col(i);
+
190  // // Predict state
+
191  // a_t = G_t m_{t-1}
+
192  a = multiply(G, m);
+
193  // R_t = G_t C_{t-1} G_t' + W_t
+
194  R = add(quad_form_sym(C, transpose(G)), W);
+
195  // // predict observation
+
196  // f_t = F_t' a_t
+
197  f = multiply(transpose(F), a);
+
198  // Q_t = F'_t R_t F_t + V_t
+
199  Q = add(quad_form_sym(R, F), V);
+
200  Q_inv = inverse_spd(Q);
+
201  // // filtered state
+
202  // e_t = y_t - f_t
+
203  e = subtract(yi, f);
+
204  // A_t = R_t F_t Q^{-1}_t
+
205  A = multiply(multiply(R, F), Q_inv);
+
206  // m_t = a_t + A_t e_t
+
207  m = add(a, multiply(A, e));
+
208  // C = R_t - A_t Q_t A_t'
+
209  C = subtract(R, quad_form_sym(Q, transpose(A)));
+
210  lp -= 0.5 * (log_determinant_spd(Q) + trace_quad_form(Q_inv, e));
+
211  }
+
212  }
+
213  return lp;
+
214  }
+
215 
+
216  template <typename T_y,
+
217  typename T_F, typename T_G,
+
218  typename T_V, typename T_W,
+
219  typename T_m0, typename T_C0
+
220  >
+
221  inline
+
222  typename return_type<
+
223  T_y,
+ +
225  gaussian_dlm_obs_log(const Eigen::Matrix
+
226  <T_y, Eigen::Dynamic, Eigen::Dynamic>& y,
+
227  const Eigen::Matrix
+
228  <T_F, Eigen::Dynamic, Eigen::Dynamic>& F,
+
229  const Eigen::Matrix
+
230  <T_G, Eigen::Dynamic, Eigen::Dynamic>& G,
+
231  const Eigen::Matrix
+
232  <T_V, Eigen::Dynamic, Eigen::Dynamic>& V,
+
233  const Eigen::Matrix
+
234  <T_W, Eigen::Dynamic, Eigen::Dynamic>& W,
+
235  const Eigen::Matrix<T_m0, Eigen::Dynamic, 1>& m0,
+
236  const Eigen::Matrix
+
237  <T_C0, Eigen::Dynamic, Eigen::Dynamic>& C0) {
+
238  return gaussian_dlm_obs_log<false>(y, F, G, V, W, m0, C0);
+
239  }
+
240 
+
276  template <bool propto,
+
277  typename T_y,
+
278  typename T_F, typename T_G,
+
279  typename T_V, typename T_W,
+
280  typename T_m0, typename T_C0
+
281  >
+
282  typename return_type<
+
283  T_y,
+ +
285  gaussian_dlm_obs_log(const Eigen::Matrix
+
286  <T_y, Eigen::Dynamic, Eigen::Dynamic>& y,
+
287  const Eigen::Matrix
+
288  <T_F, Eigen::Dynamic, Eigen::Dynamic>& F,
+
289  const Eigen::Matrix
+
290  <T_G, Eigen::Dynamic, Eigen::Dynamic>& G,
+
291  const Eigen::Matrix<T_V, Eigen::Dynamic, 1>& V,
+
292  const Eigen::Matrix
+
293  <T_W, Eigen::Dynamic, Eigen::Dynamic>& W,
+
294  const Eigen::Matrix<T_m0, Eigen::Dynamic, 1>& m0,
+
295  const Eigen::Matrix
+
296  <T_C0, Eigen::Dynamic, Eigen::Dynamic>& C0) {
+
297  static const char* function("stan::math::gaussian_dlm_obs_log");
+
298  typedef
+
299  typename return_type
+ +
301  T_lp;
+
302  T_lp lp(0.0);
+
303 
+
304  using stan::math::add;
+ + + + + + + +
312  using stan::math::multiply;
+ +
314  using stan::math::subtract;
+ + +
317  using stan::math::transpose;
+
318  using std::log;
+
319 
+
320  int r = y.rows(); // number of variables
+
321  int T = y.cols(); // number of observations
+
322  int n = G.rows(); // number of states
+
323 
+
324  // check y
+
325  check_finite(function, "y", y);
+
326  check_not_nan(function, "y", y);
+
327  // check F
+
328  check_size_match(function,
+
329  "columns of F", F.cols(),
+
330  "rows of y", y.rows());
+
331  check_size_match(function,
+
332  "rows of F", F.rows(),
+
333  "rows of G", G.rows());
+
334  check_finite(function, "F", F);
+
335  check_not_nan(function, "F", F);
+
336  // check G
+
337  check_size_match(function,
+
338  "rows of G", G.rows(),
+
339  "columns of G", G.cols());
+
340  check_finite(function, "G", G);
+
341  check_not_nan(function, "G", G);
+
342  // check V
+
343  check_nonnegative(function, "V", V);
+
344  check_size_match(function,
+
345  "size of V", V.size(),
+
346  "rows of y", y.rows());
+
347  // TODO(anyone): support infinite V
+
348  check_finite(function, "V", V);
+
349  check_not_nan(function, "V", V);
+
350  // check W
+
351  check_spsd_matrix(function, "W", W);
+
352  check_size_match(function,
+
353  "rows of W", W.rows(),
+
354  "rows of G", G.rows());
+
355  // TODO(anyone): support infinite W
+
356  check_finite(function, "W", W);
+
357  check_not_nan(function, "W", W);
+
358  // check m0
+
359  check_size_match(function,
+
360  "size of m0", m0.size(),
+
361  "rows of G", G.rows());
+
362  check_finite(function, "m0", m0);
+
363  check_not_nan(function, "m0", m0);
+
364  // check C0
+
365  check_cov_matrix(function, "C0", C0);
+
366  check_size_match(function,
+
367  "rows of C0", C0.rows(),
+
368  "rows of G", G.rows());
+
369  check_finite(function, "C0", C0);
+
370  check_not_nan(function, "C0", C0);
+
371 
+
372  if (y.cols() == 0 || y.rows() == 0)
+
373  return lp;
+
374 
+ +
376  lp += 0.5 * NEG_LOG_TWO_PI * r * T;
+
377  }
+
378 
+ +
380  T_lp f;
+
381  T_lp Q;
+
382  T_lp Q_inv;
+
383  T_lp e;
+
384  Eigen::Matrix<T_lp, Eigen::Dynamic, 1> A(n);
+
385  Eigen::Matrix<T_lp, Eigen::Dynamic, 1> Fj(n);
+
386  Eigen::Matrix<T_lp, Eigen::Dynamic, 1> m(n);
+
387  Eigen::Matrix<T_lp, Eigen::Dynamic, Eigen::Dynamic> C(n, n);
+
388 
+
389  // TODO(anyone): how to recast matrices
+
390  for (int i = 0; i < m0.size(); i++) {
+
391  m(i) = m0(i);
+
392  }
+
393  for (int i = 0; i < C0.rows(); i++) {
+
394  for (int j = 0; j < C0.cols(); j++) {
+
395  C(i, j) = C0(i, j);
+
396  }
+
397  }
+
398 
+
399  for (int i = 0; i < y.cols(); i++) {
+
400  // Predict state
+
401  // reuse m and C instead of using a and R
+
402  m = multiply(G, m);
+
403  C = add(quad_form_sym(C, transpose(G)), W);
+
404  for (int j = 0; j < y.rows(); ++j) {
+
405  // predict observation
+
406  T_lp yij(y(j, i));
+
407  // dim Fj = (n, 1)
+
408  for (int k = 0; k < F.rows(); ++k) {
+
409  Fj(k) = F(k, j);
+
410  }
+
411  // // f_{t, i} = F_{t, i}' m_{t, i-1}
+
412  f = dot_product(Fj, m);
+
413  Q = trace_quad_form(C, Fj) + V(j);
+
414  Q_inv = 1.0 / Q;
+
415  // // filtered observation
+
416  // // e_{t, i} = y_{t, i} - f_{t, i}
+
417  e = yij - f;
+
418  // // A_{t, i} = C_{t, i-1} F_{t, i} Q_{t, i}^{-1}
+
419  A = multiply(multiply(C, Fj), Q_inv);
+
420  // // m_{t, i} = m_{t, i-1} + A_{t, i} e_{t, i}
+
421  m += multiply(A, e);
+
422  // // c_{t, i} = C_{t, i-1} - Q_{t, i} A_{t, i} A_{t, i}'
+
423  // // // tcrossprod throws an error (ambiguous)
+
424  // C = subtract(C, multiply(Q, tcrossprod(A)));
+
425  C -= multiply(Q, multiply(A, transpose(A)));
+
426  C = 0.5 * add(C, transpose(C));
+
427  lp -= 0.5 * (log(Q) + pow(e, 2) * Q_inv);
+
428  }
+
429  }
+
430  }
+
431  return lp;
+
432  }
+
433 
+
434  template <typename T_y,
+
435  typename T_F, typename T_G,
+
436  typename T_V, typename T_W,
+
437  typename T_m0, typename T_C0>
+
438  inline
+
439  typename return_type
+ + +
442  (const Eigen::Matrix<T_y, Eigen::Dynamic, Eigen::Dynamic>& y,
+
443  const Eigen::Matrix<T_F, Eigen::Dynamic, Eigen::Dynamic>& F,
+
444  const Eigen::Matrix<T_G, Eigen::Dynamic, Eigen::Dynamic>& G,
+
445  const Eigen::Matrix<T_V, Eigen::Dynamic, 1>& V,
+
446  const Eigen::Matrix<T_W, Eigen::Dynamic, Eigen::Dynamic>& W,
+
447  const Eigen::Matrix<T_m0, Eigen::Dynamic, 1>& m0,
+
448  const Eigen::Matrix<T_C0, Eigen::Dynamic, Eigen::Dynamic>& C0) {
+
449  return gaussian_dlm_obs_log<false>(y, F, G, V, W, m0, C0);
+
450  }
+
451  }
+
452 
+
453 }
+
454 
+
455 #endif
+ + + + +
fvar< T > trace_quad_form(const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, CB > &B)
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
Eigen::Matrix< typename boost::math::tools::promote_args< T1, T2 >::type, R, C > subtract(const Eigen::Matrix< T1, R, C > &m1, const Eigen::Matrix< T2, R, C > &m2)
Return the result of subtracting the second specified matrix from the first specified matrix...
Definition: subtract.hpp:27
+
return_type< T_y, typename return_type< T_F, T_G, T_V, T_W, T_m0, T_C0 >::type >::type gaussian_dlm_obs_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_F, Eigen::Dynamic, Eigen::Dynamic > &F, const Eigen::Matrix< T_G, Eigen::Dynamic, Eigen::Dynamic > &G, const Eigen::Matrix< T_V, Eigen::Dynamic, Eigen::Dynamic > &V, const Eigen::Matrix< T_W, Eigen::Dynamic, Eigen::Dynamic > &W, const Eigen::Matrix< T_m0, Eigen::Dynamic, 1 > &m0, const Eigen::Matrix< T_C0, Eigen::Dynamic, Eigen::Dynamic > &C0)
The log of a Gaussian dynamic linear model (GDLM).
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
Eigen::Matrix< fvar< T >, R1, C1 > multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m, const fvar< T > &c)
Definition: multiply.hpp:20
+ +
Metaprogram to calculate the base scalar return type resulting from promoting all the scalar types of...
Definition: return_type.hpp:19
+
bool check_cov_matrix(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is a valid covariance matrix.
+
Eigen::Matrix< fvar< T >, R, R > tcrossprod(const Eigen::Matrix< fvar< T >, R, C > &m)
Definition: tcrossprod.hpp:17
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ + + +
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ +
const double LOG_TWO_PI
Definition: constants.hpp:193
+ + + +
bool check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Return true if the provided sizes match.
+
fvar< T > dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
Definition: dot_product.hpp:20
+ +
bool check_spsd_matrix(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is a square, symmetric, and positive semi-definite.
+
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+
Eigen::Matrix< fvar< T >, CB, CB > quad_form_sym(const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< double, RB, CB > &B)
+ + +
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > inverse_spd(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
Returns the inverse of the specified symmetric, pos/neg-definite matrix.
Definition: inverse_spd.hpp:19
+
const double NEG_LOG_TWO_PI
Definition: constants.hpp:195
+
Eigen::Matrix< typename boost::math::tools::promote_args< T1, T2 >::type, R, C > add(const Eigen::Matrix< T1, R, C > &m1, const Eigen::Matrix< T2, R, C > &m2)
Return the sum of the specified matrices.
Definition: add.hpp:27
+
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+
Eigen::Matrix< T, C, R > transpose(const Eigen::Matrix< T, R, C > &m)
Definition: transpose.hpp:12
+ + +
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ + +
T log_determinant_spd(const Eigen::Matrix< T, R, C > &m)
Returns the log absolute determinant of the specified square matrix.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/get__base1_8hpp.html b/doc/api/html/get__base1_8hpp.html new file mode 100644 index 00000000000..db403c4a7c7 --- /dev/null +++ b/doc/api/html/get__base1_8hpp.html @@ -0,0 +1,177 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/get_base1.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
get_base1.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T >
const T & stan::math::get_base1 (const std::vector< T > &x, size_t i, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one index. More...
 
template<typename T >
const T & stan::math::get_base1 (const std::vector< std::vector< T > > &x, size_t i1, size_t i2, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one indexes. More...
 
template<typename T >
const T & stan::math::get_base1 (const std::vector< std::vector< std::vector< T > > > &x, size_t i1, size_t i2, size_t i3, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one indexes. More...
 
template<typename T >
const T & stan::math::get_base1 (const std::vector< std::vector< std::vector< std::vector< T > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one indexes. More...
 
template<typename T >
const T & stan::math::get_base1 (const std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one indexes. More...
 
template<typename T >
const T & stan::math::get_base1 (const std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, size_t i6, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one indexes. More...
 
template<typename T >
const T & stan::math::get_base1 (const std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, size_t i6, size_t i7, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one indexes. More...
 
template<typename T >
const T & stan::math::get_base1 (const std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, size_t i6, size_t i7, size_t i8, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one indexes. More...
 
template<typename T >
Eigen::Matrix< T,
+1, Eigen::Dynamic > 
stan::math::get_base1 (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &x, size_t m, const char *error_msg, size_t idx)
 Return a copy of the row of the specified vector at the specified base-one row index. More...
 
template<typename T >
const T & stan::math::get_base1 (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &x, size_t m, size_t n, const char *error_msg, size_t idx)
 Return a reference to the value of the specified matrix at the specified base-one row and column indexes. More...
 
template<typename T >
const T & stan::math::get_base1 (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, size_t m, const char *error_msg, size_t idx)
 Return a reference to the value of the specified column vector at the specified base-one index. More...
 
template<typename T >
const T & stan::math::get_base1 (const Eigen::Matrix< T, 1, Eigen::Dynamic > &x, size_t n, const char *error_msg, size_t idx)
 Return a reference to the value of the specified row vector at the specified base-one index. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/get__base1_8hpp_source.html b/doc/api/html/get__base1_8hpp_source.html new file mode 100644 index 00000000000..0d15185b9c4 --- /dev/null +++ b/doc/api/html/get__base1_8hpp_source.html @@ -0,0 +1,296 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/get_base1.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
get_base1.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_GET_BASE1_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_GET_BASE1_HPP
+
3 
+ + +
6 #include <vector>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
25  template <typename T>
+
26  inline const T&
+
27  get_base1(const std::vector<T>& x,
+
28  size_t i,
+
29  const char* error_msg,
+
30  size_t idx) {
+ +
32  check_range("[]", "x", x.size(), i, idx, error_msg);
+
33  return x[i - 1];
+
34  }
+
35 
+
51  template <typename T>
+
52  inline const T&
+
53  get_base1(const std::vector<std::vector<T> >& x,
+
54  size_t i1,
+
55  size_t i2,
+
56  const char* error_msg,
+
57  size_t idx) {
+ +
59  check_range("[]", "x", x.size(), i1, idx, error_msg);
+
60  return get_base1(x[i1 - 1], i2, error_msg, idx+1);
+
61  }
+
62 
+
79  template <typename T>
+
80  inline const T&
+
81  get_base1(const std::vector<std::vector<std::vector<T> > >& x,
+
82  size_t i1,
+
83  size_t i2,
+
84  size_t i3,
+
85  const char* error_msg,
+
86  size_t idx) {
+ +
88  check_range("[]", "x", x.size(), i1, idx, error_msg);
+
89  return get_base1(x[i1 - 1], i2, i3, error_msg, idx+1);
+
90  }
+
91 
+
109  template <typename T>
+
110  inline const T&
+
111  get_base1(const std::vector<std::vector<std::vector<std::vector<T> > > >& x,
+
112  size_t i1,
+
113  size_t i2,
+
114  size_t i3,
+
115  size_t i4,
+
116  const char* error_msg,
+
117  size_t idx) {
+ +
119  check_range("[]", "x", x.size(), i1, idx, error_msg);
+
120  return get_base1(x[i1 - 1], i2, i3, i4, error_msg, idx+1);
+
121  }
+
122 
+
141  template <typename T>
+
142  inline const T&
+
143  get_base1(const std::vector<std::vector<std::vector<std::vector
+
144  <std::vector<T> > > > >& x,
+
145  size_t i1,
+
146  size_t i2,
+
147  size_t i3,
+
148  size_t i4,
+
149  size_t i5,
+
150  const char* error_msg,
+
151  size_t idx) {
+ +
153  check_range("[]", "x", x.size(), i1, idx, error_msg);
+
154  return get_base1(x[i1 - 1], i2, i3, i4, i5, error_msg, idx+1);
+
155  }
+
156 
+
176  template <typename T>
+
177  inline const T&
+
178  get_base1(const std::vector<std::vector<std::vector<std::vector
+
179  <std::vector<std::vector<T> > > > > >& x,
+
180  size_t i1,
+
181  size_t i2,
+
182  size_t i3,
+
183  size_t i4,
+
184  size_t i5,
+
185  size_t i6,
+
186  const char* error_msg,
+
187  size_t idx) {
+ +
189  check_range("[]", "x", x.size(), i1, idx, error_msg);
+
190  return get_base1(x[i1 - 1], i2, i3, i4, i5, i6, error_msg, idx+1);
+
191  }
+
192 
+
193 
+
214  template <typename T>
+
215  inline const T&
+
216  get_base1(const std::vector<std::vector<std::vector<std::vector
+
217  <std::vector<std::vector<std::vector<T> > > > > > >& x,
+
218  size_t i1,
+
219  size_t i2,
+
220  size_t i3,
+
221  size_t i4,
+
222  size_t i5,
+
223  size_t i6,
+
224  size_t i7,
+
225  const char* error_msg,
+
226  size_t idx) {
+ +
228  check_range("[]", "x", x.size(), i1, idx, error_msg);
+
229  return get_base1(x[i1 - 1], i2, i3, i4, i5, i6, i7, error_msg, idx+1);
+
230  }
+
231 
+
232 
+
254  template <typename T>
+
255  inline const T&
+
256  get_base1(const std::vector<std::vector<std::vector
+
257  <std::vector<std::vector<std::vector
+
258  <std::vector<std::vector<T> > > > > > > >& x,
+
259  size_t i1,
+
260  size_t i2,
+
261  size_t i3,
+
262  size_t i4,
+
263  size_t i5,
+
264  size_t i6,
+
265  size_t i7,
+
266  size_t i8,
+
267  const char* error_msg,
+
268  size_t idx) {
+ +
270  check_range("[]", "x", x.size(), i1, idx, error_msg);
+
271  return get_base1(x[i1 - 1], i2, i3, i4, i5, i6, i7, i8, error_msg, idx+1);
+
272  }
+
273 
+
274 
+
275 
+
295  template <typename T>
+
296  inline Eigen::Matrix<T, 1, Eigen::Dynamic>
+
297  get_base1(const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>& x,
+
298  size_t m,
+
299  const char* error_msg,
+
300  size_t idx) {
+ +
302  check_range("[]", "rows of x", x.rows(), m, idx, error_msg);
+
303  return x.block(m-1, 0, 1, x.cols());
+
304  }
+
305 
+
322  template <typename T>
+
323  inline const T&
+
324  get_base1(const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>& x,
+
325  size_t m,
+
326  size_t n,
+
327  const char* error_msg,
+
328  size_t idx) {
+ +
330  check_range("[]", "rows of x", x.rows(), m, idx, error_msg);
+
331  check_range("[]", "cols of x", x.cols(), n, idx + 1, error_msg);
+
332  return x(m - 1, n - 1);
+
333  }
+
334 
+
349  template <typename T>
+
350  inline
+
351  const T& get_base1(const Eigen::Matrix<T, Eigen::Dynamic, 1>& x,
+
352  size_t m,
+
353  const char* error_msg,
+
354  size_t idx) {
+ +
356  check_range("[]", "x", x.size(), m, idx, error_msg);
+
357  return x(m - 1);
+
358  }
+
359 
+
374  template <typename T>
+
375  inline const T&
+
376  get_base1(const Eigen::Matrix<T, 1, Eigen::Dynamic>& x,
+
377  size_t n,
+
378  const char* error_msg,
+
379  size_t idx) {
+ +
381  check_range("[]", "x", x.size(), n, idx, error_msg);
+
382  return x(n - 1);
+
383  }
+
384 
+
385  }
+
386 }
+
387 #endif
+
bool check_range(const char *function, const char *name, const int max, const int index, const int nested_level, const char *error_msg)
Return true if specified index is within range.
Definition: check_range.hpp:29
+
const T & get_base1(const std::vector< T > &x, size_t i, const char *error_msg, size_t idx)
Return a reference to the value of the specified vector at the specified base-one index...
Definition: get_base1.hpp:27
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/get__base1__lhs_8hpp.html b/doc/api/html/get__base1__lhs_8hpp.html new file mode 100644 index 00000000000..66ad203f368 --- /dev/null +++ b/doc/api/html/get__base1__lhs_8hpp.html @@ -0,0 +1,177 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/get_base1_lhs.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
get_base1_lhs.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T >
T & stan::math::get_base1_lhs (std::vector< T > &x, size_t i, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one index. More...
 
template<typename T >
T & stan::math::get_base1_lhs (std::vector< std::vector< T > > &x, size_t i1, size_t i2, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one indexes. More...
 
template<typename T >
T & stan::math::get_base1_lhs (std::vector< std::vector< std::vector< T > > > &x, size_t i1, size_t i2, size_t i3, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one indexes. More...
 
template<typename T >
T & stan::math::get_base1_lhs (std::vector< std::vector< std::vector< std::vector< T > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one indexes. More...
 
template<typename T >
T & stan::math::get_base1_lhs (std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one indexes. More...
 
template<typename T >
T & stan::math::get_base1_lhs (std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, size_t i6, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one indexes. More...
 
template<typename T >
T & stan::math::get_base1_lhs (std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, size_t i6, size_t i7, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one indexes. More...
 
template<typename T >
T & stan::math::get_base1_lhs (std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, size_t i6, size_t i7, size_t i8, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one indexes. More...
 
template<typename T >
Eigen::Block< Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > > 
stan::math::get_base1_lhs (Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &x, size_t m, const char *error_msg, size_t idx)
 Return a copy of the row of the specified vector at the specified base-one row index. More...
 
template<typename T >
T & stan::math::get_base1_lhs (Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &x, size_t m, size_t n, const char *error_msg, size_t idx)
 Return a reference to the value of the specified matrix at the specified base-one row and column indexes. More...
 
template<typename T >
T & stan::math::get_base1_lhs (Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, size_t m, const char *error_msg, size_t idx)
 Return a reference to the value of the specified column vector at the specified base-one index. More...
 
template<typename T >
T & stan::math::get_base1_lhs (Eigen::Matrix< T, 1, Eigen::Dynamic > &x, size_t n, const char *error_msg, size_t idx)
 Return a reference to the value of the specified row vector at the specified base-one index. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/get__base1__lhs_8hpp_source.html b/doc/api/html/get__base1__lhs_8hpp_source.html new file mode 100644 index 00000000000..895a29491bd --- /dev/null +++ b/doc/api/html/get__base1__lhs_8hpp_source.html @@ -0,0 +1,300 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/get_base1_lhs.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
get_base1_lhs.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_GET_BASE1_LHS_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_GET_BASE1_LHS_HPP
+
3 
+ + +
6 #include <vector>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
25  template <typename T>
+
26  inline
+
27  T& get_base1_lhs(std::vector<T>& x,
+
28  size_t i,
+
29  const char* error_msg,
+
30  size_t idx) {
+ +
32  check_range("[]", "x", x.size(), i, idx, error_msg);
+
33  return x[i - 1];
+
34  }
+
35 
+
51  template <typename T>
+
52  inline
+
53  T& get_base1_lhs(std::vector<std::vector<T> >& x,
+
54  size_t i1,
+
55  size_t i2,
+
56  const char* error_msg,
+
57  size_t idx) {
+ +
59  check_range("[]", "x", x.size(), i1, idx, error_msg);
+
60  return get_base1_lhs(x[i1 - 1], i2, error_msg, idx+1);
+
61  }
+
62 
+
79  template <typename T>
+
80  inline
+
81  T& get_base1_lhs(std::vector<std::vector<std::vector<T> > >& x,
+
82  size_t i1,
+
83  size_t i2,
+
84  size_t i3,
+
85  const char* error_msg,
+
86  size_t idx) {
+ +
88  check_range("[]", "x", x.size(), i1, idx, error_msg);
+
89  return get_base1_lhs(x[i1 - 1], i2, i3, error_msg, idx+1);
+
90  }
+
91 
+
109  template <typename T>
+
110  inline
+
111  T& get_base1_lhs(std::vector<std::vector<std::vector
+
112  <std::vector<T> > > >& x,
+
113  size_t i1,
+
114  size_t i2,
+
115  size_t i3,
+
116  size_t i4,
+
117  const char* error_msg,
+
118  size_t idx) {
+ +
120  check_range("[]", "x", x.size(), i1, idx, error_msg);
+
121  return get_base1_lhs(x[i1 - 1], i2, i3, i4, error_msg, idx+1);
+
122  }
+
123 
+
142  template <typename T>
+
143  inline
+
144  T& get_base1_lhs(std::vector<std::vector<std::vector<std::vector
+
145  <std::vector<T> > > > >& x,
+
146  size_t i1,
+
147  size_t i2,
+
148  size_t i3,
+
149  size_t i4,
+
150  size_t i5,
+
151  const char* error_msg,
+
152  size_t idx) {
+ +
154  check_range("[]", "x", x.size(), i1, idx, error_msg);
+
155  return get_base1_lhs(x[i1 - 1], i2, i3, i4, i5, error_msg, idx+1);
+
156  }
+
157 
+
177  template <typename T>
+
178  inline
+
179  T& get_base1_lhs(std::vector<std::vector<std::vector<std::vector
+
180  <std::vector<std::vector<T> > > > > >& x,
+
181  size_t i1,
+
182  size_t i2,
+
183  size_t i3,
+
184  size_t i4,
+
185  size_t i5,
+
186  size_t i6,
+
187  const char* error_msg,
+
188  size_t idx) {
+ +
190  check_range("[]", "x", x.size(), i1, idx, error_msg);
+
191  return get_base1_lhs(x[i1 - 1], i2, i3, i4, i5, i6, error_msg, idx+1);
+
192  }
+
193 
+
194 
+
215  template <typename T>
+
216  inline
+
217  T& get_base1_lhs(std::vector<std::vector<std::vector<std::vector
+
218  <std::vector<std::vector
+
219  <std::vector<T> > > > > > >& x,
+
220  size_t i1,
+
221  size_t i2,
+
222  size_t i3,
+
223  size_t i4,
+
224  size_t i5,
+
225  size_t i6,
+
226  size_t i7,
+
227  const char* error_msg,
+
228  size_t idx) {
+ +
230  check_range("[]", "x", x.size(), i1, idx, error_msg);
+
231  return get_base1_lhs(x[i1 - 1], i2, i3, i4, i5, i6, i7, error_msg, idx+1);
+
232  }
+
233 
+
234 
+
256  template <typename T>
+
257  inline
+
258  T& get_base1_lhs(std::vector<std::vector<std::vector<std::vector
+
259  <std::vector<std::vector<std::vector
+
260  <std::vector<T> > > > > > > >& x,
+
261  size_t i1,
+
262  size_t i2,
+
263  size_t i3,
+
264  size_t i4,
+
265  size_t i5,
+
266  size_t i6,
+
267  size_t i7,
+
268  size_t i8,
+
269  const char* error_msg,
+
270  size_t idx) {
+ +
272  check_range("[]", "x", x.size(), i1, idx, error_msg);
+
273  return get_base1_lhs(x[i1 - 1], i2, i3, i4, i5, i6, i7, i8,
+
274  error_msg, idx+1);
+
275  }
+
276 
+
277 
+
278 
+
298  template <typename T>
+
299  inline
+
300  Eigen::Block<Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> >
+
301  get_base1_lhs(Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>& x,
+
302  size_t m,
+
303  const char* error_msg,
+
304  size_t idx) {
+ +
306  check_range("[]", "rows of x", x.rows(), m, idx, error_msg);
+
307  return x.block(m-1, 0, 1, x.cols());
+
308  }
+
309 
+
326  template <typename T>
+
327  inline
+
328  T& get_base1_lhs(Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>& x,
+
329  size_t m,
+
330  size_t n,
+
331  const char* error_msg,
+
332  size_t idx) {
+ +
334  check_range("[]", "rows of x", x.rows(), m, idx, error_msg);
+
335  check_range("[]", "cols of x", x.cols(), n, idx + 1, error_msg);
+
336  return x(m - 1, n - 1);
+
337  }
+
338 
+
353  template <typename T>
+
354  inline
+
355  T& get_base1_lhs(Eigen::Matrix<T, Eigen::Dynamic, 1>& x,
+
356  size_t m,
+
357  const char* error_msg,
+
358  size_t idx) {
+ +
360  check_range("[]", "x", x.size(), m, idx, error_msg);
+
361  return x(m - 1);
+
362  }
+
363 
+
378  template <typename T>
+
379  inline
+
380  T& get_base1_lhs(Eigen::Matrix<T, 1, Eigen::Dynamic>& x,
+
381  size_t n,
+
382  const char* error_msg,
+
383  size_t idx) {
+ +
385  check_range("[]", "x", x.size(), n, idx, error_msg);
+
386  return x(n - 1);
+
387  }
+
388 
+
389  }
+
390 }
+
391 #endif
+
bool check_range(const char *function, const char *name, const int max, const int index, const int nested_level, const char *error_msg)
Return true if specified index is within range.
Definition: check_range.hpp:29
+ +
T & get_base1_lhs(std::vector< T > &x, size_t i, const char *error_msg, size_t idx)
Return a reference to the value of the specified vector at the specified base-one index...
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/get__lp_8hpp.html b/doc/api/html/get__lp_8hpp.html new file mode 100644 index 00000000000..03d252ba0c5 --- /dev/null +++ b/doc/api/html/get__lp_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/get_lp.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
get_lp.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+#include <stan/math/prim/mat/fun/accumulator.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_lp , typename T_lp_accum >
boost::math::tools::promote_args
+< T_lp, T_lp_accum >::type 
stan::math::get_lp (const T_lp &lp, const stan::math::accumulator< T_lp_accum > &lp_accum)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/get__lp_8hpp_source.html b/doc/api/html/get__lp_8hpp_source.html new file mode 100644 index 00000000000..03c7d24df1a --- /dev/null +++ b/doc/api/html/get__lp_8hpp_source.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/get_lp.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
get_lp.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_GET_LP_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_GET_LP_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+ +
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
11  template <typename T_lp, typename T_lp_accum>
+
12  inline
+
13  typename boost::math::tools::promote_args<T_lp, T_lp_accum>::type
+
14  get_lp(const T_lp& lp,
+
15  const stan::math::accumulator<T_lp_accum>& lp_accum) {
+
16  return lp + lp_accum.sum();
+
17  }
+
18 
+
19  }
+
20 
+
21 }
+
22 
+
23 #endif
+
T sum() const
Return the sum of the accumulated values.
+ +
boost::math::tools::promote_args< T_lp, T_lp_accum >::type get_lp(const T_lp &lp, const stan::math::accumulator< T_lp_accum > &lp_accum)
Definition: get_lp.hpp:14
+
Class to accumulate values and eventually return their sum.
Definition: accumulator.hpp:25
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/gevv__vvv__vari_8hpp.html b/doc/api/html/gevv__vvv__vari_8hpp.html new file mode 100644 index 00000000000..0f357b601d5 --- /dev/null +++ b/doc/api/html/gevv__vvv__vari_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/core/gevv_vvv_vari.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
gevv_vvv_vari.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

class  stan::math::gevv_vvv_vari
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/gevv__vvv__vari_8hpp_source.html b/doc/api/html/gevv__vvv__vari_8hpp_source.html new file mode 100644 index 00000000000..709260c3262 --- /dev/null +++ b/doc/api/html/gevv__vvv__vari_8hpp_source.html @@ -0,0 +1,188 @@ + + + + + + +Stan Math Library: stan/math/rev/core/gevv_vvv_vari.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
gevv_vvv_vari.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_GEVV_VVV_VARI_HPP
+
2 #define STAN_MATH_REV_CORE_GEVV_VVV_VARI_HPP
+
3 
+ + + +
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+ +
12  protected:
+ + + +
16  double dotval_;
+
17  size_t length_;
+
18  inline static double eval_gevv(const stan::math::var* alpha,
+
19  const stan::math::var* v1, int stride1,
+
20  const stan::math::var* v2, int stride2,
+
21  size_t length, double *dotprod) {
+
22  double result = 0;
+
23  for (size_t i = 0; i < length; i++)
+
24  result += v1[i*stride1].vi_->val_ * v2[i*stride2].vi_->val_;
+
25  *dotprod = result;
+
26  return alpha->vi_->val_ * result;
+
27  }
+
28 
+
29  public:
+ +
31  const stan::math::var* v1, int stride1,
+
32  const stan::math::var* v2, int stride2, size_t length) :
+
33  vari(eval_gevv(alpha, v1, stride1, v2, stride2, length, &dotval_)),
+
34  length_(length) {
+
35  alpha_ = alpha->vi_;
+
36  v1_ = reinterpret_cast<stan::math::vari**>
+ +
38  .alloc(2 * length_ * sizeof(stan::math::vari*)));
+
39  v2_ = v1_ + length_;
+
40  for (size_t i = 0; i < length_; i++)
+
41  v1_[i] = v1[i*stride1].vi_;
+
42  for (size_t i = 0; i < length_; i++)
+
43  v2_[i] = v2[i*stride2].vi_;
+
44  }
+
45  virtual ~gevv_vvv_vari() {}
+
46  void chain() {
+
47  const double adj_alpha = adj_ * alpha_->val_;
+
48  for (size_t i = 0; i < length_; i++) {
+
49  v1_[i]->adj_ += adj_alpha * v2_[i]->val_;
+
50  v2_[i]->adj_ += adj_alpha * v1_[i]->val_;
+
51  }
+
52  alpha_->adj_ += adj_ * dotval_;
+
53  }
+
54  };
+
55 
+
56  }
+
57 }
+
58 
+
59 #endif
+ + + +
The variable implementation base class.
Definition: vari.hpp:28
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
static double eval_gevv(const stan::math::var *alpha, const stan::math::var *v1, int stride1, const stan::math::var *v2, int stride2, size_t length, double *dotprod)
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
const double val_
The value of this variable.
Definition: vari.hpp:36
+ +
stan::math::vari * alpha_
+ +
stan::math::vari ** v1_
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
gevv_vvv_vari(const stan::math::var *alpha, const stan::math::var *v1, int stride1, const stan::math::var *v2, int stride2, size_t length)
+
stan::math::vari ** v2_
+ +
double adj_
The adjoint of this variable, which is the partial derivative of this variable with respect to the ro...
Definition: vari.hpp:42
+ +
void * alloc(size_t len)
Return a newly allocated block of memory of the appropriate size managed by the stack allocator...
+
void chain()
Apply the chain rule to this variable based on the variables on which it depends. ...
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/globals.html b/doc/api/html/globals.html new file mode 100644 index 00000000000..519f238040e --- /dev/null +++ b/doc/api/html/globals.html @@ -0,0 +1,344 @@ + + + + + + +Stan Math Library: File Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
Here is a list of all file members with links to the files they belong to:
+ +

- _ -

+ + +

- a -

+ + +

- b -

+ + +

- c -

+ + +

- d -

+ + +

- e -

+ + +

- i -

+ + +

- l -

+ + +

- m -

+ + +

- n -

+ + +

- s -

+ + +

- u -

+ + +

- v -

+ + +

- x -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/globals_defs.html b/doc/api/html/globals_defs.html new file mode 100644 index 00000000000..c8d3c1949b0 --- /dev/null +++ b/doc/api/html/globals_defs.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: File Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/globals_vars.html b/doc/api/html/globals_vars.html new file mode 100644 index 00000000000..059accb9527 --- /dev/null +++ b/doc/api/html/globals_vars.html @@ -0,0 +1,318 @@ + + + + + + +Stan Math Library: File Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+  + +

- _ -

+ + +

- a -

+ + +

- b -

+ + +

- c -

+ + +

- d -

+ + +

- e -

+ + +

- i -

+ + +

- l -

+ + +

- m -

+ + +

- n -

+ + +

- s -

+ + +

- v -

+ + +

- x -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/grad__2_f1_8hpp.html b/doc/api/html/grad__2_f1_8hpp.html new file mode 100644 index 00000000000..6b9339202c8 --- /dev/null +++ b/doc/api/html/grad__2_f1_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/grad_2F1.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
grad_2F1.hpp File Reference
+
+
+
#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
void stan::math::grad_2F1 (T &gradA, T &gradC, T a, T b, T c, T z, T precision=1e-6)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/grad__2_f1_8hpp_source.html b/doc/api/html/grad__2_f1_8hpp_source.html new file mode 100644 index 00000000000..c51338b9ca1 --- /dev/null +++ b/doc/api/html/grad__2_f1_8hpp_source.html @@ -0,0 +1,159 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/grad_2F1.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
grad_2F1.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_GRAD_2F1_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_GRAD_2F1_HPP
+
3 
+
4 #include <cmath>
+
5 
+
6 namespace stan {
+
7 
+
8  namespace math {
+
9 
+
10  // Gradient of the hypergeometric function 2F1(a, b | c | z)
+
11  // with respect to a and c
+
12  template<typename T>
+
13  void grad_2F1(T& gradA, T& gradC, T a, T b, T c, T z, T precision = 1e-6) {
+
14  using std::fabs;
+
15 
+
16  gradA = 0;
+
17  gradC = 0;
+
18 
+
19  T gradAold = 0;
+
20  T gradCold = 0;
+
21 
+
22  int k = 0;
+
23  T tDak = 1.0 / (a - 1);
+
24 
+
25  while (fabs(tDak * (a + (k - 1)) ) > precision || k == 0) {
+
26  const T r = ( (a + k) / (c + k) ) * ( (b + k) / (T)(k + 1) ) * z;
+
27  tDak = r * tDak * (a + (k - 1)) / (a + k);
+
28 
+
29  if (r == 0) break;
+
30 
+
31  gradAold = r * gradAold + tDak;
+
32  gradCold = r * gradCold - tDak * ((a + k) / (c + k));
+
33 
+
34  gradA += gradAold;
+
35  gradC += gradCold;
+
36 
+
37  ++k;
+
38 
+
39  if (k > 200) break;
+
40  }
+
41  }
+
42 
+
43 
+
44  }
+
45 
+
46 }
+
47 
+
48 #endif
+
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:14
+
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+
void grad_2F1(T &gradA, T &gradC, T a, T b, T c, T z, T precision=1e-6)
Definition: grad_2F1.hpp:13
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/grad___f32_8hpp.html b/doc/api/html/grad___f32_8hpp.html new file mode 100644 index 00000000000..0418fb71d1d --- /dev/null +++ b/doc/api/html/grad___f32_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/grad_F32.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
grad_F32.hpp File Reference
+
+
+
#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
void stan::math::grad_F32 (T *g, T a, T b, T c, T d, T e, T z, T precision=1e-6)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/grad___f32_8hpp_source.html b/doc/api/html/grad___f32_8hpp_source.html new file mode 100644 index 00000000000..d0cbdb52a3f --- /dev/null +++ b/doc/api/html/grad___f32_8hpp_source.html @@ -0,0 +1,175 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/grad_F32.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
grad_F32.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_GRAD_F32_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_GRAD_F32_HPP
+
3 
+
4 #include <cmath>
+
5 
+
6 namespace stan {
+
7 
+
8  namespace math {
+
9 
+
10  template<typename T>
+
11  void grad_F32(T* g, T a, T b, T c, T d, T e, T z, T precision = 1e-6) {
+
12  using std::log;
+
13  using std::fabs;
+
14  using std::exp;
+
15 
+
16  T gOld[6];
+
17 
+
18  for (T *p = g; p != g + 6; ++p) *p = 0;
+
19  for (T *p = gOld; p != gOld + 6; ++p) *p = 0;
+
20 
+
21  T tOld = 1;
+
22  T tNew = 0;
+
23 
+
24  T logT = 0;
+
25 
+
26  T logZ = log(z);
+
27 
+
28  int k = 0;
+
29 
+
30  while (fabs(tNew) > precision || k == 0) {
+
31  T C = (a + k) / (d + k);
+
32  C *= (b + k) / (e + k);
+
33  C *= (c + k) / (1 + k);
+
34 
+
35  // If a, b, or c is a negative integer then the series terminates
+
36  // after a finite number of interations
+
37  if (C == 0) break;
+
38 
+
39  logT += (C > 0 ? 1 : -1) * log(fabs(C)) + logZ;
+
40 
+
41  tNew = exp(logT);
+
42 
+
43  gOld[0] = tNew * (gOld[0] / tOld + 1.0 / (a + k));
+
44  gOld[1] = tNew * (gOld[1] / tOld + 1.0 / (b + k));
+
45  gOld[2] = tNew * (gOld[2] / tOld + 1.0 / (c + k));
+
46 
+
47  gOld[3] = tNew * (gOld[3] / tOld - 1.0 / (d + k));
+
48  gOld[4] = tNew * (gOld[4] / tOld - 1.0 / (e + k));
+
49 
+
50  gOld[5] = tNew * (gOld[5] / tOld + 1.0 / z);
+
51 
+
52  for (int i = 0; i < 6; ++i) g[i] += gOld[i];
+
53 
+
54  tOld = tNew;
+
55 
+
56  ++k;
+
57  }
+
58  }
+
59 
+
60  }
+
61 }
+
62 #endif
+
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:14
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+
void grad_F32(T *g, T a, T b, T c, T d, T e, T z, T precision=1e-6)
Definition: grad_F32.hpp:11
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/grad__hessian_8hpp.html b/doc/api/html/grad__hessian_8hpp.html new file mode 100644 index 00000000000..700a21bd60e --- /dev/null +++ b/doc/api/html/grad__hessian_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/mix/mat/functor/grad_hessian.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
grad_hessian.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/rev/core.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename F >
void stan::math::grad_hessian (const F &f, const Eigen::Matrix< double, Dynamic, 1 > &x, double &fx, Eigen::Matrix< double, Dynamic, Dynamic > &H, std::vector< Eigen::Matrix< double, Dynamic, Dynamic > > &grad_H)
 Calculate the value, the Hessian, and the gradient of the Hessian of the specified function at the specified argument. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/grad__hessian_8hpp_source.html b/doc/api/html/grad__hessian_8hpp_source.html new file mode 100644 index 00000000000..b4f84f43146 --- /dev/null +++ b/doc/api/html/grad__hessian_8hpp_source.html @@ -0,0 +1,173 @@ + + + + + + +Stan Math Library: stan/math/mix/mat/functor/grad_hessian.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
grad_hessian.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_MIX_MAT_FUNCTOR_GRAD_HESSIAN_HPP
+
2 #define STAN_MATH_MIX_MAT_FUNCTOR_GRAD_HESSIAN_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ +
6 #include <stan/math/rev/core.hpp>
+
7 #include <vector>
+
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
13  using Eigen::Dynamic;
+
14 
+
44  template <typename F>
+
45  void
+
46  grad_hessian(const F& f,
+
47  const Eigen::Matrix<double, Dynamic, 1>& x,
+
48  double& fx,
+
49  Eigen::Matrix<double, Dynamic, Dynamic>& H,
+
50  std::vector<Eigen::Matrix<double, Dynamic, Dynamic> >&
+
51  grad_H) {
+
52  using Eigen::Matrix;
+
53  fx = f(x);
+
54  int d = x.size();
+
55  H.resize(d, d);
+
56  grad_H.resize(d, Matrix<double, Dynamic, Dynamic>(d, d));
+
57  try {
+
58  for (int i = 0; i < d; ++i) {
+
59  for (int j = i; j < d; ++j) {
+
60  start_nested();
+
61  Matrix<fvar<fvar<var> >, Dynamic, 1> x_ffvar(d);
+
62  for (int k = 0; k < d; ++k)
+
63  x_ffvar(k) = fvar<fvar<var> >(fvar<var>(x(k), i == k),
+
64  fvar<var>(j == k, 0));
+
65  fvar<fvar<var> > fx_ffvar = f(x_ffvar);
+
66  H(i, j) = fx_ffvar.d_.d_.val();
+
67  H(j, i) = H(i, j);
+
68  stan::math::grad(fx_ffvar.d_.d_.vi_);
+
69  for (int k = 0; k < d; ++k) {
+
70  grad_H[i](j, k) = x_ffvar(k).val_.val_.adj();
+
71  grad_H[j](i, k) = grad_H[i](j, k);
+
72  }
+ +
74  }
+
75  }
+
76  } catch (const std::exception& e) {
+ +
78  throw;
+
79  }
+
80  }
+
81 
+
82  } // namespace math
+
83 } // namespace stan
+
84 #endif
+ + + +
static void grad(chainable *vi)
Compute the gradient for all variables starting from the specified root variable implementation.
Definition: grad.hpp:30
+
void grad_hessian(const F &f, const Eigen::Matrix< double, Dynamic, 1 > &x, double &fx, Eigen::Matrix< double, Dynamic, Dynamic > &H, std::vector< Eigen::Matrix< double, Dynamic, Dynamic > > &grad_H)
Calculate the value, the Hessian, and the gradient of the Hessian of the specified function at the sp...
+ +
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+
static void recover_memory_nested()
Recover only the memory used for the top nested call.
+
static void start_nested()
Record the current position so that recover_memory_nested() can find it.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/grad__reg__inc__beta_8hpp.html b/doc/api/html/grad__reg__inc__beta_8hpp.html new file mode 100644 index 00000000000..cf633ca49f2 --- /dev/null +++ b/doc/api/html/grad__reg__inc__beta_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/grad_reg_inc_beta.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
grad_reg_inc_beta.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
void stan::math::grad_reg_inc_beta (T &g1, T &g2, T a, T b, T z, T digammaA, T digammaB, T digammaSum, T betaAB)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/grad__reg__inc__beta_8hpp_source.html b/doc/api/html/grad__reg__inc__beta_8hpp_source.html new file mode 100644 index 00000000000..3bc2295e0f3 --- /dev/null +++ b/doc/api/html/grad__reg__inc__beta_8hpp_source.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/grad_reg_inc_beta.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
grad_reg_inc_beta.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_GRAD_REG_INC_BETA_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_GRAD_REG_INC_BETA_HPP
+
3 
+ + + +
7 #include <cmath>
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
12  // Gradient of the regularized incomplete beta function ibeta(a, b, z)
+
13  template<typename T>
+
14  void grad_reg_inc_beta(T& g1, T& g2, T a, T b, T z,
+
15  T digammaA, T digammaB, T digammaSum, T betaAB) {
+ + +
18  using std::exp;
+
19  using stan::math::lbeta;
+
20 
+
21  T dBda = 0;
+
22  T dBdb = 0;
+
23  grad_inc_beta(dBda, dBdb, a, b, z);
+
24  T b1 = exp(lbeta(a, b)) * inc_beta(a, b, z);
+
25  g1 = (dBda - b1 * (digammaA - digammaSum)) / betaAB;
+
26  g2 = (dBdb - b1 * (digammaB - digammaSum)) / betaAB;
+
27  }
+
28 
+
29  }
+
30 }
+
31 #endif
+
fvar< T > lbeta(const fvar< T > &x1, const fvar< T > &x2)
Definition: lbeta.hpp:16
+
fvar< T > inc_beta(const fvar< T > &a, const fvar< T > &b, const fvar< T > &x)
Definition: inc_beta.hpp:20
+
void grad_inc_beta(stan::math::fvar< T > &g1, stan::math::fvar< T > &g2, stan::math::fvar< T > a, stan::math::fvar< T > b, stan::math::fvar< T > z)
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ + + +
void grad_reg_inc_beta(T &g1, T &g2, T a, T b, T z, T digammaA, T digammaB, T digammaSum, T betaAB)
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/grad__reg__inc__gamma_8hpp.html b/doc/api/html/grad__reg__inc__gamma_8hpp.html new file mode 100644 index 00000000000..5fadf733b97 --- /dev/null +++ b/doc/api/html/grad__reg__inc__gamma_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/grad_reg_inc_gamma.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
grad_reg_inc_gamma.hpp File Reference
+
+
+
#include <stan/math/prim/scal/fun/gamma_p.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
stan::math::grad_reg_inc_gamma (T a, T z, T g, T dig, T precision=1e-6)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/grad__reg__inc__gamma_8hpp_source.html b/doc/api/html/grad__reg__inc__gamma_8hpp_source.html new file mode 100644 index 00000000000..cc05f746c8b --- /dev/null +++ b/doc/api/html/grad__reg__inc__gamma_8hpp_source.html @@ -0,0 +1,159 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/grad_reg_inc_gamma.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
grad_reg_inc_gamma.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_GRAD_REG_INC_GAMMA_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_GRAD_REG_INC_GAMMA_HPP
+
3 
+ +
5 #include <cmath>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  // Gradient of the regularized incomplete gamma functions igamma(a, g)
+
11  // Precomputed values
+
12  // g = boost::math::tgamma(a)
+
13  // dig = boost::math::digamma(a)
+
14  template<typename T>
+
15  T grad_reg_inc_gamma(T a, T z, T g, T dig, T precision = 1e-6) {
+
16  using boost::math::isinf;
+
17  using stan::math::gamma_p;
+
18  using std::domain_error;
+
19  using std::exp;
+
20  using std::fabs;
+
21  using std::log;
+
22 
+
23  T S = 0;
+
24  T s = 1;
+
25  T l = log(z);
+
26  int k = 0;
+
27  T delta = s / (a * a);
+
28  while (fabs(delta) > precision) {
+
29  S += delta;
+
30  ++k;
+
31  s *= - z / k;
+
32  delta = s / ((k + a) * (k + a));
+
33  if (isinf(delta))
+
34  throw domain_error("stan::math::gradRegIncGamma not converging");
+
35  }
+
36  return gamma_p(a, z) * ( dig - l ) + exp( a * l ) * S / g;
+
37  }
+
38 
+
39  }
+
40 }
+
41 #endif
+
int isinf(const stan::math::var &a)
Checks if the given number is infinite.
Definition: std_isinf.hpp:18
+
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:14
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
T grad_reg_inc_gamma(T a, T z, T g, T dig, T precision=1e-6)
+
bool isinf(const stan::math::var &v)
Checks if the given number is infinite.
Definition: boost_isinf.hpp:22
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+
fvar< T > gamma_p(const fvar< T > &x1, const fvar< T > &x2)
Definition: gamma_p.hpp:15
+ +
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/grad__tr__mat__times__hessian_8hpp.html b/doc/api/html/grad__tr__mat__times__hessian_8hpp.html new file mode 100644 index 00000000000..6b53935960e --- /dev/null +++ b/doc/api/html/grad__tr__mat__times__hessian_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/mix/mat/functor/grad_tr_mat_times_hessian.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
grad_tr_mat_times_hessian.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename F >
void stan::math::grad_tr_mat_times_hessian (const F &f, const Eigen::Matrix< double, Dynamic, 1 > &x, const Eigen::Matrix< double, Dynamic, Dynamic > &M, Eigen::Matrix< double, Dynamic, 1 > &grad_tr_MH)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/grad__tr__mat__times__hessian_8hpp_source.html b/doc/api/html/grad__tr__mat__times__hessian_8hpp_source.html new file mode 100644 index 00000000000..a3095321174 --- /dev/null +++ b/doc/api/html/grad__tr__mat__times__hessian_8hpp_source.html @@ -0,0 +1,183 @@ + + + + + + +Stan Math Library: stan/math/mix/mat/functor/grad_tr_mat_times_hessian.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
grad_tr_mat_times_hessian.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_MIX_MAT_FUNCTOR_GRAD_TR_MAT_TIMES_HESSIAN_HPP
+
2 #define STAN_MATH_MIX_MAT_FUNCTOR_GRAD_TR_MAT_TIMES_HESSIAN_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ +
6 #include <stan/math/rev/core.hpp>
+ +
8 #include <vector>
+
9 
+
10 namespace stan {
+
11 
+
12  namespace math {
+
13 
+
14  using Eigen::Dynamic;
+
15 
+
16  // FIXME: add other results that are easy to extract
+
17  // // N * (fwd(2) + bk)
+
18  template <typename F>
+
19  void
+ +
21  const Eigen::Matrix<double, Dynamic, 1>& x,
+
22  const Eigen::Matrix<double, Dynamic, Dynamic>& M,
+
23  Eigen::Matrix<double, Dynamic, 1>& grad_tr_MH) {
+
24  using Eigen::Matrix;
+
25  start_nested();
+
26  try {
+
27  grad_tr_MH.resize(x.size());
+
28 
+
29  Matrix<var, Dynamic, 1> x_var(x.size());
+
30  for (int i = 0; i < x.size(); ++i)
+
31  x_var(i) = x(i);
+
32 
+
33  Matrix<fvar<var>, Dynamic, 1> x_fvar(x.size());
+
34 
+
35  var sum(0.0);
+
36  Matrix<double, Dynamic, 1> M_n(x.size());
+
37  for (int n = 0; n < x.size(); ++n) {
+
38  for (int k = 0; k < x.size(); ++k)
+
39  M_n(k) = M(n, k);
+
40  for (int k = 0; k < x.size(); ++k)
+
41  x_fvar(k) = fvar<var>(x_var(k), k == n);
+
42  fvar<var> fx;
+
43  fvar<var> grad_fx_dot_v;
+
44  gradient_dot_vector<fvar<var>, double>(f, x_fvar, M_n, fx,
+
45  grad_fx_dot_v);
+
46  sum += grad_fx_dot_v.d_;
+
47  }
+
48 
+
49  stan::math::grad(sum.vi_);
+
50  for (int i = 0; i < x.size(); ++i)
+
51  grad_tr_MH(i) = x_var(i).adj();
+
52  } catch (const std::exception& e) {
+ +
54  throw;
+
55  }
+ +
57  }
+
58 
+
59 
+
60  } // namespace math
+
61 } // namespace stan
+
62 #endif
+
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+ + + +
void grad_tr_mat_times_hessian(const F &f, const Eigen::Matrix< double, Dynamic, 1 > &x, const Eigen::Matrix< double, Dynamic, Dynamic > &M, Eigen::Matrix< double, Dynamic, 1 > &grad_tr_MH)
+
static void grad(chainable *vi)
Compute the gradient for all variables starting from the specified root variable implementation.
Definition: grad.hpp:30
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+ + +
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+
static void recover_memory_nested()
Recover only the memory used for the top nested call.
+
static void start_nested()
Record the current position so that recover_memory_nested() can find it.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/gradient__dot__vector_8hpp.html b/doc/api/html/gradient__dot__vector_8hpp.html new file mode 100644 index 00000000000..f2cc644b189 --- /dev/null +++ b/doc/api/html/gradient__dot__vector_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/mix/mat/functor/gradient_dot_vector.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
gradient_dot_vector.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/rev/core.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T1 , typename T2 , typename F >
void stan::math::gradient_dot_vector (const F &f, const Eigen::Matrix< T1, Dynamic, 1 > &x, const Eigen::Matrix< T2, Dynamic, 1 > &v, T1 &fx, T1 &grad_fx_dot_v)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/gradient__dot__vector_8hpp_source.html b/doc/api/html/gradient__dot__vector_8hpp_source.html new file mode 100644 index 00000000000..f606a6949b5 --- /dev/null +++ b/doc/api/html/gradient__dot__vector_8hpp_source.html @@ -0,0 +1,153 @@ + + + + + + +Stan Math Library: stan/math/mix/mat/functor/gradient_dot_vector.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
gradient_dot_vector.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_MIX_MAT_FUNCTOR_GRADIENT_DOT_VECTOR_HPP
+
2 #define STAN_MATH_MIX_MAT_FUNCTOR_GRADIENT_DOT_VECTOR_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ +
6 #include <stan/math/rev/core.hpp>
+
7 #include <vector>
+
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
13  using Eigen::Dynamic;
+
14 
+
15  // aka directional derivative (not length normalized)
+
16  // T2 must be assignable to T1
+
17  template <typename T1, typename T2, typename F>
+
18  void
+
19  gradient_dot_vector(const F& f,
+
20  const Eigen::Matrix<T1, Dynamic, 1>& x,
+
21  const Eigen::Matrix<T2, Dynamic, 1>& v,
+
22  T1& fx,
+
23  T1& grad_fx_dot_v) {
+
24  using stan::math::fvar;
+
25  using stan::math::var;
+
26  using Eigen::Matrix;
+
27  Matrix<fvar<T1>, Dynamic, 1> x_fvar(x.size());
+
28  for (int i = 0; i < x.size(); ++i)
+
29  x_fvar(i) = fvar<T1>(x(i), v(i));
+
30  fvar<T1> fx_fvar = f(x_fvar);
+
31  fx = fx_fvar.val_;
+
32  grad_fx_dot_v = fx_fvar.d_;
+
33  }
+
34 
+
35  } // namespace math
+
36 } // namespace stan
+
37 #endif
+ + + +
void gradient_dot_vector(const F &f, const Eigen::Matrix< T1, Dynamic, 1 > &x, const Eigen::Matrix< T2, Dynamic, 1 > &v, T1 &fx, T1 &grad_fx_dot_v)
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/group__csr__format.html b/doc/api/html/group__csr__format.html new file mode 100644 index 00000000000..8e3af654cf3 --- /dev/null +++ b/doc/api/html/group__csr__format.html @@ -0,0 +1,478 @@ + + + + + + +Stan Math Library: Compressed Sparse Row matrix format. + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+ +
+
Compressed Sparse Row matrix format.
+
+
+ +

A compressed Sparse Row (CSR) sparse matrix is defined by four component vectors labeled w, v, and u. +More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T >
const std::vector< int > stan::math::csr_extract_u (const Eigen::SparseMatrix< T, Eigen::RowMajor > &A)
 Extract the NZE index for each entry from a sparse matrix. More...
 
template<typename T , int R, int C>
const std::vector< int > stan::math::csr_extract_u (const Eigen::Matrix< T, R, C > &A)
 Extract the NZE index for each entry from a sparse matrix. More...
 
template<typename T >
const std::vector< int > stan::math::csr_extract_v (const Eigen::SparseMatrix< T, Eigen::RowMajor > &A)
 Extract the column indexes for non-zero value from a sparse matrix. More...
 
template<typename T , int R, int C>
const std::vector< int > stan::math::csr_extract_v (const Eigen::Matrix< T, R, C > &A)
 Extract the column indexes for non-zero values from a dense matrix by converting to sparse and calling the sparse matrix extractor. More...
 
template<typename T >
const Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::csr_extract_w (const Eigen::SparseMatrix< T, Eigen::RowMajor > &A)
 
template<typename T , int R, int C>
const Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::csr_extract_w (const Eigen::Matrix< T, R, C > &A)
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::csr_to_dense_matrix (const int &m, const int &n, const Eigen::Matrix< T, Eigen::Dynamic, 1 > &w, const std::vector< int > &v, const std::vector< int > &u)
 Construct a dense Eigen matrix from the CSR format components. More...
 
int stan::math::csr_u_to_z (const std::vector< int > &u, int i)
 Return the z vector computed from the specified u vector at the index for the z vector. More...
 
+

Detailed Description

+

A compressed Sparse Row (CSR) sparse matrix is defined by four component vectors labeled w, v, and u.

+

Return the multiplication of the sparse matrix (specified by by values and indexing) by the specified dense vector.

+

They are defined as:

+ +

With only m/n/w/v/u in hand, it is possible to check all dimensions are sane except the column dimension since it is implicit. The error-checking strategy is to check all dimensions except the column dimension before any work is done inside a function. The column index is checked as it is constructed and used for each entry. If the column index is not needed it is not checked. As a result indexing mistakes might produce non-sensical operations but out-of-bounds indexing will be caught.

+

Except for possible garbage values in w/v/u, memory usage is calculated from the number of non-zero entries (NNZE) and the number of rows (NR): 2*NNZE + 2*NR + 1.

+

The sparse matrix X of dimension m by n is represented by the vector w (of values), the integer array v (containing one-based column index of each value), the integer array u (containing one-based indexes of where each row starts in w).

+
Template Parameters
+ + + +
T1Type of sparse matrix entries.
T2Type of dense vector entries.
+
+
+
Parameters
+ + + + + + + +
mNumber of rows in matrix.
nNumber of columns in matrix.
wVector of non-zero values in matrix.
vColumn index of each non-zero value, same length as w.
uIndex of where each row starts in w, length equal to the number of rows plus one.
bEigen vector which the matrix is multiplied by.
+
+
+
Returns
Dense vector for the product.
+
Exceptions
+ + + + +
std::domain_errorif m and n are not positive or are nan.
std::domain_errorif the implied sparse matrix and b are not multiplicable.
std::domain_errorif m/n/w/v/u are not internally consistent, as defined by the indexing scheme. Extractors are defined in Stan which guarantee a consistent set of m/n/w/v/u for a given sparse matrix.
+
+
+

Function Documentation

+ +
+
+
+template<typename T >
+ + + + + + + + +
const std::vector<int> stan::math::csr_extract_u (const Eigen::SparseMatrix< T, Eigen::RowMajor > & A)
+
+ +

Extract the NZE index for each entry from a sparse matrix.

+
Template Parameters
+ + +
TType of matrix entries.
+
+
+
Parameters
+ + +
ASparse matrix.
+
+
+
Returns
Vector of indexes into non-zero entries of A.
+ +

Definition at line 26 of file csr_extract_u.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + + + + +
const std::vector<int> stan::math::csr_extract_u (const Eigen::Matrix< T, R, C > & A)
+
+ +

Extract the NZE index for each entry from a sparse matrix.

+
Template Parameters
+ + +
TType of matrix entries.
+
+
+
Parameters
+ + +
ADense matrix.
+
+
+
Returns
Vector of indexes into non-zero entries of A.
+ +

Definition at line 42 of file csr_extract_u.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
const std::vector<int> stan::math::csr_extract_v (const Eigen::SparseMatrix< T, Eigen::RowMajor > & A)
+
+ +

Extract the column indexes for non-zero value from a sparse matrix.

+
Template Parameters
+ + +
TType of matrix entries.
+
+
+
Parameters
+ + +
ASparse matrix.
+
+
+
Returns
Vector of column indexes for non-zero entries of A.
+ +

Definition at line 27 of file csr_extract_v.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + + + + +
const std::vector<int> stan::math::csr_extract_v (const Eigen::Matrix< T, R, C > & A)
+
+ +

Extract the column indexes for non-zero values from a dense matrix by converting to sparse and calling the sparse matrix extractor.

+
Template Parameters
+ + +
TType of matrix entries.
+
+
+
Parameters
+ + +
[in]Adense matrix.
+
+
+
Returns
Vector of column indexes to non-zero entries of A.
+ +

Definition at line 45 of file csr_extract_v.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
const Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::csr_extract_w (const Eigen::SparseMatrix< T, Eigen::RowMajor > & A)
+
+ +

Definition at line 24 of file csr_extract_w.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + + + + +
const Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::csr_extract_w (const Eigen::Matrix< T, R, C > & A)
+
+ +

Definition at line 41 of file csr_extract_w.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::csr_to_dense_matrix (const int & m,
const int & n,
const Eigen::Matrix< T, Eigen::Dynamic, 1 > & w,
const std::vector< int > & v,
const std::vector< int > & u 
)
+
+inline
+
+ +

Construct a dense Eigen matrix from the CSR format components.

+
Template Parameters
+ + +
TType of matrix entries.
+
+
+
Parameters
+ + + + + + +
[in]mNumber of matrix rows.
[in]nNumber of matrix columns.
[in]wValues of non-zero matrix entries.
[in]vColumn index for each value in w.
[in]uIndex of where each row starts in w.
+
+
+
Returns
Dense matrix defined by previous arguments.
+
Exceptions
+ + +
std::domain_errorIf the arguments do not define a matrix.
+
+
+ +

Definition at line 35 of file csr_to_dense_matrix.hpp.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int stan::math::csr_u_to_z (const std::vector< int > & u,
int i 
)
+
+ +

Return the z vector computed from the specified u vector at the index for the z vector.

+
Parameters
+ + + +
[in]uU vector.
[in]iIndex into resulting z vector.
+
+
+
Returns
z[i] where z is conversion from u.
+ +

Definition at line 24 of file csr_u_to_z.hpp.

+ +
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/gumbel__ccdf__log_8hpp.html b/doc/api/html/gumbel__ccdf__log_8hpp.html new file mode 100644 index 00000000000..0a13b8bdd97 --- /dev/null +++ b/doc/api/html/gumbel__ccdf__log_8hpp.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/gumbel_ccdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
gumbel_ccdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::gumbel_ccdf_log (const T_y &y, const T_loc &mu, const T_scale &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/gumbel__ccdf__log_8hpp_source.html b/doc/api/html/gumbel__ccdf__log_8hpp_source.html new file mode 100644 index 00000000000..8194f28d1f8 --- /dev/null +++ b/doc/api/html/gumbel__ccdf__log_8hpp_source.html @@ -0,0 +1,229 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/gumbel_ccdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
gumbel_ccdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_GUMBEL_CCDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_GUMBEL_CCDF_LOG_HPP
+
3 
+
4 #include <boost/random/uniform_01.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + +
20 #include <cmath>
+
21 
+
22 namespace stan {
+
23 
+
24  namespace math {
+
25 
+
26  template <typename T_y, typename T_loc, typename T_scale>
+
27  typename return_type<T_y, T_loc, T_scale>::type
+
28  gumbel_ccdf_log(const T_y& y, const T_loc& mu, const T_scale& beta) {
+
29  static const char* function("stan::math::gumbel_ccdf_log");
+ +
31  T_partials_return;
+
32 
+ + + + + +
38  using std::log;
+
39  using std::exp;
+
40 
+
41  T_partials_return ccdf_log(0.0);
+
42  // check if any vectors are zero length
+
43  if (!(stan::length(y)
+
44  && stan::length(mu)
+
45  && stan::length(beta)))
+
46  return ccdf_log;
+
47 
+
48  check_not_nan(function, "Random variable", y);
+
49  check_finite(function, "Location parameter", mu);
+
50  check_not_nan(function, "Scale parameter", beta);
+
51  check_positive(function, "Scale parameter", beta);
+
52  check_consistent_sizes(function,
+
53  "Random variable", y,
+
54  "Location parameter", mu,
+
55  "Scale parameter", beta);
+
56 
+ +
58  operands_and_partials(y, mu, beta);
+
59 
+
60  VectorView<const T_y> y_vec(y);
+
61  VectorView<const T_loc> mu_vec(mu);
+
62  VectorView<const T_scale> beta_vec(beta);
+
63  size_t N = max_size(y, mu, beta);
+
64 
+
65  for (size_t n = 0; n < N; n++) {
+
66  const T_partials_return y_dbl = value_of(y_vec[n]);
+
67  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
68  const T_partials_return beta_dbl = value_of(beta_vec[n]);
+
69  const T_partials_return scaled_diff = (y_dbl - mu_dbl) / beta_dbl;
+
70  const T_partials_return rep_deriv = exp(-scaled_diff
+
71  - exp(-scaled_diff))
+
72  / beta_dbl;
+
73  const T_partials_return ccdf_log_ = 1.0 - exp(-exp(-scaled_diff));
+
74  ccdf_log += log(ccdf_log_);
+
75 
+ +
77  operands_and_partials.d_x1[n] -= rep_deriv / ccdf_log_;
+ +
79  operands_and_partials.d_x2[n] += rep_deriv / ccdf_log_;
+ +
81  operands_and_partials.d_x3[n] += rep_deriv * scaled_diff / ccdf_log_;
+
82  }
+
83 
+
84  return operands_and_partials.to_var(ccdf_log, y, mu, beta);
+
85  }
+
86  }
+
87 }
+
88 #endif
+
89 
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
return_type< T_y, T_loc, T_scale >::type gumbel_ccdf_log(const T_y &y, const T_loc &mu, const T_scale &beta)
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/gumbel__cdf_8hpp.html b/doc/api/html/gumbel__cdf_8hpp.html new file mode 100644 index 00000000000..2b1c78d31fe --- /dev/null +++ b/doc/api/html/gumbel__cdf_8hpp.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/gumbel_cdf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
gumbel_cdf.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::gumbel_cdf (const T_y &y, const T_loc &mu, const T_scale &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/gumbel__cdf_8hpp_source.html b/doc/api/html/gumbel__cdf_8hpp_source.html new file mode 100644 index 00000000000..94ca8dddc48 --- /dev/null +++ b/doc/api/html/gumbel__cdf_8hpp_source.html @@ -0,0 +1,240 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/gumbel_cdf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
gumbel_cdf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_GUMBEL_CDF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_GUMBEL_CDF_HPP
+
3 
+
4 #include <boost/random/uniform_01.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + +
20 #include <cmath>
+
21 
+
22 namespace stan {
+
23 
+
24  namespace math {
+
25 
+
26  template <typename T_y, typename T_loc, typename T_scale>
+
27  typename return_type<T_y, T_loc, T_scale>::type
+
28  gumbel_cdf(const T_y& y, const T_loc& mu, const T_scale& beta) {
+
29  static const char* function("stan::math::gumbel_cdf");
+ +
31  T_partials_return;
+
32 
+ + + + + +
38  using std::exp;
+
39 
+
40  T_partials_return cdf(1.0);
+
41  // check if any vectors are zero length
+
42  if (!(stan::length(y)
+
43  && stan::length(mu)
+
44  && stan::length(beta)))
+
45  return cdf;
+
46 
+
47  check_not_nan(function, "Random variable", y);
+
48  check_finite(function, "Location parameter", mu);
+
49  check_not_nan(function, "Scale parameter", beta);
+
50  check_positive(function, "Scale parameter", beta);
+
51  check_consistent_sizes(function,
+
52  "Random variable", y,
+
53  "Location parameter", mu,
+
54  "Scale parameter", beta);
+
55 
+ +
57  operands_and_partials(y, mu, beta);
+
58 
+
59  VectorView<const T_y> y_vec(y);
+
60  VectorView<const T_loc> mu_vec(mu);
+
61  VectorView<const T_scale> beta_vec(beta);
+
62  size_t N = max_size(y, mu, beta);
+
63 
+
64  for (size_t n = 0; n < N; n++) {
+
65  const T_partials_return y_dbl = value_of(y_vec[n]);
+
66  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
67  const T_partials_return beta_dbl = value_of(beta_vec[n]);
+
68  const T_partials_return scaled_diff = (y_dbl - mu_dbl) / beta_dbl;
+
69  const T_partials_return rep_deriv = exp(-scaled_diff
+
70  - exp(-scaled_diff))
+
71  / beta_dbl;
+
72  const T_partials_return cdf_ = exp(-exp(-scaled_diff));
+
73  cdf *= cdf_;
+
74 
+ +
76  operands_and_partials.d_x1[n] += rep_deriv / cdf_;
+ +
78  operands_and_partials.d_x2[n] -= rep_deriv / cdf_;
+ +
80  operands_and_partials.d_x3[n] -= rep_deriv * scaled_diff / cdf_;
+
81  }
+
82 
+ +
84  for (size_t n = 0; n < stan::length(y); ++n)
+
85  operands_and_partials.d_x1[n] *= cdf;
+
86  }
+ +
88  for (size_t n = 0; n < stan::length(mu); ++n)
+
89  operands_and_partials.d_x2[n] *= cdf;
+
90  }
+ +
92  for (size_t n = 0; n < stan::length(beta); ++n)
+
93  operands_and_partials.d_x3[n] *= cdf;
+
94  }
+
95 
+
96  return operands_and_partials.to_var(cdf, y, mu, beta);
+
97  }
+
98  }
+
99 }
+
100 #endif
+
101 
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+
return_type< T_y, T_loc, T_scale >::type gumbel_cdf(const T_y &y, const T_loc &mu, const T_scale &beta)
Definition: gumbel_cdf.hpp:28
+
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/gumbel__cdf__log_8hpp.html b/doc/api/html/gumbel__cdf__log_8hpp.html new file mode 100644 index 00000000000..99a4fe2a01d --- /dev/null +++ b/doc/api/html/gumbel__cdf__log_8hpp.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/gumbel_cdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
gumbel_cdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::gumbel_cdf_log (const T_y &y, const T_loc &mu, const T_scale &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/gumbel__cdf__log_8hpp_source.html b/doc/api/html/gumbel__cdf__log_8hpp_source.html new file mode 100644 index 00000000000..77fae15ef52 --- /dev/null +++ b/doc/api/html/gumbel__cdf__log_8hpp_source.html @@ -0,0 +1,224 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/gumbel_cdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
gumbel_cdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_GUMBEL_CDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_GUMBEL_CDF_LOG_HPP
+
3 
+
4 #include <boost/random/uniform_01.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + +
20 #include <cmath>
+
21 
+
22 namespace stan {
+
23 
+
24  namespace math {
+
25 
+
26  template <typename T_y, typename T_loc, typename T_scale>
+
27  typename return_type<T_y, T_loc, T_scale>::type
+
28  gumbel_cdf_log(const T_y& y, const T_loc& mu, const T_scale& beta) {
+
29  static const char* function("stan::math::gumbel_cdf_log");
+ +
31  T_partials_return;
+
32 
+ + + + + +
38  using std::exp;
+
39 
+
40  T_partials_return cdf_log(0.0);
+
41  // check if any vectors are zero length
+
42  if (!(stan::length(y)
+
43  && stan::length(mu)
+
44  && stan::length(beta)))
+
45  return cdf_log;
+
46 
+
47  check_not_nan(function, "Random variable", y);
+
48  check_finite(function, "Location parameter", mu);
+
49  check_not_nan(function, "Scale parameter", beta);
+
50  check_positive(function, "Scale parameter", beta);
+
51  check_consistent_sizes(function,
+
52  "Random variable", y,
+
53  "Location parameter", mu,
+
54  "Scale parameter", beta);
+
55 
+ +
57  operands_and_partials(y, mu, beta);
+
58 
+
59  VectorView<const T_y> y_vec(y);
+
60  VectorView<const T_loc> mu_vec(mu);
+
61  VectorView<const T_scale> beta_vec(beta);
+
62  size_t N = max_size(y, mu, beta);
+
63 
+
64  for (size_t n = 0; n < N; n++) {
+
65  const T_partials_return y_dbl = value_of(y_vec[n]);
+
66  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
67  const T_partials_return beta_dbl = value_of(beta_vec[n]);
+
68  const T_partials_return scaled_diff = (y_dbl - mu_dbl) / beta_dbl;
+
69  const T_partials_return rep_deriv = exp(-scaled_diff) / beta_dbl;
+
70  cdf_log -= exp(-scaled_diff);
+
71 
+ +
73  operands_and_partials.d_x1[n] += rep_deriv;
+ +
75  operands_and_partials.d_x2[n] -= rep_deriv;
+ +
77  operands_and_partials.d_x3[n] -= rep_deriv * scaled_diff;
+
78  }
+
79 
+
80  return operands_and_partials.to_var(cdf_log, y, mu, beta);
+
81  }
+
82  }
+
83 }
+
84 #endif
+
85 
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ + + +
return_type< T_y, T_loc, T_scale >::type gumbel_cdf_log(const T_y &y, const T_loc &mu, const T_scale &beta)
+
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/gumbel__log_8hpp.html b/doc/api/html/gumbel__log_8hpp.html new file mode 100644 index 00000000000..7ce842155ce --- /dev/null +++ b/doc/api/html/gumbel__log_8hpp.html @@ -0,0 +1,150 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/gumbel_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
gumbel_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::gumbel_log (const T_y &y, const T_loc &mu, const T_scale &beta)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::gumbel_log (const T_y &y, const T_loc &mu, const T_scale &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/gumbel__log_8hpp_source.html b/doc/api/html/gumbel__log_8hpp_source.html new file mode 100644 index 00000000000..c1ccde93ba7 --- /dev/null +++ b/doc/api/html/gumbel__log_8hpp_source.html @@ -0,0 +1,267 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/gumbel_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
gumbel_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_GUMBEL_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_GUMBEL_LOG_HPP
+
3 
+
4 #include <boost/random/uniform_01.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + +
20 #include <cmath>
+
21 
+
22 namespace stan {
+
23 
+
24  namespace math {
+
25 
+
26  template <bool propto, typename T_y, typename T_loc, typename T_scale>
+
27  typename return_type<T_y, T_loc, T_scale>::type
+
28  gumbel_log(const T_y& y, const T_loc& mu, const T_scale& beta) {
+
29  static const char* function("stan::math::gumbel_log");
+ +
31  T_partials_return;
+
32 
+
33  using std::log;
+
34  using std::exp;
+ + + + + + + +
42  using std::log;
+
43  using std::exp;
+
44 
+
45  // check if any vectors are zero length
+
46  if (!(stan::length(y)
+
47  && stan::length(mu)
+
48  && stan::length(beta)))
+
49  return 0.0;
+
50 
+
51  // set up return value accumulator
+
52  T_partials_return logp(0.0);
+
53 
+
54  // validate args (here done over var, which should be OK)
+
55  check_not_nan(function, "Random variable", y);
+
56  check_finite(function, "Location parameter", mu);
+
57  check_positive(function, "Scale parameter", beta);
+
58  check_consistent_sizes(function,
+
59  "Random variable", y,
+
60  "Location parameter", mu,
+
61  "Scale parameter", beta);
+
62 
+
63  // check if no variables are involved and prop-to
+ +
65  return 0.0;
+
66 
+
67  // set up template expressions wrapping scalars into vector views
+ +
69  operands_and_partials(y, mu, beta);
+
70 
+
71  VectorView<const T_y> y_vec(y);
+
72  VectorView<const T_loc> mu_vec(mu);
+
73  VectorView<const T_scale> beta_vec(beta);
+
74  size_t N = max_size(y, mu, beta);
+
75 
+ + +
78  T_partials_return, T_scale> log_beta(length(beta));
+
79  for (size_t i = 0; i < length(beta); i++) {
+
80  inv_beta[i] = 1.0 / value_of(beta_vec[i]);
+ +
82  log_beta[i] = log(value_of(beta_vec[i]));
+
83  }
+
84 
+
85  for (size_t n = 0; n < N; n++) {
+
86  // pull out values of arguments
+
87  const T_partials_return y_dbl = value_of(y_vec[n]);
+
88  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
89 
+
90  // reusable subexpression values
+
91  const T_partials_return y_minus_mu_over_beta
+
92  = (y_dbl - mu_dbl) * inv_beta[n];
+
93 
+
94  // log probability
+ +
96  logp -= log_beta[n];
+ +
98  logp += -y_minus_mu_over_beta - exp(-y_minus_mu_over_beta);
+
99 
+
100  // gradients
+
101  T_partials_return scaled_diff = inv_beta[n]
+
102  * exp(-y_minus_mu_over_beta);
+ +
104  operands_and_partials.d_x1[n] -= inv_beta[n] - scaled_diff;
+ +
106  operands_and_partials.d_x2[n] += inv_beta[n] - scaled_diff;
+ +
108  operands_and_partials.d_x3[n]
+
109  += -inv_beta[n] + y_minus_mu_over_beta * inv_beta[n]
+
110  - scaled_diff * y_minus_mu_over_beta;
+
111  }
+
112  return operands_and_partials.to_var(logp, y, mu, beta);
+
113  }
+
114 
+
115  template <typename T_y, typename T_loc, typename T_scale>
+
116  inline
+ +
118  gumbel_log(const T_y& y, const T_loc& mu, const T_scale& beta) {
+
119  return gumbel_log<false>(y, mu, beta);
+
120  }
+
121  }
+
122 }
+
123 #endif
+
124 
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ +
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
return_type< T_y, T_loc, T_scale >::type gumbel_log(const T_y &y, const T_loc &mu, const T_scale &beta)
Definition: gumbel_log.hpp:28
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/gumbel__rng_8hpp.html b/doc/api/html/gumbel__rng_8hpp.html new file mode 100644 index 00000000000..d833c8684ae --- /dev/null +++ b/doc/api/html/gumbel__rng_8hpp.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/gumbel_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
gumbel_rng.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
double stan::math::gumbel_rng (const double mu, const double beta, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/gumbel__rng_8hpp_source.html b/doc/api/html/gumbel__rng_8hpp_source.html new file mode 100644 index 00000000000..e79e878767f --- /dev/null +++ b/doc/api/html/gumbel__rng_8hpp_source.html @@ -0,0 +1,175 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/gumbel_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
gumbel_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_GUMBEL_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_GUMBEL_RNG_HPP
+
3 
+
4 #include <boost/random/uniform_01.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + +
20 
+
21 namespace stan {
+
22 
+
23  namespace math {
+
24 
+
25  template <class RNG>
+
26  inline double
+
27  gumbel_rng(const double mu,
+
28  const double beta,
+
29  RNG& rng) {
+
30  using boost::variate_generator;
+
31  using boost::uniform_01;
+
32 
+
33  static const char* function("stan::math::gumbel_rng");
+
34 
+ + +
37 
+
38 
+
39  check_finite(function, "Location parameter", mu);
+
40  check_positive(function, "Scale parameter", beta);
+
41 
+
42  variate_generator<RNG&, uniform_01<> >
+
43  uniform01_rng(rng, uniform_01<>());
+
44  return mu - beta * std::log(-std::log(uniform01_rng()));
+
45  }
+
46  }
+
47 }
+
48 #endif
+
49 
+ + +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ + +
double gumbel_rng(const double mu, const double beta, RNG &rng)
Definition: gumbel_rng.hpp:27
+ +
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ + + + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/head_8hpp.html b/doc/api/html/head_8hpp.html new file mode 100644 index 00000000000..2199a35b2d0 --- /dev/null +++ b/doc/api/html/head_8hpp.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/head.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
head.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::head (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v, size_t n)
 Return the specified number of elements as a vector from the front of the specified vector. More...
 
template<typename T >
Eigen::Matrix< T,
+1, Eigen::Dynamic > 
stan::math::head (const Eigen::Matrix< T, 1, Eigen::Dynamic > &rv, size_t n)
 Return the specified number of elements as a row vector from the front of the specified row vector. More...
 
template<typename T >
std::vector< T > stan::math::head (const std::vector< T > &sv, size_t n)
 Return the specified number of elements as a standard vector from the front of the specified standard vector. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/head_8hpp_source.html b/doc/api/html/head_8hpp_source.html new file mode 100644 index 00000000000..0550228a2cb --- /dev/null +++ b/doc/api/html/head_8hpp_source.html @@ -0,0 +1,165 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/head.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
head.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_HEAD_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_HEAD_HPP
+
3 
+ + + + +
8 #include <vector>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
21  template <typename T>
+
22  inline
+
23  Eigen::Matrix<T, Eigen::Dynamic, 1>
+
24  head(const Eigen::Matrix<T, Eigen::Dynamic, 1>& v,
+
25  size_t n) {
+
26  if (n != 0)
+
27  stan::math::check_row_index("head", "n", v, n);
+
28  return v.head(n);
+
29  }
+
30 
+
39  template <typename T>
+
40  inline
+
41  Eigen::Matrix<T, 1, Eigen::Dynamic>
+
42  head(const Eigen::Matrix<T, 1, Eigen::Dynamic>& rv,
+
43  size_t n) {
+
44  if (n != 0)
+
45  stan::math::check_column_index("head", "n", rv, n);
+
46  return rv.head(n);
+
47  }
+
48 
+
57  template <typename T>
+
58  std::vector<T> head(const std::vector<T>& sv,
+
59  size_t n) {
+
60  if (n != 0)
+
61  stan::math::check_std_vector_index("head", "n", sv, n);
+
62 
+
63  std::vector<T> s;
+
64  for (size_t i = 0; i < n; ++i)
+
65  s.push_back(sv[i]);
+
66  return s;
+
67  }
+
68 
+
69 
+
70  }
+
71 }
+
72 
+
73 #endif
+ + +
Eigen::Matrix< T, Eigen::Dynamic, 1 > head(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v, size_t n)
Return the specified number of elements as a vector from the front of the specified vector...
Definition: head.hpp:24
+
bool check_row_index(const char *function, const char *name, const Eigen::Matrix< T_y, R, C > &y, size_t i)
Return true if the specified index is a valid row of the matrix.
+ +
bool check_std_vector_index(const char *function, const char *name, const std::vector< T > &y, int i)
Return true if the specified index is valid in std vector.
+ +
bool check_column_index(const char *function, const char *name, const Eigen::Matrix< T_y, R, C > &y, const size_t i)
Return true if the specified index is a valid column of the matrix.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/hessian_8hpp.html b/doc/api/html/hessian_8hpp.html new file mode 100644 index 00000000000..c6c46e1ce7c --- /dev/null +++ b/doc/api/html/hessian_8hpp.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/mix/mat/functor/hessian.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
hessian.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/rev/core.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

template<typename F >
void stan::math::hessian (const F &f, const Eigen::Matrix< double, Dynamic, 1 > &x, double &fx, Eigen::Matrix< double, Dynamic, 1 > &grad, Eigen::Matrix< double, Dynamic, Dynamic > &H)
 Calculate the value, the gradient, and the Hessian, of the specified function at the specified argument in O(N^2) time and O(N^2) space. More...
 
template<typename T , typename F >
void stan::math::hessian (const F &f, const Eigen::Matrix< T, Dynamic, 1 > &x, T &fx, Eigen::Matrix< T, Dynamic, 1 > &grad, Eigen::Matrix< T, Dynamic, Dynamic > &H)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/hessian_8hpp_source.html b/doc/api/html/hessian_8hpp_source.html new file mode 100644 index 00000000000..9f293781d40 --- /dev/null +++ b/doc/api/html/hessian_8hpp_source.html @@ -0,0 +1,193 @@ + + + + + + +Stan Math Library: stan/math/mix/mat/functor/hessian.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
hessian.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_MIX_MAT_FUNCTOR_HESSIAN_HPP
+
2 #define STAN_MATH_MIX_MAT_FUNCTOR_HESSIAN_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ +
6 #include <stan/math/rev/core.hpp>
+
7 #include <vector>
+
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
13  using Eigen::Dynamic;
+
14 
+
44  template <typename F>
+
45  void
+
46  hessian(const F& f,
+
47  const Eigen::Matrix<double, Dynamic, 1>& x,
+
48  double& fx,
+
49  Eigen::Matrix<double, Dynamic, 1>& grad,
+
50  Eigen::Matrix<double, Dynamic, Dynamic>& H) {
+
51  H.resize(x.size(), x.size());
+
52  grad.resize(x.size());
+
53  try {
+
54  for (int i = 0; i < x.size(); ++i) {
+
55  start_nested();
+
56  Eigen::Matrix<fvar<var>, Dynamic, 1> x_fvar(x.size());
+
57  for (int j = 0; j < x.size(); ++j)
+
58  x_fvar(j) = fvar<var>(x(j), i == j);
+
59  fvar<var> fx_fvar = f(x_fvar);
+
60  grad(i) = fx_fvar.d_.val();
+
61  if (i == 0) fx = fx_fvar.val_.val();
+
62  stan::math::grad(fx_fvar.d_.vi_);
+
63  for (int j = 0; j < x.size(); ++j)
+
64  H(i, j) = x_fvar(j).val_.adj();
+ +
66  }
+
67  } catch (const std::exception& e) {
+ +
69  throw;
+
70  }
+
71  }
+
72  // time O(N^3); space O(N^2)
+
73  template <typename T, typename F>
+
74  void
+
75  hessian(const F& f,
+
76  const Eigen::Matrix<T, Dynamic, 1>& x,
+
77  T& fx,
+
78  Eigen::Matrix<T, Dynamic, 1>& grad,
+
79  Eigen::Matrix<T, Dynamic, Dynamic>& H) {
+
80  H.resize(x.size(), x.size());
+
81  grad.resize(x.size());
+
82  Eigen::Matrix<fvar<fvar<T> >, Dynamic, 1> x_fvar(x.size());
+
83  for (int i = 0; i < x.size(); ++i) {
+
84  for (int j = i; j < x.size(); ++j) {
+
85  for (int k = 0; k < x.size(); ++k)
+
86  x_fvar(k) = fvar<fvar<T> >(fvar<T>(x(k), j == k),
+
87  fvar<T>(i == k, 0));
+
88  fvar<fvar<T> > fx_fvar = f(x_fvar);
+
89  if (j == 0)
+
90  fx = fx_fvar.val_.val_;
+
91  if (i == j)
+
92  grad(i) = fx_fvar.d_.val_;
+
93  H(i, j) = fx_fvar.d_.d_;
+
94  H(j, i) = H(i, j);
+
95  }
+
96  }
+
97  }
+
98 
+
99  } // namespace math
+
100 } // namespace stan
+
101 #endif
+ + + +
static void grad(chainable *vi)
Compute the gradient for all variables starting from the specified root variable implementation.
Definition: grad.hpp:30
+ +
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+
void hessian(const F &f, const Eigen::Matrix< double, Dynamic, 1 > &x, double &fx, Eigen::Matrix< double, Dynamic, 1 > &grad, Eigen::Matrix< double, Dynamic, Dynamic > &H)
Calculate the value, the gradient, and the Hessian, of the specified function at the specified argume...
Definition: hessian.hpp:46
+
static void recover_memory_nested()
Recover only the memory used for the top nested call.
+
double val() const
Return the value of this variable.
Definition: var.hpp:234
+
static void start_nested()
Record the current position so that recover_memory_nested() can find it.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/hessian__times__vector_8hpp.html b/doc/api/html/hessian__times__vector_8hpp.html new file mode 100644 index 00000000000..abc11fcd283 --- /dev/null +++ b/doc/api/html/hessian__times__vector_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/mix/mat/functor/hessian_times_vector.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
hessian_times_vector.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/rev/core.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<typename F >
void stan::math::hessian_times_vector (const F &f, const Eigen::Matrix< double, Dynamic, 1 > &x, const Eigen::Matrix< double, Dynamic, 1 > &v, double &fx, Eigen::Matrix< double, Dynamic, 1 > &Hv)
 
template<typename T , typename F >
void stan::math::hessian_times_vector (const F &f, const Eigen::Matrix< T, Dynamic, 1 > &x, const Eigen::Matrix< T, Dynamic, 1 > &v, T &fx, Eigen::Matrix< T, Dynamic, 1 > &Hv)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/hessian__times__vector_8hpp_source.html b/doc/api/html/hessian__times__vector_8hpp_source.html new file mode 100644 index 00000000000..039188b2d80 --- /dev/null +++ b/doc/api/html/hessian__times__vector_8hpp_source.html @@ -0,0 +1,182 @@ + + + + + + +Stan Math Library: stan/math/mix/mat/functor/hessian_times_vector.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
hessian_times_vector.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_MIX_MAT_FUNCTOR_HESSIAN_TIMES_VECTOR_HPP
+
2 #define STAN_MATH_MIX_MAT_FUNCTOR_HESSIAN_TIMES_VECTOR_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ +
6 #include <stan/math/rev/core.hpp>
+
7 #include <vector>
+
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
13  using Eigen::Dynamic;
+
14 
+
15  template <typename F>
+
16  void
+ +
18  const Eigen::Matrix<double, Dynamic, 1>& x,
+
19  const Eigen::Matrix<double, Dynamic, 1>& v,
+
20  double& fx,
+
21  Eigen::Matrix<double, Dynamic, 1>& Hv) {
+
22  using stan::math::fvar;
+
23  using stan::math::var;
+
24  using Eigen::Matrix;
+
25  start_nested();
+
26  try {
+
27  Matrix<var, Dynamic, 1> x_var(x.size());
+
28  for (int i = 0; i < x_var.size(); ++i)
+
29  x_var(i) = x(i);
+
30  var fx_var;
+
31  var grad_fx_var_dot_v;
+
32  gradient_dot_vector(f, x_var, v, fx_var, grad_fx_var_dot_v);
+
33  fx = fx_var.val();
+
34  stan::math::grad(grad_fx_var_dot_v.vi_);
+
35  Hv.resize(x.size());
+
36  for (int i = 0; i < x.size(); ++i)
+
37  Hv(i) = x_var(i).adj();
+
38  } catch (const std::exception& e) {
+ +
40  throw;
+
41  }
+ +
43  }
+
44  template <typename T, typename F>
+
45  void
+ +
47  const Eigen::Matrix<T, Dynamic, 1>& x,
+
48  const Eigen::Matrix<T, Dynamic, 1>& v,
+
49  T& fx,
+
50  Eigen::Matrix<T, Dynamic, 1>& Hv) {
+
51  using Eigen::Matrix;
+
52  Matrix<T, Dynamic, 1> grad;
+
53  Matrix<T, Dynamic, Dynamic> H;
+
54  hessian(f, x, fx, grad, H);
+
55  Hv = H * v;
+
56  }
+
57 
+
58  } // namespace math
+
59 } // namespace stan
+
60 #endif
+ + +
void gradient_dot_vector(const F &f, const Eigen::Matrix< T1, Dynamic, 1 > &x, const Eigen::Matrix< T2, Dynamic, 1 > &v, T1 &fx, T1 &grad_fx_dot_v)
+
static void grad(chainable *vi)
Compute the gradient for all variables starting from the specified root variable implementation.
Definition: grad.hpp:30
+
void hessian_times_vector(const F &f, const Eigen::Matrix< double, Dynamic, 1 > &x, const Eigen::Matrix< double, Dynamic, 1 > &v, double &fx, Eigen::Matrix< double, Dynamic, 1 > &Hv)
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+
void hessian(const F &f, const Eigen::Matrix< double, Dynamic, 1 > &x, double &fx, Eigen::Matrix< double, Dynamic, 1 > &grad, Eigen::Matrix< double, Dynamic, Dynamic > &H)
Calculate the value, the gradient, and the Hessian, of the specified function at the specified argume...
Definition: hessian.hpp:46
+
static void recover_memory_nested()
Recover only the memory used for the top nested call.
+
double val() const
Return the value of this variable.
Definition: var.hpp:234
+
static void start_nested()
Record the current position so that recover_memory_nested() can find it.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/hierarchy.html b/doc/api/html/hierarchy.html new file mode 100644 index 00000000000..58e1f479a18 --- /dev/null +++ b/doc/api/html/hierarchy.html @@ -0,0 +1,279 @@ + + + + + + +Stan Math Library: Class Hierarchy + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
+
Class Hierarchy
+
+
+
This inheritance list is sorted roughly, but not completely, alphabetically:
+
[detail level 1234]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
oCstan::math::accumulator< T >Class to accumulate values and eventually return their sum
oCstan::math::array_builder< T >Structure for building up arrays in an expression (rather than in statements) using an argumentchaining add() method and a getter method array() to return the result
oCstan::math::AutodiffStackStorage< ChainableT, ChainableAllocT >
oCstan::math::detail::bounded< T_y, T_low, T_high, y_is_vec >
oCstan::math::detail::bounded< T_y, T_low, T_high, true >
oCstan::math::chainableAbstract base class for variable implementations that handles memory management and applying the chain rule
oCstan::math::chainable_allocA chainable_alloc is an object which is constructed and destructed normally but the memory lifespan is managed along with the arena allocator for the gradient calculation
oCstan::math::child_type< T >Primary template class for metaprogram to compute child type of T
oCstan::math::child_type< T_struct< T_child > >Specialization for template classes / structs
oCstan::math::common_type< T1, T2 >
oCstan::math::common_type< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > >
oCstan::math::common_type< std::vector< T1 >, std::vector< T2 > >
oCstan::math::container_view< T1, T2 >Primary template class for container view of array y with same structure as T1 and size as x
oCstan::math::container_view< dummy, T2 >Dummy type specialization, used in conjunction with struct dummy as described above
oCstan::math::container_view< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > >Template specialization for Eigen::Map view of array with scalar type T2 with size inferred from input Eigen::Matrix
oCstan::math::container_view< Eigen::Matrix< T1, R, C >, T2 >Template specialization for scalar view of array y with scalar type T2
oCstan::math::container_view< std::vector< Eigen::Matrix< T1, R, C > >, Eigen::Matrix< T2, R, C > >Template specialization for matrix view of array y with scalar type T2 with shape equal to x
oCstan::math::container_view< std::vector< T1 >, T2 >Template specialization for scalar view of array y with scalar type T2 with proper indexing inferred from input vector x of scalar type T1
oCstan::contains_fvar< T1, T2, T3, T4, T5, T6 >Metaprogram to calculate the base scalar return type resulting from promoting all the scalar types of the template parameters
oCstan::contains_nonconstant_struct< T1, T2, T3, T4, T5, T6 >
oCstan::contains_vector< T1, T2, T3, T4, T5, T6 >
oCstan::math::coupled_ode_observerObserver for the coupled states
oCstan::math::coupled_ode_system< F, T1, T2 >Base template class for a coupled ordinary differential equation system, which adds sensitivities to the base system
oCstan::math::coupled_ode_system< F, double, double >The coupled ode system for known initial values and known parameters
oCstan::math::coupled_ode_system< F, double, stan::math::var >The coupled ODE system for known initial values and unknown parameters
oCstan::math::coupled_ode_system< F, stan::math::var, double >The coupled ODE system for unknown initial values and known parameters
oCstan::math::coupled_ode_system< F, stan::math::var, stan::math::var >The coupled ode system for unknown intial values and unknown parameters
oCstan::math::dummyEmpty struct for use in boost::condtional<is_constant_struct<T1>::value, T1, dummy>::type as false condtion for safe indexing
oCstan::error_index
oCstan::math::fvar< T >
oCEigen::internal::general_matrix_matrix_product< Index, stan::math::var, LhsStorageOrder, ConjugateLhs, stan::math::var, RhsStorageOrder, ConjugateRhs, ColMajor >
oCEigen::internal::general_matrix_vector_product< Index, stan::math::var, ColMajor, ConjugateLhs, stan::math::var, ConjugateRhs >Override matrix-vector and matrix-matrix products to use more efficient implementation
oCEigen::internal::general_matrix_vector_product< Index, stan::math::var, RowMajor, ConjugateLhs, stan::math::var, ConjugateRhs >
oCstan::math::include_summand< propto, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >Template metaprogram to calculate whether a summand needs to be included in a proportional (log) probability calculation
oCstan::math::index_type< T >Primary template class for the metaprogram to compute the index type of a container
oCstan::math::index_type< const T >Template class for metaprogram to compute the type of indexes used in a constant container type
oCstan::math::index_type< Eigen::Matrix< T, R, C > >Template metaprogram defining typedef for the type of index for an Eigen matrix, vector, or row vector
oCstan::math::index_type< std::vector< T > >Template metaprogram class to compute the type of index for a standard vector
oCstan::is_constant< T >Metaprogramming struct to detect whether a given type is constant in the mathematical sense (not the C++ const sense)
oCstan::is_constant_struct< T >Metaprogram to determine if a type has a base scalar type that can be assigned to type double
oCstan::is_constant_struct< Eigen::Block< T > >
oCstan::is_constant_struct< Eigen::Matrix< T, R, C > >
oCstan::is_constant_struct< std::vector< T > >
oCstan::is_fvar< T >
oCstan::is_fvar< stan::math::fvar< T > >
oCstan::is_var< T >
oCstan::is_var< stan::math::var >
oCstan::is_var_or_arithmetic< T1, T2, T3, T4, T5, T6 >
oCstan::is_vector< T >
oCstan::is_vector< const T >
oCstan::is_vector< Eigen::Block< T > >
oCstan::is_vector< Eigen::Matrix< T, 1, Eigen::Dynamic > >
oCstan::is_vector< Eigen::Matrix< T, Eigen::Dynamic, 1 > >
oCstan::is_vector< std::vector< T > >
oCstan::is_vector_like< T >
oCstan::is_vector_like< const T >
oCstan::is_vector_like< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > >
oCstan::is_vector_like< T * >
oCstan::math::LDLT_factor< T, R, C >
oCstan::math::LDLT_factor< stan::math::var, R, C >A template specialization of src/stan/math/matrix/LDLT_factor.hpp for stan::math::var which can be used with all the *_ldlt functions
oCstan::math::LDLT_factor< T, R, C >LDLT_factor is a thin wrapper on Eigen::LDLT to allow for reusing factorizations and efficient autodiff of things like log determinants and solutions to linear systems
oCstd::numeric_limits< stan::math::fvar< T > >
oCstd::numeric_limits< stan::math::var >Specialization of numeric limits for var objects
oCEigen::NumTraits< stan::math::fvar< T > >Numerical traits template override for Eigen for automatic gradient variables
oCEigen::NumTraits< stan::math::var >Numerical traits template override for Eigen for automatic gradient variables
oCstan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6 >A variable implementation that stores operands and derivatives with respect to the variable
oCstan::partials_return_type< T1, T2, T3, T4, T5, T6 >
oCstan::partials_type< T >
oCstan::partials_type< stan::math::fvar< T > >
oCstan::partials_type< stan::math::var >
oCstan::math::pass_type< T >
oCstan::math::pass_type< double >
oCstan::math::pass_type< int >
oCstan::math::promote_scalar_struct< T, S >General struct to hold static function for promoting underlying scalar types
oCstan::math::promote_scalar_struct< T, Eigen::Matrix< S, 1,-1 > >Struct to hold static function for promoting underlying scalar types
oCstan::math::promote_scalar_struct< T, Eigen::Matrix< S,-1, 1 > >Struct to hold static function for promoting underlying scalar types
oCstan::math::promote_scalar_struct< T, Eigen::Matrix< S,-1,-1 > >Struct to hold static function for promoting underlying scalar types
oCstan::math::promote_scalar_struct< T, std::vector< S > >Struct to hold static function for promoting underlying scalar types
oCstan::math::promote_scalar_struct< T, T >Struct to hold static function for promoting underlying scalar types
oCstan::math::promote_scalar_type< T, S >Template metaprogram to calculate a type for converting a convertible type
oCstan::math::promote_scalar_type< T, Eigen::Matrix< S, 1, Eigen::Dynamic > >Template metaprogram to calculate a type for a row vector whose underlying scalar is converted from the second template parameter type to the first
oCstan::math::promote_scalar_type< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > >Template metaprogram to calculate a type for a vector whose underlying scalar is converted from the second template parameter type to the first
oCstan::math::promote_scalar_type< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >Template metaprogram to calculate a type for a matrix whose underlying scalar is converted from the second template parameter type to the first
oCstan::math::promote_scalar_type< T, std::vector< S > >Template metaprogram to calculate a type for a container whose underlying scalar is converted from the second template parameter type to the first
oCstan::math::promoter< F, T >
oCstan::math::promoter< Eigen::Matrix< F, R, C >, Eigen::Matrix< T, R, C > >
oCstan::math::promoter< Eigen::Matrix< T, R, C >, Eigen::Matrix< T, R, C > >
oCstan::math::promoter< std::vector< F >, std::vector< T > >
oCstan::math::promoter< std::vector< T >, std::vector< T > >
oCstan::math::promoter< T, T >
oCstan::return_type< T1, T2, T3, T4, T5, T6 >Metaprogram to calculate the base scalar return type resulting from promoting all the scalar types of the template parameters
oCEigen::internal::scalar_product_traits< double, stan::math::var >Scalar product traits override for Eigen for automatic gradient variables
oCEigen::internal::scalar_product_traits< stan::math::var, double >Scalar product traits override for Eigen for automatic gradient variables
oCstan::scalar_type< T >Metaprogram structure to determine the base scalar type of a template argument
oCstan::scalar_type< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > >
oCstan::scalar_type< T * >
oCstan::scalar_type_pre< T >Metaprogram structure to determine the type of first container of the base scalar type of a template argument
oCstan::math::seq_view< T, S >
oCstan::math::seq_view< double, std::vector< int > >
oCstan::math::seq_view< T, Eigen::Matrix< S, 1, Eigen::Dynamic > >
oCstan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > >
oCstan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >
oCstan::math::seq_view< T, std::vector< S > >
oCstan::math::seq_view< T, std::vector< std::vector< T > > >
oCstan::math::seq_view< T, std::vector< T > >
oCEigen::internal::significant_decimals_default_impl< stan::math::fvar< T >, false >Implemented this for printing to stream
oCEigen::internal::significant_decimals_default_impl< stan::math::var, false >Implemented this for printing to stream
oCstan::size_of_helper< T, is_vec >
oCstan::size_of_helper< T, true >
oCstan::math::stack_allocAn instance of this class provides a memory pool through which blocks of raw memory may be allocated and then collected simultaneously
oCstan::math::store_type< T >
oCstan::math::store_type< double >
oCstan::math::store_type< Eigen::Matrix< S, 1, Eigen::Dynamic > >
oCstan::math::store_type< Eigen::Matrix< S, Eigen::Dynamic, 1 > >
oCstan::math::store_type< Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >
oCstan::math::store_type< int >
oCstan::math::store_type< S >
oCstan::math::store_type< std::vector< int > >
oCstan::math::store_type< std::vector< S > >
oCstan::math::store_type< std::vector< std::vector< T > > >
oCstan::math::store_type< std::vector< T > >
oCstan::math::value_type< T >Primary template class for metaprogram to compute the type of values stored in a container
oCstan::math::value_type< const T >Template class for metaprogram to compute the type of values stored in a constant container
oCstan::math::value_type< Eigen::Matrix< T, R, C > >Template metaprogram defining the type of values stored in an Eigen matrix, vector, or row vector
oCstan::math::value_type< std::vector< T > >Template metaprogram class to compute the type of values stored in a standard vector
oCstan::math::varIndependent (input) and dependent (output) variables for gradients
oCstan::VectorBuilder< used, T1, T2, T3, T4, T5, T6, T7 >
oCstan::VectorBuilderHelper< T1, used, is_vec >VectorBuilder allocates type T1 values to be used as intermediate values
oCstan::VectorBuilderHelper< T1, true, false >
oCstan::VectorBuilderHelper< T1, true, true >
oCstan::VectorBuilderHelper< T1, used, stan::contains_vector< T2, T3, T4, T5, T6, T7 >::value >
oCstan::VectorView< T, is_array, throw_if_accessed >VectorView is a template metaprogram that takes its argument and allows it to be used like a vector
oCstan::VectorView< const double, false, false >
oCstan::VectorView< const T, is_array, throw_if_accessed >VectorView that has const correctness
oCstan::VectorView< T_partials_return, stan::is_vector< T1 >::value, stan::is_constant_struct< T1 >::value >
oCstan::VectorView< T_partials_return, stan::is_vector< T2 >::value, stan::is_constant_struct< T2 >::value >
oCstan::VectorView< T_partials_return, stan::is_vector< T3 >::value, stan::is_constant_struct< T3 >::value >
oCstan::VectorView< T_partials_return, stan::is_vector< T4 >::value, stan::is_constant_struct< T4 >::value >
oCstan::VectorView< T_partials_return, stan::is_vector< T5 >::value, stan::is_constant_struct< T5 >::value >
oCstan::VectorView< T_partials_return, stan::is_vector< T6 >::value, stan::is_constant_struct< T6 >::value >
oCstan::VectorViewMvt< T, is_array, throw_if_accessed >
oCstan::VectorViewMvt< const T, is_array, throw_if_accessed >VectorViewMvt that has const correctness
oCstan::math::welford_covar_estimator
\Cstan::math::welford_var_estimator
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/hypergeometric__log_8hpp.html b/doc/api/html/hypergeometric__log_8hpp.html new file mode 100644 index 00000000000..ad6a561fbfc --- /dev/null +++ b/doc/api/html/hypergeometric__log_8hpp.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/hypergeometric_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
hypergeometric_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<bool propto, typename T_n , typename T_N , typename T_a , typename T_b >
double stan::math::hypergeometric_log (const T_n &n, const T_N &N, const T_a &a, const T_b &b)
 
template<typename T_n , typename T_N , typename T_a , typename T_b >
double stan::math::hypergeometric_log (const T_n &n, const T_N &N, const T_a &a, const T_b &b)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/hypergeometric__log_8hpp_source.html b/doc/api/html/hypergeometric__log_8hpp_source.html new file mode 100644 index 00000000000..647d0482f90 --- /dev/null +++ b/doc/api/html/hypergeometric__log_8hpp_source.html @@ -0,0 +1,229 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/hypergeometric_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
hypergeometric_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_HYPERGEOMETRIC_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_HYPERGEOMETRIC_LOG_HPP
+
3 
+
4 #include <boost/math/distributions.hpp>
+ + + + + + + + + + + + + + +
19 
+
20 namespace stan {
+
21 
+
22  namespace math {
+
23 
+
24  // Hypergeometric(n|N, a, b) [0 <= n <= a; 0 <= N-n <= b; 0 <= N <= a+b]
+
25  // n: #white balls drawn; N: #balls drawn;
+
26  // a: #white balls; b: #black balls
+
27  template <bool propto,
+
28  typename T_n, typename T_N,
+
29  typename T_a, typename T_b>
+
30  double
+
31  hypergeometric_log(const T_n& n, const T_N& N,
+
32  const T_a& a, const T_b& b) {
+
33  static const char* function("stan::math::hypergeometric_log");
+
34 
+ + + + + +
40 
+
41  // check if any vectors are zero length
+
42  if (!(stan::length(n)
+
43  && stan::length(N)
+
44  && stan::length(a)
+
45  && stan::length(b)))
+
46  return 0.0;
+
47 
+
48 
+
49  VectorView<const T_n> n_vec(n);
+
50  VectorView<const T_N> N_vec(N);
+
51  VectorView<const T_a> a_vec(a);
+
52  VectorView<const T_b> b_vec(b);
+
53  size_t size = max_size(n, N, a, b);
+
54 
+
55  double logp(0.0);
+
56  check_bounded(function, "Successes variable", n, 0, a);
+
57  check_greater(function, "Draws parameter", N, n);
+
58  for (size_t i = 0; i < size; i++) {
+
59  check_bounded(function, "Draws parameter minus successes variable",
+
60  N_vec[i]-n_vec[i], 0, b_vec[i]);
+
61  check_bounded(function, "Draws parameter", N_vec[i], 0,
+
62  a_vec[i]+b_vec[i]);
+
63  }
+
64  check_consistent_sizes(function,
+
65  "Successes variable", n,
+
66  "Draws parameter", N,
+
67  "Successes in population parameter", a,
+
68  "Failures in population parameter", b);
+
69 
+
70  // check if no variables are involved and prop-to
+ +
72  return 0.0;
+
73 
+
74 
+
75  for (size_t i = 0; i < size; i++)
+
76  logp += math::binomial_coefficient_log(a_vec[i], n_vec[i])
+
77  + math::binomial_coefficient_log(b_vec[i], N_vec[i]-n_vec[i])
+
78  - math::binomial_coefficient_log(a_vec[i]+b_vec[i], N_vec[i]);
+
79  return logp;
+
80  }
+
81 
+
82  template <typename T_n,
+
83  typename T_N,
+
84  typename T_a,
+
85  typename T_b>
+
86  inline
+
87  double
+
88  hypergeometric_log(const T_n& n,
+
89  const T_N& N,
+
90  const T_a& a,
+
91  const T_b& b) {
+
92  return hypergeometric_log<false>(n, N, a, b);
+
93  }
+
94  }
+
95 }
+
96 #endif
+
fvar< T > binomial_coefficient_log(const fvar< T > &x1, const fvar< T > &x2)
+
double hypergeometric_log(const T_n &n, const T_N &N, const T_a &a, const T_b &b)
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
bool check_bounded(const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)
Return true if the value is between the low and high values, inclusively.
+ + +
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ + + +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+ +
bool check_greater(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is strictly greater than low.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/hypergeometric__rng_8hpp.html b/doc/api/html/hypergeometric__rng_8hpp.html new file mode 100644 index 00000000000..d80bada39eb --- /dev/null +++ b/doc/api/html/hypergeometric__rng_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/hypergeometric_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
hypergeometric_rng.hpp File Reference
+
+
+
#include <boost/math/distributions/hypergeometric.hpp>
+#include <stan/math/prim/scal/err/check_bounded.hpp>
+#include <stan/math/prim/scal/err/check_positive.hpp>
+#include <stan/math/prim/scal/prob/uniform_rng.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
int stan::math::hypergeometric_rng (int N, int a, int b, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/hypergeometric__rng_8hpp_source.html b/doc/api/html/hypergeometric__rng_8hpp_source.html new file mode 100644 index 00000000000..f80b47d9001 --- /dev/null +++ b/doc/api/html/hypergeometric__rng_8hpp_source.html @@ -0,0 +1,166 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/hypergeometric_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
hypergeometric_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_HYPERGEOMETRIC_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_HYPERGEOMETRIC_RNG_HPP
+
3 
+
4 #include <boost/math/distributions/hypergeometric.hpp>
+
5 
+ + + +
9 
+
10 namespace stan {
+
11 
+
12  namespace math {
+
13 
+
14  template <class RNG>
+
15  inline int
+
16  hypergeometric_rng(int N, int a, int b, RNG& rng) {
+
17  using boost::variate_generator;
+
18  using boost::math::hypergeometric_distribution;
+ + +
21 
+
22  static const char* function("stan::math::hypergeometric_rng");
+
23 
+
24  check_bounded(function, "Draws parameter", N, 0, a+b);
+
25  check_positive(function, "Draws parameter", N);
+
26  check_positive(function, "Successes in population parameter", a);
+
27  check_positive(function, "Failures in population parameter", b);
+
28 
+
29  hypergeometric_distribution<> dist(b, N, a + b);
+
30 
+
31  double u = uniform_rng(0.0, 1.0, rng);
+
32  int min = 0;
+
33  int max = a - 1;
+
34  while (min < max) {
+
35  int mid = (min + max) / 2;
+
36  if (cdf(dist, mid + 1) > u)
+
37  max = mid;
+
38  else
+
39  min = mid + 1;
+
40  }
+
41  return min + 1;
+
42  }
+
43 
+
44  }
+
45 
+
46 }
+
47 
+
48 #endif
+
int min(const std::vector< int > &x)
Returns the minimum coefficient in the specified column vector.
Definition: min.hpp:20
+ +
bool check_bounded(const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)
Return true if the value is between the low and high values, inclusively.
+ +
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+
double uniform_rng(const double alpha, const double beta, RNG &rng)
Definition: uniform_rng.hpp:22
+
int max(const std::vector< int > &x)
Returns the maximum coefficient in the specified column vector.
Definition: max.hpp:21
+ +
double dist(const std::vector< double > &x, const std::vector< double > &y)
Definition: dist.hpp:11
+
int hypergeometric_rng(int N, int a, int b, RNG &rng)
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/identity__constrain_8hpp.html b/doc/api/html/identity__constrain_8hpp.html new file mode 100644 index 00000000000..15e1eb105bb --- /dev/null +++ b/doc/api/html/identity__constrain_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/identity_constrain.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
identity_constrain.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
stan::math::identity_constrain (T x)
 Returns the result of applying the identity constraint transform to the input. More...
 
template<typename T >
stan::math::identity_constrain (const T x, T &)
 Returns the result of applying the identity constraint transform to the input and increments the log probability reference with the log absolute Jacobian determinant. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/identity__constrain_8hpp_source.html b/doc/api/html/identity__constrain_8hpp_source.html new file mode 100644 index 00000000000..25e07525d2e --- /dev/null +++ b/doc/api/html/identity__constrain_8hpp_source.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/identity_constrain.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
identity_constrain.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_IDENTITY_CONSTRAIN_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_IDENTITY_CONSTRAIN_HPP
+
3 
+
4 namespace stan {
+
5 
+
6  namespace math {
+
7 
+
20  template <typename T>
+
21  inline
+ +
23  return x;
+
24  }
+
25 
+
39  template <typename T>
+
40  inline
+
41  T identity_constrain(const T x, T& /*lp*/) {
+
42  return x;
+
43  }
+
44 
+
45  }
+
46 
+
47 }
+
48 
+
49 #endif
+
T identity_constrain(T x)
Returns the result of applying the identity constraint transform to the input.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/identity__free_8hpp.html b/doc/api/html/identity__free_8hpp.html new file mode 100644 index 00000000000..d51e2c1e57c --- /dev/null +++ b/doc/api/html/identity__free_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/identity_free.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
identity_free.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
stan::math::identity_free (const T y)
 Returns the result of applying the inverse of the identity constraint transform to the input. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/identity__free_8hpp_source.html b/doc/api/html/identity__free_8hpp_source.html new file mode 100644 index 00000000000..5157ac235dc --- /dev/null +++ b/doc/api/html/identity__free_8hpp_source.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/identity_free.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
identity_free.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_IDENTITY_FREE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_IDENTITY_FREE_HPP
+
3 
+
4 namespace stan {
+
5 
+
6  namespace math {
+
7 
+
19  template <typename T>
+
20  inline
+
21  T identity_free(const T y) {
+
22  return y;
+
23  }
+
24 
+
25  }
+
26 
+
27 }
+
28 
+
29 #endif
+
T identity_free(const T y)
Returns the result of applying the inverse of the identity constraint transform to the input...
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inc__beta__dda_8hpp.html b/doc/api/html/inc__beta__dda_8hpp.html new file mode 100644 index 00000000000..c31e46db8b4 --- /dev/null +++ b/doc/api/html/inc__beta__dda_8hpp.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/inc_beta_dda.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inc_beta_dda.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
stan::math::inc_beta_ddb (T a, T b, T z, T digamma_b, T digamma_ab)
 Returns the partial derivative of the regularized incomplete beta function, I_{z}(a, b) with respect to b. More...
 
template<typename T >
stan::math::inc_beta_dda (T a, T b, T z, T digamma_a, T digamma_ab)
 Returns the partial derivative of the regularized incomplete beta function, I_{z}(a, b) with respect to a. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inc__beta__dda_8hpp_source.html b/doc/api/html/inc__beta__dda_8hpp_source.html new file mode 100644 index 00000000000..077eefde6ef --- /dev/null +++ b/doc/api/html/inc__beta__dda_8hpp_source.html @@ -0,0 +1,189 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/inc_beta_dda.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inc_beta_dda.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_INC_BETA_DDA_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_INC_BETA_DDA_HPP
+
3 
+ + +
6 #include <cmath>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  template <typename T>
+
12  T inc_beta_ddb(T a, T b, T z,
+
13  T digamma_b, T digamma_ab);
+
14 
+
37  template <typename T>
+
38  T inc_beta_dda(T a, T b, T z,
+
39  T digamma_a, T digamma_ab) {
+
40  using std::log;
+
41 
+
42  if (b > a)
+
43  if ((0.1 < z && z <= 0.75 && b > 500)
+
44  || (0.01 < z && z <= 0.1 && b > 2500)
+
45  || (0.001 < z && z <= 0.01 && b > 1e5))
+
46  return -inc_beta_ddb(b, a, 1 - z, digamma_a, digamma_ab);
+
47 
+
48  if (z > 0.75 && a < 500)
+
49  return -inc_beta_ddb(b, a, 1 - z, digamma_a, digamma_ab);
+
50  if (z > 0.9 && a < 2500)
+
51  return -inc_beta_ddb(b, a, 1 - z, digamma_a, digamma_ab);
+
52  if (z > 0.99 && a < 1e5)
+
53  return -inc_beta_ddb(b, a, 1 - z, digamma_a, digamma_ab);
+
54  if (z > 0.999)
+
55  return -inc_beta_ddb(b, a, 1 - z, digamma_a, digamma_ab);
+
56 
+
57  double threshold = 1e-10;
+
58 
+
59  digamma_a += 1.0 / a; // Need digamma(a + 1), not digamma(a);
+
60 
+
61  // Common prefactor to regularize numerator and denomentator
+
62  T prefactor = (a + 1) / (a + b);
+
63  prefactor = prefactor * prefactor * prefactor;
+
64 
+
65  T sum_numer = (digamma_ab - digamma_a) * prefactor;
+
66  T sum_denom = prefactor;
+
67 
+
68  T summand = prefactor * z * (a + b) / (a + 1);
+
69 
+
70  T k = 1;
+
71  digamma_ab += 1.0 / (a + b);
+
72  digamma_a += 1.0 / (a + 1);
+
73 
+
74  while (fabs(summand) > threshold) {
+
75  sum_numer += (digamma_ab - digamma_a) * summand;
+
76  sum_denom += summand;
+
77 
+
78  summand *= (1 + (a + b) / k) * (1 + k) / (1 + (a + 1) / k);
+
79  digamma_ab += 1.0 / (a + b + k);
+
80  digamma_a += 1.0 / (a + 1 + k);
+
81  ++k;
+
82  summand *= z / k;
+
83 
+
84  if (k > 1e5)
+
85  throw std::domain_error("stan::math::inc_beta_dda did "
+
86  "not converge within 100000 iterations");
+
87  }
+
88  return inc_beta(a, b, z) * (log(z) + sum_numer / sum_denom);
+
89  }
+
90 
+
91  } // math
+
92 } // stan
+
93 
+
94 #endif
+
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:14
+
T inc_beta_dda(T a, T b, T z, T digamma_a, T digamma_ab)
Returns the partial derivative of the regularized incomplete beta function, I_{z}(a, b) with respect to a.
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
T inc_beta_ddb(T a, T b, T z, T digamma_b, T digamma_ab)
Returns the partial derivative of the regularized incomplete beta function, I_{z}(a, b) with respect to b.
+ +
fvar< T > inc_beta(const fvar< T > &a, const fvar< T > &b, const fvar< T > &x)
Definition: inc_beta.hpp:20
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inc__beta__ddb_8hpp.html b/doc/api/html/inc__beta__ddb_8hpp.html new file mode 100644 index 00000000000..bbf4873b6c3 --- /dev/null +++ b/doc/api/html/inc__beta__ddb_8hpp.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/inc_beta_ddb.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inc_beta_ddb.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
stan::math::inc_beta_dda (T a, T b, T z, T digamma_a, T digamma_ab)
 Returns the partial derivative of the regularized incomplete beta function, I_{z}(a, b) with respect to a. More...
 
template<typename T >
stan::math::inc_beta_ddb (T a, T b, T z, T digamma_b, T digamma_ab)
 Returns the partial derivative of the regularized incomplete beta function, I_{z}(a, b) with respect to b. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inc__beta__ddb_8hpp_source.html b/doc/api/html/inc__beta__ddb_8hpp_source.html new file mode 100644 index 00000000000..146bfb91bb9 --- /dev/null +++ b/doc/api/html/inc__beta__ddb_8hpp_source.html @@ -0,0 +1,184 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/inc_beta_ddb.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inc_beta_ddb.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_INC_BETA_DDB_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_INC_BETA_DDB_HPP
+
3 
+ + +
6 #include <cmath>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  template <typename T>
+
12  T inc_beta_dda(T a, T b, T z,
+
13  T digamma_a, T digamma_ab);
+
14 
+
37  template <typename T>
+
38  T inc_beta_ddb(T a, T b, T z,
+
39  T digamma_b, T digamma_ab) {
+
40  using std::log;
+
41 
+
42  if (b > a)
+
43  if ((0.1 < z && z <= 0.75 && b > 500)
+
44  || (0.01 < z && z <= 0.1 && b > 2500)
+
45  || (0.001 < z && z <= 0.01 && b > 1e5))
+
46  return -inc_beta_dda(b, a, 1 - z, digamma_b, digamma_ab);
+
47 
+
48  if ((z > 0.75 && a < 500)
+
49  || (z > 0.9 && a < 2500)
+
50  || (z > 0.99 && a < 1e5)
+
51  || (z > 0.999))
+
52  return -inc_beta_dda(b, a, 1 - z, digamma_b, digamma_ab);
+
53 
+
54  double threshold = 1e-10;
+
55 
+
56  // Common prefactor to regularize numerator and denomentator
+
57  T prefactor = (a + 1) / (a + b);
+
58  prefactor = prefactor * prefactor * prefactor;
+
59 
+
60  T sum_numer = digamma_ab * prefactor;
+
61  T sum_denom = prefactor;
+
62 
+
63  T summand = prefactor * z * (a + b) / (a + 1);
+
64 
+
65  T k = 1;
+
66  digamma_ab += 1.0 / (a + b);
+
67 
+
68  while (fabs(summand) > threshold) {
+
69  sum_numer += digamma_ab * summand;
+
70  sum_denom += summand;
+
71 
+
72  summand *= (1 + (a + b) / k) * (1 + k) / (1 + (a + 1) / k);
+
73  digamma_ab += 1.0 / (a + b + k);
+
74  ++k;
+
75  summand *= z / k;
+
76 
+
77  if (k > 1e5)
+
78  throw std::domain_error("stan::math::inc_beta_ddb did "
+
79  "not converge within 100000 iterations");
+
80  }
+
81 
+
82  return inc_beta(a, b, z)
+
83  * (log(1 - z) - digamma_b + sum_numer / sum_denom);
+
84  }
+
85 
+
86  } // math
+
87 } // stan
+
88 
+
89 #endif
+
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:14
+
T inc_beta_dda(T a, T b, T z, T digamma_a, T digamma_ab)
Returns the partial derivative of the regularized incomplete beta function, I_{z}(a, b) with respect to a.
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
T inc_beta_ddb(T a, T b, T z, T digamma_b, T digamma_ab)
Returns the partial derivative of the regularized incomplete beta function, I_{z}(a, b) with respect to b.
+
fvar< T > inc_beta(const fvar< T > &a, const fvar< T > &b, const fvar< T > &x)
Definition: inc_beta.hpp:20
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inc__beta__ddz_8hpp.html b/doc/api/html/inc__beta__ddz_8hpp.html new file mode 100644 index 00000000000..fcba6350a92 --- /dev/null +++ b/doc/api/html/inc__beta__ddz_8hpp.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/inc_beta_ddz.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inc_beta_ddz.hpp File Reference
+
+
+
#include <stan/math/prim/scal/fun/lgamma.hpp>
+#include <stan/math/prim/scal/fun/inc_beta.hpp>
+#include <boost/math/special_functions/beta.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

template<typename T >
stan::math::inc_beta_ddz (T a, T b, T z)
 Returns the partial derivative of the regularized incomplete beta function, I_{z}(a, b) with respect to z. More...
 
template<>
double stan::math::inc_beta_ddz (double a, double b, double z)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inc__beta__ddz_8hpp_source.html b/doc/api/html/inc__beta__ddz_8hpp_source.html new file mode 100644 index 00000000000..29365ac6cc6 --- /dev/null +++ b/doc/api/html/inc__beta__ddz_8hpp_source.html @@ -0,0 +1,143 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/inc_beta_ddz.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inc_beta_ddz.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_INC_BETA_DERIVATIVES_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_INC_BETA_DERIVATIVES_HPP
+
3 
+ + +
6 #include <boost/math/special_functions/beta.hpp>
+
7 #include <cmath>
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
26  template <typename T>
+
27  T inc_beta_ddz(T a, T b, T z) {
+
28  using std::exp;
+
29  using std::log;
+
30  return exp((b - 1) * log(1 - z) + (a - 1) * log(z)
+
31  + lgamma(a + b) - lgamma(a) - lgamma(b));
+
32  }
+
33 
+
34  template <>
+
35  double inc_beta_ddz(double a, double b, double z) {
+
36  using boost::math::ibeta_derivative;
+
37  return ibeta_derivative(a, b, z);
+
38  }
+
39 
+
40  } // math
+
41 } // stan
+
42 
+
43 #endif
+ +
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
T inc_beta_ddz(T a, T b, T z)
Returns the partial derivative of the regularized incomplete beta function, I_{z}(a, b) with respect to z.
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/include__summand_8hpp.html b/doc/api/html/include__summand_8hpp.html new file mode 100644 index 00000000000..3f75b25400d --- /dev/null +++ b/doc/api/html/include__summand_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/include_summand.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
include_summand.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/is_constant.hpp>
+#include <stan/math/prim/scal/meta/scalar_type.hpp>
+#include <boost/math/tools/promotion.hpp>
+
+

Go to the source code of this file.

+ + + + + +

+Classes

struct  stan::math::include_summand< propto, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >
 Template metaprogram to calculate whether a summand needs to be included in a proportional (log) probability calculation. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/include__summand_8hpp_source.html b/doc/api/html/include__summand_8hpp_source.html new file mode 100644 index 00000000000..1c18003af4b --- /dev/null +++ b/doc/api/html/include__summand_8hpp_source.html @@ -0,0 +1,153 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/include_summand.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
include_summand.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_INCLUDE_SUMMAND_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_INCLUDE_SUMMAND_HPP
+
3 
+ + +
6 #include <boost/math/tools/promotion.hpp>
+
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
30  template <bool propto,
+
31  typename T1 = double, typename T2 = double,
+
32  typename T3 = double, typename T4 = double,
+
33  typename T5 = double, typename T6 = double,
+
34  typename T7 = double, typename T8 = double,
+
35  typename T9 = double, typename T10 = double>
+
36  struct include_summand {
+
42  enum {
+
43  value = (!propto
+ + + + + + + + + + +
54  )
+
55  };
+
56  };
+
57 
+
58 
+
59  }
+
60 
+
61 }
+
62 
+
63 #endif
+
Metaprogramming struct to detect whether a given type is constant in the mathematical sense (not the ...
Definition: is_constant.hpp:22
+ +
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/index.html b/doc/api/html/index.html new file mode 100644 index 00000000000..1b000abbf11 --- /dev/null +++ b/doc/api/html/index.html @@ -0,0 +1,102 @@ + + + + + + +Stan Math Library: Main Page + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + +
+ +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
+ + +
+ +
+ +
+
+
Stan Math Library Documentation
+
+
+

This is the API documentation for the Stan Math Library.

+

More Information

+
For more information, including pointers to narrative documentation, please visit Stan's home page at:

http://mc-stan.org/

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/initialize_8hpp.html b/doc/api/html/initialize_8hpp.html new file mode 100644 index 00000000000..faa59d52fc6 --- /dev/null +++ b/doc/api/html/initialize_8hpp.html @@ -0,0 +1,143 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/initialize.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
initialize.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <boost/type_traits/is_arithmetic.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + +

+Functions

template<typename T >
void stan::math::initialize (T &x, const T &v)
 
template<typename T , typename V >
boost::enable_if_c
+< boost::is_arithmetic< V >
+::value, void >::type 
stan::math::initialize (T &x, V v)
 
template<typename T , int R, int C, typename V >
void stan::math::initialize (Eigen::Matrix< T, R, C > &x, const V &v)
 
template<typename T , typename V >
void stan::math::initialize (std::vector< T > &x, const V &v)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/initialize_8hpp_source.html b/doc/api/html/initialize_8hpp_source.html new file mode 100644 index 00000000000..5d57303d68c --- /dev/null +++ b/doc/api/html/initialize_8hpp_source.html @@ -0,0 +1,149 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/initialize.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
initialize.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_INITIALIZE_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_INITIALIZE_HPP
+
3 
+ +
5 #include <boost/type_traits/is_arithmetic.hpp>
+
6 #include <boost/utility/enable_if.hpp>
+
7 #include <vector>
+
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
13  // initializations called for local variables generate in Stan
+
14  // code; fills in all cells in first arg with second arg
+
15 
+
16  template <typename T>
+
17  inline void initialize(T& x, const T& v) {
+
18  x = v;
+
19  }
+
20  template <typename T, typename V>
+
21  inline
+
22  typename boost::enable_if_c<boost::is_arithmetic<V>::value, void>::type
+
23  initialize(T& x, V v) {
+
24  x = v;
+
25  }
+
26  template <typename T, int R, int C, typename V>
+
27  inline void initialize(Eigen::Matrix<T, R, C>& x, const V& v) {
+
28  for (int i = 0; i < x.size(); ++i)
+
29  initialize(x(i), v);
+
30  }
+
31  template <typename T, typename V>
+
32  inline void initialize(std::vector<T>& x, const V& v) {
+
33  for (size_t i = 0; i < x.size(); ++i)
+
34  initialize(x[i], v);
+
35  }
+
36 
+
37  }
+
38 }
+
39 #endif
+
void initialize(T &x, const T &v)
Definition: initialize.hpp:17
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/initialize__variable_8hpp.html b/doc/api/html/initialize__variable_8hpp.html new file mode 100644 index 00000000000..ae6b95c94d0 --- /dev/null +++ b/doc/api/html/initialize__variable_8hpp.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/initialize_variable.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
initialize_variable.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/rev/core.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + +

+Functions

void stan::math::initialize_variable (var &variable, const var &value)
 Initialize variable to value. More...
 
template<int R, int C>
void stan::math::initialize_variable (Eigen::Matrix< var, R, C > &matrix, const var &value)
 Initialize every cell in the matrix to the specified value. More...
 
template<typename T >
void stan::math::initialize_variable (std::vector< T > &variables, const var &value)
 Initialize the variables in the standard vector recursively. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/initialize__variable_8hpp_source.html b/doc/api/html/initialize__variable_8hpp_source.html new file mode 100644 index 00000000000..b05c2ba1a76 --- /dev/null +++ b/doc/api/html/initialize__variable_8hpp_source.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/initialize_variable.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
initialize_variable.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_INITIALIZE_VARIABLE_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_INITIALIZE_VARIABLE_HPP
+
3 
+ +
5 #include <stan/math/rev/core.hpp>
+
6 #include <vector>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
15  inline void initialize_variable(var& variable, const var& value) {
+
16  variable = value;
+
17  }
+
18 
+
23  template <int R, int C>
+
24  inline void initialize_variable(Eigen::Matrix<var, R, C>& matrix,
+
25  const var& value) {
+
26  for (int i = 0; i < matrix.size(); ++i)
+
27  matrix(i) = value;
+
28  }
+
29 
+
33  template <typename T>
+
34  inline void initialize_variable(std::vector<T>& variables,
+
35  const var& value) {
+
36  for (size_t i = 0; i < variables.size(); ++i)
+
37  initialize_variable(variables[i], value);
+
38  }
+
39 
+
40  }
+
41 }
+
42 
+
43 #endif
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
void initialize_variable(var &variable, const var &value)
Initialize variable to value.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/int__step_8hpp.html b/doc/api/html/int__step_8hpp.html new file mode 100644 index 00000000000..d12205aa822 --- /dev/null +++ b/doc/api/html/int__step_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/int_step.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
int_step.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
unsigned int stan::math::int_step (const T y)
 The integer step, or Heaviside, function. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/int__step_8hpp_source.html b/doc/api/html/int__step_8hpp_source.html new file mode 100644 index 00000000000..85b3f4b5ea7 --- /dev/null +++ b/doc/api/html/int__step_8hpp_source.html @@ -0,0 +1,122 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/int_step.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
int_step.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_INT_STEP_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_INT_STEP_HPP
+
3 
+
4 namespace stan {
+
5  namespace math {
+
24  template <typename T>
+
25  unsigned int int_step(const T y) {
+
26  return y > 0;
+
27  }
+
28  }
+
29 }
+
30 
+
31 #endif
+
unsigned int int_step(const T y)
The integer step, or Heaviside, function.
Definition: int_step.hpp:25
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/integrate__ode_8hpp.html b/doc/api/html/integrate__ode_8hpp.html new file mode 100644 index 00000000000..e4a6154907e --- /dev/null +++ b/doc/api/html/integrate__ode_8hpp.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/functor/integrate_ode.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
integrate_ode.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename F , typename T1 , typename T2 >
std::vector< std::vector
+< typename stan::return_type
+< T1, T2 >::type > > 
stan::math::integrate_ode (const F &f, const std::vector< T1 > y0, const double t0, const std::vector< double > &ts, const std::vector< T2 > &theta, const std::vector< double > &x, const std::vector< int > &x_int, std::ostream *msgs)
 Return the solutions for the specified system of ordinary differential equations given the specified initial state, initial times, times of desired solution, and parameters and data, writing error and warning messages to the specified stream. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/integrate__ode_8hpp_source.html b/doc/api/html/integrate__ode_8hpp_source.html new file mode 100644 index 00000000000..4040ac1f720 --- /dev/null +++ b/doc/api/html/integrate__ode_8hpp_source.html @@ -0,0 +1,213 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/functor/integrate_ode.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
integrate_ode.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_ARR_FUNCTOR_INTEGRATE_ODE_HPP
+
2 #define STAN_MATH_PRIM_ARR_FUNCTOR_INTEGRATE_ODE_HPP
+
3 
+ + + + + + + + +
12 #include <boost/numeric/odeint.hpp>
+
13 #include <ostream>
+
14 #include <vector>
+
15 
+
16 namespace stan {
+
17 
+
18  namespace math {
+
19 
+
58  template <typename F, typename T1, typename T2>
+
59  std::vector<std::vector<typename stan::return_type<T1, T2>::type> >
+
60  integrate_ode(const F& f,
+
61  const std::vector<T1> y0,
+
62  const double t0,
+
63  const std::vector<double>& ts,
+
64  const std::vector<T2>& theta,
+
65  const std::vector<double>& x,
+
66  const std::vector<int>& x_int,
+
67  std::ostream* msgs) {
+
68  using boost::numeric::odeint::integrate_times;
+
69  using boost::numeric::odeint::make_dense_output;
+
70  using boost::numeric::odeint::runge_kutta_dopri5;
+
71 
+
72  stan::math::check_finite("integrate_ode", "initial state", y0);
+
73  stan::math::check_finite("integrate_ode", "initial time", t0);
+
74  stan::math::check_finite("integrate_ode", "times", ts);
+
75  stan::math::check_finite("integrate_ode", "parameter vector", theta);
+
76  stan::math::check_finite("integrate_ode", "continuous data", x);
+
77 
+
78  stan::math::check_nonzero_size("integrate_ode", "times", ts);
+
79  stan::math::check_nonzero_size("integrate_ode", "initial state", y0);
+
80  stan::math::check_ordered("integrate_ode", "times", ts);
+
81  stan::math::check_less("integrate_ode", "initial time", t0, ts[0]);
+
82 
+
83  const double absolute_tolerance = 1e-6;
+
84  const double relative_tolerance = 1e-6;
+
85  const double step_size = 0.1;
+
86 
+
87  // creates basic or coupled system by template specializations
+ +
89  coupled_system(f, y0, theta, x, x_int, msgs);
+
90 
+
91  // first time in the vector must be time of initial state
+
92  std::vector<double> ts_vec(ts.size() + 1);
+
93  ts_vec[0] = t0;
+
94  for (size_t n = 0; n < ts.size(); n++)
+
95  ts_vec[n+1] = ts[n];
+
96 
+
97  std::vector<std::vector<double> > y_coupled(ts_vec.size());
+
98  coupled_ode_observer observer(y_coupled);
+
99 
+
100  // the coupled system creates the coupled initial state
+
101  std::vector<double> initial_coupled_state
+
102  = coupled_system.initial_state();
+
103 
+
104  integrate_times(make_dense_output(absolute_tolerance,
+
105  relative_tolerance,
+
106  runge_kutta_dopri5<std::vector<double>,
+
107  double,
+
108  std::vector<double>,
+
109  double>() ),
+
110  coupled_system,
+
111  initial_coupled_state,
+
112  boost::begin(ts_vec), boost::end(ts_vec),
+
113  step_size,
+
114  observer);
+
115 
+
116  // remove the first state corresponding to the initial value
+
117  y_coupled.erase(y_coupled.begin());
+
118 
+
119  // the coupled system also encapsulates the decoupling operation
+
120  return coupled_system.decouple_states(y_coupled);
+
121  }
+
122 
+
123  }
+
124 
+
125 }
+
126 
+
127 #endif
+
bool check_less(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is strictly less than high.
Definition: check_less.hpp:81
+ + + +
bool check_nonzero_size(const char *function, const char *name, const T_y &y)
Return true if the specified matrix/vector is of non-zero size.
+
Observer for the coupled states.
+
bool check_ordered(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &y)
Return true if the specified vector is sorted into strictly increasing order.
+
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
Base template class for a coupled ordinary differential equation system, which adds sensitivities to ...
+ +
std::vector< std::vector< typename stan::return_type< T1, T2 >::type > > integrate_ode(const F &f, const std::vector< T1 > y0, const double t0, const std::vector< double > &ts, const std::vector< T2 > &theta, const std::vector< double > &x, const std::vector< int > &x_int, std::ostream *msgs)
Return the solutions for the specified system of ordinary differential equations given the specified ...
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inv__chi__square__ccdf__log_8hpp.html b/doc/api/html/inv__chi__square__ccdf__log_8hpp.html new file mode 100644 index 00000000000..3cb9dcb3307 --- /dev/null +++ b/doc/api/html/inv__chi__square__ccdf__log_8hpp.html @@ -0,0 +1,150 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/inv_chi_square_ccdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv_chi_square_ccdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_dof >
return_type< T_y, T_dof >::type stan::math::inv_chi_square_ccdf_log (const T_y &y, const T_dof &nu)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inv__chi__square__ccdf__log_8hpp_source.html b/doc/api/html/inv__chi__square__ccdf__log_8hpp_source.html new file mode 100644 index 00000000000..f5b86b8b482 --- /dev/null +++ b/doc/api/html/inv__chi__square__ccdf__log_8hpp_source.html @@ -0,0 +1,282 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/inv_chi_square_ccdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv_chi_square_ccdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_INV_CHI_SQUARE_CCDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_INV_CHI_SQUARE_CCDF_LOG_HPP
+
3 
+
4 #include <boost/random/chi_squared_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + + +
24 #include <cmath>
+
25 #include <limits>
+
26 
+
27 namespace stan {
+
28 
+
29  namespace math {
+
30 
+
31  template <typename T_y, typename T_dof>
+
32  typename return_type<T_y, T_dof>::type
+
33  inv_chi_square_ccdf_log(const T_y& y, const T_dof& nu) {
+ +
35  T_partials_return;
+
36 
+
37  // Size checks
+
38  if ( !( stan::length(y) && stan::length(nu) ) ) return 0.0;
+
39 
+
40  // Error checks
+
41  static const char* function("stan::math::inv_chi_square_ccdf_log");
+
42 
+ + + + +
47  using boost::math::tools::promote_args;
+ +
49  using std::exp;
+
50 
+
51  T_partials_return P(0.0);
+
52 
+
53  check_positive_finite(function, "Degrees of freedom parameter", nu);
+
54  check_not_nan(function, "Random variable", y);
+
55  check_nonnegative(function, "Random variable", y);
+
56  check_consistent_sizes(function,
+
57  "Random variable", y,
+
58  "Degrees of freedom parameter", nu);
+
59 
+
60  // Wrap arguments in vectors
+
61  VectorView<const T_y> y_vec(y);
+
62  VectorView<const T_dof> nu_vec(nu);
+
63  size_t N = max_size(y, nu);
+
64 
+
65  OperandsAndPartials<T_y, T_dof> operands_and_partials(y, nu);
+
66 
+
67  // Explicit return for extreme values
+
68  // The gradients are technically ill-defined, but treated as zero
+
69 
+
70  for (size_t i = 0; i < stan::length(y); i++)
+
71  if (value_of(y_vec[i]) == 0)
+
72  return operands_and_partials.to_var(0.0, y, nu);
+
73 
+
74  // Compute ccdf_log and its gradients
+
75  using stan::math::gamma_q;
+
76  using stan::math::digamma;
+
77  using boost::math::tgamma;
+
78  using std::exp;
+
79  using std::pow;
+
80  using std::log;
+
81 
+
82  // Cache a few expensive function calls if nu is a parameter
+ +
84  T_partials_return, T_dof> gamma_vec(stan::length(nu));
+ +
86  T_partials_return, T_dof> digamma_vec(stan::length(nu));
+
87 
+ +
89  for (size_t i = 0; i < stan::length(nu); i++) {
+
90  const T_partials_return nu_dbl = value_of(nu_vec[i]);
+
91  gamma_vec[i] = tgamma(0.5 * nu_dbl);
+
92  digamma_vec[i] = digamma(0.5 * nu_dbl);
+
93  }
+
94  }
+
95 
+
96  // Compute vectorized ccdf_log and gradient
+
97  for (size_t n = 0; n < N; n++) {
+
98  // Explicit results for extreme values
+
99  // The gradients are technically ill-defined, but treated as zero
+
100  if (value_of(y_vec[n]) == std::numeric_limits<double>::infinity()) {
+
101  return operands_and_partials.to_var(stan::math::negative_infinity(),
+
102  y, nu);
+
103  }
+
104 
+
105  // Pull out values
+
106  const T_partials_return y_dbl = value_of(y_vec[n]);
+
107  const T_partials_return y_inv_dbl = 1.0 / y_dbl;
+
108  const T_partials_return nu_dbl = value_of(nu_vec[n]);
+
109 
+
110  // Compute
+
111  const T_partials_return Pn = 1.0 - gamma_q(0.5 * nu_dbl, 0.5
+
112  * y_inv_dbl);
+
113 
+
114  P += log(Pn);
+
115 
+ +
117  operands_and_partials.d_x1[n] -= 0.5 * y_inv_dbl * y_inv_dbl
+
118  * exp(-0.5*y_inv_dbl) * pow(0.5*y_inv_dbl, 0.5*nu_dbl-1)
+
119  / tgamma(0.5*nu_dbl) / Pn;
+ +
121  operands_and_partials.d_x2[n]
+
122  -= 0.5 * stan::math::grad_reg_inc_gamma(0.5 * nu_dbl,
+
123  0.5 * y_inv_dbl,
+
124  gamma_vec[n],
+
125  digamma_vec[n]) / Pn;
+
126  }
+
127 
+
128  return operands_and_partials.to_var(P, y, nu);
+
129  }
+
130  }
+
131 }
+
132 #endif
+ +
return_type< T_y, T_dof >::type inv_chi_square_ccdf_log(const T_y &y, const T_dof &nu)
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
T grad_reg_inc_gamma(T a, T z, T g, T dig, T precision=1e-6)
+ + + + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + + + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
fvar< T > tgamma(const fvar< T > &x)
Definition: tgamma.hpp:15
+
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+
fvar< T > gamma_q(const fvar< T > &x1, const fvar< T > &x2)
Definition: gamma_q.hpp:15
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inv__chi__square__cdf_8hpp.html b/doc/api/html/inv__chi__square__cdf_8hpp.html new file mode 100644 index 00000000000..329479a39f7 --- /dev/null +++ b/doc/api/html/inv__chi__square__cdf_8hpp.html @@ -0,0 +1,150 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/inv_chi_square_cdf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv_chi_square_cdf.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_dof >
return_type< T_y, T_dof >::type stan::math::inv_chi_square_cdf (const T_y &y, const T_dof &nu)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inv__chi__square__cdf_8hpp_source.html b/doc/api/html/inv__chi__square__cdf_8hpp_source.html new file mode 100644 index 00000000000..19278e9974c --- /dev/null +++ b/doc/api/html/inv__chi__square__cdf_8hpp_source.html @@ -0,0 +1,286 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/inv_chi_square_cdf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv_chi_square_cdf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_INV_CHI_SQUARE_CDF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_INV_CHI_SQUARE_CDF_HPP
+
3 
+
4 #include <boost/random/chi_squared_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + + +
24 #include <cmath>
+
25 #include <limits>
+
26 
+
27 namespace stan {
+
28 
+
29  namespace math {
+
30 
+
31  template <typename T_y, typename T_dof>
+
32  typename return_type<T_y, T_dof>::type
+
33  inv_chi_square_cdf(const T_y& y, const T_dof& nu) {
+ +
35  T_partials_return;
+
36 
+
37  // Size checks
+
38  if ( !( stan::length(y) && stan::length(nu) ) ) return 1.0;
+
39 
+
40  // Error checks
+
41  static const char* function("stan::math::inv_chi_square_cdf");
+
42 
+ + + + +
47  using boost::math::tools::promote_args;
+ +
49  using std::exp;
+
50 
+
51  T_partials_return P(1.0);
+
52 
+
53  check_positive_finite(function, "Degrees of freedom parameter", nu);
+
54  check_not_nan(function, "Random variable", y);
+
55  check_nonnegative(function, "Random variable", y);
+
56  check_consistent_sizes(function,
+
57  "Random variable", y,
+
58  "Degrees of freedom parameter", nu);
+
59 
+
60  // Wrap arguments in vectors
+
61  VectorView<const T_y> y_vec(y);
+
62  VectorView<const T_dof> nu_vec(nu);
+
63  size_t N = max_size(y, nu);
+
64 
+
65  OperandsAndPartials<T_y, T_dof> operands_and_partials(y, nu);
+
66 
+
67  // Explicit return for extreme values
+
68  // The gradients are technically ill-defined, but treated as zero
+
69 
+
70  for (size_t i = 0; i < stan::length(y); i++)
+
71  if (value_of(y_vec[i]) == 0)
+
72  return operands_and_partials.to_var(0.0, y, nu);
+
73 
+
74  // Compute CDF and its gradients
+
75  using stan::math::gamma_q;
+
76  using stan::math::digamma;
+
77  using boost::math::tgamma;
+
78  using std::exp;
+
79  using std::pow;
+
80 
+
81  // Cache a few expensive function calls if nu is a parameter
+ +
83  T_partials_return, T_dof> gamma_vec(stan::length(nu));
+ +
85  T_partials_return, T_dof> digamma_vec(stan::length(nu));
+
86 
+ +
88  for (size_t i = 0; i < stan::length(nu); i++) {
+
89  const T_partials_return nu_dbl = value_of(nu_vec[i]);
+
90  gamma_vec[i] = tgamma(0.5 * nu_dbl);
+
91  digamma_vec[i] = digamma(0.5 * nu_dbl);
+
92  }
+
93  }
+
94 
+
95  // Compute vectorized CDF and gradient
+
96  for (size_t n = 0; n < N; n++) {
+
97  // Explicit results for extreme values
+
98  // The gradients are technically ill-defined, but treated as zero
+
99  if (value_of(y_vec[n]) == std::numeric_limits<double>::infinity()) {
+
100  continue;
+
101  }
+
102 
+
103  // Pull out values
+
104  const T_partials_return y_dbl = value_of(y_vec[n]);
+
105  const T_partials_return y_inv_dbl = 1.0 / y_dbl;
+
106  const T_partials_return nu_dbl = value_of(nu_vec[n]);
+
107 
+
108  // Compute
+
109  const T_partials_return Pn = gamma_q(0.5 * nu_dbl, 0.5 * y_inv_dbl);
+
110 
+
111  P *= Pn;
+
112 
+ +
114  operands_and_partials.d_x1[n] += 0.5 * y_inv_dbl * y_inv_dbl
+
115  * exp(-0.5*y_inv_dbl) * pow(0.5*y_inv_dbl, 0.5*nu_dbl-1)
+
116  / tgamma(0.5*nu_dbl) / Pn;
+ +
118  operands_and_partials.d_x2[n]
+
119  += 0.5 * stan::math::grad_reg_inc_gamma(0.5 * nu_dbl,
+
120  0.5 * y_inv_dbl,
+
121  gamma_vec[n],
+
122  digamma_vec[n]) / Pn;
+
123  }
+
124 
+ +
126  for (size_t n = 0; n < stan::length(y); ++n)
+
127  operands_and_partials.d_x1[n] *= P;
+
128  }
+ +
130  for (size_t n = 0; n < stan::length(nu); ++n)
+
131  operands_and_partials.d_x2[n] *= P;
+
132  }
+
133 
+
134  return operands_and_partials.to_var(P, y, nu);
+
135  }
+
136  }
+
137 }
+
138 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
return_type< T_y, T_dof >::type inv_chi_square_cdf(const T_y &y, const T_dof &nu)
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
T grad_reg_inc_gamma(T a, T z, T g, T dig, T precision=1e-6)
+ + + + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + + + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
fvar< T > tgamma(const fvar< T > &x)
Definition: tgamma.hpp:15
+
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+
fvar< T > gamma_q(const fvar< T > &x1, const fvar< T > &x2)
Definition: gamma_q.hpp:15
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inv__chi__square__cdf__log_8hpp.html b/doc/api/html/inv__chi__square__cdf__log_8hpp.html new file mode 100644 index 00000000000..6992153762f --- /dev/null +++ b/doc/api/html/inv__chi__square__cdf__log_8hpp.html @@ -0,0 +1,150 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/inv_chi_square_cdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv_chi_square_cdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_dof >
return_type< T_y, T_dof >::type stan::math::inv_chi_square_cdf_log (const T_y &y, const T_dof &nu)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inv__chi__square__cdf__log_8hpp_source.html b/doc/api/html/inv__chi__square__cdf__log_8hpp_source.html new file mode 100644 index 00000000000..5234aa495fc --- /dev/null +++ b/doc/api/html/inv__chi__square__cdf__log_8hpp_source.html @@ -0,0 +1,281 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/inv_chi_square_cdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv_chi_square_cdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_INV_CHI_SQUARE_CDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_INV_CHI_SQUARE_CDF_LOG_HPP
+
3 
+ + + + + + + + + + + + + + + + + + +
22 #include <boost/random/chi_squared_distribution.hpp>
+
23 #include <boost/random/variate_generator.hpp>
+
24 #include <cmath>
+
25 #include <limits>
+
26 
+
27 namespace stan {
+
28 
+
29  namespace math {
+
30 
+
31  template <typename T_y, typename T_dof>
+
32  typename return_type<T_y, T_dof>::type
+
33  inv_chi_square_cdf_log(const T_y& y, const T_dof& nu) {
+ +
35  T_partials_return;
+
36 
+
37  // Size checks
+
38  if ( !( stan::length(y) && stan::length(nu) ) ) return 0.0;
+
39 
+
40  // Error checks
+
41  static const char* function("stan::math::inv_chi_square_cdf_log");
+
42 
+ + + + +
47  using boost::math::tools::promote_args;
+ +
49  using std::exp;
+
50 
+
51  T_partials_return P(0.0);
+
52 
+
53  check_positive_finite(function, "Degrees of freedom parameter", nu);
+
54  check_not_nan(function, "Random variable", y);
+
55  check_nonnegative(function, "Random variable", y);
+
56  check_consistent_sizes(function,
+
57  "Random variable", y,
+
58  "Degrees of freedom parameter", nu);
+
59 
+
60  // Wrap arguments in vectors
+
61  VectorView<const T_y> y_vec(y);
+
62  VectorView<const T_dof> nu_vec(nu);
+
63  size_t N = max_size(y, nu);
+
64 
+
65  OperandsAndPartials<T_y, T_dof> operands_and_partials(y, nu);
+
66 
+
67  // Explicit return for extreme values
+
68  // The gradients are technically ill-defined, but treated as zero
+
69 
+
70  for (size_t i = 0; i < stan::length(y); i++)
+
71  if (value_of(y_vec[i]) == 0)
+
72  return operands_and_partials.to_var(stan::math::negative_infinity(),
+
73  y, nu);
+
74 
+
75  // Compute cdf_log and its gradients
+
76  using stan::math::gamma_q;
+
77  using stan::math::digamma;
+
78  using boost::math::tgamma;
+
79  using std::exp;
+
80  using std::pow;
+
81  using std::log;
+
82 
+
83  // Cache a few expensive function calls if nu is a parameter
+ +
85  T_partials_return, T_dof> gamma_vec(stan::length(nu));
+ +
87  T_partials_return, T_dof> digamma_vec(stan::length(nu));
+
88 
+ +
90  for (size_t i = 0; i < stan::length(nu); i++) {
+
91  const T_partials_return nu_dbl = value_of(nu_vec[i]);
+
92  gamma_vec[i] = tgamma(0.5 * nu_dbl);
+
93  digamma_vec[i] = digamma(0.5 * nu_dbl);
+
94  }
+
95  }
+
96 
+
97  // Compute vectorized cdf_log and gradient
+
98  for (size_t n = 0; n < N; n++) {
+
99  // Explicit results for extreme values
+
100  // The gradients are technically ill-defined, but treated as zero
+
101  if (value_of(y_vec[n]) == std::numeric_limits<double>::infinity()) {
+
102  continue;
+
103  }
+
104 
+
105  // Pull out values
+
106  const T_partials_return y_dbl = value_of(y_vec[n]);
+
107  const T_partials_return y_inv_dbl = 1.0 / y_dbl;
+
108  const T_partials_return nu_dbl = value_of(nu_vec[n]);
+
109 
+
110  // Compute
+
111  const T_partials_return Pn = gamma_q(0.5 * nu_dbl, 0.5 * y_inv_dbl);
+
112 
+
113  P += log(Pn);
+
114 
+ +
116  operands_and_partials.d_x1[n] += 0.5 * y_inv_dbl * y_inv_dbl
+
117  * exp(-0.5*y_inv_dbl) * pow(0.5*y_inv_dbl, 0.5*nu_dbl-1)
+
118  / tgamma(0.5*nu_dbl) / Pn;
+ +
120  operands_and_partials.d_x2[n]
+
121  += 0.5 * stan::math::grad_reg_inc_gamma(0.5 * nu_dbl,
+
122  0.5 * y_inv_dbl,
+
123  gamma_vec[n],
+
124  digamma_vec[n]) / Pn;
+
125  }
+
126 
+
127  return operands_and_partials.to_var(P, y, nu);
+
128  }
+
129  }
+
130 }
+
131 #endif
+ +
return_type< T_y, T_dof >::type inv_chi_square_cdf_log(const T_y &y, const T_dof &nu)
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
T grad_reg_inc_gamma(T a, T z, T g, T dig, T precision=1e-6)
+ + + + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + + + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
fvar< T > tgamma(const fvar< T > &x)
Definition: tgamma.hpp:15
+
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+
fvar< T > gamma_q(const fvar< T > &x1, const fvar< T > &x2)
Definition: gamma_q.hpp:15
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inv__chi__square__log_8hpp.html b/doc/api/html/inv__chi__square__log_8hpp.html new file mode 100644 index 00000000000..9a3fcbec4d4 --- /dev/null +++ b/doc/api/html/inv__chi__square__log_8hpp.html @@ -0,0 +1,153 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/inv_chi_square_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv_chi_square_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_dof >
return_type< T_y, T_dof >::type stan::math::inv_chi_square_log (const T_y &y, const T_dof &nu)
 The log of an inverse chi-squared density for y with the specified degrees of freedom parameter. More...
 
template<typename T_y , typename T_dof >
return_type< T_y, T_dof >::type stan::math::inv_chi_square_log (const T_y &y, const T_dof &nu)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inv__chi__square__log_8hpp_source.html b/doc/api/html/inv__chi__square__log_8hpp_source.html new file mode 100644 index 00000000000..932a234f951 --- /dev/null +++ b/doc/api/html/inv__chi__square__log_8hpp_source.html @@ -0,0 +1,277 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/inv_chi_square_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv_chi_square_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_INV_CHI_SQUARE_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_INV_CHI_SQUARE_LOG_HPP
+
3 
+
4 #include <boost/random/chi_squared_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + + +
24 #include <cmath>
+
25 
+
26 namespace stan {
+
27 
+
28  namespace math {
+
29 
+
49  template <bool propto,
+
50  typename T_y, typename T_dof>
+
51  typename return_type<T_y, T_dof>::type
+
52  inv_chi_square_log(const T_y& y, const T_dof& nu) {
+
53  static const char* function("stan::math::inv_chi_square_log");
+ +
55  T_partials_return;
+
56 
+
57  // check if any vectors are zero length
+
58  if (!(stan::length(y)
+
59  && stan::length(nu)))
+
60  return 0.0;
+
61 
+ + + + +
66 
+
67  T_partials_return logp(0.0);
+
68  check_positive_finite(function, "Degrees of freedom parameter", nu);
+
69  check_not_nan(function, "Random variable", y);
+
70  check_consistent_sizes(function,
+
71  "Random variable", y,
+
72  "Degrees of freedom parameter", nu);
+
73 
+
74 
+
75  // set up template expressions wrapping scalars into vector views
+
76  VectorView<const T_y> y_vec(y);
+
77  VectorView<const T_dof> nu_vec(nu);
+
78  size_t N = max_size(y, nu);
+
79 
+
80  for (size_t n = 0; n < length(y); n++)
+
81  if (value_of(y_vec[n]) <= 0)
+
82  return LOG_ZERO;
+
83 
+ +
85  using boost::math::lgamma;
+ +
87  using std::log;
+
88 
+ +
90  T_partials_return, T_y> log_y(length(y));
+
91  for (size_t i = 0; i < length(y); i++)
+ +
93  log_y[i] = log(value_of(y_vec[i]));
+
94 
+ +
96  T_partials_return, T_y> inv_y(length(y));
+
97  for (size_t i = 0; i < length(y); i++)
+ +
99  inv_y[i] = 1.0 / value_of(y_vec[i]);
+
100 
+ +
102  T_partials_return, T_dof> lgamma_half_nu(length(nu));
+ +
104  T_partials_return, T_dof>
+
105  digamma_half_nu_over_two(length(nu));
+
106  for (size_t i = 0; i < length(nu); i++) {
+
107  T_partials_return half_nu = 0.5 * value_of(nu_vec[i]);
+ +
109  lgamma_half_nu[i] = lgamma(half_nu);
+ +
111  digamma_half_nu_over_two[i] = digamma(half_nu) * 0.5;
+
112  }
+
113 
+
114  OperandsAndPartials<T_y, T_dof> operands_and_partials(y, nu);
+
115  for (size_t n = 0; n < N; n++) {
+
116  const T_partials_return nu_dbl = value_of(nu_vec[n]);
+
117  const T_partials_return half_nu = 0.5 * nu_dbl;
+
118 
+ +
120  logp += nu_dbl * NEG_LOG_TWO_OVER_TWO - lgamma_half_nu[n];
+ +
122  logp -= (half_nu+1.0) * log_y[n];
+ +
124  logp -= 0.5 * inv_y[n];
+
125 
+ +
127  operands_and_partials.d_x1[n]
+
128  += -(half_nu+1.0) * inv_y[n] + 0.5 * inv_y[n] * inv_y[n];
+
129  }
+ +
131  operands_and_partials.d_x2[n]
+
132  += NEG_LOG_TWO_OVER_TWO - digamma_half_nu_over_two[n]
+
133  - 0.5*log_y[n];
+
134  }
+
135  }
+
136  return operands_and_partials.to_var(logp, y, nu);
+
137  }
+
138 
+
139  template <typename T_y, typename T_dof>
+
140  inline
+ +
142  inv_chi_square_log(const T_y& y, const T_dof& nu) {
+
143  return inv_chi_square_log<false>(y, nu);
+
144  }
+
145  }
+
146 }
+
147 #endif
+ +
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
const double LOG_ZERO
Definition: constants.hpp:175
+ +
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ +
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + +
fvar< T > multiply_log(const fvar< T > &x1, const fvar< T > &x2)
+ + +
return_type< T_y, T_dof >::type inv_chi_square_log(const T_y &y, const T_dof &nu)
The log of an inverse chi-squared density for y with the specified degrees of freedom parameter...
+ +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
const double NEG_LOG_TWO_OVER_TWO
Definition: constants.hpp:191
+ + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inv__chi__square__rng_8hpp.html b/doc/api/html/inv__chi__square__rng_8hpp.html new file mode 100644 index 00000000000..4f156aa7a50 --- /dev/null +++ b/doc/api/html/inv__chi__square__rng_8hpp.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/inv_chi_square_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv_chi_square_rng.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
double stan::math::inv_chi_square_rng (const double nu, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inv__chi__square__rng_8hpp_source.html b/doc/api/html/inv__chi__square__rng_8hpp_source.html new file mode 100644 index 00000000000..d1273a0e51c --- /dev/null +++ b/doc/api/html/inv__chi__square__rng_8hpp_source.html @@ -0,0 +1,177 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/inv_chi_square_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv_chi_square_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_INV_CHI_SQUARE_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_INV_CHI_SQUARE_RNG_HPP
+
3 
+
4 #include <boost/random/chi_squared_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + + +
24 
+
25 namespace stan {
+
26 
+
27  namespace math {
+
28 
+
29  template <class RNG>
+
30  inline double
+
31  inv_chi_square_rng(const double nu,
+
32  RNG& rng) {
+
33  using boost::variate_generator;
+
34  using boost::random::chi_squared_distribution;
+
35 
+
36  static const char* function("stan::math::inv_chi_square_rng");
+
37 
+ +
39 
+
40  check_positive_finite(function, "Degrees of freedom parameter", nu);
+
41 
+
42  variate_generator<RNG&, chi_squared_distribution<> >
+
43  chi_square_rng(rng, chi_squared_distribution<>(nu));
+
44  return 1 / chi_square_rng();
+
45  }
+
46  }
+
47 }
+
48 #endif
+ +
double chi_square_rng(const double nu, RNG &rng)
+ + +
double inv_chi_square_rng(const double nu, RNG &rng)
+ + + + + + + + + + + + + + + +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inv__gamma__ccdf__log_8hpp.html b/doc/api/html/inv__gamma__ccdf__log_8hpp.html new file mode 100644 index 00000000000..ad90c5917b3 --- /dev/null +++ b/doc/api/html/inv__gamma__ccdf__log_8hpp.html @@ -0,0 +1,153 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/inv_gamma_ccdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv_gamma_ccdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
stan::math::inv_gamma_ccdf_log (const T_y &y, const T_shape &alpha, const T_scale &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inv__gamma__ccdf__log_8hpp_source.html b/doc/api/html/inv__gamma__ccdf__log_8hpp_source.html new file mode 100644 index 00000000000..fd144105c79 --- /dev/null +++ b/doc/api/html/inv__gamma__ccdf__log_8hpp_source.html @@ -0,0 +1,305 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/inv_gamma_ccdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv_gamma_ccdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_INV_GAMMA_CCDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_INV_GAMMA_CCDF_LOG_HPP
+
3 
+
4 #include <boost/random/gamma_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + + + + +
26 #include <cmath>
+
27 #include <limits>
+
28 
+
29 namespace stan {
+
30 
+
31  namespace math {
+
32 
+
33  template <typename T_y, typename T_shape, typename T_scale>
+
34  typename return_type<T_y, T_shape, T_scale>::type
+
35  inv_gamma_ccdf_log(const T_y& y, const T_shape& alpha,
+
36  const T_scale& beta) {
+ +
38  T_partials_return;
+
39 
+
40  // Size checks
+
41  if (!(stan::length(y) && stan::length(alpha) && stan::length(beta)))
+
42  return 0.0;
+
43 
+
44  // Error checks
+
45  static const char* function("stan::math::inv_gamma_ccdf_log");
+
46 
+ + + + + + + +
54  using boost::math::tools::promote_args;
+
55  using std::exp;
+
56 
+
57  T_partials_return P(0.0);
+
58 
+
59  check_positive_finite(function, "Shape parameter", alpha);
+
60  check_positive_finite(function, "Scale parameter", beta);
+
61  check_not_nan(function, "Random variable", y);
+
62  check_nonnegative(function, "Random variable", y);
+
63  check_consistent_sizes(function,
+
64  "Random variable", y,
+
65  "Shape parameter", alpha,
+
66  "Scale Parameter", beta);
+
67 
+
68  // Wrap arguments in vectors
+
69  VectorView<const T_y> y_vec(y);
+
70  VectorView<const T_shape> alpha_vec(alpha);
+
71  VectorView<const T_scale> beta_vec(beta);
+
72  size_t N = max_size(y, alpha, beta);
+
73 
+ +
75  operands_and_partials(y, alpha, beta);
+
76 
+
77  // Explicit return for extreme values
+
78  // The gradients are technically ill-defined, but treated as zero
+
79 
+
80  for (size_t i = 0; i < stan::length(y); i++) {
+
81  if (value_of(y_vec[i]) == 0)
+
82  return operands_and_partials.to_var(0.0, y, alpha, beta);
+
83  }
+
84 
+
85  // Compute ccdf_log and its gradients
+
86  using stan::math::gamma_q;
+
87  using stan::math::digamma;
+
88  using boost::math::tgamma;
+
89  using std::exp;
+
90  using std::pow;
+
91  using std::log;
+
92 
+
93  // Cache a few expensive function calls if nu is a parameter
+ +
95  T_partials_return, T_shape> gamma_vec(stan::length(alpha));
+ +
97  T_partials_return, T_shape>
+
98  digamma_vec(stan::length(alpha));
+
99 
+ +
101  for (size_t i = 0; i < stan::length(alpha); i++) {
+
102  const T_partials_return alpha_dbl = value_of(alpha_vec[i]);
+
103  gamma_vec[i] = tgamma(alpha_dbl);
+
104  digamma_vec[i] = digamma(alpha_dbl);
+
105  }
+
106  }
+
107 
+
108  // Compute vectorized ccdf_log and gradient
+
109  for (size_t n = 0; n < N; n++) {
+
110  // Explicit results for extreme values
+
111  // The gradients are technically ill-defined, but treated as zero
+
112  if (value_of(y_vec[n]) == std::numeric_limits<double>::infinity())
+
113  return operands_and_partials.to_var(stan::math::negative_infinity(),
+
114  y, alpha, beta);
+
115 
+
116  // Pull out values
+
117  const T_partials_return y_dbl = value_of(y_vec[n]);
+
118  const T_partials_return y_inv_dbl = 1.0 / y_dbl;
+
119  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
120  const T_partials_return beta_dbl = value_of(beta_vec[n]);
+
121 
+
122  // Compute
+
123  const T_partials_return Pn = 1.0 - gamma_q(alpha_dbl, beta_dbl
+
124  * y_inv_dbl);
+
125 
+
126  P += log(Pn);
+
127 
+ +
129  operands_and_partials.d_x1[n] -= beta_dbl * y_inv_dbl * y_inv_dbl
+
130  * exp(-beta_dbl * y_inv_dbl) * pow(beta_dbl * y_inv_dbl,
+
131  alpha_dbl-1)
+
132  / tgamma(alpha_dbl) / Pn;
+ +
134  operands_and_partials.d_x2[n]
+
135  -= stan::math::grad_reg_inc_gamma(alpha_dbl, beta_dbl
+
136  * y_inv_dbl, gamma_vec[n],
+
137  digamma_vec[n]) / Pn;
+ +
139  operands_and_partials.d_x3[n] += y_inv_dbl
+
140  * exp(-beta_dbl * y_inv_dbl)
+
141  * pow(beta_dbl * y_inv_dbl, alpha_dbl-1)
+
142  / tgamma(alpha_dbl) / Pn;
+
143  }
+
144 
+
145  return operands_and_partials.to_var(P, y, alpha, beta);
+
146  }
+
147  }
+
148 }
+
149 
+
150 #endif
+ + +
bool check_greater_or_equal(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is greater or equal than low.
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
T grad_reg_inc_gamma(T a, T z, T g, T dig, T precision=1e-6)
+ + + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
return_type< T_y, T_shape, T_scale >::type inv_gamma_ccdf_log(const T_y &y, const T_shape &alpha, const T_scale &beta)
+ +
bool check_less_or_equal(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is less or equal to high.
+ + + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ + +
fvar< T > tgamma(const fvar< T > &x)
Definition: tgamma.hpp:15
+
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+
fvar< T > gamma_q(const fvar< T > &x1, const fvar< T > &x2)
Definition: gamma_q.hpp:15
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inv__gamma__cdf_8hpp.html b/doc/api/html/inv__gamma__cdf_8hpp.html new file mode 100644 index 00000000000..8ef2ee7b136 --- /dev/null +++ b/doc/api/html/inv__gamma__cdf_8hpp.html @@ -0,0 +1,154 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/inv_gamma_cdf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv_gamma_cdf.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
stan::math::inv_gamma_cdf (const T_y &y, const T_shape &alpha, const T_scale &beta)
 The CDF of an inverse gamma density for y with the specified shape and scale parameters. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inv__gamma__cdf_8hpp_source.html b/doc/api/html/inv__gamma__cdf_8hpp_source.html new file mode 100644 index 00000000000..b5b8f824e9b --- /dev/null +++ b/doc/api/html/inv__gamma__cdf_8hpp_source.html @@ -0,0 +1,313 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/inv_gamma_cdf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv_gamma_cdf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_INV_GAMMA_CDF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_INV_GAMMA_CDF_HPP
+
3 
+
4 #include <boost/random/gamma_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + + + + +
26 #include <cmath>
+
27 #include <limits>
+
28 
+
29 namespace stan {
+
30 
+
31  namespace math {
+
32 
+
49  template <typename T_y, typename T_shape, typename T_scale>
+
50  typename return_type<T_y, T_shape, T_scale>::type
+
51  inv_gamma_cdf(const T_y& y, const T_shape& alpha, const T_scale& beta) {
+ +
53  T_partials_return;
+
54 
+
55  // Size checks
+
56  if (!(stan::length(y) && stan::length(alpha) && stan::length(beta)))
+
57  return 1.0;
+
58 
+
59  // Error checks
+
60  static const char* function("stan::math::inv_gamma_cdf");
+
61 
+ + + + + + + +
69  using boost::math::tools::promote_args;
+
70  using std::exp;
+
71 
+
72  T_partials_return P(1.0);
+
73 
+
74  check_positive_finite(function, "Shape parameter", alpha);
+
75  check_positive_finite(function, "Scale parameter", beta);
+
76  check_not_nan(function, "Random variable", y);
+
77  check_nonnegative(function, "Random variable", y);
+
78  check_consistent_sizes(function,
+
79  "Random variable", y,
+
80  "Shape parameter", alpha,
+
81  "Scale Parameter", beta);
+
82 
+
83  // Wrap arguments in vectors
+
84  VectorView<const T_y> y_vec(y);
+
85  VectorView<const T_shape> alpha_vec(alpha);
+
86  VectorView<const T_scale> beta_vec(beta);
+
87  size_t N = max_size(y, alpha, beta);
+
88 
+ +
90  operands_and_partials(y, alpha, beta);
+
91 
+
92  // Explicit return for extreme values
+
93  // The gradients are technically ill-defined, but treated as zero
+
94 
+
95  for (size_t i = 0; i < stan::length(y); i++) {
+
96  if (value_of(y_vec[i]) == 0)
+
97  return operands_and_partials.to_var(0.0, y, alpha, beta);
+
98  }
+
99 
+
100  // Compute CDF and its gradients
+
101  using stan::math::gamma_q;
+
102  using stan::math::digamma;
+
103  using boost::math::tgamma;
+
104  using std::exp;
+
105  using std::pow;
+
106 
+
107  // Cache a few expensive function calls if nu is a parameter
+ +
109  T_partials_return, T_shape>
+
110  gamma_vec(stan::length(alpha));
+ +
112  T_partials_return, T_shape>
+
113  digamma_vec(stan::length(alpha));
+
114 
+ +
116  for (size_t i = 0; i < stan::length(alpha); i++) {
+
117  const T_partials_return alpha_dbl = value_of(alpha_vec[i]);
+
118  gamma_vec[i] = tgamma(alpha_dbl);
+
119  digamma_vec[i] = digamma(alpha_dbl);
+
120  }
+
121  }
+
122 
+
123  // Compute vectorized CDF and gradient
+
124  for (size_t n = 0; n < N; n++) {
+
125  // Explicit results for extreme values
+
126  // The gradients are technically ill-defined, but treated as zero
+
127  if (value_of(y_vec[n]) == std::numeric_limits<double>::infinity())
+
128  continue;
+
129 
+
130  // Pull out values
+
131  const T_partials_return y_dbl = value_of(y_vec[n]);
+
132  const T_partials_return y_inv_dbl = 1.0 / y_dbl;
+
133  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
134  const T_partials_return beta_dbl = value_of(beta_vec[n]);
+
135 
+
136  // Compute
+
137  const T_partials_return Pn = gamma_q(alpha_dbl, beta_dbl * y_inv_dbl);
+
138 
+
139  P *= Pn;
+
140 
+ +
142  operands_and_partials.d_x1[n] += beta_dbl * y_inv_dbl * y_inv_dbl
+
143  * exp(-beta_dbl * y_inv_dbl) * pow(beta_dbl
+
144  * y_inv_dbl, alpha_dbl-1)
+
145  / tgamma(alpha_dbl) / Pn;
+ +
147  operands_and_partials.d_x2[n]
+
148  += stan::math::grad_reg_inc_gamma(alpha_dbl, beta_dbl
+
149  * y_inv_dbl, gamma_vec[n],
+
150  digamma_vec[n]) / Pn;
+ +
152  operands_and_partials.d_x3[n] += - y_inv_dbl
+
153  * exp(-beta_dbl * y_inv_dbl)
+
154  * pow(beta_dbl * y_inv_dbl, alpha_dbl-1)
+
155  / tgamma(alpha_dbl) / Pn;
+
156  }
+
157 
+ +
159  for (size_t n = 0; n < stan::length(y); ++n)
+
160  operands_and_partials.d_x1[n] *= P;
+
161  }
+ +
163  for (size_t n = 0; n < stan::length(alpha); ++n)
+
164  operands_and_partials.d_x2[n] *= P;
+
165  }
+ +
167  for (size_t n = 0; n < stan::length(beta); ++n)
+
168  operands_and_partials.d_x3[n] *= P;
+
169  }
+
170 
+
171  return operands_and_partials.to_var(P, y, alpha, beta);
+
172  }
+
173  }
+
174 }
+
175 
+
176 #endif
+ + +
bool check_greater_or_equal(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is greater or equal than low.
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
T grad_reg_inc_gamma(T a, T z, T g, T dig, T precision=1e-6)
+ + + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + +
bool check_less_or_equal(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is less or equal to high.
+ + + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ + +
fvar< T > tgamma(const fvar< T > &x)
Definition: tgamma.hpp:15
+
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+
fvar< T > gamma_q(const fvar< T > &x1, const fvar< T > &x2)
Definition: gamma_q.hpp:15
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
return_type< T_y, T_shape, T_scale >::type inv_gamma_cdf(const T_y &y, const T_shape &alpha, const T_scale &beta)
The CDF of an inverse gamma density for y with the specified shape and scale parameters.
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inv__gamma__cdf__log_8hpp.html b/doc/api/html/inv__gamma__cdf__log_8hpp.html new file mode 100644 index 00000000000..c3eb3402b8c --- /dev/null +++ b/doc/api/html/inv__gamma__cdf__log_8hpp.html @@ -0,0 +1,153 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/inv_gamma_cdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv_gamma_cdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
stan::math::inv_gamma_cdf_log (const T_y &y, const T_shape &alpha, const T_scale &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inv__gamma__cdf__log_8hpp_source.html b/doc/api/html/inv__gamma__cdf__log_8hpp_source.html new file mode 100644 index 00000000000..d25d9856e15 --- /dev/null +++ b/doc/api/html/inv__gamma__cdf__log_8hpp_source.html @@ -0,0 +1,304 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/inv_gamma_cdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv_gamma_cdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_INV_GAMMA_CDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_INV_GAMMA_CDF_LOG_HPP
+
3 
+
4 #include <boost/random/gamma_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + + + + +
26 #include <cmath>
+
27 #include <limits>
+
28 
+
29 namespace stan {
+
30 
+
31  namespace math {
+
32 
+
33  template <typename T_y, typename T_shape, typename T_scale>
+
34  typename return_type<T_y, T_shape, T_scale>::type
+
35  inv_gamma_cdf_log(const T_y& y, const T_shape& alpha,
+
36  const T_scale& beta) {
+ +
38  T_partials_return;
+
39 
+
40  // Size checks
+
41  if (!(stan::length(y) && stan::length(alpha) && stan::length(beta)))
+
42  return 0.0;
+
43 
+
44  // Error checks
+
45  static const char* function("stan::math::inv_gamma_cdf_log");
+
46 
+ + + + + + + +
54  using boost::math::tools::promote_args;
+
55  using std::exp;
+
56 
+
57  T_partials_return P(0.0);
+
58 
+
59  check_positive_finite(function, "Shape parameter", alpha);
+
60  check_positive_finite(function, "Scale parameter", beta);
+
61  check_not_nan(function, "Random variable", y);
+
62  check_nonnegative(function, "Random variable", y);
+
63  check_consistent_sizes(function,
+
64  "Random variable", y,
+
65  "Shape parameter", alpha,
+
66  "Scale Parameter", beta);
+
67 
+
68  // Wrap arguments in vectors
+
69  VectorView<const T_y> y_vec(y);
+
70  VectorView<const T_shape> alpha_vec(alpha);
+
71  VectorView<const T_scale> beta_vec(beta);
+
72  size_t N = max_size(y, alpha, beta);
+
73 
+ +
75  operands_and_partials(y, alpha, beta);
+
76 
+
77  // Explicit return for extreme values
+
78  // The gradients are technically ill-defined, but treated as zero
+
79 
+
80  for (size_t i = 0; i < stan::length(y); i++) {
+
81  if (value_of(y_vec[i]) == 0)
+
82  return operands_and_partials.to_var(stan::math::negative_infinity(),
+
83  y, alpha, beta);
+
84  }
+
85 
+
86  // Compute cdf_log and its gradients
+
87  using stan::math::gamma_q;
+
88  using stan::math::digamma;
+
89  using boost::math::tgamma;
+
90  using std::exp;
+
91  using std::pow;
+
92  using std::log;
+
93 
+
94  // Cache a few expensive function calls if nu is a parameter
+ +
96  T_partials_return, T_shape> gamma_vec(stan::length(alpha));
+ +
98  T_partials_return, T_shape>
+
99  digamma_vec(stan::length(alpha));
+
100 
+ +
102  for (size_t i = 0; i < stan::length(alpha); i++) {
+
103  const T_partials_return alpha_dbl = value_of(alpha_vec[i]);
+
104  gamma_vec[i] = tgamma(alpha_dbl);
+
105  digamma_vec[i] = digamma(alpha_dbl);
+
106  }
+
107  }
+
108 
+
109  // Compute vectorized cdf_log and gradient
+
110  for (size_t n = 0; n < N; n++) {
+
111  // Explicit results for extreme values
+
112  // The gradients are technically ill-defined, but treated as zero
+
113  if (value_of(y_vec[n]) == std::numeric_limits<double>::infinity())
+
114  continue;
+
115 
+
116  // Pull out values
+
117  const T_partials_return y_dbl = value_of(y_vec[n]);
+
118  const T_partials_return y_inv_dbl = 1.0 / y_dbl;
+
119  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
120  const T_partials_return beta_dbl = value_of(beta_vec[n]);
+
121 
+
122  // Compute
+
123  const T_partials_return Pn = gamma_q(alpha_dbl, beta_dbl * y_inv_dbl);
+
124 
+
125  P += log(Pn);
+
126 
+ +
128  operands_and_partials.d_x1[n] += beta_dbl * y_inv_dbl * y_inv_dbl
+
129  * exp(-beta_dbl * y_inv_dbl) * pow(beta_dbl * y_inv_dbl,
+
130  alpha_dbl-1)
+
131  / tgamma(alpha_dbl) / Pn;
+ +
133  operands_and_partials.d_x2[n]
+
134  += stan::math::grad_reg_inc_gamma(alpha_dbl, beta_dbl
+
135  * y_inv_dbl, gamma_vec[n],
+
136  digamma_vec[n]) / Pn;
+ +
138  operands_and_partials.d_x3[n] += - y_inv_dbl
+
139  * exp(-beta_dbl * y_inv_dbl)
+
140  * pow(beta_dbl * y_inv_dbl, alpha_dbl-1)
+
141  / tgamma(alpha_dbl) / Pn;
+
142  }
+
143 
+
144  return operands_and_partials.to_var(P, y, alpha, beta);
+
145  }
+
146  }
+
147 }
+
148 
+
149 #endif
+ + +
bool check_greater_or_equal(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is greater or equal than low.
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
T grad_reg_inc_gamma(T a, T z, T g, T dig, T precision=1e-6)
+ + + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
return_type< T_y, T_shape, T_scale >::type inv_gamma_cdf_log(const T_y &y, const T_shape &alpha, const T_scale &beta)
+ +
bool check_less_or_equal(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is less or equal to high.
+ + + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ + +
fvar< T > tgamma(const fvar< T > &x)
Definition: tgamma.hpp:15
+
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+
fvar< T > gamma_q(const fvar< T > &x1, const fvar< T > &x2)
Definition: gamma_q.hpp:15
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inv__gamma__log_8hpp.html b/doc/api/html/inv__gamma__log_8hpp.html new file mode 100644 index 00000000000..1000e9f7789 --- /dev/null +++ b/doc/api/html/inv__gamma__log_8hpp.html @@ -0,0 +1,157 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/inv_gamma_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv_gamma_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
stan::math::inv_gamma_log (const T_y &y, const T_shape &alpha, const T_scale &beta)
 The log of an inverse gamma density for y with the specified shape and scale parameters. More...
 
template<typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
stan::math::inv_gamma_log (const T_y &y, const T_shape &alpha, const T_scale &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inv__gamma__log_8hpp_source.html b/doc/api/html/inv__gamma__log_8hpp_source.html new file mode 100644 index 00000000000..c95356bb51c --- /dev/null +++ b/doc/api/html/inv__gamma__log_8hpp_source.html @@ -0,0 +1,305 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/inv_gamma_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv_gamma_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_INV_GAMMA_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_INV_GAMMA_LOG_HPP
+
3 
+
4 #include <boost/random/gamma_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + + + + +
26 #include <cmath>
+
27 
+
28 namespace stan {
+
29 
+
30  namespace math {
+
31 
+
48  template <bool propto,
+
49  typename T_y, typename T_shape, typename T_scale>
+
50  typename return_type<T_y, T_shape, T_scale>::type
+
51  inv_gamma_log(const T_y& y, const T_shape& alpha, const T_scale& beta) {
+
52  static const char* function("stan::math::inv_gamma_log");
+ +
54  T_partials_return;
+
55 
+ + + +
59  using boost::math::tools::promote_args;
+ + +
62 
+
63  // check if any vectors are zero length
+
64  if (!(stan::length(y)
+
65  && stan::length(alpha)
+
66  && stan::length(beta)))
+
67  return 0.0;
+
68 
+
69  // set up return value accumulator
+
70  T_partials_return logp(0.0);
+
71 
+
72  check_not_nan(function, "Random variable", y);
+
73  check_positive_finite(function, "Shape parameter", alpha);
+
74  check_positive_finite(function, "Scale parameter", beta);
+
75  check_consistent_sizes(function,
+
76  "Random variable", y,
+
77  "Shape parameter", alpha,
+
78  "Scale parameter", beta);
+
79 
+
80  // check if no variables are involved and prop-to
+ +
82  return 0.0;
+
83 
+
84  // set up template expressions wrapping scalars into vector views
+
85  VectorView<const T_y> y_vec(y);
+
86  VectorView<const T_shape> alpha_vec(alpha);
+
87  VectorView<const T_scale> beta_vec(beta);
+
88 
+
89  for (size_t n = 0; n < length(y); n++) {
+
90  const T_partials_return y_dbl = value_of(y_vec[n]);
+
91  if (y_dbl <= 0)
+
92  return LOG_ZERO;
+
93  }
+
94 
+
95  size_t N = max_size(y, alpha, beta);
+ +
97  operands_and_partials(y, alpha, beta);
+
98 
+
99  using stan::math::lgamma;
+
100  using stan::math::digamma;
+
101  using std::log;
+
102 
+ +
104  T_partials_return, T_y> log_y(length(y));
+ +
106  T_partials_return, T_y> inv_y(length(y));
+
107  for (size_t n = 0; n < length(y); n++) {
+ +
109  if (value_of(y_vec[n]) > 0)
+
110  log_y[n] = log(value_of(y_vec[n]));
+ +
112  inv_y[n] = 1.0 / value_of(y_vec[n]);
+
113  }
+
114 
+ +
116  T_partials_return, T_shape> lgamma_alpha(length(alpha));
+ +
118  T_partials_return, T_shape> digamma_alpha(length(alpha));
+
119  for (size_t n = 0; n < length(alpha); n++) {
+ +
121  lgamma_alpha[n] = lgamma(value_of(alpha_vec[n]));
+ +
123  digamma_alpha[n] = digamma(value_of(alpha_vec[n]));
+
124  }
+
125 
+ +
127  T_partials_return, T_scale> log_beta(length(beta));
+ +
129  for (size_t n = 0; n < length(beta); n++)
+
130  log_beta[n] = log(value_of(beta_vec[n]));
+
131  }
+
132 
+
133  for (size_t n = 0; n < N; n++) {
+
134  // pull out values of arguments
+
135  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
136  const T_partials_return beta_dbl = value_of(beta_vec[n]);
+
137 
+ +
139  logp -= lgamma_alpha[n];
+ +
141  logp += alpha_dbl * log_beta[n];
+ +
143  logp -= (alpha_dbl+1.0) * log_y[n];
+ +
145  logp -= beta_dbl * inv_y[n];
+
146 
+
147  // gradients
+
148  if (!is_constant<typename is_vector<T_y>::type>::value)
+
149  operands_and_partials.d_x1[n]
+
150  += -(alpha_dbl+1) * inv_y[n] + beta_dbl * inv_y[n] * inv_y[n];
+
151  if (!is_constant<typename is_vector<T_shape>::type>::value)
+
152  operands_and_partials.d_x2[n]
+
153  += -digamma_alpha[n] + log_beta[n] - log_y[n];
+
154  if (!is_constant<typename is_vector<T_scale>::type>::value)
+
155  operands_and_partials.d_x3[n] += alpha_dbl / beta_dbl - inv_y[n];
+
156  }
+
157  return operands_and_partials.to_var(logp, y, alpha, beta);
+
158  }
+
159 
+
160  template <typename T_y, typename T_shape, typename T_scale>
+
161  inline
+ +
163  inv_gamma_log(const T_y& y, const T_shape& alpha, const T_scale& beta) {
+
164  return inv_gamma_log<false>(y, alpha, beta);
+
165  }
+
166  }
+
167 }
+
168 
+
169 #endif
+ +
Metaprogramming struct to detect whether a given type is constant in the mathematical sense (not the ...
Definition: is_constant.hpp:22
+ +
return_type< T_y, T_shape, T_scale >::type inv_gamma_log(const T_y &y, const T_shape &alpha, const T_scale &beta)
The log of an inverse gamma density for y with the specified shape and scale parameters.
+
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ + +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
const double LOG_ZERO
Definition: constants.hpp:175
+ +
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ +
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ +
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + + + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ + + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inv__gamma__rng_8hpp.html b/doc/api/html/inv__gamma__rng_8hpp.html new file mode 100644 index 00000000000..3188fb9ddc4 --- /dev/null +++ b/doc/api/html/inv__gamma__rng_8hpp.html @@ -0,0 +1,150 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/inv_gamma_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv_gamma_rng.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
double stan::math::inv_gamma_rng (const double alpha, const double beta, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inv__gamma__rng_8hpp_source.html b/doc/api/html/inv__gamma__rng_8hpp_source.html new file mode 100644 index 00000000000..1f1e1a85c7e --- /dev/null +++ b/doc/api/html/inv__gamma__rng_8hpp_source.html @@ -0,0 +1,184 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/inv_gamma_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv_gamma_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_INV_GAMMA_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_INV_GAMMA_RNG_HPP
+
3 
+
4 #include <boost/random/gamma_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + + + + +
26 
+
27 namespace stan {
+
28 
+
29  namespace math {
+
30 
+
31  template <class RNG>
+
32  inline double
+
33  inv_gamma_rng(const double alpha,
+
34  const double beta,
+
35  RNG& rng) {
+
36  using boost::variate_generator;
+
37  using boost::random::gamma_distribution;
+
38 
+
39  static const char* function("stan::math::inv_gamma_rng");
+
40 
+ +
42 
+
43  check_positive_finite(function, "Shape parameter", alpha);
+
44  check_positive_finite(function, "Scale parameter", beta);
+
45 
+
46  variate_generator<RNG&, gamma_distribution<> >
+
47  gamma_rng(rng, gamma_distribution<>(alpha, 1 / beta));
+
48  return 1 / gamma_rng();
+
49  }
+
50  }
+
51 }
+
52 
+
53 #endif
+ +
double gamma_rng(const double alpha, const double beta, RNG &rng)
Definition: gamma_rng.hpp:33
+ + + + + + + + + +
double inv_gamma_rng(const double alpha, const double beta, RNG &rng)
+ + + + + + + + + + +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inv__wishart__log_8hpp.html b/doc/api/html/inv__wishart__log_8hpp.html new file mode 100644 index 00000000000..0c49966570b --- /dev/null +++ b/doc/api/html/inv__wishart__log_8hpp.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/inv_wishart_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv_wishart_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_dof , typename T_scale >
boost::math::tools::promote_args
+< T_y, T_dof, T_scale >::type 
stan::math::inv_wishart_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &W, const T_dof &nu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &S)
 The log of the Inverse-Wishart density for the given W, degrees of freedom, and scale matrix. More...
 
template<typename T_y , typename T_dof , typename T_scale >
boost::math::tools::promote_args
+< T_y, T_dof, T_scale >::type 
stan::math::inv_wishart_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &W, const T_dof &nu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &S)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inv__wishart__log_8hpp_source.html b/doc/api/html/inv__wishart__log_8hpp_source.html new file mode 100644 index 00000000000..4e0d8458e7d --- /dev/null +++ b/doc/api/html/inv__wishart__log_8hpp_source.html @@ -0,0 +1,239 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/inv_wishart_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv_wishart_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_INV_WISHART_LOG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_INV_WISHART_LOG_HPP
+
3 
+ + + + + + + +
11 
+ + + + +
16 
+
17 namespace stan {
+
18  namespace math {
+
19  // InvWishart(Sigma|n, Omega) [W, S symmetric, non-neg, definite;
+
20  // W.dims() = S.dims();
+
21  // n > S.rows() - 1]
+
49  template <bool propto,
+
50  typename T_y, typename T_dof, typename T_scale>
+
51  typename boost::math::tools::promote_args<T_y, T_dof, T_scale>::type
+
52  inv_wishart_log(const Eigen::Matrix<T_y, Eigen::Dynamic, Eigen::Dynamic>& W,
+
53  const T_dof& nu,
+
54  const Eigen::Matrix
+
55  <T_scale, Eigen::Dynamic, Eigen::Dynamic>& S) {
+
56  static const char* function("stan::math::inv_wishart_log");
+
57 
+
58  using boost::math::tools::promote_args;
+
59  using Eigen::Dynamic;
+
60  using Eigen::Matrix;
+ + + + +
65 
+ +
67  = S.rows();
+
68  typename promote_args<T_y, T_dof, T_scale>::type lp(0.0);
+
69 
+
70  check_greater(function, "Degrees of freedom parameter", nu, k-1);
+
71  check_square(function, "random variable", W);
+
72  check_square(function, "scale parameter", S);
+
73  check_size_match(function,
+
74  "Rows of random variable", W.rows(),
+
75  "columns of scale parameter", S.rows());
+
76 
+
77  // FIXME: domain checks
+
78 
+
79  using stan::math::lmgamma;
+ + +
82  using stan::math::trace;
+ + +
85 
+ +
87  check_ldlt_factor(function, "LDLT_Factor of random variable", ldlt_W);
+ +
89  check_ldlt_factor(function, "LDLT_Factor of scale parameter", ldlt_S);
+
90 
+ +
92  lp -= lmgamma(k, 0.5 * nu);
+ +
94  lp += 0.5 * nu * log_determinant_ldlt(ldlt_S);
+
95  }
+ +
97  lp -= 0.5 * (nu + k + 1.0) * log_determinant_ldlt(ldlt_W);
+
98  }
+ +
100  // L = crossprod(mdivide_left_tri_low(L));
+
101  // Eigen::Matrix<T_y, Eigen::Dynamic, 1> W_inv_vec = Eigen::Map<
+
102  // const Eigen::Matrix<T_y, Eigen::Dynamic, Eigen::Dynamic> >(
+
103  // &L(0), L.size(), 1);
+
104  // Eigen::Matrix<T_scale, Eigen::Dynamic, 1> S_vec = Eigen::Map<
+
105  // const Eigen::Matrix<T_scale, Eigen::Dynamic, Eigen::Dynamic> >(
+
106  // &S(0), S.size(), 1);
+
107  // lp -= 0.5 * dot_product(S_vec, W_inv_vec); // trace(S * W^-1)
+
108  Eigen::Matrix<typename promote_args<T_y, T_scale>::type,
+
109  Eigen::Dynamic, Eigen::Dynamic>
+
110  Winv_S(mdivide_left_ldlt
+
111  (ldlt_W,
+
112  static_cast<Eigen::Matrix
+
113  <T_scale, Eigen::Dynamic, Eigen::Dynamic> >
+
114  (S.template selfadjointView<Eigen::Lower>())));
+
115  lp -= 0.5*trace(Winv_S);
+
116  }
+ +
118  lp += nu * k * NEG_LOG_TWO_OVER_TWO;
+
119  return lp;
+
120  }
+
121 
+
122  template <typename T_y, typename T_dof, typename T_scale>
+
123  inline
+
124  typename boost::math::tools::promote_args<T_y, T_dof, T_scale>::type
+
125  inv_wishart_log(const Eigen::Matrix<T_y, Eigen::Dynamic, Eigen::Dynamic>& W,
+
126  const T_dof& nu,
+
127  const Eigen::Matrix
+
128  <T_scale, Eigen::Dynamic, Eigen::Dynamic>& S) {
+
129  return inv_wishart_log<false>(W, nu, S);
+
130  }
+
131 
+
132  }
+
133 }
+
134 #endif
+ +
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ + + + +
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:19
+ + +
Eigen::Matrix< fvar< T2 >, R1, C2 > mdivide_left_ldlt(const stan::math::LDLT_factor< double, R1, C1 > &A, const Eigen::Matrix< fvar< T2 >, R2, C2 > &b)
Returns the solution of the system Ax=b given an LDLT_factor of A.
+
boost::math::tools::promote_args< T_y, T_dof, T_scale >::type inv_wishart_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &W, const T_dof &nu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &S)
The log of the Inverse-Wishart density for the given W, degrees of freedom, and scale matrix...
+
bool check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Return true if the provided sizes match.
+ + +
T trace(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
Returns the trace of the specified matrix.
Definition: trace.hpp:20
+
const double NEG_LOG_TWO_OVER_TWO
Definition: constants.hpp:191
+ +
T log_determinant_ldlt(stan::math::LDLT_factor< T, R, C > &A)
+
fvar< typename stan::return_type< T, int >::type > lmgamma(int x1, const fvar< T > &x2)
Definition: lmgamma.hpp:16
+
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+
bool check_greater(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is strictly greater than low.
+
bool check_ldlt_factor(const char *function, const char *name, stan::math::LDLT_factor< T, R, C > &A)
Return true if the argument is a valid stan::math::LDLT_factor.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inv__wishart__rng_8hpp.html b/doc/api/html/inv__wishart__rng_8hpp.html new file mode 100644 index 00000000000..cfdda95b3fa --- /dev/null +++ b/doc/api/html/inv__wishart__rng_8hpp.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/inv_wishart_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv_wishart_rng.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
Eigen::Matrix< double,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::inv_wishart_rng (const double nu, const Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > &S, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inv__wishart__rng_8hpp_source.html b/doc/api/html/inv__wishart__rng_8hpp_source.html new file mode 100644 index 00000000000..1849ba005bc --- /dev/null +++ b/doc/api/html/inv__wishart__rng_8hpp_source.html @@ -0,0 +1,167 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/inv_wishart_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv_wishart_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_INV_WISHART_RNG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_INV_WISHART_RNG_HPP
+
3 
+ + + + + + + +
11 
+ + + +
15 
+
16 namespace stan {
+
17  namespace math {
+
18 
+
19  template <class RNG>
+
20  inline Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>
+
21  inv_wishart_rng(const double nu,
+
22  const Eigen::Matrix
+
23  <double, Eigen::Dynamic, Eigen::Dynamic>& S,
+
24  RNG& rng) {
+
25  static const char* function("stan::math::inv_wishart_rng");
+
26 
+ + +
29  using Eigen::MatrixXd;
+ +
31 
+
32  typename index_type<MatrixXd>::type k = S.rows();
+
33 
+
34  check_greater(function, "Degrees of freedom parameter", nu, k-1);
+
35  check_square(function, "scale parameter", S);
+
36 
+
37  MatrixXd S_inv = MatrixXd::Identity(k, k);
+
38  S_inv = S.ldlt().solve(S_inv);
+
39 
+
40  return wishart_rng(nu, S_inv, rng).inverse();
+
41  }
+
42  }
+
43 }
+
44 #endif
+ + + + + +
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:19
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > wishart_rng(const double nu, const Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > &S, RNG &rng)
Definition: wishart_rng.hpp:29
+ + +
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > inv_wishart_rng(const double nu, const Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > &S, RNG &rng)
+ +
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+
bool check_greater(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is strictly greater than low.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/invalid__argument_8hpp.html b/doc/api/html/invalid__argument_8hpp.html new file mode 100644 index 00000000000..8521fa54065 --- /dev/null +++ b/doc/api/html/invalid__argument_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/invalid_argument.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
invalid_argument.hpp File Reference
+
+
+
#include <typeinfo>
+#include <string>
+#include <sstream>
+#include <stdexcept>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
void stan::math::invalid_argument (const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
 Throw an invalid_argument exception with a consistently formatted message. More...
 
template<typename T >
void stan::math::invalid_argument (const char *function, const char *name, const T &y, const char *msg1)
 Throw an invalid_argument exception with a consistently formatted message. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/invalid__argument_8hpp_source.html b/doc/api/html/invalid__argument_8hpp_source.html new file mode 100644 index 00000000000..d037fa1bfbb --- /dev/null +++ b/doc/api/html/invalid__argument_8hpp_source.html @@ -0,0 +1,149 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/invalid_argument.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
invalid_argument.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_ERR_INVALID_ARGUMENT_HPP
+
2 #define STAN_MATH_PRIM_SCAL_ERR_INVALID_ARGUMENT_HPP
+
3 
+
4 #include <typeinfo>
+
5 #include <string>
+
6 #include <sstream>
+
7 #include <stdexcept>
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
30  template <typename T>
+
31  inline void invalid_argument(const char* function,
+
32  const char* name,
+
33  const T& y,
+
34  const char* msg1,
+
35  const char* msg2) {
+
36  std::ostringstream message;
+
37 
+
38  message << function << ": "
+
39  << name << " "
+
40  << msg1
+
41  << y
+
42  << msg2;
+
43 
+
44  throw std::invalid_argument(message.str());
+
45  }
+
46 
+
65  template <typename T>
+
66  inline void invalid_argument(const char* function,
+
67  const char* name,
+
68  const T& y,
+
69  const char* msg1) {
+
70  invalid_argument(function, name, y, msg1, "");
+
71  }
+
72 
+
73  }
+
74 }
+
75 #endif
+
void invalid_argument(const char *function, const char *name, const T &y, const char *msg1)
Throw an invalid_argument exception with a consistently formatted message.
+
void invalid_argument(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw an invalid_argument exception with a consistently formatted message.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/invalid__argument__vec_8hpp.html b/doc/api/html/invalid__argument__vec_8hpp.html new file mode 100644 index 00000000000..599949a1ded --- /dev/null +++ b/doc/api/html/invalid__argument__vec_8hpp.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/invalid_argument_vec.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
invalid_argument_vec.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
void stan::math::invalid_argument_vec (const char *function, const char *name, const T &y, const size_t i, const char *msg1, const char *msg2)
 Throw an invalid argument exception with a consistently formatted message. More...
 
template<typename T >
void stan::math::invalid_argument_vec (const char *function, const char *name, const T &y, const size_t i, const char *msg)
 Throw an invalid argument exception with a consistently formatted message. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/invalid__argument__vec_8hpp_source.html b/doc/api/html/invalid__argument__vec_8hpp_source.html new file mode 100644 index 00000000000..0f0090f4f2c --- /dev/null +++ b/doc/api/html/invalid__argument__vec_8hpp_source.html @@ -0,0 +1,157 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/invalid_argument_vec.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
invalid_argument_vec.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_ERR_INVALID_ARGUMENT_VEC_HPP
+
2 #define STAN_MATH_PRIM_SCAL_ERR_INVALID_ARGUMENT_VEC_HPP
+
3 
+ + + + +
8 #include <sstream>
+
9 #include <string>
+
10 
+
11 namespace stan {
+
12 
+
13  namespace math {
+
14 
+
37  template <typename T>
+
38  inline void invalid_argument_vec(const char* function,
+
39  const char* name,
+
40  const T& y,
+
41  const size_t i,
+
42  const char* msg1,
+
43  const char* msg2) {
+
44  std::ostringstream vec_name_stream;
+
45  vec_name_stream << name
+
46  << "[" << stan::error_index::value + i << "]";
+
47  std::string vec_name(vec_name_stream.str());
+
48  invalid_argument(function, vec_name.c_str(),
+
49  stan::get(y, i), msg1, msg2);
+
50  }
+
51 
+
73  template <typename T>
+
74  inline void invalid_argument_vec(const char* function,
+
75  const char* name,
+
76  const T& y,
+
77  const size_t i,
+
78  const char* msg) {
+
79  invalid_argument_vec(function, name, y, i, msg, "");
+
80  }
+
81 
+
82  }
+
83 }
+
84 #endif
+ + + +
void invalid_argument(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw an invalid_argument exception with a consistently formatted message.
+
T get(const std::vector< T > &x, size_t n)
Definition: get.hpp:10
+ + +
void invalid_argument_vec(const char *function, const char *name, const T &y, const size_t i, const char *msg1, const char *msg2)
Throw an invalid argument exception with a consistently formatted message.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inverse__softmax_8hpp.html b/doc/api/html/inverse__softmax_8hpp.html new file mode 100644 index 00000000000..0f96438bfbd --- /dev/null +++ b/doc/api/html/inverse__softmax_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/inverse_softmax.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inverse_softmax.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+#include <boost/throw_exception.hpp>
+#include <stdexcept>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename Vector >
void stan::math::inverse_softmax (const Vector &simplex, Vector &y)
 Writes the inverse softmax of the simplex argument into the second argument. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inverse__softmax_8hpp_source.html b/doc/api/html/inverse__softmax_8hpp_source.html new file mode 100644 index 00000000000..5474d0ab46d --- /dev/null +++ b/doc/api/html/inverse__softmax_8hpp_source.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/inverse_softmax.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inverse_softmax.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_INVERSE_SOFTMAX_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_INVERSE_SOFTMAX_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+
5 #include <boost/throw_exception.hpp>
+
6 #include <stdexcept>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
33  template <typename Vector>
+
34  void inverse_softmax(const Vector& simplex, Vector& y) {
+
35  using std::log;
+
36  if (simplex.size() != y.size())
+
37  BOOST_THROW_EXCEPTION(std::invalid_argument
+
38  ("simplex.size() != y.size()"));
+
39  for (size_t i = 0; i < simplex.size(); ++i)
+
40  y[i] = log(simplex[i]);
+
41  }
+
42 
+
43  }
+
44 }
+
45 
+
46 #endif
+
void inverse_softmax(const Vector &simplex, Vector &y)
Writes the inverse softmax of the simplex argument into the second argument.
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
void invalid_argument(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw an invalid_argument exception with a consistently formatted message.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inverse__spd_8hpp.html b/doc/api/html/inverse__spd_8hpp.html new file mode 100644 index 00000000000..deb2b855e9d --- /dev/null +++ b/doc/api/html/inverse__spd_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/inverse_spd.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inverse_spd.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::inverse_spd (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
 Returns the inverse of the specified symmetric, pos/neg-definite matrix. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/inverse__spd_8hpp_source.html b/doc/api/html/inverse__spd_8hpp_source.html new file mode 100644 index 00000000000..67ae6b119c1 --- /dev/null +++ b/doc/api/html/inverse__spd_8hpp_source.html @@ -0,0 +1,155 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/inverse_spd.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inverse_spd.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_INVERSE_SPD_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_INVERSE_SPD_HPP
+
3 
+ + + +
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
16  template <typename T>
+
17  inline
+
18  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
19  inverse_spd(const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>& m) {
+
20  using Eigen::Dynamic;
+
21  using Eigen::LDLT;
+
22  using Eigen::Matrix;
+
23  stan::math::check_square("inverse_spd", "m", m);
+
24  stan::math::check_symmetric("inverse_spd", "m", m);
+
25  Matrix<T, Dynamic, Dynamic> mmt = T(0.5) * (m + m.transpose());
+
26  // mmt = T(0.5) * mmt;
+
27  LDLT<Matrix<T, Dynamic, Dynamic> > ldlt(mmt); // 0.5*(m+m.transpose()));
+
28  if (ldlt.info() != Eigen::Success)
+
29  throw std::domain_error("Error in inverse_spd, LDLT "
+
30  "factorization failed");
+
31  if (!ldlt.isPositive())
+
32  throw std::domain_error("Error in inverse_spd, matrix "
+
33  "not positive definite");
+
34  Matrix<T, Dynamic, 1> diag_ldlt = ldlt.vectorD();
+
35  for (int i = 0; i < diag_ldlt.size(); ++i)
+
36  if (diag_ldlt(i) <= 0)
+
37  throw std::domain_error("Error in inverse_spd, matrix "
+
38  "not positive definite");
+
39  return ldlt.solve(Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
40  ::Identity(m.rows(), m.cols()));
+
41  }
+
42 
+
43  }
+
44 }
+
45 #endif
+
bool check_symmetric(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is symmetric.
+ +
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ +
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > inverse_spd(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
Returns the inverse of the specified symmetric, pos/neg-definite matrix.
Definition: inverse_spd.hpp:19
+
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/is__constant_8hpp.html b/doc/api/html/is__constant_8hpp.html new file mode 100644 index 00000000000..24bcfa0c8d1 --- /dev/null +++ b/doc/api/html/is__constant_8hpp.html @@ -0,0 +1,126 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/is_constant.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
is_constant.hpp File Reference
+
+
+
#include <boost/type_traits/is_convertible.hpp>
+
+

Go to the source code of this file.

+ + + + + +

+Classes

struct  stan::is_constant< T >
 Metaprogramming struct to detect whether a given type is constant in the mathematical sense (not the C++ const sense). More...
 
+ + + +

+Namespaces

 stan
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/is__constant_8hpp_source.html b/doc/api/html/is__constant_8hpp_source.html new file mode 100644 index 00000000000..ea78a2f25cd --- /dev/null +++ b/doc/api/html/is__constant_8hpp_source.html @@ -0,0 +1,125 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/is_constant.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
is_constant.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_IS_CONSTANT_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_IS_CONSTANT_HPP
+
3 
+
4 #include <boost/type_traits/is_convertible.hpp>
+
5 
+
6 namespace stan {
+
7 
+
21  template <typename T>
+
22  struct is_constant {
+
27  enum { value = boost::is_convertible<T, double>::value };
+
28  };
+
29 
+
30 }
+
31 #endif
+
32 
+
Metaprogramming struct to detect whether a given type is constant in the mathematical sense (not the ...
Definition: is_constant.hpp:22
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/is__constant__struct_8hpp.html b/doc/api/html/is__constant__struct_8hpp.html new file mode 100644 index 00000000000..ccae6f4b35b --- /dev/null +++ b/doc/api/html/is__constant__struct_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/is_constant_struct.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
is_constant_struct.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + +

+Classes

struct  stan::is_constant_struct< T >
 Metaprogram to determine if a type has a base scalar type that can be assigned to type double. More...
 
struct  stan::is_constant_struct< std::vector< T > >
 
struct  stan::is_constant_struct< Eigen::Matrix< T, R, C > >
 
struct  stan::is_constant_struct< Eigen::Block< T > >
 
+ + + +

+Namespaces

 stan
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/is__constant__struct_8hpp_source.html b/doc/api/html/is__constant__struct_8hpp_source.html new file mode 100644 index 00000000000..99fa951910a --- /dev/null +++ b/doc/api/html/is__constant__struct_8hpp_source.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/is_constant_struct.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
is_constant_struct.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_IS_CONSTANT_STRUCT_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_IS_CONSTANT_STRUCT_HPP
+
3 
+ + +
6 #include <vector>
+
7 
+
8 
+
9 namespace stan {
+
10 
+
15  template <typename T>
+ + +
18  };
+
19 
+
20  template <typename T>
+
21  struct is_constant_struct<std::vector<T> > {
+ +
23  };
+
24 
+
25  template <typename T, int R, int C>
+
26  struct is_constant_struct<Eigen::Matrix<T, R, C> > {
+ +
28  };
+
29 
+
30  template <typename T>
+
31  struct is_constant_struct<Eigen::Block<T> > {
+ +
33  };
+
34 
+
35 }
+
36 #endif
+
37 
+
Metaprogramming struct to detect whether a given type is constant in the mathematical sense (not the ...
Definition: is_constant.hpp:22
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/is__var__or__arithmetic_8hpp.html b/doc/api/html/is__var__or__arithmetic_8hpp.html new file mode 100644 index 00000000000..d71a0f27e96 --- /dev/null +++ b/doc/api/html/is__var__or__arithmetic_8hpp.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/is_var_or_arithmetic.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
is_var_or_arithmetic.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/is_var.hpp>
+#include <stan/math/prim/scal/meta/scalar_type.hpp>
+#include <boost/type_traits/is_arithmetic.hpp>
+
+

Go to the source code of this file.

+ + + + +

+Classes

struct  stan::is_var_or_arithmetic< T1, T2, T3, T4, T5, T6 >
 
+ + + +

+Namespaces

 stan
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/is__var__or__arithmetic_8hpp_source.html b/doc/api/html/is__var__or__arithmetic_8hpp_source.html new file mode 100644 index 00000000000..57eb420efad --- /dev/null +++ b/doc/api/html/is__var__or__arithmetic_8hpp_source.html @@ -0,0 +1,150 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/is_var_or_arithmetic.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
is_var_or_arithmetic.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_IS_VAR_OR_ARITHMETIC_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_IS_VAR_OR_ARITHMETIC_HPP
+
3 
+ + +
6 #include <boost/type_traits/is_arithmetic.hpp>
+
7 
+
8 namespace stan {
+
9 
+
10  template <typename T1,
+
11  typename T2 = double,
+
12  typename T3 = double,
+
13  typename T4 = double,
+
14  typename T5 = double,
+
15  typename T6 = double>
+ +
17  enum {
+ + +
20  || boost::is_arithmetic<typename scalar_type<T1>::type>::value)
+
21  && (is_var<typename scalar_type<T2>::type>::value
+
22  || boost::is_arithmetic<typename scalar_type<T2>::type>::value)
+ +
24  || boost::is_arithmetic<typename scalar_type<T3>::type>::value)
+
25  && (is_var<typename scalar_type<T4>::type>::value
+
26  || boost::is_arithmetic<typename scalar_type<T4>::type>::value)
+ +
28  || boost::is_arithmetic<typename scalar_type<T5>::type>::value)
+
29  && (is_var<typename scalar_type<T6>::type>::value
+
30  || boost::is_arithmetic<typename scalar_type<T6>::type>::value)
+
31  };
+
32  };
+
33 
+
34 }
+
35 #endif
+
36 
+ + +
scalar_type_helper< is_vector< T >::value, T >::type type
Definition: scalar_type.hpp:38
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/jquery.js b/doc/api/html/jquery.js new file mode 100644 index 00000000000..6aa2e4c22a3 --- /dev/null +++ b/doc/api/html/jquery.js @@ -0,0 +1,39 @@ +/*! + * jQuery JavaScript Library v1.7.1 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Mon Nov 21 21:11:03 2011 -0500 + */ +(function(bb,L){var av=bb.document,bu=bb.navigator,bl=bb.location;var b=(function(){var bF=function(b0,b1){return new bF.fn.init(b0,b1,bD)},bU=bb.jQuery,bH=bb.$,bD,bY=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase()},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bY.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes}return bF.merge(this,b0)}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=av;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(bF.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context}return bF.makeArray(b0,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1)}else{bF.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return bF.each(this,b1,b0)},ready:function(b0){bF.bindReady();bC.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={}}if(b3===b4){b5=this;--b4}for(;b40){return}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready")}}},bindReady:function(){if(bC){return}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bb.addEventListener("load",bF.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bb.attachEvent("onload",bF.ready);var b0=false;try{b0=bb.frameElement==null}catch(b1){}if(av.documentElement.doScroll&&b0){bw()}}}},isFunction:function(b0){return bF.type(b0)==="function"},isArray:Array.isArray||function(b0){return bF.type(b0)==="array"},isWindow:function(b0){return b0&&typeof b0==="object"&&"setInterval" in b0},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=bF.trim(b0);if(bb.JSON&&bb.JSON.parse){return bb.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))()}bF.error("Invalid JSON: "+b0)},parseXML:function(b2){var b0,b1;try{if(bb.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=L}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bb.execScript||function(b1){bb["eval"].call(bb,b1)})(b0)}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break}}}else{for(;b40&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b21?aJ.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aJ.call(arguments,0):bG;bC.notifyWith(bE,bB)}}if(e>1){for(;bv
a";bI=bv.getElementsByTagName("*");bF=bv.getElementsByTagName("a")[0];if(!bI||!bI.length||!bF){return{}}bG=av.createElement("select");bx=bG.appendChild(av.createElement("option"));bE=bv.getElementsByTagName("input")[0];bJ={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bF.getAttribute("style")),hrefNormalized:(bF.getAttribute("href")==="/a"),opacity:/^0.55/.test(bF.style.opacity),cssFloat:!!bF.style.cssFloat,checkOn:(bE.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bE.checked=true;bJ.noCloneChecked=bE.cloneNode(true).checked;bG.disabled=true;bJ.optDisabled=!bx.disabled;try{delete bv.test}catch(bC){bJ.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bJ.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bE=av.createElement("input");bE.value="t";bE.setAttribute("type","radio");bJ.radioValue=bE.value==="t";bE.setAttribute("checked","checked");bv.appendChild(bE);bD=av.createDocumentFragment();bD.appendChild(bv.lastChild);bJ.checkClone=bD.cloneNode(true).cloneNode(true).lastChild.checked;bJ.appendChecked=bE.checked;bD.removeChild(bE);bD.appendChild(bv);bv.innerHTML="";if(bb.getComputedStyle){bA=av.createElement("div");bA.style.width="0";bA.style.marginRight="0";bv.style.width="2px";bv.appendChild(bA);bJ.reliableMarginRight=(parseInt((bb.getComputedStyle(bA,null)||{marginRight:0}).marginRight,10)||0)===0}if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bB="on"+by;bw=(bB in bv);if(!bw){bv.setAttribute(bB,"return;");bw=(typeof bv[bB]==="function")}bJ[by+"Bubbles"]=bw}}bD.removeChild(bv);bD=bG=bx=bA=bv=bE=null;b(function(){var bM,bU,bV,bT,bN,bO,bL,bS,bR,e,bP,bQ=av.getElementsByTagName("body")[0];if(!bQ){return}bL=1;bS="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";bR="visibility:hidden;border:0;";e="style='"+bS+"border:5px solid #000;padding:0;'";bP="
";bM=av.createElement("div");bM.style.cssText=bR+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bQ.insertBefore(bM,bQ.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="
t
";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bJ.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);bv.innerHTML="";bv.style.width=bv.style.paddingLeft="1px";b.boxModel=bJ.boxModel=bv.offsetWidth===2;if(typeof bv.style.zoom!=="undefined"){bv.style.display="inline";bv.style.zoom=1;bJ.inlineBlockNeedsLayout=(bv.offsetWidth===2);bv.style.display="";bv.innerHTML="
";bJ.shrinkWrapBlocks=(bv.offsetWidth!==2)}bv.style.cssText=bS+bR;bv.innerHTML=bP;bU=bv.firstChild;bV=bU.firstChild;bN=bU.nextSibling.firstChild.firstChild;bO={doesNotAddBorder:(bV.offsetTop!==5),doesAddBorderForTableAndCells:(bN.offsetTop===5)};bV.style.position="fixed";bV.style.top="20px";bO.fixedPosition=(bV.offsetTop===20||bV.offsetTop===15);bV.style.position=bV.style.top="";bU.style.overflow="hidden";bU.style.position="relative";bO.subtractsBorderForOverflowNotVisible=(bV.offsetTop===-5);bO.doesNotIncludeMarginInBodyOffset=(bQ.offsetTop!==bL);bQ.removeChild(bM);bv=bM=null;b.extend(bJ,bO)});return bJ})();var aS=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return}if(!bw){if(bF){bx[bE]=bw=++b.uuid}else{bw=bE}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv)}else{e[bw].data=b.extend(e[bw].data,bv)}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bB&&!bA[bv]){return bG.events}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)]}}else{bD=bA}return bD},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.nodeName.toLowerCase()]||b.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aU,""):bv==null?"":bv}return}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType; +if(!bA||bv===3||bv===8||bv===2){return}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB)}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aY:be)}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(bx,bz){var by,bA,bv,e,bw=0;if(bz&&bx.nodeType===1){bA=bz.toLowerCase().split(af);e=bA.length;for(;bw=0)}}})});var bd=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/\bhover(\.\S+)?\b/,aO=/^key/,bf=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1")};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return}if(bJ.handler){bv=bJ;bJ=bv.handler}if(!bJ.guid){bJ.guid=b.guid++}bK=bD.events;if(!bK){bD.events=bK={}}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L};bB.elem=bx}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI=0){bG=bG.slice(0,-1);bw=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true)}}return}bv.result=L;if(!bv.target){bv.target=bA}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bb,bI])}}for(bC=0;bCbA){bH.push({elem:this,matches:bz.slice(bA)})}for(bC=0;bC0?this.on(e,null,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aO.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bf.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}}); +/*! + * Sizzle CSS Selector Engine + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){var bH=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bC="sizcache"+(Math.random()+"").replace(".",""),bI=0,bL=Object.prototype.toString,bB=false,bA=true,bK=/\\/g,bO=/\r\n/g,bQ=/\W/;[0,0].sort(function(){bA=false;return 0});var by=function(bV,e,bY,bZ){bY=bY||[];e=e||av;var b1=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bV||typeof bV!=="string"){return bY}var bS,b3,b6,bR,b2,b5,b4,bX,bU=true,bT=by.isXML(e),bW=[],b0=bV;do{bH.exec("");bS=bH.exec(b0);if(bS){b0=bS[3];bW.push(bS[1]);if(bS[2]){bR=bS[3];break}}}while(bS);if(bW.length>1&&bD.exec(bV)){if(bW.length===2&&bE.relative[bW[0]]){b3=bM(bW[0]+bW[1],e,bZ)}else{b3=bE.relative[bW[0]]?[e]:by(bW.shift(),e);while(bW.length){bV=bW.shift();if(bE.relative[bV]){bV+=bW.shift()}b3=bM(bV,b3,bZ)}}}else{if(!bZ&&bW.length>1&&e.nodeType===9&&!bT&&bE.match.ID.test(bW[0])&&!bE.match.ID.test(bW[bW.length-1])){b2=by.find(bW.shift(),e,bT);e=b2.expr?by.filter(b2.expr,b2.set)[0]:b2.set[0]}if(e){b2=bZ?{expr:bW.pop(),set:bF(bZ)}:by.find(bW.pop(),bW.length===1&&(bW[0]==="~"||bW[0]==="+")&&e.parentNode?e.parentNode:e,bT);b3=b2.expr?by.filter(b2.expr,b2.set):b2.set;if(bW.length>0){b6=bF(b3)}else{bU=false}while(bW.length){b5=bW.pop();b4=b5;if(!bE.relative[b5]){b5=""}else{b4=bW.pop()}if(b4==null){b4=e}bE.relative[b5](b6,b4,bT)}}else{b6=bW=[]}}if(!b6){b6=b3}if(!b6){by.error(b5||bV)}if(bL.call(b6)==="[object Array]"){if(!bU){bY.push.apply(bY,b6)}else{if(e&&e.nodeType===1){for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&(b6[bX]===true||b6[bX].nodeType===1&&by.contains(e,b6[bX]))){bY.push(b3[bX])}}}else{for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&b6[bX].nodeType===1){bY.push(b3[bX])}}}}}else{bF(b6,bY)}if(bR){by(bR,b1,bY,bZ);by.uniqueSort(bY)}return bY};by.uniqueSort=function(bR){if(bJ){bB=bA;bR.sort(bJ);if(bB){for(var e=1;e0};by.find=function(bX,e,bY){var bW,bS,bU,bT,bV,bR;if(!bX){return[]}for(bS=0,bU=bE.order.length;bS":function(bW,bR){var bV,bU=typeof bR==="string",bS=0,e=bW.length;if(bU&&!bQ.test(bR)){bR=bR.toLowerCase();for(;bS=0)){if(!bS){e.push(bV)}}else{if(bS){bR[bU]=false}}}}return false},ID:function(e){return e[1].replace(bK,"")},TAG:function(bR,e){return bR[1].replace(bK,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){by.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bR=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bR[1]+(bR[2]||1))-0;e[3]=bR[3]-0}else{if(e[2]){by.error(e[0])}}e[0]=bI++;return e},ATTR:function(bU,bR,bS,e,bV,bW){var bT=bU[1]=bU[1].replace(bK,"");if(!bW&&bE.attrMap[bT]){bU[1]=bE.attrMap[bT]}bU[4]=(bU[4]||bU[5]||"").replace(bK,"");if(bU[2]==="~="){bU[4]=" "+bU[4]+" "}return bU},PSEUDO:function(bU,bR,bS,e,bV){if(bU[1]==="not"){if((bH.exec(bU[3])||"").length>1||/^\w/.test(bU[3])){bU[3]=by(bU[3],null,null,bR)}else{var bT=by.filter(bU[3],bR,bS,true^bV);if(!bS){e.push.apply(e,bT)}return false}}else{if(bE.match.POS.test(bU[0])||bE.match.CHILD.test(bU[0])){return true}}return bU},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bS,bR,e){return !!by(e[3],bS).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bS){var e=bS.getAttribute("type"),bR=bS.type;return bS.nodeName.toLowerCase()==="input"&&"text"===bR&&(e===bR||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bR.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bR.type},button:function(bR){var e=bR.nodeName.toLowerCase();return e==="input"&&"button"===bR.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(bR,e){return e===0},last:function(bS,bR,e,bT){return bR===bT.length-1},even:function(bR,e){return e%2===0},odd:function(bR,e){return e%2===1 +},lt:function(bS,bR,e){return bRe[3]-0},nth:function(bS,bR,e){return e[3]-0===bR},eq:function(bS,bR,e){return e[3]-0===bR}},filter:{PSEUDO:function(bS,bX,bW,bY){var e=bX[1],bR=bE.filters[e];if(bR){return bR(bS,bW,bX,bY)}else{if(e==="contains"){return(bS.textContent||bS.innerText||bw([bS])||"").indexOf(bX[3])>=0}else{if(e==="not"){var bT=bX[3];for(var bV=0,bU=bT.length;bV=0)}}},ID:function(bR,e){return bR.nodeType===1&&bR.getAttribute("id")===e},TAG:function(bR,e){return(e==="*"&&bR.nodeType===1)||!!bR.nodeName&&bR.nodeName.toLowerCase()===e},CLASS:function(bR,e){return(" "+(bR.className||bR.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bV,bT){var bS=bT[1],e=by.attr?by.attr(bV,bS):bE.attrHandle[bS]?bE.attrHandle[bS](bV):bV[bS]!=null?bV[bS]:bV.getAttribute(bS),bW=e+"",bU=bT[2],bR=bT[4];return e==null?bU==="!=":!bU&&by.attr?e!=null:bU==="="?bW===bR:bU==="*="?bW.indexOf(bR)>=0:bU==="~="?(" "+bW+" ").indexOf(bR)>=0:!bR?bW&&e!==false:bU==="!="?bW!==bR:bU==="^="?bW.indexOf(bR)===0:bU==="$="?bW.substr(bW.length-bR.length)===bR:bU==="|="?bW===bR||bW.substr(0,bR.length+1)===bR+"-":false},POS:function(bU,bR,bS,bV){var e=bR[2],bT=bE.setFilters[e];if(bT){return bT(bU,bS,bR,bV)}}}};var bD=bE.match.POS,bx=function(bR,e){return"\\"+(e-0+1)};for(var bz in bE.match){bE.match[bz]=new RegExp(bE.match[bz].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bE.leftMatch[bz]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bE.match[bz].source.replace(/\\(\d+)/g,bx))}var bF=function(bR,e){bR=Array.prototype.slice.call(bR,0);if(e){e.push.apply(e,bR);return e}return bR};try{Array.prototype.slice.call(av.documentElement.childNodes,0)[0].nodeType}catch(bP){bF=function(bU,bT){var bS=0,bR=bT||[];if(bL.call(bU)==="[object Array]"){Array.prototype.push.apply(bR,bU)}else{if(typeof bU.length==="number"){for(var e=bU.length;bS";e.insertBefore(bR,e.firstChild);if(av.getElementById(bS)){bE.find.ID=function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var bT=bV.getElementById(bU[1]);return bT?bT.id===bU[1]||typeof bT.getAttributeNode!=="undefined"&&bT.getAttributeNode("id").nodeValue===bU[1]?[bT]:L:[]}};bE.filter.ID=function(bV,bT){var bU=typeof bV.getAttributeNode!=="undefined"&&bV.getAttributeNode("id");return bV.nodeType===1&&bU&&bU.nodeValue===bT}}e.removeChild(bR);e=bR=null})();(function(){var e=av.createElement("div");e.appendChild(av.createComment(""));if(e.getElementsByTagName("*").length>0){bE.find.TAG=function(bR,bV){var bU=bV.getElementsByTagName(bR[1]);if(bR[1]==="*"){var bT=[];for(var bS=0;bU[bS];bS++){if(bU[bS].nodeType===1){bT.push(bU[bS])}}bU=bT}return bU}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bE.attrHandle.href=function(bR){return bR.getAttribute("href",2)}}e=null})();if(av.querySelectorAll){(function(){var e=by,bT=av.createElement("div"),bS="__sizzle__";bT.innerHTML="

";if(bT.querySelectorAll&&bT.querySelectorAll(".TEST").length===0){return}by=function(b4,bV,bZ,b3){bV=bV||av;if(!b3&&!by.isXML(bV)){var b2=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b4);if(b2&&(bV.nodeType===1||bV.nodeType===9)){if(b2[1]){return bF(bV.getElementsByTagName(b4),bZ)}else{if(b2[2]&&bE.find.CLASS&&bV.getElementsByClassName){return bF(bV.getElementsByClassName(b2[2]),bZ)}}}if(bV.nodeType===9){if(b4==="body"&&bV.body){return bF([bV.body],bZ)}else{if(b2&&b2[3]){var bY=bV.getElementById(b2[3]);if(bY&&bY.parentNode){if(bY.id===b2[3]){return bF([bY],bZ)}}else{return bF([],bZ)}}}try{return bF(bV.querySelectorAll(b4),bZ)}catch(b0){}}else{if(bV.nodeType===1&&bV.nodeName.toLowerCase()!=="object"){var bW=bV,bX=bV.getAttribute("id"),bU=bX||bS,b6=bV.parentNode,b5=/^\s*[+~]/.test(b4);if(!bX){bV.setAttribute("id",bU)}else{bU=bU.replace(/'/g,"\\$&")}if(b5&&b6){bV=bV.parentNode}try{if(!b5||b6){return bF(bV.querySelectorAll("[id='"+bU+"'] "+b4),bZ)}}catch(b1){}finally{if(!bX){bW.removeAttribute("id")}}}}}return e(b4,bV,bZ,b3)};for(var bR in e){by[bR]=e[bR]}bT=null})()}(function(){var e=av.documentElement,bS=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bS){var bU=!bS.call(av.createElement("div"),"div"),bR=false;try{bS.call(av.documentElement,"[test!='']:sizzle")}catch(bT){bR=true}by.matchesSelector=function(bW,bY){bY=bY.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!by.isXML(bW)){try{if(bR||!bE.match.PSEUDO.test(bY)&&!/!=/.test(bY)){var bV=bS.call(bW,bY);if(bV||!bU||bW.document&&bW.document.nodeType!==11){return bV}}}catch(bX){}}return by(bY,null,null,[bW]).length>0}}})();(function(){var e=av.createElement("div");e.innerHTML="
";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bE.order.splice(1,0,"CLASS");bE.find.CLASS=function(bR,bS,bT){if(typeof bS.getElementsByClassName!=="undefined"&&!bT){return bS.getElementsByClassName(bR[1])}};e=null})();function bv(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT0){bU=e;break}}}e=e[bR]}bZ[bT]=bU}}}if(av.documentElement.contains){by.contains=function(bR,e){return bR!==e&&(bR.contains?bR.contains(e):true)}}else{if(av.documentElement.compareDocumentPosition){by.contains=function(bR,e){return !!(bR.compareDocumentPosition(e)&16)}}else{by.contains=function(){return false}}}by.isXML=function(e){var bR=(e?e.ownerDocument||e:0).documentElement;return bR?bR.nodeName!=="HTML":false};var bM=function(bS,e,bW){var bV,bX=[],bU="",bY=e.nodeType?[e]:e;while((bV=bE.match.PSEUDO.exec(bS))){bU+=bV[0];bS=bS.replace(bE.match.PSEUDO,"")}bS=bE.relative[bS]?bS+"*":bS;for(var bT=0,bR=bY.length;bT0){for(bB=bA;bB=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(by,bx){var bv=[],bw,e,bz=this[0];if(b.isArray(by)){var bB=1;while(bz&&bz.ownerDocument&&bz!==bx){for(bw=0;bw-1:b.find.matchesSelector(bz,by)){bv.push(bz);break}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===bx||bz.nodeType===11){break}}}}bv=bv.length>1?b.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return b.inArray(this[0],b(e))}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bv){var bx=typeof e==="string"?b(e,bv):b.makeArray(e&&e.nodeType?[e]:e),bw=b.merge(this.get(),bx);return this.pushStack(C(bx[0])||C(bw[0])?bw:b.unique(bw))},andSelf:function(){return this.add(this.prevObject)}});function C(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bv,e,bw){return b.dir(bv,"parentNode",bw)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bv,e,bw){return b.dir(bv,"nextSibling",bw)},prevUntil:function(bv,e,bw){return b.dir(bv,"previousSibling",bw)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bv){b.fn[e]=function(by,bw){var bx=b.map(this,bv,by);if(!ab.test(e)){bw=by}if(bw&&typeof bw==="string"){bx=b.filter(bw,bx)}bx=this.length>1&&!ay[e]?b.unique(bx):bx;if((this.length>1||a9.test(bw))&&aq.test(e)){bx=bx.reverse()}return this.pushStack(bx,e,P.call(arguments).join(","))}});b.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")"}return e.length===1?b.find.matchesSelector(e[0],bw)?[e[0]]:[]:b.find.matches(bw,e)},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===L||bx.nodeType!==1||!b(bx).is(by))){if(bx.nodeType===1){e.push(bx)}bx=bx[bv]}return e},nth:function(by,e,bw,bx){e=e||1;var bv=0;for(;by;by=by[bw]){if(by.nodeType===1&&++bv===e){break}}return by},sibling:function(bw,bv){var e=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){e.push(bw)}}return e}});function aG(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===e})}else{if(bw.nodeType){return b.grep(bx,function(bz,by){return(bz===bw)===e})}else{if(typeof bw==="string"){var bv=b.grep(bx,function(by){return by.nodeType===1});if(bp.test(bw)){return b.filter(bw,bv,!e)}else{bw=b.filter(bw,bv)}}}}return b.grep(bx,function(bz,by){return(b.inArray(bz,bw)>=0)===e})}function a(e){var bw=aR.split("|"),bv=e.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aR="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ag=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,w=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},ac=a(av); +ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax.td;if(!b.support.htmlSerialize){ax._default=[1,"div
","
"]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bw){var bv=b(this);bv.text(e.call(this,bw,bv.text()))})}if(typeof e!=="object"&&e!==L){return this.empty().append((this[0]&&this[0].ownerDocument||av).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bw){b(this).wrapAll(e.call(this,bw))})}if(this[0]){var bv=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bv){b(this).wrapInner(e.call(this,bv))})}return this.each(function(){var bv=b(this),bw=bv.contents();if(bw.length){bw.wrapAll(e)}else{bv.append(e)}})},wrap:function(e){var bv=b.isFunction(e);return this.each(function(bw){b(this).wrapAll(bv?e.call(this,bw):e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}else{if(arguments.length){var e=b.clean(arguments);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b.clean(arguments));return e}}},remove:function(e,bx){for(var bv=0,bw;(bw=this[bv])!=null;bv++){if(!e||b.filter(e,[bw]).length){if(!bx&&bw.nodeType===1){b.cleanData(bw.getElementsByTagName("*"));b.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){b.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,e){bv=bv==null?false:bv;e=e==null?bv:e;return this.map(function(){return b.clone(this,bv,e)})},html:function(bx){if(bx===L){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ag,""):null}else{if(typeof bx==="string"&&!ae.test(bx)&&(b.support.leadingWhitespace||!ar.test(bx))&&!ax[(d.exec(bx)||["",""])[1].toLowerCase()]){bx=bx.replace(R,"<$1>");try{for(var bw=0,bv=this.length;bw1&&bw0?this.clone(true):this).get();b(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,e,bC.selector)}}});function bg(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function E(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){az(e)}else{if(bv!=="script"&&typeof e.getElementsByTagName!=="undefined"){b.grep(e.getElementsByTagName("input"),az)}}}function al(e){var bv=av.createElement("div");ac.appendChild(bv);bv.innerHTML=e.outerHTML;return bv.firstChild}b.extend({clone:function(by,bA,bw){var e,bv,bx,bz=b.support.html5Clone||!ah.test("<"+by.nodeName)?by.cloneNode(true):al(by);if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!b.isXMLDoc(by)){ai(by,bz);e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){if(bv[bx]){ai(e[bx],bv[bx])}}}if(bA){t(by,bz);if(bw){e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){t(e[bx],bv[bx])}}}e=bv=null;return bz},clean:function(bw,by,bH,bA){var bF;by=by||av;if(typeof by.createElement==="undefined"){by=by.ownerDocument||by[0]&&by[0].ownerDocument||av}var bI=[],bB;for(var bE=0,bz;(bz=bw[bE])!=null;bE++){if(typeof bz==="number"){bz+=""}if(!bz){continue}if(typeof bz==="string"){if(!W.test(bz)){bz=by.createTextNode(bz)}else{bz=bz.replace(R,"<$1>");var bK=(d.exec(bz)||["",""])[1].toLowerCase(),bx=ax[bK]||ax._default,bD=bx[0],bv=by.createElement("div");if(by===av){ac.appendChild(bv)}else{a(by).appendChild(bv)}bv.innerHTML=bx[1]+bz+bx[2];while(bD--){bv=bv.lastChild}if(!b.support.tbody){var e=w.test(bz),bC=bK==="table"&&!e?bv.firstChild&&bv.firstChild.childNodes:bx[1]===""&&!e?bv.childNodes:[];for(bB=bC.length-1;bB>=0;--bB){if(b.nodeName(bC[bB],"tbody")&&!bC[bB].childNodes.length){bC[bB].parentNode.removeChild(bC[bB])}}}if(!b.support.leadingWhitespace&&ar.test(bz)){bv.insertBefore(by.createTextNode(ar.exec(bz)[0]),bv.firstChild)}bz=bv.childNodes}}var bG;if(!b.support.appendChecked){if(bz[0]&&typeof(bG=bz.length)==="number"){for(bB=0;bB=0){return bx+"px"}}else{return bx}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(bv,e){return au.test((e&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,e=b.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&b.trim(bw.replace(ak,""))===""){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ak.test(bw)?bw.replace(ak,e):bw+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bw,bv){var e;b.swap(bw,{display:"inline-block"},function(){if(bv){e=Z(bw,"margin-right","marginRight")}else{e=bw.style.marginRight}});return e}}}});if(av.defaultView&&av.defaultView.getComputedStyle){aI=function(by,bw){var bv,bx,e;bw=bw.replace(z,"-$1").toLowerCase();if((bx=by.ownerDocument.defaultView)&&(e=bx.getComputedStyle(by,null))){bv=e.getPropertyValue(bw);if(bv===""&&!b.contains(by.ownerDocument.documentElement,by)){bv=b.style(by,bw)}}return bv}}if(av.documentElement.currentStyle){aX=function(bz,bw){var bA,e,by,bv=bz.currentStyle&&bz.currentStyle[bw],bx=bz.style;if(bv===null&&bx&&(by=bx[bw])){bv=by}if(!bc.test(bv)&&bn.test(bv)){bA=bx.left;e=bz.runtimeStyle&&bz.runtimeStyle.left;if(e){bz.runtimeStyle.left=bz.currentStyle.left}bx.left=bw==="fontSize"?"1em":(bv||0);bv=bx.pixelLeft+"px";bx.left=bA;if(e){bz.runtimeStyle.left=e}}return bv===""?"auto":bv}}Z=aI||aX;function p(by,bw,bv){var bA=bw==="width"?by.offsetWidth:by.offsetHeight,bz=bw==="width"?an:a1,bx=0,e=bz.length; +if(bA>0){if(bv!=="border"){for(;bx)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,h=/\s+/,br=/([?&])_=[^&]*/,K=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=b.fn.load,aa={},r={},aE,s,aV=["*/"]+["*"];try{aE=bl.href}catch(aw){aE=av.createElement("a");aE.href="";aE=aE.href}s=K.exec(aE.toLowerCase())||[];function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(b.isFunction(bA)){var bx=by.toLowerCase().split(h),bw=0,bz=bx.length,bv,bB,bC;for(;bw=0){var e=bw.slice(by,bw.length);bw=bw.slice(0,by)}var bx="GET";if(bz){if(b.isFunction(bz)){bA=bz;bz=L}else{if(typeof bz==="object"){bz=b.param(bz,b.ajaxSettings.traditional);bx="POST"}}}var bv=this;b.ajax({url:bw,type:bx,dataType:"html",data:bz,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?b("
").append(bD.replace(a6,"")).find(e):bD)}if(bA){bv.each(bA,[bD,bB,bC])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||aZ.test(this.type))}).map(function(e,bv){var bw=b(this).val();return bw==null?null:b.isArray(bw)?b.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bs,"\r\n")}}):{name:bv.name,value:bw.replace(bs,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){b.fn[bv]=function(bw){return this.on(bv,bw)}});b.each(["get","post"],function(e,bv){b[bv]=function(bw,by,bz,bx){if(b.isFunction(by)){bx=bx||bz;bz=by;by=L}return b.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});b.extend({getScript:function(e,bv){return b.get(e,L,bv,"script")},getJSON:function(e,bv,bw){return b.get(e,bv,bw,"json")},ajaxSetup:function(bv,e){if(e){am(bv,b.ajaxSettings)}else{e=bv;bv=b.ajaxSettings}am(bv,e);return bv},ajaxSettings:{url:aE,isLocal:aM.test(s[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aV},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bb.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(aa),ajaxTransport:f(r),ajax:function(bz,bx){if(typeof bz==="object"){bx=bz;bz=L}bx=bx||{};var bD=b.ajaxSetup({},bx),bS=bD.context||bD,bG=bS!==bD&&(bS.nodeType||bS instanceof b)?b(bS):b.event,bR=b.Deferred(),bN=b.Callbacks("once memory"),bB=bD.statusCode||{},bC,bH={},bO={},bQ,by,bL,bE,bI,bA=0,bw,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!bA){var e=bT.toLowerCase();bT=bO[e]=bO[e]||bT;bH[bT]=bU}return this},getAllResponseHeaders:function(){return bA===2?bQ:null},getResponseHeader:function(bT){var e;if(bA===2){if(!by){by={};while((e=aD.exec(bQ))){by[e[1].toLowerCase()]=e[2]}}e=by[bT.toLowerCase()]}return e===L?null:e},overrideMimeType:function(e){if(!bA){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bF(0,e);return this}};function bF(bZ,bU,b0,bW){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}bL=L;bQ=bW||"";bJ.readyState=bZ>0?4:0;var bT,b4,b3,bX=bU,bY=b0?bj(bD,bJ,b0):L,bV,b2;if(bZ>=200&&bZ<300||bZ===304){if(bD.ifModified){if((bV=bJ.getResponseHeader("Last-Modified"))){b.lastModified[bC]=bV}if((b2=bJ.getResponseHeader("Etag"))){b.etag[bC]=b2}}if(bZ===304){bX="notmodified";bT=true}else{try{b4=G(bD,bY);bX="success";bT=true}catch(b1){bX="parsererror";b3=b1}}}else{b3=bX;if(!bX||bZ){bX="error";if(bZ<0){bZ=0}}}bJ.status=bZ;bJ.statusText=""+(bU||bX);if(bT){bR.resolveWith(bS,[b4,bX,bJ])}else{bR.rejectWith(bS,[bJ,bX,b3])}bJ.statusCode(bB);bB=L;if(bw){bG.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b4:b3])}bN.fireWith(bS,[bJ,bX]);if(bw){bG.trigger("ajaxComplete",[bJ,bD]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bR.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.add;bJ.statusCode=function(bT){if(bT){var e;if(bA<2){for(e in bT){bB[e]=[bB[e],bT[e]]}}else{e=bT[bJ.status];bJ.then(e,e)}}return this};bD.url=((bz||bD.url)+"").replace(bq,"").replace(c,s[1]+"//");bD.dataTypes=b.trim(bD.dataType||"*").toLowerCase().split(h);if(bD.crossDomain==null){bI=K.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=s[1]||bI[2]!=s[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(s[3]||(s[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=b.param(bD.data,bD.traditional)}aW(aa,bD,bx,bJ);if(bA===2){return false}bw=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aQ.test(bD.type);if(bw&&b.active++===0){b.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(M.test(bD.url)?"&":"?")+bD.data;delete bD.data}bC=bD.url;if(bD.cache===false){var bv=b.now(),bP=bD.url.replace(br,"$1_="+bv);bD.url=bP+((bP===bD.url)?(M.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bx.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bC=bC||bD.url;if(b.lastModified[bC]){bJ.setRequestHeader("If-Modified-Since",b.lastModified[bC])}if(b.etag[bC]){bJ.setRequestHeader("If-None-Match",b.etag[bC])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", "+aV+"; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bS,bJ,bD)===false||bA===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=aW(r,bD,bx,bJ);if(!bL){bF(-1,"No Transport")}else{bJ.readyState=1;if(bw){bG.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{bA=1;bL.send(bH,bF)}catch(bM){if(bA<2){bF(-1,bM)}else{throw bM}}}return bJ},param:function(e,bw){var bv=[],by=function(bz,bA){bA=b.isFunction(bA)?bA():bA;bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===L){bw=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){by(this.name,this.value)})}else{for(var bx in e){v(bx,e[bx],bw,by)}}return bv.join("&").replace(k,"+")}});function v(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(bv||ap.test(bw)){bx(bw,bz)}else{v(bw+"["+(typeof bz==="object"||b.isArray(bz)?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&by!=null&&typeof by==="object"){for(var e in by){v(bw+"["+e+"]",by[e],bv,bx)}}else{bx(bw,by)}}}b.extend({active:0,lastModified:{},etag:{}});function bj(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseFields,by,bA,bx,e;for(bA in bw){if(bA in bz){bC[bw[bA]]=bz[bA]}}while(bB[0]==="*"){bB.shift();if(by===L){by=bD.mimeType||bC.getResponseHeader("content-type")}}if(by){for(bA in bv){if(bv[bA]&&bv[bA].test(by)){bB.unshift(bA);break}}}if(bB[0] in bz){bx=bB[0]}else{for(bA in bz){if(!bB[0]||bD.converters[bA+" "+bB[0]]){bx=bA;break}if(!e){e=bA}}bx=bx||e}if(bx){if(bx!==bB[0]){bB.unshift(bx)}return bz[bx]}}function G(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var bD=bH.dataTypes,bG={},bA,bE,bw=bD.length,bB,bC=bD[0],bx,by,bF,bv,e;for(bA=1;bA=bw.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bw.animatedProperties[this.prop]=true;for(bA in bw.animatedProperties){if(bw.animatedProperties[bA]!==true){e=false}}if(e){if(bw.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bC,bD){bz.style["overflow"+bD]=bw.overflow[bC]})}if(bw.hide){b(bz).hide()}if(bw.hide||bw.show){for(bA in bw.animatedProperties){b.style(bz,bA,bw.orig[bA]);b.removeData(bz,"fxshow"+bA,true);b.removeData(bz,"toggle"+bA,true)}}bv=bw.complete;if(bv){bw.complete=false;bv.call(bz)}}return false}else{if(bw.duration==Infinity){this.now=bx}else{bB=bx-this.startTime;this.state=bB/bw.duration;this.pos=b.easing[bw.animatedProperties[this.prop]](this.state,bB,0,1,bw.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){var bw,bv=b.timers,e=0;for(;e").appendTo(e),bw=bv.css("display");bv.remove();if(bw==="none"||bw===""){if(!a8){a8=av.createElement("iframe");a8.frameBorder=a8.width=a8.height=0}e.appendChild(a8);if(!m||!a8.createElement){m=(a8.contentWindow||a8.contentDocument).document;m.write((av.compatMode==="CSS1Compat"?"":"")+"");m.close()}bv=m.createElement(bx);m.body.appendChild(bv);bw=b.css(bv,"display");e.removeChild(a8)}Q[bx]=bw}return Q[bx]}var V=/^t(?:able|d|h)$/i,ad=/^(?:body|html)$/i;if("getBoundingClientRect" in av.documentElement){b.fn.offset=function(bI){var by=this[0],bB;if(bI){return this.each(function(e){b.offset.setOffset(this,bI,e)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return b.offset.bodyOffset(by)}try{bB=by.getBoundingClientRect()}catch(bF){}var bH=by.ownerDocument,bw=bH.documentElement;if(!bB||!b.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bH.body,bD=aK(bH),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||b.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||b.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{b.fn.offset=function(bF){var bz=this[0];if(bF){return this.each(function(bG){b.offset.setOffset(this,bF,bG)})}if(!bz||!bz.ownerDocument){return null}if(bz===bz.ownerDocument.body){return b.offset.bodyOffset(bz)}var bC,bw=bz.offsetParent,bv=bz,bE=bz.ownerDocument,bx=bE.documentElement,bA=bE.body,bB=bE.defaultView,e=bB?bB.getComputedStyle(bz,null):bz.currentStyle,bD=bz.offsetTop,by=bz.offsetLeft;while((bz=bz.parentNode)&&bz!==bA&&bz!==bx){if(b.support.fixedPosition&&e.position==="fixed"){break}bC=bB?bB.getComputedStyle(bz,null):bz.currentStyle;bD-=bz.scrollTop;by-=bz.scrollLeft;if(bz===bw){bD+=bz.offsetTop;by+=bz.offsetLeft;if(b.support.doesNotAddBorder&&!(b.support.doesAddBorderForTableAndCells&&V.test(bz.nodeName))){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}bv=bw;bw=bz.offsetParent}if(b.support.subtractsBorderForOverflowNotVisible&&bC.overflow!=="visible"){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}e=bC}if(e.position==="relative"||e.position==="static"){bD+=bA.offsetTop;by+=bA.offsetLeft}if(b.support.fixedPosition&&e.position==="fixed"){bD+=Math.max(bx.scrollTop,bA.scrollTop);by+=Math.max(bx.scrollLeft,bA.scrollLeft)}return{top:bD,left:by}}}b.offset={bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;if(b.support.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(b.css(e,"marginTop"))||0;bv+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(bx,bG,bA){var bB=b.css(bx,"position");if(bB==="static"){bx.style.position="relative"}var bz=b(bx),bv=bz.offset(),e=b.css(bx,"top"),bE=b.css(bx,"left"),bF=(bB==="absolute"||bB==="fixed")&&b.inArray("auto",[e,bE])>-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(e)||0;by=parseFloat(bE)||0}if(b.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=ad.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(b.css(bw,"marginTop"))||0;bx.left-=parseFloat(b.css(bw,"marginLeft"))||0;e.top+=parseFloat(b.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-e.top,left:bx.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||av.body;while(e&&(!ad.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bv,e){var bw="scroll"+e;b.fn[bw]=function(bz){var bx,by;if(bz===L){bx=this[0];if(!bx){return null}by=aK(bx);return by?("pageXOffset" in by)?by[bv?"pageYOffset":"pageXOffset"]:b.support.boxModel&&by.document.documentElement[bw]||by.document.body[bw]:bx[bw]}return this.each(function(){by=aK(this);if(by){by.scrollTo(!bv?bz:b(by).scrollLeft(),bv?bz:b(by).scrollTop())}else{this[bw]=bz}})}});function aK(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bv,e){var bw=e.toLowerCase();b.fn["inner"+e]=function(){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,"padding")):this[bw]():null};b.fn["outer"+e]=function(by){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,by?"margin":"border")):this[bw]():null};b.fn[bw]=function(bz){var bA=this[0];if(!bA){return bz==null?null:this}if(b.isFunction(bz)){return this.each(function(bE){var bD=b(this);bD[bw](bz.call(this,bE,bD[bw]()))})}if(b.isWindow(bA)){var bB=bA.document.documentElement["client"+e],bx=bA.document.body;return bA.document.compatMode==="CSS1Compat"&&bB||bx&&bx["client"+e]||bB}else{if(bA.nodeType===9){return Math.max(bA.documentElement["client"+e],bA.body["scroll"+e],bA.documentElement["scroll"+e],bA.body["offset"+e],bA.documentElement["offset"+e])}else{if(bz===L){var bC=b.css(bA,bw),by=parseFloat(bC);return b.isNumeric(by)?by:bC}else{return this.css(bw,typeof bz==="string"?bz:bz+"px")}}}}});bb.jQuery=bb.$=b;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return b +})}})(window); +/*! + PowerTip - v1.2.0 - 2013-04-03 + http://stevenbenner.github.com/jquery-powertip/ + Copyright (c) 2013 Steven Benner (http://stevenbenner.com/). + Released under MIT license. + https://raw.github.com/stevenbenner/jquery-powertip/master/LICENSE.txt +*/ +(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{a(jQuery)}}(function(k){var A=k(document),s=k(window),w=k("body");var n="displayController",e="hasActiveHover",d="forcedOpen",u="hasMouseMove",f="mouseOnToPopup",g="originalTitle",y="powertip",o="powertipjq",l="powertiptarget",E=180/Math.PI;var c={isTipOpen:false,isFixedTipOpen:false,isClosing:false,tipOpenImminent:false,activeHover:null,currentX:0,currentY:0,previousX:0,previousY:0,desyncTimeout:null,mouseTrackingActive:false,delayInProgress:false,windowWidth:0,windowHeight:0,scrollTop:0,scrollLeft:0};var p={none:0,top:1,bottom:2,left:4,right:8};k.fn.powerTip=function(F,N){if(!this.length){return this}if(k.type(F)==="string"&&k.powerTip[F]){return k.powerTip[F].call(this,this,N)}var O=k.extend({},k.fn.powerTip.defaults,F),G=new x(O);h();this.each(function M(){var R=k(this),Q=R.data(y),P=R.data(o),T=R.data(l),S;if(R.data(n)){k.powerTip.destroy(R)}S=R.attr("title");if(!Q&&!T&&!P&&S){R.data(y,S);R.data(g,S);R.removeAttr("title")}R.data(n,new t(R,O,G))});if(!O.manual){this.on({"mouseenter.powertip":function J(P){k.powerTip.show(this,P)},"mouseleave.powertip":function L(){k.powerTip.hide(this)},"focus.powertip":function K(){k.powerTip.show(this)},"blur.powertip":function H(){k.powerTip.hide(this,true)},"keydown.powertip":function I(P){if(P.keyCode===27){k.powerTip.hide(this,true)}}})}return this};k.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false};k.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};k.powerTip={show:function z(F,G){if(G){i(G);c.previousX=G.pageX;c.previousY=G.pageY;k(F).data(n).show()}else{k(F).first().data(n).show(true,true)}return F},reposition:function r(F){k(F).first().data(n).resetPosition();return F},hide:function D(G,F){if(G){k(G).first().data(n).hide(F)}else{if(c.activeHover){c.activeHover.data(n).hide(true)}}return G},destroy:function C(G){k(G).off(".powertip").each(function F(){var I=k(this),H=[g,n,e,d];if(I.data(g)){I.attr("title",I.data(g));H.push(y)}I.removeData(H)});return G}};k.powerTip.showTip=k.powerTip.show;k.powerTip.closeTip=k.powerTip.hide;function b(){var F=this;F.top="auto";F.left="auto";F.right="auto";F.bottom="auto";F.set=function(H,G){if(k.isNumeric(G)){F[H]=Math.round(G)}}}function t(K,N,F){var J=null;function L(P,Q){M();if(!K.data(e)){if(!P){c.tipOpenImminent=true;J=setTimeout(function O(){J=null;I()},N.intentPollInterval)}else{if(Q){K.data(d,true)}F.showTip(K)}}}function G(P){M();c.tipOpenImminent=false;if(K.data(e)){K.data(d,false);if(!P){c.delayInProgress=true;J=setTimeout(function O(){J=null;F.hideTip(K);c.delayInProgress=false},N.closeDelay)}else{F.hideTip(K)}}}function I(){var Q=Math.abs(c.previousX-c.currentX),O=Math.abs(c.previousY-c.currentY),P=Q+O;if(P",{id:Q.popupId});if(w.length===0){w=k("body")}w.append(O)}if(Q.followMouse){if(!O.data(u)){A.on("mousemove",M);s.on("scroll",M);O.data(u,true)}}if(Q.mouseOnToPopup){O.on({mouseenter:function L(){if(O.data(f)){if(c.activeHover){c.activeHover.data(n).cancel()}}},mouseleave:function N(){if(c.activeHover){c.activeHover.data(n).hide()}}})}function I(S){S.data(e,true);O.queue(function R(T){H(S);T()})}function H(S){var U;if(!S.data(e)){return}if(c.isTipOpen){if(!c.isClosing){K(c.activeHover)}O.delay(100).queue(function R(V){H(S);V()});return}S.trigger("powerTipPreRender");U=B(S);if(U){O.empty().append(U)}else{return}S.trigger("powerTipRender");c.activeHover=S;c.isTipOpen=true;O.data(f,Q.mouseOnToPopup);if(!Q.followMouse){G(S);c.isFixedTipOpen=true}else{M()}O.fadeIn(Q.fadeInTime,function T(){if(!c.desyncTimeout){c.desyncTimeout=setInterval(J,500)}S.trigger("powerTipOpen")})}function K(R){c.isClosing=true;c.activeHover=null;c.isTipOpen=false;c.desyncTimeout=clearInterval(c.desyncTimeout);R.data(e,false);R.data(d,false);O.fadeOut(Q.fadeOutTime,function S(){var T=new b();c.isClosing=false;c.isFixedTipOpen=false;O.removeClass();T.set("top",c.currentY+Q.offset);T.set("left",c.currentX+Q.offset);O.css(T);R.trigger("powerTipClose")})}function M(){if(!c.isFixedTipOpen&&(c.isTipOpen||(c.tipOpenImminent&&O.data(u)))){var R=O.outerWidth(),V=O.outerHeight(),U=new b(),S,T;U.set("top",c.currentY+Q.offset);U.set("left",c.currentX+Q.offset);S=m(U,R,V);if(S!==p.none){T=a(S);if(T===1){if(S===p.right){U.set("left",c.windowWidth-R)}else{if(S===p.bottom){U.set("top",c.scrollTop+c.windowHeight-V)}}}else{U.set("left",c.currentX-R-Q.offset);U.set("top",c.currentY-V-Q.offset)}}O.css(U)}}function G(S){var R,T;if(Q.smartPlacement){R=k.fn.powerTip.smartPlacementLists[Q.placement];k.each(R,function(U,W){var V=m(F(S,W),O.outerWidth(),O.outerHeight());T=W;if(V===p.none){return false}})}else{F(S,Q.placement);T=Q.placement}O.addClass(T)}function F(U,T){var R=0,S,W,V=new b();V.set("top",0);V.set("left",0);O.css(V);do{S=O.outerWidth();W=O.outerHeight();V=P.compute(U,T,S,W,Q.offset);O.css(V)}while(++R<=5&&(S!==O.outerWidth()||W!==O.outerHeight()));return V}function J(){var R=false;if(c.isTipOpen&&!c.isClosing&&!c.delayInProgress){if(c.activeHover.data(e)===false||c.activeHover.is(":disabled")){R=true}else{if(!v(c.activeHover)&&!c.activeHover.is(":focus")&&!c.activeHover.data(d)){if(O.data(f)){if(!v(O)){R=true}}else{R=true}}}if(R){K(c.activeHover)}}}this.showTip=I;this.hideTip=K;this.resetPosition=G}function q(F){return window.SVGElement&&F[0] instanceof SVGElement}function h(){if(!c.mouseTrackingActive){c.mouseTrackingActive=true;k(function H(){c.scrollLeft=s.scrollLeft();c.scrollTop=s.scrollTop();c.windowWidth=s.width();c.windowHeight=s.height()});A.on("mousemove",i);s.on({resize:function G(){c.windowWidth=s.width();c.windowHeight=s.height()},scroll:function F(){var I=s.scrollLeft(),J=s.scrollTop();if(I!==c.scrollLeft){c.currentX+=I-c.scrollLeft;c.scrollLeft=I}if(J!==c.scrollTop){c.currentY+=J-c.scrollTop;c.scrollTop=J}}})}}function i(F){c.currentX=F.pageX;c.currentY=F.pageY}function v(F){var H=F.offset(),J=F[0].getBoundingClientRect(),I=J.right-J.left,G=J.bottom-J.top;return c.currentX>=H.left&&c.currentX<=H.left+I&&c.currentY>=H.top&&c.currentY<=H.top+G}function B(I){var G=I.data(y),F=I.data(o),K=I.data(l),H,J;if(G){if(k.isFunction(G)){G=G.call(I[0])}J=G}else{if(F){if(k.isFunction(F)){F=F.call(I[0])}if(F.length>0){J=F.clone(true,true)}}else{if(K){H=k("#"+K);if(H.length>0){J=H.html()}}}}return J}function m(M,L,K){var G=c.scrollTop,J=c.scrollLeft,I=G+c.windowHeight,F=J+c.windowWidth,H=p.none;if(M.topI||Math.abs(M.bottom-c.windowHeight)>I){H|=p.bottom}if(M.leftF){H|=p.left}if(M.left+L>F||M.right + + + + + +Stan Math Library: stan/math/prim/scal/fun/lb_constrain.hpp File Reference + + + + + + + + + +
+
+
+ + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+ + + + + + + + + + +
+ +
+ + + +
+ +
+
lb_constrain.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+#include <stan/math/prim/scal/fun/identity_constrain.hpp>
+#include <cmath>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T , typename TL >
stan::math::lb_constrain (const T x, const TL lb)
 Return the lower-bounded value for the specified unconstrained input and specified lower bound. More...
 
template<typename T , typename TL >
boost::math::tools::promote_args
+< T, TL >::type 
stan::math::lb_constrain (const T x, const TL lb, T &lp)
 Return the lower-bounded value for the speicifed unconstrained input and specified lower bound, incrementing the specified reference with the log absolute Jacobian determinant of the transform. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/lb__constrain_8hpp_source.html b/doc/api/html/lb__constrain_8hpp_source.html new file mode 100644 index 00000000000..d618e0c6f02 --- /dev/null +++ b/doc/api/html/lb__constrain_8hpp_source.html @@ -0,0 +1,151 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/lb_constrain.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
lb_constrain.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LB_CONSTRAIN_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LB_CONSTRAIN_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+ +
6 #include <cmath>
+
7 #include <limits>
+
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12  // LOWER BOUND
+
13 
+
33  template <typename T, typename TL>
+
34  inline
+
35  T lb_constrain(const T x, const TL lb) {
+
36  using std::exp;
+
37  if (lb == -std::numeric_limits<double>::infinity())
+
38  return identity_constrain(x);
+
39  return exp(x) + lb;
+
40  }
+
41 
+
58  template <typename T, typename TL>
+
59  inline
+
60  typename boost::math::tools::promote_args<T, TL>::type
+
61  lb_constrain(const T x, const TL lb, T& lp) {
+
62  using std::exp;
+
63  if (lb == -std::numeric_limits<double>::infinity())
+
64  return identity_constrain(x, lp);
+
65  lp += x;
+
66  return exp(x) + lb;
+
67  }
+
68 
+
69 
+
70  }
+
71 
+
72 }
+
73 
+
74 #endif
+
T lb_constrain(const T x, const TL lb)
Return the lower-bounded value for the specified unconstrained input and specified lower bound...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ +
T identity_constrain(T x)
Returns the result of applying the identity constraint transform to the input.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/lb__free_8hpp.html b/doc/api/html/lb__free_8hpp.html new file mode 100644 index 00000000000..79015e16183 --- /dev/null +++ b/doc/api/html/lb__free_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/lb_free.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
lb_free.hpp File Reference
+
+
+
#include <stan/math/prim/scal/fun/identity_free.hpp>
+#include <stan/math/prim/scal/err/check_greater_or_equal.hpp>
+#include <boost/math/tools/promotion.hpp>
+#include <cmath>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T , typename TL >
boost::math::tools::promote_args
+< T, TL >::type 
stan::math::lb_free (const T y, const TL lb)
 Return the unconstrained value that produces the specified lower-bound constrained value. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/lb__free_8hpp_source.html b/doc/api/html/lb__free_8hpp_source.html new file mode 100644 index 00000000000..daa8893d717 --- /dev/null +++ b/doc/api/html/lb__free_8hpp_source.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/lb_free.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
lb_free.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LB_FREE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LB_FREE_HPP
+
3 
+ + +
6 #include <boost/math/tools/promotion.hpp>
+
7 #include <cmath>
+
8 #include <limits>
+
9 
+
10 namespace stan {
+
11 
+
12  namespace math {
+
13 
+
29  template <typename T, typename TL>
+
30  inline
+
31  typename boost::math::tools::promote_args<T, TL>::type
+
32  lb_free(const T y, const TL lb) {
+
33  using std::log;
+
34  if (lb == -std::numeric_limits<double>::infinity())
+
35  return identity_free(y);
+
36  stan::math::check_greater_or_equal("stan::math::lb_free",
+
37  "Lower bounded variable", y, lb);
+
38  return log(y - lb);
+
39  }
+
40 
+
41  }
+
42 
+
43 }
+
44 
+
45 #endif
+
bool check_greater_or_equal(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is greater or equal than low.
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
T identity_free(const T y)
Returns the result of applying the inverse of the identity constraint transform to the input...
+
boost::math::tools::promote_args< T, TL >::type lb_free(const T y, const TL lb)
Return the unconstrained value that produces the specified lower-bound constrained value...
Definition: lb_free.hpp:32
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/length__mvt_8hpp.html b/doc/api/html/length__mvt_8hpp.html new file mode 100644 index 00000000000..d07d8e8d87b --- /dev/null +++ b/doc/api/html/length__mvt_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/length_mvt.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
length_mvt.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stdexcept>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + +

+Namespaces

 stan
 
+ + + + + + + + + + +

+Functions

template<typename T >
size_t stan::length_mvt (const T &)
 
template<typename T , int R, int C>
size_t stan::length_mvt (const Eigen::Matrix< T, R, C > &)
 
template<typename T , int R, int C>
size_t stan::length_mvt (const std::vector< Eigen::Matrix< T, R, C > > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/length__mvt_8hpp_source.html b/doc/api/html/length__mvt_8hpp_source.html new file mode 100644 index 00000000000..8726eca7ccd --- /dev/null +++ b/doc/api/html/length__mvt_8hpp_source.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/length_mvt.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
length_mvt.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_LENGTH_MVT_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_LENGTH_MVT_HPP
+
3 
+ +
5 #include <stdexcept>
+
6 #include <vector>
+
7 
+
8 namespace stan {
+
9 
+
10  // length_mvt() should only be applied to std vector or Eigen matrix
+
11  template <typename T>
+
12  size_t length_mvt(const T& ) {
+
13  throw std::out_of_range("length_mvt passed to an unrecognized type.");
+
14  return 1U;
+
15  }
+
16  template <typename T, int R, int C>
+
17  size_t length_mvt(const Eigen::Matrix<T, R, C>& ) {
+
18  return 1U;
+
19  }
+
20  template <typename T, int R, int C>
+
21  size_t length_mvt(const std::vector<Eigen::Matrix<T, R, C> >& x) {
+
22  return x.size();
+
23  }
+
24 
+
25 }
+
26 #endif
+
27 
+
size_t length_mvt(const T &)
Definition: length_mvt.hpp:12
+
void out_of_range(const char *function, const int max, const int index, const char *msg1="", const char *msg2="")
Throw an out_of_range exception with a consistently formatted message.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/likely_8hpp.html b/doc/api/html/likely_8hpp.html new file mode 100644 index 00000000000..1331610bc7b --- /dev/null +++ b/doc/api/html/likely_8hpp.html @@ -0,0 +1,157 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/likely.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
likely.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + +

+Macros

#define likely(x)   (x)
 
#define unlikely(x)   (x)
 
+

Macro Definition Documentation

+ +
+
+ + + + + + + + +
#define likely( x)   (x)
+
+ +

Definition at line 8 of file likely.hpp.

+ +
+
+ +
+
+ + + + + + + + +
#define unlikely( x)   (x)
+
+ +

Definition at line 9 of file likely.hpp.

+ +
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/likely_8hpp_source.html b/doc/api/html/likely_8hpp_source.html new file mode 100644 index 00000000000..546812b7bec --- /dev/null +++ b/doc/api/html/likely_8hpp_source.html @@ -0,0 +1,120 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/likely.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
likely.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_LIKELY_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_LIKELY_HPP
+
3 
+
4 #ifdef __GNUC__
+
5 #define likely(x) __builtin_expect(!!(x), 1)
+
6 #define unlikely(x) __builtin_expect(!!(x), 0)
+
7 #else
+
8 #define likely(x) (x)
+
9 #define unlikely(x) (x)
+
10 #endif
+
11 
+
12 #endif
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/lkj__corr__cholesky__log_8hpp.html b/doc/api/html/lkj__corr__cholesky__log_8hpp.html new file mode 100644 index 00000000000..d3923767363 --- /dev/null +++ b/doc/api/html/lkj__corr__cholesky__log_8hpp.html @@ -0,0 +1,178 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/lkj_corr_cholesky_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
lkj_corr_cholesky_log.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_positive.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/mat/fun/factor_cov_matrix.hpp>
+#include <stan/math/prim/mat/fun/factor_U.hpp>
+#include <stan/math/prim/mat/fun/read_corr_L.hpp>
+#include <stan/math/prim/mat/fun/read_corr_matrix.hpp>
+#include <stan/math/prim/mat/fun/read_cov_L.hpp>
+#include <stan/math/prim/mat/fun/read_cov_matrix.hpp>
+#include <stan/math/prim/mat/fun/make_nu.hpp>
+#include <stan/math/prim/scal/fun/identity_constrain.hpp>
+#include <stan/math/prim/scal/fun/identity_free.hpp>
+#include <stan/math/prim/scal/fun/positive_constrain.hpp>
+#include <stan/math/prim/scal/fun/positive_free.hpp>
+#include <stan/math/prim/scal/fun/lb_constrain.hpp>
+#include <stan/math/prim/scal/fun/lb_free.hpp>
+#include <stan/math/prim/scal/fun/ub_constrain.hpp>
+#include <stan/math/prim/scal/fun/ub_free.hpp>
+#include <stan/math/prim/scal/fun/lub_constrain.hpp>
+#include <stan/math/prim/scal/fun/lub_free.hpp>
+#include <stan/math/prim/scal/fun/prob_constrain.hpp>
+#include <stan/math/prim/scal/fun/prob_free.hpp>
+#include <stan/math/prim/scal/fun/corr_constrain.hpp>
+#include <stan/math/prim/scal/fun/corr_free.hpp>
+#include <stan/math/prim/mat/fun/unit_vector_constrain.hpp>
+#include <stan/math/prim/mat/fun/unit_vector_free.hpp>
+#include <stan/math/prim/mat/fun/simplex_constrain.hpp>
+#include <stan/math/prim/mat/fun/simplex_free.hpp>
+#include <stan/math/prim/mat/fun/ordered_constrain.hpp>
+#include <stan/math/prim/mat/fun/ordered_free.hpp>
+#include <stan/math/prim/mat/fun/positive_ordered_constrain.hpp>
+#include <stan/math/prim/mat/fun/positive_ordered_free.hpp>
+#include <stan/math/prim/mat/fun/cholesky_factor_constrain.hpp>
+#include <stan/math/prim/mat/fun/cholesky_factor_free.hpp>
+#include <stan/math/prim/mat/fun/cholesky_corr_constrain.hpp>
+#include <stan/math/prim/mat/fun/cholesky_corr_free.hpp>
+#include <stan/math/prim/mat/fun/corr_matrix_constrain.hpp>
+#include <stan/math/prim/mat/fun/corr_matrix_free.hpp>
+#include <stan/math/prim/mat/fun/cov_matrix_constrain.hpp>
+#include <stan/math/prim/mat/fun/cov_matrix_free.hpp>
+#include <stan/math/prim/mat/fun/cov_matrix_constrain_lkj.hpp>
+#include <stan/math/prim/mat/fun/cov_matrix_free_lkj.hpp>
+#include <stan/math/prim/mat/prob/lkj_corr_log.hpp>
+#include <stan/math/prim/mat/fun/multiply.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<bool propto, typename T_covar , typename T_shape >
boost::math::tools::promote_args
+< T_covar, T_shape >::type 
stan::math::lkj_corr_cholesky_log (const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L, const T_shape &eta)
 
template<typename T_covar , typename T_shape >
boost::math::tools::promote_args
+< T_covar, T_shape >::type 
stan::math::lkj_corr_cholesky_log (const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L, const T_shape &eta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/lkj__corr__cholesky__log_8hpp_source.html b/doc/api/html/lkj__corr__cholesky__log_8hpp_source.html new file mode 100644 index 00000000000..f60bcd13340 --- /dev/null +++ b/doc/api/html/lkj__corr__cholesky__log_8hpp_source.html @@ -0,0 +1,270 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/lkj_corr_cholesky_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
lkj_corr_cholesky_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_LKJ_CORR_CHOLESKY_LOG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_LKJ_CORR_CHOLESKY_LOG_HPP
+
3 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
49 
+
50 namespace stan {
+
51  namespace math {
+
52 
+
53  // LKJ_Corr(L|eta) [ L Cholesky factor of correlation matrix
+
54  // eta > 0; eta == 1 <-> uniform]
+
55  template <bool propto,
+
56  typename T_covar, typename T_shape>
+
57  typename boost::math::tools::promote_args<T_covar, T_shape>::type
+
58  lkj_corr_cholesky_log(const Eigen::Matrix
+
59  <T_covar, Eigen::Dynamic, Eigen::Dynamic>& L,
+
60  const T_shape& eta) {
+
61  static const char* function("stan::math::lkj_corr_cholesky_log");
+
62 
+
63  using boost::math::tools::promote_args;
+ + +
66  using stan::math::sum;
+
67 
+
68  typedef typename promote_args<T_covar, T_shape>::type lp_ret;
+
69  lp_ret lp(0.0);
+
70  check_positive(function, "Shape parameter", eta);
+
71  check_lower_triangular(function, "Random variable", L);
+
72 
+
73  const unsigned int K = L.rows();
+
74  if (K == 0)
+
75  return 0.0;
+
76 
+ +
78  lp += do_lkj_constant(eta, K);
+ +
80  const int Km1 = K - 1;
+
81  Eigen::Matrix<T_covar, Eigen::Dynamic, 1> log_diagonals =
+
82  L.diagonal().tail(Km1).array().log();
+
83  Eigen::Matrix<lp_ret, Eigen::Dynamic, 1> values(Km1);
+
84  for (int k = 0; k < Km1; k++)
+
85  values(k) = (Km1 - k - 1) * log_diagonals(k);
+
86  if ( (eta == 1.0) &&
+ +
88  lp += sum(values);
+
89  return(lp);
+
90  }
+
91  values += multiply(2.0 * eta - 2.0, log_diagonals);
+
92  lp += sum(values);
+
93  }
+
94 
+
95  return lp;
+
96  }
+
97 
+
98  template <typename T_covar, typename T_shape>
+
99  inline
+
100  typename boost::math::tools::promote_args<T_covar, T_shape>::type
+
101  lkj_corr_cholesky_log(const Eigen::Matrix
+
102  <T_covar, Eigen::Dynamic, Eigen::Dynamic>& L,
+
103  const T_shape& eta) {
+
104  return lkj_corr_cholesky_log<false>(L, eta);
+
105  }
+
106 
+
107  }
+
108 }
+
109 #endif
+ +
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+ + + +
Metaprogramming struct to detect whether a given type is constant in the mathematical sense (not the ...
Definition: is_constant.hpp:22
+ + + + +
Eigen::Matrix< fvar< T >, R1, C1 > multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m, const fvar< T > &c)
Definition: multiply.hpp:20
+ + + +
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ + + + + +
boost::math::tools::promote_args< T_covar, T_shape >::type lkj_corr_cholesky_log(const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L, const T_shape &eta)
+ + + + +
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ + + + + + +
bool check_lower_triangular(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is lower triangular.
+ + + + + + + + + + +
T_shape do_lkj_constant(const T_shape &eta, const unsigned int &K)
+ + + + + + + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/lkj__corr__cholesky__rng_8hpp.html b/doc/api/html/lkj__corr__cholesky__rng_8hpp.html new file mode 100644 index 00000000000..a280675c6df --- /dev/null +++ b/doc/api/html/lkj__corr__cholesky__rng_8hpp.html @@ -0,0 +1,172 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/lkj_corr_cholesky_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
lkj_corr_cholesky_rng.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_positive.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/prob/beta_rng.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/mat/fun/factor_cov_matrix.hpp>
+#include <stan/math/prim/mat/fun/factor_U.hpp>
+#include <stan/math/prim/mat/fun/read_corr_L.hpp>
+#include <stan/math/prim/mat/fun/read_corr_matrix.hpp>
+#include <stan/math/prim/mat/fun/read_cov_L.hpp>
+#include <stan/math/prim/mat/fun/read_cov_matrix.hpp>
+#include <stan/math/prim/mat/fun/make_nu.hpp>
+#include <stan/math/prim/scal/fun/identity_constrain.hpp>
+#include <stan/math/prim/scal/fun/identity_free.hpp>
+#include <stan/math/prim/scal/fun/positive_constrain.hpp>
+#include <stan/math/prim/scal/fun/positive_free.hpp>
+#include <stan/math/prim/scal/fun/lb_constrain.hpp>
+#include <stan/math/prim/scal/fun/lb_free.hpp>
+#include <stan/math/prim/scal/fun/ub_constrain.hpp>
+#include <stan/math/prim/scal/fun/ub_free.hpp>
+#include <stan/math/prim/scal/fun/lub_constrain.hpp>
+#include <stan/math/prim/scal/fun/lub_free.hpp>
+#include <stan/math/prim/scal/fun/prob_constrain.hpp>
+#include <stan/math/prim/scal/fun/prob_free.hpp>
+#include <stan/math/prim/scal/fun/corr_constrain.hpp>
+#include <stan/math/prim/scal/fun/corr_free.hpp>
+#include <stan/math/prim/mat/fun/unit_vector_constrain.hpp>
+#include <stan/math/prim/mat/fun/unit_vector_free.hpp>
+#include <stan/math/prim/mat/fun/simplex_constrain.hpp>
+#include <stan/math/prim/mat/fun/simplex_free.hpp>
+#include <stan/math/prim/mat/fun/ordered_constrain.hpp>
+#include <stan/math/prim/mat/fun/ordered_free.hpp>
+#include <stan/math/prim/mat/fun/positive_ordered_constrain.hpp>
+#include <stan/math/prim/mat/fun/positive_ordered_free.hpp>
+#include <stan/math/prim/mat/fun/cholesky_factor_constrain.hpp>
+#include <stan/math/prim/mat/fun/cholesky_factor_free.hpp>
+#include <stan/math/prim/mat/fun/cholesky_corr_constrain.hpp>
+#include <stan/math/prim/mat/fun/cholesky_corr_free.hpp>
+#include <stan/math/prim/mat/fun/corr_matrix_constrain.hpp>
+#include <stan/math/prim/mat/fun/corr_matrix_free.hpp>
+#include <stan/math/prim/mat/fun/cov_matrix_constrain.hpp>
+#include <stan/math/prim/mat/fun/cov_matrix_free.hpp>
+#include <stan/math/prim/mat/fun/cov_matrix_constrain_lkj.hpp>
+#include <stan/math/prim/mat/fun/cov_matrix_free_lkj.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
Eigen::MatrixXd stan::math::lkj_corr_cholesky_rng (const size_t K, const double eta, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/lkj__corr__cholesky__rng_8hpp_source.html b/doc/api/html/lkj__corr__cholesky__rng_8hpp_source.html new file mode 100644 index 00000000000..3f1c6bd4346 --- /dev/null +++ b/doc/api/html/lkj__corr__cholesky__rng_8hpp_source.html @@ -0,0 +1,234 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/lkj_corr_cholesky_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
lkj_corr_cholesky_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_LKJ_CORR_CHOLESKY_RNG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_LKJ_CORR_CHOLESKY_RNG_HPP
+
3 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
48 
+
49 namespace stan {
+
50  namespace math {
+
51 
+
52  template <class RNG>
+
53  inline Eigen::MatrixXd
+
54  lkj_corr_cholesky_rng(const size_t K,
+
55  const double eta,
+
56  RNG& rng) {
+
57  static const char* function("stan::math::lkj_corr_cholesky_rng");
+
58 
+ +
60 
+
61  check_positive(function, "Shape parameter", eta);
+
62 
+
63  Eigen::ArrayXd CPCs((K * (K - 1)) / 2);
+
64  double alpha = eta + 0.5 * (K - 1);
+
65  unsigned int count = 0;
+
66  for (size_t i = 0; i < (K - 1); i++) {
+
67  alpha -= 0.5;
+
68  for (size_t j = i + 1; j < K; j++) {
+
69  CPCs(count) = 2.0 * stan::math::beta_rng(alpha, alpha, rng) - 1.0;
+
70  count++;
+
71  }
+
72  }
+
73  return stan::math::read_corr_L(CPCs, K);
+
74  }
+
75 
+
76  }
+
77 }
+
78 #endif
+ + +
double beta_rng(const double alpha, const double beta, RNG &rng)
Definition: beta_rng.hpp:30
+ + + + + + + + + + + + + + + + + +
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ + + + +
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > read_corr_L(const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const size_t K)
Return the Cholesky factor of the correlation matrix of the specified dimensionality corresponding to...
Definition: read_corr_L.hpp:41
+
Eigen::MatrixXd lkj_corr_cholesky_rng(const size_t K, const double eta, RNG &rng)
+ + + + + + + + + + + + + + + + + + + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/lkj__corr__log_8hpp.html b/doc/api/html/lkj__corr__log_8hpp.html new file mode 100644 index 00000000000..ab7d0e45a01 --- /dev/null +++ b/doc/api/html/lkj__corr__log_8hpp.html @@ -0,0 +1,182 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/lkj_corr_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
lkj_corr_log.hpp File Reference
+
+
+
#include <stan/math/prim/mat/err/check_corr_matrix.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_positive.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/fun/lgamma.hpp>
+#include <stan/math/prim/mat/fun/factor_cov_matrix.hpp>
+#include <stan/math/prim/mat/fun/factor_U.hpp>
+#include <stan/math/prim/mat/fun/read_corr_L.hpp>
+#include <stan/math/prim/mat/fun/read_corr_matrix.hpp>
+#include <stan/math/prim/mat/fun/read_cov_L.hpp>
+#include <stan/math/prim/mat/fun/read_cov_matrix.hpp>
+#include <stan/math/prim/mat/fun/make_nu.hpp>
+#include <stan/math/prim/scal/fun/identity_constrain.hpp>
+#include <stan/math/prim/scal/fun/identity_free.hpp>
+#include <stan/math/prim/scal/fun/positive_constrain.hpp>
+#include <stan/math/prim/scal/fun/positive_free.hpp>
+#include <stan/math/prim/scal/fun/lb_constrain.hpp>
+#include <stan/math/prim/scal/fun/lb_free.hpp>
+#include <stan/math/prim/scal/fun/ub_constrain.hpp>
+#include <stan/math/prim/scal/fun/ub_free.hpp>
+#include <stan/math/prim/scal/fun/lub_constrain.hpp>
+#include <stan/math/prim/scal/fun/lub_free.hpp>
+#include <stan/math/prim/scal/fun/prob_constrain.hpp>
+#include <stan/math/prim/scal/fun/prob_free.hpp>
+#include <stan/math/prim/scal/fun/corr_constrain.hpp>
+#include <stan/math/prim/scal/fun/corr_free.hpp>
+#include <stan/math/prim/mat/fun/unit_vector_constrain.hpp>
+#include <stan/math/prim/mat/fun/unit_vector_free.hpp>
+#include <stan/math/prim/mat/fun/simplex_constrain.hpp>
+#include <stan/math/prim/mat/fun/simplex_free.hpp>
+#include <stan/math/prim/mat/fun/ordered_constrain.hpp>
+#include <stan/math/prim/mat/fun/ordered_free.hpp>
+#include <stan/math/prim/mat/fun/positive_ordered_constrain.hpp>
+#include <stan/math/prim/mat/fun/positive_ordered_free.hpp>
+#include <stan/math/prim/mat/fun/cholesky_factor_constrain.hpp>
+#include <stan/math/prim/mat/fun/cholesky_factor_free.hpp>
+#include <stan/math/prim/mat/fun/cholesky_corr_constrain.hpp>
+#include <stan/math/prim/mat/fun/cholesky_corr_free.hpp>
+#include <stan/math/prim/mat/fun/corr_matrix_constrain.hpp>
+#include <stan/math/prim/mat/fun/corr_matrix_free.hpp>
+#include <stan/math/prim/mat/fun/cov_matrix_constrain.hpp>
+#include <stan/math/prim/mat/fun/cov_matrix_free.hpp>
+#include <stan/math/prim/mat/fun/cov_matrix_constrain_lkj.hpp>
+#include <stan/math/prim/mat/fun/cov_matrix_free_lkj.hpp>
+#include <stan/math/prim/mat/fun/sum.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T_shape >
T_shape stan::math::do_lkj_constant (const T_shape &eta, const unsigned int &K)
 
template<bool propto, typename T_y , typename T_shape >
boost::math::tools::promote_args
+< T_y, T_shape >::type 
stan::math::lkj_corr_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const T_shape &eta)
 
template<typename T_y , typename T_shape >
boost::math::tools::promote_args
+< T_y, T_shape >::type 
stan::math::lkj_corr_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const T_shape &eta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/lkj__corr__log_8hpp_source.html b/doc/api/html/lkj__corr__log_8hpp_source.html new file mode 100644 index 00000000000..0a9b1ec896c --- /dev/null +++ b/doc/api/html/lkj__corr__log_8hpp_source.html @@ -0,0 +1,296 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/lkj_corr_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
lkj_corr_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_LKJ_CORR_LOG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_LKJ_CORR_LOG_HPP
+
3 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
50 
+
51 namespace stan {
+
52  namespace math {
+
53 
+
54  template <typename T_shape>
+
55  T_shape do_lkj_constant(const T_shape& eta, const unsigned int& K) {
+
56  using stan::math::sum;
+
57  using stan::math::lgamma;
+
58 
+
59  // Lewandowski, Kurowicka, and Joe (2009) theorem 5
+
60  T_shape constant;
+
61  const int Km1 = K - 1;
+
62  if (eta == 1.0) {
+
63  // C++ integer division is appropriate in this block
+
64  Eigen::VectorXd numerator(Km1 / 2);
+
65  for (int k = 1; k <= numerator.rows(); k++)
+
66  numerator(k-1) = lgamma(2 * k);
+
67  constant = sum(numerator);
+
68  if ( (K % 2) == 1 )
+
69  constant += 0.25 * (K * K - 1) * LOG_PI
+
70  - 0.25 * (Km1 * Km1) * LOG_TWO - Km1 * lgamma((K + 1) / 2);
+
71  else
+
72  constant += 0.25 * K * (K - 2) * LOG_PI
+
73  + 0.25 * (3 * K * K - 4 * K) * LOG_TWO
+
74  + K * lgamma(K / 2) - Km1 * lgamma(K);
+
75  } else {
+
76  constant = -Km1 * lgamma(eta + 0.5 * Km1);
+
77  for (int k = 1; k <= Km1; k++)
+
78  constant += 0.5 * k * LOG_PI + lgamma(eta + 0.5 * (Km1 - k));
+
79  }
+
80  return constant;
+
81  }
+
82 
+
83  // LKJ_Corr(y|eta) [ y correlation matrix (not covariance matrix)
+
84  // eta > 0; eta == 1 <-> uniform]
+
85  template <bool propto,
+
86  typename T_y, typename T_shape>
+
87  typename boost::math::tools::promote_args<T_y, T_shape>::type
+
88  lkj_corr_log(const Eigen::Matrix<T_y, Eigen::Dynamic, Eigen::Dynamic>& y,
+
89  const T_shape& eta) {
+
90  static const char* function("stan::math::lkj_corr_log");
+
91 
+ + +
94  using stan::math::sum;
+
95  using boost::math::tools::promote_args;
+
96 
+
97  typename promote_args<T_y, T_shape>::type lp(0.0);
+
98  check_positive(function, "Shape parameter", eta);
+
99  check_corr_matrix(function, "Correlation matrix", y);
+
100 
+
101  const unsigned int K = y.rows();
+
102  if (K == 0)
+
103  return 0.0;
+
104 
+ +
106  lp += do_lkj_constant(eta, K);
+
107 
+
108  if ( (eta == 1.0) &&
+ +
110  return lp;
+
111 
+ +
113  return lp;
+
114 
+
115  Eigen::Matrix<T_y, Eigen::Dynamic, 1> values =
+
116  y.ldlt().vectorD().array().log().matrix();
+
117  lp += (eta - 1.0) * sum(values);
+
118  return lp;
+
119  }
+
120 
+
121  template <typename T_y, typename T_shape>
+
122  inline
+
123  typename boost::math::tools::promote_args<T_y, T_shape>::type
+
124  lkj_corr_log(const Eigen::Matrix<T_y, Eigen::Dynamic, Eigen::Dynamic>& y,
+
125  const T_shape& eta) {
+
126  return lkj_corr_log<false>(y, eta);
+
127  }
+
128 
+
129  }
+
130 }
+
131 #endif
+ +
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+ +
Metaprogramming struct to detect whether a given type is constant in the mathematical sense (not the ...
Definition: is_constant.hpp:22
+ +
Metaprogram structure to determine the base scalar type of a template argument.
Definition: scalar_type.hpp:37
+
boost::math::tools::promote_args< T_y, T_shape >::type lkj_corr_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const T_shape &eta)
+
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
+ + + +
const double LOG_PI
Definition: constants.hpp:170
+ + + + +
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
const double LOG_TWO
Definition: constants.hpp:177
+ + + + + + + + + + +
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ + + + + + + + + + + + + + + + + +
T_shape do_lkj_constant(const T_shape &eta, const unsigned int &K)
+ + + + + + + +
bool check_corr_matrix(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is a valid correlation matrix.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/lkj__corr__rng_8hpp.html b/doc/api/html/lkj__corr__rng_8hpp.html new file mode 100644 index 00000000000..d05504649af --- /dev/null +++ b/doc/api/html/lkj__corr__rng_8hpp.html @@ -0,0 +1,172 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/lkj_corr_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
lkj_corr_rng.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_positive.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/mat/fun/factor_cov_matrix.hpp>
+#include <stan/math/prim/mat/fun/factor_U.hpp>
+#include <stan/math/prim/mat/fun/read_corr_L.hpp>
+#include <stan/math/prim/mat/fun/read_corr_matrix.hpp>
+#include <stan/math/prim/mat/fun/read_cov_L.hpp>
+#include <stan/math/prim/mat/fun/read_cov_matrix.hpp>
+#include <stan/math/prim/mat/fun/make_nu.hpp>
+#include <stan/math/prim/scal/fun/identity_constrain.hpp>
+#include <stan/math/prim/scal/fun/identity_free.hpp>
+#include <stan/math/prim/scal/fun/positive_constrain.hpp>
+#include <stan/math/prim/scal/fun/positive_free.hpp>
+#include <stan/math/prim/scal/fun/lb_constrain.hpp>
+#include <stan/math/prim/scal/fun/lb_free.hpp>
+#include <stan/math/prim/scal/fun/ub_constrain.hpp>
+#include <stan/math/prim/scal/fun/ub_free.hpp>
+#include <stan/math/prim/scal/fun/lub_constrain.hpp>
+#include <stan/math/prim/scal/fun/lub_free.hpp>
+#include <stan/math/prim/scal/fun/prob_constrain.hpp>
+#include <stan/math/prim/scal/fun/prob_free.hpp>
+#include <stan/math/prim/scal/fun/corr_constrain.hpp>
+#include <stan/math/prim/scal/fun/corr_free.hpp>
+#include <stan/math/prim/mat/fun/unit_vector_constrain.hpp>
+#include <stan/math/prim/mat/fun/unit_vector_free.hpp>
+#include <stan/math/prim/mat/fun/simplex_constrain.hpp>
+#include <stan/math/prim/mat/fun/simplex_free.hpp>
+#include <stan/math/prim/mat/fun/ordered_constrain.hpp>
+#include <stan/math/prim/mat/fun/ordered_free.hpp>
+#include <stan/math/prim/mat/fun/positive_ordered_constrain.hpp>
+#include <stan/math/prim/mat/fun/positive_ordered_free.hpp>
+#include <stan/math/prim/mat/fun/cholesky_factor_constrain.hpp>
+#include <stan/math/prim/mat/fun/cholesky_factor_free.hpp>
+#include <stan/math/prim/mat/fun/cholesky_corr_constrain.hpp>
+#include <stan/math/prim/mat/fun/cholesky_corr_free.hpp>
+#include <stan/math/prim/mat/fun/corr_matrix_constrain.hpp>
+#include <stan/math/prim/mat/fun/corr_matrix_free.hpp>
+#include <stan/math/prim/mat/fun/cov_matrix_constrain.hpp>
+#include <stan/math/prim/mat/fun/cov_matrix_free.hpp>
+#include <stan/math/prim/mat/fun/cov_matrix_constrain_lkj.hpp>
+#include <stan/math/prim/mat/fun/cov_matrix_free_lkj.hpp>
+#include <stan/math/prim/mat/prob/lkj_corr_cholesky_rng.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
Eigen::MatrixXd stan::math::lkj_corr_rng (const size_t K, const double eta, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/lkj__corr__rng_8hpp_source.html b/doc/api/html/lkj__corr__rng_8hpp_source.html new file mode 100644 index 00000000000..2dae8a0701f --- /dev/null +++ b/doc/api/html/lkj__corr__rng_8hpp_source.html @@ -0,0 +1,226 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/lkj_corr_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
lkj_corr_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_LKJ_CORR_RNG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_LKJ_CORR_RNG_HPP
+
3 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
48 
+
49 namespace stan {
+
50  namespace math {
+
51 
+
52  template <class RNG>
+
53  inline Eigen::MatrixXd
+
54  lkj_corr_rng(const size_t K,
+
55  const double eta,
+
56  RNG& rng) {
+
57  static const char* function("stan::math::lkj_corr_rng");
+
58 
+ +
60 
+
61  check_positive(function, "Shape parameter", eta);
+
62 
+ + +
65  rng));
+
66  }
+
67 
+
68  }
+
69 }
+
70 #endif
+ + +
Eigen::MatrixXd lkj_corr_rng(const size_t K, const double eta, RNG &rng)
+ + + + + + + + + +
Eigen::Matrix< fvar< T >, R, R > multiply_lower_tri_self_transpose(const Eigen::Matrix< fvar< T >, R, C > &m)
+ + + + + + + +
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ + + + +
Eigen::MatrixXd lkj_corr_cholesky_rng(const size_t K, const double eta, RNG &rng)
+ + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/lkj__cov__log_8hpp.html b/doc/api/html/lkj__cov__log_8hpp.html new file mode 100644 index 00000000000..06f9c63e05f --- /dev/null +++ b/doc/api/html/lkj__cov__log_8hpp.html @@ -0,0 +1,153 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/lkj_cov_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
lkj_cov_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_shape >
boost::math::tools::promote_args
+< T_y, T_loc, T_scale, T_shape >
+::type 
stan::math::lkj_cov_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_scale, Eigen::Dynamic, 1 > &sigma, const T_shape &eta)
 
template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
boost::math::tools::promote_args
+< T_y, T_loc, T_scale, T_shape >
+::type 
stan::math::lkj_cov_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_scale, Eigen::Dynamic, 1 > &sigma, const T_shape &eta)
 
template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_shape >
boost::math::tools::promote_args
+< T_y, T_loc, T_scale, T_shape >
+::type 
stan::math::lkj_cov_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const T_loc &mu, const T_scale &sigma, const T_shape &eta)
 
template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
boost::math::tools::promote_args
+< T_y, T_loc, T_scale, T_shape >
+::type 
stan::math::lkj_cov_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const T_loc &mu, const T_scale &sigma, const T_shape &eta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/lkj__cov__log_8hpp_source.html b/doc/api/html/lkj__cov__log_8hpp_source.html new file mode 100644 index 00000000000..d3611d41d33 --- /dev/null +++ b/doc/api/html/lkj__cov__log_8hpp_source.html @@ -0,0 +1,257 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/lkj_cov_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
lkj_cov_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_LKJ_COV_LOG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_LKJ_COV_LOG_HPP
+
3 
+ + + + +
8 
+ + + + +
13 
+
14 namespace stan {
+
15 
+
16  namespace math {
+
17 
+
18  // LKJ_cov(y|mu, sigma, eta) [ y covariance matrix (not correlation matrix)
+
19  // mu vector, sigma > 0 vector, eta > 0 ]
+
20  template <bool propto,
+
21  typename T_y, typename T_loc, typename T_scale, typename T_shape>
+
22  typename
+
23  boost::math::tools::promote_args<T_y, T_loc, T_scale, T_shape>::type
+
24  lkj_cov_log(const Eigen::Matrix<T_y, Eigen::Dynamic, Eigen::Dynamic>& y,
+
25  const Eigen::Matrix<T_loc, Eigen::Dynamic, 1>& mu,
+
26  const Eigen::Matrix<T_scale, Eigen::Dynamic, 1>& sigma,
+
27  const T_shape& eta) {
+
28  static const char* function("stan::math::lkj_cov_log");
+
29 
+ + + + +
34  using boost::math::tools::promote_args;
+
35 
+
36  typename promote_args<T_y, T_loc, T_scale, T_shape>::type lp(0.0);
+
37  check_size_match(function,
+
38  "Rows of location parameter", mu.rows(),
+
39  "columns of scale parameter", sigma.rows());
+
40  check_square(function, "random variable", y);
+
41  check_size_match(function,
+
42  "Rows of random variable", y.rows(),
+
43  "rows of location parameter", mu.rows());
+
44  check_positive(function, "Shape parameter", eta);
+
45  check_finite(function, "Location parameter", mu);
+
46  check_finite(function, "Scale parameter", sigma);
+
47  // FIXME: build vectorized versions
+
48  for (int m = 0; m < y.rows(); ++m)
+
49  for (int n = 0; n < y.cols(); ++n)
+
50  check_finite(function, "Covariance matrix", y(m, n));
+
51 
+
52  const unsigned int K = y.rows();
+
53  const Eigen::Array<T_y, Eigen::Dynamic, 1> sds
+
54  = y.diagonal().array().sqrt();
+
55  for (unsigned int k = 0; k < K; k++) {
+
56  lp += lognormal_log<propto>(sds(k), mu(k), sigma(k));
+
57  }
+
58  if (stan::is_constant<typename stan::scalar_type<T_shape> >::value
+
59  && eta == 1.0) {
+
60  // no need to rescale y into a correlation matrix
+
61  lp += lkj_corr_log<propto, T_y, T_shape>(y, eta);
+
62  return lp;
+
63  }
+
64  Eigen::DiagonalMatrix<T_y, Eigen::Dynamic> D(K);
+
65  D.diagonal() = sds.inverse();
+
66  lp += lkj_corr_log<propto, T_y, T_shape>(D * y * D, eta);
+
67  return lp;
+
68  }
+
69 
+
70  template <typename T_y, typename T_loc, typename T_scale, typename T_shape>
+
71  inline
+
72  typename
+
73  boost::math::tools::promote_args<T_y, T_loc, T_scale, T_shape>::type
+
74  lkj_cov_log(const Eigen::Matrix<T_y, Eigen::Dynamic, Eigen::Dynamic>& y,
+
75  const Eigen::Matrix<T_loc, Eigen::Dynamic, 1>& mu,
+
76  const Eigen::Matrix<T_scale, Eigen::Dynamic, 1>& sigma,
+
77  const T_shape& eta) {
+
78  return lkj_cov_log<false>(y, mu, sigma, eta);
+
79  }
+
80 
+
81  // LKJ_Cov(y|mu, sigma, eta) [ y covariance matrix (not correlation matrix)
+
82  // mu scalar, sigma > 0 scalar, eta > 0 ]
+
83  template <bool propto,
+
84  typename T_y, typename T_loc, typename T_scale, typename T_shape>
+
85  typename
+
86  boost::math::tools::promote_args<T_y, T_loc, T_scale, T_shape>::type
+
87  lkj_cov_log(const Eigen::Matrix<T_y, Eigen::Dynamic, Eigen::Dynamic>& y,
+
88  const T_loc& mu,
+
89  const T_scale& sigma,
+
90  const T_shape& eta) {
+
91  static const char* function("stan::math::lkj_cov_log");
+
92 
+ + +
95  using boost::math::tools::promote_args;
+
96 
+
97  typename promote_args<T_y, T_loc, T_scale, T_shape>::type lp(0.0);
+
98  check_positive(function, "Shape parameter", eta);
+
99  check_finite(function, "Location parameter", mu);
+
100  check_finite(function, "Scale parameter", sigma);
+
101 
+
102  const unsigned int K = y.rows();
+
103  const Eigen::Array<T_y, Eigen::Dynamic, 1> sds
+
104  = y.diagonal().array().sqrt();
+
105  for (unsigned int k = 0; k < K; k++) {
+
106  lp += lognormal_log<propto>(sds(k), mu, sigma);
+
107  }
+
108  if (stan::is_constant<typename stan::scalar_type<T_shape> >::value
+
109  && eta == 1.0) {
+
110  // no need to rescale y into a correlation matrix
+
111  lp += lkj_corr_log<propto>(y, eta);
+
112  return lp;
+
113  }
+
114  Eigen::DiagonalMatrix<T_y, Eigen::Dynamic> D(K);
+
115  D.diagonal() = sds.inverse();
+
116  lp += lkj_corr_log<propto, T_y, T_shape>(D * y * D, eta);
+
117  return lp;
+
118  }
+
119 
+
120  template <typename T_y, typename T_loc, typename T_scale, typename T_shape>
+
121  inline
+
122  typename boost::math::tools::promote_args
+
123  <T_y, T_loc, T_scale, T_shape>::type
+
124  lkj_cov_log(const Eigen::Matrix<T_y, Eigen::Dynamic, Eigen::Dynamic>& y,
+
125  const T_loc& mu,
+
126  const T_scale& sigma,
+
127  const T_shape& eta) {
+
128  return lkj_cov_log<false>(y, mu, sigma, eta);
+
129  }
+
130 
+
131 
+
132  }
+
133 }
+
134 #endif
+
boost::math::tools::promote_args< T_y, T_loc, T_scale, T_shape >::type lkj_cov_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_scale, Eigen::Dynamic, 1 > &sigma, const T_shape &eta)
Definition: lkj_cov_log.hpp:24
+ +
Metaprogramming struct to detect whether a given type is constant in the mathematical sense (not the ...
Definition: is_constant.hpp:22
+
Metaprogram structure to determine the base scalar type of a template argument.
Definition: scalar_type.hpp:37
+ + + + +
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+
bool check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Return true if the provided sizes match.
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + +
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/logical__and_8hpp.html b/doc/api/html/logical__and_8hpp.html new file mode 100644 index 00000000000..f7ce6830283 --- /dev/null +++ b/doc/api/html/logical__and_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/logical_and.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
logical_and.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T1 , typename T2 >
int stan::math::logical_and (const T1 x1, const T2 x2)
 The logical and function which returns 1 if both arguments are unequal to zero and 0 otherwise. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/logical__and_8hpp_source.html b/doc/api/html/logical__and_8hpp_source.html new file mode 100644 index 00000000000..f33b1ef9f2e --- /dev/null +++ b/doc/api/html/logical__and_8hpp_source.html @@ -0,0 +1,125 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/logical_and.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
logical_and.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LOGICAL_AND_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LOGICAL_AND_HPP
+
3 
+
4 namespace stan {
+
5  namespace math {
+
6 
+
28  template <typename T1, typename T2>
+
29  inline int
+
30  logical_and(const T1 x1, const T2 x2) {
+
31  return (x1 != 0) && (x2 != 0);
+
32  }
+
33 
+
34  }
+
35 }
+
36 
+
37 #endif
+
int logical_and(const T1 x1, const T2 x2)
The logical and function which returns 1 if both arguments are unequal to zero and 0 otherwise...
Definition: logical_and.hpp:30
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/logical__eq_8hpp.html b/doc/api/html/logical__eq_8hpp.html new file mode 100644 index 00000000000..cfb8619c119 --- /dev/null +++ b/doc/api/html/logical__eq_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/logical_eq.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
logical_eq.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T1 , typename T2 >
int stan::math::logical_eq (const T1 x1, const T2 x2)
 Return 1 if the first argument is equal to the second. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/logical__eq_8hpp_source.html b/doc/api/html/logical__eq_8hpp_source.html new file mode 100644 index 00000000000..4d1add7c52d --- /dev/null +++ b/doc/api/html/logical__eq_8hpp_source.html @@ -0,0 +1,125 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/logical_eq.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
logical_eq.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LOGICAL_EQ_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LOGICAL_EQ_HPP
+
3 
+
4 namespace stan {
+
5  namespace math {
+
6 
+
17  template <typename T1, typename T2>
+
18  inline int
+
19  logical_eq(const T1 x1, const T2 x2) {
+
20  return x1 == x2;
+
21  }
+
22 
+
23  }
+
24 }
+
25 
+
26 #endif
+
int logical_eq(const T1 x1, const T2 x2)
Return 1 if the first argument is equal to the second.
Definition: logical_eq.hpp:19
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/logical__gt_8hpp.html b/doc/api/html/logical__gt_8hpp.html new file mode 100644 index 00000000000..2c0c2839a4c --- /dev/null +++ b/doc/api/html/logical__gt_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/logical_gt.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
logical_gt.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T1 , typename T2 >
int stan::math::logical_gt (const T1 x1, const T2 x2)
 Return 1 if the first argument is strictly greater than the second. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/logical__gt_8hpp_source.html b/doc/api/html/logical__gt_8hpp_source.html new file mode 100644 index 00000000000..6a127a8ab05 --- /dev/null +++ b/doc/api/html/logical__gt_8hpp_source.html @@ -0,0 +1,125 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/logical_gt.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
logical_gt.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LOGICAL_GT_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LOGICAL_GT_HPP
+
3 
+
4 namespace stan {
+
5  namespace math {
+
6 
+
17  template <typename T1, typename T2>
+
18  inline int
+
19  logical_gt(const T1 x1, const T2 x2) {
+
20  return x1 > x2;
+
21  }
+
22 
+
23  }
+
24 }
+
25 
+
26 #endif
+
int logical_gt(const T1 x1, const T2 x2)
Return 1 if the first argument is strictly greater than the second.
Definition: logical_gt.hpp:19
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/logical__gte_8hpp.html b/doc/api/html/logical__gte_8hpp.html new file mode 100644 index 00000000000..5f8641f00cc --- /dev/null +++ b/doc/api/html/logical__gte_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/logical_gte.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
logical_gte.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T1 , typename T2 >
int stan::math::logical_gte (const T1 x1, const T2 x2)
 Return 1 if the first argument is greater than or equal to the second. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/logical__gte_8hpp_source.html b/doc/api/html/logical__gte_8hpp_source.html new file mode 100644 index 00000000000..ed131963c77 --- /dev/null +++ b/doc/api/html/logical__gte_8hpp_source.html @@ -0,0 +1,125 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/logical_gte.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
logical_gte.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LOGICAL_GTE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LOGICAL_GTE_HPP
+
3 
+
4 namespace stan {
+
5  namespace math {
+
6 
+
17  template <typename T1, typename T2>
+
18  inline int
+
19  logical_gte(const T1 x1, const T2 x2) {
+
20  return x1 >= x2;
+
21  }
+
22 
+
23  }
+
24 }
+
25 
+
26 #endif
+
int logical_gte(const T1 x1, const T2 x2)
Return 1 if the first argument is greater than or equal to the second.
Definition: logical_gte.hpp:19
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/logical__lt_8hpp.html b/doc/api/html/logical__lt_8hpp.html new file mode 100644 index 00000000000..622b73a9bb2 --- /dev/null +++ b/doc/api/html/logical__lt_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/logical_lt.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
logical_lt.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T1 , typename T2 >
int stan::math::logical_lt (T1 x1, T2 x2)
 Return 1 if the first argument is strictly less than the second. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/logical__lt_8hpp_source.html b/doc/api/html/logical__lt_8hpp_source.html new file mode 100644 index 00000000000..f3b51840b0e --- /dev/null +++ b/doc/api/html/logical__lt_8hpp_source.html @@ -0,0 +1,126 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/logical_lt.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
logical_lt.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LOGICAL_LT_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LOGICAL_LT_HPP
+
3 
+
4 namespace stan {
+
5  namespace math {
+
6 
+
17  template <typename T1, typename T2>
+
18  inline
+
19  int
+
20  logical_lt(T1 x1, T2 x2) {
+
21  return x1 < x2;
+
22  }
+
23 
+
24  }
+
25 }
+
26 
+
27 #endif
+
int logical_lt(T1 x1, T2 x2)
Return 1 if the first argument is strictly less than the second.
Definition: logical_lt.hpp:20
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/logical__lte_8hpp.html b/doc/api/html/logical__lte_8hpp.html new file mode 100644 index 00000000000..eb3b048285d --- /dev/null +++ b/doc/api/html/logical__lte_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/logical_lte.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
logical_lte.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T1 , typename T2 >
int stan::math::logical_lte (const T1 x1, const T2 x2)
 Return 1 if the first argument is less than or equal to the second. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/logical__lte_8hpp_source.html b/doc/api/html/logical__lte_8hpp_source.html new file mode 100644 index 00000000000..d8ac4854c1f --- /dev/null +++ b/doc/api/html/logical__lte_8hpp_source.html @@ -0,0 +1,125 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/logical_lte.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
logical_lte.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LOGICAL_LTE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LOGICAL_LTE_HPP
+
3 
+
4 namespace stan {
+
5  namespace math {
+
6 
+
17  template <typename T1, typename T2>
+
18  inline int
+
19  logical_lte(const T1 x1, const T2 x2) {
+
20  return x1 <= x2;
+
21  }
+
22 
+
23  }
+
24 }
+
25 
+
26 #endif
+
int logical_lte(const T1 x1, const T2 x2)
Return 1 if the first argument is less than or equal to the second.
Definition: logical_lte.hpp:19
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/logical__negation_8hpp.html b/doc/api/html/logical__negation_8hpp.html new file mode 100644 index 00000000000..d0cb6b64e90 --- /dev/null +++ b/doc/api/html/logical__negation_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/logical_negation.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
logical_negation.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
int stan::math::logical_negation (const T x)
 The logical negation function which returns 1 if the input is equal to zero and 0 otherwise. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/logical__negation_8hpp_source.html b/doc/api/html/logical__negation_8hpp_source.html new file mode 100644 index 00000000000..44adf9ffd1b --- /dev/null +++ b/doc/api/html/logical__negation_8hpp_source.html @@ -0,0 +1,125 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/logical_negation.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
logical_negation.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LOGICAL_NEGATION_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LOGICAL_NEGATION_HPP
+
3 
+
4 namespace stan {
+
5  namespace math {
+
6 
+
15  template <typename T>
+
16  inline int
+
17  logical_negation(const T x) {
+
18  return (x == 0);
+
19  }
+
20 
+
21  }
+
22 }
+
23 
+
24 #endif
+
int logical_negation(const T x)
The logical negation function which returns 1 if the input is equal to zero and 0 otherwise...
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/logical__neq_8hpp.html b/doc/api/html/logical__neq_8hpp.html new file mode 100644 index 00000000000..7a0f9bae232 --- /dev/null +++ b/doc/api/html/logical__neq_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/logical_neq.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
logical_neq.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T1 , typename T2 >
int stan::math::logical_neq (const T1 x1, const T2 x2)
 Return 1 if the first argument is unequal to the second. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/logical__neq_8hpp_source.html b/doc/api/html/logical__neq_8hpp_source.html new file mode 100644 index 00000000000..2cb979411f3 --- /dev/null +++ b/doc/api/html/logical__neq_8hpp_source.html @@ -0,0 +1,124 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/logical_neq.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
logical_neq.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LOGICAL_NEQ_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LOGICAL_NEQ_HPP
+
3 
+
4 namespace stan {
+
5  namespace math {
+
6 
+
17  template <typename T1, typename T2>
+
18  inline int
+
19  logical_neq(const T1 x1, const T2 x2) {
+
20  return x1 != x2;
+
21  }
+
22 
+
23  }
+
24 }
+
25 #endif
+
int logical_neq(const T1 x1, const T2 x2)
Return 1 if the first argument is unequal to the second.
Definition: logical_neq.hpp:19
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/logical__or_8hpp.html b/doc/api/html/logical__or_8hpp.html new file mode 100644 index 00000000000..7b75666a968 --- /dev/null +++ b/doc/api/html/logical__or_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/logical_or.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
logical_or.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T1 , typename T2 >
int stan::math::logical_or (T1 x1, T2 x2)
 The logical or function which returns 1 if either argument is unequal to zero and 0 otherwise. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/logical__or_8hpp_source.html b/doc/api/html/logical__or_8hpp_source.html new file mode 100644 index 00000000000..2cf8a9b7e98 --- /dev/null +++ b/doc/api/html/logical__or_8hpp_source.html @@ -0,0 +1,125 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/logical_or.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
logical_or.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LOGICAL_OR_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LOGICAL_OR_HPP
+
3 
+
4 namespace stan {
+
5  namespace math {
+
6 
+
27  template <typename T1, typename T2>
+
28  inline int
+
29  logical_or(T1 x1, T2 x2) {
+
30  return (x1 != 0) || (x2 != 0);
+
31  }
+
32 
+
33  }
+
34 }
+
35 
+
36 #endif
+
int logical_or(T1 x1, T2 x2)
The logical or function which returns 1 if either argument is unequal to zero and 0 otherwise...
Definition: logical_or.hpp:29
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/logistic__ccdf__log_8hpp.html b/doc/api/html/logistic__ccdf__log_8hpp.html new file mode 100644 index 00000000000..f326ccd2b8a --- /dev/null +++ b/doc/api/html/logistic__ccdf__log_8hpp.html @@ -0,0 +1,150 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/logistic_ccdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
logistic_ccdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::logistic_ccdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/logistic__ccdf__log_8hpp_source.html b/doc/api/html/logistic__ccdf__log_8hpp_source.html new file mode 100644 index 00000000000..3908c476443 --- /dev/null +++ b/doc/api/html/logistic__ccdf__log_8hpp_source.html @@ -0,0 +1,258 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/logistic_ccdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
logistic_ccdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_LOGISTIC_CCDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_LOGISTIC_CCDF_LOG_HPP
+
3 
+
4 #include <boost/random/exponential_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + +
23 #include <cmath>
+
24 #include <limits>
+
25 
+
26 namespace stan {
+
27  namespace math {
+
28 
+
29  template <typename T_y, typename T_loc, typename T_scale>
+
30  typename return_type<T_y, T_loc, T_scale>::type
+
31  logistic_ccdf_log(const T_y& y, const T_loc& mu, const T_scale& sigma) {
+ +
33  T_partials_return;
+
34 
+
35  // Size checks
+
36  if ( !( stan::length(y) && stan::length(mu) && stan::length(sigma) ) )
+
37  return 0.0;
+
38 
+
39  // Error checks
+
40  static const char* function("stan::math::logistic_cdf_log");
+
41 
+ + + + + +
47  using boost::math::tools::promote_args;
+
48  using std::log;
+
49  using std::exp;
+
50 
+
51  T_partials_return P(0.0);
+
52 
+
53  check_not_nan(function, "Random variable", y);
+
54  check_finite(function, "Location parameter", mu);
+
55  check_positive_finite(function, "Scale parameter", sigma);
+
56  check_consistent_sizes(function,
+
57  "Random variable", y,
+
58  "Location parameter", mu,
+
59  "Scale parameter", sigma);
+
60 
+
61  // Wrap arguments in vectors
+
62  VectorView<const T_y> y_vec(y);
+
63  VectorView<const T_loc> mu_vec(mu);
+
64  VectorView<const T_scale> sigma_vec(sigma);
+
65  size_t N = max_size(y, mu, sigma);
+
66 
+ +
68  operands_and_partials(y, mu, sigma);
+
69 
+
70  // Explicit return for extreme values
+
71  // The gradients are technically ill-defined, but treated as zero
+
72 
+
73  for (size_t i = 0; i < stan::length(y); i++) {
+
74  if (value_of(y_vec[i]) == -std::numeric_limits<double>::infinity())
+
75  return operands_and_partials.to_var(0.0, y, mu, sigma);
+
76  }
+
77 
+
78  // Compute vectorized cdf_log and its gradients
+
79  for (size_t n = 0; n < N; n++) {
+
80  // Explicit results for extreme values
+
81  // The gradients are technically ill-defined, but treated as zero
+
82  if (value_of(y_vec[n]) == std::numeric_limits<double>::infinity()) {
+
83  return operands_and_partials.to_var(stan::math::negative_infinity(),
+
84  y, mu, sigma);
+
85  }
+
86 
+
87  // Pull out values
+
88  const T_partials_return y_dbl = value_of(y_vec[n]);
+
89  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
90  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
91  const T_partials_return sigma_inv_vec = 1.0 / value_of(sigma_vec[n]);
+
92 
+
93  // Compute
+
94  const T_partials_return Pn = 1.0 - 1.0 / (1.0 + exp(-(y_dbl - mu_dbl)
+
95  * sigma_inv_vec));
+
96  P += log(Pn);
+
97 
+ +
99  operands_and_partials.d_x1[n]
+
100  -= exp(logistic_log(y_dbl, mu_dbl, sigma_dbl)) / Pn;
+ +
102  operands_and_partials.d_x2[n]
+
103  -= - exp(logistic_log(y_dbl, mu_dbl, sigma_dbl)) / Pn;
+ +
105  operands_and_partials.d_x3[n] -= - (y_dbl - mu_dbl) * sigma_inv_vec
+
106  * exp(logistic_log(y_dbl, mu_dbl, sigma_dbl)) / Pn;
+
107  }
+
108 
+
109  return operands_and_partials.to_var(P, y, mu, sigma);
+
110  }
+
111  }
+
112 }
+
113 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
return_type< T_y, T_loc, T_scale >::type logistic_ccdf_log(const T_y &y, const T_loc &mu, const T_scale &sigma)
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
return_type< T_y, T_loc, T_scale >::type logistic_log(const T_y &y, const T_loc &mu, const T_scale &sigma)
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ + + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/logistic__cdf_8hpp.html b/doc/api/html/logistic__cdf_8hpp.html new file mode 100644 index 00000000000..c5f3882e7f3 --- /dev/null +++ b/doc/api/html/logistic__cdf_8hpp.html @@ -0,0 +1,149 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/logistic_cdf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
logistic_cdf.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::logistic_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/logistic__cdf_8hpp_source.html b/doc/api/html/logistic__cdf_8hpp_source.html new file mode 100644 index 00000000000..8fafb8ed834 --- /dev/null +++ b/doc/api/html/logistic__cdf_8hpp_source.html @@ -0,0 +1,268 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/logistic_cdf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
logistic_cdf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_LOGISTIC_CDF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_LOGISTIC_CDF_HPP
+
3 
+
4 #include <boost/random/exponential_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + +
22 #include <cmath>
+
23 #include <limits>
+
24 
+
25 namespace stan {
+
26  namespace math {
+
27 
+
28  // Logistic(y|mu, sigma) [sigma > 0]
+
29  template <typename T_y, typename T_loc, typename T_scale>
+
30  typename return_type<T_y, T_loc, T_scale>::type
+
31  logistic_cdf(const T_y& y, const T_loc& mu, const T_scale& sigma) {
+ +
33  T_partials_return;
+
34 
+
35  // Size checks
+
36  if ( !( stan::length(y) && stan::length(mu)
+
37  && stan::length(sigma) ) )
+
38  return 1.0;
+
39 
+
40  // Error checks
+
41  static const char* function("stan::math::logistic_cdf");
+
42 
+ + + + + +
48  using boost::math::tools::promote_args;
+
49  using std::exp;
+
50 
+
51  T_partials_return P(1.0);
+
52 
+
53  check_not_nan(function, "Random variable", y);
+
54  check_finite(function, "Location parameter", mu);
+
55  check_positive_finite(function, "Scale parameter", sigma);
+
56  check_consistent_sizes(function,
+
57  "Random variable", y,
+
58  "Location parameter", mu,
+
59  "Scale parameter", sigma);
+
60 
+
61  // Wrap arguments in vectors
+
62  VectorView<const T_y> y_vec(y);
+
63  VectorView<const T_loc> mu_vec(mu);
+
64  VectorView<const T_scale> sigma_vec(sigma);
+
65  size_t N = max_size(y, mu, sigma);
+
66 
+ +
68  operands_and_partials(y, mu, sigma);
+
69 
+
70  // Explicit return for extreme values
+
71  // The gradients are technically ill-defined, but treated as zero
+
72 
+
73  for (size_t i = 0; i < stan::length(y); i++) {
+
74  if (value_of(y_vec[i]) == -std::numeric_limits<double>::infinity())
+
75  return operands_and_partials.to_var(0.0, y, mu, sigma);
+
76  }
+
77 
+
78  // Compute vectorized CDF and its gradients
+
79  for (size_t n = 0; n < N; n++) {
+
80  // Explicit results for extreme values
+
81  // The gradients are technically ill-defined, but treated as zero
+
82  if (value_of(y_vec[n]) == std::numeric_limits<double>::infinity()) {
+
83  continue;
+
84  }
+
85 
+
86  // Pull out values
+
87  const T_partials_return y_dbl = value_of(y_vec[n]);
+
88  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
89  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
90  const T_partials_return sigma_inv_vec = 1.0 / value_of(sigma_vec[n]);
+
91 
+
92  // Compute
+
93  const T_partials_return Pn = 1.0 / (1.0 + exp(-(y_dbl - mu_dbl)
+
94  * sigma_inv_vec));
+
95 
+
96  P *= Pn;
+
97 
+ +
99  operands_and_partials.d_x1[n]
+
100  += exp(logistic_log(y_dbl, mu_dbl, sigma_dbl)) / Pn;
+ +
102  operands_and_partials.d_x2[n]
+
103  += - exp(logistic_log(y_dbl, mu_dbl, sigma_dbl)) / Pn;
+ +
105  operands_and_partials.d_x3[n] += - (y_dbl - mu_dbl) * sigma_inv_vec
+
106  * exp(logistic_log(y_dbl, mu_dbl, sigma_dbl)) / Pn;
+
107  }
+
108 
+ +
110  for (size_t n = 0; n < stan::length(y); ++n)
+
111  operands_and_partials.d_x1[n] *= P;
+
112  }
+ +
114  for (size_t n = 0; n < stan::length(mu); ++n)
+
115  operands_and_partials.d_x2[n] *= P;
+
116  }
+ +
118  for (size_t n = 0; n < stan::length(sigma); ++n)
+
119  operands_and_partials.d_x3[n] *= P;
+
120  }
+
121 
+
122  return operands_and_partials.to_var(P, y, mu, sigma);
+
123  }
+
124  }
+
125 }
+
126 #endif
+ +
return_type< T_y, T_loc, T_scale >::type logistic_cdf(const T_y &y, const T_loc &mu, const T_scale &sigma)
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
return_type< T_y, T_loc, T_scale >::type logistic_log(const T_y &y, const T_loc &mu, const T_scale &sigma)
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ + + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/logistic__cdf__log_8hpp.html b/doc/api/html/logistic__cdf__log_8hpp.html new file mode 100644 index 00000000000..a2c3d041742 --- /dev/null +++ b/doc/api/html/logistic__cdf__log_8hpp.html @@ -0,0 +1,149 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/logistic_cdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
logistic_cdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::logistic_cdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/logistic__cdf__log_8hpp_source.html b/doc/api/html/logistic__cdf__log_8hpp_source.html new file mode 100644 index 00000000000..049b93e0072 --- /dev/null +++ b/doc/api/html/logistic__cdf__log_8hpp_source.html @@ -0,0 +1,256 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/logistic_cdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
logistic_cdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_LOGISTIC_CDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_LOGISTIC_CDF_LOG_HPP
+
3 
+
4 #include <boost/random/exponential_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + +
22 #include <cmath>
+
23 #include <limits>
+
24 
+
25 namespace stan {
+
26  namespace math {
+
27 
+
28  template <typename T_y, typename T_loc, typename T_scale>
+
29  typename return_type<T_y, T_loc, T_scale>::type
+
30  logistic_cdf_log(const T_y& y, const T_loc& mu, const T_scale& sigma) {
+ +
32  T_partials_return;
+
33 
+
34  // Size checks
+
35  if ( !( stan::length(y) && stan::length(mu) && stan::length(sigma) ) )
+
36  return 0.0;
+
37 
+
38  // Error checks
+
39  static const char* function("stan::math::logistic_cdf_log");
+
40 
+ + + + + +
46  using boost::math::tools::promote_args;
+
47  using std::log;
+
48  using std::exp;
+
49 
+
50  T_partials_return P(0.0);
+
51 
+
52  check_not_nan(function, "Random variable", y);
+
53  check_finite(function, "Location parameter", mu);
+
54  check_positive_finite(function, "Scale parameter", sigma);
+
55  check_consistent_sizes(function,
+
56  "Random variable", y,
+
57  "Location parameter", mu,
+
58  "Scale parameter", sigma);
+
59 
+
60  // Wrap arguments in vectors
+
61  VectorView<const T_y> y_vec(y);
+
62  VectorView<const T_loc> mu_vec(mu);
+
63  VectorView<const T_scale> sigma_vec(sigma);
+
64  size_t N = max_size(y, mu, sigma);
+
65 
+ +
67  operands_and_partials(y, mu, sigma);
+
68 
+
69  // Explicit return for extreme values
+
70  // The gradients are technically ill-defined, but treated as zero
+
71 
+
72  for (size_t i = 0; i < stan::length(y); i++) {
+
73  if (value_of(y_vec[i]) == -std::numeric_limits<double>::infinity())
+
74  return operands_and_partials
+
75  .to_var(-std::numeric_limits<double>::infinity(), y, mu, sigma);
+
76  }
+
77 
+
78  // Compute vectorized cdf_log and its gradients
+
79  for (size_t n = 0; n < N; n++) {
+
80  // Explicit results for extreme values
+
81  // The gradients are technically ill-defined, but treated as zero
+
82  if (value_of(y_vec[n]) == std::numeric_limits<double>::infinity()) {
+
83  continue;
+
84  }
+
85 
+
86  // Pull out values
+
87  const T_partials_return y_dbl = value_of(y_vec[n]);
+
88  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
89  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
90  const T_partials_return sigma_inv_vec = 1.0 / value_of(sigma_vec[n]);
+
91 
+
92  // Compute
+
93  const T_partials_return Pn = 1.0 / (1.0 + exp(-(y_dbl - mu_dbl)
+
94  *sigma_inv_vec));
+
95  P += log(Pn);
+
96 
+ +
98  operands_and_partials.d_x1[n]
+
99  += exp(logistic_log(y_dbl, mu_dbl, sigma_dbl)) / Pn;
+ +
101  operands_and_partials.d_x2[n]
+
102  += - exp(logistic_log(y_dbl, mu_dbl, sigma_dbl)) / Pn;
+ +
104  operands_and_partials.d_x3[n] += - (y_dbl - mu_dbl) * sigma_inv_vec
+
105  * exp(logistic_log(y_dbl, mu_dbl, sigma_dbl)) / Pn;
+
106  }
+
107 
+
108  return operands_and_partials.to_var(P, y, mu, sigma);
+
109  }
+
110  }
+
111 }
+
112 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ +
var to_var(const double &x)
Converts argument to an automatic differentiation variable.
Definition: to_var.hpp:21
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
return_type< T_y, T_loc, T_scale >::type logistic_log(const T_y &y, const T_loc &mu, const T_scale &sigma)
+
return_type< T_y, T_loc, T_scale >::type logistic_cdf_log(const T_y &y, const T_loc &mu, const T_scale &sigma)
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ + + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/logistic__log_8hpp.html b/doc/api/html/logistic__log_8hpp.html new file mode 100644 index 00000000000..b84c5dc3e13 --- /dev/null +++ b/doc/api/html/logistic__log_8hpp.html @@ -0,0 +1,152 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/logistic_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
logistic_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::logistic_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::logistic_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/logistic__log_8hpp_source.html b/doc/api/html/logistic__log_8hpp_source.html new file mode 100644 index 00000000000..dbe8ce28a28 --- /dev/null +++ b/doc/api/html/logistic__log_8hpp_source.html @@ -0,0 +1,293 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/logistic_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
logistic_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_LOGISTIC_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_LOGISTIC_LOG_HPP
+
3 
+
4 #include <boost/random/exponential_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + +
22 #include <cmath>
+
23 
+
24 namespace stan {
+
25  namespace math {
+
26 
+
27  // Logistic(y|mu, sigma) [sigma > 0]
+
28  // FIXME: document
+
29  template <bool propto,
+
30  typename T_y, typename T_loc, typename T_scale>
+
31  typename return_type<T_y, T_loc, T_scale>::type
+
32  logistic_log(const T_y& y, const T_loc& mu, const T_scale& sigma) {
+
33  static const char* function("stan::math::logistic_log");
+ +
35  T_partials_return;
+
36 
+ + + + + +
42  using std::log;
+
43  using std::exp;
+
44 
+
45  // check if any vectors are zero length
+
46  if (!(stan::length(y)
+
47  && stan::length(mu)
+
48  && stan::length(sigma)))
+
49  return 0.0;
+
50 
+
51  // set up return value accumulator
+
52  T_partials_return logp(0.0);
+
53 
+
54  // validate args (here done over var, which should be OK)
+
55  check_finite(function, "Random variable", y);
+
56  check_finite(function, "Location parameter", mu);
+
57  check_positive_finite(function, "Scale parameter", sigma);
+
58  check_consistent_sizes(function,
+
59  "Random variable", y,
+
60  "Location parameter", mu,
+
61  "Scale parameter", sigma);
+
62 
+
63  // check if no variables are involved and prop-to
+ +
65  return 0.0;
+
66 
+
67 
+
68  // set up template expressions wrapping scalars into vector views
+ +
70  operands_and_partials(y, mu, sigma);
+
71 
+
72  VectorView<const T_y> y_vec(y);
+
73  VectorView<const T_loc> mu_vec(mu);
+
74  VectorView<const T_scale> sigma_vec(sigma);
+
75  size_t N = max_size(y, mu, sigma);
+
76 
+ + +
79  T_partials_return, T_scale> log_sigma(length(sigma));
+
80  for (size_t i = 0; i < length(sigma); i++) {
+
81  inv_sigma[i] = 1.0 / value_of(sigma_vec[i]);
+ +
83  log_sigma[i] = log(value_of(sigma_vec[i]));
+
84  }
+
85 
+ +
87  T_partials_return, T_loc, T_scale>
+
88  exp_mu_div_sigma(max_size(mu, sigma));
+ +
90  T_partials_return, T_y, T_scale>
+
91  exp_y_div_sigma(max_size(y, sigma));
+ +
93  for (size_t n = 0; n < max_size(mu, sigma); n++)
+
94  exp_mu_div_sigma[n] = exp(value_of(mu_vec[n])
+
95  / value_of(sigma_vec[n]));
+
96  for (size_t n = 0; n < max_size(y, sigma); n++)
+
97  exp_y_div_sigma[n] = exp(value_of(y_vec[n])
+
98  / value_of(sigma_vec[n]));
+
99  }
+
100 
+
101  using stan::math::log1p;
+
102  for (size_t n = 0; n < N; n++) {
+
103  const T_partials_return y_dbl = value_of(y_vec[n]);
+
104  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
105 
+
106  const T_partials_return y_minus_mu = y_dbl - mu_dbl;
+
107  const T_partials_return y_minus_mu_div_sigma = y_minus_mu
+
108  * inv_sigma[n];
+
109  T_partials_return exp_m_y_minus_mu_div_sigma(0);
+ +
111  exp_m_y_minus_mu_div_sigma = exp(-y_minus_mu_div_sigma);
+
112  T_partials_return inv_1p_exp_y_minus_mu_div_sigma(0);
+ +
114  inv_1p_exp_y_minus_mu_div_sigma = 1 / (1 + exp(y_minus_mu_div_sigma));
+
115 
+ +
117  logp -= y_minus_mu_div_sigma;
+ +
119  logp -= log_sigma[n];
+ +
121  logp -= 2.0 * log1p(exp_m_y_minus_mu_div_sigma);
+
122 
+ +
124  operands_and_partials.d_x1[n]
+
125  += (2 * inv_1p_exp_y_minus_mu_div_sigma - 1) * inv_sigma[n];
+ +
127  operands_and_partials.d_x2[n] +=
+
128  (1 - 2 * exp_mu_div_sigma[n] / (exp_mu_div_sigma[n]
+
129  + exp_y_div_sigma[n]))
+
130  * inv_sigma[n];
+ +
132  operands_and_partials.d_x3[n] +=
+
133  ((1 - 2 * inv_1p_exp_y_minus_mu_div_sigma)
+
134  *y_minus_mu*inv_sigma[n] - 1) * inv_sigma[n];
+
135  }
+
136  return operands_and_partials.to_var(logp, y, mu, sigma);
+
137  }
+
138 
+
139  template <typename T_y, typename T_loc, typename T_scale>
+
140  inline
+ +
142  logistic_log(const T_y& y, const T_loc& mu, const T_scale& sigma) {
+
143  return logistic_log<false>(y, mu, sigma);
+
144  }
+
145  }
+
146 }
+
147 #endif
+ + +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ +
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + +
return_type< T_y, T_loc, T_scale >::type logistic_log(const T_y &y, const T_loc &mu, const T_scale &sigma)
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
fvar< T > log1p(const fvar< T > &x)
Definition: log1p.hpp:16
+ + + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/logistic__rng_8hpp.html b/doc/api/html/logistic__rng_8hpp.html new file mode 100644 index 00000000000..8b131d450ee --- /dev/null +++ b/doc/api/html/logistic__rng_8hpp.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/logistic_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
logistic_rng.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
double stan::math::logistic_rng (const double mu, const double sigma, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/logistic__rng_8hpp_source.html b/doc/api/html/logistic__rng_8hpp_source.html new file mode 100644 index 00000000000..e5de7b09de3 --- /dev/null +++ b/doc/api/html/logistic__rng_8hpp_source.html @@ -0,0 +1,174 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/logistic_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
logistic_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_LOGISTIC_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_LOGISTIC_RNG_HPP
+
3 
+
4 #include <boost/random/exponential_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + +
21 
+
22 namespace stan {
+
23  namespace math {
+
24 
+
25  template <class RNG>
+
26  inline double
+
27  logistic_rng(const double mu,
+
28  const double sigma,
+
29  RNG& rng) {
+
30  using boost::variate_generator;
+
31  using boost::random::exponential_distribution;
+
32 
+
33  static const char* function("stan::math::logistic_rng");
+
34 
+ + +
37 
+
38  check_finite(function, "Location parameter", mu);
+
39  check_positive_finite(function, "Scale parameter", sigma);
+
40 
+
41  variate_generator<RNG&, exponential_distribution<> >
+
42  exp_rng(rng, exponential_distribution<>(1));
+
43  return mu - sigma * std::log(exp_rng() / exp_rng());
+
44  }
+
45  }
+
46 }
+
47 #endif
+ + +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ + + + +
double logistic_rng(const double mu, const double sigma, RNG &rng)
+ + + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + + + + + +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/lognormal__ccdf__log_8hpp.html b/doc/api/html/lognormal__ccdf__log_8hpp.html new file mode 100644 index 00000000000..9c0ff4d7c00 --- /dev/null +++ b/doc/api/html/lognormal__ccdf__log_8hpp.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/lognormal_ccdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
lognormal_ccdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::lognormal_ccdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/lognormal__ccdf__log_8hpp_source.html b/doc/api/html/lognormal__ccdf__log_8hpp_source.html new file mode 100644 index 00000000000..a6cc71864ff --- /dev/null +++ b/doc/api/html/lognormal__ccdf__log_8hpp_source.html @@ -0,0 +1,234 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/lognormal_ccdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
lognormal_ccdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_LOGNORMAL_CCDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_LOGNORMAL_CCDF_LOG_HPP
+
3 
+
4 #include <boost/random/lognormal_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + +
16 #include <cmath>
+
17 
+
18 namespace stan {
+
19  namespace math {
+
20 
+
21  template <typename T_y, typename T_loc, typename T_scale>
+
22  typename return_type<T_y, T_loc, T_scale>::type
+
23  lognormal_ccdf_log(const T_y& y, const T_loc& mu, const T_scale& sigma) {
+
24  static const char* function("stan::math::lognormal_ccdf_log");
+ +
26  T_partials_return;
+
27 
+
28  T_partials_return ccdf_log = 0.0;
+
29 
+ + + + +
34  using boost::math::tools::promote_args;
+ +
36  using std::log;
+
37  using std::exp;
+
38 
+
39  // check if any vectors are zero length
+
40  if (!(stan::length(y)
+
41  && stan::length(mu)
+
42  && stan::length(sigma)))
+
43  return ccdf_log;
+
44 
+
45  check_not_nan(function, "Random variable", y);
+
46  check_nonnegative(function, "Random variable", y);
+
47  check_finite(function, "Location parameter", mu);
+
48  check_positive_finite(function, "Scale parameter", sigma);
+
49 
+ +
51  operands_and_partials(y, mu, sigma);
+
52 
+
53  VectorView<const T_y> y_vec(y);
+
54  VectorView<const T_loc> mu_vec(mu);
+
55  VectorView<const T_scale> sigma_vec(sigma);
+
56  size_t N = max_size(y, mu, sigma);
+
57 
+
58  const double sqrt_pi = std::sqrt(stan::math::pi());
+
59 
+
60  for (size_t i = 0; i < stan::length(y); i++) {
+
61  if (value_of(y_vec[i]) == 0.0)
+
62  return operands_and_partials.to_var(0.0, y, mu, sigma);
+
63  }
+
64 
+
65  const double log_half = std::log(0.5);
+
66 
+
67  for (size_t n = 0; n < N; n++) {
+
68  const T_partials_return y_dbl = value_of(y_vec[n]);
+
69  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
70  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
71  const T_partials_return scaled_diff = (log(y_dbl) - mu_dbl)
+
72  / (sigma_dbl * SQRT_2);
+
73  const T_partials_return rep_deriv = SQRT_2 / sqrt_pi
+
74  * exp(-scaled_diff * scaled_diff) / sigma_dbl;
+
75 
+
76  // ccdf_log
+
77  const T_partials_return erfc_calc = erfc(scaled_diff);
+
78  ccdf_log += log_half + log(erfc_calc);
+
79 
+
80  // gradients
+ +
82  operands_and_partials.d_x1[n] -= rep_deriv / erfc_calc / y_dbl;
+ +
84  operands_and_partials.d_x2[n] += rep_deriv / erfc_calc;
+ +
86  operands_and_partials.d_x3[n] += rep_deriv * scaled_diff * SQRT_2
+
87  / erfc_calc;
+
88  }
+
89 
+
90  return operands_and_partials.to_var(ccdf_log, y, mu, sigma);
+
91  }
+
92  }
+
93 }
+
94 #endif
+ +
return_type< T_y, T_loc, T_scale >::type lognormal_ccdf_log(const T_y &y, const T_loc &mu, const T_scale &sigma)
+
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
const double SQRT_2
The value of the square root of 2, .
Definition: constants.hpp:21
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
fvar< T > erfc(const fvar< T > &x)
Definition: erfc.hpp:14
+
double pi()
Return the value of pi.
Definition: constants.hpp:86
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/lognormal__cdf_8hpp.html b/doc/api/html/lognormal__cdf_8hpp.html new file mode 100644 index 00000000000..4259380d2be --- /dev/null +++ b/doc/api/html/lognormal__cdf_8hpp.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/lognormal_cdf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
lognormal_cdf.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::lognormal_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/lognormal__cdf_8hpp_source.html b/doc/api/html/lognormal__cdf_8hpp_source.html new file mode 100644 index 00000000000..1f2a58bc9df --- /dev/null +++ b/doc/api/html/lognormal__cdf_8hpp_source.html @@ -0,0 +1,246 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/lognormal_cdf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
lognormal_cdf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_LOGNORMAL_CDF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_LOGNORMAL_CDF_HPP
+
3 
+
4 #include <boost/random/lognormal_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + +
16 #include <cmath>
+
17 
+
18 namespace stan {
+
19  namespace math {
+
20 
+
21  template <typename T_y, typename T_loc, typename T_scale>
+
22  typename return_type<T_y, T_loc, T_scale>::type
+
23  lognormal_cdf(const T_y& y, const T_loc& mu, const T_scale& sigma) {
+
24  static const char* function("stan::math::lognormal_cdf");
+
25 
+ +
27  T_partials_return;
+
28 
+
29  T_partials_return cdf = 1.0;
+
30 
+ + + + +
35  using boost::math::tools::promote_args;
+ +
37  using std::exp;
+
38  using std::log;
+
39 
+
40  // check if any vectors are zero length
+
41  if (!(stan::length(y)
+
42  && stan::length(mu)
+
43  && stan::length(sigma)))
+
44  return cdf;
+
45 
+
46  check_not_nan(function, "Random variable", y);
+
47  check_nonnegative(function, "Random variable", y);
+
48  check_finite(function, "Location parameter", mu);
+
49  check_positive_finite(function, "Scale parameter", sigma);
+
50 
+ +
52  operands_and_partials(y, mu, sigma);
+
53 
+
54  VectorView<const T_y> y_vec(y);
+
55  VectorView<const T_loc> mu_vec(mu);
+
56  VectorView<const T_scale> sigma_vec(sigma);
+
57  size_t N = max_size(y, mu, sigma);
+
58 
+
59  const double sqrt_pi = std::sqrt(stan::math::pi());
+
60 
+
61  for (size_t i = 0; i < stan::length(y); i++) {
+
62  if (value_of(y_vec[i]) == 0.0)
+
63  return operands_and_partials.to_var(0.0, y, mu, sigma);
+
64  }
+
65 
+
66  for (size_t n = 0; n < N; n++) {
+
67  const T_partials_return y_dbl = value_of(y_vec[n]);
+
68  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
69  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
70  const T_partials_return scaled_diff = (log(y_dbl) - mu_dbl)
+
71  / (sigma_dbl * SQRT_2);
+
72  const T_partials_return rep_deriv = SQRT_2 * 0.5 / sqrt_pi
+
73  * exp(-scaled_diff * scaled_diff) / sigma_dbl;
+
74 
+
75  // cdf
+
76  const T_partials_return cdf_ = 0.5 * erfc(-scaled_diff);
+
77  cdf *= cdf_;
+
78 
+
79  // gradients
+ +
81  operands_and_partials.d_x1[n] += rep_deriv / cdf_ / y_dbl;
+ +
83  operands_and_partials.d_x2[n] -= rep_deriv / cdf_;
+ +
85  operands_and_partials.d_x3[n] -= rep_deriv * scaled_diff * SQRT_2
+
86  / cdf_;
+
87  }
+
88 
+ +
90  for (size_t n = 0; n < stan::length(y); ++n)
+
91  operands_and_partials.d_x1[n] *= cdf;
+
92  }
+ +
94  for (size_t n = 0; n < stan::length(mu); ++n)
+
95  operands_and_partials.d_x2[n] *= cdf;
+
96  }
+ +
98  for (size_t n = 0; n < stan::length(sigma); ++n)
+
99  operands_and_partials.d_x3[n] *= cdf;
+
100  }
+
101 
+
102  return operands_and_partials.to_var(cdf, y, mu, sigma);
+
103  }
+
104  }
+
105 }
+
106 #endif
+ +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
const double SQRT_2
The value of the square root of 2, .
Definition: constants.hpp:21
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
fvar< T > erfc(const fvar< T > &x)
Definition: erfc.hpp:14
+
double pi()
Return the value of pi.
Definition: constants.hpp:86
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+
return_type< T_y, T_loc, T_scale >::type lognormal_cdf(const T_y &y, const T_loc &mu, const T_scale &sigma)
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/lognormal__cdf__log_8hpp.html b/doc/api/html/lognormal__cdf__log_8hpp.html new file mode 100644 index 00000000000..594299d9618 --- /dev/null +++ b/doc/api/html/lognormal__cdf__log_8hpp.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/lognormal_cdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
lognormal_cdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::lognormal_cdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/lognormal__cdf__log_8hpp_source.html b/doc/api/html/lognormal__cdf__log_8hpp_source.html new file mode 100644 index 00000000000..56953ca31f4 --- /dev/null +++ b/doc/api/html/lognormal__cdf__log_8hpp_source.html @@ -0,0 +1,236 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/lognormal_cdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
lognormal_cdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_LOGNORMAL_CDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_LOGNORMAL_CDF_LOG_HPP
+
3 
+
4 #include <boost/random/lognormal_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + +
16 #include <cmath>
+
17 
+
18 namespace stan {
+
19  namespace math {
+
20 
+
21  template <typename T_y, typename T_loc, typename T_scale>
+
22  typename return_type<T_y, T_loc, T_scale>::type
+
23  lognormal_cdf_log(const T_y& y, const T_loc& mu, const T_scale& sigma) {
+
24  static const char* function("stan::math::lognormal_cdf_log");
+ +
26  T_partials_return;
+
27 
+
28  T_partials_return cdf_log = 0.0;
+
29 
+ + + + +
34  using boost::math::tools::promote_args;
+ +
36  using std::log;
+
37  using std::exp;
+
38 
+
39  // check if any vectors are zero length
+
40  if (!(stan::length(y)
+
41  && stan::length(mu)
+
42  && stan::length(sigma)))
+
43  return cdf_log;
+
44 
+
45  check_not_nan(function, "Random variable", y);
+
46  check_nonnegative(function, "Random variable", y);
+
47  check_finite(function, "Location parameter", mu);
+
48  check_positive_finite(function, "Scale parameter", sigma);
+
49 
+ +
51  operands_and_partials(y, mu, sigma);
+
52 
+
53  VectorView<const T_y> y_vec(y);
+
54  VectorView<const T_loc> mu_vec(mu);
+
55  VectorView<const T_scale> sigma_vec(sigma);
+
56  size_t N = max_size(y, mu, sigma);
+
57 
+
58  const double sqrt_pi = std::sqrt(stan::math::pi());
+
59 
+
60  for (size_t i = 0; i < stan::length(y); i++) {
+
61  if (value_of(y_vec[i]) == 0.0)
+
62  return operands_and_partials.to_var(stan::math::negative_infinity(),
+
63  y, mu, sigma);
+
64  }
+
65 
+
66  const double log_half = std::log(0.5);
+
67 
+
68  for (size_t n = 0; n < N; n++) {
+
69  const T_partials_return y_dbl = value_of(y_vec[n]);
+
70  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
71  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
72  const T_partials_return scaled_diff = (log(y_dbl) - mu_dbl)
+
73  / (sigma_dbl * SQRT_2);
+
74  const T_partials_return rep_deriv = SQRT_2 / sqrt_pi
+
75  * exp(-scaled_diff * scaled_diff) / sigma_dbl;
+
76 
+
77  // cdf_log
+
78  const T_partials_return erfc_calc = erfc(-scaled_diff);
+
79  cdf_log += log_half + log(erfc_calc);
+
80 
+
81  // gradients
+ +
83  operands_and_partials.d_x1[n] += rep_deriv / erfc_calc / y_dbl;
+ +
85  operands_and_partials.d_x2[n] -= rep_deriv / erfc_calc;
+ +
87  operands_and_partials.d_x3[n] -= rep_deriv * scaled_diff * SQRT_2
+
88  / erfc_calc;
+
89  }
+
90 
+
91  return operands_and_partials.to_var(cdf_log, y, mu, sigma);
+
92  }
+
93  }
+
94 }
+
95 #endif
+ +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
return_type< T_y, T_loc, T_scale >::type lognormal_cdf_log(const T_y &y, const T_loc &mu, const T_scale &sigma)
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
const double SQRT_2
The value of the square root of 2, .
Definition: constants.hpp:21
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
fvar< T > erfc(const fvar< T > &x)
Definition: erfc.hpp:14
+
double pi()
Return the value of pi.
Definition: constants.hpp:86
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/lognormal__log_8hpp.html b/doc/api/html/lognormal__log_8hpp.html new file mode 100644 index 00000000000..3b97c187441 --- /dev/null +++ b/doc/api/html/lognormal__log_8hpp.html @@ -0,0 +1,153 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/lognormal_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
lognormal_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::lognormal_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::lognormal_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/lognormal__log_8hpp_source.html b/doc/api/html/lognormal__log_8hpp_source.html new file mode 100644 index 00000000000..a2975626ed1 --- /dev/null +++ b/doc/api/html/lognormal__log_8hpp_source.html @@ -0,0 +1,313 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/lognormal_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
lognormal_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_LOGNORMAL_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_LOGNORMAL_LOG_HPP
+
3 
+
4 #include <boost/random/lognormal_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + +
23 #include <cmath>
+
24 
+
25 namespace stan {
+
26  namespace math {
+
27 
+
28  // LogNormal(y|mu, sigma) [y >= 0; sigma > 0]
+
29  // FIXME: document
+
30  template <bool propto,
+
31  typename T_y, typename T_loc, typename T_scale>
+
32  typename return_type<T_y, T_loc, T_scale>::type
+
33  lognormal_log(const T_y& y, const T_loc& mu, const T_scale& sigma) {
+
34  static const char* function("stan::math::lognormal_log");
+ +
36  T_partials_return;
+
37 
+ + + + + + + + +
46 
+
47 
+
48  // check if any vectors are zero length
+
49  if (!(stan::length(y)
+
50  && stan::length(mu)
+
51  && stan::length(sigma)))
+
52  return 0.0;
+
53 
+
54  // set up return value accumulator
+
55  T_partials_return logp(0.0);
+
56 
+
57  // validate args (here done over var, which should be OK)
+
58  check_not_nan(function, "Random variable", y);
+
59  check_nonnegative(function, "Random variable", y);
+
60  check_finite(function, "Location parameter", mu);
+
61  check_positive_finite(function, "Scale parameter", sigma);
+
62  check_consistent_sizes(function,
+
63  "Random variable", y,
+
64  "Location parameter", mu,
+
65  "Scale parameter", sigma);
+
66 
+
67  VectorView<const T_y> y_vec(y);
+
68  VectorView<const T_loc> mu_vec(mu);
+
69  VectorView<const T_scale> sigma_vec(sigma);
+
70  size_t N = max_size(y, mu, sigma);
+
71 
+
72  for (size_t n = 0; n < length(y); n++)
+
73  if (value_of(y_vec[n]) <= 0)
+
74  return LOG_ZERO;
+
75 
+ +
77  operands_and_partials(y, mu, sigma);
+
78 
+
79  using stan::math::square;
+
80  using std::log;
+ +
82  using std::log;
+
83 
+
84 
+ +
86  T_partials_return, T_scale> log_sigma(length(sigma));
+ +
88  for (size_t n = 0; n < length(sigma); n++)
+
89  log_sigma[n] = log(value_of(sigma_vec[n]));
+
90  }
+
91 
+ +
93  T_partials_return, T_scale> inv_sigma(length(sigma));
+ +
95  T_partials_return, T_scale> inv_sigma_sq(length(sigma));
+ +
97  for (size_t n = 0; n < length(sigma); n++)
+
98  inv_sigma[n] = 1 / value_of(sigma_vec[n]);
+
99  }
+ +
101  for (size_t n = 0; n < length(sigma); n++)
+
102  inv_sigma_sq[n] = inv_sigma[n] * inv_sigma[n];
+
103  }
+
104 
+ +
106  T_partials_return, T_y> log_y(length(y));
+ +
108  for (size_t n = 0; n < length(y); n++)
+
109  log_y[n] = log(value_of(y_vec[n]));
+
110  }
+
111 
+ +
113  T_partials_return, T_y> inv_y(length(y));
+ +
115  for (size_t n = 0; n < length(y); n++)
+
116  inv_y[n] = 1 / value_of(y_vec[n]);
+
117  }
+
118 
+ +
120  logp += N * NEG_LOG_SQRT_TWO_PI;
+
121 
+
122  for (size_t n = 0; n < N; n++) {
+
123  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
124 
+
125  T_partials_return logy_m_mu(0);
+ +
127  logy_m_mu = log_y[n] - mu_dbl;
+
128 
+
129  T_partials_return logy_m_mu_sq = logy_m_mu * logy_m_mu;
+
130  T_partials_return logy_m_mu_div_sigma(0);
+ +
132  logy_m_mu_div_sigma = logy_m_mu * inv_sigma_sq[n];
+
133 
+
134 
+
135  // log probability
+ +
137  logp -= log_sigma[n];
+ +
139  logp -= log_y[n];
+ +
141  logp -= 0.5 * logy_m_mu_sq * inv_sigma_sq[n];
+
142 
+
143  // gradients
+ +
145  operands_and_partials.d_x1[n] -= (1 + logy_m_mu_div_sigma) * inv_y[n];
+ +
147  operands_and_partials.d_x2[n] += logy_m_mu_div_sigma;
+ +
149  operands_and_partials.d_x3[n]
+
150  += (logy_m_mu_div_sigma * logy_m_mu - 1) * inv_sigma[n];
+
151  }
+
152  return operands_and_partials.to_var(logp, y, mu, sigma);
+
153  }
+
154 
+
155  template <typename T_y, typename T_loc, typename T_scale>
+
156  inline
+ +
158  lognormal_log(const T_y& y, const T_loc& mu, const T_scale& sigma) {
+
159  return lognormal_log<false>(y, mu, sigma);
+
160  }
+
161  }
+
162 }
+
163 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ + +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
const double LOG_ZERO
Definition: constants.hpp:175
+ +
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ +
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
return_type< T_y, T_loc, T_scale >::type lognormal_log(const T_y &y, const T_loc &mu, const T_scale &sigma)
+
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + +
const double NEG_LOG_SQRT_TWO_PI
Definition: constants.hpp:184
+ + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/lognormal__rng_8hpp.html b/doc/api/html/lognormal__rng_8hpp.html new file mode 100644 index 00000000000..2bea5a8f3ac --- /dev/null +++ b/doc/api/html/lognormal__rng_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/lognormal_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
lognormal_rng.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
double stan::math::lognormal_rng (const double mu, const double sigma, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/lognormal__rng_8hpp_source.html b/doc/api/html/lognormal__rng_8hpp_source.html new file mode 100644 index 00000000000..579ecb023e6 --- /dev/null +++ b/doc/api/html/lognormal__rng_8hpp_source.html @@ -0,0 +1,163 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/lognormal_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
lognormal_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_LOGNORMAL_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_LOGNORMAL_RNG_HPP
+
3 
+
4 #include <boost/random/lognormal_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + +
16 
+
17 namespace stan {
+
18  namespace math {
+
19 
+
20  template <class RNG>
+
21  inline double
+
22  lognormal_rng(const double mu,
+
23  const double sigma,
+
24  RNG& rng) {
+
25  using boost::variate_generator;
+
26  using boost::random::lognormal_distribution;
+
27 
+
28  static const char* function("stan::math::lognormal_rng");
+
29 
+ + +
32 
+
33  check_finite(function, "Location parameter", mu);
+
34  check_positive_finite(function, "Scale parameter", sigma);
+
35 
+
36  variate_generator<RNG&, lognormal_distribution<> >
+
37  lognorm_rng(rng, lognormal_distribution<>(mu, sigma));
+
38  return lognorm_rng();
+
39  }
+
40  }
+
41 }
+
42 #endif
+ + + +
double lognormal_rng(const double mu, const double sigma, RNG &rng)
+ + + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + + + +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/lub__constrain_8hpp.html b/doc/api/html/lub__constrain_8hpp.html new file mode 100644 index 00000000000..748a4266639 --- /dev/null +++ b/doc/api/html/lub__constrain_8hpp.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/lub_constrain.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
lub_constrain.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/check_less.hpp>
+#include <stan/math/prim/scal/fun/lb_constrain.hpp>
+#include <stan/math/prim/scal/fun/ub_constrain.hpp>
+#include <boost/math/tools/promotion.hpp>
+#include <cmath>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T , typename TL , typename TU >
boost::math::tools::promote_args
+< T, TL, TU >::type 
stan::math::lub_constrain (const T x, TL lb, TU ub)
 Return the lower- and upper-bounded scalar derived by transforming the specified free scalar given the specified lower and upper bounds. More...
 
template<typename T , typename TL , typename TU >
boost::math::tools::promote_args
+< T, TL, TU >::type 
stan::math::lub_constrain (const T x, const TL lb, const TU ub, T &lp)
 Return the lower- and upper-bounded scalar derived by transforming the specified free scalar given the specified lower and upper bounds and increment the specified log probability with the log absolute Jacobian determinant. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/lub__constrain_8hpp_source.html b/doc/api/html/lub__constrain_8hpp_source.html new file mode 100644 index 00000000000..a8ff84bf37b --- /dev/null +++ b/doc/api/html/lub__constrain_8hpp_source.html @@ -0,0 +1,204 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/lub_constrain.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
lub_constrain.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LUB_CONSTRAIN_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LUB_CONSTRAIN_HPP
+
3 
+ + + +
7 #include <boost/math/tools/promotion.hpp>
+
8 #include <cmath>
+
9 #include <limits>
+
10 
+
11 namespace stan {
+
12 
+
13  namespace math {
+
41  template <typename T, typename TL, typename TU>
+
42  inline
+
43  typename boost::math::tools::promote_args<T, TL, TU>::type
+
44  lub_constrain(const T x, TL lb, TU ub) {
+
45  using std::exp;
+
46  stan::math::check_less("lub_constrain", "lb", lb, ub);
+
47  if (lb == -std::numeric_limits<double>::infinity())
+
48  return ub_constrain(x, ub);
+
49  if (ub == std::numeric_limits<double>::infinity())
+
50  return lb_constrain(x, lb);
+
51 
+
52  T inv_logit_x;
+
53  if (x > 0) {
+
54  T exp_minus_x = exp(-x);
+
55  inv_logit_x = 1.0 / (1.0 + exp_minus_x);
+
56  // Prevent x from reaching one unless it really really should.
+
57  if ((x < std::numeric_limits<double>::infinity())
+
58  && (inv_logit_x == 1))
+
59  inv_logit_x = 1 - 1e-15;
+
60  } else {
+
61  T exp_x = exp(x);
+
62  inv_logit_x = 1.0 - 1.0 / (1.0 + exp_x);
+
63  // Prevent x from reaching zero unless it really really should.
+
64  if ((x > -std::numeric_limits<double>::infinity())
+
65  && (inv_logit_x== 0))
+
66  inv_logit_x = 1e-15;
+
67  }
+
68  return lb + (ub - lb) * inv_logit_x;
+
69  }
+
70 
+
112  template <typename T, typename TL, typename TU>
+
113  typename boost::math::tools::promote_args<T, TL, TU>::type
+
114  lub_constrain(const T x, const TL lb, const TU ub, T& lp) {
+
115  using std::log;
+
116  using std::exp;
+
117  if (!(lb < ub)) {
+
118  std::stringstream s;
+
119  s << "domain error in lub_constrain; lower bound = " << lb
+
120  << " must be strictly less than upper bound = " << ub;
+
121  throw std::domain_error(s.str());
+
122  }
+
123  if (lb == -std::numeric_limits<double>::infinity())
+
124  return ub_constrain(x, ub, lp);
+
125  if (ub == std::numeric_limits<double>::infinity())
+
126  return lb_constrain(x, lb, lp);
+
127  T inv_logit_x;
+
128  if (x > 0) {
+
129  T exp_minus_x = exp(-x);
+
130  inv_logit_x = 1.0 / (1.0 + exp_minus_x);
+
131  lp += log(ub - lb) - x - 2 * log1p(exp_minus_x);
+
132  // Prevent x from reaching one unless it really really should.
+
133  if ((x < std::numeric_limits<double>::infinity())
+
134  && (inv_logit_x == 1))
+
135  inv_logit_x = 1 - 1e-15;
+
136  } else {
+
137  T exp_x = exp(x);
+
138  inv_logit_x = 1.0 - 1.0 / (1.0 + exp_x);
+
139  lp += log(ub - lb) + x - 2 * log1p(exp_x);
+
140  // Prevent x from reaching zero unless it really really should.
+
141  if ((x > -std::numeric_limits<double>::infinity())
+
142  && (inv_logit_x== 0))
+
143  inv_logit_x = 1e-15;
+
144  }
+
145  return lb + (ub - lb) * inv_logit_x;
+
146  }
+
147 
+
148  }
+
149 
+
150 }
+
151 
+
152 #endif
+ +
bool check_less(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is strictly less than high.
Definition: check_less.hpp:81
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
T lb_constrain(const T x, const TL lb)
Return the lower-bounded value for the specified unconstrained input and specified lower bound...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+
fvar< T > log1p(const fvar< T > &x)
Definition: log1p.hpp:16
+
boost::math::tools::promote_args< T, TU >::type ub_constrain(const T x, const TU ub)
Return the upper-bounded value for the specified unconstrained scalar and upper bound.
+ +
boost::math::tools::promote_args< T, TL, TU >::type lub_constrain(const T x, TL lb, TU ub)
Return the lower- and upper-bounded scalar derived by transforming the specified free scalar given th...
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/lub__free_8hpp.html b/doc/api/html/lub__free_8hpp.html new file mode 100644 index 00000000000..0bedd06cba4 --- /dev/null +++ b/doc/api/html/lub__free_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/lub_free.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
lub_free.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T , typename TL , typename TU >
boost::math::tools::promote_args
+< T, TL, TU >::type 
stan::math::lub_free (const T y, TL lb, TU ub)
 Return the unconstrained scalar that transforms to the specified lower- and upper-bounded scalar given the specified bounds. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/lub__free_8hpp_source.html b/doc/api/html/lub__free_8hpp_source.html new file mode 100644 index 00000000000..27aa0fea263 --- /dev/null +++ b/doc/api/html/lub__free_8hpp_source.html @@ -0,0 +1,150 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/lub_free.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
lub_free.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LUB_FREE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LUB_FREE_HPP
+
3 
+ + + + +
8 #include <limits>
+
9 
+
10 namespace stan {
+
11 
+
12  namespace math {
+
13 
+
44  template <typename T, typename TL, typename TU>
+
45  inline
+
46  typename boost::math::tools::promote_args<T, TL, TU>::type
+
47  lub_free(const T y, TL lb, TU ub) {
+
48  using stan::math::logit;
+
49  stan::math::check_bounded<T, TL, TU>
+
50  ("stan::math::lub_free",
+
51  "Bounded variable",
+
52  y, lb, ub);
+
53  if (lb == -std::numeric_limits<double>::infinity())
+
54  return ub_free(y, ub);
+
55  if (ub == std::numeric_limits<double>::infinity())
+
56  return lb_free(y, lb);
+
57  return logit((y - lb) / (ub - lb));
+
58  }
+
59 
+
60  }
+
61 
+
62 }
+
63 
+
64 #endif
+ +
boost::math::tools::promote_args< T, TL, TU >::type lub_free(const T y, TL lb, TU ub)
Return the unconstrained scalar that transforms to the specified lower- and upper-bounded scalar give...
Definition: lub_free.hpp:47
+
boost::math::tools::promote_args< T, TU >::type ub_free(const T y, const TU ub)
Return the free scalar that corresponds to the specified upper-bounded value with respect to the spec...
Definition: ub_free.hpp:39
+
boost::math::tools::promote_args< T, TL >::type lb_free(const T y, const TL lb)
Return the unconstrained value that produces the specified lower-bound constrained value...
Definition: lb_free.hpp:32
+ + +
fvar< T > logit(const fvar< T > &x)
Definition: logit.hpp:17
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mainpage_8dox.html b/doc/api/html/mainpage_8dox.html new file mode 100644 index 00000000000..006bbc12311 --- /dev/null +++ b/doc/api/html/mainpage_8dox.html @@ -0,0 +1,104 @@ + + + + + + +Stan Math Library: doxygen/mainpage.dox File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
doxygen/mainpage.dox File Reference
+
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/make__nu_8hpp.html b/doc/api/html/make__nu_8hpp.html new file mode 100644 index 00000000000..7c967b0837e --- /dev/null +++ b/doc/api/html/make__nu_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/make_nu.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
make_nu.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
const Eigen::Array< T,
+Eigen::Dynamic, 1 > 
stan::math::make_nu (const T eta, const size_t K)
 This function calculates the degrees of freedom for the t distribution that corresponds to the shape parameter in the Lewandowski et. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/make__nu_8hpp_source.html b/doc/api/html/make__nu_8hpp_source.html new file mode 100644 index 00000000000..a541d2c93fa --- /dev/null +++ b/doc/api/html/make__nu_8hpp_source.html @@ -0,0 +1,159 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/make_nu.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
make_nu.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_MAKE_NU_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_MAKE_NU_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
20  template<typename T>
+
21  const Eigen::Array<T, Eigen::Dynamic, 1>
+
22  make_nu(const T eta, const size_t K) {
+
23  using Eigen::Array;
+
24  using Eigen::Dynamic;
+
25  using Eigen::Matrix;
+ +
27  typedef typename index_type<Matrix<T, Dynamic, 1> >::type size_type;
+
28 
+
29  Array<T, Dynamic, 1> nu(K * (K - 1) / 2);
+
30 
+
31  T alpha = eta + (K - 2.0) / 2.0; // from Lewandowski et. al.
+
32 
+
33  // Best (1978) implies nu = 2 * alpha for the dof in a t
+
34  // distribution that generates a beta variate on (-1, 1)
+
35  T alpha2 = 2.0 * alpha;
+
36  for (size_type j = 0; j < (K - 1); j++) {
+
37  nu(j) = alpha2;
+
38  }
+
39  size_t counter = K - 1;
+
40  for (size_type i = 1; i < (K - 1); i++) {
+
41  alpha -= 0.5;
+
42  alpha2 = 2.0 * alpha;
+
43  for (size_type j = i + 1; j < K; j++) {
+
44  nu(counter) = alpha2;
+
45  counter++;
+
46  }
+
47  }
+
48  return nu;
+
49  }
+
50 
+
51  }
+
52 
+
53 }
+
54 
+
55 #endif
+
const Eigen::Array< T, Eigen::Dynamic, 1 > make_nu(const T eta, const size_t K)
This function calculates the degrees of freedom for the t distribution that corresponds to the shape ...
Definition: make_nu.hpp:22
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:19
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mat_2fun_2grad_8hpp.html b/doc/api/html/mat_2fun_2grad_8hpp.html new file mode 100644 index 00000000000..458ffef1a37 --- /dev/null +++ b/doc/api/html/mat_2fun_2grad_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/grad.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
grad.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

void stan::math::grad (var &v, Eigen::Matrix< var, Eigen::Dynamic, 1 > &x, Eigen::VectorXd &g)
 Propagate chain rule to calculate gradients starting from the specified variable. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mat_2fun_2grad_8hpp_source.html b/doc/api/html/mat_2fun_2grad_8hpp_source.html new file mode 100644 index 00000000000..4f452cfc3ce --- /dev/null +++ b/doc/api/html/mat_2fun_2grad_8hpp_source.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/grad.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
grad.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_GRAD_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_GRAD_HPP
+
3 
+
4 
+ + +
7 #include <stan/math/rev/core.hpp>
+
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
26  void grad(var& v,
+
27  Eigen::Matrix<var, Eigen::Dynamic, 1>& x,
+
28  Eigen::VectorXd& g) {
+ +
30  g.resize(x.size());
+
31  for (int i = 0; i < x.size(); ++i)
+
32  g(i) = x(i).vi_->adj_;
+
33  }
+
34 
+
35  }
+
36 }
+
37 
+
38 #endif
+ + +
static void grad(chainable *vi)
Compute the gradient for all variables starting from the specified root variable implementation.
Definition: grad.hpp:30
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mat_2fun_2promote__scalar_8hpp.html b/doc/api/html/mat_2fun_2promote__scalar_8hpp.html new file mode 100644 index 00000000000..3b70f88c518 --- /dev/null +++ b/doc/api/html/mat_2fun_2promote__scalar_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/promote_scalar.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
promote_scalar.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + +

+Classes

struct  stan::math::promote_scalar_struct< T, Eigen::Matrix< S,-1,-1 > >
 Struct to hold static function for promoting underlying scalar types. More...
 
struct  stan::math::promote_scalar_struct< T, Eigen::Matrix< S, 1,-1 > >
 Struct to hold static function for promoting underlying scalar types. More...
 
struct  stan::math::promote_scalar_struct< T, Eigen::Matrix< S,-1, 1 > >
 Struct to hold static function for promoting underlying scalar types. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mat_2fun_2promote__scalar_8hpp_source.html b/doc/api/html/mat_2fun_2promote__scalar_8hpp_source.html new file mode 100644 index 00000000000..6ffe21daf66 --- /dev/null +++ b/doc/api/html/mat_2fun_2promote__scalar_8hpp_source.html @@ -0,0 +1,175 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/promote_scalar.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
promote_scalar.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_PROMOTE_SCALAR_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_PROMOTE_SCALAR_HPP
+
3 
+ + + +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
20  template <typename T, typename S>
+
21  struct promote_scalar_struct<T, Eigen::Matrix<S, -1, -1> > {
+
30  static Eigen::Matrix<typename promote_scalar_type<T, S>::type, -1, -1>
+
31  apply(const Eigen::Matrix<S, -1, -1>& x) {
+
32  Eigen::Matrix<typename promote_scalar_type<T, S>::type, -1, -1>
+
33  y(x.rows(), x.cols());
+
34  for (int i = 0; i < x.size(); ++i)
+ +
36  return y;
+
37  }
+
38  };
+
39 
+
40 
+
49  template <typename T, typename S>
+
50  struct promote_scalar_struct<T, Eigen::Matrix<S, 1, -1> > {
+
59  static Eigen::Matrix<typename promote_scalar_type<T, S>::type, 1, -1>
+
60  apply(const Eigen::Matrix<S, 1, -1>& x) {
+
61  Eigen::Matrix<typename promote_scalar_type<T, S>::type, 1, -1>
+
62  y(x.rows(), x.cols());
+
63  for (int i = 0; i < x.size(); ++i)
+ +
65  return y;
+
66  }
+
67  };
+
68 
+
69 
+
78  template <typename T, typename S>
+
79  struct promote_scalar_struct<T, Eigen::Matrix<S, -1, 1> > {
+
88  static Eigen::Matrix<typename promote_scalar_type<T, S>::type, -1, 1>
+
89  apply(const Eigen::Matrix<S, -1, 1>& x) {
+
90  Eigen::Matrix<typename promote_scalar_type<T, S>::type, -1, 1>
+
91  y(x.rows(), x.cols());
+
92  for (int i = 0; i < x.size(); ++i)
+ +
94  return y;
+
95  }
+
96  };
+
97 
+
98 
+
99  }
+
100 }
+
101 
+
102 
+
103 #endif
+
104 
+
105 
+
106 
+
107 
+ +
General struct to hold static function for promoting underlying scalar types.
+ +
static Eigen::Matrix< typename promote_scalar_type< T, S >::type, 1,-1 > apply(const Eigen::Matrix< S, 1,-1 > &x)
Return the column vector consisting of the recursive promotion of the elements of the input column ve...
+ +
static T apply(S x)
Return the value of the input argument promoted to the type specified by the template parameter...
+
static Eigen::Matrix< typename promote_scalar_type< T, S >::type,-1,-1 > apply(const Eigen::Matrix< S,-1,-1 > &x)
Return the matrix consisting of the recursive promotion of the elements of the input matrix to the sc...
+
static Eigen::Matrix< typename promote_scalar_type< T, S >::type,-1, 1 > apply(const Eigen::Matrix< S,-1, 1 > &x)
Return the row vector consisting of the recursive promotion of the elements of the input row vector t...
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mat_2fun_2promote__scalar__type_8hpp.html b/doc/api/html/mat_2fun_2promote__scalar__type_8hpp.html new file mode 100644 index 00000000000..6ae106f7530 --- /dev/null +++ b/doc/api/html/mat_2fun_2promote__scalar__type_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/promote_scalar_type.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
promote_scalar_type.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + +

+Classes

struct  stan::math::promote_scalar_type< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >
 Template metaprogram to calculate a type for a matrix whose underlying scalar is converted from the second template parameter type to the first. More...
 
struct  stan::math::promote_scalar_type< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > >
 Template metaprogram to calculate a type for a vector whose underlying scalar is converted from the second template parameter type to the first. More...
 
struct  stan::math::promote_scalar_type< T, Eigen::Matrix< S, 1, Eigen::Dynamic > >
 Template metaprogram to calculate a type for a row vector whose underlying scalar is converted from the second template parameter type to the first. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mat_2fun_2promote__scalar__type_8hpp_source.html b/doc/api/html/mat_2fun_2promote__scalar__type_8hpp_source.html new file mode 100644 index 00000000000..a21c4a170ca --- /dev/null +++ b/doc/api/html/mat_2fun_2promote__scalar__type_8hpp_source.html @@ -0,0 +1,155 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/promote_scalar_type.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
promote_scalar_type.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_PROMOTE_SCALAR_TYPE_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_PROMOTE_SCALAR_TYPE_HPP
+
3 
+ + +
6 #include <vector>
+
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
22  template <typename T, typename S>
+
23  struct promote_scalar_type<T, Eigen::Matrix<S, Eigen::Dynamic,
+
24  Eigen::Dynamic> > {
+
28  typedef Eigen::Matrix<typename promote_scalar_type<T, S>::type,
+
29  Eigen::Dynamic, Eigen::Dynamic>
+ +
31  };
+
32 
+
33 
+
42  template <typename T, typename S>
+
43  struct promote_scalar_type<T, Eigen::Matrix<S, Eigen::Dynamic, 1> > {
+
47  typedef Eigen::Matrix<typename promote_scalar_type<T, S>::type,
+
48  Eigen::Dynamic, 1>
+ +
50  };
+
51 
+
52 
+
61  template <typename T, typename S>
+
62  struct promote_scalar_type<T, Eigen::Matrix<S, 1, Eigen::Dynamic> > {
+
66  typedef Eigen::Matrix<typename promote_scalar_type<T, S>::type,
+
67  1, Eigen::Dynamic>
+ +
69  };
+
70 
+
71 
+
72  }
+
73 
+
74 }
+
75 
+
76 #endif
+
Eigen::Matrix< typename promote_scalar_type< T, S >::type, Eigen::Dynamic, 1 > type
The promoted type.
+
Template metaprogram to calculate a type for converting a convertible type.
+
Eigen::Matrix< typename promote_scalar_type< T, S >::type, Eigen::Dynamic, Eigen::Dynamic > type
The promoted type.
+
Eigen::Matrix< typename promote_scalar_type< T, S >::type, 1, Eigen::Dynamic > type
The promoted type.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mat_2meta_2container__view_8hpp.html b/doc/api/html/mat_2meta_2container__view_8hpp.html new file mode 100644 index 00000000000..aedf0cb763d --- /dev/null +++ b/doc/api/html/mat_2meta_2container__view_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/meta/container_view.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
container_view.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + +

+Classes

class  stan::math::container_view< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > >
 Template specialization for Eigen::Map view of array with scalar type T2 with size inferred from input Eigen::Matrix. More...
 
class  stan::math::container_view< Eigen::Matrix< T1, R, C >, T2 >
 Template specialization for scalar view of array y with scalar type T2. More...
 
class  stan::math::container_view< std::vector< Eigen::Matrix< T1, R, C > >, Eigen::Matrix< T2, R, C > >
 Template specialization for matrix view of array y with scalar type T2 with shape equal to x. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mat_2meta_2container__view_8hpp_source.html b/doc/api/html/mat_2meta_2container__view_8hpp_source.html new file mode 100644 index 00000000000..8380514821a --- /dev/null +++ b/doc/api/html/mat_2meta_2container__view_8hpp_source.html @@ -0,0 +1,186 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/meta/container_view.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
container_view.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_META_CONTAINER_VIEW_HPP
+
2 #define STAN_MATH_PRIM_MAT_META_CONTAINER_VIEW_HPP
+
3 
+ + +
6 #include <vector>
+
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
22  template <typename T1, typename T2, int R, int C>
+
23  class container_view<Eigen::Matrix<T1, R, C>, Eigen::Matrix<T2, R, C> > {
+
24  public:
+
32  container_view(const Eigen::Matrix<T1, R, C>& x, T2* y)
+
33  : y_(y, x.rows(), x.cols()) { }
+
34 
+
40  Eigen::Map<Eigen::Matrix<T2, R, C> >& operator[](int i) {
+
41  return y_;
+
42  }
+
43  private:
+
44  Eigen::Map<Eigen::Matrix<T2, R, C> > y_;
+
45  };
+
46 
+
57  template <typename T1, typename T2, int R, int C>
+
58  class container_view<Eigen::Matrix<T1, R, C>, T2> {
+
59  public:
+
66  container_view(const Eigen::Matrix<T1, R, C>& x, T2* y)
+
67  : y_(y) { }
+
68 
+
73  T2& operator[](int i) {
+
74  return y_[i];
+
75  }
+
76  private:
+
77  T2* y_;
+
78  };
+
79 
+
90  template <typename T1, typename T2, int R, int C>
+
91  class container_view<std::vector<Eigen::Matrix<T1, R, C> >,
+
92  Eigen::Matrix<T2, R, C> > {
+
93  public:
+
104  container_view(const std::vector<Eigen::Matrix<T1, R, C> >& x, T2* y)
+
105  : y_view(y, 1, 1), y_(y) {
+
106  if (x.size() > 0) {
+
107  rows = x[0].rows();
+
108  cols = x[0].cols();
+
109  } else {
+
110  rows = 0;
+
111  cols = 0;
+
112  }
+
113  }
+
114 
+
119  Eigen::Map<Eigen::Matrix<T2, R, C> >& operator[](int i) {
+
120  int offset = i * rows * cols;
+
121  new (&y_view) Eigen::Map<Eigen::Matrix<T2, R, C> >
+
122  (y_ + offset, rows, cols);
+
123  return y_view;
+
124  }
+
125  private:
+
126  Eigen::Map<Eigen::Matrix<T2, R, C> > y_view;
+
127  T2* y_;
+
128  int rows;
+
129  int cols;
+
130  };
+
131  }
+
132 }
+
133 #endif
+
int rows(const Eigen::Matrix< T, R, C > &m)
Return the number of rows in the specified matrix, vector, or row vector.
Definition: rows.hpp:20
+
container_view(const Eigen::Matrix< T1, R, C > &x, T2 *y)
Constructor.
+
Eigen::Map< Eigen::Matrix< T2, R, C > > & operator[](int i)
operator[](int i) returns Eigen::Map y
+
container_view(const std::vector< Eigen::Matrix< T1, R, C > > &x, T2 *y)
Constructor assumes all matrix elements in std::vector are of same dimension.
+
int cols(const Eigen::Matrix< T, R, C > &m)
Return the number of columns in the specified matrix, vector, or row vector.
Definition: cols.hpp:20
+ +
T2 & operator[](int i)
operator[](int i) returns reference to scalar of type T2 at appropriate index i in array y ...
+
Primary template class for container view of array y with same structure as T1 and size as x...
+ +
container_view(const Eigen::Matrix< T1, R, C > &x, T2 *y)
Initialize Map dimensions with input matrix dimensions.
+
Eigen::Map< Eigen::Matrix< T2, R, C > > & operator[](int i)
operator[](int i) returns matrix view of scalartype T2 at appropriate index i in array y ...
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mat_2meta_2get_8hpp.html b/doc/api/html/mat_2meta_2get_8hpp.html new file mode 100644 index 00000000000..515b07845d4 --- /dev/null +++ b/doc/api/html/mat_2meta_2get_8hpp.html @@ -0,0 +1,126 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/meta/get.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
get.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Namespaces

 stan
 
+ + + + +

+Functions

template<typename T , int R, int C>
stan::get (const Eigen::Matrix< T, R, C > &m, size_t n)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mat_2meta_2get_8hpp_source.html b/doc/api/html/mat_2meta_2get_8hpp_source.html new file mode 100644 index 00000000000..15a346f5bf7 --- /dev/null +++ b/doc/api/html/mat_2meta_2get_8hpp_source.html @@ -0,0 +1,124 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/meta/get.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
get.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_META_GET_HPP
+
2 #define STAN_MATH_PRIM_MAT_META_GET_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7 
+
8  template <typename T, int R, int C>
+
9  inline T get(const Eigen::Matrix<T, R, C>& m, size_t n) {
+
10  return m(static_cast<int>(n));
+
11  }
+
12 
+
13 }
+
14 #endif
+
15 
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mat_2meta_2index__type_8hpp.html b/doc/api/html/mat_2meta_2index__type_8hpp.html new file mode 100644 index 00000000000..8cafa54c85e --- /dev/null +++ b/doc/api/html/mat_2meta_2index__type_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/meta/index_type.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
index_type.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/index_type.hpp>
+#include <Eigen/Core>
+
+

Go to the source code of this file.

+ + + + + +

+Classes

struct  stan::math::index_type< Eigen::Matrix< T, R, C > >
 Template metaprogram defining typedef for the type of index for an Eigen matrix, vector, or row vector. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mat_2meta_2index__type_8hpp_source.html b/doc/api/html/mat_2meta_2index__type_8hpp_source.html new file mode 100644 index 00000000000..26065d16c2e --- /dev/null +++ b/doc/api/html/mat_2meta_2index__type_8hpp_source.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/meta/index_type.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
index_type.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_META_INDEX_TYPE_HPP
+
2 #define STAN_MATH_PRIM_MAT_META_INDEX_TYPE_HPP
+
3 
+ +
5 #include <Eigen/Core>
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
19  template <typename T, int R, int C>
+
20  struct index_type<Eigen::Matrix<T, R, C> > {
+
21  typedef typename Eigen::Matrix<T, R, C>::Index type;
+
22  };
+
23 
+
24 
+
25  }
+
26 
+
27 }
+
28 
+
29 
+
30 #endif
+ +
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:19
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mat_2meta_2is__vector_8hpp.html b/doc/api/html/mat_2meta_2is__vector_8hpp.html new file mode 100644 index 00000000000..2a71fc946ec --- /dev/null +++ b/doc/api/html/mat_2meta_2is__vector_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/meta/is_vector.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
is_vector.hpp File Reference
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mat_2meta_2is__vector_8hpp_source.html b/doc/api/html/mat_2meta_2is__vector_8hpp_source.html new file mode 100644 index 00000000000..96f43b6d213 --- /dev/null +++ b/doc/api/html/mat_2meta_2is__vector_8hpp_source.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/meta/is_vector.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
is_vector.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_META_IS_VECTOR_HPP
+
2 #define STAN_MATH_PRIM_MAT_META_IS_VECTOR_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8 
+
9  // FIXME: use boost::type_traits::remove_all_extents to
+
10  // extend to array/ptr types
+
11 
+
12  template <typename T>
+
13  struct is_vector<Eigen::Matrix<T, Eigen::Dynamic, 1> > {
+
14  enum { value = 1 };
+
15  typedef T type;
+
16  };
+
17  template <typename T>
+
18  struct is_vector<Eigen::Matrix<T, 1, Eigen::Dynamic> > {
+
19  enum { value = 1 };
+
20  typedef T type;
+
21  };
+
22  template <typename T>
+
23  struct is_vector<Eigen::Block<T> > {
+
24  enum { value = 1 };
+
25  typedef T type;
+
26  };
+
27 }
+
28 #endif
+
29 
+ + + + + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mat_2meta_2is__vector__like_8hpp.html b/doc/api/html/mat_2meta_2is__vector__like_8hpp.html new file mode 100644 index 00000000000..3bd64f23f8c --- /dev/null +++ b/doc/api/html/mat_2meta_2is__vector__like_8hpp.html @@ -0,0 +1,126 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/meta/is_vector_like.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
is_vector_like.hpp File Reference
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mat_2meta_2is__vector__like_8hpp_source.html b/doc/api/html/mat_2meta_2is__vector__like_8hpp_source.html new file mode 100644 index 00000000000..99aa2e1fbf7 --- /dev/null +++ b/doc/api/html/mat_2meta_2is__vector__like_8hpp_source.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/meta/is_vector_like.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
is_vector_like.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_META_IS_VECTOR_LIKE_HPP
+
2 #define STAN_MATH_PRIM_MAT_META_IS_VECTOR_LIKE_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8 
+
9  // handles eigen matrix
+
10  template <typename T>
+
11  struct is_vector_like<Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> > {
+
12  enum { value = true };
+
13  };
+
14 }
+
15 #endif
+
16 
+ + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mat_2meta_2length_8hpp.html b/doc/api/html/mat_2meta_2length_8hpp.html new file mode 100644 index 00000000000..0c554880337 --- /dev/null +++ b/doc/api/html/mat_2meta_2length_8hpp.html @@ -0,0 +1,126 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/meta/length.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
length.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Namespaces

 stan
 
+ + + + +

+Functions

template<typename T , int R, int C>
size_t stan::length (const Eigen::Matrix< T, R, C > &m)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mat_2meta_2length_8hpp_source.html b/doc/api/html/mat_2meta_2length_8hpp_source.html new file mode 100644 index 00000000000..4b210ed59e2 --- /dev/null +++ b/doc/api/html/mat_2meta_2length_8hpp_source.html @@ -0,0 +1,124 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/meta/length.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
length.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_META_LENGTH_HPP
+
2 #define STAN_MATH_PRIM_MAT_META_LENGTH_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7 
+
8  template <typename T, int R, int C>
+
9  size_t length(const Eigen::Matrix<T, R, C>& m) {
+
10  return m.size();
+
11  }
+
12 }
+
13 #endif
+
14 
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mat_2meta_2value__type_8hpp.html b/doc/api/html/mat_2meta_2value__type_8hpp.html new file mode 100644 index 00000000000..9527cdd1d38 --- /dev/null +++ b/doc/api/html/mat_2meta_2value__type_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/meta/value_type.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
value_type.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/value_type.hpp>
+#include <Eigen/Core>
+
+

Go to the source code of this file.

+ + + + + +

+Classes

struct  stan::math::value_type< Eigen::Matrix< T, R, C > >
 Template metaprogram defining the type of values stored in an Eigen matrix, vector, or row vector. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mat_2meta_2value__type_8hpp_source.html b/doc/api/html/mat_2meta_2value__type_8hpp_source.html new file mode 100644 index 00000000000..d1ad110517d --- /dev/null +++ b/doc/api/html/mat_2meta_2value__type_8hpp_source.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/meta/value_type.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
value_type.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_META_VALUE_TYPE_HPP
+
2 #define STAN_MATH_PRIM_MAT_META_VALUE_TYPE_HPP
+
3 
+ +
5 #include <Eigen/Core>
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
19  template <typename T, int R, int C>
+
20  struct value_type<Eigen::Matrix<T, R, C> > {
+
21  typedef typename Eigen::Matrix<T, R, C>::Scalar type;
+
22  };
+
23 
+
24 
+
25  }
+
26 
+
27 }
+
28 
+
29 
+
30 #endif
+
Eigen::Matrix< T, R, C >::Scalar type
Definition: value_type.hpp:21
+ +
Primary template class for metaprogram to compute the type of values stored in a container.
Definition: value_type.hpp:21
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/math_8hpp.html b/doc/api/html/math_8hpp.html new file mode 100644 index 00000000000..295b19018d1 --- /dev/null +++ b/doc/api/html/math_8hpp.html @@ -0,0 +1,765 @@ + + + + + + +Stan Math Library: stan/math.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
math.hpp File Reference
+
+
+
#include <stan/math/version.hpp>
+#include <stan/math/prim/arr/meta/get.hpp>
+#include <stan/math/prim/arr/meta/index_type.hpp>
+#include <stan/math/prim/arr/meta/is_vector.hpp>
+#include <stan/math/prim/arr/meta/length.hpp>
+#include <stan/math/prim/mat/meta/get.hpp>
+#include <stan/math/prim/mat/meta/index_type.hpp>
+#include <stan/math/prim/mat/meta/is_vector.hpp>
+#include <stan/math/prim/mat/meta/is_vector_like.hpp>
+#include <stan/math/prim/mat/meta/length.hpp>
+#include <stan/math/prim/mat/meta/seq_view.hpp>
+#include <stan/math/prim/mat/meta/value_type.hpp>
+#include <stan/math/prim/scal/meta/child_type.hpp>
+#include <stan/math/prim/scal/meta/contains_fvar.hpp>
+#include <stan/math/prim/scal/meta/contains_nonconstant_struct.hpp>
+#include <stan/math/prim/scal/meta/contains_vector.hpp>
+#include <stan/math/prim/scal/meta/error_index.hpp>
+#include <stan/math/prim/scal/meta/get.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/meta/index_type.hpp>
+#include <stan/math/prim/scal/meta/is_constant.hpp>
+#include <stan/math/prim/scal/meta/is_constant_struct.hpp>
+#include <stan/math/prim/scal/meta/is_fvar.hpp>
+#include <stan/math/prim/scal/meta/is_var.hpp>
+#include <stan/math/prim/scal/meta/is_var_or_arithmetic.hpp>
+#include <stan/math/prim/scal/meta/is_vector.hpp>
+#include <stan/math/prim/scal/meta/is_vector_like.hpp>
+#include <stan/math/prim/scal/meta/length.hpp>
+#include <stan/math/prim/scal/meta/length_mvt.hpp>
+#include <stan/math/prim/scal/meta/likely.hpp>
+#include <stan/math/prim/scal/meta/max_size.hpp>
+#include <stan/math/prim/scal/meta/max_size_mvt.hpp>
+#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/meta/partials_return_type.hpp>
+#include <stan/math/prim/scal/meta/partials_type.hpp>
+#include <stan/math/prim/scal/meta/return_type.hpp>
+#include <stan/math/prim/scal/meta/scalar_type.hpp>
+#include <stan/math/prim/scal/meta/scalar_type_pre.hpp>
+#include <stan/math/prim/scal/meta/size_of.hpp>
+#include <stan/math/prim/scal/meta/value_type.hpp>
+#include <stan/math/prim/scal/meta/VectorBuilder.hpp>
+#include <stan/math/prim/scal/meta/VectorView.hpp>
+#include <stan/math/prim/scal/meta/VectorViewMvt.hpp>
+#include <stan/math/rev/scal/meta/is_var.hpp>
+#include <stan/math/rev/scal/meta/partials_type.hpp>
+#include <stan/math/prim/arr/fun/dist.hpp>
+#include <stan/math/prim/arr/fun/dot.hpp>
+#include <stan/math/prim/arr/fun/dot_self.hpp>
+#include <stan/math/prim/arr/fun/log_sum_exp.hpp>
+#include <stan/math/prim/arr/fun/rep_array.hpp>
+#include <stan/math/prim/arr/fun/scaled_add.hpp>
+#include <stan/math/prim/arr/fun/sub.hpp>
+#include <stan/math/prim/arr/fun/sum.hpp>
+#include <stan/math/prim/arr/functor/coupled_ode_observer.hpp>
+#include <stan/math/prim/arr/functor/coupled_ode_system.hpp>
+#include <stan/math/prim/arr/functor/integrate_ode.hpp>
+#include <stan/math/prim/mat/err/check_cholesky_factor.hpp>
+#include <stan/math/prim/mat/err/check_cholesky_factor_corr.hpp>
+#include <stan/math/prim/mat/err/check_column_index.hpp>
+#include <stan/math/prim/mat/err/check_corr_matrix.hpp>
+#include <stan/math/prim/mat/err/check_cov_matrix.hpp>
+#include <stan/math/prim/mat/err/check_ldlt_factor.hpp>
+#include <stan/math/prim/mat/err/check_lower_triangular.hpp>
+#include <stan/math/prim/mat/err/check_matching_dims.hpp>
+#include <stan/math/prim/mat/err/check_matching_sizes.hpp>
+#include <stan/math/prim/mat/err/check_multiplicable.hpp>
+#include <stan/math/prim/mat/err/check_ordered.hpp>
+#include <stan/math/prim/mat/err/check_pos_definite.hpp>
+#include <stan/math/prim/mat/err/check_pos_semidefinite.hpp>
+#include <stan/math/prim/mat/err/check_positive_ordered.hpp>
+#include <stan/math/prim/mat/err/check_range.hpp>
+#include <stan/math/prim/mat/err/check_row_index.hpp>
+#include <stan/math/prim/mat/err/check_simplex.hpp>
+#include <stan/math/prim/mat/err/check_spsd_matrix.hpp>
+#include <stan/math/prim/mat/err/check_square.hpp>
+#include <stan/math/prim/mat/err/check_std_vector_index.hpp>
+#include <stan/math/prim/mat/err/check_symmetric.hpp>
+#include <stan/math/prim/mat/err/check_unit_vector.hpp>
+#include <stan/math/prim/mat/err/check_vector.hpp>
+#include <stan/math/prim/mat/err/constraint_tolerance.hpp>
+#include <stan/math/prim/mat/err/validate_non_negative_index.hpp>
+#include <stan/math/prim/mat/fun/accumulator.hpp>
+#include <stan/math/prim/mat/fun/add.hpp>
+#include <stan/math/prim/mat/fun/append_col.hpp>
+#include <stan/math/prim/mat/fun/append_row.hpp>
+#include <stan/math/prim/mat/fun/array_builder.hpp>
+#include <stan/math/prim/mat/fun/assign.hpp>
+#include <stan/math/prim/mat/fun/autocorrelation.hpp>
+#include <stan/math/prim/mat/fun/autocovariance.hpp>
+#include <stan/math/prim/mat/fun/block.hpp>
+#include <stan/math/prim/mat/fun/cholesky_corr_constrain.hpp>
+#include <stan/math/prim/mat/fun/cholesky_corr_free.hpp>
+#include <stan/math/prim/mat/fun/cholesky_decompose.hpp>
+#include <stan/math/prim/mat/fun/cholesky_factor_constrain.hpp>
+#include <stan/math/prim/mat/fun/cholesky_factor_free.hpp>
+#include <stan/math/prim/mat/fun/col.hpp>
+#include <stan/math/prim/mat/fun/cols.hpp>
+#include <stan/math/prim/mat/fun/columns_dot_product.hpp>
+#include <stan/math/prim/mat/fun/columns_dot_self.hpp>
+#include <stan/math/prim/mat/fun/common_type.hpp>
+#include <stan/math/prim/mat/fun/corr_matrix_constrain.hpp>
+#include <stan/math/prim/mat/fun/corr_matrix_free.hpp>
+#include <stan/math/prim/mat/fun/cov_matrix_constrain.hpp>
+#include <stan/math/prim/mat/fun/cov_matrix_constrain_lkj.hpp>
+#include <stan/math/prim/mat/fun/cov_matrix_free.hpp>
+#include <stan/math/prim/mat/fun/cov_matrix_free_lkj.hpp>
+#include <stan/math/prim/mat/fun/crossprod.hpp>
+#include <stan/math/prim/mat/fun/cumulative_sum.hpp>
+#include <stan/math/prim/mat/fun/determinant.hpp>
+#include <stan/math/prim/mat/fun/diag_matrix.hpp>
+#include <stan/math/prim/mat/fun/diag_post_multiply.hpp>
+#include <stan/math/prim/mat/fun/diag_pre_multiply.hpp>
+#include <stan/math/prim/mat/fun/diagonal.hpp>
+#include <stan/math/prim/mat/fun/dims.hpp>
+#include <stan/math/prim/mat/fun/distance.hpp>
+#include <stan/math/prim/mat/fun/divide.hpp>
+#include <stan/math/prim/mat/fun/dot_product.hpp>
+#include <stan/math/prim/mat/fun/dot_self.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/fun/eigenvalues_sym.hpp>
+#include <stan/math/prim/mat/fun/eigenvectors_sym.hpp>
+#include <stan/math/prim/mat/fun/elt_divide.hpp>
+#include <stan/math/prim/mat/fun/elt_multiply.hpp>
+#include <stan/math/prim/mat/fun/exp.hpp>
+#include <stan/math/prim/mat/fun/factor_cov_matrix.hpp>
+#include <stan/math/prim/mat/fun/factor_U.hpp>
+#include <stan/math/prim/mat/fun/fill.hpp>
+#include <stan/math/prim/mat/fun/get_base1.hpp>
+#include <stan/math/prim/mat/fun/get_base1_lhs.hpp>
+#include <stan/math/prim/mat/fun/get_lp.hpp>
+#include <stan/math/prim/mat/fun/head.hpp>
+#include <stan/math/prim/mat/fun/initialize.hpp>
+#include <stan/math/prim/mat/fun/inverse.hpp>
+#include <stan/math/prim/mat/fun/inverse_spd.hpp>
+#include <stan/math/prim/mat/fun/LDLT_factor.hpp>
+#include <stan/math/prim/mat/fun/log.hpp>
+#include <stan/math/prim/mat/fun/log_determinant.hpp>
+#include <stan/math/prim/mat/fun/log_determinant_ldlt.hpp>
+#include <stan/math/prim/mat/fun/log_determinant_spd.hpp>
+#include <stan/math/prim/mat/fun/log_softmax.hpp>
+#include <stan/math/prim/mat/fun/log_sum_exp.hpp>
+#include <stan/math/prim/mat/fun/make_nu.hpp>
+#include <stan/math/prim/mat/fun/max.hpp>
+#include <stan/math/prim/mat/fun/mdivide_left.hpp>
+#include <stan/math/prim/mat/fun/mdivide_left_ldlt.hpp>
+#include <stan/math/prim/mat/fun/mdivide_left_spd.hpp>
+#include <stan/math/prim/mat/fun/mdivide_left_tri.hpp>
+#include <stan/math/prim/mat/fun/mdivide_left_tri_low.hpp>
+#include <stan/math/prim/mat/fun/mdivide_right.hpp>
+#include <stan/math/prim/mat/fun/mdivide_right_ldlt.hpp>
+#include <stan/math/prim/mat/fun/mdivide_right_spd.hpp>
+#include <stan/math/prim/mat/fun/mdivide_right_tri.hpp>
+#include <stan/math/prim/mat/fun/mdivide_right_tri_low.hpp>
+#include <stan/math/prim/mat/fun/mean.hpp>
+#include <stan/math/prim/mat/fun/min.hpp>
+#include <stan/math/prim/mat/fun/minus.hpp>
+#include <stan/math/prim/mat/fun/multiply.hpp>
+#include <stan/math/prim/mat/fun/multiply_lower_tri_self_transpose.hpp>
+#include <stan/math/prim/mat/fun/num_elements.hpp>
+#include <stan/math/prim/mat/fun/ordered_constrain.hpp>
+#include <stan/math/prim/mat/fun/ordered_free.hpp>
+#include <stan/math/prim/mat/fun/positive_ordered_constrain.hpp>
+#include <stan/math/prim/mat/fun/positive_ordered_free.hpp>
+#include <stan/math/prim/mat/fun/prod.hpp>
+#include <stan/math/prim/mat/fun/promote_common.hpp>
+#include <stan/math/prim/mat/fun/promote_scalar.hpp>
+#include <stan/math/prim/mat/fun/promote_scalar_type.hpp>
+#include <stan/math/prim/mat/fun/promoter.hpp>
+#include <stan/math/prim/mat/fun/qr_Q.hpp>
+#include <stan/math/prim/mat/fun/qr_R.hpp>
+#include <stan/math/prim/mat/fun/quad_form.hpp>
+#include <stan/math/prim/mat/fun/quad_form_diag.hpp>
+#include <stan/math/prim/mat/fun/quad_form_sym.hpp>
+#include <stan/math/prim/mat/fun/rank.hpp>
+#include <stan/math/prim/mat/fun/read_corr_L.hpp>
+#include <stan/math/prim/mat/fun/read_corr_matrix.hpp>
+#include <stan/math/prim/mat/fun/read_cov_L.hpp>
+#include <stan/math/prim/mat/fun/read_cov_matrix.hpp>
+#include <stan/math/prim/mat/fun/rep_matrix.hpp>
+#include <stan/math/prim/mat/fun/rep_row_vector.hpp>
+#include <stan/math/prim/mat/fun/rep_vector.hpp>
+#include <stan/math/prim/mat/fun/resize.hpp>
+#include <stan/math/prim/mat/fun/row.hpp>
+#include <stan/math/prim/mat/fun/rows.hpp>
+#include <stan/math/prim/mat/fun/rows_dot_product.hpp>
+#include <stan/math/prim/mat/fun/rows_dot_self.hpp>
+#include <stan/math/prim/mat/fun/sd.hpp>
+#include <stan/math/prim/mat/fun/segment.hpp>
+#include <stan/math/prim/mat/fun/simplex_constrain.hpp>
+#include <stan/math/prim/mat/fun/simplex_free.hpp>
+#include <stan/math/prim/mat/fun/singular_values.hpp>
+#include <stan/math/prim/mat/fun/size.hpp>
+#include <stan/math/prim/mat/fun/softmax.hpp>
+#include <stan/math/prim/mat/fun/sort.hpp>
+#include <stan/math/prim/mat/fun/sort_indices.hpp>
+#include <stan/math/prim/mat/fun/sort_indices_asc.hpp>
+#include <stan/math/prim/mat/fun/sort_indices_desc.hpp>
+#include <stan/math/prim/mat/fun/csr_extract_w.hpp>
+#include <stan/math/prim/mat/fun/csr_extract_v.hpp>
+#include <stan/math/prim/mat/fun/csr_extract_u.hpp>
+#include <stan/math/prim/mat/fun/csr_matrix_times_vector.hpp>
+#include <stan/math/prim/mat/fun/csr_to_dense_matrix.hpp>
+#include <stan/math/prim/mat/fun/csr_u_to_z.hpp>
+#include <stan/math/prim/mat/fun/squared_distance.hpp>
+#include <stan/math/prim/mat/fun/stan_print.hpp>
+#include <stan/math/prim/mat/fun/sub_col.hpp>
+#include <stan/math/prim/mat/fun/sub_row.hpp>
+#include <stan/math/prim/mat/fun/subtract.hpp>
+#include <stan/math/prim/mat/fun/sum.hpp>
+#include <stan/math/prim/mat/fun/tail.hpp>
+#include <stan/math/prim/mat/fun/tcrossprod.hpp>
+#include <stan/math/prim/mat/fun/to_array_1d.hpp>
+#include <stan/math/prim/mat/fun/to_array_2d.hpp>
+#include <stan/math/prim/mat/fun/to_matrix.hpp>
+#include <stan/math/prim/mat/fun/to_row_vector.hpp>
+#include <stan/math/prim/mat/fun/to_vector.hpp>
+#include <stan/math/prim/mat/fun/trace.hpp>
+#include <stan/math/prim/mat/fun/trace_gen_inv_quad_form_ldlt.hpp>
+#include <stan/math/prim/mat/fun/trace_gen_quad_form.hpp>
+#include <stan/math/prim/mat/fun/trace_inv_quad_form_ldlt.hpp>
+#include <stan/math/prim/mat/fun/trace_quad_form.hpp>
+#include <stan/math/prim/mat/fun/transpose.hpp>
+#include <stan/math/prim/mat/fun/typedefs.hpp>
+#include <stan/math/prim/mat/fun/unit_vector_constrain.hpp>
+#include <stan/math/prim/mat/fun/unit_vector_free.hpp>
+#include <stan/math/prim/mat/fun/value_of.hpp>
+#include <stan/math/prim/mat/fun/value_of_rec.hpp>
+#include <stan/math/prim/mat/fun/variance.hpp>
+#include <stan/math/prim/mat/fun/welford_covar_estimator.hpp>
+#include <stan/math/prim/mat/fun/welford_var_estimator.hpp>
+#include <stan/math/prim/mat/prob/categorical_log.hpp>
+#include <stan/math/prim/mat/prob/categorical_logit_log.hpp>
+#include <stan/math/prim/mat/prob/categorical_rng.hpp>
+#include <stan/math/prim/mat/prob/dirichlet_log.hpp>
+#include <stan/math/prim/mat/prob/dirichlet_rng.hpp>
+#include <stan/math/prim/mat/prob/gaussian_dlm_obs_log.hpp>
+#include <stan/math/prim/mat/prob/inv_wishart_log.hpp>
+#include <stan/math/prim/mat/prob/inv_wishart_rng.hpp>
+#include <stan/math/prim/mat/prob/lkj_corr_cholesky_log.hpp>
+#include <stan/math/prim/mat/prob/lkj_corr_cholesky_rng.hpp>
+#include <stan/math/prim/mat/prob/lkj_corr_log.hpp>
+#include <stan/math/prim/mat/prob/lkj_corr_rng.hpp>
+#include <stan/math/prim/mat/prob/lkj_cov_log.hpp>
+#include <stan/math/prim/mat/prob/matrix_normal_prec_log.hpp>
+#include <stan/math/prim/mat/prob/multi_gp_cholesky_log.hpp>
+#include <stan/math/prim/mat/prob/multi_gp_log.hpp>
+#include <stan/math/prim/mat/prob/multi_normal_cholesky_log.hpp>
+#include <stan/math/prim/mat/prob/multi_normal_cholesky_rng.hpp>
+#include <stan/math/prim/mat/prob/multi_normal_log.hpp>
+#include <stan/math/prim/mat/prob/multi_normal_prec_log.hpp>
+#include <stan/math/prim/mat/prob/multi_normal_rng.hpp>
+#include <stan/math/prim/mat/prob/multi_student_t_log.hpp>
+#include <stan/math/prim/mat/prob/multi_student_t_rng.hpp>
+#include <stan/math/prim/mat/prob/multinomial_log.hpp>
+#include <stan/math/prim/mat/prob/multinomial_rng.hpp>
+#include <stan/math/prim/mat/prob/ordered_logistic_log.hpp>
+#include <stan/math/prim/mat/prob/ordered_logistic_rng.hpp>
+#include <stan/math/prim/mat/prob/wishart_log.hpp>
+#include <stan/math/prim/mat/prob/wishart_rng.hpp>
+#include <stan/math/prim/scal/err/check_bounded.hpp>
+#include <stan/math/prim/scal/err/check_consistent_size.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_equal.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_greater.hpp>
+#include <stan/math/prim/scal/err/check_greater_or_equal.hpp>
+#include <stan/math/prim/scal/err/check_less.hpp>
+#include <stan/math/prim/scal/err/check_less_or_equal.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/err/check_nonzero_size.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/err/check_positive.hpp>
+#include <stan/math/prim/scal/err/check_positive_finite.hpp>
+#include <stan/math/prim/scal/err/check_positive_size.hpp>
+#include <stan/math/prim/scal/err/check_size_match.hpp>
+#include <stan/math/prim/scal/err/domain_error.hpp>
+#include <stan/math/prim/scal/err/domain_error_vec.hpp>
+#include <stan/math/prim/scal/err/invalid_argument.hpp>
+#include <stan/math/prim/scal/err/invalid_argument_vec.hpp>
+#include <stan/math/prim/scal/err/out_of_range.hpp>
+#include <stan/math/prim/scal/fun/abs.hpp>
+#include <stan/math/prim/scal/fun/as_bool.hpp>
+#include <stan/math/prim/scal/fun/bessel_first_kind.hpp>
+#include <stan/math/prim/scal/fun/bessel_second_kind.hpp>
+#include <stan/math/prim/scal/fun/binary_log_loss.hpp>
+#include <stan/math/prim/scal/fun/binomial_coefficient_log.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/corr_constrain.hpp>
+#include <stan/math/prim/scal/fun/corr_free.hpp>
+#include <stan/math/prim/scal/fun/digamma.hpp>
+#include <stan/math/prim/scal/fun/divide.hpp>
+#include <stan/math/prim/scal/fun/exp2.hpp>
+#include <stan/math/prim/scal/fun/F32.hpp>
+#include <stan/math/prim/scal/fun/falling_factorial.hpp>
+#include <stan/math/prim/scal/fun/fdim.hpp>
+#include <stan/math/prim/scal/fun/gamma_p.hpp>
+#include <stan/math/prim/scal/fun/gamma_q.hpp>
+#include <stan/math/prim/scal/fun/grad_2F1.hpp>
+#include <stan/math/prim/scal/fun/grad_F32.hpp>
+#include <stan/math/prim/scal/fun/grad_inc_beta.hpp>
+#include <stan/math/prim/scal/fun/grad_reg_inc_beta.hpp>
+#include <stan/math/prim/scal/fun/grad_reg_inc_gamma.hpp>
+#include <stan/math/prim/scal/fun/ibeta.hpp>
+#include <stan/math/prim/scal/fun/identity_constrain.hpp>
+#include <stan/math/prim/scal/fun/identity_free.hpp>
+#include <stan/math/prim/scal/fun/if_else.hpp>
+#include <stan/math/prim/scal/fun/inc_beta.hpp>
+#include <stan/math/prim/scal/fun/int_step.hpp>
+#include <stan/math/prim/scal/fun/inv.hpp>
+#include <stan/math/prim/scal/fun/inv_cloglog.hpp>
+#include <stan/math/prim/scal/fun/inv_logit.hpp>
+#include <stan/math/prim/scal/fun/inv_Phi.hpp>
+#include <stan/math/prim/scal/fun/inv_sqrt.hpp>
+#include <stan/math/prim/scal/fun/inv_square.hpp>
+#include <stan/math/prim/scal/fun/inverse_softmax.hpp>
+#include <stan/math/prim/scal/fun/is_inf.hpp>
+#include <stan/math/prim/scal/fun/is_nan.hpp>
+#include <stan/math/prim/scal/fun/is_uninitialized.hpp>
+#include <stan/math/prim/scal/fun/lb_constrain.hpp>
+#include <stan/math/prim/scal/fun/lb_free.hpp>
+#include <stan/math/prim/scal/fun/lbeta.hpp>
+#include <stan/math/prim/scal/fun/lgamma.hpp>
+#include <stan/math/prim/scal/fun/lmgamma.hpp>
+#include <stan/math/prim/scal/fun/log1m.hpp>
+#include <stan/math/prim/scal/fun/log1m_exp.hpp>
+#include <stan/math/prim/scal/fun/log1m_inv_logit.hpp>
+#include <stan/math/prim/scal/fun/log1p.hpp>
+#include <stan/math/prim/scal/fun/log1p_exp.hpp>
+#include <stan/math/prim/scal/fun/log2.hpp>
+#include <stan/math/prim/scal/fun/log_diff_exp.hpp>
+#include <stan/math/prim/scal/fun/log_falling_factorial.hpp>
+#include <stan/math/prim/scal/fun/log_inv_logit.hpp>
+#include <stan/math/prim/scal/fun/log_mix.hpp>
+#include <stan/math/prim/scal/fun/log_rising_factorial.hpp>
+#include <stan/math/prim/scal/fun/log_sum_exp.hpp>
+#include <stan/math/prim/scal/fun/logical_and.hpp>
+#include <stan/math/prim/scal/fun/logical_eq.hpp>
+#include <stan/math/prim/scal/fun/logical_gt.hpp>
+#include <stan/math/prim/scal/fun/logical_gte.hpp>
+#include <stan/math/prim/scal/fun/logical_lt.hpp>
+#include <stan/math/prim/scal/fun/logical_lte.hpp>
+#include <stan/math/prim/scal/fun/logical_negation.hpp>
+#include <stan/math/prim/scal/fun/logical_neq.hpp>
+#include <stan/math/prim/scal/fun/logical_or.hpp>
+#include <stan/math/prim/scal/fun/logit.hpp>
+#include <stan/math/prim/scal/fun/lub_constrain.hpp>
+#include <stan/math/prim/scal/fun/lub_free.hpp>
+#include <stan/math/prim/scal/fun/modified_bessel_first_kind.hpp>
+#include <stan/math/prim/scal/fun/modified_bessel_second_kind.hpp>
+#include <stan/math/prim/scal/fun/modulus.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/fun/owens_t.hpp>
+#include <stan/math/prim/scal/fun/Phi.hpp>
+#include <stan/math/prim/scal/fun/Phi_approx.hpp>
+#include <stan/math/prim/scal/fun/positive_constrain.hpp>
+#include <stan/math/prim/scal/fun/positive_free.hpp>
+#include <stan/math/prim/scal/fun/primitive_value.hpp>
+#include <stan/math/prim/scal/fun/prob_constrain.hpp>
+#include <stan/math/prim/scal/fun/prob_free.hpp>
+#include <stan/math/prim/scal/fun/promote_scalar.hpp>
+#include <stan/math/prim/scal/fun/promote_scalar_type.hpp>
+#include <stan/math/prim/scal/fun/rising_factorial.hpp>
+#include <stan/math/prim/scal/fun/sign.hpp>
+#include <stan/math/prim/scal/fun/square.hpp>
+#include <stan/math/prim/scal/fun/step.hpp>
+#include <stan/math/prim/scal/fun/trigamma.hpp>
+#include <stan/math/prim/scal/fun/ub_constrain.hpp>
+#include <stan/math/prim/scal/fun/ub_free.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/fun/value_of_rec.hpp>
+#include <stan/math/prim/scal/prob/bernoulli_ccdf_log.hpp>
+#include <stan/math/prim/scal/prob/bernoulli_cdf.hpp>
+#include <stan/math/prim/scal/prob/bernoulli_cdf_log.hpp>
+#include <stan/math/prim/scal/prob/bernoulli_log.hpp>
+#include <stan/math/prim/scal/prob/bernoulli_logit_log.hpp>
+#include <stan/math/prim/scal/prob/bernoulli_rng.hpp>
+#include <stan/math/prim/scal/prob/beta_binomial_ccdf_log.hpp>
+#include <stan/math/prim/scal/prob/beta_binomial_cdf.hpp>
+#include <stan/math/prim/scal/prob/beta_binomial_cdf_log.hpp>
+#include <stan/math/prim/scal/prob/beta_binomial_log.hpp>
+#include <stan/math/prim/scal/prob/beta_binomial_rng.hpp>
+#include <stan/math/prim/scal/prob/beta_ccdf_log.hpp>
+#include <stan/math/prim/scal/prob/beta_cdf.hpp>
+#include <stan/math/prim/scal/prob/beta_cdf_log.hpp>
+#include <stan/math/prim/scal/prob/beta_log.hpp>
+#include <stan/math/prim/scal/prob/beta_rng.hpp>
+#include <stan/math/prim/scal/prob/binomial_ccdf_log.hpp>
+#include <stan/math/prim/scal/prob/binomial_cdf.hpp>
+#include <stan/math/prim/scal/prob/binomial_cdf_log.hpp>
+#include <stan/math/prim/scal/prob/binomial_log.hpp>
+#include <stan/math/prim/scal/prob/binomial_logit_log.hpp>
+#include <stan/math/prim/scal/prob/binomial_rng.hpp>
+#include <stan/math/prim/scal/prob/cauchy_ccdf_log.hpp>
+#include <stan/math/prim/scal/prob/cauchy_cdf.hpp>
+#include <stan/math/prim/scal/prob/cauchy_cdf_log.hpp>
+#include <stan/math/prim/scal/prob/cauchy_log.hpp>
+#include <stan/math/prim/scal/prob/cauchy_rng.hpp>
+#include <stan/math/prim/scal/prob/chi_square_ccdf_log.hpp>
+#include <stan/math/prim/scal/prob/chi_square_cdf.hpp>
+#include <stan/math/prim/scal/prob/chi_square_cdf_log.hpp>
+#include <stan/math/prim/scal/prob/chi_square_log.hpp>
+#include <stan/math/prim/scal/prob/chi_square_rng.hpp>
+#include <stan/math/prim/scal/prob/double_exponential_ccdf_log.hpp>
+#include <stan/math/prim/scal/prob/double_exponential_cdf.hpp>
+#include <stan/math/prim/scal/prob/double_exponential_cdf_log.hpp>
+#include <stan/math/prim/scal/prob/double_exponential_log.hpp>
+#include <stan/math/prim/scal/prob/double_exponential_rng.hpp>
+#include <stan/math/prim/scal/prob/exp_mod_normal_ccdf_log.hpp>
+#include <stan/math/prim/scal/prob/exp_mod_normal_cdf.hpp>
+#include <stan/math/prim/scal/prob/exp_mod_normal_cdf_log.hpp>
+#include <stan/math/prim/scal/prob/exp_mod_normal_log.hpp>
+#include <stan/math/prim/scal/prob/exp_mod_normal_rng.hpp>
+#include <stan/math/prim/scal/prob/exponential_ccdf_log.hpp>
+#include <stan/math/prim/scal/prob/exponential_cdf.hpp>
+#include <stan/math/prim/scal/prob/exponential_cdf_log.hpp>
+#include <stan/math/prim/scal/prob/exponential_log.hpp>
+#include <stan/math/prim/scal/prob/exponential_rng.hpp>
+#include <stan/math/prim/scal/prob/frechet_ccdf_log.hpp>
+#include <stan/math/prim/scal/prob/frechet_cdf.hpp>
+#include <stan/math/prim/scal/prob/frechet_cdf_log.hpp>
+#include <stan/math/prim/scal/prob/frechet_log.hpp>
+#include <stan/math/prim/scal/prob/frechet_rng.hpp>
+#include <stan/math/prim/scal/prob/gamma_ccdf_log.hpp>
+#include <stan/math/prim/scal/prob/gamma_cdf.hpp>
+#include <stan/math/prim/scal/prob/gamma_cdf_log.hpp>
+#include <stan/math/prim/scal/prob/gamma_log.hpp>
+#include <stan/math/prim/scal/prob/gamma_rng.hpp>
+#include <stan/math/prim/scal/prob/gumbel_ccdf_log.hpp>
+#include <stan/math/prim/scal/prob/gumbel_cdf.hpp>
+#include <stan/math/prim/scal/prob/gumbel_cdf_log.hpp>
+#include <stan/math/prim/scal/prob/gumbel_log.hpp>
+#include <stan/math/prim/scal/prob/gumbel_rng.hpp>
+#include <stan/math/prim/scal/prob/hypergeometric_log.hpp>
+#include <stan/math/prim/scal/prob/hypergeometric_rng.hpp>
+#include <stan/math/prim/scal/prob/inv_chi_square_ccdf_log.hpp>
+#include <stan/math/prim/scal/prob/inv_chi_square_cdf.hpp>
+#include <stan/math/prim/scal/prob/inv_chi_square_cdf_log.hpp>
+#include <stan/math/prim/scal/prob/inv_chi_square_log.hpp>
+#include <stan/math/prim/scal/prob/inv_chi_square_rng.hpp>
+#include <stan/math/prim/scal/prob/inv_gamma_ccdf_log.hpp>
+#include <stan/math/prim/scal/prob/inv_gamma_cdf.hpp>
+#include <stan/math/prim/scal/prob/inv_gamma_cdf_log.hpp>
+#include <stan/math/prim/scal/prob/inv_gamma_log.hpp>
+#include <stan/math/prim/scal/prob/inv_gamma_rng.hpp>
+#include <stan/math/prim/scal/prob/logistic_ccdf_log.hpp>
+#include <stan/math/prim/scal/prob/logistic_cdf.hpp>
+#include <stan/math/prim/scal/prob/logistic_cdf_log.hpp>
+#include <stan/math/prim/scal/prob/logistic_log.hpp>
+#include <stan/math/prim/scal/prob/logistic_rng.hpp>
+#include <stan/math/prim/scal/prob/lognormal_ccdf_log.hpp>
+#include <stan/math/prim/scal/prob/lognormal_cdf.hpp>
+#include <stan/math/prim/scal/prob/lognormal_cdf_log.hpp>
+#include <stan/math/prim/scal/prob/lognormal_log.hpp>
+#include <stan/math/prim/scal/prob/lognormal_rng.hpp>
+#include <stan/math/prim/scal/prob/neg_binomial_2_ccdf_log.hpp>
+#include <stan/math/prim/scal/prob/neg_binomial_2_cdf.hpp>
+#include <stan/math/prim/scal/prob/neg_binomial_2_cdf_log.hpp>
+#include <stan/math/prim/scal/prob/neg_binomial_2_log.hpp>
+#include <stan/math/prim/scal/prob/neg_binomial_2_log_log.hpp>
+#include <stan/math/prim/scal/prob/neg_binomial_2_log_rng.hpp>
+#include <stan/math/prim/scal/prob/neg_binomial_2_rng.hpp>
+#include <stan/math/prim/scal/prob/neg_binomial_ccdf_log.hpp>
+#include <stan/math/prim/scal/prob/neg_binomial_cdf.hpp>
+#include <stan/math/prim/scal/prob/neg_binomial_cdf_log.hpp>
+#include <stan/math/prim/scal/prob/neg_binomial_log.hpp>
+#include <stan/math/prim/scal/prob/neg_binomial_rng.hpp>
+#include <stan/math/prim/scal/prob/normal_ccdf_log.hpp>
+#include <stan/math/prim/scal/prob/normal_cdf.hpp>
+#include <stan/math/prim/scal/prob/normal_cdf_log.hpp>
+#include <stan/math/prim/scal/prob/normal_log.hpp>
+#include <stan/math/prim/scal/prob/normal_rng.hpp>
+#include <stan/math/prim/scal/prob/pareto_ccdf_log.hpp>
+#include <stan/math/prim/scal/prob/pareto_cdf.hpp>
+#include <stan/math/prim/scal/prob/pareto_cdf_log.hpp>
+#include <stan/math/prim/scal/prob/pareto_log.hpp>
+#include <stan/math/prim/scal/prob/pareto_rng.hpp>
+#include <stan/math/prim/scal/prob/pareto_type_2_ccdf_log.hpp>
+#include <stan/math/prim/scal/prob/pareto_type_2_cdf.hpp>
+#include <stan/math/prim/scal/prob/pareto_type_2_cdf_log.hpp>
+#include <stan/math/prim/scal/prob/pareto_type_2_log.hpp>
+#include <stan/math/prim/scal/prob/pareto_type_2_rng.hpp>
+#include <stan/math/prim/scal/prob/poisson_ccdf_log.hpp>
+#include <stan/math/prim/scal/prob/poisson_cdf.hpp>
+#include <stan/math/prim/scal/prob/poisson_cdf_log.hpp>
+#include <stan/math/prim/scal/prob/poisson_log.hpp>
+#include <stan/math/prim/scal/prob/poisson_log_log.hpp>
+#include <stan/math/prim/scal/prob/poisson_log_rng.hpp>
+#include <stan/math/prim/scal/prob/poisson_rng.hpp>
+#include <stan/math/prim/scal/prob/rayleigh_ccdf_log.hpp>
+#include <stan/math/prim/scal/prob/rayleigh_cdf.hpp>
+#include <stan/math/prim/scal/prob/rayleigh_cdf_log.hpp>
+#include <stan/math/prim/scal/prob/rayleigh_log.hpp>
+#include <stan/math/prim/scal/prob/rayleigh_rng.hpp>
+#include <stan/math/prim/scal/prob/scaled_inv_chi_square_ccdf_log.hpp>
+#include <stan/math/prim/scal/prob/scaled_inv_chi_square_cdf.hpp>
+#include <stan/math/prim/scal/prob/scaled_inv_chi_square_cdf_log.hpp>
+#include <stan/math/prim/scal/prob/scaled_inv_chi_square_log.hpp>
+#include <stan/math/prim/scal/prob/scaled_inv_chi_square_rng.hpp>
+#include <stan/math/prim/scal/prob/skew_normal_ccdf_log.hpp>
+#include <stan/math/prim/scal/prob/skew_normal_cdf.hpp>
+#include <stan/math/prim/scal/prob/skew_normal_cdf_log.hpp>
+#include <stan/math/prim/scal/prob/skew_normal_log.hpp>
+#include <stan/math/prim/scal/prob/skew_normal_rng.hpp>
+#include <stan/math/prim/scal/prob/student_t_ccdf_log.hpp>
+#include <stan/math/prim/scal/prob/student_t_cdf.hpp>
+#include <stan/math/prim/scal/prob/student_t_cdf_log.hpp>
+#include <stan/math/prim/scal/prob/student_t_log.hpp>
+#include <stan/math/prim/scal/prob/student_t_rng.hpp>
+#include <stan/math/prim/scal/prob/uniform_ccdf_log.hpp>
+#include <stan/math/prim/scal/prob/uniform_cdf.hpp>
+#include <stan/math/prim/scal/prob/uniform_cdf_log.hpp>
+#include <stan/math/prim/scal/prob/uniform_log.hpp>
+#include <stan/math/prim/scal/prob/uniform_rng.hpp>
+#include <stan/math/prim/scal/prob/von_mises_log.hpp>
+#include <stan/math/prim/scal/prob/von_mises_rng.hpp>
+#include <stan/math/prim/scal/prob/weibull_ccdf_log.hpp>
+#include <stan/math/prim/scal/prob/weibull_cdf.hpp>
+#include <stan/math/prim/scal/prob/weibull_cdf_log.hpp>
+#include <stan/math/prim/scal/prob/weibull_log.hpp>
+#include <stan/math/prim/scal/prob/weibull_rng.hpp>
+#include <stan/math/prim/scal/prob/wiener_log.hpp>
+#include <stan/math/rev/arr/fun/log_sum_exp.hpp>
+#include <stan/math/rev/arr/functor/coupled_ode_system.hpp>
+#include <stan/math/rev/core.hpp>
+#include <stan/math/rev/mat/fun/cholesky_decompose.hpp>
+#include <stan/math/rev/mat/fun/columns_dot_product.hpp>
+#include <stan/math/rev/mat/fun/columns_dot_self.hpp>
+#include <stan/math/rev/mat/fun/crossprod.hpp>
+#include <stan/math/rev/mat/fun/determinant.hpp>
+#include <stan/math/rev/mat/fun/divide.hpp>
+#include <stan/math/rev/mat/fun/dot_product.hpp>
+#include <stan/math/rev/mat/fun/dot_self.hpp>
+#include <stan/math/rev/mat/fun/Eigen_NumTraits.hpp>
+#include <stan/math/rev/mat/fun/grad.hpp>
+#include <stan/math/rev/mat/fun/initialize_variable.hpp>
+#include <stan/math/rev/mat/fun/LDLT_alloc.hpp>
+#include <stan/math/rev/mat/fun/LDLT_factor.hpp>
+#include <stan/math/rev/mat/fun/log_determinant.hpp>
+#include <stan/math/rev/mat/fun/log_determinant_ldlt.hpp>
+#include <stan/math/rev/mat/fun/log_determinant_spd.hpp>
+#include <stan/math/rev/mat/fun/log_softmax.hpp>
+#include <stan/math/rev/mat/fun/log_sum_exp.hpp>
+#include <stan/math/rev/mat/fun/mdivide_left.hpp>
+#include <stan/math/rev/mat/fun/mdivide_left_ldlt.hpp>
+#include <stan/math/rev/mat/fun/mdivide_left_spd.hpp>
+#include <stan/math/rev/mat/fun/mdivide_left_tri.hpp>
+#include <stan/math/rev/mat/fun/multiply.hpp>
+#include <stan/math/rev/mat/fun/multiply_lower_tri_self_transpose.hpp>
+#include <stan/math/rev/mat/fun/quad_form.hpp>
+#include <stan/math/rev/mat/fun/quad_form_sym.hpp>
+#include <stan/math/rev/mat/fun/rows_dot_product.hpp>
+#include <stan/math/rev/mat/fun/sd.hpp>
+#include <stan/math/rev/mat/fun/softmax.hpp>
+#include <stan/math/rev/mat/fun/sort_asc.hpp>
+#include <stan/math/rev/mat/fun/sort_desc.hpp>
+#include <stan/math/rev/mat/fun/squared_distance.hpp>
+#include <stan/math/rev/mat/fun/stan_print.hpp>
+#include <stan/math/rev/mat/fun/sum.hpp>
+#include <stan/math/rev/mat/fun/tcrossprod.hpp>
+#include <stan/math/rev/mat/fun/to_var.hpp>
+#include <stan/math/rev/mat/fun/trace_gen_inv_quad_form_ldlt.hpp>
+#include <stan/math/rev/mat/fun/trace_gen_quad_form.hpp>
+#include <stan/math/rev/mat/fun/trace_inv_quad_form_ldlt.hpp>
+#include <stan/math/rev/mat/fun/trace_quad_form.hpp>
+#include <stan/math/rev/mat/fun/typedefs.hpp>
+#include <stan/math/rev/mat/fun/variance.hpp>
+#include <stan/math/rev/mat/functor/gradient.hpp>
+#include <stan/math/rev/mat/functor/jacobian.hpp>
+#include <stan/math/rev/scal/fun/abs.hpp>
+#include <stan/math/rev/scal/fun/acos.hpp>
+#include <stan/math/rev/scal/fun/acosh.hpp>
+#include <stan/math/rev/scal/fun/as_bool.hpp>
+#include <stan/math/rev/scal/fun/asin.hpp>
+#include <stan/math/rev/scal/fun/asinh.hpp>
+#include <stan/math/rev/scal/fun/atan.hpp>
+#include <stan/math/rev/scal/fun/atan2.hpp>
+#include <stan/math/rev/scal/fun/atanh.hpp>
+#include <stan/math/rev/scal/fun/bessel_first_kind.hpp>
+#include <stan/math/rev/scal/fun/bessel_second_kind.hpp>
+#include <stan/math/rev/scal/fun/binary_log_loss.hpp>
+#include <stan/math/rev/scal/fun/boost_fpclassify.hpp>
+#include <stan/math/rev/scal/fun/boost_isfinite.hpp>
+#include <stan/math/rev/scal/fun/boost_isinf.hpp>
+#include <stan/math/rev/scal/fun/boost_isnan.hpp>
+#include <stan/math/rev/scal/fun/boost_isnormal.hpp>
+#include <stan/math/rev/scal/fun/calculate_chain.hpp>
+#include <stan/math/rev/scal/fun/cbrt.hpp>
+#include <stan/math/rev/scal/fun/ceil.hpp>
+#include <stan/math/rev/scal/fun/cos.hpp>
+#include <stan/math/rev/scal/fun/cosh.hpp>
+#include <stan/math/rev/scal/fun/digamma.hpp>
+#include <stan/math/rev/scal/fun/erf.hpp>
+#include <stan/math/rev/scal/fun/erfc.hpp>
+#include <stan/math/rev/scal/fun/exp.hpp>
+#include <stan/math/rev/scal/fun/exp2.hpp>
+#include <stan/math/rev/scal/fun/expm1.hpp>
+#include <stan/math/rev/scal/fun/fabs.hpp>
+#include <stan/math/rev/scal/fun/falling_factorial.hpp>
+#include <stan/math/rev/scal/fun/fdim.hpp>
+#include <stan/math/rev/scal/fun/floor.hpp>
+#include <stan/math/rev/scal/fun/fma.hpp>
+#include <stan/math/rev/scal/fun/fmax.hpp>
+#include <stan/math/rev/scal/fun/fmin.hpp>
+#include <stan/math/rev/scal/fun/fmod.hpp>
+#include <stan/math/rev/scal/fun/gamma_p.hpp>
+#include <stan/math/rev/scal/fun/gamma_q.hpp>
+#include <stan/math/rev/scal/fun/grad_inc_beta.hpp>
+#include <stan/math/rev/scal/fun/hypot.hpp>
+#include <stan/math/rev/scal/fun/ibeta.hpp>
+#include <stan/math/rev/scal/fun/if_else.hpp>
+#include <stan/math/rev/scal/fun/inc_beta.hpp>
+#include <stan/math/rev/scal/fun/inv.hpp>
+#include <stan/math/rev/scal/fun/inv_cloglog.hpp>
+#include <stan/math/rev/scal/fun/inv_logit.hpp>
+#include <stan/math/rev/scal/fun/inv_Phi.hpp>
+#include <stan/math/rev/scal/fun/inv_sqrt.hpp>
+#include <stan/math/rev/scal/fun/inv_square.hpp>
+#include <stan/math/rev/scal/fun/is_inf.hpp>
+#include <stan/math/rev/scal/fun/is_nan.hpp>
+#include <stan/math/rev/scal/fun/is_uninitialized.hpp>
+#include <stan/math/rev/scal/fun/lgamma.hpp>
+#include <stan/math/rev/scal/fun/lmgamma.hpp>
+#include <stan/math/rev/scal/fun/log.hpp>
+#include <stan/math/rev/scal/fun/log10.hpp>
+#include <stan/math/rev/scal/fun/log1m.hpp>
+#include <stan/math/rev/scal/fun/log1m_exp.hpp>
+#include <stan/math/rev/scal/fun/log1p.hpp>
+#include <stan/math/rev/scal/fun/log1p_exp.hpp>
+#include <stan/math/rev/scal/fun/log2.hpp>
+#include <stan/math/rev/scal/fun/log_diff_exp.hpp>
+#include <stan/math/rev/scal/fun/log_falling_factorial.hpp>
+#include <stan/math/rev/scal/fun/log_mix.hpp>
+#include <stan/math/rev/scal/fun/log_rising_factorial.hpp>
+#include <stan/math/rev/scal/fun/log_sum_exp.hpp>
+#include <stan/math/rev/scal/fun/modified_bessel_first_kind.hpp>
+#include <stan/math/rev/scal/fun/modified_bessel_second_kind.hpp>
+#include <stan/math/rev/scal/fun/multiply_log.hpp>
+#include <stan/math/rev/scal/fun/owens_t.hpp>
+#include <stan/math/rev/scal/fun/Phi.hpp>
+#include <stan/math/rev/scal/fun/Phi_approx.hpp>
+#include <stan/math/rev/scal/fun/pow.hpp>
+#include <stan/math/rev/scal/fun/primitive_value.hpp>
+#include <stan/math/rev/scal/fun/rising_factorial.hpp>
+#include <stan/math/rev/scal/fun/round.hpp>
+#include <stan/math/rev/scal/fun/sin.hpp>
+#include <stan/math/rev/scal/fun/sinh.hpp>
+#include <stan/math/rev/scal/fun/sqrt.hpp>
+#include <stan/math/rev/scal/fun/square.hpp>
+#include <stan/math/rev/scal/fun/step.hpp>
+#include <stan/math/rev/scal/fun/tan.hpp>
+#include <stan/math/rev/scal/fun/tanh.hpp>
+#include <stan/math/rev/scal/fun/tgamma.hpp>
+#include <stan/math/rev/scal/fun/trunc.hpp>
+#include <stan/math/rev/scal/fun/value_of.hpp>
+#include <stan/math/rev/scal/fun/value_of_rec.hpp>
+
+

Go to the source code of this file.

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/math_8hpp_source.html b/doc/api/html/math_8hpp_source.html new file mode 100644 index 00000000000..c67713fded1 --- /dev/null +++ b/doc/api/html/math_8hpp_source.html @@ -0,0 +1,1440 @@ + + + + + + +Stan Math Library: stan/math.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
math.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_HPP
+
2 #define STAN_MATH_HPP
+
3 
+
4 #include <stan/math/version.hpp>
+
5 
+ + + + +
10 
+ + + + + + + +
18 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
50 
+ + +
53 
+ + + + + + + + +
62 
+ + + +
66 
+ + + + + + + + + + + + + + + + + + + + + + + + + +
92 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
242 
+
243 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
273 
+ + + + + + + + + + + + + + + + + + + + + +
295 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
386 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
538 
+ + +
541 
+
542 #include <stan/math/rev/core.hpp>
+
543 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
588 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
676 
+
677 #endif
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/matrix__normal__prec__log_8hpp.html b/doc/api/html/matrix__normal__prec__log_8hpp.html new file mode 100644 index 00000000000..ccaeaa07fda --- /dev/null +++ b/doc/api/html/matrix__normal__prec__log_8hpp.html @@ -0,0 +1,150 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/matrix_normal_prec_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
matrix_normal_prec_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_Mu , typename T_Sigma , typename T_D >
boost::math::tools::promote_args
+< T_y, T_Mu, T_Sigma, T_D >
+::type 
stan::math::matrix_normal_prec_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_Mu, Eigen::Dynamic, Eigen::Dynamic > &Mu, const Eigen::Matrix< T_Sigma, Eigen::Dynamic, Eigen::Dynamic > &Sigma, const Eigen::Matrix< T_D, Eigen::Dynamic, Eigen::Dynamic > &D)
 The log of the matrix normal density for the given y, mu, Sigma and D where Sigma and D are given as precision matrices, not covariance matrices. More...
 
template<typename T_y , typename T_Mu , typename T_Sigma , typename T_D >
boost::math::tools::promote_args
+< T_y, T_Mu, T_Sigma, T_D >
+::type 
stan::math::matrix_normal_prec_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_Mu, Eigen::Dynamic, Eigen::Dynamic > &Mu, const Eigen::Matrix< T_Sigma, Eigen::Dynamic, Eigen::Dynamic > &Sigma, const Eigen::Matrix< T_D, Eigen::Dynamic, Eigen::Dynamic > &D)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/matrix__normal__prec__log_8hpp_source.html b/doc/api/html/matrix__normal__prec__log_8hpp_source.html new file mode 100644 index 00000000000..b41474ebaa1 --- /dev/null +++ b/doc/api/html/matrix__normal__prec__log_8hpp_source.html @@ -0,0 +1,242 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/matrix_normal_prec_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
matrix_normal_prec_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_MATRIX_NORMAL_PREC_LOG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_MATRIX_NORMAL_PREC_LOG_HPP
+
3 
+ + + + + + +
10 
+ + + + + + + + +
19 
+
20 namespace stan {
+
21  namespace math {
+
40  template <bool propto,
+
41  typename T_y, typename T_Mu, typename T_Sigma, typename T_D>
+
42  typename boost::math::tools::promote_args<T_y, T_Mu, T_Sigma, T_D>::type
+
43  matrix_normal_prec_log(const Eigen::Matrix
+
44  <T_y, Eigen::Dynamic, Eigen::Dynamic>& y,
+
45  const Eigen::Matrix
+
46  <T_Mu, Eigen::Dynamic, Eigen::Dynamic>& Mu,
+
47  const Eigen::Matrix
+
48  <T_Sigma, Eigen::Dynamic, Eigen::Dynamic>& Sigma,
+
49  const Eigen::Matrix
+
50  <T_D, Eigen::Dynamic, Eigen::Dynamic>& D) {
+
51  static const char* function("stan::math::matrix_normal_prec_log");
+
52  typename
+
53  boost::math::tools::promote_args<T_y, T_Mu, T_Sigma, T_D>::type lp(0.0);
+
54 
+ + + + + + + + + + +
65 
+
66  check_positive(function, "Sigma rows", Sigma.rows());
+
67  check_finite(function, "Sigma", Sigma);
+
68  check_symmetric(function, "Sigma", Sigma);
+
69 
+ +
71  check_ldlt_factor(function, "LDLT_Factor of Sigma", ldlt_Sigma);
+
72  check_positive(function, "D rows", D.rows());
+
73  check_finite(function, "D", D);
+
74  check_symmetric(function, "Sigma", D);
+
75 
+ +
77  check_ldlt_factor(function, "LDLT_Factor of D", ldlt_D);
+
78  check_size_match(function,
+
79  "Rows of random variable", y.rows(),
+
80  "Rows of location parameter", Mu.rows());
+
81  check_size_match(function,
+
82  "Columns of random variable", y.cols(),
+
83  "Columns of location parameter", Mu.cols());
+
84  check_size_match(function,
+
85  "Rows of random variable", y.rows(),
+
86  "Rows of Sigma", Sigma.rows());
+
87  check_size_match(function,
+
88  "Columns of random variable", y.cols(),
+
89  "Rows of D", D.rows());
+
90  check_finite(function, "Location parameter", Mu);
+
91  check_finite(function, "Random variable", y);
+
92 
+ +
94  lp += NEG_LOG_SQRT_TWO_PI * y.cols() * y.rows();
+
95 
+ +
97  lp += log_determinant_ldlt(ldlt_Sigma) * (0.5 * y.rows());
+
98  }
+
99 
+ +
101  lp += log_determinant_ldlt(ldlt_D) * (0.5 * y.cols());
+
102  }
+
103 
+ +
105  lp -= 0.5 * trace_gen_quad_form(D, Sigma, subtract(y, Mu));
+
106  }
+
107  return lp;
+
108  }
+
109 
+
110  template <typename T_y, typename T_Mu, typename T_Sigma, typename T_D>
+
111  typename boost::math::tools::promote_args<T_y, T_Mu, T_Sigma, T_D>::type
+
112  matrix_normal_prec_log(const Eigen::Matrix
+
113  <T_y, Eigen::Dynamic, Eigen::Dynamic>& y,
+
114  const Eigen::Matrix
+
115  <T_Mu, Eigen::Dynamic, Eigen::Dynamic>& Mu,
+
116  const Eigen::Matrix
+
117  <T_Sigma, Eigen::Dynamic, Eigen::Dynamic>& Sigma,
+
118  const Eigen::Matrix
+
119  <T_D, Eigen::Dynamic, Eigen::Dynamic>& D) {
+
120  return matrix_normal_prec_log<false>(y, Mu, Sigma, D);
+
121  }
+
122  }
+
123 }
+
124 
+
125 #endif
+ +
boost::math::tools::promote_args< T_y, T_Mu, T_Sigma, T_D >::type matrix_normal_prec_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_Mu, Eigen::Dynamic, Eigen::Dynamic > &Mu, const Eigen::Matrix< T_Sigma, Eigen::Dynamic, Eigen::Dynamic > &Sigma, const Eigen::Matrix< T_D, Eigen::Dynamic, Eigen::Dynamic > &D)
The log of the matrix normal density for the given y, mu, Sigma and D where Sigma and D are given as ...
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ + +
Eigen::Matrix< typename boost::math::tools::promote_args< T1, T2 >::type, R, C > subtract(const Eigen::Matrix< T1, R, C > &m1, const Eigen::Matrix< T2, R, C > &m2)
Return the result of subtracting the second specified matrix from the first specified matrix...
Definition: subtract.hpp:27
+
bool check_symmetric(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is symmetric.
+ +
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ +
fvar< T > trace_gen_quad_form(const Eigen::Matrix< fvar< T >, RD, CD > &D, const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, CB > &B)
+ + + + + +
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+
bool check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Return true if the provided sizes match.
+
const double NEG_LOG_SQRT_TWO_PI
Definition: constants.hpp:184
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + +
T log_determinant_ldlt(stan::math::LDLT_factor< T, R, C > &A)
+ +
bool check_ldlt_factor(const char *function, const char *name, stan::math::LDLT_factor< T, R, C > &A)
Return true if the argument is a valid stan::math::LDLT_factor.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/matrix__vari_8hpp.html b/doc/api/html/matrix__vari_8hpp.html new file mode 100644 index 00000000000..0c5b221bfea --- /dev/null +++ b/doc/api/html/matrix__vari_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/rev/core/matrix_vari.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
matrix_vari.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

class  stan::math::op_matrix_vari
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/matrix__vari_8hpp_source.html b/doc/api/html/matrix__vari_8hpp_source.html new file mode 100644 index 00000000000..df49340f172 --- /dev/null +++ b/doc/api/html/matrix__vari_8hpp_source.html @@ -0,0 +1,156 @@ + + + + + + +Stan Math Library: stan/math/rev/core/matrix_vari.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
matrix_vari.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_MATRIX_VARI_HPP
+
2 #define STAN_MATH_REV_CORE_MATRIX_VARI_HPP
+
3 
+ + + + +
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
12  class op_matrix_vari : public vari {
+
13  protected:
+
14  const size_t size_;
+ +
16  public:
+
17  template <int R, int C>
+
18  op_matrix_vari(double f,
+
19  const Eigen::Matrix<stan::math::var, R, C>& vs) :
+
20  vari(f),
+
21  size_(vs.size()) {
+
22  vis_ = reinterpret_cast<vari**>
+
23  (operator new(sizeof(vari*) * vs.size()));
+
24  for (int i = 0; i < vs.size(); ++i)
+
25  vis_[i] = vs(i).vi_;
+
26  }
+
27  vari* operator[](size_t n) const {
+
28  return vis_[n];
+
29  }
+
30  size_t size() {
+
31  return size_;
+
32  }
+
33  };
+
34 
+
35  }
+
36 }
+
37 #endif
+ + +
The variable implementation base class.
Definition: vari.hpp:28
+
vari * operator[](size_t n) const
Definition: matrix_vari.hpp:27
+
op_matrix_vari(double f, const Eigen::Matrix< stan::math::var, R, C > &vs)
Definition: matrix_vari.hpp:18
+ + + + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/max_8hpp.html b/doc/api/html/max_8hpp.html new file mode 100644 index 00000000000..abf8a1d744d --- /dev/null +++ b/doc/api/html/max_8hpp.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/max.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
max.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <algorithm>
+#include <limits>
+#include <stdexcept>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + +

+Functions

int stan::math::max (const std::vector< int > &x)
 Returns the maximum coefficient in the specified column vector. More...
 
template<typename T >
stan::math::max (const std::vector< T > &x)
 Returns the maximum coefficient in the specified column vector. More...
 
template<typename T , int R, int C>
stan::math::max (const Eigen::Matrix< T, R, C > &m)
 Returns the maximum coefficient in the specified vector, row vector, or matrix. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/max_8hpp_source.html b/doc/api/html/max_8hpp_source.html new file mode 100644 index 00000000000..b82a12d76e9 --- /dev/null +++ b/doc/api/html/max_8hpp_source.html @@ -0,0 +1,154 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/max.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
max.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_MAX_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_MAX_HPP
+
3 
+ +
5 #include <algorithm>
+
6 #include <limits>
+
7 #include <stdexcept>
+
8 #include <vector>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
21  inline int max(const std::vector<int>& x) {
+
22  if (x.size() == 0)
+
23  throw std::domain_error("error: cannot take max of empty int vector");
+
24  int max = x[0];
+
25  for (size_t i = 1; i < x.size(); ++i)
+
26  if (x[i] > max)
+
27  max = x[i];
+
28  return max;
+
29  }
+
30 
+
38  template <typename T>
+
39  inline T max(const std::vector<T>& x) {
+
40  if (x.size() == 0)
+
41  return -std::numeric_limits<T>::infinity();
+
42  T max = x[0];
+
43  for (size_t i = 1; i < x.size(); ++i)
+
44  if (x[i] > max)
+
45  max = x[i];
+
46  return max;
+
47  }
+
48 
+
55  template <typename T, int R, int C>
+
56  inline T max(const Eigen::Matrix<T, R, C>& m) {
+
57  if (m.size() == 0)
+
58  return -std::numeric_limits<double>::infinity();
+
59  return m.maxCoeff();
+
60  }
+
61 
+
62  }
+
63 }
+
64 #endif
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ +
int max(const std::vector< int > &x)
Returns the maximum coefficient in the specified column vector.
Definition: max.hpp:21
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/max__size_8hpp.html b/doc/api/html/max__size_8hpp.html new file mode 100644 index 00000000000..99f85b22bc1 --- /dev/null +++ b/doc/api/html/max__size_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/max_size.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
max_size.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Namespaces

 stan
 
+ + + + + + + + + + +

+Functions

template<typename T1 , typename T2 >
size_t stan::max_size (const T1 &x1, const T2 &x2)
 
template<typename T1 , typename T2 , typename T3 >
size_t stan::max_size (const T1 &x1, const T2 &x2, const T3 &x3)
 
template<typename T1 , typename T2 , typename T3 , typename T4 >
size_t stan::max_size (const T1 &x1, const T2 &x2, const T3 &x3, const T4 &x4)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/max__size_8hpp_source.html b/doc/api/html/max__size_8hpp_source.html new file mode 100644 index 00000000000..d5b31bfa0ae --- /dev/null +++ b/doc/api/html/max__size_8hpp_source.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/max_size.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
max_size.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_MAX_SIZE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_MAX_SIZE_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7 
+
8  template <typename T1, typename T2>
+
9  size_t max_size(const T1& x1, const T2& x2) {
+
10  size_t result = length(x1);
+
11  result = result > length(x2) ? result : length(x2);
+
12  return result;
+
13  }
+
14 
+
15  template <typename T1, typename T2, typename T3>
+
16  size_t max_size(const T1& x1, const T2& x2, const T3& x3) {
+
17  size_t result = length(x1);
+
18  result = result > length(x2) ? result : length(x2);
+
19  result = result > length(x3) ? result : length(x3);
+
20  return result;
+
21  }
+
22 
+
23  template <typename T1, typename T2, typename T3, typename T4>
+
24  size_t max_size(const T1& x1, const T2& x2, const T3& x3, const T4& x4) {
+
25  size_t result = length(x1);
+
26  result = result > length(x2) ? result : length(x2);
+
27  result = result > length(x3) ? result : length(x3);
+
28  result = result > length(x4) ? result : length(x4);
+
29  return result;
+
30  }
+
31 
+
32 }
+
33 #endif
+
34 
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/max__size__mvt_8hpp.html b/doc/api/html/max__size__mvt_8hpp.html new file mode 100644 index 00000000000..9c4f321a91e --- /dev/null +++ b/doc/api/html/max__size__mvt_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/max_size_mvt.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
max_size_mvt.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/length_mvt.hpp>
+#include <cstdlib>
+
+

Go to the source code of this file.

+ + + + +

+Namespaces

 stan
 
+ + + + + + + + + + +

+Functions

template<typename T1 , typename T2 >
size_t stan::max_size_mvt (const T1 &x1, const T2 &x2)
 
template<typename T1 , typename T2 , typename T3 >
size_t stan::max_size_mvt (const T1 &x1, const T2 &x2, const T3 &x3)
 
template<typename T1 , typename T2 , typename T3 , typename T4 >
size_t stan::max_size_mvt (const T1 &x1, const T2 &x2, const T3 &x3, const T4 &x4)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/max__size__mvt_8hpp_source.html b/doc/api/html/max__size__mvt_8hpp_source.html new file mode 100644 index 00000000000..4f618c3541f --- /dev/null +++ b/doc/api/html/max__size__mvt_8hpp_source.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/max_size_mvt.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
max_size_mvt.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_MAX_SIZE_MVT_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_MAX_SIZE_MVT_HPP
+
3 
+ +
5 #include <cstdlib>
+
6 
+
7 namespace stan {
+
8 
+
9  template <typename T1, typename T2>
+
10  size_t max_size_mvt(const T1& x1, const T2& x2) {
+
11  size_t result = length_mvt(x1);
+
12  result = result > length_mvt(x2) ? result : length_mvt(x2);
+
13  return result;
+
14  }
+
15 
+
16  template <typename T1, typename T2, typename T3>
+
17  size_t max_size_mvt(const T1& x1, const T2& x2, const T3& x3) {
+
18  size_t result = length_mvt(x1);
+
19  result = result > length_mvt(x2) ? result : length_mvt(x2);
+
20  result = result > length_mvt(x3) ? result : length_mvt(x3);
+
21  return result;
+
22  }
+
23 
+
24  template <typename T1, typename T2, typename T3, typename T4>
+
25  size_t max_size_mvt(const T1& x1, const T2& x2, const T3& x3, const T4& x4) {
+
26  size_t result = length_mvt(x1);
+
27  result = result > length_mvt(x2) ? result : length_mvt(x2);
+
28  result = result > length_mvt(x3) ? result : length_mvt(x3);
+
29  result = result > length_mvt(x4) ? result : length_mvt(x4);
+
30  return result;
+
31  }
+
32 
+
33 }
+
34 #endif
+
35 
+
size_t max_size_mvt(const T1 &x1, const T2 &x2)
+ +
size_t length_mvt(const T &)
Definition: length_mvt.hpp:12
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mdivide__right__ldlt_8hpp.html b/doc/api/html/mdivide__right__ldlt_8hpp.html new file mode 100644 index 00000000000..e2c4a9575c8 --- /dev/null +++ b/doc/api/html/mdivide__right__ldlt_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/mdivide_right_ldlt.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
mdivide_right_ldlt.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R1, C2 > 
stan::math::mdivide_right_ldlt (const Eigen::Matrix< T1, R1, C1 > &b, const stan::math::LDLT_factor< T2, R2, C2 > &A)
 Returns the solution of the system xA=b given an LDLT_factor of A. More...
 
template<int R1, int C1, int R2, int C2>
Eigen::Matrix< double, R1, C2 > stan::math::mdivide_right_ldlt (const Eigen::Matrix< double, R1, C1 > &b, const stan::math::LDLT_factor< double, R2, C2 > &A)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mdivide__right__ldlt_8hpp_source.html b/doc/api/html/mdivide__right__ldlt_8hpp_source.html new file mode 100644 index 00000000000..8730e9da813 --- /dev/null +++ b/doc/api/html/mdivide__right__ldlt_8hpp_source.html @@ -0,0 +1,158 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/mdivide_right_ldlt.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
mdivide_right_ldlt.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_MDIVIDE_RIGHT_LDLT_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_MDIVIDE_RIGHT_LDLT_HPP
+
3 
+ + + + + +
9 #include <boost/math/tools/promotion.hpp>
+
10 
+
11 namespace stan {
+
12  namespace math {
+
13 
+
22  template <typename T1, typename T2, int R1, int C1, int R2, int C2>
+
23  inline
+
24  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type,
+
25  R1, C2>
+
26  mdivide_right_ldlt(const Eigen::Matrix<T1, R1, C1> &b,
+ + +
29  stan::math::check_multiplicable("mdivide_right_ldlt",
+
30  "b", b,
+
31  "A", A);
+
32 
+
33  return transpose(mdivide_left_ldlt(A, transpose(b)));
+
34  }
+
35 
+
36  template <int R1, int C1, int R2, int C2>
+
37  inline Eigen::Matrix<double, R1, C2>
+
38  mdivide_right_ldlt(const Eigen::Matrix<double, R1, C1> &b,
+ +
40  stan::math::check_multiplicable("mdivide_right_ldlt",
+
41  "b", b,
+
42  "A", A);
+
43  return A.solveRight(b);
+
44  }
+
45 
+
46  }
+
47 }
+
48 #endif
+ + + + +
Eigen::Matrix< fvar< T2 >, R1, C2 > mdivide_left_ldlt(const stan::math::LDLT_factor< double, R1, C1 > &A, const Eigen::Matrix< fvar< T2 >, R2, C2 > &b)
Returns the solution of the system Ax=b given an LDLT_factor of A.
+
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+ + +
Eigen::Matrix< typename boost::math::tools::promote_args< T1, T2 >::type, R1, C2 > mdivide_right_ldlt(const Eigen::Matrix< T1, R1, C1 > &b, const stan::math::LDLT_factor< T2, R2, C2 > &A)
Returns the solution of the system xA=b given an LDLT_factor of A.
+
Eigen::Matrix< T, C, R > transpose(const Eigen::Matrix< T, R, C > &m)
Definition: transpose.hpp:12
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mdivide__right__spd_8hpp.html b/doc/api/html/mdivide__right__spd_8hpp.html new file mode 100644 index 00000000000..ef28216eaa3 --- /dev/null +++ b/doc/api/html/mdivide__right__spd_8hpp.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/mdivide_right_spd.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
mdivide_right_spd.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R1, C2 > 
stan::math::mdivide_right_spd (const Eigen::Matrix< T1, R1, C1 > &b, const Eigen::Matrix< T2, R2, C2 > &A)
 Returns the solution of the system Ax=b where A is symmetric positive definite. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mdivide__right__spd_8hpp_source.html b/doc/api/html/mdivide__right__spd_8hpp_source.html new file mode 100644 index 00000000000..56d3abf34a4 --- /dev/null +++ b/doc/api/html/mdivide__right__spd_8hpp_source.html @@ -0,0 +1,158 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/mdivide_right_spd.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
mdivide_right_spd.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_MDIVIDE_RIGHT_SPD_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_MDIVIDE_RIGHT_SPD_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+ + + + + + + +
12 
+
13 namespace stan {
+
14  namespace math {
+
15 
+
25  template <typename T1, typename T2, int R1, int C1, int R2, int C2>
+
26  inline
+
27  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type,
+
28  R1, C2>
+
29  mdivide_right_spd(const Eigen::Matrix<T1, R1, C1> &b,
+
30  const Eigen::Matrix<T2, R2, C2> &A) {
+
31  stan::math::check_square("mdivide_right_spd", "A", A);
+
32  stan::math::check_multiplicable("mdivide_right_spd",
+
33  "b", b,
+
34  "A", A);
+
35  stan::math::check_symmetric("mdivide_right_spd", "A", A);
+
36  stan::math::check_pos_definite("mdivide_right_spd", "A", A);
+
37  // FIXME: This is nice and general but likely slow.
+
38  // FIXME: After allowing for general MatrixBase in mdivide_left_spd,
+
39  // change to b.transpose()
+
40  return mdivide_left_spd(A, transpose(b)).transpose();
+
41  }
+
42 
+
43  }
+
44 }
+
45 #endif
+ + +
bool check_symmetric(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is symmetric.
+ +
Eigen::Matrix< typename boost::math::tools::promote_args< T1, T2 >::type, R1, C2 > mdivide_left_spd(const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &b)
Returns the solution of the system Ax=b where A is symmetric positive definite.
+
bool check_pos_definite(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified square, symmetric matrix is positive definite.
+ +
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+
Eigen::Matrix< typename boost::math::tools::promote_args< T1, T2 >::type, R1, C2 > mdivide_right_spd(const Eigen::Matrix< T1, R1, C1 > &b, const Eigen::Matrix< T2, R2, C2 > &A)
Returns the solution of the system Ax=b where A is symmetric positive definite.
+ +
Eigen::Matrix< T, C, R > transpose(const Eigen::Matrix< T, R, C > &m)
Definition: transpose.hpp:12
+
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mdivide__right__tri_8hpp.html b/doc/api/html/mdivide__right__tri_8hpp.html new file mode 100644 index 00000000000..46151fffdb1 --- /dev/null +++ b/doc/api/html/mdivide__right__tri_8hpp.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/mdivide_right_tri.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
mdivide_right_tri.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<int TriView, typename T1 , typename T2 , int R1, int C1, int R2, int C2>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R1, C2 > 
stan::math::mdivide_right_tri (const Eigen::Matrix< T1, R1, C1 > &b, const Eigen::Matrix< T2, R2, C2 > &A)
 Returns the solution of the system Ax=b when A is triangular. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mdivide__right__tri_8hpp_source.html b/doc/api/html/mdivide__right__tri_8hpp_source.html new file mode 100644 index 00000000000..2f08f7c55d0 --- /dev/null +++ b/doc/api/html/mdivide__right__tri_8hpp_source.html @@ -0,0 +1,160 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/mdivide_right_tri.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
mdivide_right_tri.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_MDIVIDE_RIGHT_TRI_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_MDIVIDE_RIGHT_TRI_HPP
+
3 
+ + + + + +
9 #include <boost/math/tools/promotion.hpp>
+
10 #include <stdexcept>
+
11 
+
12 namespace stan {
+
13  namespace math {
+
14 
+
24  template <int TriView, typename T1, typename T2,
+
25  int R1, int C1, int R2, int C2>
+
26  inline
+
27  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type,
+
28  R1, C2>
+
29  mdivide_right_tri(const Eigen::Matrix<T1, R1, C1> &b,
+
30  const Eigen::Matrix<T2, R2, C2> &A) {
+
31  stan::math::check_square("mdivide_right_tri", "A", A);
+
32  stan::math::check_multiplicable("mdivide_right_tri",
+
33  "b", b,
+
34  "A", A);
+
35  // FIXME: This is nice and general but requires some extra memory
+
36  // and copying.
+
37  if (TriView == Eigen::Lower) {
+
38  return transpose(mdivide_left_tri<Eigen::Upper>(transpose(A),
+
39  transpose(b)));
+
40  } else if (TriView == Eigen::Upper) {
+
41  return transpose(mdivide_left_tri<Eigen::Lower>(transpose(A),
+
42  transpose(b)));
+
43  } else {
+
44  throw std::domain_error("triangular view must be Eigen::Lower or "
+
45  "Eigen::Upper");
+
46  }
+
47  }
+
48 
+
49  }
+
50 }
+
51 #endif
+
Eigen::Matrix< typename boost::math::tools::promote_args< T1, T2 >::type, R1, C2 > mdivide_right_tri(const Eigen::Matrix< T1, R1, C1 > &b, const Eigen::Matrix< T2, R2, C2 > &A)
Returns the solution of the system Ax=b when A is triangular.
+ + + +
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ +
Eigen::Matrix< T, C, R > transpose(const Eigen::Matrix< T, R, C > &m)
Definition: transpose.hpp:12
+
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mean_8hpp.html b/doc/api/html/mean_8hpp.html new file mode 100644 index 00000000000..6ea32c65c47 --- /dev/null +++ b/doc/api/html/mean_8hpp.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/mean.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
mean.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/scal/err/check_nonzero_size.hpp>
+#include <boost/math/tools/promotion.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
boost::math::tools::promote_args
+< T >::type 
stan::math::mean (const std::vector< T > &v)
 Returns the sample mean (i.e., average) of the coefficients in the specified standard vector. More...
 
template<typename T , int R, int C>
boost::math::tools::promote_args
+< T >::type 
stan::math::mean (const Eigen::Matrix< T, R, C > &m)
 Returns the sample mean (i.e., average) of the coefficients in the specified vector, row vector, or matrix. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mean_8hpp_source.html b/doc/api/html/mean_8hpp_source.html new file mode 100644 index 00000000000..f7d9ebcc915 --- /dev/null +++ b/doc/api/html/mean_8hpp_source.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/mean.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
mean.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_MEAN_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_MEAN_HPP
+
3 
+ + +
6 #include <boost/math/tools/promotion.hpp>
+
7 #include <vector>
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
20  template <typename T>
+
21  inline
+
22  typename boost::math::tools::promote_args<T>::type
+
23  mean(const std::vector<T>& v) {
+
24  stan::math::check_nonzero_size("mean", "v", v);
+
25  T sum(v[0]);
+
26  for (size_t i = 1; i < v.size(); ++i)
+
27  sum += v[i];
+
28  return sum / v.size();
+
29  }
+
30 
+
37  template <typename T, int R, int C>
+
38  inline
+
39  typename boost::math::tools::promote_args<T>::type
+
40  mean(const Eigen::Matrix<T, R, C>& m) {
+
41  stan::math::check_nonzero_size("mean", "m", m);
+
42  return m.mean();
+
43  }
+
44 
+
45  }
+
46 }
+
47 #endif
+
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+
bool check_nonzero_size(const char *function, const char *name, const T_y &y)
Return true if the specified matrix/vector is of non-zero size.
+
boost::math::tools::promote_args< T >::type mean(const std::vector< T > &v)
Returns the sample mean (i.e., average) of the coefficients in the specified standard vector...
Definition: mean.hpp:23
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/min_8hpp.html b/doc/api/html/min_8hpp.html new file mode 100644 index 00000000000..563001992e2 --- /dev/null +++ b/doc/api/html/min_8hpp.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/min.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
min.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <algorithm>
+#include <limits>
+#include <stdexcept>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + +

+Functions

int stan::math::min (const std::vector< int > &x)
 Returns the minimum coefficient in the specified column vector. More...
 
template<typename T >
stan::math::min (const std::vector< T > &x)
 Returns the minimum coefficient in the specified column vector. More...
 
template<typename T , int R, int C>
stan::math::min (const Eigen::Matrix< T, R, C > &m)
 Returns the minimum coefficient in the specified matrix, vector, or row vector. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/min_8hpp_source.html b/doc/api/html/min_8hpp_source.html new file mode 100644 index 00000000000..2e5d43225e9 --- /dev/null +++ b/doc/api/html/min_8hpp_source.html @@ -0,0 +1,154 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/min.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
min.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_MIN_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_MIN_HPP
+
3 
+ +
5 #include <algorithm>
+
6 #include <limits>
+
7 #include <stdexcept>
+
8 #include <vector>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
20  inline int min(const std::vector<int>& x) {
+
21  if (x.size() == 0)
+
22  throw std::domain_error("error: cannot take min of empty int vector");
+
23  int min = x[0];
+
24  for (size_t i = 1; i < x.size(); ++i)
+
25  if (x[i] < min)
+
26  min = x[i];
+
27  return min;
+
28  }
+
29 
+
37  template <typename T>
+
38  inline T min(const std::vector<T>& x) {
+
39  if (x.size() == 0)
+
40  return std::numeric_limits<T>::infinity();
+
41  T min = x[0];
+
42  for (size_t i = 1; i < x.size(); ++i)
+
43  if (x[i] < min)
+
44  min = x[i];
+
45  return min;
+
46  }
+
47 
+
54  template <typename T, int R, int C>
+
55  inline T min(const Eigen::Matrix<T, R, C>& m) {
+
56  if (m.size() == 0)
+
57  return std::numeric_limits<double>::infinity();
+
58  return m.minCoeff();
+
59  }
+
60 
+
61  }
+
62 }
+
63 #endif
+
int min(const std::vector< int > &x)
Returns the minimum coefficient in the specified column vector.
Definition: min.hpp:20
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/minus_8hpp.html b/doc/api/html/minus_8hpp.html new file mode 100644 index 00000000000..7f15ea9f411 --- /dev/null +++ b/doc/api/html/minus_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/minus.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
minus.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
stan::math::minus (const T &x)
 Returns the negation of the specified scalar or matrix. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/minus_8hpp_source.html b/doc/api/html/minus_8hpp_source.html new file mode 100644 index 00000000000..c6786492502 --- /dev/null +++ b/doc/api/html/minus_8hpp_source.html @@ -0,0 +1,124 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/minus.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
minus.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_MINUS_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_MINUS_HPP
+
3 
+
4 namespace stan {
+
5  namespace math {
+
6 
+
14  template <typename T>
+
15  inline
+
16  T minus(const T& x) {
+
17  return -x;
+
18  }
+
19 
+
20  }
+
21 }
+
22 #endif
+
T minus(const T &x)
Returns the negation of the specified scalar or matrix.
Definition: minus.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mix_2mat_2fun_2typedefs_8hpp.html b/doc/api/html/mix_2mat_2fun_2typedefs_8hpp.html new file mode 100644 index 00000000000..aefc3f5f28f --- /dev/null +++ b/doc/api/html/mix_2mat_2fun_2typedefs_8hpp.html @@ -0,0 +1,152 @@ + + + + + + +Stan Math Library: stan/math/mix/mat/fun/typedefs.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
typedefs.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + +

+Typedefs

typedef Eigen::Matrix< fvar
+< var >, Eigen::Dynamic,
+Eigen::Dynamic > 
stan::math::matrix_fv
 
typedef Eigen::Matrix< fvar
+< fvar< var >
+ >, Eigen::Dynamic,
+Eigen::Dynamic > 
stan::math::matrix_ffv
 
typedef Eigen::Matrix< fvar
+< var >, Eigen::Dynamic, 1 > 
stan::math::vector_fv
 
typedef Eigen::Matrix< fvar
+< fvar< var >
+ >, Eigen::Dynamic, 1 > 
stan::math::vector_ffv
 
typedef Eigen::Matrix< fvar
+< var >, 1, Eigen::Dynamic > 
stan::math::row_vector_fv
 
typedef Eigen::Matrix< fvar
+< fvar< var >
+ >, 1, Eigen::Dynamic > 
stan::math::row_vector_ffv
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/mix_2mat_2fun_2typedefs_8hpp_source.html b/doc/api/html/mix_2mat_2fun_2typedefs_8hpp_source.html new file mode 100644 index 00000000000..711274b02dd --- /dev/null +++ b/doc/api/html/mix_2mat_2fun_2typedefs_8hpp_source.html @@ -0,0 +1,156 @@ + + + + + + +Stan Math Library: stan/math/mix/mat/fun/typedefs.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
typedefs.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_MIX_MAT_FUN_TYPEDEFS_HPP
+
2 #define STAN_MATH_MIX_MAT_FUN_TYPEDEFS_HPP
+
3 
+ +
5 #include <stan/math/fwd/core.hpp>
+
6 #include <stan/math/rev/core.hpp>
+ +
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
12  typedef
+
13  Eigen::Matrix<fvar<var>, Eigen::Dynamic, Eigen::Dynamic>
+ +
15 
+
16  typedef
+
17  Eigen::Matrix<fvar<fvar<var> >, Eigen::Dynamic, Eigen::Dynamic>
+ +
19 
+
20  typedef
+
21  Eigen::Matrix<fvar<var>, Eigen::Dynamic, 1>
+ +
23 
+
24  typedef
+
25  Eigen::Matrix<fvar<fvar<var> >, Eigen::Dynamic, 1>
+ +
27 
+
28  typedef
+
29  Eigen::Matrix<fvar<var>, 1, Eigen::Dynamic>
+ +
31 
+
32  typedef
+
33  Eigen::Matrix<fvar<fvar<var> >, 1, Eigen::Dynamic>
+ +
35 
+
36  }
+
37 }
+
38 #endif
+
Eigen::Matrix< fvar< var >, Eigen::Dynamic, Eigen::Dynamic > matrix_fv
Definition: typedefs.hpp:14
+ + +
Eigen::Matrix< fvar< fvar< var > >, Eigen::Dynamic, 1 > vector_ffv
Definition: typedefs.hpp:26
+ +
Eigen::Matrix< fvar< var >, 1, Eigen::Dynamic > row_vector_fv
Definition: typedefs.hpp:30
+
Eigen::Matrix< fvar< fvar< var > >, 1, Eigen::Dynamic > row_vector_ffv
Definition: typedefs.hpp:34
+ +
Eigen::Matrix< fvar< var >, Eigen::Dynamic, 1 > vector_fv
Definition: typedefs.hpp:22
+
Eigen::Matrix< fvar< fvar< var > >, Eigen::Dynamic, Eigen::Dynamic > matrix_ffv
Definition: typedefs.hpp:18
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/modules.html b/doc/api/html/modules.html new file mode 100644 index 00000000000..75d239fb904 --- /dev/null +++ b/doc/api/html/modules.html @@ -0,0 +1,103 @@ + + + + + + +Stan Math Library: Modules + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + +
+ + + + +
+ +
+ +
+
+
Modules
+
+
+
Here is a list of all modules:
+ + +
\Compressed Sparse Row matrix format.A compressed Sparse Row (CSR) sparse matrix is defined by four component vectors labeled w, v, and u
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/modulus_8hpp.html b/doc/api/html/modulus_8hpp.html new file mode 100644 index 00000000000..b69d1d9dab9 --- /dev/null +++ b/doc/api/html/modulus_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/modulus.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
modulus.hpp File Reference
+
+
+
#include <cstddef>
+#include <cstdlib>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + +

+Functions

int stan::math::modulus (const int x, const int y)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/modulus_8hpp_source.html b/doc/api/html/modulus_8hpp_source.html new file mode 100644 index 00000000000..59fd6ac0883 --- /dev/null +++ b/doc/api/html/modulus_8hpp_source.html @@ -0,0 +1,126 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/modulus.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
modulus.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_MODULUS_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_MODULUS_HPP
+
3 
+
4 #include <cstddef>
+
5 #include <cstdlib>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  inline int modulus(const int x, const int y) {
+
11  return std::div(x, y).rem;
+
12  }
+
13 
+
14  }
+
15 }
+
16 
+
17 #endif
+
int modulus(const int x, const int y)
Definition: modulus.hpp:10
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/multi__gp__cholesky__log_8hpp.html b/doc/api/html/multi__gp__cholesky__log_8hpp.html new file mode 100644 index 00000000000..161877239db --- /dev/null +++ b/doc/api/html/multi__gp__cholesky__log_8hpp.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/multi_gp_cholesky_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
multi_gp_cholesky_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_covar , typename T_w >
boost::math::tools::promote_args
+< T_y, T_covar, T_w >::type 
stan::math::multi_gp_cholesky_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L, const Eigen::Matrix< T_w, Eigen::Dynamic, 1 > &w)
 The log of a multivariate Gaussian Process for the given y, w, and a Cholesky factor L of the kernel matrix Sigma. More...
 
template<typename T_y , typename T_covar , typename T_w >
boost::math::tools::promote_args
+< T_y, T_covar, T_w >::type 
stan::math::multi_gp_cholesky_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L, const Eigen::Matrix< T_w, Eigen::Dynamic, 1 > &w)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/multi__gp__cholesky__log_8hpp_source.html b/doc/api/html/multi__gp__cholesky__log_8hpp_source.html new file mode 100644 index 00000000000..f0ec990235c --- /dev/null +++ b/doc/api/html/multi__gp__cholesky__log_8hpp_source.html @@ -0,0 +1,226 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/multi_gp_cholesky_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
multi_gp_cholesky_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_MULTI_GP_CHOLESKY_LOG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_MULTI_GP_CHOLESKY_LOG_HPP
+
3 
+ + + + + +
9 
+ + + + + + +
16 
+
17 namespace stan {
+
18  namespace math {
+
19  // MultiGPCholesky(y|L, w) [y.rows() = w.size(), y.cols() = Sigma.rows();
+
20  // Sigma symmetric, non-negative, definite]
+
40  template <bool propto,
+
41  typename T_y, typename T_covar, typename T_w>
+
42  typename boost::math::tools::promote_args<T_y, T_covar, T_w>::type
+
43  multi_gp_cholesky_log(const Eigen::Matrix
+
44  <T_y, Eigen::Dynamic, Eigen::Dynamic>& y,
+
45  const Eigen::Matrix
+
46  <T_covar, Eigen::Dynamic, Eigen::Dynamic>& L,
+
47  const Eigen::Matrix<T_w, Eigen::Dynamic, 1>& w) {
+
48  static const char* function("stan::math::multi_gp_cholesky_log");
+
49  typedef
+
50  typename boost::math::tools::promote_args<T_y, T_covar, T_w>::type T_lp;
+
51  T_lp lp(0.0);
+
52 
+ + +
55  using stan::math::sum;
+
56  using stan::math::log;
+
57 
+ + + +
61 
+
62  check_size_match(function,
+
63  "Size of random variable (rows y)", y.rows(),
+
64  "Size of kernel scales (w)", w.size());
+
65  check_size_match(function,
+
66  "Size of random variable", y.cols(),
+
67  "rows of covariance parameter", L.rows());
+
68  check_finite(function, "Kernel scales", w);
+
69  check_positive(function, "Kernel scales", w);
+
70  check_finite(function, "Random variable", y);
+
71 
+
72  if (y.rows() == 0)
+
73  return lp;
+
74 
+ +
76  lp += NEG_LOG_SQRT_TWO_PI * y.rows() * y.cols();
+
77  }
+
78 
+ +
80  lp -= L.diagonal().array().log().sum() * y.rows();
+
81  }
+
82 
+ +
84  lp += 0.5 * y.cols() * sum(log(w));
+
85  }
+
86 
+ +
88  T_lp sum_lp_vec(0.0);
+
89  for (int i = 0; i < y.rows(); i++) {
+
90  Eigen::Matrix<T_y, Eigen::Dynamic, 1> y_row(y.row(i));
+
91  Eigen::Matrix<typename boost::math::tools::promote_args
+
92  <T_y, T_covar>::type,
+
93  Eigen::Dynamic, 1>
+
94  half(mdivide_left_tri_low(L, y_row));
+
95  sum_lp_vec += w(i) * dot_self(half);
+
96  }
+
97  lp -= 0.5*sum_lp_vec;
+
98  }
+
99 
+
100  return lp;
+
101  }
+
102 
+
103  template <typename T_y, typename T_covar, typename T_w>
+
104  inline
+
105  typename boost::math::tools::promote_args<T_y, T_covar, T_w>::type
+
106  multi_gp_cholesky_log(const Eigen::Matrix
+
107  <T_y, Eigen::Dynamic, Eigen::Dynamic>& y,
+
108  const Eigen::Matrix
+
109  <T_covar, Eigen::Dynamic, Eigen::Dynamic>& L,
+
110  const Eigen::Matrix<T_w, Eigen::Dynamic, 1>& w) {
+
111  return multi_gp_cholesky_log<false>(y, L, w);
+
112  }
+
113  }
+
114 }
+
115 
+
116 #endif
+
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+ + + +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
fvar< T > dot_self(const Eigen::Matrix< fvar< T >, R, C > &v)
Definition: dot_self.hpp:16
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ + +
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+
bool check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Return true if the provided sizes match.
+ +
const double NEG_LOG_SQRT_TWO_PI
Definition: constants.hpp:184
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + +
Eigen::Matrix< fvar< T >, R1, C1 > mdivide_left_tri_low(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
+ + + +
boost::math::tools::promote_args< T_y, T_covar, T_w >::type multi_gp_cholesky_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L, const Eigen::Matrix< T_w, Eigen::Dynamic, 1 > &w)
The log of a multivariate Gaussian Process for the given y, w, and a Cholesky factor L of the kernel ...
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/multi__gp__log_8hpp.html b/doc/api/html/multi__gp__log_8hpp.html new file mode 100644 index 00000000000..ee411ec3af4 --- /dev/null +++ b/doc/api/html/multi__gp__log_8hpp.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/multi_gp_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
multi_gp_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_covar , typename T_w >
boost::math::tools::promote_args
+< T_y, T_covar, T_w >::type 
stan::math::multi_gp_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &Sigma, const Eigen::Matrix< T_w, Eigen::Dynamic, 1 > &w)
 The log of a multivariate Gaussian Process for the given y, Sigma, and w. More...
 
template<typename T_y , typename T_covar , typename T_w >
boost::math::tools::promote_args
+< T_y, T_covar, T_w >::type 
stan::math::multi_gp_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &Sigma, const Eigen::Matrix< T_w, Eigen::Dynamic, 1 > &w)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/multi__gp__log_8hpp_source.html b/doc/api/html/multi__gp__log_8hpp_source.html new file mode 100644 index 00000000000..3d4cfea7246 --- /dev/null +++ b/doc/api/html/multi__gp__log_8hpp_source.html @@ -0,0 +1,240 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/multi_gp_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
multi_gp_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_MULTI_GP_LOG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_MULTI_GP_LOG_HPP
+
3 
+ + + + + + + +
11 
+ + + + + + + +
19 
+
20 namespace stan {
+
21  namespace math {
+
22  // MultiGP(y|Sigma, w) [y.rows() = w.size(), y.cols() = Sigma.rows();
+
23  // Sigma symmetric, non-negative, definite]
+
42  template <bool propto,
+
43  typename T_y, typename T_covar, typename T_w>
+
44  typename boost::math::tools::promote_args<T_y, T_covar, T_w>::type
+
45  multi_gp_log(const Eigen::Matrix<T_y, Eigen::Dynamic, Eigen::Dynamic>& y,
+
46  const Eigen::Matrix
+
47  <T_covar, Eigen::Dynamic, Eigen::Dynamic>& Sigma,
+
48  const Eigen::Matrix<T_w, Eigen::Dynamic, 1>& w) {
+
49  static const char* function("stan::math::multi_gp_log");
+
50  typedef typename boost::math::tools::promote_args<T_y, T_covar, T_w>::type
+
51  T_lp;
+
52  T_lp lp(0.0);
+
53 
+
54  using stan::math::sum;
+
55  using stan::math::log;
+ + + +
59 
+ + + + + + + +
67 
+
68  check_positive(function, "Kernel rows", Sigma.rows());
+
69  check_finite(function, "Kernel", Sigma);
+
70  check_symmetric(function, "Kernel", Sigma);
+
71 
+ +
73  check_ldlt_factor(function, "LDLT_Factor of Sigma", ldlt_Sigma);
+
74 
+
75  check_size_match(function,
+
76  "Size of random variable (rows y)", y.rows(),
+
77  "Size of kernel scales (w)", w.size());
+
78  check_size_match(function,
+
79  "Size of random variable", y.cols(),
+
80  "rows of covariance parameter", Sigma.rows());
+
81  check_positive_finite(function, "Kernel scales", w);
+
82  check_finite(function, "Random variable", y);
+
83 
+
84  if (y.rows() == 0)
+
85  return lp;
+
86 
+ +
88  lp += NEG_LOG_SQRT_TWO_PI * y.rows() * y.cols();
+
89  }
+
90 
+ +
92  lp -= 0.5 * log_determinant_ldlt(ldlt_Sigma) * y.rows();
+
93  }
+
94 
+ +
96  lp += (0.5 * y.cols()) * sum(log(w));
+
97  }
+
98 
+ +
100  Eigen::Matrix<T_w, Eigen::Dynamic, Eigen::Dynamic>
+
101  w_mat(w.asDiagonal());
+
102  Eigen::Matrix<T_y, Eigen::Dynamic, Eigen::Dynamic> yT(y.transpose());
+
103  lp -= 0.5 * trace_gen_inv_quad_form_ldlt(w_mat, ldlt_Sigma, yT);
+
104  }
+
105 
+
106  return lp;
+
107  }
+
108 
+
109  template <typename T_y, typename T_covar, typename T_w>
+
110  inline
+
111  typename boost::math::tools::promote_args<T_y, T_covar, T_w>::type
+
112  multi_gp_log(const Eigen::Matrix<T_y, Eigen::Dynamic, Eigen::Dynamic>& y,
+
113  const Eigen::Matrix<T_covar, Eigen::Dynamic, Eigen::Dynamic>&
+
114  Sigma,
+
115  const Eigen::Matrix<T_w, Eigen::Dynamic, 1>& w) {
+
116  return multi_gp_log<false>(y, Sigma, w);
+
117  }
+
118  }
+
119 }
+
120 
+
121 #endif
+ +
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ + + +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
bool check_symmetric(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is symmetric.
+
boost::enable_if_c<!stan::is_var< T1 >::value &&!stan::is_var< T2 >::value &&!stan::is_var< T3 >::value, typename boost::math::tools::promote_args< T1, T2, T3 >::type >::type trace_gen_inv_quad_form_ldlt(const Eigen::Matrix< T1, R1, C1 > &D, const stan::math::LDLT_factor< T2, R2, C2 > &A, const Eigen::Matrix< T3, R3, C3 > &B)
+ +
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ + + + + +
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+
bool check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Return true if the provided sizes match.
+
boost::math::tools::promote_args< T_y, T_covar, T_w >::type multi_gp_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &Sigma, const Eigen::Matrix< T_w, Eigen::Dynamic, 1 > &w)
The log of a multivariate Gaussian Process for the given y, Sigma, and w.
+
const double NEG_LOG_SQRT_TWO_PI
Definition: constants.hpp:184
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + + +
T log_determinant_ldlt(stan::math::LDLT_factor< T, R, C > &A)
+
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
bool check_ldlt_factor(const char *function, const char *name, stan::math::LDLT_factor< T, R, C > &A)
Return true if the argument is a valid stan::math::LDLT_factor.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/multi__normal__cholesky__log_8hpp.html b/doc/api/html/multi__normal__cholesky__log_8hpp.html new file mode 100644 index 00000000000..2c435cf9896 --- /dev/null +++ b/doc/api/html/multi__normal__cholesky__log_8hpp.html @@ -0,0 +1,154 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/multi_normal_cholesky_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
multi_normal_cholesky_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_loc , typename T_covar >
return_type< T_y, T_loc,
+T_covar >::type 
stan::math::multi_normal_cholesky_log (const T_y &y, const T_loc &mu, const T_covar &L)
 The log of the multivariate normal density for the given y, mu, and a Cholesky factor L of the variance matrix. More...
 
template<typename T_y , typename T_loc , typename T_covar >
return_type< T_y, T_loc,
+T_covar >::type 
stan::math::multi_normal_cholesky_log (const T_y &y, const T_loc &mu, const T_covar &L)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/multi__normal__cholesky__log_8hpp_source.html b/doc/api/html/multi__normal__cholesky__log_8hpp_source.html new file mode 100644 index 00000000000..a5d7a265377 --- /dev/null +++ b/doc/api/html/multi__normal__cholesky__log_8hpp_source.html @@ -0,0 +1,289 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/multi_normal_cholesky_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
multi_normal_cholesky_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_MULTI_NORMAL_CHOLESKY_LOG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_MULTI_NORMAL_CHOLESKY_LOG_HPP
+
3 
+
4 #include <boost/random/normal_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + + +
24 
+
25 namespace stan {
+
26 
+
27  namespace math {
+
28  using Eigen::Dynamic;
+
29 
+
47  template <bool propto,
+
48  typename T_y, typename T_loc, typename T_covar>
+
49  typename return_type<T_y, T_loc, T_covar>::type
+ +
51  const T_loc& mu,
+
52  const T_covar& L) {
+
53  static const char* function("stan::math::multi_normal_cholesky_log");
+
54  typedef typename scalar_type<T_covar>::type T_covar_elem;
+
55  typedef typename return_type<T_y, T_loc, T_covar>::type lp_type;
+
56  lp_type lp(0.0);
+
57 
+ + + + +
62  using stan::math::sum;
+
63 
+ + + +
67 
+
68  VectorViewMvt<const T_y> y_vec(y);
+
69  VectorViewMvt<const T_loc> mu_vec(mu);
+
70  // size of std::vector of Eigen vectors
+
71  size_t size_vec = max_size_mvt(y, mu);
+
72 
+
73  // Check if every vector of the array has the same size
+
74  int size_y = y_vec[0].size();
+
75  int size_mu = mu_vec[0].size();
+
76  if (size_vec > 1) {
+
77  int size_y_old = size_y;
+
78  int size_y_new;
+
79  for (size_t i = 1, size_ = length_mvt(y); i < size_; i++) {
+
80  int size_y_new = y_vec[i].size();
+
81  check_size_match(function,
+
82  "Size of one of the vectors of "
+
83  "the random variable", size_y_new,
+
84  "Size of another vector of the "
+
85  "random variable", size_y_old);
+
86  size_y_old = size_y_new;
+
87  }
+
88  int size_mu_old = size_mu;
+
89  int size_mu_new;
+
90  for (size_t i = 1, size_ = length_mvt(mu); i < size_; i++) {
+
91  int size_mu_new = mu_vec[i].size();
+
92  check_size_match(function,
+
93  "Size of one of the vectors of "
+
94  "the location variable", size_mu_new,
+
95  "Size of another vector of the "
+
96  "location variable", size_mu_old);
+
97  size_mu_old = size_mu_new;
+
98  }
+
99  (void) size_y_old;
+
100  (void) size_y_new;
+
101  (void) size_mu_old;
+
102  (void) size_mu_new;
+
103  }
+
104 
+
105  check_size_match(function,
+
106  "Size of random variable", size_y,
+
107  "size of location parameter", size_mu);
+
108  check_size_match(function,
+
109  "Size of random variable", size_y,
+
110  "rows of covariance parameter", L.rows());
+
111  check_size_match(function,
+
112  "Size of random variable", size_y,
+
113  "columns of covariance parameter", L.cols());
+
114 
+
115  for (size_t i = 0; i < size_vec; i++) {
+
116  check_finite(function, "Location parameter", mu_vec[i]);
+
117  check_not_nan(function, "Random variable", y_vec[i]);
+
118  }
+
119 
+
120  if (size_y == 0)
+
121  return lp;
+
122 
+ +
124  lp += NEG_LOG_SQRT_TWO_PI * size_y * size_vec;
+
125 
+ +
127  lp -= L.diagonal().array().log().sum() * size_vec;
+
128 
+ +
130  lp_type sum_lp_vec(0.0);
+
131  for (size_t i = 0; i < size_vec; i++) {
+
132  Eigen::Matrix<typename return_type<T_y, T_loc>::type, Dynamic, 1>
+
133  y_minus_mu(size_y);
+
134  for (int j = 0; j < size_y; j++)
+
135  y_minus_mu(j) = y_vec[i](j)-mu_vec[i](j);
+
136  Eigen::Matrix<typename return_type<T_y, T_loc, T_covar>::type,
+
137  Dynamic, 1>
+
138  half(mdivide_left_tri_low(L, y_minus_mu));
+
139  // FIXME: this code does not compile. revert after fixing subtract()
+
140  // Eigen::Matrix<typename
+
141  // boost::math::tools::promote_args<T_covar,
+
142  // typename value_type<T_loc>::type,
+
143  // typename value_type<T_y>::type>::type>::type,
+
144  // Dynamic, 1>
+
145  // half(mdivide_left_tri_low(L, subtract(y, mu)));
+
146  sum_lp_vec += dot_self(half);
+
147  }
+
148  lp -= 0.5*sum_lp_vec;
+
149  }
+
150  return lp;
+
151  }
+
152 
+
153  template <typename T_y, typename T_loc, typename T_covar>
+
154  inline
+ +
156  multi_normal_cholesky_log(const T_y& y, const T_loc& mu, const T_covar& L) {
+
157  return multi_normal_cholesky_log<false>(y, mu, L);
+
158  }
+
159 
+
160  }
+
161 }
+
162 
+
163 #endif
+ +
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+ + +
size_t max_size_mvt(const T1 &x1, const T2 &x2)
+ + +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
Eigen::Matrix< typename boost::math::tools::promote_args< T1, T2 >::type, R, C > subtract(const Eigen::Matrix< T1, R, C > &m1, const Eigen::Matrix< T2, R, C > &m2)
Return the result of subtracting the second specified matrix from the first specified matrix...
Definition: subtract.hpp:27
+ +
Eigen::Matrix< fvar< T >, R1, C1 > multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m, const fvar< T > &c)
Definition: multiply.hpp:20
+
scalar_type_helper< is_vector< T >::value, T >::type type
Definition: scalar_type.hpp:38
+
fvar< T > dot_self(const Eigen::Matrix< fvar< T >, R, C > &v)
Definition: dot_self.hpp:16
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ +
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ + +
return_type< T_y, T_loc, T_covar >::type multi_normal_cholesky_log(const T_y &y, const T_loc &mu, const T_covar &L)
The log of the multivariate normal density for the given y, mu, and a Cholesky factor L of the varian...
+
size_t size_
Definition: dot_self.hpp:18
+
bool check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Return true if the provided sizes match.
+
size_t length_mvt(const T &)
Definition: length_mvt.hpp:12
+ +
const double NEG_LOG_SQRT_TWO_PI
Definition: constants.hpp:184
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + +
Eigen::Matrix< fvar< T >, R1, C1 > mdivide_left_tri_low(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
+ + + + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/multi__normal__cholesky__rng_8hpp.html b/doc/api/html/multi__normal__cholesky__rng_8hpp.html new file mode 100644 index 00000000000..1f5b0a7199e --- /dev/null +++ b/doc/api/html/multi__normal__cholesky__rng_8hpp.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/multi_normal_cholesky_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
multi_normal_cholesky_rng.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
Eigen::VectorXd stan::math::multi_normal_cholesky_rng (const Eigen::Matrix< double, Dynamic, 1 > &mu, const Eigen::Matrix< double, Dynamic, Dynamic > &S, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/multi__normal__cholesky__rng_8hpp_source.html b/doc/api/html/multi__normal__cholesky__rng_8hpp_source.html new file mode 100644 index 00000000000..66fa74a5e48 --- /dev/null +++ b/doc/api/html/multi__normal__cholesky__rng_8hpp_source.html @@ -0,0 +1,181 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/multi_normal_cholesky_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
multi_normal_cholesky_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_MULTI_NORMAL_CHOLESKY_RNG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_MULTI_NORMAL_CHOLESKY_RNG_HPP
+
3 
+
4 #include <boost/random/normal_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + +
20 
+ + +
23 
+
24 namespace stan {
+
25 
+
26  namespace math {
+
27  using Eigen::Dynamic;
+
28 
+
29  template <class RNG>
+
30  inline Eigen::VectorXd
+
31  multi_normal_cholesky_rng(const Eigen::Matrix<double, Dynamic, 1>& mu,
+
32  const Eigen::Matrix<double, Dynamic, Dynamic>& S,
+
33  RNG& rng) {
+
34  using boost::variate_generator;
+
35  using boost::normal_distribution;
+
36 
+
37  static const char* function("stan::math::multi_normal_cholesky_rng");
+
38 
+ +
40 
+
41  check_finite(function, "Location parameter", mu);
+
42 
+
43  variate_generator<RNG&, normal_distribution<> >
+
44  std_normal_rng(rng, normal_distribution<>(0, 1));
+
45 
+
46  Eigen::VectorXd z(S.cols());
+
47  for (int i = 0; i < S.cols(); i++)
+
48  z(i) = std_normal_rng();
+
49 
+
50  return mu + S * z;
+
51  }
+
52  }
+
53 }
+
54 
+
55 #endif
+ + + + + +
Eigen::VectorXd multi_normal_cholesky_rng(const Eigen::Matrix< double, Dynamic, 1 > &mu, const Eigen::Matrix< double, Dynamic, Dynamic > &S, RNG &rng)
+ + + + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + + + + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/multi__normal__log_8hpp.html b/doc/api/html/multi__normal__log_8hpp.html new file mode 100644 index 00000000000..04bbd191402 --- /dev/null +++ b/doc/api/html/multi__normal__log_8hpp.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/multi_normal_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
multi_normal_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_loc , typename T_covar >
return_type< T_y, T_loc,
+T_covar >::type 
stan::math::multi_normal_log (const T_y &y, const T_loc &mu, const T_covar &Sigma)
 
template<typename T_y , typename T_loc , typename T_covar >
return_type< T_y, T_loc,
+T_covar >::type 
stan::math::multi_normal_log (const T_y &y, const T_loc &mu, const T_covar &Sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/multi__normal__log_8hpp_source.html b/doc/api/html/multi__normal__log_8hpp_source.html new file mode 100644 index 00000000000..028391d4d41 --- /dev/null +++ b/doc/api/html/multi__normal__log_8hpp_source.html @@ -0,0 +1,276 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/multi_normal_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
multi_normal_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_MULTI_NORMAL_LOG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_MULTI_NORMAL_LOG_HPP
+
3 
+
4 #include <boost/random/normal_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + +
19 
+
20 namespace stan {
+
21 
+
22  namespace math {
+
23  using Eigen::Dynamic;
+
24 
+
25  template <bool propto,
+
26  typename T_y, typename T_loc, typename T_covar>
+
27  typename return_type<T_y, T_loc, T_covar>::type
+
28  multi_normal_log(const T_y& y,
+
29  const T_loc& mu,
+
30  const T_covar& Sigma) {
+
31  static const char* function("stan::math::multi_normal_log");
+
32  typedef typename scalar_type<T_covar>::type T_covar_elem;
+
33  typedef typename return_type<T_y, T_loc, T_covar>::type lp_type;
+
34  lp_type lp(0.0);
+
35 
+ + + + + + +
42 
+
43  check_positive(function, "Covariance matrix rows", Sigma.rows());
+
44  check_symmetric(function, "Covariance matrix", Sigma);
+
45 
+ +
47  check_ldlt_factor(function,
+
48  "LDLT_Factor of covariance parameter", ldlt_Sigma);
+
49 
+
50  VectorViewMvt<const T_y> y_vec(y);
+
51  VectorViewMvt<const T_loc> mu_vec(mu);
+
52  // size of std::vector of Eigen vectors
+
53  size_t size_vec = max_size_mvt(y, mu);
+
54 
+
55  // Check if every vector of the array has the same size
+
56  int size_y = y_vec[0].size();
+
57  int size_mu = mu_vec[0].size();
+
58  if (size_vec > 1) {
+
59  int size_y_old = size_y;
+
60  int size_y_new;
+
61  for (size_t i = 1, size_ = length_mvt(y); i < size_; i++) {
+
62  int size_y_new = y_vec[i].size();
+
63  check_size_match(function,
+
64  "Size of one of the vectors of "
+
65  "the random variable", size_y_new,
+
66  "Size of another vector of the "
+
67  "random variable", size_y_old);
+
68  size_y_old = size_y_new;
+
69  }
+
70  int size_mu_old = size_mu;
+
71  int size_mu_new;
+
72  for (size_t i = 1, size_ = length_mvt(mu); i < size_; i++) {
+
73  int size_mu_new = mu_vec[i].size();
+
74  check_size_match(function,
+
75  "Size of one of the vectors of "
+
76  "the location variable", size_mu_new,
+
77  "Size of another vector of the "
+
78  "location variable", size_mu_old);
+
79  size_mu_old = size_mu_new;
+
80  }
+
81  (void) size_y_old;
+
82  (void) size_y_new;
+
83  (void) size_mu_old;
+
84  (void) size_mu_new;
+
85  }
+
86 
+
87  check_size_match(function,
+
88  "Size of random variable", size_y,
+
89  "size of location parameter", size_mu);
+
90  check_size_match(function,
+
91  "Size of random variable", size_y,
+
92  "rows of covariance parameter", Sigma.rows());
+
93  check_size_match(function,
+
94  "Size of random variable", size_y,
+
95  "columns of covariance parameter", Sigma.cols());
+
96 
+
97  for (size_t i = 0; i < size_vec; i++) {
+
98  check_finite(function, "Location parameter", mu_vec[i]);
+
99  check_not_nan(function, "Random variable", y_vec[i]);
+
100  }
+
101 
+
102  if (size_y == 0) // y_vec[0].size() == 0
+
103  return lp;
+
104 
+ +
106  lp += NEG_LOG_SQRT_TWO_PI * size_y * size_vec;
+
107 
+ +
109  lp -= 0.5 * log_determinant_ldlt(ldlt_Sigma) * size_vec;
+
110 
+ +
112  lp_type sum_lp_vec(0.0);
+
113  for (size_t i = 0; i < size_vec; i++) {
+
114  Eigen::Matrix<typename return_type<T_y, T_loc>::type, Dynamic, 1>
+
115  y_minus_mu(size_y);
+
116  for (int j = 0; j < size_y; j++)
+
117  y_minus_mu(j) = y_vec[i](j)-mu_vec[i](j);
+
118  sum_lp_vec += trace_inv_quad_form_ldlt(ldlt_Sigma, y_minus_mu);
+
119  }
+
120  lp -= 0.5*sum_lp_vec;
+
121  }
+
122  return lp;
+
123  }
+
124 
+
125  template <typename T_y, typename T_loc, typename T_covar>
+
126  inline
+ +
128  multi_normal_log(const T_y& y,
+
129  const T_loc& mu,
+
130  const T_covar& Sigma) {
+
131  return multi_normal_log<false>(y, mu, Sigma);
+
132  }
+
133 
+
134  }
+
135 }
+
136 
+
137 #endif
+ + +
size_t max_size_mvt(const T1 &x1, const T2 &x2)
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ + + + +
bool check_symmetric(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is symmetric.
+
scalar_type_helper< is_vector< T >::value, T >::type type
Definition: scalar_type.hpp:38
+
boost::enable_if_c<!stan::is_var< T1 >::value &&!stan::is_var< T2 >::value, typename boost::math::tools::promote_args< T1, T2 >::type >::type trace_inv_quad_form_ldlt(const stan::math::LDLT_factor< T1, R2, C2 > &A, const Eigen::Matrix< T2, R3, C3 > &B)
+ + +
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ + + +
size_t size_
Definition: dot_self.hpp:18
+
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+
bool check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Return true if the provided sizes match.
+
size_t length_mvt(const T &)
Definition: length_mvt.hpp:12
+
const double NEG_LOG_SQRT_TWO_PI
Definition: constants.hpp:184
+
return_type< T_y, T_loc, T_covar >::type multi_normal_log(const T_y &y, const T_loc &mu, const T_covar &Sigma)
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + + +
T log_determinant_ldlt(stan::math::LDLT_factor< T, R, C > &A)
+
bool check_ldlt_factor(const char *function, const char *name, stan::math::LDLT_factor< T, R, C > &A)
Return true if the argument is a valid stan::math::LDLT_factor.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/multi__normal__prec__log_8hpp.html b/doc/api/html/multi__normal__prec__log_8hpp.html new file mode 100644 index 00000000000..f14cea4cfea --- /dev/null +++ b/doc/api/html/multi__normal__prec__log_8hpp.html @@ -0,0 +1,156 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/multi_normal_prec_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
multi_normal_prec_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_loc , typename T_covar >
return_type< T_y, T_loc,
+T_covar >::type 
stan::math::multi_normal_prec_log (const T_y &y, const T_loc &mu, const T_covar &Sigma)
 
template<typename T_y , typename T_loc , typename T_covar >
return_type< T_y, T_loc,
+T_covar >::type 
stan::math::multi_normal_prec_log (const T_y &y, const T_loc &mu, const T_covar &Sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/multi__normal__prec__log_8hpp_source.html b/doc/api/html/multi__normal__prec__log_8hpp_source.html new file mode 100644 index 00000000000..0b1e7f36255 --- /dev/null +++ b/doc/api/html/multi__normal__prec__log_8hpp_source.html @@ -0,0 +1,300 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/multi_normal_prec_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
multi_normal_prec_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_MULTI_NORMAL_PREC_LOG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_MULTI_NORMAL_PREC_LOG_HPP
+
3 
+ + + + + + + + + + + + + + + + + + + + + + + +
27 
+
28 namespace stan {
+
29 
+
30  namespace math {
+
31  using Eigen::Dynamic;
+
32 
+
33  template <bool propto,
+
34  typename T_y, typename T_loc, typename T_covar>
+
35  typename return_type<T_y, T_loc, T_covar>::type
+
36  multi_normal_prec_log(const T_y& y,
+
37  const T_loc& mu,
+
38  const T_covar& Sigma) {
+
39  static const char* function("stan::math::multi_normal_prec_log");
+
40  typedef typename scalar_type<T_covar>::type T_covar_elem;
+
41  typedef typename return_type<T_y, T_loc, T_covar>::type lp_type;
+
42  lp_type lp(0.0);
+
43 
+ + + + + +
49  using stan::math::sum;
+ + + + +
54 
+
55  check_positive(function, "Precision matrix rows", Sigma.rows());
+
56  check_symmetric(function, "Precision matrix", Sigma);
+
57 
+ +
59  check_ldlt_factor(function, "LDLT_Factor of precision parameter",
+
60  ldlt_Sigma);
+
61 
+
62  using Eigen::Matrix;
+
63  using std::vector;
+
64  VectorViewMvt<const T_y> y_vec(y);
+
65  VectorViewMvt<const T_loc> mu_vec(mu);
+
66  // size of std::vector of Eigen vectors
+
67  size_t size_vec = max_size_mvt(y, mu);
+
68 
+
69 
+
70  // Check if every vector of the array has the same size
+
71  int size_y = y_vec[0].size();
+
72  int size_mu = mu_vec[0].size();
+
73  if (size_vec > 1) {
+
74  int size_y_old = size_y;
+
75  int size_y_new;
+
76  for (size_t i = 1, size_ = length_mvt(y); i < size_; i++) {
+
77  int size_y_new = y_vec[i].size();
+
78  check_size_match(function,
+
79  "Size of one of the vectors "
+
80  "of the random variable", size_y_new,
+
81  "Size of another vector of "
+
82  "the random variable", size_y_old);
+
83  size_y_old = size_y_new;
+
84  }
+
85  int size_mu_old = size_mu;
+
86  int size_mu_new;
+
87  for (size_t i = 1, size_ = length_mvt(mu); i < size_; i++) {
+
88  int size_mu_new = mu_vec[i].size();
+
89  check_size_match(function,
+
90  "Size of one of the vectors "
+
91  "of the location variable", size_mu_new,
+
92  "Size of another vector of "
+
93  "the location variable", size_mu_old);
+
94  size_mu_old = size_mu_new;
+
95  }
+
96  (void) size_y_old;
+
97  (void) size_y_new;
+
98  (void) size_mu_old;
+
99  (void) size_mu_new;
+
100  }
+
101 
+
102  check_size_match(function,
+
103  "Size of random variable", size_y,
+
104  "size of location parameter", size_mu);
+
105  check_size_match(function,
+
106  "Size of random variable", size_y,
+
107  "rows of covariance parameter", Sigma.rows());
+
108  check_size_match(function,
+
109  "Size of random variable", size_y,
+
110  "columns of covariance parameter", Sigma.cols());
+
111 
+
112  for (size_t i = 0; i < size_vec; i++) {
+
113  check_finite(function, "Location parameter", mu_vec[i]);
+
114  check_not_nan(function, "Random variable", y_vec[i]);
+
115  }
+
116 
+
117  if (size_y == 0) // y_vec[0].size() == 0
+
118  return lp;
+
119 
+ +
121  lp += 0.5 * log_determinant_ldlt(ldlt_Sigma) * size_vec;
+
122 
+ +
124  lp += NEG_LOG_SQRT_TWO_PI * size_y * size_vec;
+
125 
+ +
127  lp_type sum_lp_vec(0.0);
+
128  for (size_t i = 0; i < size_vec; i++) {
+
129  Eigen::Matrix<typename return_type<T_y, T_loc>::type, Dynamic, 1>
+
130  y_minus_mu(size_y);
+
131  for (int j = 0; j < size_y; j++)
+
132  y_minus_mu(j) = y_vec[i](j) - mu_vec[i](j);
+
133  sum_lp_vec += trace_quad_form(Sigma, y_minus_mu);
+
134  }
+
135  lp -= 0.5*sum_lp_vec;
+
136  }
+
137  return lp;
+
138  }
+
139 
+
140  template <typename T_y, typename T_loc, typename T_covar>
+
141  inline
+ +
143  multi_normal_prec_log(const T_y& y, const T_loc& mu, const T_covar& Sigma) {
+
144  return multi_normal_prec_log<false>(y, mu, Sigma);
+
145  }
+
146 
+
147  }
+
148 }
+
149 #endif
+
150 
+ +
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+ + +
size_t max_size_mvt(const T1 &x1, const T2 &x2)
+
fvar< T > trace_quad_form(const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, CB > &B)
+ + +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ + + +
bool check_symmetric(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is symmetric.
+
scalar_type_helper< is_vector< T >::value, T >::type type
Definition: scalar_type.hpp:38
+ +
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
return_type< T_y, T_loc, T_covar >::type multi_normal_prec_log(const T_y &y, const T_loc &mu, const T_covar &Sigma)
+ +
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ + + + +
size_t size_
Definition: dot_self.hpp:18
+ +
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+
bool check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Return true if the provided sizes match.
+
size_t length_mvt(const T &)
Definition: length_mvt.hpp:12
+ +
const double NEG_LOG_SQRT_TWO_PI
Definition: constants.hpp:184
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + + + +
T log_determinant_ldlt(stan::math::LDLT_factor< T, R, C > &A)
+ + + + +
bool check_ldlt_factor(const char *function, const char *name, stan::math::LDLT_factor< T, R, C > &A)
Return true if the argument is a valid stan::math::LDLT_factor.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/multi__normal__rng_8hpp.html b/doc/api/html/multi__normal__rng_8hpp.html new file mode 100644 index 00000000000..6cdbcbaa0f1 --- /dev/null +++ b/doc/api/html/multi__normal__rng_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/multi_normal_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
multi_normal_rng.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
Eigen::VectorXd stan::math::multi_normal_rng (const Eigen::Matrix< double, Dynamic, 1 > &mu, const Eigen::Matrix< double, Dynamic, Dynamic > &S, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/multi__normal__rng_8hpp_source.html b/doc/api/html/multi__normal__rng_8hpp_source.html new file mode 100644 index 00000000000..bceb0178931 --- /dev/null +++ b/doc/api/html/multi__normal__rng_8hpp_source.html @@ -0,0 +1,175 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/multi_normal_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
multi_normal_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_MULTI_NORMAL_RNG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_MULTI_NORMAL_RNG_HPP
+
3 
+
4 #include <boost/random/normal_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + +
14 
+ + +
17 
+
18 namespace stan {
+
19 
+
20  namespace math {
+
21  using Eigen::Dynamic;
+
22 
+
23  template <class RNG>
+
24  inline Eigen::VectorXd
+
25  multi_normal_rng(const Eigen::Matrix<double, Dynamic, 1>& mu,
+
26  const Eigen::Matrix<double, Dynamic, Dynamic>& S,
+
27  RNG& rng) {
+
28  using boost::variate_generator;
+
29  using boost::normal_distribution;
+
30 
+
31  static const char* function("stan::math::multi_normal_rng");
+
32 
+ + + +
36 
+
37  check_positive(function, "Covariance matrix rows", S.rows());
+
38  check_symmetric(function, "Covariance matrix", S);
+
39  check_finite(function, "Location parameter", mu);
+
40 
+
41  variate_generator<RNG&, normal_distribution<> >
+
42  std_normal_rng(rng, normal_distribution<>(0, 1));
+
43 
+
44  Eigen::VectorXd z(S.cols());
+
45  for (int i = 0; i < S.cols(); i++)
+
46  z(i) = std_normal_rng();
+
47 
+
48  return mu + S.llt().matrixL() * z;
+
49  }
+
50  }
+
51 }
+
52 
+
53 #endif
+ + + + +
bool check_symmetric(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is symmetric.
+ + + +
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + +
Eigen::VectorXd multi_normal_rng(const Eigen::Matrix< double, Dynamic, 1 > &mu, const Eigen::Matrix< double, Dynamic, Dynamic > &S, RNG &rng)
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/multi__student__t__log_8hpp.html b/doc/api/html/multi__student__t__log_8hpp.html new file mode 100644 index 00000000000..fae1e4e91ab --- /dev/null +++ b/doc/api/html/multi__student__t__log_8hpp.html @@ -0,0 +1,153 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/multi_student_t_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
multi_student_t_log.hpp File Reference
+
+
+
#include <boost/math/special_functions/gamma.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/mat/err/check_ldlt_factor.hpp>
+#include <stan/math/prim/scal/err/check_size_match.hpp>
+#include <stan/math/prim/mat/err/check_symmetric.hpp>
+#include <stan/math/prim/scal/err/check_finite.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/err/check_positive.hpp>
+#include <stan/math/prim/mat/fun/multiply.hpp>
+#include <stan/math/prim/mat/fun/dot_product.hpp>
+#include <stan/math/prim/mat/fun/subtract.hpp>
+#include <stan/math/prim/scal/fun/log1p.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/mat/prob/multi_normal_log.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/meta/VectorViewMvt.hpp>
+#include <cmath>
+#include <cstdlib>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_dof , typename T_loc , typename T_scale >
return_type< T_y, T_dof, T_loc,
+T_scale >::type 
stan::math::multi_student_t_log (const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &Sigma)
 Return the log of the multivariate Student t distribution at the specified arguments. More...
 
template<typename T_y , typename T_dof , typename T_loc , typename T_scale >
return_type< T_y, T_dof, T_loc,
+T_scale >::type 
stan::math::multi_student_t_log (const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &Sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/multi__student__t__log_8hpp_source.html b/doc/api/html/multi__student__t__log_8hpp_source.html new file mode 100644 index 00000000000..4b7c92e627f --- /dev/null +++ b/doc/api/html/multi__student__t__log_8hpp_source.html @@ -0,0 +1,321 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/multi_student_t_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
multi_student_t_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_MULTI_STUDENT_T_LOG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_MULTI_STUDENT_T_LOG_HPP
+
3 
+
4 #include <boost/math/special_functions/gamma.hpp>
+
5 #include <boost/math/special_functions/fpclassify.hpp>
+
6 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + +
21 #include <cmath>
+
22 #include <cstdlib>
+
23 
+
24 namespace stan {
+
25 
+
26  namespace math {
+
27  using Eigen::Dynamic;
+
34  template <bool propto,
+
35  typename T_y, typename T_dof, typename T_loc, typename T_scale>
+
36  typename return_type<T_y, T_dof, T_loc, T_scale>::type
+
37  multi_student_t_log(const T_y& y,
+
38  const T_dof& nu,
+
39  const T_loc& mu,
+
40  const T_scale& Sigma) {
+
41  static const char* function("stan::math::multi_student_t");
+
42 
+ + + + + +
48  using boost::math::lgamma;
+ + + +
52  using stan::math::log1p;
+
53  using std::log;
+
54 
+
55  typedef typename scalar_type<T_scale>::type T_scale_elem;
+
56  typedef typename return_type<T_y, T_dof, T_loc, T_scale>::type lp_type;
+
57  lp_type lp(0.0);
+
58 
+
59  // allows infinities
+
60  check_not_nan(function, "Degrees of freedom parameter", nu);
+
61  check_positive(function, "Degrees of freedom parameter", nu);
+
62 
+
63  using boost::math::isinf;
+
64 
+
65  if (isinf(nu)) // already checked nu > 0
+
66  return multi_normal_log(y, mu, Sigma);
+
67 
+
68  using Eigen::Matrix;
+
69  using std::vector;
+
70  VectorViewMvt<const T_y> y_vec(y);
+
71  VectorViewMvt<const T_loc> mu_vec(mu);
+
72  // size of std::vector of Eigen vectors
+
73  size_t size_vec = max_size_mvt(y, mu);
+
74 
+
75 
+
76  // Check if every vector of the array has the same size
+
77  int size_y = y_vec[0].size();
+
78  int size_mu = mu_vec[0].size();
+
79  if (size_vec > 1) {
+
80  int size_y_old = size_y;
+
81  int size_y_new;
+
82  for (size_t i = 1, size_ = length_mvt(y); i < size_; i++) {
+
83  int size_y_new = y_vec[i].size();
+
84  check_size_match(function,
+
85  "Size of one of the vectors of the random variable",
+
86  size_y_new,
+
87  "Size of another vector of the random variable",
+
88  size_y_old);
+
89  size_y_old = size_y_new;
+
90  }
+
91  int size_mu_old = size_mu;
+
92  int size_mu_new;
+
93  for (size_t i = 1, size_ = length_mvt(mu); i < size_; i++) {
+
94  int size_mu_new = mu_vec[i].size();
+
95  check_size_match(function,
+
96  "Size of one of the vectors "
+
97  "of the location variable",
+
98  size_mu_new,
+
99  "Size of another vector of "
+
100  "the location variable",
+
101  size_mu_old);
+
102  size_mu_old = size_mu_new;
+
103  }
+
104  (void) size_y_old;
+
105  (void) size_y_new;
+
106  (void) size_mu_old;
+
107  (void) size_mu_new;
+
108  }
+
109 
+
110 
+
111  check_size_match(function,
+
112  "Size of random variable", size_y,
+
113  "size of location parameter", size_mu);
+
114  check_size_match(function,
+
115  "Size of random variable", size_y,
+
116  "rows of scale parameter", Sigma.rows());
+
117  check_size_match(function,
+
118  "Size of random variable", size_y,
+
119  "columns of scale parameter", Sigma.cols());
+
120 
+
121  for (size_t i = 0; i < size_vec; i++) {
+
122  check_finite(function, "Location parameter", mu_vec[i]);
+
123  check_not_nan(function, "Random variable", y_vec[i]);
+
124  }
+
125  check_symmetric(function, "Scale parameter", Sigma);
+
126 
+
127 
+ +
129  check_ldlt_factor(function, "LDLT_Factor of scale parameter", ldlt_Sigma);
+
130 
+
131  if (size_y == 0) // y_vec[0].size() == 0
+
132  return lp;
+
133 
+ +
135  lp += lgamma(0.5 * (nu + size_y)) * size_vec;
+
136  lp -= lgamma(0.5 * nu) * size_vec;
+
137  lp -= (0.5 * size_y) * log(nu) * size_vec;
+
138  }
+
139 
+ +
141  lp -= (0.5 * size_y) * LOG_PI * size_vec;
+
142 
+
143  using stan::math::multiply;
+ +
145  using stan::math::subtract;
+
146  using Eigen::Array;
+
147 
+
148 
+ +
150  lp -= 0.5 * log_determinant_ldlt(ldlt_Sigma) * size_vec;
+
151  }
+
152 
+ +
154  lp_type sum_lp_vec(0.0);
+
155  for (size_t i = 0; i < size_vec; i++) {
+
156  Eigen::Matrix<typename return_type<T_y, T_loc>::type, Dynamic, 1>
+
157  y_minus_mu(size_y);
+
158  for (int j = 0; j < size_y; j++)
+
159  y_minus_mu(j) = y_vec[i](j)-mu_vec[i](j);
+
160  sum_lp_vec += log1p(trace_inv_quad_form_ldlt(ldlt_Sigma, y_minus_mu)
+
161  / nu);
+
162  }
+
163  lp -= 0.5 * (nu + size_y) * sum_lp_vec;
+
164  }
+
165  return lp;
+
166  }
+
167 
+
168  template <typename T_y, typename T_dof, typename T_loc, typename T_scale>
+
169  inline
+ +
171  multi_student_t_log(const T_y& y, const T_dof& nu, const T_loc& mu,
+
172  const T_scale& Sigma) {
+
173  return multi_student_t_log<false>(y, nu, mu, Sigma);
+
174  }
+
175 
+
176  }
+
177 }
+
178 #endif
+ + +
int isinf(const stan::math::var &a)
Checks if the given number is infinite.
Definition: std_isinf.hpp:18
+
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
+
size_t max_size_mvt(const T1 &x1, const T2 &x2)
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ + +
Eigen::Matrix< typename boost::math::tools::promote_args< T1, T2 >::type, R, C > subtract(const Eigen::Matrix< T1, R, C > &m1, const Eigen::Matrix< T2, R, C > &m2)
Return the result of subtracting the second specified matrix from the first specified matrix...
Definition: subtract.hpp:27
+
const double LOG_PI
Definition: constants.hpp:170
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
Eigen::Matrix< fvar< T >, R1, C1 > multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m, const fvar< T > &c)
Definition: multiply.hpp:20
+
bool check_symmetric(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is symmetric.
+
scalar_type_helper< is_vector< T >::value, T >::type type
Definition: scalar_type.hpp:38
+
boost::enable_if_c<!stan::is_var< T1 >::value &&!stan::is_var< T2 >::value, typename boost::math::tools::promote_args< T1, T2 >::type >::type trace_inv_quad_form_ldlt(const stan::math::LDLT_factor< T1, R2, C2 > &A, const Eigen::Matrix< T2, R3, C3 > &B)
+ +
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ + +
bool isinf(const stan::math::var &v)
Checks if the given number is infinite.
Definition: boost_isinf.hpp:22
+ + +
size_t size_
Definition: dot_self.hpp:18
+
return_type< T_y, T_dof, T_loc, T_scale >::type multi_student_t_log(const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &Sigma)
Return the log of the multivariate Student t distribution at the specified arguments.
+
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+
bool check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Return true if the provided sizes match.
+
size_t length_mvt(const T &)
Definition: length_mvt.hpp:12
+
fvar< T > dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
Definition: dot_product.hpp:20
+ +
return_type< T_y, T_loc, T_covar >::type multi_normal_log(const T_y &y, const T_loc &mu, const T_covar &Sigma)
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + + +
fvar< T > log1p(const fvar< T > &x)
Definition: log1p.hpp:16
+ +
T log_determinant_ldlt(stan::math::LDLT_factor< T, R, C > &A)
+ +
bool check_ldlt_factor(const char *function, const char *name, stan::math::LDLT_factor< T, R, C > &A)
Return true if the argument is a valid stan::math::LDLT_factor.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/multi__student__t__rng_8hpp.html b/doc/api/html/multi__student__t__rng_8hpp.html new file mode 100644 index 00000000000..c6b5ddbf0e2 --- /dev/null +++ b/doc/api/html/multi__student__t__rng_8hpp.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/multi_student_t_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
multi_student_t_rng.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
Eigen::VectorXd stan::math::multi_student_t_rng (const double nu, const Eigen::Matrix< double, Dynamic, 1 > &mu, const Eigen::Matrix< double, Dynamic, Dynamic > &s, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/multi__student__t__rng_8hpp_source.html b/doc/api/html/multi__student__t__rng_8hpp_source.html new file mode 100644 index 00000000000..99887cb8e5e --- /dev/null +++ b/doc/api/html/multi__student__t__rng_8hpp_source.html @@ -0,0 +1,184 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/multi_student_t_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
multi_student_t_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_MULTI_STUDENT_T_RNG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_MULTI_STUDENT_T_RNG_HPP
+
3 
+
4 #include <boost/math/special_functions/gamma.hpp>
+
5 #include <boost/math/special_functions/fpclassify.hpp>
+
6 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + +
21 #include <cstdlib>
+
22 
+
23 namespace stan {
+
24 
+
25  namespace math {
+
26  using Eigen::Dynamic;
+
27 
+
28  template <class RNG>
+
29  inline Eigen::VectorXd
+
30  multi_student_t_rng(const double nu,
+
31  const Eigen::Matrix<double, Dynamic, 1>& mu,
+
32  const Eigen::Matrix<double, Dynamic, Dynamic>& s,
+
33  RNG& rng) {
+
34  static const char* function("stan::math::multi_student_t_rng");
+
35 
+ + + + +
40 
+
41  check_finite(function, "Location parameter", mu);
+
42  check_symmetric(function, "Scale parameter", s);
+
43  check_not_nan(function, "Degrees of freedom parameter", nu);
+
44  check_positive(function, "Degrees of freedom parameter", nu);
+
45 
+
46  Eigen::VectorXd z(s.cols());
+
47  z.setZero();
+
48 
+
49  double w = stan::math::inv_gamma_rng(nu / 2, nu / 2, rng);
+
50  return mu + std::sqrt(w) * stan::math::multi_normal_rng(z, s, rng);
+
51  }
+
52  }
+
53 }
+
54 #endif
+ + +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ + + +
bool check_symmetric(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is symmetric.
+ + + +
double inv_gamma_rng(const double alpha, const double beta, RNG &rng)
+ +
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ +
Eigen::VectorXd multi_student_t_rng(const double nu, const Eigen::Matrix< double, Dynamic, 1 > &mu, const Eigen::Matrix< double, Dynamic, Dynamic > &s, RNG &rng)
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + + + +
Eigen::VectorXd multi_normal_rng(const Eigen::Matrix< double, Dynamic, 1 > &mu, const Eigen::Matrix< double, Dynamic, Dynamic > &S, RNG &rng)
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/multinomial__log_8hpp.html b/doc/api/html/multinomial__log_8hpp.html new file mode 100644 index 00000000000..792d033a28a --- /dev/null +++ b/doc/api/html/multinomial__log_8hpp.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/multinomial_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
multinomial_log.hpp File Reference
+
+
+
#include <boost/math/special_functions/gamma.hpp>
+#include <boost/random/uniform_01.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <stan/math/prim/mat/err/check_simplex.hpp>
+#include <stan/math/prim/scal/err/check_size_match.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/err/check_positive.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<bool propto, typename T_prob >
boost::math::tools::promote_args
+< T_prob >::type 
stan::math::multinomial_log (const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)
 
template<typename T_prob >
boost::math::tools::promote_args
+< T_prob >::type 
stan::math::multinomial_log (const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/multinomial__log_8hpp_source.html b/doc/api/html/multinomial__log_8hpp_source.html new file mode 100644 index 00000000000..4dab17c64ac --- /dev/null +++ b/doc/api/html/multinomial__log_8hpp_source.html @@ -0,0 +1,189 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/multinomial_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
multinomial_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_MULTINOMIAL_LOG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_MULTINOMIAL_LOG_HPP
+
3 
+
4 #include <boost/math/special_functions/gamma.hpp>
+
5 #include <boost/random/uniform_01.hpp>
+
6 #include <boost/random/variate_generator.hpp>
+ + + + + + + +
14 #include <vector>
+
15 
+
16 namespace stan {
+
17 
+
18  namespace math {
+
19  // Multinomial(ns|N, theta) [0 <= n <= N; SUM ns = N;
+
20  // 0 <= theta[n] <= 1; SUM theta = 1]
+
21  template <bool propto,
+
22  typename T_prob>
+
23  typename boost::math::tools::promote_args<T_prob>::type
+
24  multinomial_log(const std::vector<int>& ns,
+
25  const Eigen::Matrix<T_prob, Eigen::Dynamic, 1>& theta) {
+
26  static const char* function("stan::math::multinomial_log");
+
27 
+ + + +
31  using boost::math::tools::promote_args;
+
32  using boost::math::lgamma;
+
33 
+
34  typename promote_args<T_prob>::type lp(0.0);
+
35  check_nonnegative(function, "Number of trials variable", ns);
+
36  check_simplex(function, "Probabilites parameter", theta);
+
37  check_size_match(function,
+
38  "Size of number of trials variable", ns.size(),
+
39  "rows of probabilities parameter", theta.rows());
+ +
41 
+ +
43  double sum = 1.0;
+
44  for (unsigned int i = 0; i < ns.size(); ++i)
+
45  sum += ns[i];
+
46  lp += lgamma(sum);
+
47  for (unsigned int i = 0; i < ns.size(); ++i)
+
48  lp -= lgamma(ns[i] + 1.0);
+
49  }
+ +
51  for (unsigned int i = 0; i < ns.size(); ++i)
+
52  lp += multiply_log(ns[i], theta[i]);
+
53  }
+
54  return lp;
+
55  }
+
56 
+
57  template <typename T_prob>
+
58  typename boost::math::tools::promote_args<T_prob>::type
+
59  multinomial_log(const std::vector<int>& ns,
+
60  const Eigen::Matrix<T_prob, Eigen::Dynamic, 1>& theta) {
+
61  return multinomial_log<false>(ns, theta);
+
62  }
+
63 
+
64  }
+
65 }
+
66 #endif
+
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+ +
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
+ + +
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ + + +
bool check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Return true if the provided sizes match.
+
fvar< T > multiply_log(const fvar< T > &x1, const fvar< T > &x2)
+ +
bool check_simplex(const char *function, const char *name, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)
Return true if the specified vector is simplex.
+
boost::math::tools::promote_args< T_prob >::type multinomial_log(const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/multinomial__rng_8hpp.html b/doc/api/html/multinomial__rng_8hpp.html new file mode 100644 index 00000000000..3b7baf1c78b --- /dev/null +++ b/doc/api/html/multinomial__rng_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/multinomial_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
multinomial_rng.hpp File Reference
+
+
+
#include <stan/math/prim/mat/err/check_simplex.hpp>
+#include <stan/math/prim/scal/err/check_size_match.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/err/check_positive.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/prob/binomial_rng.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <boost/math/special_functions/gamma.hpp>
+#include <boost/random/uniform_01.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
std::vector< int > stan::math::multinomial_rng (const Eigen::Matrix< double, Eigen::Dynamic, 1 > &theta, const int N, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/multinomial__rng_8hpp_source.html b/doc/api/html/multinomial__rng_8hpp_source.html new file mode 100644 index 00000000000..e4059af1d40 --- /dev/null +++ b/doc/api/html/multinomial__rng_8hpp_source.html @@ -0,0 +1,169 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/multinomial_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
multinomial_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_MULTINOMIAL_RNG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_MULTINOMIAL_RNG_HPP
+
3 
+ + + + + + + + +
12 #include <boost/math/special_functions/gamma.hpp>
+
13 #include <boost/random/uniform_01.hpp>
+
14 #include <boost/random/variate_generator.hpp>
+
15 #include <vector>
+
16 
+
17 namespace stan {
+
18 
+
19  namespace math {
+
20 
+
21  template <class RNG>
+
22  inline std::vector<int>
+
23  multinomial_rng(const Eigen::Matrix<double, Eigen::Dynamic, 1>& theta,
+
24  const int N,
+
25  RNG& rng) {
+
26  static const char* function("stan::math::multinomial_rng");
+ + +
29 
+
30  check_simplex(function, "Probabilites parameter", theta);
+
31  check_positive(function, "number of trials variables", N);
+
32 
+
33  std::vector<int> result(theta.size(), 0);
+
34  double mass_left = 1.0;
+
35  int n_left = N;
+
36  for (int k = 0; n_left > 0 && k < theta.size(); ++k) {
+
37  double p = theta[k] / mass_left;
+
38  if (p > 1.0) p = 1.0;
+
39  result[k] = binomial_rng(n_left, p, rng);
+
40  n_left -= result[k];
+
41  mass_left -= theta[k];
+
42  }
+
43  return result;
+
44  }
+
45 
+
46 
+
47  }
+
48 }
+
49 #endif
+ + + + + + +
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+
std::vector< int > multinomial_rng(const Eigen::Matrix< double, Eigen::Dynamic, 1 > &theta, const int N, RNG &rng)
+ +
bool check_simplex(const char *function, const char *name, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)
Return true if the specified vector is simplex.
+
int binomial_rng(const int N, const double theta, RNG &rng)
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespace_eigen.html b/doc/api/html/namespace_eigen.html new file mode 100644 index 00000000000..a648fcbb7f8 --- /dev/null +++ b/doc/api/html/namespace_eigen.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: Eigen Namespace Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
Eigen Namespace Reference
+
+
+ +

(Expert) Numerical traits for algorithmic differentiation variables. +More...

+ + + + + +

+Namespaces

 internal
 (Expert) Product traits for algorithmic differentiation variables.
 
+ + + + + + + +

+Classes

struct  NumTraits< stan::math::fvar< T > >
 Numerical traits template override for Eigen for automatic gradient variables. More...
 
struct  NumTraits< stan::math::var >
 Numerical traits template override for Eigen for automatic gradient variables. More...
 
+

Detailed Description

+

(Expert) Numerical traits for algorithmic differentiation variables.

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespace_eigen_1_1internal.html b/doc/api/html/namespace_eigen_1_1internal.html new file mode 100644 index 00000000000..b439e1f0db6 --- /dev/null +++ b/doc/api/html/namespace_eigen_1_1internal.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: Eigen::internal Namespace Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
Eigen::internal Namespace Reference
+
+
+ +

(Expert) Product traits for algorithmic differentiation variables. +More...

+ + + + + + + + + + + + + + + + + + + + + +

+Classes

struct  significant_decimals_default_impl< stan::math::fvar< T >, false >
 Implemented this for printing to stream. More...
 
struct  significant_decimals_default_impl< stan::math::var, false >
 Implemented this for printing to stream. More...
 
struct  scalar_product_traits< stan::math::var, double >
 Scalar product traits override for Eigen for automatic gradient variables. More...
 
struct  scalar_product_traits< double, stan::math::var >
 Scalar product traits override for Eigen for automatic gradient variables. More...
 
struct  general_matrix_vector_product< Index, stan::math::var, ColMajor, ConjugateLhs, stan::math::var, ConjugateRhs >
 Override matrix-vector and matrix-matrix products to use more efficient implementation. More...
 
struct  general_matrix_vector_product< Index, stan::math::var, RowMajor, ConjugateLhs, stan::math::var, ConjugateRhs >
 
struct  general_matrix_matrix_product< Index, stan::math::var, LhsStorageOrder, ConjugateLhs, stan::math::var, RhsStorageOrder, ConjugateRhs, ColMajor >
 
+

Detailed Description

+

(Expert) Product traits for algorithmic differentiation variables.

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespaceboost.html b/doc/api/html/namespaceboost.html new file mode 100644 index 00000000000..323640dbfa6 --- /dev/null +++ b/doc/api/html/namespaceboost.html @@ -0,0 +1,118 @@ + + + + + + +Stan Math Library: boost Namespace Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
boost Namespace Reference
+
+
+ +

Reimplementing boost functionality. +More...

+ + + + + +

+Namespaces

 math
 Reimplmeneting boost functionality for stan::math::var and and bugs in classification of integer types.
 
+

Detailed Description

+

Reimplementing boost functionality.

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespaceboost_1_1math.html b/doc/api/html/namespaceboost_1_1math.html new file mode 100644 index 00000000000..b59596f5dab --- /dev/null +++ b/doc/api/html/namespaceboost_1_1math.html @@ -0,0 +1,331 @@ + + + + + + +Stan Math Library: boost::math Namespace Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
boost::math Namespace Reference
+
+
+ +

Reimplmeneting boost functionality for stan::math::var and and bugs in classification of integer types. +More...

+ + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<>
int fpclassify (const stan::math::var &v)
 Categorizes the given stan::math::var value. More...
 
template<>
bool isfinite (const stan::math::var &v)
 Checks if the given number has finite value. More...
 
template<>
bool isinf (const stan::math::var &v)
 Checks if the given number is infinite. More...
 
template<>
bool isnan (const stan::math::var &v)
 Checks if the given number is NaN. More...
 
template<>
bool isnormal (const stan::math::var &v)
 Checks if the given number is normal. More...
 
+

Detailed Description

+

Reimplmeneting boost functionality for stan::math::var and and bugs in classification of integer types.

+

FIXME: remove when BOOST fixes isfinite(). See ticket #6517. (Boost 1.48.0) https://svn.boost.org/trac/boost/ticket/6517

+

Function Documentation

+ +
+
+
+template<>
+ + + + + +
+ + + + + + + + +
int boost::math::fpclassify (const stan::math::varv)
+
+inline
+
+ +

Categorizes the given stan::math::var value.

+

Categorizes the stan::math::var value, v, into the following categories: zero, subnormal, normal, infinite, or NAN.

+
Parameters
+ + +
vVariable to classify.
+
+
+
Returns
One of FP_ZERO, FP_NORMAL, FP_FINITE, FP_INFINITE, FP_NAN, or FP_SUBZERO, specifying the category of v.
+ +

Definition at line 24 of file boost_fpclassify.hpp.

+ +
+
+ +
+
+
+template<>
+ + + + + +
+ + + + + + + + +
bool boost::math::isfinite (const stan::math::varv)
+
+inline
+
+ +

Checks if the given number has finite value.

+

Return true if the specified variable's value is finite.

+
Parameters
+ + +
vVariable to test.
+
+
+
Returns
true if variable is finite.
+ +

Definition at line 22 of file boost_isfinite.hpp.

+ +
+
+ +
+
+
+template<>
+ + + + + +
+ + + + + + + + +
bool boost::math::isinf (const stan::math::varv)
+
+inline
+
+ +

Checks if the given number is infinite.

+

Return true if the specified variable's value is infinite.

+
Parameters
+ + +
vVariable to test.
+
+
+
Returns
true if variable is infinite.
+ +

Definition at line 22 of file boost_isinf.hpp.

+ +
+
+ +
+
+
+template<>
+ + + + + +
+ + + + + + + + +
bool boost::math::isnan (const stan::math::varv)
+
+inline
+
+ +

Checks if the given number is NaN.

+

Return true if the specified variable has a value that is NaN.

+
Parameters
+ + +
vVariable to test.
+
+
+
Returns
true if variable is NaN.
+ +

Definition at line 22 of file boost_isnan.hpp.

+ +
+
+ +
+
+
+template<>
+ + + + + +
+ + + + + + + + +
bool boost::math::isnormal (const stan::math::varv)
+
+inline
+
+ +

Checks if the given number is normal.

+

Return true if the specified variable has a value that is normal.

+
Parameters
+ + +
vVariable to test.
+
+
+
Returns
true if variable is normal.
+ +

Definition at line 22 of file boost_isnormal.hpp.

+ +
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers.html b/doc/api/html/namespacemembers.html new file mode 100644 index 00000000000..154cd9b5fdb --- /dev/null +++ b/doc/api/html/namespacemembers.html @@ -0,0 +1,186 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- a -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_b.html b/doc/api/html/namespacemembers_b.html new file mode 100644 index 00000000000..5f45dfe9f40 --- /dev/null +++ b/doc/api/html/namespacemembers_b.html @@ -0,0 +1,219 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- b -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_c.html b/doc/api/html/namespacemembers_c.html new file mode 100644 index 00000000000..7702a4f3b13 --- /dev/null +++ b/doc/api/html/namespacemembers_c.html @@ -0,0 +1,390 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- c -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_d.html b/doc/api/html/namespacemembers_d.html new file mode 100644 index 00000000000..0a44a7c2d2b --- /dev/null +++ b/doc/api/html/namespacemembers_d.html @@ -0,0 +1,210 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- d -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_e.html b/doc/api/html/namespacemembers_e.html new file mode 100644 index 00000000000..522b6deb4dc --- /dev/null +++ b/doc/api/html/namespacemembers_e.html @@ -0,0 +1,207 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- e -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_f.html b/doc/api/html/namespacemembers_f.html new file mode 100644 index 00000000000..a9b2f17ce44 --- /dev/null +++ b/doc/api/html/namespacemembers_f.html @@ -0,0 +1,204 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- f -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_func.html b/doc/api/html/namespacemembers_func.html new file mode 100644 index 00000000000..5080e4dcbf1 --- /dev/null +++ b/doc/api/html/namespacemembers_func.html @@ -0,0 +1,186 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+  + +

- a -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_func_b.html b/doc/api/html/namespacemembers_func_b.html new file mode 100644 index 00000000000..97117e00fd4 --- /dev/null +++ b/doc/api/html/namespacemembers_func_b.html @@ -0,0 +1,219 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+  + +

- b -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_func_c.html b/doc/api/html/namespacemembers_func_c.html new file mode 100644 index 00000000000..44c0ddfb902 --- /dev/null +++ b/doc/api/html/namespacemembers_func_c.html @@ -0,0 +1,384 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+  + +

- c -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_func_d.html b/doc/api/html/namespacemembers_func_d.html new file mode 100644 index 00000000000..fb0fa170c43 --- /dev/null +++ b/doc/api/html/namespacemembers_func_d.html @@ -0,0 +1,210 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+  + +

- d -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_func_e.html b/doc/api/html/namespacemembers_func_e.html new file mode 100644 index 00000000000..09447fe3135 --- /dev/null +++ b/doc/api/html/namespacemembers_func_e.html @@ -0,0 +1,201 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+  + +

- e -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_func_f.html b/doc/api/html/namespacemembers_func_f.html new file mode 100644 index 00000000000..f2e98183f05 --- /dev/null +++ b/doc/api/html/namespacemembers_func_f.html @@ -0,0 +1,204 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+  + +

- f -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_func_g.html b/doc/api/html/namespacemembers_func_g.html new file mode 100644 index 00000000000..94aa2c40d03 --- /dev/null +++ b/doc/api/html/namespacemembers_func_g.html @@ -0,0 +1,219 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+  + +

- g -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_func_h.html b/doc/api/html/namespacemembers_func_h.html new file mode 100644 index 00000000000..8951f3d06a4 --- /dev/null +++ b/doc/api/html/namespacemembers_func_h.html @@ -0,0 +1,156 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+  + +

- h -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_func_i.html b/doc/api/html/namespacemembers_func_i.html new file mode 100644 index 00000000000..e3e1138898a --- /dev/null +++ b/doc/api/html/namespacemembers_func_i.html @@ -0,0 +1,269 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+  + +

- i -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_func_j.html b/doc/api/html/namespacemembers_func_j.html new file mode 100644 index 00000000000..ad9751180e0 --- /dev/null +++ b/doc/api/html/namespacemembers_func_j.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+  + +

- j -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_func_l.html b/doc/api/html/namespacemembers_func_l.html new file mode 100644 index 00000000000..5e2cf4f5394 --- /dev/null +++ b/doc/api/html/namespacemembers_func_l.html @@ -0,0 +1,300 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+  + +

- l -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_func_m.html b/doc/api/html/namespacemembers_func_m.html new file mode 100644 index 00000000000..b53d28f8232 --- /dev/null +++ b/doc/api/html/namespacemembers_func_m.html @@ -0,0 +1,246 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+  + +

- m -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_func_n.html b/doc/api/html/namespacemembers_func_n.html new file mode 100644 index 00000000000..36305578ded --- /dev/null +++ b/doc/api/html/namespacemembers_func_n.html @@ -0,0 +1,201 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+  + +

- n -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_func_o.html b/doc/api/html/namespacemembers_func_o.html new file mode 100644 index 00000000000..33623080047 --- /dev/null +++ b/doc/api/html/namespacemembers_func_o.html @@ -0,0 +1,195 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+  + +

- o -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_func_p.html b/doc/api/html/namespacemembers_func_p.html new file mode 100644 index 00000000000..5a28f7c29da --- /dev/null +++ b/doc/api/html/namespacemembers_func_p.html @@ -0,0 +1,246 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+  + +

- p -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_func_q.html b/doc/api/html/namespacemembers_func_q.html new file mode 100644 index 00000000000..adaf789413e --- /dev/null +++ b/doc/api/html/namespacemembers_func_q.html @@ -0,0 +1,153 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+  + +

- q -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_func_r.html b/doc/api/html/namespacemembers_func_r.html new file mode 100644 index 00000000000..385ba82862b --- /dev/null +++ b/doc/api/html/namespacemembers_func_r.html @@ -0,0 +1,207 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+  + +

- r -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_func_s.html b/doc/api/html/namespacemembers_func_s.html new file mode 100644 index 00000000000..5eab597f4df --- /dev/null +++ b/doc/api/html/namespacemembers_func_s.html @@ -0,0 +1,270 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+  + +

- s -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_func_t.html b/doc/api/html/namespacemembers_func_t.html new file mode 100644 index 00000000000..cb511c69512 --- /dev/null +++ b/doc/api/html/namespacemembers_func_t.html @@ -0,0 +1,198 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+  + +

- t -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_func_u.html b/doc/api/html/namespacemembers_func_u.html new file mode 100644 index 00000000000..30ad2c37f1d --- /dev/null +++ b/doc/api/html/namespacemembers_func_u.html @@ -0,0 +1,165 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+  + +

- u -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_func_v.html b/doc/api/html/namespacemembers_func_v.html new file mode 100644 index 00000000000..e2354a95352 --- /dev/null +++ b/doc/api/html/namespacemembers_func_v.html @@ -0,0 +1,162 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+  + +

- v -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_func_w.html b/doc/api/html/namespacemembers_func_w.html new file mode 100644 index 00000000000..226aa8f5674 --- /dev/null +++ b/doc/api/html/namespacemembers_func_w.html @@ -0,0 +1,162 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+  + +

- w -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_g.html b/doc/api/html/namespacemembers_g.html new file mode 100644 index 00000000000..e43968b9946 --- /dev/null +++ b/doc/api/html/namespacemembers_g.html @@ -0,0 +1,219 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- g -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_h.html b/doc/api/html/namespacemembers_h.html new file mode 100644 index 00000000000..ab99847cfed --- /dev/null +++ b/doc/api/html/namespacemembers_h.html @@ -0,0 +1,156 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- h -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_i.html b/doc/api/html/namespacemembers_i.html new file mode 100644 index 00000000000..c5e966dd0d9 --- /dev/null +++ b/doc/api/html/namespacemembers_i.html @@ -0,0 +1,278 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- i -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_j.html b/doc/api/html/namespacemembers_j.html new file mode 100644 index 00000000000..730667aad64 --- /dev/null +++ b/doc/api/html/namespacemembers_j.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- j -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_l.html b/doc/api/html/namespacemembers_l.html new file mode 100644 index 00000000000..edc6c0eb41e --- /dev/null +++ b/doc/api/html/namespacemembers_l.html @@ -0,0 +1,327 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- l -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_m.html b/doc/api/html/namespacemembers_m.html new file mode 100644 index 00000000000..50b6e854c71 --- /dev/null +++ b/doc/api/html/namespacemembers_m.html @@ -0,0 +1,270 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- m -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_n.html b/doc/api/html/namespacemembers_n.html new file mode 100644 index 00000000000..8f997559fbb --- /dev/null +++ b/doc/api/html/namespacemembers_n.html @@ -0,0 +1,231 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- n -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_o.html b/doc/api/html/namespacemembers_o.html new file mode 100644 index 00000000000..014d8ed9a59 --- /dev/null +++ b/doc/api/html/namespacemembers_o.html @@ -0,0 +1,195 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- o -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_p.html b/doc/api/html/namespacemembers_p.html new file mode 100644 index 00000000000..765508f5425 --- /dev/null +++ b/doc/api/html/namespacemembers_p.html @@ -0,0 +1,252 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- p -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_q.html b/doc/api/html/namespacemembers_q.html new file mode 100644 index 00000000000..fd4ac61c3f9 --- /dev/null +++ b/doc/api/html/namespacemembers_q.html @@ -0,0 +1,153 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- q -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_r.html b/doc/api/html/namespacemembers_r.html new file mode 100644 index 00000000000..032d06b610c --- /dev/null +++ b/doc/api/html/namespacemembers_r.html @@ -0,0 +1,225 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- r -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_s.html b/doc/api/html/namespacemembers_s.html new file mode 100644 index 00000000000..b335af85143 --- /dev/null +++ b/doc/api/html/namespacemembers_s.html @@ -0,0 +1,282 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- s -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_t.html b/doc/api/html/namespacemembers_t.html new file mode 100644 index 00000000000..3c3019d1798 --- /dev/null +++ b/doc/api/html/namespacemembers_t.html @@ -0,0 +1,201 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- t -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_type.html b/doc/api/html/namespacemembers_type.html new file mode 100644 index 00000000000..b8eacbef323 --- /dev/null +++ b/doc/api/html/namespacemembers_type.html @@ -0,0 +1,170 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + +
+ + + + +
+ +
+ +
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_u.html b/doc/api/html/namespacemembers_u.html new file mode 100644 index 00000000000..d05f44d9580 --- /dev/null +++ b/doc/api/html/namespacemembers_u.html @@ -0,0 +1,165 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- u -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_v.html b/doc/api/html/namespacemembers_v.html new file mode 100644 index 00000000000..a186809bd6e --- /dev/null +++ b/doc/api/html/namespacemembers_v.html @@ -0,0 +1,180 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- v -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_vars.html b/doc/api/html/namespacemembers_vars.html new file mode 100644 index 00000000000..838201dfe21 --- /dev/null +++ b/doc/api/html/namespacemembers_vars.html @@ -0,0 +1,256 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+  + +

- c -

+ + +

- e -

+ + +

- i -

+ + +

- l -

+ + +

- m -

+ + +

- n -

+ + +

- p -

+ + +

- s -

+ + +

- t -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacemembers_w.html b/doc/api/html/namespacemembers_w.html new file mode 100644 index 00000000000..cffe9069025 --- /dev/null +++ b/doc/api/html/namespacemembers_w.html @@ -0,0 +1,162 @@ + + + + + + +Stan Math Library: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- w -

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespaces.html b/doc/api/html/namespaces.html new file mode 100644 index 00000000000..0d6ddd9db84 --- /dev/null +++ b/doc/api/html/namespaces.html @@ -0,0 +1,116 @@ + + + + + + +Stan Math Library: Namespace List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + +
+ + + + +
+ +
+ +
+
+
Namespace List
+
+
+
Here is a list of all namespaces with brief descriptions:
+
[detail level 123]
+ + + + + + + + +
oNboostReimplementing boost functionality
|\NmathReimplmeneting boost functionality for stan::math::var and and bugs in classification of integer types
oNEigen(Expert) Numerical traits for algorithmic differentiation variables
|\Ninternal(Expert) Product traits for algorithmic differentiation variables
oNstan
|\NmathMatrices and templated mathematical functions
| \Ndetail
\Nstd
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacestan.html b/doc/api/html/namespacestan.html new file mode 100644 index 00000000000..5acdea39730 --- /dev/null +++ b/doc/api/html/namespacestan.html @@ -0,0 +1,738 @@ + + + + + + +Stan Math Library: stan Namespace Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
stan Namespace Reference
+
+
+ + + + + +

+Namespaces

 math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

struct  is_fvar< stan::math::fvar< T > >
 
struct  partials_type< stan::math::fvar< T > >
 
struct  is_vector< const T >
 
struct  is_vector< std::vector< T > >
 
struct  is_vector< Eigen::Matrix< T, Eigen::Dynamic, 1 > >
 
struct  is_vector< Eigen::Matrix< T, 1, Eigen::Dynamic > >
 
struct  is_vector< Eigen::Block< T > >
 
struct  is_vector_like< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > >
 
struct  contains_fvar
 Metaprogram to calculate the base scalar return type resulting from promoting all the scalar types of the template parameters. More...
 
struct  contains_nonconstant_struct
 
struct  contains_vector
 
struct  error_index
 
struct  is_constant
 Metaprogramming struct to detect whether a given type is constant in the mathematical sense (not the C++ const sense). More...
 
struct  is_constant_struct
 Metaprogram to determine if a type has a base scalar type that can be assigned to type double. More...
 
struct  is_constant_struct< std::vector< T > >
 
struct  is_constant_struct< Eigen::Matrix< T, R, C > >
 
struct  is_constant_struct< Eigen::Block< T > >
 
struct  is_fvar
 
struct  is_var
 
struct  is_var_or_arithmetic
 
struct  is_vector
 
struct  is_vector_like
 
struct  is_vector_like< T * >
 
struct  is_vector_like< const T >
 
struct  partials_return_type
 
struct  partials_type
 
struct  return_type
 Metaprogram to calculate the base scalar return type resulting from promoting all the scalar types of the template parameters. More...
 
struct  scalar_type
 Metaprogram structure to determine the base scalar type of a template argument. More...
 
struct  scalar_type< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > >
 
struct  scalar_type< T * >
 
struct  scalar_type_pre
 Metaprogram structure to determine the type of first container of the base scalar type of a template argument. More...
 
struct  size_of_helper
 
struct  size_of_helper< T, true >
 
class  VectorBuilderHelper
 VectorBuilder allocates type T1 values to be used as intermediate values. More...
 
class  VectorBuilderHelper< T1, true, false >
 
class  VectorBuilderHelper< T1, true, true >
 
class  VectorBuilder
 
class  VectorView
 VectorView is a template metaprogram that takes its argument and allows it to be used like a vector. More...
 
class  VectorView< const T, is_array, throw_if_accessed >
 VectorView that has const correctness. More...
 
class  VectorView< const double, false, false >
 
class  VectorViewMvt
 
class  VectorViewMvt< const T, is_array, throw_if_accessed >
 VectorViewMvt that has const correctness. More...
 
struct  is_var< stan::math::var >
 
struct  partials_type< stan::math::var >
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T >
get (const std::vector< T > &x, size_t n)
 
template<typename T >
size_t length (const std::vector< T > &x)
 
template<typename T , int R, int C>
get (const Eigen::Matrix< T, R, C > &m, size_t n)
 
template<typename T , int R, int C>
size_t length (const Eigen::Matrix< T, R, C > &m)
 
template<typename T >
get (const T &x, size_t n)
 
template<typename T >
size_t length (const T &)
 
template<typename T >
size_t length_mvt (const T &)
 
template<typename T , int R, int C>
size_t length_mvt (const Eigen::Matrix< T, R, C > &)
 
template<typename T , int R, int C>
size_t length_mvt (const std::vector< Eigen::Matrix< T, R, C > > &x)
 
template<typename T1 , typename T2 >
size_t max_size (const T1 &x1, const T2 &x2)
 
template<typename T1 , typename T2 , typename T3 >
size_t max_size (const T1 &x1, const T2 &x2, const T3 &x3)
 
template<typename T1 , typename T2 , typename T3 , typename T4 >
size_t max_size (const T1 &x1, const T2 &x2, const T3 &x3, const T4 &x4)
 
template<typename T1 , typename T2 >
size_t max_size_mvt (const T1 &x1, const T2 &x2)
 
template<typename T1 , typename T2 , typename T3 >
size_t max_size_mvt (const T1 &x1, const T2 &x2, const T3 &x3)
 
template<typename T1 , typename T2 , typename T3 , typename T4 >
size_t max_size_mvt (const T1 &x1, const T2 &x2, const T3 &x3, const T4 &x4)
 
template<typename T >
size_t size_of (const T &x)
 
+

Function Documentation

+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
T stan::get (const Eigen::Matrix< T, R, C > & m,
size_t n 
)
+
+inline
+
+ +

Definition at line 9 of file get.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
T stan::get (const T & x,
size_t n 
)
+
+inline
+
+ +

Definition at line 10 of file get.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
T stan::get (const std::vector< T > & x,
size_t n 
)
+
+inline
+
+ +

Definition at line 10 of file get.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + + + + +
size_t stan::length (const Eigen::Matrix< T, R, C > & m)
+
+ +

Definition at line 9 of file length.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
size_t stan::length (const T & )
+
+ +

Definition at line 9 of file length.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
size_t stan::length (const std::vector< T > & x)
+
+ +

Definition at line 10 of file length.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
size_t stan::length_mvt (const T & )
+
+ +

Definition at line 12 of file length_mvt.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + + + + +
size_t stan::length_mvt (const Eigen::Matrix< T, R, C > & )
+
+ +

Definition at line 17 of file length_mvt.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + + + + +
size_t stan::length_mvt (const std::vector< Eigen::Matrix< T, R, C > > & x)
+
+ +

Definition at line 21 of file length_mvt.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + + + + + + + + + + + + + + +
size_t stan::max_size (const T1 & x1,
const T2 & x2 
)
+
+ +

Definition at line 9 of file max_size.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , typename T3 >
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t stan::max_size (const T1 & x1,
const T2 & x2,
const T3 & x3 
)
+
+ +

Definition at line 16 of file max_size.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , typename T3 , typename T4 >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
size_t stan::max_size (const T1 & x1,
const T2 & x2,
const T3 & x3,
const T4 & x4 
)
+
+ +

Definition at line 24 of file max_size.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + + + + + + + + + + + + + + +
size_t stan::max_size_mvt (const T1 & x1,
const T2 & x2 
)
+
+ +

Definition at line 10 of file max_size_mvt.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , typename T3 >
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t stan::max_size_mvt (const T1 & x1,
const T2 & x2,
const T3 & x3 
)
+
+ +

Definition at line 17 of file max_size_mvt.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , typename T3 , typename T4 >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
size_t stan::max_size_mvt (const T1 & x1,
const T2 & x2,
const T3 & x3,
const T4 & x4 
)
+
+ +

Definition at line 25 of file max_size_mvt.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
size_t stan::size_of (const T & x)
+
+ +

Definition at line 27 of file size_of.hpp.

+ +
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacestan_1_1math.html b/doc/api/html/namespacestan_1_1math.html new file mode 100644 index 00000000000..0fcbbd15c29 --- /dev/null +++ b/doc/api/html/namespacestan_1_1math.html @@ -0,0 +1,57913 @@ + + + + + + +Stan Math Library: stan::math Namespace Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math Namespace Reference
+
+
+ +

Matrices and templated mathematical functions. +More...

+ + + + +

+Namespaces

 detail
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

struct  fvar
 
class  stack_alloc
 An instance of this class provides a memory pool through which blocks of raw memory may be allocated and then collected simultaneously. More...
 
struct  coupled_ode_observer
 Observer for the coupled states. More...
 
struct  coupled_ode_system
 Base template class for a coupled ordinary differential equation system, which adds sensitivities to the base system. More...
 
struct  coupled_ode_system< F, double, double >
 The coupled ode system for known initial values and known parameters. More...
 
class  container_view< std::vector< T1 >, T2 >
 Template specialization for scalar view of array y with scalar type T2 with proper indexing inferred from input vector x of scalar type T1. More...
 
struct  index_type< std::vector< T > >
 Template metaprogram class to compute the type of index for a standard vector. More...
 
class  accumulator
 Class to accumulate values and eventually return their sum. More...
 
struct  array_builder
 Structure for building up arrays in an expression (rather than in statements) using an argumentchaining add() method and a getter method array() to return the result. More...
 
struct  common_type
 
struct  common_type< std::vector< T1 >, std::vector< T2 > >
 
struct  common_type< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > >
 
class  LDLT_factor
 
class  LDLT_factor< T, R, C >
 LDLT_factor is a thin wrapper on Eigen::LDLT to allow for reusing factorizations and efficient autodiff of things like log determinants and solutions to linear systems. More...
 
struct  promote_scalar_struct< T, Eigen::Matrix< S,-1,-1 > >
 Struct to hold static function for promoting underlying scalar types. More...
 
struct  promote_scalar_struct< T, Eigen::Matrix< S, 1,-1 > >
 Struct to hold static function for promoting underlying scalar types. More...
 
struct  promote_scalar_struct< T, Eigen::Matrix< S,-1, 1 > >
 Struct to hold static function for promoting underlying scalar types. More...
 
struct  promote_scalar_type< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >
 Template metaprogram to calculate a type for a matrix whose underlying scalar is converted from the second template parameter type to the first. More...
 
struct  promote_scalar_type< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > >
 Template metaprogram to calculate a type for a vector whose underlying scalar is converted from the second template parameter type to the first. More...
 
struct  promote_scalar_type< T, Eigen::Matrix< S, 1, Eigen::Dynamic > >
 Template metaprogram to calculate a type for a row vector whose underlying scalar is converted from the second template parameter type to the first. More...
 
struct  promoter
 
struct  promoter< T, T >
 
struct  promoter< std::vector< F >, std::vector< T > >
 
struct  promoter< std::vector< T >, std::vector< T > >
 
struct  promoter< Eigen::Matrix< F, R, C >, Eigen::Matrix< T, R, C > >
 
struct  promoter< Eigen::Matrix< T, R, C >, Eigen::Matrix< T, R, C > >
 
class  welford_covar_estimator
 
class  welford_var_estimator
 
class  container_view< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > >
 Template specialization for Eigen::Map view of array with scalar type T2 with size inferred from input Eigen::Matrix. More...
 
class  container_view< Eigen::Matrix< T1, R, C >, T2 >
 Template specialization for scalar view of array y with scalar type T2. More...
 
class  container_view< std::vector< Eigen::Matrix< T1, R, C > >, Eigen::Matrix< T2, R, C > >
 Template specialization for matrix view of array y with scalar type T2 with shape equal to x. More...
 
struct  index_type< Eigen::Matrix< T, R, C > >
 Template metaprogram defining typedef for the type of index for an Eigen matrix, vector, or row vector. More...
 
struct  store_type
 
struct  store_type< double >
 
struct  store_type< int >
 
struct  pass_type
 
struct  pass_type< double >
 
struct  pass_type< int >
 
class  seq_view
 
class  seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > >
 
class  seq_view< T, Eigen::Matrix< S, 1, Eigen::Dynamic > >
 
class  seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >
 
class  seq_view< T, std::vector< S > >
 
class  seq_view< T, std::vector< T > >
 
class  seq_view< T, std::vector< std::vector< T > > >
 
class  seq_view< double, std::vector< int > >
 
struct  value_type< Eigen::Matrix< T, R, C > >
 Template metaprogram defining the type of values stored in an Eigen matrix, vector, or row vector. More...
 
struct  promote_scalar_struct
 General struct to hold static function for promoting underlying scalar types. More...
 
struct  promote_scalar_struct< T, T >
 Struct to hold static function for promoting underlying scalar types. More...
 
struct  promote_scalar_struct< T, std::vector< S > >
 Struct to hold static function for promoting underlying scalar types. More...
 
struct  promote_scalar_type
 Template metaprogram to calculate a type for converting a convertible type. More...
 
struct  promote_scalar_type< T, std::vector< S > >
 Template metaprogram to calculate a type for a container whose underlying scalar is converted from the second template parameter type to the first. More...
 
struct  child_type
 Primary template class for metaprogram to compute child type of T. More...
 
struct  child_type< T_struct< T_child > >
 Specialization for template classes / structs. More...
 
class  container_view
 Primary template class for container view of array y with same structure as T1 and size as x. More...
 
struct  dummy
 Empty struct for use in boost::condtional<is_constant_struct<T1>::value, T1, dummy>::type as false condtion for safe indexing. More...
 
class  container_view< dummy, T2 >
 Dummy type specialization, used in conjunction with struct dummy as described above. More...
 
struct  include_summand
 Template metaprogram to calculate whether a summand needs to be included in a proportional (log) probability calculation. More...
 
struct  index_type
 Primary template class for the metaprogram to compute the index type of a container. More...
 
struct  index_type< const T >
 Template class for metaprogram to compute the type of indexes used in a constant container type. More...
 
class  partials_vari
 
struct  OperandsAndPartials
 A variable implementation that stores operands and derivatives with respect to the variable. More...
 
struct  value_type
 Primary template class for metaprogram to compute the type of values stored in a container. More...
 
struct  value_type< const T >
 Template class for metaprogram to compute the type of values stored in a constant container. More...
 
struct  value_type< std::vector< T > >
 Template metaprogram class to compute the type of values stored in a standard vector. More...
 
class  sum_v_vari
 Class for sums of variables constructed with standard vectors. More...
 
struct  coupled_ode_system< F, double, stan::math::var >
 The coupled ODE system for known initial values and unknown parameters. More...
 
struct  coupled_ode_system< F, stan::math::var, double >
 The coupled ODE system for unknown initial values and known parameters. More...
 
struct  coupled_ode_system< F, stan::math::var, stan::math::var >
 The coupled ode system for unknown intial values and unknown parameters. More...
 
struct  AutodiffStackStorage
 
class  chainable
 Abstract base class for variable implementations that handles memory management and applying the chain rule. More...
 
class  chainable_alloc
 A chainable_alloc is an object which is constructed and destructed normally but the memory lifespan is managed along with the arena allocator for the gradient calculation. More...
 
class  op_ddv_vari
 
class  op_dv_vari
 
class  op_dvd_vari
 
class  op_dvv_vari
 
class  gevv_vvv_vari
 
class  op_matrix_vari
 
class  precomp_v_vari
 
class  precomp_vv_vari
 
class  precomp_vvv_vari
 
class  precomputed_gradients_vari
 A variable implementation taking a sequence of operands and partial derivatives with respect to the operands. More...
 
class  stored_gradient_vari
 A var implementation that stores the daughter variable implementation pointers and the partial derivative with respect to the result explicitly in arrays constructed on the auto-diff memory stack. More...
 
class  op_v_vari
 
class  var
 Independent (input) and dependent (output) variables for gradients. More...
 
class  vari
 The variable implementation base class. More...
 
class  op_vd_vari
 
class  op_vdd_vari
 
class  op_vdv_vari
 
class  op_vector_vari
 
class  op_vv_vari
 
class  op_vvd_vari
 
class  op_vvv_vari
 
class  cholesky_decompose_v_vari
 
class  LDLT_alloc
 This object stores the actual (double typed) LDLT factorization of an Eigen::Matrix<var> along with pointers to its vari's which allow the *_ldlt functions to save memory. More...
 
class  LDLT_factor< stan::math::var, R, C >
 A template specialization of src/stan/math/matrix/LDLT_factor.hpp for stan::math::var which can be used with all the *_ldlt functions. More...
 
class  sum_eigen_v_vari
 Class for representing sums with constructors for Eigen. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Typedefs

typedef Eigen::Matrix< double,
+Eigen::Dynamic, Eigen::Dynamic >
+::Index 
size_type
 Type for sizes and indexes in an Eigen matrix with double e. More...
 
typedef Eigen::Matrix< fvar
+< double >, Eigen::Dynamic,
+Eigen::Dynamic > 
matrix_fd
 
typedef Eigen::Matrix< fvar
+< fvar< double >
+ >, Eigen::Dynamic,
+Eigen::Dynamic > 
matrix_ffd
 
typedef Eigen::Matrix< fvar
+< double >, Eigen::Dynamic, 1 > 
vector_fd
 
typedef Eigen::Matrix< fvar
+< fvar< double >
+ >, Eigen::Dynamic, 1 > 
vector_ffd
 
typedef Eigen::Matrix< fvar
+< double >, 1, Eigen::Dynamic > 
row_vector_fd
 
typedef Eigen::Matrix< fvar
+< fvar< double >
+ >, 1, Eigen::Dynamic > 
row_vector_ffd
 
typedef Eigen::Matrix< fvar
+< var >, Eigen::Dynamic,
+Eigen::Dynamic > 
matrix_fv
 
typedef Eigen::Matrix< fvar
+< fvar< var >
+ >, Eigen::Dynamic,
+Eigen::Dynamic > 
matrix_ffv
 
typedef Eigen::Matrix< fvar
+< var >, Eigen::Dynamic, 1 > 
vector_fv
 
typedef Eigen::Matrix< fvar
+< fvar< var >
+ >, Eigen::Dynamic, 1 > 
vector_ffv
 
typedef Eigen::Matrix< fvar
+< var >, 1, Eigen::Dynamic > 
row_vector_fv
 
typedef Eigen::Matrix< fvar
+< fvar< var >
+ >, 1, Eigen::Dynamic > 
row_vector_ffv
 
typedef Eigen::Matrix< double,
+Eigen::Dynamic, Eigen::Dynamic > 
matrix_d
 Type for matrix of double values. More...
 
typedef Eigen::Matrix< double,
+Eigen::Dynamic, 1 > 
vector_d
 Type for (column) vector of double values. More...
 
typedef Eigen::Matrix< double,
+1, Eigen::Dynamic > 
row_vector_d
 Type for (row) vector of double values. More...
 
typedef AutodiffStackStorage
+< chainable, chainable_alloc
ChainableStack
 
typedef Eigen::Matrix< var,
+Eigen::Dynamic, Eigen::Dynamic > 
matrix_v
 The type of a matrix holding stan::math::var values. More...
 
typedef Eigen::Matrix< var,
+Eigen::Dynamic, 1 > 
vector_v
 The type of a (column) vector holding stan::math::var values. More...
 
typedef Eigen::Matrix< var,
+1, Eigen::Dynamic > 
row_vector_v
 The type of a row vector holding stan::math::var values. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T >
fvar< T > log_sum_exp (const std::vector< fvar< T > > &v)
 
template<typename T >
fvar< T > sum (const std::vector< fvar< T > > &m)
 Return the sum of the entries of the specified standard vector. More...
 
template<typename T >
fvar< T > operator+ (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > operator+ (const double x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > operator+ (const fvar< T > &x1, const double x2)
 
template<typename T >
fvar< T > operator/ (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > operator/ (const fvar< T > &x1, const double x2)
 
template<typename T >
fvar< T > operator/ (const double x1, const fvar< T > &x2)
 
template<typename T >
bool operator== (const fvar< T > &x, const fvar< T > &y)
 
template<typename T >
bool operator== (const fvar< T > &x, double y)
 
template<typename T >
bool operator== (double x, const fvar< T > &y)
 
template<typename T >
bool operator> (const fvar< T > &x, const fvar< T > &y)
 
template<typename T >
bool operator> (const fvar< T > &x, double y)
 
template<typename T >
bool operator> (double x, const fvar< T > &y)
 
template<typename T >
bool operator>= (const fvar< T > &x, const fvar< T > &y)
 
template<typename T >
bool operator>= (const fvar< T > &x, double y)
 
template<typename T >
bool operator>= (double x, const fvar< T > &y)
 
template<typename T >
bool operator< (const fvar< T > &x, double y)
 
template<typename T >
bool operator< (double x, const fvar< T > &y)
 
template<typename T >
bool operator< (const fvar< T > &x, const fvar< T > &y)
 
template<typename T >
bool operator<= (const fvar< T > &x, const fvar< T > &y)
 
template<typename T >
bool operator<= (const fvar< T > &x, double y)
 
template<typename T >
bool operator<= (double x, const fvar< T > &y)
 
template<typename T >
fvar< T > operator* (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > operator* (double x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > operator* (const fvar< T > &x1, double x2)
 
template<typename T >
bool operator!= (const fvar< T > &x, const fvar< T > &y)
 
template<typename T >
bool operator!= (const fvar< T > &x, double y)
 
template<typename T >
bool operator!= (double x, const fvar< T > &y)
 
template<typename T >
fvar< T > operator- (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > operator- (const double x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > operator- (const fvar< T > &x1, const double x2)
 
template<typename T >
fvar< T > operator- (const fvar< T > &x)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, 1, C1 > columns_dot_product (const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, 1, C1 > columns_dot_product (const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, 1, C1 > columns_dot_product (const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
 
template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, 1, C > columns_dot_self (const Eigen::Matrix< fvar< T >, R, C > &x)
 
template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, C, C > crossprod (const Eigen::Matrix< fvar< T >, R, C > &m)
 
template<typename T , int R, int C>
fvar< T > determinant (const Eigen::Matrix< fvar< T >, R, C > &m)
 
template<typename T1 , typename T2 >
stan::return_type< T1, T2 >::type divide (const T1 &v, const T2 &c)
 
template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, R, C > divide (const Eigen::Matrix< fvar< T >, R, C > &v, const fvar< T > &c)
 
template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, R, C > divide (const Eigen::Matrix< fvar< T >, R, C > &v, const double c)
 
template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, R, C > divide (const Eigen::Matrix< double, R, C > &v, const fvar< T > &c)
 
template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, R, C > operator/ (const Eigen::Matrix< fvar< T >, R, C > &v, const fvar< T > &c)
 
template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, R, C > operator/ (const Eigen::Matrix< fvar< T >, R, C > &v, const double c)
 
template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, R, C > operator/ (const Eigen::Matrix< double, R, C > &v, const fvar< T > &c)
 
template<typename T , int R1, int C1, int R2, int C2>
fvar< T > dot_product (const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
 
template<typename T , int R1, int C1, int R2, int C2>
fvar< T > dot_product (const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)
 
template<typename T , int R1, int C1, int R2, int C2>
fvar< T > dot_product (const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
 
template<typename T , int R1, int C1, int R2, int C2>
fvar< T > dot_product (const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2, size_type &length)
 
template<typename T , int R1, int C1, int R2, int C2>
fvar< T > dot_product (const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2, size_type &length)
 
template<typename T , int R1, int C1, int R2, int C2>
fvar< T > dot_product (const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2, size_type &length)
 
template<typename T >
fvar< T > dot_product (const std::vector< fvar< T > > &v1, const std::vector< fvar< T > > &v2)
 
template<typename T >
fvar< T > dot_product (const std::vector< double > &v1, const std::vector< fvar< T > > &v2)
 
template<typename T >
fvar< T > dot_product (const std::vector< fvar< T > > &v1, const std::vector< double > &v2)
 
template<typename T >
fvar< T > dot_product (const std::vector< fvar< T > > &v1, const std::vector< fvar< T > > &v2, size_type &length)
 
template<typename T >
fvar< T > dot_product (const std::vector< double > &v1, const std::vector< fvar< T > > &v2, size_type &length)
 
template<typename T >
fvar< T > dot_product (const std::vector< fvar< T > > &v1, const std::vector< double > &v2, size_type &length)
 
template<typename T , int R, int C>
fvar< T > dot_self (const Eigen::Matrix< fvar< T >, R, C > &v)
 
template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, R, C > inverse (const Eigen::Matrix< fvar< T >, R, C > &m)
 
template<typename T , int R, int C>
fvar< T > log_determinant (const Eigen::Matrix< fvar< T >, R, C > &m)
 
template<typename T >
Eigen::Matrix< fvar< T >
+, Eigen::Dynamic, 1 > 
log_softmax (const Eigen::Matrix< fvar< T >, Eigen::Dynamic, 1 > &alpha)
 
template<typename T , int R, int C>
fvar< T > log_sum_exp (const Eigen::Matrix< fvar< T >, R, C > &v)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C2 > mdivide_left (const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C2 > mdivide_left (const Eigen::Matrix< double, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C2 > mdivide_left (const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)
 
template<int R1, int C1, int R2, int C2, typename T2 >
Eigen::Matrix< fvar< T2 >, R1, C2 > mdivide_left_ldlt (const stan::math::LDLT_factor< double, R1, C1 > &A, const Eigen::Matrix< fvar< T2 >, R2, C2 > &b)
 Returns the solution of the system Ax=b given an LDLT_factor of A. More...
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C1 > mdivide_left_tri_low (const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C1 > mdivide_left_tri_low (const Eigen::Matrix< double, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C1 > mdivide_left_tri_low (const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C2 > mdivide_right (const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C2 > mdivide_right (const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C2 > mdivide_right (const Eigen::Matrix< double, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C1 > mdivide_right_tri_low (const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C2 > mdivide_right_tri_low (const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C2 > mdivide_right_tri_low (const Eigen::Matrix< double, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
 
template<typename T , int R1, int C1>
Eigen::Matrix< fvar< T >, R1, C1 > multiply (const Eigen::Matrix< fvar< T >, R1, C1 > &m, const fvar< T > &c)
 
template<typename T , int R2, int C2>
Eigen::Matrix< fvar< T >, R2, C2 > multiply (const Eigen::Matrix< fvar< T >, R2, C2 > &m, const double c)
 
template<typename T , int R1, int C1>
Eigen::Matrix< fvar< T >, R1, C1 > multiply (const Eigen::Matrix< double, R1, C1 > &m, const fvar< T > &c)
 
template<typename T , int R1, int C1>
Eigen::Matrix< fvar< T >, R1, C1 > multiply (const fvar< T > &c, const Eigen::Matrix< fvar< T >, R1, C1 > &m)
 
template<typename T , int R1, int C1>
Eigen::Matrix< fvar< T >, R1, C1 > multiply (const double c, const Eigen::Matrix< fvar< T >, R1, C1 > &m)
 
template<typename T , int R1, int C1>
Eigen::Matrix< fvar< T >, R1, C1 > multiply (const fvar< T > &c, const Eigen::Matrix< double, R1, C1 > &m)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C2 > multiply (const Eigen::Matrix< fvar< T >, R1, C1 > &m1, const Eigen::Matrix< fvar< T >, R2, C2 > &m2)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C2 > multiply (const Eigen::Matrix< fvar< T >, R1, C1 > &m1, const Eigen::Matrix< double, R2, C2 > &m2)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, C2 > multiply (const Eigen::Matrix< double, R1, C1 > &m1, const Eigen::Matrix< fvar< T >, R2, C2 > &m2)
 
template<typename T , int C1, int R2>
fvar< T > multiply (const Eigen::Matrix< fvar< T >, 1, C1 > &rv, const Eigen::Matrix< fvar< T >, R2, 1 > &v)
 
template<typename T , int C1, int R2>
fvar< T > multiply (const Eigen::Matrix< fvar< T >, 1, C1 > &rv, const Eigen::Matrix< double, R2, 1 > &v)
 
template<typename T , int C1, int R2>
fvar< T > multiply (const Eigen::Matrix< double, 1, C1 > &rv, const Eigen::Matrix< fvar< T >, R2, 1 > &v)
 
template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, R, R > multiply_lower_tri_self_transpose (const Eigen::Matrix< fvar< T >, R, C > &m)
 
template<typename T >
Eigen::Matrix< fvar< T >
+, Eigen::Dynamic,
+Eigen::Dynamic > 
qr_Q (const Eigen::Matrix< fvar< T >, Eigen::Dynamic, Eigen::Dynamic > &m)
 
template<typename T >
Eigen::Matrix< fvar< T >
+, Eigen::Dynamic,
+Eigen::Dynamic > 
qr_R (const Eigen::Matrix< fvar< T >, Eigen::Dynamic, Eigen::Dynamic > &m)
 
template<int RA, int CA, int RB, int CB, typename T >
Eigen::Matrix< fvar< T >, CB, CB > quad_form_sym (const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< double, RB, CB > &B)
 
template<int RA, int CA, int RB, typename T >
fvar< T > quad_form_sym (const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< double, RB, 1 > &B)
 
template<int RA, int CA, int RB, int CB, typename T >
Eigen::Matrix< fvar< T >, CB, CB > quad_form_sym (const Eigen::Matrix< double, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, CB > &B)
 
template<int RA, int CA, int RB, typename T >
fvar< T > quad_form_sym (const Eigen::Matrix< double, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, 1 > &B)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, 1 > rows_dot_product (const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, 1 > rows_dot_product (const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< fvar< T >, R1, 1 > rows_dot_product (const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)
 
template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, R, 1 > rows_dot_self (const Eigen::Matrix< fvar< T >, R, C > &x)
 
template<typename T >
Eigen::Matrix< fvar< T >
+, Eigen::Dynamic, 1 > 
softmax (const Eigen::Matrix< fvar< T >, Eigen::Dynamic, 1 > &alpha)
 
template<typename T >
std::vector< fvar< T > > sort_asc (std::vector< fvar< T > > xs)
 
template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, R, C > sort_asc (Eigen::Matrix< fvar< T >, R, C > xs)
 
template<typename T >
std::vector< fvar< T > > sort_desc (std::vector< fvar< T > > xs)
 
template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, R, C > sort_desc (Eigen::Matrix< fvar< T >, R, C > xs)
 
template<typename T , int R, int C>
fvar< T > sum (const Eigen::Matrix< fvar< T >, R, C > &m)
 Return the sum of the entries of the specified matrix. More...
 
template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, R, R > tcrossprod (const Eigen::Matrix< fvar< T >, R, C > &m)
 
template<typename T >
fvar< T > to_fvar (const T &x)
 
template<typename T >
fvar< T > to_fvar (const fvar< T > &x)
 
template<int R, int C, typename T >
Eigen::Matrix< T, R, C > to_fvar (const Eigen::Matrix< T, R, C > &m)
 
template<int R, int C>
Eigen::Matrix< fvar< double >
+, R, C > 
to_fvar (const Eigen::Matrix< double, R, C > &m)
 
template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, R, C > to_fvar (const Eigen::Matrix< T, R, C > &val, const Eigen::Matrix< T, R, C > &deriv)
 
template<int RD, int CD, int RA, int CA, int RB, int CB, typename T >
fvar< T > trace_gen_quad_form (const Eigen::Matrix< fvar< T >, RD, CD > &D, const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, CB > &B)
 
template<int RA, int CA, int RB, int CB, typename T >
fvar< T > trace_quad_form (const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, CB > &B)
 
template<int RA, int CA, int RB, int CB, typename T >
fvar< T > trace_quad_form (const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< double, RB, CB > &B)
 
template<int RA, int CA, int RB, int CB, typename T >
fvar< T > trace_quad_form (const Eigen::Matrix< double, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, CB > &B)
 
template<typename T , typename F >
void gradient (const F &f, const Eigen::Matrix< T, Dynamic, 1 > &x, T &fx, Eigen::Matrix< T, Dynamic, 1 > &grad_fx)
 Calculate the value and the gradient of the specified function at the specified argument. More...
 
template<typename T , typename F >
void jacobian (const F &f, const Eigen::Matrix< T, Dynamic, 1 > &x, Eigen::Matrix< T, Dynamic, 1 > &fx, Eigen::Matrix< T, Dynamic, Dynamic > &J)
 
template<typename T >
fvar< T > abs (const fvar< T > &x)
 
template<typename T >
fvar< T > acos (const fvar< T > &x)
 
template<typename T >
fvar< T > acosh (const fvar< T > &x)
 
template<typename T >
fvar< T > asin (const fvar< T > &x)
 
template<typename T >
fvar< T > asinh (const fvar< T > &x)
 
template<typename T >
fvar< T > atan (const fvar< T > &x)
 
template<typename T >
fvar< T > atan2 (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > atan2 (const double x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > atan2 (const fvar< T > &x1, const double x2)
 
template<typename T >
fvar< T > atanh (const fvar< T > &x)
 
template<typename T >
fvar< T > bessel_first_kind (int v, const fvar< T > &z)
 
template<typename T >
fvar< T > bessel_second_kind (int v, const fvar< T > &z)
 
template<typename T >
fvar< T > binary_log_loss (const int y, const fvar< T > &y_hat)
 
template<typename T >
fvar< T > binomial_coefficient_log (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > binomial_coefficient_log (const fvar< T > &x1, const double x2)
 
template<typename T >
fvar< T > binomial_coefficient_log (const double x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > cbrt (const fvar< T > &x)
 
template<typename T >
fvar< T > ceil (const fvar< T > &x)
 
template<typename T >
fvar< T > cos (const fvar< T > &x)
 
template<typename T >
fvar< T > cosh (const fvar< T > &x)
 
template<typename T >
fvar< T > digamma (const fvar< T > &x)
 
template<typename T >
fvar< T > erf (const fvar< T > &x)
 
template<typename T >
fvar< T > erfc (const fvar< T > &x)
 
template<typename T >
fvar< T > exp (const fvar< T > &x)
 
template<typename T >
fvar< T > exp2 (const fvar< T > &x)
 
template<typename T >
fvar< T > expm1 (const fvar< T > &x)
 
template<typename T >
fvar< T > fabs (const fvar< T > &x)
 
template<typename T >
fvar< T > falling_factorial (const fvar< T > &x, const fvar< T > &n)
 
template<typename T >
fvar< T > falling_factorial (const fvar< T > &x, const double n)
 
template<typename T >
fvar< T > falling_factorial (const double x, const fvar< T > &n)
 
template<typename T >
fvar< T > fdim (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > fdim (const fvar< T > &x1, const double x2)
 
template<typename T >
fvar< T > fdim (const double x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > floor (const fvar< T > &x)
 
template<typename T1 , typename T2 , typename T3 >
fvar< typename
+stan::return_type< T1, T2, T3 >
+::type > 
fma (const fvar< T1 > &x1, const fvar< T2 > &x2, const fvar< T3 > &x3)
 The fused multiply-add operation (C99). More...
 
template<typename T1 , typename T2 , typename T3 >
fvar< typename
+stan::return_type< T1, T2, T3 >
+::type > 
fma (const T1 &x1, const fvar< T2 > &x2, const fvar< T3 > &x3)
 See all-var input signature for details on the function and derivatives. More...
 
template<typename T1 , typename T2 , typename T3 >
fvar< typename
+stan::return_type< T1, T2, T3 >
+::type > 
fma (const fvar< T1 > &x1, const T2 &x2, const fvar< T3 > &x3)
 See all-var input signature for details on the function and derivatives. More...
 
template<typename T1 , typename T2 , typename T3 >
fvar< typename
+stan::return_type< T1, T2, T3 >
+::type > 
fma (const fvar< T1 > &x1, const fvar< T2 > &x2, const T3 &x3)
 See all-var input signature for details on the function and derivatives. More...
 
template<typename T1 , typename T2 , typename T3 >
fvar< typename
+stan::return_type< T1, T2, T3 >
+::type > 
fma (const T1 &x1, const T2 &x2, const fvar< T3 > &x3)
 See all-var input signature for details on the function and derivatives. More...
 
template<typename T1 , typename T2 , typename T3 >
fvar< typename
+stan::return_type< T1, T2, T3 >
+::type > 
fma (const fvar< T1 > &x1, const T2 &x2, const T3 &x3)
 See all-var input signature for details on the function and derivatives. More...
 
template<typename T1 , typename T2 , typename T3 >
fvar< typename
+stan::return_type< T1, T2, T3 >
+::type > 
fma (const T1 &x1, const fvar< T2 > &x2, const T3 &x3)
 See all-var input signature for details on the function and derivatives. More...
 
template<typename T >
fvar< T > fmax (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > fmax (const double x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > fmax (const fvar< T > &x1, const double x2)
 
template<typename T >
fvar< T > fmin (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > fmin (const double x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > fmin (const fvar< T > &x1, const double x2)
 
template<typename T >
fvar< T > fmod (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > fmod (const fvar< T > &x1, const double x2)
 
template<typename T >
fvar< T > fmod (const double x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > gamma_p (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > gamma_p (const fvar< T > &x1, const double x2)
 
template<typename T >
fvar< T > gamma_p (const double x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > gamma_q (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > gamma_q (const fvar< T > &x1, const double x2)
 
template<typename T >
fvar< T > gamma_q (const double x1, const fvar< T > &x2)
 
template<typename T >
void grad_inc_beta (stan::math::fvar< T > &g1, stan::math::fvar< T > &g2, stan::math::fvar< T > a, stan::math::fvar< T > b, stan::math::fvar< T > z)
 
template<typename T >
fvar< T > hypot (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > hypot (const fvar< T > &x1, const double x2)
 
template<typename T >
fvar< T > hypot (const double x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > inc_beta (const fvar< T > &a, const fvar< T > &b, const fvar< T > &x)
 
template<typename T >
fvar< T > inv (const fvar< T > &x)
 
template<typename T >
fvar< T > inv_cloglog (const fvar< T > &x)
 
template<typename T >
fvar< T > inv_logit (const fvar< T > &x)
 
template<typename T >
fvar< T > inv_Phi (const fvar< T > &p)
 
template<typename T >
fvar< T > inv_sqrt (const fvar< T > &x)
 
template<typename T >
fvar< T > inv_square (const fvar< T > &x)
 
template<typename T >
int is_inf (const fvar< T > &x)
 Returns 1 if the input's value is infinite and 0 otherwise. More...
 
template<typename T >
int is_nan (const fvar< T > &x)
 Returns 1 if the input's value is NaN and 0 otherwise. More...
 
template<typename T >
fvar< T > lbeta (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > lbeta (const double x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > lbeta (const fvar< T > &x1, const double x2)
 
template<typename T >
fvar< T > lgamma (const fvar< T > &x)
 
template<typename T >
fvar< typename
+stan::return_type< T, int >
+::type > 
lmgamma (int x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > log (const fvar< T > &x)
 
template<typename T >
fvar< T > log10 (const fvar< T > &x)
 
template<typename T >
fvar< T > log1m (const fvar< T > &x)
 
template<typename T >
fvar< T > log1m_exp (const fvar< T > &x)
 
template<typename T >
fvar< T > log1m_inv_logit (const fvar< T > &x)
 
template<typename T >
fvar< T > log1p (const fvar< T > &x)
 
template<typename T >
fvar< T > log1p_exp (const fvar< T > &x)
 
template<typename T >
fvar< T > log2 (const fvar< T > &x)
 
template<typename T >
fvar< T > log_diff_exp (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T1 , typename T2 >
fvar< T2 > log_diff_exp (const T1 &x1, const fvar< T2 > &x2)
 
template<typename T1 , typename T2 >
fvar< T1 > log_diff_exp (const fvar< T1 > &x1, const T2 &x2)
 
template<typename T >
fvar< T > log_falling_factorial (const fvar< T > &x, const fvar< T > &n)
 
template<typename T >
fvar< T > log_falling_factorial (const double x, const fvar< T > &n)
 
template<typename T >
fvar< T > log_falling_factorial (const fvar< T > &x, const double n)
 
template<typename T >
fvar< T > log_inv_logit (const fvar< T > &x)
 
template<typename T_theta , typename T_lambda1 , typename T_lambda2 , int N>
void log_mix_partial_helper (const T_theta &theta, const T_lambda1 &lambda1, const T_lambda2 &lambda2, typename promote_args< T_theta, T_lambda1, T_lambda2 >::type(&partials_array)[N])
 
template<typename T >
fvar< T > log_mix (const fvar< T > &theta, const fvar< T > &lambda1, const fvar< T > &lambda2)
 Return the log mixture density with specified mixing proportion and log densities and its derivative at each. More...
 
template<typename T >
fvar< T > log_mix (const fvar< T > &theta, const fvar< T > &lambda1, const double lambda2)
 
template<typename T >
fvar< T > log_mix (const fvar< T > &theta, const double lambda1, const fvar< T > &lambda2)
 
template<typename T >
fvar< T > log_mix (const double theta, const fvar< T > &lambda1, const fvar< T > &lambda2)
 
template<typename T >
fvar< T > log_mix (const fvar< T > &theta, const double lambda1, const double lambda2)
 
template<typename T >
fvar< T > log_mix (const double theta, const fvar< T > &lambda1, const double lambda2)
 
template<typename T >
fvar< T > log_mix (const double theta, const double lambda1, const fvar< T > &lambda2)
 
template<typename T >
fvar< T > log_rising_factorial (const fvar< T > &x, const fvar< T > &n)
 
template<typename T >
fvar< T > log_rising_factorial (const fvar< T > &x, const double n)
 
template<typename T >
fvar< T > log_rising_factorial (const double x, const fvar< T > &n)
 
template<typename T >
fvar< T > log_sum_exp (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > log_sum_exp (const double x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > log_sum_exp (const fvar< T > &x1, const double x2)
 
template<typename T >
fvar< T > logit (const fvar< T > &x)
 
template<typename T >
fvar< T > modified_bessel_first_kind (int v, const fvar< T > &z)
 
template<typename T >
fvar< T > modified_bessel_second_kind (int v, const fvar< T > &z)
 
template<typename T >
fvar< T > multiply_log (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > multiply_log (const double x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > multiply_log (const fvar< T > &x1, const double x2)
 
template<typename T >
fvar< T > owens_t (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > owens_t (const double x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > owens_t (const fvar< T > &x1, const double x2)
 
template<typename T >
fvar< T > Phi (const fvar< T > &x)
 
template<typename T >
fvar< T > pow (const fvar< T > &x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > pow (const double x1, const fvar< T > &x2)
 
template<typename T >
fvar< T > pow (const fvar< T > &x1, const double x2)
 
template<typename T >
double primitive_value (const fvar< T > &v)
 Return the primitive value of the specified forward-mode autodiff variable. More...
 
template<typename T >
fvar< T > rising_factorial (const fvar< T > &x, const fvar< T > &n)
 
template<typename T >
fvar< T > rising_factorial (const fvar< T > &x, const double n)
 
template<typename T >
fvar< T > rising_factorial (const double x, const fvar< T > &n)
 
template<typename T >
fvar< T > round (const fvar< T > &x)
 
template<typename T >
fvar< T > sin (const fvar< T > &x)
 
template<typename T >
fvar< T > sinh (const fvar< T > &x)
 
template<typename T >
fvar< T > sqrt (const fvar< T > &x)
 
template<typename T >
fvar< T > square (const fvar< T > &x)
 
template<typename T >
fvar< T > tan (const fvar< T > &x)
 
template<typename T >
fvar< T > tanh (const fvar< T > &x)
 
template<typename T >
fvar< T > tgamma (const fvar< T > &x)
 
template<typename T >
fvar< T > trunc (const fvar< T > &x)
 
template<typename T >
value_of (const fvar< T > &v)
 Return the value of the specified variable. More...
 
template<typename T >
double value_of_rec (const fvar< T > &v)
 Return the value of the specified variable. More...
 
template<typename T >
bool is_aligned (T *ptr, unsigned int bytes_aligned)
 Return true if the specified pointer is aligned on the number of bytes. More...
 
template<typename T , typename F >
void derivative (const F &f, const T &x, T &fx, T &dfx_dx)
 Return the derivative of the specified univariate function at the specified argument. More...
 
template<typename F >
void finite_diff_grad_hessian (const F &f, const Eigen::Matrix< double,-1, 1 > &x, double &fx, Eigen::Matrix< double,-1,-1 > &hess, std::vector< Eigen::Matrix< double,-1,-1 > > &grad_hess_fx, const double epsilon=1e-04)
 Calculate the value and the gradient of the hessian of the specified function at the specified argument using second-order autodiff and first-order finite difference. More...
 
template<typename F >
void grad_hessian (const F &f, const Eigen::Matrix< double, Dynamic, 1 > &x, double &fx, Eigen::Matrix< double, Dynamic, Dynamic > &H, std::vector< Eigen::Matrix< double, Dynamic, Dynamic > > &grad_H)
 Calculate the value, the Hessian, and the gradient of the Hessian of the specified function at the specified argument. More...
 
template<typename F >
void grad_tr_mat_times_hessian (const F &f, const Eigen::Matrix< double, Dynamic, 1 > &x, const Eigen::Matrix< double, Dynamic, Dynamic > &M, Eigen::Matrix< double, Dynamic, 1 > &grad_tr_MH)
 
template<typename T1 , typename T2 , typename F >
void gradient_dot_vector (const F &f, const Eigen::Matrix< T1, Dynamic, 1 > &x, const Eigen::Matrix< T2, Dynamic, 1 > &v, T1 &fx, T1 &grad_fx_dot_v)
 
template<typename F >
void hessian (const F &f, const Eigen::Matrix< double, Dynamic, 1 > &x, double &fx, Eigen::Matrix< double, Dynamic, 1 > &grad, Eigen::Matrix< double, Dynamic, Dynamic > &H)
 Calculate the value, the gradient, and the Hessian, of the specified function at the specified argument in O(N^2) time and O(N^2) space. More...
 
template<typename T , typename F >
void hessian (const F &f, const Eigen::Matrix< T, Dynamic, 1 > &x, T &fx, Eigen::Matrix< T, Dynamic, 1 > &grad, Eigen::Matrix< T, Dynamic, Dynamic > &H)
 
template<typename F >
void hessian_times_vector (const F &f, const Eigen::Matrix< double, Dynamic, 1 > &x, const Eigen::Matrix< double, Dynamic, 1 > &v, double &fx, Eigen::Matrix< double, Dynamic, 1 > &Hv)
 
template<typename T , typename F >
void hessian_times_vector (const F &f, const Eigen::Matrix< T, Dynamic, 1 > &x, const Eigen::Matrix< T, Dynamic, 1 > &v, T &fx, Eigen::Matrix< T, Dynamic, 1 > &Hv)
 
template<typename T , typename F >
void partial_derivative (const F &f, const Eigen::Matrix< T, Dynamic, 1 > &x, int n, T &fx, T &dfx_dxn)
 Return the partial derivative of the specified multiivariate function at the specified argument. More...
 
double dist (const std::vector< double > &x, const std::vector< double > &y)
 
double dot (const std::vector< double > &x, const std::vector< double > &y)
 
double dot_self (const std::vector< double > &x)
 
double log_sum_exp (const std::vector< double > &x)
 Return the log of the sum of the exponentiated values of the specified sequence of values. More...
 
template<typename T >
std::vector< T > rep_array (const T &x, int n)
 
template<typename T >
std::vector< std::vector< T > > rep_array (const T &x, int m, int n)
 
template<typename T >
std::vector< std::vector
+< std::vector< T > > > 
rep_array (const T &x, int k, int m, int n)
 
void scaled_add (std::vector< double > &x, const std::vector< double > &y, const double lambda)
 
void sub (std::vector< double > &x, std::vector< double > &y, std::vector< double > &result)
 
template<typename T >
sum (const std::vector< T > &xs)
 Return the sum of the values in the specified standard vector. More...
 
template<typename F , typename T1 , typename T2 >
std::vector< std::vector
+< typename stan::return_type
+< T1, T2 >::type > > 
integrate_ode (const F &f, const std::vector< T1 > y0, const double t0, const std::vector< double > &ts, const std::vector< T2 > &theta, const std::vector< double > &x, const std::vector< int > &x_int, std::ostream *msgs)
 Return the solutions for the specified system of ordinary differential equations given the specified initial state, initial times, times of desired solution, and parameters and data, writing error and warning messages to the specified stream. More...
 
template<typename T_y >
bool check_cholesky_factor (const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
 Return true if the specified matrix is a valid Cholesky factor. More...
 
template<typename T_y >
bool check_cholesky_factor_corr (const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
 Return true if the specified matrix is a valid Cholesky factor of a correlation matrix. More...
 
template<typename T_y , int R, int C>
bool check_column_index (const char *function, const char *name, const Eigen::Matrix< T_y, R, C > &y, const size_t i)
 Return true if the specified index is a valid column of the matrix. More...
 
template<typename T_y >
bool check_corr_matrix (const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
 Return true if the specified matrix is a valid correlation matrix. More...
 
template<typename T_y >
bool check_cov_matrix (const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
 Return true if the specified matrix is a valid covariance matrix. More...
 
template<typename T , int R, int C>
bool check_ldlt_factor (const char *function, const char *name, stan::math::LDLT_factor< T, R, C > &A)
 Return true if the argument is a valid stan::math::LDLT_factor. More...
 
template<typename T_y >
bool check_lower_triangular (const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
 Return true if the specified matrix is lower triangular. More...
 
template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
bool check_matching_dims (const char *function, const char *name1, const Eigen::Matrix< T1, R1, C1 > &y1, const char *name2, const Eigen::Matrix< T2, R2, C2 > &y2)
 Return true if the two matrices are of the same size. More...
 
template<typename T_y1 , typename T_y2 >
bool check_matching_sizes (const char *function, const char *name1, const T_y1 &y1, const char *name2, const T_y2 &y2)
 Return true if two structures at the same size. More...
 
template<typename T1 , typename T2 >
bool check_multiplicable (const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
 Return true if the matrices can be multiplied. More...
 
template<typename T_y >
bool check_ordered (const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &y)
 Return true if the specified vector is sorted into strictly increasing order. More...
 
template<typename T_y >
bool check_ordered (const char *function, const char *name, const std::vector< T_y > &y)
 Return true if the specified vector is sorted into strictly increasing order. More...
 
template<typename T_y >
bool check_pos_definite (const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
 Return true if the specified square, symmetric matrix is positive definite. More...
 
template<typename Derived >
bool check_pos_definite (const char *function, const char *name, const Eigen::LDLT< Derived > &cholesky)
 Return true if the specified LDLT transform of a matrix is positive definite. More...
 
template<typename Derived >
bool check_pos_definite (const char *function, const char *name, const Eigen::LLT< Derived > &cholesky)
 Return true if the specified LLT transform of a matrix is positive definite. More...
 
template<typename T_y >
bool check_pos_semidefinite (const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
 Return true if the specified matrix is positive definite. More...
 
template<typename T_y >
bool check_positive_ordered (const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &y)
 Return true if the specified vector contains non-negative values and is sorted into strictly increasing order. More...
 
bool check_range (const char *function, const char *name, const int max, const int index, const int nested_level, const char *error_msg)
 Return true if specified index is within range. More...
 
bool check_range (const char *function, const char *name, const int max, const int index, const char *error_msg)
 Return true if specified index is within range. More...
 
bool check_range (const char *function, const char *name, const int max, const int index)
 Return true if specified index is within range. More...
 
template<typename T_y , int R, int C>
bool check_row_index (const char *function, const char *name, const Eigen::Matrix< T_y, R, C > &y, size_t i)
 Return true if the specified index is a valid row of the matrix. More...
 
template<typename T_prob >
bool check_simplex (const char *function, const char *name, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)
 Return true if the specified vector is simplex. More...
 
template<typename T_y >
bool check_spsd_matrix (const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
 Return true if the specified matrix is a square, symmetric, and positive semi-definite. More...
 
template<typename T_y >
bool check_square (const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
 Return true if the specified matrix is square. More...
 
template<typename T >
bool check_std_vector_index (const char *function, const char *name, const std::vector< T > &y, int i)
 Return true if the specified index is valid in std vector. More...
 
template<typename T_y >
bool check_symmetric (const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
 Return true if the specified matrix is symmetric. More...
 
template<typename T_prob >
bool check_unit_vector (const char *function, const char *name, const Eigen::Matrix< T_prob, Dynamic, 1 > &theta)
 Return true if the specified vector is unit vector. More...
 
template<typename T , int R, int C>
bool check_vector (const char *function, const char *name, const Eigen::Matrix< T, R, C > &x)
 Return true if the matrix is either a row vector or column vector. More...
 
void validate_non_negative_index (const char *var_name, const char *expr, int val)
 
template<typename T1 , typename T2 , int R, int C>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R, C > 
add (const Eigen::Matrix< T1, R, C > &m1, const Eigen::Matrix< T2, R, C > &m2)
 Return the sum of the specified matrices. More...
 
template<typename T1 , typename T2 , int R, int C>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R, C > 
add (const Eigen::Matrix< T1, R, C > &m, const T2 &c)
 Return the sum of the specified matrix and specified scalar. More...
 
template<typename T1 , typename T2 , int R, int C>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R, C > 
add (const T1 &c, const Eigen::Matrix< T2, R, C > &m)
 Return the sum of the specified scalar and specified matrix. More...
 
template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
Eigen::Matrix< typename
+return_type< T1, T2 >::type,
+Eigen::Dynamic, Eigen::Dynamic > 
append_col (const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &B)
 Return the result of appending the second argument matrix after the first argument matrix, that is, putting them side by side, with the first matrix followed by the second matrix. More...
 
template<typename T1 , typename T2 , int C1, int C2>
Eigen::Matrix< typename
+return_type< T1, T2 >::type,
+1, Eigen::Dynamic > 
append_col (const Eigen::Matrix< T1, 1, C1 > &A, const Eigen::Matrix< T2, 1, C2 > &B)
 Return the result of concatenaing the first row vector followed by the second row vector side by side, with the result being a row vector. More...
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
append_col (const Eigen::Matrix< T, R1, C1 > &A, const Eigen::Matrix< T, R2, C2 > &B)
 Return the result of appending the second argument matrix after the first argument matrix, that is, putting them side by side, with the first matrix followed by the second matrix. More...
 
template<typename T , int C1, int C2>
Eigen::Matrix< T,
+1, Eigen::Dynamic > 
append_col (const Eigen::Matrix< T, 1, C1 > &A, const Eigen::Matrix< T, 1, C2 > &B)
 Return the result of concatenaing the first row vector followed by the second row vector side by side, with the result being a row vector. More...
 
template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
Eigen::Matrix< typename
+return_type< T1, T2 >::type,
+Eigen::Dynamic, Eigen::Dynamic > 
append_row (const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &B)
 Return the result of stacking the rows of the first argument matrix on top of the second argument matrix. More...
 
template<typename T1 , typename T2 , int R1, int R2>
Eigen::Matrix< typename
+return_type< T1, T2 >::type,
+Eigen::Dynamic, 1 > 
append_row (const Eigen::Matrix< T1, R1, 1 > &A, const Eigen::Matrix< T2, R2, 1 > &B)
 Return the result of stacking the first vector on top of the second vector, with the result being a vector. More...
 
template<typename T , int R1, int C1, int R2, int C2>
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
append_row (const Eigen::Matrix< T, R1, C1 > &A, const Eigen::Matrix< T, R2, C2 > &B)
 Return the result of stacking the rows of the first argument matrix on top of the second argument matrix. More...
 
template<typename T , int R1, int R2>
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
append_row (const Eigen::Matrix< T, R1, 1 > &A, const Eigen::Matrix< T, R2, 1 > &B)
 Return the result of stacking the first vector on top of the second vector, with the result being a vector. More...
 
void print_mat_size (int n, std::ostream &o)
 Helper function to return the matrix size as either "dynamic" or "1". More...
 
template<typename LHS , typename RHS >
void assign (LHS &lhs, const RHS &rhs)
 Copy the right-hand side's value to the left-hand side variable. More...
 
template<typename LHS , typename RHS , int R1, int C1, int R2, int C2>
void assign (Eigen::Matrix< LHS, R1, C1 > &x, const Eigen::Matrix< RHS, R2, C2 > &y)
 Copy the right-hand side's value to the left-hand side variable. More...
 
template<typename LHS , typename RHS , int R, int C>
void assign (Eigen::Matrix< LHS, R, C > &x, const Eigen::Matrix< RHS, R, C > &y)
 Copy the right-hand side's value to the left-hand side variable. More...
 
template<typename LHS , typename RHS , int R, int C>
void assign (Eigen::Block< LHS > x, const Eigen::Matrix< RHS, R, C > &y)
 Copy the right-hand side's value to the left-hand side variable. More...
 
template<typename LHS , typename RHS >
void assign (std::vector< LHS > &x, const std::vector< RHS > &y)
 Copy the right-hand side's value to the left-hand side variable. More...
 
template<typename T >
void autocorrelation (const std::vector< T > &y, std::vector< T > &ac, Eigen::FFT< T > &fft)
 Write autocorrelation estimates for every lag for the specified input sequence into the specified result using the specified FFT engine. More...
 
template<typename T >
void autocorrelation (const std::vector< T > &y, std::vector< T > &ac)
 Write autocorrelation estimates for every lag for the specified input sequence into the specified result. More...
 
template<typename T >
void autocovariance (const std::vector< T > &y, std::vector< T > &acov, Eigen::FFT< T > &fft)
 Write autocovariance estimates for every lag for the specified input sequence into the specified result using the specified FFT engine. More...
 
template<typename T >
void autocovariance (const std::vector< T > &y, std::vector< T > &acov)
 Write autocovariance estimates for every lag for the specified input sequence into the specified result. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
block (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m, size_t i, size_t j, size_t nrows, size_t ncols)
 Return a nrows x ncols submatrix starting at (i-1, j-1). More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
cholesky_corr_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y, int K)
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
cholesky_corr_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y, int K, T &lp)
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
cholesky_corr_free (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &x)
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
cholesky_decompose (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
 Return the lower-triangular Cholesky factor (i.e., matrix square root) of the specified square, symmetric matrix. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
cholesky_factor_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, int M, int N)
 Return the Cholesky factor of the specified size read from the specified vector. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
cholesky_factor_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, int M, int N, T &lp)
 Return the Cholesky factor of the specified size read from the specified vector and increment the specified log probability reference with the log Jacobian adjustment of the transform. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
cholesky_factor_free (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &y)
 Return the unconstrained vector of parameters correspdonding to the specified Cholesky factor. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
col (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m, size_t j)
 Return the specified column of the specified matrix using start-at-1 indexing. More...
 
template<typename T , int R, int C>
int cols (const Eigen::Matrix< T, R, C > &m)
 Return the number of columns in the specified matrix, vector, or row vector. More...
 
template<int R1, int C1, int R2, int C2>
Eigen::Matrix< double, 1, C1 > columns_dot_product (const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)
 Returns the dot product of the specified vectors. More...
 
template<typename T , int R, int C>
Eigen::Matrix< T, 1, C > columns_dot_self (const Eigen::Matrix< T, R, C > &x)
 Returns the dot product of each column of a matrix with itself. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
corr_matrix_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, typename math::index_type< Eigen::Matrix< T, Eigen::Dynamic, 1 > >::type k)
 Return the correlation matrix of the specified dimensionality derived from the specified vector of unconstrained values. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
corr_matrix_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, typename math::index_type< Eigen::Matrix< T, Eigen::Dynamic, 1 > >::type k, T &lp)
 Return the correlation matrix of the specified dimensionality derived from the specified vector of unconstrained values. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
corr_matrix_free (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &y)
 Return the vector of unconstrained partial correlations that define the specified correlation matrix when transformed. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
cov_matrix_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, typename math::index_type< Eigen::Matrix< T, Eigen::Dynamic, 1 > >::type K)
 Return the symmetric, positive-definite matrix of dimensions K by K resulting from transforming the specified finite vector of size K plus (K choose 2). More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
cov_matrix_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, typename math::index_type< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > >::type K, T &lp)
 Return the symmetric, positive-definite matrix of dimensions K by K resulting from transforming the specified finite vector of size K plus (K choose 2). More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
cov_matrix_constrain_lkj (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, size_t k)
 Return the covariance matrix of the specified dimensionality derived from constraining the specified vector of unconstrained values. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
cov_matrix_constrain_lkj (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, size_t k, T &lp)
 Return the covariance matrix of the specified dimensionality derived from constraining the specified vector of unconstrained values and increment the specified log probability reference with the log absolute Jacobian determinant. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
cov_matrix_free (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &y)
 The covariance matrix derived from the symmetric view of the lower-triangular view of the K by K specified matrix is freed to return a vector of size K + (K choose 2). More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
cov_matrix_free_lkj (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &y)
 Return the vector of unconstrained partial correlations and deviations that transform to the specified covariance matrix. More...
 
matrix_d crossprod (const matrix_d &M)
 Returns the result of pre-multiplying a matrix by its own transpose. More...
 
template<typename T >
const std::vector< int > csr_extract_u (const Eigen::SparseMatrix< T, Eigen::RowMajor > &A)
 Extract the NZE index for each entry from a sparse matrix. More...
 
template<typename T , int R, int C>
const std::vector< int > csr_extract_u (const Eigen::Matrix< T, R, C > &A)
 Extract the NZE index for each entry from a sparse matrix. More...
 
template<typename T >
const std::vector< int > csr_extract_v (const Eigen::SparseMatrix< T, Eigen::RowMajor > &A)
 Extract the column indexes for non-zero value from a sparse matrix. More...
 
template<typename T , int R, int C>
const std::vector< int > csr_extract_v (const Eigen::Matrix< T, R, C > &A)
 Extract the column indexes for non-zero values from a dense matrix by converting to sparse and calling the sparse matrix extractor. More...
 
template<typename T >
const Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
csr_extract_w (const Eigen::SparseMatrix< T, Eigen::RowMajor > &A)
 
template<typename T , int R, int C>
const Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
csr_extract_w (const Eigen::Matrix< T, R, C > &A)
 
template<typename T1 , typename T2 >
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type,
+Eigen::Dynamic, 1 > 
csr_matrix_times_vector (const int &m, const int &n, const Eigen::Matrix< T1, Eigen::Dynamic, 1 > &w, const std::vector< int > &v, const std::vector< int > &u, const Eigen::Matrix< T2, Eigen::Dynamic, 1 > &b)
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
csr_to_dense_matrix (const int &m, const int &n, const Eigen::Matrix< T, Eigen::Dynamic, 1 > &w, const std::vector< int > &v, const std::vector< int > &u)
 Construct a dense Eigen matrix from the CSR format components. More...
 
int csr_u_to_z (const std::vector< int > &u, int i)
 Return the z vector computed from the specified u vector at the index for the z vector. More...
 
template<typename T >
std::vector< T > cumulative_sum (const std::vector< T > &x)
 Return the cumulative sum of the specified vector. More...
 
template<typename T , int R, int C>
Eigen::Matrix< T, R, C > cumulative_sum (const Eigen::Matrix< T, R, C > &m)
 Return the cumulative sum of the specified matrix. More...
 
template<typename T , int R, int C>
determinant (const Eigen::Matrix< T, R, C > &m)
 Returns the determinant of the specified square matrix. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
diag_matrix (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v)
 Return a square diagonal matrix with the specified vector of coefficients as the diagonal values. More...
 
template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R1, C1 > 
diag_post_multiply (const Eigen::Matrix< T1, R1, C1 > &m1, const Eigen::Matrix< T2, R2, C2 > &m2)
 
template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R2, C2 > 
diag_pre_multiply (const Eigen::Matrix< T1, R1, C1 > &m1, const Eigen::Matrix< T2, R2, C2 > &m2)
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
diagonal (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
 Return a column vector of the diagonal elements of the specified matrix. More...
 
template<typename T >
void dims (const T &x, std::vector< int > &result)
 
template<typename T , int R, int C>
void dims (const Eigen::Matrix< T, R, C > &x, std::vector< int > &result)
 
template<typename T >
void dims (const std::vector< T > &x, std::vector< int > &result)
 
template<typename T >
std::vector< int > dims (const T &x)
 
template<typename T1 , int R1, int C1, typename T2 , int R2, int C2>
boost::math::tools::promote_args
+< T1, T2 >::type 
distance (const Eigen::Matrix< T1, R1, C1 > &v1, const Eigen::Matrix< T2, R2, C2 > &v2)
 Returns the distance between the specified vectors. More...
 
template<int R, int C, typename T >
boost::enable_if_c
+< boost::is_arithmetic< T >
+::value, Eigen::Matrix< double,
+R, C > >::type 
divide (const Eigen::Matrix< double, R, C > &m, T c)
 Return specified matrix divided by specified scalar. More...
 
template<int R1, int C1, int R2, int C2>
double dot_product (const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)
 Returns the dot product of the specified vectors. More...
 
double dot_product (const double *v1, const double *v2, size_t length)
 Returns the dot product of the specified arrays of doubles. More...
 
double dot_product (const std::vector< double > &v1, const std::vector< double > &v2)
 Returns the dot product of the specified arrays of doubles. More...
 
template<int R, int C>
double dot_self (const Eigen::Matrix< double, R, C > &v)
 Returns the dot product of the specified vector with itself. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
eigenvalues_sym (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
 Return the eigenvalues of the specified symmetric matrix in descending order of magnitude. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
eigenvectors_sym (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
 
template<typename T1 , typename T2 , int R, int C>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R, C > 
elt_divide (const Eigen::Matrix< T1, R, C > &m1, const Eigen::Matrix< T2, R, C > &m2)
 Return the elementwise division of the specified matrices. More...
 
template<typename T1 , typename T2 , int R, int C>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R, C > 
elt_divide (const Eigen::Matrix< T1, R, C > &m, T2 s)
 Return the elementwise division of the specified matrix by the specified scalar. More...
 
template<typename T1 , typename T2 , int R, int C>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R, C > 
elt_divide (T1 s, const Eigen::Matrix< T2, R, C > &m)
 Return the elementwise division of the specified scalar by the specified matrix. More...
 
template<typename T1 , typename T2 , int R, int C>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R, C > 
elt_multiply (const Eigen::Matrix< T1, R, C > &m1, const Eigen::Matrix< T2, R, C > &m2)
 Return the elementwise multiplication of the specified matrices. More...
 
template<typename T , int Rows, int Cols>
Eigen::Matrix< T, Rows, Cols > exp (const Eigen::Matrix< T, Rows, Cols > &m)
 Return the element-wise exponentiation of the matrix or vector. More...
 
template<int Rows, int Cols>
Eigen::Matrix< double, Rows, Cols > exp (const Eigen::Matrix< double, Rows, Cols > &m)
 
template<typename T >
bool factor_cov_matrix (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &Sigma, Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, Eigen::Array< T, Eigen::Dynamic, 1 > &sds)
 This function is intended to make starting values, given a covariance matrix Sigma. More...
 
template<typename T >
void factor_U (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &U, Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs)
 This function is intended to make starting values, given a unit upper-triangular matrix U such that U'DU is a correlation matrix. More...
 
template<typename T , typename S >
void fill (T &x, const S &y)
 Fill the specified container with the specified value. More...
 
template<typename T , int R, int C, typename S >
void fill (Eigen::Matrix< T, R, C > &x, const S &y)
 Fill the specified container with the specified value. More...
 
template<typename T , typename S >
void fill (std::vector< T > &x, const S &y)
 Fill the specified container with the specified value. More...
 
template<typename T >
const T & get_base1 (const std::vector< T > &x, size_t i, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one index. More...
 
template<typename T >
const T & get_base1 (const std::vector< std::vector< T > > &x, size_t i1, size_t i2, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one indexes. More...
 
template<typename T >
const T & get_base1 (const std::vector< std::vector< std::vector< T > > > &x, size_t i1, size_t i2, size_t i3, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one indexes. More...
 
template<typename T >
const T & get_base1 (const std::vector< std::vector< std::vector< std::vector< T > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one indexes. More...
 
template<typename T >
const T & get_base1 (const std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one indexes. More...
 
template<typename T >
const T & get_base1 (const std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, size_t i6, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one indexes. More...
 
template<typename T >
const T & get_base1 (const std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, size_t i6, size_t i7, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one indexes. More...
 
template<typename T >
const T & get_base1 (const std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, size_t i6, size_t i7, size_t i8, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one indexes. More...
 
template<typename T >
Eigen::Matrix< T,
+1, Eigen::Dynamic > 
get_base1 (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &x, size_t m, const char *error_msg, size_t idx)
 Return a copy of the row of the specified vector at the specified base-one row index. More...
 
template<typename T >
const T & get_base1 (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &x, size_t m, size_t n, const char *error_msg, size_t idx)
 Return a reference to the value of the specified matrix at the specified base-one row and column indexes. More...
 
template<typename T >
const T & get_base1 (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, size_t m, const char *error_msg, size_t idx)
 Return a reference to the value of the specified column vector at the specified base-one index. More...
 
template<typename T >
const T & get_base1 (const Eigen::Matrix< T, 1, Eigen::Dynamic > &x, size_t n, const char *error_msg, size_t idx)
 Return a reference to the value of the specified row vector at the specified base-one index. More...
 
template<typename T >
T & get_base1_lhs (std::vector< T > &x, size_t i, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one index. More...
 
template<typename T >
T & get_base1_lhs (std::vector< std::vector< T > > &x, size_t i1, size_t i2, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one indexes. More...
 
template<typename T >
T & get_base1_lhs (std::vector< std::vector< std::vector< T > > > &x, size_t i1, size_t i2, size_t i3, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one indexes. More...
 
template<typename T >
T & get_base1_lhs (std::vector< std::vector< std::vector< std::vector< T > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one indexes. More...
 
template<typename T >
T & get_base1_lhs (std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one indexes. More...
 
template<typename T >
T & get_base1_lhs (std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, size_t i6, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one indexes. More...
 
template<typename T >
T & get_base1_lhs (std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, size_t i6, size_t i7, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one indexes. More...
 
template<typename T >
T & get_base1_lhs (std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, size_t i6, size_t i7, size_t i8, const char *error_msg, size_t idx)
 Return a reference to the value of the specified vector at the specified base-one indexes. More...
 
template<typename T >
Eigen::Block< Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > > 
get_base1_lhs (Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &x, size_t m, const char *error_msg, size_t idx)
 Return a copy of the row of the specified vector at the specified base-one row index. More...
 
template<typename T >
T & get_base1_lhs (Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &x, size_t m, size_t n, const char *error_msg, size_t idx)
 Return a reference to the value of the specified matrix at the specified base-one row and column indexes. More...
 
template<typename T >
T & get_base1_lhs (Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, size_t m, const char *error_msg, size_t idx)
 Return a reference to the value of the specified column vector at the specified base-one index. More...
 
template<typename T >
T & get_base1_lhs (Eigen::Matrix< T, 1, Eigen::Dynamic > &x, size_t n, const char *error_msg, size_t idx)
 Return a reference to the value of the specified row vector at the specified base-one index. More...
 
template<typename T_lp , typename T_lp_accum >
boost::math::tools::promote_args
+< T_lp, T_lp_accum >::type 
get_lp (const T_lp &lp, const stan::math::accumulator< T_lp_accum > &lp_accum)
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
head (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v, size_t n)
 Return the specified number of elements as a vector from the front of the specified vector. More...
 
template<typename T >
Eigen::Matrix< T,
+1, Eigen::Dynamic > 
head (const Eigen::Matrix< T, 1, Eigen::Dynamic > &rv, size_t n)
 Return the specified number of elements as a row vector from the front of the specified row vector. More...
 
template<typename T >
std::vector< T > head (const std::vector< T > &sv, size_t n)
 Return the specified number of elements as a standard vector from the front of the specified standard vector. More...
 
template<typename T >
void initialize (T &x, const T &v)
 
template<typename T , typename V >
boost::enable_if_c
+< boost::is_arithmetic< V >
+::value, void >::type 
initialize (T &x, V v)
 
template<typename T , int R, int C, typename V >
void initialize (Eigen::Matrix< T, R, C > &x, const V &v)
 
template<typename T , typename V >
void initialize (std::vector< T > &x, const V &v)
 
template<typename T , int R, int C>
Eigen::Matrix< T, R, C > inverse (const Eigen::Matrix< T, R, C > &m)
 Returns the inverse of the specified matrix. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
inverse_spd (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
 Returns the inverse of the specified symmetric, pos/neg-definite matrix. More...
 
template<typename T , int Rows, int Cols>
Eigen::Matrix< T, Rows, Cols > log (const Eigen::Matrix< T, Rows, Cols > &m)
 Return the element-wise logarithm of the matrix or vector. More...
 
template<typename T , int R, int C>
log_determinant (const Eigen::Matrix< T, R, C > &m)
 Returns the log absolute determinant of the specified square matrix. More...
 
template<int R, int C, typename T >
log_determinant_ldlt (stan::math::LDLT_factor< T, R, C > &A)
 
template<typename T , int R, int C>
log_determinant_spd (const Eigen::Matrix< T, R, C > &m)
 Returns the log absolute determinant of the specified square matrix. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
log_softmax (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v)
 Return the natural logarithm of the softmax of the specified vector. More...
 
template<int R, int C>
double log_sum_exp (const Eigen::Matrix< double, R, C > &x)
 Return the log of the sum of the exponentiated values of the specified matrix of values. More...
 
template<typename T >
const Eigen::Array< T,
+Eigen::Dynamic, 1 > 
make_nu (const T eta, const size_t K)
 This function calculates the degrees of freedom for the t distribution that corresponds to the shape parameter in the Lewandowski et. More...
 
int max (const std::vector< int > &x)
 Returns the maximum coefficient in the specified column vector. More...
 
template<typename T >
max (const std::vector< T > &x)
 Returns the maximum coefficient in the specified column vector. More...
 
template<typename T , int R, int C>
max (const Eigen::Matrix< T, R, C > &m)
 Returns the maximum coefficient in the specified vector, row vector, or matrix. More...
 
template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R1, C2 > 
mdivide_left (const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &b)
 Returns the solution of the system Ax=b. More...
 
template<int R1, int C1, int R2, int C2, typename T1 , typename T2 >
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R1, C2 > 
mdivide_left_ldlt (const stan::math::LDLT_factor< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &b)
 Returns the solution of the system Ax=b given an LDLT_factor of A. More...
 
template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R1, C2 > 
mdivide_left_spd (const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &b)
 Returns the solution of the system Ax=b where A is symmetric positive definite. More...
 
template<int TriView, typename T1 , typename T2 , int R1, int C1, int R2, int C2>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R1, C2 > 
mdivide_left_tri (const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &b)
 Returns the solution of the system Ax=b when A is triangular. More...
 
template<int TriView, typename T , int R1, int C1>
Eigen::Matrix< T, R1, C1 > mdivide_left_tri (const Eigen::Matrix< T, R1, C1 > &A)
 Returns the solution of the system Ax=b when A is triangular and b=I. More...
 
template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R1, C2 > 
mdivide_left_tri_low (const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &b)
 
template<typename T , int R1, int C1>
Eigen::Matrix< T, R1, C1 > mdivide_left_tri_low (const Eigen::Matrix< T, R1, C1 > &A)
 
template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R1, C2 > 
mdivide_right (const Eigen::Matrix< T1, R1, C1 > &b, const Eigen::Matrix< T2, R2, C2 > &A)
 Returns the solution of the system Ax=b. More...
 
template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R1, C2 > 
mdivide_right_ldlt (const Eigen::Matrix< T1, R1, C1 > &b, const stan::math::LDLT_factor< T2, R2, C2 > &A)
 Returns the solution of the system xA=b given an LDLT_factor of A. More...
 
template<int R1, int C1, int R2, int C2>
Eigen::Matrix< double, R1, C2 > mdivide_right_ldlt (const Eigen::Matrix< double, R1, C1 > &b, const stan::math::LDLT_factor< double, R2, C2 > &A)
 
template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R1, C2 > 
mdivide_right_spd (const Eigen::Matrix< T1, R1, C1 > &b, const Eigen::Matrix< T2, R2, C2 > &A)
 Returns the solution of the system Ax=b where A is symmetric positive definite. More...
 
template<int TriView, typename T1 , typename T2 , int R1, int C1, int R2, int C2>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R1, C2 > 
mdivide_right_tri (const Eigen::Matrix< T1, R1, C1 > &b, const Eigen::Matrix< T2, R2, C2 > &A)
 Returns the solution of the system Ax=b when A is triangular. More...
 
template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R1, C2 > 
mdivide_right_tri_low (const Eigen::Matrix< T1, R1, C1 > &b, const Eigen::Matrix< T2, R2, C2 > &A)
 Returns the solution of the system tri(A)x=b when tri(A) is a lower triangular view of the matrix A. More...
 
template<typename T >
boost::math::tools::promote_args
+< T >::type 
mean (const std::vector< T > &v)
 Returns the sample mean (i.e., average) of the coefficients in the specified standard vector. More...
 
template<typename T , int R, int C>
boost::math::tools::promote_args
+< T >::type 
mean (const Eigen::Matrix< T, R, C > &m)
 Returns the sample mean (i.e., average) of the coefficients in the specified vector, row vector, or matrix. More...
 
int min (const std::vector< int > &x)
 Returns the minimum coefficient in the specified column vector. More...
 
template<typename T >
min (const std::vector< T > &x)
 Returns the minimum coefficient in the specified column vector. More...
 
template<typename T , int R, int C>
min (const Eigen::Matrix< T, R, C > &m)
 Returns the minimum coefficient in the specified matrix, vector, or row vector. More...
 
template<typename T >
minus (const T &x)
 Returns the negation of the specified scalar or matrix. More...
 
template<int R, int C, typename T >
boost::enable_if_c
+< boost::is_arithmetic< T >
+::value, Eigen::Matrix< double,
+R, C > >::type 
multiply (const Eigen::Matrix< double, R, C > &m, T c)
 Return specified matrix multiplied by specified scalar. More...
 
template<int R, int C, typename T >
boost::enable_if_c
+< boost::is_arithmetic< T >
+::value, Eigen::Matrix< double,
+R, C > >::type 
multiply (T c, const Eigen::Matrix< double, R, C > &m)
 Return specified scalar multiplied by specified matrix. More...
 
template<int R1, int C1, int R2, int C2>
Eigen::Matrix< double, R1, C2 > multiply (const Eigen::Matrix< double, R1, C1 > &m1, const Eigen::Matrix< double, R2, C2 > &m2)
 Return the product of the specified matrices. More...
 
template<int C1, int R2>
double multiply (const Eigen::Matrix< double, 1, C1 > &rv, const Eigen::Matrix< double, R2, 1 > &v)
 Return the scalar product of the specified row vector and specified column vector. More...
 
matrix_d multiply_lower_tri_self_transpose (const matrix_d &L)
 Returns the result of multiplying the lower triangular portion of the input matrix by its own transpose. More...
 
template<typename T >
int num_elements (const T &x)
 Returns 1, the number of elements in a primitive type. More...
 
template<typename T , int R, int C>
int num_elements (const Eigen::Matrix< T, R, C > &m)
 Returns the size of the specified matrix. More...
 
template<typename T >
int num_elements (const std::vector< T > &v)
 Returns the number of elements in the specified vector. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
ordered_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x)
 Return an increasing ordered vector derived from the specified free vector. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
ordered_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, T &lp)
 Return a positive valued, increasing ordered vector derived from the specified free vector and increment the specified log probability reference with the log absolute Jacobian determinant of the transform. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
ordered_free (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y)
 Return the vector of unconstrained scalars that transform to the specified positive ordered vector. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
positive_ordered_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x)
 Return an increasing positive ordered vector derived from the specified free vector. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
positive_ordered_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, T &lp)
 Return a positive valued, increasing positive ordered vector derived from the specified free vector and increment the specified log probability reference with the log absolute Jacobian determinant of the transform. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
positive_ordered_free (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y)
 Return the vector of unconstrained scalars that transform to the specified positive ordered vector. More...
 
template<typename T >
prod (const std::vector< T > &v)
 Returns the product of the coefficients of the specified standard vector. More...
 
template<typename T , int R, int C>
prod (const Eigen::Matrix< T, R, C > &v)
 Returns the product of the coefficients of the specified column vector. More...
 
template<typename T1 , typename T2 , typename F >
common_type< T1, T2 >::type promote_common (const F &u)
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
qr_Q (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
qr_R (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
 
template<int RA, int CA, int RB, int CB, typename T >
Eigen::Matrix< T, CB, CB > quad_form (const Eigen::Matrix< T, RA, CA > &A, const Eigen::Matrix< T, RB, CB > &B)
 Compute B^T A B. More...
 
template<int RA, int CA, int RB, typename T >
quad_form (const Eigen::Matrix< T, RA, CA > &A, const Eigen::Matrix< T, RB, 1 > &B)
 
template<typename T1 , typename T2 , int R, int C>
Matrix< typename promote_args
+< T1, T2 >::type, Dynamic,
+Dynamic > 
quad_form_diag (const Matrix< T1, Dynamic, Dynamic > &mat, const Matrix< T2, R, C > &vec)
 
template<int RA, int CA, int RB, int CB, typename T >
Eigen::Matrix< T, CB, CB > quad_form_sym (const Eigen::Matrix< T, RA, CA > &A, const Eigen::Matrix< T, RB, CB > &B)
 
template<int RA, int CA, int RB, typename T >
quad_form_sym (const Eigen::Matrix< T, RA, CA > &A, const Eigen::Matrix< T, RB, 1 > &B)
 
template<typename T >
int rank (const std::vector< T > &v, int s)
 Return the number of components of v less than v[s]. More...
 
template<typename T , int R, int C>
int rank (const Eigen::Matrix< T, R, C > &v, int s)
 Return the number of components of v less than v[s]. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
read_corr_L (const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const size_t K)
 Return the Cholesky factor of the correlation matrix of the specified dimensionality corresponding to the specified canonical partial correlations. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
read_corr_L (const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const size_t K, T &log_prob)
 Return the Cholesky factor of the correlation matrix of the specified dimensionality corresponding to the specified canonical partial correlations, incrementing the specified scalar reference with the log absolute determinant of the Jacobian of the transformation. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
read_corr_matrix (const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const size_t K)
 Return the correlation matrix of the specified dimensionality corresponding to the specified canonical partial correlations. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
read_corr_matrix (const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const size_t K, T &log_prob)
 Return the correlation matrix of the specified dimensionality corresponding to the specified canonical partial correlations, incrementing the specified scalar reference with the log absolute determinant of the Jacobian of the transformation. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
read_cov_L (const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const Eigen::Array< T, Eigen::Dynamic, 1 > &sds, T &log_prob)
 This is the function that should be called prior to evaluating the density of any elliptical distribution. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
read_cov_matrix (const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const Eigen::Array< T, Eigen::Dynamic, 1 > &sds, T &log_prob)
 A generally worse alternative to call prior to evaluating the density of an elliptical distribution. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
read_cov_matrix (const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const Eigen::Array< T, Eigen::Dynamic, 1 > &sds)
 Builds a covariance matrix from CPCs and standard deviations. More...
 
template<typename T >
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T >::type, Eigen::Dynamic,
+Eigen::Dynamic > 
rep_matrix (const T &x, int m, int n)
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
rep_matrix (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v, int n)
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
rep_matrix (const Eigen::Matrix< T, 1, Eigen::Dynamic > &rv, int m)
 
template<typename T >
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T >::type, 1, Eigen::Dynamic > 
rep_row_vector (const T &x, int m)
 
template<typename T >
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T >::type, Eigen::Dynamic, 1 > 
rep_vector (const T &x, int n)
 
template<typename T >
void resize (T &x, std::vector< size_t > dims)
 Recursively resize the specified vector of vectors, which must bottom out at scalar values, Eigen vectors or Eigen matrices. More...
 
template<typename T >
Eigen::Matrix< T,
+1, Eigen::Dynamic > 
row (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m, size_t i)
 Return the specified row of the specified matrix, using start-at-1 indexing. More...
 
template<typename T , int R, int C>
int rows (const Eigen::Matrix< T, R, C > &m)
 Return the number of rows in the specified matrix, vector, or row vector. More...
 
template<int R1, int C1, int R2, int C2>
Eigen::Matrix< double, R1, 1 > rows_dot_product (const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)
 Returns the dot product of the specified vectors. More...
 
template<typename T , int R, int C>
Eigen::Matrix< T, R, 1 > rows_dot_self (const Eigen::Matrix< T, R, C > &x)
 Returns the dot product of each row of a matrix with itself. More...
 
template<typename T >
boost::math::tools::promote_args
+< T >::type 
sd (const std::vector< T > &v)
 Returns the unbiased sample standard deviation of the coefficients in the specified column vector. More...
 
template<typename T , int R, int C>
boost::math::tools::promote_args
+< T >::type 
sd (const Eigen::Matrix< T, R, C > &m)
 Returns the unbiased sample standard deviation of the coefficients in the specified vector, row vector, or matrix. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
segment (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v, size_t i, size_t n)
 Return the specified number of elements as a vector starting from the specified element - 1 of the specified vector. More...
 
template<typename T >
Eigen::Matrix< T,
+1, Eigen::Dynamic > 
segment (const Eigen::Matrix< T, 1, Eigen::Dynamic > &v, size_t i, size_t n)
 
template<typename T >
std::vector< T > segment (const std::vector< T > &sv, size_t i, size_t n)
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
simplex_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y)
 Return the simplex corresponding to the specified free vector. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
simplex_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y, T &lp)
 Return the simplex corresponding to the specified free vector and increment the specified log probability reference with the log absolute Jacobian determinant of the transform. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
simplex_free (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x)
 Return an unconstrained vector that when transformed produces the specified simplex. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
singular_values (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
 Return the vector of the singular values of the specified matrix in decreasing order of magnitude. More...
 
template<typename T >
int size (const std::vector< T > &x)
 Return the size of the specified standard vector. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
softmax (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v)
 Return the softmax of the specified vector. More...
 
template<typename T >
std::vector< T > sort_asc (std::vector< T > xs)
 Return the specified standard vector in ascending order. More...
 
template<typename T >
std::vector< T > sort_desc (std::vector< T > xs)
 Return the specified standard vector in descending order. More...
 
template<typename T , int R, int C>
Eigen::Matrix< T, R, C > sort_asc (Eigen::Matrix< T, R, C > xs)
 Return the specified eigen vector in ascending order. More...
 
template<typename T , int R, int C>
Eigen::Matrix< T, R, C > sort_desc (Eigen::Matrix< T, R, C > xs)
 Return the specified eigen vector in descending order. More...
 
template<typename C >
std::vector< int > sort_indices_asc (const C &xs)
 Return a sorted copy of the argument container in ascending order. More...
 
template<typename C >
std::vector< int > sort_indices_desc (const C &xs)
 Return a sorted copy of the argument container in ascending order. More...
 
template<int R1, int C1, int R2, int C2, typename T1 , typename T2 >
boost::math::tools::promote_args
+< T1, T2 >::type 
squared_distance (const Eigen::Matrix< T1, R1, C1 > &v1, const Eigen::Matrix< T2, R2, C2 > &v2)
 Returns the squared distance between the specified vectors. More...
 
template<typename T >
void stan_print (std::ostream *o, const T &x)
 
template<typename T >
void stan_print (std::ostream *o, const std::vector< T > &x)
 
template<typename T >
void stan_print (std::ostream *o, const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x)
 
template<typename T >
void stan_print (std::ostream *o, const Eigen::Matrix< T, 1, Eigen::Dynamic > &x)
 
template<typename T >
void stan_print (std::ostream *o, const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &x)
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
sub_col (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m, size_t i, size_t j, size_t nrows)
 Return a nrows x 1 subcolumn starting at (i-1, j-1). More...
 
template<typename T >
Eigen::Matrix< T,
+1, Eigen::Dynamic > 
sub_row (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m, size_t i, size_t j, size_t ncols)
 Return a 1 x nrows subrow starting at (i-1, j-1). More...
 
template<typename T1 , typename T2 , int R, int C>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R, C > 
subtract (const Eigen::Matrix< T1, R, C > &m1, const Eigen::Matrix< T2, R, C > &m2)
 Return the result of subtracting the second specified matrix from the first specified matrix. More...
 
template<typename T1 , typename T2 , int R, int C>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R, C > 
subtract (const T1 &c, const Eigen::Matrix< T2, R, C > &m)
 
template<typename T1 , typename T2 , int R, int C>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R, C > 
subtract (const Eigen::Matrix< T1, R, C > &m, const T2 &c)
 
template<typename T , int R, int C>
double sum (const Eigen::Matrix< T, R, C > &v)
 Returns the sum of the coefficients of the specified column vector. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
tail (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v, size_t n)
 Return the specified number of elements as a vector from the back of the specified vector. More...
 
template<typename T >
Eigen::Matrix< T,
+1, Eigen::Dynamic > 
tail (const Eigen::Matrix< T, 1, Eigen::Dynamic > &rv, size_t n)
 Return the specified number of elements as a row vector from the back of the specified row vector. More...
 
template<typename T >
std::vector< T > tail (const std::vector< T > &sv, size_t n)
 
matrix_d tcrossprod (const matrix_d &M)
 Returns the result of post-multiplying a matrix by its own transpose. More...
 
template<typename T , int R, int C>
vector< T > to_array_1d (const Matrix< T, R, C > &matrix)
 
template<typename T >
vector< T > to_array_1d (const vector< T > &x)
 
template<typename T >
vector< typename scalar_type
+< T >::type > 
to_array_1d (const vector< vector< T > > &x)
 
template<typename T >
vector< vector< T > > to_array_2d (const Matrix< T, Dynamic, Dynamic > &matrix)
 
template<typename T , int R, int C>
Matrix< T, Dynamic, Dynamic > to_matrix (Matrix< T, R, C > matrix)
 
template<typename T >
Matrix< T, Dynamic, Dynamic > to_matrix (const vector< vector< T > > &vec)
 
Matrix< double, Dynamic, Dynamic > to_matrix (const vector< vector< int > > &vec)
 
template<typename T , int R, int C>
Matrix< T, 1, Dynamic > to_row_vector (const Matrix< T, R, C > &matrix)
 
template<typename T >
Matrix< T, 1, Dynamic > to_row_vector (const vector< T > &vec)
 
Matrix< double, 1, Dynamic > to_row_vector (const vector< int > &vec)
 
template<typename T , int R, int C>
Matrix< T, Dynamic, 1 > to_vector (const Matrix< T, R, C > &matrix)
 
template<typename T >
Matrix< T, Dynamic, 1 > to_vector (const vector< T > &vec)
 
Matrix< double, Dynamic, 1 > to_vector (const vector< int > &vec)
 
template<typename T >
trace (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
 Returns the trace of the specified matrix. More...
 
template<typename T >
trace (const T &m)
 
template<typename T1 , typename T2 , typename T3 , int R1, int C1, int R2, int C2, int R3, int C3>
boost::enable_if_c
+<!stan::is_var< T1 >::value
+&&!stan::is_var< T2 >::value
+&&!stan::is_var< T3 >::value,
+typename
+boost::math::tools::promote_args
+< T1, T2, T3 >::type >::type 
trace_gen_inv_quad_form_ldlt (const Eigen::Matrix< T1, R1, C1 > &D, const stan::math::LDLT_factor< T2, R2, C2 > &A, const Eigen::Matrix< T3, R3, C3 > &B)
 
template<int RD, int CD, int RA, int CA, int RB, int CB>
double trace_gen_quad_form (const Eigen::Matrix< double, RD, CD > &D, const Eigen::Matrix< double, RA, CA > &A, const Eigen::Matrix< double, RB, CB > &B)
 Compute trace(D B^T A B). More...
 
template<typename T1 , typename T2 , int R2, int C2, int R3, int C3>
boost::enable_if_c
+<!stan::is_var< T1 >::value
+&&!stan::is_var< T2 >::value,
+typename
+boost::math::tools::promote_args
+< T1, T2 >::type >::type 
trace_inv_quad_form_ldlt (const stan::math::LDLT_factor< T1, R2, C2 > &A, const Eigen::Matrix< T2, R3, C3 > &B)
 
template<int RA, int CA, int RB, int CB>
double trace_quad_form (const Eigen::Matrix< double, RA, CA > &A, const Eigen::Matrix< double, RB, CB > &B)
 Compute trace(B^T A B). More...
 
template<typename T , int R, int C>
Eigen::Matrix< T, C, R > transpose (const Eigen::Matrix< T, R, C > &m)
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
unit_vector_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y)
 Return the unit length vector corresponding to the free vector y. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
unit_vector_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y, T &lp)
 Return the unit length vector corresponding to the free vector y. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
unit_vector_free (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x)
 
template<typename T , int R, int C>
Eigen::Matrix< typename
+child_type< T >::type, R, C > 
value_of (const Eigen::Matrix< T, R, C > &M)
 Convert a matrix of type T to a matrix of doubles. More...
 
template<typename T , int R, int C>
Eigen::Matrix< double, R, C > value_of_rec (const Eigen::Matrix< T, R, C > &M)
 Convert a matrix of type T to a matrix of doubles. More...
 
template<typename T >
boost::math::tools::promote_args
+< T >::type 
variance (const std::vector< T > &v)
 Returns the sample variance (divide by length - 1) of the coefficients in the specified standard vector. More...
 
template<typename T , int R, int C>
boost::math::tools::promote_args
+< T >::type 
variance (const Eigen::Matrix< T, R, C > &m)
 Returns the sample variance (divide by length - 1) of the coefficients in the specified column vector. More...
 
template<typename F >
void finite_diff_gradient (const F &f, const Eigen::Matrix< double,-1, 1 > &x, double &fx, Eigen::Matrix< double,-1, 1 > &grad_fx, const double epsilon=1e-03)
 Calculate the value and the gradient of the specified function at the specified argument using finite difference. More...
 
template<typename F >
double finite_diff_hess_helper (const F &f, const Eigen::Matrix< double, Eigen::Dynamic, 1 > &x, const int lambda, const double epsilon=1e-03)
 
template<typename F >
void finite_diff_hessian (const F &f, const Eigen::Matrix< double,-1, 1 > &x, double &fx, Eigen::Matrix< double,-1, 1 > &grad_fx, Eigen::Matrix< double,-1,-1 > &hess_fx, const double epsilon=1e-03)
 Calculate the value and the Hessian of the specified function at the specified argument using second-order finite difference. More...
 
template<bool propto, typename T_prob >
boost::math::tools::promote_args
+< T_prob >::type 
categorical_log (int n, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)
 
template<typename T_prob >
boost::math::tools::promote_args
+< T_prob >::type 
categorical_log (const typename math::index_type< Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > >::type n, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)
 
template<bool propto, typename T_prob >
boost::math::tools::promote_args
+< T_prob >::type 
categorical_log (const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)
 
template<typename T_prob >
boost::math::tools::promote_args
+< T_prob >::type 
categorical_log (const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)
 
template<bool propto, typename T_prob >
boost::math::tools::promote_args
+< T_prob >::type 
categorical_logit_log (int n, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &beta)
 
template<typename T_prob >
boost::math::tools::promote_args
+< T_prob >::type 
categorical_logit_log (int n, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &beta)
 
template<bool propto, typename T_prob >
boost::math::tools::promote_args
+< T_prob >::type 
categorical_logit_log (const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &beta)
 
template<typename T_prob >
boost::math::tools::promote_args
+< T_prob >::type 
categorical_logit_log (const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &beta)
 
template<class RNG >
int categorical_rng (const Eigen::Matrix< double, Eigen::Dynamic, 1 > &theta, RNG &rng)
 
template<bool propto, typename T_prob , typename T_prior_sample_size >
boost::math::tools::promote_args
+< T_prob, T_prior_sample_size >
+::type 
dirichlet_log (const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta, const Eigen::Matrix< T_prior_sample_size, Eigen::Dynamic, 1 > &alpha)
 The log of the Dirichlet density for the given theta and a vector of prior sample sizes, alpha. More...
 
template<typename T_prob , typename T_prior_sample_size >
boost::math::tools::promote_args
+< T_prob, T_prior_sample_size >
+::type 
dirichlet_log (const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta, const Eigen::Matrix< T_prior_sample_size, Eigen::Dynamic, 1 > &alpha)
 
template<class RNG >
Eigen::VectorXd dirichlet_rng (const Eigen::Matrix< double, Eigen::Dynamic, 1 > &alpha, RNG &rng)
 Return a draw from a Dirichlet distribution with specified parameters and pseudo-random number generator. More...
 
template<bool propto, typename T_y , typename T_F , typename T_G , typename T_V , typename T_W , typename T_m0 , typename T_C0 >
return_type< T_y, typename
+return_type< T_F, T_G, T_V,
+T_W, T_m0, T_C0 >::type >
+::type 
gaussian_dlm_obs_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_F, Eigen::Dynamic, Eigen::Dynamic > &F, const Eigen::Matrix< T_G, Eigen::Dynamic, Eigen::Dynamic > &G, const Eigen::Matrix< T_V, Eigen::Dynamic, Eigen::Dynamic > &V, const Eigen::Matrix< T_W, Eigen::Dynamic, Eigen::Dynamic > &W, const Eigen::Matrix< T_m0, Eigen::Dynamic, 1 > &m0, const Eigen::Matrix< T_C0, Eigen::Dynamic, Eigen::Dynamic > &C0)
 The log of a Gaussian dynamic linear model (GDLM). More...
 
template<typename T_y , typename T_F , typename T_G , typename T_V , typename T_W , typename T_m0 , typename T_C0 >
return_type< T_y, typename
+return_type< T_F, T_G, T_V,
+T_W, T_m0, T_C0 >::type >
+::type 
gaussian_dlm_obs_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_F, Eigen::Dynamic, Eigen::Dynamic > &F, const Eigen::Matrix< T_G, Eigen::Dynamic, Eigen::Dynamic > &G, const Eigen::Matrix< T_V, Eigen::Dynamic, Eigen::Dynamic > &V, const Eigen::Matrix< T_W, Eigen::Dynamic, Eigen::Dynamic > &W, const Eigen::Matrix< T_m0, Eigen::Dynamic, 1 > &m0, const Eigen::Matrix< T_C0, Eigen::Dynamic, Eigen::Dynamic > &C0)
 
template<bool propto, typename T_y , typename T_F , typename T_G , typename T_V , typename T_W , typename T_m0 , typename T_C0 >
return_type< T_y, typename
+return_type< T_F, T_G, T_V,
+T_W, T_m0, T_C0 >::type >
+::type 
gaussian_dlm_obs_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_F, Eigen::Dynamic, Eigen::Dynamic > &F, const Eigen::Matrix< T_G, Eigen::Dynamic, Eigen::Dynamic > &G, const Eigen::Matrix< T_V, Eigen::Dynamic, 1 > &V, const Eigen::Matrix< T_W, Eigen::Dynamic, Eigen::Dynamic > &W, const Eigen::Matrix< T_m0, Eigen::Dynamic, 1 > &m0, const Eigen::Matrix< T_C0, Eigen::Dynamic, Eigen::Dynamic > &C0)
 The log of a Gaussian dynamic linear model (GDLM) with uncorrelated observation disturbances. More...
 
template<typename T_y , typename T_F , typename T_G , typename T_V , typename T_W , typename T_m0 , typename T_C0 >
return_type< T_y, typename
+return_type< T_F, T_G, T_V,
+T_W, T_m0, T_C0 >::type >
+::type 
gaussian_dlm_obs_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_F, Eigen::Dynamic, Eigen::Dynamic > &F, const Eigen::Matrix< T_G, Eigen::Dynamic, Eigen::Dynamic > &G, const Eigen::Matrix< T_V, Eigen::Dynamic, 1 > &V, const Eigen::Matrix< T_W, Eigen::Dynamic, Eigen::Dynamic > &W, const Eigen::Matrix< T_m0, Eigen::Dynamic, 1 > &m0, const Eigen::Matrix< T_C0, Eigen::Dynamic, Eigen::Dynamic > &C0)
 
template<bool propto, typename T_y , typename T_dof , typename T_scale >
boost::math::tools::promote_args
+< T_y, T_dof, T_scale >::type 
inv_wishart_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &W, const T_dof &nu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &S)
 The log of the Inverse-Wishart density for the given W, degrees of freedom, and scale matrix. More...
 
template<typename T_y , typename T_dof , typename T_scale >
boost::math::tools::promote_args
+< T_y, T_dof, T_scale >::type 
inv_wishart_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &W, const T_dof &nu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &S)
 
template<class RNG >
Eigen::Matrix< double,
+Eigen::Dynamic, Eigen::Dynamic > 
inv_wishart_rng (const double nu, const Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > &S, RNG &rng)
 
template<bool propto, typename T_covar , typename T_shape >
boost::math::tools::promote_args
+< T_covar, T_shape >::type 
lkj_corr_cholesky_log (const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L, const T_shape &eta)
 
template<typename T_covar , typename T_shape >
boost::math::tools::promote_args
+< T_covar, T_shape >::type 
lkj_corr_cholesky_log (const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L, const T_shape &eta)
 
template<class RNG >
Eigen::MatrixXd lkj_corr_cholesky_rng (const size_t K, const double eta, RNG &rng)
 
template<typename T_shape >
T_shape do_lkj_constant (const T_shape &eta, const unsigned int &K)
 
template<bool propto, typename T_y , typename T_shape >
boost::math::tools::promote_args
+< T_y, T_shape >::type 
lkj_corr_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const T_shape &eta)
 
template<typename T_y , typename T_shape >
boost::math::tools::promote_args
+< T_y, T_shape >::type 
lkj_corr_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const T_shape &eta)
 
template<class RNG >
Eigen::MatrixXd lkj_corr_rng (const size_t K, const double eta, RNG &rng)
 
template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_shape >
boost::math::tools::promote_args
+< T_y, T_loc, T_scale, T_shape >
+::type 
lkj_cov_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_scale, Eigen::Dynamic, 1 > &sigma, const T_shape &eta)
 
template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
boost::math::tools::promote_args
+< T_y, T_loc, T_scale, T_shape >
+::type 
lkj_cov_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_scale, Eigen::Dynamic, 1 > &sigma, const T_shape &eta)
 
template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_shape >
boost::math::tools::promote_args
+< T_y, T_loc, T_scale, T_shape >
+::type 
lkj_cov_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const T_loc &mu, const T_scale &sigma, const T_shape &eta)
 
template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
boost::math::tools::promote_args
+< T_y, T_loc, T_scale, T_shape >
+::type 
lkj_cov_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const T_loc &mu, const T_scale &sigma, const T_shape &eta)
 
template<bool propto, typename T_y , typename T_Mu , typename T_Sigma , typename T_D >
boost::math::tools::promote_args
+< T_y, T_Mu, T_Sigma, T_D >
+::type 
matrix_normal_prec_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_Mu, Eigen::Dynamic, Eigen::Dynamic > &Mu, const Eigen::Matrix< T_Sigma, Eigen::Dynamic, Eigen::Dynamic > &Sigma, const Eigen::Matrix< T_D, Eigen::Dynamic, Eigen::Dynamic > &D)
 The log of the matrix normal density for the given y, mu, Sigma and D where Sigma and D are given as precision matrices, not covariance matrices. More...
 
template<typename T_y , typename T_Mu , typename T_Sigma , typename T_D >
boost::math::tools::promote_args
+< T_y, T_Mu, T_Sigma, T_D >
+::type 
matrix_normal_prec_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_Mu, Eigen::Dynamic, Eigen::Dynamic > &Mu, const Eigen::Matrix< T_Sigma, Eigen::Dynamic, Eigen::Dynamic > &Sigma, const Eigen::Matrix< T_D, Eigen::Dynamic, Eigen::Dynamic > &D)
 
template<bool propto, typename T_y , typename T_covar , typename T_w >
boost::math::tools::promote_args
+< T_y, T_covar, T_w >::type 
multi_gp_cholesky_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L, const Eigen::Matrix< T_w, Eigen::Dynamic, 1 > &w)
 The log of a multivariate Gaussian Process for the given y, w, and a Cholesky factor L of the kernel matrix Sigma. More...
 
template<typename T_y , typename T_covar , typename T_w >
boost::math::tools::promote_args
+< T_y, T_covar, T_w >::type 
multi_gp_cholesky_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L, const Eigen::Matrix< T_w, Eigen::Dynamic, 1 > &w)
 
template<bool propto, typename T_y , typename T_covar , typename T_w >
boost::math::tools::promote_args
+< T_y, T_covar, T_w >::type 
multi_gp_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &Sigma, const Eigen::Matrix< T_w, Eigen::Dynamic, 1 > &w)
 The log of a multivariate Gaussian Process for the given y, Sigma, and w. More...
 
template<typename T_y , typename T_covar , typename T_w >
boost::math::tools::promote_args
+< T_y, T_covar, T_w >::type 
multi_gp_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &Sigma, const Eigen::Matrix< T_w, Eigen::Dynamic, 1 > &w)
 
template<bool propto, typename T_y , typename T_loc , typename T_covar >
return_type< T_y, T_loc,
+T_covar >::type 
multi_normal_cholesky_log (const T_y &y, const T_loc &mu, const T_covar &L)
 The log of the multivariate normal density for the given y, mu, and a Cholesky factor L of the variance matrix. More...
 
template<typename T_y , typename T_loc , typename T_covar >
return_type< T_y, T_loc,
+T_covar >::type 
multi_normal_cholesky_log (const T_y &y, const T_loc &mu, const T_covar &L)
 
template<class RNG >
Eigen::VectorXd multi_normal_cholesky_rng (const Eigen::Matrix< double, Dynamic, 1 > &mu, const Eigen::Matrix< double, Dynamic, Dynamic > &S, RNG &rng)
 
template<bool propto, typename T_y , typename T_loc , typename T_covar >
return_type< T_y, T_loc,
+T_covar >::type 
multi_normal_log (const T_y &y, const T_loc &mu, const T_covar &Sigma)
 
template<typename T_y , typename T_loc , typename T_covar >
return_type< T_y, T_loc,
+T_covar >::type 
multi_normal_log (const T_y &y, const T_loc &mu, const T_covar &Sigma)
 
template<bool propto, typename T_y , typename T_loc , typename T_covar >
return_type< T_y, T_loc,
+T_covar >::type 
multi_normal_prec_log (const T_y &y, const T_loc &mu, const T_covar &Sigma)
 
template<typename T_y , typename T_loc , typename T_covar >
return_type< T_y, T_loc,
+T_covar >::type 
multi_normal_prec_log (const T_y &y, const T_loc &mu, const T_covar &Sigma)
 
template<class RNG >
Eigen::VectorXd multi_normal_rng (const Eigen::Matrix< double, Dynamic, 1 > &mu, const Eigen::Matrix< double, Dynamic, Dynamic > &S, RNG &rng)
 
template<bool propto, typename T_y , typename T_dof , typename T_loc , typename T_scale >
return_type< T_y, T_dof, T_loc,
+T_scale >::type 
multi_student_t_log (const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &Sigma)
 Return the log of the multivariate Student t distribution at the specified arguments. More...
 
template<typename T_y , typename T_dof , typename T_loc , typename T_scale >
return_type< T_y, T_dof, T_loc,
+T_scale >::type 
multi_student_t_log (const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &Sigma)
 
template<class RNG >
Eigen::VectorXd multi_student_t_rng (const double nu, const Eigen::Matrix< double, Dynamic, 1 > &mu, const Eigen::Matrix< double, Dynamic, Dynamic > &s, RNG &rng)
 
template<bool propto, typename T_prob >
boost::math::tools::promote_args
+< T_prob >::type 
multinomial_log (const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)
 
template<typename T_prob >
boost::math::tools::promote_args
+< T_prob >::type 
multinomial_log (const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)
 
template<class RNG >
std::vector< int > multinomial_rng (const Eigen::Matrix< double, Eigen::Dynamic, 1 > &theta, const int N, RNG &rng)
 
template<typename T >
log_inv_logit_diff (const T &alpha, const T &beta)
 
template<bool propto, typename T_lambda , typename T_cut >
boost::math::tools::promote_args
+< T_lambda, T_cut >::type 
ordered_logistic_log (int y, const T_lambda &lambda, const Eigen::Matrix< T_cut, Eigen::Dynamic, 1 > &c)
 Returns the (natural) log probability of the specified integer outcome given the continuous location and specified cutpoints in an ordered logistic model. More...
 
template<typename T_lambda , typename T_cut >
boost::math::tools::promote_args
+< T_lambda, T_cut >::type 
ordered_logistic_log (int y, const T_lambda &lambda, const Eigen::Matrix< T_cut, Eigen::Dynamic, 1 > &c)
 
template<class RNG >
int ordered_logistic_rng (const double eta, const Eigen::Matrix< double, Eigen::Dynamic, 1 > &c, RNG &rng)
 
template<bool propto, typename T_y , typename T_dof , typename T_scale >
boost::math::tools::promote_args
+< T_y, T_dof, T_scale >::type 
wishart_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &W, const T_dof &nu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &S)
 The log of the Wishart density for the given W, degrees of freedom, and scale matrix. More...
 
template<typename T_y , typename T_dof , typename T_scale >
boost::math::tools::promote_args
+< T_y, T_dof, T_scale >::type 
wishart_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &W, const T_dof &nu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &S)
 
template<class RNG >
Eigen::Matrix< double,
+Eigen::Dynamic, Eigen::Dynamic > 
wishart_rng (const double nu, const Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > &S, RNG &rng)
 
template<typename T_y , typename T_low , typename T_high >
bool check_bounded (const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)
 Return true if the value is between the low and high values, inclusively. More...
 
template<typename T >
bool check_consistent_size (const char *function, const char *name, const T &x, size_t expected_size)
 Return true if the dimension of x is consistent, which is defined to be expected_size if x is a vector or 1 if x is not a vector. More...
 
template<typename T1 , typename T2 >
bool check_consistent_sizes (const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
 Return true if the dimension of x1 is consistent with x2. More...
 
template<typename T1 , typename T2 , typename T3 >
bool check_consistent_sizes (const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2, const char *name3, const T3 &x3)
 Return true if the dimension of x1, x2, and x3 are consistent. More...
 
template<typename T1 , typename T2 , typename T3 , typename T4 >
bool check_consistent_sizes (const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2, const char *name3, const T3 &x3, const char *name4, const T4 &x4)
 Return true if the dimension of x1, x2, x3, and x4 are consistent. More...
 
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
bool check_consistent_sizes (const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2, const char *name3, const T3 &x3, const char *name4, const T4 &x4, const char *name5, const T5 &x5)
 
template<typename T_y , typename T_eq >
bool check_equal (const char *function, const char *name, const T_y &y, const T_eq &eq)
 Return true if y is equal to eq. More...
 
template<typename T_y >
bool check_finite (const char *function, const char *name, const T_y &y)
 Return true if y is finite. More...
 
template<typename T_y , typename T_low >
bool check_greater (const char *function, const char *name, const T_y &y, const T_low &low)
 Return true if y is strictly greater than low. More...
 
template<typename T_y , typename T_low >
bool check_greater_or_equal (const char *function, const char *name, const T_y &y, const T_low &low)
 Return true if y is greater or equal than low. More...
 
template<typename T_y , typename T_high >
bool check_less (const char *function, const char *name, const T_y &y, const T_high &high)
 Return true if y is strictly less than high. More...
 
template<typename T_y , typename T_high >
bool check_less_or_equal (const char *function, const char *name, const T_y &y, const T_high &high)
 Return true if y is less or equal to high. More...
 
template<typename T_y >
bool check_nonnegative (const char *function, const char *name, const T_y &y)
 Return true if y is non-negative. More...
 
template<typename T_y >
bool check_nonzero_size (const char *function, const char *name, const T_y &y)
 Return true if the specified matrix/vector is of non-zero size. More...
 
template<typename T_y >
bool check_not_nan (const char *function, const char *name, const T_y &y)
 Return true if y is not NaN. More...
 
template<typename T_y >
bool check_positive (const char *function, const char *name, const T_y &y)
 Return true if y is positive. More...
 
template<typename T_y >
bool check_positive_finite (const char *function, const char *name, const T_y &y)
 Return true if y is positive and finite. More...
 
bool check_positive_size (const char *function, const char *name, const char *expr, const int size)
 Return true if size is positive. More...
 
template<typename T_size1 , typename T_size2 >
bool check_size_match (const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
 Return true if the provided sizes match. More...
 
template<typename T_size1 , typename T_size2 >
bool check_size_match (const char *function, const char *expr_i, const char *name_i, T_size1 i, const char *expr_j, const char *name_j, T_size2 j)
 Return true if the provided sizes match. More...
 
template<typename T >
void domain_error (const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
 Throw a domain error with a consistently formatted message. More...
 
template<typename T >
void domain_error (const char *function, const char *name, const T &y, const char *msg1)
 Throw a domain error with a consistently formatted message. More...
 
template<typename T >
void domain_error_vec (const char *function, const char *name, const T &y, const size_t i, const char *msg1, const char *msg2)
 Throw a domain error with a consistently formatted message. More...
 
template<typename T >
void domain_error_vec (const char *function, const char *name, const T &y, const size_t i, const char *msg)
 Throw a domain error with a consistently formatted message. More...
 
template<typename T >
void invalid_argument (const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
 Throw an invalid_argument exception with a consistently formatted message. More...
 
template<typename T >
void invalid_argument (const char *function, const char *name, const T &y, const char *msg1)
 Throw an invalid_argument exception with a consistently formatted message. More...
 
template<typename T >
void invalid_argument_vec (const char *function, const char *name, const T &y, const size_t i, const char *msg1, const char *msg2)
 Throw an invalid argument exception with a consistently formatted message. More...
 
template<typename T >
void invalid_argument_vec (const char *function, const char *name, const T &y, const size_t i, const char *msg)
 Throw an invalid argument exception with a consistently formatted message. More...
 
void out_of_range (const char *function, const int max, const int index, const char *msg1="", const char *msg2="")
 Throw an out_of_range exception with a consistently formatted message. More...
 
double abs (double x)
 Return floating-point absolute value. More...
 
template<typename T >
bool as_bool (const T x)
 Return 1 if the argument is unequal to zero and 0 otherwise. More...
 
template<typename T2 >
T2 bessel_first_kind (const int v, const T2 z)
 

+\[ \mbox{bessel\_first\_kind}(v, x) = \begin{cases} J_v(x) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{error} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+ More...
 
template<typename T2 >
T2 bessel_second_kind (const int v, const T2 z)
 

+\[ \mbox{bessel\_second\_kind}(v, x) = \begin{cases} \textrm{error} & \mbox{if } x \leq 0 \\ Y_v(x) & \mbox{if } x > 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+ More...
 
template<typename T >
boost::math::tools::promote_args
+< T >::type 
binary_log_loss (const int y, const T y_hat)
 Returns the log loss function for binary classification with specified reference and response values. More...
 
template<typename T_N , typename T_n >
boost::math::tools::promote_args
+< T_N, T_n >::type 
binomial_coefficient_log (const T_N N, const T_n n)
 Return the log of the binomial coefficient for the specified arguments. More...
 
double pi ()
 Return the value of pi. More...
 
double e ()
 Return the base of the natural logarithm. More...
 
double sqrt2 ()
 Return the square root of two. More...
 
double log10 ()
 Return natural logarithm of ten. More...
 
double positive_infinity ()
 Return positive infinity. More...
 
double negative_infinity ()
 Return negative infinity. More...
 
double not_a_number ()
 Return (quiet) not-a-number. More...
 
double machine_precision ()
 Returns the difference between 1.0 and the next value representable. More...
 
template<typename T >
corr_constrain (const T x)
 Return the result of transforming the specified scalar to have a valid correlation value between -1 and 1 (inclusive). More...
 
template<typename T >
corr_constrain (const T x, T &lp)
 Return the result of transforming the specified scalar to have a valid correlation value between -1 and 1 (inclusive). More...
 
template<typename T >
corr_free (const T y)
 Return the unconstrained scalar that when transformed to a valid correlation produces the specified value. More...
 
double digamma (double x)
 

+\[ \mbox{digamma}(x) = \begin{cases} \textrm{error} & \mbox{if } x\in \{\dots, -3, -2, -1, 0\}\\ \Psi(x) & \mbox{if } x\not\in \{\dots, -3, -2, -1, 0\}\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+ More...
 
int divide (const int x, const int y)
 
template<typename T >
boost::math::tools::promote_args
+< T >::type 
exp2 (const T y)
 Return the exponent base 2 of the specified argument (C99). More...
 
template<typename T >
F32 (T a, T b, T c, T d, T e, T z, T precision=1e-6)
 
template<typename T1 , typename T2 >
boost::math::tools::promote_args
+< T1, T2 >::type 
falling_factorial (const T1 x, const T2 n)
 

+\[ \mbox{falling\_factorial}(x, n) = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ (x)_n & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +

+ More...
 
template<typename T1 , typename T2 >
boost::math::tools::promote_args
+< T1, T2 >::type 
fdim (T1 a, T2 b)
 The positive difference function (C99). More...
 
double gamma_p (double x, double a)
 

+\[ \mbox{gamma\_p}(a, z) = \begin{cases} \textrm{error} & \mbox{if } a\leq 0 \textrm{ or } z < 0\\ P(a, z) & \mbox{if } a > 0, z \geq 0 \\[6pt] \textrm{NaN} & \mbox{if } a = \textrm{NaN or } z = \textrm{NaN} \end{cases} \] +

+ More...
 
double gamma_q (double x, double a)
 

+\[ \mbox{gamma\_q}(a, z) = \begin{cases} \textrm{error} & \mbox{if } a\leq 0 \textrm{ or } z < 0\\ Q(a, z) & \mbox{if } a > 0, z \geq 0 \\[6pt] \textrm{NaN} & \mbox{if } a = \textrm{NaN or } z = \textrm{NaN} \end{cases} \] +

+ More...
 
template<typename T >
void grad_2F1 (T &gradA, T &gradC, T a, T b, T c, T z, T precision=1e-6)
 
template<typename T >
void grad_F32 (T *g, T a, T b, T c, T d, T e, T z, T precision=1e-6)
 
void grad_inc_beta (double &g1, double &g2, double a, double b, double z)
 
template<typename T >
void grad_reg_inc_beta (T &g1, T &g2, T a, T b, T z, T digammaA, T digammaB, T digammaSum, T betaAB)
 
template<typename T >
grad_reg_inc_gamma (T a, T z, T g, T dig, T precision=1e-6)
 
double ibeta (const double a, const double b, const double x)
 The normalized incomplete beta function of a, b, and x. More...
 
template<typename T >
identity_constrain (T x)
 Returns the result of applying the identity constraint transform to the input. More...
 
template<typename T >
identity_constrain (const T x, T &)
 Returns the result of applying the identity constraint transform to the input and increments the log probability reference with the log absolute Jacobian determinant. More...
 
template<typename T >
identity_free (const T y)
 Returns the result of applying the inverse of the identity constraint transform to the input. More...
 
template<typename T_true , typename T_false >
boost::math::tools::promote_args
+< T_true, T_false >::type 
if_else (const bool c, const T_true y_true, const T_false y_false)
 Return the second argument if the first argument is true and otherwise return the second argument. More...
 
double inc_beta (const double &a, const double &b, const double &x)
 
template<typename T >
inc_beta_ddb (T a, T b, T z, T digamma_b, T digamma_ab)
 Returns the partial derivative of the regularized incomplete beta function, I_{z}(a, b) with respect to b. More...
 
template<typename T >
inc_beta_dda (T a, T b, T z, T digamma_a, T digamma_ab)
 Returns the partial derivative of the regularized incomplete beta function, I_{z}(a, b) with respect to a. More...
 
template<typename T >
inc_beta_ddz (T a, T b, T z)
 Returns the partial derivative of the regularized incomplete beta function, I_{z}(a, b) with respect to z. More...
 
template<>
double inc_beta_ddz (double a, double b, double z)
 
template<typename T >
unsigned int int_step (const T y)
 The integer step, or Heaviside, function. More...
 
template<typename T >
boost::math::tools::promote_args
+< T >::type 
inv (const T x)
 
template<typename T >
boost::math::tools::promote_args
+< T >::type 
inv_cloglog (T x)
 The inverse complementary log-log function. More...
 
template<typename T >
boost::math::tools::promote_args
+< T >::type 
inv_logit (const T a)
 Returns the inverse logit function applied to the argument. More...
 
double inv_Phi (double p)
 The inverse of the unit normal cumulative distribution function. More...
 
template<typename T >
boost::math::tools::promote_args
+< T >::type 
inv_sqrt (const T x)
 
template<typename T >
boost::math::tools::promote_args
+< T >::type 
inv_square (const T x)
 
template<typename Vector >
void inverse_softmax (const Vector &simplex, Vector &y)
 Writes the inverse softmax of the simplex argument into the second argument. More...
 
int is_inf (const double x)
 Returns 1 if the input is infinite and 0 otherwise. More...
 
bool is_nan (double x)
 Returns 1 if the input is NaN and 0 otherwise. More...
 
template<typename T >
bool is_uninitialized (T x)
 Returns true if the specified variable is uninitialized. More...
 
template<typename T , typename TL >
lb_constrain (const T x, const TL lb)
 Return the lower-bounded value for the specified unconstrained input and specified lower bound. More...
 
template<typename T , typename TL >
boost::math::tools::promote_args
+< T, TL >::type 
lb_constrain (const T x, const TL lb, T &lp)
 Return the lower-bounded value for the speicifed unconstrained input and specified lower bound, incrementing the specified reference with the log absolute Jacobian determinant of the transform. More...
 
template<typename T , typename TL >
boost::math::tools::promote_args
+< T, TL >::type 
lb_free (const T y, const TL lb)
 Return the unconstrained value that produces the specified lower-bound constrained value. More...
 
template<typename T1 , typename T2 >
boost::math::tools::promote_args
+< T1, T2 >::type 
lbeta (const T1 a, const T2 b)
 Return the log of the beta function applied to the specified arguments. More...
 
double lgamma (double x)
 

+\[ \mbox{lgamma}(x) = \begin{cases} \textrm{error} & \mbox{if } x\in \{\dots, -3, -2, -1, 0\}\\ \ln\Gamma(x) & \mbox{if } x\not\in \{\dots, -3, -2, -1, 0\}\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+ More...
 
template<typename T >
boost::math::tools::promote_args
+< T >::type 
lmgamma (const int k, T x)
 Return the natural logarithm of the multivariate gamma function with the speciifed dimensions and argument. More...
 
template<typename T >
boost::math::tools::promote_args
+< T >::type 
log1m (T x)
 Return the natural logarithm of one minus the specified value. More...
 
template<typename T >
boost::math::tools::promote_args
+< T >::type 
log1m_exp (const T a)
 Calculates the log of 1 minus the exponential of the specified value without overflow log1m_exp(x) = log(1-exp(x)). More...
 
template<typename T >
boost::math::tools::promote_args
+< T >::type 
log1m_inv_logit (const T u)
 Returns the natural logarithm of 1 minus the inverse logit of the specified argument. More...
 
template<typename T >
boost::math::tools::promote_args
+< T >::type 
log1p (const T x)
 Return the natural logarithm of one plus the specified value. More...
 
template<typename T >
boost::math::tools::promote_args
+< T >::type 
log1p_exp (const T a)
 Calculates the log of 1 plus the exponential of the specified value without overflow. More...
 
template<typename T >
boost::math::tools::promote_args
+< T >::type 
log2 (const T a)
 Returns the base 2 logarithm of the argument (C99). More...
 
double log2 ()
 Return natural logarithm of two. More...
 
template<typename T1 , typename T2 >
boost::math::tools::promote_args
+< T1, T2 >::type 
log_diff_exp (const T1 x, const T2 y)
 The natural logarithm of the difference of the natural exponentiation of x1 and the natural exponentiation of x2. More...
 
template<typename T1 , typename T2 >
boost::math::tools::promote_args
+< T1, T2 >::type 
log_falling_factorial (const T1 x, const T2 n)
 

+\[ \mbox{log\_falling\_factorial}(x, n) = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ \ln (x)_n & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +

+ More...
 
template<typename T >
boost::math::tools::promote_args
+< T >::type 
log_inv_logit (const T &u)
 Returns the natural logarithm of the inverse logit of the specified argument. More...
 
double log_mix (double theta, double lambda1, double lambda2)
 Return the log mixture density with specified mixing proportion and log densities. More...
 
template<typename T1 , typename T2 >
boost::math::tools::promote_args
+< T1, T2 >::type 
log_rising_factorial (const T1 x, const T2 n)
 

+\[ \mbox{log\_rising\_factorial}(x, n) = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ \ln x^{(n)} & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +

+ More...
 
template<typename T1 , typename T2 >
boost::math::tools::promote_args
+< T1, T2 >::type 
log_sum_exp (const T2 &a, const T1 &b)
 Calculates the log sum of exponetials without overflow. More...
 
template<typename T1 , typename T2 >
int logical_and (const T1 x1, const T2 x2)
 The logical and function which returns 1 if both arguments are unequal to zero and 0 otherwise. More...
 
template<typename T1 , typename T2 >
int logical_eq (const T1 x1, const T2 x2)
 Return 1 if the first argument is equal to the second. More...
 
template<typename T1 , typename T2 >
int logical_gt (const T1 x1, const T2 x2)
 Return 1 if the first argument is strictly greater than the second. More...
 
template<typename T1 , typename T2 >
int logical_gte (const T1 x1, const T2 x2)
 Return 1 if the first argument is greater than or equal to the second. More...
 
template<typename T1 , typename T2 >
int logical_lt (T1 x1, T2 x2)
 Return 1 if the first argument is strictly less than the second. More...
 
template<typename T1 , typename T2 >
int logical_lte (const T1 x1, const T2 x2)
 Return 1 if the first argument is less than or equal to the second. More...
 
template<typename T >
int logical_negation (const T x)
 The logical negation function which returns 1 if the input is equal to zero and 0 otherwise. More...
 
template<typename T1 , typename T2 >
int logical_neq (const T1 x1, const T2 x2)
 Return 1 if the first argument is unequal to the second. More...
 
template<typename T1 , typename T2 >
int logical_or (T1 x1, T2 x2)
 The logical or function which returns 1 if either argument is unequal to zero and 0 otherwise. More...
 
template<typename T >
boost::math::tools::promote_args
+< T >::type 
logit (const T a)
 Returns the logit function applied to the argument. More...
 
template<typename T , typename TL , typename TU >
boost::math::tools::promote_args
+< T, TL, TU >::type 
lub_constrain (const T x, TL lb, TU ub)
 Return the lower- and upper-bounded scalar derived by transforming the specified free scalar given the specified lower and upper bounds. More...
 
template<typename T , typename TL , typename TU >
boost::math::tools::promote_args
+< T, TL, TU >::type 
lub_constrain (const T x, const TL lb, const TU ub, T &lp)
 Return the lower- and upper-bounded scalar derived by transforming the specified free scalar given the specified lower and upper bounds and increment the specified log probability with the log absolute Jacobian determinant. More...
 
template<typename T , typename TL , typename TU >
boost::math::tools::promote_args
+< T, TL, TU >::type 
lub_free (const T y, TL lb, TU ub)
 Return the unconstrained scalar that transforms to the specified lower- and upper-bounded scalar given the specified bounds. More...
 
template<typename T2 >
T2 modified_bessel_first_kind (const int v, const T2 z)
 

+\[ \mbox{modified\_bessel\_first\_kind}(v, z) = \begin{cases} I_v(z) & \mbox{if } -\infty\leq z \leq \infty \\[6pt] \textrm{error} & \mbox{if } z = \textrm{NaN} \end{cases} \] +

+ More...
 
template<typename T2 >
T2 modified_bessel_second_kind (const int v, const T2 z)
 

+\[ \mbox{modified\_bessel\_second\_kind}(v, z) = \begin{cases} \textrm{error} & \mbox{if } z \leq 0 \\ K_v(z) & \mbox{if } z > 0 \\[6pt] \textrm{NaN} & \mbox{if } z = \textrm{NaN} \end{cases} \] +

+ More...
 
int modulus (const int x, const int y)
 
template<typename T_a , typename T_b >
boost::math::tools::promote_args
+< T_a, T_b >::type 
multiply_log (const T_a a, const T_b b)
 Calculated the value of the first argument times log of the second argument while behaving properly with 0 inputs. More...
 
double owens_t (const double h, const double a)
 The Owen's T function of h and a. More...
 
template<typename T >
boost::math::tools::promote_args
+< T >::type 
Phi (const T x)
 The unit normal cumulative distribution function. More...
 
template<typename T >
boost::math::tools::promote_args
+< T >::type 
Phi_approx (T x)
 Approximation of the unit normal CDF. More...
 
template<typename T >
positive_constrain (const T x)
 Return the positive value for the specified unconstrained input. More...
 
template<typename T >
positive_constrain (const T x, T &lp)
 Return the positive value for the specified unconstrained input, incrementing the scalar reference with the log absolute Jacobian determinant. More...
 
template<typename T >
positive_free (const T y)
 Return the unconstrained value corresponding to the specified positive-constrained value. More...
 
template<typename T >
boost::enable_if
+< boost::is_arithmetic< T >, T >
+::type 
primitive_value (T x)
 Return the value of the specified arithmetic argument unmodified with its own declared type. More...
 
template<typename T >
boost::disable_if
+< boost::is_arithmetic< T >
+, double >::type 
primitive_value (const T &x)
 Return the primitive value of the specified argument. More...
 
template<typename T >
prob_constrain (const T x)
 Return a probability value constrained to fall between 0 and 1 (inclusive) for the specified free scalar. More...
 
template<typename T >
prob_constrain (const T x, T &lp)
 Return a probability value constrained to fall between 0 and 1 (inclusive) for the specified free scalar and increment the specified log probability reference with the log absolute Jacobian determinant of the transform. More...
 
template<typename T >
prob_free (const T y)
 Return the free scalar that when transformed to a probability produces the specified scalar. More...
 
template<typename T , typename S >
promote_scalar_type< T, S >::type promote_scalar (const S &x)
 This is the top-level function to call to promote the scalar types of an input of type S to type T. More...
 
template<typename T1 , typename T2 >
boost::math::tools::promote_args
+< T1, T2 >::type 
rising_factorial (const T1 x, const T2 n)
 

+\[ \mbox{rising\_factorial}(x, n) = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ x^{(n)} & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +

+ More...
 
template<typename T >
int sign (const T &z)
 
template<typename T >
square (const T x)
 Return the square of the specified argument. More...
 
template<typename T >
int step (const T y)
 The step, or Heaviside, function. More...
 
template<typename T >
trigamma (T x)
 

+\[ \mbox{trigamma}(x) = \begin{cases} \textrm{error} & \mbox{if } x\in \{\dots, -3, -2, -1, 0\}\\ \Psi_1(x) & \mbox{if } x\not\in \{\dots, -3, -2, -1, 0\}\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+ More...
 
template<typename T , typename TU >
boost::math::tools::promote_args
+< T, TU >::type 
ub_constrain (const T x, const TU ub)
 Return the upper-bounded value for the specified unconstrained scalar and upper bound. More...
 
template<typename T , typename TU >
boost::math::tools::promote_args
+< T, TU >::type 
ub_constrain (const T x, const TU ub, T &lp)
 Return the upper-bounded value for the specified unconstrained scalar and upper bound and increment the specified log probability reference with the log absolute Jacobian determinant of the transform. More...
 
template<typename T , typename TU >
boost::math::tools::promote_args
+< T, TU >::type 
ub_free (const T y, const TU ub)
 Return the free scalar that corresponds to the specified upper-bounded value with respect to the specified upper bound. More...
 
template<typename T >
double value_of (const T x)
 Return the value of the specified scalar argument converted to a double value. More...
 
template<>
double value_of< double > (const double x)
 Return the specified argument. More...
 
template<typename T >
double value_of_rec (const T x)
 Return the value of the specified scalar argument converted to a double value. More...
 
template<>
double value_of_rec< double > (const double x)
 Return the specified argument. More...
 
template<typename T_n , typename T_prob >
return_type< T_prob >::type bernoulli_ccdf_log (const T_n &n, const T_prob &theta)
 
template<typename T_n , typename T_prob >
return_type< T_prob >::type bernoulli_cdf (const T_n &n, const T_prob &theta)
 
template<typename T_n , typename T_prob >
return_type< T_prob >::type bernoulli_cdf_log (const T_n &n, const T_prob &theta)
 
template<bool propto, typename T_n , typename T_prob >
return_type< T_prob >::type bernoulli_log (const T_n &n, const T_prob &theta)
 
template<typename T_y , typename T_prob >
return_type< T_prob >::type bernoulli_log (const T_y &n, const T_prob &theta)
 
template<bool propto, typename T_n , typename T_prob >
return_type< T_prob >::type bernoulli_logit_log (const T_n &n, const T_prob &theta)
 
template<typename T_n , typename T_prob >
return_type< T_prob >::type bernoulli_logit_log (const T_n &n, const T_prob &theta)
 
template<class RNG >
int bernoulli_rng (const double theta, RNG &rng)
 
template<typename T_n , typename T_N , typename T_size1 , typename T_size2 >
return_type< T_size1, T_size2 >
+::type 
beta_binomial_ccdf_log (const T_n &n, const T_N &N, const T_size1 &alpha, const T_size2 &beta)
 
template<typename T_n , typename T_N , typename T_size1 , typename T_size2 >
return_type< T_size1, T_size2 >
+::type 
beta_binomial_cdf (const T_n &n, const T_N &N, const T_size1 &alpha, const T_size2 &beta)
 
template<typename T_n , typename T_N , typename T_size1 , typename T_size2 >
return_type< T_size1, T_size2 >
+::type 
beta_binomial_cdf_log (const T_n &n, const T_N &N, const T_size1 &alpha, const T_size2 &beta)
 
template<bool propto, typename T_n , typename T_N , typename T_size1 , typename T_size2 >
return_type< T_size1, T_size2 >
+::type 
beta_binomial_log (const T_n &n, const T_N &N, const T_size1 &alpha, const T_size2 &beta)
 
template<typename T_n , typename T_N , typename T_size1 , typename T_size2 >
return_type< T_size1, T_size2 >
+::type 
beta_binomial_log (const T_n &n, const T_N &N, const T_size1 &alpha, const T_size2 &beta)
 
template<class RNG >
int beta_binomial_rng (const int N, const double alpha, const double beta, RNG &rng)
 
template<typename T_y , typename T_scale_succ , typename T_scale_fail >
return_type< T_y, T_scale_succ,
+T_scale_fail >::type 
beta_ccdf_log (const T_y &y, const T_scale_succ &alpha, const T_scale_fail &beta)
 
template<typename T_y , typename T_scale_succ , typename T_scale_fail >
return_type< T_y, T_scale_succ,
+T_scale_fail >::type 
beta_cdf (const T_y &y, const T_scale_succ &alpha, const T_scale_fail &beta)
 Calculates the beta cumulative distribution function for the given variate and scale variables. More...
 
template<typename T_y , typename T_scale_succ , typename T_scale_fail >
return_type< T_y, T_scale_succ,
+T_scale_fail >::type 
beta_cdf_log (const T_y &y, const T_scale_succ &alpha, const T_scale_fail &beta)
 
template<bool propto, typename T_y , typename T_scale_succ , typename T_scale_fail >
return_type< T_y, T_scale_succ,
+T_scale_fail >::type 
beta_log (const T_y &y, const T_scale_succ &alpha, const T_scale_fail &beta)
 The log of the beta density for the specified scalar(s) given the specified sample size(s). More...
 
template<typename T_y , typename T_scale_succ , typename T_scale_fail >
return_type< T_y, T_scale_succ,
+T_scale_fail >::type 
beta_log (const T_y &y, const T_scale_succ &alpha, const T_scale_fail &beta)
 
template<class RNG >
double beta_rng (const double alpha, const double beta, RNG &rng)
 
template<typename T_n , typename T_N , typename T_prob >
return_type< T_prob >::type binomial_ccdf_log (const T_n &n, const T_N &N, const T_prob &theta)
 
template<typename T_n , typename T_N , typename T_prob >
return_type< T_prob >::type binomial_cdf (const T_n &n, const T_N &N, const T_prob &theta)
 
template<typename T_n , typename T_N , typename T_prob >
return_type< T_prob >::type binomial_cdf_log (const T_n &n, const T_N &N, const T_prob &theta)
 
template<bool propto, typename T_n , typename T_N , typename T_prob >
return_type< T_prob >::type binomial_log (const T_n &n, const T_N &N, const T_prob &theta)
 
template<typename T_n , typename T_N , typename T_prob >
return_type< T_prob >::type binomial_log (const T_n &n, const T_N &N, const T_prob &theta)
 
template<bool propto, typename T_n , typename T_N , typename T_prob >
return_type< T_prob >::type binomial_logit_log (const T_n &n, const T_N &N, const T_prob &alpha)
 
template<typename T_n , typename T_N , typename T_prob >
return_type< T_prob >::type binomial_logit_log (const T_n &n, const T_N &N, const T_prob &alpha)
 
template<class RNG >
int binomial_rng (const int N, const double theta, RNG &rng)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
cauchy_ccdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
cauchy_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma)
 Calculates the cauchy cumulative distribution function for the given variate, location, and scale. More...
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
cauchy_cdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<bool propto, typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
cauchy_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 The log of the Cauchy density for the specified scalar(s) given the specified location parameter(s) and scale parameter(s). More...
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
cauchy_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<class RNG >
double cauchy_rng (const double mu, const double sigma, RNG &rng)
 
template<typename T_y , typename T_dof >
return_type< T_y, T_dof >::type chi_square_ccdf_log (const T_y &y, const T_dof &nu)
 
template<typename T_y , typename T_dof >
return_type< T_y, T_dof >::type chi_square_cdf (const T_y &y, const T_dof &nu)
 Calculates the chi square cumulative distribution function for the given variate and degrees of freedom. More...
 
template<typename T_y , typename T_dof >
return_type< T_y, T_dof >::type chi_square_cdf_log (const T_y &y, const T_dof &nu)
 
template<bool propto, typename T_y , typename T_dof >
return_type< T_y, T_dof >::type chi_square_log (const T_y &y, const T_dof &nu)
 The log of a chi-squared density for y with the specified degrees of freedom parameter. More...
 
template<typename T_y , typename T_dof >
return_type< T_y, T_dof >::type chi_square_log (const T_y &y, const T_dof &nu)
 
template<class RNG >
double chi_square_rng (const double nu, RNG &rng)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
double_exponential_ccdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
double_exponential_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma)
 Calculates the double exponential cumulative density function. More...
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
double_exponential_cdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<bool propto, typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
double_exponential_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
double_exponential_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<class RNG >
double double_exponential_rng (const double mu, const double sigma, RNG &rng)
 
template<typename T_y , typename T_loc , typename T_scale , typename T_inv_scale >
return_type< T_y, T_loc,
+T_scale, T_inv_scale >::type 
exp_mod_normal_ccdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_inv_scale &lambda)
 
template<typename T_y , typename T_loc , typename T_scale , typename T_inv_scale >
return_type< T_y, T_loc,
+T_scale, T_inv_scale >::type 
exp_mod_normal_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_inv_scale &lambda)
 
template<typename T_y , typename T_loc , typename T_scale , typename T_inv_scale >
return_type< T_y, T_loc,
+T_scale, T_inv_scale >::type 
exp_mod_normal_cdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_inv_scale &lambda)
 
template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_inv_scale >
return_type< T_y, T_loc,
+T_scale, T_inv_scale >::type 
exp_mod_normal_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_inv_scale &lambda)
 
template<typename T_y , typename T_loc , typename T_scale , typename T_inv_scale >
return_type< T_y, T_loc,
+T_scale, T_inv_scale >::type 
exp_mod_normal_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_inv_scale &lambda)
 
template<class RNG >
double exp_mod_normal_rng (const double mu, const double sigma, const double lambda, RNG &rng)
 
template<typename T_y , typename T_inv_scale >
return_type< T_y, T_inv_scale >
+::type 
exponential_ccdf_log (const T_y &y, const T_inv_scale &beta)
 
template<typename T_y , typename T_inv_scale >
return_type< T_y, T_inv_scale >
+::type 
exponential_cdf (const T_y &y, const T_inv_scale &beta)
 Calculates the exponential cumulative distribution function for the given y and beta. More...
 
template<typename T_y , typename T_inv_scale >
return_type< T_y, T_inv_scale >
+::type 
exponential_cdf_log (const T_y &y, const T_inv_scale &beta)
 
template<bool propto, typename T_y , typename T_inv_scale >
return_type< T_y, T_inv_scale >
+::type 
exponential_log (const T_y &y, const T_inv_scale &beta)
 The log of an exponential density for y with the specified inverse scale parameter. More...
 
template<typename T_y , typename T_inv_scale >
return_type< T_y, T_inv_scale >
+::type 
exponential_log (const T_y &y, const T_inv_scale &beta)
 
template<class RNG >
double exponential_rng (const double beta, RNG &rng)
 
template<typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
frechet_ccdf_log (const T_y &y, const T_shape &alpha, const T_scale &sigma)
 
template<typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
frechet_cdf (const T_y &y, const T_shape &alpha, const T_scale &sigma)
 
template<typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
frechet_cdf_log (const T_y &y, const T_shape &alpha, const T_scale &sigma)
 
template<bool propto, typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
frechet_log (const T_y &y, const T_shape &alpha, const T_scale &sigma)
 
template<typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
frechet_log (const T_y &y, const T_shape &alpha, const T_scale &sigma)
 
template<class RNG >
double frechet_rng (const double alpha, const double sigma, RNG &rng)
 
template<typename T_y , typename T_shape , typename T_inv_scale >
return_type< T_y, T_shape,
+T_inv_scale >::type 
gamma_ccdf_log (const T_y &y, const T_shape &alpha, const T_inv_scale &beta)
 
template<typename T_y , typename T_shape , typename T_inv_scale >
return_type< T_y, T_shape,
+T_inv_scale >::type 
gamma_cdf (const T_y &y, const T_shape &alpha, const T_inv_scale &beta)
 The cumulative density function for a gamma distribution for y with the specified shape and inverse scale parameters. More...
 
template<typename T_y , typename T_shape , typename T_inv_scale >
return_type< T_y, T_shape,
+T_inv_scale >::type 
gamma_cdf_log (const T_y &y, const T_shape &alpha, const T_inv_scale &beta)
 
template<bool propto, typename T_y , typename T_shape , typename T_inv_scale >
return_type< T_y, T_shape,
+T_inv_scale >::type 
gamma_log (const T_y &y, const T_shape &alpha, const T_inv_scale &beta)
 The log of a gamma density for y with the specified shape and inverse scale parameters. More...
 
template<typename T_y , typename T_shape , typename T_inv_scale >
return_type< T_y, T_shape,
+T_inv_scale >::type 
gamma_log (const T_y &y, const T_shape &alpha, const T_inv_scale &beta)
 
template<class RNG >
double gamma_rng (const double alpha, const double beta, RNG &rng)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
gumbel_ccdf_log (const T_y &y, const T_loc &mu, const T_scale &beta)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
gumbel_cdf (const T_y &y, const T_loc &mu, const T_scale &beta)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
gumbel_cdf_log (const T_y &y, const T_loc &mu, const T_scale &beta)
 
template<bool propto, typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
gumbel_log (const T_y &y, const T_loc &mu, const T_scale &beta)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
gumbel_log (const T_y &y, const T_loc &mu, const T_scale &beta)
 
template<class RNG >
double gumbel_rng (const double mu, const double beta, RNG &rng)
 
template<bool propto, typename T_n , typename T_N , typename T_a , typename T_b >
double hypergeometric_log (const T_n &n, const T_N &N, const T_a &a, const T_b &b)
 
template<typename T_n , typename T_N , typename T_a , typename T_b >
double hypergeometric_log (const T_n &n, const T_N &N, const T_a &a, const T_b &b)
 
template<class RNG >
int hypergeometric_rng (int N, int a, int b, RNG &rng)
 
template<typename T_y , typename T_dof >
return_type< T_y, T_dof >::type inv_chi_square_ccdf_log (const T_y &y, const T_dof &nu)
 
template<typename T_y , typename T_dof >
return_type< T_y, T_dof >::type inv_chi_square_cdf (const T_y &y, const T_dof &nu)
 
template<typename T_y , typename T_dof >
return_type< T_y, T_dof >::type inv_chi_square_cdf_log (const T_y &y, const T_dof &nu)
 
template<bool propto, typename T_y , typename T_dof >
return_type< T_y, T_dof >::type inv_chi_square_log (const T_y &y, const T_dof &nu)
 The log of an inverse chi-squared density for y with the specified degrees of freedom parameter. More...
 
template<typename T_y , typename T_dof >
return_type< T_y, T_dof >::type inv_chi_square_log (const T_y &y, const T_dof &nu)
 
template<class RNG >
double inv_chi_square_rng (const double nu, RNG &rng)
 
template<typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
inv_gamma_ccdf_log (const T_y &y, const T_shape &alpha, const T_scale &beta)
 
template<typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
inv_gamma_cdf (const T_y &y, const T_shape &alpha, const T_scale &beta)
 The CDF of an inverse gamma density for y with the specified shape and scale parameters. More...
 
template<typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
inv_gamma_cdf_log (const T_y &y, const T_shape &alpha, const T_scale &beta)
 
template<bool propto, typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
inv_gamma_log (const T_y &y, const T_shape &alpha, const T_scale &beta)
 The log of an inverse gamma density for y with the specified shape and scale parameters. More...
 
template<typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
inv_gamma_log (const T_y &y, const T_shape &alpha, const T_scale &beta)
 
template<class RNG >
double inv_gamma_rng (const double alpha, const double beta, RNG &rng)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
logistic_ccdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
logistic_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
logistic_cdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<bool propto, typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
logistic_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
logistic_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<class RNG >
double logistic_rng (const double mu, const double sigma, RNG &rng)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
lognormal_ccdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
lognormal_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
lognormal_cdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<bool propto, typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
lognormal_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
lognormal_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<class RNG >
double lognormal_rng (const double mu, const double sigma, RNG &rng)
 
template<typename T_n , typename T_location , typename T_precision >
return_type< T_location,
+T_precision >::type 
neg_binomial_2_ccdf_log (const T_n &n, const T_location &mu, const T_precision &phi)
 
template<typename T_n , typename T_location , typename T_precision >
return_type< T_location,
+T_precision >::type 
neg_binomial_2_cdf (const T_n &n, const T_location &mu, const T_precision &phi)
 
template<typename T_n , typename T_location , typename T_precision >
return_type< T_location,
+T_precision >::type 
neg_binomial_2_cdf_log (const T_n &n, const T_location &mu, const T_precision &phi)
 
template<bool propto, typename T_n , typename T_location , typename T_precision >
return_type< T_location,
+T_precision >::type 
neg_binomial_2_log (const T_n &n, const T_location &mu, const T_precision &phi)
 
template<typename T_n , typename T_location , typename T_precision >
return_type< T_location,
+T_precision >::type 
neg_binomial_2_log (const T_n &n, const T_location &mu, const T_precision &phi)
 
template<bool propto, typename T_n , typename T_log_location , typename T_precision >
return_type< T_log_location,
+T_precision >::type 
neg_binomial_2_log_log (const T_n &n, const T_log_location &eta, const T_precision &phi)
 
template<typename T_n , typename T_log_location , typename T_precision >
return_type< T_log_location,
+T_precision >::type 
neg_binomial_2_log_log (const T_n &n, const T_log_location &eta, const T_precision &phi)
 
template<class RNG >
int neg_binomial_2_log_rng (const double eta, const double phi, RNG &rng)
 
template<class RNG >
int neg_binomial_2_rng (const double mu, const double phi, RNG &rng)
 
template<typename T_n , typename T_shape , typename T_inv_scale >
return_type< T_shape,
+T_inv_scale >::type 
neg_binomial_ccdf_log (const T_n &n, const T_shape &alpha, const T_inv_scale &beta)
 
template<typename T_n , typename T_shape , typename T_inv_scale >
return_type< T_shape,
+T_inv_scale >::type 
neg_binomial_cdf (const T_n &n, const T_shape &alpha, const T_inv_scale &beta)
 
template<typename T_n , typename T_shape , typename T_inv_scale >
return_type< T_shape,
+T_inv_scale >::type 
neg_binomial_cdf_log (const T_n &n, const T_shape &alpha, const T_inv_scale &beta)
 
template<bool propto, typename T_n , typename T_shape , typename T_inv_scale >
return_type< T_shape,
+T_inv_scale >::type 
neg_binomial_log (const T_n &n, const T_shape &alpha, const T_inv_scale &beta)
 
template<typename T_n , typename T_shape , typename T_inv_scale >
return_type< T_shape,
+T_inv_scale >::type 
neg_binomial_log (const T_n &n, const T_shape &alpha, const T_inv_scale &beta)
 
template<class RNG >
int neg_binomial_rng (const double alpha, const double beta, RNG &rng)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
normal_ccdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
normal_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma)
 Calculates the normal cumulative distribution function for the given variate, location, and scale. More...
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
normal_cdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<bool propto, typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
normal_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 The log of the normal density for the specified scalar(s) given the specified mean(s) and deviation(s). More...
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
normal_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
template<class RNG >
double normal_rng (const double mu, const double sigma, RNG &rng)
 
template<typename T_y , typename T_scale , typename T_shape >
return_type< T_y, T_scale,
+T_shape >::type 
pareto_ccdf_log (const T_y &y, const T_scale &y_min, const T_shape &alpha)
 
template<typename T_y , typename T_scale , typename T_shape >
return_type< T_y, T_scale,
+T_shape >::type 
pareto_cdf (const T_y &y, const T_scale &y_min, const T_shape &alpha)
 
template<typename T_y , typename T_scale , typename T_shape >
return_type< T_y, T_scale,
+T_shape >::type 
pareto_cdf_log (const T_y &y, const T_scale &y_min, const T_shape &alpha)
 
template<bool propto, typename T_y , typename T_scale , typename T_shape >
return_type< T_y, T_scale,
+T_shape >::type 
pareto_log (const T_y &y, const T_scale &y_min, const T_shape &alpha)
 
template<typename T_y , typename T_scale , typename T_shape >
return_type< T_y, T_scale,
+T_shape >::type 
pareto_log (const T_y &y, const T_scale &y_min, const T_shape &alpha)
 
template<class RNG >
double pareto_rng (const double y_min, const double alpha, RNG &rng)
 
template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
return_type< T_y, T_loc,
+T_scale, T_shape >::type 
pareto_type_2_ccdf_log (const T_y &y, const T_loc &mu, const T_scale &lambda, const T_shape &alpha)
 
template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
return_type< T_y, T_loc,
+T_scale, T_shape >::type 
pareto_type_2_cdf (const T_y &y, const T_loc &mu, const T_scale &lambda, const T_shape &alpha)
 
template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
return_type< T_y, T_loc,
+T_scale, T_shape >::type 
pareto_type_2_cdf_log (const T_y &y, const T_loc &mu, const T_scale &lambda, const T_shape &alpha)
 
template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_shape >
return_type< T_y, T_loc,
+T_scale, T_shape >::type 
pareto_type_2_log (const T_y &y, const T_loc &mu, const T_scale &lambda, const T_shape &alpha)
 
template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
return_type< T_y, T_loc,
+T_scale, T_shape >::type 
pareto_type_2_log (const T_y &y, const T_loc &mu, const T_scale &lambda, const T_shape &alpha)
 
template<class RNG >
double pareto_type_2_rng (const double mu, const double lambda, const double alpha, RNG &rng)
 
template<typename T_n , typename T_rate >
return_type< T_rate >::type poisson_ccdf_log (const T_n &n, const T_rate &lambda)
 
template<typename T_n , typename T_rate >
return_type< T_rate >::type poisson_cdf (const T_n &n, const T_rate &lambda)
 
template<typename T_n , typename T_rate >
return_type< T_rate >::type poisson_cdf_log (const T_n &n, const T_rate &lambda)
 
template<bool propto, typename T_n , typename T_rate >
return_type< T_rate >::type poisson_log (const T_n &n, const T_rate &lambda)
 
template<typename T_n , typename T_rate >
return_type< T_rate >::type poisson_log (const T_n &n, const T_rate &lambda)
 
template<bool propto, typename T_n , typename T_log_rate >
return_type< T_log_rate >::type poisson_log_log (const T_n &n, const T_log_rate &alpha)
 
template<typename T_n , typename T_log_rate >
return_type< T_log_rate >::type poisson_log_log (const T_n &n, const T_log_rate &alpha)
 
template<class RNG >
int poisson_log_rng (const double alpha, RNG &rng)
 
template<class RNG >
int poisson_rng (const double lambda, RNG &rng)
 
template<typename T_y , typename T_scale >
return_type< T_y, T_scale >::type rayleigh_ccdf_log (const T_y &y, const T_scale &sigma)
 
template<typename T_y , typename T_scale >
return_type< T_y, T_scale >::type rayleigh_cdf (const T_y &y, const T_scale &sigma)
 
template<typename T_y , typename T_scale >
return_type< T_y, T_scale >::type rayleigh_cdf_log (const T_y &y, const T_scale &sigma)
 
template<bool propto, typename T_y , typename T_scale >
return_type< T_y, T_scale >::type rayleigh_log (const T_y &y, const T_scale &sigma)
 
template<typename T_y , typename T_scale >
return_type< T_y, T_scale >::type rayleigh_log (const T_y &y, const T_scale &sigma)
 
template<class RNG >
double rayleigh_rng (const double sigma, RNG &rng)
 
template<typename T_y , typename T_dof , typename T_scale >
return_type< T_y, T_dof,
+T_scale >::type 
scaled_inv_chi_square_ccdf_log (const T_y &y, const T_dof &nu, const T_scale &s)
 
template<typename T_y , typename T_dof , typename T_scale >
return_type< T_y, T_dof,
+T_scale >::type 
scaled_inv_chi_square_cdf (const T_y &y, const T_dof &nu, const T_scale &s)
 The CDF of a scaled inverse chi-squared density for y with the specified degrees of freedom parameter and scale parameter. More...
 
template<typename T_y , typename T_dof , typename T_scale >
return_type< T_y, T_dof,
+T_scale >::type 
scaled_inv_chi_square_cdf_log (const T_y &y, const T_dof &nu, const T_scale &s)
 
template<bool propto, typename T_y , typename T_dof , typename T_scale >
return_type< T_y, T_dof,
+T_scale >::type 
scaled_inv_chi_square_log (const T_y &y, const T_dof &nu, const T_scale &s)
 The log of a scaled inverse chi-squared density for y with the specified degrees of freedom parameter and scale parameter. More...
 
template<typename T_y , typename T_dof , typename T_scale >
return_type< T_y, T_dof,
+T_scale >::type 
scaled_inv_chi_square_log (const T_y &y, const T_dof &nu, const T_scale &s)
 
template<class RNG >
double scaled_inv_chi_square_rng (const double nu, const double s, RNG &rng)
 
template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
return_type< T_y, T_loc,
+T_scale, T_shape >::type 
skew_normal_ccdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_shape &alpha)
 
template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
return_type< T_y, T_loc,
+T_scale, T_shape >::type 
skew_normal_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_shape &alpha)
 
template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
return_type< T_y, T_loc,
+T_scale, T_shape >::type 
skew_normal_cdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_shape &alpha)
 
template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_shape >
return_type< T_y, T_loc,
+T_scale, T_shape >::type 
skew_normal_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_shape &alpha)
 
template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
return_type< T_y, T_loc,
+T_scale, T_shape >::type 
skew_normal_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_shape &alpha)
 
template<class RNG >
double skew_normal_rng (const double mu, const double sigma, const double alpha, RNG &rng)
 
template<typename T_y , typename T_dof , typename T_loc , typename T_scale >
return_type< T_y, T_dof, T_loc,
+T_scale >::type 
student_t_ccdf_log (const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &sigma)
 
template<typename T_y , typename T_dof , typename T_loc , typename T_scale >
return_type< T_y, T_dof, T_loc,
+T_scale >::type 
student_t_cdf (const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &sigma)
 
template<typename T_y , typename T_dof , typename T_loc , typename T_scale >
return_type< T_y, T_dof, T_loc,
+T_scale >::type 
student_t_cdf_log (const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &sigma)
 
template<bool propto, typename T_y , typename T_dof , typename T_loc , typename T_scale >
return_type< T_y, T_dof, T_loc,
+T_scale >::type 
student_t_log (const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &sigma)
 The log of the Student-t density for the given y, nu, mean, and scale parameter. More...
 
template<typename T_y , typename T_dof , typename T_loc , typename T_scale >
return_type< T_y, T_dof, T_loc,
+T_scale >::type 
student_t_log (const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &sigma)
 
template<class RNG >
double student_t_rng (const double nu, const double mu, const double sigma, RNG &rng)
 
template<typename T_y , typename T_low , typename T_high >
return_type< T_y, T_low,
+T_high >::type 
uniform_ccdf_log (const T_y &y, const T_low &alpha, const T_high &beta)
 
template<typename T_y , typename T_low , typename T_high >
return_type< T_y, T_low,
+T_high >::type 
uniform_cdf (const T_y &y, const T_low &alpha, const T_high &beta)
 
template<typename T_y , typename T_low , typename T_high >
return_type< T_y, T_low,
+T_high >::type 
uniform_cdf_log (const T_y &y, const T_low &alpha, const T_high &beta)
 
template<bool propto, typename T_y , typename T_low , typename T_high >
return_type< T_y, T_low,
+T_high >::type 
uniform_log (const T_y &y, const T_low &alpha, const T_high &beta)
 The log of a uniform density for the given y, lower, and upper bound. More...
 
template<typename T_y , typename T_low , typename T_high >
return_type< T_y, T_low,
+T_high >::type 
uniform_log (const T_y &y, const T_low &alpha, const T_high &beta)
 
template<class RNG >
double uniform_rng (const double alpha, const double beta, RNG &rng)
 
template<bool propto, typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
von_mises_log (T_y const &y, T_loc const &mu, T_scale const &kappa)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
von_mises_log (T_y const &y, T_loc const &mu, T_scale const &kappa)
 
template<class RNG >
double von_mises_rng (const double mu, const double kappa, RNG &rng)
 
template<typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
weibull_ccdf_log (const T_y &y, const T_shape &alpha, const T_scale &sigma)
 
template<typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
weibull_cdf (const T_y &y, const T_shape &alpha, const T_scale &sigma)
 
template<typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
weibull_cdf_log (const T_y &y, const T_shape &alpha, const T_scale &sigma)
 
template<bool propto, typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
weibull_log (const T_y &y, const T_shape &alpha, const T_scale &sigma)
 
template<typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
weibull_log (const T_y &y, const T_shape &alpha, const T_scale &sigma)
 
template<class RNG >
double weibull_rng (const double alpha, const double sigma, RNG &rng)
 
template<bool propto, typename T_y , typename T_alpha , typename T_tau , typename T_beta , typename T_delta >
return_type< T_y, T_alpha,
+T_tau, T_beta, T_delta >::type 
wiener_log (const T_y &y, const T_alpha &alpha, const T_tau &tau, const T_beta &beta, const T_delta &delta)
 The log of the first passage time density function for a (Wiener) drift diffusion model for the given $y$, boundary separation $\alpha$, nondecision time $\tau$, relative bias $\beta$, and drift rate $\delta$. More...
 
template<typename T_y , typename T_alpha , typename T_tau , typename T_beta , typename T_delta >
return_type< T_y, T_alpha,
+T_tau, T_beta, T_delta >::type 
wiener_log (const T_y &y, const T_alpha &alpha, const T_tau &tau, const T_beta &beta, const T_delta &delta)
 
var log_sum_exp (const std::vector< var > &x)
 Returns the log sum of exponentials. More...
 
var sum (const std::vector< var > &m)
 Returns the sum of the entries of the specified vector. More...
 
void add_initial_values (const std::vector< stan::math::var > &y0, std::vector< std::vector< stan::math::var > > &y)
 Increment the state derived from the coupled system in the with the original initial state. More...
 
static bool empty_nested ()
 Return true if there is no nested autodiff being executed. More...
 
static void grad (chainable *vi)
 Compute the gradient for all variables starting from the specified root variable implementation. More...
 
static size_t nested_size ()
 
var operator+ (const var &a, const var &b)
 Addition operator for variables (C++). More...
 
var operator+ (const var &a, const double b)
 Addition operator for variable and scalar (C++). More...
 
var operator+ (const double a, const var &b)
 Addition operator for scalar and variable (C++). More...
 
var operator/ (const var &a, const var &b)
 Division operator for two variables (C++). More...
 
var operator/ (const var &a, const double b)
 Division operator for dividing a variable by a scalar (C++). More...
 
var operator/ (const double a, const var &b)
 Division operator for dividing a scalar by a variable (C++). More...
 
bool operator== (const var &a, const var &b)
 Equality operator comparing two variables' values (C++). More...
 
bool operator== (const var &a, const double b)
 Equality operator comparing a variable's value and a double (C++). More...
 
bool operator== (const double a, const var &b)
 Equality operator comparing a scalar and a variable's value (C++). More...
 
bool operator> (const var &a, const var &b)
 Greater than operator comparing variables' values (C++). More...
 
bool operator> (const var &a, const double b)
 Greater than operator comparing variable's value and double (C++). More...
 
bool operator> (const double a, const var &b)
 Greater than operator comparing a double and a variable's value (C++). More...
 
bool operator>= (const var &a, const var &b)
 Greater than or equal operator comparing two variables' values (C++). More...
 
bool operator>= (const var &a, const double b)
 Greater than or equal operator comparing variable's value and double (C++). More...
 
bool operator>= (const double a, const var &b)
 Greater than or equal operator comparing double and variable's value (C++). More...
 
bool operator< (const var &a, const var &b)
 Less than operator comparing variables' values (C++). More...
 
bool operator< (const var &a, const double b)
 Less than operator comparing variable's value and a double (C++). More...
 
bool operator< (const double a, const var &b)
 Less than operator comparing a double and variable's value (C++). More...
 
bool operator<= (const var &a, const var &b)
 Less than or equal operator comparing two variables' values (C++). More...
 
bool operator<= (const var &a, const double b)
 Less than or equal operator comparing a variable's value and a scalar (C++). More...
 
bool operator<= (const double a, const var &b)
 Less than or equal operator comparing a double and variable's value (C++). More...
 
var operator* (const var &a, const var &b)
 Multiplication operator for two variables (C++). More...
 
var operator* (const var &a, const double b)
 Multiplication operator for a variable and a scalar (C++). More...
 
var operator* (const double a, const var &b)
 Multiplication operator for a scalar and a variable (C++). More...
 
bool operator!= (const var &a, const var &b)
 Inequality operator comparing two variables' values (C++). More...
 
bool operator!= (const var &a, const double b)
 Inequality operator comparing a variable's value and a double (C++). More...
 
bool operator!= (const double a, const var &b)
 Inequality operator comparing a double and a variable's value (C++). More...
 
var operator- (const var &a, const var &b)
 Subtraction operator for variables (C++). More...
 
var operator- (const var &a, const double b)
 Subtraction operator for variable and scalar (C++). More...
 
var operator- (const double a, const var &b)
 Subtraction operator for scalar and variable (C++). More...
 
varoperator-- (var &a)
 Prefix decrement operator for variables (C++). More...
 
var operator-- (var &a, int)
 Postfix decrement operator for variables (C++). More...
 
varoperator++ (var &a)
 Prefix increment operator for variables (C++). More...
 
var operator++ (var &a, int)
 Postfix increment operator for variables (C++). More...
 
var operator- (const var &a)
 Unary negation operator for variables (C++). More...
 
bool operator! (const var &a)
 Prefix logical negation for the value of variables (C++). More...
 
var operator+ (const var &a)
 Unary plus operator for variables (C++). More...
 
var precomputed_gradients (const double value, const std::vector< var > &operands, const std::vector< double > &gradients)
 This function returns a var for an expression that has the specified value, vector of operands, and vector of partial derivatives of value with respect to the operands. More...
 
void print_stack (std::ostream &o)
 Prints the auto-dif variable stack. More...
 
static void recover_memory ()
 Recover memory used for all variables for reuse. More...
 
static void recover_memory_nested ()
 Recover only the memory used for the top nested call. More...
 
static void set_zero_all_adjoints ()
 Reset all adjoint values in the stack to zero. More...
 
static void start_nested ()
 Record the current position so that recover_memory_nested() can find it. More...
 
static void grad (chainable *vi)
 
Eigen::Matrix< var,-1,-1 > cholesky_decompose (const Eigen::Matrix< var,-1,-1 > &A)
 
template<typename T1 , int R1, int C1, typename T2 , int R2, int C2>
boost::enable_if_c
+< boost::is_same< T1, var >
+::value||boost::is_same< T2,
+var >::value, Eigen::Matrix
+< var, 1, C1 > >::type 
columns_dot_product (const Eigen::Matrix< T1, R1, C1 > &v1, const Eigen::Matrix< T2, R2, C2 > &v2)
 
template<int R, int C>
Eigen::Matrix< var, 1, C > columns_dot_self (const Eigen::Matrix< var, R, C > &x)
 Returns the dot product of each column of a matrix with itself. More...
 
matrix_v crossprod (const matrix_v &M)
 Returns the result of pre-multiplying a matrix by its own transpose. More...
 
template<int R, int C>
var determinant (const Eigen::Matrix< var, R, C > &m)
 
double divide (double x, double y)
 Return the division of the first scalar by the second scalar. More...
 
template<typename T1 , typename T2 >
var divide (const T1 &v, const T2 &c)
 
template<typename T1 , typename T2 , int R, int C>
Eigen::Matrix< var, R, C > divide (const Eigen::Matrix< T1, R, C > &v, const T2 &c)
 Return the division of the specified column vector by the specified scalar. More...
 
template<typename T1 , int R1, int C1, typename T2 , int R2, int C2>
boost::enable_if_c
+< boost::is_same< T1, var >
+::value||boost::is_same< T2,
+var >::value, var >::type 
dot_product (const Eigen::Matrix< T1, R1, C1 > &v1, const Eigen::Matrix< T2, R2, C2 > &v2)
 Returns the dot product. More...
 
template<typename T1 , typename T2 >
boost::enable_if_c
+< boost::is_same< T1, var >
+::value||boost::is_same< T2,
+var >::value, var >::type 
dot_product (const T1 *v1, const T2 *v2, size_t length)
 Returns the dot product. More...
 
template<typename T1 , typename T2 >
boost::enable_if_c
+< boost::is_same< T1, var >
+::value||boost::is_same< T2,
+var >::value, var >::type 
dot_product (const std::vector< T1 > &v1, const std::vector< T2 > &v2)
 Returns the dot product. More...
 
template<int R, int C>
var dot_self (const Eigen::Matrix< var, R, C > &v)
 Returns the dot product of a vector with itself. More...
 
void grad (var &v, Eigen::Matrix< var, Eigen::Dynamic, 1 > &x, Eigen::VectorXd &g)
 Propagate chain rule to calculate gradients starting from the specified variable. More...
 
void initialize_variable (var &variable, const var &value)
 Initialize variable to value. More...
 
template<int R, int C>
void initialize_variable (Eigen::Matrix< var, R, C > &matrix, const var &value)
 Initialize every cell in the matrix to the specified value. More...
 
template<typename T >
void initialize_variable (std::vector< T > &variables, const var &value)
 Initialize the variables in the standard vector recursively. More...
 
template<int R, int C>
var log_determinant (const Eigen::Matrix< var, R, C > &m)
 
template<int R, int C>
var log_determinant_ldlt (stan::math::LDLT_factor< var, R, C > &A)
 
template<int R, int C>
var log_determinant_spd (const Eigen::Matrix< var, R, C > &m)
 
Eigen::Matrix< var,
+Eigen::Dynamic, 1 > 
log_softmax (const Eigen::Matrix< var, Eigen::Dynamic, 1 > &alpha)
 Return the softmax of the specified Eigen vector. More...
 
template<int R, int C>
var log_sum_exp (const Eigen::Matrix< var, R, C > &x)
 Returns the log sum of exponentials. More...
 
template<int R1, int C1, int R2, int C2>
Eigen::Matrix< var, R1, C2 > mdivide_left (const Eigen::Matrix< var, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)
 
template<int R1, int C1, int R2, int C2>
Eigen::Matrix< var, R1, C2 > mdivide_left (const Eigen::Matrix< var, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)
 
template<int R1, int C1, int R2, int C2>
Eigen::Matrix< var, R1, C2 > mdivide_left (const Eigen::Matrix< double, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)
 
template<int R1, int C1, int R2, int C2>
Eigen::Matrix< var, R1, C2 > mdivide_left_ldlt (const stan::math::LDLT_factor< var, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)
 Returns the solution of the system Ax=b given an LDLT_factor of A. More...
 
template<int R1, int C1, int R2, int C2>
Eigen::Matrix< var, R1, C2 > mdivide_left_ldlt (const stan::math::LDLT_factor< var, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)
 Returns the solution of the system Ax=b given an LDLT_factor of A. More...
 
template<int R1, int C1, int R2, int C2>
Eigen::Matrix< var, R1, C2 > mdivide_left_ldlt (const stan::math::LDLT_factor< double, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)
 Returns the solution of the system Ax=b given an LDLT_factor of A. More...
 
template<int R1, int C1, int R2, int C2>
Eigen::Matrix< var, R1, C2 > mdivide_left_spd (const Eigen::Matrix< var, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)
 
template<int R1, int C1, int R2, int C2>
Eigen::Matrix< var, R1, C2 > mdivide_left_spd (const Eigen::Matrix< var, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)
 
template<int R1, int C1, int R2, int C2>
Eigen::Matrix< var, R1, C2 > mdivide_left_spd (const Eigen::Matrix< double, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)
 
template<int TriView, int R1, int C1, int R2, int C2>
Eigen::Matrix< var, R1, C2 > mdivide_left_tri (const Eigen::Matrix< var, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)
 
template<int TriView, int R1, int C1, int R2, int C2>
Eigen::Matrix< var, R1, C2 > mdivide_left_tri (const Eigen::Matrix< double, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)
 
template<int TriView, int R1, int C1, int R2, int C2>
Eigen::Matrix< var, R1, C2 > mdivide_left_tri (const Eigen::Matrix< var, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)
 
template<typename T1 , typename T2 >
boost::enable_if_c
+< (boost::is_scalar< T1 >
+::value||boost::is_same< T1,
+var >::value)&&(boost::is_scalar
+< T2 >::value||boost::is_same
+< T2, var >::value), typename
+boost::math::tools::promote_args
+< T1, T2 >::type >::type 
multiply (const T1 &v, const T2 &c)
 Return the product of two scalars. More...
 
template<typename T1 , typename T2 , int R2, int C2>
Eigen::Matrix< var, R2, C2 > multiply (const T1 &c, const Eigen::Matrix< T2, R2, C2 > &m)
 Return the product of scalar and matrix. More...
 
template<typename T1 , int R1, int C1, typename T2 >
Eigen::Matrix< var, R1, C1 > multiply (const Eigen::Matrix< T1, R1, C1 > &m, const T2 &c)
 Return the product of scalar and matrix. More...
 
template<typename T1 , int R1, int C1, typename T2 , int R2, int C2>
boost::enable_if_c
+< boost::is_same< T1, var >
+::value||boost::is_same< T2,
+var >::value, Eigen::Matrix
+< var, R1, C2 > >::type 
multiply (const Eigen::Matrix< T1, R1, C1 > &m1, const Eigen::Matrix< T2, R2, C2 > &m2)
 Return the product of the specified matrices. More...
 
template<typename T1 , int C1, typename T2 , int R2>
boost::enable_if_c
+< boost::is_same< T1, var >
+::value||boost::is_same< T2,
+var >::value, var >::type 
multiply (const Eigen::Matrix< T1, 1, C1 > &rv, const Eigen::Matrix< T2, R2, 1 > &v)
 Return the scalar product of the specified row vector and specified column vector. More...
 
matrix_v multiply_lower_tri_self_transpose (const matrix_v &L)
 
template<typename TA , int RA, int CA, typename TB , int RB, int CB>
boost::enable_if_c
+< boost::is_same< TA, var >
+::value||boost::is_same< TB,
+var >::value, Eigen::Matrix
+< var, CB, CB > >::type 
quad_form (const Eigen::Matrix< TA, RA, CA > &A, const Eigen::Matrix< TB, RB, CB > &B)
 
template<typename TA , int RA, int CA, typename TB , int RB>
boost::enable_if_c
+< boost::is_same< TA, var >
+::value||boost::is_same< TB,
+var >::value, var >::type 
quad_form (const Eigen::Matrix< TA, RA, CA > &A, const Eigen::Matrix< TB, RB, 1 > &B)
 
template<typename TA , int RA, int CA, typename TB , int RB, int CB>
boost::enable_if_c
+< boost::is_same< TA, var >
+::value||boost::is_same< TB,
+var >::value, Eigen::Matrix
+< var, CB, CB > >::type 
quad_form_sym (const Eigen::Matrix< TA, RA, CA > &A, const Eigen::Matrix< TB, RB, CB > &B)
 
template<typename TA , int RA, int CA, typename TB , int RB>
boost::enable_if_c
+< boost::is_same< TA, var >
+::value||boost::is_same< TB,
+var >::value, var >::type 
quad_form_sym (const Eigen::Matrix< TA, RA, CA > &A, const Eigen::Matrix< TB, RB, 1 > &B)
 
template<typename T1 , int R1, int C1, typename T2 , int R2, int C2>
boost::enable_if_c
+< boost::is_same< T1, var >
+::value||boost::is_same< T2,
+var >::value, Eigen::Matrix
+< var, R1, 1 > >::type 
rows_dot_product (const Eigen::Matrix< T1, R1, C1 > &v1, const Eigen::Matrix< T2, R2, C2 > &v2)
 
var sd (const std::vector< var > &v)
 Return the sample standard deviation of the specified standard vector. More...
 
template<int R, int C>
var sd (const Eigen::Matrix< var, R, C > &m)
 
Eigen::Matrix< var,
+Eigen::Dynamic, 1 > 
softmax (const Eigen::Matrix< var, Eigen::Dynamic, 1 > &alpha)
 Return the softmax of the specified Eigen vector. More...
 
std::vector< varsort_asc (std::vector< var > xs)
 Return the specified standard vector in ascending order with gradients kept. More...
 
template<int R, int C>
Eigen::Matrix< var, R, C > sort_asc (Eigen::Matrix< var, R, C > xs)
 Return the specified eigen vector in ascending order with gradients kept. More...
 
std::vector< varsort_desc (std::vector< var > xs)
 Return the specified standard vector in descending order with gradients kept. More...
 
template<int R, int C>
Eigen::Matrix< var, R, C > sort_desc (Eigen::Matrix< var, R, C > xs)
 Return the specified eigen vector in descending order with gradients kept. More...
 
template<int R1, int C1, int R2, int C2>
var squared_distance (const Eigen::Matrix< var, R1, C1 > &v1, const Eigen::Matrix< var, R2, C2 > &v2)
 
template<int R1, int C1, int R2, int C2>
var squared_distance (const Eigen::Matrix< var, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)
 
template<int R1, int C1, int R2, int C2>
var squared_distance (const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< var, R2, C2 > &v2)
 
void stan_print (std::ostream *o, const var &x)
 
template<int R, int C>
var sum (const Eigen::Matrix< var, R, C > &m)
 Returns the sum of the coefficients of the specified matrix, column vector or row vector. More...
 
matrix_v tcrossprod (const matrix_v &M)
 Returns the result of post-multiplying a matrix by its own transpose. More...
 
var to_var (const double &x)
 Converts argument to an automatic differentiation variable. More...
 
var to_var (const var &x)
 Converts argument to an automatic differentiation variable. More...
 
matrix_v to_var (const stan::math::matrix_d &m)
 Converts argument to an automatic differentiation variable. More...
 
matrix_v to_var (const matrix_v &m)
 Converts argument to an automatic differentiation variable. More...
 
vector_v to_var (const stan::math::vector_d &v)
 Converts argument to an automatic differentiation variable. More...
 
vector_v to_var (const vector_v &v)
 Converts argument to an automatic differentiation variable. More...
 
row_vector_v to_var (const stan::math::row_vector_d &rv)
 Converts argument to an automatic differentiation variable. More...
 
row_vector_v to_var (const row_vector_v &rv)
 Converts argument to an automatic differentiation variable. More...
 
template<typename T1 , int R1, int C1, typename T2 , int R2, int C2, typename T3 , int R3, int C3>
boost::enable_if_c
+< stan::is_var< T1 >::value||stan::is_var
+< T2 >::value||stan::is_var
+< T3 >::value, var >::type 
trace_gen_inv_quad_form_ldlt (const Eigen::Matrix< T1, R1, C1 > &D, const stan::math::LDLT_factor< T2, R2, C2 > &A, const Eigen::Matrix< T3, R3, C3 > &B)
 Compute the trace of an inverse quadratic form. More...
 
template<typename TD , int RD, int CD, typename TA , int RA, int CA, typename TB , int RB, int CB>
boost::enable_if_c
+< boost::is_same< TD, var >
+::value||boost::is_same< TA,
+var >::value||boost::is_same
+< TB, var >::value, var >
+::type 
trace_gen_quad_form (const Eigen::Matrix< TD, RD, CD > &D, const Eigen::Matrix< TA, RA, CA > &A, const Eigen::Matrix< TB, RB, CB > &B)
 
template<typename T2 , int R2, int C2, typename T3 , int R3, int C3>
boost::enable_if_c
+< stan::is_var< T2 >::value||stan::is_var
+< T3 >::value, var >::type 
trace_inv_quad_form_ldlt (const stan::math::LDLT_factor< T2, R2, C2 > &A, const Eigen::Matrix< T3, R3, C3 > &B)
 Compute the trace of an inverse quadratic form. More...
 
template<typename TA , int RA, int CA, typename TB , int RB, int CB>
boost::enable_if_c
+< boost::is_same< TA, var >
+::value||boost::is_same< TB,
+var >::value, var >::type 
trace_quad_form (const Eigen::Matrix< TA, RA, CA > &A, const Eigen::Matrix< TB, RB, CB > &B)
 
var variance (const std::vector< var > &v)
 Return the sample variance of the specified standard vector. More...
 
template<int R, int C>
var variance (const Eigen::Matrix< var, R, C > &m)
 
template<typename F >
void gradient (const F &f, const Eigen::Matrix< double, Dynamic, 1 > &x, double &fx, Eigen::Matrix< double, Dynamic, 1 > &grad_fx)
 Calculate the value and the gradient of the specified function at the specified argument. More...
 
template<typename F >
void jacobian (const F &f, const Eigen::Matrix< double, Dynamic, 1 > &x, Eigen::Matrix< double, Dynamic, 1 > &fx, Eigen::Matrix< double, Dynamic, Dynamic > &J)
 
var abs (const var &a)
 Return the absolute value of the variable (std). More...
 
var acos (const var &a)
 Return the principal value of the arc cosine of a variable, in radians (cmath). More...
 
var acosh (const var &a)
 The inverse hyperbolic cosine function for variables (C99). More...
 
int as_bool (const var &v)
 Return 1 if the argument is unequal to zero and 0 otherwise. More...
 
var asin (const var &a)
 Return the principal value of the arc sine, in radians, of the specified variable (cmath). More...
 
var asinh (const var &a)
 The inverse hyperbolic sine function for variables (C99). More...
 
var atan (const var &a)
 Return the principal value of the arc tangent, in radians, of the specified variable (cmath). More...
 
var atan2 (const var &a, const var &b)
 Return the principal value of the arc tangent, in radians, of the first variable divided by the second (cmath). More...
 
var atan2 (const var &a, const double b)
 Return the principal value of the arc tangent, in radians, of the first variable divided by the second scalar (cmath). More...
 
var atan2 (const double a, const var &b)
 Return the principal value of the arc tangent, in radians, of the first scalar divided by the second variable (cmath). More...
 
var atanh (const var &a)
 The inverse hyperbolic tangent function for variables (C99). More...
 
var bessel_first_kind (const int &v, const var &a)
 
var bessel_second_kind (const int &v, const var &a)
 
var binary_log_loss (const int y, const stan::math::var &y_hat)
 The log loss function for variables (stan). More...
 
double calculate_chain (const double &x, const double &val)
 
var cbrt (const var &a)
 Returns the cube root of the specified variable (C99). More...
 
var ceil (const var &a)
 Return the ceiling of the specified variable (cmath). More...
 
var cos (const var &a)
 Return the cosine of a radian-scaled variable (cmath). More...
 
var cosh (const var &a)
 Return the hyperbolic cosine of the specified variable (cmath). More...
 
var digamma (const stan::math::var &a)
 
var erf (const var &a)
 The error function for variables (C99). More...
 
var erfc (const var &a)
 The complementary error function for variables (C99). More...
 
var exp (const var &a)
 Return the exponentiation of the specified variable (cmath). More...
 
var exp2 (const var &a)
 Exponentiation base 2 function for variables (C99). More...
 
var expm1 (const stan::math::var &a)
 The exponentiation of the specified variable minus 1 (C99). More...
 
var fabs (const var &a)
 Return the absolute value of the variable (cmath). More...
 
var falling_factorial (const var &a, const double &b)
 
var falling_factorial (const var &a, const var &b)
 
var falling_factorial (const double &a, const var &b)
 
var fdim (const stan::math::var &a, const stan::math::var &b)
 Return the positive difference between the first variable's the value and the second's (C99). More...
 
var fdim (const double &a, const stan::math::var &b)
 Return the positive difference between the first value and the value of the second variable (C99). More...
 
var fdim (const stan::math::var &a, const double &b)
 Return the positive difference between the first variable's value and the second value (C99). More...
 
var floor (const var &a)
 Return the floor of the specified variable (cmath). More...
 
var fma (const stan::math::var &a, const stan::math::var &b, const stan::math::var &c)
 The fused multiply-add function for three variables (C99). More...
 
var fma (const stan::math::var &a, const stan::math::var &b, const double &c)
 The fused multiply-add function for two variables and a value (C99). More...
 
var fma (const stan::math::var &a, const double &b, const stan::math::var &c)
 The fused multiply-add function for a variable, value, and variable (C99). More...
 
var fma (const stan::math::var &a, const double &b, const double &c)
 The fused multiply-add function for a variable and two values (C99). More...
 
var fma (const double &a, const stan::math::var &b, const double &c)
 The fused multiply-add function for a value, variable, and value (C99). More...
 
var fma (const double &a, const double &b, const stan::math::var &c)
 The fused multiply-add function for two values and a variable, and value (C99). More...
 
var fma (const double &a, const stan::math::var &b, const stan::math::var &c)
 The fused multiply-add function for a value and two variables (C99). More...
 
var fmax (const stan::math::var &a, const stan::math::var &b)
 Returns the maximum of the two variable arguments (C99). More...
 
var fmax (const stan::math::var &a, const double &b)
 Returns the maximum of the variable and scalar, promoting the scalar to a variable if it is larger (C99). More...
 
var fmax (const double &a, const stan::math::var &b)
 Returns the maximum of a scalar and variable, promoting the scalar to a variable if it is larger (C99). More...
 
var fmin (const stan::math::var &a, const stan::math::var &b)
 Returns the minimum of the two variable arguments (C99). More...
 
var fmin (const stan::math::var &a, double b)
 Returns the minimum of the variable and scalar, promoting the scalar to a variable if it is larger (C99). More...
 
var fmin (double a, const stan::math::var &b)
 Returns the minimum of a scalar and variable, promoting the scalar to a variable if it is larger (C99). More...
 
var fmod (const var &a, const var &b)
 Return the floating point remainder after dividing the first variable by the second (cmath). More...
 
var fmod (const var &a, const double b)
 Return the floating point remainder after dividing the the first variable by the second scalar (cmath). More...
 
var fmod (const double a, const var &b)
 Return the floating point remainder after dividing the first scalar by the second variable (cmath). More...
 
var gamma_p (const stan::math::var &a, const stan::math::var &b)
 
var gamma_p (const stan::math::var &a, const double &b)
 
var gamma_p (const double &a, const stan::math::var &b)
 
var gamma_q (const stan::math::var &a, const stan::math::var &b)
 
var gamma_q (const stan::math::var &a, const double &b)
 
var gamma_q (const double &a, const stan::math::var &b)
 
void grad_inc_beta (var &g1, var &g2, const var &a, const var &b, const var &z)
 
var hypot (const var &a, const var &b)
 Returns the length of the hypoteneuse of a right triangle with sides of the specified lengths (C99). More...
 
var hypot (const var &a, double b)
 Returns the length of the hypoteneuse of a right triangle with sides of the specified lengths (C99). More...
 
var hypot (double a, const var &b)
 Returns the length of the hypoteneuse of a right triangle with sides of the specified lengths (C99). More...
 
var ibeta (const var &a, const var &b, const var &x)
 The normalized incomplete beta function of a, b, and x. More...
 
var if_else (bool c, const var &y_true, const var &y_false)
 If the specified condition is true, return the first variable, otherwise return the second variable. More...
 
var if_else (bool c, double y_true, const var &y_false)
 If the specified condition is true, return a new variable constructed from the first scalar, otherwise return the second variable. More...
 
var if_else (bool c, const var &y_true, const double y_false)
 If the specified condition is true, return the first variable, otherwise return a new variable constructed from the second scalar. More...
 
var inc_beta (const stan::math::var &a, const stan::math::var &b, const stan::math::var &c)
 
var inv (const var &a)
 

+\[ \mbox{inv}(x) = \begin{cases} \frac{1}{x} & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+ More...
 
var inv_cloglog (const stan::math::var &a)
 Return the inverse complementary log-log function applied specified variable (stan). More...
 
var inv_logit (const stan::math::var &a)
 The inverse logit function for variables (stan). More...
 
var inv_Phi (const stan::math::var &p)
 The inverse of unit normal cumulative density function. More...
 
var inv_sqrt (const var &a)
 

+\[ \mbox{inv\_sqrt}(x) = \begin{cases} \frac{1}{\sqrt{x}} & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+ More...
 
var inv_square (const var &a)
 

+\[ \mbox{inv\_square}(x) = \begin{cases} \frac{1}{x^2} & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+ More...
 
int is_inf (const var &v)
 Returns 1 if the input's value is infinite and 0 otherwise. More...
 
bool is_nan (const var &v)
 Returns 1 if the input's value is NaN and 0 otherwise. More...
 
bool is_uninitialized (var x)
 Returns true if the specified variable is uninitialized. More...
 
var lgamma (const stan::math::var &a)
 The log gamma function for variables (C99). More...
 
var lmgamma (int a, const stan::math::var &b)
 
var log (const var &a)
 Return the natural log of the specified variable (cmath). More...
 
var log10 (const var &a)
 Return the base 10 log of the specified variable (cmath). More...
 
var log1m (const stan::math::var &a)
 The log (1 - x) function for variables. More...
 
var log1m_exp (const stan::math::var &a)
 Return the log of 1 minus the exponential of the specified variable. More...
 
var log1p (const stan::math::var &a)
 The log (1 + x) function for variables (C99). More...
 
var log1p_exp (const stan::math::var &a)
 Return the log of 1 plus the exponential of the specified variable. More...
 
var log2 (const stan::math::var &a)
 Returns the base 2 logarithm of the specified variable (C99). More...
 
var log_diff_exp (const stan::math::var &a, const stan::math::var &b)
 Returns the log sum of exponentials. More...
 
var log_diff_exp (const stan::math::var &a, const double &b)
 Returns the log sum of exponentials. More...
 
var log_diff_exp (const double &a, const stan::math::var &b)
 Returns the log sum of exponentials. More...
 
var log_falling_factorial (const var &a, const double &b)
 
var log_falling_factorial (const var &a, const var &b)
 
var log_falling_factorial (const double &a, const var &b)
 
void log_mix_partial_helper (const double &theta_val, const double &lambda1_val, const double &lambda2_val, double &one_m_exp_lam2_m_lam1, double &one_m_t_prod_exp_lam2_m_lam1, double &one_d_t_plus_one_m_t_prod_exp_lam2_m_lam1)
 
template<typename T_theta , typename T_lambda1 , typename T_lambda2 >
return_type< T_theta,
+T_lambda1, T_lambda2 >::type 
log_mix (const T_theta &theta, const T_lambda1 &lambda1, const T_lambda2 &lambda2)
 Return the log mixture density with specified mixing proportion and log densities and its derivative at each. More...
 
var log_rising_factorial (const var &a, const double &b)
 
var log_rising_factorial (const var &a, const var &b)
 
var log_rising_factorial (const double &a, const var &b)
 
var log_sum_exp (const stan::math::var &a, const stan::math::var &b)
 Returns the log sum of exponentials. More...
 
var log_sum_exp (const stan::math::var &a, const double &b)
 Returns the log sum of exponentials. More...
 
var log_sum_exp (const double &a, const stan::math::var &b)
 Returns the log sum of exponentials. More...
 
var modified_bessel_first_kind (const int &v, const var &a)
 
var modified_bessel_second_kind (const int &v, const var &a)
 
var multiply_log (const var &a, const var &b)
 Return the value of a*log(b). More...
 
var multiply_log (const var &a, const double b)
 Return the value of a*log(b). More...
 
var multiply_log (const double a, const var &b)
 Return the value of a*log(b). More...
 
var owens_t (const var &h, const var &a)
 The Owen's T function of h and a. More...
 
var owens_t (const var &h, double a)
 The Owen's T function of h and a. More...
 
var owens_t (double h, const var &a)
 The Owen's T function of h and a. More...
 
var Phi (const stan::math::var &a)
 The unit normal cumulative density function for variables (stan). More...
 
var Phi_approx (const stan::math::var &a)
 Approximation of the unit normal CDF for variables (stan). More...
 
var pow (const var &base, const var &exponent)
 Return the base raised to the power of the exponent (cmath). More...
 
var pow (const var &base, const double exponent)
 Return the base variable raised to the power of the exponent scalar (cmath). More...
 
var pow (const double base, const var &exponent)
 Return the base scalar raised to the power of the exponent variable (cmath). More...
 
double primitive_value (const var &v)
 Return the primitive double value for the specified auto-diff variable. More...
 
var rising_factorial (const var &a, const double &b)
 
var rising_factorial (const var &a, const var &b)
 
var rising_factorial (const double &a, const var &b)
 
var round (const var &a)
 Returns the rounded form of the specified variable (C99). More...
 
var sin (const var &a)
 Return the sine of a radian-scaled variable (cmath). More...
 
var sinh (const var &a)
 Return the hyperbolic sine of the specified variable (cmath). More...
 
var sqrt (const var &a)
 Return the square root of the specified variable (cmath). More...
 
var square (const var &x)
 Return the square of the input variable. More...
 
var step (const stan::math::var &a)
 Return the step, or heaviside, function applied to the specified variable (stan). More...
 
var tan (const var &a)
 Return the tangent of a radian-scaled variable (cmath). More...
 
var tanh (const var &a)
 Return the hyperbolic tangent of the specified variable (cmath). More...
 
var tgamma (const stan::math::var &a)
 Return the Gamma function applied to the specified variable (C99). More...
 
var trunc (const var &a)
 Returns the truncatation of the specified variable (C99). More...
 
double value_of (const var &v)
 Return the value of the specified variable. More...
 
double value_of_rec (const var &v)
 Return the value of the specified variable. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Variables

const double CONSTRAINT_TOLERANCE = 1E-8
 The tolerance for checking arithmetic bounds In rank and in simplexes. More...
 
const double E = boost::math::constants::e<double>()
 The base of the natural logarithm, $ e $. More...
 
const double SQRT_2 = std::sqrt(2.0)
 The value of the square root of 2, $ \sqrt{2} $. More...
 
const double INV_SQRT_2 = 1.0 / SQRT_2
 The value of 1 over the square root of 2, $ 1 / \sqrt{2} $. More...
 
const double LOG_2 = std::log(2.0)
 The natural logarithm of 2, $ \log 2 $. More...
 
const double LOG_10 = std::log(10.0)
 The natural logarithm of 10, $ \log 10 $. More...
 
const double INFTY = std::numeric_limits<double>::infinity()
 Positive infinity. More...
 
const double NEGATIVE_INFTY = - std::numeric_limits<double>::infinity()
 Negative infinity. More...
 
const double NOT_A_NUMBER = std::numeric_limits<double>::quiet_NaN()
 (Quiet) not-a-number value. More...
 
const double EPSILON = std::numeric_limits<double>::epsilon()
 Smallest positive value. More...
 
const double NEGATIVE_EPSILON = - std::numeric_limits<double>::epsilon()
 Largest negative value (i.e., smallest absolute value). More...
 
const double POISSON_MAX_RATE = std::pow(2.0, 30)
 Largest rate parameter allowed in Poisson RNG. More...
 
const double LOG_PI_OVER_FOUR = std::log(boost::math::constants::pi<double>()) / 4.0
 Log pi divided by 4 $ \log \pi / 4 $. More...
 
const double SQRT_PI = std::sqrt(boost::math::constants::pi<double>())
 
const double SQRT_2_TIMES_SQRT_PI = SQRT_2 * SQRT_PI
 
const double TWO_OVER_SQRT_PI = 2.0 / SQRT_PI
 
const double NEG_TWO_OVER_SQRT_PI = -TWO_OVER_SQRT_PI
 
const double INV_SQRT_TWO_PI = 1.0 / std::sqrt(2.0 * boost::math::constants::pi<double>())
 
const double LOG_PI = std::log(boost::math::constants::pi<double>())
 
const double LOG_SQRT_PI = std::log(SQRT_PI)
 
const double LOG_ZERO = std::log(0.0)
 
const double LOG_TWO = std::log(2.0)
 
const double LOG_HALF = std::log(0.5)
 
const double NEG_LOG_TWO = - LOG_TWO
 
const double NEG_LOG_SQRT_TWO_PI = - std::log(std::sqrt(2.0 * boost::math::constants::pi<double>()))
 
const double NEG_LOG_PI = - LOG_PI
 
const double NEG_LOG_SQRT_PI = -std::log(std::sqrt(boost::math::constants::pi<double>()))
 
const double NEG_LOG_TWO_OVER_TWO = - LOG_TWO / 2.0
 
const double LOG_TWO_PI = LOG_TWO + LOG_PI
 
const double NEG_LOG_TWO_PI = - LOG_TWO_PI
 
const std::string MAJOR_VERSION = STAN_STRING(STAN_MATH_MAJOR)
 Major version number for Stan math library. More...
 
const std::string MINOR_VERSION = STAN_STRING(STAN_MATH_MINOR)
 Minor version number for Stan math library. More...
 
const std::string PATCH_VERSION = STAN_STRING(STAN_MATH_PATCH)
 Patch version for Stan math library. More...
 
+

Detailed Description

+

Matrices and templated mathematical functions.

+

Templated probability distributions. All paramaterizations are based on Bayesian Data Analysis. Function gradients via reverse-mode automatic differentiation.

+

Typedef Documentation

+ +
+
+ +

Definition at line 11 of file chainablestack.hpp.

+ +
+
+ +
+
+ + + + +
typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> stan::math::matrix_d
+
+ +

Type for matrix of double values.

+ +

Definition at line 23 of file typedefs.hpp.

+ +
+
+ +
+
+ + + + +
typedef Eigen::Matrix<fvar<double>, Eigen::Dynamic, Eigen::Dynamic> stan::math::matrix_fd
+
+ +

Definition at line 17 of file typedefs.hpp.

+ +
+
+ +
+
+ + + + +
typedef Eigen::Matrix<fvar<fvar<double> >, Eigen::Dynamic, Eigen::Dynamic> stan::math::matrix_ffd
+
+ +

Definition at line 21 of file typedefs.hpp.

+ +
+
+ +
+
+ + + + +
typedef Eigen::Matrix<fvar<fvar<var> >, Eigen::Dynamic, Eigen::Dynamic> stan::math::matrix_ffv
+
+ +

Definition at line 18 of file typedefs.hpp.

+ +
+
+ +
+
+ + + + +
typedef Eigen::Matrix<fvar<var>, Eigen::Dynamic, Eigen::Dynamic> stan::math::matrix_fv
+
+ +

Definition at line 14 of file typedefs.hpp.

+ +
+
+ +
+
+ + + + +
typedef Eigen::Matrix<var, Eigen::Dynamic, Eigen::Dynamic> stan::math::matrix_v
+
+ +

The type of a matrix holding stan::math::var values.

+ +

Definition at line 21 of file typedefs.hpp.

+ +
+
+ +
+
+ + + + +
typedef Eigen::Matrix<double, 1, Eigen::Dynamic> stan::math::row_vector_d
+
+ +

Type for (row) vector of double values.

+ +

Definition at line 37 of file typedefs.hpp.

+ +
+
+ +
+
+ + + + +
typedef Eigen::Matrix<fvar<double>, 1, Eigen::Dynamic> stan::math::row_vector_fd
+
+ +

Definition at line 33 of file typedefs.hpp.

+ +
+
+ +
+
+ + + + +
typedef Eigen::Matrix<fvar<fvar<double> >, 1, Eigen::Dynamic> stan::math::row_vector_ffd
+
+ +

Definition at line 37 of file typedefs.hpp.

+ +
+
+ +
+
+ + + + +
typedef Eigen::Matrix<fvar<fvar<var> >, 1, Eigen::Dynamic> stan::math::row_vector_ffv
+
+ +

Definition at line 34 of file typedefs.hpp.

+ +
+
+ +
+
+ + + + +
typedef Eigen::Matrix<fvar<var>, 1, Eigen::Dynamic> stan::math::row_vector_fv
+
+ +

Definition at line 30 of file typedefs.hpp.

+ +
+
+ +
+
+ + + + +
typedef Eigen::Matrix<var, 1, Eigen::Dynamic> stan::math::row_vector_v
+
+ +

The type of a row vector holding stan::math::var values.

+ +

Definition at line 37 of file typedefs.hpp.

+ +
+
+ +
+
+ + + + +
typedef Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index stan::math::size_type
+
+ +

Type for sizes and indexes in an Eigen matrix with double e.

+ +

Definition at line 13 of file typedefs.hpp.

+ +
+
+ +
+
+ + + + +
typedef Eigen::Matrix<double, Eigen::Dynamic, 1> stan::math::vector_d
+
+ +

Type for (column) vector of double values.

+ +

Definition at line 30 of file typedefs.hpp.

+ +
+
+ +
+
+ + + + +
typedef Eigen::Matrix<fvar<double>, Eigen::Dynamic, 1> stan::math::vector_fd
+
+ +

Definition at line 25 of file typedefs.hpp.

+ +
+
+ +
+
+ + + + +
typedef Eigen::Matrix<fvar<fvar<double> >, Eigen::Dynamic, 1> stan::math::vector_ffd
+
+ +

Definition at line 29 of file typedefs.hpp.

+ +
+
+ +
+
+ + + + +
typedef Eigen::Matrix<fvar<fvar<var> >, Eigen::Dynamic, 1> stan::math::vector_ffv
+
+ +

Definition at line 26 of file typedefs.hpp.

+ +
+
+ +
+
+ + + + +
typedef Eigen::Matrix<fvar<var>, Eigen::Dynamic, 1> stan::math::vector_fv
+
+ +

Definition at line 22 of file typedefs.hpp.

+ +
+
+ +
+
+ + + + +
typedef Eigen::Matrix<var, Eigen::Dynamic, 1> stan::math::vector_v
+
+ +

The type of a (column) vector holding stan::math::var values.

+ +

Definition at line 29 of file typedefs.hpp.

+ +
+
+

Function Documentation

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::abs (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 15 of file abs.hpp.

+ +
+
+ +
+
+ + + + + + + + +
double stan::math::abs (double x)
+
+ +

Return floating-point absolute value.

+

Delegates to fabs(double) rather than std::abs(int).

+
Parameters
+ + +
xscalar
+
+
+
Returns
absolute value of scalar
+ +

Definition at line 19 of file abs.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::abs (const var & a)
+
+inline
+
+ +

Return the absolute value of the variable (std).

+

Delegates to fabs() (see for doc).

+

+\[ \mbox{abs}(x) = \begin{cases} |x| & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{abs}(x)}{\partial x} = \begin{cases} -1 & \mbox{if } x < 0 \\ 0 & \mbox{if } x = 0 \\ 1 & \mbox{if } x > 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
aVariable input.
+
+
+
Returns
Absolute value of variable.
+ +

Definition at line 35 of file abs.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::acos (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 14 of file acos.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::acos (const var & a)
+
+inline
+
+ +

Return the principal value of the arc cosine of a variable, in radians (cmath).

+

The derivative is defined by

+

$\frac{d}{dx} \arccos x = \frac{-1}{\sqrt{1 - x^2}}$.

+

+\[ \mbox{acos}(x) = \begin{cases} \textrm{NaN} & \mbox{if } x < -1\\ \arccos(x) & \mbox{if } -1\leq x\leq 1 \\ \textrm{NaN} & \mbox{if } x > 1\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{acos}(x)}{\partial x} = \begin{cases} \textrm{NaN} & \mbox{if } x < -1\\ \frac{\partial\, \arccos(x)}{\partial x} & \mbox{if } -1\leq x\leq 1 \\ \textrm{NaN} & \mbox{if } x < -1\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial \, \arccos(x)}{\partial x} = -\frac{1}{\sqrt{1-x^2}} \] +

+
Parameters
+ + +
aVariable in range [-1, 1].
+
+
+
Returns
Arc cosine of variable, in radians.
+ +

Definition at line 59 of file acos.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::acosh (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 14 of file acosh.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::acosh (const var & a)
+
+inline
+
+ +

The inverse hyperbolic cosine function for variables (C99).

+

For non-variable function, see acosh().

+

The derivative is defined by

+

$\frac{d}{dx} \mbox{acosh}(x) = \frac{x}{x^2 - 1}$.

+

+\[ \mbox{acosh}(x) = \begin{cases} \textrm{NaN} & \mbox{if } x < 1 \\ \cosh^{-1}(x) & \mbox{if } x \geq 1 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{acosh}(x)}{\partial x} = \begin{cases} \textrm{NaN} & \mbox{if } x < 1 \\ \frac{\partial\, \cosh^{-1}(x)}{\partial x} & \mbox{if } x \geq 1 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \cosh^{-1}(x)=\ln\left(x+\sqrt{x^2-1}\right) \] +

+

+\[ \frac{\partial \, \cosh^{-1}(x)}{\partial x} = \frac{1}{\sqrt{x^2-1}} \] +

+
Parameters
+ + +
aThe variable.
+
+
+
Returns
Inverse hyperbolic cosine of the variable.
+ +

Definition at line 68 of file acosh.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R, C> stan::math::add (const Eigen::Matrix< T1, R, C > & m1,
const Eigen::Matrix< T2, R, C > & m2 
)
+
+inline
+
+ +

Return the sum of the specified matrices.

+

The two matrices must have the same dimensions.

+
Template Parameters
+ + + + + +
T1Scalar type of first matrix.
T2Scalar type of second matrix.
RRow type of matrices.
CColumn type of matrices.
+
+
+
Parameters
+ + + +
m1First matrix.
m2Second matrix.
+
+
+
Returns
Sum of the matrices.
+
Exceptions
+ + +
std::invalid_argumentif m1 and m2 do not have the same dimensions.
+
+
+ +

Definition at line 27 of file add.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R, C> stan::math::add (const Eigen::Matrix< T1, R, C > & m,
const T2 & c 
)
+
+inline
+
+ +

Return the sum of the specified matrix and specified scalar.

+
Template Parameters
+ + + +
T1Scalar type of matrix.
T2Type of scalar.
+
+
+
Parameters
+ + + +
mMatrix.
cScalar.
+
+
+
Returns
The matrix plus the scalar.
+ +

Definition at line 52 of file add.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R, C> stan::math::add (const T1 & c,
const Eigen::Matrix< T2, R, C > & m 
)
+
+inline
+
+ +

Return the sum of the specified scalar and specified matrix.

+
Template Parameters
+ + + +
T1Type of scalar.
T2Scalar type of matrix.
+
+
+
Parameters
+ + + +
cScalar.
mMatrix.
+
+
+
Returns
The scalar plus the matrix.
+ +

Definition at line 74 of file add.hpp.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void stan::math::add_initial_values (const std::vector< stan::math::var > & y0,
std::vector< std::vector< stan::math::var > > & y 
)
+
+ +

Increment the state derived from the coupled system in the with the original initial state.

+

This is necessary because the coupled system subtracts out the initial state in its representation when the initial state is unknown.

+
Parameters
+ + + +
[in]y0original initial values to add back into the coupled system.
[in,out]ystate of the coupled system on input, incremented with initial values on output.
+
+
+ +

Definition at line 31 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename return_type<T1, T2>::type, Eigen::Dynamic, Eigen::Dynamic> stan::math::append_col (const Eigen::Matrix< T1, R1, C1 > & A,
const Eigen::Matrix< T2, R2, C2 > & B 
)
+
+inline
+
+ +

Return the result of appending the second argument matrix after the first argument matrix, that is, putting them side by side, with the first matrix followed by the second matrix.

+

The inputs can be (matrix, matrix), (matrix, vector), (vector, matrix), or (vector, vector) and the output is always a matrix.

+
Template Parameters
+ + + + + + + +
T1Scalar type of first matrix.
T2Scalar type of second matrix.
R1Row specification of first matrix.
C1Column specification of first matrix.
R2Row specification of second matrix.
C2Column specification of second matrix.
+
+
+
Parameters
+ + + +
AFirst matrix.
BSecond matrix.
+
+
+
Returns
Result of appending the first matrix followed by the second matrix side by side.
+ +

Definition at line 39 of file append_col.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , int C1, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename return_type<T1, T2>::type, 1, Eigen::Dynamic> stan::math::append_col (const Eigen::Matrix< T1, 1, C1 > & A,
const Eigen::Matrix< T2, 1, C2 > & B 
)
+
+inline
+
+ +

Return the result of concatenaing the first row vector followed by the second row vector side by side, with the result being a row vector.

+

This function applies to (row_vector, row_vector) and returns a row_vector.

+
Template Parameters
+ + + + + +
T1Scalar type of first row vector.
T2Scalar type of second row vector.
C1Column specification of first row vector.
C2Column specification of second row vector.
+
+
+
Parameters
+ + + +
AFirst vector.
BSecond vector
+
+
+
Returns
Result of appending the second row vector to the right of the first row vector.
+ +

Definition at line 85 of file append_col.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::append_col (const Eigen::Matrix< T, R1, C1 > & A,
const Eigen::Matrix< T, R2, C2 > & B 
)
+
+inline
+
+ +

Return the result of appending the second argument matrix after the first argument matrix, that is, putting them side by side, with the first matrix followed by the second matrix.

+

This is an overloaded template function for the case when both matrices have the same type.

+

The inputs can be (matrix, matrix), (matrix, vector), (vector, matrix), or (vector, vector), and the output is always a matrix.

+
Template Parameters
+ + + + + + +
TScalar type of both matrices.
R1Row specification of first matrix.
C1Column specification of first matrix.
R2Row specification of second matrix.
C2Column specification of second matrix.
+
+
+
Parameters
+ + + +
AFirst matrix.
BSecond matrix.
+
+
+
Returns
Result of appending the first matrix followed by the second matrix side by side.
+ +

Definition at line 128 of file append_col.hpp.

+ +
+
+ +
+
+
+template<typename T , int C1, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, 1, Eigen::Dynamic> stan::math::append_col (const Eigen::Matrix< T, 1, C1 > & A,
const Eigen::Matrix< T, 1, C2 > & B 
)
+
+inline
+
+ +

Return the result of concatenaing the first row vector followed by the second row vector side by side, with the result being a row vector.

+

This function applies to (row_vector, row_vector) and returns a row_vector.

+
Template Parameters
+ + + + +
TScalar type of both vectors.
C1Column specification of first row vector.
C2Column specification of second row vector.
+
+
+
Parameters
+ + + +
AFirst vector.
BSecond vector
+
+
+
Returns
Result of appending the second row vector to the right of the first row vector.
+ +

Definition at line 160 of file append_col.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename return_type<T1, T2>::type, Eigen::Dynamic, Eigen::Dynamic> stan::math::append_row (const Eigen::Matrix< T1, R1, C1 > & A,
const Eigen::Matrix< T2, R2, C2 > & B 
)
+
+inline
+
+ +

Return the result of stacking the rows of the first argument matrix on top of the second argument matrix.

+

The inputs can be (matrix, matrix), (matrix, row_vector), (row_vector, matrix), or (row_vector, row_vector), and the output is always a matrix.

+
Template Parameters
+ + + + + + + +
T1Scalar type of first matrix.
T2Scalar type of second matrix.
R1Row specification of first matrix.
C1Column specification of first matrix.
R2Row specification of second matrix.
C2Column specification of second matrix.
+
+
+
Parameters
+ + + +
AFirst matrix.
BSecond matrix.
+
+
+
Returns
Result of stacking first matrix on top of second.
+ +

Definition at line 37 of file append_row.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , int R1, int R2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename return_type<T1, T2>::type, Eigen::Dynamic, 1> stan::math::append_row (const Eigen::Matrix< T1, R1, 1 > & A,
const Eigen::Matrix< T2, R2, 1 > & B 
)
+
+inline
+
+ +

Return the result of stacking the first vector on top of the second vector, with the result being a vector.

+

This function applies to (vector, vector) and returns a vector.

+
Template Parameters
+ + + + + +
T1Scalar type of first vector.
T2Scalar type of second vector.
R1Row specification of first vector.
R2Row specification of second vector.
+
+
+
Parameters
+ + + +
AFirst vector.
BSecond vector
+
+
+
Returns
Result of stacking first vector on top of the second vector.
+ +

Definition at line 80 of file append_row.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::append_row (const Eigen::Matrix< T, R1, C1 > & A,
const Eigen::Matrix< T, R2, C2 > & B 
)
+
+inline
+
+ +

Return the result of stacking the rows of the first argument matrix on top of the second argument matrix.

+

This is an overload for the case when the scalar types of the two input matrix are the same.

+

The inputs can be (matrix, matrix), (matrix, row_vector), (row_vector, matrix), or (row_vector, row_vector), and the output is always a matrix.

+
Template Parameters
+ + + + + + +
TScalar type of both matrices.
R1Row specification of first matrix.
C1Column specification of first matrix.
R2Row specification of second matrix.
C2Column specification of second matrix.
+
+
+
Parameters
+ + + +
AFirst matrix.
BSecond matrix.
+
+
+
Returns
Result of stacking first matrix on top of second.
+ +

Definition at line 121 of file append_row.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int R2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::append_row (const Eigen::Matrix< T, R1, 1 > & A,
const Eigen::Matrix< T, R2, 1 > & B 
)
+
+inline
+
+ +

Return the result of stacking the first vector on top of the second vector, with the result being a vector.

+

This is an overloaded template function for the case where both inputs have the same scalar type.

+

This function applies to (vector, vector) and returns a vector.

+
Template Parameters
+ + + + +
TScalar type of both vectors.
R1Row specification of first vector.
R2Row specification of second vector.
+
+
+
Parameters
+ + + +
AFirst vector.
BSecond vector
+
+
+
Returns
Result of stacking first vector on top of the second vector.
+ +

Definition at line 155 of file append_row.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
bool stan::math::as_bool (const T x)
+
+inline
+
+ +

Return 1 if the argument is unequal to zero and 0 otherwise.

+
Parameters
+ + +
xValue.
+
+
+
Returns
1 if argument is equal to zero (or NaN) and 0 otherwise.
+ +

Definition at line 14 of file as_bool.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
int stan::math::as_bool (const var & v)
+
+inline
+
+ +

Return 1 if the argument is unequal to zero and 0 otherwise.

+
Parameters
+ + +
vValue.
+
+
+
Returns
1 if argument is equal to zero (or NaN) and 0 otherwise.
+ +

Definition at line 15 of file as_bool.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::asin (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 12 of file asin.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::asin (const var & a)
+
+inline
+
+ +

Return the principal value of the arc sine, in radians, of the specified variable (cmath).

+

The derivative is defined by

+

$\frac{d}{dx} \arcsin x = \frac{1}{\sqrt{1 - x^2}}$.

+

+\[ \mbox{asin}(x) = \begin{cases} \textrm{NaN} & \mbox{if } x < -1\\ \arcsin(x) & \mbox{if } -1\leq x\leq 1 \\ \textrm{NaN} & \mbox{if } x > 1\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{asin}(x)}{\partial x} = \begin{cases} \textrm{NaN} & \mbox{if } x < -1\\ \frac{\partial\, \arcsin(x)}{\partial x} & \mbox{if } -1\leq x\leq 1 \\ \textrm{NaN} & \mbox{if } x < -1\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial \, \arcsin(x)}{\partial x} = \frac{1}{\sqrt{1-x^2}} \] +

+
Parameters
+ + +
aVariable in range [-1, 1].
+
+
+
Returns
Arc sine of variable, in radians.
+ +

Definition at line 58 of file asin.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::asinh (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 13 of file asinh.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::asinh (const var & a)
+
+inline
+
+ +

The inverse hyperbolic sine function for variables (C99).

+

For non-variable function, see asinh().

+

The derivative is defined by

+

$\frac{d}{dx} \mbox{asinh}(x) = \frac{x}{x^2 + 1}$.

+

+\[ \mbox{asinh}(x) = \begin{cases} \sinh^{-1}(x) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{asinh}(x)}{\partial x} = \begin{cases} \frac{\partial\, \sinh^{-1}(x)}{\partial x} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \sinh^{-1}(x)=\ln\left(x+\sqrt{x^2+1}\right) \] +

+

+\[ \frac{\partial \, \sinh^{-1}(x)}{\partial x} = \frac{1}{\sqrt{x^2+1}} \] +

+
Parameters
+ + +
aThe variable.
+
+
+
Returns
Inverse hyperbolic sine of the variable.
+ +

Definition at line 67 of file asinh.hpp.

+ +
+
+ +
+
+
+template<typename LHS , typename RHS >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void stan::math::assign (LHS & lhs,
const RHS & rhs 
)
+
+inline
+
+ +

Copy the right-hand side's value to the left-hand side variable.

+

The assign() function is overloaded. This instance will match arguments where the right-hand side is assignable to the left and they are not both std::vector or Eigen::Matrix types.

+
Template Parameters
+ + + +
LHSType of left-hand side.
RHSType of right-hand side.
+
+
+
Parameters
+ + + +
lhsLeft-hand side.
rhsRight-hand side.
+
+
+ +

Definition at line 51 of file assign.hpp.

+ +
+
+ +
+
+
+template<typename LHS , typename RHS , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void stan::math::assign (Eigen::Matrix< LHS, R1, C1 > & x,
const Eigen::Matrix< RHS, R2, C2 > & y 
)
+
+inline
+
+ +

Copy the right-hand side's value to the left-hand side variable.

+

The assign() function is overloaded. This instance will be called for arguments that are both Eigen::Matrix types, but whose shapes are not compatible. The shapes are specified in the row and column template parameters.

+
Template Parameters
+ + + + + + + +
LHSType of left-hand side matrix elements.
RHSType of right-hand side matrix elements.
R1Row shape of left-hand side matrix.
C1Column shape of left-hand side matrix.
R2Row shape of right-hand side matrix.
C2Column shape of right-hand side matrix.
+
+
+
Parameters
+ + + +
xLeft-hand side matrix.
yRight-hand side matrix.
+
+
+
Exceptions
+ + +
std::invalid_argument
+
+
+ +

Definition at line 77 of file assign.hpp.

+ +
+
+ +
+
+
+template<typename LHS , typename RHS , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void stan::math::assign (Eigen::Matrix< LHS, R, C > & x,
const Eigen::Matrix< RHS, R, C > & y 
)
+
+inline
+
+ +

Copy the right-hand side's value to the left-hand side variable.

+

The assign() function is overloaded. This instance will be called for arguments that are both Eigen::Matrix types and whose shapes match. The shapes are specified in the row and column template parameters.

+
Template Parameters
+ + + + + +
LHSType of left-hand side matrix elements.
RHSType of right-hand side matrix elements.
RRow shape of both matrices.
CColumn shape of both mtarices.
+
+
+
Parameters
+ + + +
xLeft-hand side matrix.
yRight-hand side matrix.
+
+
+
Exceptions
+ + +
std::invalid_argumentif sizes do not match.
+
+
+ +

Definition at line 113 of file assign.hpp.

+ +
+
+ +
+
+
+template<typename LHS , typename RHS , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void stan::math::assign (Eigen::Block< LHS > x,
const Eigen::Matrix< RHS, R, C > & y 
)
+
+inline
+
+ +

Copy the right-hand side's value to the left-hand side variable.

+

The assign() function is overloaded. This instance will be called for arguments that are both Eigen::Matrix types and whose shapes match. The shape of the right-hand side matrix is specified in the row and column shape template parameters.

+
Template Parameters
+ + + + + +
LHSType of matrix block elements.
RHSType of right-hand side matrix elements.
RRow shape for right-hand side matrix.
CColumn shape for right-hand side matrix.
+
+
+
Parameters
+ + + +
xLeft-hand side block view of matrix.
yRight-hand side matrix.
+
+
+
Exceptions
+ + +
std::invalid_argumentif sizes do not match.
+
+
+ +

Definition at line 142 of file assign.hpp.

+ +
+
+ +
+
+
+template<typename LHS , typename RHS >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void stan::math::assign (std::vector< LHS > & x,
const std::vector< RHS > & y 
)
+
+inline
+
+ +

Copy the right-hand side's value to the left-hand side variable.

+

The assign() function is overloaded. This instance will be called for arguments that are both std::vector, and will call assign() element-by element.

+

For example, a std::vector<int> can be assigned to a std::vector<double> using this function.

+
Template Parameters
+ + + +
LHSType of left-hand side vector elements.
RHSType of right-hand side vector elements.
+
+
+
Parameters
+ + + +
xLeft-hand side vector.
yRight-hand side vector.
+
+
+
Exceptions
+ + +
std::invalid_argumentif sizes do not match.
+
+
+ +

Definition at line 177 of file assign.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::atan (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 12 of file atan.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::atan (const var & a)
+
+inline
+
+ +

Return the principal value of the arc tangent, in radians, of the specified variable (cmath).

+

The derivative is defined by

+

$\frac{d}{dx} \arctan x = \frac{1}{1 + x^2}$.

+

+\[ \mbox{atan}(x) = \begin{cases} \arctan(x) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{atan}(x)}{\partial x} = \begin{cases} \frac{\partial\, \arctan(x)}{\partial x} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial \, \arctan(x)}{\partial x} = \frac{1}{x^2+1} \] +

+
Parameters
+ + +
aVariable in range [-1, 1].
+
+
+
Returns
Arc tangent of variable, in radians.
+ +

Definition at line 55 of file atan.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::atan2 (const fvar< T > & x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 12 of file atan2.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::atan2 (const double x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 21 of file atan2.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::atan2 (const fvar< T > & x1,
const double x2 
)
+
+inline
+
+ +

Definition at line 29 of file atan2.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::atan2 (const var & a,
const var & b 
)
+
+inline
+
+ +

Return the principal value of the arc tangent, in radians, of the first variable divided by the second (cmath).

+

The partial derivatives are defined by

+

$ \frac{\partial}{\partial x} \arctan \frac{x}{y} = \frac{y}{x^2 + y^2}$, and

+

$ \frac{\partial}{\partial y} \arctan \frac{x}{y} = \frac{-x}{x^2 + y^2}$.

+
Parameters
+ + + +
aNumerator variable.
bDenominator variable.
+
+
+
Returns
The arc tangent of the fraction, in radians.
+ +

Definition at line 62 of file atan2.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::atan2 (const var & a,
const double b 
)
+
+inline
+
+ +

Return the principal value of the arc tangent, in radians, of the first variable divided by the second scalar (cmath).

+

The derivative with respect to the variable is

+

$ \frac{d}{d x} \arctan \frac{x}{c} = \frac{c}{x^2 + c^2}$.

+
Parameters
+ + + +
aNumerator variable.
bDenominator scalar.
+
+
+
Returns
The arc tangent of the fraction, in radians.
+ +

Definition at line 78 of file atan2.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::atan2 (const double a,
const var & b 
)
+
+inline
+
+ +

Return the principal value of the arc tangent, in radians, of the first scalar divided by the second variable (cmath).

+

The derivative with respect to the variable is

+

$ \frac{\partial}{\partial y} \arctan \frac{c}{y} = \frac{-c}{c^2 + y^2}$.

+

+\[ \mbox{atan2}(x, y) = \begin{cases} \arctan\left(\frac{x}{y}\right) & \mbox{if } -\infty\leq x \leq \infty, -\infty\leq y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{atan2}(x, y)}{\partial x} = \begin{cases} \frac{y}{x^2+y^2} & \mbox{if } -\infty\leq x\leq \infty, -\infty\leq y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{atan2}(x, y)}{\partial y} = \begin{cases} -\frac{x}{x^2+y^2} & \mbox{if } -\infty\leq x\leq \infty, -\infty\leq y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + + +
aNumerator scalar.
bDenominator variable.
+
+
+
Returns
The arc tangent of the fraction, in radians.
+ +

Definition at line 119 of file atan2.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::atanh (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 13 of file atanh.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::atanh (const var & a)
+
+inline
+
+ +

The inverse hyperbolic tangent function for variables (C99).

+

For non-variable function, see atanh().

+

The derivative is defined by

+

$\frac{d}{dx} \mbox{atanh}(x) = \frac{1}{1 - x^2}$.

+

+\[ \mbox{atanh}(x) = \begin{cases} \textrm{NaN} & \mbox{if } x < -1\\ \tanh^{-1}(x) & \mbox{if } -1\leq x \leq 1 \\ \textrm{NaN} & \mbox{if } x > 1\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{atanh}(x)}{\partial x} = \begin{cases} \textrm{NaN} & \mbox{if } x < -1\\ \frac{\partial\, \tanh^{-1}(x)}{\partial x} & \mbox{if } -1\leq x\leq 1 \\ \textrm{NaN} & \mbox{if } x > 1\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \tanh^{-1}(x)=\frac{1}{2}\ln\left(\frac{1+x}{1-x}\right) \] +

+

+\[ \frac{\partial \, \tanh^{-1}(x)}{\partial x} = \frac{1}{1-x^2} \] +

+
Parameters
+ + +
aThe variable.
+
+
+
Returns
Inverse hyperbolic tangent of the variable.
+ +

Definition at line 70 of file atanh.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::autocorrelation (const std::vector< T > & y,
std::vector< T > & ac,
Eigen::FFT< T > & fft 
)
+
+ +

Write autocorrelation estimates for every lag for the specified input sequence into the specified result using the specified FFT engine.

+

The return vector be resized to the same length as the input sequence with lags given by array index.

+

The implementation involves a fast Fourier transform, followed by a normalization, followed by an inverse transform.

+

An FFT engine can be created for reuse for type double with:

+
+    Eigen::FFT<double> fft;
+
Template Parameters
+ + +
TScalar type.
+
+
+
Parameters
+ + + + +
yInput sequence.
acAutocorrelations.
fftFFT engine instance.
+
+
+ +

Definition at line 54 of file autocorrelation.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + +
void stan::math::autocorrelation (const std::vector< T > & y,
std::vector< T > & ac 
)
+
+ +

Write autocorrelation estimates for every lag for the specified input sequence into the specified result.

+

The return vector be resized to the same length as the input sequence with lags given by array index.

+

The implementation involves a fast Fourier transform, followed by a normalization, followed by an inverse transform.

+

This method is just a light wrapper around the three-argument autocorrelation function

+
Template Parameters
+ + +
TScalar type.
+
+
+
Parameters
+ + + +
yInput sequence.
acAutocorrelations.
+
+
+ +

Definition at line 123 of file autocorrelation.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::autocovariance (const std::vector< T > & y,
std::vector< T > & acov,
Eigen::FFT< T > & fft 
)
+
+ +

Write autocovariance estimates for every lag for the specified input sequence into the specified result using the specified FFT engine.

+

The return vector be resized to the same length as the input sequence with lags given by array index.

+

The implementation involves a fast Fourier transform, followed by a normalization, followed by an inverse transform.

+

An FFT engine can be created for reuse for type double with:

+
+    Eigen::FFT<double> fft;
+
Template Parameters
+ + +
TScalar type.
+
+
+
Parameters
+ + + + +
yInput sequence.
acovAutocovariance.
fftFFT engine instance.
+
+
+ +

Definition at line 34 of file autocovariance.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + +
void stan::math::autocovariance (const std::vector< T > & y,
std::vector< T > & acov 
)
+
+ +

Write autocovariance estimates for every lag for the specified input sequence into the specified result.

+

The return vector be resized to the same length as the input sequence with lags given by array index.

+

The implementation involves a fast Fourier transform, followed by a normalization, followed by an inverse transform.

+

This method is just a light wrapper around the three-argument autocovariance function

+
Template Parameters
+ + +
TScalar type.
+
+
+
Parameters
+ + + +
yInput sequence.
acovAutocovariances.
+
+
+ +

Definition at line 62 of file autocovariance.hpp.

+ +
+
+ +
+
+
+template<typename T_n , typename T_prob >
+ + + + + + + + + + + + + + + + + + +
return_type<T_prob>::type stan::math::bernoulli_ccdf_log (const T_n & n,
const T_prob & theta 
)
+
+ +

Definition at line 24 of file bernoulli_ccdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T_n , typename T_prob >
+ + + + + + + + + + + + + + + + + + +
return_type<T_prob>::type stan::math::bernoulli_cdf (const T_n & n,
const T_prob & theta 
)
+
+ +

Definition at line 24 of file bernoulli_cdf.hpp.

+ +
+
+ +
+
+
+template<typename T_n , typename T_prob >
+ + + + + + + + + + + + + + + + + + +
return_type<T_prob>::type stan::math::bernoulli_cdf_log (const T_n & n,
const T_prob & theta 
)
+
+ +

Definition at line 24 of file bernoulli_cdf_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_n , typename T_prob >
+ + + + + + + + + + + + + + + + + + +
return_type<T_prob>::type stan::math::bernoulli_log (const T_n & n,
const T_prob & theta 
)
+
+ +

Definition at line 26 of file bernoulli_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_prob >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
return_type<T_prob>::type stan::math::bernoulli_log (const T_y & n,
const T_prob & theta 
)
+
+inline
+
+ +

Definition at line 120 of file bernoulli_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_n , typename T_prob >
+ + + + + + + + + + + + + + + + + + +
return_type<T_prob>::type stan::math::bernoulli_logit_log (const T_n & n,
const T_prob & theta 
)
+
+ +

Definition at line 26 of file bernoulli_logit_log.hpp.

+ +
+
+ +
+
+
+template<typename T_n , typename T_prob >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
return_type<T_prob>::type stan::math::bernoulli_logit_log (const T_n & n,
const T_prob & theta 
)
+
+inline
+
+ +

Definition at line 104 of file bernoulli_logit_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int stan::math::bernoulli_rng (const double theta,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 23 of file bernoulli_rng.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::bessel_first_kind (int v,
const fvar< T > & z 
)
+
+inline
+
+ +

Definition at line 15 of file bessel_first_kind.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::bessel_first_kind (const int & v,
const var & a 
)
+
+inline
+
+ +

Definition at line 27 of file bessel_first_kind.hpp.

+ +
+
+ +
+
+
+template<typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
T2 stan::math::bessel_first_kind (const int v,
const T2 z 
)
+
+inline
+
+ +

+\[ \mbox{bessel\_first\_kind}(v, x) = \begin{cases} J_v(x) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{error} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+

+\[ \frac{\partial\, \mbox{bessel\_first\_kind}(v, x)}{\partial x} = \begin{cases} \frac{\partial\, J_v(x)}{\partial x} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{error} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ J_v(x)=\left(\frac{1}{2}x\right)^v \sum_{k=0}^\infty \frac{\left(-\frac{1}{4}x^2\right)^k}{k!\, \Gamma(v+k+1)} \] +

+

+\[ \frac{\partial \, J_v(x)}{\partial x} = \frac{v}{x}J_v(x)-J_{v+1}(x) \] +

+ +

Definition at line 40 of file bessel_first_kind.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::bessel_second_kind (int v,
const fvar< T > & z 
)
+
+inline
+
+ +

Definition at line 15 of file bessel_second_kind.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::bessel_second_kind (const int & v,
const var & a 
)
+
+inline
+
+ +

Definition at line 27 of file bessel_second_kind.hpp.

+ +
+
+ +
+
+
+template<typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
T2 stan::math::bessel_second_kind (const int v,
const T2 z 
)
+
+inline
+
+ +

+\[ \mbox{bessel\_second\_kind}(v, x) = \begin{cases} \textrm{error} & \mbox{if } x \leq 0 \\ Y_v(x) & \mbox{if } x > 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+

+\[ \frac{\partial\, \mbox{bessel\_second\_kind}(v, x)}{\partial x} = \begin{cases} \textrm{error} & \mbox{if } x \leq 0 \\ \frac{\partial\, Y_v(x)}{\partial x} & \mbox{if } x > 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ Y_v(x)=\frac{J_v(x)\cos(v\pi)-J_{-v}(x)}{\sin(v\pi)} \] +

+

+\[ \frac{\partial \, Y_v(x)}{\partial x} = \frac{v}{x}Y_v(x)-Y_{v+1}(x) \] +

+ +

Definition at line 40 of file bessel_second_kind.hpp.

+ +
+
+ +
+
+
+template<typename T_n , typename T_N , typename T_size1 , typename T_size2 >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_size1, T_size2>::type stan::math::beta_binomial_ccdf_log (const T_n & n,
const T_N & N,
const T_size1 & alpha,
const T_size2 & beta 
)
+
+ +

Definition at line 28 of file beta_binomial_ccdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T_n , typename T_N , typename T_size1 , typename T_size2 >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_size1, T_size2>::type stan::math::beta_binomial_cdf (const T_n & n,
const T_N & N,
const T_size1 & alpha,
const T_size2 & beta 
)
+
+ +

Definition at line 29 of file beta_binomial_cdf.hpp.

+ +
+
+ +
+
+
+template<typename T_n , typename T_N , typename T_size1 , typename T_size2 >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_size1, T_size2>::type stan::math::beta_binomial_cdf_log (const T_n & n,
const T_N & N,
const T_size1 & alpha,
const T_size2 & beta 
)
+
+ +

Definition at line 28 of file beta_binomial_cdf_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_n , typename T_N , typename T_size1 , typename T_size2 >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_size1, T_size2>::type stan::math::beta_binomial_log (const T_n & n,
const T_N & N,
const T_size1 & alpha,
const T_size2 & beta 
)
+
+ +

Definition at line 30 of file beta_binomial_log.hpp.

+ +
+
+ +
+
+
+template<typename T_n , typename T_N , typename T_size1 , typename T_size2 >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_size1, T_size2>::type stan::math::beta_binomial_log (const T_n & n,
const T_N & N,
const T_size1 & alpha,
const T_size2 & beta 
)
+
+ +

Definition at line 175 of file beta_binomial_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int stan::math::beta_binomial_rng (const int N,
const double alpha,
const double beta,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 26 of file beta_binomial_rng.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_scale_succ , typename T_scale_fail >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_scale_succ, T_scale_fail>::type stan::math::beta_ccdf_log (const T_y & y,
const T_scale_succ & alpha,
const T_scale_fail & beta 
)
+
+ +

Definition at line 34 of file beta_ccdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_scale_succ , typename T_scale_fail >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_scale_succ, T_scale_fail>::type stan::math::beta_cdf (const T_y & y,
const T_scale_succ & alpha,
const T_scale_fail & beta 
)
+
+ +

Calculates the beta cumulative distribution function for the given variate and scale variables.

+
Parameters
+ + + + +
yA scalar variate.
alphaPrior sample size.
betaPrior sample size.
+
+
+
Returns
The beta cdf evaluated at the specified arguments.
+
Template Parameters
+ + + + +
T_yType of y.
T_scale_succType of alpha.
T_scale_failType of beta.
+
+
+ +

Definition at line 52 of file beta_cdf.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_scale_succ , typename T_scale_fail >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_scale_succ, T_scale_fail>::type stan::math::beta_cdf_log (const T_y & y,
const T_scale_succ & alpha,
const T_scale_fail & beta 
)
+
+ +

Definition at line 33 of file beta_cdf_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_scale_succ , typename T_scale_fail >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_scale_succ, T_scale_fail>::type stan::math::beta_log (const T_y & y,
const T_scale_succ & alpha,
const T_scale_fail & beta 
)
+
+ +

The log of the beta density for the specified scalar(s) given the specified sample size(s).

+

y, alpha, or beta can each either be scalar or a vector. Any vector inputs must be the same length.

+

The result log probability is defined to be the sum of the log probabilities for each observation/alpha/beta triple.

+

Prior sample sizes, alpha and beta, must be greater than 0.

+
Parameters
+ + + + +
y(Sequence of) scalar(s).
alpha(Sequence of) prior sample size(s).
beta(Sequence of) prior sample size(s).
+
+
+
Returns
The log of the product of densities.
+
Template Parameters
+ + + + +
T_yType of scalar outcome.
T_scale_succType of prior scale for successes.
T_scale_failType of prior scale for failures.
+
+
+ +

Definition at line 52 of file beta_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_scale_succ , typename T_scale_fail >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_scale_succ, T_scale_fail>::type stan::math::beta_log (const T_y & y,
const T_scale_succ & alpha,
const T_scale_fail & beta 
)
+
+inline
+
+ +

Definition at line 209 of file beta_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
double stan::math::beta_rng (const double alpha,
const double beta,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 30 of file beta_rng.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::binary_log_loss (const int y,
const fvar< T > & y_hat 
)
+
+inline
+
+ +

Definition at line 15 of file binary_log_loss.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T>::type stan::math::binary_log_loss (const int y,
const T y_hat 
)
+
+inline
+
+ +

Returns the log loss function for binary classification with specified reference and response values.

+

The log loss function for prediction $\hat{y} \in [0, 1]$ given outcome $y \in \{ 0, 1 \}$ is

+

$\mbox{logloss}(1, \hat{y}) = -\log \hat{y} $, and

+

$\mbox{logloss}(0, \hat{y}) = -\log (1 - \hat{y}) $.

+
Parameters
+ + + +
yReference value in { 0 , 1 }.
y_hatResponse value in [0, 1].
+
+
+
Returns
Log loss for response given reference value.
+ +

Definition at line 26 of file binary_log_loss.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::binary_log_loss (const int y,
const stan::math::vary_hat 
)
+
+inline
+
+ +

The log loss function for variables (stan).

+

See stan::math::binary_log_loss() for the double-based version.

+

The derivative with respect to the variable $\hat{y}$ is

+

$\frac{d}{d\hat{y}} \mbox{logloss}(1, \hat{y}) = - \frac{1}{\hat{y}}$, and

+

$\frac{d}{d\hat{y}} \mbox{logloss}(0, \hat{y}) = \frac{1}{1 - \hat{y}}$.

+

+\[ \mbox{binary\_log\_loss}(y, \hat{y}) = \begin{cases} y \log \hat{y} + (1 - y) \log (1 - \hat{y}) & \mbox{if } 0\leq \hat{y}\leq 1, y\in\{ 0, 1 \}\\[6pt] \textrm{NaN} & \mbox{if } \hat{y} = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{binary\_log\_loss}(y, \hat{y})}{\partial \hat{y}} = \begin{cases} \frac{y}{\hat{y}}-\frac{1-y}{1-\hat{y}} & \mbox{if } 0\leq \hat{y}\leq 1, y\in\{ 0, 1 \}\\[6pt] \textrm{NaN} & \mbox{if } \hat{y} = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + + +
yReference value.
y_hatResponse variable.
+
+
+
Returns
Log loss of response versus reference value.
+ +

Definition at line 68 of file binary_log_loss.hpp.

+ +
+
+ +
+
+
+template<typename T_n , typename T_N , typename T_prob >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_prob>::type stan::math::binomial_ccdf_log (const T_n & n,
const T_N & N,
const T_prob & theta 
)
+
+ +

Definition at line 31 of file binomial_ccdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T_n , typename T_N , typename T_prob >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_prob>::type stan::math::binomial_cdf (const T_n & n,
const T_N & N,
const T_prob & theta 
)
+
+ +

Definition at line 32 of file binomial_cdf.hpp.

+ +
+
+ +
+
+
+template<typename T_n , typename T_N , typename T_prob >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_prob>::type stan::math::binomial_cdf_log (const T_n & n,
const T_N & N,
const T_prob & theta 
)
+
+ +

Definition at line 31 of file binomial_cdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::binomial_coefficient_log (const fvar< T > & x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 16 of file binomial_coefficient_log.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::binomial_coefficient_log (const fvar< T > & x1,
const double x2 
)
+
+inline
+
+ +

Definition at line 46 of file binomial_coefficient_log.hpp.

+ +
+
+ +
+
+
+template<typename T_N , typename T_n >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_N, T_n>::type stan::math::binomial_coefficient_log (const T_N N,
const T_n n 
)
+
+inline
+
+ +

Return the log of the binomial coefficient for the specified arguments.

+

The binomial coefficient, ${N \choose n}$, read "N choose n", is defined for $0 \leq n \leq N$ by

+

${N \choose n} = \frac{N!}{n! (N-n)!}$.

+

This function uses Gamma functions to define the log and generalize the arguments to continuous N and n.

+

$ \log {N \choose n} = \log \ \Gamma(N+1) - \log \Gamma(n+1) - \log \Gamma(N-n+1)$.

+

+\[ \mbox{binomial\_coefficient\_log}(x, y) = \begin{cases} \textrm{error} & \mbox{if } y > x \textrm{ or } y < 0\\ \ln\Gamma(x+1) & \mbox{if } 0\leq y \leq x \\ \quad -\ln\Gamma(y+1)& \\ \quad -\ln\Gamma(x-y+1)& \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{binomial\_coefficient\_log}(x, y)}{\partial x} = \begin{cases} \textrm{error} & \mbox{if } y > x \textrm{ or } y < 0\\ \Psi(x+1) & \mbox{if } 0\leq y \leq x \\ \quad -\Psi(x-y+1)& \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{binomial\_coefficient\_log}(x, y)}{\partial y} = \begin{cases} \textrm{error} & \mbox{if } y > x \textrm{ or } y < 0\\ -\Psi(y+1) & \mbox{if } 0\leq y \leq x \\ \quad +\Psi(x-y+1)& \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + + +
Ntotal number of objects.
nnumber of objects chosen.
+
+
+
Returns
log (N choose n).
+ +

Definition at line 63 of file binomial_coefficient_log.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::binomial_coefficient_log (const double x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 70 of file binomial_coefficient_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_n , typename T_N , typename T_prob >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_prob>::type stan::math::binomial_log (const T_n & n,
const T_N & N,
const T_prob & theta 
)
+
+ +

Definition at line 36 of file binomial_log.hpp.

+ +
+
+ +
+
+
+template<typename T_n , typename T_N , typename T_prob >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_prob>::type stan::math::binomial_log (const T_n & n,
const T_N & N,
const T_prob & theta 
)
+
+inline
+
+ +

Definition at line 127 of file binomial_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_n , typename T_N , typename T_prob >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_prob>::type stan::math::binomial_logit_log (const T_n & n,
const T_N & N,
const T_prob & alpha 
)
+
+ +

Definition at line 37 of file binomial_logit_log.hpp.

+ +
+
+ +
+
+
+template<typename T_n , typename T_N , typename T_prob >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_prob>::type stan::math::binomial_logit_log (const T_n & n,
const T_N & N,
const T_prob & alpha 
)
+
+inline
+
+ +

Definition at line 131 of file binomial_logit_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
int stan::math::binomial_rng (const int N,
const double theta,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 31 of file binomial_rng.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::block (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & m,
size_t i,
size_t j,
size_t nrows,
size_t ncols 
)
+
+inline
+
+ +

Return a nrows x ncols submatrix starting at (i-1, j-1).

+
Parameters
+ + + + + + +
mMatrix
iStarting row
jStarting column
nrowsNumber of rows in block
ncolsNumber of columns in block
+
+
+ +

Definition at line 23 of file block.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
double stan::math::calculate_chain (const double & x,
const double & val 
)
+
+inline
+
+ +

Definition at line 8 of file calculate_chain.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_prob >
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_prob>::type stan::math::categorical_log (int n,
const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > & theta 
)
+
+ +

Definition at line 25 of file categorical_log.hpp.

+ +
+
+ +
+
+
+template<typename T_prob >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_prob>::type stan::math::categorical_log (const typename math::index_type< Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > >::type n,
const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > & theta 
)
+
+inline
+
+ +

Definition at line 56 of file categorical_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_prob >
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_prob>::type stan::math::categorical_log (const std::vector< int > & ns,
const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > & theta 
)
+
+ +

Definition at line 68 of file categorical_log.hpp.

+ +
+
+ +
+
+
+template<typename T_prob >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_prob>::type stan::math::categorical_log (const std::vector< int > & ns,
const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > & theta 
)
+
+inline
+
+ +

Definition at line 116 of file categorical_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_prob >
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_prob>::type stan::math::categorical_logit_log (int n,
const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > & beta 
)
+
+ +

Definition at line 22 of file categorical_logit_log.hpp.

+ +
+
+ +
+
+
+template<typename T_prob >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_prob>::type stan::math::categorical_logit_log (int n,
const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > & beta 
)
+
+inline
+
+ +

Definition at line 45 of file categorical_logit_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_prob >
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_prob>::type stan::math::categorical_logit_log (const std::vector< int > & ns,
const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > & beta 
)
+
+ +

Definition at line 54 of file categorical_logit_log.hpp.

+ +
+
+ +
+
+
+template<typename T_prob >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_prob>::type stan::math::categorical_logit_log (const std::vector< int > & ns,
const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > & beta 
)
+
+inline
+
+ +

Definition at line 89 of file categorical_logit_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int stan::math::categorical_rng (const Eigen::Matrix< double, Eigen::Dynamic, 1 > & theta,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 20 of file categorical_rng.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::cauchy_ccdf_log (const T_y & y,
const T_loc & mu,
const T_scale & sigma 
)
+
+ +

Definition at line 24 of file cauchy_ccdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::cauchy_cdf (const T_y & y,
const T_loc & mu,
const T_scale & sigma 
)
+
+ +

Calculates the cauchy cumulative distribution function for the given variate, location, and scale.

+

$\frac{1}{\pi}\arctan\left(\frac{y-\mu}{\sigma}\right) + \frac{1}{2}$

+
Parameters
+ + + + +
yA scalar variate.
muThe location parameter.
sigmaThe scale parameter.
+
+
+
Returns
+ +

Definition at line 36 of file cauchy_cdf.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::cauchy_cdf_log (const T_y & y,
const T_loc & mu,
const T_scale & sigma 
)
+
+ +

Definition at line 24 of file cauchy_cdf_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::cauchy_log (const T_y & y,
const T_loc & mu,
const T_scale & sigma 
)
+
+ +

The log of the Cauchy density for the specified scalar(s) given the specified location parameter(s) and scale parameter(s).

+

y, mu, or sigma can each either be scalar a vector. Any vector inputs must be the same length.

+

The result log probability is defined to be the sum of the log probabilities for each observation/mu/sigma triple.

+
Parameters
+ + + + +
y(Sequence of) scalar(s).
mu(Sequence of) location(s).
sigma(Sequence of) scale(s).
+
+
+
Returns
The log of the product of densities.
+
Template Parameters
+ + + + +
T_yType of scalar outcome.
T_locType of location.
T_scaleType of scale.
+
+
+ +

Definition at line 43 of file cauchy_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::cauchy_log (const T_y & y,
const T_loc & mu,
const T_scale & sigma 
)
+
+inline
+
+ +

Definition at line 145 of file cauchy_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
double stan::math::cauchy_rng (const double mu,
const double sigma,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 23 of file cauchy_rng.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::cbrt (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 14 of file cbrt.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::cbrt (const var & a)
+
+inline
+
+ +

Returns the cube root of the specified variable (C99).

+

See cbrt() for the double-based version.

+

The derivative is

+

$\frac{d}{dx} x^{1/3} = \frac{1}{3 x^{2/3}}$.

+

+\[ \mbox{cbrt}(x) = \begin{cases} \sqrt[3]{x} & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{cbrt}(x)}{\partial x} = \begin{cases} \frac{1}{3x^{2/3}} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
aSpecified variable.
+
+
+
Returns
Cube root of the variable.
+ +

Definition at line 56 of file cbrt.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::ceil (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 11 of file ceil.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::ceil (const var & a)
+
+inline
+
+ +

Return the ceiling of the specified variable (cmath).

+

The derivative of the ceiling function is defined and zero everywhere but at integers, and we set them to zero for convenience,

+

$\frac{d}{dx} {\lceil x \rceil} = 0$.

+

The ceiling function rounds up. For double values, this is the smallest integral value that is not less than the specified value. Although this function is not differentiable because it is discontinuous at integral values, its gradient is returned as zero everywhere.

+

+\[ \mbox{ceil}(x) = \begin{cases} \lceil x\rceil & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{ceil}(x)}{\partial x} = \begin{cases} 0 & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
aInput variable.
+
+
+
Returns
Ceiling of the variable.
+ +

Definition at line 60 of file ceil.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_low , typename T_high >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_bounded (const char * function,
const char * name,
const T_y & y,
const T_low & low,
const T_high & high 
)
+
+inline
+
+ +

Return true if the value is between the low and high values, inclusively.

+
Template Parameters
+ + + + +
T_yType of value
T_lowType of low value
T_highType of high value
+
+
+
Parameters
+ + + + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
yValue to check
lowLow bound
highHigh bound
+
+
+
Returns
true if the value is between low and high, inclusively.
+
Exceptions
+ + +
<code>std::domain_error</code>otherwise. This also throws if any of the arguments are NaN.
+
+
+ +

Definition at line 95 of file check_bounded.hpp.

+ +
+
+ +
+
+
+template<typename T_y >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_cholesky_factor (const char * function,
const char * name,
const Eigen::Matrix< T_y, Dynamic, Dynamic > & y 
)
+
+inline
+
+ +

Return true if the specified matrix is a valid Cholesky factor.

+

A Cholesky factor is a lower triangular matrix whose diagonal elements are all positive. Note that Cholesky factors need not be square, but require at least as many rows M as columns N (i.e., M >= N).

+
Template Parameters
+ + +
T_yType of elements of Cholesky factor
+
+
+
Parameters
+ + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
yMatrix to test
+
+
+
Returns
true if the matrix is a valid Cholesky factor
+
Exceptions
+ + +
<code>std::domain_error</code>if y is not a valid Choleksy factor, if number of rows is less than the number of columns, if there are 0 columns, or if any element in matrix is NaN
+
+
+ +

Definition at line 36 of file check_cholesky_factor.hpp.

+ +
+
+ +
+
+
+template<typename T_y >
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_cholesky_factor_corr (const char * function,
const char * name,
const Eigen::Matrix< T_y, Dynamic, Dynamic > & y 
)
+
+ +

Return true if the specified matrix is a valid Cholesky factor of a correlation matrix.

+

A Cholesky factor is a lower triangular matrix whose diagonal elements are all positive. Note that Cholesky factors need not be square, but require at least as many rows M as columns N (i.e., M >= N).

+

Tolerance is specified by math::CONSTRAINT_TOLERANCE.

+
Template Parameters
+ + +
T_yType of elements of Cholesky factor
+
+
+
Parameters
+ + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
yMatrix to test
+
+
+
Returns
true if the matrix is a valid Cholesky factor of a correlation matrix
+
Exceptions
+ + +
<code>std::domain_error</code>if y is not a valid Choleksy factor, if number of rows is less than the number of columns, if there are 0 columns, or if any element in matrix is NaN
+
+
+ +

Definition at line 40 of file check_cholesky_factor_corr.hpp.

+ +
+
+ +
+
+
+template<typename T_y , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_column_index (const char * function,
const char * name,
const Eigen::Matrix< T_y, R, C > & y,
const size_t i 
)
+
+inline
+
+ +

Return true if the specified index is a valid column of the matrix.

+

By default, this is a 1-indexed check (as opposed to 0-indexed). Behavior can be changed by setting stan::error_index::value. This function will throw an std::out_of_range exception if the index is out of bounds.

+
Template Parameters
+ + + + +
T_yType of scalar.
RNumber of rows of the matrix
CNumber of columns of the matrix
+
+
+
Parameters
+ + + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
yMatrix
iIndex to check
+
+
+
Returns
true if the index is a valid column index of the matrix.
+
Exceptions
+ + +
std::out_of_rangeif index is an invalid column index
+
+
+ +

Definition at line 37 of file check_column_index.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_consistent_size (const char * function,
const char * name,
const T & x,
size_t expected_size 
)
+
+inline
+
+ +

Return true if the dimension of x is consistent, which is defined to be expected_size if x is a vector or 1 if x is not a vector.

+
Template Parameters
+ + +
TType of value
+
+
+
Parameters
+ + + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
xVariable to check for consistent size
expected_sizeExpected size if x is a vector
+
+
+
Returns
true if x is scalar or if x is vector-like and has size of expected_size
+
Exceptions
+ + +
<code>invalid_argument</code>if the size is inconsistent
+
+
+ +

Definition at line 29 of file check_consistent_size.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_consistent_sizes (const char * function,
const char * name1,
const T1 & x1,
const char * name2,
const T2 & x2 
)
+
+inline
+
+ +

Return true if the dimension of x1 is consistent with x2.

+

Consistent size is defined as having the same size if vector-like or being a scalar.

+
Template Parameters
+ + + +
T1Type of x1
T2Type of x2
+
+
+
Parameters
+ + + + + + +
functionFunction name (for error messages)
name1Variable name (for error messages)
x1Variable to check for consistent size
name2Variable name (for error messages)
x2Variable to check for consistent size
+
+
+
Returns
true if x1 and x2 have consistent sizes
+
Exceptions
+ + +
<code>invalid_argument</code>if sizes are inconsistent
+
+
+ +

Definition at line 31 of file check_consistent_sizes.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , typename T3 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_consistent_sizes (const char * function,
const char * name1,
const T1 & x1,
const char * name2,
const T2 & x2,
const char * name3,
const T3 & x3 
)
+
+inline
+
+ +

Return true if the dimension of x1, x2, and x3 are consistent.

+

Consistent size is defined as having the same size if vector-like or being a scalar.

+
Template Parameters
+ + + + +
T1Type of x1
T2Type of x2
T3Type of x3
+
+
+
Parameters
+ + + + + + + + +
functionFunction name (for error messages)
name1Variable name (for error messages)
x1Variable to check for consistent size
name2Variable name (for error messages)
x2Variable to check for consistent size
name3Variable name (for error messages)
x3Variable to check for consistent size
+
+
+
Returns
true if x1, x2, and x3 have consistent sizes
+
Exceptions
+ + +
<code>invalid_argument</code>if sizes are inconsistent
+
+
+ +

Definition at line 66 of file check_consistent_sizes.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , typename T3 , typename T4 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_consistent_sizes (const char * function,
const char * name1,
const T1 & x1,
const char * name2,
const T2 & x2,
const char * name3,
const T3 & x3,
const char * name4,
const T4 & x4 
)
+
+inline
+
+ +

Return true if the dimension of x1, x2, x3, and x4 are consistent.

+

Consistent size is defined as having the same size if vector-like or being a scalar.

+
Template Parameters
+ + + + + +
T1Type of x1
T2Type of x2
T3Type of x3
T4Type of x4
+
+
+
Parameters
+ + + + + + + + + + +
functionFunction name (for error messages)
name1Variable name (for error messages)
x1Variable to check for consistent size
name2Variable name (for error messages)
x2Variable to check for consistent size
name3Variable name (for error messages)
x3Variable to check for consistent size
name4Variable name (for error messages)
x4Variable to check for consistent size
+
+
+
Returns
true if x1, x2, x3, and x4 have consistent sizes
+
Exceptions
+ + +
<code>invalid_argument</code>if sizes are inconsistent
+
+
+ +

Definition at line 107 of file check_consistent_sizes.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_consistent_sizes (const char * function,
const char * name1,
const T1 & x1,
const char * name2,
const T2 & x2,
const char * name3,
const T3 & x3,
const char * name4,
const T4 & x4,
const char * name5,
const T5 & x5 
)
+
+inline
+
+ +

Definition at line 128 of file check_consistent_sizes.hpp.

+ +
+
+ +
+
+
+template<typename T_y >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_corr_matrix (const char * function,
const char * name,
const Eigen::Matrix< T_y, Dynamic, Dynamic > & y 
)
+
+inline
+
+ +

Return true if the specified matrix is a valid correlation matrix.

+

A valid correlation matrix is symmetric, has a unit diagonal (all 1 values), and has all values between -1 and 1 (inclusive).

+

This function throws exceptions if the variable is not a valid correlation matrix.

+
Template Parameters
+ + +
T_yType of scalar
+
+
+
Parameters
+ + + + +
functionName of the function this was called from
nameName of the variable
yMatrix to test
+
+
+
Returns
true if the specified matrix is a valid correlation matrix
+
Exceptions
+ + + +
<code>std::invalid_argument</code>if the matrix is not square or if the matrix is 0x0
<code>std::domain_error</code>if the matrix is non-symmetric, diagonals not near 1, not positive definite, or any of the elements nan.
+
+
+ +

Definition at line 46 of file check_corr_matrix.hpp.

+ +
+
+ +
+
+
+template<typename T_y >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_cov_matrix (const char * function,
const char * name,
const Eigen::Matrix< T_y, Dynamic, Dynamic > & y 
)
+
+inline
+
+ +

Return true if the specified matrix is a valid covariance matrix.

+

A valid covariance matrix is a square, symmetric matrix that is positive definite.

+
Template Parameters
+ + +
TType of scalar.
+
+
+
Parameters
+ + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
yMatrix to test
+
+
+
Returns
true if the matrix is a valid covariance matrix
+
Exceptions
+ + + +
<code>std::invalid_argument</code>if the matrix is not square or if the matrix is 0x0
<code>std::domain_error</code>if the matrix is not symmetric, if the matrix is not positive definite, or if any element of the matrix is nan
+
+
+ +

Definition at line 32 of file check_cov_matrix.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_eq >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_equal (const char * function,
const char * name,
const T_y & y,
const T_eq & eq 
)
+
+inline
+
+ +

Return true if y is equal to eq.

+

This function is vectorized over both y and eq. If both y and eq are scalar or vector-like, then each element is compared in order. If one of y or eq are vector and the other is scalar, then the scalar is broadcast to the size of the vector.

+
Template Parameters
+ + + +
T_yType of variable
T_eqType of comparison
+
+
+
Parameters
+ + + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
yVariable to check equality
eqExpected value for y
+
+
+
Returns
true if y is equal to eq
+
Exceptions
+ + +
<code>std::domain_error</code>if y is unequal to eq or if any element of y or eq is NaN.
+
+
+ +

Definition at line 90 of file check_equal.hpp.

+ +
+
+ +
+
+
+template<typename T_y >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_finite (const char * function,
const char * name,
const T_y & y 
)
+
+inline
+
+ +

Return true if y is finite.

+

This function is vectorized and will check each element of y.

+
Template Parameters
+ + +
T_yType of y
+
+
+
Parameters
+ + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
yVariable to check
+
+
+
Returns
true if y is finite.
+
Exceptions
+ + +
<code>domain_error</code>if y is infinity, -infinity, or NaN.
+
+
+ +

Definition at line 62 of file check_finite.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_low >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_greater (const char * function,
const char * name,
const T_y & y,
const T_low & low 
)
+
+inline
+
+ +

Return true if y is strictly greater than low.

+

This function is vectorized and will check each element of y against each element of low.

+
Template Parameters
+ + + +
T_yType of y
T_lowType of lower bound
+
+
+
Parameters
+ + + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
yVariable to check
lowLower bound
+
+
+
Returns
true if y is strictly greater than low.
+
Exceptions
+ + +
<code>domain_error</code>if y is not greater than low or if any element of y or low is NaN.
+
+
+ +

Definition at line 84 of file check_greater.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_low >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_greater_or_equal (const char * function,
const char * name,
const T_y & y,
const T_low & low 
)
+
+inline
+
+ +

Return true if y is greater or equal than low.

+

This function is vectorized and will check each element of y against each element of low.

+
Template Parameters
+ + + +
T_yType of y
T_lowType of lower bound
+
+
+
Parameters
+ + + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
yVariable to check
lowLower bound
+
+
+
Returns
true if y is greater or equal than low.
+
Exceptions
+ + +
<code>domain_error</code>if y is not greater or equal to low or if any element of y or low is NaN.
+
+
+ +

Definition at line 84 of file check_greater_or_equal.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_ldlt_factor (const char * function,
const char * name,
stan::math::LDLT_factor< T, R, C > & A 
)
+
+inline
+
+ +

Return true if the argument is a valid stan::math::LDLT_factor.

+

LDLT_factor can be constructed in an invalid state, so it must be checked. A invalid LDLT_factor is constructed from a non positive definite matrix.

+
Template Parameters
+ + + + +
TType of scalar
RRows of the matrix
CColumns of the matrix
+
+
+
Parameters
+ + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
Astan::math::LDLT_factor to check for validity.
+
+
+
Returns
true if the matrix is positive definite.
+
+throws std::domain_error the LDLT_factor was created improperly (A.success() == false)
+ +

Definition at line 34 of file check_ldlt_factor.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_high >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_less (const char * function,
const char * name,
const T_y & y,
const T_high & high 
)
+
+inline
+
+ +

Return true if y is strictly less than high.

+

This function is vectorized and will check each element of y against each element of high.

+
Template Parameters
+ + + +
T_yType of y
T_highType of upper bound
+
+
+
Parameters
+ + + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
yVariable to check
highUpper bound
+
+
+
Returns
true if y is strictly less than low.
+
Exceptions
+ + +
<code>domain_error</code>if y is not less than low or if any element of y or high is NaN.
+
+
+ +

Definition at line 81 of file check_less.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_high >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_less_or_equal (const char * function,
const char * name,
const T_y & y,
const T_high & high 
)
+
+inline
+
+ +

Return true if y is less or equal to high.

+

This function is vectorized and will check each element of y against each element of high.

+
Template Parameters
+ + + +
T_yType of y
T_highType of upper bound
+
+
+
Parameters
+ + + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
yVariable to check
highUpper bound
+
+
+
Returns
true if y is less than or equal to low.
+
Exceptions
+ + +
<code>std::domain_error</code>if y is not less than or equal to low or if any element of y or high is NaN.
+
+
+ +

Definition at line 81 of file check_less_or_equal.hpp.

+ +
+
+ +
+
+
+template<typename T_y >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_lower_triangular (const char * function,
const char * name,
const Eigen::Matrix< T_y, Dynamic, Dynamic > & y 
)
+
+inline
+
+ +

Return true if the specified matrix is lower triangular.

+

A matrix x is not lower triangular if there is a non-zero entry x[m, n] with m < n. This function only inspects the upper triangular portion of the matrix, not including the diagonal.

+
Template Parameters
+ + +
TType of scalar of the matrix
+
+
+
Parameters
+ + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
yMatrix to test
+
+
+
Returns
true if the matrix is lower triangular.
+
Exceptions
+ + +
<code>std::domain_error</code>if the matrix is not lower triangular or if any element in the upper triangular portion is NaN
+
+
+ +

Definition at line 35 of file check_lower_triangular.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_matching_dims (const char * function,
const char * name1,
const Eigen::Matrix< T1, R1, C1 > & y1,
const char * name2,
const Eigen::Matrix< T2, R2, C2 > & y2 
)
+
+inline
+
+ +

Return true if the two matrices are of the same size.

+

This function checks not only the runtime sizes, but the static sizes as well. For example, a 4x1 matrix is not the same as a vector with 4 elements.

+
Template Parameters
+ + + + + + + +
T1Scalar type of the first matrix
T2Scalar type of the second matrix
R1Rows specified at compile time of the first matrix
C1Columns specified at compile time of the first matrix
R2Rows specified at compile time of the second matrix
C2Columns specified at compile time of the second matrix
+
+
+
Parameters
+ + + + + + +
functionFunction name (for error messages)
name1Variable name for the first matrix (for error messages)
y1First matrix
name2Variable name for the second matrix (for error messages)
y2Second matrix
+
+
+
Returns
true if the dimensions of the two matrices match
+
Exceptions
+ + +
<code>std::invalid_argument</code>if the dimensions of the matrices do not match
+
+
+ +

Definition at line 37 of file check_matching_dims.hpp.

+ +
+
+ +
+
+
+template<typename T_y1 , typename T_y2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_matching_sizes (const char * function,
const char * name1,
const T_y1 & y1,
const char * name2,
const T_y2 & y2 
)
+
+inline
+
+ +

Return true if two structures at the same size.

+

This function only checks the runtime sizes for variables that implement a size() method.

+
Template Parameters
+ + + +
T_y1Type of the first variable
T_y2Type of the second variable
+
+
+
Parameters
+ + + + + + +
functionFunction name (for error messages)
name1First variable name (for error messages)
y1First variable
name2Second variable name (for error messages)
y2Second variable
+
+
+
Returns
true if the sizes match
+
Exceptions
+ + +
<code>std::invalid_argument</code>if the sizes do not match
+
+
+ +

Definition at line 29 of file check_matching_sizes.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_multiplicable (const char * function,
const char * name1,
const T1 & y1,
const char * name2,
const T2 & y2 
)
+
+inline
+
+ +

Return true if the matrices can be multiplied.

+

This checks the runtime sizes to determine whether the two matrices are multiplicable. This allows Eigen matrices, vectors, and row vectors to be checked.

+
Template Parameters
+ + + +
T1Type of first matrix
T2Type of second matrix
+
+
+
Parameters
+ + + + + + +
functionFunction name (for error messages)
name1Variable name for the first matrix (for error messages)
y1First matrix
name2Variable name for the second matrix (for error messages)
y2Second matrix
+
+
+
Returns
true if the two matrices are multiplicable
+
Exceptions
+ + +
<code>std::invalid_argument</code>if the matrices are not multiplicable or if either matrix is size 0 for either rows or columns
+
+
+ +

Definition at line 33 of file check_multiplicable.hpp.

+ +
+
+ +
+
+
+template<typename T_y >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_nonnegative (const char * function,
const char * name,
const T_y & y 
)
+
+inline
+
+ +

Return true if y is non-negative.

+

This function is vectorized and will check each element of y.

+
Template Parameters
+ + +
T_yType of y
+
+
+
Parameters
+ + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
yVariable to check
+
+
+
Returns
true if y is greater than or equal to 0.
+
Exceptions
+ + +
<code>domain_error</code>if y is negative or if any element of y is NaN.
+
+
+ +

Definition at line 66 of file check_nonnegative.hpp.

+ +
+
+ +
+
+
+template<typename T_y >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_nonzero_size (const char * function,
const char * name,
const T_y & y 
)
+
+inline
+
+ +

Return true if the specified matrix/vector is of non-zero size.

+

Throws a std:invalid_argument otherwise. The message will indicate that the variable name "has size 0".

+
Template Parameters
+ + +
T_yType of container
+
+
+
Parameters
+ + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
yContainer to test. This will accept matrices and vectors
+
+
+
Returns
true if the the specified matrix/vector is of non-zero size
+
Exceptions
+ + +
<code>std::invalid_argument</code>if the specified matrix/vector has zero size
+
+
+ +

Definition at line 31 of file check_nonzero_size.hpp.

+ +
+
+ +
+
+
+template<typename T_y >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_not_nan (const char * function,
const char * name,
const T_y & y 
)
+
+inline
+
+ +

Return true if y is not NaN.

+

This function is vectorized and will check each element of y. If any element is NaN, this function will throw an exception.

+
Template Parameters
+ + +
T_yType of y
+
+
+
Parameters
+ + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
yVariable to check
+
+
+
Returns
true if y is not NaN.
+
Exceptions
+ + +
<code>domain_error</code>if any element of y is NaN.
+
+
+ +

Definition at line 63 of file check_not_nan.hpp.

+ +
+
+ +
+
+
+template<typename T_y >
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_ordered (const char * function,
const char * name,
const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > & y 
)
+
+ +

Return true if the specified vector is sorted into strictly increasing order.

+
Template Parameters
+ + +
T_yType of scalar
+
+
+
Parameters
+ + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
yVector to test
+
+
+
Returns
true if the vector is ordered
+
Exceptions
+ + +
<code>std::domain_error</code>if the vector elements are not ordered, if there are duplicated values, or if any element is NaN.
+
+
+ +

Definition at line 31 of file check_ordered.hpp.

+ +
+
+ +
+
+
+template<typename T_y >
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_ordered (const char * function,
const char * name,
const std::vector< T_y > & y 
)
+
+ +

Return true if the specified vector is sorted into strictly increasing order.

+
Template Parameters
+ + +
T_yType of scalar
+
+
+
Parameters
+ + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
ystd::vector to test
+
+
+
Returns
true if the vector is ordered
+
Exceptions
+ + +
<code>std::domain_error</code>if the vector elements are not ordered, if there are duplicated values, or if any element is NaN.
+
+
+ +

Definition at line 78 of file check_ordered.hpp.

+ +
+
+ +
+
+
+template<typename T_y >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_pos_definite (const char * function,
const char * name,
const Eigen::Matrix< T_y, Dynamic, Dynamic > & y 
)
+
+inline
+
+ +

Return true if the specified square, symmetric matrix is positive definite.

+
Template Parameters
+ + +
T_yType of scalar of the matrix
+
+
+
Parameters
+ + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
yMatrix to test
+
+
+
Returns
true if the matrix is positive definite
+
Exceptions
+ + + +
<code>std::invalid_argument</code>if the matrix is not square or if the matrix has 0 size.
<code>std::domain_error</code>if the matrix is not symmetric, if it is not positive definite, or if any element is NaN.
+
+
+ +

Definition at line 38 of file check_pos_definite.hpp.

+ +
+
+ +
+
+
+template<typename Derived >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_pos_definite (const char * function,
const char * name,
const Eigen::LDLT< Derived > & cholesky 
)
+
+inline
+
+ +

Return true if the specified LDLT transform of a matrix is positive definite.

+
Template Parameters
+ + +
DerivedDerived type of the Eigen::LDLT transform.
+
+
+
Parameters
+ + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
choleskyEigen::LDLT to test, whose progenitor must not have any NaN elements
+
+
+
Returns
true if the matrix is positive definite
+
Exceptions
+ + +
<code>std::domain_error</code>if the matrix is not positive definite.
+
+
+ +

Definition at line 76 of file check_pos_definite.hpp.

+ +
+
+ +
+
+
+template<typename Derived >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_pos_definite (const char * function,
const char * name,
const Eigen::LLT< Derived > & cholesky 
)
+
+inline
+
+ +

Return true if the specified LLT transform of a matrix is positive definite.

+
Template Parameters
+ + +
DerivedDerived type of the Eigen::LLT transform.
+
+
+
Parameters
+ + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
choleskyEigen::LLT to test, whose progenitor must not have any NaN elements
+
+
+
Returns
true if the matrix is positive definite
+
Exceptions
+ + +
<code>std::domain_error</code>if the diagonal of the L matrix is not positive.
+
+
+ +

Definition at line 102 of file check_pos_definite.hpp.

+ +
+
+ +
+
+
+template<typename T_y >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_pos_semidefinite (const char * function,
const char * name,
const Eigen::Matrix< T_y, Dynamic, Dynamic > & y 
)
+
+inline
+
+ +

Return true if the specified matrix is positive definite.

+
Template Parameters
+ + +
T_yscalar type of the matrix
+
+
+
Parameters
+ + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
yMatrix to test
+
+
+
Returns
true if the matrix is positive semi-definite.
+
Exceptions
+ + + +
<code>std::invalid_argument</code>if the matrix is not square or if the matrix has 0 size.
<code>std::domain_error</code>if the matrix is not symmetric, or if it is not positive semi-definite, or if any element of the matrix is NaN.
+
+
+ +

Definition at line 36 of file check_pos_semidefinite.hpp.

+ +
+
+ +
+
+
+template<typename T_y >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_positive (const char * function,
const char * name,
const T_y & y 
)
+
+inline
+
+ +

Return true if y is positive.

+

This function is vectorized and will check each element of y.

+
Template Parameters
+ + +
T_yType of y
+
+
+
Parameters
+ + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
yVariable to check
+
+
+
Returns
true if y is greater than 0.
+
Exceptions
+ + +
<code>domain_error</code>if y is negative or zero or if any element of y is NaN.
+
+
+ +

Definition at line 68 of file check_positive.hpp.

+ +
+
+ +
+
+
+template<typename T_y >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_positive_finite (const char * function,
const char * name,
const T_y & y 
)
+
+inline
+
+ +

Return true if y is positive and finite.

+

This function is vectorized and will check each element of y.

+
Template Parameters
+ + +
T_yType of y
+
+
+
Parameters
+ + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
yVariable to check
+
+
+
Returns
true if every element of y is greater than 0 and y is not infinite.
+
Exceptions
+ + +
<code>domain_error</code>if any element of y is not positive or if any element of y is NaN.
+
+
+ +

Definition at line 28 of file check_positive_finite.hpp.

+ +
+
+ +
+
+
+template<typename T_y >
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_positive_ordered (const char * function,
const char * name,
const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > & y 
)
+
+ +

Return true if the specified vector contains non-negative values and is sorted into strictly increasing order.

+
Parameters
+ + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
yVector to test
+
+
+
Returns
true if the vector is positive, ordered
+
Exceptions
+ + +
<code>std::domain_error</code>if the vector contains non-positive values, if the values are not ordered, if there are duplicated values, or if any element is NaN.
+
+
+ +

Definition at line 32 of file check_positive_ordered.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_positive_size (const char * function,
const char * name,
const char * expr,
const int size 
)
+
+inline
+
+ +

Return true if size is positive.

+
Parameters
+ + + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
exprExpression for the dimension size (for error messages)
sizeSize value to check
+
+
+
Returns
true if size is greater than 0.
+
Exceptions
+ + +
<code>std::invalid_argument</code>if size is zero or negative.
+
+
+ +

Definition at line 23 of file check_positive_size.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_range (const char * function,
const char * name,
const int max,
const int index,
const int nested_level,
const char * error_msg 
)
+
+inline
+
+ +

Return true if specified index is within range.

+

This check is 1-indexed by default. This behavior can be changed by setting stan::error_index::value.

+
Parameters
+ + + + + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
maxMaximum size of the variable
indexIndex to check
nested_levelNested level (for error messages)
error_msgAdditional error message (for error messages)
+
+
+
Returns
true if the index is within range
+
Exceptions
+ + +
<code>std::out_of_range</code>if the index is not in range
+
+
+ +

Definition at line 29 of file check_range.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_range (const char * function,
const char * name,
const int max,
const int index,
const char * error_msg 
)
+
+inline
+
+ +

Return true if specified index is within range.

+

This check is 1-indexed by default. This behavior can be changed by setting stan::error_index::value.

+
Parameters
+ + + + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
maxMaximum size of the variable
indexIndex to check
error_msgAdditional error message (for error messages)
+
+
+
Returns
true if the index is within range
+
Exceptions
+ + +
<code>std::out_of_range</code>if the index is not in range
+
+
+ +

Definition at line 62 of file check_range.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_range (const char * function,
const char * name,
const int max,
const int index 
)
+
+inline
+
+ +

Return true if specified index is within range.

+

This check is 1-indexed by default. This behavior can be changed by setting stan::error_index::value.

+
Parameters
+ + + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
maxMaximum size of the variable
indexIndex to check
+
+
+
Returns
true if the index is within range
+
Exceptions
+ + +
<code>std::out_of_range</code>if the index is not in range
+
+
+ +

Definition at line 89 of file check_range.hpp.

+ +
+
+ +
+
+
+template<typename T_y , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_row_index (const char * function,
const char * name,
const Eigen::Matrix< T_y, R, C > & y,
size_t i 
)
+
+inline
+
+ +

Return true if the specified index is a valid row of the matrix.

+

This check is 1-indexed by default. This behavior can be changed by setting stan::error_index::value.

+
Template Parameters
+ + + + +
TScalar type
RCompile time rows
CCompile time columns
+
+
+
Parameters
+ + + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
yMatrix to test
iis index
+
+
+
Returns
true if the index is a valid row index in the matrix
+
Exceptions
+ + +
<code>std::out_of_range</code>if the index is out of range.
+
+
+ +

Definition at line 32 of file check_row_index.hpp.

+ +
+
+ +
+
+
+template<typename T_prob >
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_simplex (const char * function,
const char * name,
const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > & theta 
)
+
+ +

Return true if the specified vector is simplex.

+

To be a simplex, all values must be greater than or equal to 0 and the values must sum to 1.

+

A valid simplex is one where the sum of hte elements is equal to 1. This function tests that the sum is within the tolerance specified by CONSTRAINT_TOLERANCE. This function only accepts Eigen vectors, statically typed vectors, not general matrices with 1 column.

+
Template Parameters
+ + +
T_probScalar type of the vector
+
+
+
Parameters
+ + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
thetaVector to test.
+
+
+
Returns
true if the vector is a simplex
+
Exceptions
+ + + +
<code>std::invalid_argument</code>if theta is a 0-vector.
<code>std::domain_error</code>if the vector is not a simplex or if any element is NaN.
+
+
+ +

Definition at line 41 of file check_simplex.hpp.

+ +
+
+ +
+
+
+template<typename T_size1 , typename T_size2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_size_match (const char * function,
const char * name_i,
T_size1 i,
const char * name_j,
T_size2 j 
)
+
+inline
+
+ +

Return true if the provided sizes match.

+
Template Parameters
+ + + +
T_size1Type of size 1
T_size2Type of size 2
+
+
+
Parameters
+ + + + + + +
functionFunction name (for error messages)
name_iVariable name 1 (for error messages)
iSize 1
name_jVariable name 2 (for error messages)
jSize 2
+
+
+
Returns
true if the sizes match
+
Exceptions
+ + +
<code>std::invalid_argument</code>if the sizes do not match
+
+
+ +

Definition at line 30 of file check_size_match.hpp.

+ +
+
+ +
+
+
+template<typename T_size1 , typename T_size2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_size_match (const char * function,
const char * expr_i,
const char * name_i,
T_size1 i,
const char * expr_j,
const char * name_j,
T_size2 j 
)
+
+inline
+
+ +

Return true if the provided sizes match.

+
Template Parameters
+ + + +
T_size1Type of size 1
T_size2Type of size 2
+
+
+
Parameters
+ + + + + + + + +
functionFunction name (for error messages)
expr_iExpression for variable name 1 (for error messages)
name_iVariable name 1 (for error messages)
iSize 1
expr_jExpression for variable name 2 (for error messages)
name_jVariable name 2 (for error messages)
jSize 2
+
+
+
Returns
true if the sizes match
+
Exceptions
+ + +
<code>std::invalid_argument</code>if the sizes do not match
+
+
+ +

Definition at line 67 of file check_size_match.hpp.

+ +
+
+ +
+
+
+template<typename T_y >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_spsd_matrix (const char * function,
const char * name,
const Eigen::Matrix< T_y, Dynamic, Dynamic > & y 
)
+
+inline
+
+ +

Return true if the specified matrix is a square, symmetric, and positive semi-definite.

+
Template Parameters
+ + +
TScalar type of the matrix
+
+
+
Parameters
+ + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
yMatrix to test
+
+
+
Returns
true if the matrix is a square, symmetric, and positive semi-definite.
+
Exceptions
+ + + +
<code>std::invalid_argument</code>if the matrix is not square or if the matrix is 0x0
<code>std::domain_error</code>if the matrix is not symmetric or if the matrix is not positive semi-definite
+
+
+ +

Definition at line 32 of file check_spsd_matrix.hpp.

+ +
+
+ +
+
+
+template<typename T_y >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_square (const char * function,
const char * name,
const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > & y 
)
+
+inline
+
+ +

Return true if the specified matrix is square.

+

This check allows 0x0 matrices.

+
Template Parameters
+ + +
TType of scalar.
+
+
+
Parameters
+ + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
yMatrix to test
+
+
+
Returns
true if the matrix is a square matrix.
+
Exceptions
+ + +
<code>std::invalid_argument</code>if the matrix is not square
+
+
+ +

Definition at line 28 of file check_square.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_std_vector_index (const char * function,
const char * name,
const std::vector< T > & y,
int i 
)
+
+inline
+
+ +

Return true if the specified index is valid in std vector.

+

This check is 1-indexed by default. This behavior can be changed by setting stan::error_index::value.

+
Template Parameters
+ + +
TScalar type
+
+
+
Parameters
+ + + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
ystd::vector to test
iIndex
+
+
+
Returns
true if the index is a valid in std vector.
+
Exceptions
+ + +
<code>std::out_of_range</code>if the index is out of range.
+
+
+ +

Definition at line 30 of file check_std_vector_index.hpp.

+ +
+
+ +
+
+
+template<typename T_y >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_symmetric (const char * function,
const char * name,
const Eigen::Matrix< T_y, Dynamic, Dynamic > & y 
)
+
+inline
+
+ +

Return true if the specified matrix is symmetric.

+

The error message is either 0 or 1 indexed, specified by stan::error_index::value.

+
Template Parameters
+ + +
T_yType of scalar.
+
+
+
Parameters
+ + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
yMatrix to test
+
+
+
Returns
true if the matrix is symmetric
+
Exceptions
+ + + +
<code>std::invalid_argument</code>if the matrix is not square.
<code>std::domain_error</code>if any element not on the main diagonal is NaN
+
+
+ +

Definition at line 38 of file check_symmetric.hpp.

+ +
+
+ +
+
+
+template<typename T_prob >
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_unit_vector (const char * function,
const char * name,
const Eigen::Matrix< T_prob, Dynamic, 1 > & theta 
)
+
+ +

Return true if the specified vector is unit vector.

+

A valid unit vector is one where the square of the elements summed is equal to 1. This function tests that the sum is within the tolerance specified by CONSTRAINT_TOLERANCE. This function only accepts Eigen vectors, statically typed vectors, not general matrices with 1 column.

+
Template Parameters
+ + +
T_probScalar type of the vector
+
+
+
Parameters
+ + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
thetaVector to test.
+
+
+
Returns
true if the vector is a unit vector.
+
Exceptions
+ + + +
<code>std::invalid_argument</code>if theta is a 0-vector.
<code>std::domain_error</code>if the vector is not a unit vector or if any element is NaN.
+
+
+ +

Definition at line 38 of file check_unit_vector.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::check_vector (const char * function,
const char * name,
const Eigen::Matrix< T, R, C > & x 
)
+
+inline
+
+ +

Return true if the matrix is either a row vector or column vector.

+

This function checks the runtime size of the matrix to check whether it is a row or column vector.

+
Template Parameters
+ + + + +
TScalar type of the matrix
RCompile time rows of the matrix
CCompile time columns of the matrix
+
+
+
Parameters
+ + + + +
functionFunction name (for error messages)
nameVariable name (for error messages)
xMatrix
+
+
+
Returns
true if x either has 1 columns or 1 rows
+
Exceptions
+ + +
<code>std::invalid_argument</code>if x is not a row or column vector.
+
+
+ +

Definition at line 34 of file check_vector.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_dof >
+ + + + + + + + + + + + + + + + + + +
return_type<T_y, T_dof>::type stan::math::chi_square_ccdf_log (const T_y & y,
const T_dof & nu 
)
+
+ +

Definition at line 28 of file chi_square_ccdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_dof >
+ + + + + + + + + + + + + + + + + + +
return_type<T_y, T_dof>::type stan::math::chi_square_cdf (const T_y & y,
const T_dof & nu 
)
+
+ +

Calculates the chi square cumulative distribution function for the given variate and degrees of freedom.

+

y A scalar variate. nu Degrees of freedom.

+
Returns
The cdf of the chi square distribution
+ +

Definition at line 37 of file chi_square_cdf.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_dof >
+ + + + + + + + + + + + + + + + + + +
return_type<T_y, T_dof>::type stan::math::chi_square_cdf_log (const T_y & y,
const T_dof & nu 
)
+
+ +

Definition at line 28 of file chi_square_cdf_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_dof >
+ + + + + + + + + + + + + + + + + + +
return_type<T_y, T_dof>::type stan::math::chi_square_log (const T_y & y,
const T_dof & nu 
)
+
+ +

The log of a chi-squared density for y with the specified degrees of freedom parameter.

+

The degrees of freedom prarameter must be greater than 0. y must be greater than or equal to 0.

+

+\begin{eqnarray*} y &\sim& \chi^2_\nu \\ \log (p (y \, |\, \nu)) &=& \log \left( \frac{2^{-\nu / 2}}{\Gamma (\nu / 2)} y^{\nu / 2 - 1} \exp^{- y / 2} \right) \\ &=& - \frac{\nu}{2} \log(2) - \log (\Gamma (\nu / 2)) + (\frac{\nu}{2} - 1) \log(y) - \frac{y}{2} \\ & & \mathrm{ where } \; y \ge 0 \end{eqnarray*} +

+
Parameters
+ + + +
yA scalar variable.
nuDegrees of freedom.
+
+
+
Exceptions
+ + + +
std::domain_errorif nu is not greater than or equal to 0
std::domain_errorif y is not greater than or equal to 0.
+
+
+
Template Parameters
+ + + +
T_yType of scalar.
T_dofType of degrees of freedom.
+
+
+ +

Definition at line 47 of file chi_square_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_dof >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
return_type<T_y, T_dof>::type stan::math::chi_square_log (const T_y & y,
const T_dof & nu 
)
+
+inline
+
+ +

Definition at line 144 of file chi_square_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
double stan::math::chi_square_rng (const double nu,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 25 of file chi_square_rng.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::cholesky_corr_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & y,
int K 
)
+
+ +

Definition at line 20 of file cholesky_corr_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::cholesky_corr_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & y,
int K,
T & lp 
)
+
+ +

Definition at line 58 of file cholesky_corr_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::cholesky_corr_free (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & x)
+
+ +

Definition at line 18 of file cholesky_corr_free.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::cholesky_decompose (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & m)
+
+ +

Return the lower-triangular Cholesky factor (i.e., matrix square root) of the specified square, symmetric matrix.

+

The return value $L$ will be a lower-traingular matrix such that the original matrix $A$ is given by

+

$A = L \times L^T$.

+
Parameters
+ + +
mSymmetrix matrix.
+
+
+
Returns
Square root of matrix.
+
Exceptions
+ + +
std::domain_errorif m is not a symmetric matrix or if m is not positive definite (if m has more than 0 elements)
+
+
+ +

Definition at line 25 of file cholesky_decompose.hpp.

+ +
+
+ +
+
+ + + + + + + + +
Eigen::Matrix<var, -1, -1> stan::math::cholesky_decompose (const Eigen::Matrix< var,-1,-1 > & A)
+
+ +

Definition at line 131 of file cholesky_decompose.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::cholesky_factor_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & x,
int M,
int N 
)
+
+ +

Return the Cholesky factor of the specified size read from the specified vector.

+

A total of (N choose 2) + N + (M - N) * N elements are required to read an M by N Cholesky factor.

+
Template Parameters
+ + +
TType of scalars in matrix
+
+
+
Parameters
+ + + + +
xVector of unconstrained values
MNumber of rows
NNumber of columns
+
+
+
Returns
Cholesky factor
+ +

Definition at line 29 of file cholesky_factor_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::cholesky_factor_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & x,
int M,
int N,
T & lp 
)
+
+ +

Return the Cholesky factor of the specified size read from the specified vector and increment the specified log probability reference with the log Jacobian adjustment of the transform.

+

A total of (N choose 2) + N + N * (M - N) free parameters are required to read an M by N Cholesky factor.

+
Template Parameters
+ + +
TType of scalars in matrix
+
+
+
Parameters
+ + + + + +
xVector of unconstrained values
MNumber of rows
NNumber of columns
lpLog probability that is incremented with the log Jacobian
+
+
+
Returns
Cholesky factor
+ +

Definition at line 73 of file cholesky_factor_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::cholesky_factor_free (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & y)
+
+ +

Return the unconstrained vector of parameters correspdonding to the specified Cholesky factor.

+

A Cholesky factor must be lower triangular and have positive diagonal elements.

+
Parameters
+ + +
yCholesky factor.
+
+
+
Returns
Unconstrained parameters for Cholesky factor.
+
Exceptions
+ + +
std::domain_errorIf the matrix is not a Cholesky factor.
+
+
+ +

Definition at line 24 of file cholesky_factor_free.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::col (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & m,
size_t j 
)
+
+inline
+
+ +

Return the specified column of the specified matrix using start-at-1 indexing.

+

This is equivalent to calling m.col(i - 1) and assigning the resulting template expression to a column vector.

+
Parameters
+ + + +
mMatrix.
jColumn index (count from 1).
+
+
+
Returns
Specified column of the matrix.
+ +

Definition at line 24 of file col.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
int stan::math::cols (const Eigen::Matrix< T, R, C > & m)
+
+inline
+
+ +

Return the number of columns in the specified matrix, vector, or row vector.

+
Template Parameters
+ + + + +
TType of matrix entries.
RRow type of matrix.
CColumn type of matrix.
+
+
+
Parameters
+ + +
[in]mInput matrix, vector, or row vector.
+
+
+
Returns
Number of columns.
+ +

Definition at line 20 of file cols.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, 1, C1> stan::math::columns_dot_product (const Eigen::Matrix< fvar< T >, R1, C1 > & v1,
const Eigen::Matrix< fvar< T >, R2, C2 > & v2 
)
+
+inline
+
+ +

Definition at line 18 of file columns_dot_product.hpp.

+ +
+
+ +
+
+
+template<int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<double, 1, C1> stan::math::columns_dot_product (const Eigen::Matrix< double, R1, C1 > & v1,
const Eigen::Matrix< double, R2, C2 > & v2 
)
+
+inline
+
+ +

Returns the dot product of the specified vectors.

+
Parameters
+ + + +
v1First vector.
v2Second vector.
+
+
+
Returns
Dot product of the vectors.
+
Exceptions
+ + +
std::domain_errorIf the vectors are not the same size or if they are both not vector dimensioned.
+
+
+ +

Definition at line 22 of file columns_dot_product.hpp.

+ +
+
+ +
+
+
+template<typename T1 , int R1, int C1, typename T2 , int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::enable_if_c<boost::is_same<T1, var>::value || boost::is_same<T2, var>::value, Eigen::Matrix<var, 1, C1> >::type stan::math::columns_dot_product (const Eigen::Matrix< T1, R1, C1 > & v1,
const Eigen::Matrix< T2, R2, C2 > & v2 
)
+
+inline
+
+ +

Definition at line 25 of file columns_dot_product.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, 1, C1> stan::math::columns_dot_product (const Eigen::Matrix< fvar< T >, R1, C1 > & v1,
const Eigen::Matrix< double, R2, C2 > & v2 
)
+
+inline
+
+ +

Definition at line 35 of file columns_dot_product.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, 1, C1> stan::math::columns_dot_product (const Eigen::Matrix< double, R1, C1 > & v1,
const Eigen::Matrix< fvar< T >, R2, C2 > & v2 
)
+
+inline
+
+ +

Definition at line 52 of file columns_dot_product.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<fvar<T>, 1, C> stan::math::columns_dot_self (const Eigen::Matrix< fvar< T >, R, C > & x)
+
+inline
+
+ +

Definition at line 15 of file columns_dot_self.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<T, 1, C> stan::math::columns_dot_self (const Eigen::Matrix< T, R, C > & x)
+
+inline
+
+ +

Returns the dot product of each column of a matrix with itself.

+
Parameters
+ + +
xMatrix.
+
+
+
Template Parameters
+ + +
Tscalar type
+
+
+ +

Definition at line 16 of file columns_dot_self.hpp.

+ +
+
+ +
+
+
+template<int R, int C>
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<var, 1, C> stan::math::columns_dot_self (const Eigen::Matrix< var, R, C > & x)
+
+inline
+
+ +

Returns the dot product of each column of a matrix with itself.

+
Parameters
+ + +
xMatrix.
+
+
+
Template Parameters
+ + +
Tscalar type
+
+
+ +

Definition at line 22 of file columns_dot_self.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
T stan::math::corr_constrain (const T x)
+
+inline
+
+ +

Return the result of transforming the specified scalar to have a valid correlation value between -1 and 1 (inclusive).

+

The transform used is the hyperbolic tangent function,

+

$f(x) = \tanh x = \frac{\exp(2x) - 1}{\exp(2x) + 1}$.

+
Parameters
+ + +
xScalar input.
+
+
+
Returns
Result of transforming the input to fall between -1 and 1.
+
Template Parameters
+ + +
TType of scalar.
+
+
+ +

Definition at line 25 of file corr_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
T stan::math::corr_constrain (const T x,
T & lp 
)
+
+inline
+
+ +

Return the result of transforming the specified scalar to have a valid correlation value between -1 and 1 (inclusive).

+

The transform used is as specified for corr_constrain(T). The log absolute Jacobian determinant is

+

$\log | \frac{d}{dx} \tanh x | = \log (1 - \tanh^2 x)$.

+
Template Parameters
+ + +
TType of scalar.
+
+
+ +

Definition at line 43 of file corr_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
T stan::math::corr_free (const T y)
+
+inline
+
+ +

Return the unconstrained scalar that when transformed to a valid correlation produces the specified value.

+

This function inverts the transform defined for corr_constrain(T), which is the inverse hyperbolic tangent,

+

$ f^{-1}(y) = \mbox{atanh}\, y = \frac{1}{2} \log \frac{y + 1}{y - 1}$.

+
Parameters
+ + +
yCorrelation scalar input.
+
+
+
Returns
Free scalar that transforms to the specified input.
+
Template Parameters
+ + +
TType of scalar.
+
+
+ +

Definition at line 29 of file corr_free.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::corr_matrix_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & x,
typename math::index_type< Eigen::Matrix< T, Eigen::Dynamic, 1 > >::type k 
)
+
+ +

Return the correlation matrix of the specified dimensionality derived from the specified vector of unconstrained values.

+

The input vector must be of length ${k \choose 2} = \frac{k(k-1)}{2}$. The values in the input vector represent unconstrained (partial) correlations among the dimensions.

+

The transform based on partial correlations is as specified in

+
    +
  • +Lewandowski, Daniel, Dorota Kurowicka, and Harry Joe. 2009. Generating random correlation matrices based on vines and extended onion method. Journal of Multivariate Analysis 100:1989–-2001.
  • +
+

The free vector entries are first constrained to be valid correlation values using corr_constrain(T).

+
Parameters
+ + + +
xVector of unconstrained partial correlations.
kDimensionality of returned correlation matrix.
+
+
+
Template Parameters
+ + +
TType of scalar.
+
+
+
Exceptions
+ + +
std::invalid_argumentif x is not a valid correlation matrix.
+
+
+ +

Definition at line 40 of file corr_matrix_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::corr_matrix_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & x,
typename math::index_type< Eigen::Matrix< T, Eigen::Dynamic, 1 > >::type k,
T & lp 
)
+
+ +

Return the correlation matrix of the specified dimensionality derived from the specified vector of unconstrained values.

+

The input vector must be of length ${k \choose 2} = \frac{k(k-1)}{2}$. The values in the input vector represent unconstrained (partial) correlations among the dimensions.

+

The transform is as specified for corr_matrix_constrain(Matrix, size_t); the paper it cites also defines the Jacobians for correlation inputs, which are composed with the correlation constrained Jacobians defined in corr_constrain(T, double) for this function.

+
Parameters
+ + + + +
xVector of unconstrained partial correlations.
kDimensionality of returned correlation matrix.
lpLog probability reference to increment.
+
+
+
Template Parameters
+ + +
TType of scalar.
+
+
+ +

Definition at line 78 of file corr_matrix_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::corr_matrix_free (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & y)
+
+ +

Return the vector of unconstrained partial correlations that define the specified correlation matrix when transformed.

+

The constraining transform is defined as for corr_matrix_constrain(Matrix, size_t). The inverse transform in this function is simpler in that it only needs to compute the $k \choose 2$ partial correlations and then free those.

+
Parameters
+ + +
yThe correlation matrix to free.
+
+
+
Returns
Vector of unconstrained values that produce the specified correlation matrix when transformed.
+
Template Parameters
+ + +
TType of scalar.
+
+
+
Exceptions
+ + + +
std::domain_errorif the correlation matrix has no elements or is not a square matrix.
std::runtime_errorif the correlation matrix cannot be factorized by factor_cov_matrix() or if the sds returned by factor_cov_matrix() on log scale are unconstrained.
+
+
+ +

Definition at line 38 of file corr_matrix_free.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::cos (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 13 of file cos.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::cos (const var & a)
+
+inline
+
+ +

Return the cosine of a radian-scaled variable (cmath).

+

The derivative is defined by

+

$\frac{d}{dx} \cos x = - \sin x$.

+

+\[ \mbox{cos}(x) = \begin{cases} \cos(x) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{cos}(x)}{\partial x} = \begin{cases} -\sin(x) & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
aVariable for radians of angle.
+
+
+
Returns
Cosine of variable.
+ +

Definition at line 49 of file cos.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::cosh (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 13 of file cosh.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::cosh (const var & a)
+
+inline
+
+ +

Return the hyperbolic cosine of the specified variable (cmath).

+

The derivative is defined by

+

$\frac{d}{dx} \cosh x = \sinh x$.

+

+\[ \mbox{cosh}(x) = \begin{cases} \cosh(x) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{cosh}(x)}{\partial x} = \begin{cases} \sinh(x) & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
aVariable.
+
+
+
Returns
Hyperbolic cosine of variable.
+ +

Definition at line 50 of file cosh.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::cov_matrix_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & x,
typename math::index_type< Eigen::Matrix< T, Eigen::Dynamic, 1 > >::type K 
)
+
+ +

Return the symmetric, positive-definite matrix of dimensions K by K resulting from transforming the specified finite vector of size K plus (K choose 2).

+

See cov_matrix_free() for the inverse transform.

+
Parameters
+ + + +
xThe vector to convert to a covariance matrix.
KThe number of rows and columns of the resulting covariance matrix.
+
+
+
Exceptions
+ + +
std::domain_errorif (x.size() != K + (K choose 2)).
+
+
+ +

Definition at line 30 of file cov_matrix_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::cov_matrix_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & x,
typename math::index_type< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > >::type K,
T & lp 
)
+
+ +

Return the symmetric, positive-definite matrix of dimensions K by K resulting from transforming the specified finite vector of size K plus (K choose 2).

+

See cov_matrix_free() for the inverse transform.

+
Parameters
+ + + + +
xThe vector to convert to a covariance matrix.
KThe dimensions of the resulting covariance matrix.
lpReference
+
+
+
Exceptions
+ + +
std::domain_errorif (x.size() != K + (K choose 2)).
+
+
+ +

Definition at line 70 of file cov_matrix_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::cov_matrix_constrain_lkj (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & x,
size_t k 
)
+
+ +

Return the covariance matrix of the specified dimensionality derived from constraining the specified vector of unconstrained values.

+

The input vector must be of length $k \choose 2 + k$. The first $k \choose 2$ values in the input represent unconstrained (partial) correlations and the last $k$ are unconstrained standard deviations of the dimensions.

+

The transform scales the correlation matrix transform defined in corr_matrix_constrain(Matrix, size_t) with the constrained deviations.

+
Parameters
+ + + +
xInput vector of unconstrained partial correlations and standard deviations.
kDimensionality of returned covariance matrix.
+
+
+
Returns
Covariance matrix derived from the unconstrained partial correlations and deviations.
+
Template Parameters
+ + +
TType of scalar.
+
+
+ +

Definition at line 34 of file cov_matrix_constrain_lkj.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::cov_matrix_constrain_lkj (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & x,
size_t k,
T & lp 
)
+
+ +

Return the covariance matrix of the specified dimensionality derived from constraining the specified vector of unconstrained values and increment the specified log probability reference with the log absolute Jacobian determinant.

+

The transform is defined as for cov_matrix_constrain(Matrix, size_t).

+

The log absolute Jacobian determinant is derived by composing the log absolute Jacobian determinant for the underlying correlation matrix as defined in cov_matrix_constrain(Matrix, size_t, T&) with the Jacobian of the transfrom of the correlation matrix into a covariance matrix by scaling by standard deviations.

+
Parameters
+ + + + +
xInput vector of unconstrained partial correlations and standard deviations.
kDimensionality of returned covariance matrix.
lpLog probability reference to increment.
+
+
+
Returns
Covariance matrix derived from the unconstrained partial correlations and deviations.
+
Template Parameters
+ + +
TType of scalar.
+
+
+ +

Definition at line 73 of file cov_matrix_constrain_lkj.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::cov_matrix_free (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & y)
+
+ +

The covariance matrix derived from the symmetric view of the lower-triangular view of the K by K specified matrix is freed to return a vector of size K + (K choose 2).

+

This is the inverse of the cov_matrix_constrain() function so that for any finite vector x of size K

+
    +
  • (K choose 2),
  • +
+

x == cov_matrix_free(cov_matrix_constrain(x, K)).

+

In order for this round-trip to work (and really for this function to work), the symmetric view of its lower-triangular view must be positive definite.

+
Parameters
+ + +
yMatrix of dimensions K by K such that he symmetric view of the lower-triangular view is positive definite.
+
+
+
Returns
Vector of size K plus (K choose 2) in (-inf, inf) that produces
+
Exceptions
+ + +
std::domain_errorif y is not square, has zero dimensionality, or has a non-positive diagonal element.
+
+
+ +

Definition at line 37 of file cov_matrix_free.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::cov_matrix_free_lkj (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & y)
+
+ +

Return the vector of unconstrained partial correlations and deviations that transform to the specified covariance matrix.

+

The constraining transform is defined as for cov_matrix_constrain(Matrix, size_t). The inverse first factors out the deviations, then applies the freeing transfrom of corr_matrix_free(Matrix&).

+
Parameters
+ + +
yCovariance matrix to free.
+
+
+
Returns
Vector of unconstrained values that transforms to the specified covariance matrix.
+
Template Parameters
+ + +
TType of scalar.
+
+
+
Exceptions
+ + + +
std::domain_errorif the correlation matrix has no elements or is not a square matrix.
std::runtime_errorif the correlation matrix cannot be factorized by factor_cov_matrix()
+
+
+ +

Definition at line 32 of file cov_matrix_free_lkj.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<fvar<T>, C, C> stan::math::crossprod (const Eigen::Matrix< fvar< T >, R, C > & m)
+
+inline
+
+ +

Definition at line 17 of file crossprod.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
matrix_d stan::math::crossprod (const matrix_d & M)
+
+inline
+
+ +

Returns the result of pre-multiplying a matrix by its own transpose.

+
Parameters
+ + +
MMatrix to multiply.
+
+
+
Returns
Transpose of M times M
+ +

Definition at line 17 of file crossprod.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
matrix_v stan::math::crossprod (const matrix_v & M)
+
+inline
+
+ +

Returns the result of pre-multiplying a matrix by its own transpose.

+
Parameters
+ + +
MMatrix to multiply.
+
+
+
Returns
Transpose of M times M
+ +

Definition at line 17 of file crossprod.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, Eigen::Dynamic, 1> stan::math::csr_matrix_times_vector (const int & m,
const int & n,
const Eigen::Matrix< T1, Eigen::Dynamic, 1 > & w,
const std::vector< int > & v,
const std::vector< int > & u,
const Eigen::Matrix< T2, Eigen::Dynamic, 1 > & b 
)
+
+inline
+
+ +

Definition at line 79 of file csr_matrix_times_vector.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
std::vector<T> stan::math::cumulative_sum (const std::vector< T > & x)
+
+inline
+
+ +

Return the cumulative sum of the specified vector.

+

The cumulative sum of a vector of values

+
is the
+
+
@code x[0], x[1] + x[2], ..., x[1] + , ..., + x[x.size()-1]
+
Template Parameters
+ + +
TScalar type of vector.
+
+
+
Parameters
+ + +
xVector of values.
+
+
+
Returns
Cumulative sum of values.
+ +

Definition at line 23 of file cumulative_sum.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<T, R, C> stan::math::cumulative_sum (const Eigen::Matrix< T, R, C > & m)
+
+inline
+
+ +

Return the cumulative sum of the specified matrix.

+

The cumulative sum is of the same type as the input and has values defined by

+
x(0), x(1) + x(2), ..., x(1) + , ..., + x(x.size()-1)
+
Template Parameters
+ + + + +
TScalar type of matrix.
RRow type of matrix.
CColumn type of matrix.
+
+
+
Parameters
+ + +
mMatrix of values.
+
+
+
Returns
Cumulative sum of values.
+ +

Definition at line 49 of file cumulative_sum.hpp.

+ +
+
+ +
+
+
+template<typename T , typename F >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::derivative (const F & f,
const T & x,
T & fx,
T & dfx_dx 
)
+
+ +

Return the derivative of the specified univariate function at the specified argument.

+
Template Parameters
+ + + +
TArgument type
FFunction type
+
+
+
Parameters
+ + + + + +
[in]fFunction
[in]xArgument
[out]fxValue of function applied to argument
[out]dfx_dxValue of derivative
+
+
+ +

Definition at line 28 of file derivative.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
T stan::math::determinant (const Eigen::Matrix< T, R, C > & m)
+
+inline
+
+ +

Returns the determinant of the specified square matrix.

+
Parameters
+ + +
mSpecified matrix.
+
+
+
Returns
Determinant of the matrix.
+
Exceptions
+ + +
std::domain_errorif matrix is not square.
+
+
+ +

Definition at line 18 of file determinant.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::determinant (const Eigen::Matrix< fvar< T >, R, C > & m)
+
+inline
+
+ +

Definition at line 21 of file determinant.hpp.

+ +
+
+ +
+
+
+template<int R, int C>
+ + + + + +
+ + + + + + + + +
var stan::math::determinant (const Eigen::Matrix< var, R, C > & m)
+
+inline
+
+ +

Definition at line 66 of file determinant.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::diag_matrix (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & v)
+
+inline
+
+ +

Return a square diagonal matrix with the specified vector of coefficients as the diagonal values.

+
Parameters
+ + +
[in]vSpecified vector.
+
+
+
Returns
Diagonal matrix with vector as diagonal values.
+ +

Definition at line 18 of file diag_matrix.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R1, C1> stan::math::diag_post_multiply (const Eigen::Matrix< T1, R1, C1 > & m1,
const Eigen::Matrix< T2, R2, C2 > & m2 
)
+
+ +

Definition at line 14 of file diag_post_multiply.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R2, C2> stan::math::diag_pre_multiply (const Eigen::Matrix< T1, R1, C1 > & m1,
const Eigen::Matrix< T2, R2, C2 > & m2 
)
+
+ +

Definition at line 14 of file diag_pre_multiply.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::diagonal (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & m)
+
+inline
+
+ +

Return a column vector of the diagonal elements of the specified matrix.

+

The matrix is not required to be square.

+
Parameters
+ + +
mSpecified matrix.
+
+
+
Returns
Diagonal of the matrix.
+ +

Definition at line 18 of file diagonal.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::digamma (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 16 of file digamma.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::digamma (const stan::math::vara)
+
+inline
+
+ +

Definition at line 24 of file digamma.hpp.

+ +
+
+ +
+
+ + + + + + + + +
double stan::math::digamma (double x)
+
+ +

+\[ \mbox{digamma}(x) = \begin{cases} \textrm{error} & \mbox{if } x\in \{\dots, -3, -2, -1, 0\}\\ \Psi(x) & \mbox{if } x\not\in \{\dots, -3, -2, -1, 0\}\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+

+\[ \frac{\partial\, \mbox{digamma}(x)}{\partial x} = \begin{cases} \textrm{error} & \mbox{if } x\in \{\dots, -3, -2, -1, 0\}\\ \frac{\partial\, \Psi(x)}{\partial x} & \mbox{if } x\not\in \{\dots, -3, -2, -1, 0\}\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \Psi(x)=\frac{\Gamma'(x)}{\Gamma(x)} \] +

+

+\[ \frac{\partial \, \Psi(x)}{\partial x} = \frac{\Gamma''(x)\Gamma(x)-(\Gamma'(x))^2}{\Gamma^2(x)} \] +

+ +

Definition at line 39 of file digamma.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void stan::math::dims (const T & x,
std::vector< int > & result 
)
+
+inline
+
+ +

Definition at line 13 of file dims.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void stan::math::dims (const Eigen::Matrix< T, R, C > & x,
std::vector< int > & result 
)
+
+inline
+
+ +

Definition at line 18 of file dims.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void stan::math::dims (const std::vector< T > & x,
std::vector< int > & result 
)
+
+inline
+
+ +

Definition at line 25 of file dims.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
std::vector<int> stan::math::dims (const T & x)
+
+inline
+
+ +

Definition at line 34 of file dims.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_prob , typename T_prior_sample_size >
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_prob, T_prior_sample_size>::type stan::math::dirichlet_log (const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > & theta,
const Eigen::Matrix< T_prior_sample_size, Eigen::Dynamic, 1 > & alpha 
)
+
+ +

The log of the Dirichlet density for the given theta and a vector of prior sample sizes, alpha.

+

Each element of alpha must be greater than 0. Each element of theta must be greater than or 0. Theta sums to 1.

+

+\begin{eqnarray*} \theta &\sim& \mbox{\sf{Dirichlet}} (\alpha_1, \ldots, \alpha_k) \\ \log (p (\theta \, |\, \alpha_1, \ldots, \alpha_k) ) &=& \log \left( \frac{\Gamma(\alpha_1 + \cdots + \alpha_k)}{\Gamma(\alpha_1) \cdots \Gamma(\alpha_k)} \theta_1^{\alpha_1 - 1} \cdots \theta_k^{\alpha_k - 1} \right) \\ &=& \log (\Gamma(\alpha_1 + \cdots + \alpha_k)) - \log(\Gamma(\alpha_1)) - \cdots - \log(\Gamma(\alpha_k)) + (\alpha_1 - 1) \log (\theta_1) + \cdots + (\alpha_k - 1) \log (\theta_k) \end{eqnarray*} +

+
Parameters
+ + + +
thetaA scalar vector.
alphaPrior sample sizes.
+
+
+
Returns
The log of the Dirichlet density.
+
Exceptions
+ + + + +
std::domain_errorif any element of alpha is less than or equal to 0.
std::domain_errorif any element of theta is less than 0.
std::domain_errorif the sum of theta is not 1.
+
+
+
Template Parameters
+ + + +
T_probType of scalar.
T_prior_sample_sizeType of prior sample sizes.
+
+
+ +

Definition at line 46 of file dirichlet_log.hpp.

+ +
+
+ +
+
+
+template<typename T_prob , typename T_prior_sample_size >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_prob, T_prior_sample_size>::type stan::math::dirichlet_log (const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > & theta,
const Eigen::Matrix< T_prior_sample_size, Eigen::Dynamic, 1 > & alpha 
)
+
+inline
+
+ +

Definition at line 79 of file dirichlet_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::VectorXd stan::math::dirichlet_rng (const Eigen::Matrix< double, Eigen::Dynamic, 1 > & alpha,
RNG & rng 
)
+
+inline
+
+ +

Return a draw from a Dirichlet distribution with specified parameters and pseudo-random number generator.

+

For prior counts greater than zero, the usual algorithm that draws gamma variates and normalizes is used.

+

For prior counts less than zero (i.e., parameters with value less than one), a log-scale version of the following algorithm is used to deal with underflow:

+
+

G. Marsaglia and W. Tsang. A simple method for generating gamma variables. ACM Transactions on Mathematical Software. 26(3):363–372, 2000.

+
+
Template Parameters
+ + +
RNGType of pseudo-random number generator.
+
+
+
Parameters
+ + + +
alphaPrior count (plus 1) parameter for Dirichlet.
rngPseudo-random number generator.
+
+
+ +

Definition at line 46 of file dirichlet_rng.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
double stan::math::dist (const std::vector< double > & x,
const std::vector< double > & y 
)
+
+inline
+
+ +

Definition at line 11 of file dist.hpp.

+ +
+
+ +
+
+
+template<typename T1 , int R1, int C1, typename T2 , int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T1, T2>::type stan::math::distance (const Eigen::Matrix< T1, R1, C1 > & v1,
const Eigen::Matrix< T2, R2, C2 > & v2 
)
+
+inline
+
+ +

Returns the distance between the specified vectors.

+
Parameters
+ + + +
v1First vector.
v2Second vector.
+
+
+
Returns
Dot product of the vectors.
+
Exceptions
+ + +
std::domain_errorIf the vectors are not the same size or if they are both not vector dimensioned.
+
+
+ +

Definition at line 25 of file distance.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int stan::math::divide (const int x,
const int y 
)
+
+inline
+
+ +

Definition at line 10 of file divide.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
stan::return_type<T1, T2>::type stan::math::divide (const T1 & v,
const T2 & c 
)
+
+inline
+
+ +

Definition at line 17 of file divide.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
double stan::math::divide (double x,
double y 
)
+
+inline
+
+ +

Return the division of the first scalar by the second scalar.

+
Parameters
+ + + +
[in]xSpecified vector.
[in]ySpecified scalar.
+
+
+
Returns
Vector divided by the scalar.
+ +

Definition at line 22 of file divide.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R, C> stan::math::divide (const Eigen::Matrix< fvar< T >, R, C > & v,
const fvar< T > & c 
)
+
+inline
+
+ +

Definition at line 23 of file divide.hpp.

+ +
+
+ +
+
+
+template<int R, int C, typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::enable_if_c<boost::is_arithmetic<T>::value, Eigen::Matrix<double, R, C> >::type stan::math::divide (const Eigen::Matrix< double, R, C > & m,
c 
)
+
+inline
+
+ +

Return specified matrix divided by specified scalar.

+
Template Parameters
+ + + +
RRow type for matrix.
CColumn type for matrix.
+
+
+
Parameters
+ + + +
mMatrix.
cScalar.
+
+
+
Returns
Matrix divided by scalar.
+ +

Definition at line 23 of file divide.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::divide (const T1 & v,
const T2 & c 
)
+
+inline
+
+ +

Definition at line 27 of file divide.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R, C> stan::math::divide (const Eigen::Matrix< fvar< T >, R, C > & v,
const double c 
)
+
+inline
+
+ +

Definition at line 34 of file divide.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<var, R, C> stan::math::divide (const Eigen::Matrix< T1, R, C > & v,
const T2 & c 
)
+
+inline
+
+ +

Return the division of the specified column vector by the specified scalar.

+
Parameters
+ + + +
[in]vSpecified vector.
[in]cSpecified scalar.
+
+
+
Returns
Vector divided by the scalar.
+ +

Definition at line 39 of file divide.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R, C> stan::math::divide (const Eigen::Matrix< double, R, C > & v,
const fvar< T > & c 
)
+
+inline
+
+ +

Definition at line 46 of file divide.hpp.

+ +
+
+ +
+
+
+template<typename T_shape >
+ + + + + + + + + + + + + + + + + + +
T_shape stan::math::do_lkj_constant (const T_shape & eta,
const unsigned int & K 
)
+
+ +

Definition at line 55 of file lkj_corr_log.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::domain_error (const char * function,
const char * name,
const T & y,
const char * msg1,
const char * msg2 
)
+
+inline
+
+ +

Throw a domain error with a consistently formatted message.

+

This is an abstraction for all Stan functions to use when throwing domain errors. This will allow us to change the behavior for all functions at once. (We've already changed behavior mulitple times up to Stan v2.5.0.)

+

The message is: "<function>: <name> <msg1><y><msg2>"

+
Template Parameters
+ + +
TType of variable
+
+
+
Parameters
+ + + + + + +
functionName of the function
nameName of the variable
yVariable
msg1Message to print before the variable
msg2Message to print after the variable
+
+
+
Exceptions
+ + +
std::domain_error
+
+
+ +

Definition at line 32 of file domain_error.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::domain_error (const char * function,
const char * name,
const T & y,
const char * msg1 
)
+
+inline
+
+ +

Throw a domain error with a consistently formatted message.

+

This is an abstraction for all Stan functions to use when throwing domain errors. This will allow us to change the behavior for all functions at once. (We've already changed behavior mulitple times up to Stan v2.5.0.)

+

The message is: "<function>: <name> <msg1><y>"

+
Template Parameters
+ + +
TType of variable
+
+
+
Parameters
+ + + + + +
functionName of the function
nameName of the variable
yVariable
msg1Message to print before the variable
+
+
+
Exceptions
+ + +
std::domain_error
+
+
+ +

Definition at line 67 of file domain_error.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::domain_error_vec (const char * function,
const char * name,
const T & y,
const size_t i,
const char * msg1,
const char * msg2 
)
+
+inline
+
+ +

Throw a domain error with a consistently formatted message.

+

This is an abstraction for all Stan functions to use when throwing domain errors. This will allow us to change the behavior for all functions at once. (We've already changed behavior mulitple times up to Stan v2.5.0.)

+

The message is: "<function>: <name>[<i+error_index>] <msg1><y>" where error_index is the value of stan::error_index::value which indicates whether the message should be 0 or 1 indexed.

+
Template Parameters
+ + +
TType of variable
+
+
+
Parameters
+ + + + + + + +
functionName of the function
nameName of the variable
yVariable
iIndex
msg1Message to print before the variable
msg2Message to print after the variable
+
+
+
Exceptions
+ + +
std::domain_error
+
+
+ +

Definition at line 38 of file domain_error_vec.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::domain_error_vec (const char * function,
const char * name,
const T & y,
const size_t i,
const char * msg 
)
+
+inline
+
+ +

Throw a domain error with a consistently formatted message.

+

This is an abstraction for all Stan functions to use when throwing domain errors. This will allow us to change the behavior for all functions at once. (We've already changed behavior mulitple times up to Stan v2.5.0.)

+

The message is: "<function>: <name>[<i+error_index>] <msg1><y>" where error_index is the value of stan::error_index::value which indicates whether the message should be 0 or 1 indexed.

+
Template Parameters
+ + +
TType of variable
+
+
+
Parameters
+ + + + + + +
functionName of the function
nameName of the variable
yVariable
iIndex
msgMessage to print before the variable
+
+
+
Exceptions
+ + +
std::domain_error
+
+
+ +

Definition at line 73 of file domain_error_vec.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
double stan::math::dot (const std::vector< double > & x,
const std::vector< double > & y 
)
+
+inline
+
+ +

Definition at line 11 of file dot.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::dot_product (const Eigen::Matrix< fvar< T >, R1, C1 > & v1,
const Eigen::Matrix< fvar< T >, R2, C2 > & v2 
)
+
+inline
+
+ +

Definition at line 20 of file dot_product.hpp.

+ +
+
+ +
+
+
+template<int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
double stan::math::dot_product (const Eigen::Matrix< double, R1, C1 > & v1,
const Eigen::Matrix< double, R2, C2 > & v2 
)
+
+inline
+
+ +

Returns the dot product of the specified vectors.

+
Parameters
+ + + +
v1First vector.
v2Second vector.
+
+
+
Returns
Dot product of the vectors.
+
Exceptions
+ + +
std::domain_errorIf the vectors are not the same size or if they are both not vector dimensioned.
+
+
+ +

Definition at line 22 of file dot_product.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
double stan::math::dot_product (const double * v1,
const double * v2,
size_t length 
)
+
+inline
+
+ +

Returns the dot product of the specified arrays of doubles.

+
Parameters
+ + + + +
v1First array.
v2Second array.
lengthLength of both arrays.
+
+
+ +

Definition at line 37 of file dot_product.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::dot_product (const Eigen::Matrix< fvar< T >, R1, C1 > & v1,
const Eigen::Matrix< double, R2, C2 > & v2 
)
+
+inline
+
+ +

Definition at line 37 of file dot_product.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
double stan::math::dot_product (const std::vector< double > & v1,
const std::vector< double > & v2 
)
+
+inline
+
+ +

Returns the dot product of the specified arrays of doubles.

+
Parameters
+ + + +
v1First array.
v2Second array.
+
+
+
Exceptions
+ + +
std::domain_errorif the vectors are not the same size.
+
+
+ +

Definition at line 50 of file dot_product.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::dot_product (const Eigen::Matrix< double, R1, C1 > & v1,
const Eigen::Matrix< fvar< T >, R2, C2 > & v2 
)
+
+inline
+
+ +

Definition at line 54 of file dot_product.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::dot_product (const Eigen::Matrix< fvar< T >, R1, C1 > & v1,
const Eigen::Matrix< fvar< T >, R2, C2 > & v2,
size_type & length 
)
+
+inline
+
+ +

Definition at line 71 of file dot_product.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::dot_product (const Eigen::Matrix< fvar< T >, R1, C1 > & v1,
const Eigen::Matrix< double, R2, C2 > & v2,
size_type & length 
)
+
+inline
+
+ +

Definition at line 86 of file dot_product.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::dot_product (const Eigen::Matrix< double, R1, C1 > & v1,
const Eigen::Matrix< fvar< T >, R2, C2 > & v2,
size_type & length 
)
+
+inline
+
+ +

Definition at line 101 of file dot_product.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::dot_product (const std::vector< fvar< T > > & v1,
const std::vector< fvar< T > > & v2 
)
+
+inline
+
+ +

Definition at line 116 of file dot_product.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::dot_product (const std::vector< double > & v1,
const std::vector< fvar< T > > & v2 
)
+
+inline
+
+ +

Definition at line 130 of file dot_product.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::dot_product (const std::vector< fvar< T > > & v1,
const std::vector< double > & v2 
)
+
+inline
+
+ +

Definition at line 144 of file dot_product.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::dot_product (const std::vector< fvar< T > > & v1,
const std::vector< fvar< T > > & v2,
size_type & length 
)
+
+inline
+
+ +

Definition at line 158 of file dot_product.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::dot_product (const std::vector< double > & v1,
const std::vector< fvar< T > > & v2,
size_type & length 
)
+
+inline
+
+ +

Definition at line 170 of file dot_product.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::dot_product (const std::vector< fvar< T > > & v1,
const std::vector< double > & v2,
size_type & length 
)
+
+inline
+
+ +

Definition at line 182 of file dot_product.hpp.

+ +
+
+ +
+
+
+template<typename T1 , int R1, int C1, typename T2 , int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::enable_if_c<boost::is_same<T1, var>::value || boost::is_same<T2, var>::value, var>::type stan::math::dot_product (const Eigen::Matrix< T1, R1, C1 > & v1,
const Eigen::Matrix< T2, R2, C2 > & v2 
)
+
+inline
+
+ +

Returns the dot product.

+
Parameters
+ + + +
[in]v1First column vector.
[in]v2Second column vector.
+
+
+
Returns
Dot product of the vectors.
+
Exceptions
+ + +
std::domain_errorif length of v1 is not equal to length of v2.
+
+
+ +

Definition at line 212 of file dot_product.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
boost::enable_if_c<boost::is_same<T1, var>::value || boost::is_same<T2, var>::value, var>::type stan::math::dot_product (const T1 * v1,
const T2 * v2,
size_t length 
)
+
+inline
+
+ +

Returns the dot product.

+
Parameters
+ + + + +
[in]v1First array.
[in]v2Second array.
[in]lengthLength of both arrays.
+
+
+
Returns
Dot product of the arrays.
+ +

Definition at line 233 of file dot_product.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::enable_if_c<boost::is_same<T1, var>::value || boost::is_same<T2, var>::value, var>::type stan::math::dot_product (const std::vector< T1 > & v1,
const std::vector< T2 > & v2 
)
+
+inline
+
+ +

Returns the dot product.

+
Parameters
+ + + +
[in]v1First vector.
[in]v2Second vector.
+
+
+
Returns
Dot product of the vectors.
+
Exceptions
+ + +
std::domain_errorif sizes of v1 and v2 do not match.
+
+
+ +

Definition at line 249 of file dot_product.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
double stan::math::dot_self (const std::vector< double > & x)
+
+inline
+
+ +

Definition at line 11 of file dot_self.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::dot_self (const Eigen::Matrix< fvar< T >, R, C > & v)
+
+inline
+
+ +

Definition at line 16 of file dot_self.hpp.

+ +
+
+ +
+
+
+template<int R, int C>
+ + + + + +
+ + + + + + + + +
double stan::math::dot_self (const Eigen::Matrix< double, R, C > & v)
+
+inline
+
+ +

Returns the dot product of the specified vector with itself.

+
Parameters
+ + +
vVector.
+
+
+
Template Parameters
+ + + +
Rnumber of rows or Eigen::Dynamic for dynamic
Cnumber of rows or Eigen::Dyanmic for dynamic
+
+
+
Exceptions
+ + +
std::domain_errorIf v is not vector dimensioned.
+
+
+ +

Definition at line 18 of file dot_self.hpp.

+ +
+
+ +
+
+
+template<int R, int C>
+ + + + + +
+ + + + + + + + +
var stan::math::dot_self (const Eigen::Matrix< var, R, C > & v)
+
+inline
+
+ +

Returns the dot product of a vector with itself.

+
Parameters
+ + +
[in]vVector.
+
+
+
Returns
Dot product of the vector with itself.
+
Template Parameters
+ + + +
Rnumber of rows or Eigen::Dynamic for dynamic; one of R or C must be 1
Cnumber of rows or Eigen::Dyanmic for dynamic; one of R or C must be 1
+
+
+ +

Definition at line 80 of file dot_self.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::double_exponential_ccdf_log (const T_y & y,
const T_loc & mu,
const T_scale & sigma 
)
+
+ +

Definition at line 24 of file double_exponential_ccdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::double_exponential_cdf (const T_y & y,
const T_loc & mu,
const T_scale & sigma 
)
+
+ +

Calculates the double exponential cumulative density function.

+

$ f(y|\mu, \sigma) = \begin{cases} \ \frac{1}{2} \exp\left(\frac{y-\mu}{\sigma}\right), \mbox{if } y < \mu \\ 1 - \frac{1}{2} \exp\left(-\frac{y-\mu}{\sigma}\right), \mbox{if } y \ge \mu \ \end{cases}$

+
Parameters
+ + + + +
yA scalar variate.
muThe location parameter.
sigmaThe scale parameter.
+
+
+
Returns
The cumulative density function.
+ +

Definition at line 38 of file double_exponential_cdf.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::double_exponential_cdf_log (const T_y & y,
const T_loc & mu,
const T_scale & sigma 
)
+
+ +

Definition at line 24 of file double_exponential_cdf_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::double_exponential_log (const T_y & y,
const T_loc & mu,
const T_scale & sigma 
)
+
+ +

Definition at line 29 of file double_exponential_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::double_exponential_log (const T_y & y,
const T_loc & mu,
const T_scale & sigma 
)
+
+ +

Definition at line 128 of file double_exponential_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
double stan::math::double_exponential_rng (const double mu,
const double sigma,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 24 of file double_exponential_rng.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
double stan::math::e ()
+
+inline
+
+ +

Return the base of the natural logarithm.

+
Returns
Base of natural logarithm.
+ +

Definition at line 95 of file constants.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::eigenvalues_sym (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & m)
+
+ +

Return the eigenvalues of the specified symmetric matrix in descending order of magnitude.

+

This function is more efficient than the general eigenvalues function for symmetric matrices.

+

See eigen_decompose() for more information.

+
Parameters
+ + +
mSpecified matrix.
+
+
+
Returns
Eigenvalues of matrix.
+ +

Definition at line 22 of file eigenvalues_sym.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::eigenvectors_sym (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & m)
+
+ +

Definition at line 13 of file eigenvectors_sym.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , int R, int C>
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R, C> stan::math::elt_divide (const Eigen::Matrix< T1, R, C > & m1,
const Eigen::Matrix< T2, R, C > & m2 
)
+
+ +

Return the elementwise division of the specified matrices.

+
Template Parameters
+ + + + + +
T1Type of scalars in first matrix.
T2Type of scalars in second matrix.
RRow type of both matrices.
CColumn type of both matrices.
+
+
+
Parameters
+ + + +
m1First matrix
m2Second matrix
+
+
+
Returns
Elementwise division of matrices.
+ +

Definition at line 24 of file elt_divide.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , int R, int C>
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R, C> stan::math::elt_divide (const Eigen::Matrix< T1, R, C > & m,
T2 s 
)
+
+ +

Return the elementwise division of the specified matrix by the specified scalar.

+
Template Parameters
+ + + + + +
T1Type of scalars in the matrix.
T2Type of the scalar.
RRow type of the matrix.
CColumn type of the matrix.
+
+
+
Parameters
+ + + +
mmatrix
sscalar
+
+
+
Returns
Elementwise division of a scalar by matrix.
+ +

Definition at line 50 of file elt_divide.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , int R, int C>
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R, C> stan::math::elt_divide (T1 s,
const Eigen::Matrix< T2, R, C > & m 
)
+
+ +

Return the elementwise division of the specified scalar by the specified matrix.

+
Template Parameters
+ + + + + +
T1Type of the scalar.
T2Type of scalars in the matrix.
RRow type of the matrix.
CColumn type of the matrix.
+
+
+
Parameters
+ + + +
sscalar
mmatrix
+
+
+
Returns
Elementwise division of a scalar by matrix.
+ +

Definition at line 68 of file elt_divide.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , int R, int C>
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R, C> stan::math::elt_multiply (const Eigen::Matrix< T1, R, C > & m1,
const Eigen::Matrix< T2, R, C > & m2 
)
+
+ +

Return the elementwise multiplication of the specified matrices.

+
Template Parameters
+ + + + + +
T1Type of scalars in first matrix.
T2Type of scalars in second matrix.
RRow type of both matrices.
CColumn type of both matrices.
+
+
+
Parameters
+ + + +
m1First matrix
m2Second matrix
+
+
+
Returns
Elementwise product of matrices.
+ +

Definition at line 25 of file elt_multiply.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
static bool stan::math::empty_nested ()
+
+inlinestatic
+
+ +

Return true if there is no nested autodiff being executed.

+ +

Definition at line 14 of file empty_nested.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::erf (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 14 of file erf.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::erf (const var & a)
+
+inline
+
+ +

The error function for variables (C99).

+

For non-variable function, see erf() from cmath.

+

The derivative is

+

$\frac{d}{dx} \mbox{erf}(x) = \frac{2}{\sqrt{\pi}} \exp(-x^2)$.

+

+\[ \mbox{erf}(x) = \begin{cases} \operatorname{erf}(x) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{erf}(x)}{\partial x} = \begin{cases} \frac{\partial\, \operatorname{erf}(x)}{\partial x} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \operatorname{erf}(x)=\frac{2}{\sqrt{\pi}}\int_0^x e^{-t^2}dt \] +

+

+\[ \frac{\partial \, \operatorname{erf}(x)}{\partial x} = \frac{2}{\sqrt{\pi}} e^{-x^2} \] +

+
Parameters
+ + +
aThe variable.
+
+
+
Returns
Error function applied to the variable.
+ +

Definition at line 68 of file erf.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::erfc (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 14 of file erfc.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::erfc (const var & a)
+
+inline
+
+ +

The complementary error function for variables (C99).

+

For non-variable function, see erfc() from <cmath>.

+

The derivative is

+

$\frac{d}{dx} \mbox{erfc}(x) = - \frac{2}{\sqrt{\pi}} \exp(-x^2)$.

+

+\[ \mbox{erfc}(x) = \begin{cases} \operatorname{erfc}(x) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{erfc}(x)}{\partial x} = \begin{cases} \frac{\partial\, \operatorname{erfc}(x)}{\partial x} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \operatorname{erfc}(x)=\frac{2}{\sqrt{\pi}}\int_x^\infty e^{-t^2}dt \] +

+

+\[ \frac{\partial \, \operatorname{erfc}(x)}{\partial x} = -\frac{2}{\sqrt{\pi}} e^{-x^2} \] +

+
Parameters
+ + +
aThe variable.
+
+
+
Returns
Complementary error function applied to the variable.
+ +

Definition at line 68 of file erfc.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::exp (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 10 of file exp.hpp.

+ +
+
+ +
+
+
+template<typename T , int Rows, int Cols>
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<T, Rows, Cols> stan::math::exp (const Eigen::Matrix< T, Rows, Cols > & m)
+
+inline
+
+ +

Return the element-wise exponentiation of the matrix or vector.

+
Parameters
+ + +
mThe matrix or vector.
+
+
+
Returns
ret(i, j) = exp(m(i, j))
+ +

Definition at line 19 of file exp.hpp.

+ +
+
+ +
+
+
+template<int Rows, int Cols>
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<double, Rows, Cols> stan::math::exp (const Eigen::Matrix< double, Rows, Cols > & m)
+
+inline
+
+ +

Definition at line 28 of file exp.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::exp (const var & a)
+
+inline
+
+ +

Return the exponentiation of the specified variable (cmath).

+

+\[ \mbox{exp}(x) = \begin{cases} e^x & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{exp}(x)}{\partial x} = \begin{cases} e^x & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
aVariable to exponentiate.
+
+
+
Returns
Exponentiated variable.
+ +

Definition at line 44 of file exp.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::exp2 (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 14 of file exp2.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
boost::math::tools::promote_args<T>::type stan::math::exp2 (const T y)
+
+inline
+
+ +

Return the exponent base 2 of the specified argument (C99).

+

The exponent base 2 function is defined by

+

exp2(y) = pow(2.0, y).

+
Parameters
+ + +
yValue.
+
+
+
Template Parameters
+ + +
TType of scalar.
+
+
+
Returns
Exponent base 2 of value.
+ +

Definition at line 23 of file exp2.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::exp2 (const var & a)
+
+inline
+
+ +

Exponentiation base 2 function for variables (C99).

+

For non-variable function, see boost::math::exp2().

+

The derivatie is

+

$\frac{d}{dx} 2^x = (\log 2) 2^x$.

+

+\[ \mbox{exp2}(x) = \begin{cases} 2^x & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{exp2}(x)}{\partial x} = \begin{cases} 2^x\ln2 & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
aThe variable.
+
+
+
Returns
Two to the power of the specified variable.
+ +

Definition at line 52 of file exp2.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale , typename T_inv_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale, T_inv_scale>::type stan::math::exp_mod_normal_ccdf_log (const T_y & y,
const T_loc & mu,
const T_scale & sigma,
const T_inv_scale & lambda 
)
+
+ +

Definition at line 24 of file exp_mod_normal_ccdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale , typename T_inv_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale, T_inv_scale>::type stan::math::exp_mod_normal_cdf (const T_y & y,
const T_loc & mu,
const T_scale & sigma,
const T_inv_scale & lambda 
)
+
+ +

Definition at line 24 of file exp_mod_normal_cdf.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale , typename T_inv_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale, T_inv_scale>::type stan::math::exp_mod_normal_cdf_log (const T_y & y,
const T_loc & mu,
const T_scale & sigma,
const T_inv_scale & lambda 
)
+
+ +

Definition at line 24 of file exp_mod_normal_cdf_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_inv_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale, T_inv_scale>::type stan::math::exp_mod_normal_log (const T_y & y,
const T_loc & mu,
const T_scale & sigma,
const T_inv_scale & lambda 
)
+
+ +

Definition at line 25 of file exp_mod_normal_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale , typename T_inv_scale >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale, T_inv_scale>::type stan::math::exp_mod_normal_log (const T_y & y,
const T_loc & mu,
const T_scale & sigma,
const T_inv_scale & lambda 
)
+
+inline
+
+ +

Definition at line 139 of file exp_mod_normal_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
double stan::math::exp_mod_normal_rng (const double mu,
const double sigma,
const double lambda,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 29 of file exp_mod_normal_rng.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::expm1 (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 12 of file expm1.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::expm1 (const stan::math::vara)
+
+inline
+
+ +

The exponentiation of the specified variable minus 1 (C99).

+

The derivative is given by

+

$\frac{d}{dx} \exp(a) - 1 = \exp(a)$.

+

+\[ \mbox{expm1}(x) = \begin{cases} e^x-1 & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{expm1}(x)}{\partial x} = \begin{cases} e^x & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
aThe variable.
+
+
+
Returns
Two to the power of the specified variable.
+ +

Definition at line 57 of file expm1.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_inv_scale >
+ + + + + + + + + + + + + + + + + + +
return_type<T_y, T_inv_scale>::type stan::math::exponential_ccdf_log (const T_y & y,
const T_inv_scale & beta 
)
+
+ +

Definition at line 27 of file exponential_ccdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_inv_scale >
+ + + + + + + + + + + + + + + + + + +
return_type<T_y, T_inv_scale>::type stan::math::exponential_cdf (const T_y & y,
const T_inv_scale & beta 
)
+
+ +

Calculates the exponential cumulative distribution function for the given y and beta.

+

Inverse scale parameter must be greater than 0. y must be greater than or equal to 0.

+
Parameters
+ + + +
yA scalar variable.
betaInverse scale parameter.
+
+
+
Template Parameters
+ + + +
T_yType of scalar.
T_inv_scaleType of inverse scale.
+
+
+ +

Definition at line 40 of file exponential_cdf.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_inv_scale >
+ + + + + + + + + + + + + + + + + + +
return_type<T_y, T_inv_scale>::type stan::math::exponential_cdf_log (const T_y & y,
const T_inv_scale & beta 
)
+
+ +

Definition at line 28 of file exponential_cdf_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_inv_scale >
+ + + + + + + + + + + + + + + + + + +
return_type<T_y, T_inv_scale>::type stan::math::exponential_log (const T_y & y,
const T_inv_scale & beta 
)
+
+ +

The log of an exponential density for y with the specified inverse scale parameter.

+

Inverse scale parameter must be greater than 0. y must be greater than or equal to 0.

+

+\begin{eqnarray*} y &\sim& \mbox{\sf{Expon}}(\beta) \\ \log (p (y \, |\, \beta) ) &=& \log \left( \beta \exp^{-\beta y} \right) \\ &=& \log (\beta) - \beta y \\ & & \mathrm{where} \; y > 0 \end{eqnarray*} +

+
Parameters
+ + + +
yA scalar variable.
betaInverse scale parameter.
+
+
+
Exceptions
+ + + +
std::domain_errorif beta is not greater than 0.
std::domain_errorif y is not greater than or equal to 0.
+
+
+
Template Parameters
+ + + +
T_yType of scalar.
T_inv_scaleType of inverse scale.
+
+
+ +

Definition at line 54 of file exponential_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_inv_scale >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
return_type<T_y, T_inv_scale>::type stan::math::exponential_log (const T_y & y,
const T_inv_scale & beta 
)
+
+inline
+
+ +

Definition at line 111 of file exponential_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
double stan::math::exponential_rng (const double beta,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 27 of file exponential_rng.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
T stan::math::F32 (a,
b,
c,
d,
e,
z,
precision = 1e-6 
)
+
+ +

Definition at line 11 of file F32.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::fabs (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 14 of file fabs.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::fabs (const var & a)
+
+inline
+
+ +

Return the absolute value of the variable (cmath).

+

Choosing an arbitrary value at the non-differentiable point 0,

+

$\frac{d}{dx}|x| = \mbox{sgn}(x)$.

+

where $\mbox{sgn}(x)$ is the signum function, taking values -1 if $x < 0$, 0 if $x == 0$, and 1 if $x == 1$.

+

The function abs() provides the same behavior, with abs() defined in stdlib.h and fabs() defined in cmath. The derivative is 0 if the input is 0.

+

Returns std::numeric_limits<double>::quiet_NaN() for NaN inputs.

+

+\[ \mbox{fabs}(x) = \begin{cases} |x| & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{fabs}(x)}{\partial x} = \begin{cases} -1 & \mbox{if } x < 0 \\ 0 & \mbox{if } x = 0 \\ 1 & \mbox{if } x > 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
aInput variable.
+
+
+
Returns
Absolute value of variable.
+ +

Definition at line 50 of file fabs.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool stan::math::factor_cov_matrix (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & Sigma,
Eigen::Array< T, Eigen::Dynamic, 1 > & CPCs,
Eigen::Array< T, Eigen::Dynamic, 1 > & sds 
)
+
+ +

This function is intended to make starting values, given a covariance matrix Sigma.

+

The transformations are hard coded as log for standard deviations and Fisher transformations (atanh()) of CPCs

+
Parameters
+ + + + +
[in]Sigmacovariance matrix
[out]CPCsfill this unbounded (does not resize)
[out]sdsfill this unbounded (does not resize)
+
+
+
Returns
false if any of the diagonals of Sigma are 0
+ +

Definition at line 27 of file factor_cov_matrix.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + +
void stan::math::factor_U (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & U,
Eigen::Array< T, Eigen::Dynamic, 1 > & CPCs 
)
+
+ +

This function is intended to make starting values, given a unit upper-triangular matrix U such that U'DU is a correlation matrix.

+
Parameters
+ + + +
USigma matrix
CPCsfill this unbounded
+
+
+ +

Definition at line 29 of file factor_U.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::falling_factorial (const fvar< T > & x,
const fvar< T > & n 
)
+
+inline
+
+ +

Definition at line 15 of file falling_factorial.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::falling_factorial (const fvar< T > & x,
const double n 
)
+
+inline
+
+ +

Definition at line 26 of file falling_factorial.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::falling_factorial (const double x,
const fvar< T > & n 
)
+
+inline
+
+ +

Definition at line 37 of file falling_factorial.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::falling_factorial (const var & a,
const double & b 
)
+
+inline
+
+ +

Definition at line 52 of file falling_factorial.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T1, T2>::type stan::math::falling_factorial (const T1 x,
const T2 n 
)
+
+inline
+
+ +

+\[ \mbox{falling\_factorial}(x, n) = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ (x)_n & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +

+

+

+\[ \frac{\partial\, \mbox{falling\_factorial}(x, n)}{\partial x} = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ \frac{\partial\, (x)_n}{\partial x} & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{falling\_factorial}(x, n)}{\partial n} = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ \frac{\partial\, (x)_n}{\partial n} & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +

+

+\[ (x)_n=\frac{\Gamma(x+1)}{\Gamma(x-n+1)} \] +

+

+\[ \frac{\partial \, (x)_n}{\partial x} = (x)_n\Psi(x+1) \] +

+

+\[ \frac{\partial \, (x)_n}{\partial n} = -(x)_n\Psi(n+1) \] +

+ +

Definition at line 54 of file falling_factorial.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::falling_factorial (const var & a,
const var & b 
)
+
+inline
+
+ +

Definition at line 57 of file falling_factorial.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::falling_factorial (const double & a,
const var & b 
)
+
+inline
+
+ +

Definition at line 62 of file falling_factorial.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::fdim (const fvar< T > & x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 11 of file fdim.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::fdim (const fvar< T > & x1,
const double x2 
)
+
+inline
+
+ +

Definition at line 22 of file fdim.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T1, T2>::type stan::math::fdim (T1 a,
T2 b 
)
+
+inline
+
+ +

The positive difference function (C99).

+

The function is defined by

+

fdim(a, b) = (a > b) ? (a - b) : 0.0.

+
Parameters
+ + + +
aFirst value.
bSecond value.
+
+
+
Returns
Returns min(a - b, 0.0).
+ +

Definition at line 26 of file fdim.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::fdim (const double x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 32 of file fdim.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::fdim (const stan::math::vara,
const stan::math::varb 
)
+
+inline
+
+ +

Return the positive difference between the first variable's the value and the second's (C99).

+

See stan::math::fdim() for the double-based version.

+

The partial derivative with respect to the first argument is

+

$\frac{\partial}{\partial x} \mbox{fdim}(x, y) = 0.0$ if $x < y$, and

+

$\frac{\partial}{\partial x} \mbox{fdim}(x, y) = 1.0$ if $x \geq y$.

+

With respect to the second argument, the partial is

+

$\frac{\partial}{\partial y} \mbox{fdim}(x, y) = 0.0$ if $x < y$, and

+

$\frac{\partial}{\partial y} \mbox{fdim}(x, y) = -\lfloor\frac{x}{y}\rfloor$ if $x \geq y$.

+

+\[ \mbox{fdim}(x, y) = \begin{cases} 0 & \mbox{if } x < y\\ x-y & \mbox{if } x \geq y \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{fdim}(x, y)}{\partial x} = \begin{cases} 0 & \mbox{if } x < y \\ 1 & \mbox{if } x \geq y \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{fdim}(x, y)}{\partial y} = \begin{cases} 0 & \mbox{if } x < y \\ -\lfloor\frac{x}{y}\rfloor & \mbox{if } x \geq y \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + + +
aFirst variable.
bSecond variable.
+
+
+
Returns
The positive difference between the first and second variable.
+ +

Definition at line 110 of file fdim.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::fdim (const double & a,
const stan::math::varb 
)
+
+inline
+
+ +

Return the positive difference between the first value and the value of the second variable (C99).

+

See fdim(var, var) for definitions of values and derivatives.

+

The derivative with respect to the variable is

+

$\frac{d}{d y} \mbox{fdim}(c, y) = 0.0$ if $c < y$, and

+

$\frac{d}{d y} \mbox{fdim}(c, y) = -\lfloor\frac{c}{y}\rfloor$ if $c \geq y$.

+
Parameters
+ + + +
aFirst value.
bSecond variable.
+
+
+
Returns
The positive difference between the first and second arguments.
+ +

Definition at line 135 of file fdim.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::fdim (const stan::math::vara,
const double & b 
)
+
+inline
+
+ +

Return the positive difference between the first variable's value and the second value (C99).

+

See fdim(var, var) for definitions of values and derivatives.

+

The derivative with respect to the variable is

+

$\frac{d}{d x} \mbox{fdim}(x, c) = 0.0$ if $x < c$, and

+

$\frac{d}{d x} \mbox{fdim}(x, c) = 1.0$ if $x \geq yc$.

+
Parameters
+ + + +
aFirst value.
bSecond variable.
+
+
+
Returns
The positive difference between the first and second arguments.
+ +

Definition at line 158 of file fdim.hpp.

+ +
+
+ +
+
+
+template<typename T , typename S >
+ + + + + + + + + + + + + + + + + + +
void stan::math::fill (T & x,
const S & y 
)
+
+ +

Fill the specified container with the specified value.

+

This base case simply assigns the value to the container.

+
Template Parameters
+ + + +
TType of reference container.
SType of value.
+
+
+
Parameters
+ + + +
xContainer.
yValue.
+
+
+ +

Definition at line 22 of file fill.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C, typename S >
+ + + + + + + + + + + + + + + + + + +
void stan::math::fill (Eigen::Matrix< T, R, C > & x,
const S & y 
)
+
+ +

Fill the specified container with the specified value.

+

The specified matrix is filled by element.

+
Template Parameters
+ + + + + +
TType of scalar for matrix container.
RRow type of matrix.
CColumn type of matrix.
SType of value.
+
+
+
Parameters
+ + + +
xContainer.
yValue.
+
+
+ +

Definition at line 39 of file fill.hpp.

+ +
+
+ +
+
+
+template<typename T , typename S >
+ + + + + + + + + + + + + + + + + + +
void stan::math::fill (std::vector< T > & x,
const S & y 
)
+
+ +

Fill the specified container with the specified value.

+

Each container in the specified standard vector is filled recursively by calling fill.

+
Template Parameters
+ + + +
TType of container in vector.
SType of value.
+
+
+
Parameters
+ + + +
xContainer.
yValue.
+
+
+ +

Definition at line 55 of file fill.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::finite_diff_grad_hessian (const F & f,
const Eigen::Matrix< double,-1, 1 > & x,
double & fx,
Eigen::Matrix< double,-1,-1 > & hess,
std::vector< Eigen::Matrix< double,-1,-1 > > & grad_hess_fx,
const double epsilon = 1e-04 
)
+
+ +

Calculate the value and the gradient of the hessian of the specified function at the specified argument using second-order autodiff and first-order finite difference.

+

The functor must implement

+

double operator()(const Eigen::Matrix<double, Eigen::Dynamic, 1>&)

+

Reference:

+

De Levie: An improved numerical approximation for the first derivative, page 3

+

4 calls to the function, f.

+
Template Parameters
+ + +
FType of function
+
+
+
Parameters
+ + + + + + + +
[in]fFunction
[in]xArgument to function
[out]fxFunction applied to argument
[out]hessHessian matrix
[out]grad_hess_fxgradient of Hessian of function at argument
[in]epsilonperturbation size
+
+
+ +

Definition at line 43 of file finite_diff_grad_hessian.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::finite_diff_gradient (const F & f,
const Eigen::Matrix< double,-1, 1 > & x,
double & fx,
Eigen::Matrix< double,-1, 1 > & grad_fx,
const double epsilon = 1e-03 
)
+
+ +

Calculate the value and the gradient of the specified function at the specified argument using finite difference.

+

The functor must implement

+

double operator()(const Eigen::Matrix<double, Eigen::Dynamic, 1>&)

+

Error should be on order of epsilon ^ 6. The reference for this algorithm is:

+

De Levie: An improved numerical approximation for the first derivative, page 3

+

This function involves 6 calls to f.

+
Template Parameters
+ + +
FType of function
+
+
+
Parameters
+ + + + + + +
[in]fFunction
[in]xArgument to function
[out]fxFunction applied to argument
[out]grad_fxGradient of function at argument
[in]epsilonperturbation size
+
+
+ +

Definition at line 39 of file finite_diff_gradient.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
double stan::math::finite_diff_hess_helper (const F & f,
const Eigen::Matrix< double, Eigen::Dynamic, 1 > & x,
const int lambda,
const double epsilon = 1e-03 
)
+
+ +

Definition at line 13 of file finite_diff_hessian.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::finite_diff_hessian (const F & f,
const Eigen::Matrix< double,-1, 1 > & x,
double & fx,
Eigen::Matrix< double,-1, 1 > & grad_fx,
Eigen::Matrix< double,-1,-1 > & hess_fx,
const double epsilon = 1e-03 
)
+
+ +

Calculate the value and the Hessian of the specified function at the specified argument using second-order finite difference.

+

The functor must implement

+

double operator()(const Eigen::Matrix<double, Eigen::Dynamic, 1>&)

+

Error should be on order of epsilon ^ 4, with 4 calls to the function f.

+

Reference: Eberly: Derivative Approximation by Finite Differences Page 6

+
Template Parameters
+ + +
FType of function
+
+
+
Parameters
+ + + + + + + +
[in]fFunction
[in]xArgument to function
[out]fxFunction applied to argument
[out]grad_fxGradient of function at argument
[out]hess_fxHessian of function at argument
[in]epsilonperturbation size
+
+
+ +

Definition at line 67 of file finite_diff_hessian.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::floor (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 11 of file floor.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::floor (const var & a)
+
+inline
+
+ +

Return the floor of the specified variable (cmath).

+

The derivative of the floor function is defined and zero everywhere but at integers, so we set these derivatives to zero for convenience,

+

$\frac{d}{dx} {\lfloor x \rfloor} = 0$.

+

The floor function rounds down. For double values, this is the largest integral value that is not greater than the specified value. Although this function is not differentiable because it is discontinuous at integral values, its gradient is returned as zero everywhere.

+

+\[ \mbox{floor}(x) = \begin{cases} \lfloor x \rfloor & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{floor}(x)}{\partial x} = \begin{cases} 0 & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
aInput variable.
+
+
+
Returns
Floor of the variable.
+ +

Definition at line 60 of file floor.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , typename T3 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
fvar<typename stan::return_type<T1, T2, T3>::type> stan::math::fma (const fvar< T1 > & x1,
const fvar< T2 > & x2,
const fvar< T3 > & x3 
)
+
+inline
+
+ +

The fused multiply-add operation (C99).

+

This double-based operation delegates to fma.

+

The function is defined by

+

fma(a, b, c) = (a * b) + c.

+

+\[ \mbox{fma}(x, y, z) = \begin{cases} x\cdot y+z & \mbox{if } -\infty\leq x, y, z \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{fma}(x, y, z)}{\partial x} = \begin{cases} y & \mbox{if } -\infty\leq x, y, z \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{fma}(x, y, z)}{\partial y} = \begin{cases} x & \mbox{if } -\infty\leq x, y, z \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{fma}(x, y, z)}{\partial z} = \begin{cases} 1 & \mbox{if } -\infty\leq x, y, z \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + + + +
x1First value.
x2Second value.
x3Third value.
+
+
+
Returns
Product of the first two values plus the third.
+ +

Definition at line 61 of file fma.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , typename T3 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
fvar<typename stan::return_type<T1, T2, T3>::type> stan::math::fma (const T1 & x1,
const fvar< T2 > & x2,
const fvar< T3 > & x3 
)
+
+inline
+
+ +

See all-var input signature for details on the function and derivatives.

+ +

Definition at line 74 of file fma.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , typename T3 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
fvar<typename stan::return_type<T1, T2, T3>::type> stan::math::fma (const fvar< T1 > & x1,
const T2 & x2,
const fvar< T3 > & x3 
)
+
+inline
+
+ +

See all-var input signature for details on the function and derivatives.

+ +

Definition at line 86 of file fma.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , typename T3 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
fvar<typename stan::return_type<T1, T2, T3>::type> stan::math::fma (const fvar< T1 > & x1,
const fvar< T2 > & x2,
const T3 & x3 
)
+
+inline
+
+ +

See all-var input signature for details on the function and derivatives.

+ +

Definition at line 98 of file fma.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , typename T3 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
fvar<typename stan::return_type<T1, T2, T3>::type> stan::math::fma (const T1 & x1,
const T2 & x2,
const fvar< T3 > & x3 
)
+
+inline
+
+ +

See all-var input signature for details on the function and derivatives.

+ +

Definition at line 110 of file fma.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , typename T3 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
fvar<typename stan::return_type<T1, T2, T3>::type> stan::math::fma (const fvar< T1 > & x1,
const T2 & x2,
const T3 & x3 
)
+
+inline
+
+ +

See all-var input signature for details on the function and derivatives.

+ +

Definition at line 122 of file fma.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , typename T3 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
fvar<typename stan::return_type<T1, T2, T3>::type> stan::math::fma (const T1 & x1,
const fvar< T2 > & x2,
const T3 & x3 
)
+
+inline
+
+ +

See all-var input signature for details on the function and derivatives.

+ +

Definition at line 134 of file fma.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
var stan::math::fma (const stan::math::vara,
const stan::math::varb,
const stan::math::varc 
)
+
+inline
+
+ +

The fused multiply-add function for three variables (C99).

+

This function returns the product of the first two arguments plus the third argument.

+

The double-based version ::fma(double, double, double) is defined in <cmath>.

+

The partial derivatives are

+

$\frac{\partial}{\partial x} (x * y) + z = y$, and

+

$\frac{\partial}{\partial y} (x * y) + z = x$, and

+

$\frac{\partial}{\partial z} (x * y) + z = 1$.

+
Parameters
+ + + + +
aFirst multiplicand.
bSecond multiplicand.
cSummand.
+
+
+
Returns
Product of the multiplicands plus the summand, ($a * $b) + $c.
+ +

Definition at line 136 of file fma.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
var stan::math::fma (const stan::math::vara,
const stan::math::varb,
const double & c 
)
+
+inline
+
+ +

The fused multiply-add function for two variables and a value (C99).

+

This function returns the product of the first two arguments plus the third argument.

+

The double-based version ::fma(double, double, double) is defined in <cmath>.

+

The partial derivatives are

+

$\frac{\partial}{\partial x} (x * y) + c = y$, and

+

$\frac{\partial}{\partial y} (x * y) + c = x$.

+
Parameters
+ + + + +
aFirst multiplicand.
bSecond multiplicand.
cSummand.
+
+
+
Returns
Product of the multiplicands plus the summand, ($a * $b) + $c.
+ +

Definition at line 161 of file fma.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
var stan::math::fma (const stan::math::vara,
const double & b,
const stan::math::varc 
)
+
+inline
+
+ +

The fused multiply-add function for a variable, value, and variable (C99).

+

This function returns the product of the first two arguments plus the third argument.

+

The double-based version ::fma(double, double, double) is defined in <cmath>.

+

The partial derivatives are

+

$\frac{\partial}{\partial x} (x * c) + z = c$, and

+

$\frac{\partial}{\partial z} (x * c) + z = 1$.

+
Parameters
+ + + + +
aFirst multiplicand.
bSecond multiplicand.
cSummand.
+
+
+
Returns
Product of the multiplicands plus the summand, ($a * $b) + $c.
+ +

Definition at line 186 of file fma.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
var stan::math::fma (const stan::math::vara,
const double & b,
const double & c 
)
+
+inline
+
+ +

The fused multiply-add function for a variable and two values (C99).

+

This function returns the product of the first two arguments plus the third argument.

+

The double-based version ::fma(double, double, double) is defined in <cmath>.

+

The derivative is

+

$\frac{d}{d x} (x * c) + d = c$.

+
Parameters
+ + + + +
aFirst multiplicand.
bSecond multiplicand.
cSummand.
+
+
+
Returns
Product of the multiplicands plus the summand, ($a * $b) + $c.
+ +

Definition at line 209 of file fma.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
var stan::math::fma (const double & a,
const stan::math::varb,
const double & c 
)
+
+inline
+
+ +

The fused multiply-add function for a value, variable, and value (C99).

+

This function returns the product of the first two arguments plus the third argument.

+

The double-based version ::fma(double, double, double) is defined in <cmath>.

+

The derivative is

+

$\frac{d}{d y} (c * y) + d = c$, and

+
Parameters
+ + + + +
aFirst multiplicand.
bSecond multiplicand.
cSummand.
+
+
+
Returns
Product of the multiplicands plus the summand, ($a * $b) + $c.
+ +

Definition at line 232 of file fma.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
var stan::math::fma (const double & a,
const double & b,
const stan::math::varc 
)
+
+inline
+
+ +

The fused multiply-add function for two values and a variable, and value (C99).

+

This function returns the product of the first two arguments plus the third argument.

+

The double-based version ::fma(double, double, double) is defined in <cmath>.

+

The derivative is

+

$\frac{\partial}{\partial z} (c * d) + z = 1$.

+
Parameters
+ + + + +
aFirst multiplicand.
bSecond multiplicand.
cSummand.
+
+
+
Returns
Product of the multiplicands plus the summand, ($a * $b) + $c.
+ +

Definition at line 255 of file fma.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
var stan::math::fma (const double & a,
const stan::math::varb,
const stan::math::varc 
)
+
+inline
+
+ +

The fused multiply-add function for a value and two variables (C99).

+

This function returns the product of the first two arguments plus the third argument.

+

The double-based version ::fma(double, double, double) is defined in <cmath>.

+

The partial derivaties are

+

$\frac{\partial}{\partial y} (c * y) + z = c$, and

+

$\frac{\partial}{\partial z} (c * y) + z = 1$.

+
Parameters
+ + + + +
aFirst multiplicand.
bSecond multiplicand.
cSummand.
+
+
+
Returns
Product of the multiplicands plus the summand, ($a * $b) + $c.
+ +

Definition at line 280 of file fma.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::fmax (const fvar< T > & x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 13 of file fmax.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::fmax (const double x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 33 of file fmax.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::fmax (const fvar< T > & x1,
const double x2 
)
+
+inline
+
+ +

Definition at line 53 of file fmax.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::fmax (const stan::math::vara,
const stan::math::varb 
)
+
+inline
+
+ +

Returns the maximum of the two variable arguments (C99).

+

No new variable implementations are created, with this function defined as if by

+

fmax(a, b) = a if a's value is greater than b's, and .

+

fmax(a, b) = b if b's value is greater than or equal to a's.

+

+\[ \mbox{fmax}(x, y) = \begin{cases} x & \mbox{if } x \geq y \\ y & \mbox{if } x < y \\[6pt] x & \mbox{if } -\infty\leq x\leq \infty, y = \textrm{NaN}\\ y & \mbox{if } -\infty\leq y\leq \infty, x = \textrm{NaN}\\ \textrm{NaN} & \mbox{if } x, y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{fmax}(x, y)}{\partial x} = \begin{cases} 1 & \mbox{if } x \geq y \\ 0 & \mbox{if } x < y \\[6pt] 1 & \mbox{if } -\infty\leq x\leq \infty, y = \textrm{NaN}\\ 0 & \mbox{if } -\infty\leq y\leq \infty, x = \textrm{NaN}\\ \textrm{NaN} & \mbox{if } x, y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{fmax}(x, y)}{\partial y} = \begin{cases} 0 & \mbox{if } x \geq y \\ 1 & \mbox{if } x < y \\[6pt] 0 & \mbox{if } -\infty\leq x\leq \infty, y = \textrm{NaN}\\ 1 & \mbox{if } -\infty\leq y\leq \infty, x = \textrm{NaN}\\ \textrm{NaN} & \mbox{if } x, y = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + + +
aFirst variable.
bSecond variable.
+
+
+
Returns
If the first variable's value is larger than the second's, the first variable, otherwise the second variable.
+ +

Definition at line 63 of file fmax.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::fmax (const stan::math::vara,
const double & b 
)
+
+inline
+
+ +

Returns the maximum of the variable and scalar, promoting the scalar to a variable if it is larger (C99).

+

For fmax(a, b), if a's value is greater than b, then a is returned, otherwise a fesh variable implementation wrapping the value b is returned.

+
Parameters
+ + + +
aFirst variable.
bSecond value
+
+
+
Returns
If the first variable's value is larger than or equal to the second value, the first variable, otherwise the second value promoted to a fresh variable.
+ +

Definition at line 95 of file fmax.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::fmax (const double & a,
const stan::math::varb 
)
+
+inline
+
+ +

Returns the maximum of a scalar and variable, promoting the scalar to a variable if it is larger (C99).

+

For fmax(a, b), if a is greater than b's value, then a fresh variable implementation wrapping a is returned, otherwise b is returned.

+
Parameters
+ + + +
aFirst value.
bSecond variable.
+
+
+
Returns
If the first value is larger than the second variable's value, return the first value promoted to a variable, otherwise return the second variable.
+ +

Definition at line 127 of file fmax.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::fmin (const fvar< T > & x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 13 of file fmin.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::fmin (const double x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 33 of file fmin.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::fmin (const fvar< T > & x1,
const double x2 
)
+
+inline
+
+ +

Definition at line 53 of file fmin.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::fmin (const stan::math::vara,
const stan::math::varb 
)
+
+inline
+
+ +

Returns the minimum of the two variable arguments (C99).

+

For fmin(a, b), if a's value is less than b's, then a is returned, otherwise b is returned.

+

+\[ \mbox{fmin}(x, y) = \begin{cases} x & \mbox{if } x \leq y \\ y & \mbox{if } x > y \\[6pt] x & \mbox{if } -\infty\leq x\leq \infty, y = \textrm{NaN}\\ y & \mbox{if } -\infty\leq y\leq \infty, x = \textrm{NaN}\\ \textrm{NaN} & \mbox{if } x, y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{fmin}(x, y)}{\partial x} = \begin{cases} 1 & \mbox{if } x \leq y \\ 0 & \mbox{if } x > y \\[6pt] 1 & \mbox{if } -\infty\leq x\leq \infty, y = \textrm{NaN}\\ 0 & \mbox{if } -\infty\leq y\leq \infty, x = \textrm{NaN}\\ \textrm{NaN} & \mbox{if } x, y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{fmin}(x, y)}{\partial y} = \begin{cases} 0 & \mbox{if } x \leq y \\ 1 & \mbox{if } x > y \\[6pt] 0 & \mbox{if } -\infty\leq x\leq \infty, y = \textrm{NaN}\\ 1 & \mbox{if } -\infty\leq y\leq \infty, x = \textrm{NaN}\\ \textrm{NaN} & \mbox{if } x, y = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + + +
aFirst variable.
bSecond variable.
+
+
+
Returns
If the first variable's value is smaller than the second's, the first variable, otherwise the second variable.
+ +

Definition at line 59 of file fmin.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::fmin (const stan::math::vara,
double b 
)
+
+inline
+
+ +

Returns the minimum of the variable and scalar, promoting the scalar to a variable if it is larger (C99).

+

For fmin(a, b), if a's value is less than or equal to b, then a is returned, otherwise a fresh variable wrapping b is returned.

+
Parameters
+ + + +
aFirst variable.
bSecond value
+
+
+
Returns
If the first variable's value is less than or equal to the second value, the first variable, otherwise the second value promoted to a fresh variable.
+ +

Definition at line 89 of file fmin.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::fmin (double a,
const stan::math::varb 
)
+
+inline
+
+ +

Returns the minimum of a scalar and variable, promoting the scalar to a variable if it is larger (C99).

+

For fmin(a, b), if a is less than b's value, then a fresh variable implementation wrapping a is returned, otherwise b is returned.

+
Parameters
+ + + +
aFirst value.
bSecond variable.
+
+
+
Returns
If the first value is smaller than the second variable's value, return the first value promoted to a variable, otherwise return the second variable.
+ +

Definition at line 120 of file fmin.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::fmod (const fvar< T > & x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 16 of file fmod.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::fmod (const fvar< T > & x1,
const double x2 
)
+
+inline
+
+ +

Definition at line 26 of file fmod.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::fmod (const double x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 39 of file fmod.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::fmod (const var & a,
const var & b 
)
+
+inline
+
+ +

Return the floating point remainder after dividing the first variable by the second (cmath).

+

The partial derivatives with respect to the variables are defined everywhere but where $x = y$, but we set these to match other values, with

+

$\frac{\partial}{\partial x} \mbox{fmod}(x, y) = 1$, and

+

$\frac{\partial}{\partial y} \mbox{fmod}(x, y) = -\lfloor \frac{x}{y} \rfloor$.

+

+\[ \mbox{fmod}(x, y) = \begin{cases} x - \lfloor \frac{x}{y}\rfloor y & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{fmod}(x, y)}{\partial x} = \begin{cases} 1 & \mbox{if } -\infty\leq x, y\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{fmod}(x, y)}{\partial y} = \begin{cases} -\lfloor \frac{x}{y}\rfloor & \mbox{if } -\infty\leq x, y\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + + +
aFirst variable.
bSecond variable.
+
+
+
Returns
Floating pointer remainder of dividing the first variable by the second.
+ +

Definition at line 103 of file fmod.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::fmod (const var & a,
const double b 
)
+
+inline
+
+ +

Return the floating point remainder after dividing the the first variable by the second scalar (cmath).

+

The derivative with respect to the variable is

+

$\frac{d}{d x} \mbox{fmod}(x, c) = \frac{1}{c}$.

+
Parameters
+ + + +
aFirst variable.
bSecond scalar.
+
+
+
Returns
Floating pointer remainder of dividing the first variable by the second scalar.
+ +

Definition at line 120 of file fmod.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::fmod (const double a,
const var & b 
)
+
+inline
+
+ +

Return the floating point remainder after dividing the first scalar by the second variable (cmath).

+

The derivative with respect to the variable is

+

$\frac{d}{d y} \mbox{fmod}(c, y) = -\lfloor \frac{c}{y} \rfloor$.

+
Parameters
+ + + +
aFirst scalar.
bSecond variable.
+
+
+
Returns
Floating pointer remainder of dividing first scalar by the second variable.
+ +

Definition at line 137 of file fmod.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_shape , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_shape, T_scale>::type stan::math::frechet_ccdf_log (const T_y & y,
const T_shape & alpha,
const T_scale & sigma 
)
+
+ +

Definition at line 31 of file frechet_ccdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_shape , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_shape, T_scale>::type stan::math::frechet_cdf (const T_y & y,
const T_shape & alpha,
const T_scale & sigma 
)
+
+ +

Definition at line 31 of file frechet_cdf.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_shape , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_shape, T_scale>::type stan::math::frechet_cdf_log (const T_y & y,
const T_shape & alpha,
const T_scale & sigma 
)
+
+ +

Definition at line 31 of file frechet_cdf_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_shape , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_shape, T_scale>::type stan::math::frechet_log (const T_y & y,
const T_shape & alpha,
const T_scale & sigma 
)
+
+ +

Definition at line 34 of file frechet_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_shape , typename T_scale >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_shape, T_scale>::type stan::math::frechet_log (const T_y & y,
const T_shape & alpha,
const T_scale & sigma 
)
+
+inline
+
+ +

Definition at line 140 of file frechet_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
double stan::math::frechet_rng (const double alpha,
const double sigma,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 30 of file frechet_rng.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_shape , typename T_inv_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_shape, T_inv_scale>::type stan::math::gamma_ccdf_log (const T_y & y,
const T_shape & alpha,
const T_inv_scale & beta 
)
+
+ +

Definition at line 35 of file gamma_ccdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_shape , typename T_inv_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_shape, T_inv_scale>::type stan::math::gamma_cdf (const T_y & y,
const T_shape & alpha,
const T_inv_scale & beta 
)
+
+ +

The cumulative density function for a gamma distribution for y with the specified shape and inverse scale parameters.

+
Parameters
+ + + + +
yA scalar variable.
alphaShape parameter.
betaInverse scale parameter.
+
+
+
Exceptions
+ + + + +
std::domain_errorif alpha is not greater than 0.
std::domain_errorif beta is not greater than 0.
std::domain_errorif y is not greater than or equal to 0.
+
+
+
Template Parameters
+ + + + +
T_yType of scalar.
T_shapeType of shape.
T_inv_scaleType of inverse scale.
+
+
+ +

Definition at line 49 of file gamma_cdf.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_shape , typename T_inv_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_shape, T_inv_scale>::type stan::math::gamma_cdf_log (const T_y & y,
const T_shape & alpha,
const T_inv_scale & beta 
)
+
+ +

Definition at line 35 of file gamma_cdf_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_shape , typename T_inv_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_shape, T_inv_scale>::type stan::math::gamma_log (const T_y & y,
const T_shape & alpha,
const T_inv_scale & beta 
)
+
+ +

The log of a gamma density for y with the specified shape and inverse scale parameters.

+

Shape and inverse scale parameters must be greater than 0. y must be greater than or equal to 0.

+

+\begin{eqnarray*} y &\sim& \mbox{\sf{Gamma}}(\alpha, \beta) \\ \log (p (y \, |\, \alpha, \beta) ) &=& \log \left( \frac{\beta^\alpha}{\Gamma(\alpha)} y^{\alpha - 1} \exp^{- \beta y} \right) \\ &=& \alpha \log(\beta) - \log(\Gamma(\alpha)) + (\alpha - 1) \log(y) - \beta y\\ & & \mathrm{where} \; y > 0 \end{eqnarray*} +

+
Parameters
+ + + + +
yA scalar variable.
alphaShape parameter.
betaInverse scale parameter.
+
+
+
Exceptions
+ + + + +
std::domain_errorif alpha is not greater than 0.
std::domain_errorif beta is not greater than 0.
std::domain_errorif y is not greater than or equal to 0.
+
+
+
Template Parameters
+ + + + +
T_yType of scalar.
T_shapeType of shape.
T_inv_scaleType of inverse scale.
+
+
+ +

Definition at line 52 of file gamma_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_shape , typename T_inv_scale >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_shape, T_inv_scale>::type stan::math::gamma_log (const T_y & y,
const T_shape & alpha,
const T_inv_scale & beta 
)
+
+inline
+
+ +

Definition at line 164 of file gamma_log.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::gamma_p (const fvar< T > & x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 15 of file gamma_p.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::gamma_p (const fvar< T > & x1,
const double x2 
)
+
+inline
+
+ +

Definition at line 51 of file gamma_p.hpp.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
double stan::math::gamma_p (double x,
double a 
)
+
+ +

+\[ \mbox{gamma\_p}(a, z) = \begin{cases} \textrm{error} & \mbox{if } a\leq 0 \textrm{ or } z < 0\\ P(a, z) & \mbox{if } a > 0, z \geq 0 \\[6pt] \textrm{NaN} & \mbox{if } a = \textrm{NaN or } z = \textrm{NaN} \end{cases} \] +

+

+

+\[ \frac{\partial\, \mbox{gamma\_p}(a, z)}{\partial a} = \begin{cases} \textrm{error} & \mbox{if } a\leq 0 \textrm{ or } z < 0\\ \frac{\partial\, P(a, z)}{\partial a} & \mbox{if } a > 0, z \geq 0 \\[6pt] \textrm{NaN} & \mbox{if } a = \textrm{NaN or } z = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{gamma\_p}(a, z)}{\partial z} = \begin{cases} \textrm{error} & \mbox{if } a\leq 0 \textrm{ or } z < 0\\ \frac{\partial\, P(a, z)}{\partial z} & \mbox{if } a > 0, z \geq 0 \\[6pt] \textrm{NaN} & \mbox{if } a = \textrm{NaN or } z = \textrm{NaN} \end{cases} \] +

+

+\[ P(a, z)=\frac{1}{\Gamma(a)}\int_0^zt^{a-1}e^{-t}dt \] +

+

+\[ \frac{\partial \, P(a, z)}{\partial a} = -\frac{\Psi(a)}{\Gamma^2(a)}\int_0^zt^{a-1}e^{-t}dt + \frac{1}{\Gamma(a)}\int_0^z (a-1)t^{a-2}e^{-t}dt \] +

+

+\[ \frac{\partial \, P(a, z)}{\partial z} = \frac{z^{a-1}e^{-z}}{\Gamma(a)} \] +

+ +

Definition at line 53 of file gamma_p.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::gamma_p (const double x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 86 of file gamma_p.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::gamma_p (const stan::math::vara,
const stan::math::varb 
)
+
+inline
+
+ +

Definition at line 104 of file gamma_p.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::gamma_p (const stan::math::vara,
const double & b 
)
+
+inline
+
+ +

Definition at line 109 of file gamma_p.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::gamma_p (const double & a,
const stan::math::varb 
)
+
+inline
+
+ +

Definition at line 114 of file gamma_p.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::gamma_q (const fvar< T > & x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 15 of file gamma_q.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::gamma_q (const fvar< T > & x1,
const double x2 
)
+
+inline
+
+ +

Definition at line 51 of file gamma_q.hpp.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
double stan::math::gamma_q (double x,
double a 
)
+
+ +

+\[ \mbox{gamma\_q}(a, z) = \begin{cases} \textrm{error} & \mbox{if } a\leq 0 \textrm{ or } z < 0\\ Q(a, z) & \mbox{if } a > 0, z \geq 0 \\[6pt] \textrm{NaN} & \mbox{if } a = \textrm{NaN or } z = \textrm{NaN} \end{cases} \] +

+

+

+\[ \frac{\partial\, \mbox{gamma\_q}(a, z)}{\partial a} = \begin{cases} \textrm{error} & \mbox{if } a\leq 0 \textrm{ or } z < 0\\ \frac{\partial\, Q(a, z)}{\partial a} & \mbox{if } a > 0, z \geq 0 \\[6pt] \textrm{NaN} & \mbox{if } a = \textrm{NaN or } z = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{gamma\_q}(a, z)}{\partial z} = \begin{cases} \textrm{error} & \mbox{if } a\leq 0 \textrm{ or } z < 0\\ \frac{\partial\, Q(a, z)}{\partial z} & \mbox{if } a > 0, z \geq 0 \\[6pt] \textrm{NaN} & \mbox{if } a = \textrm{NaN or } z = \textrm{NaN} \end{cases} \] +

+

+\[ Q(a, z)=\frac{1}{\Gamma(a)}\int_z^\infty t^{a-1}e^{-t}dt \] +

+

+\[ \frac{\partial \, Q(a, z)}{\partial a} = -\frac{\Psi(a)}{\Gamma^2(a)}\int_z^\infty t^{a-1}e^{-t}dt + \frac{1}{\Gamma(a)}\int_z^\infty (a-1)t^{a-2}e^{-t}dt \] +

+

+\[ \frac{\partial \, Q(a, z)}{\partial z} = -\frac{z^{a-1}e^{-z}}{\Gamma(a)} \] +

+ +

Definition at line 53 of file gamma_q.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::gamma_q (const stan::math::vara,
const stan::math::varb 
)
+
+inline
+
+ +

Definition at line 58 of file gamma_q.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::gamma_q (const stan::math::vara,
const double & b 
)
+
+inline
+
+ +

Definition at line 63 of file gamma_q.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::gamma_q (const double & a,
const stan::math::varb 
)
+
+inline
+
+ +

Definition at line 68 of file gamma_q.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::gamma_q (const double x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 86 of file gamma_q.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
double stan::math::gamma_rng (const double alpha,
const double beta,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 33 of file gamma_rng.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_F , typename T_G , typename T_V , typename T_W , typename T_m0 , typename T_C0 >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type< T_y, typename return_type<T_F, T_G, T_V, T_W, T_m0, T_C0>::type >::type stan::math::gaussian_dlm_obs_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > & y,
const Eigen::Matrix< T_F, Eigen::Dynamic, Eigen::Dynamic > & F,
const Eigen::Matrix< T_G, Eigen::Dynamic, Eigen::Dynamic > & G,
const Eigen::Matrix< T_V, Eigen::Dynamic, Eigen::Dynamic > & V,
const Eigen::Matrix< T_W, Eigen::Dynamic, Eigen::Dynamic > & W,
const Eigen::Matrix< T_m0, Eigen::Dynamic, 1 > & m0,
const Eigen::Matrix< T_C0, Eigen::Dynamic, Eigen::Dynamic > & C0 
)
+
+ +

The log of a Gaussian dynamic linear model (GDLM).

+

This distribution is equivalent to, for $t = 1:T$,

+

+\begin{eqnarray*} y_t & \sim N(F' \theta_t, V) \\ \theta_t & \sim N(G \theta_{t-1}, W) \\ \theta_0 & \sim N(m_0, C_0) \end{eqnarray*} +

+

If V is a vector, then the Kalman filter is applied sequentially.

+
Parameters
+ + + + + + + + +
yA r x T matrix of observations. Rows are variables, columns are observations.
FA n x r matrix. The design matrix.
GA n x n matrix. The transition matrix.
VA r x r matrix. The observation covariance matrix.
WA n x n matrix. The state covariance matrix.
m0A n x 1 matrix. The mean vector of the distribution of the initial state.
C0A n x n matrix. The covariance matrix of the distribution of the initial state.
+
+
+
Returns
The log of the joint density of the GDLM.
+
Exceptions
+ + +
std::domain_errorif a matrix in the Kalman filter is not positive semi-definite.
+
+
+
Template Parameters
+ + + + + + + + +
T_yType of scalar.
T_FType of design matrix.
T_GType of transition matrix.
T_VType of observation covariance matrix.
T_WType of state covariance matrix.
T_m0Type of initial state mean vector.
T_C0Type of initial state covariance matrix.
+
+
+ +

Definition at line 79 of file gaussian_dlm_obs_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_F , typename T_G , typename T_V , typename T_W , typename T_m0 , typename T_C0 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type< T_y, typename return_type<T_F, T_G, T_V, T_W, T_m0, T_C0>::type >::type stan::math::gaussian_dlm_obs_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > & y,
const Eigen::Matrix< T_F, Eigen::Dynamic, Eigen::Dynamic > & F,
const Eigen::Matrix< T_G, Eigen::Dynamic, Eigen::Dynamic > & G,
const Eigen::Matrix< T_V, Eigen::Dynamic, Eigen::Dynamic > & V,
const Eigen::Matrix< T_W, Eigen::Dynamic, Eigen::Dynamic > & W,
const Eigen::Matrix< T_m0, Eigen::Dynamic, 1 > & m0,
const Eigen::Matrix< T_C0, Eigen::Dynamic, Eigen::Dynamic > & C0 
)
+
+inline
+
+ +

Definition at line 225 of file gaussian_dlm_obs_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_F , typename T_G , typename T_V , typename T_W , typename T_m0 , typename T_C0 >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type< T_y, typename return_type<T_F, T_G, T_V, T_W, T_m0, T_C0>::type >::type stan::math::gaussian_dlm_obs_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > & y,
const Eigen::Matrix< T_F, Eigen::Dynamic, Eigen::Dynamic > & F,
const Eigen::Matrix< T_G, Eigen::Dynamic, Eigen::Dynamic > & G,
const Eigen::Matrix< T_V, Eigen::Dynamic, 1 > & V,
const Eigen::Matrix< T_W, Eigen::Dynamic, Eigen::Dynamic > & W,
const Eigen::Matrix< T_m0, Eigen::Dynamic, 1 > & m0,
const Eigen::Matrix< T_C0, Eigen::Dynamic, Eigen::Dynamic > & C0 
)
+
+ +

The log of a Gaussian dynamic linear model (GDLM) with uncorrelated observation disturbances.

+

This distribution is equivalent to, for $t = 1:T$,

+

+\begin{eqnarray*} y_t & \sim N(F' \theta_t, diag(V)) \\ \theta_t & \sim N(G \theta_{t-1}, W) \\ \theta_0 & \sim N(m_0, C_0) \end{eqnarray*} +

+

If V is a vector, then the Kalman filter is applied sequentially.

+
Parameters
+ + + + + + + + +
yA r x T matrix of observations. Rows are variables, columns are observations.
FA n x r matrix. The design matrix.
GA n x n matrix. The transition matrix.
VA size r vector. The diagonal of the observation covariance matrix.
WA n x n matrix. The state covariance matrix.
m0A n x 1 matrix. The mean vector of the distribution of the initial state.
C0A n x n matrix. The covariance matrix of the distribution of the initial state.
+
+
+
Returns
The log of the joint density of the GDLM.
+
Exceptions
+ + +
std::domain_errorif a matrix in the Kalman filter is not semi-positive definite.
+
+
+
Template Parameters
+ + + + + + + + +
T_yType of scalar.
T_FType of design matrix.
T_GType of transition matrix.
T_VType of observation variances
T_WType of state covariance matrix.
T_m0Type of initial state mean vector.
T_C0Type of initial state covariance matrix.
+
+
+ +

Definition at line 285 of file gaussian_dlm_obs_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_F , typename T_G , typename T_V , typename T_W , typename T_m0 , typename T_C0 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, typename return_type<T_F, T_G, T_V, T_W, T_m0, T_C0>::type>::type stan::math::gaussian_dlm_obs_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > & y,
const Eigen::Matrix< T_F, Eigen::Dynamic, Eigen::Dynamic > & F,
const Eigen::Matrix< T_G, Eigen::Dynamic, Eigen::Dynamic > & G,
const Eigen::Matrix< T_V, Eigen::Dynamic, 1 > & V,
const Eigen::Matrix< T_W, Eigen::Dynamic, Eigen::Dynamic > & W,
const Eigen::Matrix< T_m0, Eigen::Dynamic, 1 > & m0,
const Eigen::Matrix< T_C0, Eigen::Dynamic, Eigen::Dynamic > & C0 
)
+
+inline
+
+ +

Definition at line 442 of file gaussian_dlm_obs_log.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
const T& stan::math::get_base1 (const std::vector< T > & x,
size_t i,
const char * error_msg,
size_t idx 
)
+
+inline
+
+ +

Return a reference to the value of the specified vector at the specified base-one index.

+

If the index is out of range, throw a std::out_of_range exception with the specified error message and index indicated.

+
Parameters
+ + + + + +
xVector from which to get a value.
iIndex into vector plus 1.
error_msgError message if the index is out of range.
idxNested index level to report in error message if the index is out of range.
+
+
+
Returns
Value of vector at i - 1
+
Template Parameters
+ + +
Ttype of value.
+
+
+ +

Definition at line 27 of file get_base1.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
const T& stan::math::get_base1 (const std::vector< std::vector< T > > & x,
size_t i1,
size_t i2,
const char * error_msg,
size_t idx 
)
+
+inline
+
+ +

Return a reference to the value of the specified vector at the specified base-one indexes.

+

If an index is out of range, throw a std::out_of_range exception with the specified error message and index indicated.

+
Parameters
+ + + + + + +
xVector from which to get a value.
i1First index plus 1.
i2Second index plus 1.
error_msgError message if an index is out of range.
idxNested index level to report in error message if the index is out of range.
+
+
+
Returns
Value of vector at indexes.
+
Template Parameters
+ + +
Ttype of value.
+
+
+ +

Definition at line 53 of file get_base1.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
const T& stan::math::get_base1 (const std::vector< std::vector< std::vector< T > > > & x,
size_t i1,
size_t i2,
size_t i3,
const char * error_msg,
size_t idx 
)
+
+inline
+
+ +

Return a reference to the value of the specified vector at the specified base-one indexes.

+

If an index is out of range, throw a std::out_of_range exception with the specified error message and index indicated.

+
Parameters
+ + + + + + + +
xVector from which to get a value.
i1First index plus 1.
i2Second index plus 1.
i3Third index plus 1.
error_msgError message if an index is out of range.
idxNested index level to report in error message if the index is out of range.
+
+
+
Returns
Value of vector at indexes.
+
Template Parameters
+ + +
Ttype of value.
+
+
+ +

Definition at line 81 of file get_base1.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
const T& stan::math::get_base1 (const std::vector< std::vector< std::vector< std::vector< T > > > > & x,
size_t i1,
size_t i2,
size_t i3,
size_t i4,
const char * error_msg,
size_t idx 
)
+
+inline
+
+ +

Return a reference to the value of the specified vector at the specified base-one indexes.

+

If an index is out of range, throw a std::out_of_range exception with the specified error message and index indicated.

+
Parameters
+ + + + + + + + +
xVector from which to get a value.
i1First index plus 1.
i2Second index plus 1.
i3Third index plus 1.
i4Fourth index plus 1.
error_msgError message if an index is out of range.
idxNested index level to report in error message if the index is out of range.
+
+
+
Returns
Value of vector at indexes.
+
Template Parameters
+ + +
Ttype of value.
+
+
+ +

Definition at line 111 of file get_base1.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
const T& stan::math::get_base1 (const std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > & x,
size_t i1,
size_t i2,
size_t i3,
size_t i4,
size_t i5,
const char * error_msg,
size_t idx 
)
+
+inline
+
+ +

Return a reference to the value of the specified vector at the specified base-one indexes.

+

If an index is out of range, throw a std::out_of_range exception with the specified error message and index indicated.

+
Parameters
+ + + + + + + + + +
xVector from which to get a value.
i1First index plus 1.
i2Second index plus 1.
i3Third index plus 1.
i4Fourth index plus 1.
i5Fifth index plus 1.
error_msgError message if an index is out of range.
idxNested index level to report in error message if the index is out of range.
+
+
+
Returns
Value of vector at indexes.
+
Template Parameters
+ + +
Ttype of value.
+
+
+ +

Definition at line 143 of file get_base1.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
const T& stan::math::get_base1 (const std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > & x,
size_t i1,
size_t i2,
size_t i3,
size_t i4,
size_t i5,
size_t i6,
const char * error_msg,
size_t idx 
)
+
+inline
+
+ +

Return a reference to the value of the specified vector at the specified base-one indexes.

+

If an index is out of range, throw a std::out_of_range exception with the specified error message and index indicated.

+
Parameters
+ + + + + + + + + + +
xVector from which to get a value.
i1First index plus 1.
i2Second index plus 1.
i3Third index plus 1.
i4Fourth index plus 1.
i5Fifth index plus 1.
i6Sixth index plus 1.
error_msgError message if an index is out of range.
idxNested index level to report in error message if the index is out of range.
+
+
+
Returns
Value of vector at indexes.
+
Template Parameters
+ + +
Ttype of value.
+
+
+ +

Definition at line 178 of file get_base1.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
const T& stan::math::get_base1 (const std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > > & x,
size_t i1,
size_t i2,
size_t i3,
size_t i4,
size_t i5,
size_t i6,
size_t i7,
const char * error_msg,
size_t idx 
)
+
+inline
+
+ +

Return a reference to the value of the specified vector at the specified base-one indexes.

+

If an index is out of range, throw a std::out_of_range exception with the specified error message and index indicated.

+
Parameters
+ + + + + + + + + + + +
xVector from which to get a value.
i1First index plus 1.
i2Second index plus 1.
i3Third index plus 1.
i4Fourth index plus 1.
i5Fifth index plus 1.
i6Sixth index plus 1.
i7Seventh index plus 1.
error_msgError message if an index is out of range.
idxNested index level to report in error message if the index is out of range.
+
+
+
Returns
Value of vector at indexes.
+
Template Parameters
+ + +
Ttype of value.
+
+
+ +

Definition at line 216 of file get_base1.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
const T& stan::math::get_base1 (const std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > > > & x,
size_t i1,
size_t i2,
size_t i3,
size_t i4,
size_t i5,
size_t i6,
size_t i7,
size_t i8,
const char * error_msg,
size_t idx 
)
+
+inline
+
+ +

Return a reference to the value of the specified vector at the specified base-one indexes.

+

If an index is out of range, throw a std::out_of_range exception with the specified error message and index indicated.

+
Parameters
+ + + + + + + + + + + + +
xVector from which to get a value.
i1First index plus 1.
i2Second index plus 1.
i3Third index plus 1.
i4Fourth index plus 1.
i5Fifth index plus 1.
i6Sixth index plus 1.
i7Seventh index plus 1.
i8Eigth index plus 1.
error_msgError message if an index is out of range.
idxNested index level to report in error message if the index is out of range.
+
+
+
Returns
Value of vector at indexes.
+
Template Parameters
+ + +
Ttype of value.
+
+
+ +

Definition at line 256 of file get_base1.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, 1, Eigen::Dynamic> stan::math::get_base1 (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & x,
size_t m,
const char * error_msg,
size_t idx 
)
+
+inline
+
+ +

Return a copy of the row of the specified vector at the specified base-one row index.

+

If the index is out of range, throw a std::out_of_range exception with the specified error message and index indicated.

+

Warning: Because a copy is involved, it is inefficient to access element of matrices by first using this method to get a row then using a second call to get the value at a specified column.

+
Parameters
+ + + + + +
xMatrix from which to get a row
mIndex into matrix plus 1.
error_msgError message if the index is out of range.
idxNested index level to report in error message if the index is out of range.
+
+
+
Returns
Row of matrix at i - 1.
+
Template Parameters
+ + +
Ttype of value.
+
+
+ +

Definition at line 297 of file get_base1.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
const T& stan::math::get_base1 (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & x,
size_t m,
size_t n,
const char * error_msg,
size_t idx 
)
+
+inline
+
+ +

Return a reference to the value of the specified matrix at the specified base-one row and column indexes.

+

If either index is out of range, throw a std::out_of_range exception with the specified error message and index indicated.

+
Parameters
+ + + + + + +
xMatrix from which to get a row
mRow index plus 1.
nColumn index plus 1.
error_msgError message if either index is out of range.
idxNested index level to report in error message if either index is out of range.
+
+
+
Returns
Value of matrix at row m - 1 and column n - 1.
+
Template Parameters
+ + +
Ttype of value.
+
+
+ +

Definition at line 324 of file get_base1.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
const T& stan::math::get_base1 (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & x,
size_t m,
const char * error_msg,
size_t idx 
)
+
+inline
+
+ +

Return a reference to the value of the specified column vector at the specified base-one index.

+

If the index is out of range, throw a std::out_of_range exception with the specified error message and index indicated.

+
Parameters
+ + + + + +
xColumn vector from which to get a value.
mRow index plus 1.
error_msgError message if the index is out of range.
idxNested index level to report in error message if the index is out of range.
+
+
+
Returns
Value of column vector at row m - 1.
+
Template Parameters
+ + +
Ttype of value.
+
+
+ +

Definition at line 351 of file get_base1.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
const T& stan::math::get_base1 (const Eigen::Matrix< T, 1, Eigen::Dynamic > & x,
size_t n,
const char * error_msg,
size_t idx 
)
+
+inline
+
+ +

Return a reference to the value of the specified row vector at the specified base-one index.

+

If the index is out of range, throw a std::out_of_range exception with the specified error message and index indicated.

+
Parameters
+ + + + + +
xRow vector from which to get a value.
nColumn index plus 1.
error_msgError message if the index is out of range.
idxNested index level to report in error message if the index is out of range.
+
+
+
Returns
Value of row vector at column n - 1.
+
Template Parameters
+ + +
Ttype of value.
+
+
+ +

Definition at line 376 of file get_base1.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
T& stan::math::get_base1_lhs (std::vector< T > & x,
size_t i,
const char * error_msg,
size_t idx 
)
+
+inline
+
+ +

Return a reference to the value of the specified vector at the specified base-one index.

+

If the index is out of range, throw a std::out_of_range exception with the specified error message and index indicated.

+
Parameters
+ + + + + +
xVector from which to get a value.
iIndex into vector plus 1.
error_msgError message if the index is out of range.
idxNested index level to report in error message if the index is out of range.
+
+
+
Returns
Value of vector at i - 1
+
Template Parameters
+ + +
Ttype of value.
+
+
+ +

Definition at line 27 of file get_base1_lhs.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
T& stan::math::get_base1_lhs (std::vector< std::vector< T > > & x,
size_t i1,
size_t i2,
const char * error_msg,
size_t idx 
)
+
+inline
+
+ +

Return a reference to the value of the specified vector at the specified base-one indexes.

+

If an index is out of range, throw a std::out_of_range exception with the specified error message and index indicated.

+
Parameters
+ + + + + + +
xVector from which to get a value.
i1First index plus 1.
i2Second index plus 1.
error_msgError message if an index is out of range.
idxNested index level to report in error message if the index is out of range.
+
+
+
Returns
Value of vector at indexes.
+
Template Parameters
+ + +
Ttype of value.
+
+
+ +

Definition at line 53 of file get_base1_lhs.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
T& stan::math::get_base1_lhs (std::vector< std::vector< std::vector< T > > > & x,
size_t i1,
size_t i2,
size_t i3,
const char * error_msg,
size_t idx 
)
+
+inline
+
+ +

Return a reference to the value of the specified vector at the specified base-one indexes.

+

If an index is out of range, throw a std::out_of_range exception with the specified error message and index indicated.

+
Parameters
+ + + + + + + +
xVector from which to get a value.
i1First index plus 1.
i2Second index plus 1.
i3Third index plus 1.
error_msgError message if an index is out of range.
idxNested index level to report in error message if the index is out of range.
+
+
+
Returns
Value of vector at indexes.
+
Template Parameters
+ + +
Ttype of value.
+
+
+ +

Definition at line 81 of file get_base1_lhs.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
T& stan::math::get_base1_lhs (std::vector< std::vector< std::vector< std::vector< T > > > > & x,
size_t i1,
size_t i2,
size_t i3,
size_t i4,
const char * error_msg,
size_t idx 
)
+
+inline
+
+ +

Return a reference to the value of the specified vector at the specified base-one indexes.

+

If an index is out of range, throw a std::out_of_range exception with the specified error message and index indicated.

+
Parameters
+ + + + + + + + +
xVector from which to get a value.
i1First index plus 1.
i2Second index plus 1.
i3Third index plus 1.
i4Fourth index plus 1.
error_msgError message if an index is out of range.
idxNested index level to report in error message if the index is out of range.
+
+
+
Returns
Value of vector at indexes.
+
Template Parameters
+ + +
Ttype of value.
+
+
+ +

Definition at line 111 of file get_base1_lhs.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
T& stan::math::get_base1_lhs (std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > & x,
size_t i1,
size_t i2,
size_t i3,
size_t i4,
size_t i5,
const char * error_msg,
size_t idx 
)
+
+inline
+
+ +

Return a reference to the value of the specified vector at the specified base-one indexes.

+

If an index is out of range, throw a std::out_of_range exception with the specified error message and index indicated.

+
Parameters
+ + + + + + + + + +
xVector from which to get a value.
i1First index plus 1.
i2Second index plus 1.
i3Third index plus 1.
i4Fourth index plus 1.
i5Fifth index plus 1.
error_msgError message if an index is out of range.
idxNested index level to report in error message if the index is out of range.
+
+
+
Returns
Value of vector at indexes.
+
Template Parameters
+ + +
Ttype of value.
+
+
+ +

Definition at line 144 of file get_base1_lhs.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
T& stan::math::get_base1_lhs (std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > & x,
size_t i1,
size_t i2,
size_t i3,
size_t i4,
size_t i5,
size_t i6,
const char * error_msg,
size_t idx 
)
+
+inline
+
+ +

Return a reference to the value of the specified vector at the specified base-one indexes.

+

If an index is out of range, throw a std::out_of_range exception with the specified error message and index indicated.

+
Parameters
+ + + + + + + + + + +
xVector from which to get a value.
i1First index plus 1.
i2Second index plus 1.
i3Third index plus 1.
i4Fourth index plus 1.
i5Fifth index plus 1.
i6Sixth index plus 1.
error_msgError message if an index is out of range.
idxNested index level to report in error message if the index is out of range.
+
+
+
Returns
Value of vector at indexes.
+
Template Parameters
+ + +
Ttype of value.
+
+
+ +

Definition at line 179 of file get_base1_lhs.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
T& stan::math::get_base1_lhs (std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > > & x,
size_t i1,
size_t i2,
size_t i3,
size_t i4,
size_t i5,
size_t i6,
size_t i7,
const char * error_msg,
size_t idx 
)
+
+inline
+
+ +

Return a reference to the value of the specified vector at the specified base-one indexes.

+

If an index is out of range, throw a std::out_of_range exception with the specified error message and index indicated.

+
Parameters
+ + + + + + + + + + + +
xVector from which to get a value.
i1First index plus 1.
i2Second index plus 1.
i3Third index plus 1.
i4Fourth index plus 1.
i5Fifth index plus 1.
i6Sixth index plus 1.
i7Seventh index plus 1.
error_msgError message if an index is out of range.
idxNested index level to report in error message if the index is out of range.
+
+
+
Returns
Value of vector at indexes.
+
Template Parameters
+ + +
Ttype of value.
+
+
+ +

Definition at line 217 of file get_base1_lhs.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
T& stan::math::get_base1_lhs (std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > > > & x,
size_t i1,
size_t i2,
size_t i3,
size_t i4,
size_t i5,
size_t i6,
size_t i7,
size_t i8,
const char * error_msg,
size_t idx 
)
+
+inline
+
+ +

Return a reference to the value of the specified vector at the specified base-one indexes.

+

If an index is out of range, throw a std::out_of_range exception with the specified error message and index indicated.

+
Parameters
+ + + + + + + + + + + + +
xVector from which to get a value.
i1First index plus 1.
i2Second index plus 1.
i3Third index plus 1.
i4Fourth index plus 1.
i5Fifth index plus 1.
i6Sixth index plus 1.
i7Seventh index plus 1.
i8Eigth index plus 1.
error_msgError message if an index is out of range.
idxNested index level to report in error message if the index is out of range.
+
+
+
Returns
Value of vector at indexes.
+
Template Parameters
+ + +
Ttype of value.
+
+
+ +

Definition at line 258 of file get_base1_lhs.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Eigen::Block<Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> > stan::math::get_base1_lhs (Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & x,
size_t m,
const char * error_msg,
size_t idx 
)
+
+inline
+
+ +

Return a copy of the row of the specified vector at the specified base-one row index.

+

If the index is out of range, throw a std::out_of_range exception with the specified error message and index indicated.

+

Warning: Because a copy is involved, it is inefficient to access element of matrices by first using this method to get a row then using a second call to get the value at a specified column.

+
Parameters
+ + + + + +
xMatrix from which to get a row
mIndex into matrix plus 1.
error_msgError message if the index is out of range.
idxNested index level to report in error message if the index is out of range.
+
+
+
Returns
Row of matrix at i - 1.
+
Template Parameters
+ + +
Ttype of value.
+
+
+ +

Definition at line 301 of file get_base1_lhs.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
T& stan::math::get_base1_lhs (Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & x,
size_t m,
size_t n,
const char * error_msg,
size_t idx 
)
+
+inline
+
+ +

Return a reference to the value of the specified matrix at the specified base-one row and column indexes.

+

If either index is out of range, throw a std::out_of_range exception with the specified error message and index indicated.

+
Parameters
+ + + + + + +
xMatrix from which to get a row
mRow index plus 1.
nColumn index plus 1.
error_msgError message if either index is out of range.
idxNested index level to report in error message if either index is out of range.
+
+
+
Returns
Value of matrix at row m - 1 and column n - 1.
+
Template Parameters
+ + +
Ttype of value.
+
+
+ +

Definition at line 328 of file get_base1_lhs.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
T& stan::math::get_base1_lhs (Eigen::Matrix< T, Eigen::Dynamic, 1 > & x,
size_t m,
const char * error_msg,
size_t idx 
)
+
+inline
+
+ +

Return a reference to the value of the specified column vector at the specified base-one index.

+

If the index is out of range, throw a std::out_of_range exception with the specified error message and index indicated.

+
Parameters
+ + + + + +
xColumn vector from which to get a value.
mRow index plus 1.
error_msgError message if the index is out of range.
idxNested index level to report in error message if the index is out of range.
+
+
+
Returns
Value of column vector at row m - 1.
+
Template Parameters
+ + +
Ttype of value.
+
+
+ +

Definition at line 355 of file get_base1_lhs.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
T& stan::math::get_base1_lhs (Eigen::Matrix< T, 1, Eigen::Dynamic > & x,
size_t n,
const char * error_msg,
size_t idx 
)
+
+inline
+
+ +

Return a reference to the value of the specified row vector at the specified base-one index.

+

If the index is out of range, throw a std::out_of_range exception with the specified error message and index indicated.

+
Parameters
+ + + + + +
xRow vector from which to get a value.
nColumn index plus 1.
error_msgError message if the index is out of range.
idxNested index level to report in error message if the index is out of range.
+
+
+
Returns
Value of row vector at column n - 1.
+
Template Parameters
+ + +
Ttype of value.
+
+
+ +

Definition at line 380 of file get_base1_lhs.hpp.

+ +
+
+ +
+
+
+template<typename T_lp , typename T_lp_accum >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_lp, T_lp_accum>::type stan::math::get_lp (const T_lp & lp,
const stan::math::accumulator< T_lp_accum > & lp_accum 
)
+
+inline
+
+ +

Definition at line 14 of file get_lp.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
static void stan::math::grad (chainable * vi)
+
+static
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::grad (var & v,
Eigen::Matrix< var, Eigen::Dynamic, 1 > & x,
Eigen::VectorXd & g 
)
+
+ +

Propagate chain rule to calculate gradients starting from the specified variable.

+

Resizes the input vector to be the correct size.

+

The grad() function does not itself recover any memory. use recover_memory() or recover_memory_nested() to recover memory.

+
Parameters
+ + + + +
[in]vValue of function being differentiated
[in]xVariables being differentiated with respect to
[out]gGradient, d/dx v, evaluated at x.
+
+
+ +

Definition at line 26 of file grad.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
static void stan::math::grad (chainable * vi)
+
+static
+
+ +

Compute the gradient for all variables starting from the specified root variable implementation.

+

Does not recover memory. This chainable variable's adjoint is initialized using the method init_dependent() and then the chain rule is applied working down the stack from this chainable and calling each chainable's chain() method in turn.

+

This function computes a nested gradient only going back as far as the last nesting.

+

This function does not recover any memory from the computation.

+
Parameters
+ + +
viVariable implementation for root of partial derivative propagation.
+
+
+ +

Definition at line 30 of file grad.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::grad_2F1 (T & gradA,
T & gradC,
a,
b,
c,
z,
precision = 1e-6 
)
+
+ +

Definition at line 13 of file grad_2F1.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::grad_F32 (T * g,
a,
b,
c,
d,
e,
z,
precision = 1e-6 
)
+
+ +

Definition at line 11 of file grad_F32.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::grad_hessian (const F & f,
const Eigen::Matrix< double, Dynamic, 1 > & x,
double & fx,
Eigen::Matrix< double, Dynamic, Dynamic > & H,
std::vector< Eigen::Matrix< double, Dynamic, Dynamic > > & grad_H 
)
+
+ +

Calculate the value, the Hessian, and the gradient of the Hessian of the specified function at the specified argument.

+

The functor must implement

+

stan::math::fvar<stan::math::fvar<stan::math::var> > operator()(const Eigen::Matrix<stan::math::fvar<stan::math::fvar<stan::math::var> >, Eigen::Dynamic, 1>&)

+

using only operations that are defined for stan::math::fvar and stan::math::var.

+

This latter constraint usually requires the functions to be defined in terms of the libraries defined in Stan or in terms of functions with appropriately general namespace imports that eventually depend on functions defined in Stan.

+
Template Parameters
+ + +
FType of function
+
+
+
Parameters
+ + + + + + +
[in]fFunction
[in]xArgument to function
[out]fxFunction applied to argument
[out]HHessian of function at argument
[out]grad_HGradient of the Hessian of function at argument
+
+
+ +

Definition at line 46 of file grad_hessian.hpp.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::grad_inc_beta (double & g1,
double & g2,
double a,
double b,
double z 
)
+
+ +

Definition at line 17 of file grad_inc_beta.hpp.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::grad_inc_beta (var & g1,
var & g2,
const var & a,
const var & b,
const var & z 
)
+
+ +

Definition at line 24 of file grad_inc_beta.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::grad_inc_beta (stan::math::fvar< T > & g1,
stan::math::fvar< T > & g2,
stan::math::fvar< T > a,
stan::math::fvar< T > b,
stan::math::fvar< T > z 
)
+
+ +

Definition at line 24 of file grad_inc_beta.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::grad_reg_inc_beta (T & g1,
T & g2,
a,
b,
z,
digammaA,
digammaB,
digammaSum,
betaAB 
)
+
+ +

Definition at line 14 of file grad_reg_inc_beta.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
T stan::math::grad_reg_inc_gamma (a,
z,
g,
dig,
precision = 1e-6 
)
+
+ +

Definition at line 15 of file grad_reg_inc_gamma.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::grad_tr_mat_times_hessian (const F & f,
const Eigen::Matrix< double, Dynamic, 1 > & x,
const Eigen::Matrix< double, Dynamic, Dynamic > & M,
Eigen::Matrix< double, Dynamic, 1 > & grad_tr_MH 
)
+
+ +

Definition at line 20 of file grad_tr_mat_times_hessian.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::gradient (const F & f,
const Eigen::Matrix< double, Dynamic, 1 > & x,
double & fx,
Eigen::Matrix< double, Dynamic, 1 > & grad_fx 
)
+
+ +

Calculate the value and the gradient of the specified function at the specified argument.

+

The functor must implement

+

stan::math::var operator()(const Eigen::Matrix<stan::math::var, Eigen::Dynamic, 1>&)

+

using only operations that are defined for stan::math::var. This latter constraint usually requires the functions to be defined in terms of the libraries defined in Stan or in terms of functions with appropriately general namespace imports that eventually depend on functions defined in Stan.

+

Time and memory usage is on the order of the size of the fully unfolded expression for the function applied to the argument, independently of dimension.

+
Template Parameters
+ + +
FType of function
+
+
+
Parameters
+ + + + + +
[in]fFunction
[in]xArgument to function
[out]fxFunction applied to argument
[out]grad_fxGradient of function at argument
+
+
+ +

Definition at line 44 of file gradient.hpp.

+ +
+
+ +
+
+
+template<typename T , typename F >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::gradient (const F & f,
const Eigen::Matrix< T, Dynamic, 1 > & x,
T & fx,
Eigen::Matrix< T, Dynamic, 1 > & grad_fx 
)
+
+ +

Calculate the value and the gradient of the specified function at the specified argument.

+

The functor must implement

+

stan::math::fvar operator()(const Eigen::Matrix<stan::math::var, Eigen::Dynamic, 1>&)

+

using only operations that are defined for stan::math::fvar. This latter constraint usually requires the functions to be defined in terms of the libraries defined in Stan or in terms of functions with appropriately general namespace imports that eventually depend on functions defined in Stan.

+

Time and memory usage is on the order of the size of the fully unfolded expression for the function applied to the argument, independently of dimension.

+
Template Parameters
+ + +
FType of function
+
+
+
Parameters
+ + + + + +
[in]fFunction
[in]xArgument to function
[out]fxFunction applied to argument
[out]grad_fxGradient of function at argument
+
+
+ +

Definition at line 44 of file gradient.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , typename F >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::gradient_dot_vector (const F & f,
const Eigen::Matrix< T1, Dynamic, 1 > & x,
const Eigen::Matrix< T2, Dynamic, 1 > & v,
T1 & fx,
T1 & grad_fx_dot_v 
)
+
+ +

Definition at line 19 of file gradient_dot_vector.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::gumbel_ccdf_log (const T_y & y,
const T_loc & mu,
const T_scale & beta 
)
+
+ +

Definition at line 28 of file gumbel_ccdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::gumbel_cdf (const T_y & y,
const T_loc & mu,
const T_scale & beta 
)
+
+ +

Definition at line 28 of file gumbel_cdf.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::gumbel_cdf_log (const T_y & y,
const T_loc & mu,
const T_scale & beta 
)
+
+ +

Definition at line 28 of file gumbel_cdf_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::gumbel_log (const T_y & y,
const T_loc & mu,
const T_scale & beta 
)
+
+ +

Definition at line 28 of file gumbel_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::gumbel_log (const T_y & y,
const T_loc & mu,
const T_scale & beta 
)
+
+inline
+
+ +

Definition at line 118 of file gumbel_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
double stan::math::gumbel_rng (const double mu,
const double beta,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 27 of file gumbel_rng.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::head (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & v,
size_t n 
)
+
+inline
+
+ +

Return the specified number of elements as a vector from the front of the specified vector.

+
Template Parameters
+ + +
TType of value in vector
+
+
+
Parameters
+ + + +
vVector input
nSize of return
+
+
+
Returns
The first n elements of v
+ +

Definition at line 24 of file head.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, 1, Eigen::Dynamic> stan::math::head (const Eigen::Matrix< T, 1, Eigen::Dynamic > & rv,
size_t n 
)
+
+inline
+
+ +

Return the specified number of elements as a row vector from the front of the specified row vector.

+
Template Parameters
+ + +
TType of value in vector
+
+
+
Parameters
+ + + +
rvRow vector
nSize of return row vector
+
+
+
Returns
The first n elements of rv
+ +

Definition at line 42 of file head.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + +
std::vector<T> stan::math::head (const std::vector< T > & sv,
size_t n 
)
+
+ +

Return the specified number of elements as a standard vector from the front of the specified standard vector.

+
Template Parameters
+ + +
TType of value in vector
+
+
+
Parameters
+ + + +
svStandard vector
nSize of return
+
+
+
Returns
The first n elements of sv
+ +

Definition at line 58 of file head.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::hessian (const F & f,
const Eigen::Matrix< double, Dynamic, 1 > & x,
double & fx,
Eigen::Matrix< double, Dynamic, 1 > & grad,
Eigen::Matrix< double, Dynamic, Dynamic > & H 
)
+
+ +

Calculate the value, the gradient, and the Hessian, of the specified function at the specified argument in O(N^2) time and O(N^2) space.

+

The functor must implement

+

stan::math::fvar<stan::math::var> operator()(const Eigen::Matrix<stan::math::fvar<stan::math::var>, Eigen::Dynamic, 1>&)

+

using only operations that are defined for stan::math::fvar and stan::math::var.

+

This latter constraint usually requires the functions to be defined in terms of the libraries defined in Stan or in terms of functions with appropriately general namespace imports that eventually depend on functions defined in Stan.

+
Template Parameters
+ + +
FType of function
+
+
+
Parameters
+ + + + + + +
[in]fFunction
[in]xArgument to function
[out]fxFunction applied to argument
[out]gradgradient of function at argument
[out]HHessian of function at argument
+
+
+ +

Definition at line 46 of file hessian.hpp.

+ +
+
+ +
+
+
+template<typename T , typename F >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::hessian (const F & f,
const Eigen::Matrix< T, Dynamic, 1 > & x,
T & fx,
Eigen::Matrix< T, Dynamic, 1 > & grad,
Eigen::Matrix< T, Dynamic, Dynamic > & H 
)
+
+ +

Definition at line 75 of file hessian.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::hessian_times_vector (const F & f,
const Eigen::Matrix< double, Dynamic, 1 > & x,
const Eigen::Matrix< double, Dynamic, 1 > & v,
double & fx,
Eigen::Matrix< double, Dynamic, 1 > & Hv 
)
+
+ +

Definition at line 17 of file hessian_times_vector.hpp.

+ +
+
+ +
+
+
+template<typename T , typename F >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::hessian_times_vector (const F & f,
const Eigen::Matrix< T, Dynamic, 1 > & x,
const Eigen::Matrix< T, Dynamic, 1 > & v,
T & fx,
Eigen::Matrix< T, Dynamic, 1 > & Hv 
)
+
+ +

Definition at line 46 of file hessian_times_vector.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_n , typename T_N , typename T_a , typename T_b >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
double stan::math::hypergeometric_log (const T_n & n,
const T_N & N,
const T_a & a,
const T_b & b 
)
+
+ +

Definition at line 31 of file hypergeometric_log.hpp.

+ +
+
+ +
+
+
+template<typename T_n , typename T_N , typename T_a , typename T_b >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
double stan::math::hypergeometric_log (const T_n & n,
const T_N & N,
const T_a & a,
const T_b & b 
)
+
+inline
+
+ +

Definition at line 88 of file hypergeometric_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int stan::math::hypergeometric_rng (int N,
int a,
int b,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 16 of file hypergeometric_rng.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::hypot (const fvar< T > & x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 13 of file hypot.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::hypot (const fvar< T > & x1,
const double x2 
)
+
+inline
+
+ +

Definition at line 22 of file hypot.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::hypot (const double x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 31 of file hypot.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::hypot (const var & a,
const var & b 
)
+
+inline
+
+ +

Returns the length of the hypoteneuse of a right triangle with sides of the specified lengths (C99).

+

See hypot() for double-based function.

+

The partial derivatives are given by

+

$\frac{\partial}{\partial x} \sqrt{x^2 + y^2} = \frac{x}{\sqrt{x^2 + y^2}}$, and

+

$\frac{\partial}{\partial y} \sqrt{x^2 + y^2} = \frac{y}{\sqrt{x^2 + y^2}}$.

+
Parameters
+ + + +
aLength of first side.
bLength of second side.
+
+
+
Returns
Length of hypoteneuse.
+ +

Definition at line 53 of file hypot.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::hypot (const var & a,
double b 
)
+
+inline
+
+ +

Returns the length of the hypoteneuse of a right triangle with sides of the specified lengths (C99).

+

See hypot() for double-based function.

+

The derivative is

+

$\frac{d}{d x} \sqrt{x^2 + c^2} = \frac{x}{\sqrt{x^2 + c^2}}$.

+
Parameters
+ + + +
aLength of first side.
bLength of second side.
+
+
+
Returns
Length of hypoteneuse.
+ +

Definition at line 71 of file hypot.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::hypot (double a,
const var & b 
)
+
+inline
+
+ +

Returns the length of the hypoteneuse of a right triangle with sides of the specified lengths (C99).

+

See hypot() for double-based function.

+

The derivative is

+

$\frac{d}{d y} \sqrt{c^2 + y^2} = \frac{y}{\sqrt{c^2 + y^2}}$.

+

+\[ \mbox{hypot}(x, y) = \begin{cases} \textrm{NaN} & \mbox{if } x < 0 \text{ or } y < 0 \\ \sqrt{x^2+y^2} & \mbox{if } x, y\geq 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{hypot}(x, y)}{\partial x} = \begin{cases} \textrm{NaN} & \mbox{if } x < 0 \text{ or } y < 0 \\ \frac{x}{\sqrt{x^2+y^2}} & \mbox{if } x, y\geq 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{hypot}(x, y)}{\partial y} = \begin{cases} \textrm{NaN} & \mbox{if } x < 0 \text{ or } y < 0 \\ \frac{y}{\sqrt{x^2+y^2}} & \mbox{if } x, y\geq 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + + +
aLength of first side.
bLength of second side.
+
+
+
Returns
Length of hypoteneuse.
+ +

Definition at line 116 of file hypot.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
double stan::math::ibeta (const double a,
const double b,
const double x 
)
+
+inline
+
+ +

The normalized incomplete beta function of a, b, and x.

+

Used to compute the cumulative density function for the beta distribution.

+
Parameters
+ + + + +
aShape parameter a <= 0; a and b can't both be 0
bShape parameter b <= 0
xRandom variate. 0 <= x <= 1
+
+
+
Exceptions
+ + +
ifconstraints are violated or if any argument is NaN
+
+
+
Returns
The normalized incomplete beta function.
+ +

Definition at line 23 of file ibeta.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
var stan::math::ibeta (const var & a,
const var & b,
const var & x 
)
+
+inline
+
+ +

The normalized incomplete beta function of a, b, and x.

+

Used to compute the cumulative density function for the beta distribution.

+

Partial derivatives are those specified by wolfram alpha. The values were checked using both finite differences and by independent code for calculating the derivatives found in JSS (paper by Boik and Robison-Cox).

+
Parameters
+ + + + +
aShape parameter.
bShape parameter.
xRandom variate.
+
+
+
Returns
The normalized incomplete beta function.
+
Exceptions
+ + +
ifany argument is NaN.
+
+
+ +

Definition at line 238 of file ibeta.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
T stan::math::identity_constrain (x)
+
+inline
+
+ +

Returns the result of applying the identity constraint transform to the input.

+

This method is effectively a no-op and is mainly useful as a placeholder in auto-generated code.

+
Parameters
+ + +
xFree scalar.
+
+
+
Returns
Transformed input.
+
Template Parameters
+ + +
TType of scalar.
+
+
+ +

Definition at line 22 of file identity_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
T stan::math::identity_constrain (const T x,
T &  
)
+
+inline
+
+ +

Returns the result of applying the identity constraint transform to the input and increments the log probability reference with the log absolute Jacobian determinant.

+

This method is effectively a no-op and mainly useful as a placeholder in auto-generated code.

+
Parameters
+ + +
xFree scalar. lp Reference to log probability.
+
+
+
Returns
Transformed input.
+
Template Parameters
+ + +
TType of scalar.
+
+
+ +

Definition at line 41 of file identity_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
T stan::math::identity_free (const T y)
+
+inline
+
+ +

Returns the result of applying the inverse of the identity constraint transform to the input.

+

This method is effectively a no-op and mainly useful as a placeholder in auto-generated code.

+
Parameters
+ + +
yConstrained scalar.
+
+
+
Returns
The input.
+
Template Parameters
+ + +
TType of scalar.
+
+
+ +

Definition at line 21 of file identity_free.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
var stan::math::if_else (bool c,
const var & y_true,
const var & y_false 
)
+
+inline
+
+ +

If the specified condition is true, return the first variable, otherwise return the second variable.

+
Parameters
+ + + + +
cBoolean condition.
y_trueVariable to return if condition is true.
y_falseVariable to return if condition is false.
+
+
+ +

Definition at line 17 of file if_else.hpp.

+ +
+
+ +
+
+
+template<typename T_true , typename T_false >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_true, T_false>::type stan::math::if_else (const bool c,
const T_true y_true,
const T_false y_false 
)
+
+inline
+
+ +

Return the second argument if the first argument is true and otherwise return the second argument.

+

This is just a convenience method to provide a function with the same behavior as the built-in ternary operator. In general, this function behaves as if defined by

+

if_else(c, y1, y0) = c ? y1 : y0.

+
Parameters
+ + + + +
cBoolean condition value.
y_trueValue to return if condition is true.
y_falseValue to return if condition is false.
+
+
+ +

Definition at line 25 of file if_else.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
var stan::math::if_else (bool c,
double y_true,
const var & y_false 
)
+
+inline
+
+ +

If the specified condition is true, return a new variable constructed from the first scalar, otherwise return the second variable.

+
Parameters
+ + + + +
cBoolean condition.
y_trueValue to promote to variable and return if condition is true.
y_falseVariable to return if condition is false.
+
+
+ +

Definition at line 29 of file if_else.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
var stan::math::if_else (bool c,
const var & y_true,
const double y_false 
)
+
+inline
+
+ +

If the specified condition is true, return the first variable, otherwise return a new variable constructed from the second scalar.

+
Parameters
+ + + + +
cBoolean condition.
y_trueVariable to return if condition is true.
y_falseValue to promote to variable and return if condition is false.
+
+
+ +

Definition at line 44 of file if_else.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
double stan::math::inc_beta (const double & a,
const double & b,
const double & x 
)
+
+inline
+
+ +

Definition at line 10 of file inc_beta.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::inc_beta (const fvar< T > & a,
const fvar< T > & b,
const fvar< T > & x 
)
+
+inline
+
+ +

Definition at line 20 of file inc_beta.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
var stan::math::inc_beta (const stan::math::vara,
const stan::math::varb,
const stan::math::varc 
)
+
+inline
+
+ +

Definition at line 45 of file inc_beta.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
T stan::math::inc_beta_dda (a,
b,
z,
digamma_a,
digamma_ab 
)
+
+ +

Returns the partial derivative of the regularized incomplete beta function, I_{z}(a, b) with respect to a.

+

The power series used to compute the deriative tends to converge slowly when a and b are large, especially if z approaches 1. The implementation will throw an exception if the series have not converged within 100,000 iterations. The current implementation has been tested for values of a and b up to 12500 and z = 0.999.

+
Template Parameters
+ + +
Tscalar types of arguments
+
+
+
Parameters
+ + + + + + +
aa
bb
zupper bound of the integral
digamma_avalue of digamma(a)
digamma_abvalue of digamma(b)
+
+
+
Returns
partial derivative of the incomplete beta with respect to a
+
Precondition
a >= 0
+
+b >= 0
+
+0 <= z <= 1
+ +

Definition at line 38 of file inc_beta_dda.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
T stan::math::inc_beta_ddb (a,
b,
z,
digamma_b,
digamma_ab 
)
+
+ +

Returns the partial derivative of the regularized incomplete beta function, I_{z}(a, b) with respect to b.

+

The power series used to compute the deriative tends to converge slowly when a and b are large, especailly if z approaches 1. The implementation will throw an exception if the series have not converged within 100,000 iterations. The current implementation has been tested for values of a and b up to 12500 and z = 0.999.

+
Template Parameters
+ + +
Tscalar types of arguments
+
+
+
Parameters
+ + + + + + +
aa
bb
zupper bound of the integral
digamma_bvalue of digamma(b)
digamma_abvalue of digamma(b)
+
+
+
Returns
partial derivative of the incomplete beta with respect to b
+
Precondition
a >= 0
+
+b >= 0
+
+0 <= z <= 1
+ +

Definition at line 38 of file inc_beta_ddb.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + + + + + + + +
T stan::math::inc_beta_ddz (a,
b,
z 
)
+
+ +

Returns the partial derivative of the regularized incomplete beta function, I_{z}(a, b) with respect to z.

+
Template Parameters
+ + +
Tscalar types of arguments
+
+
+
Parameters
+ + + + +
aa
bb
zupper bound of the integral
+
+
+
Returns
partial derivative of the incomplete beta with respect to z
+
Precondition
a > 0
+
+b > 0
+
+0 < z <= 1
+ +

Definition at line 27 of file inc_beta_ddz.hpp.

+ +
+
+ +
+
+
+template<>
+ + + + + + + + + + + + + + + + + + + + + + + + +
double stan::math::inc_beta_ddz (double a,
double b,
double z 
)
+
+ +

Definition at line 35 of file inc_beta_ddz.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void stan::math::initialize (T & x,
const T & v 
)
+
+inline
+
+ +

Definition at line 17 of file initialize.hpp.

+ +
+
+ +
+
+
+template<typename T , typename V >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::enable_if_c<boost::is_arithmetic<V>::value, void>::type stan::math::initialize (T & x,
v 
)
+
+inline
+
+ +

Definition at line 23 of file initialize.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C, typename V >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void stan::math::initialize (Eigen::Matrix< T, R, C > & x,
const V & v 
)
+
+inline
+
+ +

Definition at line 27 of file initialize.hpp.

+ +
+
+ +
+
+
+template<typename T , typename V >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void stan::math::initialize (std::vector< T > & x,
const V & v 
)
+
+inline
+
+ +

Definition at line 32 of file initialize.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void stan::math::initialize_variable (var & variable,
const var & value 
)
+
+inline
+
+ +

Initialize variable to value.

+

(Function may look pointless, but its needed to bottom out recursion.)

+ +

Definition at line 15 of file initialize_variable.hpp.

+ +
+
+ +
+
+
+template<int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void stan::math::initialize_variable (Eigen::Matrix< var, R, C > & matrix,
const var & value 
)
+
+inline
+
+ +

Initialize every cell in the matrix to the specified value.

+ +

Definition at line 24 of file initialize_variable.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void stan::math::initialize_variable (std::vector< T > & variables,
const var & value 
)
+
+inline
+
+ +

Initialize the variables in the standard vector recursively.

+ +

Definition at line 34 of file initialize_variable.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
unsigned int stan::math::int_step (const T y)
+
+ +

The integer step, or Heaviside, function.

+

For double NaN input, int_step(NaN) returns 0.

+

+\[ \mbox{int\_step}(x) = \begin{cases} 0 & \mbox{if } x \leq 0 \\ 1 & \mbox{if } x > 0 \\[6pt] 0 & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
yValue to test.
+
+
+
Returns
1 if value is greater than 0 and 0 otherwise
+
Template Parameters
+ + +
TScalar argument type.
+
+
+ +

Definition at line 25 of file int_step.hpp.

+ +
+
+ +
+
+
+template<typename F , typename T1 , typename T2 >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
std::vector<std::vector<typename stan::return_type<T1, T2>::type> > stan::math::integrate_ode (const F & f,
const std::vector< T1 > y0,
const double t0,
const std::vector< double > & ts,
const std::vector< T2 > & theta,
const std::vector< double > & x,
const std::vector< int > & x_int,
std::ostream * msgs 
)
+
+ +

Return the solutions for the specified system of ordinary differential equations given the specified initial state, initial times, times of desired solution, and parameters and data, writing error and warning messages to the specified stream.

+

Warning: If the system of equations is stiff, roughly defined by having varying time scales across dimensions, then this solver is likely to be slow.

+

This function is templated to allow the initial times to be either data or autodiff variables and the parameters to be data or autodiff variables. The autodiff-based implementation for reverse-mode are defined in namespace stan::math and may be invoked via argument-dependent lookup by including their headers.

+

This function uses the Dormand-Prince method as implemented in Boost's boost::numeric::odeint::runge_kutta_dopri5 integrator.

+
Template Parameters
+ + + + +
Ftype of ODE system function.
T1type of scalars for initial values.
T2type of scalars for parameters.
+
+
+
Parameters
+ + + + + + + + + +
[in]ffunctor for the base ordinary differential equation.
[in]y0initial state.
[in]t0initial time.
[in]tstimes of the desired solutions, in strictly increasing order, all greater than the initial time.
[in]thetaparameter vector for the ODE.
[in]xcontinuous data vector for the ODE.
[in]x_intinteger data vector for the ODE.
[in,out]msgsthe print stream for warning messages.
+
+
+
Returns
a vector of states, each state being a vector of the same size as the state variable, corresponding to a time in ts.
+ +

Definition at line 60 of file integrate_ode.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
boost::math::tools::promote_args<T>::type stan::math::inv (const T x)
+
+inline
+
+ +

Definition at line 12 of file inv.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::inv (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 15 of file inv.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::inv (const var & a)
+
+inline
+
+ +

+\[ \mbox{inv}(x) = \begin{cases} \frac{1}{x} & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+

+\[ \frac{\partial\, \mbox{inv}(x)}{\partial x} = \begin{cases} -\frac{1}{x^2} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+ +

Definition at line 42 of file inv.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_dof >
+ + + + + + + + + + + + + + + + + + +
return_type<T_y, T_dof>::type stan::math::inv_chi_square_ccdf_log (const T_y & y,
const T_dof & nu 
)
+
+ +

Definition at line 33 of file inv_chi_square_ccdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_dof >
+ + + + + + + + + + + + + + + + + + +
return_type<T_y, T_dof>::type stan::math::inv_chi_square_cdf (const T_y & y,
const T_dof & nu 
)
+
+ +

Definition at line 33 of file inv_chi_square_cdf.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_dof >
+ + + + + + + + + + + + + + + + + + +
return_type<T_y, T_dof>::type stan::math::inv_chi_square_cdf_log (const T_y & y,
const T_dof & nu 
)
+
+ +

Definition at line 33 of file inv_chi_square_cdf_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_dof >
+ + + + + + + + + + + + + + + + + + +
return_type<T_y, T_dof>::type stan::math::inv_chi_square_log (const T_y & y,
const T_dof & nu 
)
+
+ +

The log of an inverse chi-squared density for y with the specified degrees of freedom parameter.

+

The degrees of freedom prarameter must be greater than 0. y must be greater than 0.

+

+\begin{eqnarray*} y &\sim& \mbox{\sf{Inv-}}\chi^2_\nu \\ \log (p (y \, |\, \nu)) &=& \log \left( \frac{2^{-\nu / 2}}{\Gamma (\nu / 2)} y^{- (\nu / 2 + 1)} \exp^{-1 / (2y)} \right) \\ &=& - \frac{\nu}{2} \log(2) - \log (\Gamma (\nu / 2)) - (\frac{\nu}{2} + 1) \log(y) - \frac{1}{2y} \\ & & \mathrm{ where } \; y > 0 \end{eqnarray*} +

+
Parameters
+ + + +
yA scalar variable.
nuDegrees of freedom.
+
+
+
Exceptions
+ + + +
std::domain_errorif nu is not greater than or equal to 0
std::domain_errorif y is not greater than or equal to 0.
+
+
+
Template Parameters
+ + + +
T_yType of scalar.
T_dofType of degrees of freedom.
+
+
+ +

Definition at line 52 of file inv_chi_square_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_dof >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
return_type<T_y, T_dof>::type stan::math::inv_chi_square_log (const T_y & y,
const T_dof & nu 
)
+
+inline
+
+ +

Definition at line 142 of file inv_chi_square_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
double stan::math::inv_chi_square_rng (const double nu,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 31 of file inv_chi_square_rng.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::inv_cloglog (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 15 of file inv_cloglog.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::inv_cloglog (const stan::math::vara)
+
+inline
+
+ +

Return the inverse complementary log-log function applied specified variable (stan).

+

See stan::math::inv_cloglog() for the double-based version.

+

The derivative is given by

+

$\frac{d}{dx} \mbox{cloglog}^{-1}(x) = \exp (x - \exp (x))$.

+
Parameters
+ + +
aVariable argument.
+
+
+
Returns
The inverse complementary log-log of the specified argument.
+ +

Definition at line 36 of file inv_cloglog.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
boost::math::tools::promote_args<T>::type stan::math::inv_cloglog (x)
+
+inline
+
+ +

The inverse complementary log-log function.

+

The function is defined by

+

inv_cloglog(x) = 1 - exp(-exp(x)).

+

This function can be used to implement the inverse link function for complementary-log-log regression.

+

+\[ \mbox{inv\_cloglog}(y) = \begin{cases} \mbox{cloglog}^{-1}(y) & \mbox{if } -\infty\leq y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{inv\_cloglog}(y)}{\partial y} = \begin{cases} \frac{\partial\, \mbox{cloglog}^{-1}(y)}{\partial y} & \mbox{if } -\infty\leq y\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } y = \textrm{NaN} \end{cases} \] +

+

+\[ \mbox{cloglog}^{-1}(y) = 1 - \exp \left( - \exp(y) \right) \] +

+

+\[ \frac{\partial \, \mbox{cloglog}^{-1}(y)}{\partial y} = \exp(y-\exp(y)) \] +

+
Parameters
+ + +
xArgument.
+
+
+
Returns
Inverse complementary log-log of the argument.
+ +

Definition at line 49 of file inv_cloglog.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_shape , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_shape, T_scale>::type stan::math::inv_gamma_ccdf_log (const T_y & y,
const T_shape & alpha,
const T_scale & beta 
)
+
+ +

Definition at line 35 of file inv_gamma_ccdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_shape , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_shape, T_scale>::type stan::math::inv_gamma_cdf (const T_y & y,
const T_shape & alpha,
const T_scale & beta 
)
+
+ +

The CDF of an inverse gamma density for y with the specified shape and scale parameters.

+

y, shape, and scale parameters must be greater than 0.

+
Parameters
+ + + + +
yA scalar variable.
alphaShape parameter.
betaScale parameter.
+
+
+
Exceptions
+ + + + +
std::domain_errorif alpha is not greater than 0.
std::domain_errorif beta is not greater than 0.
std::domain_errorif y is not greater than 0.
+
+
+
Template Parameters
+ + + + +
T_yType of scalar.
T_shapeType of shape.
T_scaleType of scale.
+
+
+ +

Definition at line 51 of file inv_gamma_cdf.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_shape , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_shape, T_scale>::type stan::math::inv_gamma_cdf_log (const T_y & y,
const T_shape & alpha,
const T_scale & beta 
)
+
+ +

Definition at line 35 of file inv_gamma_cdf_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_shape , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_shape, T_scale>::type stan::math::inv_gamma_log (const T_y & y,
const T_shape & alpha,
const T_scale & beta 
)
+
+ +

The log of an inverse gamma density for y with the specified shape and scale parameters.

+

Shape and scale parameters must be greater than 0. y must be greater than 0.

+
Parameters
+ + + + +
yA scalar variable.
alphaShape parameter.
betaScale parameter.
+
+
+
Exceptions
+ + + + +
std::domain_errorif alpha is not greater than 0.
std::domain_errorif beta is not greater than 0.
std::domain_errorif y is not greater than 0.
+
+
+
Template Parameters
+ + + + +
T_yType of scalar.
T_shapeType of shape.
T_scaleType of scale.
+
+
+ +

Definition at line 51 of file inv_gamma_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_shape , typename T_scale >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_shape, T_scale>::type stan::math::inv_gamma_log (const T_y & y,
const T_shape & alpha,
const T_scale & beta 
)
+
+inline
+
+ +

Definition at line 163 of file inv_gamma_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
double stan::math::inv_gamma_rng (const double alpha,
const double beta,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 33 of file inv_gamma_rng.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::inv_logit (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 15 of file inv_logit.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::inv_logit (const stan::math::vara)
+
+inline
+
+ +

The inverse logit function for variables (stan).

+

See stan::math::inv_logit() for the double-based version.

+

The derivative of inverse logit is

+

$\frac{d}{dx} \mbox{logit}^{-1}(x) = \mbox{logit}^{-1}(x) (1 - \mbox{logit}^{-1}(x))$.

+
Parameters
+ + +
aArgument variable.
+
+
+
Returns
Inverse logit of argument.
+ +

Definition at line 34 of file inv_logit.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
boost::math::tools::promote_args<T>::type stan::math::inv_logit (const T a)
+
+inline
+
+ +

Returns the inverse logit function applied to the argument.

+

The inverse logit function is defined by

+

$\mbox{logit}^{-1}(x) = \frac{1}{1 + \exp(-x)}$.

+

This function can be used to implement the inverse link function for logistic regression.

+

The inverse to this function is stan::math::logit.

+

+\[ \mbox{inv\_logit}(y) = \begin{cases} \mbox{logit}^{-1}(y) & \mbox{if } -\infty\leq y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{inv\_logit}(y)}{\partial y} = \begin{cases} \frac{\partial\, \mbox{logit}^{-1}(y)}{\partial y} & \mbox{if } -\infty\leq y\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } y = \textrm{NaN} \end{cases} \] +

+

+\[ \mbox{logit}^{-1}(y) = \frac{1}{1 + \exp(-y)} \] +

+

+\[ \frac{\partial \, \mbox{logit}^{-1}(y)}{\partial y} = \frac{\exp(y)}{(\exp(y)+1)^2} \] +

+
Parameters
+ + +
aArgument.
+
+
+
Returns
Inverse logit of argument.
+ +

Definition at line 52 of file inv_logit.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::inv_Phi (const fvar< T > & p)
+
+inline
+
+ +

Definition at line 15 of file inv_Phi.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
double stan::math::inv_Phi (double p)
+
+inline
+
+ +

The inverse of the unit normal cumulative distribution function.

+

The return value for a specified input probability, $p$, is the unit normal variate, $x$, such that

+

$\Phi(x) = \int_{-\infty}^x \mbox{\sf Norm}(x|0, 1) \ dx = p$

+

Algorithm first derived in 2003 by Peter Jon Aklam at http://home.online.no/~pjacklam/notes/invnorm/

+
Parameters
+ + +
pArgument between 0 and 1.
+
+
+
Returns
Real number
+ +

Definition at line 26 of file inv_Phi.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::inv_Phi (const stan::math::varp)
+
+inline
+
+ +

The inverse of unit normal cumulative density function.

+

See stan::math::inv_Phi() for the double-based version.

+

The derivative is the reciprocal of unit normal density function,

+
Parameters
+ + +
pProbability
+
+
+
Returns
The unit normal inverse cdf evaluated at p
+ +

Definition at line 37 of file inv_Phi.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
boost::math::tools::promote_args<T>::type stan::math::inv_sqrt (const T x)
+
+inline
+
+ +

Definition at line 12 of file inv_sqrt.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::inv_sqrt (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 15 of file inv_sqrt.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::inv_sqrt (const var & a)
+
+inline
+
+ +

+\[ \mbox{inv\_sqrt}(x) = \begin{cases} \frac{1}{\sqrt{x}} & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+

+\[ \frac{\partial\, \mbox{inv\_sqrt}(x)}{\partial x} = \begin{cases} -\frac{1}{2\sqrt{x^3}} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+ +

Definition at line 42 of file inv_sqrt.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
boost::math::tools::promote_args<T>::type stan::math::inv_square (const T x)
+
+inline
+
+ +

Definition at line 12 of file inv_square.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::inv_square (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 15 of file inv_square.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::inv_square (const var & a)
+
+inline
+
+ +

+\[ \mbox{inv\_square}(x) = \begin{cases} \frac{1}{x^2} & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+

+\[ \frac{\partial\, \mbox{inv\_square}(x)}{\partial x} = \begin{cases} -\frac{2}{x^3} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+ +

Definition at line 42 of file inv_square.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_dof , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_y, T_dof, T_scale>::type stan::math::inv_wishart_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > & W,
const T_dof & nu,
const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > & S 
)
+
+ +

The log of the Inverse-Wishart density for the given W, degrees of freedom, and scale matrix.

+

The scale matrix, S, must be k x k, symmetric, and semi-positive definite.

+

+\begin{eqnarray*} W &\sim& \mbox{\sf{Inv-Wishart}}_{\nu} (S) \\ \log (p (W \, |\, \nu, S) ) &=& \log \left( \left(2^{\nu k/2} \pi^{k (k-1) /4} \prod_{i=1}^k{\Gamma (\frac{\nu + 1 - i}{2})} \right)^{-1} \times \left| S \right|^{\nu/2} \left| W \right|^{-(\nu + k + 1) / 2} \times \exp (-\frac{1}{2} \mbox{tr} (S W^{-1})) \right) \\ &=& -\frac{\nu k}{2}\log(2) - \frac{k (k-1)}{4} \log(\pi) - \sum_{i=1}^{k}{\log (\Gamma (\frac{\nu+1-i}{2}))} +\frac{\nu}{2} \log(\det(S)) - \frac{\nu+k+1}{2}\log (\det(W)) - \frac{1}{2} \mbox{tr}(S W^{-1}) \end{eqnarray*} +

+
Parameters
+ + + + +
WA scalar matrix
nuDegrees of freedom
SThe scale matrix
+
+
+
Returns
The log of the Inverse-Wishart density at W given nu and S.
+
Exceptions
+ + + +
std::domain_errorif nu is not greater than k-1
std::domain_errorif S is not square, not symmetric, or not semi-positive definite.
+
+
+
Template Parameters
+ + + + +
T_yType of scalar.
T_dofType of degrees of freedom.
T_scaleType of scale.
+
+
+ +

Definition at line 52 of file inv_wishart_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_dof , typename T_scale >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_y, T_dof, T_scale>::type stan::math::inv_wishart_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > & W,
const T_dof & nu,
const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > & S 
)
+
+inline
+
+ +

Definition at line 125 of file inv_wishart_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> stan::math::inv_wishart_rng (const double nu,
const Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > & S,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 21 of file inv_wishart_rng.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::invalid_argument (const char * function,
const char * name,
const T & y,
const char * msg1,
const char * msg2 
)
+
+inline
+
+ +

Throw an invalid_argument exception with a consistently formatted message.

+

This is an abstraction for all Stan functions to use when throwing invalid argument. This will allow us to change the behavior for all functions at once.

+

The message is: "<function>: <name> <msg1><y><msg2>"

+
Template Parameters
+ + +
TType of variable
+
+
+
Parameters
+ + + + + + +
functionName of the function
nameName of the variable
yVariable
msg1Message to print before the variable
msg2Message to print after the variable
+
+
+
Exceptions
+ + +
std::invalid_argument
+
+
+ +

Definition at line 31 of file invalid_argument.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::invalid_argument (const char * function,
const char * name,
const T & y,
const char * msg1 
)
+
+inline
+
+ +

Throw an invalid_argument exception with a consistently formatted message.

+

This is an abstraction for all Stan functions to use when throwing invalid argument. This will allow us to change the behavior for all functions at once. (We've already changed behavior mulitple times up to Stan v2.5.0.)

+

The message is: "<function>: <name> <msg1><y>"

+
Template Parameters
+ + +
TType of variable
+
+
+
Parameters
+ + + + + +
functionName of the function
nameName of the variable
yVariable
msg1Message to print before the variable
+
+
+
Exceptions
+ + +
std::invalid_argument
+
+
+ +

Definition at line 66 of file invalid_argument.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::invalid_argument_vec (const char * function,
const char * name,
const T & y,
const size_t i,
const char * msg1,
const char * msg2 
)
+
+inline
+
+ +

Throw an invalid argument exception with a consistently formatted message.

+

This is an abstraction for all Stan functions to use when throwing invalid arguments. This will allow us to change the behavior for all functions at once. (We've already changed behavior mulitple times up to Stan v2.5.0.)

+

The message is: "<function>: <name>[<i+error_index>] <msg1><y>" where error_index is the value of stan::error_index::value which indicates whether the message should be 0 or 1 indexed.

+
Template Parameters
+ + +
TType of variable
+
+
+
Parameters
+ + + + + + + +
functionName of the function
nameName of the variable
yVariable
iIndex
msg1Message to print before the variable
msg2Message to print after the variable
+
+
+
Exceptions
+ + +
std::invalid_argument
+
+
+ +

Definition at line 38 of file invalid_argument_vec.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::invalid_argument_vec (const char * function,
const char * name,
const T & y,
const size_t i,
const char * msg 
)
+
+inline
+
+ +

Throw an invalid argument exception with a consistently formatted message.

+

This is an abstraction for all Stan functions to use when throwing invalid arguments. This will allow us to change the behavior for all functions at once. (We've already changed behavior mulitple times up to Stan v2.5.0.)

+

The message is: "<function>: <name>[<i+error_index>] <msg1><y>" where error_index is the value of stan::error_index::value which indicates whether the message should be 0 or 1 indexed.

+
Template Parameters
+ + +
TType of variable
+
+
+
Parameters
+ + + + + + +
functionName of the function
nameName of the variable
yVariable
iIndex
msgMessage to print before the variable
+
+
+
Exceptions
+ + +
std::invalid_argument
+
+
+ +

Definition at line 74 of file invalid_argument_vec.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<T, R, C> stan::math::inverse (const Eigen::Matrix< T, R, C > & m)
+
+inline
+
+ +

Returns the inverse of the specified matrix.

+
Parameters
+ + +
mSpecified matrix.
+
+
+
Returns
Inverse of the matrix.
+ +

Definition at line 18 of file inverse.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<fvar<T>, R, C> stan::math::inverse (const Eigen::Matrix< fvar< T >, R, C > & m)
+
+inline
+
+ +

Definition at line 20 of file inverse.hpp.

+ +
+
+ +
+
+
+template<typename Vector >
+ + + + + + + + + + + + + + + + + + +
void stan::math::inverse_softmax (const Vector & simplex,
Vector & y 
)
+
+ +

Writes the inverse softmax of the simplex argument into the second argument.

+

See stan::math::softmax for the inverse function and a definition of the relation.

+

The inverse softmax function is defined by

+

$\mbox{inverse\_softmax}(x)[i] = \log x[i]$.

+

This function defines the inverse of stan::math::softmax up to a scaling factor.

+

Because of the definition, values of 0.0 in the simplex are converted to negative infinity, and values of 1.0 are converted to 0.0.

+

There is no check that the input vector is a valid simplex vector.

+
Parameters
+ + + +
simplexSimplex vector input.
yVector into which the inverse softmax is written.
+
+
+
Exceptions
+ + +
std::invalid_argumentif size of the input and output vectors differ.
+
+
+ +

Definition at line 34 of file inverse_softmax.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::inverse_spd (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & m)
+
+inline
+
+ +

Returns the inverse of the specified symmetric, pos/neg-definite matrix.

+
Parameters
+ + +
mSpecified matrix.
+
+
+
Returns
Inverse of the matrix.
+ +

Definition at line 19 of file inverse_spd.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + +
bool stan::math::is_aligned (T * ptr,
unsigned int bytes_aligned 
)
+
+ +

Return true if the specified pointer is aligned on the number of bytes.

+

This doesn't really make sense other than for powers of 2.

+
Parameters
+ + + +
ptrPointer to test.
bytes_alignedNumber of bytes of alignment required.
+
+
+
Returns
true if pointer is aligned.
+
Template Parameters
+ + +
Typeof object to which pointer points.
+
+
+ +

Definition at line 34 of file stack_alloc.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
int stan::math::is_inf (const double x)
+
+inline
+
+ +

Returns 1 if the input is infinite and 0 otherwise.

+

Delegates to boost::math::isinf.

+
Parameters
+ + +
xValue to test.
+
+
+
Returns
1 if the value is infinite.
+ +

Definition at line 19 of file is_inf.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
int stan::math::is_inf (const fvar< T > & x)
+
+inline
+
+ +

Returns 1 if the input's value is infinite and 0 otherwise.

+

Delegates to stan::math::is_inf.

+
Parameters
+ + +
xValue to test.
+
+
+
Returns
1 if the value is infinite and 0 otherwise.
+ +

Definition at line 22 of file is_inf.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
int stan::math::is_inf (const var & v)
+
+inline
+
+ +

Returns 1 if the input's value is infinite and 0 otherwise.

+

Delegates to stan::math::is_inf.

+
Parameters
+ + +
vValue to test.
+
+
+
Returns
1 if the value is infinite and 0 otherwise.
+ +

Definition at line 23 of file is_inf.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool stan::math::is_nan (double x)
+
+inline
+
+ +

Returns 1 if the input is NaN and 0 otherwise.

+

Delegates to boost::math::isnan.

+
Parameters
+ + +
xValue to test.
+
+
+
Returns
1 if the value is NaN.
+ +

Definition at line 18 of file is_nan.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool stan::math::is_nan (const var & v)
+
+inline
+
+ +

Returns 1 if the input's value is NaN and 0 otherwise.

+

Delegates to stan::math::is_nan(double).

+
Parameters
+ + +
vValue to test.
+
+
+
Returns
1 if the value is NaN and 0 otherwise.
+ +

Definition at line 21 of file is_nan.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
int stan::math::is_nan (const fvar< T > & x)
+
+inline
+
+ +

Returns 1 if the input's value is NaN and 0 otherwise.

+

Delegates to stan::math::is_nan.

+
Parameters
+ + +
xValue to test.
+
+
+
Returns
1 if the value is NaN and 0 otherwise.
+ +

Definition at line 22 of file is_nan.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
bool stan::math::is_uninitialized (x)
+
+inline
+
+ +

Returns true if the specified variable is uninitialized.

+

Arithmetic types are always initialized by definition (the value is not specified).

+
Template Parameters
+ + +
TType of object to test.
+
+
+
Parameters
+ + +
xObject to test.
+
+
+
Returns
true if the specified object is uninitialized.
+
+false if input is NaN.
+ +

Definition at line 19 of file is_uninitialized.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool stan::math::is_uninitialized (var x)
+
+inline
+
+ +

Returns true if the specified variable is uninitialized.

+

This overload of the stan::math::is_uninitialized() function delegates the return to the is_uninitialized() method on the specified variable.

+
Parameters
+ + +
xObject to test.
+
+
+
Returns
true if the specified object is uninitialized.
+ +

Definition at line 23 of file is_uninitialized.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::jacobian (const F & f,
const Eigen::Matrix< double, Dynamic, 1 > & x,
Eigen::Matrix< double, Dynamic, 1 > & fx,
Eigen::Matrix< double, Dynamic, Dynamic > & J 
)
+
+ +

Definition at line 15 of file jacobian.hpp.

+ +
+
+ +
+
+
+template<typename T , typename F >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::jacobian (const F & f,
const Eigen::Matrix< T, Dynamic, 1 > & x,
Eigen::Matrix< T, Dynamic, 1 > & fx,
Eigen::Matrix< T, Dynamic, Dynamic > & J 
)
+
+ +

Definition at line 16 of file jacobian.hpp.

+ +
+
+ +
+
+
+template<typename T , typename TL >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
T stan::math::lb_constrain (const T x,
const TL lb 
)
+
+inline
+
+ +

Return the lower-bounded value for the specified unconstrained input and specified lower bound.

+

The transform applied is

+

$f(x) = \exp(x) + L$

+

where $L$ is the constant lower bound.

+

If the lower bound is negative infinity, this function reduces to identity_constrain(x).

+
Parameters
+ + + +
xUnconstrained scalar input.
lbLower-bound on constrained ouptut.
+
+
+
Returns
Lower-bound constrained value correspdonding to inputs.
+
Template Parameters
+ + + +
TType of scalar.
TLType of lower bound.
+
+
+ +

Definition at line 35 of file lb_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T , typename TL >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T, TL>::type stan::math::lb_constrain (const T x,
const TL lb,
T & lp 
)
+
+inline
+
+ +

Return the lower-bounded value for the speicifed unconstrained input and specified lower bound, incrementing the specified reference with the log absolute Jacobian determinant of the transform.

+

If the lower bound is negative infinity, this function reduces to identity_constraint(x, lp).

+
Parameters
+ + + + +
xUnconstrained scalar input.
lbLower-bound on output.
lpReference to log probability to increment.
+
+
+
Returns
Loer-bound constrained value corresponding to inputs.
+
Template Parameters
+ + + +
TType of scalar.
TLType of lower bound.
+
+
+ +

Definition at line 61 of file lb_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T , typename TL >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T, TL>::type stan::math::lb_free (const T y,
const TL lb 
)
+
+inline
+
+ +

Return the unconstrained value that produces the specified lower-bound constrained value.

+

If the lower bound is negative infinity, it is ignored and the function reduces to identity_free(y).

+
Parameters
+ + + +
yInput scalar.
lbLower bound.
+
+
+
Returns
Unconstrained value that produces the input when constrained.
+
Template Parameters
+ + + +
TType of scalar.
TLType of lower bound.
+
+
+
Exceptions
+ + +
std::domain_errorif y is lower than the lower bound.
+
+
+ +

Definition at line 32 of file lb_free.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::lbeta (const fvar< T > & x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 16 of file lbeta.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::lbeta (const double x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 28 of file lbeta.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::lbeta (const fvar< T > & x1,
const double x2 
)
+
+inline
+
+ +

Definition at line 38 of file lbeta.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T1, T2>::type stan::math::lbeta (const T1 a,
const T2 b 
)
+
+inline
+
+ +

Return the log of the beta function applied to the specified arguments.

+

The beta function is defined for $a > 0$ and $b > 0$ by

+

$\mbox{B}(a, b) = \frac{\Gamma(a) \Gamma(b)}{\Gamma(a+b)}$.

+

This function returns its log,

+

$\log \mbox{B}(a, b) = \log \Gamma(a) + \log \Gamma(b) - \log \Gamma(a+b)$.

+

See boost::math::lgamma() for the double-based and stan::math for the variable-based log Gamma function.

+

+\[ \mbox{lbeta}(\alpha, \beta) = \begin{cases} \ln\int_0^1 u^{\alpha - 1} (1 - u)^{\beta - 1} \, du & \mbox{if } \alpha, \beta>0 \\[6pt] \textrm{NaN} & \mbox{if } \alpha = \textrm{NaN or } \beta = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{lbeta}(\alpha, \beta)}{\partial \alpha} = \begin{cases} \Psi(\alpha)-\Psi(\alpha+\beta) & \mbox{if } \alpha, \beta>0 \\[6pt] \textrm{NaN} & \mbox{if } \alpha = \textrm{NaN or } \beta = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{lbeta}(\alpha, \beta)}{\partial \beta} = \begin{cases} \Psi(\beta)-\Psi(\alpha+\beta) & \mbox{if } \alpha, \beta>0 \\[6pt] \textrm{NaN} & \mbox{if } \alpha = \textrm{NaN or } \beta = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + + +
aFirst value
bSecond value
+
+
+
Returns
Log of the beta function applied to the two values.
+
Template Parameters
+ + + +
T1Type of first value.
T2Type of second value.
+
+
+ +

Definition at line 59 of file lbeta.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::lgamma (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 15 of file lgamma.hpp.

+ +
+
+ +
+
+ + + + + + + + +
double stan::math::lgamma (double x)
+
+ +

+\[ \mbox{lgamma}(x) = \begin{cases} \textrm{error} & \mbox{if } x\in \{\dots, -3, -2, -1, 0\}\\ \ln\Gamma(x) & \mbox{if } x\not\in \{\dots, -3, -2, -1, 0\}\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+

+\[ \frac{\partial\, \mbox{lgamma}(x)}{\partial x} = \begin{cases} \textrm{error} & \mbox{if } x\in \{\dots, -3, -2, -1, 0\}\\ \Psi(x) & \mbox{if } x\not\in \{\dots, -3, -2, -1, 0\}\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+ +

Definition at line 31 of file lgamma.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::lgamma (const stan::math::vara)
+
+inline
+
+ +

The log gamma function for variables (C99).

+

The derivatie is the digamma function,

+

$\frac{d}{dx} \Gamma(x) = \psi^{(0)}(x)$.

+
Parameters
+ + +
aThe variable.
+
+
+
Returns
Log gamma of the variable.
+ +

Definition at line 35 of file lgamma.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_covar , typename T_shape >
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_covar, T_shape>::type stan::math::lkj_corr_cholesky_log (const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > & L,
const T_shape & eta 
)
+
+ +

Definition at line 58 of file lkj_corr_cholesky_log.hpp.

+ +
+
+ +
+
+
+template<typename T_covar , typename T_shape >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_covar, T_shape>::type stan::math::lkj_corr_cholesky_log (const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > & L,
const T_shape & eta 
)
+
+inline
+
+ +

Definition at line 101 of file lkj_corr_cholesky_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
Eigen::MatrixXd stan::math::lkj_corr_cholesky_rng (const size_t K,
const double eta,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 54 of file lkj_corr_cholesky_rng.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_shape >
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_y, T_shape>::type stan::math::lkj_corr_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > & y,
const T_shape & eta 
)
+
+ +

Definition at line 88 of file lkj_corr_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_shape >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_y, T_shape>::type stan::math::lkj_corr_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > & y,
const T_shape & eta 
)
+
+inline
+
+ +

Definition at line 124 of file lkj_corr_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
Eigen::MatrixXd stan::math::lkj_corr_rng (const size_t K,
const double eta,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 54 of file lkj_corr_rng.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_shape >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_y, T_loc, T_scale, T_shape>::type stan::math::lkj_cov_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > & y,
const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > & mu,
const Eigen::Matrix< T_scale, Eigen::Dynamic, 1 > & sigma,
const T_shape & eta 
)
+
+ +

Definition at line 24 of file lkj_cov_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_y, T_loc, T_scale, T_shape>::type stan::math::lkj_cov_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > & y,
const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > & mu,
const Eigen::Matrix< T_scale, Eigen::Dynamic, 1 > & sigma,
const T_shape & eta 
)
+
+inline
+
+ +

Definition at line 74 of file lkj_cov_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_shape >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_y, T_loc, T_scale, T_shape>::type stan::math::lkj_cov_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > & y,
const T_loc & mu,
const T_scale & sigma,
const T_shape & eta 
)
+
+ +

Definition at line 87 of file lkj_cov_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_y, T_loc, T_scale, T_shape>::type stan::math::lkj_cov_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > & y,
const T_loc & mu,
const T_scale & sigma,
const T_shape & eta 
)
+
+inline
+
+ +

Definition at line 124 of file lkj_cov_log.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<typename stan::return_type<T, int>::type> stan::math::lmgamma (int x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 16 of file lmgamma.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::lmgamma (int a,
const stan::math::varb 
)
+
+inline
+
+ +

Definition at line 28 of file lmgamma.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T>::type stan::math::lmgamma (const int k,
x 
)
+
+inline
+
+ +

Return the natural logarithm of the multivariate gamma function with the speciifed dimensions and argument.

+

The multivariate gamma function $\Gamma_k(x)$ for dimensionality $k$ and argument $x$ is defined by

+

$\Gamma_k(x) = \pi^{k(k-1)/4} \, \prod_{j=1}^k \Gamma(x + (1 - j)/2)$,

+

where $\Gamma()$ is the gamma function.

+

+\[ \mbox{lmgamma}(n, x) = \begin{cases} \textrm{error} & \mbox{if } x\in \{\dots, -3, -2, -1, 0\}\\ \ln\Gamma_n(x) & \mbox{if } x\not\in \{\dots, -3, -2, -1, 0\}\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{lmgamma}(n, x)}{\partial x} = \begin{cases} \textrm{error} & \mbox{if } x\in \{\dots, -3, -2, -1, 0\}\\ \frac{\partial\, \ln\Gamma_n(x)}{\partial x} & \mbox{if } x\not\in \{\dots, -3, -2, -1, 0\}\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \ln\Gamma_n(x) = \pi^{n(n-1)/4} \, \prod_{j=1}^n \Gamma(x + (1 - j)/2) \] +

+

+\[ \frac{\partial \, \ln\Gamma_n(x)}{\partial x} = \sum_{j=1}^n \Psi(x + (1 - j) / 2) \] +

+
Parameters
+ + + +
kNumber of dimensions.
xFunction argument.
+
+
+
Returns
Natural log of the multivariate gamma function.
+
Template Parameters
+ + +
TType of scalar.
+
+
+ +

Definition at line 57 of file lmgamma.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::log (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 15 of file log.hpp.

+ +
+
+ +
+
+
+template<typename T , int Rows, int Cols>
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<T, Rows, Cols> stan::math::log (const Eigen::Matrix< T, Rows, Cols > & m)
+
+inline
+
+ +

Return the element-wise logarithm of the matrix or vector.

+
Parameters
+ + +
mThe matrix or vector.
+
+
+
Returns
ret(i, j) = log(m(i, j))
+ +

Definition at line 17 of file log.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::log (const var & a)
+
+inline
+
+ +

Return the natural log of the specified variable (cmath).

+

The derivative is defined by

+

$\frac{d}{dx} \log x = \frac{1}{x}$.

+

+\[ \mbox{log}(x) = \begin{cases} \textrm{NaN} & \mbox{if } x < 0\\ \ln(x) & \mbox{if } x \geq 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{log}(x)}{\partial x} = \begin{cases} \textrm{NaN} & \mbox{if } x < 0\\ \frac{1}{x} & \mbox{if } x\geq 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
aVariable whose log is taken.
+
+
+
Returns
Natural log of variable.
+ +

Definition at line 50 of file log.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::log10 (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 15 of file log10.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::log10 (const var & a)
+
+inline
+
+ +

Return the base 10 log of the specified variable (cmath).

+

The derivative is defined by

+

$\frac{d}{dx} \log_{10} x = \frac{1}{x \log 10}$.

+

+\[ \mbox{log10}(x) = \begin{cases} \textrm{NaN} & \mbox{if } x < 0\\ \log_{10}(x) & \mbox{if } x \geq 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{log10}(x)}{\partial x} = \begin{cases} \textrm{NaN} & \mbox{if } x < 0\\ \frac{1}{x \ln10} & \mbox{if } x\geq 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
aVariable whose log is taken.
+
+
+
Returns
Base 10 log of variable.
+ +

Definition at line 54 of file log10.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
double stan::math::log10 ()
+
+inline
+
+ +

Return natural logarithm of ten.

+
Returns
Natural logarithm of ten.
+ +

Definition at line 114 of file constants.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::log1m (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 16 of file log1m.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::log1m (const stan::math::vara)
+
+inline
+
+ +

The log (1 - x) function for variables.

+

The derivative is given by

+

$\frac{d}{dx} \log (1 - x) = -\frac{1}{1 - x}$.

+
Parameters
+ + +
aThe variable.
+
+
+
Returns
The variable representing log of 1 minus the variable.
+ +

Definition at line 32 of file log1m.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
boost::math::tools::promote_args<T>::type stan::math::log1m (x)
+
+inline
+
+ +

Return the natural logarithm of one minus the specified value.

+

The main use of this function is to cut down on intermediate values during algorithmic differentiation.

+

+\[ \mbox{log1m}(x) = \begin{cases} \ln(1-x) & \mbox{if } x \leq 1 \\ \textrm{NaN} & \mbox{if } x > 1\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{log1m}(x)}{\partial x} = \begin{cases} -\frac{1}{1-x} & \mbox{if } x \leq 1 \\ \textrm{NaN} & \mbox{if } x > 1\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
xSpecified value.
+
+
+
Returns
Natural log of one minus x.
+ +

Definition at line 40 of file log1m.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::log1m_exp (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 16 of file log1m_exp.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::log1m_exp (const stan::math::vara)
+
+inline
+
+ +

Return the log of 1 minus the exponential of the specified variable.

+ +

Definition at line 38 of file log1m_exp.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
boost::math::tools::promote_args<T>::type stan::math::log1m_exp (const T a)
+
+inline
+
+ +

Calculates the log of 1 minus the exponential of the specified value without overflow log1m_exp(x) = log(1-exp(x)).

+

This function is only defined for x<0

+

+\[ \mbox{log1m\_exp}(x) = \begin{cases} \ln(1-\exp(x)) & \mbox{if } x < 0 \\ \textrm{NaN} & \mbox{if } x \geq 0\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{asinh}(x)}{\partial x} = \begin{cases} -\frac{\exp(x)}{1-\exp(x)} & \mbox{if } x < 0 \\ \textrm{NaN} & \mbox{if } x \geq 0\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+ +

Definition at line 41 of file log1m_exp.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::log1m_inv_logit (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 15 of file log1m_inv_logit.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
boost::math::tools::promote_args<T>::type stan::math::log1m_inv_logit (const T u)
+
+inline
+
+ +

Returns the natural logarithm of 1 minus the inverse logit of the specified argument.

+

+\[ \mbox{log1m\_inv\_logit}(x) = \begin{cases} -\ln(\exp(x)+1) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{log1m\_inv\_logit}(x)}{\partial x} = \begin{cases} -\frac{\exp(x)}{\exp(x)+1} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Template Parameters
+ + +
TScalar type
+
+
+
Parameters
+ + +
uInput.
+
+
+
Returns
log of 1 minus the inverse logit of the input.
+ +

Definition at line 36 of file log1m_inv_logit.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::log1p (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 16 of file log1p.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::log1p (const stan::math::vara)
+
+inline
+
+ +

The log (1 + x) function for variables (C99).

+

The derivative is given by

+

$\frac{d}{dx} \log (1 + x) = \frac{1}{1 + x}$.

+
Parameters
+ + +
aThe variable.
+
+
+
Returns
The log of 1 plus the variable.
+ +

Definition at line 34 of file log1p.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
boost::math::tools::promote_args<T>::type stan::math::log1p (const T x)
+
+inline
+
+ +

Return the natural logarithm of one plus the specified value.

+

The main use of this function is to cut down on intermediate values during algorithmic differentiation.

+

+\[ \mbox{log1p}(x) = \begin{cases} \textrm{NaN} & \mbox{if } x < -1\\ \ln(1+x)& \mbox{if } x\geq -1 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{log1p}(x)}{\partial x} = \begin{cases} \textrm{NaN} & \mbox{if } x < -1\\ \frac{1}{1+x} & \mbox{if } x\geq -1 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
xSpecified value.
+
+
+
Returns
Natural log of one plus x.
+ +

Definition at line 39 of file log1p.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::log1p_exp (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 13 of file log1p_exp.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::log1p_exp (const stan::math::vara)
+
+inline
+
+ +

Return the log of 1 plus the exponential of the specified variable.

+ +

Definition at line 28 of file log1p_exp.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
boost::math::tools::promote_args<T>::type stan::math::log1p_exp (const T a)
+
+inline
+
+ +

Calculates the log of 1 plus the exponential of the specified value without overflow.

+

This function is related to other special functions by:

+

log1p_exp(x)

+

= log1p(exp(a))

+

= log(1 + exp(x))

+

= log_sum_exp(0, x).

+

+\[ \mbox{log1p\_exp}(x) = \begin{cases} \ln(1+\exp(x)) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{log1p\_exp}(x)}{\partial x} = \begin{cases} \frac{\exp(x)}{1+\exp(x)} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+ +

Definition at line 44 of file log1p_exp.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::log2 (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 17 of file log2.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
boost::math::tools::promote_args<T>::type stan::math::log2 (const T a)
+
+inline
+
+ +

Returns the base 2 logarithm of the argument (C99).

+

The function is defined by:

+

log2(a) = log(a) / std::log(2.0).

+
Template Parameters
+ + +
Ttype of scalar
+
+
+
Parameters
+ + +
aValue.
+
+
+
Returns
Base 2 logarithm of the value.
+ +

Definition at line 25 of file log2.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
double stan::math::log2 ()
+
+inline
+
+ +

Return natural logarithm of two.

+
Returns
Natural logarithm of two.
+ +

Definition at line 35 of file log2.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::log2 (const stan::math::vara)
+
+inline
+
+ +

Returns the base 2 logarithm of the specified variable (C99).

+

See stan::math::log2() for the double-based version.

+

The derivative is

+

$\frac{d}{dx} \log_2 x = \frac{1}{x \log 2}$.

+

+\[ \mbox{log2}(x) = \begin{cases} \textrm{NaN} & \mbox{if } x < 0 \\ \log_2(x) & \mbox{if } x\geq 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{log2}(x)}{\partial x} = \begin{cases} \textrm{NaN} & \mbox{if } x < 0 \\ \frac{1}{x\ln2} & \mbox{if } x\geq 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
aSpecified variable.
+
+
+
Returns
Base 2 logarithm of the variable.
+ +

Definition at line 53 of file log2.hpp.

+ +
+
+ +
+
+
+template<int R, int C>
+ + + + + +
+ + + + + + + + +
var stan::math::log_determinant (const Eigen::Matrix< var, R, C > & m)
+
+inline
+
+ +

Definition at line 13 of file log_determinant.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
T stan::math::log_determinant (const Eigen::Matrix< T, R, C > & m)
+
+inline
+
+ +

Returns the log absolute determinant of the specified square matrix.

+
Parameters
+ + +
mSpecified matrix.
+
+
+
Returns
log absolute determinant of the matrix.
+
Exceptions
+ + +
std::domain_errorif matrix is not square.
+
+
+ +

Definition at line 18 of file log_determinant.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::log_determinant (const Eigen::Matrix< fvar< T >, R, C > & m)
+
+inline
+
+ +

Definition at line 20 of file log_determinant.hpp.

+ +
+
+ +
+
+
+template<int R, int C, typename T >
+ + + + + +
+ + + + + + + + +
T stan::math::log_determinant_ldlt (stan::math::LDLT_factor< T, R, C > & A)
+
+inline
+
+ +

Definition at line 12 of file log_determinant_ldlt.hpp.

+ +
+
+ +
+
+
+template<int R, int C>
+ + + + + + + + +
var stan::math::log_determinant_ldlt (stan::math::LDLT_factor< var, R, C > & A)
+
+ +

Definition at line 48 of file log_determinant_ldlt.hpp.

+ +
+
+ +
+
+
+template<int R, int C>
+ + + + + +
+ + + + + + + + +
var stan::math::log_determinant_spd (const Eigen::Matrix< var, R, C > & m)
+
+inline
+
+ +

Definition at line 15 of file log_determinant_spd.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
T stan::math::log_determinant_spd (const Eigen::Matrix< T, R, C > & m)
+
+inline
+
+ +

Returns the log absolute determinant of the specified square matrix.

+
Parameters
+ + +
mSpecified matrix.
+
+
+
Returns
log absolute determinant of the matrix.
+
Exceptions
+ + +
std::domain_errorif matrix is not square.
+
+
+ +

Definition at line 19 of file log_determinant_spd.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::log_diff_exp (const fvar< T > & x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 14 of file log_diff_exp.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T2> stan::math::log_diff_exp (const T1 & x1,
const fvar< T2 > & x2 
)
+
+inline
+
+ +

Definition at line 26 of file log_diff_exp.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T1> stan::math::log_diff_exp (const fvar< T1 > & x1,
const T2 & x2 
)
+
+inline
+
+ +

Definition at line 37 of file log_diff_exp.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T1, T2>::type stan::math::log_diff_exp (const T1 x,
const T2 y 
)
+
+inline
+
+ +

The natural logarithm of the difference of the natural exponentiation of x1 and the natural exponentiation of x2.

+

This function is only defined for x<0

+

+\[ \mbox{log\_diff\_exp}(x, y) = \begin{cases} \textrm{NaN} & \mbox{if } x \leq y\\ \ln(\exp(x)-\exp(y)) & \mbox{if } x > y \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{log\_diff\_exp}(x, y)}{\partial x} = \begin{cases} \textrm{NaN} & \mbox{if } x \leq y\\ \frac{\exp(x)}{\exp(x)-\exp(y)} & \mbox{if } x > y \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{log\_diff\_exp}(x, y)}{\partial y} = \begin{cases} \textrm{NaN} & \mbox{if } x \leq y\\ -\frac{\exp(y)}{\exp(x)-\exp(y)} & \mbox{if } x > y \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+ +

Definition at line 50 of file log_diff_exp.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::log_diff_exp (const stan::math::vara,
const stan::math::varb 
)
+
+inline
+
+ +

Returns the log sum of exponentials.

+ +

Definition at line 54 of file log_diff_exp.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::log_diff_exp (const stan::math::vara,
const double & b 
)
+
+inline
+
+ +

Returns the log sum of exponentials.

+ +

Definition at line 61 of file log_diff_exp.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::log_diff_exp (const double & a,
const stan::math::varb 
)
+
+inline
+
+ +

Returns the log sum of exponentials.

+ +

Definition at line 68 of file log_diff_exp.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::log_falling_factorial (const fvar< T > & x,
const fvar< T > & n 
)
+
+inline
+
+ +

Definition at line 15 of file log_falling_factorial.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::log_falling_factorial (const double x,
const fvar< T > & n 
)
+
+inline
+
+ +

Definition at line 25 of file log_falling_factorial.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::log_falling_factorial (const fvar< T > & x,
const double n 
)
+
+inline
+
+ +

Definition at line 35 of file log_falling_factorial.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T1, T2>::type stan::math::log_falling_factorial (const T1 x,
const T2 n 
)
+
+inline
+
+ +

+\[ \mbox{log\_falling\_factorial}(x, n) = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ \ln (x)_n & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +

+

+

+\[ \frac{\partial\, \mbox{log\_falling\_factorial}(x, n)}{\partial x} = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ \Psi(x) & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{log\_falling\_factorial}(x, n)}{\partial n} = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ -\Psi(n) & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +

+ +

Definition at line 41 of file log_falling_factorial.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::log_falling_factorial (const var & a,
const double & b 
)
+
+inline
+
+ +

Definition at line 62 of file log_falling_factorial.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::log_falling_factorial (const var & a,
const var & b 
)
+
+inline
+
+ +

Definition at line 67 of file log_falling_factorial.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::log_falling_factorial (const double & a,
const var & b 
)
+
+inline
+
+ +

Definition at line 72 of file log_falling_factorial.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::log_inv_logit (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 15 of file log_inv_logit.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
boost::math::tools::promote_args<T>::type stan::math::log_inv_logit (const T & u)
+
+inline
+
+ +

Returns the natural logarithm of the inverse logit of the specified argument.

+

+\[ \mbox{log\_inv\_logit}(x) = \begin{cases} \ln\left(\frac{1}{1+\exp(-x)}\right)& \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{log\_inv\_logit}(x)}{\partial x} = \begin{cases} \frac{1}{1+\exp(x)} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Template Parameters
+ + +
TScalar type
+
+
+
Parameters
+ + +
uInput.
+
+
+
Returns
log of the inverse logit of the input.
+ +

Definition at line 36 of file log_inv_logit.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
T stan::math::log_inv_logit_diff (const T & alpha,
const T & beta 
)
+
+inline
+
+ +

Definition at line 26 of file ordered_logistic_log.hpp.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
double stan::math::log_mix (double theta,
double lambda1,
double lambda2 
)
+
+ +

Return the log mixture density with specified mixing proportion and log densities.

+

+\[ \mbox{log\_mix}(\theta, \lambda_1, \lambda_2) = \log \left( \theta \lambda_1 + (1 - \theta) \lambda_2 \right). \] +

+

+\[ \frac{\partial}{\partial \theta} \mbox{log\_mix}(\theta, \lambda_1, \lambda_2) = FIXME \] +

+

+\[ \frac{\partial}{\partial \lambda_1} \mbox{log\_mix}(\theta, \lambda_1, \lambda_2) = FIXME \] +

+

+\[ \frac{\partial}{\partial \lambda_2} \mbox{log\_mix}(\theta, \lambda_1, \lambda_2) = FIXME \] +

+
Parameters
+ + + + +
[in]thetamixing proportion in [0, 1].
lambda1first log density.
lambda2second log density.
+
+
+
Returns
log mixture of densities in specified proportion
+ +

Definition at line 46 of file log_mix.hpp.

+ +
+
+ +
+
+
+template<typename T_theta , typename T_lambda1 , typename T_lambda2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_theta, T_lambda1, T_lambda2>::type stan::math::log_mix (const T_theta & theta,
const T_lambda1 & lambda1,
const T_lambda2 & lambda2 
)
+
+inline
+
+ +

Return the log mixture density with specified mixing proportion and log densities and its derivative at each.

+

+\[ \mbox{log\_mix}(\theta, \lambda_1, \lambda_2) = \log \left( \theta \exp(\lambda_1) + (1 - \theta) \exp(\lambda_2) \right). \] +

+

+\[ \frac{\partial}{\partial \theta} \mbox{log\_mix}(\theta, \lambda_1, \lambda_2) = \dfrac{\exp(\lambda_1) - \exp(\lambda_2)} {\left( \theta \exp(\lambda_1) + (1 - \theta) \exp(\lambda_2) \right)} \] +

+

+\[ \frac{\partial}{\partial \lambda_1} \mbox{log\_mix}(\theta, \lambda_1, \lambda_2) = \dfrac{\theta \exp(\lambda_1)} {\left( \theta \exp(\lambda_1) + (1 - \theta) \exp(\lambda_2) \right)} \] +

+

+\[ \frac{\partial}{\partial \lambda_2} \mbox{log\_mix}(\theta, \lambda_1, \lambda_2) = \dfrac{\theta \exp(\lambda_2)} {\left( \theta \exp(\lambda_1) + (1 - \theta) \exp(\lambda_2) \right)} \] +

+
Template Parameters
+ + + + +
T_thetatheta scalar type.
T_lambda1lambda1 scalar type.
T_lambda2lambda2 scalar type.
+
+
+
Parameters
+ + + + +
[in]thetamixing proportion in [0, 1].
[in]lambda1first log density.
[in]lambda2second log density.
+
+
+
Returns
log mixture of densities in specified proportion
+ +

Definition at line 88 of file log_mix.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::log_mix (const fvar< T > & theta,
const fvar< T > & lambda1,
const fvar< T > & lambda2 
)
+
+inline
+
+ +

Return the log mixture density with specified mixing proportion and log densities and its derivative at each.

+

+\[ \mbox{log\_mix}(\theta, \lambda_1, \lambda_2) = \log \left( \theta \exp(\lambda_1) + (1 - \theta) \exp(\lambda_2) \right). \] +

+

+\[ \frac{\partial}{\partial \theta} \mbox{log\_mix}(\theta, \lambda_1, \lambda_2) = \dfrac{\exp(\lambda_1) - \exp(\lambda_2)} {\left( \theta \exp(\lambda_1) + (1 - \theta) \exp(\lambda_2) \right)} \] +

+

+\[ \frac{\partial}{\partial \lambda_1} \mbox{log\_mix}(\theta, \lambda_1, \lambda_2) = \dfrac{\theta \exp(\lambda_1)} {\left( \theta \exp(\lambda_1) + (1 - \theta) \exp(\lambda_2) \right)} \] +

+

+\[ \frac{\partial}{\partial \lambda_2} \mbox{log\_mix}(\theta, \lambda_1, \lambda_2) = \dfrac{\theta \exp(\lambda_2)} {\left( \theta \exp(\lambda_1) + (1 - \theta) \exp(\lambda_2) \right)} \] +

+
Template Parameters
+ + +
Tscalar type.
+
+
+
Parameters
+ + + + +
[in]thetamixing proportion in [0, 1].
[in]lambda1first log density.
[in]lambda2second log density.
+
+
+
Returns
log mixture of densities in specified proportion
+ +

Definition at line 116 of file log_mix.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::log_mix (const fvar< T > & theta,
const fvar< T > & lambda1,
const double lambda2 
)
+
+inline
+
+ +

Definition at line 142 of file log_mix.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::log_mix (const fvar< T > & theta,
const double lambda1,
const fvar< T > & lambda2 
)
+
+inline
+
+ +

Definition at line 167 of file log_mix.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::log_mix (const double theta,
const fvar< T > & lambda1,
const fvar< T > & lambda2 
)
+
+inline
+
+ +

Definition at line 192 of file log_mix.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::log_mix (const fvar< T > & theta,
const double lambda1,
const double lambda2 
)
+
+inline
+
+ +

Definition at line 216 of file log_mix.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::log_mix (const double theta,
const fvar< T > & lambda1,
const double lambda2 
)
+
+inline
+
+ +

Definition at line 237 of file log_mix.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::log_mix (const double theta,
const double lambda1,
const fvar< T > & lambda2 
)
+
+inline
+
+ +

Definition at line 258 of file log_mix.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::log_mix_partial_helper (const double & theta_val,
const double & lambda1_val,
const double & lambda2_val,
double & one_m_exp_lam2_m_lam1,
double & one_m_t_prod_exp_lam2_m_lam1,
double & one_d_t_plus_one_m_t_prod_exp_lam2_m_lam1 
)
+
+inline
+
+ +

Definition at line 28 of file log_mix.hpp.

+ +
+
+ +
+
+
+template<typename T_theta , typename T_lambda1 , typename T_lambda2 , int N>
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::log_mix_partial_helper (const T_theta & theta,
const T_lambda1 & lambda1,
const T_lambda2 & lambda2,
typename promote_args< T_theta, T_lambda1, T_lambda2 >::type(&) partials_array[N] 
)
+
+inline
+
+ +

Definition at line 31 of file log_mix.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::log_rising_factorial (const fvar< T > & x,
const fvar< T > & n 
)
+
+inline
+
+ +

Definition at line 16 of file log_rising_factorial.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::log_rising_factorial (const fvar< T > & x,
const double n 
)
+
+inline
+
+ +

Definition at line 28 of file log_rising_factorial.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::log_rising_factorial (const double x,
const fvar< T > & n 
)
+
+inline
+
+ +

Definition at line 39 of file log_rising_factorial.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T1, T2>::type stan::math::log_rising_factorial (const T1 x,
const T2 n 
)
+
+inline
+
+ +

+\[ \mbox{log\_rising\_factorial}(x, n) = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ \ln x^{(n)} & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +

+

+

+\[ \frac{\partial\, \mbox{log\_rising\_factorial}(x, n)}{\partial x} = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ \Psi(x+n) - \Psi(x) & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{log\_rising\_factorial}(x, n)}{\partial n} = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ \Psi(x+n) & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +

+ +

Definition at line 41 of file log_rising_factorial.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::log_rising_factorial (const var & a,
const double & b 
)
+
+inline
+
+ +

Definition at line 49 of file log_rising_factorial.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::log_rising_factorial (const var & a,
const var & b 
)
+
+inline
+
+ +

Definition at line 54 of file log_rising_factorial.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::log_rising_factorial (const double & a,
const var & b 
)
+
+inline
+
+ +

Definition at line 59 of file log_rising_factorial.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<fvar<T>, Eigen::Dynamic, 1> stan::math::log_softmax (const Eigen::Matrix< fvar< T >, Eigen::Dynamic, 1 > & alpha)
+
+inline
+
+ +

Definition at line 16 of file log_softmax.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::log_softmax (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & v)
+
+inline
+
+ +

Return the natural logarithm of the softmax of the specified vector.

+

$ \log \mbox{softmax}(y) \ = \ y - \log \sum_{k=1}^K \exp(y_k) \ = \ y - \mbox{log\_sum\_exp}(y). $

+

For the log softmax function, the entries in the Jacobian are $ \frac{\partial}{\partial y_m} \mbox{softmax}(y)[k] = \left\{ \begin{array}{ll} 1 - \mbox{softmax}(y)[m] & \mbox{ if } m = k, \mbox{ and} \\[6pt] \mbox{softmax}(y)[m] & \mbox{ if } m \neq k. \end{array} \right. $

+
Template Parameters
+ + +
TScalar type of values in vector.
+
+
+
Parameters
+ + +
[in]vVector to transform.
+
+
+
Returns
Unit simplex result of the softmax transform of the vector.
+ +

Definition at line 44 of file log_softmax.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<var, Eigen::Dynamic, 1> stan::math::log_softmax (const Eigen::Matrix< var, Eigen::Dynamic, 1 > & alpha)
+
+inline
+
+ +

Return the softmax of the specified Eigen vector.

+

Softmax is guaranteed to return a simplex.

+

The gradient calculations are unfolded.

+
Parameters
+ + +
alphaUnconstrained input vector.
+
+
+
Returns
Softmax of the input.
+
Exceptions
+ + +
std::domain_errorIf the input vector is size 0.
+
+
+ +

Definition at line 61 of file log_softmax.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
fvar<T> stan::math::log_sum_exp (const std::vector< fvar< T > > & v)
+
+ +

Definition at line 14 of file log_sum_exp.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::log_sum_exp (const fvar< T > & x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 15 of file log_sum_exp.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + + + + +
fvar<T> stan::math::log_sum_exp (const Eigen::Matrix< fvar< T >, R, C > & v)
+
+ +

Definition at line 19 of file log_sum_exp.hpp.

+ +
+
+ +
+
+ + + + + + + + +
double stan::math::log_sum_exp (const std::vector< double > & x)
+
+ +

Return the log of the sum of the exponentiated values of the specified sequence of values.

+

The function is defined as follows to prevent overflow in exponential calculations.

+

$\log \sum_{n=1}^N \exp(x_n) = \max(x) + \log \sum_{n=1}^N \exp(x_n - \max(x))$.

+
Parameters
+ + +
[in]xarray of specified values
+
+
+
Returns
The log of the sum of the exponentiated vector values.
+ +

Definition at line 24 of file log_sum_exp.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::log_sum_exp (const double x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 26 of file log_sum_exp.hpp.

+ +
+
+ +
+
+
+template<int R, int C>
+ + + + + + + + +
double stan::math::log_sum_exp (const Eigen::Matrix< double, R, C > & x)
+
+ +

Return the log of the sum of the exponentiated values of the specified matrix of values.

+

The matrix may be a full matrix, a vector, or a row vector.

+

The function is defined as follows to prevent overflow in exponential calculations.

+

$\log \sum_{n=1}^N \exp(x_n) = \max(x) + \log \sum_{n=1}^N \exp(x_n - \max(x))$.

+
Parameters
+ + +
[in]xMatrix of specified values
+
+
+
Returns
The log of the sum of the exponentiated vector values.
+ +

Definition at line 28 of file log_sum_exp.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::log_sum_exp (const fvar< T > & x1,
const double x2 
)
+
+inline
+
+ +

Definition at line 36 of file log_sum_exp.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::log_sum_exp (const std::vector< var > & x)
+
+inline
+
+ +

Returns the log sum of exponentials.

+ +

Definition at line 45 of file log_sum_exp.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T1, T2>::type stan::math::log_sum_exp (const T2 & a,
const T1 & b 
)
+
+inline
+
+ +

Calculates the log sum of exponetials without overflow.

+

$\log (\exp(a) + \exp(b)) = m + \log(\exp(a-m) + \exp(b-m))$,

+

where $m = max(a, b)$.

+

+\[ \mbox{log\_sum\_exp}(x, y) = \begin{cases} \ln(\exp(x)+\exp(y)) & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{log\_sum\_exp}(x, y)}{\partial x} = \begin{cases} \frac{\exp(x)}{\exp(x)+\exp(y)} & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{log\_sum\_exp}(x, y)}{\partial y} = \begin{cases} \frac{\exp(y)}{\exp(x)+\exp(y)} & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + + +
athe first variable
bthe second variable
+
+
+ +

Definition at line 48 of file log_sum_exp.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::log_sum_exp (const stan::math::vara,
const stan::math::varb 
)
+
+inline
+
+ +

Returns the log sum of exponentials.

+ +

Definition at line 50 of file log_sum_exp.hpp.

+ +
+
+ +
+
+
+template<int R, int C>
+ + + + + +
+ + + + + + + + +
var stan::math::log_sum_exp (const Eigen::Matrix< var, R, C > & x)
+
+inline
+
+ +

Returns the log sum of exponentials.

+
Parameters
+ + +
xmatrix
+
+
+ +

Definition at line 54 of file log_sum_exp.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::log_sum_exp (const stan::math::vara,
const double & b 
)
+
+inline
+
+ +

Returns the log sum of exponentials.

+ +

Definition at line 57 of file log_sum_exp.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::log_sum_exp (const double & a,
const stan::math::varb 
)
+
+inline
+
+ +

Returns the log sum of exponentials.

+ +

Definition at line 64 of file log_sum_exp.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int stan::math::logical_and (const T1 x1,
const T2 x2 
)
+
+inline
+
+ +

The logical and function which returns 1 if both arguments are unequal to zero and 0 otherwise.

+

Equivalent to x1 != 0 && x2 != 0.

+

+\[ \mbox{operator\&\&}(x, y) = \begin{cases} 0 & \mbox{if } x = 0 \textrm{ or } y=0 \\ 1 & \mbox{if } x, y \neq 0 \\[6pt] 1 & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+
Template Parameters
+ + + +
T1Type of first argument.
T2Type of second argument.
+
+
+
Parameters
+ + + +
x1First argument
x2Second argument
+
+
+
Returns
true if both x1 and x2 are not equal to 0.
+ +

Definition at line 30 of file logical_and.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int stan::math::logical_eq (const T1 x1,
const T2 x2 
)
+
+inline
+
+ +

Return 1 if the first argument is equal to the second.

+

Equivalent to x1 == x2.

+
Template Parameters
+ + + +
T1Type of first argument.
T2Type of second argument.
+
+
+
Parameters
+ + + +
x1First argument
x2Second argument
+
+
+
Returns
true iff x1 == x2
+ +

Definition at line 19 of file logical_eq.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int stan::math::logical_gt (const T1 x1,
const T2 x2 
)
+
+inline
+
+ +

Return 1 if the first argument is strictly greater than the second.

+

Equivalent to x1 < x2.

+
Template Parameters
+ + + +
T1Type of first argument.
T2Type of second argument.
+
+
+
Parameters
+ + + +
x1First argument
x2Second argument
+
+
+
Returns
true iff x1 > x2
+ +

Definition at line 19 of file logical_gt.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int stan::math::logical_gte (const T1 x1,
const T2 x2 
)
+
+inline
+
+ +

Return 1 if the first argument is greater than or equal to the second.

+

Equivalent to x1 >= x2.

+
Template Parameters
+ + + +
T1Type of first argument.
T2Type of second argument.
+
+
+
Parameters
+ + + +
x1First argument
x2Second argument
+
+
+
Returns
true iff x1 >= x2
+ +

Definition at line 19 of file logical_gte.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int stan::math::logical_lt (T1 x1,
T2 x2 
)
+
+inline
+
+ +

Return 1 if the first argument is strictly less than the second.

+

Equivalent to x1 < x2.

+
Template Parameters
+ + + +
T1Type of first argument.
T2Type of second argument.
+
+
+
Parameters
+ + + +
x1First argument
x2Second argument
+
+
+
Returns
true iff x1 < x2
+ +

Definition at line 20 of file logical_lt.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int stan::math::logical_lte (const T1 x1,
const T2 x2 
)
+
+inline
+
+ +

Return 1 if the first argument is less than or equal to the second.

+

Equivalent to x1 <= x2.

+
Template Parameters
+ + + +
T1Type of first argument.
T2Type of second argument.
+
+
+
Parameters
+ + + +
x1First argument
x2Second argument
+
+
+
Returns
true iff x1 <= x2
+ +

Definition at line 19 of file logical_lte.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
int stan::math::logical_negation (const T x)
+
+inline
+
+ +

The logical negation function which returns 1 if the input is equal to zero and 0 otherwise.

+
Template Parameters
+ + +
TType to compare to zero.
+
+
+
Parameters
+ + +
xValue to compare to zero.
+
+
+
Returns
1 if input is equal to zero.
+ +

Definition at line 17 of file logical_negation.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int stan::math::logical_neq (const T1 x1,
const T2 x2 
)
+
+inline
+
+ +

Return 1 if the first argument is unequal to the second.

+

Equivalent to x1 != x2.

+
Template Parameters
+ + + +
T1Type of first argument.
T2Type of second argument.
+
+
+
Parameters
+ + + +
x1First argument
x2Second argument
+
+
+
Returns
true iff x1 != x2
+ +

Definition at line 19 of file logical_neq.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int stan::math::logical_or (T1 x1,
T2 x2 
)
+
+inline
+
+ +

The logical or function which returns 1 if either argument is unequal to zero and 0 otherwise.

+

Equivalent to x1 != 0 || x2 != 0.

+

+\[ \mbox{operator||}(x, y) = \begin{cases} 0 & \mbox{if } x, y=0 \\ 1 & \mbox{if } x \neq 0 \textrm{ or } y\neq0\\[6pt] 1 & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+
Template Parameters
+ + + +
T1Type of first argument.
T2Type of second argument.
+
+
+
Parameters
+ + + +
x1First argument
x2Second argument
+
+
+
Returns
true if either x1 or x2 is not equal to 0.
+ +

Definition at line 29 of file logical_or.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::logistic_ccdf_log (const T_y & y,
const T_loc & mu,
const T_scale & sigma 
)
+
+ +

Definition at line 31 of file logistic_ccdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::logistic_cdf (const T_y & y,
const T_loc & mu,
const T_scale & sigma 
)
+
+ +

Definition at line 31 of file logistic_cdf.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::logistic_cdf_log (const T_y & y,
const T_loc & mu,
const T_scale & sigma 
)
+
+ +

Definition at line 30 of file logistic_cdf_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::logistic_log (const T_y & y,
const T_loc & mu,
const T_scale & sigma 
)
+
+ +

Definition at line 32 of file logistic_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::logistic_log (const T_y & y,
const T_loc & mu,
const T_scale & sigma 
)
+
+inline
+
+ +

Definition at line 142 of file logistic_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
double stan::math::logistic_rng (const double mu,
const double sigma,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 27 of file logistic_rng.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::logit (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 17 of file logit.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
boost::math::tools::promote_args<T>::type stan::math::logit (const T a)
+
+inline
+
+ +

Returns the logit function applied to the argument.

+

The logit function is defined as for $x \in [0, 1]$ by returning the log odds of $x$ treated as a probability,

+

$\mbox{logit}(x) = \log \left( \frac{x}{1 - x} \right)$.

+

The inverse to this function is stan::math::inv_logit.

+

+\[ \mbox{logit}(x) = \begin{cases} \textrm{NaN}& \mbox{if } x < 0 \textrm{ or } x > 1\\ \ln\frac{x}{1-x} & \mbox{if } 0\leq x \leq 1 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{logit}(x)}{\partial x} = \begin{cases} \textrm{NaN}& \mbox{if } x < 0 \textrm{ or } x > 1\\ \frac{1}{x-x^2}& \mbox{if } 0\leq x\leq 1 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
aArgument.
+
+
+
Returns
Logit of the argument.
+ +

Definition at line 44 of file logit.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::lognormal_ccdf_log (const T_y & y,
const T_loc & mu,
const T_scale & sigma 
)
+
+ +

Definition at line 23 of file lognormal_ccdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::lognormal_cdf (const T_y & y,
const T_loc & mu,
const T_scale & sigma 
)
+
+ +

Definition at line 23 of file lognormal_cdf.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::lognormal_cdf_log (const T_y & y,
const T_loc & mu,
const T_scale & sigma 
)
+
+ +

Definition at line 23 of file lognormal_cdf_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::lognormal_log (const T_y & y,
const T_loc & mu,
const T_scale & sigma 
)
+
+ +

Definition at line 33 of file lognormal_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::lognormal_log (const T_y & y,
const T_loc & mu,
const T_scale & sigma 
)
+
+inline
+
+ +

Definition at line 158 of file lognormal_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
double stan::math::lognormal_rng (const double mu,
const double sigma,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 22 of file lognormal_rng.hpp.

+ +
+
+ +
+
+
+template<typename T , typename TL , typename TU >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T, TL, TU>::type stan::math::lub_constrain (const T x,
TL lb,
TU ub 
)
+
+inline
+
+ +

Return the lower- and upper-bounded scalar derived by transforming the specified free scalar given the specified lower and upper bounds.

+

The transform is the transformed and scaled inverse logit,

+

$f(x) = L + (U - L) \mbox{logit}^{-1}(x)$

+

If the lower bound is negative infinity and upper bound finite, this function reduces to ub_constrain(x, ub). If the upper bound is positive infinity and the lower bound finite, this function reduces to lb_constrain(x, lb). If the upper bound is positive infinity and the lower bound negative infinity, this function reduces to identity_constrain(x).

+
Parameters
+ + + + +
xFree scalar to transform.
lbLower bound.
ubUpper bound.
+
+
+
Returns
Lower- and upper-bounded scalar derived from transforming the free scalar.
+
Template Parameters
+ + + + +
TType of scalar.
TLType of lower bound.
TUType of upper bound.
+
+
+
Exceptions
+ + +
std::domain_errorif ub <= lb
+
+
+ +

Definition at line 44 of file lub_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T , typename TL , typename TU >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T, TL, TU>::type stan::math::lub_constrain (const T x,
const TL lb,
const TU ub,
T & lp 
)
+
+ +

Return the lower- and upper-bounded scalar derived by transforming the specified free scalar given the specified lower and upper bounds and increment the specified log probability with the log absolute Jacobian determinant.

+

The transform is as defined in lub_constrain(T, double, double). The log absolute Jacobian determinant is given by

+

$\log \left| \frac{d}{dx} \left( L + (U-L) \mbox{logit}^{-1}(x) \right) \right|$

+

$ {} = \log | (U-L) \, (\mbox{logit}^{-1}(x)) \, (1 - \mbox{logit}^{-1}(x)) |$

+

$ {} = \log (U - L) + \log (\mbox{logit}^{-1}(x)) + \log (1 - \mbox{logit}^{-1}(x))$

+

If the lower bound is negative infinity and upper bound finite, this function reduces to ub_constrain(x, ub, lp). If the upper bound is positive infinity and the lower bound finite, this function reduces to lb_constrain(x, lb, lp). If the upper bound is positive infinity and the lower bound negative infinity, this function reduces to identity_constrain(x, lp).

+
Parameters
+ + + + + +
xFree scalar to transform.
lbLower bound.
ubUpper bound.
lpLog probability scalar reference.
+
+
+
Returns
Lower- and upper-bounded scalar derived from transforming the free scalar.
+
Template Parameters
+ + + + +
TType of scalar.
TLType of lower bound.
TUType of upper bound.
+
+
+
Exceptions
+ + +
std::domain_errorif ub <= lb
+
+
+ +

Definition at line 114 of file lub_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T , typename TL , typename TU >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T, TL, TU>::type stan::math::lub_free (const T y,
TL lb,
TU ub 
)
+
+inline
+
+ +

Return the unconstrained scalar that transforms to the specified lower- and upper-bounded scalar given the specified bounds.

+

The transfrom in lub_constrain(T, double, double), is reversed by a transformed and scaled logit,

+

$f^{-1}(y) = \mbox{logit}(\frac{y - L}{U - L})$

+

where $U$ and $L$ are the lower and upper bounds.

+

If the lower bound is negative infinity and upper bound finite, this function reduces to ub_free(y, ub). If the upper bound is positive infinity and the lower bound finite, this function reduces to lb_free(x, lb). If the upper bound is positive infinity and the lower bound negative infinity, this function reduces to identity_free(y).

+
Template Parameters
+ + +
TType of scalar.
+
+
+
Parameters
+ + + + +
yScalar input.
lbLower bound.
ubUpper bound.
+
+
+
Returns
The free scalar that transforms to the input scalar given the bounds.
+
Exceptions
+ + +
std::invalid_argumentif the lower bound is greater than the upper bound, y is less than the lower bound, or y is greater than the upper bound
+
+
+ +

Definition at line 47 of file lub_free.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
double stan::math::machine_precision ()
+
+inline
+
+ +

Returns the difference between 1.0 and the next value representable.

+
Returns
Minimum positive number.
+ +

Definition at line 151 of file constants.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + +
const Eigen::Array<T, Eigen::Dynamic, 1> stan::math::make_nu (const T eta,
const size_t K 
)
+
+ +

This function calculates the degrees of freedom for the t distribution that corresponds to the shape parameter in the Lewandowski et.

+

al. distribution

+
Parameters
+ + + +
etahyperparameter on (0, inf), eta = 1 <-> correlation matrix is uniform
Knumber of variables in covariance matrix
+
+
+ +

Definition at line 22 of file make_nu.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_Mu , typename T_Sigma , typename T_D >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_y, T_Mu, T_Sigma, T_D>::type stan::math::matrix_normal_prec_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > & y,
const Eigen::Matrix< T_Mu, Eigen::Dynamic, Eigen::Dynamic > & Mu,
const Eigen::Matrix< T_Sigma, Eigen::Dynamic, Eigen::Dynamic > & Sigma,
const Eigen::Matrix< T_D, Eigen::Dynamic, Eigen::Dynamic > & D 
)
+
+ +

The log of the matrix normal density for the given y, mu, Sigma and D where Sigma and D are given as precision matrices, not covariance matrices.

+
Parameters
+ + + + + +
yAn mxn matrix.
MuThe mean matrix.
SigmaThe mxm inverse covariance matrix (i.e., the precision matrix) of the rows of y.
DThe nxn inverse covariance matrix (i.e., the precision matrix) of the columns of y.
+
+
+
Returns
The log of the matrix normal density.
+
Exceptions
+ + +
std::domain_errorif Sigma or D are not square, not symmetric, or not semi-positive definite.
+
+
+
Template Parameters
+ + + + + +
T_yType of scalar.
T_MuType of location.
T_SigmaType of Sigma.
T_DType of D.
+
+
+ +

Definition at line 43 of file matrix_normal_prec_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_Mu , typename T_Sigma , typename T_D >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_y, T_Mu, T_Sigma, T_D>::type stan::math::matrix_normal_prec_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > & y,
const Eigen::Matrix< T_Mu, Eigen::Dynamic, Eigen::Dynamic > & Mu,
const Eigen::Matrix< T_Sigma, Eigen::Dynamic, Eigen::Dynamic > & Sigma,
const Eigen::Matrix< T_D, Eigen::Dynamic, Eigen::Dynamic > & D 
)
+
+ +

Definition at line 112 of file matrix_normal_prec_log.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
int stan::math::max (const std::vector< int > & x)
+
+inline
+
+ +

Returns the maximum coefficient in the specified column vector.

+
Parameters
+ + +
xSpecified vector.
+
+
+
Returns
Maximum coefficient value in the vector.
+
Template Parameters
+ + +
Typeof values being compared and returned
+
+
+
Exceptions
+ + +
std::domain_errorIf the size of the vector is zero.
+
+
+ +

Definition at line 21 of file max.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
T stan::math::max (const std::vector< T > & x)
+
+inline
+
+ +

Returns the maximum coefficient in the specified column vector.

+
Parameters
+ + +
xSpecified vector.
+
+
+
Returns
Maximum coefficient value in the vector.
+
Template Parameters
+ + +
TType of values being compared and returned
+
+
+ +

Definition at line 39 of file max.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
T stan::math::max (const Eigen::Matrix< T, R, C > & m)
+
+inline
+
+ +

Returns the maximum coefficient in the specified vector, row vector, or matrix.

+
Parameters
+ + +
mSpecified vector, row vector, or matrix.
+
+
+
Returns
Maximum coefficient value in the vector.
+ +

Definition at line 56 of file max.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R1, C2> stan::math::mdivide_left (const Eigen::Matrix< fvar< T >, R1, C1 > & A,
const Eigen::Matrix< fvar< T >, R2, C2 > & b 
)
+
+inline
+
+ +

Definition at line 24 of file mdivide_left.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R1, C2> stan::math::mdivide_left (const Eigen::Matrix< T1, R1, C1 > & A,
const Eigen::Matrix< T2, R2, C2 > & b 
)
+
+inline
+
+ +

Returns the solution of the system Ax=b.

+
Parameters
+ + + +
AMatrix.
bRight hand side matrix or vector.
+
+
+
Returns
x = A^-1 b, solution of the linear system.
+
Exceptions
+ + +
std::domain_errorif A is not square or the rows of b don't match the size of A.
+
+
+ +

Definition at line 25 of file mdivide_left.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R1, C2> stan::math::mdivide_left (const Eigen::Matrix< double, R1, C1 > & A,
const Eigen::Matrix< fvar< T >, R2, C2 > & b 
)
+
+inline
+
+ +

Definition at line 68 of file mdivide_left.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R1, C2> stan::math::mdivide_left (const Eigen::Matrix< fvar< T >, R1, C1 > & A,
const Eigen::Matrix< double, R2, C2 > & b 
)
+
+inline
+
+ +

Definition at line 94 of file mdivide_left.hpp.

+ +
+
+ +
+
+
+template<int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<var, R1, C2> stan::math::mdivide_left (const Eigen::Matrix< var, R1, C1 > & A,
const Eigen::Matrix< var, R2, C2 > & b 
)
+
+inline
+
+ +

Definition at line 274 of file mdivide_left.hpp.

+ +
+
+ +
+
+
+template<int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<var, R1, C2> stan::math::mdivide_left (const Eigen::Matrix< var, R1, C1 > & A,
const Eigen::Matrix< double, R2, C2 > & b 
)
+
+inline
+
+ +

Definition at line 301 of file mdivide_left.hpp.

+ +
+
+ +
+
+
+template<int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<var, R1, C2> stan::math::mdivide_left (const Eigen::Matrix< double, R1, C1 > & A,
const Eigen::Matrix< var, R2, C2 > & b 
)
+
+inline
+
+ +

Definition at line 328 of file mdivide_left.hpp.

+ +
+
+ +
+
+
+template<int R1, int C1, int R2, int C2, typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T2>, R1, C2> stan::math::mdivide_left_ldlt (const stan::math::LDLT_factor< double, R1, C1 > & A,
const Eigen::Matrix< fvar< T2 >, R2, C2 > & b 
)
+
+inline
+
+ +

Returns the solution of the system Ax=b given an LDLT_factor of A.

+
Parameters
+ + + +
ALDLT_factor
bRight hand side matrix or vector.
+
+
+
Returns
x = b A^-1, solution of the linear system.
+
Exceptions
+ + +
std::domain_errorif rows of b don't match the size of A.
+
+
+ +

Definition at line 25 of file mdivide_left_ldlt.hpp.

+ +
+
+ +
+
+
+template<int R1, int C1, int R2, int C2, typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R1, C2> stan::math::mdivide_left_ldlt (const stan::math::LDLT_factor< T1, R1, C1 > & A,
const Eigen::Matrix< T2, R2, C2 > & b 
)
+
+inline
+
+ +

Returns the solution of the system Ax=b given an LDLT_factor of A.

+
Parameters
+ + + +
ALDLT_factor
bRight hand side matrix or vector.
+
+
+
Returns
x = b A^-1, solution of the linear system.
+
Exceptions
+ + +
std::domain_errorif rows of b don't match the size of A.
+
+
+ +

Definition at line 26 of file mdivide_left_ldlt.hpp.

+ +
+
+ +
+
+
+template<int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<var, R1, C2> stan::math::mdivide_left_ldlt (const stan::math::LDLT_factor< var, R1, C1 > & A,
const Eigen::Matrix< var, R2, C2 > & b 
)
+
+inline
+
+ +

Returns the solution of the system Ax=b given an LDLT_factor of A.

+
Parameters
+ + + +
ALDLT_factor
bRight hand side matrix or vector.
+
+
+
Returns
x = b A^-1, solution of the linear system.
+
Exceptions
+ + +
std::domain_errorif rows of b don't match the size of A.
+
+
+ +

Definition at line 246 of file mdivide_left_ldlt.hpp.

+ +
+
+ +
+
+
+template<int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<var, R1, C2> stan::math::mdivide_left_ldlt (const stan::math::LDLT_factor< var, R1, C1 > & A,
const Eigen::Matrix< double, R2, C2 > & b 
)
+
+inline
+
+ +

Returns the solution of the system Ax=b given an LDLT_factor of A.

+
Parameters
+ + + +
ALDLT_factor
bRight hand side matrix or vector.
+
+
+
Returns
x = b A^-1, solution of the linear system.
+
Exceptions
+ + +
std::domain_errorif rows of b don't match the size of A.
+
+
+ +

Definition at line 274 of file mdivide_left_ldlt.hpp.

+ +
+
+ +
+
+
+template<int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<var, R1, C2> stan::math::mdivide_left_ldlt (const stan::math::LDLT_factor< double, R1, C1 > & A,
const Eigen::Matrix< var, R2, C2 > & b 
)
+
+inline
+
+ +

Returns the solution of the system Ax=b given an LDLT_factor of A.

+
Parameters
+ + + +
ALDLT_factor
bRight hand side matrix or vector.
+
+
+
Returns
x = b A^-1, solution of the linear system.
+
Exceptions
+ + +
std::domain_errorif rows of b don't match the size of A.
+
+
+ +

Definition at line 302 of file mdivide_left_ldlt.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R1, C2> stan::math::mdivide_left_spd (const Eigen::Matrix< T1, R1, C1 > & A,
const Eigen::Matrix< T2, R2, C2 > & b 
)
+
+inline
+
+ +

Returns the solution of the system Ax=b where A is symmetric positive definite.

+
Parameters
+ + + +
AMatrix.
bRight hand side matrix or vector.
+
+
+
Returns
x = A^-1 b, solution of the linear system.
+
Exceptions
+ + +
std::domain_errorif A is not square or the rows of b don't match the size of A.
+
+
+ +

Definition at line 28 of file mdivide_left_spd.hpp.

+ +
+
+ +
+
+
+template<int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<var, R1, C2> stan::math::mdivide_left_spd (const Eigen::Matrix< var, R1, C1 > & A,
const Eigen::Matrix< var, R2, C2 > & b 
)
+
+inline
+
+ +

Definition at line 248 of file mdivide_left_spd.hpp.

+ +
+
+ +
+
+
+template<int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<var, R1, C2> stan::math::mdivide_left_spd (const Eigen::Matrix< var, R1, C1 > & A,
const Eigen::Matrix< double, R2, C2 > & b 
)
+
+inline
+
+ +

Definition at line 275 of file mdivide_left_spd.hpp.

+ +
+
+ +
+
+
+template<int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<var, R1, C2> stan::math::mdivide_left_spd (const Eigen::Matrix< double, R1, C1 > & A,
const Eigen::Matrix< var, R2, C2 > & b 
)
+
+inline
+
+ +

Definition at line 302 of file mdivide_left_spd.hpp.

+ +
+
+ +
+
+
+template<int TriView, typename T1 , typename T2 , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R1, C2> stan::math::mdivide_left_tri (const Eigen::Matrix< T1, R1, C1 > & A,
const Eigen::Matrix< T2, R2, C2 > & b 
)
+
+inline
+
+ +

Returns the solution of the system Ax=b when A is triangular.

+
Parameters
+ + + +
ATriangular matrix. Specify upper or lower with TriView being Eigen::Upper or Eigen::Lower.
bRight hand side matrix or vector.
+
+
+
Returns
x = A^-1 b, solution of the linear system.
+
Exceptions
+ + +
std::domain_errorif A is not square or the rows of b don't match the size of A.
+
+
+ +

Definition at line 27 of file mdivide_left_tri.hpp.

+ +
+
+ +
+
+
+template<int TriView, typename T , int R1, int C1>
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<T, R1, C1> stan::math::mdivide_left_tri (const Eigen::Matrix< T, R1, C1 > & A)
+
+inline
+
+ +

Returns the solution of the system Ax=b when A is triangular and b=I.

+
Parameters
+ + +
ATriangular matrix. Specify upper or lower with TriView being Eigen::Upper or Eigen::Lower.
+
+
+
Returns
x = A^-1 .
+
Exceptions
+ + +
std::domain_errorif A is not square
+
+
+ +

Definition at line 50 of file mdivide_left_tri.hpp.

+ +
+
+ +
+
+
+template<int TriView, int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<var, R1, C2> stan::math::mdivide_left_tri (const Eigen::Matrix< var, R1, C1 > & A,
const Eigen::Matrix< var, R2, C2 > & b 
)
+
+inline
+
+ +

Definition at line 304 of file mdivide_left_tri.hpp.

+ +
+
+ +
+
+
+template<int TriView, int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<var, R1, C2> stan::math::mdivide_left_tri (const Eigen::Matrix< double, R1, C1 > & A,
const Eigen::Matrix< var, R2, C2 > & b 
)
+
+inline
+
+ +

Definition at line 330 of file mdivide_left_tri.hpp.

+ +
+
+ +
+
+
+template<int TriView, int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<var, R1, C2> stan::math::mdivide_left_tri (const Eigen::Matrix< var, R1, C1 > & A,
const Eigen::Matrix< double, R2, C2 > & b 
)
+
+inline
+
+ +

Definition at line 356 of file mdivide_left_tri.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R1, C2> stan::math::mdivide_left_tri_low (const Eigen::Matrix< T1, R1, C1 > & A,
const Eigen::Matrix< T2, R2, C2 > & b 
)
+
+inline
+
+ +

Definition at line 16 of file mdivide_left_tri_low.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R1, C1> stan::math::mdivide_left_tri_low (const Eigen::Matrix< fvar< T >, R1, C1 > & A,
const Eigen::Matrix< fvar< T >, R2, C2 > & b 
)
+
+inline
+
+ +

Definition at line 22 of file mdivide_left_tri_low.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1>
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<T, R1, C1> stan::math::mdivide_left_tri_low (const Eigen::Matrix< T, R1, C1 > & A)
+
+inline
+
+ +

Definition at line 32 of file mdivide_left_tri_low.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R1, C1> stan::math::mdivide_left_tri_low (const Eigen::Matrix< double, R1, C1 > & A,
const Eigen::Matrix< fvar< T >, R2, C2 > & b 
)
+
+inline
+
+ +

Definition at line 68 of file mdivide_left_tri_low.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R1, C1> stan::math::mdivide_left_tri_low (const Eigen::Matrix< fvar< T >, R1, C1 > & A,
const Eigen::Matrix< double, R2, C2 > & b 
)
+
+inline
+
+ +

Definition at line 109 of file mdivide_left_tri_low.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R1, C2> stan::math::mdivide_right (const Eigen::Matrix< fvar< T >, R1, C1 > & A,
const Eigen::Matrix< fvar< T >, R2, C2 > & b 
)
+
+inline
+
+ +

Definition at line 24 of file mdivide_right.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R1, C2> stan::math::mdivide_right (const Eigen::Matrix< T1, R1, C1 > & b,
const Eigen::Matrix< T2, R2, C2 > & A 
)
+
+inline
+
+ +

Returns the solution of the system Ax=b.

+
Parameters
+ + + +
AMatrix.
bRight hand side matrix or vector.
+
+
+
Returns
x = b A^-1, solution of the linear system.
+
Exceptions
+ + +
std::domain_errorif A is not square or the rows of b don't match the size of A.
+
+
+ +

Definition at line 26 of file mdivide_right.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R1, C2> stan::math::mdivide_right (const Eigen::Matrix< fvar< T >, R1, C1 > & A,
const Eigen::Matrix< double, R2, C2 > & b 
)
+
+inline
+
+ +

Definition at line 68 of file mdivide_right.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R1, C2> stan::math::mdivide_right (const Eigen::Matrix< double, R1, C1 > & A,
const Eigen::Matrix< fvar< T >, R2, C2 > & b 
)
+
+inline
+
+ +

Definition at line 95 of file mdivide_right.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R1, C2> stan::math::mdivide_right_ldlt (const Eigen::Matrix< T1, R1, C1 > & b,
const stan::math::LDLT_factor< T2, R2, C2 > & A 
)
+
+inline
+
+ +

Returns the solution of the system xA=b given an LDLT_factor of A.

+
Parameters
+ + + +
ALDLT_factor
bRight hand side matrix or vector.
+
+
+
Returns
x = A^-1 b, solution of the linear system.
+
Exceptions
+ + +
std::domain_errorif rows of b don't match the size of A.
+
+
+ +

Definition at line 26 of file mdivide_right_ldlt.hpp.

+ +
+
+ +
+
+
+template<int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<double, R1, C2> stan::math::mdivide_right_ldlt (const Eigen::Matrix< double, R1, C1 > & b,
const stan::math::LDLT_factor< double, R2, C2 > & A 
)
+
+inline
+
+ +

Definition at line 38 of file mdivide_right_ldlt.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R1, C2> stan::math::mdivide_right_spd (const Eigen::Matrix< T1, R1, C1 > & b,
const Eigen::Matrix< T2, R2, C2 > & A 
)
+
+inline
+
+ +

Returns the solution of the system Ax=b where A is symmetric positive definite.

+
Parameters
+ + + +
AMatrix.
bRight hand side matrix or vector.
+
+
+
Returns
x = b A^-1, solution of the linear system.
+
Exceptions
+ + +
std::domain_errorif A is not square or the rows of b don't match the size of A.
+
+
+ +

Definition at line 29 of file mdivide_right_spd.hpp.

+ +
+
+ +
+
+
+template<int TriView, typename T1 , typename T2 , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R1, C2> stan::math::mdivide_right_tri (const Eigen::Matrix< T1, R1, C1 > & b,
const Eigen::Matrix< T2, R2, C2 > & A 
)
+
+inline
+
+ +

Returns the solution of the system Ax=b when A is triangular.

+
Parameters
+ + + +
ATriangular matrix. Specify upper or lower with TriView being Eigen::Upper or Eigen::Lower.
bRight hand side matrix or vector.
+
+
+
Returns
x = b A^-1, solution of the linear system.
+
Exceptions
+ + +
std::domain_errorif A is not square or the rows of b don't match the size of A.
+
+
+ +

Definition at line 29 of file mdivide_right_tri.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R1, C1> stan::math::mdivide_right_tri_low (const Eigen::Matrix< fvar< T >, R1, C1 > & A,
const Eigen::Matrix< fvar< T >, R2, C2 > & b 
)
+
+inline
+
+ +

Definition at line 22 of file mdivide_right_tri_low.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R1, C2> stan::math::mdivide_right_tri_low (const Eigen::Matrix< T1, R1, C1 > & b,
const Eigen::Matrix< T2, R2, C2 > & A 
)
+
+inline
+
+ +

Returns the solution of the system tri(A)x=b when tri(A) is a lower triangular view of the matrix A.

+
Parameters
+ + + +
AMatrix.
bRight hand side matrix or vector.
+
+
+
Returns
x = b * tri(A)^-1, solution of the linear system.
+
Exceptions
+ + +
std::domain_errorif A is not square or the rows of b don't match the size of A.
+
+
+ +

Definition at line 25 of file mdivide_right_tri_low.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R1, C2> stan::math::mdivide_right_tri_low (const Eigen::Matrix< fvar< T >, R1, C1 > & A,
const Eigen::Matrix< double, R2, C2 > & b 
)
+
+inline
+
+ +

Definition at line 68 of file mdivide_right_tri_low.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R1, C2> stan::math::mdivide_right_tri_low (const Eigen::Matrix< double, R1, C1 > & A,
const Eigen::Matrix< fvar< T >, R2, C2 > & b 
)
+
+inline
+
+ +

Definition at line 103 of file mdivide_right_tri_low.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
boost::math::tools::promote_args<T>::type stan::math::mean (const std::vector< T > & v)
+
+inline
+
+ +

Returns the sample mean (i.e., average) of the coefficients in the specified standard vector.

+
Parameters
+ + +
vSpecified vector.
+
+
+
Returns
Sample mean of vector coefficients.
+
Exceptions
+ + +
std::domain_errorif the size of the vector is less than 1.
+
+
+ +

Definition at line 23 of file mean.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
boost::math::tools::promote_args<T>::type stan::math::mean (const Eigen::Matrix< T, R, C > & m)
+
+inline
+
+ +

Returns the sample mean (i.e., average) of the coefficients in the specified vector, row vector, or matrix.

+
Parameters
+ + +
mSpecified vector, row vector, or matrix.
+
+
+
Returns
Sample mean of vector coefficients.
+ +

Definition at line 40 of file mean.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
int stan::math::min (const std::vector< int > & x)
+
+inline
+
+ +

Returns the minimum coefficient in the specified column vector.

+
Parameters
+ + +
xSpecified vector.
+
+
+
Returns
Minimum coefficient value in the vector.
+
Template Parameters
+ + +
Typeof values being compared and returned
+
+
+ +

Definition at line 20 of file min.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
T stan::math::min (const std::vector< T > & x)
+
+inline
+
+ +

Returns the minimum coefficient in the specified column vector.

+
Parameters
+ + +
xSpecified vector.
+
+
+
Returns
Minimum coefficient value in the vector.
+
Template Parameters
+ + +
Typeof values being compared and returned
+
+
+ +

Definition at line 38 of file min.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
T stan::math::min (const Eigen::Matrix< T, R, C > & m)
+
+inline
+
+ +

Returns the minimum coefficient in the specified matrix, vector, or row vector.

+
Parameters
+ + +
mSpecified matrix, vector, or row vector.
+
+
+
Returns
Minimum coefficient value in the vector.
+ +

Definition at line 55 of file min.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
T stan::math::minus (const T & x)
+
+inline
+
+ +

Returns the negation of the specified scalar or matrix.

+
Template Parameters
+ + +
TType of subtrahend.
+
+
+
Parameters
+ + +
xSubtrahend.
+
+
+
Returns
Negation of subtrahend.
+ +

Definition at line 16 of file minus.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::modified_bessel_first_kind (int v,
const fvar< T > & z 
)
+
+inline
+
+ +

Definition at line 15 of file modified_bessel_first_kind.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::modified_bessel_first_kind (const int & v,
const var & a 
)
+
+inline
+
+ +

Definition at line 27 of file modified_bessel_first_kind.hpp.

+ +
+
+ +
+
+
+template<typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
T2 stan::math::modified_bessel_first_kind (const int v,
const T2 z 
)
+
+inline
+
+ +

+\[ \mbox{modified\_bessel\_first\_kind}(v, z) = \begin{cases} I_v(z) & \mbox{if } -\infty\leq z \leq \infty \\[6pt] \textrm{error} & \mbox{if } z = \textrm{NaN} \end{cases} \] +

+

+

+\[ \frac{\partial\, \mbox{modified\_bessel\_first\_kind}(v, z)}{\partial z} = \begin{cases} \frac{\partial\, I_v(z)}{\partial z} & \mbox{if } -\infty\leq z\leq \infty \\[6pt] \textrm{error} & \mbox{if } z = \textrm{NaN} \end{cases} \] +

+

+\[ {I_v}(z) = \left(\frac{1}{2}z\right)^v\sum_{k=0}^\infty \frac{\left(\frac{1}{4}z^2\right)^k}{k!\Gamma(v+k+1)} \] +

+

+\[ \frac{\partial \, I_v(z)}{\partial z} = I_{v-1}(z)-\frac{v}{z}I_v(z) \] +

+ +

Definition at line 39 of file modified_bessel_first_kind.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::modified_bessel_second_kind (int v,
const fvar< T > & z 
)
+
+inline
+
+ +

Definition at line 15 of file modified_bessel_second_kind.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::modified_bessel_second_kind (const int & v,
const var & a 
)
+
+inline
+
+ +

Definition at line 27 of file modified_bessel_second_kind.hpp.

+ +
+
+ +
+
+
+template<typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
T2 stan::math::modified_bessel_second_kind (const int v,
const T2 z 
)
+
+inline
+
+ +

+\[ \mbox{modified\_bessel\_second\_kind}(v, z) = \begin{cases} \textrm{error} & \mbox{if } z \leq 0 \\ K_v(z) & \mbox{if } z > 0 \\[6pt] \textrm{NaN} & \mbox{if } z = \textrm{NaN} \end{cases} \] +

+

+

+\[ \frac{\partial\, \mbox{modified\_bessel\_second\_kind}(v, z)}{\partial z} = \begin{cases} \textrm{error} & \mbox{if } z \leq 0 \\ \frac{\partial\, K_v(z)}{\partial z} & \mbox{if } z > 0 \\[6pt] \textrm{NaN} & \mbox{if } z = \textrm{NaN} \end{cases} \] +

+

+\[ {K_v}(z) = \frac{\pi}{2}\cdot\frac{I_{-v}(z) - I_{v}(z)}{\sin(v\pi)} \] +

+

+\[ \frac{\partial \, K_v(z)}{\partial z} = -\frac{v}{z}K_v(z)-K_{v-1}(z) \] +

+ +

Definition at line 42 of file modified_bessel_second_kind.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int stan::math::modulus (const int x,
const int y 
)
+
+inline
+
+ +

Definition at line 10 of file modulus.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_covar , typename T_w >
+ + + + + + + + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_y, T_covar, T_w>::type stan::math::multi_gp_cholesky_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > & y,
const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > & L,
const Eigen::Matrix< T_w, Eigen::Dynamic, 1 > & w 
)
+
+ +

The log of a multivariate Gaussian Process for the given y, w, and a Cholesky factor L of the kernel matrix Sigma.

+

Sigma = LL', a square, semi-positive definite matrix.. y is a dxN matrix, where each column is a different observation and each row is a different output dimension. The Gaussian Process is assumed to have a scaled kernel matrix with a different scale for each output dimension. This distribution is equivalent to: for (i in 1:d) row(y, i) ~ multi_normal(0, (1/w[i])*LL').

+
Parameters
+ + + + +
yA dxN matrix
LThe Cholesky decomposition of a kernel matrix
wA d-dimensional vector of positve inverse scale parameters for each output.
+
+
+
Returns
The log of the multivariate GP density.
+
Exceptions
+ + +
std::domain_errorif Sigma is not square, not symmetric, or not semi-positive definite.
+
+
+
Template Parameters
+ + + + +
T_yType of scalar.
T_covarType of kernel.
T_wType of weight.
+
+
+ +

Definition at line 43 of file multi_gp_cholesky_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_covar , typename T_w >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_y, T_covar, T_w>::type stan::math::multi_gp_cholesky_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > & y,
const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > & L,
const Eigen::Matrix< T_w, Eigen::Dynamic, 1 > & w 
)
+
+inline
+
+ +

Definition at line 106 of file multi_gp_cholesky_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_covar , typename T_w >
+ + + + + + + + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_y, T_covar, T_w>::type stan::math::multi_gp_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > & y,
const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > & Sigma,
const Eigen::Matrix< T_w, Eigen::Dynamic, 1 > & w 
)
+
+ +

The log of a multivariate Gaussian Process for the given y, Sigma, and w.

+

y is a dxN matrix, where each column is a different observation and each row is a different output dimension. The Gaussian Process is assumed to have a scaled kernel matrix with a different scale for each output dimension. This distribution is equivalent to: for (i in 1:d) row(y, i) ~ multi_normal(0, (1/w[i])*Sigma).

+
Parameters
+ + + + +
yA dxN matrix
SigmaThe NxN kernel matrix
wA d-dimensional vector of positve inverse scale parameters for each output.
+
+
+
Returns
The log of the multivariate GP density.
+
Exceptions
+ + +
std::domain_errorif Sigma is not square, not symmetric, or not semi-positive definite.
+
+
+
Template Parameters
+ + + + +
T_yType of scalar.
T_covarType of kernel.
T_wType of weight.
+
+
+ +

Definition at line 45 of file multi_gp_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_covar , typename T_w >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_y, T_covar, T_w>::type stan::math::multi_gp_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > & y,
const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > & Sigma,
const Eigen::Matrix< T_w, Eigen::Dynamic, 1 > & w 
)
+
+inline
+
+ +

Definition at line 112 of file multi_gp_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_loc , typename T_covar >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_covar>::type stan::math::multi_normal_cholesky_log (const T_y & y,
const T_loc & mu,
const T_covar & L 
)
+
+ +

The log of the multivariate normal density for the given y, mu, and a Cholesky factor L of the variance matrix.

+

Sigma = LL', a square, semi-positive definite matrix.

+
Parameters
+ + + + +
yA scalar vector
muThe mean vector of the multivariate normal distribution.
LThe Cholesky decomposition of a variance matrix of the multivariate normal distribution
+
+
+
Returns
The log of the multivariate normal density.
+
Exceptions
+ + +
std::domain_errorif LL' is not square, not symmetric, or not semi-positive definite.
+
+
+
Template Parameters
+ + + + +
T_yType of scalar.
T_locType of location.
T_covarType of scale.
+
+
+ +

Definition at line 50 of file multi_normal_cholesky_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_covar >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_covar>::type stan::math::multi_normal_cholesky_log (const T_y & y,
const T_loc & mu,
const T_covar & L 
)
+
+inline
+
+ +

Definition at line 156 of file multi_normal_cholesky_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
Eigen::VectorXd stan::math::multi_normal_cholesky_rng (const Eigen::Matrix< double, Dynamic, 1 > & mu,
const Eigen::Matrix< double, Dynamic, Dynamic > & S,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 31 of file multi_normal_cholesky_rng.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_loc , typename T_covar >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_covar>::type stan::math::multi_normal_log (const T_y & y,
const T_loc & mu,
const T_covar & Sigma 
)
+
+ +

Definition at line 28 of file multi_normal_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_covar >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_covar>::type stan::math::multi_normal_log (const T_y & y,
const T_loc & mu,
const T_covar & Sigma 
)
+
+inline
+
+ +

Definition at line 128 of file multi_normal_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_loc , typename T_covar >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_covar>::type stan::math::multi_normal_prec_log (const T_y & y,
const T_loc & mu,
const T_covar & Sigma 
)
+
+ +

Definition at line 36 of file multi_normal_prec_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_covar >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_covar>::type stan::math::multi_normal_prec_log (const T_y & y,
const T_loc & mu,
const T_covar & Sigma 
)
+
+inline
+
+ +

Definition at line 143 of file multi_normal_prec_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
Eigen::VectorXd stan::math::multi_normal_rng (const Eigen::Matrix< double, Dynamic, 1 > & mu,
const Eigen::Matrix< double, Dynamic, Dynamic > & S,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 25 of file multi_normal_rng.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_dof , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_dof, T_loc, T_scale>::type stan::math::multi_student_t_log (const T_y & y,
const T_dof & nu,
const T_loc & mu,
const T_scale & Sigma 
)
+
+ +

Return the log of the multivariate Student t distribution at the specified arguments.

+
Template Parameters
+ + +
proptoCarry out calculations up to a proportion
+
+
+ +

Definition at line 37 of file multi_student_t_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_dof , typename T_loc , typename T_scale >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_dof, T_loc, T_scale>::type stan::math::multi_student_t_log (const T_y & y,
const T_dof & nu,
const T_loc & mu,
const T_scale & Sigma 
)
+
+inline
+
+ +

Definition at line 171 of file multi_student_t_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Eigen::VectorXd stan::math::multi_student_t_rng (const double nu,
const Eigen::Matrix< double, Dynamic, 1 > & mu,
const Eigen::Matrix< double, Dynamic, Dynamic > & s,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 30 of file multi_student_t_rng.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_prob >
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_prob>::type stan::math::multinomial_log (const std::vector< int > & ns,
const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > & theta 
)
+
+ +

Definition at line 24 of file multinomial_log.hpp.

+ +
+
+ +
+
+
+template<typename T_prob >
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_prob>::type stan::math::multinomial_log (const std::vector< int > & ns,
const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > & theta 
)
+
+ +

Definition at line 59 of file multinomial_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
std::vector<int> stan::math::multinomial_rng (const Eigen::Matrix< double, Eigen::Dynamic, 1 > & theta,
const int N,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 23 of file multinomial_rng.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R1, C1> stan::math::multiply (const Eigen::Matrix< fvar< T >, R1, C1 > & m,
const fvar< T > & c 
)
+
+inline
+
+ +

Definition at line 20 of file multiply.hpp.

+ +
+
+ +
+
+
+template<int R, int C, typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::enable_if_c<boost::is_arithmetic<T>::value, Eigen::Matrix<double, R, C> >::type stan::math::multiply (const Eigen::Matrix< double, R, C > & m,
c 
)
+
+inline
+
+ +

Return specified matrix multiplied by specified scalar.

+
Template Parameters
+ + + +
RRow type for matrix.
CColumn type for matrix.
+
+
+
Parameters
+ + + +
mMatrix.
cScalar.
+
+
+
Returns
Product of matrix and scalar.
+ +

Definition at line 25 of file multiply.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::enable_if_c< (boost::is_scalar<T1>::value || boost::is_same<T1, var>::value) && (boost::is_scalar<T2>::value || boost::is_same<T2, var>::value), typename boost::math::tools::promote_args<T1, T2>::type>::type stan::math::multiply (const T1 & v,
const T2 & c 
)
+
+inline
+
+ +

Return the product of two scalars.

+
Parameters
+ + + +
[in]vFirst scalar.
[in]cSpecified scalar.
+
+
+
Returns
Product of scalars.
+ +

Definition at line 31 of file multiply.hpp.

+ +
+
+ +
+
+
+template<typename T , int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R2, C2> stan::math::multiply (const Eigen::Matrix< fvar< T >, R2, C2 > & m,
const double c 
)
+
+inline
+
+ +

Definition at line 32 of file multiply.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<var, R2, C2> stan::math::multiply (const T1 & c,
const Eigen::Matrix< T2, R2, C2 > & m 
)
+
+inline
+
+ +

Return the product of scalar and matrix.

+
Parameters
+ + + +
[in]cSpecified scalar.
[in]mMatrix.
+
+
+
Returns
Product of scalar and matrix.
+ +

Definition at line 43 of file multiply.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R1, C1> stan::math::multiply (const Eigen::Matrix< double, R1, C1 > & m,
const fvar< T > & c 
)
+
+inline
+
+ +

Definition at line 44 of file multiply.hpp.

+ +
+
+ +
+
+
+template<int R, int C, typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::enable_if_c<boost::is_arithmetic<T>::value, Eigen::Matrix<double, R, C> >::type stan::math::multiply (c,
const Eigen::Matrix< double, R, C > & m 
)
+
+inline
+
+ +

Return specified scalar multiplied by specified matrix.

+
Template Parameters
+ + + +
RRow type for matrix.
CColumn type for matrix.
+
+
+
Parameters
+ + + +
cScalar.
mMatrix.
+
+
+
Returns
Product of scalar and matrix.
+ +

Definition at line 45 of file multiply.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R1, C1> stan::math::multiply (const fvar< T > & c,
const Eigen::Matrix< fvar< T >, R1, C1 > & m 
)
+
+inline
+
+ +

Definition at line 56 of file multiply.hpp.

+ +
+
+ +
+
+
+template<typename T1 , int R1, int C1, typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<var, R1, C1> stan::math::multiply (const Eigen::Matrix< T1, R1, C1 > & m,
const T2 & c 
)
+
+inline
+
+ +

Return the product of scalar and matrix.

+
Parameters
+ + + +
[in]mMatrix.
[in]cSpecified scalar.
+
+
+
Returns
Product of scalar and matrix.
+ +

Definition at line 57 of file multiply.hpp.

+ +
+
+ +
+
+
+template<int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<double, R1, C2> stan::math::multiply (const Eigen::Matrix< double, R1, C1 > & m1,
const Eigen::Matrix< double, R2, C2 > & m2 
)
+
+inline
+
+ +

Return the product of the specified matrices.

+

The number of columns in the first matrix must be the same as the number of rows in the second matrix.

+
Parameters
+ + + +
m1First matrix.
m2Second matrix.
+
+
+
Returns
The product of the first and second matrices.
+
Exceptions
+ + +
std::domain_errorif the number of columns of m1 does not match the number of rows of m2.
+
+
+ +

Definition at line 62 of file multiply.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R1, C1> stan::math::multiply (const double c,
const Eigen::Matrix< fvar< T >, R1, C1 > & m 
)
+
+inline
+
+ +

Definition at line 63 of file multiply.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R1, C1> stan::math::multiply (const fvar< T > & c,
const Eigen::Matrix< double, R1, C1 > & m 
)
+
+inline
+
+ +

Definition at line 70 of file multiply.hpp.

+ +
+
+ +
+
+
+template<typename T1 , int R1, int C1, typename T2 , int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::enable_if_c< boost::is_same<T1, var>::value || boost::is_same<T2, var>::value, Eigen::Matrix<var, R1, C2> >::type stan::math::multiply (const Eigen::Matrix< T1, R1, C1 > & m1,
const Eigen::Matrix< T2, R2, C2 > & m2 
)
+
+inline
+
+ +

Return the product of the specified matrices.

+

The number of columns in the first matrix must be the same as the number of rows in the second matrix.

+
Parameters
+ + + +
[in]m1First matrix.
[in]m2Second matrix.
+
+
+
Returns
The product of the first and second matrices.
+
Exceptions
+ + +
std::domain_errorif the number of columns of m1 does not match the number of rows of m2.
+
+
+ +

Definition at line 76 of file multiply.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R1, C2> stan::math::multiply (const Eigen::Matrix< fvar< T >, R1, C1 > & m1,
const Eigen::Matrix< fvar< T >, R2, C2 > & m2 
)
+
+inline
+
+ +

Definition at line 77 of file multiply.hpp.

+ +
+
+ +
+
+
+template<int C1, int R2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
double stan::math::multiply (const Eigen::Matrix< double, 1, C1 > & rv,
const Eigen::Matrix< double, R2, 1 > & v 
)
+
+inline
+
+ +

Return the scalar product of the specified row vector and specified column vector.

+

The return is the same as the dot product. The two vectors must be the same size.

+
Parameters
+ + + +
rvRow vector.
vColumn vector.
+
+
+
Returns
Scalar result of multiplying row vector by column vector.
+
Exceptions
+ + +
std::domain_errorif rv and v are not the same size.
+
+
+ +

Definition at line 80 of file multiply.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R1, C2> stan::math::multiply (const Eigen::Matrix< fvar< T >, R1, C1 > & m1,
const Eigen::Matrix< double, R2, C2 > & m2 
)
+
+inline
+
+ +

Definition at line 96 of file multiply.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R1, C2> stan::math::multiply (const Eigen::Matrix< double, R1, C1 > & m1,
const Eigen::Matrix< fvar< T >, R2, C2 > & m2 
)
+
+inline
+
+ +

Definition at line 115 of file multiply.hpp.

+ +
+
+ +
+
+
+template<typename T1 , int C1, typename T2 , int R2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::enable_if_c< boost::is_same<T1, var>::value || boost::is_same<T2, var>::value, var >::type stan::math::multiply (const Eigen::Matrix< T1, 1, C1 > & rv,
const Eigen::Matrix< T2, R2, 1 > & v 
)
+
+inline
+
+ +

Return the scalar product of the specified row vector and specified column vector.

+

The return is the same as the dot product. The two vectors must be the same size.

+
Parameters
+ + + +
[in]rvRow vector.
[in]vColumn vector.
+
+
+
Returns
Scalar result of multiplying row vector by column vector.
+
Exceptions
+ + +
std::domain_errorif rv and v are not the same size
+
+
+ +

Definition at line 128 of file multiply.hpp.

+ +
+
+ +
+
+
+template<typename T , int C1, int R2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::multiply (const Eigen::Matrix< fvar< T >, 1, C1 > & rv,
const Eigen::Matrix< fvar< T >, R2, 1 > & v 
)
+
+inline
+
+ +

Definition at line 134 of file multiply.hpp.

+ +
+
+ +
+
+
+template<typename T , int C1, int R2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::multiply (const Eigen::Matrix< fvar< T >, 1, C1 > & rv,
const Eigen::Matrix< double, R2, 1 > & v 
)
+
+inline
+
+ +

Definition at line 145 of file multiply.hpp.

+ +
+
+ +
+
+
+template<typename T , int C1, int R2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::multiply (const Eigen::Matrix< double, 1, C1 > & rv,
const Eigen::Matrix< fvar< T >, R2, 1 > & v 
)
+
+inline
+
+ +

Definition at line 156 of file multiply.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::multiply_log (const fvar< T > & x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 15 of file multiply_log.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::multiply_log (const double x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 25 of file multiply_log.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::multiply_log (const fvar< T > & x1,
const double x2 
)
+
+inline
+
+ +

Definition at line 35 of file multiply_log.hpp.

+ +
+
+ +
+
+
+template<typename T_a , typename T_b >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_a, T_b>::type stan::math::multiply_log (const T_a a,
const T_b b 
)
+
+inline
+
+ +

Calculated the value of the first argument times log of the second argument while behaving properly with 0 inputs.

+

$ a * \log b $.

+

+\[ \mbox{multiply\_log}(x, y) = \begin{cases} 0 & \mbox{if } x=y=0\\ x\ln y & \mbox{if } x, y\neq0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{multiply\_log}(x, y)}{\partial x} = \begin{cases} \infty & \mbox{if } x=y=0\\ \ln y & \mbox{if } x, y\neq 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{multiply\_log}(x, y)}{\partial y} = \begin{cases} \infty & \mbox{if } x=y=0\\ \frac{x}{y} & \mbox{if } x, y\neq 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + + +
athe first variable
bthe second variable
+
+
+
Returns
a * log(b)
+ +

Definition at line 51 of file multiply_log.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::multiply_log (const var & a,
const var & b 
)
+
+inline
+
+ +

Return the value of a*log(b).

+

When both a and b are 0, the value returned is 0. The partial deriviative with respect to a is log(b). The partial deriviative with respect to b is a/b. When a and b are both 0, this is set to Inf.

+
Parameters
+ + + +
aFirst variable.
bSecond variable.
+
+
+
Returns
Value of a*log(b)
+ +

Definition at line 74 of file multiply_log.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::multiply_log (const var & a,
const double b 
)
+
+inline
+
+ +

Return the value of a*log(b).

+

When both a and b are 0, the value returned is 0. The partial deriviative with respect to a is log(b).

+
Parameters
+ + + +
aFirst variable.
bSecond scalar.
+
+
+
Returns
Value of a*log(b)
+ +

Definition at line 87 of file multiply_log.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::multiply_log (const double a,
const var & b 
)
+
+inline
+
+ +

Return the value of a*log(b).

+

When both a and b are 0, the value returned is 0. The partial deriviative with respect to b is a/b. When a and b are both 0, this is set to Inf.

+
Parameters
+ + + +
aFirst scalar.
bSecond variable.
+
+
+
Returns
Value of a*log(b)
+ +

Definition at line 101 of file multiply_log.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<fvar<T>, R, R> stan::math::multiply_lower_tri_self_transpose (const Eigen::Matrix< fvar< T >, R, C > & m)
+
+inline
+
+ +

Definition at line 17 of file multiply_lower_tri_self_transpose.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
matrix_d stan::math::multiply_lower_tri_self_transpose (const matrix_d & L)
+
+inline
+
+ +

Returns the result of multiplying the lower triangular portion of the input matrix by its own transpose.

+
Parameters
+ + +
LMatrix to multiply.
+
+
+
Returns
The lower triangular values in L times their own transpose.
+
Exceptions
+ + +
std::domain_errorIf the input matrix is not square.
+
+
+ +

Definition at line 18 of file multiply_lower_tri_self_transpose.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
matrix_v stan::math::multiply_lower_tri_self_transpose (const matrix_v & L)
+
+inline
+
+ +

Definition at line 19 of file multiply_lower_tri_self_transpose.hpp.

+ +
+
+ +
+
+
+template<typename T_n , typename T_location , typename T_precision >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_location, T_precision>::type stan::math::neg_binomial_2_ccdf_log (const T_n & n,
const T_location & mu,
const T_precision & phi 
)
+
+ +

Definition at line 33 of file neg_binomial_2_ccdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T_n , typename T_location , typename T_precision >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_location, T_precision>::type stan::math::neg_binomial_2_cdf (const T_n & n,
const T_location & mu,
const T_precision & phi 
)
+
+ +

Definition at line 37 of file neg_binomial_2_cdf.hpp.

+ +
+
+ +
+
+
+template<typename T_n , typename T_location , typename T_precision >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_location, T_precision>::type stan::math::neg_binomial_2_cdf_log (const T_n & n,
const T_location & mu,
const T_precision & phi 
)
+
+ +

Definition at line 31 of file neg_binomial_2_cdf_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_n , typename T_location , typename T_precision >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_location, T_precision>::type stan::math::neg_binomial_2_log (const T_n & n,
const T_location & mu,
const T_precision & phi 
)
+
+ +

Definition at line 37 of file neg_binomial_2_log.hpp.

+ +
+
+ +
+
+
+template<typename T_n , typename T_location , typename T_precision >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_location, T_precision>::type stan::math::neg_binomial_2_log (const T_n & n,
const T_location & mu,
const T_precision & phi 
)
+
+inline
+
+ +

Definition at line 141 of file neg_binomial_2_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_n , typename T_log_location , typename T_precision >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_log_location, T_precision>::type stan::math::neg_binomial_2_log_log (const T_n & n,
const T_log_location & eta,
const T_precision & phi 
)
+
+ +

Definition at line 33 of file neg_binomial_2_log_log.hpp.

+ +
+
+ +
+
+
+template<typename T_n , typename T_log_location , typename T_precision >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_log_location, T_precision>::type stan::math::neg_binomial_2_log_log (const T_n & n,
const T_log_location & eta,
const T_precision & phi 
)
+
+inline
+
+ +

Definition at line 140 of file neg_binomial_2_log_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
int stan::math::neg_binomial_2_log_rng (const double eta,
const double phi,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 29 of file neg_binomial_2_log_rng.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
int stan::math::neg_binomial_2_rng (const double mu,
const double phi,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 29 of file neg_binomial_2_rng.hpp.

+ +
+
+ +
+
+
+template<typename T_n , typename T_shape , typename T_inv_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_shape, T_inv_scale>::type stan::math::neg_binomial_ccdf_log (const T_n & n,
const T_shape & alpha,
const T_inv_scale & beta 
)
+
+ +

Definition at line 32 of file neg_binomial_ccdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T_n , typename T_shape , typename T_inv_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_shape, T_inv_scale>::type stan::math::neg_binomial_cdf (const T_n & n,
const T_shape & alpha,
const T_inv_scale & beta 
)
+
+ +

Definition at line 29 of file neg_binomial_cdf.hpp.

+ +
+
+ +
+
+
+template<typename T_n , typename T_shape , typename T_inv_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_shape, T_inv_scale>::type stan::math::neg_binomial_cdf_log (const T_n & n,
const T_shape & alpha,
const T_inv_scale & beta 
)
+
+ +

Definition at line 32 of file neg_binomial_cdf_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_n , typename T_shape , typename T_inv_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_shape, T_inv_scale>::type stan::math::neg_binomial_log (const T_n & n,
const T_shape & alpha,
const T_inv_scale & beta 
)
+
+ +

Definition at line 39 of file neg_binomial_log.hpp.

+ +
+
+ +
+
+
+template<typename T_n , typename T_shape , typename T_inv_scale >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_shape, T_inv_scale>::type stan::math::neg_binomial_log (const T_n & n,
const T_shape & alpha,
const T_inv_scale & beta 
)
+
+inline
+
+ +

Definition at line 183 of file neg_binomial_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
int stan::math::neg_binomial_rng (const double alpha,
const double beta,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 30 of file neg_binomial_rng.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
double stan::math::negative_infinity ()
+
+inline
+
+ +

Return negative infinity.

+
Returns
Negative infinity.
+ +

Definition at line 132 of file constants.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
static size_t stan::math::nested_size ()
+
+inlinestatic
+
+ +

Definition at line 12 of file nested_size.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::normal_ccdf_log (const T_y & y,
const T_loc & mu,
const T_scale & sigma 
)
+
+ +

Definition at line 24 of file normal_ccdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::normal_cdf (const T_y & y,
const T_loc & mu,
const T_scale & sigma 
)
+
+ +

Calculates the normal cumulative distribution function for the given variate, location, and scale.

+

$\Phi(x) = \frac{1}{\sqrt{2 \pi}} \int_{-\inf}^x e^{-t^2/2} dt$.

+
Parameters
+ + + + +
yA scalar variate.
muThe location of the normal distribution.
sigmaThe scale of the normal distriubtion
+
+
+
Returns
The unit normal cdf evaluated at the specified arguments.
+
Template Parameters
+ + + + +
T_yType of y.
T_locType of mean parameter.
T_scaleType of standard deviation paramater.
+
+
+ +

Definition at line 38 of file normal_cdf.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::normal_cdf_log (const T_y & y,
const T_loc & mu,
const T_scale & sigma 
)
+
+ +

Definition at line 24 of file normal_cdf_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::normal_log (const T_y & y,
const T_loc & mu,
const T_scale & sigma 
)
+
+ +

The log of the normal density for the specified scalar(s) given the specified mean(s) and deviation(s).

+

y, mu, or sigma can each be either a scalar or a vector. Any vector inputs must be the same length.

+

The result log probability is defined to be the sum of the log probabilities for each observation/mean/deviation triple.

+
Parameters
+ + + + +
y(Sequence of) scalar(s).
mu(Sequence of) location parameter(s) for the normal distribution.
sigma(Sequence of) scale parameters for the normal distribution.
+
+
+
Returns
The log of the product of the densities.
+
Exceptions
+ + +
std::domain_errorif the scale is not positive.
+
+
+
Template Parameters
+ + + +
T_yUnderlying type of scalar in sequence.
T_locType of location parameter.
+
+
+ +

Definition at line 43 of file normal_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::normal_log (const T_y & y,
const T_loc & mu,
const T_scale & sigma 
)
+
+inline
+
+ +

Definition at line 136 of file normal_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
double stan::math::normal_rng (const double mu,
const double sigma,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 20 of file normal_rng.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
double stan::math::not_a_number ()
+
+inline
+
+ +

Return (quiet) not-a-number.

+
Returns
Quiet not-a-number.
+ +

Definition at line 141 of file constants.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
int stan::math::num_elements (const T & x)
+
+inline
+
+ +

Returns 1, the number of elements in a primitive type.

+
Parameters
+ + +
xArgument of primitive type.
+
+
+
Returns
1
+ +

Definition at line 19 of file num_elements.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
int stan::math::num_elements (const Eigen::Matrix< T, R, C > & m)
+
+inline
+
+ +

Returns the size of the specified matrix.

+
Parameters
+ + +
margument matrix
+
+
+
Returns
size of matrix
+ +

Definition at line 31 of file num_elements.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
int stan::math::num_elements (const std::vector< T > & v)
+
+inline
+
+ +

Returns the number of elements in the specified vector.

+

This assumes it is not ragged and that each of its contained elements has the same number of elements.

+
Parameters
+ + +
vargument vector
+
+
+
Returns
number of contained arguments
+ +

Definition at line 45 of file num_elements.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool stan::math::operator! (const var & a)
+
+inline
+
+ +

Prefix logical negation for the value of variables (C++).

+

The expression (!a) is equivalent to negating the scalar value of the variable a.

+

Note that this is the only logical operator defined for variables. Overridden logical conjunction (&&) and disjunction (||) operators do not apply the same "short circuit" rules as the built-in logical operators.

+

+\[ \mbox{operator!}(x) = \begin{cases} 0 & \mbox{if } x \neq 0 \\ 1 & \mbox{if } x = 0 \\[6pt] 0 & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
aVariable to negate.
+
+
+
Returns
True if variable is non-zero.
+ +

Definition at line 31 of file operator_unary_not.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator!= (const fvar< T > & x,
const fvar< T > & y 
)
+
+inline
+
+ +

Definition at line 14 of file operator_not_equal.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator!= (const fvar< T > & x,
double y 
)
+
+inline
+
+ +

Definition at line 21 of file operator_not_equal.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator!= (const var & a,
const var & b 
)
+
+inline
+
+ +

Inequality operator comparing two variables' values (C++).

+

+\[ \mbox{operator!=}(x, y) = \begin{cases} 0 & \mbox{if } x = y\\ 1 & \mbox{if } x \neq y \\[6pt] 0 & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + + +
aFirst variable.
bSecond variable.
+
+
+
Returns
True if the first variable's value is not the same as the second's.
+ +

Definition at line 26 of file operator_not_equal.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator!= (double x,
const fvar< T > & y 
)
+
+inline
+
+ +

Definition at line 28 of file operator_not_equal.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator!= (const var & a,
const double b 
)
+
+inline
+
+ +

Inequality operator comparing a variable's value and a double (C++).

+
Parameters
+ + + +
aFirst variable.
bSecond value.
+
+
+
Returns
True if the first variable's value is not the same as the second value.
+ +

Definition at line 39 of file operator_not_equal.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator!= (const double a,
const var & b 
)
+
+inline
+
+ +

Inequality operator comparing a double and a variable's value (C++).

+
Parameters
+ + + +
aFirst value.
bSecond variable.
+
+
+
Returns
True if the first value is not the same as the second variable's value.
+ +

Definition at line 52 of file operator_not_equal.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::operator* (const fvar< T > & x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 14 of file operator_multiplication.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::operator* (double x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 22 of file operator_multiplication.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::operator* (const fvar< T > & x1,
double x2 
)
+
+inline
+
+ +

Definition at line 29 of file operator_multiplication.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::operator* (const var & a,
const var & b 
)
+
+inline
+
+ +

Multiplication operator for two variables (C++).

+

The partial derivatives are

+

$\frac{\partial}{\partial x} (x * y) = y$, and

+

$\frac{\partial}{\partial y} (x * y) = x$.

+

+\[ \mbox{operator*}(x, y) = \begin{cases} xy & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{operator*}(x, y)}{\partial x} = \begin{cases} y & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{operator*}(x, y)}{\partial y} = \begin{cases} x & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + + +
aFirst variable operand.
bSecond variable operand.
+
+
+
Returns
Variable result of multiplying operands.
+ +

Definition at line 83 of file operator_multiplication.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::operator* (const var & a,
const double b 
)
+
+inline
+
+ +

Multiplication operator for a variable and a scalar (C++).

+

The partial derivative for the variable is

+

$\frac{\partial}{\partial x} (x * c) = c$, and

+
Parameters
+ + + +
aVariable operand.
bScalar operand.
+
+
+
Returns
Variable result of multiplying operands.
+ +

Definition at line 98 of file operator_multiplication.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::operator* (const double a,
const var & b 
)
+
+inline
+
+ +

Multiplication operator for a scalar and a variable (C++).

+

The partial derivative for the variable is

+

$\frac{\partial}{\partial y} (c * y) = c$.

+
Parameters
+ + + +
aScalar operand.
bVariable operand.
+
+
+
Returns
Variable result of multiplying the operands.
+ +

Definition at line 115 of file operator_multiplication.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::operator+ (const fvar< T > & x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 13 of file operator_addition.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::operator+ (const double x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 20 of file operator_addition.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::operator+ (const fvar< T > & x1,
const double x2 
)
+
+inline
+
+ +

Definition at line 27 of file operator_addition.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::operator+ (const var & a)
+
+inline
+
+ +

Unary plus operator for variables (C++).

+

The function simply returns its input, because

+

$\frac{d}{dx} +x = \frac{d}{dx} x = 1$.

+

The effect of unary plus on a built-in C++ scalar type is integer promotion. Because variables are all double-precision floating point already, promotion is not necessary.

+

+\[ \mbox{operator+}(x) = \begin{cases} x & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{operator+}(x)}{\partial x} = \begin{cases} 1 & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
aArgument variable.
+
+
+
Returns
The input reference.
+ +

Definition at line 43 of file operator_unary_plus.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::operator+ (const var & a,
const var & b 
)
+
+inline
+
+ +

Addition operator for variables (C++).

+

The partial derivatives are defined by

+

$\frac{\partial}{\partial x} (x+y) = 1$, and

+

$\frac{\partial}{\partial y} (x+y) = 1$.

+

+\[ \mbox{operator+}(x, y) = \begin{cases} x+y & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{operator+}(x, y)}{\partial x} = \begin{cases} 1 & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{operator+}(x, y)}{\partial y} = \begin{cases} 1 & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + + +
aFirst variable operand.
bSecond variable operand.
+
+
+
Returns
Variable result of adding two variables.
+ +

Definition at line 84 of file operator_addition.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::operator+ (const var & a,
const double b 
)
+
+inline
+
+ +

Addition operator for variable and scalar (C++).

+

The derivative with respect to the variable is

+

$\frac{d}{dx} (x + c) = 1$.

+
Parameters
+ + + +
aFirst variable operand.
bSecond scalar operand.
+
+
+
Returns
Result of adding variable and scalar.
+ +

Definition at line 99 of file operator_addition.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::operator+ (const double a,
const var & b 
)
+
+inline
+
+ +

Addition operator for scalar and variable (C++).

+

The derivative with respect to the variable is

+

$\frac{d}{dy} (c + y) = 1$.

+
Parameters
+ + + +
aFirst scalar operand.
bSecond variable operand.
+
+
+
Returns
Result of adding variable and scalar.
+ +

Definition at line 116 of file operator_addition.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var& stan::math::operator++ (var & a)
+
+inline
+
+ +

Prefix increment operator for variables (C++).

+

Following C++, (++a) is defined to behave exactly as (a = a + 1.0) does, but is faster and uses less memory. In particular, the result is an assignable lvalue.

+
Parameters
+ + +
aVariable to increment.
+
+
+
Returns
Reference the result of incrementing this input variable.
+ +

Definition at line 36 of file operator_unary_increment.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::operator++ (var & a,
int  
)
+
+inline
+
+ +

Postfix increment operator for variables (C++).

+

Following C++, the expression (a++) is defined to behave like the sequence of operations

+

var temp = a; a = a + 1.0; return temp;

+
Parameters
+ + +
aVariable to increment.
+
+
+
Returns
Input variable.
+ +

Definition at line 52 of file operator_unary_increment.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::operator- (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 14 of file operator_unary_minus.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::operator- (const fvar< T > & x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 14 of file operator_subtraction.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::operator- (const double x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 21 of file operator_subtraction.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::operator- (const fvar< T > & x1,
const double x2 
)
+
+inline
+
+ +

Definition at line 28 of file operator_subtraction.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::operator- (const var & a)
+
+inline
+
+ +

Unary negation operator for variables (C++).

+

$\frac{d}{dx} -x = -1$.

+

+\[ \mbox{operator-}(x) = \begin{cases} -x & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{operator-}(x)}{\partial x} = \begin{cases} -1 & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
aArgument variable.
+
+
+
Returns
Negation of variable.
+ +

Definition at line 51 of file operator_unary_negative.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::operator- (const var & a,
const var & b 
)
+
+inline
+
+ +

Subtraction operator for variables (C++).

+

The partial derivatives are defined by

+

$\frac{\partial}{\partial x} (x-y) = 1$, and

+

$\frac{\partial}{\partial y} (x-y) = -1$.

+

+\[ \mbox{operator-}(x, y) = \begin{cases} x-y & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{operator-}(x, y)}{\partial x} = \begin{cases} 1 & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{operator-}(x, y)}{\partial y} = \begin{cases} -1 & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + + +
aFirst variable operand.
bSecond variable operand.
+
+
+
Returns
Variable result of subtracting the second variable from the first.
+ +

Definition at line 99 of file operator_subtraction.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::operator- (const var & a,
const double b 
)
+
+inline
+
+ +

Subtraction operator for variable and scalar (C++).

+

The derivative for the variable is

+

$\frac{\partial}{\partial x} (x-c) = 1$, and

+
Parameters
+ + + +
aFirst variable operand.
bSecond scalar operand.
+
+
+
Returns
Result of subtracting the scalar from the variable.
+ +

Definition at line 114 of file operator_subtraction.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::operator- (const double a,
const var & b 
)
+
+inline
+
+ +

Subtraction operator for scalar and variable (C++).

+

The derivative for the variable is

+

$\frac{\partial}{\partial y} (c-y) = -1$, and

+
Parameters
+ + + +
aFirst scalar operand.
bSecond variable operand.
+
+
+
Returns
Result of sutracting a variable from a scalar.
+ +

Definition at line 131 of file operator_subtraction.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var& stan::math::operator-- (var & a)
+
+inline
+
+ +

Prefix decrement operator for variables (C++).

+

Following C++, (–a) is defined to behave exactly as

+

a = a - 1.0)

+

does, but is faster and uses less memory. In particular, the result is an assignable lvalue.

+
Parameters
+ + +
aVariable to decrement.
+
+
+
Returns
Reference the result of decrementing this input variable.
+ +

Definition at line 40 of file operator_unary_decrement.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::operator-- (var & a,
int  
)
+
+inline
+
+ +

Postfix decrement operator for variables (C++).

+

Following C++, the expression (a–) is defined to behave like the sequence of operations

+

var temp = a; a = a - 1.0; return temp;

+
Parameters
+ + +
aVariable to decrement.
+
+
+
Returns
Input variable.
+ +

Definition at line 56 of file operator_unary_decrement.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::operator/ (const fvar< T > & x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 14 of file operator_division.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::operator/ (const fvar< T > & x1,
const double x2 
)
+
+inline
+
+ +

Definition at line 22 of file operator_division.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::operator/ (const double x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 30 of file operator_division.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R, C> stan::math::operator/ (const Eigen::Matrix< fvar< T >, R, C > & v,
const fvar< T > & c 
)
+
+inline
+
+ +

Definition at line 58 of file divide.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R, C> stan::math::operator/ (const Eigen::Matrix< fvar< T >, R, C > & v,
const double c 
)
+
+inline
+
+ +

Definition at line 64 of file divide.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R, C> stan::math::operator/ (const Eigen::Matrix< double, R, C > & v,
const fvar< T > & c 
)
+
+inline
+
+ +

Definition at line 70 of file divide.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::operator/ (const var & a,
const var & b 
)
+
+inline
+
+ +

Division operator for two variables (C++).

+

The partial derivatives for the variables are

+

$\frac{\partial}{\partial x} (x/y) = 1/y$, and

+

$\frac{\partial}{\partial y} (x/y) = -x / y^2$.

+

+\[ \mbox{operator/}(x, y) = \begin{cases} \frac{x}{y} & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{operator/}(x, y)}{\partial x} = \begin{cases} \frac{1}{y} & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{operator/}(x, y)}{\partial y} = \begin{cases} -\frac{x}{y^2} & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + + +
aFirst variable operand.
bSecond variable operand.
+
+
+
Returns
Variable result of dividing the first variable by the second.
+ +

Definition at line 96 of file operator_division.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::operator/ (const var & a,
const double b 
)
+
+inline
+
+ +

Division operator for dividing a variable by a scalar (C++).

+

The derivative with respect to the variable is

+

$\frac{\partial}{\partial x} (x/c) = 1/c$.

+
Parameters
+ + + +
aVariable operand.
bScalar operand.
+
+
+
Returns
Variable result of dividing the variable by the scalar.
+ +

Definition at line 111 of file operator_division.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::operator/ (const double a,
const var & b 
)
+
+inline
+
+ +

Division operator for dividing a scalar by a variable (C++).

+

The derivative with respect to the variable is

+

$\frac{d}{d y} (c/y) = -c / y^2$.

+
Parameters
+ + + +
aScalar operand.
bVariable operand.
+
+
+
Returns
Variable result of dividing the scalar by the variable.
+ +

Definition at line 128 of file operator_division.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator< (const fvar< T > & x,
double y 
)
+
+inline
+
+ +

Definition at line 12 of file operator_less_than.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator< (double x,
const fvar< T > & y 
)
+
+inline
+
+ +

Definition at line 18 of file operator_less_than.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator< (const fvar< T > & x,
const fvar< T > & y 
)
+
+inline
+
+ +

Definition at line 24 of file operator_less_than.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator< (const var & a,
const var & b 
)
+
+inline
+
+ +

Less than operator comparing variables' values (C++).

+

+\[ \mbox{operator\textless}(x, y) = \begin{cases} 0 & \mbox{if } x \geq y \\ 1 & \mbox{if } x < y \\[6pt] 0 & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + + +
aFirst variable.
bSecond variable.
+
+
+
Returns
True if first variable's value is less than second's.
+ +

Definition at line 24 of file operator_less_than.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator< (const var & a,
const double b 
)
+
+inline
+
+ +

Less than operator comparing variable's value and a double (C++).

+
Parameters
+ + + +
aFirst variable.
bSecond value.
+
+
+
Returns
True if first variable's value is less than second value.
+ +

Definition at line 36 of file operator_less_than.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator< (const double a,
const var & b 
)
+
+inline
+
+ +

Less than operator comparing a double and variable's value (C++).

+
Parameters
+ + + +
aFirst value.
bSecond variable.
+
+
+
Returns
True if first value is less than second variable's value.
+ +

Definition at line 48 of file operator_less_than.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator<= (const fvar< T > & x,
const fvar< T > & y 
)
+
+inline
+
+ +

Definition at line 14 of file operator_less_than_or_equal.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator<= (const fvar< T > & x,
double y 
)
+
+inline
+
+ +

Definition at line 21 of file operator_less_than_or_equal.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator<= (const var & a,
const var & b 
)
+
+inline
+
+ +

Less than or equal operator comparing two variables' values (C++).

+

+\[ \mbox{operator\textless=}(x, y) = \begin{cases} 0 & \mbox{if } x > y\\ 1 & \mbox{if } x \leq y \\[6pt] 0 & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + + +
aFirst variable.
bSecond variable.
+
+
+
Returns
True if first variable's value is less than or equal to the second's.
+ +

Definition at line 26 of file operator_less_than_or_equal.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator<= (double x,
const fvar< T > & y 
)
+
+inline
+
+ +

Definition at line 28 of file operator_less_than_or_equal.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator<= (const var & a,
const double b 
)
+
+inline
+
+ +

Less than or equal operator comparing a variable's value and a scalar (C++).

+
Parameters
+ + + +
aFirst variable.
bSecond value.
+
+
+
Returns
True if first variable's value is less than or equal to the second value.
+ +

Definition at line 39 of file operator_less_than_or_equal.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator<= (const double a,
const var & b 
)
+
+inline
+
+ +

Less than or equal operator comparing a double and variable's value (C++).

+
Parameters
+ + + +
aFirst value.
bSecond variable.
+
+
+
Returns
True if first value is less than or equal to the second variable's value.
+ +

Definition at line 52 of file operator_less_than_or_equal.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator== (const fvar< T > & x,
const fvar< T > & y 
)
+
+inline
+
+ +

Definition at line 14 of file operator_equal.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator== (const fvar< T > & x,
double y 
)
+
+inline
+
+ +

Definition at line 21 of file operator_equal.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator== (const var & a,
const var & b 
)
+
+inline
+
+ +

Equality operator comparing two variables' values (C++).

+

+\[ \mbox{operator==}(x, y) = \begin{cases} 0 & \mbox{if } x \neq y\\ 1 & \mbox{if } x = y \\[6pt] 0 & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + + +
aFirst variable.
bSecond variable.
+
+
+
Returns
True if the first variable's value is the same as the second's.
+ +

Definition at line 26 of file operator_equal.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator== (double x,
const fvar< T > & y 
)
+
+inline
+
+ +

Definition at line 28 of file operator_equal.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator== (const var & a,
const double b 
)
+
+inline
+
+ +

Equality operator comparing a variable's value and a double (C++).

+
Parameters
+ + + +
aFirst variable.
bSecond value.
+
+
+
Returns
True if the first variable's value is the same as the second value.
+ +

Definition at line 39 of file operator_equal.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator== (const double a,
const var & b 
)
+
+inline
+
+ +

Equality operator comparing a scalar and a variable's value (C++).

+
Parameters
+ + + +
aFirst scalar.
bSecond variable.
+
+
+
Returns
True if the variable's value is equal to the scalar.
+ +

Definition at line 51 of file operator_equal.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator> (const fvar< T > & x,
const fvar< T > & y 
)
+
+inline
+
+ +

Definition at line 14 of file operator_greater_than.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator> (const fvar< T > & x,
double y 
)
+
+inline
+
+ +

Definition at line 21 of file operator_greater_than.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator> (const var & a,
const var & b 
)
+
+inline
+
+ +

Greater than operator comparing variables' values (C++).

+

+\[ \mbox{operator\textgreater}(x, y) = \begin{cases} 0 & \mbox{if } x \leq y\\ 1 & \mbox{if } x > y \\[6pt] 0 & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + + +
aFirst variable.
bSecond variable.
+
+
+
Returns
True if first variable's value is greater than second's.
+ +

Definition at line 25 of file operator_greater_than.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator> (double x,
const fvar< T > & y 
)
+
+inline
+
+ +

Definition at line 28 of file operator_greater_than.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator> (const var & a,
const double b 
)
+
+inline
+
+ +

Greater than operator comparing variable's value and double (C++).

+
Parameters
+ + + +
aFirst variable.
bSecond value.
+
+
+
Returns
True if first variable's value is greater than second value.
+ +

Definition at line 37 of file operator_greater_than.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator> (const double a,
const var & b 
)
+
+inline
+
+ +

Greater than operator comparing a double and a variable's value (C++).

+
Parameters
+ + + +
aFirst value.
bSecond variable.
+
+
+
Returns
True if first value is greater than second variable's value.
+ +

Definition at line 49 of file operator_greater_than.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator>= (const fvar< T > & x,
const fvar< T > & y 
)
+
+inline
+
+ +

Definition at line 14 of file operator_greater_than_or_equal.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator>= (const fvar< T > & x,
double y 
)
+
+inline
+
+ +

Definition at line 21 of file operator_greater_than_or_equal.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator>= (const var & a,
const var & b 
)
+
+inline
+
+ +

Greater than or equal operator comparing two variables' values (C++).

+

+\[ \mbox{operator\textgreater=}(x, y) = \begin{cases} 0 & \mbox{if } x < y\\ 1 & \mbox{if } x \geq y \\[6pt] 0 & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + + +
aFirst variable.
bSecond variable.
+
+
+
Returns
True if first variable's value is greater than or equal to the second's.
+ +

Definition at line 27 of file operator_greater_than_or_equal.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator>= (double x,
const fvar< T > & y 
)
+
+inline
+
+ +

Definition at line 28 of file operator_greater_than_or_equal.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator>= (const var & a,
const double b 
)
+
+inline
+
+ +

Greater than or equal operator comparing variable's value and double (C++).

+
Parameters
+ + + +
aFirst variable.
bSecond value.
+
+
+
Returns
True if first variable's value is greater than or equal to second value.
+ +

Definition at line 40 of file operator_greater_than_or_equal.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool stan::math::operator>= (const double a,
const var & b 
)
+
+inline
+
+ +

Greater than or equal operator comparing double and variable's value (C++).

+
Parameters
+ + + +
aFirst value.
bSecond variable.
+
+
+
Returns
True if the first value is greater than or equal to the second variable's value.
+ +

Definition at line 53 of file operator_greater_than_or_equal.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::ordered_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & x)
+
+ +

Return an increasing ordered vector derived from the specified free vector.

+

The returned constrained vector will have the same dimensionality as the specified free vector.

+
Parameters
+ + +
xFree vector of scalars.
+
+
+
Returns
Positive, increasing ordered vector.
+
Template Parameters
+ + +
TType of scalar.
+
+
+ +

Definition at line 23 of file ordered_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::ordered_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & x,
T & lp 
)
+
+inline
+
+ +

Return a positive valued, increasing ordered vector derived from the specified free vector and increment the specified log probability reference with the log absolute Jacobian determinant of the transform.

+

The returned constrained vector will have the same dimensionality as the specified free vector.

+
Parameters
+ + + +
xFree vector of scalars.
lpLog probability reference.
+
+
+
Returns
Positive, increasing ordered vector.
+
Template Parameters
+ + +
TType of scalar.
+
+
+ +

Definition at line 56 of file ordered_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::ordered_free (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & y)
+
+ +

Return the vector of unconstrained scalars that transform to the specified positive ordered vector.

+

This function inverts the constraining operation defined in ordered_constrain(Matrix),

+
Parameters
+ + +
yVector of positive, ordered scalars.
+
+
+
Returns
Free vector that transforms into the input vector.
+
Template Parameters
+ + +
TType of scalar.
+
+
+
Exceptions
+ + +
std::domain_errorif y is not a vector of positive, ordered scalars.
+
+
+ +

Definition at line 28 of file ordered_free.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_lambda , typename T_cut >
+ + + + + + + + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_lambda, T_cut>::type stan::math::ordered_logistic_log (int y,
const T_lambda & lambda,
const Eigen::Matrix< T_cut, Eigen::Dynamic, 1 > & c 
)
+
+ +

Returns the (natural) log probability of the specified integer outcome given the continuous location and specified cutpoints in an ordered logistic model.

+

Typically the continous location will be the dot product of a vector of regression coefficients and a vector of predictors for the outcome.

+
Template Parameters
+ + + + +
proptoTrue if calculating up to a proportion.
T_locLocation type.
T_cutCut-point type.
+
+
+
Parameters
+ + + + +
yOutcome.
lambdaLocation.
cPositive increasing vector of cutpoints.
+
+
+
Returns
Log probability of outcome given location and cutpoints.
+
Exceptions
+ + +
std::domain_errorIf the outcome is not between 1 and the number of cutpoints plus 2; if the cutpoint vector is empty; if the cutpoint vector contains a non-positive, non-finite value; or if the cutpoint vector is not sorted in ascending order.
+
+
+ +

Definition at line 61 of file ordered_logistic_log.hpp.

+ +
+
+ +
+
+
+template<typename T_lambda , typename T_cut >
+ + + + + + + + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_lambda, T_cut>::type stan::math::ordered_logistic_log (int y,
const T_lambda & lambda,
const Eigen::Matrix< T_cut, Eigen::Dynamic, 1 > & c 
)
+
+ +

Definition at line 107 of file ordered_logistic_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
int stan::math::ordered_logistic_rng (const double eta,
const Eigen::Matrix< double, Eigen::Dynamic, 1 > & c,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 24 of file ordered_logistic_rng.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::out_of_range (const char * function,
const int max,
const int index,
const char * msg1 = "",
const char * msg2 = "" 
)
+
+inline
+
+ +

Throw an out_of_range exception with a consistently formatted message.

+

This is an abstraction for all Stan functions to use when throwing out of range. This will allow us to change the behavior for all functions at once.

+

The message is: "<function>: index <index> out of range; expecting index to be between " "1 and <max><msg1><msg2>"

+
Parameters
+ + + + + + +
functionName of the function
maxMax
indexIndex
msg1Message to print. Default is "".
msg2Message to print. Default is "".
+
+
+ +

Definition at line 30 of file out_of_range.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::owens_t (const fvar< T > & x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 14 of file owens_t.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::owens_t (const double x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 34 of file owens_t.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::owens_t (const fvar< T > & x1,
const double x2 
)
+
+inline
+
+ +

Definition at line 48 of file owens_t.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
double stan::math::owens_t (const double h,
const double a 
)
+
+inline
+
+ +

The Owen's T function of h and a.

+

Used to compute the cumulative density function for the skew normal distribution.

+

+\[ \mbox{owens\_t}(h, a) = \begin{cases} \mbox{owens\_t}(h, a) & \mbox{if } -\infty\leq h, a \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } h = \textrm{NaN or } a = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{owens\_t}(h, a)}{\partial h} = \begin{cases} \frac{\partial\, \mbox{owens\_t}(h, a)}{\partial h} & \mbox{if } -\infty\leq h, a\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } h = \textrm{NaN or } a = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{owens\_t}(h, a)}{\partial a} = \begin{cases} \frac{\partial\, \mbox{owens\_t}(h, a)}{\partial a} & \mbox{if } -\infty\leq h, a\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } h = \textrm{NaN or } a = \textrm{NaN} \end{cases} \] +

+

+\[ \mbox{owens\_t}(h, a) = \frac{1}{2\pi} \int_0^a \frac{\exp(-\frac{1}{2}h^2(1+x^2))}{1+x^2}dx \] +

+

+\[ \frac{\partial \, \mbox{owens\_t}(h, a)}{\partial h} = -\frac{1}{2\sqrt{2\pi}} \operatorname{erf}\left(\frac{ha}{\sqrt{2}}\right) \exp\left(-\frac{h^2}{2}\right) \] +

+

+\[ \frac{\partial \, \mbox{owens\_t}(h, a)}{\partial a} = \frac{\exp\left(-\frac{1}{2}h^2(1+a^2)\right)}{2\pi (1+a^2)} \] +

+
Template Parameters
+ + + +
T1Type of first argument.
T2Type of second argument.
+
+
+
Parameters
+ + + +
hFirst argument
aSecond argument
+
+
+
Returns
The Owen's T function.
+ +

Definition at line 62 of file owens_t.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::owens_t (const var & h,
const var & a 
)
+
+inline
+
+ +

The Owen's T function of h and a.

+

Used to compute the cumulative density function for the skew normal distribution.

+
Parameters
+ + + +
hvar parameter.
avar parameter.
+
+
+
Returns
The Owen's T function.
+ +

Definition at line 71 of file owens_t.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::owens_t (const var & h,
double a 
)
+
+inline
+
+ +

The Owen's T function of h and a.

+

Used to compute the cumulative density function for the skew normal distribution.

+
Parameters
+ + + +
hvar parameter.
adouble parameter.
+
+
+
Returns
The Owen's T function.
+ +

Definition at line 85 of file owens_t.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::owens_t (double h,
const var & a 
)
+
+inline
+
+ +

The Owen's T function of h and a.

+

Used to compute the cumulative density function for the skew normal distribution.

+
Parameters
+ + + +
hdouble parameter.
avar parameter.
+
+
+
Returns
The Owen's T function.
+ +

Definition at line 99 of file owens_t.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_scale , typename T_shape >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_scale, T_shape>::type stan::math::pareto_ccdf_log (const T_y & y,
const T_scale & y_min,
const T_shape & alpha 
)
+
+ +

Definition at line 23 of file pareto_ccdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_scale , typename T_shape >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_scale, T_shape>::type stan::math::pareto_cdf (const T_y & y,
const T_scale & y_min,
const T_shape & alpha 
)
+
+ +

Definition at line 24 of file pareto_cdf.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_scale , typename T_shape >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_scale, T_shape>::type stan::math::pareto_cdf_log (const T_y & y,
const T_scale & y_min,
const T_shape & alpha 
)
+
+ +

Definition at line 23 of file pareto_cdf_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_scale , typename T_shape >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_scale, T_shape>::type stan::math::pareto_log (const T_y & y,
const T_scale & y_min,
const T_shape & alpha 
)
+
+ +

Definition at line 27 of file pareto_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_scale , typename T_shape >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_scale, T_shape>::type stan::math::pareto_log (const T_y & y,
const T_scale & y_min,
const T_shape & alpha 
)
+
+inline
+
+ +

Definition at line 130 of file pareto_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
double stan::math::pareto_rng (const double y_min,
const double alpha,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 22 of file pareto_rng.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale, T_shape>::type stan::math::pareto_type_2_ccdf_log (const T_y & y,
const T_loc & mu,
const T_scale & lambda,
const T_shape & alpha 
)
+
+ +

Definition at line 25 of file pareto_type_2_ccdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale, T_shape>::type stan::math::pareto_type_2_cdf (const T_y & y,
const T_loc & mu,
const T_scale & lambda,
const T_shape & alpha 
)
+
+ +

Definition at line 25 of file pareto_type_2_cdf.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale, T_shape>::type stan::math::pareto_type_2_cdf_log (const T_y & y,
const T_loc & mu,
const T_scale & lambda,
const T_shape & alpha 
)
+
+ +

Definition at line 25 of file pareto_type_2_cdf_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_shape >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale, T_shape>::type stan::math::pareto_type_2_log (const T_y & y,
const T_loc & mu,
const T_scale & lambda,
const T_shape & alpha 
)
+
+ +

Definition at line 28 of file pareto_type_2_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale, T_shape>::type stan::math::pareto_type_2_log (const T_y & y,
const T_loc & mu,
const T_scale & lambda,
const T_shape & alpha 
)
+
+inline
+
+ +

Definition at line 147 of file pareto_type_2_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
double stan::math::pareto_type_2_rng (const double mu,
const double lambda,
const double alpha,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 23 of file pareto_type_2_rng.hpp.

+ +
+
+ +
+
+
+template<typename T , typename F >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::partial_derivative (const F & f,
const Eigen::Matrix< T, Dynamic, 1 > & x,
int n,
T & fx,
T & dfx_dxn 
)
+
+ +

Return the partial derivative of the specified multiivariate function at the specified argument.

+
Template Parameters
+ + + +
TArgument type
FFunction type
+
+
+
Parameters
+ + + + + + +
fFunction
[in]xArgument vector
[in]nIndex of argument with which to take derivative
[out]fxValue of function applied to argument
[out]dfx_dxnValue of partial derivative
+
+
+ +

Definition at line 29 of file partial_derivative.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::Phi (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 14 of file Phi.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
boost::math::tools::promote_args<T>::type stan::math::Phi (const T x)
+
+inline
+
+ +

The unit normal cumulative distribution function.

+

The return value for a specified input is the probability that a random unit normal variate is less than or equal to the specified value, defined by

+

$\Phi(x) = \int_{-\infty}^x \mbox{\sf Norm}(x|0, 1) \ dx$

+

This function can be used to implement the inverse link function for probit regression.

+

Phi will underflow to 0 below -37.5 and overflow to 1 above 8

+
Parameters
+ + +
xArgument.
+
+
+
Returns
Probability random sample is less than or equal to argument.
+ +

Definition at line 31 of file Phi.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::Phi (const stan::math::vara)
+
+inline
+
+ +

The unit normal cumulative density function for variables (stan).

+

See stan::math::Phi() for the double-based version.

+

The derivative is the unit normal density function,

+

$\frac{d}{dx} \Phi(x) = \mbox{\sf Norm}(x|0, 1) = \frac{1}{\sqrt{2\pi}} \exp(-\frac{1}{2} x^2)$.

+

+\[ \mbox{Phi}(x) = \begin{cases} 0 & \mbox{if } x < -37.5 \\ \Phi(x) & \mbox{if } -37.5 \leq x \leq 8.25 \\ 1 & \mbox{if } x > 8.25 \\[6pt] \textrm{error} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{Phi}(x)}{\partial x} = \begin{cases} 0 & \mbox{if } x < -27.5 \\ \frac{\partial\, \Phi(x)}{\partial x} & \mbox{if } -27.5 \leq x \leq 27.5 \\ 0 & \mbox{if } x > 27.5 \\[6pt] \textrm{error} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \Phi(x) = \frac{1}{\sqrt{2\pi}} \int_{0}^{x} e^{-t^2/2} dt \] +

+

+\[ \frac{\partial \, \Phi(x)}{\partial x} = \frac{e^{-x^2/2}}{\sqrt{2\pi}} \] +

+
Parameters
+ + +
aVariable argument.
+
+
+
Returns
The unit normal cdf evaluated at the specified argument.
+ +

Definition at line 66 of file Phi.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
boost::math::tools::promote_args<T>::type stan::math::Phi_approx (x)
+
+inline
+
+ +

Approximation of the unit normal CDF.

+

http://www.jiem.org/index.php/jiem/article/download/60/27

+

This function can be used to implement the inverse link function for probit regression.

+
Parameters
+ + +
xArgument.
+
+
+
Returns
Probability random sample is less than or equal to argument.
+ +

Definition at line 23 of file Phi_approx.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::Phi_approx (const stan::math::vara)
+
+inline
+
+ +

Approximation of the unit normal CDF for variables (stan).

+

http://www.jiem.org/index.php/jiem/article/download/60/27

+

+\[ \mbox{Phi\_approx}(x) = \begin{cases} \Phi_{\mbox{\footnotesize approx}}(x) & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{Phi\_approx}(x)}{\partial x} = \begin{cases} \frac{\partial\, \Phi_{\mbox{\footnotesize approx}}(x)}{\partial x} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \Phi_{\mbox{\footnotesize approx}}(x) = \mbox{logit}^{-1}(0.07056 \, x^3 + 1.5976 \, x) \] +

+

+\[ \frac{\partial \, \Phi_{\mbox{\footnotesize approx}}(x)}{\partial x} = -\Phi_{\mbox{\footnotesize approx}}^2(x) e^{-0.07056x^3 - 1.5976x}(-0.21168x^2-1.5976) \] +

+
Parameters
+ + +
aVariable argument.
+
+
+
Returns
The corresponding unit normal cdf approximation.
+ +

Definition at line 47 of file Phi_approx.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
double stan::math::pi ()
+
+inline
+
+ +

Return the value of pi.

+
Returns
Pi.
+ +

Definition at line 86 of file constants.hpp.

+ +
+
+ +
+
+
+template<typename T_n , typename T_rate >
+ + + + + + + + + + + + + + + + + + +
return_type<T_rate>::type stan::math::poisson_ccdf_log (const T_n & n,
const T_rate & lambda 
)
+
+ +

Definition at line 25 of file poisson_ccdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T_n , typename T_rate >
+ + + + + + + + + + + + + + + + + + +
return_type<T_rate>::type stan::math::poisson_cdf (const T_n & n,
const T_rate & lambda 
)
+
+ +

Definition at line 26 of file poisson_cdf.hpp.

+ +
+
+ +
+
+
+template<typename T_n , typename T_rate >
+ + + + + + + + + + + + + + + + + + +
return_type<T_rate>::type stan::math::poisson_cdf_log (const T_n & n,
const T_rate & lambda 
)
+
+ +

Definition at line 25 of file poisson_cdf_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_n , typename T_rate >
+ + + + + + + + + + + + + + + + + + +
return_type<T_rate>::type stan::math::poisson_log (const T_n & n,
const T_rate & lambda 
)
+
+ +

Definition at line 27 of file poisson_log.hpp.

+ +
+
+ +
+
+
+template<typename T_n , typename T_rate >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
return_type<T_rate>::type stan::math::poisson_log (const T_n & n,
const T_rate & lambda 
)
+
+inline
+
+ +

Definition at line 99 of file poisson_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_n , typename T_log_rate >
+ + + + + + + + + + + + + + + + + + +
return_type<T_log_rate>::type stan::math::poisson_log_log (const T_n & n,
const T_log_rate & alpha 
)
+
+ +

Definition at line 30 of file poisson_log_log.hpp.

+ +
+
+ +
+
+
+template<typename T_n , typename T_log_rate >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
return_type<T_log_rate>::type stan::math::poisson_log_log (const T_n & n,
const T_log_rate & alpha 
)
+
+inline
+
+ +

Definition at line 110 of file poisson_log_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int stan::math::poisson_log_rng (const double alpha,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 24 of file poisson_log_rng.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int stan::math::poisson_rng (const double lambda,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 25 of file poisson_rng.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
T stan::math::positive_constrain (const T x)
+
+inline
+
+ +

Return the positive value for the specified unconstrained input.

+

The transform applied is

+

$f(x) = \exp(x)$.

+
Parameters
+ + +
xArbitrary input scalar.
+
+
+
Returns
Input transformed to be positive.
+ +

Definition at line 22 of file positive_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
T stan::math::positive_constrain (const T x,
T & lp 
)
+
+inline
+
+ +

Return the positive value for the specified unconstrained input, incrementing the scalar reference with the log absolute Jacobian determinant.

+

See positive_constrain(T) for details of the transform. The log absolute Jacobian determinant is

+

$\log | \frac{d}{dx} \mbox{exp}(x) | = \log | \mbox{exp}(x) | = x$.

+
Parameters
+ + + +
xArbitrary input scalar.
lpLog probability reference.
+
+
+
Returns
Input transformed to be positive.
+
Template Parameters
+ + +
TType of scalar.
+
+
+ +

Definition at line 44 of file positive_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
T stan::math::positive_free (const T y)
+
+inline
+
+ +

Return the unconstrained value corresponding to the specified positive-constrained value.

+

The transform is the inverse of the transform $f$ applied by positive_constrain(T), namely

+

$f^{-1}(x) = \log(x)$.

+

The input is validated using stan::math::check_positive().

+
Parameters
+ + +
yInput scalar.
+
+
+
Returns
Unconstrained value that produces the input when constrained.
+
Template Parameters
+ + +
TType of scalar.
+
+
+
Exceptions
+ + +
std::domain_errorif the variable is negative.
+
+
+ +

Definition at line 29 of file positive_free.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
double stan::math::positive_infinity ()
+
+inline
+
+ +

Return positive infinity.

+
Returns
Positive infinity.
+ +

Definition at line 123 of file constants.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::positive_ordered_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & x)
+
+ +

Return an increasing positive ordered vector derived from the specified free vector.

+

The returned constrained vector will have the same dimensionality as the specified free vector.

+
Parameters
+ + +
xFree vector of scalars.
+
+
+
Returns
Positive, increasing ordered vector.
+
Template Parameters
+ + +
TType of scalar.
+
+
+ +

Definition at line 23 of file positive_ordered_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::positive_ordered_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & x,
T & lp 
)
+
+inline
+
+ +

Return a positive valued, increasing positive ordered vector derived from the specified free vector and increment the specified log probability reference with the log absolute Jacobian determinant of the transform.

+

The returned constrained vector will have the same dimensionality as the specified free vector.

+
Parameters
+ + + +
xFree vector of scalars.
lpLog probability reference.
+
+
+
Returns
Positive, increasing ordered vector.
+
Template Parameters
+ + +
TType of scalar.
+
+
+ +

Definition at line 55 of file positive_ordered_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::positive_ordered_free (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & y)
+
+ +

Return the vector of unconstrained scalars that transform to the specified positive ordered vector.

+

This function inverts the constraining operation defined in positive_ordered_constrain(Matrix),

+
Parameters
+ + +
yVector of positive, ordered scalars.
+
+
+
Returns
Free vector that transforms into the input vector.
+
Template Parameters
+ + +
TType of scalar.
+
+
+
Exceptions
+ + +
std::domain_errorif y is not a vector of positive, ordered scalars.
+
+
+ +

Definition at line 28 of file positive_ordered_free.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::pow (const fvar< T > & x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 18 of file pow.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::pow (const double x1,
const fvar< T > & x2 
)
+
+inline
+
+ +

Definition at line 30 of file pow.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::pow (const fvar< T > & x1,
const double x2 
)
+
+inline
+
+ +

Definition at line 40 of file pow.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::pow (const var & base,
const var & exponent 
)
+
+inline
+
+ +

Return the base raised to the power of the exponent (cmath).

+

The partial derivatives are

+

$\frac{\partial}{\partial x} \mbox{pow}(x, y) = y x^{y-1}$, and

+

$\frac{\partial}{\partial y} \mbox{pow}(x, y) = x^y \ \log x$.

+

+\[ \mbox{pow}(x, y) = \begin{cases} x^y & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{pow}(x, y)}{\partial x} = \begin{cases} yx^{y-1} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{pow}(x, y)}{\partial y} = \begin{cases} x^y\ln x & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + + +
baseBase variable.
exponentExponent variable.
+
+
+
Returns
Base raised to the exponent.
+ +

Definition at line 103 of file pow.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::pow (const var & base,
const double exponent 
)
+
+inline
+
+ +

Return the base variable raised to the power of the exponent scalar (cmath).

+

The derivative for the variable is

+

$\frac{d}{dx} \mbox{pow}(x, c) = c x^{c-1}$.

+
Parameters
+ + + +
baseBase variable.
exponentExponent scalar.
+
+
+
Returns
Base raised to the exponent.
+ +

Definition at line 119 of file pow.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::pow (const double base,
const var & exponent 
)
+
+inline
+
+ +

Return the base scalar raised to the power of the exponent variable (cmath).

+

The derivative for the variable is

+

$\frac{d}{d y} \mbox{pow}(c, y) = c^y \log c $.

+
Parameters
+ + + +
baseBase scalar.
exponentExponent variable.
+
+
+
Returns
Base raised to the exponent.
+ +

Definition at line 141 of file pow.hpp.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
var stan::math::precomputed_gradients (const double value,
const std::vector< var > & operands,
const std::vector< double > & gradients 
)
+
+ +

This function returns a var for an expression that has the specified value, vector of operands, and vector of partial derivatives of value with respect to the operands.

+
Parameters
+ + + + +
[in]valueThe value of the resulting dependent variable.
[in]operandsoperands.
[in]gradientsvector of partial derivatives of result with respect to operands.
+
+
+
Returns
An auto-diff variable that uses the precomputed gradients provided.
+ +

Definition at line 98 of file precomputed_gradients.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
double stan::math::primitive_value (const var & v)
+
+inline
+
+ +

Return the primitive double value for the specified auto-diff variable.

+
Parameters
+ + +
vinput variable.
+
+
+
Returns
value of input.
+ +

Definition at line 17 of file primitive_value.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
double stan::math::primitive_value (const fvar< T > & v)
+
+inline
+
+ +

Return the primitive value of the specified forward-mode autodiff variable.

+

This function applies recursively to higher-order autodiff types to return a primitive double value.

+
Template Parameters
+ + +
Tscalar type for autodiff variable.
+
+
+
Parameters
+ + +
vinput variable.
+
+
+
Returns
primitive value of input.
+ +

Definition at line 22 of file primitive_value.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
boost::enable_if<boost::is_arithmetic<T>, T>::type stan::math::primitive_value (x)
+
+inline
+
+ +

Return the value of the specified arithmetic argument unmodified with its own declared type.

+

This template function can only be instantiated with arithmetic types as defined by Boost's is_arithmetic trait metaprogram.

+

This function differs from stan::math::value_of in that it does not cast all return types to double.

+
Template Parameters
+ + +
Ttype of arithmetic input.
+
+
+
Parameters
+ + +
xinput.
+
+
+
Returns
input unmodified.
+ +

Definition at line 30 of file primitive_value.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
boost::disable_if<boost::is_arithmetic<T>, double>::type stan::math::primitive_value (const T & x)
+
+inline
+
+ +

Return the primitive value of the specified argument.

+

This implementation only applies to non-arithmetic types as defined by Boost's is_arithmetic trait metaprogram.

+
Template Parameters
+ + +
Ttype of non-arithmetic input.
+
+
+
Parameters
+ + +
xinput.
+
+
+
Returns
value of input.
+ +

Definition at line 47 of file primitive_value.hpp.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void stan::math::print_mat_size (int n,
std::ostream & o 
)
+
+ +

Helper function to return the matrix size as either "dynamic" or "1".

+
Parameters
+ + + +
nEigen matrix size specification.
oOutput stream.
+
+
+
Returns
String representing size.
+ +

Definition at line 26 of file assign.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void stan::math::print_stack (std::ostream & o)
+
+inline
+
+ +

Prints the auto-dif variable stack.

+

This function is used for debugging purposes.

+

Only works if all members of stack are vari* as it casts to vari*.

+
Parameters
+ + +
oostream to modify
+
+
+ +

Definition at line 22 of file print_stack.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
T stan::math::prob_constrain (const T x)
+
+inline
+
+ +

Return a probability value constrained to fall between 0 and 1 (inclusive) for the specified free scalar.

+

The transform is the inverse logit,

+

$f(x) = \mbox{logit}^{-1}(x) = \frac{1}{1 + \exp(x)}$.

+
Parameters
+ + +
xFree scalar.
+
+
+
Returns
Probability-constrained result of transforming the free scalar.
+
Template Parameters
+ + +
TType of scalar.
+
+
+ +

Definition at line 27 of file prob_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
T stan::math::prob_constrain (const T x,
T & lp 
)
+
+inline
+
+ +

Return a probability value constrained to fall between 0 and 1 (inclusive) for the specified free scalar and increment the specified log probability reference with the log absolute Jacobian determinant of the transform.

+

The transform is as defined for prob_constrain(T). The log absolute Jacobian determinant is

+

The log absolute Jacobian determinant is

+

$\log | \frac{d}{dx} \mbox{logit}^{-1}(x) |$

+

$\log ((\mbox{logit}^{-1}(x)) (1 - \mbox{logit}^{-1}(x))$

+

$\log (\mbox{logit}^{-1}(x)) + \log (1 - \mbox{logit}^{-1}(x))$.

+
Parameters
+ + + +
xFree scalar.
lpLog probability reference.
+
+
+
Returns
Probability-constrained result of transforming the free scalar.
+
Template Parameters
+ + +
TType of scalar.
+
+
+ +

Definition at line 55 of file prob_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
T stan::math::prob_free (const T y)
+
+inline
+
+ +

Return the free scalar that when transformed to a probability produces the specified scalar.

+

The function that reverses the constraining transform specified in prob_constrain(T) is the logit function,

+

$f^{-1}(y) = \mbox{logit}(y) = \frac{1 - y}{y}$.

+
Parameters
+ + +
yScalar input.
+
+
+
Template Parameters
+ + +
TType of scalar.
+
+
+
Exceptions
+ + +
std::domain_errorif y is less than 0 or greater than 1.
+
+
+ +

Definition at line 27 of file prob_free.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
T stan::math::prod (const std::vector< T > & v)
+
+inline
+
+ +

Returns the product of the coefficients of the specified standard vector.

+
Parameters
+ + +
vSpecified vector.
+
+
+
Returns
Product of coefficients of vector.
+ +

Definition at line 17 of file prod.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
T stan::math::prod (const Eigen::Matrix< T, R, C > & v)
+
+inline
+
+ +

Returns the product of the coefficients of the specified column vector.

+
Parameters
+ + +
vSpecified vector.
+
+
+
Returns
Product of coefficients of vector.
+ +

Definition at line 32 of file prod.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , typename F >
+ + + + + +
+ + + + + + + + +
common_type<T1, T2>::type stan::math::promote_common (const F & u)
+
+inline
+
+ +

Definition at line 14 of file promote_common.hpp.

+ +
+
+ +
+
+
+template<typename T , typename S >
+ + + + + + + + +
promote_scalar_type<T, S>::type stan::math::promote_scalar (const S & x)
+
+ +

This is the top-level function to call to promote the scalar types of an input of type S to type T.

+
Template Parameters
+ + + +
Tscalar type of output.
Sinput type.
+
+
+
Parameters
+ + +
xinput vector.
+
+
+
Returns
input vector with scalars promoted to type T.
+ +

Definition at line 100 of file promote_scalar.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::qr_Q (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & m)
+
+ +

Definition at line 14 of file qr_Q.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
Eigen::Matrix<fvar<T>, Eigen::Dynamic, Eigen::Dynamic> stan::math::qr_Q (const Eigen::Matrix< fvar< T >, Eigen::Dynamic, Eigen::Dynamic > & m)
+
+ +

Definition at line 15 of file qr_Q.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::qr_R (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & m)
+
+ +

Definition at line 14 of file qr_R.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
Eigen::Matrix<fvar<T>, Eigen::Dynamic, Eigen::Dynamic> stan::math::qr_R (const Eigen::Matrix< fvar< T >, Eigen::Dynamic, Eigen::Dynamic > & m)
+
+ +

Definition at line 15 of file qr_R.hpp.

+ +
+
+ +
+
+
+template<int RA, int CA, int RB, int CB, typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, CB, CB> stan::math::quad_form (const Eigen::Matrix< T, RA, CA > & A,
const Eigen::Matrix< T, RB, CB > & B 
)
+
+inline
+
+ +

Compute B^T A B.

+ +

Definition at line 21 of file quad_form.hpp.

+ +
+
+ +
+
+
+template<int RA, int CA, int RB, typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
T stan::math::quad_form (const Eigen::Matrix< T, RA, CA > & A,
const Eigen::Matrix< T, RB, 1 > & B 
)
+
+inline
+
+ +

Definition at line 33 of file quad_form.hpp.

+ +
+
+ +
+
+
+template<typename TA , int RA, int CA, typename TB , int RB, int CB>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::enable_if_c< boost::is_same<TA, var>::value || boost::is_same<TB, var>::value, Eigen::Matrix<var, CB, CB> >::type stan::math::quad_form (const Eigen::Matrix< TA, RA, CA > & A,
const Eigen::Matrix< TB, RB, CB > & B 
)
+
+inline
+
+ +

Definition at line 124 of file quad_form.hpp.

+ +
+
+ +
+
+
+template<typename TA , int RA, int CA, typename TB , int RB>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::enable_if_c< boost::is_same<TA, var>::value || boost::is_same<TB, var>::value, var >::type stan::math::quad_form (const Eigen::Matrix< TA, RA, CA > & A,
const Eigen::Matrix< TB, RB, 1 > & B 
)
+
+inline
+
+ +

Definition at line 141 of file quad_form.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Matrix<typename promote_args<T1, T2>::type, Dynamic, Dynamic> stan::math::quad_form_diag (const Matrix< T1, Dynamic, Dynamic > & mat,
const Matrix< T2, R, C > & vec 
)
+
+inline
+
+ +

Definition at line 20 of file quad_form_diag.hpp.

+ +
+
+ +
+
+
+template<int RA, int CA, int RB, int CB, typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, CB, CB> stan::math::quad_form_sym (const Eigen::Matrix< fvar< T >, RA, CA > & A,
const Eigen::Matrix< double, RB, CB > & B 
)
+
+inline
+
+ +

Definition at line 14 of file quad_form_sym.hpp.

+ +
+
+ +
+
+
+template<int RA, int CA, int RB, int CB, typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, CB, CB> stan::math::quad_form_sym (const Eigen::Matrix< T, RA, CA > & A,
const Eigen::Matrix< T, RB, CB > & B 
)
+
+inline
+
+ +

Definition at line 19 of file quad_form_sym.hpp.

+ +
+
+ +
+
+
+template<typename TA , int RA, int CA, typename TB , int RB, int CB>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::enable_if_c< boost::is_same<TA, var>::value || boost::is_same<TB, var>::value, Eigen::Matrix<var, CB, CB> >::type stan::math::quad_form_sym (const Eigen::Matrix< TA, RA, CA > & A,
const Eigen::Matrix< TB, RB, CB > & B 
)
+
+inline
+
+ +

Definition at line 25 of file quad_form_sym.hpp.

+ +
+
+ +
+
+
+template<int RA, int CA, int RB, typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::quad_form_sym (const Eigen::Matrix< fvar< T >, RA, CA > & A,
const Eigen::Matrix< double, RB, 1 > & B 
)
+
+inline
+
+ +

Definition at line 28 of file quad_form_sym.hpp.

+ +
+
+ +
+
+
+template<int RA, int CA, int RB, typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
T stan::math::quad_form_sym (const Eigen::Matrix< T, RA, CA > & A,
const Eigen::Matrix< T, RB, 1 > & B 
)
+
+inline
+
+ +

Definition at line 34 of file quad_form_sym.hpp.

+ +
+
+ +
+
+
+template<int RA, int CA, int RB, int CB, typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, CB, CB> stan::math::quad_form_sym (const Eigen::Matrix< double, RA, CA > & A,
const Eigen::Matrix< fvar< T >, RB, CB > & B 
)
+
+inline
+
+ +

Definition at line 39 of file quad_form_sym.hpp.

+ +
+
+ +
+
+
+template<typename TA , int RA, int CA, typename TB , int RB>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::enable_if_c< boost::is_same<TA, var>::value || boost::is_same<TB, var>::value, var >::type stan::math::quad_form_sym (const Eigen::Matrix< TA, RA, CA > & A,
const Eigen::Matrix< TB, RB, 1 > & B 
)
+
+inline
+
+ +

Definition at line 43 of file quad_form_sym.hpp.

+ +
+
+ +
+
+
+template<int RA, int CA, int RB, typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::quad_form_sym (const Eigen::Matrix< double, RA, CA > & A,
const Eigen::Matrix< fvar< T >, RB, 1 > & B 
)
+
+inline
+
+ +

Definition at line 53 of file quad_form_sym.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int stan::math::rank (const std::vector< T > & v,
int s 
)
+
+inline
+
+ +

Return the number of components of v less than v[s].

+
Template Parameters
+ + +
TType of elements.
+
+
+
Parameters
+ + + +
[in]vInput vector.
[in]sPosition in vector.
+
+
+
Returns
Number of components of v less than v[s].
+ +

Definition at line 20 of file rank.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int stan::math::rank (const Eigen::Matrix< T, R, C > & v,
int s 
)
+
+inline
+
+ +

Return the number of components of v less than v[s].

+
Template Parameters
+ + +
TType of elements of the vector.
+
+
+
Parameters
+ + + +
[in]vInput vector.
sIndex for input vector.
+
+
+
Returns
Number of components of v less than v[s].
+ +

Definition at line 42 of file rank.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_scale >
+ + + + + + + + + + + + + + + + + + +
return_type<T_y, T_scale>::type stan::math::rayleigh_ccdf_log (const T_y & y,
const T_scale & sigma 
)
+
+ +

Definition at line 27 of file rayleigh_ccdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_scale >
+ + + + + + + + + + + + + + + + + + +
return_type<T_y, T_scale>::type stan::math::rayleigh_cdf (const T_y & y,
const T_scale & sigma 
)
+
+ +

Definition at line 28 of file rayleigh_cdf.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_scale >
+ + + + + + + + + + + + + + + + + + +
return_type<T_y, T_scale>::type stan::math::rayleigh_cdf_log (const T_y & y,
const T_scale & sigma 
)
+
+ +

Definition at line 28 of file rayleigh_cdf_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_scale >
+ + + + + + + + + + + + + + + + + + +
return_type<T_y, T_scale>::type stan::math::rayleigh_log (const T_y & y,
const T_scale & sigma 
)
+
+ +

Definition at line 29 of file rayleigh_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_scale >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
return_type<T_y, T_scale>::type stan::math::rayleigh_log (const T_y & y,
const T_scale & sigma 
)
+
+inline
+
+ +

Definition at line 109 of file rayleigh_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
double stan::math::rayleigh_rng (const double sigma,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 27 of file rayleigh_rng.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::read_corr_L (const Eigen::Array< T, Eigen::Dynamic, 1 > & CPCs,
const size_t K 
)
+
+ +

Return the Cholesky factor of the correlation matrix of the specified dimensionality corresponding to the specified canonical partial correlations.

+

It is generally better to work with the Cholesky factor rather than the correlation matrix itself when the determinant, inverse, etc. of the correlation matrix is needed for some statistical calculation.

+

See read_corr_matrix(Array, size_t, T) for more information.

+
Parameters
+ + + +
CPCsThe (K choose 2) canonical partial correlations in (-1, 1).
KDimensionality of correlation matrix.
+
+
+
Returns
Cholesky factor of correlation matrix for specified canonical partial correlations.
+
Template Parameters
+ + +
TType of underlying scalar.
+
+
+ +

Definition at line 41 of file read_corr_L.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::read_corr_L (const Eigen::Array< T, Eigen::Dynamic, 1 > & CPCs,
const size_t K,
T & log_prob 
)
+
+ +

Return the Cholesky factor of the correlation matrix of the specified dimensionality corresponding to the specified canonical partial correlations, incrementing the specified scalar reference with the log absolute determinant of the Jacobian of the transformation.

+

The implementation is Ben Goodrich's Cholesky factor-based approach to the C-vine method of:

+
    +
  • +Daniel Lewandowski, Dorota Kurowicka, and Harry Joe, Generating random correlation matrices based on vines and extended onion method Journal of Multivariate Analysis 100 (2009) 1989–2001
  • +
+
Parameters
+ + + + +
CPCsThe (K choose 2) canonical partial correlations in (-1, 1).
KDimensionality of correlation matrix.
log_probReference to variable to increment with the log Jacobian determinant.
+
+
+
Returns
Cholesky factor of correlation matrix for specified partial correlations.
+
Template Parameters
+ + +
TType of underlying scalar.
+
+
+ +

Definition at line 95 of file read_corr_L.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::read_corr_matrix (const Eigen::Array< T, Eigen::Dynamic, 1 > & CPCs,
const size_t K 
)
+
+ +

Return the correlation matrix of the specified dimensionality corresponding to the specified canonical partial correlations.

+

See read_corr_matrix(Array, size_t, T) for more information.

+
Parameters
+ + + +
CPCsThe (K choose 2) canonical partial correlations in (-1, 1).
KDimensionality of correlation matrix.
+
+
+
Returns
Cholesky factor of correlation matrix for specified canonical partial correlations.
+
Template Parameters
+ + +
TType of underlying scalar.
+
+
+ +

Definition at line 28 of file read_corr_matrix.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::read_corr_matrix (const Eigen::Array< T, Eigen::Dynamic, 1 > & CPCs,
const size_t K,
T & log_prob 
)
+
+ +

Return the correlation matrix of the specified dimensionality corresponding to the specified canonical partial correlations, incrementing the specified scalar reference with the log absolute determinant of the Jacobian of the transformation.

+

It is usually preferable to utilize the version that returns the Cholesky factor of the correlation matrix rather than the correlation matrix itself in statistical calculations.

+
Parameters
+ + + + +
CPCsThe (K choose 2) canonical partial correlations in (-1, 1).
KDimensionality of correlation matrix.
log_probReference to variable to increment with the log Jacobian determinant.
+
+
+
Returns
Correlation matrix for specified partial correlations.
+
Template Parameters
+ + +
TType of underlying scalar.
+
+
+ +

Definition at line 56 of file read_corr_matrix.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::read_cov_L (const Eigen::Array< T, Eigen::Dynamic, 1 > & CPCs,
const Eigen::Array< T, Eigen::Dynamic, 1 > & sds,
T & log_prob 
)
+
+ +

This is the function that should be called prior to evaluating the density of any elliptical distribution.

+
Parameters
+ + + + +
CPCson (-1, 1)
sdson (0, inf)
log_probthe log probability value to increment with the Jacobian
+
+
+
Returns
Cholesky factor of covariance matrix for specified partial correlations.
+ +

Definition at line 23 of file read_cov_L.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::read_cov_matrix (const Eigen::Array< T, Eigen::Dynamic, 1 > & CPCs,
const Eigen::Array< T, Eigen::Dynamic, 1 > & sds,
T & log_prob 
)
+
+ +

A generally worse alternative to call prior to evaluating the density of an elliptical distribution.

+
Parameters
+ + + + +
CPCson (-1, 1)
sdson (0, inf)
log_probthe log probability value to increment with the Jacobian
+
+
+
Returns
Covariance matrix for specified partial correlations.
+ +

Definition at line 23 of file read_cov_matrix.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::read_cov_matrix (const Eigen::Array< T, Eigen::Dynamic, 1 > & CPCs,
const Eigen::Array< T, Eigen::Dynamic, 1 > & sds 
)
+
+ +

Builds a covariance matrix from CPCs and standard deviations.

+
Parameters
+ + + +
CPCsin (-1, 1)
sdsin (0, inf)
+
+
+ +

Definition at line 41 of file read_cov_matrix.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
static void stan::math::recover_memory ()
+
+inlinestatic
+
+ +

Recover memory used for all variables for reuse.

+
Exceptions
+ + +
std::logic_errorif empty_nested() returns false
+
+
+ +

Definition at line 19 of file recover_memory.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
static void stan::math::recover_memory_nested ()
+
+inlinestatic
+
+ +

Recover only the memory used for the top nested call.

+

If there is nothing on the nested stack, then a std::logic_error exception is thrown.

+
Exceptions
+ + +
std::logic_errorif empty_nested() returns true
+
+
+ +

Definition at line 21 of file recover_memory_nested.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::vector<T> stan::math::rep_array (const T & x,
int n 
)
+
+inline
+
+ +

Definition at line 13 of file rep_array.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
std::vector<std::vector<T> > stan::math::rep_array (const T & x,
int m,
int n 
)
+
+inline
+
+ +

Definition at line 21 of file rep_array.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
std::vector<std::vector<std::vector<T> > > stan::math::rep_array (const T & x,
int k,
int m,
int n 
)
+
+inline
+
+ +

Definition at line 31 of file rep_array.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename boost::math::tools::promote_args<T>::type, Eigen::Dynamic, Eigen::Dynamic> stan::math::rep_matrix (const T & x,
int m,
int n 
)
+
+inline
+
+ +

Definition at line 16 of file rep_matrix.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::rep_matrix (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & v,
int n 
)
+
+inline
+
+ +

Definition at line 26 of file rep_matrix.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::math::rep_matrix (const Eigen::Matrix< T, 1, Eigen::Dynamic > & rv,
int m 
)
+
+inline
+
+ +

Definition at line 36 of file rep_matrix.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename boost::math::tools::promote_args<T>::type, 1, Eigen::Dynamic> stan::math::rep_row_vector (const T & x,
int m 
)
+
+inline
+
+ +

Definition at line 15 of file rep_row_vector.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename boost::math::tools::promote_args<T>::type, Eigen::Dynamic, 1> stan::math::rep_vector (const T & x,
int n 
)
+
+inline
+
+ +

Definition at line 16 of file rep_vector.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void stan::math::resize (T & x,
std::vector< size_t > dims 
)
+
+inline
+
+ +

Recursively resize the specified vector of vectors, which must bottom out at scalar values, Eigen vectors or Eigen matrices.

+
Parameters
+ + + +
xArray-like object to resize.
dimsNew dimensions.
+
+
+
Template Parameters
+ + +
TType of object being resized.
+
+
+ +

Definition at line 63 of file resize.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::rising_factorial (const fvar< T > & x,
const fvar< T > & n 
)
+
+inline
+
+ +

Definition at line 16 of file rising_factorial.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::rising_factorial (const fvar< T > & x,
const double n 
)
+
+inline
+
+ +

Definition at line 28 of file rising_factorial.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::rising_factorial (const double x,
const fvar< T > & n 
)
+
+inline
+
+ +

Definition at line 41 of file rising_factorial.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::rising_factorial (const var & a,
const double & b 
)
+
+inline
+
+ +

Definition at line 54 of file rising_factorial.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T1, T2>::type stan::math::rising_factorial (const T1 x,
const T2 n 
)
+
+inline
+
+ +

+\[ \mbox{rising\_factorial}(x, n) = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ x^{(n)} & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +

+

+

+\[ \frac{\partial\, \mbox{rising\_factorial}(x, n)}{\partial x} = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ \frac{\partial\, x^{(n)}}{\partial x} & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{rising\_factorial}(x, n)}{\partial n} = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ \frac{\partial\, x^{(n)}}{\partial n} & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +

+

+\[ x^{(n)}=\frac{\Gamma(x+n)}{\Gamma(x)} \] +

+

+\[ \frac{\partial \, x^{(n)}}{\partial x} = x^{(n)}(\Psi(x+n)-\Psi(x)) \] +

+

+\[ \frac{\partial \, x^{(n)}}{\partial n} = (x)_n\Psi(x+n) \] +

+ +

Definition at line 54 of file rising_factorial.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::rising_factorial (const var & a,
const var & b 
)
+
+inline
+
+ +

Definition at line 59 of file rising_factorial.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::rising_factorial (const double & a,
const var & b 
)
+
+inline
+
+ +

Definition at line 64 of file rising_factorial.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::round (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 11 of file round.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::round (const var & a)
+
+inline
+
+ +

Returns the rounded form of the specified variable (C99).

+

See round() for the double-based version.

+

The derivative is zero everywhere but numbers half way between whole numbers, so for convenience the derivative is defined to be everywhere zero,

+

$\frac{d}{dx} \mbox{round}(x) = 0$.

+

+\[ \mbox{round}(x) = \begin{cases} \lceil x \rceil & \mbox{if } x-\lfloor x\rfloor \geq 0.5 \\ \lfloor x \rfloor & \mbox{if } x-\lfloor x\rfloor < 0.5 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{round}(x)}{\partial x} = \begin{cases} 0 & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
aSpecified variable.
+
+
+
Returns
Rounded variable.
+ +

Definition at line 57 of file round.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, 1, Eigen::Dynamic> stan::math::row (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & m,
size_t i 
)
+
+inline
+
+ +

Return the specified row of the specified matrix, using start-at-1 indexing.

+

This is equivalent to calling m.row(i - 1) and assigning the resulting template expression to a row vector.

+
Template Parameters
+ + +
TScalar value type for matrix.
+
+
+
Parameters
+ + + +
mMatrix.
iRow index (count from 1).
+
+
+
Returns
Specified row of the matrix.
+ +

Definition at line 25 of file row.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
int stan::math::rows (const Eigen::Matrix< T, R, C > & m)
+
+inline
+
+ +

Return the number of rows in the specified matrix, vector, or row vector.

+
Template Parameters
+ + + + +
TType of matrix entries.
RRow type of matrix.
CColumn type of matrix.
+
+
+
Parameters
+ + +
[in]mInput matrix, vector, or row vector.
+
+
+
Returns
Number of rows.
+ +

Definition at line 20 of file rows.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R1, 1> stan::math::rows_dot_product (const Eigen::Matrix< fvar< T >, R1, C1 > & v1,
const Eigen::Matrix< fvar< T >, R2, C2 > & v2 
)
+
+inline
+
+ +

Definition at line 18 of file rows_dot_product.hpp.

+ +
+
+ +
+
+
+template<int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<double, R1, 1> stan::math::rows_dot_product (const Eigen::Matrix< double, R1, C1 > & v1,
const Eigen::Matrix< double, R2, C2 > & v2 
)
+
+inline
+
+ +

Returns the dot product of the specified vectors.

+
Parameters
+ + + +
v1First vector.
v2Second vector.
+
+
+
Returns
Dot product of the vectors.
+
Exceptions
+ + +
std::domain_errorIf the vectors are not the same size or if they are both not vector dimensioned.
+
+
+ +

Definition at line 22 of file rows_dot_product.hpp.

+ +
+
+ +
+
+
+template<typename T1 , int R1, int C1, typename T2 , int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::enable_if_c<boost::is_same<T1, var>::value || boost::is_same<T2, var>::value, Eigen::Matrix<var, R1, 1> >::type stan::math::rows_dot_product (const Eigen::Matrix< T1, R1, C1 > & v1,
const Eigen::Matrix< T2, R2, C2 > & v2 
)
+
+inline
+
+ +

Definition at line 25 of file rows_dot_product.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R1, 1> stan::math::rows_dot_product (const Eigen::Matrix< double, R1, C1 > & v1,
const Eigen::Matrix< fvar< T >, R2, C2 > & v2 
)
+
+inline
+
+ +

Definition at line 35 of file rows_dot_product.hpp.

+ +
+
+ +
+
+
+template<typename T , int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R1, 1> stan::math::rows_dot_product (const Eigen::Matrix< fvar< T >, R1, C1 > & v1,
const Eigen::Matrix< double, R2, C2 > & v2 
)
+
+inline
+
+ +

Definition at line 52 of file rows_dot_product.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<fvar<T>, R, 1> stan::math::rows_dot_self (const Eigen::Matrix< fvar< T >, R, C > & x)
+
+inline
+
+ +

Definition at line 15 of file rows_dot_self.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<T, R, 1> stan::math::rows_dot_self (const Eigen::Matrix< T, R, C > & x)
+
+inline
+
+ +

Returns the dot product of each row of a matrix with itself.

+
Parameters
+ + +
xMatrix.
+
+
+
Template Parameters
+ + +
Tscalar type
+
+
+ +

Definition at line 16 of file rows_dot_self.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::scaled_add (std::vector< double > & x,
const std::vector< double > & y,
const double lambda 
)
+
+inline
+
+ +

Definition at line 11 of file scaled_add.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_dof , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_dof, T_scale>::type stan::math::scaled_inv_chi_square_ccdf_log (const T_y & y,
const T_dof & nu,
const T_scale & s 
)
+
+ +

Definition at line 31 of file scaled_inv_chi_square_ccdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_dof , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_dof, T_scale>::type stan::math::scaled_inv_chi_square_cdf (const T_y & y,
const T_dof & nu,
const T_scale & s 
)
+
+ +

The CDF of a scaled inverse chi-squared density for y with the specified degrees of freedom parameter and scale parameter.

+
Parameters
+ + + + +
yA scalar variable.
nuDegrees of freedom.
sScale parameter.
+
+
+
Exceptions
+ + + + +
std::domain_errorif nu is not greater than 0
std::domain_errorif s is not greater than 0.
std::domain_errorif y is not greater than 0.
+
+
+
Template Parameters
+ + + +
T_yType of scalar.
T_dofType of degrees of freedom.
+
+
+ +

Definition at line 46 of file scaled_inv_chi_square_cdf.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_dof , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_dof, T_scale>::type stan::math::scaled_inv_chi_square_cdf_log (const T_y & y,
const T_dof & nu,
const T_scale & s 
)
+
+ +

Definition at line 32 of file scaled_inv_chi_square_cdf_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_dof , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_dof, T_scale>::type stan::math::scaled_inv_chi_square_log (const T_y & y,
const T_dof & nu,
const T_scale & s 
)
+
+ +

The log of a scaled inverse chi-squared density for y with the specified degrees of freedom parameter and scale parameter.

+

+\begin{eqnarray*} y &\sim& \mbox{\sf{Inv-}}\chi^2(\nu, s^2) \\ \log (p (y \, |\, \nu, s)) &=& \log \left( \frac{(\nu / 2)^{\nu / 2}}{\Gamma (\nu / 2)} s^\nu y^{- (\nu / 2 + 1)} \exp^{-\nu s^2 / (2y)} \right) \\ &=& \frac{\nu}{2} \log(\frac{\nu}{2}) - \log (\Gamma (\nu / 2)) + \nu \log(s) - (\frac{\nu}{2} + 1) \log(y) - \frac{\nu s^2}{2y} \\ & & \mathrm{ where } \; y > 0 \end{eqnarray*} +

+
Parameters
+ + + + +
yA scalar variable.
nuDegrees of freedom.
sScale parameter.
+
+
+
Exceptions
+ + + + +
std::domain_errorif nu is not greater than 0
std::domain_errorif s is not greater than 0.
std::domain_errorif y is not greater than 0.
+
+
+
Template Parameters
+ + + +
T_yType of scalar.
T_dofType of degrees of freedom.
+
+
+ +

Definition at line 51 of file scaled_inv_chi_square_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_dof , typename T_scale >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_dof, T_scale>::type stan::math::scaled_inv_chi_square_log (const T_y & y,
const T_dof & nu,
const T_scale & s 
)
+
+inline
+
+ +

Definition at line 173 of file scaled_inv_chi_square_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
double stan::math::scaled_inv_chi_square_rng (const double nu,
const double s,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 29 of file scaled_inv_chi_square_rng.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
boost::math::tools::promote_args<T>::type stan::math::sd (const std::vector< T > & v)
+
+inline
+
+ +

Returns the unbiased sample standard deviation of the coefficients in the specified column vector.

+
Parameters
+ + +
vSpecified vector.
+
+
+
Returns
Sample variance of vector.
+ +

Definition at line 22 of file sd.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
boost::math::tools::promote_args<T>::type stan::math::sd (const Eigen::Matrix< T, R, C > & m)
+
+inline
+
+ +

Returns the unbiased sample standard deviation of the coefficients in the specified vector, row vector, or matrix.

+
Parameters
+ + +
mSpecified vector, row vector or matrix.
+
+
+
Returns
Sample variance.
+ +

Definition at line 37 of file sd.hpp.

+ +
+
+ +
+
+ + + + + + + + +
var stan::math::sd (const std::vector< var > & v)
+
+ +

Return the sample standard deviation of the specified standard vector.

+

Raise domain error if size is not greater than zero.

+
Parameters
+ + +
[in]va vector
+
+
+
Returns
sample standard deviation of specified vector
+ +

Definition at line 65 of file sd.hpp.

+ +
+
+ +
+
+
+template<int R, int C>
+ + + + + + + + +
var stan::math::sd (const Eigen::Matrix< var, R, C > & m)
+
+ +

Definition at line 82 of file sd.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::segment (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & v,
size_t i,
size_t n 
)
+
+inline
+
+ +

Return the specified number of elements as a vector starting from the specified element - 1 of the specified vector.

+ +

Definition at line 19 of file segment.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, 1, Eigen::Dynamic> stan::math::segment (const Eigen::Matrix< T, 1, Eigen::Dynamic > & v,
size_t i,
size_t n 
)
+
+inline
+
+ +

Definition at line 35 of file segment.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + + + + + + + +
std::vector<T> stan::math::segment (const std::vector< T > & sv,
size_t i,
size_t n 
)
+
+ +

Definition at line 52 of file segment.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
static void stan::math::set_zero_all_adjoints ()
+
+static
+
+ +

Reset all adjoint values in the stack to zero.

+ +

Definition at line 14 of file set_zero_all_adjoints.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
int stan::math::sign (const T & z)
+
+inline
+
+ +

Definition at line 9 of file sign.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::simplex_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & y)
+
+ +

Return the simplex corresponding to the specified free vector.

+

A simplex is a vector containing values greater than or equal to 0 that sum to 1. A vector with (K-1) unconstrained values will produce a simplex of size K.

+

The transform is based on a centered stick-breaking process.

+
Parameters
+ + +
yFree vector input of dimensionality K - 1.
+
+
+
Returns
Simplex of dimensionality K.
+
Template Parameters
+ + +
TType of scalar.
+
+
+ +

Definition at line 30 of file simplex_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::simplex_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & y,
T & lp 
)
+
+ +

Return the simplex corresponding to the specified free vector and increment the specified log probability reference with the log absolute Jacobian determinant of the transform.

+

The simplex transform is defined through a centered stick-breaking process.

+
Parameters
+ + + +
yFree vector input of dimensionality K - 1.
lpLog probability reference to increment.
+
+
+
Returns
Simplex of dimensionality K.
+
Template Parameters
+ + +
TType of scalar.
+
+
+ +

Definition at line 69 of file simplex_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::simplex_free (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & x)
+
+ +

Return an unconstrained vector that when transformed produces the specified simplex.

+

It applies to a simplex of dimensionality K and produces an unconstrained vector of dimensionality (K-1).

+

The simplex transform is defined through a centered stick-breaking process.

+
Parameters
+ + +
xSimplex of dimensionality K.
+
+
+
Returns
Free vector of dimensionality (K-1) that transfroms to the simplex.
+
Template Parameters
+ + +
TType of scalar.
+
+
+
Exceptions
+ + +
std::domain_errorif x is not a valid simplex
+
+
+ +

Definition at line 30 of file simplex_free.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::sin (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 14 of file sin.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::sin (const var & a)
+
+inline
+
+ +

Return the sine of a radian-scaled variable (cmath).

+

The derivative is defined by

+

$\frac{d}{dx} \sin x = \cos x$.

+

+\[ \mbox{sin}(x) = \begin{cases} \sin(x) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{sin}(x)}{\partial x} = \begin{cases} \cos(x) & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
aVariable for radians of angle.
+
+
+
Returns
Sine of variable.
+ +

Definition at line 49 of file sin.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::singular_values (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & m)
+
+ +

Return the vector of the singular values of the specified matrix in decreasing order of magnitude.

+

See the documentation for svd() for information on the signular values.

+
Parameters
+ + +
mSpecified matrix.
+
+
+
Returns
Singular values of the matrix.
+ +

Definition at line 21 of file singular_values.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::sinh (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 14 of file sinh.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::sinh (const var & a)
+
+inline
+
+ +

Return the hyperbolic sine of the specified variable (cmath).

+

The derivative is defined by

+

$\frac{d}{dx} \sinh x = \cosh x$.

+

+\[ \mbox{sinh}(x) = \begin{cases} \sinh(x) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{sinh}(x)}{\partial x} = \begin{cases} \cosh(x) & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
aVariable.
+
+
+
Returns
Hyperbolic sine of variable.
+ +

Definition at line 49 of file sinh.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
int stan::math::size (const std::vector< T > & x)
+
+inline
+
+ +

Return the size of the specified standard vector.

+
Template Parameters
+ + +
TType of elements.
+
+
+
Parameters
+ + +
[in]xInput vector.
+
+
+
Returns
Size of input vector.
+ +

Definition at line 17 of file size.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale, T_shape>::type stan::math::skew_normal_ccdf_log (const T_y & y,
const T_loc & mu,
const T_scale & sigma,
const T_shape & alpha 
)
+
+ +

Definition at line 26 of file skew_normal_ccdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale, T_shape>::type stan::math::skew_normal_cdf (const T_y & y,
const T_loc & mu,
const T_scale & sigma,
const T_shape & alpha 
)
+
+ +

Definition at line 26 of file skew_normal_cdf.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale, T_shape>::type stan::math::skew_normal_cdf_log (const T_y & y,
const T_loc & mu,
const T_scale & sigma,
const T_shape & alpha 
)
+
+ +

Definition at line 26 of file skew_normal_cdf_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_shape >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale, T_shape>::type stan::math::skew_normal_log (const T_y & y,
const T_loc & mu,
const T_scale & sigma,
const T_shape & alpha 
)
+
+ +

Definition at line 27 of file skew_normal_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale, T_shape>::type stan::math::skew_normal_log (const T_y & y,
const T_loc & mu,
const T_scale & sigma,
const T_shape & alpha 
)
+
+inline
+
+ +

Definition at line 146 of file skew_normal_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
double stan::math::skew_normal_rng (const double mu,
const double sigma,
const double alpha,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 24 of file skew_normal_rng.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<fvar<T>, Eigen::Dynamic, 1> stan::math::softmax (const Eigen::Matrix< fvar< T >, Eigen::Dynamic, 1 > & alpha)
+
+inline
+
+ +

Definition at line 14 of file softmax.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::softmax (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & v)
+
+inline
+
+ +

Return the softmax of the specified vector.

+

$ \mbox{softmax}(y) = \frac{\exp(y)} {\sum_{k=1}^K \exp(y_k)}, $

+

The entries in the Jacobian of the softmax function are given by $ \begin{array}{l} \displaystyle \frac{\partial}{\partial y_m} \mbox{softmax}(y)[k] \\[8pt] \displaystyle \mbox{ } \ \ \ = \left\{ \begin{array}{ll} \mbox{softmax}(y)[k] - \mbox{softmax}(y)[k] \times \mbox{softmax}(y)[m] & \mbox{ if } m = k, \mbox{ and} \\[6pt] \mbox{softmax}(y)[k] * \mbox{softmax}(y)[m] & \mbox{ if } m \neq k. \end{array} \right. \end{array} $

+
Template Parameters
+ + +
TScalar type of values in vector.
+
+
+
Parameters
+ + +
[in]vVector to transform.
+
+
+
Returns
Unit simplex result of the softmax transform of the vector.
+ +

Definition at line 46 of file softmax.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<var, Eigen::Dynamic, 1> stan::math::softmax (const Eigen::Matrix< var, Eigen::Dynamic, 1 > & alpha)
+
+inline
+
+ +

Return the softmax of the specified Eigen vector.

+

Softmax is guaranteed to return a simplex.

+

The gradient calculations are unfolded.

+
Parameters
+ + +
alphaUnconstrained input vector.
+
+
+
Returns
Softmax of the input.
+
Exceptions
+ + +
std::domain_errorIf the input vector is size 0.
+
+
+ +

Definition at line 59 of file softmax.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
std::vector< fvar<T> > stan::math::sort_asc (std::vector< fvar< T > > xs)
+
+inline
+
+ +

Definition at line 17 of file sort_asc.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
std::vector<T> stan::math::sort_asc (std::vector< T > xs)
+
+inline
+
+ +

Return the specified standard vector in ascending order.

+
Parameters
+ + +
xsStandard vector to order.
+
+
+
Returns
Standard vector ordered.
+
Template Parameters
+ + +
TType of elements of the vector.
+
+
+ +

Definition at line 20 of file sort.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
std::vector<var> stan::math::sort_asc (std::vector< var > xs)
+
+inline
+
+ +

Return the specified standard vector in ascending order with gradients kept.

+
Parameters
+ + +
xsStandard vector to order.
+
+
+
Returns
Standard vector ordered.
+
Template Parameters
+ + +
TType of elements of the vector.
+
+
+ +

Definition at line 21 of file sort_asc.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<fvar<T>, R, C> stan::math::sort_asc (Eigen::Matrix< fvar< T >, R, C > xs)
+
+inline
+
+ +

Definition at line 25 of file sort_asc.hpp.

+ +
+
+ +
+
+
+template<int R, int C>
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<var, R, C> stan::math::sort_asc (Eigen::Matrix< var, R, C > xs)
+
+inline
+
+ +

Return the specified eigen vector in ascending order with gradients kept.

+
Parameters
+ + +
xsEigen vector to order.
+
+
+
Returns
Eigen vector ordered.
+
Template Parameters
+ + +
TType of elements of the vector.
+
+
+ +

Definition at line 35 of file sort_asc.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<T, R, C> stan::math::sort_asc (Eigen::Matrix< T, R, C > xs)
+
+inline
+
+ +

Return the specified eigen vector in ascending order.

+
Parameters
+ + +
xsEigen vector to order.
+
+
+
Returns
Eigen vector ordered.
+
Template Parameters
+ + +
TType of elements of the vector.
+
+
+ +

Definition at line 46 of file sort.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
std::vector< fvar<T> > stan::math::sort_desc (std::vector< fvar< T > > xs)
+
+inline
+
+ +

Definition at line 17 of file sort_desc.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
std::vector<var> stan::math::sort_desc (std::vector< var > xs)
+
+inline
+
+ +

Return the specified standard vector in descending order with gradients kept.

+
Parameters
+ + +
xsStandard vector to order.
+
+
+
Returns
Standard vector ordered.
+
Template Parameters
+ + +
TType of elements of the vector.
+
+
+ +

Definition at line 21 of file sort_desc.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<fvar<T>, R, C> stan::math::sort_desc (Eigen::Matrix< fvar< T >, R, C > xs)
+
+inline
+
+ +

Definition at line 25 of file sort_desc.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
std::vector<T> stan::math::sort_desc (std::vector< T > xs)
+
+inline
+
+ +

Return the specified standard vector in descending order.

+
Parameters
+ + +
xsStandard vector to order.
+
+
+
Returns
Standard vector ordered.
+
Template Parameters
+ + +
TType of elements of the vector.
+
+
+ +

Definition at line 33 of file sort.hpp.

+ +
+
+ +
+
+
+template<int R, int C>
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<var, R, C> stan::math::sort_desc (Eigen::Matrix< var, R, C > xs)
+
+inline
+
+ +

Return the specified eigen vector in descending order with gradients kept.

+
Parameters
+ + +
xsEigen vector to order.
+
+
+
Returns
Eigen vector ordered.
+
Template Parameters
+ + +
TType of elements of the vector.
+
+
+ +

Definition at line 35 of file sort_desc.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<T, R, C> stan::math::sort_desc (Eigen::Matrix< T, R, C > xs)
+
+inline
+
+ +

Return the specified eigen vector in descending order.

+
Parameters
+ + +
xsEigen vector to order.
+
+
+
Returns
Eigen vector ordered.
+
Template Parameters
+ + +
TType of elements of the vector.
+
+
+ +

Definition at line 60 of file sort.hpp.

+ +
+
+ +
+
+
+template<typename C >
+ + + + + + + + +
std::vector<int> stan::math::sort_indices_asc (const C & xs)
+
+ +

Return a sorted copy of the argument container in ascending order.

+
Template Parameters
+ + +
Ctype of container
+
+
+
Parameters
+ + +
xsContainer to sort
+
+
+
Returns
sorted version of container
+ +

Definition at line 23 of file sort_indices_asc.hpp.

+ +
+
+ +
+
+
+template<typename C >
+ + + + + + + + +
std::vector<int> stan::math::sort_indices_desc (const C & xs)
+
+ +

Return a sorted copy of the argument container in ascending order.

+
Template Parameters
+ + +
Ctype of container
+
+
+
Parameters
+ + +
xsContainer to sort
+
+
+
Returns
sorted version of container
+ +

Definition at line 23 of file sort_indices_desc.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::sqrt (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 15 of file sqrt.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::sqrt (const var & a)
+
+inline
+
+ +

Return the square root of the specified variable (cmath).

+

The derivative is defined by

+

$\frac{d}{dx} \sqrt{x} = \frac{1}{2 \sqrt{x}}$.

+

+\[ \mbox{sqrt}(x) = \begin{cases} \textrm{NaN} & x < 0 \\ \sqrt{x} & \mbox{if } x\geq 0\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{sqrt}(x)}{\partial x} = \begin{cases} \textrm{NaN} & x < 0 \\ \frac{1}{2\sqrt{x}} & x\geq 0\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
aVariable whose square root is taken.
+
+
+
Returns
Square root of variable.
+ +

Definition at line 50 of file sqrt.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
double stan::math::sqrt2 ()
+
+inline
+
+ +

Return the square root of two.

+
Returns
Square root of two.
+ +

Definition at line 104 of file constants.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::square (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 15 of file square.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
T stan::math::square (const T x)
+
+inline
+
+ +

Return the square of the specified argument.

+

$\mbox{square}(x) = x^2$.

+

The implementation of square(x) is just x * x. Given this, this method is mainly useful in cases where x is not a simple primitive type, particularly when it is an auto-dif type.

+
Parameters
+ + +
xInput to square.
+
+
+
Returns
Square of input.
+
Template Parameters
+ + +
TType of scalar.
+
+
+ +

Definition at line 22 of file square.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::square (const var & x)
+
+inline
+
+ +

Return the square of the input variable.

+

Using square(x) is more efficient than using x * x.

+

+\[ \mbox{square}(x) = \begin{cases} x^2 & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{square}(x)}{\partial x} = \begin{cases} 2x & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
xVariable to square.
+
+
+
Returns
Square of variable.
+ +

Definition at line 46 of file square.hpp.

+ +
+
+ +
+
+
+template<int R1, int C1, int R2, int C2, typename T1 , typename T2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T1, T2>::type stan::math::squared_distance (const Eigen::Matrix< T1, R1, C1 > & v1,
const Eigen::Matrix< T2, R2, C2 > & v2 
)
+
+inline
+
+ +

Returns the squared distance between the specified vectors.

+
Parameters
+ + + +
v1First vector.
v2Second vector.
+
+
+
Returns
Dot product of the vectors.
+
Exceptions
+ + +
std::domain_errorIf the vectors are not the same size or if they are both not vector dimensioned.
+
+
+ +

Definition at line 22 of file squared_distance.hpp.

+ +
+
+ +
+
+
+template<int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::squared_distance (const Eigen::Matrix< var, R1, C1 > & v1,
const Eigen::Matrix< var, R2, C2 > & v2 
)
+
+inline
+
+ +

Definition at line 112 of file squared_distance.hpp.

+ +
+
+ +
+
+
+template<int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::squared_distance (const Eigen::Matrix< var, R1, C1 > & v1,
const Eigen::Matrix< double, R2, C2 > & v2 
)
+
+inline
+
+ +

Definition at line 122 of file squared_distance.hpp.

+ +
+
+ +
+
+
+template<int R1, int C1, int R2, int C2>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
var stan::math::squared_distance (const Eigen::Matrix< double, R1, C1 > & v1,
const Eigen::Matrix< var, R2, C2 > & v2 
)
+
+inline
+
+ +

Definition at line 132 of file squared_distance.hpp.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void stan::math::stan_print (std::ostream * o,
const var & x 
)
+
+ +

Definition at line 10 of file stan_print.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + +
void stan::math::stan_print (std::ostream * o,
const T & x 
)
+
+ +

Definition at line 12 of file stan_print.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + +
void stan::math::stan_print (std::ostream * o,
const std::vector< T > & x 
)
+
+ +

Definition at line 17 of file stan_print.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + +
void stan::math::stan_print (std::ostream * o,
const Eigen::Matrix< T, Eigen::Dynamic, 1 > & x 
)
+
+ +

Definition at line 27 of file stan_print.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + +
void stan::math::stan_print (std::ostream * o,
const Eigen::Matrix< T, 1, Eigen::Dynamic > & x 
)
+
+ +

Definition at line 38 of file stan_print.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + +
void stan::math::stan_print (std::ostream * o,
const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & x 
)
+
+ +

Definition at line 49 of file stan_print.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
static void stan::math::start_nested ()
+
+inlinestatic
+
+ +

Record the current position so that recover_memory_nested() can find it.

+ +

Definition at line 13 of file start_nested.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::step (const stan::math::vara)
+
+inline
+
+ +

Return the step, or heaviside, function applied to the specified variable (stan).

+

See stan::math::step() for the double-based version.

+

The derivative of the step function is zero everywhere but at 0, so for convenience, it is taken to be everywhere zero,

+

$\mbox{step}(x) = 0$.

+
Parameters
+ + +
aVariable argument.
+
+
+
Returns
The constant variable with value 1.0 if the argument's value is greater than or equal to 0.0, and value 0.0 otherwise.
+ +

Definition at line 25 of file step.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
int stan::math::step (const T y)
+
+inline
+
+ +

The step, or Heaviside, function.

+

The function is defined by

+

step(y) = (y < 0.0) ? 0 : 1.

+

+\[ \mbox{step}(x) = \begin{cases} 0 & \mbox{if } x \leq 0 \\ 1 & \mbox{if } x > 0 \\[6pt] 0 & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
yScalar argument.
+
+
+
Returns
1 if the specified argument is greater than or equal to 0.0, and 0 otherwise.
+ +

Definition at line 29 of file step.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_dof , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_dof, T_loc, T_scale>::type stan::math::student_t_ccdf_log (const T_y & y,
const T_dof & nu,
const T_loc & mu,
const T_scale & sigma 
)
+
+ +

Definition at line 31 of file student_t_ccdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_dof , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_dof, T_loc, T_scale>::type stan::math::student_t_cdf (const T_y & y,
const T_dof & nu,
const T_loc & mu,
const T_scale & sigma 
)
+
+ +

Definition at line 31 of file student_t_cdf.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_dof , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_dof, T_loc, T_scale>::type stan::math::student_t_cdf_log (const T_y & y,
const T_dof & nu,
const T_loc & mu,
const T_scale & sigma 
)
+
+ +

Definition at line 31 of file student_t_cdf_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_dof , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_dof, T_loc, T_scale>::type stan::math::student_t_log (const T_y & y,
const T_dof & nu,
const T_loc & mu,
const T_scale & sigma 
)
+
+ +

The log of the Student-t density for the given y, nu, mean, and scale parameter.

+

The scale parameter must be greater than 0.

+

+\begin{eqnarray*} y &\sim& t_{\nu} (\mu, \sigma^2) \\ \log (p (y \, |\, \nu, \mu, \sigma) ) &=& \log \left( \frac{\Gamma((\nu + 1) /2)} {\Gamma(\nu/2)\sqrt{\nu \pi} \sigma} \left( 1 + \frac{1}{\nu} (\frac{y - \mu}{\sigma})^2 \right)^{-(\nu + 1)/2} \right) \\ &=& \log( \Gamma( (\nu+1)/2 )) - \log (\Gamma (\nu/2) - \frac{1}{2} \log(\nu \pi) - \log(\sigma) -\frac{\nu + 1}{2} \log (1 + \frac{1}{\nu} (\frac{y - \mu}{\sigma})^2) \end{eqnarray*} +

+
Parameters
+ + + + + +
yA scalar variable.
nuDegrees of freedom.
muThe mean of the Student-t distribution.
sigmaThe scale parameter of the Student-t distribution.
+
+
+
Returns
The log of the Student-t density at y.
+
Exceptions
+ + + +
std::domain_errorif sigma is not greater than 0.
std::domain_errorif nu is not greater than 0.
+
+
+
Template Parameters
+ + + + + +
T_yType of scalar.
T_dofType of degrees of freedom.
T_locType of location.
T_scaleType of scale.
+
+
+ +

Definition at line 56 of file student_t_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_dof , typename T_loc , typename T_scale >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_dof, T_loc, T_scale>::type stan::math::student_t_log (const T_y & y,
const T_dof & nu,
const T_loc & mu,
const T_scale & sigma 
)
+
+inline
+
+ +

Definition at line 220 of file student_t_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
double stan::math::student_t_rng (const double nu,
const double mu,
const double sigma,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 29 of file student_t_rng.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::sub (std::vector< double > & x,
std::vector< double > & y,
std::vector< double > & result 
)
+
+inline
+
+ +

Definition at line 10 of file sub.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::sub_col (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & m,
size_t i,
size_t j,
size_t nrows 
)
+
+inline
+
+ +

Return a nrows x 1 subcolumn starting at (i-1, j-1).

+
Parameters
+ + + + + +
mMatrix
iStarting row + 1
jStarting column + 1
nrowsNumber of rows in block
+
+
+ +

Definition at line 22 of file sub_col.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, 1, Eigen::Dynamic> stan::math::sub_row (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & m,
size_t i,
size_t j,
size_t ncols 
)
+
+inline
+
+ +

Return a 1 x nrows subrow starting at (i-1, j-1).

+
Parameters
+ + + + + +
mMatrix
iStarting row + 1
jStarting column + 1
ncolsNumber of columns in block
+
+
+ +

Definition at line 23 of file sub_row.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R, C> stan::math::subtract (const Eigen::Matrix< T1, R, C > & m1,
const Eigen::Matrix< T2, R, C > & m2 
)
+
+inline
+
+ +

Return the result of subtracting the second specified matrix from the first specified matrix.

+

The return scalar type is the promotion of the input types.

+
Template Parameters
+ + + + + +
T1Scalar type of first matrix.
T2Scalar type of second matrix.
RRow type of matrices.
CColumn type of matrices.
+
+
+
Parameters
+ + + +
m1First matrix.
m2Second matrix.
+
+
+
Returns
Difference between first matrix and second matrix.
+ +

Definition at line 27 of file subtract.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R, C> stan::math::subtract (const T1 & c,
const Eigen::Matrix< T2, R, C > & m 
)
+
+inline
+
+ +

Definition at line 43 of file subtract.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R, C> stan::math::subtract (const Eigen::Matrix< T1, R, C > & m,
const T2 & c 
)
+
+inline
+
+ +

Definition at line 56 of file subtract.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
T stan::math::sum (const std::vector< T > & xs)
+
+inline
+
+ +

Return the sum of the values in the specified standard vector.

+
Template Parameters
+ + +
TType of elements summed.
+
+
+
Parameters
+ + +
xsStandard vector to sum.
+
+
+
Returns
Sum of elements.
+ +

Definition at line 18 of file sum.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::sum (const std::vector< fvar< T > > & m)
+
+inline
+
+ +

Return the sum of the entries of the specified standard vector.

+
Template Parameters
+ + +
TType of vector entries.
+
+
+
Parameters
+ + +
mVector.
+
+
+
Returns
Sum of vector entries.
+ +

Definition at line 20 of file sum.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::sum (const Eigen::Matrix< fvar< T >, R, C > & m)
+
+inline
+
+ +

Return the sum of the entries of the specified matrix.

+
Template Parameters
+ + + + +
TType of matrix entries.
RRow type of matrix.
CColumn type of matrix.
+
+
+
Parameters
+ + +
mMatrix.
+
+
+
Returns
Sum of matrix entries.
+ +

Definition at line 21 of file sum.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
double stan::math::sum (const Eigen::Matrix< T, R, C > & v)
+
+inline
+
+ +

Returns the sum of the coefficients of the specified column vector.

+
Template Parameters
+ + + + +
TType of elements in matrix.
RRow type of matrix.
CColumn type of matrix.
+
+
+
Parameters
+ + +
vSpecified vector.
+
+
+
Returns
Sum of coefficients of vector.
+ +

Definition at line 22 of file sum.hpp.

+ +
+
+ +
+
+
+template<int R, int C>
+ + + + + +
+ + + + + + + + +
var stan::math::sum (const Eigen::Matrix< var, R, C > & m)
+
+inline
+
+ +

Returns the sum of the coefficients of the specified matrix, column vector or row vector.

+
Template Parameters
+ + + +
RRow type for matrix.
CColumn type for matrix.
+
+
+
Parameters
+ + +
mSpecified matrix or vector.
+
+
+
Returns
Sum of coefficients of matrix.
+ +

Definition at line 50 of file sum.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::sum (const std::vector< var > & m)
+
+inline
+
+ +

Returns the sum of the entries of the specified vector.

+
Parameters
+ + +
mVector.
+
+
+
Returns
Sum of vector entries.
+ +

Definition at line 53 of file sum.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::tail (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & v,
size_t n 
)
+
+inline
+
+ +

Return the specified number of elements as a vector from the back of the specified vector.

+ +

Definition at line 23 of file tail.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, 1, Eigen::Dynamic> stan::math::tail (const Eigen::Matrix< T, 1, Eigen::Dynamic > & rv,
size_t n 
)
+
+inline
+
+ +

Return the specified number of elements as a row vector from the back of the specified row vector.

+ +

Definition at line 38 of file tail.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + +
std::vector<T> stan::math::tail (const std::vector< T > & sv,
size_t n 
)
+
+ +

Definition at line 46 of file tail.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::tan (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 14 of file tan.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::tan (const var & a)
+
+inline
+
+ +

Return the tangent of a radian-scaled variable (cmath).

+

The derivative is defined by

+

$\frac{d}{dx} \tan x = \sec^2 x$.

+

+\[ \mbox{tan}(x) = \begin{cases} \tan(x) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{tan}(x)}{\partial x} = \begin{cases} \sec^2(x) & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
aVariable for radians of angle.
+
+
+
Returns
Tangent of variable.
+ +

Definition at line 49 of file tan.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::tanh (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 14 of file tanh.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::tanh (const var & a)
+
+inline
+
+ +

Return the hyperbolic tangent of the specified variable (cmath).

+

The derivative is defined by

+

$\frac{d}{dx} \tanh x = \frac{1}{\cosh^2 x}$.

+

+\[ \mbox{tanh}(x) = \begin{cases} \tanh(x) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{tanh}(x)}{\partial x} = \begin{cases} \mbox{sech}^2(x) & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
aVariable.
+
+
+
Returns
Hyperbolic tangent of variable.
+ +

Definition at line 50 of file tanh.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<fvar<T>, R, R> stan::math::tcrossprod (const Eigen::Matrix< fvar< T >, R, C > & m)
+
+inline
+
+ +

Definition at line 17 of file tcrossprod.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
matrix_d stan::math::tcrossprod (const matrix_d & M)
+
+inline
+
+ +

Returns the result of post-multiplying a matrix by its own transpose.

+
Parameters
+ + +
MMatrix to multiply.
+
+
+
Returns
M times its transpose.
+ +

Definition at line 17 of file tcrossprod.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
matrix_v stan::math::tcrossprod (const matrix_v & M)
+
+inline
+
+ +

Returns the result of post-multiplying a matrix by its own transpose.

+
Parameters
+ + +
MMatrix to multiply.
+
+
+
Returns
M times its transpose.
+ +

Definition at line 25 of file tcrossprod.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::tgamma (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 15 of file tgamma.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::tgamma (const stan::math::vara)
+
+inline
+
+ +

Return the Gamma function applied to the specified variable (C99).

+

See boost::math::tgamma() for the double-based version.

+

The derivative with respect to the argument is

+

$\frac{d}{dx} \Gamma(x) = \Gamma(x) \Psi^{(0)}(x)$

+

where $\Psi^{(0)}(x)$ is the digamma function.

+

See boost::math::digamma() for the double-based version.

+

+\[ \mbox{tgamma}(x) = \begin{cases} \textrm{error} & \mbox{if } x\in \{\dots, -3, -2, -1, 0\}\\ \Gamma(x) & \mbox{if } x\not\in \{\dots, -3, -2, -1, 0\}\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{tgamma}(x)}{\partial x} = \begin{cases} \textrm{error} & \mbox{if } x\in \{\dots, -3, -2, -1, 0\}\\ \frac{\partial\, \Gamma(x)}{\partial x} & \mbox{if } x\not\in \{\dots, -3, -2, -1, 0\}\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \Gamma(x)=\int_0^{\infty} u^{x - 1} \exp(-u) \, du \] +

+

+\[ \frac{\partial \, \Gamma(x)}{\partial x} = \Gamma(x)\Psi(x) \] +

+
Parameters
+ + +
aArgument to function.
+
+
+
Returns
The Gamma function applied to the specified argument.
+ +

Definition at line 65 of file tgamma.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
vector<T> stan::math::to_array_1d (const Matrix< T, R, C > & matrix)
+
+inline
+
+ +

Definition at line 19 of file to_array_1d.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
vector<T> stan::math::to_array_1d (const vector< T > & x)
+
+inline
+
+ +

Definition at line 31 of file to_array_1d.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
vector<typename scalar_type<T>::type> stan::math::to_array_1d (const vector< vector< T > > & x)
+
+inline
+
+ +

Definition at line 38 of file to_array_1d.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
vector< vector<T> > stan::math::to_array_2d (const Matrix< T, Dynamic, Dynamic > & matrix)
+
+inline
+
+ +

Definition at line 17 of file to_array_2d.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::to_fvar (const T & x)
+
+inline
+
+ +

Definition at line 16 of file to_fvar.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::to_fvar (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 23 of file to_fvar.hpp.

+ +
+
+ +
+
+
+template<int R, int C, typename T >
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<T, R, C> stan::math::to_fvar (const Eigen::Matrix< T, R, C > & m)
+
+inline
+
+ +

Definition at line 31 of file to_fvar.hpp.

+ +
+
+ +
+
+
+template<int R, int C>
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<fvar<double>, R, C> stan::math::to_fvar (const Eigen::Matrix< double, R, C > & m)
+
+inline
+
+ +

Definition at line 38 of file to_fvar.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<fvar<T>, R, C> stan::math::to_fvar (const Eigen::Matrix< T, R, C > & val,
const Eigen::Matrix< T, R, C > & deriv 
)
+
+inline
+
+ +

Definition at line 48 of file to_fvar.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
Matrix<T, Dynamic, Dynamic> stan::math::to_matrix (Matrix< T, R, C > matrix)
+
+inline
+
+ +

Definition at line 20 of file to_matrix.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
Matrix<T, Dynamic, Dynamic> stan::math::to_matrix (const vector< vector< T > > & vec)
+
+inline
+
+ +

Definition at line 27 of file to_matrix.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
Matrix<double, Dynamic, Dynamic> stan::math::to_matrix (const vector< vector< int > > & vec)
+
+inline
+
+ +

Definition at line 44 of file to_matrix.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
Matrix<T, 1, Dynamic> stan::math::to_row_vector (const Matrix< T, R, C > & matrix)
+
+inline
+
+ +

Definition at line 20 of file to_row_vector.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
Matrix<T, 1, Dynamic> stan::math::to_row_vector (const vector< T > & vec)
+
+inline
+
+ +

Definition at line 28 of file to_row_vector.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
Matrix<double, 1, Dynamic> stan::math::to_row_vector (const vector< int > & vec)
+
+inline
+
+ +

Definition at line 34 of file to_row_vector.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::to_var (const double & x)
+
+inline
+
+ +

Converts argument to an automatic differentiation variable.

+

Returns a stan::math::var variable with the input value.

+
Parameters
+ + +
[in]xA scalar value
+
+
+
Returns
An automatic differentiation variable with the input value.
+ +

Definition at line 21 of file to_var.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::to_var (const var & x)
+
+inline
+
+ +

Converts argument to an automatic differentiation variable.

+

Returns a stan::math::var variable with the input value.

+
Parameters
+ + +
[in]xAn automatic differentiation variable.
+
+
+
Returns
An automatic differentiation variable with the input value.
+ +

Definition at line 32 of file to_var.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
matrix_v stan::math::to_var (const stan::math::matrix_dm)
+
+inline
+
+ +

Converts argument to an automatic differentiation variable.

+

Returns a stan::math::var variable with the input value.

+
Parameters
+ + +
[in]mA Matrix with scalars
+
+
+
Returns
A Matrix with automatic differentiation variables
+ +

Definition at line 43 of file to_var.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
matrix_v stan::math::to_var (const matrix_v & m)
+
+inline
+
+ +

Converts argument to an automatic differentiation variable.

+

Returns a stan::math::var variable with the input value.

+
Parameters
+ + +
[in]mA Matrix with automatic differentiation variables.
+
+
+
Returns
A Matrix with automatic differentiation variables.
+ +

Definition at line 58 of file to_var.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
vector_v stan::math::to_var (const stan::math::vector_dv)
+
+inline
+
+ +

Converts argument to an automatic differentiation variable.

+

Returns a stan::math::var variable with the input value.

+
Parameters
+ + +
[in]vA Vector of scalars
+
+
+
Returns
A Vector of automatic differentiation variables with values of v
+ +

Definition at line 70 of file to_var.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
vector_v stan::math::to_var (const vector_v & v)
+
+inline
+
+ +

Converts argument to an automatic differentiation variable.

+

Returns a stan::math::var variable with the input value.

+
Parameters
+ + +
[in]vA Vector of automatic differentiation variables
+
+
+
Returns
A Vector of automatic differentiation variables with values of v
+ +

Definition at line 85 of file to_var.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
row_vector_v stan::math::to_var (const stan::math::row_vector_drv)
+
+inline
+
+ +

Converts argument to an automatic differentiation variable.

+

Returns a stan::math::var variable with the input value.

+
Parameters
+ + +
[in]rvA row vector of scalars
+
+
+
Returns
A row vector of automatic differentation variables with values of rv.
+ +

Definition at line 97 of file to_var.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
row_vector_v stan::math::to_var (const row_vector_v & rv)
+
+inline
+
+ +

Converts argument to an automatic differentiation variable.

+

Returns a stan::math::var variable with the input value.

+
Parameters
+ + +
[in]rvA row vector with automatic differentiation variables
+
+
+
Returns
A row vector with automatic differentiation variables with values of rv.
+ +

Definition at line 112 of file to_var.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
Matrix<T, Dynamic, 1> stan::math::to_vector (const Matrix< T, R, C > & matrix)
+
+inline
+
+ +

Definition at line 20 of file to_vector.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
Matrix<T, Dynamic, 1> stan::math::to_vector (const vector< T > & vec)
+
+inline
+
+ +

Definition at line 28 of file to_vector.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
Matrix<double, Dynamic, 1> stan::math::to_vector (const vector< int > & vec)
+
+inline
+
+ +

Definition at line 34 of file to_vector.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
T stan::math::trace (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & m)
+
+inline
+
+ +

Returns the trace of the specified matrix.

+

The trace is defined as the sum of the elements on the diagonal. The matrix is not required to be square. Returns 0 if matrix is empty.

+
Parameters
+ + +
[in]mSpecified matrix.
+
+
+
Returns
Trace of the matrix.
+ +

Definition at line 20 of file trace.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
T stan::math::trace (const T & m)
+
+inline
+
+ +

Definition at line 26 of file trace.hpp.

+ +
+
+ +
+
+
+template<typename T1 , int R1, int C1, typename T2 , int R2, int C2, typename T3 , int R3, int C3>
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
boost::enable_if_c<stan::is_var<T1>::value || stan::is_var<T2>::value || stan::is_var<T3>::value, var>::type stan::math::trace_gen_inv_quad_form_ldlt (const Eigen::Matrix< T1, R1, C1 > & D,
const stan::math::LDLT_factor< T2, R2, C2 > & A,
const Eigen::Matrix< T3, R3, C3 > & B 
)
+
+inline
+
+ +

Compute the trace of an inverse quadratic form.

+

I.E., this computes trace(D B^T A^-1 B) where D is a square matrix and the LDLT_factor of A is provided.

+ +

Definition at line 27 of file trace_gen_inv_quad_form_ldlt.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , typename T3 , int R1, int C1, int R2, int C2, int R3, int C3>
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
boost::enable_if_c<!stan::is_var<T1>::value && !stan::is_var<T2>::value && !stan::is_var<T3>::value, typename boost::math::tools::promote_args<T1, T2, T3>::type>::type stan::math::trace_gen_inv_quad_form_ldlt (const Eigen::Matrix< T1, R1, C1 > & D,
const stan::math::LDLT_factor< T2, R2, C2 > & A,
const Eigen::Matrix< T3, R3, C3 > & B 
)
+
+inline
+
+ +

Definition at line 30 of file trace_gen_inv_quad_form_ldlt.hpp.

+ +
+
+ +
+
+
+template<int RD, int CD, int RA, int CA, int RB, int CB, typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::trace_gen_quad_form (const Eigen::Matrix< fvar< T >, RD, CD > & D,
const Eigen::Matrix< fvar< T >, RA, CA > & A,
const Eigen::Matrix< fvar< T >, RB, CB > & B 
)
+
+inline
+
+ +

Definition at line 15 of file trace_gen_quad_form.hpp.

+ +
+
+ +
+
+
+template<int RD, int CD, int RA, int CA, int RB, int CB>
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
double stan::math::trace_gen_quad_form (const Eigen::Matrix< double, RD, CD > & D,
const Eigen::Matrix< double, RA, CA > & A,
const Eigen::Matrix< double, RB, CB > & B 
)
+
+inline
+
+ +

Compute trace(D B^T A B).

+ +

Definition at line 17 of file trace_gen_quad_form.hpp.

+ +
+
+ +
+
+
+template<typename TD , int RD, int CD, typename TA , int RA, int CA, typename TB , int RB, int CB>
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
boost::enable_if_c< boost::is_same<TD, var>::value || boost::is_same<TA, var>::value || boost::is_same<TB, var>::value, var >::type stan::math::trace_gen_quad_form (const Eigen::Matrix< TD, RD, CD > & D,
const Eigen::Matrix< TA, RA, CA > & A,
const Eigen::Matrix< TB, RB, CB > & B 
)
+
+inline
+
+ +

Definition at line 116 of file trace_gen_quad_form.hpp.

+ +
+
+ +
+
+
+template<typename T1 , typename T2 , int R2, int C2, int R3, int C3>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::enable_if_c<!stan::is_var<T1>::value && !stan::is_var<T2>::value, typename boost::math::tools::promote_args<T1, T2>::type>::type stan::math::trace_inv_quad_form_ldlt (const stan::math::LDLT_factor< T1, R2, C2 > & A,
const Eigen::Matrix< T2, R3, C3 > & B 
)
+
+inline
+
+ +

Definition at line 27 of file trace_inv_quad_form_ldlt.hpp.

+ +
+
+ +
+
+
+template<typename T2 , int R2, int C2, typename T3 , int R3, int C3>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::enable_if_c<stan::is_var<T2>::value || stan::is_var<T3>::value, var>::type stan::math::trace_inv_quad_form_ldlt (const stan::math::LDLT_factor< T2, R2, C2 > & A,
const Eigen::Matrix< T3, R3, C3 > & B 
)
+
+inline
+
+ +

Compute the trace of an inverse quadratic form.

+

I.E., this computes trace(B^T A^-1 B) where the LDLT_factor of A is provided.

+ +

Definition at line 177 of file trace_inv_quad_form_ldlt.hpp.

+ +
+
+ +
+
+
+template<int RA, int CA, int RB, int CB>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
double stan::math::trace_quad_form (const Eigen::Matrix< double, RA, CA > & A,
const Eigen::Matrix< double, RB, CB > & B 
)
+
+inline
+
+ +

Compute trace(B^T A B).

+ +

Definition at line 17 of file trace_quad_form.hpp.

+ +
+
+ +
+
+
+template<int RA, int CA, int RB, int CB, typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::trace_quad_form (const Eigen::Matrix< fvar< T >, RA, CA > & A,
const Eigen::Matrix< fvar< T >, RB, CB > & B 
)
+
+inline
+
+ +

Definition at line 18 of file trace_quad_form.hpp.

+ +
+
+ +
+
+
+template<int RA, int CA, int RB, int CB, typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::trace_quad_form (const Eigen::Matrix< fvar< T >, RA, CA > & A,
const Eigen::Matrix< double, RB, CB > & B 
)
+
+inline
+
+ +

Definition at line 30 of file trace_quad_form.hpp.

+ +
+
+ +
+
+
+template<int RA, int CA, int RB, int CB, typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fvar<T> stan::math::trace_quad_form (const Eigen::Matrix< double, RA, CA > & A,
const Eigen::Matrix< fvar< T >, RB, CB > & B 
)
+
+inline
+
+ +

Definition at line 42 of file trace_quad_form.hpp.

+ +
+
+ +
+
+
+template<typename TA , int RA, int CA, typename TB , int RB, int CB>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::enable_if_c< boost::is_same<TA, var>::value || boost::is_same<TB, var>::value, var >::type stan::math::trace_quad_form (const Eigen::Matrix< TA, RA, CA > & A,
const Eigen::Matrix< TB, RB, CB > & B 
)
+
+inline
+
+ +

Definition at line 98 of file trace_quad_form.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<T, C, R> stan::math::transpose (const Eigen::Matrix< T, R, C > & m)
+
+inline
+
+ +

Definition at line 12 of file transpose.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
T stan::math::trigamma (x)
+
+inline
+
+ +

+\[ \mbox{trigamma}(x) = \begin{cases} \textrm{error} & \mbox{if } x\in \{\dots, -3, -2, -1, 0\}\\ \Psi_1(x) & \mbox{if } x\not\in \{\dots, -3, -2, -1, 0\}\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+

+\[ \frac{\partial\, \mbox{trigamma}(x)}{\partial x} = \begin{cases} \textrm{error} & \mbox{if } x\in \{\dots, -3, -2, -1, 0\}\\ \frac{\partial\, \Psi_1(x)}{\partial x} & \mbox{if } x\not\in \{\dots, -3, -2, -1, 0\}\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \Psi_1(x)=\sum_{n=0}^\infty \frac{1}{(x+n)^2} \] +

+

+\[ \frac{\partial \, \Psi_1(x)}{\partial x} = -2\sum_{n=0}^\infty \frac{1}{(x+n)^3} \] +

+ +

Definition at line 50 of file trigamma.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::trunc (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 12 of file trunc.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
var stan::math::trunc (const var & a)
+
+inline
+
+ +

Returns the truncatation of the specified variable (C99).

+

See trunc() for the double-based version.

+

The derivative is zero everywhere but at integer values, so for convenience the derivative is defined to be everywhere zero,

+

$\frac{d}{dx} \mbox{trunc}(x) = 0$.

+

+\[ \mbox{trunc}(x) = \begin{cases} \lfloor x \rfloor & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+

+\[ \frac{\partial\, \mbox{trunc}(x)}{\partial x} = \begin{cases} 0 & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+
Parameters
+ + +
aSpecified variable.
+
+
+
Returns
Truncation of the variable.
+ +

Definition at line 60 of file trunc.hpp.

+ +
+
+ +
+
+
+template<typename T , typename TU >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T, TU>::type stan::math::ub_constrain (const T x,
const TU ub 
)
+
+inline
+
+ +

Return the upper-bounded value for the specified unconstrained scalar and upper bound.

+

The transform is

+

$f(x) = U - \exp(x)$

+

where $U$ is the upper bound.

+

If the upper bound is positive infinity, this function reduces to identity_constrain(x).

+
Parameters
+ + + +
xFree scalar.
ubUpper bound.
+
+
+
Returns
Transformed scalar with specified upper bound.
+
Template Parameters
+ + + +
TType of scalar.
TUType of upper bound.
+
+
+ +

Definition at line 37 of file ub_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T , typename TU >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T, TU>::type stan::math::ub_constrain (const T x,
const TU ub,
T & lp 
)
+
+inline
+
+ +

Return the upper-bounded value for the specified unconstrained scalar and upper bound and increment the specified log probability reference with the log absolute Jacobian determinant of the transform.

+

The transform is as specified for ub_constrain(T, double). The log absolute Jacobian determinant is

+

$ \log | \frac{d}{dx} -\mbox{exp}(x) + U | = \log | -\mbox{exp}(x) + 0 | = x$.

+

If the upper bound is positive infinity, this function reduces to identity_constrain(x, lp).

+
Parameters
+ + + + +
xFree scalar.
ubUpper bound.
lpLog probability reference.
+
+
+
Returns
Transformed scalar with specified upper bound.
+
Template Parameters
+ + + +
TType of scalar.
TUType of upper bound.
+
+
+ +

Definition at line 70 of file ub_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T , typename TU >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T, TU>::type stan::math::ub_free (const T y,
const TU ub 
)
+
+inline
+
+ +

Return the free scalar that corresponds to the specified upper-bounded value with respect to the specified upper bound.

+

The transform is the reverse of the ub_constrain(T, double) transform,

+

$f^{-1}(y) = \log -(y - U)$

+

where $U$ is the upper bound.

+

If the upper bound is positive infinity, this function reduces to identity_free(y).

+
Parameters
+ + + +
yUpper-bounded scalar.
ubUpper bound.
+
+
+
Returns
Free scalar corresponding to upper-bounded scalar.
+
Template Parameters
+ + + +
TType of scalar.
TUType of upper bound.
+
+
+
Exceptions
+ + +
std::invalid_argumentif y is greater than the upper bound.
+
+
+ +

Definition at line 39 of file ub_free.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_low , typename T_high >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_low, T_high>::type stan::math::uniform_ccdf_log (const T_y & y,
const T_low & alpha,
const T_high & beta 
)
+
+ +

Definition at line 23 of file uniform_ccdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_low , typename T_high >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_low, T_high>::type stan::math::uniform_cdf (const T_y & y,
const T_low & alpha,
const T_high & beta 
)
+
+ +

Definition at line 22 of file uniform_cdf.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_low , typename T_high >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_low, T_high>::type stan::math::uniform_cdf_log (const T_y & y,
const T_low & alpha,
const T_high & beta 
)
+
+ +

Definition at line 23 of file uniform_cdf_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_low , typename T_high >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_low, T_high>::type stan::math::uniform_log (const T_y & y,
const T_low & alpha,
const T_high & beta 
)
+
+ +

The log of a uniform density for the given y, lower, and upper bound.

+

+\begin{eqnarray*} y &\sim& \mbox{\sf{U}}(\alpha, \beta) \\ \log (p (y \, |\, \alpha, \beta)) &=& \log \left( \frac{1}{\beta-\alpha} \right) \\ &=& \log (1) - \log (\beta - \alpha) \\ &=& -\log (\beta - \alpha) \\ & & \mathrm{ where } \; y \in [\alpha, \beta], \log(0) \; \mathrm{otherwise} \end{eqnarray*} +

+
Parameters
+ + + + +
yA scalar variable.
alphaLower bound.
betaUpper bound.
+
+
+
Exceptions
+ + +
std::invalid_argumentif the lower bound is greater than or equal to the lower bound
+
+
+
Template Parameters
+ + + + +
T_yType of scalar.
T_lowType of lower bound.
T_highType of upper bound.
+
+
+ +

Definition at line 46 of file uniform_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_low , typename T_high >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_low, T_high>::type stan::math::uniform_log (const T_y & y,
const T_low & alpha,
const T_high & beta 
)
+
+inline
+
+ +

Definition at line 124 of file uniform_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
double stan::math::uniform_rng (const double alpha,
const double beta,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 22 of file uniform_rng.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::unit_vector_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & y)
+
+ +

Return the unit length vector corresponding to the free vector y.

+

The free vector contains K-1 spherical coordinates.

+
Parameters
+ + +
yof K - 1 spherical coordinates
+
+
+
Returns
Unit length vector of dimension K
+
Template Parameters
+ + +
TScalar type.
+
+
+ +

Definition at line 24 of file unit_vector_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::unit_vector_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & y,
T & lp 
)
+
+ +

Return the unit length vector corresponding to the free vector y.

+

The free vector contains K-1 spherical coordinates.

+
Parameters
+ + +
yof K - 1 spherical coordinates
+
+
+
Returns
Unit length vector of dimension K
+
Parameters
+ + +
lpLog probability reference to increment.
+
+
+
Template Parameters
+ + +
TScalar type.
+
+
+ +

Definition at line 53 of file unit_vector_constrain.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::unit_vector_free (const Eigen::Matrix< T, Eigen::Dynamic, 1 > & x)
+
+ +

Definition at line 16 of file unit_vector_free.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::validate_non_negative_index (const char * var_name,
const char * expr,
int val 
)
+
+inline
+
+ +

Definition at line 12 of file validate_non_negative_index.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
T stan::math::value_of (const fvar< T > & v)
+
+inline
+
+ +

Return the value of the specified variable.

+
Parameters
+ + +
vVariable.
+
+
+
Returns
Value of variable.
+ +

Definition at line 16 of file value_of.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
double stan::math::value_of (const var & v)
+
+inline
+
+ +

Return the value of the specified variable.

+

This function is used internally by auto-dif functions along with stan::math::value_of(T x) to extract the double value of either a scalar or an auto-dif variable. This function will be called when the argument is a stan::math::var even if the function is not referred to by namespace because of argument-dependent lookup.

+
Parameters
+ + +
vVariable.
+
+
+
Returns
Value of variable.
+ +

Definition at line 22 of file value_of.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
double stan::math::value_of (const T x)
+
+inline
+
+ +

Return the value of the specified scalar argument converted to a double value.

+

See the stan::math::primitive_value function to extract values without casting to double.

+

This function is meant to cover the primitive types. For types requiring pass-by-reference, this template function should be specialized.

+
Template Parameters
+ + +
TType of scalar.
+
+
+
Parameters
+ + +
xScalar to convert to double.
+
+
+
Returns
Value of scalar cast to a double.
+ +

Definition at line 24 of file value_of.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<typename child_type<T>::type, R, C> stan::math::value_of (const Eigen::Matrix< T, R, C > & M)
+
+inline
+
+ +

Convert a matrix of type T to a matrix of doubles.

+

T must implement value_of. See test/math/fwd/mat/fun/value_of.cpp for fvar and var usage.

+
Template Parameters
+ + + + +
TScalar type in matrix
RRows of matrix
CColumns of matrix
+
+
+
Parameters
+ + +
[in]MMatrix to be converted
+
+
+
Returns
Matrix of values
+ +

Definition at line 25 of file value_of.hpp.

+ +
+
+ +
+
+
+template<>
+ + + + + +
+ + + + + + + + +
double stan::math::value_of< double > (const double x)
+
+inline
+
+ +

Return the specified argument.

+

See value_of(T) for a polymorphic implementation using static casts.

+

This inline pass-through no-op should be compiled away.

+
Parameters
+ + +
xSpecified value.
+
+
+
Returns
Specified value.
+ +

Definition at line 40 of file value_of.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
double stan::math::value_of_rec (const var & v)
+
+inline
+
+ +

Return the value of the specified variable.

+
Parameters
+ + +
vVariable.
+
+
+
Returns
Value of variable.
+ +

Definition at line 15 of file value_of_rec.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
double stan::math::value_of_rec (const fvar< T > & v)
+
+inline
+
+ +

Return the value of the specified variable.

+

T must implement value_of_rec.

+
Template Parameters
+ + +
TScalar type
+
+
+
Parameters
+ + +
vVariable.
+
+
+
Returns
Value of variable.
+ +

Definition at line 21 of file value_of_rec.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
Eigen::Matrix<double, R, C> stan::math::value_of_rec (const Eigen::Matrix< T, R, C > & M)
+
+inline
+
+ +

Convert a matrix of type T to a matrix of doubles.

+

T must implement value_of_rec. See test/unit/math/fwd/mat/fun/value_of_test.cpp for fvar and var usage.

+
Template Parameters
+ + + + +
TScalar type in matrix
RRows of matrix
CColumns of matrix
+
+
+
Parameters
+ + +
[in]MMatrix to be converted
+
+
+
Returns
Matrix of values
+ +

Definition at line 24 of file value_of_rec.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
double stan::math::value_of_rec (const T x)
+
+inline
+
+ +

Return the value of the specified scalar argument converted to a double value.

+

See the stan::math::primitive_value function to extract values without casting to double.

+

This function is meant to cover the primitive types. For types requiring pass-by-reference, this template function should be specialized.

+
Template Parameters
+ + +
TType of scalar.
+
+
+
Parameters
+ + +
xScalar to convert to double.
+
+
+
Returns
Value of scalar cast to a double.
+ +

Definition at line 24 of file value_of_rec.hpp.

+ +
+
+ +
+
+
+template<>
+ + + + + +
+ + + + + + + + +
double stan::math::value_of_rec< double > (const double x)
+
+inline
+
+ +

Return the specified argument.

+

See value_of(T) for a polymorphic implementation using static casts.

+

This inline pass-through no-op should be compiled away.

+
Parameters
+ + +
xSpecified value.
+
+
+
Returns
Specified value.
+ +

Definition at line 40 of file value_of_rec.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
boost::math::tools::promote_args<T>::type stan::math::variance (const std::vector< T > & v)
+
+inline
+
+ +

Returns the sample variance (divide by length - 1) of the coefficients in the specified standard vector.

+
Parameters
+ + +
vSpecified vector.
+
+
+
Returns
Sample variance of vector.
+
Exceptions
+ + +
std::domain_errorif the size of the vector is less than 1.
+
+
+ +

Definition at line 24 of file variance.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
boost::math::tools::promote_args<T>::type stan::math::variance (const Eigen::Matrix< T, R, C > & m)
+
+inline
+
+ +

Returns the sample variance (divide by length - 1) of the coefficients in the specified column vector.

+
Parameters
+ + +
mSpecified vector.
+
+
+
Returns
Sample variance of vector.
+ +

Definition at line 46 of file variance.hpp.

+ +
+
+ +
+
+ + + + + + + + +
var stan::math::variance (const std::vector< var > & v)
+
+ +

Return the sample variance of the specified standard vector.

+

Raise domain error if size is not greater than zero.

+
Parameters
+ + +
[in]va vector
+
+
+
Returns
sample variance of specified vector
+ +

Definition at line 52 of file variance.hpp.

+ +
+
+ +
+
+
+template<int R, int C>
+ + + + + + + + +
var stan::math::variance (const Eigen::Matrix< var, R, C > & m)
+
+ +

Definition at line 69 of file variance.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_loc , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::von_mises_log (T_y const & y,
T_loc const & mu,
T_scale const & kappa 
)
+
+ +

Definition at line 26 of file von_mises_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_loc , typename T_scale >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_loc, T_scale>::type stan::math::von_mises_log (T_y const & y,
T_loc const & mu,
T_scale const & kappa 
)
+
+inline
+
+ +

Definition at line 132 of file von_mises_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
double stan::math::von_mises_rng (const double mu,
const double kappa,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 33 of file von_mises_rng.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_shape , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_shape, T_scale>::type stan::math::weibull_ccdf_log (const T_y & y,
const T_shape & alpha,
const T_scale & sigma 
)
+
+ +

Definition at line 27 of file weibull_ccdf_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_shape , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_shape, T_scale>::type stan::math::weibull_cdf (const T_y & y,
const T_shape & alpha,
const T_scale & sigma 
)
+
+ +

Definition at line 27 of file weibull_cdf.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_shape , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_shape, T_scale>::type stan::math::weibull_cdf_log (const T_y & y,
const T_shape & alpha,
const T_scale & sigma 
)
+
+ +

Definition at line 27 of file weibull_cdf_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_shape , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_shape, T_scale>::type stan::math::weibull_log (const T_y & y,
const T_shape & alpha,
const T_scale & sigma 
)
+
+ +

Definition at line 30 of file weibull_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_shape , typename T_scale >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_shape, T_scale>::type stan::math::weibull_log (const T_y & y,
const T_shape & alpha,
const T_scale & sigma 
)
+
+inline
+
+ +

Definition at line 141 of file weibull_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
double stan::math::weibull_rng (const double alpha,
const double sigma,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 24 of file weibull_rng.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_alpha , typename T_tau , typename T_beta , typename T_delta >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_alpha, T_tau, T_beta, T_delta>::type stan::math::wiener_log (const T_y & y,
const T_alpha & alpha,
const T_tau & tau,
const T_beta & beta,
const T_delta & delta 
)
+
+ +

The log of the first passage time density function for a (Wiener) drift diffusion model for the given $y$, boundary separation $\alpha$, nondecision time $\tau$, relative bias $\beta$, and drift rate $\delta$.

+

$\alpha$ and $\tau$ must be greater than 0, and $\beta$ must be between 0 and 1. $y$ should contain reaction times in seconds (strictly positive) with upper-boundary responses.

+
Parameters
+ + + + + + +
yA scalar variate.
alphaThe boundary separation.
tauThe nondecision time.
betaThe relative bias.
deltaThe drift rate.
+
+
+
Returns
The log of the Wiener first passage time density of the specified arguments.
+ +

Definition at line 72 of file wiener_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_alpha , typename T_tau , typename T_beta , typename T_delta >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
return_type<T_y, T_alpha, T_tau, T_beta, T_delta>::type stan::math::wiener_log (const T_y & y,
const T_alpha & alpha,
const T_tau & tau,
const T_beta & beta,
const T_delta & delta 
)
+
+inline
+
+ +

Definition at line 225 of file wiener_log.hpp.

+ +
+
+ +
+
+
+template<bool propto, typename T_y , typename T_dof , typename T_scale >
+ + + + + + + + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_y, T_dof, T_scale>::type stan::math::wishart_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > & W,
const T_dof & nu,
const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > & S 
)
+
+ +

The log of the Wishart density for the given W, degrees of freedom, and scale matrix.

+

The scale matrix, S, must be k x k, symmetric, and semi-positive definite. Dimension, k, is implicit. nu must be greater than k-1

+

+\begin{eqnarray*} W &\sim& \mbox{\sf{Wishart}}_{\nu} (S) \\ \log (p (W \, |\, \nu, S) ) &=& \log \left( \left(2^{\nu k/2} \pi^{k (k-1) /4} \prod_{i=1}^k{\Gamma (\frac{\nu + 1 - i}{2})} \right)^{-1} \times \left| S \right|^{-\nu/2} \left| W \right|^{(\nu - k - 1) / 2} \times \exp (-\frac{1}{2} \mbox{tr} (S^{-1} W)) \right) \\ &=& -\frac{\nu k}{2}\log(2) - \frac{k (k-1)}{4} \log(\pi) - \sum_{i=1}^{k}{\log (\Gamma (\frac{\nu+1-i}{2}))} -\frac{\nu}{2} \log(\det(S)) + \frac{\nu-k-1}{2}\log (\det(W)) - \frac{1}{2} \mbox{tr} (S^{-1}W) \end{eqnarray*} +

+
Parameters
+ + + + +
WA scalar matrix
nuDegrees of freedom
SThe scale matrix
+
+
+
Returns
The log of the Wishart density at W given nu and S.
+
Exceptions
+ + + +
std::domain_errorif nu is not greater than k-1
std::domain_errorif S is not square, not symmetric, or not semi-positive definite.
+
+
+
Template Parameters
+ + + + +
T_yType of scalar.
T_dofType of degrees of freedom.
T_scaleType of scale.
+
+
+ +

Definition at line 58 of file wishart_log.hpp.

+ +
+
+ +
+
+
+template<typename T_y , typename T_dof , typename T_scale >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
boost::math::tools::promote_args<T_y, T_dof, T_scale>::type stan::math::wishart_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > & W,
const T_dof & nu,
const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > & S 
)
+
+inline
+
+ +

Definition at line 127 of file wishart_log.hpp.

+ +
+
+ +
+
+
+template<class RNG >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> stan::math::wishart_rng (const double nu,
const Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > & S,
RNG & rng 
)
+
+inline
+
+ +

Definition at line 29 of file wishart_rng.hpp.

+ +
+
+

Variable Documentation

+ +
+
+ + + + +
const double stan::math::CONSTRAINT_TOLERANCE = 1E-8
+
+ +

The tolerance for checking arithmetic bounds In rank and in simplexes.

+

The default value is 1E-8.

+ +

Definition at line 11 of file constraint_tolerance.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::E = boost::math::constants::e<double>()
+
+ +

The base of the natural logarithm, $ e $.

+ +

Definition at line 15 of file constants.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::EPSILON = std::numeric_limits<double>::epsilon()
+
+ +

Smallest positive value.

+ +

Definition at line 61 of file constants.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::INFTY = std::numeric_limits<double>::infinity()
+
+ +

Positive infinity.

+ +

Definition at line 44 of file constants.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::INV_SQRT_2 = 1.0 / SQRT_2
+
+ +

The value of 1 over the square root of 2, $ 1 / \sqrt{2} $.

+ +

Definition at line 27 of file constants.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::INV_SQRT_TWO_PI = 1.0 / std::sqrt(2.0 * boost::math::constants::pi<double>())
+
+ +

Definition at line 166 of file constants.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::LOG_10 = std::log(10.0)
+
+ +

The natural logarithm of 10, $ \log 10 $.

+ +

Definition at line 39 of file constants.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::LOG_2 = std::log(2.0)
+
+ +

The natural logarithm of 2, $ \log 2 $.

+ +

Definition at line 33 of file constants.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::LOG_HALF = std::log(0.5)
+
+ +

Definition at line 179 of file constants.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::LOG_PI = std::log(boost::math::constants::pi<double>())
+
+ +

Definition at line 170 of file constants.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::LOG_PI_OVER_FOUR = std::log(boost::math::constants::pi<double>()) / 4.0
+
+ +

Log pi divided by 4 $ \log \pi / 4 $.

+ +

Definition at line 79 of file constants.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::LOG_SQRT_PI = std::log(SQRT_PI)
+
+ +

Definition at line 173 of file constants.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::LOG_TWO = std::log(2.0)
+
+ +

Definition at line 177 of file constants.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::LOG_TWO_PI = LOG_TWO + LOG_PI
+
+ +

Definition at line 193 of file constants.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::LOG_ZERO = std::log(0.0)
+
+ +

Definition at line 175 of file constants.hpp.

+ +
+
+ +
+
+ + + + +
const std::string stan::math::MAJOR_VERSION = STAN_STRING(STAN_MATH_MAJOR)
+
+ +

Major version number for Stan math library.

+ +

Definition at line 22 of file version.hpp.

+ +
+
+ +
+
+ + + + +
const std::string stan::math::MINOR_VERSION = STAN_STRING(STAN_MATH_MINOR)
+
+ +

Minor version number for Stan math library.

+ +

Definition at line 25 of file version.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::NEG_LOG_PI = - LOG_PI
+
+ +

Definition at line 186 of file constants.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::NEG_LOG_SQRT_PI = -std::log(std::sqrt(boost::math::constants::pi<double>()))
+
+ +

Definition at line 189 of file constants.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::NEG_LOG_SQRT_TWO_PI = - std::log(std::sqrt(2.0 * boost::math::constants::pi<double>()))
+
+ +

Definition at line 184 of file constants.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::NEG_LOG_TWO = - LOG_TWO
+
+ +

Definition at line 181 of file constants.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::NEG_LOG_TWO_OVER_TWO = - LOG_TWO / 2.0
+
+ +

Definition at line 191 of file constants.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::NEG_LOG_TWO_PI = - LOG_TWO_PI
+
+ +

Definition at line 195 of file constants.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::NEG_TWO_OVER_SQRT_PI = -TWO_OVER_SQRT_PI
+
+ +

Definition at line 163 of file constants.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::NEGATIVE_EPSILON = - std::numeric_limits<double>::epsilon()
+
+ +

Largest negative value (i.e., smallest absolute value).

+ +

Definition at line 67 of file constants.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::NEGATIVE_INFTY = - std::numeric_limits<double>::infinity()
+
+ +

Negative infinity.

+ +

Definition at line 50 of file constants.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::NOT_A_NUMBER = std::numeric_limits<double>::quiet_NaN()
+
+ +

(Quiet) not-a-number value.

+ +

Definition at line 56 of file constants.hpp.

+ +
+
+ +
+
+ + + + +
const std::string stan::math::PATCH_VERSION = STAN_STRING(STAN_MATH_PATCH)
+
+ +

Patch version for Stan math library.

+ +

Definition at line 28 of file version.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::POISSON_MAX_RATE = std::pow(2.0, 30)
+
+ +

Largest rate parameter allowed in Poisson RNG.

+ +

Definition at line 72 of file constants.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::SQRT_2 = std::sqrt(2.0)
+
+ +

The value of the square root of 2, $ \sqrt{2} $.

+ +

Definition at line 21 of file constants.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::SQRT_2_TIMES_SQRT_PI = SQRT_2 * SQRT_PI
+
+ +

Definition at line 158 of file constants.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::SQRT_PI = std::sqrt(boost::math::constants::pi<double>())
+
+ +

Definition at line 156 of file constants.hpp.

+ +
+
+ +
+
+ + + + +
const double stan::math::TWO_OVER_SQRT_PI = 2.0 / SQRT_PI
+
+ +

Definition at line 161 of file constants.hpp.

+ +
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacestan_1_1math_1_1detail.html b/doc/api/html/namespacestan_1_1math_1_1detail.html new file mode 100644 index 00000000000..038f8393fbf --- /dev/null +++ b/doc/api/html/namespacestan_1_1math_1_1detail.html @@ -0,0 +1,118 @@ + + + + + + +Stan Math Library: stan::math::detail Namespace Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::detail Namespace Reference
+
+
+ + + + + + +

+Classes

struct  bounded
 
struct  bounded< T_y, T_low, T_high, true >
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/namespacestd.html b/doc/api/html/namespacestd.html new file mode 100644 index 00000000000..905f760cb2a --- /dev/null +++ b/doc/api/html/namespacestd.html @@ -0,0 +1,198 @@ + + + + + + +Stan Math Library: std Namespace Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
std Namespace Reference
+
+
+ + + + + + + +

+Classes

struct  numeric_limits< stan::math::fvar< T > >
 
struct  numeric_limits< stan::math::var >
 Specialization of numeric limits for var objects. More...
 
+ + + + + + + +

+Functions

int isinf (const stan::math::var &a)
 Checks if the given number is infinite. More...
 
int isnan (const stan::math::var &a)
 Checks if the given number is NaN. More...
 
+

Function Documentation

+ +
+
+ + + + + +
+ + + + + + + + +
int std::isinf (const stan::math::vara)
+
+inline
+
+ +

Checks if the given number is infinite.

+

Return true if the value of the a is positive or negative infinity.

+
Parameters
+ + +
aVariable to test.
+
+
+
Returns
true if value is infinite.
+ +

Definition at line 18 of file std_isinf.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
int std::isnan (const stan::math::vara)
+
+inline
+
+ +

Checks if the given number is NaN.

+

Return true if the value of the specified variable is not a number.

+
Parameters
+ + +
aVariable to test.
+
+
+
Returns
true if value is not a number.
+ +

Definition at line 18 of file std_isnan.hpp.

+ +
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/nav_f.png b/doc/api/html/nav_f.png new file mode 100644 index 00000000000..72a58a529ed Binary files /dev/null and b/doc/api/html/nav_f.png differ diff --git a/doc/api/html/nav_g.png b/doc/api/html/nav_g.png new file mode 100644 index 00000000000..2093a237a94 Binary files /dev/null and b/doc/api/html/nav_g.png differ diff --git a/doc/api/html/nav_h.png b/doc/api/html/nav_h.png new file mode 100644 index 00000000000..33389b101d9 Binary files /dev/null and b/doc/api/html/nav_h.png differ diff --git a/doc/api/html/neg__binomial__2__ccdf__log_8hpp.html b/doc/api/html/neg__binomial__2__ccdf__log_8hpp.html new file mode 100644 index 00000000000..d54ec2f65e9 --- /dev/null +++ b/doc/api/html/neg__binomial__2__ccdf__log_8hpp.html @@ -0,0 +1,149 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/neg_binomial_2_ccdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
neg_binomial_2_ccdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_n , typename T_location , typename T_precision >
return_type< T_location,
+T_precision >::type 
stan::math::neg_binomial_2_ccdf_log (const T_n &n, const T_location &mu, const T_precision &phi)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/neg__binomial__2__ccdf__log_8hpp_source.html b/doc/api/html/neg__binomial__2__ccdf__log_8hpp_source.html new file mode 100644 index 00000000000..f3155c4652b --- /dev/null +++ b/doc/api/html/neg__binomial__2__ccdf__log_8hpp_source.html @@ -0,0 +1,208 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/neg_binomial_2_ccdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
neg_binomial_2_ccdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_NEG_BINOMIAL_2_CCDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_NEG_BINOMIAL_2_CCDF_LOG_HPP
+
3 
+
4 #include <boost/math/special_functions/digamma.hpp>
+
5 #include <boost/random/negative_binomial_distribution.hpp>
+
6 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + +
23 #include <vector>
+
24 
+
25 namespace stan {
+
26 
+
27  namespace math {
+
28 
+
29  // Temporary neg_binomial_2_ccdf implementation that
+
30  // transforms the input parameters and calls neg_binomial_ccdf
+
31  template <typename T_n, typename T_location, typename T_precision>
+
32  typename return_type<T_location, T_precision>::type
+ +
34  const T_location& mu,
+
35  const T_precision& phi) {
+
36  if ( !( stan::length(n) && stan::length(mu) && stan::length(phi) ) )
+
37  return 0.0;
+
38 
+ + + + + +
44 
+
45  static const char* function("stan::math::neg_binomial_2_cdf");
+
46  check_positive_finite(function, "Location parameter", mu);
+
47  check_positive_finite(function, "Precision parameter", phi);
+
48  check_not_nan(function, "Random variable", n);
+
49  check_consistent_sizes(function,
+
50  "Random variable", n,
+
51  "Location parameter", mu,
+
52  "Precision Parameter", phi);
+
53 
+
54  VectorView<const T_n> n_vec(n);
+ +
56  VectorView<const T_precision> phi_vec(phi);
+
57 
+
58  size_t size_beta = max_size(mu, phi);
+
59 
+
60  std::vector<typename return_type<T_location, T_precision>::type>
+
61  beta_vec(size_beta);
+
62  for (size_t i = 0; i < size_beta; ++i)
+
63  beta_vec[i] = phi_vec[i] / mu_vec[i];
+
64 
+
65  // Cast a vector of size 1 down to a
+
66  // scalar to avoid dimension mismatch
+
67  if (size_beta == 1)
+
68  return neg_binomial_ccdf_log(n, phi, beta_vec[0]);
+
69  else
+
70  return neg_binomial_ccdf_log(n, phi, beta_vec);
+
71  }
+
72  }
+
73 }
+
74 #endif
+ +
bool check_less(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is strictly less than high.
Definition: check_less.hpp:81
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
return_type< T_location, T_precision >::type neg_binomial_2_ccdf_log(const T_n &n, const T_location &mu, const T_precision &phi)
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+ + + + + +
return_type< T_shape, T_inv_scale >::type neg_binomial_ccdf_log(const T_n &n, const T_shape &alpha, const T_inv_scale &beta)
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+ + +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/neg__binomial__2__cdf_8hpp.html b/doc/api/html/neg__binomial__2__cdf_8hpp.html new file mode 100644 index 00000000000..8ffe1c0afb3 --- /dev/null +++ b/doc/api/html/neg__binomial__2__cdf_8hpp.html @@ -0,0 +1,150 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/neg_binomial_2_cdf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
neg_binomial_2_cdf.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_n , typename T_location , typename T_precision >
return_type< T_location,
+T_precision >::type 
stan::math::neg_binomial_2_cdf (const T_n &n, const T_location &mu, const T_precision &phi)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/neg__binomial__2__cdf_8hpp_source.html b/doc/api/html/neg__binomial__2__cdf_8hpp_source.html new file mode 100644 index 00000000000..2d17fc18f02 --- /dev/null +++ b/doc/api/html/neg__binomial__2__cdf_8hpp_source.html @@ -0,0 +1,301 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/neg_binomial_2_cdf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
neg_binomial_2_cdf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_NEG_BINOMIAL_2_CDF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_NEG_BINOMIAL_2_CDF_HPP
+
3 
+ + + + +
8 
+ + + + +
13 
+ + + +
17 
+ + + + + +
23 
+
24 #include <boost/math/special_functions/digamma.hpp>
+
25 #include <boost/random/negative_binomial_distribution.hpp>
+
26 #include <boost/random/variate_generator.hpp>
+
27 
+
28 #include <limits>
+
29 #include <vector>
+
30 
+
31 namespace stan {
+
32  namespace math {
+
33 
+
34  template <typename T_n, typename T_location,
+
35  typename T_precision>
+
36  typename return_type<T_location, T_precision>::type
+
37  neg_binomial_2_cdf(const T_n& n,
+
38  const T_location& mu,
+
39  const T_precision& phi) {
+
40  static const char* function("stan::prob::neg_binomial_2_cdf");
+
41  typedef typename stan::partials_return_type<T_n, T_location,
+
42  T_precision>::type
+
43  T_partials_return;
+
44 
+ + + + +
49 
+
50  // Ensure non-zero arugment lengths
+
51  if (!(stan::length(n) && stan::length(mu) && stan::length(phi)))
+
52  return 1.0;
+
53 
+
54  T_partials_return P(1.0);
+
55 
+
56  // Validate arguments
+
57  check_positive_finite(function, "Location parameter", mu);
+
58  check_positive_finite(function, "Precision parameter", phi);
+
59  check_not_nan(function, "Random variable", n);
+
60  check_consistent_sizes(function,
+
61  "Random variable", n,
+
62  "Location parameter", mu,
+
63  "Precision Parameter", phi);
+
64 
+
65  // Wrap arguments in vector views
+
66  VectorView<const T_n> n_vec(n);
+ +
68  VectorView<const T_precision> phi_vec(phi);
+
69  size_t size = max_size(n, mu, phi);
+
70 
+
71  // Compute vectorized CDF and gradient
+ + + + +
76  using stan::math::digamma;
+
77 
+ +
79  operands_and_partials(mu, phi);
+
80 
+
81  // Explicit return for extreme values
+
82  // The gradients are technically ill-defined, but treated as zero
+
83  for (size_t i = 0; i < stan::length(n); i++) {
+
84  if (value_of(n_vec[i]) < 0)
+
85  return operands_and_partials.to_var(0.0, mu, phi);
+
86  }
+
87 
+
88  // Cache a few expensive function calls if phi is a parameter
+ +
90  T_partials_return, T_precision>
+
91  digamma_phi_vec(stan::length(phi));
+
92 
+ +
94  T_partials_return, T_precision>
+
95  digamma_sum_vec(stan::length(phi));
+
96 
+ +
98  for (size_t i = 0; i < stan::length(phi); i++) {
+
99  const T_partials_return n_dbl = value_of(n_vec[i]);
+
100  const T_partials_return phi_dbl = value_of(phi_vec[i]);
+
101 
+
102  digamma_phi_vec[i] = digamma(phi_dbl);
+
103  digamma_sum_vec[i] = digamma(n_dbl + phi_dbl + 1);
+
104  }
+
105  }
+
106 
+
107  for (size_t i = 0; i < size; i++) {
+
108  // Explicit results for extreme values
+
109  // The gradients are technically ill-defined, but treated as zero
+
110  if (value_of(n_vec[i]) == std::numeric_limits<int>::max())
+
111  return operands_and_partials.to_var(1.0, mu, phi);
+
112 
+
113  const T_partials_return n_dbl = value_of(n_vec[i]);
+
114  const T_partials_return mu_dbl = value_of(mu_vec[i]);
+
115  const T_partials_return phi_dbl = value_of(phi_vec[i]);
+
116 
+
117  const T_partials_return p_dbl = phi_dbl / (mu_dbl + phi_dbl);
+
118  const T_partials_return d_dbl = 1.0 / ((mu_dbl + phi_dbl)
+
119  * (mu_dbl + phi_dbl));
+
120 
+
121  const T_partials_return P_i =
+
122  inc_beta(phi_dbl, n_dbl + 1.0, p_dbl);
+
123 
+
124  P *= P_i;
+
125 
+ +
127  operands_and_partials.d_x1[i] +=
+
128  - inc_beta_ddz(phi_dbl, n_dbl + 1.0, p_dbl) * phi_dbl * d_dbl / P_i;
+
129 
+ +
131  operands_and_partials.d_x2[i]
+
132  += inc_beta_dda(phi_dbl, n_dbl + 1, p_dbl,
+
133  digamma_phi_vec[i],
+
134  digamma_sum_vec[i]) / P_i
+
135  + inc_beta_ddz(phi_dbl, n_dbl + 1.0, p_dbl)
+
136  * mu_dbl * d_dbl / P_i;
+
137  }
+
138  }
+
139 
+ +
141  for (size_t i = 0; i < stan::length(mu); ++i)
+
142  operands_and_partials.d_x1[i] *= P;
+
143  }
+
144 
+ +
146  for (size_t i = 0; i < stan::length(phi); ++i)
+
147  operands_and_partials.d_x2[i] *= P;
+
148  }
+
149 
+
150  return operands_and_partials.to_var(P, mu, phi);
+
151  }
+
152 
+
153  } // math
+
154 } // stan
+
155 #endif
+ +
return_type< T_location, T_precision >::type neg_binomial_2_cdf(const T_n &n, const T_location &mu, const T_precision &phi)
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
T inc_beta_dda(T a, T b, T z, T digamma_a, T digamma_ab)
Returns the partial derivative of the regularized incomplete beta function, I_{z}(a, b) with respect to a.
+ + +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
T inc_beta_ddz(T a, T b, T z)
Returns the partial derivative of the regularized incomplete beta function, I_{z}(a, b) with respect to z.
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > inc_beta(const fvar< T > &a, const fvar< T > &b, const fvar< T > &x)
Definition: inc_beta.hpp:20
+ + +
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
int max(const std::vector< int > &x)
Returns the maximum coefficient in the specified column vector.
Definition: max.hpp:21
+ + + +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/neg__binomial__2__cdf__log_8hpp.html b/doc/api/html/neg__binomial__2__cdf__log_8hpp.html new file mode 100644 index 00000000000..d522e708b7c --- /dev/null +++ b/doc/api/html/neg__binomial__2__cdf__log_8hpp.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/neg_binomial_2_cdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
neg_binomial_2_cdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_n , typename T_location , typename T_precision >
return_type< T_location,
+T_precision >::type 
stan::math::neg_binomial_2_cdf_log (const T_n &n, const T_location &mu, const T_precision &phi)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/neg__binomial__2__cdf__log_8hpp_source.html b/doc/api/html/neg__binomial__2__cdf__log_8hpp_source.html new file mode 100644 index 00000000000..4c0be2954f3 --- /dev/null +++ b/doc/api/html/neg__binomial__2__cdf__log_8hpp_source.html @@ -0,0 +1,223 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/neg_binomial_2_cdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
neg_binomial_2_cdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_NEG_BINOMIAL_2_CDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_NEG_BINOMIAL_2_CDF_LOG_HPP
+
3 
+ + + + + + + + + + + + + + +
18 #include <boost/math/special_functions/digamma.hpp>
+
19 #include <boost/random/negative_binomial_distribution.hpp>
+
20 #include <boost/random/variate_generator.hpp>
+
21 #include <cmath>
+
22 #include <vector>
+
23 
+
24 namespace stan {
+
25 
+
26  namespace math {
+
27 
+
28  template <typename T_n, typename T_location,
+
29  typename T_precision>
+
30  typename return_type<T_location, T_precision>::type
+
31  neg_binomial_2_cdf_log(const T_n& n,
+
32  const T_location& mu,
+
33  const T_precision& phi) {
+
34  // Size checks
+
35  if ( !( stan::length(n) && stan::length(mu)
+
36  && stan::length(phi) ) )
+
37  return 0.0;
+
38 
+ + + + + +
44  using std::log;
+
45  using std::log;
+
46 
+
47  static const char* function("stan::math::neg_binomial_2_cdf");
+
48  check_positive_finite(function, "Location parameter", mu);
+
49  check_positive_finite(function, "Precision parameter", phi);
+
50  check_not_nan(function, "Random variable", n);
+
51  check_consistent_sizes(function,
+
52  "Random variable", n,
+
53  "Location parameter", mu,
+
54  "Precision Parameter", phi);
+
55 
+
56  VectorView<const T_n> n_vec(n);
+ +
58  VectorView<const T_precision> phi_vec(phi);
+
59 
+
60  size_t size_phi_mu = max_size(mu, phi);
+
61  size_t size_n = length(n);
+
62 
+
63  std::vector<typename return_type<T_location, T_precision>::type>
+
64  phi_mu(size_phi_mu);
+
65  std::vector<typename return_type<T_n>::type> np1(size_n);
+
66 
+
67  for (size_t i = 0; i < size_phi_mu; i++)
+
68  phi_mu[i] = phi_vec[i]/(phi_vec[i]+mu_vec[i]);
+
69 
+
70  for (size_t i = 0; i < size_n; i++)
+
71  if (n_vec[i] < 0)
+
72  return log(0.0);
+
73  else
+
74  np1[i] = n_vec[i] + 1.0;
+
75 
+
76  if (size_n == 1) {
+
77  if (size_phi_mu == 1)
+
78  return beta_cdf_log(phi_mu[0], phi, np1[0]);
+
79  else
+
80  return beta_cdf_log(phi_mu, phi, np1[0]);
+
81  } else {
+
82  if (size_phi_mu == 1)
+
83  return beta_cdf_log(phi_mu[0], phi, np1);
+
84  else
+
85  return beta_cdf_log(phi_mu, phi, np1);
+
86  }
+
87  }
+
88  }
+
89 }
+
90 #endif
+
bool check_less(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is strictly less than high.
Definition: check_less.hpp:81
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ + + +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+ + + + + +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+
return_type< T_y, T_scale_succ, T_scale_fail >::type beta_cdf_log(const T_y &y, const T_scale_succ &alpha, const T_scale_fail &beta)
+ + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
return_type< T_location, T_precision >::type neg_binomial_2_cdf_log(const T_n &n, const T_location &mu, const T_precision &phi)
+
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+ + +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/neg__binomial__2__log_8hpp.html b/doc/api/html/neg__binomial__2__log_8hpp.html new file mode 100644 index 00000000000..157a8d2d6ff --- /dev/null +++ b/doc/api/html/neg__binomial__2__log_8hpp.html @@ -0,0 +1,156 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/neg_binomial_2_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
neg_binomial_2_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<bool propto, typename T_n , typename T_location , typename T_precision >
return_type< T_location,
+T_precision >::type 
stan::math::neg_binomial_2_log (const T_n &n, const T_location &mu, const T_precision &phi)
 
template<typename T_n , typename T_location , typename T_precision >
return_type< T_location,
+T_precision >::type 
stan::math::neg_binomial_2_log (const T_n &n, const T_location &mu, const T_precision &phi)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/neg__binomial__2__log_8hpp_source.html b/doc/api/html/neg__binomial__2__log_8hpp_source.html new file mode 100644 index 00000000000..ed89de30d58 --- /dev/null +++ b/doc/api/html/neg__binomial__2__log_8hpp_source.html @@ -0,0 +1,297 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/neg_binomial_2_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
neg_binomial_2_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_NEG_BINOMIAL_2_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_NEG_BINOMIAL_2_LOG_HPP
+
3 
+
4 #include <boost/math/special_functions/digamma.hpp>
+
5 #include <boost/random/negative_binomial_distribution.hpp>
+
6 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + + + +
26 #include <cmath>
+
27 
+
28 namespace stan {
+
29 
+
30  namespace math {
+
31 
+
32  // NegBinomial(n|mu, phi) [mu >= 0; phi > 0; n >= 0]
+
33  template <bool propto,
+
34  typename T_n,
+
35  typename T_location, typename T_precision>
+
36  typename return_type<T_location, T_precision>::type
+
37  neg_binomial_2_log(const T_n& n,
+
38  const T_location& mu,
+
39  const T_precision& phi) {
+
40  typedef typename stan::partials_return_type<T_n, T_location,
+
41  T_precision>::type
+
42  T_partials_return;
+
43 
+
44  static const char* function("stan::math::neg_binomial_2_log");
+
45 
+ + + + + +
51 
+
52  // check if any vectors are zero length
+
53  if (!(stan::length(n)
+
54  && stan::length(mu)
+
55  && stan::length(phi)))
+
56  return 0.0;
+
57 
+
58  T_partials_return logp(0.0);
+
59  check_nonnegative(function, "Failures variable", n);
+
60  check_positive_finite(function, "Location parameter", mu);
+
61  check_positive_finite(function, "Precision parameter", phi);
+
62  check_consistent_sizes(function,
+
63  "Failures variable", n,
+
64  "Location parameter", mu,
+
65  "Precision parameter", phi);
+
66 
+
67  // check if no variables are involved and prop-to
+ +
69  return 0.0;
+
70 
+ +
72  using stan::math::digamma;
+
73  using stan::math::lgamma;
+
74  using std::log;
+
75  using std::log;
+
76 
+
77  // set up template expressions wrapping scalars into vector views
+
78  VectorView<const T_n> n_vec(n);
+ +
80  VectorView<const T_precision> phi_vec(phi);
+
81  size_t size = max_size(n, mu, phi);
+
82 
+ +
84  operands_and_partials(mu, phi);
+
85 
+
86  size_t len_ep = max_size(mu, phi);
+
87  size_t len_np = max_size(n, phi);
+
88 
+ +
90  for (size_t i = 0, size = length(mu); i < size; ++i)
+
91  mu__[i] = value_of(mu_vec[i]);
+
92 
+ +
94  for (size_t i = 0, size = length(phi); i < size; ++i)
+
95  phi__[i] = value_of(phi_vec[i]);
+
96 
+ +
98  for (size_t i = 0, size = length(phi); i < size; ++i)
+
99  log_phi[i] = log(phi__[i]);
+
100 
+ +
102  log_mu_plus_phi(len_ep);
+
103  for (size_t i = 0; i < len_ep; ++i)
+
104  log_mu_plus_phi[i] = log(mu__[i] + phi__[i]);
+
105 
+ +
107  n_plus_phi(len_np);
+
108  for (size_t i = 0; i < len_np; ++i)
+
109  n_plus_phi[i] = n_vec[i] + phi__[i];
+
110 
+
111  for (size_t i = 0; i < size; i++) {
+ +
113  logp -= lgamma(n_vec[i] + 1.0);
+ +
115  logp += multiply_log(phi__[i], phi__[i]) - lgamma(phi__[i]);
+ +
117  logp -= (n_plus_phi[i])*log_mu_plus_phi[i];
+ +
119  logp += multiply_log(n_vec[i], mu__[i]);
+ +
121  logp += lgamma(n_plus_phi[i]);
+
122 
+ +
124  operands_and_partials.d_x1[i]
+
125  += n_vec[i]/mu__[i]
+
126  - (n_vec[i] + phi__[i])
+
127  / (mu__[i] + phi__[i]);
+ +
129  operands_and_partials.d_x2[i]
+
130  += 1.0 - n_plus_phi[i]/(mu__[i] + phi__[i])
+
131  + log_phi[i] - log_mu_plus_phi[i] - digamma(phi__[i])
+
132  + digamma(n_plus_phi[i]);
+
133  }
+
134  return operands_and_partials.to_var(logp, mu, phi);
+
135  }
+
136 
+
137  template <typename T_n,
+
138  typename T_location, typename T_precision>
+
139  inline
+ +
141  neg_binomial_2_log(const T_n& n,
+
142  const T_location& mu,
+
143  const T_precision& phi) {
+
144  return neg_binomial_2_log<false>(n, mu, phi);
+
145  }
+
146  }
+
147 }
+
148 #endif
+ +
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+ +
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ +
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ +
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
return_type< T_location, T_precision >::type neg_binomial_2_log(const T_n &n, const T_location &mu, const T_precision &phi)
+
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + + +
fvar< T > multiply_log(const fvar< T > &x1, const fvar< T > &x2)
+ + +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+ + +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/neg__binomial__2__log__log_8hpp.html b/doc/api/html/neg__binomial__2__log__log_8hpp.html new file mode 100644 index 00000000000..70d26801884 --- /dev/null +++ b/doc/api/html/neg__binomial__2__log__log_8hpp.html @@ -0,0 +1,152 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/neg_binomial_2_log_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
neg_binomial_2_log_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<bool propto, typename T_n , typename T_log_location , typename T_precision >
return_type< T_log_location,
+T_precision >::type 
stan::math::neg_binomial_2_log_log (const T_n &n, const T_log_location &eta, const T_precision &phi)
 
template<typename T_n , typename T_log_location , typename T_precision >
return_type< T_log_location,
+T_precision >::type 
stan::math::neg_binomial_2_log_log (const T_n &n, const T_log_location &eta, const T_precision &phi)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/neg__binomial__2__log__log_8hpp_source.html b/doc/api/html/neg__binomial__2__log__log_8hpp_source.html new file mode 100644 index 00000000000..d23b54a11ca --- /dev/null +++ b/doc/api/html/neg__binomial__2__log__log_8hpp_source.html @@ -0,0 +1,295 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/neg_binomial_2_log_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
neg_binomial_2_log_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_NEG_BINOMIAL_2_LOG_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_NEG_BINOMIAL_2_LOG_LOG_HPP
+
3 
+
4 #include <boost/math/special_functions/digamma.hpp>
+
5 #include <boost/random/negative_binomial_distribution.hpp>
+
6 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + +
22 #include <cmath>
+
23 
+
24 namespace stan {
+
25 
+
26  namespace math {
+
27 
+
28  // NegBinomial(n|eta, phi) [phi > 0; n >= 0]
+
29  template <bool propto,
+
30  typename T_n,
+
31  typename T_log_location, typename T_precision>
+
32  typename return_type<T_log_location, T_precision>::type
+
33  neg_binomial_2_log_log(const T_n& n,
+
34  const T_log_location& eta,
+
35  const T_precision& phi) {
+
36  typedef typename stan::partials_return_type<T_n, T_log_location,
+
37  T_precision>::type
+
38  T_partials_return;
+
39 
+
40  static const char* function("stan::prob::neg_binomial_2_log_log");
+
41 
+ + + + + + +
48 
+
49  // check if any vectors are zero length
+
50  if (!(stan::length(n)
+
51  && stan::length(eta)
+
52  && stan::length(phi)))
+
53  return 0.0;
+
54 
+
55  T_partials_return logp(0.0);
+
56  check_nonnegative(function, "Failures variable", n);
+
57  check_finite(function, "Log location parameter", eta);
+
58  check_positive_finite(function, "Precision parameter", phi);
+
59  check_consistent_sizes(function,
+
60  "Failures variable", n,
+
61  "Log location parameter", eta,
+
62  "Precision parameter", phi);
+
63 
+
64  // check if no variables are involved and prop-to
+ +
66  return 0.0;
+
67 
+ + +
70  using stan::math::digamma;
+
71  using stan::math::lgamma;
+
72  using std::exp;
+
73  using std::log;
+
74 
+
75  // set up template expressions wrapping scalars into vector views
+
76  VectorView<const T_n> n_vec(n);
+ +
78  VectorView<const T_precision> phi_vec(phi);
+
79  size_t size = max_size(n, eta, phi);
+
80 
+ +
82  operands_and_partials(eta, phi);
+
83 
+
84  size_t len_ep = max_size(eta, phi);
+
85  size_t len_np = max_size(n, phi);
+
86 
+ +
88  for (size_t i = 0, size = length(eta); i < size; ++i)
+
89  eta__[i] = value_of(eta_vec[i]);
+
90 
+ +
92  for (size_t i = 0, size = length(phi); i < size; ++i)
+
93  phi__[i] = value_of(phi_vec[i]);
+
94 
+
95 
+ +
97  log_phi(length(phi));
+
98  for (size_t i = 0, size = length(phi); i < size; ++i)
+
99  log_phi[i] = log(phi__[i]);
+
100 
+ +
102  logsumexp_eta_logphi(len_ep);
+
103  for (size_t i = 0; i < len_ep; ++i)
+
104  logsumexp_eta_logphi[i] = log_sum_exp(eta__[i], log_phi[i]);
+
105 
+ +
107  n_plus_phi(len_np);
+
108  for (size_t i = 0; i < len_np; ++i)
+
109  n_plus_phi[i] = n_vec[i] + phi__[i];
+
110 
+
111  for (size_t i = 0; i < size; i++) {
+ +
113  logp -= lgamma(n_vec[i] + 1.0);
+ +
115  logp += multiply_log(phi__[i], phi__[i]) - lgamma(phi__[i]);
+ +
117  logp -= (n_plus_phi[i])*logsumexp_eta_logphi[i];
+ +
119  logp += n_vec[i]*eta__[i];
+ +
121  logp += lgamma(n_plus_phi[i]);
+
122 
+ +
124  operands_and_partials.d_x1[i]
+
125  += n_vec[i] - n_plus_phi[i]
+
126  / (phi__[i]/exp(eta__[i]) + 1.0);
+ +
128  operands_and_partials.d_x2[i]
+
129  += 1.0 - n_plus_phi[i]/(exp(eta__[i]) + phi__[i])
+
130  + log_phi[i] - logsumexp_eta_logphi[i] - digamma(phi__[i])
+
131  + digamma(n_plus_phi[i]);
+
132  }
+
133  return operands_and_partials.to_var(logp, eta, phi);
+
134  }
+
135 
+
136  template <typename T_n,
+
137  typename T_log_location, typename T_precision>
+
138  inline
+ + +
141  const T_log_location& eta,
+
142  const T_precision& phi) {
+
143  return neg_binomial_2_log_log<false>(n, eta, phi);
+
144  }
+
145  }
+
146 }
+
147 #endif
+ +
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
return_type< T_log_location, T_precision >::type neg_binomial_2_log_log(const T_n &n, const T_log_location &eta, const T_precision &phi)
+ +
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
fvar< T > log_sum_exp(const std::vector< fvar< T > > &v)
Definition: log_sum_exp.hpp:14
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ + +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+
fvar< T > multiply_log(const fvar< T > &x1, const fvar< T > &x2)
+ + +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+ + +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/neg__binomial__2__log__rng_8hpp.html b/doc/api/html/neg__binomial__2__log__rng_8hpp.html new file mode 100644 index 00000000000..8fbf1c172d3 --- /dev/null +++ b/doc/api/html/neg__binomial__2__log__rng_8hpp.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/neg_binomial_2_log_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
neg_binomial_2_log_rng.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
int stan::math::neg_binomial_2_log_rng (const double eta, const double phi, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/neg__binomial__2__log__rng_8hpp_source.html b/doc/api/html/neg__binomial__2__log__rng_8hpp_source.html new file mode 100644 index 00000000000..074e1dc2a8c --- /dev/null +++ b/doc/api/html/neg__binomial__2__log__rng_8hpp_source.html @@ -0,0 +1,200 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/neg_binomial_2_log_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
neg_binomial_2_log_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_NEG_BINOMIAL_2_LOG_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_NEG_BINOMIAL_2_LOG_RNG_HPP
+
3 
+
4 #include <boost/math/special_functions/digamma.hpp>
+
5 #include <boost/random/negative_binomial_distribution.hpp>
+
6 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + +
22 
+
23 namespace stan {
+
24 
+
25  namespace math {
+
26 
+
27  template <class RNG>
+
28  inline int
+
29  neg_binomial_2_log_rng(const double eta,
+
30  const double phi,
+
31  RNG& rng) {
+
32  using boost::variate_generator;
+
33  using boost::random::negative_binomial_distribution;
+
34  using boost::random::poisson_distribution;
+
35  using boost::gamma_distribution;
+
36 
+
37  static const char* function("stan::math::neg_binomial_2_log_rng");
+
38 
+
39  check_finite(function, "Log-location parameter", eta);
+
40  check_positive_finite(function, "Precision parameter", phi);
+
41 
+
42  double exp_eta_div_phi = std::exp(eta)/phi;
+
43 
+
44  // gamma_rng params must be positive and finite
+
45  check_positive_finite(function,
+
46  "Exponential of the log-location parameter divided by "
+
47  "the precision parameter", exp_eta_div_phi);
+
48 
+
49  double rng_from_gamma =
+
50  variate_generator<RNG&, gamma_distribution<> >
+
51  (rng, gamma_distribution<>(phi, exp_eta_div_phi))();
+
52 
+
53  // same as the constraints for poisson_rng
+
54  check_less(function,
+
55  "Random number that came from gamma distribution",
+
56  rng_from_gamma, POISSON_MAX_RATE);
+
57  check_not_nan(function,
+
58  "Random number that came from gamma distribution",
+
59  rng_from_gamma);
+
60  check_nonnegative(function,
+
61  "Random number that came from gamma distribution",
+
62  rng_from_gamma);
+
63 
+
64  return variate_generator<RNG&, poisson_distribution<> >
+
65  (rng, poisson_distribution<>(rng_from_gamma))();
+
66  }
+
67  }
+
68 }
+
69 #endif
+
bool check_less(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is strictly less than high.
Definition: check_less.hpp:81
+ + +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ + + + + + + +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ +
const double POISSON_MAX_RATE
Largest rate parameter allowed in Poisson RNG.
Definition: constants.hpp:72
+ +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
int neg_binomial_2_log_rng(const double eta, const double phi, RNG &rng)
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ + + +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/neg__binomial__2__rng_8hpp.html b/doc/api/html/neg__binomial__2__rng_8hpp.html new file mode 100644 index 00000000000..224e633cd2d --- /dev/null +++ b/doc/api/html/neg__binomial__2__rng_8hpp.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/neg_binomial_2_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
neg_binomial_2_rng.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
int stan::math::neg_binomial_2_rng (const double mu, const double phi, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/neg__binomial__2__rng_8hpp_source.html b/doc/api/html/neg__binomial__2__rng_8hpp_source.html new file mode 100644 index 00000000000..33a743bcbbd --- /dev/null +++ b/doc/api/html/neg__binomial__2__rng_8hpp_source.html @@ -0,0 +1,198 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/neg_binomial_2_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
neg_binomial_2_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_NEG_BINOMIAL_2_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_NEG_BINOMIAL_2_RNG_HPP
+
3 
+
4 #include <boost/math/special_functions/digamma.hpp>
+
5 #include <boost/random/negative_binomial_distribution.hpp>
+
6 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + +
22 
+
23 namespace stan {
+
24 
+
25  namespace math {
+
26 
+
27  template <class RNG>
+
28  inline int
+
29  neg_binomial_2_rng(const double mu,
+
30  const double phi,
+
31  RNG& rng) {
+
32  using boost::variate_generator;
+
33  using boost::random::negative_binomial_distribution;
+
34  using boost::random::poisson_distribution;
+
35  using boost::gamma_distribution;
+
36 
+
37  static const char* function("stan::math::neg_binomial_2_rng");
+
38 
+
39  check_positive_finite(function, "Location parameter", mu);
+
40  check_positive_finite(function, "Precision parameter", phi);
+
41 
+
42  double mu_div_phi = mu/phi;
+
43 
+
44  // gamma_rng params must be positive and finite
+
45  check_positive_finite(function,
+
46  "Location parameter divided by the precision parameter",
+
47  mu_div_phi);
+
48 
+
49  double rng_from_gamma =
+
50  variate_generator<RNG&, gamma_distribution<> >
+
51  (rng, gamma_distribution<>(phi, mu_div_phi))();
+
52 
+
53  // same as the constraints for poisson_rng
+
54  check_less(function,
+
55  "Random number that came from gamma distribution",
+
56  rng_from_gamma, POISSON_MAX_RATE);
+
57  check_not_nan(function,
+
58  "Random number that came from gamma distribution",
+
59  rng_from_gamma);
+
60  check_nonnegative(function,
+
61  "Random number that came from gamma distribution",
+
62  rng_from_gamma);
+
63 
+
64  return variate_generator<RNG&, poisson_distribution<> >
+
65  (rng, poisson_distribution<>(rng_from_gamma))();
+
66  }
+
67  }
+
68 }
+
69 #endif
+
bool check_less(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is strictly less than high.
Definition: check_less.hpp:81
+ + +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ + + + + + + +
int neg_binomial_2_rng(const double mu, const double phi, RNG &rng)
+ +
const double POISSON_MAX_RATE
Largest rate parameter allowed in Poisson RNG.
Definition: constants.hpp:72
+ + +
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ + + +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/neg__binomial__ccdf__log_8hpp.html b/doc/api/html/neg__binomial__ccdf__log_8hpp.html new file mode 100644 index 00000000000..cf750f4848a --- /dev/null +++ b/doc/api/html/neg__binomial__ccdf__log_8hpp.html @@ -0,0 +1,149 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/neg_binomial_ccdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
neg_binomial_ccdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_n , typename T_shape , typename T_inv_scale >
return_type< T_shape,
+T_inv_scale >::type 
stan::math::neg_binomial_ccdf_log (const T_n &n, const T_shape &alpha, const T_inv_scale &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/neg__binomial__ccdf__log_8hpp_source.html b/doc/api/html/neg__binomial__ccdf__log_8hpp_source.html new file mode 100644 index 00000000000..75024572fa7 --- /dev/null +++ b/doc/api/html/neg__binomial__ccdf__log_8hpp_source.html @@ -0,0 +1,295 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/neg_binomial_ccdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
neg_binomial_ccdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_NEG_BINOMIAL_CCDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_NEG_BINOMIAL_CCDF_LOG_HPP
+
3 
+
4 #include <boost/math/special_functions/digamma.hpp>
+
5 #include <boost/random/negative_binomial_distribution.hpp>
+
6 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + +
22 #include <cmath>
+
23 #include <limits>
+
24 
+
25 namespace stan {
+
26 
+
27  namespace math {
+
28 
+
29  template <typename T_n, typename T_shape,
+
30  typename T_inv_scale>
+
31  typename return_type<T_shape, T_inv_scale>::type
+
32  neg_binomial_ccdf_log(const T_n& n, const T_shape& alpha,
+
33  const T_inv_scale& beta) {
+
34  static const char* function("stan::math::neg_binomial_ccdf_log");
+
35  typedef typename stan::partials_return_type<T_n, T_shape,
+
36  T_inv_scale>::type
+
37  T_partials_return;
+
38 
+ + + + +
43 
+
44  // Ensure non-zero arugment lengths
+
45  if (!(stan::length(n) && stan::length(alpha) && stan::length(beta)))
+
46  return 0.0;
+
47 
+
48  T_partials_return P(0.0);
+
49 
+
50  // Validate arguments
+
51  check_positive_finite(function, "Shape parameter", alpha);
+
52  check_positive_finite(function, "Inverse scale parameter", beta);
+
53  check_consistent_sizes(function,
+
54  "Failures variable", n,
+
55  "Shape parameter", alpha,
+
56  "Inverse scale parameter", beta);
+
57 
+
58  // Wrap arguments in vector views
+
59  VectorView<const T_n> n_vec(n);
+
60  VectorView<const T_shape> alpha_vec(alpha);
+
61  VectorView<const T_inv_scale> beta_vec(beta);
+
62  size_t size = max_size(n, alpha, beta);
+
63 
+
64  // Compute vectorized cdf_log and gradient
+ + +
67  using stan::math::digamma;
+
68  using stan::math::lbeta;
+
69  using std::exp;
+
70  using std::pow;
+
71  using std::log;
+
72  using std::exp;
+
73 
+ +
75  operands_and_partials(alpha, beta);
+
76 
+
77  // Explicit return for extreme values
+
78  // The gradients are technically ill-defined, but treated as zero
+
79  for (size_t i = 0; i < stan::length(n); i++) {
+
80  if (value_of(n_vec[i]) < 0)
+
81  return operands_and_partials.to_var(0.0, alpha, beta);
+
82  }
+
83 
+
84  // Cache a few expensive function calls if alpha is a parameter
+ +
86  T_partials_return, T_shape>
+
87  digammaN_vec(stan::length(alpha));
+ +
89  T_partials_return, T_shape>
+
90  digammaAlpha_vec(stan::length(alpha));
+ +
92  T_partials_return, T_shape>
+
93  digammaSum_vec(stan::length(alpha));
+
94 
+ +
96  for (size_t i = 0; i < stan::length(alpha); i++) {
+
97  const T_partials_return n_dbl = value_of(n_vec[i]);
+
98  const T_partials_return alpha_dbl = value_of(alpha_vec[i]);
+
99 
+
100  digammaN_vec[i] = digamma(n_dbl + 1);
+
101  digammaAlpha_vec[i] = digamma(alpha_dbl);
+
102  digammaSum_vec[i] = digamma(n_dbl + alpha_dbl + 1);
+
103  }
+
104  }
+
105 
+
106  for (size_t i = 0; i < size; i++) {
+
107  // Explicit results for extreme values
+
108  // The gradients are technically ill-defined, but treated as zero
+
109  if (value_of(n_vec[i]) == std::numeric_limits<int>::max())
+
110  return operands_and_partials.to_var(stan::math::negative_infinity(),
+
111  alpha, beta);
+
112 
+
113  const T_partials_return n_dbl = value_of(n_vec[i]);
+
114  const T_partials_return alpha_dbl = value_of(alpha_vec[i]);
+
115  const T_partials_return beta_dbl = value_of(beta_vec[i]);
+
116  const T_partials_return p_dbl = beta_dbl / (1.0 + beta_dbl);
+
117  const T_partials_return d_dbl = 1.0 / ( (1.0 + beta_dbl)
+
118  * (1.0 + beta_dbl) );
+
119  const T_partials_return Pi = 1.0 - inc_beta(alpha_dbl, n_dbl + 1.0,
+
120  p_dbl);
+
121  const T_partials_return beta_func = exp(lbeta(n_dbl + 1, alpha_dbl));
+
122 
+
123  P += log(Pi);
+
124 
+ +
126  T_partials_return g1 = 0;
+
127  T_partials_return g2 = 0;
+
128 
+
129  stan::math::grad_reg_inc_beta(g1, g2, alpha_dbl,
+
130  n_dbl + 1, p_dbl,
+
131  digammaAlpha_vec[i],
+
132  digammaN_vec[i],
+
133  digammaSum_vec[i],
+
134  beta_func);
+
135  operands_and_partials.d_x1[i] -= g1 / Pi;
+
136  }
+ +
138  operands_and_partials.d_x2[i] -= d_dbl * pow(1-p_dbl, n_dbl)
+
139  * pow(p_dbl, alpha_dbl-1) / beta_func / Pi;
+
140  }
+
141 
+
142  return operands_and_partials.to_var(P, alpha, beta);
+
143  }
+
144  }
+
145 }
+
146 #endif
+ + +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > lbeta(const fvar< T > &x1, const fvar< T > &x2)
Definition: lbeta.hpp:16
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+ +
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > inc_beta(const fvar< T > &a, const fvar< T > &b, const fvar< T > &x)
Definition: inc_beta.hpp:20
+
return_type< T_shape, T_inv_scale >::type neg_binomial_ccdf_log(const T_n &n, const T_shape &alpha, const T_inv_scale &beta)
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
int max(const std::vector< int > &x)
Returns the maximum coefficient in the specified column vector.
Definition: max.hpp:21
+ + + +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
void grad_reg_inc_beta(T &g1, T &g2, T a, T b, T z, T digammaA, T digammaB, T digammaSum, T betaAB)
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/neg__binomial__cdf_8hpp.html b/doc/api/html/neg__binomial__cdf_8hpp.html new file mode 100644 index 00000000000..ccbab8a6261 --- /dev/null +++ b/doc/api/html/neg__binomial__cdf_8hpp.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/neg_binomial_cdf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
neg_binomial_cdf.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_n , typename T_shape , typename T_inv_scale >
return_type< T_shape,
+T_inv_scale >::type 
stan::math::neg_binomial_cdf (const T_n &n, const T_shape &alpha, const T_inv_scale &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/neg__binomial__cdf_8hpp_source.html b/doc/api/html/neg__binomial__cdf_8hpp_source.html new file mode 100644 index 00000000000..9508ef52ba7 --- /dev/null +++ b/doc/api/html/neg__binomial__cdf_8hpp_source.html @@ -0,0 +1,282 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/neg_binomial_cdf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
neg_binomial_cdf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_NEG_BINOMIAL_CDF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_NEG_BINOMIAL_CDF_HPP
+
3 
+ + + + +
8 
+ + + +
12 
+ + + + + + +
19 #include <cmath>
+
20 #include <limits>
+
21 
+
22 namespace stan {
+
23  namespace math {
+
24 
+
25  // Negative Binomial CDF
+
26  template <typename T_n, typename T_shape,
+
27  typename T_inv_scale>
+
28  typename return_type<T_shape, T_inv_scale>::type
+
29  neg_binomial_cdf(const T_n& n, const T_shape& alpha,
+
30  const T_inv_scale& beta) {
+
31  static const char* function("stan::math::neg_binomial_cdf");
+
32  typedef typename stan::partials_return_type<T_n, T_shape,
+
33  T_inv_scale>::type
+
34  T_partials_return;
+
35 
+ + +
38 
+
39  // Ensure non-zero arugment lengths
+
40  if (!(stan::length(n) && stan::length(alpha) && stan::length(beta)))
+
41  return 1.0;
+
42 
+
43  T_partials_return P(1.0);
+
44 
+
45  // Validate arguments
+
46  check_positive_finite(function, "Shape parameter", alpha);
+
47  check_positive_finite(function, "Inverse scale parameter", beta);
+
48  check_consistent_sizes(function,
+
49  "Failures variable", n,
+
50  "Shape parameter", alpha,
+
51  "Inverse scale parameter", beta);
+
52 
+
53  // Wrap arguments in vector views
+
54  VectorView<const T_n> n_vec(n);
+
55  VectorView<const T_shape> alpha_vec(alpha);
+
56  VectorView<const T_inv_scale> beta_vec(beta);
+
57  size_t size = max_size(n, alpha, beta);
+
58 
+
59  // Compute vectorized CDF and gradient
+ + + + +
64  using stan::math::digamma;
+
65 
+ +
67  operands_and_partials(alpha, beta);
+
68 
+
69  // Explicit return for extreme values
+
70  // The gradients are technically ill-defined, but treated as zero
+
71  for (size_t i = 0; i < stan::length(n); i++) {
+
72  if (value_of(n_vec[i]) < 0)
+
73  return operands_and_partials.to_var(0.0, alpha, beta);
+
74  }
+
75 
+
76  // Cache a few expensive function calls if alpha is a parameter
+ +
78  T_partials_return, T_shape>
+
79  digamma_alpha_vec(stan::length(alpha));
+
80 
+ +
82  T_partials_return, T_shape>
+
83  digamma_sum_vec(stan::length(alpha));
+
84 
+ +
86  for (size_t i = 0; i < stan::length(alpha); i++) {
+
87  const T_partials_return n_dbl = value_of(n_vec[i]);
+
88  const T_partials_return alpha_dbl = value_of(alpha_vec[i]);
+
89 
+
90  digamma_alpha_vec[i] = digamma(alpha_dbl);
+
91  digamma_sum_vec[i] = digamma(n_dbl + alpha_dbl + 1);
+
92  }
+
93  }
+
94 
+
95  for (size_t i = 0; i < size; i++) {
+
96  // Explicit results for extreme values
+
97  // The gradients are technically ill-defined, but treated as zero
+
98  if (value_of(n_vec[i]) == std::numeric_limits<int>::max())
+
99  return operands_and_partials.to_var(1.0, alpha, beta);
+
100 
+
101  const T_partials_return n_dbl = value_of(n_vec[i]);
+
102  const T_partials_return alpha_dbl = value_of(alpha_vec[i]);
+
103  const T_partials_return beta_dbl = value_of(beta_vec[i]);
+
104 
+
105  const T_partials_return p_dbl = beta_dbl / (1.0 + beta_dbl);
+
106  const T_partials_return d_dbl = 1.0 / ( (1.0 + beta_dbl)
+
107  * (1.0 + beta_dbl) );
+
108 
+
109  const T_partials_return P_i =
+
110  inc_beta(alpha_dbl, n_dbl + 1.0, p_dbl);
+
111 
+
112  P *= P_i;
+
113 
+ +
115  operands_and_partials.d_x1[i]
+
116  += inc_beta_dda(alpha_dbl, n_dbl + 1, p_dbl,
+
117  digamma_alpha_vec[i],
+
118  digamma_sum_vec[i]) / P_i;
+
119  }
+
120 
+ +
122  operands_and_partials.d_x2[i] +=
+
123  inc_beta_ddz(alpha_dbl, n_dbl + 1.0, p_dbl) * d_dbl / P_i;
+
124  }
+
125 
+ +
127  for (size_t i = 0; i < stan::length(alpha); ++i)
+
128  operands_and_partials.d_x1[i] *= P;
+
129  }
+
130 
+ +
132  for (size_t i = 0; i < stan::length(beta); ++i)
+
133  operands_and_partials.d_x2[i] *= P;
+
134  }
+
135 
+
136  return operands_and_partials.to_var(P, alpha, beta);
+
137  }
+
138 
+
139  } // prob
+
140 } // stan
+
141 #endif
+ +
return_type< T_shape, T_inv_scale >::type neg_binomial_cdf(const T_n &n, const T_shape &alpha, const T_inv_scale &beta)
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
T inc_beta_dda(T a, T b, T z, T digamma_a, T digamma_ab)
Returns the partial derivative of the regularized incomplete beta function, I_{z}(a, b) with respect to a.
+ + +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
T inc_beta_ddz(T a, T b, T z)
Returns the partial derivative of the regularized incomplete beta function, I_{z}(a, b) with respect to z.
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > inc_beta(const fvar< T > &a, const fvar< T > &b, const fvar< T > &x)
Definition: inc_beta.hpp:20
+ +
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
int max(const std::vector< int > &x)
Returns the maximum coefficient in the specified column vector.
Definition: max.hpp:21
+ + +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/neg__binomial__cdf__log_8hpp.html b/doc/api/html/neg__binomial__cdf__log_8hpp.html new file mode 100644 index 00000000000..ed3564a2898 --- /dev/null +++ b/doc/api/html/neg__binomial__cdf__log_8hpp.html @@ -0,0 +1,149 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/neg_binomial_cdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
neg_binomial_cdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_n , typename T_shape , typename T_inv_scale >
return_type< T_shape,
+T_inv_scale >::type 
stan::math::neg_binomial_cdf_log (const T_n &n, const T_shape &alpha, const T_inv_scale &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/neg__binomial__cdf__log_8hpp_source.html b/doc/api/html/neg__binomial__cdf__log_8hpp_source.html new file mode 100644 index 00000000000..419eb5f9f45 --- /dev/null +++ b/doc/api/html/neg__binomial__cdf__log_8hpp_source.html @@ -0,0 +1,296 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/neg_binomial_cdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
neg_binomial_cdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_NEG_BINOMIAL_CDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_NEG_BINOMIAL_CDF_LOG_HPP
+
3 
+
4 #include <boost/math/special_functions/digamma.hpp>
+
5 #include <boost/random/negative_binomial_distribution.hpp>
+
6 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + +
22 #include <cmath>
+
23 #include <limits>
+
24 
+
25 namespace stan {
+
26 
+
27  namespace math {
+
28 
+
29  template <typename T_n, typename T_shape,
+
30  typename T_inv_scale>
+
31  typename return_type<T_shape, T_inv_scale>::type
+
32  neg_binomial_cdf_log(const T_n& n, const T_shape& alpha,
+
33  const T_inv_scale& beta) {
+
34  static const char* function("stan::math::neg_binomial_cdf_log");
+
35  typedef typename stan::partials_return_type<T_n, T_shape,
+
36  T_inv_scale>::type
+
37  T_partials_return;
+
38 
+ + + + +
43 
+
44  // Ensure non-zero arugment lengths
+
45  if (!(stan::length(n) && stan::length(alpha) && stan::length(beta)))
+
46  return 0.0;
+
47 
+
48  T_partials_return P(0.0);
+
49 
+
50  // Validate arguments
+
51  check_positive_finite(function, "Shape parameter", alpha);
+
52  check_positive_finite(function, "Inverse scale parameter", beta);
+
53  check_consistent_sizes(function,
+
54  "Failures variable", n,
+
55  "Shape parameter", alpha,
+
56  "Inverse scale parameter", beta);
+
57 
+
58  // Wrap arguments in vector views
+
59  VectorView<const T_n> n_vec(n);
+
60  VectorView<const T_shape> alpha_vec(alpha);
+
61  VectorView<const T_inv_scale> beta_vec(beta);
+
62  size_t size = max_size(n, alpha, beta);
+
63 
+
64  // Compute vectorized cdf_log and gradient
+ + +
67  using stan::math::digamma;
+
68  using stan::math::lbeta;
+
69  using std::exp;
+
70  using std::pow;
+
71  using std::log;
+
72  using std::exp;
+
73 
+
74 
+ +
76  operands_and_partials(alpha, beta);
+
77 
+
78  // Explicit return for extreme values
+
79  // The gradients are technically ill-defined, but treated as zero
+
80  for (size_t i = 0; i < stan::length(n); i++) {
+
81  if (value_of(n_vec[i]) < 0)
+
82  return operands_and_partials.to_var(stan::math::negative_infinity(),
+
83  alpha, beta);
+
84  }
+
85 
+
86  // Cache a few expensive function calls if alpha is a parameter
+ +
88  T_partials_return, T_shape>
+
89  digammaN_vec(stan::length(alpha));
+ +
91  T_partials_return, T_shape>
+
92  digammaAlpha_vec(stan::length(alpha));
+ +
94  T_partials_return, T_shape>
+
95  digammaSum_vec(stan::length(alpha));
+
96 
+ +
98  for (size_t i = 0; i < stan::length(alpha); i++) {
+
99  const T_partials_return n_dbl = value_of(n_vec[i]);
+
100  const T_partials_return alpha_dbl = value_of(alpha_vec[i]);
+
101 
+
102  digammaN_vec[i] = digamma(n_dbl + 1);
+
103  digammaAlpha_vec[i] = digamma(alpha_dbl);
+
104  digammaSum_vec[i] = digamma(n_dbl + alpha_dbl + 1);
+
105  }
+
106  }
+
107 
+
108  for (size_t i = 0; i < size; i++) {
+
109  // Explicit results for extreme values
+
110  // The gradients are technically ill-defined, but treated as zero
+
111  if (value_of(n_vec[i]) == std::numeric_limits<int>::max())
+
112  return operands_and_partials.to_var(0.0, alpha, beta);
+
113 
+
114  const T_partials_return n_dbl = value_of(n_vec[i]);
+
115  const T_partials_return alpha_dbl = value_of(alpha_vec[i]);
+
116  const T_partials_return beta_dbl = value_of(beta_vec[i]);
+
117  const T_partials_return p_dbl = beta_dbl / (1.0 + beta_dbl);
+
118  const T_partials_return d_dbl = 1.0 / ( (1.0 + beta_dbl)
+
119  * (1.0 + beta_dbl) );
+
120  const T_partials_return Pi = inc_beta(alpha_dbl, n_dbl + 1.0, p_dbl);
+
121  const T_partials_return beta_func = exp(lbeta(n_dbl + 1, alpha_dbl));
+
122 
+
123 
+
124  P += log(Pi);
+
125 
+ +
127  T_partials_return g1 = 0;
+
128  T_partials_return g2 = 0;
+
129 
+
130  stan::math::grad_reg_inc_beta(g1, g2, alpha_dbl,
+
131  n_dbl + 1, p_dbl,
+
132  digammaAlpha_vec[i],
+
133  digammaN_vec[i],
+
134  digammaSum_vec[i],
+
135  beta_func);
+
136  operands_and_partials.d_x1[i] += g1 / Pi;
+
137  }
+ +
139  operands_and_partials.d_x2[i] += d_dbl * pow(1-p_dbl, n_dbl)
+
140  * pow(p_dbl, alpha_dbl-1) / beta_func / Pi;
+
141  }
+
142 
+
143  return operands_and_partials.to_var(P, alpha, beta);
+
144  }
+
145  }
+
146 }
+
147 #endif
+ + +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > lbeta(const fvar< T > &x1, const fvar< T > &x2)
Definition: lbeta.hpp:16
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+ +
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
return_type< T_shape, T_inv_scale >::type neg_binomial_cdf_log(const T_n &n, const T_shape &alpha, const T_inv_scale &beta)
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > inc_beta(const fvar< T > &a, const fvar< T > &b, const fvar< T > &x)
Definition: inc_beta.hpp:20
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
int max(const std::vector< int > &x)
Returns the maximum coefficient in the specified column vector.
Definition: max.hpp:21
+ + + +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
void grad_reg_inc_beta(T &g1, T &g2, T a, T b, T z, T digammaA, T digammaB, T digammaSum, T betaAB)
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/neg__binomial__log_8hpp.html b/doc/api/html/neg__binomial__log_8hpp.html new file mode 100644 index 00000000000..428cc23cc85 --- /dev/null +++ b/doc/api/html/neg__binomial__log_8hpp.html @@ -0,0 +1,158 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/neg_binomial_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
neg_binomial_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<bool propto, typename T_n , typename T_shape , typename T_inv_scale >
return_type< T_shape,
+T_inv_scale >::type 
stan::math::neg_binomial_log (const T_n &n, const T_shape &alpha, const T_inv_scale &beta)
 
template<typename T_n , typename T_shape , typename T_inv_scale >
return_type< T_shape,
+T_inv_scale >::type 
stan::math::neg_binomial_log (const T_n &n, const T_shape &alpha, const T_inv_scale &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/neg__binomial__log_8hpp_source.html b/doc/api/html/neg__binomial__log_8hpp_source.html new file mode 100644 index 00000000000..57e66eaeea6 --- /dev/null +++ b/doc/api/html/neg__binomial__log_8hpp_source.html @@ -0,0 +1,343 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/neg_binomial_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
neg_binomial_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_NEG_BINOMIAL_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_NEG_BINOMIAL_LOG_HPP
+
3 
+
4 #include <boost/math/special_functions/digamma.hpp>
+
5 #include <boost/random/negative_binomial_distribution.hpp>
+
6 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + + + + + + +
28 #include <cmath>
+
29 
+
30 namespace stan {
+
31 
+
32  namespace math {
+
33 
+
34  // NegBinomial(n|alpha, beta) [alpha > 0; beta > 0; n >= 0]
+
35  template <bool propto,
+
36  typename T_n,
+
37  typename T_shape, typename T_inv_scale>
+
38  typename return_type<T_shape, T_inv_scale>::type
+
39  neg_binomial_log(const T_n& n,
+
40  const T_shape& alpha,
+
41  const T_inv_scale& beta) {
+
42  typedef typename stan::partials_return_type<T_n, T_shape,
+
43  T_inv_scale>::type
+
44  T_partials_return;
+
45 
+
46  static const char* function("stan::math::neg_binomial_log");
+
47 
+ + + + + +
53 
+
54  // check if any vectors are zero length
+
55  if (!(stan::length(n)
+
56  && stan::length(alpha)
+
57  && stan::length(beta)))
+
58  return 0.0;
+
59 
+
60  T_partials_return logp(0.0);
+
61  check_nonnegative(function, "Failures variable", n);
+
62  check_positive_finite(function, "Shape parameter", alpha);
+
63  check_positive_finite(function, "Inverse scale parameter", beta);
+
64  check_consistent_sizes(function,
+
65  "Failures variable", n,
+
66  "Shape parameter", alpha,
+
67  "Inverse scale parameter", beta);
+
68 
+
69  // check if no variables are involved and prop-to
+ +
71  return 0.0;
+
72 
+ + +
75  using stan::math::digamma;
+
76  using stan::math::lgamma;
+
77  using std::log;
+
78  using std::log;
+
79 
+
80  // set up template expressions wrapping scalars into vector views
+
81  VectorView<const T_n> n_vec(n);
+
82  VectorView<const T_shape> alpha_vec(alpha);
+
83  VectorView<const T_inv_scale> beta_vec(beta);
+
84  size_t size = max_size(n, alpha, beta);
+
85 
+ +
87  operands_and_partials(alpha, beta);
+
88 
+
89  size_t len_ab = max_size(alpha, beta);
+ +
91  lambda(len_ab);
+
92  for (size_t i = 0; i < len_ab; ++i)
+
93  lambda[i] = value_of(alpha_vec[i]) / value_of(beta_vec[i]);
+
94 
+ +
96  log1p_beta(length(beta));
+
97  for (size_t i = 0; i < length(beta); ++i)
+
98  log1p_beta[i] = log1p(value_of(beta_vec[i]));
+
99 
+ +
101  log_beta_m_log1p_beta(length(beta));
+
102  for (size_t i = 0; i < length(beta); ++i)
+
103  log_beta_m_log1p_beta[i] = log(value_of(beta_vec[i])) - log1p_beta[i];
+
104 
+ +
106  alpha_times_log_beta_over_1p_beta(len_ab);
+
107  for (size_t i = 0; i < len_ab; ++i)
+
108  alpha_times_log_beta_over_1p_beta[i]
+
109  = value_of(alpha_vec[i])
+
110  * log(value_of(beta_vec[i])
+
111  / (1.0 + value_of(beta_vec[i])));
+
112 
+ +
114  T_partials_return, T_shape>
+
115  digamma_alpha(length(alpha));
+ +
117  for (size_t i = 0; i < length(alpha); ++i)
+
118  digamma_alpha[i] = digamma(value_of(alpha_vec[i]));
+
119  }
+
120 
+ +
122  T_partials_return, T_inv_scale> log_beta(length(beta));
+ +
124  for (size_t i = 0; i < length(beta); ++i)
+
125  log_beta[i] = log(value_of(beta_vec[i]));
+
126  }
+
127 
+ +
129  T_partials_return, T_shape, T_inv_scale>
+
130  lambda_m_alpha_over_1p_beta(len_ab);
+ +
132  for (size_t i = 0; i < len_ab; ++i)
+
133  lambda_m_alpha_over_1p_beta[i] =
+
134  lambda[i]
+
135  - (value_of(alpha_vec[i])
+
136  / (1.0 + value_of(beta_vec[i])));
+
137  }
+
138 
+
139  for (size_t i = 0; i < size; i++) {
+
140  if (alpha_vec[i] > 1e10) { // reduces numerically to Poisson
+ +
142  logp -= lgamma(n_vec[i] + 1.0);
+ +
144  logp += multiply_log(n_vec[i], lambda[i]) - lambda[i];
+
145 
+ +
147  operands_and_partials.d_x1[i]
+
148  += n_vec[i] / value_of(alpha_vec[i])
+
149  - 1.0 / value_of(beta_vec[i]);
+ +
151  operands_and_partials.d_x2[i]
+
152  += (lambda[i] - n_vec[i]) / value_of(beta_vec[i]);
+
153  } else { // standard density definition
+ +
155  if (n_vec[i] != 0)
+
156  logp += binomial_coefficient_log(n_vec[i]
+
157  + value_of(alpha_vec[i])
+
158  - 1.0,
+
159  n_vec[i]);
+ +
161  logp +=
+
162  alpha_times_log_beta_over_1p_beta[i]
+
163  - n_vec[i] * log1p_beta[i];
+
164 
+ +
166  operands_and_partials.d_x1[i]
+
167  += digamma(value_of(alpha_vec[i]) + n_vec[i])
+
168  - digamma_alpha[i]
+
169  + log_beta_m_log1p_beta[i];
+ +
171  operands_and_partials.d_x2[i]
+
172  += lambda_m_alpha_over_1p_beta[i]
+
173  - n_vec[i] / (value_of(beta_vec[i]) + 1.0);
+
174  }
+
175  }
+
176  return operands_and_partials.to_var(logp, alpha, beta);
+
177  }
+
178 
+
179  template <typename T_n,
+
180  typename T_shape, typename T_inv_scale>
+
181  inline
+ +
183  neg_binomial_log(const T_n& n,
+
184  const T_shape& alpha,
+
185  const T_inv_scale& beta) {
+
186  return neg_binomial_log<false>(n, alpha, beta);
+
187  }
+
188  }
+
189 }
+
190 #endif
+ +
fvar< T > binomial_coefficient_log(const fvar< T > &x1, const fvar< T > &x2)
+
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+ +
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ +
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ +
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + + +
fvar< T > multiply_log(const fvar< T > &x1, const fvar< T > &x2)
+ + +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
fvar< T > log1p(const fvar< T > &x)
Definition: log1p.hpp:16
+ + +
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
return_type< T_shape, T_inv_scale >::type neg_binomial_log(const T_n &n, const T_shape &alpha, const T_inv_scale &beta)
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+ +
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/neg__binomial__rng_8hpp.html b/doc/api/html/neg__binomial__rng_8hpp.html new file mode 100644 index 00000000000..b59b1917d5e --- /dev/null +++ b/doc/api/html/neg__binomial__rng_8hpp.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/neg_binomial_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
neg_binomial_rng.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
int stan::math::neg_binomial_rng (const double alpha, const double beta, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/neg__binomial__rng_8hpp_source.html b/doc/api/html/neg__binomial__rng_8hpp_source.html new file mode 100644 index 00000000000..c2c7518186c --- /dev/null +++ b/doc/api/html/neg__binomial__rng_8hpp_source.html @@ -0,0 +1,194 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/neg_binomial_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
neg_binomial_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_NEG_BINOMIAL_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_NEG_BINOMIAL_RNG_HPP
+
3 
+
4 #include <boost/math/special_functions/digamma.hpp>
+
5 #include <boost/random/negative_binomial_distribution.hpp>
+
6 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + +
23 
+
24 namespace stan {
+
25 
+
26  namespace math {
+
27 
+
28  template <class RNG>
+
29  inline int
+
30  neg_binomial_rng(const double alpha,
+
31  const double beta,
+
32  RNG& rng) {
+
33  using boost::variate_generator;
+
34  using boost::random::negative_binomial_distribution;
+
35  using boost::random::poisson_distribution;
+
36  using boost::gamma_distribution;
+
37 
+
38  static const char* function("stan::math::neg_binomial_rng");
+
39 
+
40  // gamma_rng params must be positive and finite
+
41  check_positive_finite(function, "Shape parameter", alpha);
+
42  check_positive_finite(function, "Inverse scale parameter", beta);
+
43 
+
44  double rng_from_gamma =
+
45  variate_generator<RNG&, gamma_distribution<> >
+
46  (rng, gamma_distribution<>(alpha, 1.0 / beta))();
+
47 
+
48  // same as the constraints for poisson_rng
+
49  check_less(function,
+
50  "Random number that came from gamma distribution",
+
51  rng_from_gamma, POISSON_MAX_RATE);
+
52  check_not_nan(function,
+
53  "Random number that came from gamma distribution",
+
54  rng_from_gamma);
+
55  check_nonnegative(function,
+
56  "Random number that came from gamma distribution",
+
57  rng_from_gamma);
+
58 
+
59  return variate_generator<RNG&, poisson_distribution<> >
+
60  (rng, poisson_distribution<>(rng_from_gamma))();
+
61  }
+
62  }
+
63 }
+
64 #endif
+
bool check_less(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is strictly less than high.
Definition: check_less.hpp:81
+ + +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ + + +
int neg_binomial_rng(const double alpha, const double beta, RNG &rng)
+ + + + + +
const double POISSON_MAX_RATE
Largest rate parameter allowed in Poisson RNG.
Definition: constants.hpp:72
+ + + + +
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ + +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/nested__size_8hpp.html b/doc/api/html/nested__size_8hpp.html new file mode 100644 index 00000000000..8c35e847fce --- /dev/null +++ b/doc/api/html/nested__size_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/rev/core/nested_size.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
nested_size.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + +

+Functions

static size_t stan::math::nested_size ()
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/nested__size_8hpp_source.html b/doc/api/html/nested__size_8hpp_source.html new file mode 100644 index 00000000000..a681e8b5fd1 --- /dev/null +++ b/doc/api/html/nested__size_8hpp_source.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/rev/core/nested_size.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
nested_size.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_NESTED_SIZE_HPP
+
2 #define STAN_MATH_REV_CORE_NESTED_SIZE_HPP
+
3 
+ + + +
7 #include <cstdlib>
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
12  static inline size_t nested_size() {
+
13  return ChainableStack::var_stack_.size()
+ +
15  }
+
16 
+
17  }
+
18 }
+
19 #endif
+ + +
static size_t nested_size()
Definition: nested_size.hpp:12
+
static std::vector< size_t > nested_var_stack_sizes_
+ +
static std::vector< ChainableT * > var_stack_
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/normal__ccdf__log_8hpp.html b/doc/api/html/normal__ccdf__log_8hpp.html new file mode 100644 index 00000000000..a3e06b120d1 --- /dev/null +++ b/doc/api/html/normal__ccdf__log_8hpp.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/normal_ccdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
normal_ccdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::normal_ccdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/normal__ccdf__log_8hpp_source.html b/doc/api/html/normal__ccdf__log_8hpp_source.html new file mode 100644 index 00000000000..d6bb23cc9b6 --- /dev/null +++ b/doc/api/html/normal__ccdf__log_8hpp_source.html @@ -0,0 +1,247 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/normal_ccdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
normal_ccdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_NORMAL_CCDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_NORMAL_CCDF_LOG_HPP
+
3 
+
4 #include <boost/random/normal_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + +
15 #include <cmath>
+
16 #include <limits>
+
17 
+
18 namespace stan {
+
19 
+
20  namespace math {
+
21 
+
22  template <typename T_y, typename T_loc, typename T_scale>
+
23  typename return_type<T_y, T_loc, T_scale>::type
+
24  normal_ccdf_log(const T_y& y, const T_loc& mu, const T_scale& sigma) {
+
25  static const char* function("stan::math::normal_ccdf_log");
+ +
27  T_partials_return;
+
28 
+ + + + + + +
35  using std::log;
+
36  using std::exp;
+
37 
+
38  T_partials_return ccdf_log(0.0);
+
39  // check if any vectors are zero length
+
40  if (!(stan::length(y)
+
41  && stan::length(mu)
+
42  && stan::length(sigma)))
+
43  return ccdf_log;
+
44 
+
45  check_not_nan(function, "Random variable", y);
+
46  check_finite(function, "Location parameter", mu);
+
47  check_not_nan(function, "Scale parameter", sigma);
+
48  check_positive(function, "Scale parameter", sigma);
+
49  check_consistent_sizes(function,
+
50  "Random variable", y,
+
51  "Location parameter", mu,
+
52  "Scale parameter", sigma);
+
53 
+ +
55  operands_and_partials(y, mu, sigma);
+
56 
+
57  VectorView<const T_y> y_vec(y);
+
58  VectorView<const T_loc> mu_vec(mu);
+
59  VectorView<const T_scale> sigma_vec(sigma);
+
60  size_t N = max_size(y, mu, sigma);
+
61  double log_half = std::log(0.5);
+
62 
+
63  const double SQRT_TWO_OVER_PI = std::sqrt(2.0 / stan::math::pi());
+
64  for (size_t n = 0; n < N; n++) {
+
65  const T_partials_return y_dbl = value_of(y_vec[n]);
+
66  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
67  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
68 
+
69  const T_partials_return scaled_diff = (y_dbl - mu_dbl)
+
70  / (sigma_dbl * SQRT_2);
+
71 
+
72  T_partials_return one_m_erf;
+
73  if (scaled_diff < -37.5 * INV_SQRT_2)
+
74  one_m_erf = 2.0;
+
75  else if (scaled_diff < -5.0 * INV_SQRT_2)
+
76  one_m_erf = 2.0 - erfc(-scaled_diff);
+
77  else if (scaled_diff > 8.25 * INV_SQRT_2)
+
78  one_m_erf = 0.0;
+
79  else
+
80  one_m_erf = 1.0 - erf(scaled_diff);
+
81 
+
82  // log ccdf
+
83  ccdf_log += log_half + log(one_m_erf);
+
84 
+
85  // gradients
+ +
87  const T_partials_return rep_deriv_div_sigma
+
88  = scaled_diff > 8.25 * INV_SQRT_2
+
89  ? std::numeric_limits<double>::infinity()
+
90  : SQRT_TWO_OVER_PI * exp(-scaled_diff * scaled_diff)
+
91  / one_m_erf / sigma_dbl;
+ +
93  operands_and_partials.d_x1[n] -= rep_deriv_div_sigma;
+ +
95  operands_and_partials.d_x2[n] += rep_deriv_div_sigma;
+ +
97  operands_and_partials.d_x3[n] += rep_deriv_div_sigma
+
98  * scaled_diff * stan::math::SQRT_2;
+
99  }
+
100  }
+
101  return operands_and_partials.to_var(ccdf_log, y, mu, sigma);
+
102  }
+
103  }
+
104 }
+
105 #endif
+ +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
fvar< T > erf(const fvar< T > &x)
Definition: erf.hpp:14
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
return_type< T_y, T_loc, T_scale >::type normal_ccdf_log(const T_y &y, const T_loc &mu, const T_scale &sigma)
+
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
const double SQRT_2
The value of the square root of 2, .
Definition: constants.hpp:21
+
const double INV_SQRT_2
The value of 1 over the square root of 2, .
Definition: constants.hpp:27
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
fvar< T > erfc(const fvar< T > &x)
Definition: erfc.hpp:14
+
double pi()
Return the value of pi.
Definition: constants.hpp:86
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/normal__cdf_8hpp.html b/doc/api/html/normal__cdf_8hpp.html new file mode 100644 index 00000000000..a43627e6f6c --- /dev/null +++ b/doc/api/html/normal__cdf_8hpp.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/normal_cdf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
normal_cdf.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::normal_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma)
 Calculates the normal cumulative distribution function for the given variate, location, and scale. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/normal__cdf_8hpp_source.html b/doc/api/html/normal__cdf_8hpp_source.html new file mode 100644 index 00000000000..e21206521bb --- /dev/null +++ b/doc/api/html/normal__cdf_8hpp_source.html @@ -0,0 +1,257 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/normal_cdf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
normal_cdf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_NORMAL_CDF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_NORMAL_CDF_HPP
+
3 
+
4 #include <boost/random/normal_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + +
15 #include <cmath>
+
16 
+
17 
+
18 namespace stan {
+
19 
+
20  namespace math {
+
21 
+
36  template <typename T_y, typename T_loc, typename T_scale>
+
37  typename return_type<T_y, T_loc, T_scale>::type
+
38  normal_cdf(const T_y& y, const T_loc& mu, const T_scale& sigma) {
+
39  static const char* function("stan::math::normal_cdf");
+ +
41  T_partials_return;
+
42 
+ + + + + + +
49  using std::exp;
+
50 
+
51  T_partials_return cdf(1.0);
+
52 
+
53  // check if any vectors are zero length
+
54  if (!(stan::length(y)
+
55  && stan::length(mu)
+
56  && stan::length(sigma)))
+
57  return cdf;
+
58 
+
59  check_not_nan(function, "Random variable", y);
+
60  check_finite(function, "Location parameter", mu);
+
61  check_not_nan(function, "Scale parameter", sigma);
+
62  check_positive(function, "Scale parameter", sigma);
+
63  check_consistent_sizes(function,
+
64  "Random variable", y,
+
65  "Location parameter", mu,
+
66  "Scale parameter", sigma);
+
67 
+
68 
+ +
70  operands_and_partials(y, mu, sigma);
+
71 
+
72  VectorView<const T_y> y_vec(y);
+
73  VectorView<const T_loc> mu_vec(mu);
+
74  VectorView<const T_scale> sigma_vec(sigma);
+
75  size_t N = max_size(y, mu, sigma);
+
76  const double SQRT_TWO_OVER_PI = std::sqrt(2.0 / stan::math::pi());
+
77 
+
78  for (size_t n = 0; n < N; n++) {
+
79  const T_partials_return y_dbl = value_of(y_vec[n]);
+
80  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
81  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
82  const T_partials_return scaled_diff = (y_dbl - mu_dbl)
+
83  / (sigma_dbl * SQRT_2);
+
84  T_partials_return cdf_;
+
85  if (scaled_diff < -37.5 * INV_SQRT_2)
+
86  cdf_ = 0.0;
+
87  else if (scaled_diff < -5.0 * INV_SQRT_2)
+
88  cdf_ = 0.5 * erfc(-scaled_diff);
+
89  else if (scaled_diff > 8.25 * INV_SQRT_2)
+
90  cdf_ = 1;
+
91  else
+
92  cdf_ = 0.5 * (1.0 + erf(scaled_diff));
+
93 
+
94  // cdf
+
95  cdf *= cdf_;
+
96 
+
97  // gradients
+ +
99  const T_partials_return rep_deriv
+
100  = scaled_diff < -37.5 * INV_SQRT_2
+
101  ? 0.0
+
102  : SQRT_TWO_OVER_PI * 0.5
+
103  * exp(-scaled_diff * scaled_diff) / cdf_ / sigma_dbl;
+ +
105  operands_and_partials.d_x1[n] += rep_deriv;
+ +
107  operands_and_partials.d_x2[n] -= rep_deriv;
+ +
109  operands_and_partials.d_x3[n] -= rep_deriv * scaled_diff * SQRT_2;
+
110  }
+
111  }
+
112 
+ +
114  for (size_t n = 0; n < stan::length(y); ++n)
+
115  operands_and_partials.d_x1[n] *= cdf;
+
116  }
+ +
118  for (size_t n = 0; n < stan::length(mu); ++n)
+
119  operands_and_partials.d_x2[n] *= cdf;
+
120  }
+ +
122  for (size_t n = 0; n < stan::length(sigma); ++n)
+
123  operands_and_partials.d_x3[n] *= cdf;
+
124  }
+
125 
+
126  return operands_and_partials.to_var(cdf, y, mu, sigma);
+
127  }
+
128  }
+
129 }
+
130 #endif
+ +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
fvar< T > erf(const fvar< T > &x)
Definition: erf.hpp:14
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
const double SQRT_2
The value of the square root of 2, .
Definition: constants.hpp:21
+
const double INV_SQRT_2
The value of 1 over the square root of 2, .
Definition: constants.hpp:27
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
fvar< T > erfc(const fvar< T > &x)
Definition: erfc.hpp:14
+
double pi()
Return the value of pi.
Definition: constants.hpp:86
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+
return_type< T_y, T_loc, T_scale >::type normal_cdf(const T_y &y, const T_loc &mu, const T_scale &sigma)
Calculates the normal cumulative distribution function for the given variate, location, and scale.
Definition: normal_cdf.hpp:38
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/normal__cdf__log_8hpp.html b/doc/api/html/normal__cdf__log_8hpp.html new file mode 100644 index 00000000000..af7016650e6 --- /dev/null +++ b/doc/api/html/normal__cdf__log_8hpp.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/normal_cdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
normal_cdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::normal_cdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/normal__cdf__log_8hpp_source.html b/doc/api/html/normal__cdf__log_8hpp_source.html new file mode 100644 index 00000000000..62b1d7d3425 --- /dev/null +++ b/doc/api/html/normal__cdf__log_8hpp_source.html @@ -0,0 +1,247 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/normal_cdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
normal_cdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_NORMAL_CDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_NORMAL_CDF_LOG_HPP
+
3 
+
4 #include <boost/random/normal_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + +
15 #include <cmath>
+
16 #include <limits>
+
17 
+
18 namespace stan {
+
19 
+
20  namespace math {
+
21 
+
22  template <typename T_y, typename T_loc, typename T_scale>
+
23  typename return_type<T_y, T_loc, T_scale>::type
+
24  normal_cdf_log(const T_y& y, const T_loc& mu, const T_scale& sigma) {
+
25  static const char* function("stan::math::normal_cdf_log");
+ +
27  T_partials_return;
+
28 
+ + + + + + +
35  using std::log;
+
36  using std::exp;
+
37 
+
38  T_partials_return cdf_log(0.0);
+
39  // check if any vectors are zero length
+
40  if (!(stan::length(y)
+
41  && stan::length(mu)
+
42  && stan::length(sigma)))
+
43  return cdf_log;
+
44 
+
45  check_not_nan(function, "Random variable", y);
+
46  check_finite(function, "Location parameter", mu);
+
47  check_not_nan(function, "Scale parameter", sigma);
+
48  check_positive(function, "Scale parameter", sigma);
+
49  check_consistent_sizes(function,
+
50  "Random variable", y,
+
51  "Location parameter", mu,
+
52  "Scale parameter", sigma);
+
53 
+ +
55  operands_and_partials(y, mu, sigma);
+
56 
+
57  VectorView<const T_y> y_vec(y);
+
58  VectorView<const T_loc> mu_vec(mu);
+
59  VectorView<const T_scale> sigma_vec(sigma);
+
60  size_t N = max_size(y, mu, sigma);
+
61 
+
62  const double SQRT_TWO_OVER_PI = std::sqrt(2.0 / stan::math::pi());
+
63  for (size_t n = 0; n < N; n++) {
+
64  const T_partials_return y_dbl = value_of(y_vec[n]);
+
65  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
66  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
67 
+
68  const T_partials_return scaled_diff = (y_dbl - mu_dbl)
+
69  / (sigma_dbl * SQRT_2);
+
70 
+
71  T_partials_return one_p_erf;
+
72  if (scaled_diff < -37.5 * INV_SQRT_2)
+
73  one_p_erf = 0.0;
+
74  else if (scaled_diff < -5.0 * INV_SQRT_2)
+
75  one_p_erf = erfc(-scaled_diff);
+
76  else if (scaled_diff > 8.25 * INV_SQRT_2)
+
77  one_p_erf = 2.0;
+
78  else
+
79  one_p_erf = 1.0 + erf(scaled_diff);
+
80 
+
81  // log cdf
+
82  cdf_log += LOG_HALF + log(one_p_erf);
+
83 
+
84  // gradients
+ +
86  const T_partials_return rep_deriv_div_sigma
+
87  = scaled_diff < -37.5 * INV_SQRT_2
+
88  ? std::numeric_limits<double>::infinity()
+
89  : SQRT_TWO_OVER_PI * exp(-scaled_diff * scaled_diff)
+
90  / sigma_dbl / one_p_erf;
+ +
92  operands_and_partials.d_x1[n] += rep_deriv_div_sigma;
+ +
94  operands_and_partials.d_x2[n] -= rep_deriv_div_sigma;
+ +
96  operands_and_partials.d_x3[n] -= rep_deriv_div_sigma
+
97  * scaled_diff * stan::math::SQRT_2;
+
98  }
+
99  }
+
100  return operands_and_partials.to_var(cdf_log, y, mu, sigma);
+
101  }
+
102  }
+
103 }
+
104 #endif
+ +
const double LOG_HALF
Definition: constants.hpp:179
+
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
fvar< T > erf(const fvar< T > &x)
Definition: erf.hpp:14
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
const double SQRT_2
The value of the square root of 2, .
Definition: constants.hpp:21
+
const double INV_SQRT_2
The value of 1 over the square root of 2, .
Definition: constants.hpp:27
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
return_type< T_y, T_loc, T_scale >::type normal_cdf_log(const T_y &y, const T_loc &mu, const T_scale &sigma)
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
fvar< T > erfc(const fvar< T > &x)
Definition: erfc.hpp:14
+
double pi()
Return the value of pi.
Definition: constants.hpp:86
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/normal__log_8hpp.html b/doc/api/html/normal__log_8hpp.html new file mode 100644 index 00000000000..50897e7f60e --- /dev/null +++ b/doc/api/html/normal__log_8hpp.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/normal_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
normal_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::normal_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 The log of the normal density for the specified scalar(s) given the specified mean(s) and deviation(s). More...
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::normal_log (const T_y &y, const T_loc &mu, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/normal__log_8hpp_source.html b/doc/api/html/normal__log_8hpp_source.html new file mode 100644 index 00000000000..abbffa70548 --- /dev/null +++ b/doc/api/html/normal__log_8hpp_source.html @@ -0,0 +1,262 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/normal_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
normal_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_NORMAL_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_NORMAL_LOG_HPP
+
3 
+
4 #include <boost/random/normal_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + +
16 #include <cmath>
+
17 
+
18 namespace stan {
+
19 
+
20  namespace math {
+
21 
+
40  template <bool propto,
+
41  typename T_y, typename T_loc, typename T_scale>
+
42  typename return_type<T_y, T_loc, T_scale>::type
+
43  normal_log(const T_y& y, const T_loc& mu, const T_scale& sigma) {
+
44  static const char* function("stan::math::normal_log");
+ +
46  T_partials_return;
+
47 
+
48  using std::log;
+ + + + + + + +
56  using std::log;
+
57 
+
58  // check if any vectors are zero length
+
59  if (!(stan::length(y)
+
60  && stan::length(mu)
+
61  && stan::length(sigma)))
+
62  return 0.0;
+
63 
+
64  // set up return value accumulator
+
65  T_partials_return logp(0.0);
+
66 
+
67  // validate args (here done over var, which should be OK)
+
68  check_not_nan(function, "Random variable", y);
+
69  check_finite(function, "Location parameter", mu);
+
70  check_positive(function, "Scale parameter", sigma);
+
71  check_consistent_sizes(function,
+
72  "Random variable", y,
+
73  "Location parameter", mu,
+
74  "Scale parameter", sigma);
+
75  // check if no variables are involved and prop-to
+ +
77  return 0.0;
+
78 
+
79  // set up template expressions wrapping scalars into vector views
+ +
81  operands_and_partials(y, mu, sigma);
+
82 
+
83  VectorView<const T_y> y_vec(y);
+
84  VectorView<const T_loc> mu_vec(mu);
+
85  VectorView<const T_scale> sigma_vec(sigma);
+
86  size_t N = max_size(y, mu, sigma);
+
87 
+ + +
90  T_partials_return, T_scale> log_sigma(length(sigma));
+
91  for (size_t i = 0; i < length(sigma); i++) {
+
92  inv_sigma[i] = 1.0 / value_of(sigma_vec[i]);
+ +
94  log_sigma[i] = log(value_of(sigma_vec[i]));
+
95  }
+
96 
+
97  for (size_t n = 0; n < N; n++) {
+
98  // pull out values of arguments
+
99  const T_partials_return y_dbl = value_of(y_vec[n]);
+
100  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
101 
+
102  // reusable subexpression values
+
103  const T_partials_return y_minus_mu_over_sigma
+
104  = (y_dbl - mu_dbl) * inv_sigma[n];
+
105  const T_partials_return y_minus_mu_over_sigma_squared
+
106  = y_minus_mu_over_sigma * y_minus_mu_over_sigma;
+
107 
+
108  static double NEGATIVE_HALF = - 0.5;
+
109 
+
110  // log probability
+ +
112  logp += NEG_LOG_SQRT_TWO_PI;
+ +
114  logp -= log_sigma[n];
+ +
116  logp += NEGATIVE_HALF * y_minus_mu_over_sigma_squared;
+
117 
+
118  // gradients
+
119  T_partials_return scaled_diff = inv_sigma[n] * y_minus_mu_over_sigma;
+ +
121  operands_and_partials.d_x1[n] -= scaled_diff;
+ +
123  operands_and_partials.d_x2[n] += scaled_diff;
+ +
125  operands_and_partials.d_x3[n]
+
126  += -inv_sigma[n] + inv_sigma[n] * y_minus_mu_over_sigma_squared;
+
127  }
+
128 
+
129 
+
130  return operands_and_partials.to_var(logp, y, mu, sigma);
+
131  }
+
132 
+
133  template <typename T_y, typename T_loc, typename T_scale>
+
134  inline
+ +
136  normal_log(const T_y& y, const T_loc& mu, const T_scale& sigma) {
+
137  return normal_log<false>(y, mu, sigma);
+
138  }
+
139  }
+
140 }
+
141 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
const double NEG_LOG_SQRT_TWO_PI
Definition: constants.hpp:184
+
return_type< T_y, T_loc, T_scale >::type normal_log(const T_y &y, const T_loc &mu, const T_scale &sigma)
The log of the normal density for the specified scalar(s) given the specified mean(s) and deviation(s...
Definition: normal_log.hpp:43
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/normal__rng_8hpp.html b/doc/api/html/normal__rng_8hpp.html new file mode 100644 index 00000000000..09c8908e196 --- /dev/null +++ b/doc/api/html/normal__rng_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/normal_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
normal_rng.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
double stan::math::normal_rng (const double mu, const double sigma, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/normal__rng_8hpp_source.html b/doc/api/html/normal__rng_8hpp_source.html new file mode 100644 index 00000000000..225744f2cfa --- /dev/null +++ b/doc/api/html/normal__rng_8hpp_source.html @@ -0,0 +1,161 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/normal_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
normal_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_NORMAL_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_NORMAL_RNG_HPP
+
3 
+
4 #include <boost/random/normal_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + +
13 
+
14 namespace stan {
+
15 
+
16  namespace math {
+
17 
+
18  template <class RNG>
+
19  inline double
+
20  normal_rng(const double mu,
+
21  const double sigma,
+
22  RNG& rng) {
+
23  using boost::variate_generator;
+
24  using boost::normal_distribution;
+ + + +
28 
+
29  static const char* function("stan::math::normal_rng");
+
30 
+
31  check_finite(function, "Location parameter", mu);
+
32  check_not_nan(function, "Location parameter", mu);
+
33  check_positive(function, "Scale parameter", sigma);
+
34  check_not_nan(function, "Scale parameter", sigma);
+
35 
+
36  variate_generator<RNG&, normal_distribution<> >
+
37  norm_rng(rng, normal_distribution<>(mu, sigma));
+
38  return norm_rng();
+
39  }
+
40  }
+
41 }
+
42 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + + +
double normal_rng(const double mu, const double sigma, RNG &rng)
Definition: normal_rng.hpp:20
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/num__elements_8hpp.html b/doc/api/html/num__elements_8hpp.html new file mode 100644 index 00000000000..604b52f73a0 --- /dev/null +++ b/doc/api/html/num__elements_8hpp.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/num_elements.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
num_elements.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + +

+Functions

template<typename T >
int stan::math::num_elements (const T &x)
 Returns 1, the number of elements in a primitive type. More...
 
template<typename T , int R, int C>
int stan::math::num_elements (const Eigen::Matrix< T, R, C > &m)
 Returns the size of the specified matrix. More...
 
template<typename T >
int stan::math::num_elements (const std::vector< T > &v)
 Returns the number of elements in the specified vector. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/num__elements_8hpp_source.html b/doc/api/html/num__elements_8hpp_source.html new file mode 100644 index 00000000000..7db3c0f3a23 --- /dev/null +++ b/doc/api/html/num__elements_8hpp_source.html @@ -0,0 +1,143 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/num_elements.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
num_elements.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_NUM_ELEMENTS_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_NUM_ELEMENTS_HPP
+
3 
+ +
5 #include <vector>
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
17  template <typename T>
+
18  inline int
+
19  num_elements(const T& x) {
+
20  return 1;
+
21  }
+
22 
+
29  template <typename T, int R, int C>
+
30  inline int
+
31  num_elements(const Eigen::Matrix<T, R, C>& m) {
+
32  return m.size();
+
33  }
+
34 
+
43  template <typename T>
+
44  inline int
+
45  num_elements(const std::vector<T>& v) {
+
46  if (v.size() == 0)
+
47  return 0;
+
48  return v.size() * num_elements(v[0]);
+
49  }
+
50 
+
51  }
+
52 }
+
53 #endif
+ +
int num_elements(const T &x)
Returns 1, the number of elements in a primitive type.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/open.png b/doc/api/html/open.png new file mode 100644 index 00000000000..30f75c7efe2 Binary files /dev/null and b/doc/api/html/open.png differ diff --git a/doc/api/html/operator__divide__equal_8hpp.html b/doc/api/html/operator__divide__equal_8hpp.html new file mode 100644 index 00000000000..bfc6d233c50 --- /dev/null +++ b/doc/api/html/operator__divide__equal_8hpp.html @@ -0,0 +1,123 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_divide_equal.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_divide_equal.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/operator__divide__equal_8hpp_source.html b/doc/api/html/operator__divide__equal_8hpp_source.html new file mode 100644 index 00000000000..6c9ffbef98a --- /dev/null +++ b/doc/api/html/operator__divide__equal_8hpp_source.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_divide_equal.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_divide_equal.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_OPERATOR_DIVIDE_EQUAL_HPP
+
2 #define STAN_MATH_REV_CORE_OPERATOR_DIVIDE_EQUAL_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  inline var& var::operator/=(const var& b) {
+
11  vi_ = new divide_vv_vari(vi_, b.vi_);
+
12  return *this;
+
13  }
+
14 
+
15  inline var& var::operator/=(const double b) {
+
16  if (b == 1.0)
+
17  return *this;
+
18  vi_ = new divide_vd_vari(vi_, b);
+
19  return *this;
+
20  }
+
21 
+
22  }
+
23 }
+
24 #endif
+
var & operator/=(const var &b)
The compound divide/assignment operator for variables (C++).
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+ +
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/operator__minus__equal_8hpp.html b/doc/api/html/operator__minus__equal_8hpp.html new file mode 100644 index 00000000000..b7c41f72149 --- /dev/null +++ b/doc/api/html/operator__minus__equal_8hpp.html @@ -0,0 +1,123 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_minus_equal.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_minus_equal.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/operator__minus__equal_8hpp_source.html b/doc/api/html/operator__minus__equal_8hpp_source.html new file mode 100644 index 00000000000..4d7c8280bb4 --- /dev/null +++ b/doc/api/html/operator__minus__equal_8hpp_source.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_minus_equal.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_minus_equal.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_OPERATOR_MINUS_EQUAL_HPP
+
2 #define STAN_MATH_REV_CORE_OPERATOR_MINUS_EQUAL_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  inline var& var::operator-=(const var& b) {
+
11  vi_ = new subtract_vv_vari(vi_, b.vi_);
+
12  return *this;
+
13  }
+
14 
+
15  inline var& var::operator-=(const double b) {
+
16  if (b == 0.0)
+
17  return *this;
+
18  vi_ = new subtract_vd_vari(vi_, b);
+
19  return *this;
+
20  }
+
21 
+
22  }
+
23 }
+
24 #endif
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
var & operator-=(const var &b)
The compound subtract/assignment operator for variables (C++).
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/operator__multiply__equal_8hpp.html b/doc/api/html/operator__multiply__equal_8hpp.html new file mode 100644 index 00000000000..62adada72fd --- /dev/null +++ b/doc/api/html/operator__multiply__equal_8hpp.html @@ -0,0 +1,123 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_multiply_equal.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_multiply_equal.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/operator__multiply__equal_8hpp_source.html b/doc/api/html/operator__multiply__equal_8hpp_source.html new file mode 100644 index 00000000000..1de7cd246a1 --- /dev/null +++ b/doc/api/html/operator__multiply__equal_8hpp_source.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_multiply_equal.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_multiply_equal.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_OPERATOR_MULTIPLY_EQUAL_HPP
+
2 #define STAN_MATH_REV_CORE_OPERATOR_MULTIPLY_EQUAL_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  inline var& var::operator*=(const var& b) {
+
11  vi_ = new multiply_vv_vari(vi_, b.vi_);
+
12  return *this;
+
13  }
+
14 
+
15  inline var& var::operator*=(const double b) {
+
16  if (b == 1.0)
+
17  return *this;
+
18  vi_ = new multiply_vd_vari(vi_, b);
+
19  return *this;
+
20  }
+
21 
+
22  }
+
23 }
+
24 #endif
+
var & operator*=(const var &b)
The compound multiply/assignment operator for variables (C++).
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/operator__plus__equal_8hpp.html b/doc/api/html/operator__plus__equal_8hpp.html new file mode 100644 index 00000000000..5ac40f5d8e7 --- /dev/null +++ b/doc/api/html/operator__plus__equal_8hpp.html @@ -0,0 +1,123 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_plus_equal.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_plus_equal.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/operator__plus__equal_8hpp_source.html b/doc/api/html/operator__plus__equal_8hpp_source.html new file mode 100644 index 00000000000..2a8303b0245 --- /dev/null +++ b/doc/api/html/operator__plus__equal_8hpp_source.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_plus_equal.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_plus_equal.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_OPERATOR_PLUS_EQUAL_HPP
+
2 #define STAN_MATH_REV_CORE_OPERATOR_PLUS_EQUAL_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  inline var& var::operator+=(const var& b) {
+
11  vi_ = new add_vv_vari(vi_, b.vi_);
+
12  return *this;
+
13  }
+
14 
+
15  inline var& var::operator+=(const double b) {
+
16  if (b == 0.0)
+
17  return *this;
+
18  vi_ = new add_vd_vari(vi_, b);
+
19  return *this;
+
20  }
+
21 
+
22  }
+
23 }
+
24 #endif
+
var & operator+=(const var &b)
The compound add/assignment operator for variables (C++).
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/operator__unary__decrement_8hpp.html b/doc/api/html/operator__unary__decrement_8hpp.html new file mode 100644 index 00000000000..7277f5845be --- /dev/null +++ b/doc/api/html/operator__unary__decrement_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_unary_decrement.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_unary_decrement.hpp File Reference
+
+
+
#include <stan/math/rev/core/var.hpp>
+#include <stan/math/rev/core/v_vari.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

var & stan::math::operator-- (var &a)
 Prefix decrement operator for variables (C++). More...
 
var stan::math::operator-- (var &a, int)
 Postfix decrement operator for variables (C++). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/operator__unary__decrement_8hpp_source.html b/doc/api/html/operator__unary__decrement_8hpp_source.html new file mode 100644 index 00000000000..d3766174e3c --- /dev/null +++ b/doc/api/html/operator__unary__decrement_8hpp_source.html @@ -0,0 +1,155 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_unary_decrement.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_unary_decrement.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_OPERATOR_UNARY_DECREMENT_HPP
+
2 #define STAN_MATH_REV_CORE_OPERATOR_UNARY_DECREMENT_HPP
+
3 
+ + +
6 #include <boost/math/special_functions/fpclassify.hpp>
+
7 #include <limits>
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
12  namespace {
+
13  class decrement_vari : public op_v_vari {
+
14  public:
+
15  explicit decrement_vari(vari* avi) :
+
16  op_v_vari(avi->val_ - 1.0, avi) {
+
17  }
+
18  void chain() {
+
19  if (unlikely(boost::math::isnan(avi_->val_)))
+
20  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
21  else
+
22  avi_->adj_ += adj_;
+
23  }
+
24  };
+
25  }
+
26 
+
40  inline var& operator--(var& a) {
+
41  a.vi_ = new decrement_vari(a.vi_);
+
42  return a;
+
43  }
+
44 
+
56  inline var operator--(var& a, int /*dummy*/) {
+
57  var temp(a);
+
58  a.vi_ = new decrement_vari(a.vi_);
+
59  return temp;
+
60  }
+
61 
+
62  }
+
63 }
+
64 #endif
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
var & operator--(var &a)
Prefix decrement operator for variables (C++).
+
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
+
#define unlikely(x)
Definition: likely.hpp:9
+ +
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/operator__unary__increment_8hpp.html b/doc/api/html/operator__unary__increment_8hpp.html new file mode 100644 index 00000000000..3dab643426e --- /dev/null +++ b/doc/api/html/operator__unary__increment_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_unary_increment.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_unary_increment.hpp File Reference
+
+
+
#include <stan/math/rev/core/var.hpp>
+#include <stan/math/rev/core/v_vari.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

var & stan::math::operator++ (var &a)
 Prefix increment operator for variables (C++). More...
 
var stan::math::operator++ (var &a, int)
 Postfix increment operator for variables (C++). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/operator__unary__increment_8hpp_source.html b/doc/api/html/operator__unary__increment_8hpp_source.html new file mode 100644 index 00000000000..baa6c388873 --- /dev/null +++ b/doc/api/html/operator__unary__increment_8hpp_source.html @@ -0,0 +1,155 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_unary_increment.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_unary_increment.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_OPERATOR_UNARY_INCREMENT_HPP
+
2 #define STAN_MATH_REV_CORE_OPERATOR_UNARY_INCREMENT_HPP
+
3 
+ + +
6 #include <boost/math/special_functions/fpclassify.hpp>
+
7 #include <limits>
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
12  namespace {
+
13  class increment_vari : public op_v_vari {
+
14  public:
+
15  explicit increment_vari(vari* avi) :
+
16  op_v_vari(avi->val_ + 1.0, avi) {
+
17  }
+
18  void chain() {
+
19  if (unlikely(boost::math::isnan(avi_->val_)))
+
20  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
21  else
+
22  avi_->adj_ += adj_;
+
23  }
+
24  };
+
25  }
+
26 
+
36  inline var& operator++(var& a) {
+
37  a.vi_ = new increment_vari(a.vi_);
+
38  return a;
+
39  }
+
40 
+
52  inline var operator++(var& a, int /*dummy*/) {
+
53  var temp(a);
+
54  a.vi_ = new increment_vari(a.vi_);
+
55  return temp;
+
56  }
+
57 
+
58  }
+
59 }
+
60 #endif
+
var & operator++(var &a)
Prefix increment operator for variables (C++).
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
+
#define unlikely(x)
Definition: likely.hpp:9
+ +
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/operator__unary__minus_8hpp.html b/doc/api/html/operator__unary__minus_8hpp.html new file mode 100644 index 00000000000..9da22c54df4 --- /dev/null +++ b/doc/api/html/operator__unary__minus_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/fwd/core/operator_unary_minus.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_unary_minus.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
fvar< T > stan::math::operator- (const fvar< T > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/operator__unary__minus_8hpp_source.html b/doc/api/html/operator__unary__minus_8hpp_source.html new file mode 100644 index 00000000000..6b52f790db4 --- /dev/null +++ b/doc/api/html/operator__unary__minus_8hpp_source.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/fwd/core/operator_unary_minus.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_unary_minus.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_CORE_OPERATOR_UNARY_MINUS_HPP
+
2 #define STAN_MATH_FWD_CORE_OPERATOR_UNARY_MINUS_HPP
+
3 
+ +
5 
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
11  template <typename T>
+
12  inline
+
13  fvar<T>
+
14  operator-(const fvar<T>& x) {
+
15  return fvar<T>(-x.val_, -x.d_);
+
16  }
+
17  }
+
18 }
+
19 #endif
+
fvar< T > operator-(const fvar< T > &x1, const fvar< T > &x2)
+ + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/operator__unary__negative_8hpp.html b/doc/api/html/operator__unary__negative_8hpp.html new file mode 100644 index 00000000000..b8820b9c9b7 --- /dev/null +++ b/doc/api/html/operator__unary__negative_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_unary_negative.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_unary_negative.hpp File Reference
+
+
+
#include <stan/math/rev/core/var.hpp>
+#include <stan/math/rev/core/v_vari.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::operator- (const var &a)
 Unary negation operator for variables (C++). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/operator__unary__negative_8hpp_source.html b/doc/api/html/operator__unary__negative_8hpp_source.html new file mode 100644 index 00000000000..de1464e0924 --- /dev/null +++ b/doc/api/html/operator__unary__negative_8hpp_source.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_unary_negative.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_unary_negative.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_OPERATOR_UNARY_NEGATIVE_HPP
+
2 #define STAN_MATH_REV_CORE_OPERATOR_UNARY_NEGATIVE_HPP
+
3 
+ + +
6 #include <boost/math/special_functions/fpclassify.hpp>
+
7 #include <limits>
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
12  namespace {
+
13  class neg_vari : public op_v_vari {
+
14  public:
+
15  explicit neg_vari(vari* avi) :
+
16  op_v_vari(-(avi->val_), avi) {
+
17  }
+
18  void chain() {
+
19  if (unlikely(boost::math::isnan(avi_->val_)))
+
20  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
21  else
+
22  avi_->adj_ -= adj_;
+
23  }
+
24  };
+
25  }
+
26 
+
51  inline var operator-(const var& a) {
+
52  return var(new neg_vari(a.vi_));
+
53  }
+
54 
+
55  }
+
56 }
+
57 #endif
+
fvar< T > operator-(const fvar< T > &x1, const fvar< T > &x2)
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
+
#define unlikely(x)
Definition: likely.hpp:9
+ +
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/operator__unary__not_8hpp.html b/doc/api/html/operator__unary__not_8hpp.html new file mode 100644 index 00000000000..0e5208de56e --- /dev/null +++ b/doc/api/html/operator__unary__not_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_unary_not.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_unary_not.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

bool stan::math::operator! (const var &a)
 Prefix logical negation for the value of variables (C++). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/operator__unary__not_8hpp_source.html b/doc/api/html/operator__unary__not_8hpp_source.html new file mode 100644 index 00000000000..0b2217807f3 --- /dev/null +++ b/doc/api/html/operator__unary__not_8hpp_source.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_unary_not.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_unary_not.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_OPERATOR_UNARY_NOT_HPP
+
2 #define STAN_MATH_REV_CORE_OPERATOR_UNARY_NOT_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
31  inline bool operator!(const var& a) {
+
32  return !a.val();
+
33  }
+
34 
+
35  }
+
36 }
+
37 #endif
+
bool operator!(const var &a)
Prefix logical negation for the value of variables (C++).
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+ +
double val() const
Return the value of this variable.
Definition: var.hpp:234
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/operator__unary__plus_8hpp.html b/doc/api/html/operator__unary__plus_8hpp.html new file mode 100644 index 00000000000..acfc19ef81f --- /dev/null +++ b/doc/api/html/operator__unary__plus_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_unary_plus.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_unary_plus.hpp File Reference
+
+
+
#include <stan/math/rev/core/var.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <stan/math/rev/core/precomp_v_vari.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::operator+ (const var &a)
 Unary plus operator for variables (C++). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/operator__unary__plus_8hpp_source.html b/doc/api/html/operator__unary__plus_8hpp_source.html new file mode 100644 index 00000000000..3ecfb4ddf34 --- /dev/null +++ b/doc/api/html/operator__unary__plus_8hpp_source.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_unary_plus.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_unary_plus.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_OPERATOR_UNARY_PLUS_HPP
+
2 #define STAN_MATH_REV_CORE_OPERATOR_UNARY_PLUS_HPP
+
3 
+ +
5 #include <boost/math/special_functions/fpclassify.hpp>
+ + +
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
43  inline var operator+(const var& a) {
+ + +
46  a.vi_,
+ +
48  return a;
+
49  }
+
50 
+
51  }
+
52 }
+
53 #endif
+ +
const double NOT_A_NUMBER
(Quiet) not-a-number value.
Definition: constants.hpp:56
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
const double val_
The value of this variable.
Definition: vari.hpp:36
+
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
+
#define unlikely(x)
Definition: likely.hpp:9
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
fvar< T > operator+(const fvar< T > &x1, const fvar< T > &x2)
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/ordered__constrain_8hpp.html b/doc/api/html/ordered__constrain_8hpp.html new file mode 100644 index 00000000000..f22cae552cb --- /dev/null +++ b/doc/api/html/ordered__constrain_8hpp.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/ordered_constrain.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
ordered_constrain.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::ordered_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x)
 Return an increasing ordered vector derived from the specified free vector. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::ordered_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, T &lp)
 Return a positive valued, increasing ordered vector derived from the specified free vector and increment the specified log probability reference with the log absolute Jacobian determinant of the transform. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/ordered__constrain_8hpp_source.html b/doc/api/html/ordered__constrain_8hpp_source.html new file mode 100644 index 00000000000..b8c89748f61 --- /dev/null +++ b/doc/api/html/ordered__constrain_8hpp_source.html @@ -0,0 +1,165 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/ordered_constrain.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
ordered_constrain.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_ORDERED_CONSTRAIN_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_ORDERED_CONSTRAIN_HPP
+
3 
+ + +
6 #include <cmath>
+
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
21  template <typename T>
+
22  Eigen::Matrix<T, Eigen::Dynamic, 1>
+
23  ordered_constrain(const Eigen::Matrix<T, Eigen::Dynamic, 1>& x) {
+
24  using Eigen::Matrix;
+
25  using Eigen::Dynamic;
+ +
27  using std::exp;
+
28 
+
29  typedef typename index_type<Matrix<T, Dynamic, 1> >::type size_type;
+
30 
+
31  size_type k = x.size();
+
32  Matrix<T, Dynamic, 1> y(k);
+
33  if (k == 0)
+
34  return y;
+
35  y[0] = x[0];
+
36  for (size_type i = 1; i < k; ++i)
+
37  y[i] = y[i-1] + exp(x[i]);
+
38  return y;
+
39  }
+
40 
+
53  template <typename T>
+
54  inline
+
55  Eigen::Matrix<T, Eigen::Dynamic, 1>
+
56  ordered_constrain(const Eigen::Matrix<T, Eigen::Dynamic, 1>& x, T& lp) {
+
57  using Eigen::Matrix;
+
58  using Eigen::Dynamic;
+ +
60 
+
61  typedef typename index_type<Matrix<T, Dynamic, 1> >::type size_type;
+
62 
+
63  for (size_type i = 1; i < x.size(); ++i)
+
64  lp += x(i);
+
65  return ordered_constrain(x);
+
66  }
+
67 
+
68  }
+
69 
+
70 }
+
71 
+
72 #endif
+
Eigen::Matrix< T, Eigen::Dynamic, 1 > ordered_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x)
Return an increasing ordered vector derived from the specified free vector.
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:19
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/ordered__free_8hpp.html b/doc/api/html/ordered__free_8hpp.html new file mode 100644 index 00000000000..3baa718c010 --- /dev/null +++ b/doc/api/html/ordered__free_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/ordered_free.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
ordered_free.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::ordered_free (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y)
 Return the vector of unconstrained scalars that transform to the specified positive ordered vector. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/ordered__free_8hpp_source.html b/doc/api/html/ordered__free_8hpp_source.html new file mode 100644 index 00000000000..24444fed484 --- /dev/null +++ b/doc/api/html/ordered__free_8hpp_source.html @@ -0,0 +1,153 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/ordered_free.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
ordered_free.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_ORDERED_FREE_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_ORDERED_FREE_HPP
+
3 
+ + + +
7 #include <cmath>
+
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
26  template <typename T>
+
27  Eigen::Matrix<T, Eigen::Dynamic, 1>
+
28  ordered_free(const Eigen::Matrix<T, Eigen::Dynamic, 1>& y) {
+
29  stan::math::check_ordered("stan::math::ordered_free",
+
30  "Ordered variable", y);
+
31  using Eigen::Matrix;
+
32  using Eigen::Dynamic;
+ +
34  typedef typename index_type<Matrix<T, Dynamic, 1> >::type size_type;
+
35 
+
36  size_type k = y.size();
+
37  Matrix<T, Dynamic, 1> x(k);
+
38  if (k == 0)
+
39  return x;
+
40  x[0] = y[0];
+
41  for (size_type i = 1; i < k; ++i)
+
42  x[i] = log(y[i] - y[i-1]);
+
43  return x;
+
44  }
+
45 
+
46  }
+
47 
+
48 }
+
49 
+
50 #endif
+
Eigen::Matrix< T, Eigen::Dynamic, 1 > ordered_free(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y)
Return the vector of unconstrained scalars that transform to the specified positive ordered vector...
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:19
+ +
bool check_ordered(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &y)
Return true if the specified vector is sorted into strictly increasing order.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/ordered__logistic__log_8hpp.html b/doc/api/html/ordered__logistic__log_8hpp.html new file mode 100644 index 00000000000..fb51f16cc8a --- /dev/null +++ b/doc/api/html/ordered__logistic__log_8hpp.html @@ -0,0 +1,153 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/ordered_logistic_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
ordered_logistic_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + +

+Functions

template<typename T >
stan::math::log_inv_logit_diff (const T &alpha, const T &beta)
 
template<bool propto, typename T_lambda , typename T_cut >
boost::math::tools::promote_args
+< T_lambda, T_cut >::type 
stan::math::ordered_logistic_log (int y, const T_lambda &lambda, const Eigen::Matrix< T_cut, Eigen::Dynamic, 1 > &c)
 Returns the (natural) log probability of the specified integer outcome given the continuous location and specified cutpoints in an ordered logistic model. More...
 
template<typename T_lambda , typename T_cut >
boost::math::tools::promote_args
+< T_lambda, T_cut >::type 
stan::math::ordered_logistic_log (int y, const T_lambda &lambda, const Eigen::Matrix< T_cut, Eigen::Dynamic, 1 > &c)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/ordered__logistic__log_8hpp_source.html b/doc/api/html/ordered__logistic__log_8hpp_source.html new file mode 100644 index 00000000000..c88d5111cc5 --- /dev/null +++ b/doc/api/html/ordered__logistic__log_8hpp_source.html @@ -0,0 +1,227 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/ordered_logistic_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
ordered_logistic_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_ORDERED_LOGISTIC_LOG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_ORDERED_LOGISTIC_LOG_HPP
+
3 
+
4 #include <boost/random/uniform_01.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + +
20 
+
21 namespace stan {
+
22 
+
23  namespace math {
+
24 
+
25  template <typename T>
+
26  inline T log_inv_logit_diff(const T& alpha, const T& beta) {
+
27  using std::exp;
+ + +
30  return beta + log1m_exp(alpha - beta) - log1p_exp(alpha)
+
31  - log1p_exp(beta);
+
32  }
+
33 
+
34  // y in 0, ..., K-1; c.size()==K-2, c increasing, lambda finite
+
59  template <bool propto, typename T_lambda, typename T_cut>
+
60  typename boost::math::tools::promote_args<T_lambda, T_cut>::type
+
61  ordered_logistic_log(int y, const T_lambda& lambda,
+
62  const Eigen::Matrix<T_cut, Eigen::Dynamic, 1>& c) {
+
63  using std::exp;
+
64  using std::log;
+ +
66  using stan::math::log1m;
+ +
68 
+
69  static const char* function("stan::math::ordered_logistic");
+
70 
+ + + + + + + +
78 
+
79  int K = c.size() + 1;
+
80 
+
81  check_bounded(function, "Random variable", y, 1, K);
+
82  check_finite(function, "Location parameter", lambda);
+
83  check_greater(function, "Size of cut points parameter", c.size(), 0);
+
84  for (int i = 1; i < c.size(); ++i)
+
85  check_greater(function, "Cut points parameter", c(i), c(i - 1));
+
86 
+
87  check_finite(function, "Cut points parameter", c(c.size()-1));
+
88  check_finite(function, "Cut points parameter", c(0));
+
89 
+
90  // log(1 - inv_logit(lambda))
+
91  if (y == 1)
+
92  return -log1p_exp(lambda - c(0));
+
93 
+
94  // log(inv_logit(lambda - c(K-3)));
+
95  if (y == K) {
+
96  return -log1p_exp(c(K-2) - lambda);
+
97  }
+
98 
+
99  // if (2 < y < K) { ... }
+
100  // log(inv_logit(lambda - c(y-2)) - inv_logit(lambda - c(y-1)))
+
101  return log_inv_logit_diff(c(y-2) - lambda,
+
102  c(y-1) - lambda);
+
103  }
+
104 
+
105  template <typename T_lambda, typename T_cut>
+
106  typename boost::math::tools::promote_args<T_lambda, T_cut>::type
+
107  ordered_logistic_log(int y, const T_lambda& lambda,
+
108  const Eigen::Matrix<T_cut, Eigen::Dynamic, 1>& c) {
+
109  return ordered_logistic_log<false>(y, lambda, c);
+
110  }
+
111  }
+
112 }
+
113 
+
114 #endif
+
bool check_less(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is strictly less than high.
Definition: check_less.hpp:81
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
fvar< T > inv_logit(const fvar< T > &x)
Definition: inv_logit.hpp:15
+
bool check_bounded(const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)
Return true if the value is between the low and high values, inclusively.
+
T log_inv_logit_diff(const T &alpha, const T &beta)
+ + + + +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
fvar< T > log1m_exp(const fvar< T > &x)
Definition: log1m_exp.hpp:16
+ +
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ +
bool check_less_or_equal(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is less or equal to high.
+ +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + +
fvar< T > log1p_exp(const fvar< T > &x)
Definition: log1p_exp.hpp:13
+ +
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ + + +
fvar< T > log1m(const fvar< T > &x)
Definition: log1m.hpp:16
+
boost::math::tools::promote_args< T_lambda, T_cut >::type ordered_logistic_log(int y, const T_lambda &lambda, const Eigen::Matrix< T_cut, Eigen::Dynamic, 1 > &c)
Returns the (natural) log probability of the specified integer outcome given the continuous location ...
+
bool check_greater(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is strictly greater than low.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/ordered__logistic__rng_8hpp.html b/doc/api/html/ordered__logistic__rng_8hpp.html new file mode 100644 index 00000000000..5c429bc7a70 --- /dev/null +++ b/doc/api/html/ordered__logistic__rng_8hpp.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/ordered_logistic_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
ordered_logistic_rng.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
int stan::math::ordered_logistic_rng (const double eta, const Eigen::Matrix< double, Eigen::Dynamic, 1 > &c, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/ordered__logistic__rng_8hpp_source.html b/doc/api/html/ordered__logistic__rng_8hpp_source.html new file mode 100644 index 00000000000..d4890a07f86 --- /dev/null +++ b/doc/api/html/ordered__logistic__rng_8hpp_source.html @@ -0,0 +1,188 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/ordered_logistic_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
ordered_logistic_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_ORDERED_LOGISTIC_RNG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_ORDERED_LOGISTIC_RNG_HPP
+
3 
+
4 #include <boost/random/uniform_01.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + +
17 
+
18 namespace stan {
+
19 
+
20  namespace math {
+
21 
+
22  template <class RNG>
+
23  inline int
+
24  ordered_logistic_rng(const double eta,
+
25  const Eigen::Matrix<double, Eigen::Dynamic, 1>& c,
+
26  RNG& rng) {
+
27  using boost::variate_generator;
+ +
29 
+
30  static const char* function("stan::math::ordered_logistic");
+
31 
+ + + + + + + +
39 
+
40  check_finite(function, "Location parameter", eta);
+
41  check_greater(function, "Size of cut points parameter", c.size(), 0);
+
42  for (int i = 1; i < c.size(); ++i) {
+
43  check_greater(function, "Cut points parameter", c(i), c(i - 1));
+
44  }
+
45  check_finite(function, "Cut points parameter", c(c.size()-1));
+
46  check_finite(function, "Cut points parameter", c(0));
+
47 
+
48  Eigen::VectorXd cut(c.rows()+1);
+
49  cut(0) = 1 - inv_logit(eta - c(0));
+
50  for (int j = 1; j < c.rows(); j++)
+
51  cut(j) = inv_logit(eta - c(j - 1)) - inv_logit(eta - c(j));
+
52  cut(c.rows()) = inv_logit(eta - c(c.rows() - 1));
+
53 
+
54  return stan::math::categorical_rng(cut, rng);
+
55  }
+
56  }
+
57 }
+
58 
+
59 #endif
+
bool check_less(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is strictly less than high.
Definition: check_less.hpp:81
+ +
fvar< T > inv_logit(const fvar< T > &x)
Definition: inv_logit.hpp:15
+
bool check_bounded(const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)
Return true if the value is between the low and high values, inclusively.
+ + +
int categorical_rng(const Eigen::Matrix< double, Eigen::Dynamic, 1 > &theta, RNG &rng)
+ +
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+
bool check_less_or_equal(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is less or equal to high.
+ +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + + +
int ordered_logistic_rng(const double eta, const Eigen::Matrix< double, Eigen::Dynamic, 1 > &c, RNG &rng)
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ + + +
bool check_greater(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is strictly greater than low.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/out__of__range_8hpp.html b/doc/api/html/out__of__range_8hpp.html new file mode 100644 index 00000000000..e8d840db3f4 --- /dev/null +++ b/doc/api/html/out__of__range_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/out_of_range.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
out_of_range.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/error_index.hpp>
+#include <typeinfo>
+#include <string>
+#include <sstream>
+#include <stdexcept>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

void stan::math::out_of_range (const char *function, const int max, const int index, const char *msg1="", const char *msg2="")
 Throw an out_of_range exception with a consistently formatted message. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/out__of__range_8hpp_source.html b/doc/api/html/out__of__range_8hpp_source.html new file mode 100644 index 00000000000..39c267ffd7c --- /dev/null +++ b/doc/api/html/out__of__range_8hpp_source.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/err/out_of_range.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
out_of_range.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_ERR_OUT_OF_RANGE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_ERR_OUT_OF_RANGE_HPP
+
3 
+ +
5 #include <typeinfo>
+
6 #include <string>
+
7 #include <sstream>
+
8 #include <stdexcept>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
30  inline void out_of_range(const char* function,
+
31  const int max,
+
32  const int index,
+
33  const char* msg1 = "",
+
34  const char* msg2 = "") {
+
35  std::ostringstream message;
+
36 
+
37  message << function << ": accessing element out of range. "
+
38  << "index " << index << " out of range; "
+
39  << "expecting index to be between "
+
40  << stan::error_index::value << " and "
+
41  << stan::error_index::value - 1 + max
+
42  << msg1
+
43  << msg2;
+
44 
+
45  throw std::out_of_range(message.str());
+
46  }
+
47 
+
48  }
+
49 }
+
50 #endif
+ +
void out_of_range(const char *function, const int max, const int index, const char *msg1="", const char *msg2="")
Throw an out_of_range exception with a consistently formatted message.
+
int max(const std::vector< int > &x)
Returns the maximum coefficient in the specified column vector.
Definition: max.hpp:21
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/pareto__ccdf__log_8hpp.html b/doc/api/html/pareto__ccdf__log_8hpp.html new file mode 100644 index 00000000000..d9fb3a02fc0 --- /dev/null +++ b/doc/api/html/pareto__ccdf__log_8hpp.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/pareto_ccdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
pareto_ccdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_scale , typename T_shape >
return_type< T_y, T_scale,
+T_shape >::type 
stan::math::pareto_ccdf_log (const T_y &y, const T_scale &y_min, const T_shape &alpha)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/pareto__ccdf__log_8hpp_source.html b/doc/api/html/pareto__ccdf__log_8hpp_source.html new file mode 100644 index 00000000000..c67746c2734 --- /dev/null +++ b/doc/api/html/pareto__ccdf__log_8hpp_source.html @@ -0,0 +1,240 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/pareto_ccdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
pareto_ccdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_PARETO_CCDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_PARETO_CCDF_LOG_HPP
+
3 
+
4 #include <boost/random/exponential_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + +
15 #include <cmath>
+
16 #include <limits>
+
17 
+
18 namespace stan {
+
19  namespace math {
+
20 
+
21  template <typename T_y, typename T_scale, typename T_shape>
+
22  typename return_type<T_y, T_scale, T_shape>::type
+
23  pareto_ccdf_log(const T_y& y, const T_scale& y_min,
+
24  const T_shape& alpha) {
+ +
26  T_partials_return;
+
27 
+
28  // Size checks
+
29  if ( !( stan::length(y) && stan::length(y_min) && stan::length(alpha) ) )
+
30  return 0.0;
+
31 
+
32  // Check errors
+
33  static const char* function("stan::math::pareto_ccdf_log");
+
34 
+ + + + + + +
41  using std::log;
+
42  using std::exp;
+
43 
+
44  T_partials_return P(0.0);
+
45 
+
46  check_not_nan(function, "Random variable", y);
+
47  check_nonnegative(function, "Random variable", y);
+
48  check_positive_finite(function, "Scale parameter", y_min);
+
49  check_positive_finite(function, "Shape parameter", alpha);
+
50  check_consistent_sizes(function,
+
51  "Random variable", y,
+
52  "Scale parameter", y_min,
+
53  "Shape parameter", alpha);
+
54 
+
55  // Wrap arguments in vectors
+
56  VectorView<const T_y> y_vec(y);
+
57  VectorView<const T_scale> y_min_vec(y_min);
+
58  VectorView<const T_shape> alpha_vec(alpha);
+
59  size_t N = max_size(y, y_min, alpha);
+
60 
+ +
62  operands_and_partials(y, y_min, alpha);
+
63 
+
64  // Explicit return for extreme values
+
65  // The gradients are technically ill-defined, but treated as zero
+
66 
+
67  for (size_t i = 0; i < stan::length(y); i++) {
+
68  if (value_of(y_vec[i]) < value_of(y_min_vec[i]))
+
69  return operands_and_partials.to_var(0.0, y, y_min, alpha);
+
70  }
+
71 
+
72  // Compute vectorized cdf_log and its gradients
+
73 
+
74  for (size_t n = 0; n < N; n++) {
+
75  // Explicit results for extreme values
+
76  // The gradients are technically ill-defined, but treated as zero
+
77  if (value_of(y_vec[n]) == std::numeric_limits<double>::infinity()) {
+
78  return operands_and_partials.to_var(stan::math::negative_infinity(),
+
79  y, y_min, alpha);
+
80  }
+
81 
+
82  // Pull out values
+
83  const T_partials_return log_dbl = log(value_of(y_min_vec[n])
+
84  / value_of(y_vec[n]));
+
85  const T_partials_return y_min_inv_dbl = 1.0 / value_of(y_min_vec[n]);
+
86  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
87 
+
88  P += alpha_dbl * log_dbl;
+
89 
+ +
91  operands_and_partials.d_x1[n] -= alpha_dbl * y_min_inv_dbl
+
92  * exp(log_dbl);
+ +
94  operands_and_partials.d_x2[n] += alpha_dbl * y_min_inv_dbl;
+ +
96  operands_and_partials.d_x3[n] += log_dbl;
+
97  }
+
98 
+
99  return operands_and_partials.to_var(P, y, y_min, alpha);
+
100  }
+
101  }
+
102 }
+
103 #endif
+ +
bool check_greater_or_equal(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is greater or equal than low.
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
return_type< T_y, T_scale, T_shape >::type pareto_ccdf_log(const T_y &y, const T_scale &y_min, const T_shape &alpha)
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/pareto__cdf_8hpp.html b/doc/api/html/pareto__cdf_8hpp.html new file mode 100644 index 00000000000..4a72ca96897 --- /dev/null +++ b/doc/api/html/pareto__cdf_8hpp.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/pareto_cdf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
pareto_cdf.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_scale , typename T_shape >
return_type< T_y, T_scale,
+T_shape >::type 
stan::math::pareto_cdf (const T_y &y, const T_scale &y_min, const T_shape &alpha)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/pareto__cdf_8hpp_source.html b/doc/api/html/pareto__cdf_8hpp_source.html new file mode 100644 index 00000000000..ecbe557b00f --- /dev/null +++ b/doc/api/html/pareto__cdf_8hpp_source.html @@ -0,0 +1,258 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/pareto_cdf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
pareto_cdf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_PARETO_CDF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_PARETO_CDF_HPP
+
3 
+
4 #include <boost/random/exponential_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + +
15 #include <cmath>
+
16 #include <limits>
+
17 
+
18 
+
19 namespace stan {
+
20  namespace math {
+
21 
+
22  template <typename T_y, typename T_scale, typename T_shape>
+
23  typename return_type<T_y, T_scale, T_shape>::type
+
24  pareto_cdf(const T_y& y, const T_scale& y_min, const T_shape& alpha) {
+ +
26  T_partials_return;
+
27 
+
28  // Check sizes
+
29  // Size checks
+
30  if ( !( stan::length(y) && stan::length(y_min) && stan::length(alpha) ) )
+
31  return 1.0;
+
32 
+
33  // Check errors
+
34  static const char* function("stan::math::pareto_cdf");
+
35 
+ + + + + + +
42  using std::log;
+
43  using std::exp;
+
44 
+
45  T_partials_return P(1.0);
+
46 
+
47  check_not_nan(function, "Random variable", y);
+
48  check_nonnegative(function, "Random variable", y);
+
49  check_positive_finite(function, "Scale parameter", y_min);
+
50  check_positive_finite(function, "Shape parameter", alpha);
+
51  check_consistent_sizes(function,
+
52  "Random variable", y,
+
53  "Scale parameter", y_min,
+
54  "Shape parameter", alpha);
+
55 
+
56  // Wrap arguments in vectors
+
57  VectorView<const T_y> y_vec(y);
+
58  VectorView<const T_scale> y_min_vec(y_min);
+
59  VectorView<const T_shape> alpha_vec(alpha);
+
60  size_t N = max_size(y, y_min, alpha);
+
61 
+ +
63  operands_and_partials(y, y_min, alpha);
+
64 
+
65  // Explicit return for extreme values
+
66  // The gradients are technically ill-defined, but treated as zero
+
67 
+
68  for (size_t i = 0; i < stan::length(y); i++) {
+
69  if (value_of(y_vec[i]) < value_of(y_min_vec[i]))
+
70  return operands_and_partials.to_var(0.0, y, y_min, alpha);
+
71  }
+
72 
+
73  // Compute vectorized CDF and its gradients
+
74 
+
75  for (size_t n = 0; n < N; n++) {
+
76  // Explicit results for extreme values
+
77  // The gradients are technically ill-defined, but treated as zero
+
78  if (value_of(y_vec[n]) == std::numeric_limits<double>::infinity()) {
+
79  continue;
+
80  }
+
81 
+
82  // Pull out values
+
83  const T_partials_return log_dbl = log(value_of(y_min_vec[n])
+
84  / value_of(y_vec[n]));
+
85  const T_partials_return y_min_inv_dbl = 1.0 / value_of(y_min_vec[n]);
+
86  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
87 
+
88  // Compute
+
89  const T_partials_return Pn = 1.0 - exp(alpha_dbl * log_dbl);
+
90 
+
91  P *= Pn;
+
92 
+ +
94  operands_and_partials.d_x1[n]
+
95  += alpha_dbl * y_min_inv_dbl * exp((alpha_dbl + 1) * log_dbl)
+
96  / Pn;
+ +
98  operands_and_partials.d_x2[n]
+
99  += - alpha_dbl * y_min_inv_dbl * exp(alpha_dbl * log_dbl) / Pn;
+ +
101  operands_and_partials.d_x3[n]
+
102  += - exp(alpha_dbl * log_dbl) * log_dbl / Pn;
+
103  }
+
104 
+ +
106  for (size_t n = 0; n < stan::length(y); ++n)
+
107  operands_and_partials.d_x1[n] *= P;
+
108  }
+ +
110  for (size_t n = 0; n < stan::length(y_min); ++n)
+
111  operands_and_partials.d_x2[n] *= P;
+
112  }
+ +
114  for (size_t n = 0; n < stan::length(alpha); ++n)
+
115  operands_and_partials.d_x3[n] *= P;
+
116  }
+
117 
+
118  return operands_and_partials.to_var(P, y, y_min, alpha);
+
119  }
+
120  }
+
121 }
+
122 #endif
+ +
bool check_greater_or_equal(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is greater or equal than low.
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
return_type< T_y, T_scale, T_shape >::type pareto_cdf(const T_y &y, const T_scale &y_min, const T_shape &alpha)
Definition: pareto_cdf.hpp:24
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/pareto__cdf__log_8hpp.html b/doc/api/html/pareto__cdf__log_8hpp.html new file mode 100644 index 00000000000..3e37790a606 --- /dev/null +++ b/doc/api/html/pareto__cdf__log_8hpp.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/pareto_cdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
pareto_cdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_scale , typename T_shape >
return_type< T_y, T_scale,
+T_shape >::type 
stan::math::pareto_cdf_log (const T_y &y, const T_scale &y_min, const T_shape &alpha)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/pareto__cdf__log_8hpp_source.html b/doc/api/html/pareto__cdf__log_8hpp_source.html new file mode 100644 index 00000000000..ae64e6da357 --- /dev/null +++ b/doc/api/html/pareto__cdf__log_8hpp_source.html @@ -0,0 +1,244 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/pareto_cdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
pareto_cdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_PARETO_CDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_PARETO_CDF_LOG_HPP
+
3 
+
4 #include <boost/random/exponential_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + +
15 #include <cmath>
+
16 #include <limits>
+
17 
+
18 namespace stan {
+
19  namespace math {
+
20 
+
21  template <typename T_y, typename T_scale, typename T_shape>
+
22  typename return_type<T_y, T_scale, T_shape>::type
+
23  pareto_cdf_log(const T_y& y, const T_scale& y_min, const T_shape& alpha) {
+ +
25  T_partials_return;
+
26 
+
27  // Size checks
+
28  if ( !( stan::length(y) && stan::length(y_min) && stan::length(alpha) ) )
+
29  return 0.0;
+
30 
+
31  // Check errors
+
32  static const char* function("stan::math::pareto_cdf_log");
+
33 
+ + + + + + +
40  using std::log;
+
41  using std::exp;
+
42 
+
43  T_partials_return P(0.0);
+
44 
+
45  check_not_nan(function, "Random variable", y);
+
46  check_nonnegative(function, "Random variable", y);
+
47  check_positive_finite(function, "Scale parameter", y_min);
+
48  check_positive_finite(function, "Shape parameter", alpha);
+
49  check_consistent_sizes(function,
+
50  "Random variable", y,
+
51  "Scale parameter", y_min,
+
52  "Shape parameter", alpha);
+
53 
+
54  // Wrap arguments in vectors
+
55  VectorView<const T_y> y_vec(y);
+
56  VectorView<const T_scale> y_min_vec(y_min);
+
57  VectorView<const T_shape> alpha_vec(alpha);
+
58  size_t N = max_size(y, y_min, alpha);
+
59 
+ +
61  operands_and_partials(y, y_min, alpha);
+
62 
+
63  // Explicit return for extreme values
+
64  // The gradients are technically ill-defined, but treated as zero
+
65 
+
66  for (size_t i = 0; i < stan::length(y); i++) {
+
67  if (value_of(y_vec[i]) < value_of(y_min_vec[i]))
+
68  return operands_and_partials.to_var(stan::math::negative_infinity(),
+
69  y, y_min, alpha);
+
70  }
+
71 
+
72  // Compute vectorized cdf_log and its gradients
+
73 
+
74  for (size_t n = 0; n < N; n++) {
+
75  // Explicit results for extreme values
+
76  // The gradients are technically ill-defined, but treated as zero
+
77  if (value_of(y_vec[n]) == std::numeric_limits<double>::infinity()) {
+
78  return operands_and_partials.to_var(0.0, y, y_min, alpha);
+
79  }
+
80 
+
81  // Pull out values
+
82  const T_partials_return log_dbl = log(value_of(y_min_vec[n])
+
83  / value_of(y_vec[n]));
+
84  const T_partials_return y_min_inv_dbl = 1.0 / value_of(y_min_vec[n]);
+
85  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
86 
+
87  // Compute
+
88  const T_partials_return Pn = 1.0 - exp(alpha_dbl * log_dbl);
+
89 
+
90  P += log(Pn);
+
91 
+ +
93  operands_and_partials.d_x1[n]
+
94  += alpha_dbl * y_min_inv_dbl * exp((alpha_dbl + 1) * log_dbl) / Pn;
+ +
96  operands_and_partials.d_x2[n]
+
97  -= alpha_dbl * y_min_inv_dbl * exp(alpha_dbl * log_dbl) / Pn;
+ +
99  operands_and_partials.d_x3[n]
+
100  -= exp(alpha_dbl * log_dbl) * log_dbl / Pn;
+
101  }
+
102 
+
103  return operands_and_partials.to_var(P, y, y_min, alpha);
+
104  }
+
105  }
+
106 }
+
107 #endif
+ +
bool check_greater_or_equal(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is greater or equal than low.
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
return_type< T_y, T_scale, T_shape >::type pareto_cdf_log(const T_y &y, const T_scale &y_min, const T_shape &alpha)
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/pareto__log_8hpp.html b/doc/api/html/pareto__log_8hpp.html new file mode 100644 index 00000000000..d4116a361a0 --- /dev/null +++ b/doc/api/html/pareto__log_8hpp.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/pareto_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
pareto_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_scale , typename T_shape >
return_type< T_y, T_scale,
+T_shape >::type 
stan::math::pareto_log (const T_y &y, const T_scale &y_min, const T_shape &alpha)
 
template<typename T_y , typename T_scale , typename T_shape >
return_type< T_y, T_scale,
+T_shape >::type 
stan::math::pareto_log (const T_y &y, const T_scale &y_min, const T_shape &alpha)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/pareto__log_8hpp_source.html b/doc/api/html/pareto__log_8hpp_source.html new file mode 100644 index 00000000000..a0c9e57d981 --- /dev/null +++ b/doc/api/html/pareto__log_8hpp_source.html @@ -0,0 +1,277 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/pareto_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
pareto_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_PARETO_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_PARETO_LOG_HPP
+
3 
+
4 #include <boost/random/exponential_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + +
18 #include <cmath>
+
19 
+
20 namespace stan {
+
21  namespace math {
+
22 
+
23  // Pareto(y|y_m, alpha) [y > y_m; y_m > 0; alpha > 0]
+
24  template <bool propto,
+
25  typename T_y, typename T_scale, typename T_shape>
+
26  typename return_type<T_y, T_scale, T_shape>::type
+
27  pareto_log(const T_y& y, const T_scale& y_min, const T_shape& alpha) {
+
28  static const char* function("stan::math::pareto_log");
+ +
30  T_partials_return;
+
31 
+ + + + +
36  using std::log;
+
37 
+
38  // check if any vectors are zero length
+
39  if (!(stan::length(y)
+
40  && stan::length(y_min)
+
41  && stan::length(alpha)))
+
42  return 0.0;
+
43 
+
44  // set up return value accumulator
+
45  T_partials_return logp(0.0);
+
46 
+
47  // validate args (here done over var, which should be OK)
+
48  check_not_nan(function, "Random variable", y);
+
49  check_positive_finite(function, "Scale parameter", y_min);
+
50  check_positive_finite(function, "Shape parameter", alpha);
+
51  check_consistent_sizes(function,
+
52  "Random variable", y,
+
53  "Scale parameter", y_min,
+
54  "Shape parameter", alpha);
+
55 
+
56  // check if no variables are involved and prop-to
+ +
58  return 0.0;
+
59 
+
60  VectorView<const T_y> y_vec(y);
+
61  VectorView<const T_scale> y_min_vec(y_min);
+
62  VectorView<const T_shape> alpha_vec(alpha);
+
63  size_t N = max_size(y, y_min, alpha);
+
64 
+
65  for (size_t n = 0; n < N; n++) {
+
66  if (y_vec[n] < y_min_vec[n])
+
67  return LOG_ZERO;
+
68  }
+
69 
+
70  // set up template expressions wrapping scalars into vector views
+ +
72  operands_and_partials(y, y_min, alpha);
+
73 
+ +
75  T_partials_return, T_y> log_y(length(y));
+ +
77  for (size_t n = 0; n < length(y); n++)
+
78  log_y[n] = log(value_of(y_vec[n]));
+
79  }
+
80 
+ +
82  T_partials_return, T_y> inv_y(length(y));
+ +
84  for (size_t n = 0; n < length(y); n++)
+
85  inv_y[n] = 1 / value_of(y_vec[n]);
+
86  }
+
87 
+ +
89  T_partials_return, T_scale>
+
90  log_y_min(length(y_min));
+ +
92  for (size_t n = 0; n < length(y_min); n++)
+
93  log_y_min[n] = log(value_of(y_min_vec[n]));
+
94  }
+
95 
+ +
97  T_partials_return, T_shape> log_alpha(length(alpha));
+ +
99  for (size_t n = 0; n < length(alpha); n++)
+
100  log_alpha[n] = log(value_of(alpha_vec[n]));
+
101  }
+
102 
+ +
104 
+
105  for (size_t n = 0; n < N; n++) {
+
106  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
107  // log probability
+ +
109  logp += log_alpha[n];
+ +
111  logp += alpha_dbl * log_y_min[n];
+ +
113  logp -= alpha_dbl * log_y[n] + log_y[n];
+
114 
+
115  // gradients
+ +
117  operands_and_partials.d_x1[n] -= alpha_dbl * inv_y[n] + inv_y[n];
+ +
119  operands_and_partials.d_x2[n] += alpha_dbl / value_of(y_min_vec[n]);
+ +
121  operands_and_partials.d_x3[n]
+
122  += 1 / alpha_dbl + log_y_min[n] - log_y[n];
+
123  }
+
124  return operands_and_partials.to_var(logp, y, y_min, alpha);
+
125  }
+
126 
+
127  template <typename T_y, typename T_scale, typename T_shape>
+
128  inline
+ +
130  pareto_log(const T_y& y, const T_scale& y_min, const T_shape& alpha) {
+
131  return pareto_log<false>(y, y_min, alpha);
+
132  }
+
133  }
+
134 }
+
135 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
return_type< T_y, T_scale, T_shape >::type pareto_log(const T_y &y, const T_scale &y_min, const T_shape &alpha)
Definition: pareto_log.hpp:27
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
const double LOG_ZERO
Definition: constants.hpp:175
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + +
fvar< T > multiply_log(const fvar< T > &x1, const fvar< T > &x2)
+ + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/pareto__rng_8hpp.html b/doc/api/html/pareto__rng_8hpp.html new file mode 100644 index 00000000000..375ad0abd3b --- /dev/null +++ b/doc/api/html/pareto__rng_8hpp.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/pareto_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
pareto_rng.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
double stan::math::pareto_rng (const double y_min, const double alpha, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/pareto__rng_8hpp_source.html b/doc/api/html/pareto__rng_8hpp_source.html new file mode 100644 index 00000000000..0bd726a49b4 --- /dev/null +++ b/doc/api/html/pareto__rng_8hpp_source.html @@ -0,0 +1,161 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/pareto_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
pareto_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_PARETO_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_PARETO_RNG_HPP
+
3 
+
4 #include <boost/random/exponential_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + +
15 
+
16 
+
17 namespace stan {
+
18  namespace math {
+
19 
+
20  template <class RNG>
+
21  inline double
+
22  pareto_rng(const double y_min,
+
23  const double alpha,
+
24  RNG& rng) {
+
25  using boost::variate_generator;
+
26  using boost::exponential_distribution;
+
27 
+
28  static const char* function("stan::math::pareto_rng");
+
29 
+ +
31 
+
32  check_positive_finite(function, "Scale parameter", y_min);
+
33  check_positive_finite(function, "Shape parameter", alpha);
+
34 
+
35  variate_generator<RNG&, exponential_distribution<> >
+
36  exp_rng(rng, exponential_distribution<>(alpha));
+
37  return y_min * std::exp(exp_rng());
+
38  }
+
39  }
+
40 }
+
41 #endif
+ + +
double pareto_rng(const double y_min, const double alpha, RNG &rng)
Definition: pareto_rng.hpp:22
+ + +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ + + + + +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/pareto__type__2__ccdf__log_8hpp.html b/doc/api/html/pareto__type__2__ccdf__log_8hpp.html new file mode 100644 index 00000000000..fa68b4c98e7 --- /dev/null +++ b/doc/api/html/pareto__type__2__ccdf__log_8hpp.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/pareto_type_2_ccdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
pareto_type_2_ccdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
return_type< T_y, T_loc,
+T_scale, T_shape >::type 
stan::math::pareto_type_2_ccdf_log (const T_y &y, const T_loc &mu, const T_scale &lambda, const T_shape &alpha)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/pareto__type__2__ccdf__log_8hpp_source.html b/doc/api/html/pareto__type__2__ccdf__log_8hpp_source.html new file mode 100644 index 00000000000..55905616a36 --- /dev/null +++ b/doc/api/html/pareto__type__2__ccdf__log_8hpp_source.html @@ -0,0 +1,271 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/pareto_type_2_ccdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
pareto_type_2_ccdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_PARETO_TYPE_2_CCDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_PARETO_TYPE_2_CCDF_LOG_HPP
+
3 
+
4 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + +
18 #include <cmath>
+
19 
+
20 namespace stan {
+
21  namespace math {
+
22 
+
23  template <typename T_y, typename T_loc, typename T_scale, typename T_shape>
+
24  typename return_type<T_y, T_loc, T_scale, T_shape>::type
+
25  pareto_type_2_ccdf_log(const T_y& y, const T_loc& mu,
+
26  const T_scale& lambda, const T_shape& alpha) {
+
27  typedef
+ +
29  T_partials_return;
+
30 
+
31  // Check sizes
+
32  // Size checks
+
33  if ( !( stan::length(y)
+
34  && stan::length(mu)
+
35  && stan::length(lambda)
+
36  && stan::length(alpha) ) )
+
37  return 0.0;
+
38 
+
39  // Check errors
+
40  static const char* function("stan::math::pareto_type_2_ccdf_log");
+
41 
+ + + + + + + +
49  using std::log;
+
50 
+
51  T_partials_return P(0.0);
+
52 
+
53  check_greater_or_equal(function, "Random variable", y, mu);
+
54  check_not_nan(function, "Random variable", y);
+
55  check_nonnegative(function, "Random variable", y);
+
56  check_positive_finite(function, "Scale parameter", lambda);
+
57  check_positive_finite(function, "Shape parameter", alpha);
+
58  check_consistent_sizes(function,
+
59  "Random variable", y,
+
60  "Scale parameter", lambda,
+
61  "Shape parameter", alpha);
+
62 
+
63  // Wrap arguments in vectors
+
64  VectorView<const T_y> y_vec(y);
+
65  VectorView<const T_loc> mu_vec(mu);
+
66  VectorView<const T_scale> lambda_vec(lambda);
+
67  VectorView<const T_shape> alpha_vec(alpha);
+
68  size_t N = max_size(y, mu, lambda, alpha);
+
69 
+ +
71  operands_and_partials(y, mu, lambda, alpha);
+
72 
+
73  VectorBuilder<true, T_partials_return,
+
74  T_y, T_loc, T_scale, T_shape>
+
75  ccdf_log(N);
+
76 
+
77  VectorBuilder<contains_nonconstant_struct<T_y, T_loc, T_scale,
+
78  T_shape>::value,
+
79  T_partials_return, T_y, T_loc, T_scale, T_shape>
+
80  a_over_lambda_plus_y(N);
+
81 
+ +
83  T_partials_return, T_y, T_loc, T_scale, T_shape>
+
84  log_1p_y_over_lambda(N);
+
85 
+
86  for (size_t i = 0; i < N; i++) {
+
87  const T_partials_return y_dbl = value_of(y_vec[i]);
+
88  const T_partials_return mu_dbl = value_of(mu_vec[i]);
+
89  const T_partials_return lambda_dbl = value_of(lambda_vec[i]);
+
90  const T_partials_return alpha_dbl = value_of(alpha_vec[i]);
+
91  const T_partials_return temp = 1.0 + (y_dbl - mu_dbl) / lambda_dbl;
+
92  const T_partials_return log_temp = log(temp);
+
93 
+
94  ccdf_log[i] = -alpha_dbl * log_temp;
+
95 
+ +
97  a_over_lambda_plus_y[i] = alpha_dbl / (y_dbl - mu_dbl + lambda_dbl);
+
98 
+ +
100  log_1p_y_over_lambda[i] = log_temp;
+
101  }
+
102 
+
103  // Compute vectorized CDF and its gradients
+
104 
+
105  for (size_t n = 0; n < N; n++) {
+
106  // Pull out values
+
107  const T_partials_return y_dbl = value_of(y_vec[n]);
+
108  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
109  const T_partials_return lambda_dbl = value_of(lambda_vec[n]);
+
110 
+
111  // Compute
+
112  P += ccdf_log[n];
+
113 
+ +
115  operands_and_partials.d_x1[n] -= a_over_lambda_plus_y[n];
+ +
117  operands_and_partials.d_x2[n] += a_over_lambda_plus_y[n];
+ +
119  operands_and_partials.d_x3[n] += a_over_lambda_plus_y[n]
+
120  * (y_dbl - mu_dbl) / lambda_dbl;
+ +
122  operands_and_partials.d_x4[n] -= log_1p_y_over_lambda[n];
+
123  }
+
124 
+
125  return operands_and_partials.to_var(P, y, mu, lambda, alpha);
+
126  }
+
127  }
+
128 }
+
129 #endif
+ +
bool check_greater_or_equal(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is greater or equal than low.
+
return_type< T_y, T_loc, T_scale, T_shape >::type pareto_type_2_ccdf_log(const T_y &y, const T_loc &mu, const T_scale &lambda, const T_shape &alpha)
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
VectorView< T_partials_return, is_vector< T4 >::value, is_constant_struct< T4 >::value > d_x4
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/pareto__type__2__cdf_8hpp.html b/doc/api/html/pareto__type__2__cdf_8hpp.html new file mode 100644 index 00000000000..4024aac5c59 --- /dev/null +++ b/doc/api/html/pareto__type__2__cdf_8hpp.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/pareto_type_2_cdf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
pareto_type_2_cdf.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
return_type< T_y, T_loc,
+T_scale, T_shape >::type 
stan::math::pareto_type_2_cdf (const T_y &y, const T_loc &mu, const T_scale &lambda, const T_shape &alpha)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/pareto__type__2__cdf_8hpp_source.html b/doc/api/html/pareto__type__2__cdf_8hpp_source.html new file mode 100644 index 00000000000..9ef7f7d950c --- /dev/null +++ b/doc/api/html/pareto__type__2__cdf_8hpp_source.html @@ -0,0 +1,290 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/pareto_type_2_cdf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
pareto_type_2_cdf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_PARETO_TYPE_2_CDF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_PARETO_TYPE_2_CDF_HPP
+
3 
+
4 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + +
18 #include <cmath>
+
19 
+
20 namespace stan {
+
21  namespace math {
+
22 
+
23  template <typename T_y, typename T_loc, typename T_scale, typename T_shape>
+
24  typename return_type<T_y, T_loc, T_scale, T_shape>::type
+
25  pareto_type_2_cdf(const T_y& y, const T_loc& mu,
+
26  const T_scale& lambda, const T_shape& alpha) {
+
27  typedef
+ +
29  T_partials_return;
+
30 
+
31  // Check sizes
+
32  // Size checks
+
33  if ( !( stan::length(y)
+
34  && stan::length(mu)
+
35  && stan::length(lambda)
+
36  && stan::length(alpha) ) )
+
37  return 1.0;
+
38 
+
39  // Check errors
+
40  static const char* function("stan::math::pareto_type_2_cdf");
+
41 
+ + + + + + + + +
50  using std::log;
+
51 
+
52  T_partials_return P(1.0);
+
53 
+
54  check_greater_or_equal(function, "Random variable", y, mu);
+
55  check_not_nan(function, "Random variable", y);
+
56  check_nonnegative(function, "Random variable", y);
+
57  check_positive_finite(function, "Scale parameter", lambda);
+
58  check_positive_finite(function, "Shape parameter", alpha);
+
59  check_consistent_sizes(function,
+
60  "Random variable", y,
+
61  "Scale parameter", lambda,
+
62  "Shape parameter", alpha);
+
63 
+
64  // Wrap arguments in vectors
+
65  VectorView<const T_y> y_vec(y);
+
66  VectorView<const T_loc> mu_vec(mu);
+
67  VectorView<const T_scale> lambda_vec(lambda);
+
68  VectorView<const T_shape> alpha_vec(alpha);
+
69  size_t N = max_size(y, mu, lambda, alpha);
+
70 
+ +
72  operands_and_partials(y, mu, lambda, alpha);
+
73 
+
74  VectorBuilder<true, T_partials_return,
+
75  T_y, T_loc, T_scale, T_shape>
+
76  p1_pow_alpha(N);
+
77 
+ +
79  T_partials_return, T_y, T_loc, T_scale, T_shape>
+
80  grad_1_2(N);
+
81 
+ +
83  T_partials_return, T_y, T_loc, T_scale, T_shape>
+
84  grad_3(N);
+
85 
+
86  for (size_t i = 0; i < N; i++) {
+
87  const T_partials_return lambda_dbl = value_of(lambda_vec[i]);
+
88  const T_partials_return alpha_dbl = value_of(alpha_vec[i]);
+
89  const T_partials_return temp = 1 + (value_of(y_vec[i])
+
90  - value_of(mu_vec[i]))
+
91  / lambda_dbl;
+
92  p1_pow_alpha[i] = pow(temp, -alpha_dbl);
+
93 
+ +
95  grad_1_2[i] = p1_pow_alpha[i] / temp * alpha_dbl / lambda_dbl;
+
96 
+ +
98  grad_3[i] = log(temp) * p1_pow_alpha[i];
+
99  }
+
100 
+
101  // Compute vectorized CDF and its gradients
+
102 
+
103  for (size_t n = 0; n < N; n++) {
+
104  // Pull out values
+
105  const T_partials_return y_dbl = value_of(y_vec[n]);
+
106  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
107  const T_partials_return lambda_dbl = value_of(lambda_vec[n]);
+
108 
+
109  const T_partials_return Pn = 1.0 - p1_pow_alpha[n];
+
110 
+
111  // Compute
+
112  P *= Pn;
+
113 
+ +
115  operands_and_partials.d_x1[n] += grad_1_2[n] / Pn;
+ +
117  operands_and_partials.d_x2[n] -= grad_1_2[n] / Pn;
+ +
119  operands_and_partials.d_x3[n] += (mu_dbl - y_dbl)
+
120  * grad_1_2[n] / lambda_dbl / Pn;
+ +
122  operands_and_partials.d_x4[n] += grad_3[n] / Pn;
+
123  }
+
124 
+ +
126  for (size_t n = 0; n < stan::length(y); ++n)
+
127  operands_and_partials.d_x1[n] *= P;
+
128  }
+ +
130  for (size_t n = 0; n < stan::length(mu); ++n)
+
131  operands_and_partials.d_x2[n] *= P;
+
132  }
+ +
134  for (size_t n = 0; n < stan::length(lambda); ++n)
+
135  operands_and_partials.d_x3[n] *= P;
+
136  }
+ +
138  for (size_t n = 0; n < stan::length(alpha); ++n)
+
139  operands_and_partials.d_x4[n] *= P;
+
140  }
+
141 
+
142  return operands_and_partials.to_var(P, y, mu, lambda, alpha);
+
143  }
+
144  }
+
145 }
+
146 #endif
+ +
bool check_greater_or_equal(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is greater or equal than low.
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
return_type< T_y, T_loc, T_scale, T_shape >::type pareto_type_2_cdf(const T_y &y, const T_loc &mu, const T_scale &lambda, const T_shape &alpha)
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
VectorView< T_partials_return, is_vector< T4 >::value, is_constant_struct< T4 >::value > d_x4
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/pareto__type__2__cdf__log_8hpp.html b/doc/api/html/pareto__type__2__cdf__log_8hpp.html new file mode 100644 index 00000000000..b150a087e0f --- /dev/null +++ b/doc/api/html/pareto__type__2__cdf__log_8hpp.html @@ -0,0 +1,143 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/pareto_type_2_cdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
pareto_type_2_cdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
return_type< T_y, T_loc,
+T_scale, T_shape >::type 
stan::math::pareto_type_2_cdf_log (const T_y &y, const T_loc &mu, const T_scale &lambda, const T_shape &alpha)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/pareto__type__2__cdf__log_8hpp_source.html b/doc/api/html/pareto__type__2__cdf__log_8hpp_source.html new file mode 100644 index 00000000000..734543388a4 --- /dev/null +++ b/doc/api/html/pareto__type__2__cdf__log_8hpp_source.html @@ -0,0 +1,275 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/pareto_type_2_cdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
pareto_type_2_cdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_PARETO_TYPE_2_CDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_PARETO_TYPE_2_CDF_LOG_HPP
+
3 
+
4 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + +
17 #include <cmath>
+
18 
+
19 
+
20 namespace stan {
+
21  namespace math {
+
22 
+
23  template <typename T_y, typename T_loc, typename T_scale, typename T_shape>
+
24  typename return_type<T_y, T_loc, T_scale, T_shape>::type
+
25  pareto_type_2_cdf_log(const T_y& y, const T_loc& mu,
+
26  const T_scale& lambda, const T_shape& alpha) {
+
27  typedef
+ +
29  T_partials_return;
+
30 
+
31  // Check sizes
+
32  // Size checks
+
33  if ( !( stan::length(y)
+
34  && stan::length(mu)
+
35  && stan::length(lambda)
+
36  && stan::length(alpha) ) )
+
37  return 0.0;
+
38 
+
39  // Check errors
+
40  static const char* function("stan::math::pareto_type_2_cdf_log");
+
41 
+ + + + + + + + +
50  using stan::math::log1m;
+
51  using std::log;
+
52 
+
53  T_partials_return P(0.0);
+
54 
+
55  check_greater_or_equal(function, "Random variable", y, mu);
+
56  check_not_nan(function, "Random variable", y);
+
57  check_nonnegative(function, "Random variable", y);
+
58  check_positive_finite(function, "Scale parameter", lambda);
+
59  check_positive_finite(function, "Shape parameter", alpha);
+
60  check_consistent_sizes(function,
+
61  "Random variable", y,
+
62  "Scale parameter", lambda,
+
63  "Shape parameter", alpha);
+
64 
+
65  // Wrap arguments in vectors
+
66  VectorView<const T_y> y_vec(y);
+
67  VectorView<const T_loc> mu_vec(mu);
+
68  VectorView<const T_scale> lambda_vec(lambda);
+
69  VectorView<const T_shape> alpha_vec(alpha);
+
70  size_t N = max_size(y, mu, lambda, alpha);
+
71 
+ +
73  operands_and_partials(y, mu, lambda, alpha);
+
74 
+
75  VectorBuilder<true, T_partials_return,
+
76  T_y, T_loc, T_scale, T_shape>
+
77  cdf_log(N);
+
78 
+
79  VectorBuilder<true, T_partials_return,
+
80  T_y, T_loc, T_scale, T_shape>
+
81  inv_p1_pow_alpha_minus_one(N);
+
82 
+ +
84  T_partials_return, T_y, T_loc, T_scale, T_shape>
+
85  log_1p_y_over_lambda(N);
+
86 
+
87  for (size_t i = 0; i < N; i++) {
+
88  const T_partials_return temp = 1.0 + (value_of(y_vec[i])
+
89  - value_of(mu_vec[i]))
+
90  / value_of(lambda_vec[i]);
+
91  const T_partials_return p1_pow_alpha
+
92  = pow(temp, value_of(alpha_vec[i]));
+
93  cdf_log[i] = log1m(1.0 / p1_pow_alpha);
+
94 
+
95  inv_p1_pow_alpha_minus_one[i] = 1.0 / (p1_pow_alpha - 1.0);
+
96 
+ +
98  log_1p_y_over_lambda[i] = log(temp);
+
99  }
+
100 
+
101  // Compute vectorized CDF and its gradients
+
102 
+
103  for (size_t n = 0; n < N; n++) {
+
104  // Pull out values
+
105  const T_partials_return y_dbl = value_of(y_vec[n]);
+
106  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
107  const T_partials_return lambda_dbl = value_of(lambda_vec[n]);
+
108  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
109 
+
110  const T_partials_return grad_1_2 = alpha_dbl
+
111  * inv_p1_pow_alpha_minus_one[n] / (lambda_dbl - mu_dbl + y_dbl);
+
112 
+
113  // Compute
+
114  P += cdf_log[n];
+
115 
+ +
117  operands_and_partials.d_x1[n] += grad_1_2;
+ +
119  operands_and_partials.d_x2[n] -= grad_1_2;
+ +
121  operands_and_partials.d_x3[n] += (mu_dbl - y_dbl) * grad_1_2
+
122  / lambda_dbl;
+ +
124  operands_and_partials.d_x4[n] += log_1p_y_over_lambda[n]
+
125  * inv_p1_pow_alpha_minus_one[n];
+
126  }
+
127 
+
128  return operands_and_partials.to_var(P, y, mu, lambda, alpha);
+
129  }
+
130  }
+
131 }
+
132 #endif
+ +
bool check_greater_or_equal(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is greater or equal than low.
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
VectorView< T_partials_return, is_vector< T4 >::value, is_constant_struct< T4 >::value > d_x4
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
return_type< T_y, T_loc, T_scale, T_shape >::type pareto_type_2_cdf_log(const T_y &y, const T_loc &mu, const T_scale &lambda, const T_shape &alpha)
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
fvar< T > log1m(const fvar< T > &x)
Definition: log1m.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/pareto__type__2__log_8hpp.html b/doc/api/html/pareto__type__2__log_8hpp.html new file mode 100644 index 00000000000..d1aef6b6731 --- /dev/null +++ b/doc/api/html/pareto__type__2__log_8hpp.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/pareto_type_2_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
pareto_type_2_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_shape >
return_type< T_y, T_loc,
+T_scale, T_shape >::type 
stan::math::pareto_type_2_log (const T_y &y, const T_loc &mu, const T_scale &lambda, const T_shape &alpha)
 
template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
return_type< T_y, T_loc,
+T_scale, T_shape >::type 
stan::math::pareto_type_2_log (const T_y &y, const T_loc &mu, const T_scale &lambda, const T_shape &alpha)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/pareto__type__2__log_8hpp_source.html b/doc/api/html/pareto__type__2__log_8hpp_source.html new file mode 100644 index 00000000000..a0c2299b068 --- /dev/null +++ b/doc/api/html/pareto__type__2__log_8hpp_source.html @@ -0,0 +1,298 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/pareto_type_2_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
pareto_type_2_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_PARETO_TYPE_2_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_PARETO_TYPE_2_LOG_HPP
+
3 
+
4 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + +
18 #include <cmath>
+
19 
+
20 
+
21 namespace stan {
+
22  namespace math {
+
23 
+
24  // pareto_type_2(y|lambda, alpha) [y >= 0; lambda > 0; alpha > 0]
+
25  template <bool propto,
+
26  typename T_y, typename T_loc, typename T_scale, typename T_shape>
+
27  typename return_type<T_y, T_loc, T_scale, T_shape>::type
+
28  pareto_type_2_log(const T_y& y, const T_loc& mu, const T_scale& lambda,
+
29  const T_shape& alpha) {
+
30  static const char* function("stan::math::pareto_type_2_log");
+
31  typedef
+ +
33  T_partials_return;
+
34 
+
35  using std::log;
+ + + + + + + +
43  using std::log;
+
44 
+
45  // check if any vectors are zero length
+
46  if (!(stan::length(y)
+
47  && stan::length(mu)
+
48  && stan::length(lambda)
+
49  && stan::length(alpha)))
+
50  return 0.0;
+
51 
+
52  // set up return value accumulator
+
53  T_partials_return logp(0.0);
+
54 
+
55  // validate args (here done over var, which should be OK)
+
56  check_greater_or_equal(function, "Random variable", y, mu);
+
57  check_not_nan(function, "Random variable", y);
+
58  check_positive_finite(function, "Scale parameter", lambda);
+
59  check_positive_finite(function, "Shape parameter", alpha);
+
60  check_consistent_sizes(function,
+
61  "Random variable", y,
+
62  "Scale parameter", lambda,
+
63  "Shape parameter", alpha);
+
64 
+
65 
+
66  // check if no variables are involved and prop-to
+ +
68  return 0.0;
+
69 
+
70  VectorView<const T_y> y_vec(y);
+
71  VectorView<const T_loc> mu_vec(mu);
+
72  VectorView<const T_scale> lambda_vec(lambda);
+
73  VectorView<const T_shape> alpha_vec(alpha);
+
74  size_t N = max_size(y, mu, lambda, alpha);
+
75 
+
76  // set up template expressions wrapping scalars into vector views
+ +
78  operands_and_partials(y, mu, lambda, alpha);
+
79 
+ +
81  ::value,
+
82  T_partials_return, T_y, T_loc, T_scale>
+
83  log1p_scaled_diff(N);
+ +
85  for (size_t n = 0; n < N; n++)
+
86  log1p_scaled_diff[n] = log1p((value_of(y_vec[n])
+
87  - value_of(mu_vec[n]))
+
88  / value_of(lambda_vec[n]));
+
89  }
+
90 
+ +
92  T_partials_return, T_scale> log_lambda(length(lambda));
+ +
94  for (size_t n = 0; n < length(lambda); n++)
+
95  log_lambda[n] = log(value_of(lambda_vec[n]));
+
96  }
+
97 
+ +
99  T_partials_return, T_shape> log_alpha(length(alpha));
+ +
101  for (size_t n = 0; n < length(alpha); n++)
+
102  log_alpha[n] = log(value_of(alpha_vec[n]));
+
103  }
+
104 
+ +
106  T_partials_return, T_shape> inv_alpha(length(alpha));
+ +
108  for (size_t n = 0; n < length(alpha); n++)
+
109  inv_alpha[n] = 1 / value_of(alpha_vec[n]);
+
110  }
+
111 
+
112  for (size_t n = 0; n < N; n++) {
+
113  const T_partials_return y_dbl = value_of(y_vec[n]);
+
114  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
115  const T_partials_return lambda_dbl = value_of(lambda_vec[n]);
+
116  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
117  const T_partials_return sum_dbl = lambda_dbl + y_dbl - mu_dbl;
+
118  const T_partials_return inv_sum = 1.0 / sum_dbl;
+
119  const T_partials_return alpha_div_sum = alpha_dbl / sum_dbl;
+
120  const T_partials_return deriv_1_2 = inv_sum + alpha_div_sum;
+
121 
+
122  // // log probability
+ +
124  logp += log_alpha[n];
+ +
126  logp -= log_lambda[n];
+ +
128  logp -= (alpha_dbl + 1.0) * log1p_scaled_diff[n];
+
129 
+
130  // gradients
+ +
132  operands_and_partials.d_x1[n] -= deriv_1_2;
+ +
134  operands_and_partials.d_x2[n] += deriv_1_2;
+ +
136  operands_and_partials.d_x3[n] -= alpha_div_sum * (mu_dbl - y_dbl)
+
137  / lambda_dbl + inv_sum;
+ +
139  operands_and_partials.d_x4[n] += inv_alpha[n] - log1p_scaled_diff[n];
+
140  }
+
141  return operands_and_partials.to_var(logp, y, mu, lambda, alpha);
+
142  }
+
143 
+
144  template <typename T_y, typename T_loc, typename T_scale, typename T_shape>
+
145  inline
+ +
147  pareto_type_2_log(const T_y& y, const T_loc& mu,
+
148  const T_scale& lambda, const T_shape& alpha) {
+
149  return pareto_type_2_log<false>(y, mu, lambda, alpha);
+
150  }
+
151  }
+
152 }
+
153 #endif
+ +
bool check_greater_or_equal(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is greater or equal than low.
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
VectorView< T_partials_return, is_vector< T4 >::value, is_constant_struct< T4 >::value > d_x4
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
fvar< T > log1p(const fvar< T > &x)
Definition: log1p.hpp:16
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
return_type< T_y, T_loc, T_scale, T_shape >::type pareto_type_2_log(const T_y &y, const T_loc &mu, const T_scale &lambda, const T_shape &alpha)
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/pareto__type__2__rng_8hpp.html b/doc/api/html/pareto__type__2__rng_8hpp.html new file mode 100644 index 00000000000..83cfe1681de --- /dev/null +++ b/doc/api/html/pareto__type__2__rng_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/pareto_type_2_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
pareto_type_2_rng.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
double stan::math::pareto_type_2_rng (const double mu, const double lambda, const double alpha, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/pareto__type__2__rng_8hpp_source.html b/doc/api/html/pareto__type__2__rng_8hpp_source.html new file mode 100644 index 00000000000..7044ebc8b07 --- /dev/null +++ b/doc/api/html/pareto__type__2__rng_8hpp_source.html @@ -0,0 +1,161 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/pareto_type_2_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
pareto_type_2_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_PARETO_TYPE_2_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_PARETO_TYPE_2_RNG_HPP
+
3 
+
4 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + +
16 
+
17 
+
18 namespace stan {
+
19  namespace math {
+
20 
+
21  template <class RNG>
+
22  inline double
+
23  pareto_type_2_rng(const double mu,
+
24  const double lambda,
+
25  const double alpha,
+
26  RNG& rng) {
+
27  static const char* function("stan::math::pareto_type_2_rng");
+
28 
+
29  stan::math::check_positive(function, "scale parameter", lambda);
+
30 
+
31  double uniform_01 = stan::math::uniform_rng(0.0, 1.0, rng);
+
32 
+
33 
+
34  return (std::pow(1.0 - uniform_01, -1.0 / alpha) - 1.0) * lambda + mu;
+
35  }
+
36  }
+
37 }
+
38 #endif
+ + +
double pareto_type_2_rng(const double mu, const double lambda, const double alpha, RNG &rng)
+ + +
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ +
double uniform_rng(const double alpha, const double beta, RNG &rng)
Definition: uniform_rng.hpp:22
+ + + +
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/partial__derivative_8hpp.html b/doc/api/html/partial__derivative_8hpp.html new file mode 100644 index 00000000000..c4bb96700dc --- /dev/null +++ b/doc/api/html/partial__derivative_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/mix/mat/functor/partial_derivative.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
partial_derivative.hpp File Reference
+
+
+
#include <stan/math/fwd/core.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/rev/core.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T , typename F >
void stan::math::partial_derivative (const F &f, const Eigen::Matrix< T, Dynamic, 1 > &x, int n, T &fx, T &dfx_dxn)
 Return the partial derivative of the specified multiivariate function at the specified argument. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/partial__derivative_8hpp_source.html b/doc/api/html/partial__derivative_8hpp_source.html new file mode 100644 index 00000000000..21192efaedb --- /dev/null +++ b/doc/api/html/partial__derivative_8hpp_source.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan/math/mix/mat/functor/partial_derivative.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
partial_derivative.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_MIX_MAT_FUNCTOR_PARTIAL_DERIVATIVE_HPP
+
2 #define STAN_MATH_MIX_MAT_FUNCTOR_PARTIAL_DERIVATIVE_HPP
+
3 
+
4 #include <stan/math/fwd/core.hpp>
+ +
6 #include <stan/math/rev/core.hpp>
+
7 #include <vector>
+
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
13  using Eigen::Dynamic;
+
14 
+
27  template <typename T, typename F>
+
28  void
+
29  partial_derivative(const F& f,
+
30  const Eigen::Matrix<T, Dynamic, 1>& x,
+
31  int n,
+
32  T& fx,
+
33  T& dfx_dxn) {
+
34  Eigen::Matrix<fvar<T>, Dynamic, 1> x_fvar(x.size());
+
35  for (int i = 0; i < x.size(); ++i)
+
36  x_fvar(i) = fvar<T>(x(i), i == n);
+
37  fvar<T> fx_fvar = f(x_fvar);
+
38  fx = fx_fvar.val_;
+
39  dfx_dxn = fx_fvar.d_;
+
40  }
+
41 
+
42  } // namespace math
+
43 } // namespace stan
+
44 #endif
+ + + + + +
void partial_derivative(const F &f, const Eigen::Matrix< T, Dynamic, 1 > &x, int n, T &fx, T &dfx_dxn)
Return the partial derivative of the specified multiivariate function at the specified argument...
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/partials__return__type_8hpp.html b/doc/api/html/partials__return__type_8hpp.html new file mode 100644 index 00000000000..0ceec39b3f2 --- /dev/null +++ b/doc/api/html/partials__return__type_8hpp.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/partials_return_type.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
partials_return_type.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/partials_type.hpp>
+#include <stan/math/prim/scal/meta/scalar_type.hpp>
+#include <boost/math/tools/promotion.hpp>
+
+

Go to the source code of this file.

+ + + + +

+Classes

struct  stan::partials_return_type< T1, T2, T3, T4, T5, T6 >
 
+ + + +

+Namespaces

 stan
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/partials__return__type_8hpp_source.html b/doc/api/html/partials__return__type_8hpp_source.html new file mode 100644 index 00000000000..16f0fbdc60a --- /dev/null +++ b/doc/api/html/partials__return__type_8hpp_source.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/partials_return_type.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
partials_return_type.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_PARTIALS_RETURN_TYPE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_PARTIALS_RETURN_TYPE_HPP
+
3 
+ + +
6 #include <boost/math/tools/promotion.hpp>
+
7 
+
8 namespace stan {
+
9 
+
10  template <typename T1,
+
11  typename T2 = double,
+
12  typename T3 = double,
+
13  typename T4 = double,
+
14  typename T5 = double,
+
15  typename T6 = double>
+ +
17  typedef typename
+
18  boost::math::tools::promote_args
+ + + + + + +
25  ::type
+ +
27  };
+
28 
+
29 
+
30 }
+
31 #endif
+
32 
+ + + + +
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/poisson__ccdf__log_8hpp.html b/doc/api/html/poisson__ccdf__log_8hpp.html new file mode 100644 index 00000000000..22e53fafe13 --- /dev/null +++ b/doc/api/html/poisson__ccdf__log_8hpp.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/poisson_ccdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
poisson_ccdf_log.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_less.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/fun/gamma_q.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <boost/random/poisson_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <cmath>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_n , typename T_rate >
return_type< T_rate >::type stan::math::poisson_ccdf_log (const T_n &n, const T_rate &lambda)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/poisson__ccdf__log_8hpp_source.html b/doc/api/html/poisson__ccdf__log_8hpp_source.html new file mode 100644 index 00000000000..9335926556f --- /dev/null +++ b/doc/api/html/poisson__ccdf__log_8hpp_source.html @@ -0,0 +1,231 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/poisson_ccdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
poisson_ccdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_POISSON_CCDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_POISSON_CCDF_LOG_HPP
+
3 
+ + + + + + + + + +
13 #include <boost/math/special_functions/fpclassify.hpp>
+
14 #include <boost/random/poisson_distribution.hpp>
+
15 #include <boost/random/variate_generator.hpp>
+
16 #include <cmath>
+
17 #include <limits>
+
18 
+
19 namespace stan {
+
20 
+
21  namespace math {
+
22 
+
23  template <typename T_n, typename T_rate>
+
24  typename return_type<T_rate>::type
+
25  poisson_ccdf_log(const T_n& n, const T_rate& lambda) {
+
26  static const char* function("stan::math::poisson_ccdf_log");
+ +
28  T_partials_return;
+
29 
+ + + + +
34 
+
35  // Ensure non-zero argument slengths
+
36  if (!(stan::length(n) && stan::length(lambda)))
+
37  return 0.0;
+
38 
+
39  T_partials_return P(0.0);
+
40 
+
41  // Validate arguments
+
42  check_not_nan(function, "Rate parameter", lambda);
+
43  check_nonnegative(function, "Rate parameter", lambda);
+
44  check_consistent_sizes(function,
+
45  "Random variable", n,
+
46  "Rate parameter", lambda);
+
47 
+
48  // Wrap arguments into vector views
+
49  VectorView<const T_n> n_vec(n);
+
50  VectorView<const T_rate> lambda_vec(lambda);
+
51  size_t size = max_size(n, lambda);
+
52 
+
53  // Compute vectorized cdf_log and gradient
+ +
55  using stan::math::gamma_q;
+
56  using boost::math::tgamma;
+
57  using std::exp;
+
58  using std::pow;
+
59  using std::log;
+
60  using std::exp;
+
61 
+
62  OperandsAndPartials<T_rate> operands_and_partials(lambda);
+
63 
+
64  // Explicit return for extreme values
+
65  // The gradients are technically ill-defined, but treated as neg infinity
+
66  for (size_t i = 0; i < stan::length(n); i++) {
+
67  if (value_of(n_vec[i]) < 0)
+
68  return operands_and_partials.to_var(0.0, lambda);
+
69  }
+
70 
+
71  for (size_t i = 0; i < size; i++) {
+
72  // Explicit results for extreme values
+
73  // The gradients are technically ill-defined, but treated as zero
+
74  if (value_of(n_vec[i]) == std::numeric_limits<int>::max())
+
75  return operands_and_partials.to_var(stan::math::negative_infinity(),
+
76  lambda);
+
77 
+
78  const T_partials_return n_dbl = value_of(n_vec[i]);
+
79  const T_partials_return lambda_dbl = value_of(lambda_vec[i]);
+
80  const T_partials_return Pi = 1.0 - gamma_q(n_dbl+1, lambda_dbl);
+
81 
+
82  P += log(Pi);
+
83 
+ +
85  operands_and_partials.d_x1[i] += exp(-lambda_dbl)
+
86  * pow(lambda_dbl, n_dbl) / tgamma(n_dbl+1) / Pi;
+
87  }
+
88 
+
89  return operands_and_partials.to_var(P, lambda);
+
90  }
+
91  }
+
92 }
+
93 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+
int max(const std::vector< int > &x)
Returns the maximum coefficient in the specified column vector.
Definition: max.hpp:21
+ +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
return_type< T_rate >::type poisson_ccdf_log(const T_n &n, const T_rate &lambda)
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
fvar< T > tgamma(const fvar< T > &x)
Definition: tgamma.hpp:15
+
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
fvar< T > gamma_q(const fvar< T > &x1, const fvar< T > &x2)
Definition: gamma_q.hpp:15
+ +
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/poisson__cdf_8hpp.html b/doc/api/html/poisson__cdf_8hpp.html new file mode 100644 index 00000000000..8b0ca587261 --- /dev/null +++ b/doc/api/html/poisson__cdf_8hpp.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/poisson_cdf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
poisson_cdf.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_less.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/fun/gamma_q.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <boost/random/poisson_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <cmath>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_n , typename T_rate >
return_type< T_rate >::type stan::math::poisson_cdf (const T_n &n, const T_rate &lambda)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/poisson__cdf_8hpp_source.html b/doc/api/html/poisson__cdf_8hpp_source.html new file mode 100644 index 00000000000..c28542af997 --- /dev/null +++ b/doc/api/html/poisson__cdf_8hpp_source.html @@ -0,0 +1,233 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/poisson_cdf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
poisson_cdf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_POISSON_CDF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_POISSON_CDF_HPP
+
3 
+ + + + + + + + + +
13 #include <boost/math/special_functions/fpclassify.hpp>
+
14 #include <boost/random/poisson_distribution.hpp>
+
15 #include <boost/random/variate_generator.hpp>
+
16 #include <cmath>
+
17 #include <limits>
+
18 
+
19 namespace stan {
+
20 
+
21  namespace math {
+
22 
+
23  // Poisson CDF
+
24  template <typename T_n, typename T_rate>
+
25  typename return_type<T_rate>::type
+
26  poisson_cdf(const T_n& n, const T_rate& lambda) {
+
27  static const char* function("stan::math::poisson_cdf");
+ +
29  T_partials_return;
+
30 
+ + + + +
35 
+
36  // Ensure non-zero argument slengths
+
37  if (!(stan::length(n) && stan::length(lambda)))
+
38  return 1.0;
+
39 
+
40  T_partials_return P(1.0);
+
41 
+
42  // Validate arguments
+
43  check_not_nan(function, "Rate parameter", lambda);
+
44  check_nonnegative(function, "Rate parameter", lambda);
+
45  check_consistent_sizes(function,
+
46  "Random variable", n,
+
47  "Rate parameter", lambda);
+
48 
+
49  // Wrap arguments into vector views
+
50  VectorView<const T_n> n_vec(n);
+
51  VectorView<const T_rate> lambda_vec(lambda);
+
52  size_t size = max_size(n, lambda);
+
53 
+
54  // Compute vectorized CDF and gradient
+ +
56  using stan::math::gamma_q;
+
57  using boost::math::tgamma;
+
58  using std::exp;
+
59  using std::pow;
+
60  using std::exp;
+
61 
+
62  OperandsAndPartials<T_rate> operands_and_partials(lambda);
+
63 
+
64  // Explicit return for extreme values
+
65  // The gradients are technically ill-defined, but treated as zero
+
66  for (size_t i = 0; i < stan::length(n); i++) {
+
67  if (value_of(n_vec[i]) < 0)
+
68  return operands_and_partials.to_var(0.0, lambda);
+
69  }
+
70 
+
71  for (size_t i = 0; i < size; i++) {
+
72  // Explicit results for extreme values
+
73  // The gradients are technically ill-defined, but treated as zero
+
74  if (value_of(n_vec[i]) == std::numeric_limits<int>::max())
+
75  continue;
+
76 
+
77  const T_partials_return n_dbl = value_of(n_vec[i]);
+
78  const T_partials_return lambda_dbl = value_of(lambda_vec[i]);
+
79  const T_partials_return Pi = gamma_q(n_dbl+1, lambda_dbl);
+
80 
+
81  P *= Pi;
+
82 
+ +
84  operands_and_partials.d_x1[i] -= exp(-lambda_dbl)
+
85  * pow(lambda_dbl, n_dbl) / tgamma(n_dbl+1) / Pi;
+
86  }
+
87 
+ +
89  for (size_t i = 0; i < stan::length(lambda); ++i)
+
90  operands_and_partials.d_x1[i] *= P;
+
91  }
+
92 
+
93  return operands_and_partials.to_var(P, lambda);
+
94  }
+
95  }
+
96 }
+
97 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
A variable implementation that stores operands and derivatives with respect to the variable...
+
return_type< T_rate >::type poisson_cdf(const T_n &n, const T_rate &lambda)
Definition: poisson_cdf.hpp:26
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+
int max(const std::vector< int > &x)
Returns the maximum coefficient in the specified column vector.
Definition: max.hpp:21
+ +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
fvar< T > tgamma(const fvar< T > &x)
Definition: tgamma.hpp:15
+
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
fvar< T > gamma_q(const fvar< T > &x1, const fvar< T > &x2)
Definition: gamma_q.hpp:15
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/poisson__cdf__log_8hpp.html b/doc/api/html/poisson__cdf__log_8hpp.html new file mode 100644 index 00000000000..f6f0a26e7c5 --- /dev/null +++ b/doc/api/html/poisson__cdf__log_8hpp.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/poisson_cdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
poisson_cdf_log.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_less.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/fun/gamma_q.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <boost/random/poisson_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <cmath>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_n , typename T_rate >
return_type< T_rate >::type stan::math::poisson_cdf_log (const T_n &n, const T_rate &lambda)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/poisson__cdf__log_8hpp_source.html b/doc/api/html/poisson__cdf__log_8hpp_source.html new file mode 100644 index 00000000000..4881732bbd6 --- /dev/null +++ b/doc/api/html/poisson__cdf__log_8hpp_source.html @@ -0,0 +1,231 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/poisson_cdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
poisson_cdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_POISSON_CDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_POISSON_CDF_LOG_HPP
+
3 
+ + + + + + + + + +
13 #include <boost/math/special_functions/fpclassify.hpp>
+
14 #include <boost/random/poisson_distribution.hpp>
+
15 #include <boost/random/variate_generator.hpp>
+
16 #include <cmath>
+
17 #include <limits>
+
18 
+
19 namespace stan {
+
20 
+
21  namespace math {
+
22 
+
23  template <typename T_n, typename T_rate>
+
24  typename return_type<T_rate>::type
+
25  poisson_cdf_log(const T_n& n, const T_rate& lambda) {
+
26  static const char* function("stan::math::poisson_cdf_log");
+ +
28  T_partials_return;
+
29 
+ + + + +
34 
+
35  // Ensure non-zero argument slengths
+
36  if (!(stan::length(n) && stan::length(lambda)))
+
37  return 0.0;
+
38 
+
39  T_partials_return P(0.0);
+
40 
+
41  // Validate arguments
+
42  check_not_nan(function, "Rate parameter", lambda);
+
43  check_nonnegative(function, "Rate parameter", lambda);
+
44  check_consistent_sizes(function,
+
45  "Random variable", n,
+
46  "Rate parameter", lambda);
+
47 
+
48  // Wrap arguments into vector views
+
49  VectorView<const T_n> n_vec(n);
+
50  VectorView<const T_rate> lambda_vec(lambda);
+
51  size_t size = max_size(n, lambda);
+
52 
+
53  // Compute vectorized cdf_log and gradient
+ +
55  using stan::math::gamma_q;
+
56  using boost::math::tgamma;
+
57  using std::exp;
+
58  using std::pow;
+
59  using std::log;
+
60  using std::exp;
+
61 
+
62  OperandsAndPartials<T_rate> operands_and_partials(lambda);
+
63 
+
64  // Explicit return for extreme values
+
65  // The gradients are technically ill-defined, but treated as neg infinity
+
66  for (size_t i = 0; i < stan::length(n); i++) {
+
67  if (value_of(n_vec[i]) < 0)
+
68  return operands_and_partials.to_var(stan::math::negative_infinity(),
+
69  lambda);
+
70  }
+
71 
+
72  for (size_t i = 0; i < size; i++) {
+
73  // Explicit results for extreme values
+
74  // The gradients are technically ill-defined, but treated as zero
+
75  if (value_of(n_vec[i]) == std::numeric_limits<int>::max())
+
76  continue;
+
77 
+
78  const T_partials_return n_dbl = value_of(n_vec[i]);
+
79  const T_partials_return lambda_dbl = value_of(lambda_vec[i]);
+
80  const T_partials_return Pi = gamma_q(n_dbl+1, lambda_dbl);
+
81 
+
82  P += log(Pi);
+
83 
+ +
85  operands_and_partials.d_x1[i] -= exp(-lambda_dbl)
+
86  * pow(lambda_dbl, n_dbl) / tgamma(n_dbl+1) / Pi;
+
87  }
+
88 
+
89  return operands_and_partials.to_var(P, lambda);
+
90  }
+
91  }
+
92 }
+
93 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
return_type< T_rate >::type poisson_cdf_log(const T_n &n, const T_rate &lambda)
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+
int max(const std::vector< int > &x)
Returns the maximum coefficient in the specified column vector.
Definition: max.hpp:21
+ +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
fvar< T > tgamma(const fvar< T > &x)
Definition: tgamma.hpp:15
+
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
fvar< T > gamma_q(const fvar< T > &x1, const fvar< T > &x2)
Definition: gamma_q.hpp:15
+ +
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/poisson__log_8hpp.html b/doc/api/html/poisson__log_8hpp.html new file mode 100644 index 00000000000..7975cf0a965 --- /dev/null +++ b/doc/api/html/poisson__log_8hpp.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/poisson_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
poisson_log.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_less.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/fun/gamma_q.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/meta/VectorView.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <boost/random/poisson_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<bool propto, typename T_n , typename T_rate >
return_type< T_rate >::type stan::math::poisson_log (const T_n &n, const T_rate &lambda)
 
template<typename T_n , typename T_rate >
return_type< T_rate >::type stan::math::poisson_log (const T_n &n, const T_rate &lambda)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/poisson__log_8hpp_source.html b/doc/api/html/poisson__log_8hpp_source.html new file mode 100644 index 00000000000..f693276e240 --- /dev/null +++ b/doc/api/html/poisson__log_8hpp_source.html @@ -0,0 +1,243 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/poisson_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
poisson_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_POISSON_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_POISSON_LOG_HPP
+
3 
+ + + + + + + + + + + +
15 #include <boost/math/special_functions/fpclassify.hpp>
+
16 #include <boost/random/poisson_distribution.hpp>
+
17 #include <boost/random/variate_generator.hpp>
+
18 #include <limits>
+
19 
+
20 namespace stan {
+
21 
+
22  namespace math {
+
23 
+
24  // Poisson(n|lambda) [lambda > 0; n >= 0]
+
25  template <bool propto, typename T_n, typename T_rate>
+
26  typename return_type<T_rate>::type
+
27  poisson_log(const T_n& n, const T_rate& lambda) {
+ +
29  T_partials_return;
+
30 
+
31  static const char* function("stan::math::poisson_log");
+
32 
+
33  using boost::math::lgamma;
+ + + + + +
39 
+
40  // check if any vectors are zero length
+
41  if (!(stan::length(n)
+
42  && stan::length(lambda)))
+
43  return 0.0;
+
44 
+
45  // set up return value accumulator
+
46  T_partials_return logp(0.0);
+
47 
+
48  // validate args
+
49  check_nonnegative(function, "Random variable", n);
+
50  check_not_nan(function, "Rate parameter", lambda);
+
51  check_nonnegative(function, "Rate parameter", lambda);
+
52  check_consistent_sizes(function,
+
53  "Random variable", n,
+
54  "Rate parameter", lambda);
+
55 
+
56  // check if no variables are involved and prop-to
+ +
58  return 0.0;
+
59 
+
60  // set up expression templates wrapping scalars/vecs into vector views
+
61  VectorView<const T_n> n_vec(n);
+
62  VectorView<const T_rate> lambda_vec(lambda);
+
63  size_t size = max_size(n, lambda);
+
64 
+
65  for (size_t i = 0; i < size; i++)
+
66  if (boost::math::isinf(lambda_vec[i]))
+
67  return LOG_ZERO;
+
68  for (size_t i = 0; i < size; i++)
+
69  if (lambda_vec[i] == 0 && n_vec[i] != 0)
+
70  return LOG_ZERO;
+
71 
+
72  // return accumulator with gradients
+
73  OperandsAndPartials<T_rate> operands_and_partials(lambda);
+
74 
+ +
76  for (size_t i = 0; i < size; i++) {
+
77  if (!(lambda_vec[i] == 0 && n_vec[i] == 0)) {
+ +
79  logp -= lgamma(n_vec[i] + 1.0);
+ +
81  logp += multiply_log(n_vec[i], value_of(lambda_vec[i]))
+
82  - value_of(lambda_vec[i]);
+
83  }
+
84 
+
85  // gradients
+ +
87  operands_and_partials.d_x1[i]
+
88  += n_vec[i] / value_of(lambda_vec[i]) - 1.0;
+
89  }
+
90 
+
91 
+
92  return operands_and_partials.to_var(logp, lambda);
+
93  }
+
94 
+
95  template <typename T_n,
+
96  typename T_rate>
+
97  inline
+ +
99  poisson_log(const T_n& n, const T_rate& lambda) {
+
100  return poisson_log<false>(n, lambda);
+
101  }
+
102  }
+
103 }
+
104 #endif
+ +
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
const double LOG_ZERO
Definition: constants.hpp:175
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ +
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
bool isinf(const stan::math::var &v)
Checks if the given number is infinite.
Definition: boost_isinf.hpp:22
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
return_type< T_rate >::type poisson_log(const T_n &n, const T_rate &lambda)
Definition: poisson_log.hpp:27
+
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+
fvar< T > multiply_log(const fvar< T > &x1, const fvar< T > &x2)
+ +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/poisson__log__log_8hpp.html b/doc/api/html/poisson__log__log_8hpp.html new file mode 100644 index 00000000000..c026674b59e --- /dev/null +++ b/doc/api/html/poisson__log__log_8hpp.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/poisson_log_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
poisson_log_log.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_less.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/fun/gamma_q.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/prim/scal/meta/include_summand.hpp>
+#include <stan/math/prim/scal/meta/VectorView.hpp>
+#include <stan/math/prim/scal/meta/VectorBuilder.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <boost/random/poisson_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <cmath>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<bool propto, typename T_n , typename T_log_rate >
return_type< T_log_rate >::type stan::math::poisson_log_log (const T_n &n, const T_log_rate &alpha)
 
template<typename T_n , typename T_log_rate >
return_type< T_log_rate >::type stan::math::poisson_log_log (const T_n &n, const T_log_rate &alpha)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/poisson__log__log_8hpp_source.html b/doc/api/html/poisson__log__log_8hpp_source.html new file mode 100644 index 00000000000..b759ccebdcd --- /dev/null +++ b/doc/api/html/poisson__log__log_8hpp_source.html @@ -0,0 +1,256 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/poisson_log_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
poisson_log_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_POISSON_LOG_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_POISSON_LOG_LOG_HPP
+
3 
+ + + + + + + + + + + + +
16 #include <boost/math/special_functions/fpclassify.hpp>
+
17 #include <boost/random/poisson_distribution.hpp>
+
18 #include <boost/random/variate_generator.hpp>
+
19 #include <cmath>
+
20 #include <limits>
+
21 
+
22 namespace stan {
+
23 
+
24  namespace math {
+
25 
+
26  // PoissonLog(n|alpha) [n >= 0] = Poisson(n|exp(alpha))
+
27  template <bool propto,
+
28  typename T_n, typename T_log_rate>
+
29  typename return_type<T_log_rate>::type
+
30  poisson_log_log(const T_n& n, const T_log_rate& alpha) {
+ +
32  T_partials_return;
+
33 
+
34  static const char* function("stan::math::poisson_log_log");
+
35 
+
36  using boost::math::lgamma;
+ + + + + +
42  using std::exp;
+
43  using std::exp;
+
44 
+
45  // check if any vectors are zero length
+
46  if (!(stan::length(n)
+
47  && stan::length(alpha)))
+
48  return 0.0;
+
49 
+
50  // set up return value accumulator
+
51  T_partials_return logp(0.0);
+
52 
+
53  // validate args
+
54  check_nonnegative(function, "Random variable", n);
+
55  check_not_nan(function, "Log rate parameter", alpha);
+
56  check_consistent_sizes(function,
+
57  "Random variable", n,
+
58  "Log rate parameter", alpha);
+
59 
+
60  // check if no variables are involved and prop-to
+ +
62  return 0.0;
+
63 
+
64  // set up expression templates wrapping scalars/vecs into vector views
+
65  VectorView<const T_n> n_vec(n);
+
66  VectorView<const T_log_rate> alpha_vec(alpha);
+
67  size_t size = max_size(n, alpha);
+
68 
+
69  // FIXME: first loop size of alpha_vec, second loop if-ed for size==1
+
70  for (size_t i = 0; i < size; i++)
+
71  if (std::numeric_limits<double>::infinity() == alpha_vec[i])
+
72  return LOG_ZERO;
+
73  for (size_t i = 0; i < size; i++)
+
74  if (-std::numeric_limits<double>::infinity() == alpha_vec[i]
+
75  && n_vec[i] != 0)
+
76  return LOG_ZERO;
+
77 
+
78  // return accumulator with gradients
+
79  OperandsAndPartials<T_log_rate> operands_and_partials(alpha);
+
80 
+
81  // FIXME: cache value_of for alpha_vec? faster if only one?
+ +
83  T_partials_return, T_log_rate>
+
84  exp_alpha(length(alpha));
+
85  for (size_t i = 0; i < length(alpha); i++)
+ +
87  exp_alpha[i] = exp(value_of(alpha_vec[i]));
+
88 
+ +
90  for (size_t i = 0; i < size; i++) {
+
91  if (!(alpha_vec[i] == -std::numeric_limits<double>::infinity()
+
92  && n_vec[i] == 0)) {
+ +
94  logp -= lgamma(n_vec[i] + 1.0);
+ +
96  logp += n_vec[i] * value_of(alpha_vec[i]) - exp_alpha[i];
+
97  }
+
98 
+
99  // gradients
+ +
101  operands_and_partials.d_x1[i] += n_vec[i] - exp_alpha[i];
+
102  }
+
103  return operands_and_partials.to_var(logp, alpha);
+
104  }
+
105 
+
106  template <typename T_n,
+
107  typename T_log_rate>
+
108  inline
+ +
110  poisson_log_log(const T_n& n, const T_log_rate& alpha) {
+
111  return poisson_log_log<false>(n, alpha);
+
112  }
+
113  }
+
114 }
+
115 #endif
+ +
return_type< T_log_rate >::type poisson_log_log(const T_n &n, const T_log_rate &alpha)
+
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
const double LOG_ZERO
Definition: constants.hpp:175
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ +
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
fvar< T > multiply_log(const fvar< T > &x1, const fvar< T > &x2)
+ + +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/poisson__log__rng_8hpp.html b/doc/api/html/poisson__log__rng_8hpp.html new file mode 100644 index 00000000000..d8a81275545 --- /dev/null +++ b/doc/api/html/poisson__log__rng_8hpp.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/poisson_log_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
poisson_log_rng.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_less.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/fun/gamma_q.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <boost/random/poisson_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
int stan::math::poisson_log_rng (const double alpha, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/poisson__log__rng_8hpp_source.html b/doc/api/html/poisson__log__rng_8hpp_source.html new file mode 100644 index 00000000000..7b61a1641dd --- /dev/null +++ b/doc/api/html/poisson__log__rng_8hpp_source.html @@ -0,0 +1,170 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/poisson_log_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
poisson_log_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_POISSON_LOG_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_POISSON_LOG_RNG_HPP
+
3 
+ + + + + + + + + +
13 #include <boost/math/special_functions/fpclassify.hpp>
+
14 #include <boost/random/poisson_distribution.hpp>
+
15 #include <boost/random/variate_generator.hpp>
+
16 #include <limits>
+
17 
+
18 namespace stan {
+
19 
+
20  namespace math {
+
21 
+
22  template <class RNG>
+
23  inline int
+
24  poisson_log_rng(const double alpha,
+
25  RNG& rng) {
+
26  using boost::variate_generator;
+
27  using boost::random::poisson_distribution;
+
28 
+
29  static const char* function("stan::math::poisson_log_rng");
+
30  static const double POISSON_MAX_LOG_RATE = 30 * std::log(2);
+
31 
+ + + +
35  using std::exp;
+
36 
+
37  check_not_nan(function, "Log rate parameter", alpha);
+
38  check_less(function, "Log rate parameter", alpha, POISSON_MAX_LOG_RATE);
+
39 
+
40  variate_generator<RNG&, poisson_distribution<> >
+
41  poisson_rng(rng, poisson_distribution<>(exp(alpha)));
+
42  return poisson_rng();
+
43  }
+
44  }
+
45 }
+
46 #endif
+ +
bool check_less(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is strictly less than high.
Definition: check_less.hpp:81
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ + + +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ +
int poisson_log_rng(const double alpha, RNG &rng)
+ +
int poisson_rng(const double lambda, RNG &rng)
Definition: poisson_rng.hpp:25
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/poisson__rng_8hpp.html b/doc/api/html/poisson__rng_8hpp.html new file mode 100644 index 00000000000..84358f350b8 --- /dev/null +++ b/doc/api/html/poisson__rng_8hpp.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/poisson_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
poisson_rng.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/OperandsAndPartials.hpp>
+#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
+#include <stan/math/prim/scal/err/check_less.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <stan/math/prim/scal/fun/gamma_q.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <boost/random/poisson_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <cmath>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
int stan::math::poisson_rng (const double lambda, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/poisson__rng_8hpp_source.html b/doc/api/html/poisson__rng_8hpp_source.html new file mode 100644 index 00000000000..be196a77a99 --- /dev/null +++ b/doc/api/html/poisson__rng_8hpp_source.html @@ -0,0 +1,164 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/poisson_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
poisson_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_POISSON_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_POISSON_RNG_HPP
+
3 
+ + + + + + + + + +
13 #include <boost/math/special_functions/fpclassify.hpp>
+
14 #include <boost/random/poisson_distribution.hpp>
+
15 #include <boost/random/variate_generator.hpp>
+
16 #include <cmath>
+
17 #include <limits>
+
18 
+
19 namespace stan {
+
20 
+
21  namespace math {
+
22 
+
23  template <class RNG>
+
24  inline int
+
25  poisson_rng(const double lambda,
+
26  RNG& rng) {
+
27  using boost::variate_generator;
+
28  using boost::random::poisson_distribution;
+
29 
+
30  static const char* function("stan::math::poisson_rng");
+
31 
+
32  check_not_nan(function, "Rate parameter", lambda);
+
33  check_nonnegative(function, "Rate parameter", lambda);
+
34  check_less(function, "Rate parameter", lambda, POISSON_MAX_RATE);
+
35 
+
36  variate_generator<RNG&, poisson_distribution<> >
+
37  poisson_rng(rng, poisson_distribution<>(lambda));
+
38  return poisson_rng();
+
39  }
+
40  }
+
41 }
+
42 #endif
+ +
bool check_less(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is strictly less than high.
Definition: check_less.hpp:81
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ + + + +
const double POISSON_MAX_RATE
Largest rate parameter allowed in Poisson RNG.
Definition: constants.hpp:72
+ +
int poisson_rng(const double lambda, RNG &rng)
Definition: poisson_rng.hpp:25
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/positive__constrain_8hpp.html b/doc/api/html/positive__constrain_8hpp.html new file mode 100644 index 00000000000..d9530f9dc8b --- /dev/null +++ b/doc/api/html/positive__constrain_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/positive_constrain.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
positive_constrain.hpp File Reference
+
+
+
#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
stan::math::positive_constrain (const T x)
 Return the positive value for the specified unconstrained input. More...
 
template<typename T >
stan::math::positive_constrain (const T x, T &lp)
 Return the positive value for the specified unconstrained input, incrementing the scalar reference with the log absolute Jacobian determinant. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/positive__constrain_8hpp_source.html b/doc/api/html/positive__constrain_8hpp_source.html new file mode 100644 index 00000000000..5bd0f9d38b7 --- /dev/null +++ b/doc/api/html/positive__constrain_8hpp_source.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/positive_constrain.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
positive_constrain.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_POSITIVE_CONSTRAIN_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_POSITIVE_CONSTRAIN_HPP
+
3 
+
4 #include <cmath>
+
5 
+
6 namespace stan {
+
7 
+
8  namespace math {
+
9 
+
20  template <typename T>
+
21  inline
+
22  T positive_constrain(const T x) {
+
23  return exp(x);
+
24  }
+
25 
+
42  template <typename T>
+
43  inline
+
44  T positive_constrain(const T x, T& lp) {
+
45  lp += x;
+
46  return exp(x);
+
47  }
+
48 
+
49 
+
50  }
+
51 
+
52 }
+
53 
+
54 #endif
+
T positive_constrain(const T x)
Return the positive value for the specified unconstrained input.
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/positive__free_8hpp.html b/doc/api/html/positive__free_8hpp.html new file mode 100644 index 00000000000..c7f026295a2 --- /dev/null +++ b/doc/api/html/positive__free_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/positive_free.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
positive_free.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/check_positive.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
stan::math::positive_free (const T y)
 Return the unconstrained value corresponding to the specified positive-constrained value. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/positive__free_8hpp_source.html b/doc/api/html/positive__free_8hpp_source.html new file mode 100644 index 00000000000..2373956008b --- /dev/null +++ b/doc/api/html/positive__free_8hpp_source.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/positive_free.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
positive_free.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_POSITIVE_FREE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_POSITIVE_FREE_HPP
+
3 
+ +
5 #include <cmath>
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
27  template <typename T>
+
28  inline
+
29  T positive_free(const T y) {
+
30  stan::math::check_positive("stan::math::positive_free",
+
31  "Positive variable", y);
+
32  return log(y);
+
33  }
+
34 
+
35  }
+
36 
+
37 }
+
38 
+
39 #endif
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
T positive_free(const T y)
Return the unconstrained value corresponding to the specified positive-constrained value...
+
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/positive__ordered__constrain_8hpp.html b/doc/api/html/positive__ordered__constrain_8hpp.html new file mode 100644 index 00000000000..16c23eba953 --- /dev/null +++ b/doc/api/html/positive__ordered__constrain_8hpp.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/positive_ordered_constrain.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
positive_ordered_constrain.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::positive_ordered_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x)
 Return an increasing positive ordered vector derived from the specified free vector. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::positive_ordered_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, T &lp)
 Return a positive valued, increasing positive ordered vector derived from the specified free vector and increment the specified log probability reference with the log absolute Jacobian determinant of the transform. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/positive__ordered__constrain_8hpp_source.html b/doc/api/html/positive__ordered__constrain_8hpp_source.html new file mode 100644 index 00000000000..bdfd3940be8 --- /dev/null +++ b/doc/api/html/positive__ordered__constrain_8hpp_source.html @@ -0,0 +1,164 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/positive_ordered_constrain.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
positive_ordered_constrain.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_POSITIVE_ORDERED_CONSTRAIN_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_POSITIVE_ORDERED_CONSTRAIN_HPP
+
3 
+ + +
6 #include <cmath>
+
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
21  template <typename T>
+
22  Eigen::Matrix<T, Eigen::Dynamic, 1>
+
23  positive_ordered_constrain(const Eigen::Matrix<T, Eigen::Dynamic, 1>& x) {
+
24  using Eigen::Matrix;
+
25  using Eigen::Dynamic;
+ +
27  using std::exp;
+
28  typedef typename index_type<Matrix<T, Dynamic, 1> >::type size_type;
+
29 
+
30  size_type k = x.size();
+
31  Matrix<T, Dynamic, 1> y(k);
+
32  if (k == 0)
+
33  return y;
+
34  y[0] = exp(x[0]);
+
35  for (size_type i = 1; i < k; ++i)
+
36  y[i] = y[i-1] + exp(x[i]);
+
37  return y;
+
38  }
+
39 
+
52  template <typename T>
+
53  inline
+
54  Eigen::Matrix<T, Eigen::Dynamic, 1>
+
55  positive_ordered_constrain(const Eigen::Matrix<T, Eigen::Dynamic, 1>& x,
+
56  T& lp) {
+
57  using Eigen::Matrix;
+
58  using Eigen::Dynamic;
+ +
60  typedef typename index_type<Matrix<T, Dynamic, 1> >::type size_type;
+
61 
+
62  for (size_type i = 0; i < x.size(); ++i)
+
63  lp += x(i);
+ +
65  }
+
66 
+
67  }
+
68 
+
69 }
+
70 
+
71 #endif
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:19
+
Eigen::Matrix< T, Eigen::Dynamic, 1 > positive_ordered_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x)
Return an increasing positive ordered vector derived from the specified free vector.
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/positive__ordered__free_8hpp.html b/doc/api/html/positive__ordered__free_8hpp.html new file mode 100644 index 00000000000..d19043f5695 --- /dev/null +++ b/doc/api/html/positive__ordered__free_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/positive_ordered_free.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
positive_ordered_free.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::positive_ordered_free (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y)
 Return the vector of unconstrained scalars that transform to the specified positive ordered vector. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/positive__ordered__free_8hpp_source.html b/doc/api/html/positive__ordered__free_8hpp_source.html new file mode 100644 index 00000000000..904f69b0bc6 --- /dev/null +++ b/doc/api/html/positive__ordered__free_8hpp_source.html @@ -0,0 +1,158 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/positive_ordered_free.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
positive_ordered_free.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_POSITIVE_ORDERED_FREE_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_POSITIVE_ORDERED_FREE_HPP
+
3 
+ + + +
7 #include <cmath>
+
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
26  template <typename T>
+
27  Eigen::Matrix<T, Eigen::Dynamic, 1>
+
28  positive_ordered_free(const Eigen::Matrix<T, Eigen::Dynamic, 1>& y) {
+
29  using Eigen::Matrix;
+
30  using Eigen::Dynamic;
+ +
32 
+
33  typedef typename index_type<Matrix<T, Dynamic, 1> >::type size_type;
+
34 
+
35  stan::math::check_positive_ordered("stan::math::positive_ordered_free",
+
36  "Positive ordered variable",
+
37  y);
+
38 
+
39  size_type k = y.size();
+
40  Matrix<T, Dynamic, 1> x(k);
+
41  if (k == 0)
+
42  return x;
+
43  x[0] = log(y[0]);
+
44  for (size_type i = 1; i < k; ++i)
+
45  x[i] = log(y[i] - y[i-1]);
+
46  return x;
+
47  }
+
48 
+
49 
+
50 
+
51  }
+
52 
+
53 }
+
54 
+
55 #endif
+
Eigen::Matrix< T, Eigen::Dynamic, 1 > positive_ordered_free(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y)
Return the vector of unconstrained scalars that transform to the specified positive ordered vector...
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:19
+ + +
bool check_positive_ordered(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &y)
Return true if the specified vector contains non-negative values and is sorted into strictly increasi...
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/precomp__v__vari_8hpp.html b/doc/api/html/precomp__v__vari_8hpp.html new file mode 100644 index 00000000000..36770adc94b --- /dev/null +++ b/doc/api/html/precomp__v__vari_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/rev/core/precomp_v_vari.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
precomp_v_vari.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

class  stan::math::precomp_v_vari
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/precomp__v__vari_8hpp_source.html b/doc/api/html/precomp__v__vari_8hpp_source.html new file mode 100644 index 00000000000..60956f2b9dd --- /dev/null +++ b/doc/api/html/precomp__v__vari_8hpp_source.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/rev/core/precomp_v_vari.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
precomp_v_vari.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_PRECOMP_V_VARI_HPP
+
2 #define STAN_MATH_REV_CORE_PRECOMP_V_VARI_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8  namespace math {
+
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
+ +
The variable implementation base class.
Definition: vari.hpp:28
+ + + + + +
double adj_
The adjoint of this variable, which is the partial derivative of this variable with respect to the ro...
Definition: vari.hpp:42
+
void chain()
Apply the chain rule to this variable based on the variables on which it depends. ...
+
precomp_v_vari(double val, vari *avi, double da)
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/precomp__vv__vari_8hpp.html b/doc/api/html/precomp__vv__vari_8hpp.html new file mode 100644 index 00000000000..cf0f62d3986 --- /dev/null +++ b/doc/api/html/precomp__vv__vari_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/rev/core/precomp_vv_vari.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
precomp_vv_vari.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

class  stan::math::precomp_vv_vari
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/precomp__vv__vari_8hpp_source.html b/doc/api/html/precomp__vv__vari_8hpp_source.html new file mode 100644 index 00000000000..6525d94d5a1 --- /dev/null +++ b/doc/api/html/precomp__vv__vari_8hpp_source.html @@ -0,0 +1,151 @@ + + + + + + +Stan Math Library: stan/math/rev/core/precomp_vv_vari.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
precomp_vv_vari.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_PRECOMP_VV_VARI_HPP
+
2 #define STAN_MATH_REV_CORE_PRECOMP_VV_VARI_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  // use for single precomputed partials
+
11  class precomp_vv_vari : public op_vv_vari {
+
12  protected:
+
13  double da_;
+
14  double db_;
+
15  public:
+
16  precomp_vv_vari(double val,
+
17  vari* avi, vari* bvi,
+
18  double da, double db)
+
19  : op_vv_vari(val, avi, bvi),
+
20  da_(da),
+
21  db_(db) {
+
22  }
+
23  void chain() {
+
24  avi_->adj_ += adj_ * da_;
+
25  bvi_->adj_ += adj_ * db_;
+
26  }
+
27  };
+
28 
+
29  }
+
30 }
+
31 #endif
+ +
The variable implementation base class.
Definition: vari.hpp:28
+
void chain()
Apply the chain rule to this variable based on the variables on which it depends. ...
+ + + + +
precomp_vv_vari(double val, vari *avi, vari *bvi, double da, double db)
+ +
double adj_
The adjoint of this variable, which is the partial derivative of this variable with respect to the ro...
Definition: vari.hpp:42
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/precomp__vvv__vari_8hpp.html b/doc/api/html/precomp__vvv__vari_8hpp.html new file mode 100644 index 00000000000..16ef6695fca --- /dev/null +++ b/doc/api/html/precomp__vvv__vari_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/rev/core/precomp_vvv_vari.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
precomp_vvv_vari.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

class  stan::math::precomp_vvv_vari
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/precomp__vvv__vari_8hpp_source.html b/doc/api/html/precomp__vvv__vari_8hpp_source.html new file mode 100644 index 00000000000..2465c23cc0a --- /dev/null +++ b/doc/api/html/precomp__vvv__vari_8hpp_source.html @@ -0,0 +1,156 @@ + + + + + + +Stan Math Library: stan/math/rev/core/precomp_vvv_vari.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
precomp_vvv_vari.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_PRECOMP_VVV_VARI_HPP
+
2 #define STAN_MATH_REV_CORE_PRECOMP_VVV_VARI_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  // use for single precomputed partials
+
11  class precomp_vvv_vari : public op_vvv_vari {
+
12  protected:
+
13  double da_;
+
14  double db_;
+
15  double dc_;
+
16  public:
+
17  precomp_vvv_vari(double val,
+
18  vari* avi, vari* bvi, vari* cvi,
+
19  double da, double db, double dc)
+
20  : op_vvv_vari(val, avi, bvi, cvi),
+
21  da_(da),
+
22  db_(db),
+
23  dc_(dc) {
+
24  }
+
25  void chain() {
+
26  avi_->adj_ += adj_ * da_;
+
27  bvi_->adj_ += adj_ * db_;
+
28  cvi_->adj_ += adj_ * dc_;
+
29  }
+
30  };
+
31 
+
32  }
+
33 }
+
34 #endif
+
void chain()
Apply the chain rule to this variable based on the variables on which it depends. ...
+ + + + + + + +
The variable implementation base class.
Definition: vari.hpp:28
+
precomp_vvv_vari(double val, vari *avi, vari *bvi, vari *cvi, double da, double db, double dc)
+ + + +
double adj_
The adjoint of this variable, which is the partial derivative of this variable with respect to the ro...
Definition: vari.hpp:42
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/precomputed__gradients_8hpp.html b/doc/api/html/precomputed__gradients_8hpp.html new file mode 100644 index 00000000000..66c507058a3 --- /dev/null +++ b/doc/api/html/precomputed__gradients_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/rev/core/precomputed_gradients.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
precomputed_gradients.hpp File Reference
+
+
+
#include <stan/math/rev/core/vari.hpp>
+#include <stan/math/rev/core/var.hpp>
+#include <algorithm>
+#include <vector>
+#include <stdexcept>
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  stan::math::precomputed_gradients_vari
 A variable implementation taking a sequence of operands and partial derivatives with respect to the operands. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::precomputed_gradients (const double value, const std::vector< var > &operands, const std::vector< double > &gradients)
 This function returns a var for an expression that has the specified value, vector of operands, and vector of partial derivatives of value with respect to the operands. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/precomputed__gradients_8hpp_source.html b/doc/api/html/precomputed__gradients_8hpp_source.html new file mode 100644 index 00000000000..955424dcabf --- /dev/null +++ b/doc/api/html/precomputed__gradients_8hpp_source.html @@ -0,0 +1,186 @@ + + + + + + +Stan Math Library: stan/math/rev/core/precomputed_gradients.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
precomputed_gradients.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_PRECOMPUTED_GRADIENTS_HPP
+
2 #define STAN_MATH_REV_CORE_PRECOMPUTED_GRADIENTS_HPP
+
3 
+ + +
6 #include <algorithm>
+
7 #include <vector>
+
8 #include <stdexcept>
+
9 
+
10 namespace stan {
+
11 
+
12  namespace math {
+
13 
+ +
22  protected:
+
23  const size_t size_;
+ +
25  double* gradients_;
+
26 
+
27  public:
+ +
38  size_t size,
+
39  vari** varis,
+
40  double* gradients)
+
41  : vari(val),
+
42  size_(size),
+
43  varis_(varis),
+
44  gradients_(gradients) {
+
45  }
+
46 
+ +
59  const std::vector<var>& vars,
+
60  const std::vector<double>& gradients)
+
61  : vari(val),
+
62  size_(vars.size()),
+
63  varis_(ChainableStack::memalloc_
+
64  .alloc_array<vari*>(vars.size())),
+
65  gradients_(ChainableStack::memalloc_
+
66  .alloc_array<double>(vars.size())) {
+
67  if (vars.size() != gradients.size())
+
68  throw std::invalid_argument("sizes of vars and gradients"
+
69  " do not match");
+
70  for (size_t i = 0; i < vars.size(); ++i)
+
71  varis_[i] = vars[i].vi_;
+
72  std::copy(gradients.begin(), gradients.end(), gradients_);
+
73  }
+
74 
+
79  void chain() {
+
80  for (size_t i = 0; i < size_; ++i)
+
81  varis_[i]->adj_ += adj_ * gradients_[i];
+
82  }
+
83  };
+
84 
+
85 
+
98  var precomputed_gradients(const double value,
+
99  const std::vector<var>& operands,
+
100  const std::vector<double>& gradients) {
+
101  return var(new precomputed_gradients_vari(value, operands, gradients));
+
102  }
+
103  }
+
104 }
+
105 #endif
+
var precomputed_gradients(const double value, const std::vector< var > &operands, const std::vector< double > &gradients)
This function returns a var for an expression that has the specified value, vector of operands...
+ + + +
The variable implementation base class.
Definition: vari.hpp:28
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+ +
A variable implementation taking a sequence of operands and partial derivatives with respect to the o...
+
precomputed_gradients_vari(double val, const std::vector< var > &vars, const std::vector< double > &gradients)
Construct a precomputed vari with the specified value, operands, and gradients.
+
void invalid_argument(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw an invalid_argument exception with a consistently formatted message.
+ +
void chain()
Implements the chain rule for this variable, using the prestored operands and gradient.
+
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+ +
double adj_
The adjoint of this variable, which is the partial derivative of this variable with respect to the ro...
Definition: vari.hpp:42
+
precomputed_gradients_vari(double val, size_t size, vari **varis, double *gradients)
Construct a precomputed vari with the specified value, operands, and gradients.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2arr_2fun_2dot__self_8hpp.html b/doc/api/html/prim_2arr_2fun_2dot__self_8hpp.html new file mode 100644 index 00000000000..92901bc2db9 --- /dev/null +++ b/doc/api/html/prim_2arr_2fun_2dot__self_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/fun/dot_self.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
dot_self.hpp File Reference
+
+
+
#include <vector>
+#include <cstddef>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + +

+Functions

double stan::math::dot_self (const std::vector< double > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2arr_2fun_2dot__self_8hpp_source.html b/doc/api/html/prim_2arr_2fun_2dot__self_8hpp_source.html new file mode 100644 index 00000000000..b67edd97822 --- /dev/null +++ b/doc/api/html/prim_2arr_2fun_2dot__self_8hpp_source.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/fun/dot_self.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
dot_self.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_ARR_FUN_DOT_SELF_HPP
+
2 #define STAN_MATH_PRIM_ARR_FUN_DOT_SELF_HPP
+
3 
+
4 #include <vector>
+
5 #include <cstddef>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  // x' * x
+
11  inline double dot_self(const std::vector<double>& x) {
+
12  double sum = 0.0;
+
13  for (size_t i = 0; i < x.size(); ++i)
+
14  sum += x[i] * x[i];
+
15  return sum;
+
16  }
+
17 
+
18  }
+
19 }
+
20 
+
21 #endif
+
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+
fvar< T > dot_self(const Eigen::Matrix< fvar< T >, R, C > &v)
Definition: dot_self.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2arr_2fun_2log__sum__exp_8hpp.html b/doc/api/html/prim_2arr_2fun_2log__sum__exp_8hpp.html new file mode 100644 index 00000000000..28609e15d0e --- /dev/null +++ b/doc/api/html/prim_2arr_2fun_2log__sum__exp_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/fun/log_sum_exp.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_sum_exp.hpp File Reference
+
+
+
#include <cmath>
+#include <cstdlib>
+#include <limits>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

double stan::math::log_sum_exp (const std::vector< double > &x)
 Return the log of the sum of the exponentiated values of the specified sequence of values. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2arr_2fun_2log__sum__exp_8hpp_source.html b/doc/api/html/prim_2arr_2fun_2log__sum__exp_8hpp_source.html new file mode 100644 index 00000000000..1b241bb8735 --- /dev/null +++ b/doc/api/html/prim_2arr_2fun_2log__sum__exp_8hpp_source.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/fun/log_sum_exp.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_sum_exp.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_ARR_FUN_LOG_SUM_EXP_HPP
+
2 #define STAN_MATH_PRIM_ARR_FUN_LOG_SUM_EXP_HPP
+
3 
+
4 #include <cmath>
+
5 #include <cstdlib>
+
6 #include <limits>
+
7 #include <vector>
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
24  double log_sum_exp(const std::vector<double>& x) {
+
25  using std::numeric_limits;
+
26  using std::log;
+
27  using std::exp;
+
28  double max = -numeric_limits<double>::infinity();
+
29  for (size_t ii = 0; ii < x.size(); ii++)
+
30  if (x[ii] > max)
+
31  max = x[ii];
+
32 
+
33  double sum = 0.0;
+
34  for (size_t ii = 0; ii < x.size(); ii++)
+
35  if (x[ii] != -numeric_limits<double>::infinity())
+
36  sum += exp(x[ii] - max);
+
37 
+
38  return max + log(sum);
+
39  }
+
40 
+
41  }
+
42 }
+
43 
+
44 #endif
+
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
fvar< T > log_sum_exp(const std::vector< fvar< T > > &v)
Definition: log_sum_exp.hpp:14
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
int max(const std::vector< int > &x)
Returns the maximum coefficient in the specified column vector.
Definition: max.hpp:21
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2arr_2fun_2sum_8hpp.html b/doc/api/html/prim_2arr_2fun_2sum_8hpp.html new file mode 100644 index 00000000000..2e3cf8f085b --- /dev/null +++ b/doc/api/html/prim_2arr_2fun_2sum_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/fun/sum.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
sum.hpp File Reference
+
+
+
#include <cstddef>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
stan::math::sum (const std::vector< T > &xs)
 Return the sum of the values in the specified standard vector. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2arr_2fun_2sum_8hpp_source.html b/doc/api/html/prim_2arr_2fun_2sum_8hpp_source.html new file mode 100644 index 00000000000..8df94acf34e --- /dev/null +++ b/doc/api/html/prim_2arr_2fun_2sum_8hpp_source.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/fun/sum.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
sum.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_ARR_FUN_SUM_HPP
+
2 #define STAN_MATH_PRIM_ARR_FUN_SUM_HPP
+
3 
+
4 #include <cstddef>
+
5 #include <vector>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
17  template <typename T>
+
18  inline T sum(const std::vector<T>& xs) {
+
19  if (xs.size() == 0) return 0;
+
20  T sum(xs[0]);
+
21  for (size_t i = 1; i < xs.size(); ++i)
+
22  sum += xs[i];
+
23  return sum;
+
24  }
+
25 
+
26  }
+
27 }
+
28 #endif
+
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2arr_2functor_2coupled__ode__system_8hpp.html b/doc/api/html/prim_2arr_2functor_2coupled__ode__system_8hpp.html new file mode 100644 index 00000000000..490acc11629 --- /dev/null +++ b/doc/api/html/prim_2arr_2functor_2coupled__ode__system_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/functor/coupled_ode_system.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
coupled_ode_system.hpp File Reference
+
+
+
#include <stan/math/prim/mat/err/check_matching_sizes.hpp>
+#include <ostream>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + + +

+Classes

struct  stan::math::coupled_ode_system< F, T1, T2 >
 Base template class for a coupled ordinary differential equation system, which adds sensitivities to the base system. More...
 
struct  stan::math::coupled_ode_system< F, double, double >
 The coupled ode system for known initial values and known parameters. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2arr_2functor_2coupled__ode__system_8hpp_source.html b/doc/api/html/prim_2arr_2functor_2coupled__ode__system_8hpp_source.html new file mode 100644 index 00000000000..83b62b32ae2 --- /dev/null +++ b/doc/api/html/prim_2arr_2functor_2coupled__ode__system_8hpp_source.html @@ -0,0 +1,205 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/functor/coupled_ode_system.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
coupled_ode_system.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_ARR_FUNCTOR_COUPLED_ODE_SYSTEM_HPP
+
2 #define STAN_MATH_PRIM_ARR_FUNCTOR_COUPLED_ODE_SYSTEM_HPP
+
3 
+ +
5 #include <ostream>
+
6 #include <vector>
+
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
25  template <typename F, typename T1, typename T2>
+ +
27  };
+
28 
+
29 
+
40  template <typename F>
+
41  struct coupled_ode_system<F, double, double> {
+
42  const F& f_;
+
43  const std::vector<double>& y0_dbl_;
+
44  const std::vector<double>& theta_dbl_;
+
45  const std::vector<double>& x_;
+
46  const std::vector<int>& x_int_;
+
47  const int N_;
+
48  const int M_;
+
49  const int size_;
+
50  std::ostream* msgs_;
+
51 
+
64  coupled_ode_system(const F& f,
+
65  const std::vector<double>& y0,
+
66  const std::vector<double>& theta,
+
67  const std::vector<double>& x,
+
68  const std::vector<int>& x_int,
+
69  std::ostream* msgs)
+
70  : f_(f),
+
71  y0_dbl_(y0),
+
72  theta_dbl_(theta),
+
73  x_(x),
+
74  x_int_(x_int),
+
75  N_(y0.size()),
+
76  M_(theta.size()),
+
77  size_(N_),
+
78  msgs_(msgs) {
+
79  }
+
80 
+
96  void operator()(const std::vector<double>& y,
+
97  std::vector<double>& dy_dt,
+
98  double t) {
+
99  dy_dt = f_(t, y, theta_dbl_, x_, x_int_, msgs_);
+
100  stan::math::check_matching_sizes("coupled_ode_system",
+
101  "y", y,
+
102  "dy_dt", dy_dt);
+
103  }
+
104 
+
110  int size() const {
+
111  return size_;
+
112  }
+
113 
+
126  std::vector<double> initial_state() {
+
127  std::vector<double> state(size_, 0.0);
+
128  for (int n = 0; n < N_; n++)
+
129  state[n] = y0_dbl_[n];
+
130  return state;
+
131  }
+
132 
+
143  std::vector<std::vector<double> >
+
144  decouple_states(const std::vector<std::vector<double> >& y) {
+
145  return y;
+
146  }
+
147  };
+
148 
+
149  }
+
150 
+
151 }
+
152 
+
153 #endif
+
void operator()(const std::vector< double > &y, std::vector< double > &dy_dt, double t)
Calculates the derivative of the coupled ode system with respect to the specified state at the specif...
+ + + + + + + + +
int M_
+
std::vector< double > initial_state()
Returns the initial state of the coupled system, which is identical to the base ODE original state in...
+
size_t size_
Definition: dot_self.hpp:18
+
int size() const
Returns the size of the coupled system.
+
bool check_matching_sizes(const char *function, const char *name1, const T_y1 &y1, const char *name2, const T_y2 &y2)
Return true if two structures at the same size.
+
coupled_ode_system(const F &f, const std::vector< double > &y0, const std::vector< double > &theta, const std::vector< double > &x, const std::vector< int > &x_int, std::ostream *msgs)
Construct the coupled ODE system from the base system function, initial state, parameters, data and a stream for messages.
+ +
std::vector< std::vector< double > > decouple_states(const std::vector< std::vector< double > > &y)
Returns the base portion of the coupled state.
+ +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
Base template class for a coupled ordinary differential equation system, which adds sensitivities to ...
+
int N_
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2_l_d_l_t__factor_8hpp.html b/doc/api/html/prim_2mat_2fun_2_l_d_l_t__factor_8hpp.html new file mode 100644 index 00000000000..4f6fa77789a --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2_l_d_l_t__factor_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/LDLT_factor.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
LDLT_factor.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <boost/shared_ptr.hpp>
+#include <stan/math/prim/mat/err/check_square.hpp>
+#include <stan/math/prim/scal/fun/is_nan.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Classes

class  stan::math::LDLT_factor< T, R, C >
 
class  stan::math::LDLT_factor< T, R, C >
 LDLT_factor is a thin wrapper on Eigen::LDLT to allow for reusing factorizations and efficient autodiff of things like log determinants and solutions to linear systems. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2_l_d_l_t__factor_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2_l_d_l_t__factor_8hpp_source.html new file mode 100644 index 00000000000..e7f315dddf1 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2_l_d_l_t__factor_8hpp_source.html @@ -0,0 +1,229 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/LDLT_factor.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
LDLT_factor.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_LDLT_FACTOR_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_LDLT_FACTOR_HPP
+
3 
+ +
5 #include <boost/shared_ptr.hpp>
+ + +
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
13  // This class is conceptually similar to the corresponding Eigen class
+
14  // Any spd matrix A can be decomposed as LDL' where L is unit
+
15  // lower-triangular and D is diagonal with positive diagonal elements
+
16 
+
17  template<typename T, int R, int C>
+
18  class LDLT_factor;
+
19 
+
57  template<int R, int C, typename T>
+
58  class LDLT_factor<T, R, C> {
+
59  public:
+ +
61  : N_(0), _ldltP(new Eigen::LDLT< Eigen::Matrix<T, R, C> >()) {}
+
62 
+
63  explicit LDLT_factor(const Eigen::Matrix<T, R, C> &A)
+
64  : N_(0), _ldltP(new Eigen::LDLT< Eigen::Matrix<T, R, C> >()) {
+
65  compute(A);
+
66  }
+
67 
+
68  inline void compute(const Eigen::Matrix<T, R, C> &A) {
+
69  stan::math::check_square("LDLT_factor", "A", A);
+
70  N_ = A.rows();
+
71  _ldltP->compute(A);
+
72  }
+
73 
+
74  inline bool success() const {
+
75  using stan::math::is_nan;
+
76  // bool ret;
+
77  // ret = _ldltP->info() == Eigen::Success;
+
78  // ret = ret && _ldltP->isPositive();
+
79  // ret = ret && (_ldltP->vectorD().array() > 0).all();
+
80  // return ret;
+
81 
+
82  if (_ldltP->info() != Eigen::Success)
+
83  return false;
+
84  if (!(_ldltP->isPositive()))
+
85  return false;
+
86  Eigen::Matrix<T, Eigen::Dynamic, 1> ldltP_diag(_ldltP->vectorD());
+
87  for (int i = 0; i < ldltP_diag.size(); ++i)
+
88  if (ldltP_diag(i) <= 0 || is_nan(ldltP_diag(i)))
+
89  return false;
+
90  return true;
+
91  }
+
92 
+
93  inline T log_abs_det() const {
+
94  return _ldltP->vectorD().array().log().sum();
+
95  }
+
96 
+
97  inline void inverse(Eigen::Matrix<T, R, C> &invA) const {
+
98  invA.setIdentity(N_);
+
99  _ldltP->solveInPlace(invA);
+
100  }
+
101 
+
102  template<typename Rhs>
+
103  inline const
+
104  Eigen::internal::solve_retval<Eigen::LDLT< Eigen::Matrix<T, R, C> >, Rhs>
+
105  solve(const Eigen::MatrixBase<Rhs>& b) const {
+
106  return _ldltP->solve(b);
+
107  }
+
108 
+
109  inline Eigen::Matrix<T, R, C>
+
110  solveRight(const Eigen::Matrix<T, R, C> &B) const {
+
111  return _ldltP->solve(B.transpose()).transpose();
+
112  }
+
113 
+
114  inline Eigen::Matrix<T, Eigen::Dynamic, 1> vectorD() const {
+
115  return _ldltP->vectorD();
+
116  }
+
117 
+
118  inline Eigen::LDLT<Eigen::Matrix<T, R, C> > matrixLDLT() const {
+
119  return _ldltP->matrixLDLT();
+
120  }
+
121 
+
122  inline size_t rows() const { return N_; }
+
123  inline size_t cols() const { return N_; }
+
124 
+
125  typedef size_t size_type;
+
126  typedef double value_type;
+
127 
+
128  size_t N_;
+
129  boost::shared_ptr< Eigen::LDLT< Eigen::Matrix<T, R, C> > > _ldltP;
+
130  };
+
131  }
+
132 }
+
133 #endif
+
void inverse(Eigen::Matrix< T, R, C > &invA) const
Definition: LDLT_factor.hpp:97
+
const Eigen::internal::solve_retval< Eigen::LDLT< Eigen::Matrix< T, R, C > >, Rhs > solve(const Eigen::MatrixBase< Rhs > &b) const
+ + +
boost::shared_ptr< Eigen::LDLT< Eigen::Matrix< T, R, C > > > _ldltP
+ +
LDLT_factor(const Eigen::Matrix< T, R, C > &A)
Definition: LDLT_factor.hpp:63
+
Eigen::Matrix< T, R, C > solveRight(const Eigen::Matrix< T, R, C > &B) const
+ + +
Eigen::LDLT< Eigen::Matrix< T, R, C > > matrixLDLT() const
+
boost::shared_ptr< Eigen::LDLT< Eigen::Matrix< double, R1, C1 > > > _ldltP
This share_ptr is used to prevent copying the LDLT factorizations for mdivide_left_ldlt(ldltA, b) when ldltA is a LDLT_factor<double>.
+
Eigen::Matrix< T, Eigen::Dynamic, 1 > vectorD() const
+ + + + + +
void compute(const Eigen::Matrix< T, R, C > &A)
Definition: LDLT_factor.hpp:68
+
int is_nan(const fvar< T > &x)
Returns 1 if the input's value is NaN and 0 otherwise.
Definition: is_nan.hpp:22
+
Eigen::Matrix< T, C, R > transpose(const Eigen::Matrix< T, R, C > &m)
Definition: transpose.hpp:12
+
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ +
int N_
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2cholesky__decompose_8hpp.html b/doc/api/html/prim_2mat_2fun_2cholesky__decompose_8hpp.html new file mode 100644 index 00000000000..852fc5dfedb --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2cholesky__decompose_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/cholesky_decompose.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
cholesky_decompose.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::cholesky_decompose (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
 Return the lower-triangular Cholesky factor (i.e., matrix square root) of the specified square, symmetric matrix. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2cholesky__decompose_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2cholesky__decompose_8hpp_source.html new file mode 100644 index 00000000000..aee57e1fd11 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2cholesky__decompose_8hpp_source.html @@ -0,0 +1,143 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/cholesky_decompose.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
cholesky_decompose.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_CHOLESKY_DECOMPOSE_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_CHOLESKY_DECOMPOSE_HPP
+
3 
+ + + + +
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
23  template <typename T>
+
24  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
25  cholesky_decompose(const Eigen::Matrix
+
26  <T, Eigen::Dynamic, Eigen::Dynamic>& m) {
+
27  stan::math::check_square("cholesky_decompose", "m", m);
+
28  stan::math::check_symmetric("cholesky_decompose", "m", m);
+
29  Eigen::LLT<Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> >
+
30  llt(m.rows());
+
31  llt.compute(m);
+
32  stan::math::check_pos_definite("cholesky_decompose", "m", llt);
+
33  return llt.matrixL();
+
34  }
+
35 
+
36  }
+
37 }
+
38 #endif
+
bool check_symmetric(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is symmetric.
+ +
bool check_pos_definite(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified square, symmetric matrix is positive definite.
+ +
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > cholesky_decompose(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
Return the lower-triangular Cholesky factor (i.e., matrix square root) of the specified square...
+
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2columns__dot__product_8hpp.html b/doc/api/html/prim_2mat_2fun_2columns__dot__product_8hpp.html new file mode 100644 index 00000000000..c2ffd380163 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2columns__dot__product_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/columns_dot_product.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
columns_dot_product.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<int R1, int C1, int R2, int C2>
Eigen::Matrix< double, 1, C1 > stan::math::columns_dot_product (const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)
 Returns the dot product of the specified vectors. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2columns__dot__product_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2columns__dot__product_8hpp_source.html new file mode 100644 index 00000000000..b6188974c3a --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2columns__dot__product_8hpp_source.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/columns_dot_product.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
columns_dot_product.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_COLUMNS_DOT_PRODUCT_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_COLUMNS_DOT_PRODUCT_HPP
+
3 
+ + + +
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
20  template<int R1, int C1, int R2, int C2>
+
21  inline Eigen::Matrix<double, 1, C1>
+
22  columns_dot_product(const Eigen::Matrix<double, R1, C1>& v1,
+
23  const Eigen::Matrix<double, R2, C2>& v2) {
+
24  stan::math::check_matching_sizes("columns_dot_product",
+
25  "v1", v1,
+
26  "v2", v2);
+
27  Eigen::Matrix<double, 1, C1> ret(1, v1.cols());
+
28  for (size_type j = 0; j < v1.cols(); ++j) {
+
29  ret(j) = v1.col(j).dot(v2.col(j));
+
30  }
+
31  return ret;
+
32  }
+
33 
+
34  }
+
35 }
+
36 #endif
+
Eigen::Matrix< fvar< T >, 1, C1 > columns_dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
+ +
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
bool check_matching_sizes(const char *function, const char *name1, const T_y1 &y1, const char *name2, const T_y2 &y2)
Return true if two structures at the same size.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2columns__dot__self_8hpp.html b/doc/api/html/prim_2mat_2fun_2columns__dot__self_8hpp.html new file mode 100644 index 00000000000..de22d170f3f --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2columns__dot__self_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/columns_dot_self.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
columns_dot_self.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T , int R, int C>
Eigen::Matrix< T, 1, C > stan::math::columns_dot_self (const Eigen::Matrix< T, R, C > &x)
 Returns the dot product of each column of a matrix with itself. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2columns__dot__self_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2columns__dot__self_8hpp_source.html new file mode 100644 index 00000000000..8aa32e0e611 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2columns__dot__self_8hpp_source.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/columns_dot_self.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
columns_dot_self.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_COLUMNS_DOT_SELF_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_COLUMNS_DOT_SELF_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
14  template<typename T, int R, int C>
+
15  inline Eigen::Matrix<T, 1, C>
+
16  columns_dot_self(const Eigen::Matrix<T, R, C>& x) {
+
17  return x.colwise().squaredNorm();
+
18  }
+
19 
+
20  }
+
21 }
+
22 #endif
+ +
Eigen::Matrix< fvar< T >, 1, C > columns_dot_self(const Eigen::Matrix< fvar< T >, R, C > &x)
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2crossprod_8hpp.html b/doc/api/html/prim_2mat_2fun_2crossprod_8hpp.html new file mode 100644 index 00000000000..b8ad47c5d5a --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2crossprod_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/crossprod.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
crossprod.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

matrix_d stan::math::crossprod (const matrix_d &M)
 Returns the result of pre-multiplying a matrix by its own transpose. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2crossprod_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2crossprod_8hpp_source.html new file mode 100644 index 00000000000..e9cfce659cd --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2crossprod_8hpp_source.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/crossprod.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
crossprod.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_CROSSPROD_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_CROSSPROD_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
16  inline matrix_d
+
17  crossprod(const matrix_d& M) {
+
18  return tcrossprod(static_cast<matrix_d>(M.transpose()));
+
19  }
+
20 
+
21  }
+
22 }
+
23 #endif
+ +
Eigen::Matrix< fvar< T >, R, R > tcrossprod(const Eigen::Matrix< fvar< T >, R, C > &m)
Definition: tcrossprod.hpp:17
+
Eigen::Matrix< fvar< T >, C, C > crossprod(const Eigen::Matrix< fvar< T >, R, C > &m)
Definition: crossprod.hpp:17
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > matrix_d
Type for matrix of double values.
Definition: typedefs.hpp:23
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2determinant_8hpp.html b/doc/api/html/prim_2mat_2fun_2determinant_8hpp.html new file mode 100644 index 00000000000..5876143545b --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2determinant_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/determinant.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
determinant.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T , int R, int C>
stan::math::determinant (const Eigen::Matrix< T, R, C > &m)
 Returns the determinant of the specified square matrix. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2determinant_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2determinant_8hpp_source.html new file mode 100644 index 00000000000..41e55b33f04 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2determinant_8hpp_source.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/determinant.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
determinant.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_DETERMINANT_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_DETERMINANT_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
17  template <typename T, int R, int C>
+
18  inline T determinant(const Eigen::Matrix<T, R, C>& m) {
+
19  stan::math::check_square("determinant", "m", m);
+
20  return m.determinant();
+
21  }
+
22 
+
23  }
+
24 }
+
25 #endif
+
fvar< T > determinant(const Eigen::Matrix< fvar< T >, R, C > &m)
Definition: determinant.hpp:21
+ +
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2divide_8hpp.html b/doc/api/html/prim_2mat_2fun_2divide_8hpp.html new file mode 100644 index 00000000000..d309c866719 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2divide_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/divide.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
divide.hpp File Reference
+
+
+
#include <boost/type_traits/is_arithmetic.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<int R, int C, typename T >
boost::enable_if_c
+< boost::is_arithmetic< T >
+::value, Eigen::Matrix< double,
+R, C > >::type 
stan::math::divide (const Eigen::Matrix< double, R, C > &m, T c)
 Return specified matrix divided by specified scalar. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2divide_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2divide_8hpp_source.html new file mode 100644 index 00000000000..f676da392f5 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2divide_8hpp_source.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/divide.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
divide.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_DIVIDE_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_DIVIDE_HPP
+
3 
+
4 #include <boost/type_traits/is_arithmetic.hpp>
+
5 #include <boost/utility/enable_if.hpp>
+ +
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
19  template <int R, int C, typename T>
+
20  inline
+
21  typename boost::enable_if_c<boost::is_arithmetic<T>::value,
+
22  Eigen::Matrix<double, R, C> >::type
+
23  divide(const Eigen::Matrix<double, R, C>& m,
+
24  T c) {
+
25  return m / c;
+
26  }
+
27 
+
28  }
+
29 }
+
30 #endif
+
stan::return_type< T1, T2 >::type divide(const T1 &v, const T2 &c)
Definition: divide.hpp:17
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2dot__product_8hpp.html b/doc/api/html/prim_2mat_2fun_2dot__product_8hpp.html new file mode 100644 index 00000000000..9a093f0071f --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2dot__product_8hpp.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/dot_product.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
dot_product.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + +

+Functions

template<int R1, int C1, int R2, int C2>
double stan::math::dot_product (const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)
 Returns the dot product of the specified vectors. More...
 
double stan::math::dot_product (const double *v1, const double *v2, size_t length)
 Returns the dot product of the specified arrays of doubles. More...
 
double stan::math::dot_product (const std::vector< double > &v1, const std::vector< double > &v2)
 Returns the dot product of the specified arrays of doubles. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2dot__product_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2dot__product_8hpp_source.html new file mode 100644 index 00000000000..84ba98b4835 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2dot__product_8hpp_source.html @@ -0,0 +1,154 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/dot_product.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
dot_product.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_DOT_PRODUCT_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_DOT_PRODUCT_HPP
+
3 
+ + + +
7 #include <vector>
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
21  template<int R1, int C1, int R2, int C2>
+
22  inline double dot_product(const Eigen::Matrix<double, R1, C1>& v1,
+
23  const Eigen::Matrix<double, R2, C2>& v2) {
+
24  stan::math::check_vector("dot_product", "v1", v1);
+
25  stan::math::check_vector("dot_product", "v2", v2);
+ +
27  "v1", v1,
+
28  "v2", v2);
+
29  return v1.dot(v2);
+
30  }
+
37  inline double dot_product(const double* v1, const double* v2,
+
38  size_t length) {
+
39  double result = 0;
+
40  for (size_t i = 0; i < length; i++)
+
41  result += v1[i] * v2[i];
+
42  return result;
+
43  }
+
50  inline double dot_product(const std::vector<double>& v1,
+
51  const std::vector<double>& v2) {
+ +
53  "v1", v1,
+
54  "v2", v2);
+
55  return dot_product(&v1[0], &v2[0], v1.size());
+
56  }
+
57 
+
58  }
+
59 }
+
60 #endif
+
bool check_vector(const char *function, const char *name, const Eigen::Matrix< T, R, C > &x)
Return true if the matrix is either a row vector or column vector.
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+ +
bool check_matching_sizes(const char *function, const char *name1, const T_y1 &y1, const char *name2, const T_y2 &y2)
Return true if two structures at the same size.
+
fvar< T > dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
Definition: dot_product.hpp:20
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2dot__self_8hpp.html b/doc/api/html/prim_2mat_2fun_2dot__self_8hpp.html new file mode 100644 index 00000000000..853fac31a5a --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2dot__self_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/dot_self.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
dot_self.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<int R, int C>
double stan::math::dot_self (const Eigen::Matrix< double, R, C > &v)
 Returns the dot product of the specified vector with itself. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2dot__self_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2dot__self_8hpp_source.html new file mode 100644 index 00000000000..a0e6ac77595 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2dot__self_8hpp_source.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/dot_self.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
dot_self.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_DOT_SELF_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_DOT_SELF_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
17  template <int R, int C>
+
18  inline double dot_self(const Eigen::Matrix<double, R, C>& v) {
+
19  stan::math::check_vector("dot_self", "v", v);
+
20  return v.squaredNorm();
+
21  }
+
22 
+
23  }
+
24 }
+
25 #endif
+
bool check_vector(const char *function, const char *name, const Eigen::Matrix< T, R, C > &x)
Return true if the matrix is either a row vector or column vector.
+
fvar< T > dot_self(const Eigen::Matrix< fvar< T >, R, C > &v)
Definition: dot_self.hpp:16
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2exp_8hpp.html b/doc/api/html/prim_2mat_2fun_2exp_8hpp.html new file mode 100644 index 00000000000..0be942736db --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2exp_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/exp.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
exp.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

template<typename T , int Rows, int Cols>
Eigen::Matrix< T, Rows, Cols > stan::math::exp (const Eigen::Matrix< T, Rows, Cols > &m)
 Return the element-wise exponentiation of the matrix or vector. More...
 
template<int Rows, int Cols>
Eigen::Matrix< double, Rows, Cols > stan::math::exp (const Eigen::Matrix< double, Rows, Cols > &m)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2exp_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2exp_8hpp_source.html new file mode 100644 index 00000000000..dd935a6fb38 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2exp_8hpp_source.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/exp.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
exp.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_EXP_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_EXP_HPP
+
3 
+ +
5 #include <boost/math/special_functions/fpclassify.hpp>
+
6 #include <limits>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
17  template<typename T, int Rows, int Cols>
+
18  inline Eigen::Matrix<T, Rows, Cols>
+
19  exp(const Eigen::Matrix<T, Rows, Cols>& m) {
+
20  return m.array().exp().matrix();
+
21  }
+
22 
+
23  // FIXME:
+
24  // specialization not needed once Eigen fixes issue:
+
25  // http:// eigen.tuxfamily.org/bz/show_bug.cgi?id=859
+
26  template<int Rows, int Cols>
+
27  inline Eigen::Matrix<double, Rows, Cols>
+
28  exp(const Eigen::Matrix<double, Rows, Cols>& m) {
+
29  Eigen::Matrix<double, Rows, Cols> mat = m.array().exp().matrix();
+
30  for (int i = 0, size_ = mat.size(); i < size_; i++)
+
31  if (boost::math::isnan(m(i)))
+
32  mat(i) = std::numeric_limits<double>::quiet_NaN();
+
33  return mat;
+
34  }
+
35 
+
36  }
+
37 }
+
38 #endif
+
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
size_t size_
Definition: dot_self.hpp:18
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2inverse_8hpp.html b/doc/api/html/prim_2mat_2fun_2inverse_8hpp.html new file mode 100644 index 00000000000..d4c011cbe30 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2inverse_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/inverse.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inverse.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T , int R, int C>
Eigen::Matrix< T, R, C > stan::math::inverse (const Eigen::Matrix< T, R, C > &m)
 Returns the inverse of the specified matrix. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2inverse_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2inverse_8hpp_source.html new file mode 100644 index 00000000000..07980e9f1af --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2inverse_8hpp_source.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/inverse.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inverse.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_INVERSE_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_INVERSE_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
15  template <typename T, int R, int C>
+
16  inline
+
17  Eigen::Matrix<T, R, C>
+
18  inverse(const Eigen::Matrix<T, R, C>& m) {
+
19  stan::math::check_square("inverse", "m", m);
+
20  return m.inverse();
+
21  }
+
22 
+
23  }
+
24 }
+
25 #endif
+
Eigen::Matrix< fvar< T >, R, C > inverse(const Eigen::Matrix< fvar< T >, R, C > &m)
Definition: inverse.hpp:20
+ +
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2log_8hpp.html b/doc/api/html/prim_2mat_2fun_2log_8hpp.html new file mode 100644 index 00000000000..1ba2d6ddece --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2log_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T , int Rows, int Cols>
Eigen::Matrix< T, Rows, Cols > stan::math::log (const Eigen::Matrix< T, Rows, Cols > &m)
 Return the element-wise logarithm of the matrix or vector. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2log_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2log_8hpp_source.html new file mode 100644 index 00000000000..68b30976f65 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2log_8hpp_source.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_LOG_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_LOG_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
15  template<typename T, int Rows, int Cols>
+
16  inline Eigen::Matrix<T, Rows, Cols>
+
17  log(const Eigen::Matrix<T, Rows, Cols>& m) {
+
18  return m.array().log().matrix();
+
19  }
+
20 
+
21 
+
22  }
+
23 }
+
24 #endif
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2log__determinant_8hpp.html b/doc/api/html/prim_2mat_2fun_2log__determinant_8hpp.html new file mode 100644 index 00000000000..a7888473117 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2log__determinant_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/log_determinant.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_determinant.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T , int R, int C>
stan::math::log_determinant (const Eigen::Matrix< T, R, C > &m)
 Returns the log absolute determinant of the specified square matrix. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2log__determinant_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2log__determinant_8hpp_source.html new file mode 100644 index 00000000000..378f87ef4df --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2log__determinant_8hpp_source.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/log_determinant.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_determinant.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_LOG_DETERMINANT_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_LOG_DETERMINANT_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
17  template <typename T, int R, int C>
+
18  inline T log_determinant(const Eigen::Matrix<T, R, C>& m) {
+
19  stan::math::check_square("log_determinant", "m", m);
+
20  return m.colPivHouseholderQr().logAbsDeterminant();
+
21  }
+
22 
+
23  }
+
24 }
+
25 #endif
+
fvar< T > log_determinant(const Eigen::Matrix< fvar< T >, R, C > &m)
+ +
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2log__determinant__ldlt_8hpp.html b/doc/api/html/prim_2mat_2fun_2log__determinant__ldlt_8hpp.html new file mode 100644 index 00000000000..aaf92670c8d --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2log__determinant__ldlt_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/log_determinant_ldlt.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_determinant_ldlt.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<int R, int C, typename T >
stan::math::log_determinant_ldlt (stan::math::LDLT_factor< T, R, C > &A)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2log__determinant__ldlt_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2log__determinant__ldlt_8hpp_source.html new file mode 100644 index 00000000000..f03dd8e716b --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2log__determinant__ldlt_8hpp_source.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/log_determinant_ldlt.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_determinant_ldlt.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_LOG_DETERMINANT_LDLT_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_LOG_DETERMINANT_LDLT_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
9  // Returns log(abs(det(A))) given a LDLT_factor of A
+
10  template<int R, int C, typename T>
+
11  inline T
+ +
13  return A.log_abs_det();
+
14  }
+
15 
+
16  }
+
17 }
+
18 #endif
+ + +
LDLT_factor is a thin wrapper on Eigen::LDLT to allow for reusing factorizations and efficient autodi...
Definition: LDLT_factor.hpp:58
+
T log_determinant_ldlt(stan::math::LDLT_factor< T, R, C > &A)
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2log__determinant__spd_8hpp.html b/doc/api/html/prim_2mat_2fun_2log__determinant__spd_8hpp.html new file mode 100644 index 00000000000..4dc40db1673 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2log__determinant__spd_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/log_determinant_spd.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_determinant_spd.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T , int R, int C>
stan::math::log_determinant_spd (const Eigen::Matrix< T, R, C > &m)
 Returns the log absolute determinant of the specified square matrix. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2log__determinant__spd_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2log__determinant__spd_8hpp_source.html new file mode 100644 index 00000000000..7af16646243 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2log__determinant__spd_8hpp_source.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/log_determinant_spd.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_determinant_spd.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_LOG_DETERMINANT_SPD_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_LOG_DETERMINANT_SPD_HPP
+
3 
+ + +
6 #include <cmath>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
18  template <typename T, int R, int C>
+
19  inline T log_determinant_spd(const Eigen::Matrix<T, R, C>& m) {
+
20  using std::log;
+
21  stan::math::check_square("log_determinant_spd", "m", m);
+
22  // Eigen::TriangularView< Eigen::Matrix<T, R, C>, Eigen::Lower >
+
23  // L(m.llt().matrixL());
+
24  // T ret(0.0);
+
25  // for (size_t i = 0; i < L.rows(); i++)
+
26  // ret += log(L(i, i));
+
27  // return 2*ret;
+
28  return m.ldlt().vectorD().array().log().sum();
+
29  }
+
30 
+
31  }
+
32 }
+
33 #endif
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+
T log_determinant_spd(const Eigen::Matrix< T, R, C > &m)
Returns the log absolute determinant of the specified square matrix.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2log__softmax_8hpp.html b/doc/api/html/prim_2mat_2fun_2log__softmax_8hpp.html new file mode 100644 index 00000000000..f254ddaf8e1 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2log__softmax_8hpp.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/log_softmax.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_softmax.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/fun/log_sum_exp.hpp>
+#include <stan/math/prim/scal/err/check_nonzero_size.hpp>
+#include <cmath>
+#include <sstream>
+#include <stdexcept>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::log_softmax (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v)
 Return the natural logarithm of the softmax of the specified vector. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2log__softmax_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2log__softmax_8hpp_source.html new file mode 100644 index 00000000000..853c978d49d --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2log__softmax_8hpp_source.html @@ -0,0 +1,154 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/log_softmax.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_softmax.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_LOG_SOFTMAX_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_LOG_SOFTMAX_HPP
+
3 
+ + + +
7 #include <cmath>
+
8 #include <sstream>
+
9 #include <stdexcept>
+
10 
+
11 namespace stan {
+
12  namespace math {
+
13 
+
42  template <typename T>
+
43  inline Eigen::Matrix<T, Eigen::Dynamic, 1>
+
44  log_softmax(const Eigen::Matrix<T, Eigen::Dynamic, 1>& v) {
+
45  using std::exp;
+
46  using std::log;
+ +
48  stan::math::check_nonzero_size("log_softmax", "v", v);
+
49  Eigen::Matrix<T, Eigen::Dynamic, 1> theta(v.size());
+
50  T z = log_sum_exp(v);
+
51  for (int i = 0; i < v.size(); ++i)
+
52  theta(i) = v(i) - z;
+
53  return theta;
+
54  // T sum(0.0);
+
55  // T max_v = v.maxCoeff();
+
56  // for (int i = 0; i < v.size(); ++i)
+
57  // sum += exp(v(i) - max_v); // log_sum_exp trick
+
58  // T log_sum = log(sum);
+
59  // for (int i = 0; i < v.size(); ++i)
+
60  // theta(i) = (v(i) - max_v) - log_sum;
+
61  // return theta;
+
62  }
+
63 
+
64  }
+
65 }
+
66 #endif
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
Eigen::Matrix< fvar< T >, Eigen::Dynamic, 1 > log_softmax(const Eigen::Matrix< fvar< T >, Eigen::Dynamic, 1 > &alpha)
Definition: log_softmax.hpp:16
+
fvar< T > log_sum_exp(const std::vector< fvar< T > > &v)
Definition: log_sum_exp.hpp:14
+
bool check_nonzero_size(const char *function, const char *name, const T_y &y)
Return true if the specified matrix/vector is of non-zero size.
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2log__sum__exp_8hpp.html b/doc/api/html/prim_2mat_2fun_2log__sum__exp_8hpp.html new file mode 100644 index 00000000000..9301b34785e --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2log__sum__exp_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/log_sum_exp.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_sum_exp.hpp File Reference
+
+
+
#include <stan/math/prim/scal/fun/log1p.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <boost/math/tools/promotion.hpp>
+#include <limits>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<int R, int C>
double stan::math::log_sum_exp (const Eigen::Matrix< double, R, C > &x)
 Return the log of the sum of the exponentiated values of the specified matrix of values. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2log__sum__exp_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2log__sum__exp_8hpp_source.html new file mode 100644 index 00000000000..9e9ba1eb3b8 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2log__sum__exp_8hpp_source.html @@ -0,0 +1,150 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/log_sum_exp.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_sum_exp.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_LOG_SUM_EXP_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_LOG_SUM_EXP_HPP
+
3 
+ + +
6 #include <boost/math/tools/promotion.hpp>
+
7 #include <limits>
+
8 #include <vector>
+
9 
+
10 namespace stan {
+
11 
+
12  namespace math {
+
13 
+
27  template <int R, int C>
+
28  double log_sum_exp(const Eigen::Matrix<double, R, C>& x) {
+
29  using std::numeric_limits;
+
30  using std::log;
+
31  using std::exp;
+
32  double max = -numeric_limits<double>::infinity();
+
33  for (int i = 0; i < x.size(); i++)
+
34  if (x(i) > max)
+
35  max = x(i);
+
36 
+
37  double sum = 0.0;
+
38  for (int i = 0; i < x.size(); i++)
+
39  if (x(i) != -numeric_limits<double>::infinity())
+
40  sum += exp(x(i) - max);
+
41 
+
42  return max + log(sum);
+
43  }
+
44 
+
45  }
+
46 }
+
47 
+
48 #endif
+
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
fvar< T > log_sum_exp(const std::vector< fvar< T > > &v)
Definition: log_sum_exp.hpp:14
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ +
int max(const std::vector< int > &x)
Returns the maximum coefficient in the specified column vector.
Definition: max.hpp:21
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2mdivide__left_8hpp.html b/doc/api/html/prim_2mat_2fun_2mdivide__left_8hpp.html new file mode 100644 index 00000000000..1f9c1c6525f --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2mdivide__left_8hpp.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/mdivide_left.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
mdivide_left.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R1, C2 > 
stan::math::mdivide_left (const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &b)
 Returns the solution of the system Ax=b. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2mdivide__left_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2mdivide__left_8hpp_source.html new file mode 100644 index 00000000000..920de51faa5 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2mdivide__left_8hpp_source.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/mdivide_left.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
mdivide_left.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_MDIVIDE_LEFT_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_MDIVIDE_LEFT_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+ + + + +
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
21  template <typename T1, typename T2, int R1, int C1, int R2, int C2>
+
22  inline
+
23  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type,
+
24  R1, C2>
+
25  mdivide_left(const Eigen::Matrix<T1, R1, C1> &A,
+
26  const Eigen::Matrix<T2, R2, C2> &b) {
+
27  stan::math::check_square("mdivide_left", "A", A);
+
28  stan::math::check_multiplicable("mdivide_left",
+
29  "A", A,
+
30  "b", b);
+
31  return promote_common<Eigen::Matrix<T1, R1, C1>,
+
32  Eigen::Matrix<T2, R1, C1> >(A)
+
33  .lu()
+
34  .solve(promote_common<Eigen::Matrix<T1, R2, C2>,
+
35  Eigen::Matrix<T2, R2, C2> >(b));
+
36  }
+
37 
+
38  }
+
39 }
+
40 #endif
+
Eigen::Matrix< fvar< T >, R1, C2 > mdivide_left(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
+ + +
common_type< T1, T2 >::type promote_common(const F &u)
+
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+ +
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2mdivide__left__ldlt_8hpp.html b/doc/api/html/prim_2mat_2fun_2mdivide__left__ldlt_8hpp.html new file mode 100644 index 00000000000..f10e4b04ffd --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2mdivide__left__ldlt_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/mdivide_left_ldlt.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
mdivide_left_ldlt.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/fun/LDLT_factor.hpp>
+#include <stan/math/prim/mat/err/check_multiplicable.hpp>
+#include <stan/math/prim/mat/fun/promote_common.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<int R1, int C1, int R2, int C2, typename T1 , typename T2 >
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R1, C2 > 
stan::math::mdivide_left_ldlt (const stan::math::LDLT_factor< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &b)
 Returns the solution of the system Ax=b given an LDLT_factor of A. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2mdivide__left__ldlt_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2mdivide__left__ldlt_8hpp_source.html new file mode 100644 index 00000000000..af3bd050651 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2mdivide__left__ldlt_8hpp_source.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/mdivide_left_ldlt.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
mdivide_left_ldlt.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_MDIVIDE_LEFT_LDLT_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_MDIVIDE_LEFT_LDLT_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+ + + + +
9 #include <boost/type_traits/is_same.hpp>
+
10 
+
11 namespace stan {
+
12  namespace math {
+
13 
+
22  template <int R1, int C1, int R2, int C2, typename T1, typename T2>
+
23  inline Eigen::Matrix<typename
+
24  boost::math::tools::promote_args<T1, T2>::type,
+
25  R1, C2>
+ +
27  const Eigen::Matrix<T2, R2, C2> &b) {
+
28  stan::math::check_multiplicable("mdivide_left_ldlt",
+
29  "A", A,
+
30  "b", b);
+
31 
+
32  return A.solve(promote_common<Eigen::Matrix<T1, R2, C2>,
+
33  Eigen::Matrix<T2, R2, C2> >(b));
+
34  }
+
35 
+
36  }
+
37 }
+
38 #endif
+ + +
common_type< T1, T2 >::type promote_common(const F &u)
+ + +
Eigen::Matrix< fvar< T2 >, R1, C2 > mdivide_left_ldlt(const stan::math::LDLT_factor< double, R1, C1 > &A, const Eigen::Matrix< fvar< T2 >, R2, C2 > &b)
Returns the solution of the system Ax=b given an LDLT_factor of A.
+
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2mdivide__left__spd_8hpp.html b/doc/api/html/prim_2mat_2fun_2mdivide__left__spd_8hpp.html new file mode 100644 index 00000000000..f62fcceba6f --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2mdivide__left__spd_8hpp.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/mdivide_left_spd.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
mdivide_left_spd.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R1, C2 > 
stan::math::mdivide_left_spd (const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &b)
 Returns the solution of the system Ax=b where A is symmetric positive definite. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2mdivide__left__spd_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2mdivide__left__spd_8hpp_source.html new file mode 100644 index 00000000000..5fba79309d3 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2mdivide__left__spd_8hpp_source.html @@ -0,0 +1,156 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/mdivide_left_spd.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
mdivide_left_spd.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_MDIVIDE_LEFT_SPD_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_MDIVIDE_LEFT_SPD_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+ + + + + + +
11 
+
12 namespace stan {
+
13  namespace math {
+
14 
+
24  template <typename T1, typename T2, int R1, int C1, int R2, int C2>
+
25  inline
+
26  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type,
+
27  R1, C2>
+
28  mdivide_left_spd(const Eigen::Matrix<T1, R1, C1> &A,
+
29  const Eigen::Matrix<T2, R2, C2> &b) {
+
30  stan::math::check_symmetric("mdivide_left_spd", "A", A);
+
31  stan::math::check_pos_definite("mdivide_left_spd", "A", A);
+
32  stan::math::check_square("mdivide_left_spd", "A", A);
+
33  stan::math::check_multiplicable("mdivide_left_spd",
+
34  "A", A,
+
35  "b", b);
+
36  return promote_common<Eigen::Matrix<T1, R1, C1>,
+
37  Eigen::Matrix<T2, R1, C1> >(A)
+
38  .llt()
+
39  .solve(promote_common<Eigen::Matrix<T1, R2, C2>,
+
40  Eigen::Matrix<T2, R2, C2> >(b));
+
41  }
+
42 
+
43  }
+
44 }
+
45 #endif
+ + +
bool check_symmetric(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is symmetric.
+ +
Eigen::Matrix< typename boost::math::tools::promote_args< T1, T2 >::type, R1, C2 > mdivide_left_spd(const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &b)
Returns the solution of the system Ax=b where A is symmetric positive definite.
+
bool check_pos_definite(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified square, symmetric matrix is positive definite.
+
common_type< T1, T2 >::type promote_common(const F &u)
+
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+ +
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2mdivide__left__tri_8hpp.html b/doc/api/html/prim_2mat_2fun_2mdivide__left__tri_8hpp.html new file mode 100644 index 00000000000..c8f613f8af2 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2mdivide__left__tri_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/mdivide_left_tri.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
mdivide_left_tri.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<int TriView, typename T1 , typename T2 , int R1, int C1, int R2, int C2>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R1, C2 > 
stan::math::mdivide_left_tri (const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &b)
 Returns the solution of the system Ax=b when A is triangular. More...
 
template<int TriView, typename T , int R1, int C1>
Eigen::Matrix< T, R1, C1 > stan::math::mdivide_left_tri (const Eigen::Matrix< T, R1, C1 > &A)
 Returns the solution of the system Ax=b when A is triangular and b=I. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2mdivide__left__tri_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2mdivide__left__tri_8hpp_source.html new file mode 100644 index 00000000000..3c759f46fd8 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2mdivide__left__tri_8hpp_source.html @@ -0,0 +1,161 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/mdivide_left_tri.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
mdivide_left_tri.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_MDIVIDE_LEFT_TRI_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_MDIVIDE_LEFT_TRI_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+ + + + +
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
22  template <int TriView, typename T1, typename T2,
+
23  int R1, int C1, int R2, int C2>
+
24  inline
+
25  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type,
+
26  R1, C2>
+
27  mdivide_left_tri(const Eigen::Matrix<T1, R1, C1> &A,
+
28  const Eigen::Matrix<T2, R2, C2> &b) {
+
29  stan::math::check_square("mdivide_left_tri", "A", A);
+
30  stan::math::check_multiplicable("mdivide_left_tri",
+
31  "A", A,
+
32  "b", b);
+
33  return promote_common<Eigen::Matrix<T1, R1, C1>,
+
34  Eigen::Matrix<T2, R1, C1> >(A)
+
35  .template triangularView<TriView>()
+
36  .solve(promote_common<Eigen::Matrix<T1, R2, C2>,
+
37  Eigen::Matrix<T2, R2, C2> >(b));
+
38  }
+
39 
+
47  template<int TriView, typename T, int R1, int C1>
+
48  inline
+
49  Eigen::Matrix<T, R1, C1>
+
50  mdivide_left_tri(const Eigen::Matrix<T, R1, C1> &A) {
+
51  stan::math::check_square("mdivide_left_tri", "A", A);
+
52  int n = A.rows();
+
53  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> b;
+
54  b.setIdentity(n, n);
+
55  A.template triangularView<TriView>().solveInPlace(b);
+
56  return b;
+
57  }
+
58 
+
59  }
+
60 }
+
61 #endif
+ + +
common_type< T1, T2 >::type promote_common(const F &u)
+
Eigen::Matrix< typename boost::math::tools::promote_args< T1, T2 >::type, R1, C2 > mdivide_left_tri(const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &b)
Returns the solution of the system Ax=b when A is triangular.
+
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+ +
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2mdivide__left__tri__low_8hpp.html b/doc/api/html/prim_2mat_2fun_2mdivide__left__tri__low_8hpp.html new file mode 100644 index 00000000000..1af43e3c4ee --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2mdivide__left__tri__low_8hpp.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/mdivide_left_tri_low.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
mdivide_left_tri_low.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R1, C2 > 
stan::math::mdivide_left_tri_low (const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &b)
 
template<typename T , int R1, int C1>
Eigen::Matrix< T, R1, C1 > stan::math::mdivide_left_tri_low (const Eigen::Matrix< T, R1, C1 > &A)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2mdivide__left__tri__low_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2mdivide__left__tri__low_8hpp_source.html new file mode 100644 index 00000000000..d9efb16e5ad --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2mdivide__left__tri__low_8hpp_source.html @@ -0,0 +1,159 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/mdivide_left_tri_low.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
mdivide_left_tri_low.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_MDIVIDE_LEFT_TRI_LOW_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_MDIVIDE_LEFT_TRI_LOW_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+ + + + +
9 namespace stan {
+
10  namespace math {
+
11 
+
12  template <typename T1, typename T2, int R1, int C1, int R2, int C2>
+
13  inline
+
14  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type,
+
15  R1, C2>
+
16  mdivide_left_tri_low(const Eigen::Matrix<T1, R1, C1> &A,
+
17  const Eigen::Matrix<T2, R2, C2> &b) {
+
18  stan::math::check_square("mdivide_left_tri_low", "A", A);
+
19  stan::math::check_multiplicable("mdivide_left_tri_low",
+
20  "A", A,
+
21  "b", b);
+
22  // return promote_common<Eigen::Matrix<T1, R1, C1>,
+
23  // Eigen::Matrix<T2, R1, C1> >(A)
+
24  // .template triangularView<Eigen::Lower>()
+
25  // .solve( promote_common<Eigen::Matrix<T1, R2, C2>,
+
26  // Eigen::Matrix<T2, R2, C2> >(b) );
+
27  return mdivide_left_tri<Eigen::Lower, T1, T2, R1, C1, R2, C2>(A, b);
+
28  }
+
29  template <typename T, int R1, int C1>
+
30  inline
+
31  Eigen::Matrix<T, R1, C1>
+
32  mdivide_left_tri_low(const Eigen::Matrix<T, R1, C1> &A) {
+
33  stan::math::check_square("mdivide_left_tri_low", "A", A);
+
34  // int n = A.rows();
+
35  // Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> b;
+
36  // b.setIdentity(n, n);
+
37  // A.template triangularView<Eigen::Lower>().solveInPlace(b);
+
38  // return b;
+
39  return mdivide_left_tri<Eigen::Lower, T, R1, C1>(A);
+
40  }
+
41 
+
42  }
+
43 }
+
44 #endif
+ + +
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+ +
Eigen::Matrix< fvar< T >, R1, C1 > mdivide_left_tri_low(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
+
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2mdivide__right_8hpp.html b/doc/api/html/prim_2mat_2fun_2mdivide__right_8hpp.html new file mode 100644 index 00000000000..9b36c388481 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2mdivide__right_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/mdivide_right.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
mdivide_right.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R1, C2 > 
stan::math::mdivide_right (const Eigen::Matrix< T1, R1, C1 > &b, const Eigen::Matrix< T2, R2, C2 > &A)
 Returns the solution of the system Ax=b. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2mdivide__right_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2mdivide__right_8hpp_source.html new file mode 100644 index 00000000000..3c78fff806b --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2mdivide__right_8hpp_source.html @@ -0,0 +1,156 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/mdivide_right.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
mdivide_right.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_MDIVIDE_RIGHT_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_MDIVIDE_RIGHT_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+ + + + + +
10 
+
11 namespace stan {
+
12  namespace math {
+
13 
+
22  template <typename T1, typename T2, int R1, int C1, int R2, int C2>
+
23  inline
+
24  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type,
+
25  R1, C2>
+
26  mdivide_right(const Eigen::Matrix<T1, R1, C1> &b,
+
27  const Eigen::Matrix<T2, R2, C2> &A) {
+
28  stan::math::check_square("mdivide_right", "A", A);
+
29  stan::math::check_multiplicable("mdivide_right",
+
30  "b", b,
+
31  "A", A);
+
32  // FIXME: This is nice and general but likely slow.
+
33  return transpose(mdivide_left(transpose(A), transpose(b)));
+
34 // return promote_common<Eigen::Matrix<T1, R2, C2>,
+
35 // Eigen::Matrix<T2, R2, C2> >(A)
+
36 // .transpose()
+
37 // .lu()
+
38 // .solve(promote_common<Eigen::Matrix<T1, R1, C1>,
+
39 // Eigen::Matrix<T2, R1, C1> >(b)
+
40 // .transpose())
+
41 // .transpose();
+
42  }
+
43 
+
44  }
+
45 }
+
46 #endif
+
Eigen::Matrix< fvar< T >, R1, C2 > mdivide_left(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
+ + +
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+ +
Eigen::Matrix< T, C, R > transpose(const Eigen::Matrix< T, R, C > &m)
Definition: transpose.hpp:12
+
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+
Eigen::Matrix< fvar< T >, R1, C2 > mdivide_right(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2mdivide__right__tri__low_8hpp.html b/doc/api/html/prim_2mat_2fun_2mdivide__right__tri__low_8hpp.html new file mode 100644 index 00000000000..ed990b0c523 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2mdivide__right__tri__low_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/mdivide_right_tri_low.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
mdivide_right_tri_low.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/fun/mdivide_right_tri.hpp>
+#include <stan/math/prim/mat/fun/promote_common.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T1 , typename T2 , int R1, int C1, int R2, int C2>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R1, C2 > 
stan::math::mdivide_right_tri_low (const Eigen::Matrix< T1, R1, C1 > &b, const Eigen::Matrix< T2, R2, C2 > &A)
 Returns the solution of the system tri(A)x=b when tri(A) is a lower triangular view of the matrix A. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2mdivide__right__tri__low_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2mdivide__right__tri__low_8hpp_source.html new file mode 100644 index 00000000000..a5f896b1c31 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2mdivide__right__tri__low_8hpp_source.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/mdivide_right_tri_low.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
mdivide_right_tri_low.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_MDIVIDE_RIGHT_TRI_LOW_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_MDIVIDE_RIGHT_TRI_LOW_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+ + + +
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
21  template <typename T1, typename T2, int R1, int C1, int R2, int C2>
+
22  inline
+
23  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type,
+
24  R1, C2>
+
25  mdivide_right_tri_low(const Eigen::Matrix<T1, R1, C1> &b,
+
26  const Eigen::Matrix<T2, R2, C2> &A) {
+
27  return mdivide_right_tri<Eigen::Lower>
+
28  (promote_common<Eigen::Matrix<T1, R1, C1>,
+
29  Eigen::Matrix<T2, R1, C1> >(b),
+
30  promote_common<Eigen::Matrix<T1, R2, C2>,
+
31  Eigen::Matrix<T2, R2, C2> >(A));
+
32  }
+
33 
+
34  }
+
35 }
+
36 #endif
+ + +
common_type< T1, T2 >::type promote_common(const F &u)
+ +
Eigen::Matrix< fvar< T >, R1, C1 > mdivide_right_tri_low(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2multiply_8hpp.html b/doc/api/html/prim_2mat_2fun_2multiply_8hpp.html new file mode 100644 index 00000000000..63930867917 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2multiply_8hpp.html @@ -0,0 +1,152 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/multiply.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
multiply.hpp File Reference
+
+
+
#include <boost/type_traits/is_arithmetic.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/err/check_matching_sizes.hpp>
+#include <stan/math/prim/mat/err/check_multiplicable.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + + + + + +

+Functions

template<int R, int C, typename T >
boost::enable_if_c
+< boost::is_arithmetic< T >
+::value, Eigen::Matrix< double,
+R, C > >::type 
stan::math::multiply (const Eigen::Matrix< double, R, C > &m, T c)
 Return specified matrix multiplied by specified scalar. More...
 
template<int R, int C, typename T >
boost::enable_if_c
+< boost::is_arithmetic< T >
+::value, Eigen::Matrix< double,
+R, C > >::type 
stan::math::multiply (T c, const Eigen::Matrix< double, R, C > &m)
 Return specified scalar multiplied by specified matrix. More...
 
template<int R1, int C1, int R2, int C2>
Eigen::Matrix< double, R1, C2 > stan::math::multiply (const Eigen::Matrix< double, R1, C1 > &m1, const Eigen::Matrix< double, R2, C2 > &m2)
 Return the product of the specified matrices. More...
 
template<int C1, int R2>
double stan::math::multiply (const Eigen::Matrix< double, 1, C1 > &rv, const Eigen::Matrix< double, R2, 1 > &v)
 Return the scalar product of the specified row vector and specified column vector. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2multiply_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2multiply_8hpp_source.html new file mode 100644 index 00000000000..f6600a0235f --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2multiply_8hpp_source.html @@ -0,0 +1,172 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/multiply.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
multiply.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_MULTIPLY_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_MULTIPLY_HPP
+
3 
+
4 #include <boost/type_traits/is_arithmetic.hpp>
+
5 #include <boost/utility/enable_if.hpp>
+ + + +
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
21  template <int R, int C, typename T>
+
22  inline
+
23  typename boost::enable_if_c<boost::is_arithmetic<T>::value,
+
24  Eigen::Matrix<double, R, C> >::type
+
25  multiply(const Eigen::Matrix<double, R, C>& m,
+
26  T c) {
+
27  return c * m;
+
28  }
+
29 
+
30  // FIXME: apply above pattern everywhere below to remove
+
31  // extra defs, etc.
+
32 
+
41  template <int R, int C, typename T>
+
42  inline
+
43  typename boost::enable_if_c<boost::is_arithmetic<T>::value,
+
44  Eigen::Matrix<double, R, C> >::type
+
45  multiply(T c,
+
46  const Eigen::Matrix<double, R, C>& m) {
+
47  return c * m;
+
48  }
+
49 
+
60  template<int R1, int C1, int R2, int C2>
+
61  inline Eigen::Matrix<double, R1, C2>
+
62  multiply(const Eigen::Matrix<double, R1, C1>& m1,
+
63  const Eigen::Matrix<double, R2, C2>& m2) {
+ +
65  "m1", m1,
+
66  "m2", m2);
+
67  return m1*m2;
+
68  }
+
69 
+
79  template<int C1, int R2>
+
80  inline double multiply(const Eigen::Matrix<double, 1, C1>& rv,
+
81  const Eigen::Matrix<double, R2, 1>& v) {
+ +
83  "rv", rv,
+
84  "v", v);
+
85  if (rv.size() != v.size())
+
86  throw std::domain_error("rv.size() != v.size()");
+
87  return rv.dot(v);
+
88  }
+
89 
+
90  }
+
91 }
+
92 #endif
+ +
Eigen::Matrix< fvar< T >, R1, C1 > multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m, const fvar< T > &c)
Definition: multiply.hpp:20
+ +
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+
bool check_matching_sizes(const char *function, const char *name1, const T_y1 &y1, const char *name2, const T_y2 &y2)
Return true if two structures at the same size.
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2multiply__lower__tri__self__transpose_8hpp.html b/doc/api/html/prim_2mat_2fun_2multiply__lower__tri__self__transpose_8hpp.html new file mode 100644 index 00000000000..2094e71dd29 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2multiply__lower__tri__self__transpose_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/multiply_lower_tri_self_transpose.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
multiply_lower_tri_self_transpose.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

matrix_d stan::math::multiply_lower_tri_self_transpose (const matrix_d &L)
 Returns the result of multiplying the lower triangular portion of the input matrix by its own transpose. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2multiply__lower__tri__self__transpose_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2multiply__lower__tri__self__transpose_8hpp_source.html new file mode 100644 index 00000000000..ebb08d90f64 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2multiply__lower__tri__self__transpose_8hpp_source.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/multiply_lower_tri_self_transpose.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
multiply_lower_tri_self_transpose.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_MULTIPLY_LOWER_TRI_SELF_TRANSPOSE_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_MULTIPLY_LOWER_TRI_SELF_TRANSPOSE_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
17  inline matrix_d
+ +
19  int K = L.rows();
+
20  int J = L.cols();
+
21  int k;
+
22  matrix_d LLt(K, K);
+
23  matrix_d Lt = L.transpose();
+
24 
+
25  if (K == 0)
+
26  return matrix_d(0, 0);
+
27  if (K == 1) {
+
28  matrix_d result(1, 1);
+
29  result(0, 0) = L(0, 0) * L(0, 0);
+
30  return result;
+
31  }
+
32 
+
33  for (int m = 0; m < K; ++m) {
+
34  k = (J < m + 1) ? J : m + 1;
+
35  LLt(m, m) = Lt.col(m).head(k).squaredNorm();
+
36  for (int n = (m + 1); n < K; ++n) {
+
37  LLt(n, m) = LLt(m, n) = Lt.col(m).head(k).dot(Lt.col(n).head(k));
+
38  }
+
39  }
+
40  return LLt;
+
41  }
+
42 
+
43  }
+
44 }
+
45 #endif
+
Eigen::Matrix< fvar< T >, R, R > multiply_lower_tri_self_transpose(const Eigen::Matrix< fvar< T >, R, C > &m)
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > matrix_d
Type for matrix of double values.
Definition: typedefs.hpp:23
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2qr___q_8hpp.html b/doc/api/html/prim_2mat_2fun_2qr___q_8hpp.html new file mode 100644 index 00000000000..516c853b94e --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2qr___q_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/qr_Q.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
qr_Q.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::qr_Q (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2qr___q_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2qr___q_8hpp_source.html new file mode 100644 index 00000000000..93c88d13f2f --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2qr___q_8hpp_source.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/qr_Q.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
qr_Q.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_QR_Q_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_QR_Q_HPP
+
3 
+ + + +
7 #include <Eigen/QR>
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
14  qr_Q(const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>& m) {
+
15  typedef Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> matrix_t;
+
16  stan::math::check_nonzero_size("qr_Q", "m", m);
+
17  stan::math::check_greater_or_equal("qr_Q", "m.rows()",
+
18  static_cast<size_t>(m.rows()),
+
19  static_cast<size_t>(m.cols()));
+
20 
+
21  Eigen::HouseholderQR<matrix_t> qr(m.rows(), m.cols());
+
22  qr.compute(m);
+
23  matrix_t Q = qr.householderQ();
+
24  for (int i = 0; i < m.cols(); i++)
+
25  if (qr.matrixQR()(i, i) < 0)
+
26  Q.col(i) *= -1.0;
+
27  return Q;
+
28  }
+
29 
+
30  }
+
31 }
+
32 #endif
+
bool check_greater_or_equal(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is greater or equal than low.
+
Eigen::Matrix< fvar< T >, Eigen::Dynamic, Eigen::Dynamic > qr_Q(const Eigen::Matrix< fvar< T >, Eigen::Dynamic, Eigen::Dynamic > &m)
Definition: qr_Q.hpp:15
+
bool check_nonzero_size(const char *function, const char *name, const T_y &y)
Return true if the specified matrix/vector is of non-zero size.
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2qr___r_8hpp.html b/doc/api/html/prim_2mat_2fun_2qr___r_8hpp.html new file mode 100644 index 00000000000..1336853b370 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2qr___r_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/qr_R.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
qr_R.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::qr_R (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2qr___r_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2qr___r_8hpp_source.html new file mode 100644 index 00000000000..34735c22ecc --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2qr___r_8hpp_source.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/qr_R.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
qr_R.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_QR_R_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_QR_R_HPP
+
3 
+ +
5 #include <Eigen/QR>
+ + +
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
14  qr_R(const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>& m) {
+
15  typedef Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> matrix_t;
+
16  stan::math::check_nonzero_size("qr_R", "m", m);
+ +
18  "m.rows()",
+
19  static_cast<size_t>(m.rows()),
+
20  static_cast<size_t>(m.cols()));
+
21  Eigen::HouseholderQR<matrix_t> qr(m.rows(), m.cols());
+
22  qr.compute(m);
+
23  matrix_t R = qr.matrixQR().topLeftCorner(m.rows(), m.cols());
+
24  for (int i = 0; i < R.rows(); i++) {
+
25  for (int j = 0; j < i; j++)
+
26  R(i, j) = 0.0;
+
27  if (i < R.cols() && R(i, i) < 0)
+
28  R.row(i) *= -1.0;
+
29  }
+
30  return R;
+
31  }
+
32  }
+
33 }
+
34 #endif
+
bool check_greater_or_equal(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is greater or equal than low.
+
Eigen::Matrix< fvar< T >, Eigen::Dynamic, Eigen::Dynamic > qr_R(const Eigen::Matrix< fvar< T >, Eigen::Dynamic, Eigen::Dynamic > &m)
Definition: qr_R.hpp:15
+
bool check_nonzero_size(const char *function, const char *name, const T_y &y)
Return true if the specified matrix/vector is of non-zero size.
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2quad__form_8hpp.html b/doc/api/html/prim_2mat_2fun_2quad__form_8hpp.html new file mode 100644 index 00000000000..9aeb570e463 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2quad__form_8hpp.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/quad_form.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
quad_form.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

template<int RA, int CA, int RB, int CB, typename T >
Eigen::Matrix< T, CB, CB > stan::math::quad_form (const Eigen::Matrix< T, RA, CA > &A, const Eigen::Matrix< T, RB, CB > &B)
 Compute B^T A B. More...
 
template<int RA, int CA, int RB, typename T >
stan::math::quad_form (const Eigen::Matrix< T, RA, CA > &A, const Eigen::Matrix< T, RB, 1 > &B)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2quad__form_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2quad__form_8hpp_source.html new file mode 100644 index 00000000000..7602e810376 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2quad__form_8hpp_source.html @@ -0,0 +1,167 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/quad_form.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
quad_form.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_QUAD_FORM_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_QUAD_FORM_HPP
+
3 
+
4 #include <boost/utility/enable_if.hpp>
+
5 #include <boost/type_traits.hpp>
+ + + + + + + +
13 
+
14 namespace stan {
+
15  namespace math {
+
19  template<int RA, int CA, int RB, int CB, typename T>
+
20  inline Eigen::Matrix<T, CB, CB>
+
21  quad_form(const Eigen::Matrix<T, RA, CA>& A,
+
22  const Eigen::Matrix<T, RB, CB>& B) {
+ +
24  stan::math::check_square("quad_form", "A", A);
+ +
26  "A", A,
+
27  "B", B);
+
28  return multiply(stan::math::transpose(B), multiply(A, B));
+
29  }
+
30 
+
31  template<int RA, int CA, int RB, typename T>
+
32  inline T
+
33  quad_form(const Eigen::Matrix<T, RA, CA>& A,
+
34  const Eigen::Matrix<T, RB, 1>& B) {
+ + +
37 
+
38  stan::math::check_square("quad_form", "A", A);
+ +
40  "A", A,
+
41  "B", B);
+
42  return dot_product(B, multiply(A, B));
+
43  }
+
44 
+
45  }
+
46 }
+
47 
+
48 #endif
+
49 
+ + +
Eigen::Matrix< fvar< T >, R1, C1 > multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m, const fvar< T > &c)
Definition: multiply.hpp:20
+ + +
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+
fvar< T > dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
Definition: dot_product.hpp:20
+ + +
Eigen::Matrix< T, C, R > transpose(const Eigen::Matrix< T, R, C > &m)
Definition: transpose.hpp:12
+
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+
Eigen::Matrix< T, CB, CB > quad_form(const Eigen::Matrix< T, RA, CA > &A, const Eigen::Matrix< T, RB, CB > &B)
Compute B^T A B.
Definition: quad_form.hpp:21
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2quad__form__sym_8hpp.html b/doc/api/html/prim_2mat_2fun_2quad__form__sym_8hpp.html new file mode 100644 index 00000000000..3bdf1f4032f --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2quad__form__sym_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/quad_form_sym.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
quad_form_sym.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<int RA, int CA, int RB, int CB, typename T >
Eigen::Matrix< T, CB, CB > stan::math::quad_form_sym (const Eigen::Matrix< T, RA, CA > &A, const Eigen::Matrix< T, RB, CB > &B)
 
template<int RA, int CA, int RB, typename T >
stan::math::quad_form_sym (const Eigen::Matrix< T, RA, CA > &A, const Eigen::Matrix< T, RB, 1 > &B)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2quad__form__sym_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2quad__form__sym_8hpp_source.html new file mode 100644 index 00000000000..254006ca3ec --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2quad__form__sym_8hpp_source.html @@ -0,0 +1,172 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/quad_form_sym.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
quad_form_sym.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_QUAD_FORM_SYM_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_QUAD_FORM_SYM_HPP
+
3 
+
4 #include <boost/utility/enable_if.hpp>
+
5 #include <boost/type_traits.hpp>
+ + + + + + + +
13 
+
14 namespace stan {
+
15  namespace math {
+
16 
+
17  template<int RA, int CA, int RB, int CB, typename T>
+
18  inline Eigen::Matrix<T, CB, CB>
+
19  quad_form_sym(const Eigen::Matrix<T, RA, CA>& A,
+
20  const Eigen::Matrix<T, RB, CB>& B) {
+ +
22 
+
23  stan::math::check_square("quad_form_sym", "A", A);
+
24  stan::math::check_multiplicable("quad_form_sym",
+
25  "A", A,
+
26  "B", B);
+
27  stan::math::check_symmetric("quad_form_sym", "A", A);
+
28  Eigen::Matrix<T, CB, CB> ret(multiply(transpose(B), multiply(A, B)));
+
29  return T(0.5) * (ret + transpose(ret));
+
30  }
+
31 
+
32  template<int RA, int CA, int RB, typename T>
+
33  inline T
+
34  quad_form_sym(const Eigen::Matrix<T, RA, CA>& A,
+
35  const Eigen::Matrix<T, RB, 1>& B) {
+ + +
38 
+
39  stan::math::check_square("quad_form_sym", "A", A);
+
40  stan::math::check_multiplicable("quad_form_sym",
+
41  "A", A,
+
42  "B", B);
+
43  stan::math::check_symmetric("quad_form_sym", "A", A);
+
44  return dot_product(B, multiply(A, B));
+
45  }
+
46  }
+
47 }
+
48 
+
49 #endif
+
50 
+ + +
Eigen::Matrix< fvar< T >, R1, C1 > multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m, const fvar< T > &c)
Definition: multiply.hpp:20
+
bool check_symmetric(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is symmetric.
+ + +
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+
fvar< T > dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
Definition: dot_product.hpp:20
+ + +
Eigen::Matrix< fvar< T >, CB, CB > quad_form_sym(const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< double, RB, CB > &B)
+
Eigen::Matrix< T, C, R > transpose(const Eigen::Matrix< T, R, C > &m)
Definition: transpose.hpp:12
+
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2rows__dot__product_8hpp.html b/doc/api/html/prim_2mat_2fun_2rows__dot__product_8hpp.html new file mode 100644 index 00000000000..1d2ec15dbf4 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2rows__dot__product_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/rows_dot_product.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
rows_dot_product.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<int R1, int C1, int R2, int C2>
Eigen::Matrix< double, R1, 1 > stan::math::rows_dot_product (const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)
 Returns the dot product of the specified vectors. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2rows__dot__product_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2rows__dot__product_8hpp_source.html new file mode 100644 index 00000000000..9f30a0cea53 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2rows__dot__product_8hpp_source.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/rows_dot_product.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
rows_dot_product.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_ROWS_DOT_PRODUCT_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_ROWS_DOT_PRODUCT_HPP
+
3 
+ + + +
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
20  template<int R1, int C1, int R2, int C2>
+
21  inline Eigen::Matrix<double, R1, 1>
+
22  rows_dot_product(const Eigen::Matrix<double, R1, C1>& v1,
+
23  const Eigen::Matrix<double, R2, C2>& v2) {
+
24  stan::math::check_matching_sizes("rows_dot_product",
+
25  "v1", v1,
+
26  "v2", v2);
+
27  Eigen::Matrix<double, R1, 1> ret(v1.rows(), 1);
+
28  for (size_type j = 0; j < v1.rows(); ++j) {
+
29  ret(j) = v1.row(j).dot(v2.row(j));
+
30  }
+
31  return ret;
+
32  }
+
33 
+
34  }
+
35 }
+
36 #endif
+ +
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
bool check_matching_sizes(const char *function, const char *name1, const T_y1 &y1, const char *name2, const T_y2 &y2)
Return true if two structures at the same size.
+ +
Eigen::Matrix< fvar< T >, R1, 1 > rows_dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2rows__dot__self_8hpp.html b/doc/api/html/prim_2mat_2fun_2rows__dot__self_8hpp.html new file mode 100644 index 00000000000..bdb8596fb8d --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2rows__dot__self_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/rows_dot_self.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
rows_dot_self.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T , int R, int C>
Eigen::Matrix< T, R, 1 > stan::math::rows_dot_self (const Eigen::Matrix< T, R, C > &x)
 Returns the dot product of each row of a matrix with itself. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2rows__dot__self_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2rows__dot__self_8hpp_source.html new file mode 100644 index 00000000000..448b2d30481 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2rows__dot__self_8hpp_source.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/rows_dot_self.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
rows_dot_self.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_ROWS_DOT_SELF_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_ROWS_DOT_SELF_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
14  template<typename T, int R, int C>
+
15  inline Eigen::Matrix<T, R, 1>
+
16  rows_dot_self(const Eigen::Matrix<T, R, C>& x) {
+
17  return x.rowwise().squaredNorm();
+
18  }
+
19 
+
20  }
+
21 }
+
22 #endif
+
Eigen::Matrix< fvar< T >, R, 1 > rows_dot_self(const Eigen::Matrix< fvar< T >, R, C > &x)
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2sd_8hpp.html b/doc/api/html/prim_2mat_2fun_2sd_8hpp.html new file mode 100644 index 00000000000..4632d128137 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2sd_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/sd.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
sd.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/fun/variance.hpp>
+#include <stan/math/prim/scal/err/check_nonzero_size.hpp>
+#include <boost/math/tools/promotion.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
boost::math::tools::promote_args
+< T >::type 
stan::math::sd (const std::vector< T > &v)
 Returns the unbiased sample standard deviation of the coefficients in the specified column vector. More...
 
template<typename T , int R, int C>
boost::math::tools::promote_args
+< T >::type 
stan::math::sd (const Eigen::Matrix< T, R, C > &m)
 Returns the unbiased sample standard deviation of the coefficients in the specified vector, row vector, or matrix. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2sd_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2sd_8hpp_source.html new file mode 100644 index 00000000000..addd5bd1635 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2sd_8hpp_source.html @@ -0,0 +1,149 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/sd.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
sd.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_SD_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_SD_HPP
+
3 
+ + + +
7 #include <boost/math/tools/promotion.hpp>
+
8 #include <vector>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
19  template <typename T>
+
20  inline
+
21  typename boost::math::tools::promote_args<T>::type
+
22  sd(const std::vector<T>& v) {
+
23  stan::math::check_nonzero_size("sd", "v", v);
+
24  if (v.size() == 1) return 0.0;
+
25  return sqrt(variance(v));
+
26  }
+
27 
+
34  template <typename T, int R, int C>
+
35  inline
+
36  typename boost::math::tools::promote_args<T>::type
+
37  sd(const Eigen::Matrix<T, R, C>& m) {
+
38  // FIXME: redundant with test in variance; second line saves sqrt
+
39  stan::math::check_nonzero_size("sd", "m", m);
+
40  if (m.size() == 1) return 0.0;
+
41  return sqrt(variance(m));
+
42  }
+
43 
+
44  }
+
45 }
+
46 #endif
+
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+ +
bool check_nonzero_size(const char *function, const char *name, const T_y &y)
Return true if the specified matrix/vector is of non-zero size.
+
boost::math::tools::promote_args< T >::type sd(const std::vector< T > &v)
Returns the unbiased sample standard deviation of the coefficients in the specified column vector...
Definition: sd.hpp:22
+
boost::math::tools::promote_args< T >::type variance(const std::vector< T > &v)
Returns the sample variance (divide by length - 1) of the coefficients in the specified standard vect...
Definition: variance.hpp:24
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2softmax_8hpp.html b/doc/api/html/prim_2mat_2fun_2softmax_8hpp.html new file mode 100644 index 00000000000..98915b15ed1 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2softmax_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/softmax.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
softmax.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::softmax (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v)
 Return the softmax of the specified vector. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2softmax_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2softmax_8hpp_source.html new file mode 100644 index 00000000000..1ffc7eba1e5 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2softmax_8hpp_source.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/softmax.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
softmax.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_SOFTMAX_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_SOFTMAX_HPP
+
3 
+ + +
6 #include <cmath>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
44  template <typename T>
+
45  inline Eigen::Matrix<T, Eigen::Dynamic, 1>
+
46  softmax(const Eigen::Matrix<T, Eigen::Dynamic, 1>& v) {
+
47  using std::exp;
+
48  stan::math::check_nonzero_size("softmax", "v", v);
+
49  Eigen::Matrix<T, Eigen::Dynamic, 1> theta(v.size());
+
50  T sum(0.0);
+
51  T max_v = v.maxCoeff();
+
52  for (int i = 0; i < v.size(); ++i) {
+
53  theta(i) = exp(v(i) - max_v); // extra work for (v[i] == max_v)
+
54  sum += theta(i); // extra work vs. sum() w. auto-diff
+
55  }
+
56  for (int i = 0; i < v.size(); ++i)
+
57  theta(i) /= sum;
+
58  return theta;
+
59  }
+
60 
+
61  }
+
62 }
+
63 #endif
+
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+
Eigen::Matrix< fvar< T >, Eigen::Dynamic, 1 > softmax(const Eigen::Matrix< fvar< T >, Eigen::Dynamic, 1 > &alpha)
Definition: softmax.hpp:14
+
bool check_nonzero_size(const char *function, const char *name, const T_y &y)
Return true if the specified matrix/vector is of non-zero size.
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2squared__distance_8hpp.html b/doc/api/html/prim_2mat_2fun_2squared__distance_8hpp.html new file mode 100644 index 00000000000..98fb4bc4f09 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2squared__distance_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/squared_distance.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
squared_distance.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<int R1, int C1, int R2, int C2, typename T1 , typename T2 >
boost::math::tools::promote_args
+< T1, T2 >::type 
stan::math::squared_distance (const Eigen::Matrix< T1, R1, C1 > &v1, const Eigen::Matrix< T2, R2, C2 > &v2)
 Returns the squared distance between the specified vectors. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2squared__distance_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2squared__distance_8hpp_source.html new file mode 100644 index 00000000000..7fc7e0f461f --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2squared__distance_8hpp_source.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/squared_distance.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
squared_distance.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_SQUARED_DISTANCE_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_SQUARED_DISTANCE_HPP
+
3 
+ + + +
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
20  template<int R1, int C1, int R2, int C2, typename T1, typename T2>
+
21  inline typename boost::math::tools::promote_args<T1, T2>::type
+
22  squared_distance(const Eigen::Matrix<T1, R1, C1>& v1,
+
23  const Eigen::Matrix<T2, R2, C2>& v2) {
+
24  stan::math::check_vector("squared_distance", "v1", v1);
+
25  stan::math::check_vector("squared_distance", "v2", v2);
+
26  stan::math::check_matching_sizes("squared_distance",
+
27  "v1", v1,
+
28  "v2", v2);
+
29  if (v1.rows() != v2.rows())
+
30  return (v1.transpose()-v2).squaredNorm();
+
31  else
+
32  return (v1-v2).squaredNorm();
+
33  }
+
34  }
+
35 }
+
36 #endif
+
bool check_vector(const char *function, const char *name, const Eigen::Matrix< T, R, C > &x)
Return true if the matrix is either a row vector or column vector.
+
boost::math::tools::promote_args< T1, T2 >::type squared_distance(const Eigen::Matrix< T1, R1, C1 > &v1, const Eigen::Matrix< T2, R2, C2 > &v2)
Returns the squared distance between the specified vectors.
+ +
bool check_matching_sizes(const char *function, const char *name1, const T_y1 &y1, const char *name2, const T_y2 &y2)
Return true if two structures at the same size.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2stan__print_8hpp.html b/doc/api/html/prim_2mat_2fun_2stan__print_8hpp.html new file mode 100644 index 00000000000..ac10eec00be --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2stan__print_8hpp.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/stan_print.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan_print.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + + + + +

+Functions

template<typename T >
void stan::math::stan_print (std::ostream *o, const T &x)
 
template<typename T >
void stan::math::stan_print (std::ostream *o, const std::vector< T > &x)
 
template<typename T >
void stan::math::stan_print (std::ostream *o, const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x)
 
template<typename T >
void stan::math::stan_print (std::ostream *o, const Eigen::Matrix< T, 1, Eigen::Dynamic > &x)
 
template<typename T >
void stan::math::stan_print (std::ostream *o, const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2stan__print_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2stan__print_8hpp_source.html new file mode 100644 index 00000000000..ff23a6caf38 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2stan__print_8hpp_source.html @@ -0,0 +1,176 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/stan_print.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan_print.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_STAN_PRINT_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_STAN_PRINT_HPP
+
3 
+ +
5 #include <vector>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9  // prints used in generator for print() statements in modeling language
+
10 
+
11  template <typename T>
+
12  void stan_print(std::ostream* o, const T& x) {
+
13  *o << x;
+
14  }
+
15 
+
16  template <typename T>
+
17  void stan_print(std::ostream* o, const std::vector<T>& x) {
+
18  *o << '[';
+
19  for (size_t i = 0; i < x.size(); ++i) {
+
20  if (i > 0) *o << ',';
+
21  stan_print(o, x[i]);
+
22  }
+
23  *o << ']';
+
24  }
+
25 
+
26  template <typename T>
+
27  void stan_print(std::ostream* o,
+
28  const Eigen::Matrix<T, Eigen::Dynamic, 1>& x) {
+
29  *o << '[';
+
30  for (int i = 0; i < x.size(); ++i) {
+
31  if (i > 0) *o << ',';
+
32  stan_print(o, x(i));
+
33  }
+
34  *o << ']';
+
35  }
+
36 
+
37  template <typename T>
+
38  void stan_print(std::ostream* o,
+
39  const Eigen::Matrix<T, 1, Eigen::Dynamic>& x) {
+
40  *o << '[';
+
41  for (int i = 0; i < x.size(); ++i) {
+
42  if (i > 0) *o << ',';
+
43  stan_print(o, x(i));
+
44  }
+
45  *o << ']';
+
46  }
+
47 
+
48  template <typename T>
+
49  void stan_print(std::ostream* o,
+
50  const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>& x) {
+
51  *o << '[';
+
52  for (int i = 0; i < x.rows(); ++i) {
+
53  if (i > 0) *o << ',';
+
54  *o << '[';
+
55  for (int j = 0; j < x.row(i).size(); ++j) {
+
56  if (j > 0) *o << ',';
+
57  stan_print(o, x.row(i)(j));
+
58  }
+
59  *o << ']';
+
60  }
+
61  *o << ']';
+
62  }
+
63 
+
64  }
+
65 }
+
66 #endif
+ +
void stan_print(std::ostream *o, const T &x)
Definition: stan_print.hpp:12
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2sum_8hpp.html b/doc/api/html/prim_2mat_2fun_2sum_8hpp.html new file mode 100644 index 00000000000..390a5a80717 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2sum_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/sum.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
sum.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/arr/fun/sum.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T , int R, int C>
double stan::math::sum (const Eigen::Matrix< T, R, C > &v)
 Returns the sum of the coefficients of the specified column vector. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2sum_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2sum_8hpp_source.html new file mode 100644 index 00000000000..59b267e018c --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2sum_8hpp_source.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/sum.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
sum.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_SUM_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_SUM_HPP
+
3 
+ + +
6 #include <vector>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
21  template <typename T, int R, int C>
+
22  inline double sum(const Eigen::Matrix<T, R, C>& v) {
+
23  return v.sum();
+
24  }
+
25 
+
26  }
+
27 }
+
28 #endif
+
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2tcrossprod_8hpp.html b/doc/api/html/prim_2mat_2fun_2tcrossprod_8hpp.html new file mode 100644 index 00000000000..3337653c7f4 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2tcrossprod_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/tcrossprod.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
tcrossprod.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

matrix_d stan::math::tcrossprod (const matrix_d &M)
 Returns the result of post-multiplying a matrix by its own transpose. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2tcrossprod_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2tcrossprod_8hpp_source.html new file mode 100644 index 00000000000..0819e7a9f6c --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2tcrossprod_8hpp_source.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/tcrossprod.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
tcrossprod.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_TCROSSPROD_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_TCROSSPROD_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
16  inline matrix_d
+
17  tcrossprod(const matrix_d& M) {
+
18  if (M.rows() == 0)
+
19  return matrix_d(0, 0);
+
20  if (M.rows() == 1)
+
21  return M * M.transpose();
+
22  matrix_d result(M.rows(), M.rows());
+
23  return result
+
24  .setZero()
+
25  .selfadjointView<Eigen::Upper>()
+
26  .rankUpdate(M);
+
27  }
+
28 
+
29  }
+
30 }
+
31 #endif
+
Eigen::Matrix< fvar< T >, R, R > tcrossprod(const Eigen::Matrix< fvar< T >, R, C > &m)
Definition: tcrossprod.hpp:17
+ +
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > matrix_d
Type for matrix of double values.
Definition: typedefs.hpp:23
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2trace__gen__inv__quad__form__ldlt_8hpp.html b/doc/api/html/prim_2mat_2fun_2trace__gen__inv__quad__form__ldlt_8hpp.html new file mode 100644 index 00000000000..fc9fe01c892 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2trace__gen__inv__quad__form__ldlt_8hpp.html @@ -0,0 +1,143 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/trace_gen_inv_quad_form_ldlt.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
trace_gen_inv_quad_form_ldlt.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T1 , typename T2 , typename T3 , int R1, int C1, int R2, int C2, int R3, int C3>
boost::enable_if_c
+<!stan::is_var< T1 >::value
+&&!stan::is_var< T2 >::value
+&&!stan::is_var< T3 >::value,
+typename
+boost::math::tools::promote_args
+< T1, T2, T3 >::type >::type 
stan::math::trace_gen_inv_quad_form_ldlt (const Eigen::Matrix< T1, R1, C1 > &D, const stan::math::LDLT_factor< T2, R2, C2 > &A, const Eigen::Matrix< T3, R3, C3 > &B)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2trace__gen__inv__quad__form__ldlt_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2trace__gen__inv__quad__form__ldlt_8hpp_source.html new file mode 100644 index 00000000000..c0b2089a1c5 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2trace__gen__inv__quad__form__ldlt_8hpp_source.html @@ -0,0 +1,173 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/trace_gen_inv_quad_form_ldlt.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
trace_gen_inv_quad_form_ldlt.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_TRACE_GEN_INV_QUAD_FORM_LDLT_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_TRACE_GEN_INV_QUAD_FORM_LDLT_HPP
+
3 
+ + + + + + + + + +
13 
+
14 namespace stan {
+
15  namespace math {
+
16 
+
17  /*
+
18  * Compute the trace of an inverse quadratic form. I.E., this computes
+
19  * trace(D B^T A^-1 B)
+
20  * where D is a square matrix and the LDLT_factor of A is provided.
+
21  */
+
22  template <typename T1, typename T2, typename T3,
+
23  int R1, int C1, int R2, int C2, int R3, int C3>
+
24  inline typename
+
25  boost::enable_if_c<!stan::is_var<T1>::value &&
+ + +
28  typename
+
29  boost::math::tools::promote_args<T1, T2, T3>::type>::type
+
30  trace_gen_inv_quad_form_ldlt(const Eigen::Matrix<T1, R1, C1> &D,
+ +
32  const Eigen::Matrix<T3, R3, C3> &B) {
+
33  stan::math::check_square("trace_gen_inv_quad_form_ldlt", "D", D);
+
34  stan::math::check_multiplicable("trace_gen_inv_quad_form_ldlt",
+
35  "A", A,
+
36  "B", B);
+
37  stan::math::check_multiplicable("trace_gen_inv_quad_form_ldlt",
+
38  "B", B,
+
39  "D", D);
+
40 
+
41  return trace(multiply(multiply(D, transpose(B)),
+
42  mdivide_left_ldlt(A, B)));
+
43  }
+
44 
+
45  }
+
46 }
+
47 #endif
+ + + +
Eigen::Matrix< fvar< T >, R1, C1 > multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m, const fvar< T > &c)
Definition: multiply.hpp:20
+
boost::enable_if_c<!stan::is_var< T1 >::value &&!stan::is_var< T2 >::value &&!stan::is_var< T3 >::value, typename boost::math::tools::promote_args< T1, T2, T3 >::type >::type trace_gen_inv_quad_form_ldlt(const Eigen::Matrix< T1, R1, C1 > &D, const stan::math::LDLT_factor< T2, R2, C2 > &A, const Eigen::Matrix< T3, R3, C3 > &B)
+ + + + + +
Eigen::Matrix< fvar< T2 >, R1, C2 > mdivide_left_ldlt(const stan::math::LDLT_factor< double, R1, C1 > &A, const Eigen::Matrix< fvar< T2 >, R2, C2 > &b)
Returns the solution of the system Ax=b given an LDLT_factor of A.
+
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+ +
T trace(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
Returns the trace of the specified matrix.
Definition: trace.hpp:20
+ +
Eigen::Matrix< T, C, R > transpose(const Eigen::Matrix< T, R, C > &m)
Definition: transpose.hpp:12
+
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2trace__gen__quad__form_8hpp.html b/doc/api/html/prim_2mat_2fun_2trace__gen__quad__form_8hpp.html new file mode 100644 index 00000000000..ef6918cb410 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2trace__gen__quad__form_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/trace_gen_quad_form.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
trace_gen_quad_form.hpp File Reference
+
+
+
#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/err/check_multiplicable.hpp>
+#include <stan/math/prim/mat/err/check_square.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<int RD, int CD, int RA, int CA, int RB, int CB>
double stan::math::trace_gen_quad_form (const Eigen::Matrix< double, RD, CD > &D, const Eigen::Matrix< double, RA, CA > &A, const Eigen::Matrix< double, RB, CB > &B)
 Compute trace(D B^T A B). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2trace__gen__quad__form_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2trace__gen__quad__form_8hpp_source.html new file mode 100644 index 00000000000..8a4e2b4b2e0 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2trace__gen__quad__form_8hpp_source.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/trace_gen_quad_form.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
trace_gen_quad_form.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_TRACE_GEN_QUAD_FORM_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_TRACE_GEN_QUAD_FORM_HPP
+
3 
+
4 #include <boost/utility/enable_if.hpp>
+
5 #include <boost/type_traits.hpp>
+ + + +
9 
+
10 namespace stan {
+
11  namespace math {
+
15  template<int RD, int CD, int RA, int CA, int RB, int CB>
+
16  inline double
+
17  trace_gen_quad_form(const Eigen::Matrix<double, RD, CD> &D,
+
18  const Eigen::Matrix<double, RA, CA> &A,
+
19  const Eigen::Matrix<double, RB, CB> &B) {
+
20  stan::math::check_square("trace_gen_quad_form", "A", A);
+
21  stan::math::check_square("trace_gen_quad_form", "D", D);
+
22  stan::math::check_multiplicable("trace_gen_quad_form",
+
23  "A", A,
+
24  "B", B);
+
25  stan::math::check_multiplicable("trace_gen_quad_form",
+
26  "B", B,
+
27  "D", D);
+
28  return (D*B.transpose()*A*B).trace();
+
29  }
+
30  }
+
31 }
+
32 
+
33 #endif
+
34 
+ +
fvar< T > trace_gen_quad_form(const Eigen::Matrix< fvar< T >, RD, CD > &D, const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, CB > &B)
+
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+ +
T trace(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
Returns the trace of the specified matrix.
Definition: trace.hpp:20
+
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp.html b/doc/api/html/prim_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp.html new file mode 100644 index 00000000000..0a70cb3f9af --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/trace_inv_quad_form_ldlt.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
trace_inv_quad_form_ldlt.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T1 , typename T2 , int R2, int C2, int R3, int C3>
boost::enable_if_c
+<!stan::is_var< T1 >::value
+&&!stan::is_var< T2 >::value,
+typename
+boost::math::tools::promote_args
+< T1, T2 >::type >::type 
stan::math::trace_inv_quad_form_ldlt (const stan::math::LDLT_factor< T1, R2, C2 > &A, const Eigen::Matrix< T2, R3, C3 > &B)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp_source.html new file mode 100644 index 00000000000..46e73733bee --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp_source.html @@ -0,0 +1,162 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/trace_inv_quad_form_ldlt.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
trace_inv_quad_form_ldlt.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_TRACE_INV_QUAD_FORM_LDLT_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_TRACE_INV_QUAD_FORM_LDLT_HPP
+
3 
+ + + + + + + + +
12 
+
13 namespace stan {
+
14  namespace math {
+
15 
+
16  /*
+
17  * Compute the trace of an inverse quadratic form. I.E., this computes
+
18  * trace(B^T A^-1 B)
+
19  * where the LDLT_factor of A is provided.
+
20  */
+
21  template <typename T1, typename T2, int R2, int C2, int R3, int C3>
+
22  inline typename
+
23  boost::enable_if_c<!stan::is_var<T1>::value &&
+ +
25  typename
+
26  boost::math::tools::promote_args<T1, T2>::type>::type
+ +
28  const Eigen::Matrix<T2, R3, C3> &B) {
+
29  stan::math::check_multiplicable("trace_inv_quad_form_ldlt",
+
30  "A", A,
+
31  "B", B);
+
32 
+
33  return trace(multiply(transpose(B), mdivide_left_ldlt(A, B)));
+
34  }
+
35  }
+
36 }
+
37 
+
38 #endif
+ + + +
Eigen::Matrix< fvar< T >, R1, C1 > multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m, const fvar< T > &c)
Definition: multiply.hpp:20
+
boost::enable_if_c<!stan::is_var< T1 >::value &&!stan::is_var< T2 >::value, typename boost::math::tools::promote_args< T1, T2 >::type >::type trace_inv_quad_form_ldlt(const stan::math::LDLT_factor< T1, R2, C2 > &A, const Eigen::Matrix< T2, R3, C3 > &B)
+ + + + + +
Eigen::Matrix< fvar< T2 >, R1, C2 > mdivide_left_ldlt(const stan::math::LDLT_factor< double, R1, C1 > &A, const Eigen::Matrix< fvar< T2 >, R2, C2 > &b)
Returns the solution of the system Ax=b given an LDLT_factor of A.
+
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+ +
T trace(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
Returns the trace of the specified matrix.
Definition: trace.hpp:20
+ +
Eigen::Matrix< T, C, R > transpose(const Eigen::Matrix< T, R, C > &m)
Definition: transpose.hpp:12
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2trace__quad__form_8hpp.html b/doc/api/html/prim_2mat_2fun_2trace__quad__form_8hpp.html new file mode 100644 index 00000000000..691e4cbf78c --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2trace__quad__form_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/trace_quad_form.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
trace_quad_form.hpp File Reference
+
+
+
#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/err/check_multiplicable.hpp>
+#include <stan/math/prim/mat/err/check_square.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<int RA, int CA, int RB, int CB>
double stan::math::trace_quad_form (const Eigen::Matrix< double, RA, CA > &A, const Eigen::Matrix< double, RB, CB > &B)
 Compute trace(B^T A B). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2trace__quad__form_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2trace__quad__form_8hpp_source.html new file mode 100644 index 00000000000..ad538606efd --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2trace__quad__form_8hpp_source.html @@ -0,0 +1,143 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/trace_quad_form.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
trace_quad_form.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_TRACE_QUAD_FORM_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_TRACE_QUAD_FORM_HPP
+
3 
+
4 #include <boost/utility/enable_if.hpp>
+
5 #include <boost/type_traits.hpp>
+ + + +
9 
+
10 namespace stan {
+
11  namespace math {
+
15  template<int RA, int CA, int RB, int CB>
+
16  inline double
+
17  trace_quad_form(const Eigen::Matrix<double, RA, CA> &A,
+
18  const Eigen::Matrix<double, RB, CB> &B) {
+
19  stan::math::check_square("trace_quad_form", "A", A);
+
20  stan::math::check_multiplicable("trace_quad_form",
+
21  "A", A,
+
22  "B", B);
+
23 
+
24  return (B.transpose()*A*B).trace();
+
25  }
+
26 
+
27  }
+
28 }
+
29 
+
30 #endif
+
31 
+ +
fvar< T > trace_quad_form(const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, CB > &B)
+
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+ +
T trace(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
Returns the trace of the specified matrix.
Definition: trace.hpp:20
+
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2typedefs_8hpp.html b/doc/api/html/prim_2mat_2fun_2typedefs_8hpp.html new file mode 100644 index 00000000000..0196a2c4b07 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2typedefs_8hpp.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/typedefs.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
typedefs.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Typedefs

typedef Eigen::Matrix< double,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::matrix_d
 Type for matrix of double values. More...
 
typedef Eigen::Matrix< double,
+Eigen::Dynamic, 1 > 
stan::math::vector_d
 Type for (column) vector of double values. More...
 
typedef Eigen::Matrix< double,
+1, Eigen::Dynamic > 
stan::math::row_vector_d
 Type for (row) vector of double values. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2typedefs_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2typedefs_8hpp_source.html new file mode 100644 index 00000000000..9184380a54f --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2typedefs_8hpp_source.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/typedefs.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
typedefs.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_TYPEDEFS_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_TYPEDEFS_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
14  typedef
+
15  index_type<Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> >::type
+
16  size_type;
+
17 
+
21  typedef
+
22  Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>
+ +
24 
+
28  typedef
+
29  Eigen::Matrix<double, Eigen::Dynamic, 1>
+ +
31 
+
35  typedef
+
36  Eigen::Matrix<double, 1, Eigen::Dynamic>
+ +
38 
+
39  }
+
40 }
+
41 
+
42 #endif
+
Eigen::Matrix< double, Eigen::Dynamic, 1 > vector_d
Type for (column) vector of double values.
Definition: typedefs.hpp:30
+
Eigen::Matrix< double, 1, Eigen::Dynamic > row_vector_d
Type for (row) vector of double values.
Definition: typedefs.hpp:37
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+ + +
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > matrix_d
Type for matrix of double values.
Definition: typedefs.hpp:23
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2value__of_8hpp.html b/doc/api/html/prim_2mat_2fun_2value__of_8hpp.html new file mode 100644 index 00000000000..46bb94f048a --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2value__of_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/value_of.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
value_of.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T , int R, int C>
Eigen::Matrix< typename
+child_type< T >::type, R, C > 
stan::math::value_of (const Eigen::Matrix< T, R, C > &M)
 Convert a matrix of type T to a matrix of doubles. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2value__of_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2value__of_8hpp_source.html new file mode 100644 index 00000000000..9fccf404e07 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2value__of_8hpp_source.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/value_of.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
value_of.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_VALUE_OF_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_VALUE_OF_HPP
+
3 
+ + + +
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
23  template <typename T, int R, int C>
+
24  inline Eigen::Matrix<typename child_type<T>::type, R, C>
+
25  value_of(const Eigen::Matrix<T, R, C>& M) {
+ +
27  Eigen::Matrix<typename child_type<T>::type, R, C> Md(M.rows(), M.cols());
+
28  for (int j = 0; j < M.cols(); j++)
+
29  for (int i = 0; i < M.rows(); i++)
+
30  Md(i, j) = value_of(M(i, j));
+
31  return Md;
+
32  }
+
33  }
+
34 }
+
35 
+
36 #endif
+
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2value__of__rec_8hpp.html b/doc/api/html/prim_2mat_2fun_2value__of__rec_8hpp.html new file mode 100644 index 00000000000..d59b0924a23 --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2value__of__rec_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/value_of_rec.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
value_of_rec.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T , int R, int C>
Eigen::Matrix< double, R, C > stan::math::value_of_rec (const Eigen::Matrix< T, R, C > &M)
 Convert a matrix of type T to a matrix of doubles. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2value__of__rec_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2value__of__rec_8hpp_source.html new file mode 100644 index 00000000000..c7728416f0b --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2value__of__rec_8hpp_source.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/value_of_rec.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
value_of_rec.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_VALUE_OF_REC_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_VALUE_OF_REC_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
22  template <typename T, int R, int C>
+
23  inline Eigen::Matrix<double, R, C>
+
24  value_of_rec(const Eigen::Matrix<T, R, C>& M) {
+ +
26  Eigen::Matrix<double, R, C> Md(M.rows(), M.cols());
+
27  for (int j = 0; j < M.cols(); j++)
+
28  for (int i = 0; i < M.rows(); i++)
+
29  Md(i, j) = value_of_rec(M(i, j));
+
30  return Md;
+
31  }
+
32  }
+
33 }
+
34 
+
35 #endif
+
double value_of_rec(const fvar< T > &v)
Return the value of the specified variable.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2variance_8hpp.html b/doc/api/html/prim_2mat_2fun_2variance_8hpp.html new file mode 100644 index 00000000000..cc64fb5f8ca --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2variance_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/variance.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
variance.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/fun/mean.hpp>
+#include <stan/math/prim/scal/err/check_nonzero_size.hpp>
+#include <boost/math/tools/promotion.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
boost::math::tools::promote_args
+< T >::type 
stan::math::variance (const std::vector< T > &v)
 Returns the sample variance (divide by length - 1) of the coefficients in the specified standard vector. More...
 
template<typename T , int R, int C>
boost::math::tools::promote_args
+< T >::type 
stan::math::variance (const Eigen::Matrix< T, R, C > &m)
 Returns the sample variance (divide by length - 1) of the coefficients in the specified column vector. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2mat_2fun_2variance_8hpp_source.html b/doc/api/html/prim_2mat_2fun_2variance_8hpp_source.html new file mode 100644 index 00000000000..40a7a53d04b --- /dev/null +++ b/doc/api/html/prim_2mat_2fun_2variance_8hpp_source.html @@ -0,0 +1,165 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/variance.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
variance.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_VARIANCE_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_VARIANCE_HPP
+
3 
+ + + +
7 #include <boost/math/tools/promotion.hpp>
+
8 #include <vector>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
21  template <typename T>
+
22  inline
+
23  typename boost::math::tools::promote_args<T>::type
+
24  variance(const std::vector<T>& v) {
+
25  stan::math::check_nonzero_size("variance", "v", v);
+
26  if (v.size() == 1)
+
27  return 0.0;
+
28  T v_mean(mean(v));
+
29  T sum_sq_diff(0);
+
30  for (size_t i = 0; i < v.size(); ++i) {
+
31  T diff = v[i] - v_mean;
+
32  sum_sq_diff += diff * diff;
+
33  }
+
34  return sum_sq_diff / (v.size() - 1);
+
35  }
+
36 
+
43  template <typename T, int R, int C>
+
44  inline
+
45  typename boost::math::tools::promote_args<T>::type
+
46  variance(const Eigen::Matrix<T, R, C>& m) {
+
47  stan::math::check_nonzero_size("variance", "m", m);
+
48 
+
49  if (m.size() == 1)
+
50  return 0.0;
+
51  typename boost::math::tools::promote_args<T>::type
+
52  mn(mean(m));
+
53  typename boost::math::tools::promote_args<T>::type
+
54  sum_sq_diff(0);
+
55  for (int i = 0; i < m.size(); ++i) {
+
56  typename boost::math::tools::promote_args<T>::type
+
57  diff = m(i) - mn;
+
58  sum_sq_diff += diff * diff;
+
59  }
+
60  return sum_sq_diff / (m.size() - 1);
+
61  }
+
62 
+
63  }
+
64 }
+
65 #endif
+
bool check_nonzero_size(const char *function, const char *name, const T_y &y)
Return true if the specified matrix/vector is of non-zero size.
+
boost::math::tools::promote_args< T >::type variance(const std::vector< T > &v)
Returns the sample variance (divide by length - 1) of the coefficients in the specified standard vect...
Definition: variance.hpp:24
+ +
boost::math::tools::promote_args< T >::type mean(const std::vector< T > &v)
Returns the sample mean (i.e., average) of the coefficients in the specified standard vector...
Definition: mean.hpp:23
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2_phi_8hpp.html b/doc/api/html/prim_2scal_2fun_2_phi_8hpp.html new file mode 100644 index 00000000000..24bc4288866 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2_phi_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/Phi.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
Phi.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+#include <boost/math/special_functions/erf.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
boost::math::tools::promote_args
+< T >::type 
stan::math::Phi (const T x)
 The unit normal cumulative distribution function. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2_phi_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2_phi_8hpp_source.html new file mode 100644 index 00000000000..d1a5aa6d80d --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2_phi_8hpp_source.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/Phi.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
Phi.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_PHI_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_PHI_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+
5 #include <boost/math/special_functions/erf.hpp>
+ + +
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
29  template <typename T>
+
30  inline typename boost::math::tools::promote_args<T>::type
+
31  Phi(const T x) {
+
32  // overridden in fvar and var, so can hard-code boost versions
+
33  // here for scalars only
+ +
35 
+
36  check_not_nan("Phi", "x", x);
+
37  if (x < -37.5)
+
38  return 0;
+
39  else if (x < -5.0)
+
40  return 0.5 * boost::math::erfc(-INV_SQRT_2 * x);
+
41  else if (x > 8.25)
+
42  return 1;
+
43  else
+
44  return 0.5 * (1.0 + boost::math::erf(INV_SQRT_2 * x));
+
45  }
+
46 
+
47  }
+
48 }
+
49 
+
50 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+
fvar< T > erf(const fvar< T > &x)
Definition: erf.hpp:14
+
const double INV_SQRT_2
The value of 1 over the square root of 2, .
Definition: constants.hpp:27
+
fvar< T > Phi(const fvar< T > &x)
Definition: Phi.hpp:14
+ +
fvar< T > erfc(const fvar< T > &x)
Definition: erfc.hpp:14
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2_phi__approx_8hpp.html b/doc/api/html/prim_2scal_2fun_2_phi__approx_8hpp.html new file mode 100644 index 00000000000..0f504fcbca5 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2_phi__approx_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/Phi_approx.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
Phi_approx.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+#include <stan/math/prim/scal/fun/inv_logit.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
boost::math::tools::promote_args
+< T >::type 
stan::math::Phi_approx (T x)
 Approximation of the unit normal CDF. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2_phi__approx_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2_phi__approx_8hpp_source.html new file mode 100644 index 00000000000..9532b3ce4d9 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2_phi__approx_8hpp_source.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/Phi_approx.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
Phi_approx.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_PHI_APPROX_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_PHI_APPROX_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+ +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
21  template <typename T>
+
22  inline typename boost::math::tools::promote_args<T>::type
+
23  Phi_approx(T x) {
+
24  using std::pow;
+
25  return inv_logit(0.07056 * pow(x, 3.0) + 1.5976 * x);
+
26  }
+
27 
+
28  }
+
29 }
+
30 
+
31 #endif
+
fvar< T > inv_logit(const fvar< T > &x)
Definition: inv_logit.hpp:15
+
boost::math::tools::promote_args< T >::type Phi_approx(T x)
Approximation of the unit normal CDF.
Definition: Phi_approx.hpp:23
+
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2abs_8hpp.html b/doc/api/html/prim_2scal_2fun_2abs_8hpp.html new file mode 100644 index 00000000000..a36bd2c8960 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2abs_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/abs.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
abs.hpp File Reference
+
+
+
#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

double stan::math::abs (double x)
 Return floating-point absolute value. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2abs_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2abs_8hpp_source.html new file mode 100644 index 00000000000..80ba8f732e8 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2abs_8hpp_source.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/abs.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
abs.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_ABS_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_ABS_HPP
+
3 
+
4 #include <cmath>
+
5 
+
6 namespace stan {
+
7 
+
8  namespace math {
+
9 
+
19  double abs(double x) {
+
20  return std::fabs(x);
+
21  }
+
22 
+
23  }
+
24 }
+
25 
+
26 #endif
+
fvar< T > abs(const fvar< T > &x)
Definition: abs.hpp:15
+
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:14
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2as__bool_8hpp.html b/doc/api/html/prim_2scal_2fun_2as__bool_8hpp.html new file mode 100644 index 00000000000..1ada6945ef8 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2as__bool_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/as_bool.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
as_bool.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
bool stan::math::as_bool (const T x)
 Return 1 if the argument is unequal to zero and 0 otherwise. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2as__bool_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2as__bool_8hpp_source.html new file mode 100644 index 00000000000..7eedc035c6d --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2as__bool_8hpp_source.html @@ -0,0 +1,124 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/as_bool.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
as_bool.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_AS_BOOL_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_AS_BOOL_HPP
+
3 
+
4 namespace stan {
+
5  namespace math {
+
6 
+
13  template <typename T>
+
14  inline bool as_bool(const T x) {
+
15  return x != 0;
+
16  }
+
17 
+
18  }
+
19 }
+
20 
+
21 #endif
+
bool as_bool(const T x)
Return 1 if the argument is unequal to zero and 0 otherwise.
Definition: as_bool.hpp:14
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2bessel__first__kind_8hpp.html b/doc/api/html/prim_2scal_2fun_2bessel__first__kind_8hpp.html new file mode 100644 index 00000000000..0023fe41548 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2bessel__first__kind_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/bessel_first_kind.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
bessel_first_kind.hpp File Reference
+
+
+
#include <boost/math/special_functions/bessel.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T2 >
T2 stan::math::bessel_first_kind (const int v, const T2 z)
 

+\[ \mbox{bessel\_first\_kind}(v, x) = \begin{cases} J_v(x) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{error} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+ More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2bessel__first__kind_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2bessel__first__kind_8hpp_source.html new file mode 100644 index 00000000000..3d89d5813d7 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2bessel__first__kind_8hpp_source.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/bessel_first_kind.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
bessel_first_kind.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_BESSEL_FIRST_KIND_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_BESSEL_FIRST_KIND_HPP
+
3 
+
4 #include <boost/math/special_functions/bessel.hpp>
+ +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
38  template<typename T2>
+
39  inline T2
+
40  bessel_first_kind(const int v, const T2 z) {
+ +
42 
+
43  check_not_nan("bessel_first_kind", "z", z);
+
44  return boost::math::cyl_bessel_j(v, z);
+
45  }
+
46 
+
47  }
+
48 }
+
49 
+
50 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+
fvar< T > bessel_first_kind(int v, const fvar< T > &z)
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2bessel__second__kind_8hpp.html b/doc/api/html/prim_2scal_2fun_2bessel__second__kind_8hpp.html new file mode 100644 index 00000000000..9f31c25d27b --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2bessel__second__kind_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/bessel_second_kind.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
bessel_second_kind.hpp File Reference
+
+
+
#include <boost/math/special_functions/bessel.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T2 >
T2 stan::math::bessel_second_kind (const int v, const T2 z)
 

+\[ \mbox{bessel\_second\_kind}(v, x) = \begin{cases} \textrm{error} & \mbox{if } x \leq 0 \\ Y_v(x) & \mbox{if } x > 0 \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+ More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2bessel__second__kind_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2bessel__second__kind_8hpp_source.html new file mode 100644 index 00000000000..51bc2550fee --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2bessel__second__kind_8hpp_source.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/bessel_second_kind.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
bessel_second_kind.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_BESSEL_SECOND_KIND_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_BESSEL_SECOND_KIND_HPP
+
3 
+
4 #include <boost/math/special_functions/bessel.hpp>
+
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
38  template <typename T2>
+
39  inline T2
+
40  bessel_second_kind(const int v, const T2 z) {
+
41  return boost::math::cyl_neumann(v, z);
+
42  }
+
43 
+
44  }
+
45 }
+
46 
+
47 #endif
+
fvar< T > bessel_second_kind(int v, const fvar< T > &z)
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2binary__log__loss_8hpp.html b/doc/api/html/prim_2scal_2fun_2binary__log__loss_8hpp.html new file mode 100644 index 00000000000..70ad884ce1c --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2binary__log__loss_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/binary_log_loss.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
binary_log_loss.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
boost::math::tools::promote_args
+< T >::type 
stan::math::binary_log_loss (const int y, const T y_hat)
 Returns the log loss function for binary classification with specified reference and response values. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2binary__log__loss_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2binary__log__loss_8hpp_source.html new file mode 100644 index 00000000000..94e554c0a96 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2binary__log__loss_8hpp_source.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/binary_log_loss.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
binary_log_loss.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_BINARY_LOG_LOSS_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_BINARY_LOG_LOSS_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
24  template <typename T>
+
25  inline typename boost::math::tools::promote_args<T>::type
+
26  binary_log_loss(const int y, const T y_hat) {
+
27  using std::log;
+
28  return -log(y ? y_hat : (1.0 - y_hat));
+
29  }
+
30 
+
31  }
+
32 }
+
33 
+
34 #endif
+
fvar< T > binary_log_loss(const int y, const fvar< T > &y_hat)
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2binomial__coefficient__log_8hpp.html b/doc/api/html/prim_2scal_2fun_2binomial__coefficient__log_8hpp.html new file mode 100644 index 00000000000..80d0925385e --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2binomial__coefficient__log_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/binomial_coefficient_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
binomial_coefficient_log.hpp File Reference
+
+
+
#include <boost/math/special_functions/gamma.hpp>
+#include <boost/math/tools/promotion.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_N , typename T_n >
boost::math::tools::promote_args
+< T_N, T_n >::type 
stan::math::binomial_coefficient_log (const T_N N, const T_n n)
 Return the log of the binomial coefficient for the specified arguments. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2binomial__coefficient__log_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2binomial__coefficient__log_8hpp_source.html new file mode 100644 index 00000000000..58cdbab36be --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2binomial__coefficient__log_8hpp_source.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/binomial_coefficient_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
binomial_coefficient_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_BINOMIAL_COEFFICIENT_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_BINOMIAL_COEFFICIENT_LOG_HPP
+
3 
+
4 #include <boost/math/special_functions/gamma.hpp>
+
5 #include <boost/math/tools/promotion.hpp>
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
61  template <typename T_N, typename T_n>
+
62  inline typename boost::math::tools::promote_args<T_N, T_n>::type
+
63  binomial_coefficient_log(const T_N N, const T_n n) {
+
64  using std::log;
+
65  using boost::math::lgamma;
+
66 
+
67  const double cutoff = 1000;
+
68  if ((N < cutoff) || (N - n < cutoff)) {
+
69  return lgamma(N + 1.0) - lgamma(n + 1.0) - lgamma(N - n + 1.0);
+
70  } else {
+
71  return n * log(N - n) + (N + 0.5) * log(N/(N-n))
+
72  + 1/(12*N) - n - 1/(12*(N-n)) - lgamma(n + 1.0);
+
73  }
+
74  }
+
75 
+
76  }
+
77 }
+
78 
+
79 #endif
+
fvar< T > binomial_coefficient_log(const fvar< T > &x1, const fvar< T > &x2)
+
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2digamma_8hpp.html b/doc/api/html/prim_2scal_2fun_2digamma_8hpp.html new file mode 100644 index 00000000000..3730d1863c0 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2digamma_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/digamma.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
digamma.hpp File Reference
+
+
+
#include <boost/math/special_functions/digamma.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

double stan::math::digamma (double x)
 

+\[ \mbox{digamma}(x) = \begin{cases} \textrm{error} & \mbox{if } x\in \{\dots, -3, -2, -1, 0\}\\ \Psi(x) & \mbox{if } x\not\in \{\dots, -3, -2, -1, 0\}\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+ More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2digamma_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2digamma_8hpp_source.html new file mode 100644 index 00000000000..af281a47d59 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2digamma_8hpp_source.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/digamma.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
digamma.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_DIGAMMA_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_DIGAMMA_HPP
+
3 
+
4 #include <boost/math/special_functions/digamma.hpp>
+
5 
+
6 namespace stan {
+
7 
+
8  namespace math {
+
9 
+
39  double digamma(double x) {
+
40  return boost::math::digamma(x);
+
41  }
+
42 
+
43  }
+
44 }
+
45 
+
46 #endif
+
var digamma(const stan::math::var &a)
Definition: digamma.hpp:24
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2divide_8hpp.html b/doc/api/html/prim_2scal_2fun_2divide_8hpp.html new file mode 100644 index 00000000000..c35509d1aba --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2divide_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/divide.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
divide.hpp File Reference
+
+
+
#include <cstddef>
+#include <cstdlib>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + +

+Functions

int stan::math::divide (const int x, const int y)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2divide_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2divide_8hpp_source.html new file mode 100644 index 00000000000..ad8679fc2d8 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2divide_8hpp_source.html @@ -0,0 +1,126 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/divide.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
divide.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_DIVIDE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_DIVIDE_HPP
+
3 
+
4 #include <cstddef>
+
5 #include <cstdlib>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  inline int divide(const int x, const int y) {
+
11  return std::div(x, y).quot;
+
12  }
+
13 
+
14  }
+
15 }
+
16 
+
17 #endif
+
stan::return_type< T1, T2 >::type divide(const T1 &v, const T2 &c)
Definition: divide.hpp:17
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2exp2_8hpp.html b/doc/api/html/prim_2scal_2fun_2exp2_8hpp.html new file mode 100644 index 00000000000..da35ad58b6a --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2exp2_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/exp2.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
exp2.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
boost::math::tools::promote_args
+< T >::type 
stan::math::exp2 (const T y)
 Return the exponent base 2 of the specified argument (C99). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2exp2_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2exp2_8hpp_source.html new file mode 100644 index 00000000000..8925f2f72b2 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2exp2_8hpp_source.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/exp2.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
exp2.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_EXP2_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_EXP2_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+
5 #include <cmath>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
21  template <typename T>
+
22  inline typename boost::math::tools::promote_args<T>::type
+
23  exp2(const T y) {
+
24  using std::pow;
+
25  return pow(2.0, y);
+
26  }
+
27 
+
28  }
+
29 }
+
30 #endif
+
fvar< T > exp2(const fvar< T > &x)
Definition: exp2.hpp:14
+
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2falling__factorial_8hpp.html b/doc/api/html/prim_2scal_2fun_2falling__factorial_8hpp.html new file mode 100644 index 00000000000..2087f7fd8b7 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2falling__factorial_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/falling_factorial.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
falling_factorial.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T1 , typename T2 >
boost::math::tools::promote_args
+< T1, T2 >::type 
stan::math::falling_factorial (const T1 x, const T2 n)
 

+\[ \mbox{falling\_factorial}(x, n) = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ (x)_n & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +

+ More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2falling__factorial_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2falling__factorial_8hpp_source.html new file mode 100644 index 00000000000..48cb8323ee4 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2falling__factorial_8hpp_source.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/falling_factorial.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
falling_factorial.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_FALLING_FACTORIAL_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_FALLING_FACTORIAL_HPP
+
3 
+ +
5 #include <cmath>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
52  template<typename T1, typename T2>
+
53  inline typename boost::math::tools::promote_args<T1, T2>::type
+
54  falling_factorial(const T1 x, const T2 n) {
+
55  using std::exp;
+
56  return exp(log_falling_factorial(x, n));
+
57  }
+
58 
+
59  }
+
60 }
+
61 
+
62 #endif
+
fvar< T > log_falling_factorial(const fvar< T > &x, const fvar< T > &n)
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
fvar< T > falling_factorial(const fvar< T > &x, const fvar< T > &n)
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2fdim_8hpp.html b/doc/api/html/prim_2scal_2fun_2fdim_8hpp.html new file mode 100644 index 00000000000..ff064c6fd85 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2fdim_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/fdim.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
fdim.hpp File Reference
+
+
+
#include <math.h>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <boost/math/tools/promotion.hpp>
+#include <cmath>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T1 , typename T2 >
boost::math::tools::promote_args
+< T1, T2 >::type 
stan::math::fdim (T1 a, T2 b)
 The positive difference function (C99). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2fdim_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2fdim_8hpp_source.html new file mode 100644 index 00000000000..6fbba66f81b --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2fdim_8hpp_source.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/fdim.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
fdim.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_FDIM_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_FDIM_HPP
+
3 
+
4 #include <math.h>
+
5 #include <boost/math/special_functions/fpclassify.hpp>
+
6 #include <boost/math/tools/promotion.hpp>
+
7 #include <cmath>
+
8 #include <limits>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
24  template <typename T1, typename T2>
+
25  inline typename boost::math::tools::promote_args<T1, T2>::type
+
26  fdim(T1 a, T2 b) {
+ +
28  using std::numeric_limits;
+
29  using boost::math::tools::promote_args;
+ +
31  return numeric_limits<typename promote_args<T1, T2>::type>::quiet_NaN();
+
32  return fdim(a, b);
+
33  }
+
34  }
+
35 }
+
36 
+
37 #endif
+
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
+
fvar< T > fdim(const fvar< T > &x1, const fvar< T > &x2)
Definition: fdim.hpp:11
+
var fdim(const stan::math::var &a, const double &b)
Return the positive difference between the first variable's value and the second value (C99)...
Definition: fdim.hpp:158
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2gamma__p_8hpp.html b/doc/api/html/prim_2scal_2fun_2gamma__p_8hpp.html new file mode 100644 index 00000000000..e9ad91b3096 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2gamma__p_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/gamma_p.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
gamma_p.hpp File Reference
+
+
+
#include <boost/math/special_functions/gamma.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

double stan::math::gamma_p (double x, double a)
 

+\[ \mbox{gamma\_p}(a, z) = \begin{cases} \textrm{error} & \mbox{if } a\leq 0 \textrm{ or } z < 0\\ P(a, z) & \mbox{if } a > 0, z \geq 0 \\[6pt] \textrm{NaN} & \mbox{if } a = \textrm{NaN or } z = \textrm{NaN} \end{cases} \] +

+ More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2gamma__p_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2gamma__p_8hpp_source.html new file mode 100644 index 00000000000..5cfa806934e --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2gamma__p_8hpp_source.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/gamma_p.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
gamma_p.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_GAMMA_P_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_GAMMA_P_HPP
+
3 
+
4 #include <boost/math/special_functions/gamma.hpp>
+
5 
+
6 namespace stan {
+
7 
+
8  namespace math {
+
9 
+
52  // throws domain_error if x is at pole
+
53  double gamma_p(double x, double a) {
+
54  return boost::math::gamma_p(x, a);
+
55  }
+
56 
+
57  }
+
58 }
+
59 
+
60 #endif
+
var gamma_p(const double &a, const stan::math::var &b)
Definition: gamma_p.hpp:114
+
fvar< T > gamma_p(const fvar< T > &x1, const fvar< T > &x2)
Definition: gamma_p.hpp:15
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2gamma__q_8hpp.html b/doc/api/html/prim_2scal_2fun_2gamma__q_8hpp.html new file mode 100644 index 00000000000..719da33f2b8 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2gamma__q_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/gamma_q.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
gamma_q.hpp File Reference
+
+
+
#include <boost/math/special_functions/gamma.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

double stan::math::gamma_q (double x, double a)
 

+\[ \mbox{gamma\_q}(a, z) = \begin{cases} \textrm{error} & \mbox{if } a\leq 0 \textrm{ or } z < 0\\ Q(a, z) & \mbox{if } a > 0, z \geq 0 \\[6pt] \textrm{NaN} & \mbox{if } a = \textrm{NaN or } z = \textrm{NaN} \end{cases} \] +

+ More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2gamma__q_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2gamma__q_8hpp_source.html new file mode 100644 index 00000000000..f262485daef --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2gamma__q_8hpp_source.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/gamma_q.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
gamma_q.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_GAMMA_Q_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_GAMMA_Q_HPP
+
3 
+
4 #include <boost/math/special_functions/gamma.hpp>
+
5 
+
6 namespace stan {
+
7 
+
8  namespace math {
+
9 
+
52  // throws domain_error if x is at pole
+
53  double gamma_q(double x, double a) {
+
54  return boost::math::gamma_q(x, a);
+
55  }
+
56 
+
57  }
+
58 }
+
59 
+
60 #endif
+
var gamma_q(const double &a, const stan::math::var &b)
Definition: gamma_q.hpp:68
+
fvar< T > gamma_q(const fvar< T > &x1, const fvar< T > &x2)
Definition: gamma_q.hpp:15
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2grad__inc__beta_8hpp.html b/doc/api/html/prim_2scal_2fun_2grad__inc__beta_8hpp.html new file mode 100644 index 00000000000..567d851fea6 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2grad__inc__beta_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/grad_inc_beta.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
grad_inc_beta.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + +

+Functions

void stan::math::grad_inc_beta (double &g1, double &g2, double a, double b, double z)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2grad__inc__beta_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2grad__inc__beta_8hpp_source.html new file mode 100644 index 00000000000..75817da902a --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2grad__inc__beta_8hpp_source.html @@ -0,0 +1,157 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/grad_inc_beta.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
grad_inc_beta.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_GRAD_INC_BETA_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_GRAD_INC_BETA_HPP
+
3 
+ + + + +
8 #include <cmath>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
13  // Gradient of the incomplete beta function beta(a, b, z)
+
14  // with respect to the first two arguments, using the
+
15  // equivalence to a hypergeometric function.
+
16  // See http://dlmf.nist.gov/8.17#ii
+
17  void grad_inc_beta(double& g1, double& g2, double a, double b, double z) {
+
18  using stan::math::lbeta;
+ +
20  using stan::math::log1m;
+ +
22  using std::exp;
+
23  using std::log;
+
24 
+
25  double c1 = log(z);
+
26  double c2 = log1m(z);
+
27  double c3 = exp(lbeta(a, b)) * inc_beta(a, b, z);
+
28  double C = exp(a * c1 + b * c2) / a;
+
29  double dF1 = 0;
+
30  double dF2 = 0;
+
31  if (C) grad_2F1(dF1, dF2, a + b, 1.0, a + 1, z);
+
32  g1 = (c1 - 1.0 / a) * c3 + C * (dF1 + dF2);
+
33  g2 = c2 * c3 + C * dF1;
+
34  }
+
35 
+
36  }
+
37 }
+
38 #endif
+
fvar< T > lbeta(const fvar< T > &x1, const fvar< T > &x2)
Definition: lbeta.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
fvar< T > inc_beta(const fvar< T > &a, const fvar< T > &b, const fvar< T > &x)
Definition: inc_beta.hpp:20
+
void grad_inc_beta(stan::math::fvar< T > &g1, stan::math::fvar< T > &g2, stan::math::fvar< T > a, stan::math::fvar< T > b, stan::math::fvar< T > z)
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ + + + +
fvar< T > log1m(const fvar< T > &x)
Definition: log1m.hpp:16
+
void grad_2F1(T &gradA, T &gradC, T a, T b, T c, T z, T precision=1e-6)
Definition: grad_2F1.hpp:13
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2ibeta_8hpp.html b/doc/api/html/prim_2scal_2fun_2ibeta_8hpp.html new file mode 100644 index 00000000000..f4eadd64ec8 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2ibeta_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/ibeta.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
ibeta.hpp File Reference
+
+
+
#include <boost/math/special_functions/beta.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

double stan::math::ibeta (const double a, const double b, const double x)
 The normalized incomplete beta function of a, b, and x. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2ibeta_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2ibeta_8hpp_source.html new file mode 100644 index 00000000000..33d392a14dd --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2ibeta_8hpp_source.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/ibeta.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
ibeta.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_IBETA_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_IBETA_HPP
+
3 
+
4 #include <boost/math/special_functions/beta.hpp>
+ +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
23  inline double ibeta(const double a,
+
24  const double b,
+
25  const double x) {
+ +
27 
+
28  check_not_nan("ibeta", "a", a);
+
29  check_not_nan("ibeta", "b", b);
+
30  check_not_nan("ibeta", "x", x);
+
31  return boost::math::ibeta(a, b, x);
+
32  }
+
33 
+
34  }
+
35 }
+
36 
+
37 #endif
+ +
double ibeta(const double a, const double b, const double x)
The normalized incomplete beta function of a, b, and x.
Definition: ibeta.hpp:23
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+
var ibeta(const var &a, const var &b, const var &x)
The normalized incomplete beta function of a, b, and x.
Definition: ibeta.hpp:238
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2if__else_8hpp.html b/doc/api/html/prim_2scal_2fun_2if__else_8hpp.html new file mode 100644 index 00000000000..8e7307390d6 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2if__else_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/if_else.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
if_else.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_true , typename T_false >
boost::math::tools::promote_args
+< T_true, T_false >::type 
stan::math::if_else (const bool c, const T_true y_true, const T_false y_false)
 Return the second argument if the first argument is true and otherwise return the second argument. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2if__else_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2if__else_8hpp_source.html new file mode 100644 index 00000000000..d80974359cf --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2if__else_8hpp_source.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/if_else.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
if_else.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_IF_ELSE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_IF_ELSE_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
23  template <typename T_true, typename T_false>
+
24  inline typename boost::math::tools::promote_args<T_true, T_false>::type
+
25  if_else(const bool c, const T_true y_true, const T_false y_false) {
+
26  return c ? y_true : y_false;
+
27  }
+
28 
+
29  }
+
30 }
+
31 
+
32 #endif
+
boost::math::tools::promote_args< T_true, T_false >::type if_else(const bool c, const T_true y_true, const T_false y_false)
Return the second argument if the first argument is true and otherwise return the second argument...
Definition: if_else.hpp:25
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2inc__beta_8hpp.html b/doc/api/html/prim_2scal_2fun_2inc__beta_8hpp.html new file mode 100644 index 00000000000..89bb8bddf9f --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2inc__beta_8hpp.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/inc_beta.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inc_beta.hpp File Reference
+
+
+
#include <boost/math/special_functions/beta.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + +

+Functions

double stan::math::inc_beta (const double &a, const double &b, const double &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2inc__beta_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2inc__beta_8hpp_source.html new file mode 100644 index 00000000000..5079e27f77f --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2inc__beta_8hpp_source.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/inc_beta.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inc_beta.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_INC_BETA_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_INC_BETA_HPP
+
3 
+
4 #include <boost/math/special_functions/beta.hpp>
+
5 
+
6 namespace stan {
+
7 
+
8  namespace math {
+
9 
+
10  inline double inc_beta(const double& a,
+
11  const double& b,
+
12  const double& x) {
+
13  using boost::math::ibeta;
+
14  return ibeta(a, b, x);
+
15  }
+
16  }
+
17 }
+
18 #endif
+
double ibeta(const double a, const double b, const double x)
The normalized incomplete beta function of a, b, and x.
Definition: ibeta.hpp:23
+
fvar< T > inc_beta(const fvar< T > &a, const fvar< T > &b, const fvar< T > &x)
Definition: inc_beta.hpp:20
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2inv_8hpp.html b/doc/api/html/prim_2scal_2fun_2inv_8hpp.html new file mode 100644 index 00000000000..e46646de546 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2inv_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/inv.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
boost::math::tools::promote_args
+< T >::type 
stan::math::inv (const T x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2inv_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2inv_8hpp_source.html new file mode 100644 index 00000000000..8b6ceb5aad1 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2inv_8hpp_source.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/inv.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_INV_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_INV_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
9  template <typename T>
+
10  inline
+
11  typename boost::math::tools::promote_args<T>::type
+
12  inv(const T x) {
+
13  return 1.0 / x;
+
14  }
+
15 
+
16  }
+
17 }
+
18 
+
19 #endif
+
fvar< T > inv(const fvar< T > &x)
Definition: inv.hpp:15
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2inv___phi_8hpp.html b/doc/api/html/prim_2scal_2fun_2inv___phi_8hpp.html new file mode 100644 index 00000000000..4ddcba27de0 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2inv___phi_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/inv_Phi.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv_Phi.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

double stan::math::inv_Phi (double p)
 The inverse of the unit normal cumulative distribution function. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2inv___phi_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2inv___phi_8hpp_source.html new file mode 100644 index 00000000000..c86e9a60c1d --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2inv___phi_8hpp_source.html @@ -0,0 +1,193 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/inv_Phi.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv_Phi.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_INV_PHI_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_INV_PHI_HPP
+
3 
+ + + + +
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
26  inline double inv_Phi(double p) {
+
27  stan::math::check_bounded<double, double, double>("inv_Phi",
+
28  "Probability variable", p, 0, 1);
+
29 
+
30  if (p < 8e-311)
+
31  return NEGATIVE_INFTY;
+
32  if (p == 1)
+
33  return INFTY;
+
34 
+
35  static const double a[6] = {
+
36  -3.969683028665376e+01, 2.209460984245205e+02,
+
37  -2.759285104469687e+02, 1.383577518672690e+02,
+
38  -3.066479806614716e+01, 2.506628277459239e+00
+
39  };
+
40  static const double b[5] = {
+
41  -5.447609879822406e+01, 1.615858368580409e+02,
+
42  -1.556989798598866e+02, 6.680131188771972e+01,
+
43  -1.328068155288572e+01
+
44  };
+
45  static const double c[6] = {
+
46  -7.784894002430293e-03, -3.223964580411365e-01,
+
47  -2.400758277161838e+00, -2.549732539343734e+00,
+
48  4.374664141464968e+00, 2.938163982698783e+00
+
49  };
+
50  static const double d[4] = {
+
51  7.784695709041462e-03, 3.224671290700398e-01,
+
52  2.445134137142996e+00, 3.754408661907416e+00
+
53  };
+
54 
+
55  static const double p_low = 0.02425;
+
56  static const double p_high = 0.97575;
+
57 
+
58  double x;
+
59  if ((p_low <= p) && (p <= p_high)) {
+
60  double q = p - 0.5;
+
61  double r = q * q;
+
62  x = (((((a[0]*r + a[1])*r + a[2])*r + a[3])*r + a[4])*r + a[5])*q
+
63  / (((((b[0]*r + b[1])*r + b[2])*r + b[3])*r + b[4])*r + 1.0);
+
64  } else if (p < p_low) {
+
65  double q = std::sqrt(-2.0*std::log(p));
+
66  x = (((((c[0]*q + c[1])*q + c[2])*q + c[3])*q + c[4])*q + c[5])
+
67  / ((((d[0]*q + d[1])*q + d[2])*q + d[3])*q + 1.0);
+
68  } else {
+
69  double q = std::sqrt(-2.0 * stan::math::log1m(p));
+
70  x = -(((((c[0]*q + c[1])*q + c[2])*q + c[3])*q + c[4])*q + c[5])
+
71  / ((((d[0]*q + d[1])*q + d[2])*q + d[3])*q + 1.0);
+
72  }
+
73 
+
74  if (x < 37.6) { // gradient blows up past here
+
75  double e = stan::math::Phi(x) - p;
+
76  double u = e * SQRT_2_TIMES_SQRT_PI * std::exp(0.5 * x * x);
+
77  x -= u / (1.0 + 0.5 * x * u);
+
78  }
+
79 
+
80  return x;
+
81  }
+
82 
+
83  }
+
84 }
+
85 #endif
+
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
fvar< T > inv_Phi(const fvar< T > &p)
Definition: inv_Phi.hpp:15
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
const double SQRT_2_TIMES_SQRT_PI
Definition: constants.hpp:158
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
fvar< T > Phi(const fvar< T > &x)
Definition: Phi.hpp:14
+ + +
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+ +
const double INFTY
Positive infinity.
Definition: constants.hpp:44
+
const double NEGATIVE_INFTY
Negative infinity.
Definition: constants.hpp:50
+ +
fvar< T > log1m(const fvar< T > &x)
Definition: log1m.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2inv__cloglog_8hpp.html b/doc/api/html/prim_2scal_2fun_2inv__cloglog_8hpp.html new file mode 100644 index 00000000000..527b1d9e8d1 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2inv__cloglog_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/inv_cloglog.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv_cloglog.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
boost::math::tools::promote_args
+< T >::type 
stan::math::inv_cloglog (T x)
 The inverse complementary log-log function. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2inv__cloglog_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2inv__cloglog_8hpp_source.html new file mode 100644 index 00000000000..f6657692eda --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2inv__cloglog_8hpp_source.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/inv_cloglog.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv_cloglog.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_INV_CLOGLOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_INV_CLOGLOG_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
47  template <typename T>
+
48  inline typename boost::math::tools::promote_args<T>::type
+
49  inv_cloglog(T x) {
+
50  using std::exp;
+
51  return 1 - exp(-exp(x));
+
52  }
+
53 
+
54  }
+
55 }
+
56 
+
57 #endif
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
fvar< T > inv_cloglog(const fvar< T > &x)
Definition: inv_cloglog.hpp:15
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2inv__logit_8hpp.html b/doc/api/html/prim_2scal_2fun_2inv__logit_8hpp.html new file mode 100644 index 00000000000..7da1d442b54 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2inv__logit_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/inv_logit.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv_logit.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
boost::math::tools::promote_args
+< T >::type 
stan::math::inv_logit (const T a)
 Returns the inverse logit function applied to the argument. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2inv__logit_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2inv__logit_8hpp_source.html new file mode 100644 index 00000000000..f45a9416d38 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2inv__logit_8hpp_source.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/inv_logit.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv_logit.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_INV_LOGIT_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_INV_LOGIT_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+
5 
+
6 namespace stan {
+
7 
+
8  namespace math {
+
9 
+
50  template <typename T>
+
51  inline typename boost::math::tools::promote_args<T>::type
+
52  inv_logit(const T a) {
+
53  using std::exp;
+
54  return 1.0 / (1.0 + exp(-a));
+
55  }
+
56 
+
57  }
+
58 }
+
59 
+
60 #endif
+
61 
+
fvar< T > inv_logit(const fvar< T > &x)
Definition: inv_logit.hpp:15
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2inv__sqrt_8hpp.html b/doc/api/html/prim_2scal_2fun_2inv__sqrt_8hpp.html new file mode 100644 index 00000000000..90e40d9dfe3 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2inv__sqrt_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/inv_sqrt.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv_sqrt.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
boost::math::tools::promote_args
+< T >::type 
stan::math::inv_sqrt (const T x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2inv__sqrt_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2inv__sqrt_8hpp_source.html new file mode 100644 index 00000000000..ad27c2f6ab5 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2inv__sqrt_8hpp_source.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/inv_sqrt.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv_sqrt.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_INV_SQRT_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_INV_SQRT_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
9  template <typename T>
+
10  inline
+
11  typename boost::math::tools::promote_args<T>::type
+
12  inv_sqrt(const T x) {
+
13  using std::sqrt;
+
14 
+
15  return 1.0 / sqrt(x);
+
16  }
+
17 
+
18  }
+
19 }
+
20 
+
21 #endif
+
fvar< T > inv_sqrt(const fvar< T > &x)
Definition: inv_sqrt.hpp:15
+
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2inv__square_8hpp.html b/doc/api/html/prim_2scal_2fun_2inv__square_8hpp.html new file mode 100644 index 00000000000..9ff8713b84e --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2inv__square_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/inv_square.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv_square.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
boost::math::tools::promote_args
+< T >::type 
stan::math::inv_square (const T x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2inv__square_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2inv__square_8hpp_source.html new file mode 100644 index 00000000000..cab94aaa9a5 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2inv__square_8hpp_source.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/inv_square.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv_square.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_INV_SQUARE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_INV_SQUARE_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
9  template <typename T>
+
10  inline
+
11  typename boost::math::tools::promote_args<T>::type
+
12  inv_square(const T x) {
+
13  return 1.0 / (x * x);
+
14  }
+
15  }
+
16 }
+
17 
+
18 #endif
+
fvar< T > inv_square(const fvar< T > &x)
Definition: inv_square.hpp:15
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2is__inf_8hpp.html b/doc/api/html/prim_2scal_2fun_2is__inf_8hpp.html new file mode 100644 index 00000000000..c050fb3ec6d --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2is__inf_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/is_inf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
is_inf.hpp File Reference
+
+
+
#include <boost/math/special_functions/fpclassify.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

int stan::math::is_inf (const double x)
 Returns 1 if the input is infinite and 0 otherwise. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2is__inf_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2is__inf_8hpp_source.html new file mode 100644 index 00000000000..ff88cb0fa56 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2is__inf_8hpp_source.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/is_inf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
is_inf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_IS_INF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_IS_INF_HPP
+
3 
+
4 #include <boost/math/special_functions/fpclassify.hpp>
+
5 
+
6 namespace stan {
+
7 
+
8  namespace math {
+
9 
+
18  inline int
+
19  is_inf(const double x) {
+
20  return boost::math::isinf(x);
+
21  }
+
22 
+
23  }
+
24 }
+
25 
+
26 #endif
+
bool isinf(const stan::math::var &v)
Checks if the given number is infinite.
Definition: boost_isinf.hpp:22
+
int is_inf(const fvar< T > &x)
Returns 1 if the input's value is infinite and 0 otherwise.
Definition: is_inf.hpp:22
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2is__nan_8hpp.html b/doc/api/html/prim_2scal_2fun_2is__nan_8hpp.html new file mode 100644 index 00000000000..972294d608e --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2is__nan_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/is_nan.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
is_nan.hpp File Reference
+
+
+
#include <boost/math/special_functions/fpclassify.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

bool stan::math::is_nan (double x)
 Returns 1 if the input is NaN and 0 otherwise. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2is__nan_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2is__nan_8hpp_source.html new file mode 100644 index 00000000000..ff422c3cb1d --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2is__nan_8hpp_source.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/is_nan.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
is_nan.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_IS_NAN_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_IS_NAN_HPP
+
3 
+
4 #include <boost/math/special_functions/fpclassify.hpp>
+
5 
+
6 namespace stan {
+
7 
+
8  namespace math {
+
9 
+
18  inline bool is_nan(double x) {
+
19  return boost::math::isnan(x);
+
20  }
+
21 
+
22  }
+
23 }
+
24 
+
25 #endif
+
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
+
int is_nan(const fvar< T > &x)
Returns 1 if the input's value is NaN and 0 otherwise.
Definition: is_nan.hpp:22
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2is__uninitialized_8hpp.html b/doc/api/html/prim_2scal_2fun_2is__uninitialized_8hpp.html new file mode 100644 index 00000000000..05b03a414b6 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2is__uninitialized_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/is_uninitialized.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
is_uninitialized.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
bool stan::math::is_uninitialized (T x)
 Returns true if the specified variable is uninitialized. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2is__uninitialized_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2is__uninitialized_8hpp_source.html new file mode 100644 index 00000000000..ee09cb2d2a8 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2is__uninitialized_8hpp_source.html @@ -0,0 +1,124 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/is_uninitialized.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
is_uninitialized.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_IS_UNINITIALIZED_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_IS_UNINITIALIZED_HPP
+
3 
+
4 namespace stan {
+
5 
+
6  namespace math {
+
7 
+
18  template <typename T>
+
19  inline bool is_uninitialized(T x) {
+
20  return false;
+
21  }
+
22 
+
23  }
+
24 }
+
25 #endif
+
bool is_uninitialized(T x)
Returns true if the specified variable is uninitialized.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2lbeta_8hpp.html b/doc/api/html/prim_2scal_2fun_2lbeta_8hpp.html new file mode 100644 index 00000000000..ea96a5686e6 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2lbeta_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/lbeta.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
lbeta.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+#include <boost/math/special_functions/gamma.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T1 , typename T2 >
boost::math::tools::promote_args
+< T1, T2 >::type 
stan::math::lbeta (const T1 a, const T2 b)
 Return the log of the beta function applied to the specified arguments. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2lbeta_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2lbeta_8hpp_source.html new file mode 100644 index 00000000000..e8757d1d3b5 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2lbeta_8hpp_source.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/lbeta.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
lbeta.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LBETA_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LBETA_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+
5 
+
6 #include <boost/math/special_functions/gamma.hpp>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
57  template <typename T1, typename T2>
+
58  inline typename boost::math::tools::promote_args<T1, T2>::type
+
59  lbeta(const T1 a, const T2 b) {
+
60  using boost::math::lgamma;
+
61  return lgamma(a)
+
62  + lgamma(b)
+
63  - lgamma(a + b);
+
64  }
+
65 
+
66  }
+
67 }
+
68 
+
69 #endif
+
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
+
fvar< T > lbeta(const fvar< T > &x1, const fvar< T > &x2)
Definition: lbeta.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2lgamma_8hpp.html b/doc/api/html/prim_2scal_2fun_2lgamma_8hpp.html new file mode 100644 index 00000000000..309549cb2b3 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2lgamma_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/lgamma.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
lgamma.hpp File Reference
+
+
+
#include <boost/math/special_functions/gamma.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

double stan::math::lgamma (double x)
 

+\[ \mbox{lgamma}(x) = \begin{cases} \textrm{error} & \mbox{if } x\in \{\dots, -3, -2, -1, 0\}\\ \ln\Gamma(x) & \mbox{if } x\not\in \{\dots, -3, -2, -1, 0\}\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+ More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2lgamma_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2lgamma_8hpp_source.html new file mode 100644 index 00000000000..fecb738ced5 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2lgamma_8hpp_source.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/lgamma.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
lgamma.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LGAMMA_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LGAMMA_HPP
+
3 
+
4 #include <boost/math/special_functions/gamma.hpp>
+
5 
+
6 namespace stan {
+
7 
+
8  namespace math {
+
9 
+
30  // throws domain_error if x is at pole
+
31  double lgamma(double x) {
+
32  return boost::math::lgamma(x);
+
33  }
+
34 
+
35  }
+
36 }
+
37 
+
38 #endif
+
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
+
var lgamma(const stan::math::var &a)
The log gamma function for variables (C99).
Definition: lgamma.hpp:35
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2lmgamma_8hpp.html b/doc/api/html/prim_2scal_2fun_2lmgamma_8hpp.html new file mode 100644 index 00000000000..9ddfa1a8edb --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2lmgamma_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/lmgamma.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
lmgamma.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <boost/math/special_functions/gamma.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
boost::math::tools::promote_args
+< T >::type 
stan::math::lmgamma (const int k, T x)
 Return the natural logarithm of the multivariate gamma function with the speciifed dimensions and argument. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2lmgamma_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2lmgamma_8hpp_source.html new file mode 100644 index 00000000000..c567724677b --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2lmgamma_8hpp_source.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/lmgamma.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
lmgamma.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LMGAMMA_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LMGAMMA_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+ +
6 #include <boost/math/special_functions/gamma.hpp>
+
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
55  template <typename T>
+
56  inline typename boost::math::tools::promote_args<T>::type
+
57  lmgamma(const int k, T x) {
+
58  using boost::math::lgamma;
+
59  typename boost::math::tools::promote_args<T>::type result
+
60  = k * (k - 1) * LOG_PI_OVER_FOUR;
+
61 
+
62  for (int j = 1; j <= k; ++j)
+
63  result += lgamma(x + (1.0 - j) / 2.0);
+
64  return result;
+
65  }
+
66 
+
67  }
+
68 }
+
69 #endif
+
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
+
const double LOG_PI_OVER_FOUR
Log pi divided by 4 .
Definition: constants.hpp:79
+ +
fvar< typename stan::return_type< T, int >::type > lmgamma(int x1, const fvar< T > &x2)
Definition: lmgamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2log1m_8hpp.html b/doc/api/html/prim_2scal_2fun_2log1m_8hpp.html new file mode 100644 index 00000000000..6f9e888ea1b --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2log1m_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/log1m.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log1m.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+#include <stan/math/prim/scal/fun/log1p.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
boost::math::tools::promote_args
+< T >::type 
stan::math::log1m (T x)
 Return the natural logarithm of one minus the specified value. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2log1m_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2log1m_8hpp_source.html new file mode 100644 index 00000000000..ea7ad985f9f --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2log1m_8hpp_source.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/log1m.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log1m.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LOG1M_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LOG1M_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+ +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
38  template <typename T>
+
39  inline typename boost::math::tools::promote_args<T>::type
+
40  log1m(T x) {
+
41  return log1p(-x);
+
42  }
+
43 
+
44  }
+
45 }
+
46 
+
47 #endif
+
fvar< T > log1p(const fvar< T > &x)
Definition: log1p.hpp:16
+ +
fvar< T > log1m(const fvar< T > &x)
Definition: log1m.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2log1m__exp_8hpp.html b/doc/api/html/prim_2scal_2fun_2log1m__exp_8hpp.html new file mode 100644 index 00000000000..22fa3899a47 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2log1m__exp_8hpp.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/log1m_exp.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log1m_exp.hpp File Reference
+
+
+
#include <stan/math/prim/scal/fun/log1m.hpp>
+#include <boost/math/tools/promotion.hpp>
+#include <boost/throw_exception.hpp>
+#include <cmath>
+#include <limits>
+#include <stdexcept>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
boost::math::tools::promote_args
+< T >::type 
stan::math::log1m_exp (const T a)
 Calculates the log of 1 minus the exponential of the specified value without overflow log1m_exp(x) = log(1-exp(x)). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2log1m__exp_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2log1m__exp_8hpp_source.html new file mode 100644 index 00000000000..eb6016896f5 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2log1m__exp_8hpp_source.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/log1m_exp.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log1m_exp.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LOG1M_EXP_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LOG1M_EXP_HPP
+
3 
+ +
5 #include <boost/math/tools/promotion.hpp>
+
6 #include <boost/throw_exception.hpp>
+
7 #include <cmath>
+
8 #include <limits>
+
9 #include <stdexcept>
+
10 
+
11 namespace stan {
+
12  namespace math {
+
13 
+
39  template <typename T>
+
40  inline typename boost::math::tools::promote_args<T>::type
+
41  log1m_exp(const T a) {
+
42  using std::log;
+
43  using std::exp;
+ +
45 
+
46  if (a >= 0)
+
47  return std::numeric_limits<double>::quiet_NaN();
+
48  else if (a > -0.693147)
+
49  return log(-expm1(a)); // 0.693147 ~= log(2)
+
50  else
+
51  return log1m(exp(a));
+
52  }
+
53 
+
54  }
+
55 }
+
56 
+
57 #endif
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
fvar< T > expm1(const fvar< T > &x)
Definition: expm1.hpp:12
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
fvar< T > log1m_exp(const fvar< T > &x)
Definition: log1m_exp.hpp:16
+ +
fvar< T > log1m(const fvar< T > &x)
Definition: log1m.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2log1m__inv__logit_8hpp.html b/doc/api/html/prim_2scal_2fun_2log1m__inv__logit_8hpp.html new file mode 100644 index 00000000000..0402b8a785e --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2log1m__inv__logit_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/log1m_inv_logit.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log1m_inv_logit.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
boost::math::tools::promote_args
+< T >::type 
stan::math::log1m_inv_logit (const T u)
 Returns the natural logarithm of 1 minus the inverse logit of the specified argument. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2log1m__inv__logit_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2log1m__inv__logit_8hpp_source.html new file mode 100644 index 00000000000..80f044b9826 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2log1m__inv__logit_8hpp_source.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/log1m_inv_logit.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log1m_inv_logit.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LOG1M_INV_LOGIT_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LOG1M_INV_LOGIT_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
34  template <typename T>
+
35  inline typename boost::math::tools::promote_args<T>::type
+
36  log1m_inv_logit(const T u) {
+
37  using std::exp;
+
38  if (u > 0.0)
+
39  return -u - log1p(exp(-u)); // prevent underflow
+
40  return -log1p(exp(u));
+
41  }
+
42 
+
43  }
+
44 }
+
45 
+
46 #endif
+
fvar< T > log1m_inv_logit(const fvar< T > &x)
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
fvar< T > log1p(const fvar< T > &x)
Definition: log1p.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2log1p_8hpp.html b/doc/api/html/prim_2scal_2fun_2log1p_8hpp.html new file mode 100644 index 00000000000..76a01e03911 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2log1p_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/log1p.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log1p.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
boost::math::tools::promote_args
+< T >::type 
stan::math::log1p (const T x)
 Return the natural logarithm of one plus the specified value. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2log1p_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2log1p_8hpp_source.html new file mode 100644 index 00000000000..e0f07d30c29 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2log1p_8hpp_source.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/log1p.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log1p.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LOG1P_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LOG1P_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+
5 #include <limits>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
37  template <typename T>
+
38  inline typename boost::math::tools::promote_args<T>::type
+
39  log1p(const T x) {
+
40  using std::log;
+
41  if (!(x >= -1.0))
+
42  return std::numeric_limits<double>::quiet_NaN();
+
43 
+
44  if (x > 1e-9 || x < -1e-9)
+
45  return log(1.0 + x); // direct, if distant from 1
+
46  else if (x > 1e-16 || x < -1e-16)
+
47  return x - 0.5 * x * x; // 2nd order Taylor, if close to 1
+
48  else
+
49  return x; // 1st order Taylor, if very close to 1
+
50  }
+
51 
+
52  }
+
53 }
+
54 
+
55 #endif
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+
fvar< T > log1p(const fvar< T > &x)
Definition: log1p.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2log1p__exp_8hpp.html b/doc/api/html/prim_2scal_2fun_2log1p__exp_8hpp.html new file mode 100644 index 00000000000..34a3f7943ea --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2log1p__exp_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/log1p_exp.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log1p_exp.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+#include <stan/math/prim/scal/fun/log1p.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
boost::math::tools::promote_args
+< T >::type 
stan::math::log1p_exp (const T a)
 Calculates the log of 1 plus the exponential of the specified value without overflow. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2log1p__exp_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2log1p__exp_8hpp_source.html new file mode 100644 index 00000000000..2001f50b1e8 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2log1p__exp_8hpp_source.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/log1p_exp.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log1p_exp.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LOG1P_EXP_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LOG1P_EXP_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+ +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
42  template <typename T>
+
43  inline typename boost::math::tools::promote_args<T>::type
+
44  log1p_exp(const T a) {
+
45  using std::exp;
+
46  // like log_sum_exp below with b=0.0; prevents underflow
+
47  if (a > 0.0)
+
48  return a + log1p(exp(-a));
+
49  return log1p(exp(a));
+
50  }
+
51 
+
52  }
+
53 }
+
54 
+
55 #endif
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
fvar< T > log1p_exp(const fvar< T > &x)
Definition: log1p_exp.hpp:13
+
fvar< T > log1p(const fvar< T > &x)
Definition: log1p.hpp:16
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2log2_8hpp.html b/doc/api/html/prim_2scal_2fun_2log2_8hpp.html new file mode 100644 index 00000000000..a5520f54f03 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2log2_8hpp.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/log2.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log2.hpp File Reference
+
+
+
#include <stan/math/prim/scal/fun/constants.hpp>
+#include <boost/math/tools/promotion.hpp>
+#include <stdexcept>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

template<typename T >
boost::math::tools::promote_args
+< T >::type 
stan::math::log2 (const T a)
 Returns the base 2 logarithm of the argument (C99). More...
 
double stan::math::log2 ()
 Return natural logarithm of two. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2log2_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2log2_8hpp_source.html new file mode 100644 index 00000000000..82817bd860b --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2log2_8hpp_source.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/log2.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log2.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LOG2_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LOG2_HPP
+
3 
+ +
5 #include <boost/math/tools/promotion.hpp>
+
6 #include <stdexcept>
+
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
23  template <typename T>
+
24  inline typename boost::math::tools::promote_args<T>::type
+
25  log2(const T a) {
+
26  using std::log;
+
27  return log(a) / LOG_2;
+
28  }
+
29 
+
35  inline double log2() {
+
36  return LOG_2;
+
37  }
+
38 
+
39  }
+
40 }
+
41 
+
42 #endif
+
const double LOG_2
The natural logarithm of 2, .
Definition: constants.hpp:33
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
fvar< T > log2(const fvar< T > &x)
Definition: log2.hpp:17
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2log__diff__exp_8hpp.html b/doc/api/html/prim_2scal_2fun_2log__diff__exp_8hpp.html new file mode 100644 index 00000000000..721cd147d80 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2log__diff__exp_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/log_diff_exp.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_diff_exp.hpp File Reference
+
+
+
#include <stan/math/prim/scal/fun/log1m_exp.hpp>
+#include <boost/math/tools/promotion.hpp>
+#include <boost/throw_exception.hpp>
+#include <limits>
+#include <stdexcept>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T1 , typename T2 >
boost::math::tools::promote_args
+< T1, T2 >::type 
stan::math::log_diff_exp (const T1 x, const T2 y)
 The natural logarithm of the difference of the natural exponentiation of x1 and the natural exponentiation of x2. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2log__diff__exp_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2log__diff__exp_8hpp_source.html new file mode 100644 index 00000000000..4b1276f370b --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2log__diff__exp_8hpp_source.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/log_diff_exp.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_diff_exp.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LOG_DIFF_EXP_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LOG_DIFF_EXP_HPP
+
3 
+ +
5 #include <boost/math/tools/promotion.hpp>
+
6 #include <boost/throw_exception.hpp>
+
7 #include <limits>
+
8 #include <stdexcept>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
48  template <typename T1, typename T2>
+
49  inline typename boost::math::tools::promote_args<T1, T2>::type
+
50  log_diff_exp(const T1 x, const T2 y) {
+
51  if (x <= y)
+
52  return std::numeric_limits<double>::quiet_NaN();
+
53  return x + log1m_exp(y - x);
+
54  }
+
55 
+
56  }
+
57 }
+
58 
+
59 #endif
+
fvar< T > log_diff_exp(const fvar< T > &x1, const fvar< T > &x2)
+
fvar< T > log1m_exp(const fvar< T > &x)
Definition: log1m_exp.hpp:16
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2log__falling__factorial_8hpp.html b/doc/api/html/prim_2scal_2fun_2log__falling__factorial_8hpp.html new file mode 100644 index 00000000000..dd9974cbc28 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2log__falling__factorial_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/log_falling_factorial.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_falling_factorial.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T1 , typename T2 >
boost::math::tools::promote_args
+< T1, T2 >::type 
stan::math::log_falling_factorial (const T1 x, const T2 n)
 

+\[ \mbox{log\_falling\_factorial}(x, n) = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ \ln (x)_n & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +

+ More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2log__falling__factorial_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2log__falling__factorial_8hpp_source.html new file mode 100644 index 00000000000..0fb9bb66c9f --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2log__falling__factorial_8hpp_source.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/log_falling_factorial.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_falling_factorial.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LOG_FALLING_FACTORIAL_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LOG_FALLING_FACTORIAL_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
39  template<typename T1, typename T2>
+
40  inline typename boost::math::tools::promote_args<T1, T2>::type
+
41  log_falling_factorial(const T1 x, const T2 n) {
+
42  return lgamma(x + 1) - lgamma(n + 1);
+
43  }
+
44 
+
45  }
+
46 }
+
47 
+
48 #endif
+ +
fvar< T > log_falling_factorial(const fvar< T > &x, const fvar< T > &n)
+
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2log__inv__logit_8hpp.html b/doc/api/html/prim_2scal_2fun_2log__inv__logit_8hpp.html new file mode 100644 index 00000000000..f689fa87c06 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2log__inv__logit_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/log_inv_logit.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_inv_logit.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
boost::math::tools::promote_args
+< T >::type 
stan::math::log_inv_logit (const T &u)
 Returns the natural logarithm of the inverse logit of the specified argument. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2log__inv__logit_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2log__inv__logit_8hpp_source.html new file mode 100644 index 00000000000..964e93dcab6 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2log__inv__logit_8hpp_source.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/log_inv_logit.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_inv_logit.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LOG_INV_LOGIT_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LOG_INV_LOGIT_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
34  template <typename T>
+
35  inline typename boost::math::tools::promote_args<T>::type
+
36  log_inv_logit(const T& u) {
+
37  using std::exp;
+
38  if (u < 0.0)
+
39  return u - log1p(exp(u)); // prevent underflow
+
40  return -log1p(exp(-u));
+
41  }
+
42 
+
43  }
+
44 }
+
45 
+
46 #endif
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
fvar< T > log1p(const fvar< T > &x)
Definition: log1p.hpp:16
+
fvar< T > log_inv_logit(const fvar< T > &x)
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2log__mix_8hpp.html b/doc/api/html/prim_2scal_2fun_2log__mix_8hpp.html new file mode 100644 index 00000000000..207b3c6947b --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2log__mix_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/log_mix.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_mix.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

double stan::math::log_mix (double theta, double lambda1, double lambda2)
 Return the log mixture density with specified mixing proportion and log densities. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2log__mix_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2log__mix_8hpp_source.html new file mode 100644 index 00000000000..de667b7a4d6 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2log__mix_8hpp_source.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/log_mix.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_mix.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LOG_MIX_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LOG_MIX_HPP
+
3 
+ + + + +
8 #include <cmath>
+
9 
+
10 namespace stan {
+
11 
+
12  namespace math {
+
13 
+
46  double log_mix(double theta,
+
47  double lambda1,
+
48  double lambda2) {
+
49  using std::log;
+
50  stan::math::check_not_nan("log_mix", "lambda1", lambda1);
+
51  stan::math::check_not_nan("log_mix", "lambda2", lambda2);
+
52  stan::math::check_bounded("log_mix", "theta", theta, 0, 1);
+
53  return log_sum_exp(log(theta) + lambda1,
+
54  log1m(theta) + lambda2);
+
55  }
+
56 
+
57  }
+
58 
+
59 }
+
60 
+
61 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
bool check_bounded(const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)
Return true if the value is between the low and high values, inclusively.
+
fvar< T > log_sum_exp(const std::vector< fvar< T > > &v)
Definition: log_sum_exp.hpp:14
+ + + +
fvar< T > log_mix(const fvar< T > &theta, const fvar< T > &lambda1, const fvar< T > &lambda2)
Return the log mixture density with specified mixing proportion and log densities and its derivative ...
Definition: log_mix.hpp:116
+
fvar< T > log1m(const fvar< T > &x)
Definition: log1m.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2log__rising__factorial_8hpp.html b/doc/api/html/prim_2scal_2fun_2log__rising__factorial_8hpp.html new file mode 100644 index 00000000000..1316705eccd --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2log__rising__factorial_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/log_rising_factorial.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_rising_factorial.hpp File Reference
+
+
+
#include <boost/math/special_functions/gamma.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T1 , typename T2 >
boost::math::tools::promote_args
+< T1, T2 >::type 
stan::math::log_rising_factorial (const T1 x, const T2 n)
 

+\[ \mbox{log\_rising\_factorial}(x, n) = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ \ln x^{(n)} & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +

+ More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2log__rising__factorial_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2log__rising__factorial_8hpp_source.html new file mode 100644 index 00000000000..8acfe1aed9c --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2log__rising__factorial_8hpp_source.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/log_rising_factorial.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_rising_factorial.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LOG_RISING_FACTORIAL_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LOG_RISING_FACTORIAL_HPP
+
3 
+
4 #include <boost/math/special_functions/gamma.hpp>
+
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
39  template<typename T1, typename T2>
+
40  inline typename boost::math::tools::promote_args<T1, T2>::type
+
41  log_rising_factorial(const T1 x, const T2 n) {
+
42  using boost::math::lgamma;
+
43  return lgamma(x + n) - lgamma(x);
+
44  }
+
45 
+
46  }
+
47 }
+
48 
+
49 #endif
+
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
+
fvar< T > log_rising_factorial(const fvar< T > &x, const fvar< T > &n)
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2log__sum__exp_8hpp.html b/doc/api/html/prim_2scal_2fun_2log__sum__exp_8hpp.html new file mode 100644 index 00000000000..395a5c76b6b --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2log__sum__exp_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/log_sum_exp.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_sum_exp.hpp File Reference
+
+
+
#include <stan/math/prim/scal/fun/log1p_exp.hpp>
+#include <boost/math/tools/promotion.hpp>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T1 , typename T2 >
boost::math::tools::promote_args
+< T1, T2 >::type 
stan::math::log_sum_exp (const T2 &a, const T1 &b)
 Calculates the log sum of exponetials without overflow. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2log__sum__exp_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2log__sum__exp_8hpp_source.html new file mode 100644 index 00000000000..d02979528b3 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2log__sum__exp_8hpp_source.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/log_sum_exp.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_sum_exp.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LOG_SUM_EXP_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LOG_SUM_EXP_HPP
+
3 
+ +
5 #include <boost/math/tools/promotion.hpp>
+
6 #include <limits>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
46  template <typename T1, typename T2>
+
47  inline typename boost::math::tools::promote_args<T1, T2>::type
+
48  log_sum_exp(const T2& a, const T1& b) {
+
49  using std::exp;
+
50  if (a > b)
+
51  return a + log1p_exp(b - a);
+
52  return b + log1p_exp(a - b);
+
53  }
+
54 
+
55  }
+
56 }
+
57 
+
58 #endif
+
fvar< T > log_sum_exp(const std::vector< fvar< T > > &v)
Definition: log_sum_exp.hpp:14
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ +
fvar< T > log1p_exp(const fvar< T > &x)
Definition: log1p_exp.hpp:13
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2logit_8hpp.html b/doc/api/html/prim_2scal_2fun_2logit_8hpp.html new file mode 100644 index 00000000000..64756e95647 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2logit_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/logit.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
logit.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
boost::math::tools::promote_args
+< T >::type 
stan::math::logit (const T a)
 Returns the logit function applied to the argument. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2logit_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2logit_8hpp_source.html new file mode 100644 index 00000000000..893e40d9605 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2logit_8hpp_source.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/logit.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
logit.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LOGIT_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_LOGIT_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
42  template <typename T>
+
43  inline typename boost::math::tools::promote_args<T>::type
+
44  logit(const T a) {
+
45  using std::log;
+
46  return log(a / (1.0 - a));
+
47  }
+
48 
+
49  }
+
50 }
+
51 
+
52 #endif
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
fvar< T > logit(const fvar< T > &x)
Definition: logit.hpp:17
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2modified__bessel__first__kind_8hpp.html b/doc/api/html/prim_2scal_2fun_2modified__bessel__first__kind_8hpp.html new file mode 100644 index 00000000000..21bc7729c55 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2modified__bessel__first__kind_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/modified_bessel_first_kind.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
modified_bessel_first_kind.hpp File Reference
+
+
+
#include <boost/math/special_functions/bessel.hpp>
+#include <stan/math/prim/scal/err/check_not_nan.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T2 >
T2 stan::math::modified_bessel_first_kind (const int v, const T2 z)
 

+\[ \mbox{modified\_bessel\_first\_kind}(v, z) = \begin{cases} I_v(z) & \mbox{if } -\infty\leq z \leq \infty \\[6pt] \textrm{error} & \mbox{if } z = \textrm{NaN} \end{cases} \] +

+ More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2modified__bessel__first__kind_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2modified__bessel__first__kind_8hpp_source.html new file mode 100644 index 00000000000..a5b654d3bf9 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2modified__bessel__first__kind_8hpp_source.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/modified_bessel_first_kind.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
modified_bessel_first_kind.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_MODIFIED_BESSEL_FIRST_KIND_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_MODIFIED_BESSEL_FIRST_KIND_HPP
+
3 
+
4 #include <boost/math/special_functions/bessel.hpp>
+ +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
37  template<typename T2>
+
38  inline T2
+
39  modified_bessel_first_kind(const int v, const T2 z) {
+ +
41  check_not_nan("modified_bessel_first_kind", "z", z);
+
42 
+
43  return boost::math::cyl_bessel_i(v, z);
+
44  }
+
45 
+
46  }
+
47 }
+
48 
+
49 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+
fvar< T > modified_bessel_first_kind(int v, const fvar< T > &z)
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2modified__bessel__second__kind_8hpp.html b/doc/api/html/prim_2scal_2fun_2modified__bessel__second__kind_8hpp.html new file mode 100644 index 00000000000..e365fd518fb --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2modified__bessel__second__kind_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/modified_bessel_second_kind.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
modified_bessel_second_kind.hpp File Reference
+
+
+
#include <boost/math/special_functions/bessel.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T2 >
T2 stan::math::modified_bessel_second_kind (const int v, const T2 z)
 

+\[ \mbox{modified\_bessel\_second\_kind}(v, z) = \begin{cases} \textrm{error} & \mbox{if } z \leq 0 \\ K_v(z) & \mbox{if } z > 0 \\[6pt] \textrm{NaN} & \mbox{if } z = \textrm{NaN} \end{cases} \] +

+ More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2modified__bessel__second__kind_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2modified__bessel__second__kind_8hpp_source.html new file mode 100644 index 00000000000..14c317bc4dd --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2modified__bessel__second__kind_8hpp_source.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/modified_bessel_second_kind.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
modified_bessel_second_kind.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_MODIFIED_BESSEL_SECOND_KIND_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_MODIFIED_BESSEL_SECOND_KIND_HPP
+
3 
+
4 #include <boost/math/special_functions/bessel.hpp>
+
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
40  template<typename T2>
+
41  inline T2
+
42  modified_bessel_second_kind(const int v, const T2 z) {
+
43  return boost::math::cyl_bessel_k(v, z);
+
44  }
+
45 
+
46  }
+
47 }
+
48 
+
49 #endif
+
fvar< T > modified_bessel_second_kind(int v, const fvar< T > &z)
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2multiply__log_8hpp.html b/doc/api/html/prim_2scal_2fun_2multiply__log_8hpp.html new file mode 100644 index 00000000000..84bde329d8f --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2multiply__log_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/multiply_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
multiply_log.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_a , typename T_b >
boost::math::tools::promote_args
+< T_a, T_b >::type 
stan::math::multiply_log (const T_a a, const T_b b)
 Calculated the value of the first argument times log of the second argument while behaving properly with 0 inputs. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2multiply__log_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2multiply__log_8hpp_source.html new file mode 100644 index 00000000000..51b6cce6697 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2multiply__log_8hpp_source.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/multiply_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
multiply_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_MULTIPLY_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_MULTIPLY_LOG_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
49  template <typename T_a, typename T_b>
+
50  inline typename boost::math::tools::promote_args<T_a, T_b>::type
+
51  multiply_log(const T_a a, const T_b b) {
+
52  using std::log;
+
53  if (b == 0.0 && a == 0.0)
+
54  return 0.0;
+
55  return a * log(b);
+
56  }
+
57 
+
58  }
+
59 }
+
60 
+
61 #endif
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
fvar< T > multiply_log(const fvar< T > &x1, const fvar< T > &x2)
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2owens__t_8hpp.html b/doc/api/html/prim_2scal_2fun_2owens__t_8hpp.html new file mode 100644 index 00000000000..6c91fd1624c --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2owens__t_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/owens_t.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
owens_t.hpp File Reference
+
+
+
#include <boost/math/special_functions/owens_t.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

double stan::math::owens_t (const double h, const double a)
 The Owen's T function of h and a. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2owens__t_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2owens__t_8hpp_source.html new file mode 100644 index 00000000000..afdadfd3873 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2owens__t_8hpp_source.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/owens_t.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
owens_t.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_OWENS_T_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_OWENS_T_HPP
+
3 
+
4 #include <boost/math/special_functions/owens_t.hpp>
+
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
9 
+
61  inline
+
62  double owens_t(const double h, const double a) {
+
63  return boost::math::owens_t(h, a);
+
64  }
+
65  }
+
66 }
+
67 
+
68 #endif
+
fvar< T > owens_t(const fvar< T > &x1, const fvar< T > &x2)
Definition: owens_t.hpp:14
+
var owens_t(double h, const var &a)
The Owen's T function of h and a.
Definition: owens_t.hpp:99
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2primitive__value_8hpp.html b/doc/api/html/prim_2scal_2fun_2primitive__value_8hpp.html new file mode 100644 index 00000000000..eb4112a9853 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2primitive__value_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/primitive_value.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
primitive_value.hpp File Reference
+
+
+
#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_arithmetic.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
boost::enable_if
+< boost::is_arithmetic< T >, T >
+::type 
stan::math::primitive_value (T x)
 Return the value of the specified arithmetic argument unmodified with its own declared type. More...
 
template<typename T >
boost::disable_if
+< boost::is_arithmetic< T >
+, double >::type 
stan::math::primitive_value (const T &x)
 Return the primitive value of the specified argument. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2primitive__value_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2primitive__value_8hpp_source.html new file mode 100644 index 00000000000..380e2b23c86 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2primitive__value_8hpp_source.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/primitive_value.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
primitive_value.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_PRIMITIVE_VALUE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_PRIMITIVE_VALUE_HPP
+
3 
+
4 #include <boost/utility/enable_if.hpp>
+
5 #include <boost/type_traits/is_arithmetic.hpp>
+ +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
27  template <typename T>
+
28  inline
+
29  typename boost::enable_if<boost::is_arithmetic<T>, T>::type
+ +
31  return x;
+
32  }
+
33 
+
44  template <typename T>
+
45  inline
+
46  typename boost::disable_if<boost::is_arithmetic<T>, double>::type
+
47  primitive_value(const T& x) {
+ +
49  return value_of(x);
+
50  }
+
51 
+
52  }
+
53 
+
54 }
+
55 
+
56 #endif
+
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
double primitive_value(const fvar< T > &v)
Return the primitive value of the specified forward-mode autodiff variable.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2rising__factorial_8hpp.html b/doc/api/html/prim_2scal_2fun_2rising__factorial_8hpp.html new file mode 100644 index 00000000000..85bbbb5d5d9 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2rising__factorial_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/rising_factorial.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
rising_factorial.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T1 , typename T2 >
boost::math::tools::promote_args
+< T1, T2 >::type 
stan::math::rising_factorial (const T1 x, const T2 n)
 

+\[ \mbox{rising\_factorial}(x, n) = \begin{cases} \textrm{error} & \mbox{if } x \leq 0\\ x^{(n)} & \mbox{if } x > 0 \textrm{ and } -\infty \leq n \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } n = \textrm{NaN} \end{cases} \] +

+ More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2rising__factorial_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2rising__factorial_8hpp_source.html new file mode 100644 index 00000000000..5c38d75a1d6 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2rising__factorial_8hpp_source.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/rising_factorial.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
rising_factorial.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_RISING_FACTORIAL_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_RISING_FACTORIAL_HPP
+
3 
+ +
5 #include <cmath>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
52  template<typename T1, typename T2>
+
53  inline typename boost::math::tools::promote_args<T1, T2>::type
+
54  rising_factorial(const T1 x, const T2 n) {
+
55  using std::exp;
+ +
57  }
+
58 
+
59  }
+
60 }
+
61 
+
62 #endif
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ +
fvar< T > log_rising_factorial(const fvar< T > &x, const fvar< T > &n)
+
fvar< T > rising_factorial(const fvar< T > &x, const fvar< T > &n)
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2square_8hpp.html b/doc/api/html/prim_2scal_2fun_2square_8hpp.html new file mode 100644 index 00000000000..78947012cd6 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2square_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/square.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
square.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
stan::math::square (const T x)
 Return the square of the specified argument. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2square_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2square_8hpp_source.html new file mode 100644 index 00000000000..47145667f62 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2square_8hpp_source.html @@ -0,0 +1,124 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/square.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
square.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_SQUARE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_SQUARE_HPP
+
3 
+
4 namespace stan {
+
5  namespace math {
+
6 
+
21  template <typename T>
+
22  inline T square(const T x) {
+
23  return x * x;
+
24  }
+
25 
+
26  }
+
27 }
+
28 
+
29 #endif
+
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2step_8hpp.html b/doc/api/html/prim_2scal_2fun_2step_8hpp.html new file mode 100644 index 00000000000..0cbce4da0d6 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2step_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/step.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
step.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
int stan::math::step (const T y)
 The step, or Heaviside, function. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2step_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2step_8hpp_source.html new file mode 100644 index 00000000000..2c8560c0856 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2step_8hpp_source.html @@ -0,0 +1,124 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/step.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
step.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_STEP_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_STEP_HPP
+
3 
+
4 namespace stan {
+
5  namespace math {
+
6 
+
28  template <typename T>
+
29  inline int step(const T y) {
+
30  return y < 0.0 ? 0 : 1;
+
31  }
+
32 
+
33  }
+
34 }
+
35 
+
36 #endif
+
int step(const T y)
The step, or Heaviside, function.
Definition: step.hpp:29
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2value__of_8hpp.html b/doc/api/html/prim_2scal_2fun_2value__of_8hpp.html new file mode 100644 index 00000000000..4bba5ea7d34 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2value__of_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/value_of.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
value_of.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
double stan::math::value_of (const T x)
 Return the value of the specified scalar argument converted to a double value. More...
 
template<>
double stan::math::value_of< double > (const double x)
 Return the specified argument. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2value__of_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2value__of_8hpp_source.html new file mode 100644 index 00000000000..19a720dd1f8 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2value__of_8hpp_source.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/value_of.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
value_of.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_VALUE_OF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_VALUE_OF_HPP
+
3 
+
4 namespace stan {
+
5 
+
6  namespace math {
+
7 
+
23  template <typename T>
+
24  inline double value_of(const T x) {
+
25  return static_cast<double>(x);
+
26  }
+
27 
+
39  template <>
+
40  inline double value_of<double>(const double x) {
+
41  return x;
+
42  }
+
43 
+
44  }
+
45 }
+
46 
+
47 #endif
+
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
double value_of< double >(const double x)
Return the specified argument.
Definition: value_of.hpp:40
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2value__of__rec_8hpp.html b/doc/api/html/prim_2scal_2fun_2value__of__rec_8hpp.html new file mode 100644 index 00000000000..dea516cee76 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2value__of__rec_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/value_of_rec.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
value_of_rec.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
double stan::math::value_of_rec (const T x)
 Return the value of the specified scalar argument converted to a double value. More...
 
template<>
double stan::math::value_of_rec< double > (const double x)
 Return the specified argument. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2fun_2value__of__rec_8hpp_source.html b/doc/api/html/prim_2scal_2fun_2value__of__rec_8hpp_source.html new file mode 100644 index 00000000000..0d5d3f8d7a8 --- /dev/null +++ b/doc/api/html/prim_2scal_2fun_2value__of__rec_8hpp_source.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/value_of_rec.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
value_of_rec.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_VALUE_OF_REC_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_VALUE_OF_REC_HPP
+
3 
+
4 namespace stan {
+
5 
+
6  namespace math {
+
7 
+
23  template <typename T>
+
24  inline double value_of_rec(const T x) {
+
25  return static_cast<double>(x);
+
26  }
+
27 
+
39  template <>
+
40  inline double value_of_rec<double>(const double x) {
+
41  return x;
+
42  }
+
43 
+
44  }
+
45 }
+
46 
+
47 #endif
+
double value_of_rec(const fvar< T > &v)
Return the value of the specified variable.
+
double value_of_rec< double >(const double x)
Return the specified argument.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2meta_2is__fvar_8hpp.html b/doc/api/html/prim_2scal_2meta_2is__fvar_8hpp.html new file mode 100644 index 00000000000..31ccc6b2d01 --- /dev/null +++ b/doc/api/html/prim_2scal_2meta_2is__fvar_8hpp.html @@ -0,0 +1,124 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/is_fvar.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
is_fvar.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

struct  stan::is_fvar< T >
 
+ + + +

+Namespaces

 stan
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2meta_2is__fvar_8hpp_source.html b/doc/api/html/prim_2scal_2meta_2is__fvar_8hpp_source.html new file mode 100644 index 00000000000..27e2a1dbb91 --- /dev/null +++ b/doc/api/html/prim_2scal_2meta_2is__fvar_8hpp_source.html @@ -0,0 +1,123 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/is_fvar.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
is_fvar.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_IS_FVAR_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_IS_FVAR_HPP
+
3 
+
4 namespace stan {
+
5 
+
6  template <typename T>
+
7  struct is_fvar {
+
8  enum { value = false };
+
9  };
+
10 
+
11 }
+
12 #endif
+
13 
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2meta_2is__var_8hpp.html b/doc/api/html/prim_2scal_2meta_2is__var_8hpp.html new file mode 100644 index 00000000000..82cbc4b8618 --- /dev/null +++ b/doc/api/html/prim_2scal_2meta_2is__var_8hpp.html @@ -0,0 +1,124 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/is_var.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
is_var.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

struct  stan::is_var< T >
 
+ + + +

+Namespaces

 stan
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2meta_2is__var_8hpp_source.html b/doc/api/html/prim_2scal_2meta_2is__var_8hpp_source.html new file mode 100644 index 00000000000..ddce142949c --- /dev/null +++ b/doc/api/html/prim_2scal_2meta_2is__var_8hpp_source.html @@ -0,0 +1,123 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/is_var.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
is_var.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_IS_VAR_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_IS_VAR_HPP
+
3 
+
4 namespace stan {
+
5 
+
6  template <typename T>
+
7  struct is_var {
+
8  enum { value = false };
+
9  };
+
10 
+
11 }
+
12 #endif
+
13 
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2meta_2partials__type_8hpp.html b/doc/api/html/prim_2scal_2meta_2partials__type_8hpp.html new file mode 100644 index 00000000000..fac61918b29 --- /dev/null +++ b/doc/api/html/prim_2scal_2meta_2partials__type_8hpp.html @@ -0,0 +1,124 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/partials_type.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
partials_type.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

struct  stan::partials_type< T >
 
+ + + +

+Namespaces

 stan
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prim_2scal_2meta_2partials__type_8hpp_source.html b/doc/api/html/prim_2scal_2meta_2partials__type_8hpp_source.html new file mode 100644 index 00000000000..9f11f69a8d0 --- /dev/null +++ b/doc/api/html/prim_2scal_2meta_2partials__type_8hpp_source.html @@ -0,0 +1,123 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/partials_type.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
partials_type.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_PARTIALS_TYPE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_PARTIALS_TYPE_HPP
+
3 
+
4 namespace stan {
+
5 
+
6  template <typename T>
+
7  struct partials_type {
+
8  typedef T type;
+
9  };
+
10 
+
11 }
+
12 #endif
+
13 
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/print__stack_8hpp.html b/doc/api/html/print__stack_8hpp.html new file mode 100644 index 00000000000..a81c9f79b26 --- /dev/null +++ b/doc/api/html/print__stack_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/rev/core/print_stack.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
print_stack.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

void stan::math::print_stack (std::ostream &o)
 Prints the auto-dif variable stack. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/print__stack_8hpp_source.html b/doc/api/html/print__stack_8hpp_source.html new file mode 100644 index 00000000000..c208f564496 --- /dev/null +++ b/doc/api/html/print__stack_8hpp_source.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/rev/core/print_stack.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
print_stack.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_PRINT_STACK_HPP
+
2 #define STAN_MATH_REV_CORE_PRINT_STACK_HPP
+
3 
+ + + + +
8 #include <ostream>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
22  inline void print_stack(std::ostream& o) {
+
23  o << "STACK, size=" << ChainableStack::var_stack_.size() << std::endl;
+
24  for (size_t i = 0; i < ChainableStack::var_stack_.size(); ++i)
+
25  o << i
+
26  << " " << ChainableStack::var_stack_[i]
+
27  << " " << (static_cast<vari*>(ChainableStack::var_stack_[i]))->val_
+
28  << " : " << (static_cast<vari*>(ChainableStack::var_stack_[i]))->adj_
+
29  << std::endl;
+
30  }
+
31 
+
32  }
+
33 }
+
34 #endif
+ + + +
void print_stack(std::ostream &o)
Prints the auto-dif variable stack.
Definition: print_stack.hpp:22
+ +
static std::vector< ChainableT * > var_stack_
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prob__constrain_8hpp.html b/doc/api/html/prob__constrain_8hpp.html new file mode 100644 index 00000000000..e7e272259c5 --- /dev/null +++ b/doc/api/html/prob__constrain_8hpp.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/prob_constrain.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
prob_constrain.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
stan::math::prob_constrain (const T x)
 Return a probability value constrained to fall between 0 and 1 (inclusive) for the specified free scalar. More...
 
template<typename T >
stan::math::prob_constrain (const T x, T &lp)
 Return a probability value constrained to fall between 0 and 1 (inclusive) for the specified free scalar and increment the specified log probability reference with the log absolute Jacobian determinant of the transform. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prob__constrain_8hpp_source.html b/doc/api/html/prob__constrain_8hpp_source.html new file mode 100644 index 00000000000..688533f8a40 --- /dev/null +++ b/doc/api/html/prob__constrain_8hpp_source.html @@ -0,0 +1,149 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/prob_constrain.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
prob_constrain.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_PROB_CONSTRAIN_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_PROB_CONSTRAIN_HPP
+
3 
+ + +
6 #include <cmath>
+
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
25  template <typename T>
+
26  inline
+
27  T prob_constrain(const T x) {
+ +
29  return inv_logit(x);
+
30  }
+
31 
+
53  template <typename T>
+
54  inline
+
55  T prob_constrain(const T x, T& lp) {
+ +
57  using stan::math::log1m;
+
58  using std::log;
+
59  T inv_logit_x = inv_logit(x);
+
60  lp += log(inv_logit_x) + log1m(inv_logit_x);
+
61  return inv_logit_x;
+
62  }
+
63 
+
64 
+
65  }
+
66 
+
67 }
+
68 
+
69 #endif
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
fvar< T > inv_logit(const fvar< T > &x)
Definition: inv_logit.hpp:15
+ + +
T prob_constrain(const T x)
Return a probability value constrained to fall between 0 and 1 (inclusive) for the specified free sca...
+
fvar< T > log1m(const fvar< T > &x)
Definition: log1m.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prob__free_8hpp.html b/doc/api/html/prob__free_8hpp.html new file mode 100644 index 00000000000..526b8a83a3d --- /dev/null +++ b/doc/api/html/prob__free_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/prob_free.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
prob_free.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
stan::math::prob_free (const T y)
 Return the free scalar that when transformed to a probability produces the specified scalar. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prob__free_8hpp_source.html b/doc/api/html/prob__free_8hpp_source.html new file mode 100644 index 00000000000..c327f6f920c --- /dev/null +++ b/doc/api/html/prob__free_8hpp_source.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/prob_free.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
prob_free.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_PROB_FREE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_PROB_FREE_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
25  template <typename T>
+
26  inline
+
27  T prob_free(const T y) {
+
28  using stan::math::logit;
+
29  stan::math::check_bounded<T, double, double>
+
30  ("stan::math::prob_free", "Probability variable",
+
31  y, 0, 1);
+
32  return logit(y);
+
33  }
+
34 
+
35  }
+
36 
+
37 }
+
38 
+
39 #endif
+ +
fvar< T > logit(const fvar< T > &x)
Definition: logit.hpp:17
+
T prob_free(const T y)
Return the free scalar that when transformed to a probability produces the specified scalar...
Definition: prob_free.hpp:27
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prod_8hpp.html b/doc/api/html/prod_8hpp.html new file mode 100644 index 00000000000..594d3bf30d6 --- /dev/null +++ b/doc/api/html/prod_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/prod.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
prod.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
stan::math::prod (const std::vector< T > &v)
 Returns the product of the coefficients of the specified standard vector. More...
 
template<typename T , int R, int C>
stan::math::prod (const Eigen::Matrix< T, R, C > &v)
 Returns the product of the coefficients of the specified column vector. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/prod_8hpp_source.html b/doc/api/html/prod_8hpp_source.html new file mode 100644 index 00000000000..3415cb4dbff --- /dev/null +++ b/doc/api/html/prod_8hpp_source.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/prod.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
prod.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_PROD_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_PROD_HPP
+
3 
+ +
5 #include <vector>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
16  template <typename T>
+
17  inline T prod(const std::vector<T>& v) {
+
18  if (v.size() == 0) return 1;
+
19  T product = v[0];
+
20  for (size_t i = 1; i < v.size(); ++i)
+
21  product *= v[i];
+
22  return product;
+
23  }
+
24 
+
31  template <typename T, int R, int C>
+
32  inline T prod(const Eigen::Matrix<T, R, C>& v) {
+
33  if (v.size() == 0) return 1.0;
+
34  return v.prod();
+
35  }
+
36 
+
37  }
+
38 }
+
39 #endif
+
T prod(const std::vector< T > &v)
Returns the product of the coefficients of the specified standard vector.
Definition: prod.hpp:17
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/promote__common_8hpp.html b/doc/api/html/promote__common_8hpp.html new file mode 100644 index 00000000000..0f4992ba70b --- /dev/null +++ b/doc/api/html/promote__common_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/promote_common.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
promote_common.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T1 , typename T2 , typename F >
common_type< T1, T2 >::type stan::math::promote_common (const F &u)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/promote__common_8hpp_source.html b/doc/api/html/promote__common_8hpp_source.html new file mode 100644 index 00000000000..706b8acaef4 --- /dev/null +++ b/doc/api/html/promote__common_8hpp_source.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/promote_common.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
promote_common.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_PROMOTE_COMMON_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_PROMOTE_COMMON_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
11  template <typename T1, typename T2, typename F>
+
12  inline
+
13  typename common_type<T1, T2>::type
+
14  promote_common(const F& u) {
+ +
16  ::promote_to(u);
+
17  }
+
18 
+
19  }
+
20 }
+
21 
+
22 
+
23 #endif
+ +
common_type< T1, T2 >::type promote_common(const F &u)
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/promoter_8hpp.html b/doc/api/html/promoter_8hpp.html new file mode 100644 index 00000000000..b63427e81ad --- /dev/null +++ b/doc/api/html/promoter_8hpp.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/promoter.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
promoter.hpp File Reference
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/promoter_8hpp_source.html b/doc/api/html/promoter_8hpp_source.html new file mode 100644 index 00000000000..211504101f7 --- /dev/null +++ b/doc/api/html/promoter_8hpp_source.html @@ -0,0 +1,217 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/promoter.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
promoter.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_PROMOTER_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_PROMOTER_HPP
+
3 
+ +
5 #include <vector>
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10  // from input type F to output type T
+
11 
+
12  // scalar, F != T (base template)
+
13  template <typename F, typename T>
+
14  struct promoter {
+
15  inline static void promote(const F& u, T& t) {
+
16  t = u;
+
17  }
+
18  inline static T promote_to(const F& u) {
+
19  return u;
+
20  }
+
21  };
+
22  // scalar, F == T
+
23  template <typename T>
+
24  struct promoter<T, T> {
+
25  inline static void promote(const T& u, T& t) {
+
26  t = u;
+
27  }
+
28  inline static T promote_to(const T& u) {
+
29  return u;
+
30  }
+
31  };
+
32 
+
33  // std::vector, F != T
+
34  template <typename F, typename T>
+
35  struct promoter<std::vector<F>, std::vector<T> > {
+
36  inline static void promote(const std::vector<F>& u,
+
37  std::vector<T>& t) {
+
38  t.resize(u.size());
+
39  for (size_t i = 0; i < u.size(); ++i)
+
40  promoter<F, T>::promote(u[i], t[i]);
+
41  }
+
42  inline static std::vector<T>
+
43  promote_to(const std::vector<F>& u) {
+
44  std::vector<T> t;
+
45  promoter<std::vector<F>, std::vector<T> >::promote(u, t);
+
46  return t;
+
47  }
+
48  };
+
49  // std::vector, F == T
+
50  template <typename T>
+
51  struct promoter<std::vector<T>, std::vector<T> > {
+
52  inline static void promote(const std::vector<T>& u,
+
53  std::vector<T>& t) {
+
54  t = u;
+
55  }
+
56  inline static std::vector<T> promote_to(const std::vector<T>& u) {
+
57  return u;
+
58  }
+
59  };
+
60 
+
61  // Eigen::Matrix, F != T
+
62  template <typename F, typename T, int R, int C>
+
63  struct promoter<Eigen::Matrix<F, R, C>, Eigen::Matrix<T, R, C> > {
+
64  inline static void promote(const Eigen::Matrix<F, R, C>& u,
+
65  Eigen::Matrix<T, R, C>& t) {
+
66  t.resize(u.rows(), u.cols());
+
67  for (int i = 0; i < u.size(); ++i)
+
68  promoter<F, T>::promote(u(i), t(i));
+
69  }
+
70  inline static Eigen::Matrix<T, R, C>
+
71  promote_to(const Eigen::Matrix<F, R, C>& u) {
+
72  Eigen::Matrix<T, R, C> t;
+ +
74  Eigen::Matrix<T, R, C> >::promote(u, t);
+
75  return t;
+
76  }
+
77  };
+
78  // Eigen::Matrix, F == T
+
79  template <typename T, int R, int C>
+
80  struct promoter<Eigen::Matrix<T, R, C>, Eigen::Matrix<T, R, C> > {
+
81  inline static void promote(const Eigen::Matrix<T, R, C>& u,
+
82  Eigen::Matrix<T, R, C>& t) {
+
83  t = u;
+
84  }
+
85  inline static Eigen::Matrix<T, R, C>
+
86  promote_to(const Eigen::Matrix<T, R, C>& u) {
+
87  return u;
+
88  }
+
89  };
+
90 
+
91  }
+
92 }
+
93 
+
94 
+
95 #endif
+
static void promote(const T &u, T &t)
Definition: promoter.hpp:25
+
static void promote(const std::vector< T > &u, std::vector< T > &t)
Definition: promoter.hpp:52
+
static void promote(const Eigen::Matrix< F, R, C > &u, Eigen::Matrix< T, R, C > &t)
Definition: promoter.hpp:64
+
static void promote(const std::vector< F > &u, std::vector< T > &t)
Definition: promoter.hpp:36
+
static T promote_to(const T &u)
Definition: promoter.hpp:28
+
static void promote(const Eigen::Matrix< T, R, C > &u, Eigen::Matrix< T, R, C > &t)
Definition: promoter.hpp:81
+
static Eigen::Matrix< T, R, C > promote_to(const Eigen::Matrix< T, R, C > &u)
Definition: promoter.hpp:86
+ +
static void promote(const F &u, T &t)
Definition: promoter.hpp:15
+
static T promote_to(const F &u)
Definition: promoter.hpp:18
+
static std::vector< T > promote_to(const std::vector< F > &u)
Definition: promoter.hpp:43
+ +
static std::vector< T > promote_to(const std::vector< T > &u)
Definition: promoter.hpp:56
+
static Eigen::Matrix< T, R, C > promote_to(const Eigen::Matrix< F, R, C > &u)
Definition: promoter.hpp:71
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/quad__form__diag_8hpp.html b/doc/api/html/quad__form__diag_8hpp.html new file mode 100644 index 00000000000..fc84139f4e2 --- /dev/null +++ b/doc/api/html/quad__form__diag_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/quad_form_diag.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
quad_form_diag.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T1 , typename T2 , int R, int C>
Matrix< typename promote_args
+< T1, T2 >::type, Dynamic,
+Dynamic > 
stan::math::quad_form_diag (const Matrix< T1, Dynamic, Dynamic > &mat, const Matrix< T2, R, C > &vec)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/quad__form__diag_8hpp_source.html b/doc/api/html/quad__form__diag_8hpp_source.html new file mode 100644 index 00000000000..091d42e16a5 --- /dev/null +++ b/doc/api/html/quad__form__diag_8hpp_source.html @@ -0,0 +1,159 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/quad_form_diag.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
quad_form_diag.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_QUAD_FORM_DIAG_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_QUAD_FORM_DIAG_HPP
+
3 
+ +
5 #include <boost/math/tools/promotion.hpp>
+ + + +
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
13  using Eigen::Dynamic;
+
14  using Eigen::Matrix;
+
15  using boost::math::tools::promote_args;
+
16 
+
17  template <typename T1, typename T2, int R, int C>
+
18  inline Matrix
+
19  <typename promote_args<T1, T2>::type, Dynamic, Dynamic>
+
20  quad_form_diag(const Matrix<T1, Dynamic, Dynamic>& mat,
+
21  const Matrix<T2, R, C>& vec) {
+
22  stan::math::check_vector("quad_form_diag", "vec", vec);
+
23  stan::math::check_square("quad_form_diag", "mat", mat);
+
24  int size = vec.size();
+
25  stan::math::check_equal("quad_form_diag", "matrix size", mat.rows(),
+
26  size);
+
27  Matrix<typename promote_args<T1, T2>::type, Dynamic, Dynamic>
+
28  result(size, size);
+
29  for (int i = 0; i < size; i++) {
+
30  result(i, i) = vec(i)*vec(i)*mat(i, i);
+
31  for (int j = i+1; j < size; ++j) {
+
32  typename promote_args<T1, T2>::type temp = vec(i)*vec(j);
+
33  result(j, i) = temp*mat(j, i);
+
34  result(i, j) = temp*mat(i, j);
+
35  }
+
36  }
+
37  return result;
+
38  }
+
39 
+
40  }
+
41 }
+
42 #endif
+
bool check_vector(const char *function, const char *name, const Eigen::Matrix< T, R, C > &x)
Return true if the matrix is either a row vector or column vector.
+
Matrix< typename promote_args< T1, T2 >::type, Dynamic, Dynamic > quad_form_diag(const Matrix< T1, Dynamic, Dynamic > &mat, const Matrix< T2, R, C > &vec)
+ +
bool check_equal(const char *function, const char *name, const T_y &y, const T_eq &eq)
Return true if y is equal to eq.
Definition: check_equal.hpp:90
+ + +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rank_8hpp.html b/doc/api/html/rank_8hpp.html new file mode 100644 index 00000000000..51b71427b7f --- /dev/null +++ b/doc/api/html/rank_8hpp.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/rank.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
rank.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
int stan::math::rank (const std::vector< T > &v, int s)
 Return the number of components of v less than v[s]. More...
 
template<typename T , int R, int C>
int stan::math::rank (const Eigen::Matrix< T, R, C > &v, int s)
 Return the number of components of v less than v[s]. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rank_8hpp_source.html b/doc/api/html/rank_8hpp_source.html new file mode 100644 index 00000000000..81be329f809 --- /dev/null +++ b/doc/api/html/rank_8hpp_source.html @@ -0,0 +1,155 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/rank.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
rank.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_RANK_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_RANK_HPP
+
3 
+ + +
6 #include <vector>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
19  template <typename T>
+
20  inline int rank(const std::vector<T> & v, int s) {
+ +
22  int size = static_cast<int>(v.size());
+
23  check_range("rank", "v", size, s);
+
24  --s;
+
25  int count(0);
+
26  T compare(v[s]);
+
27  for (int i = 0; i < size; ++i)
+
28  if (v[i] < compare)
+
29  ++count;
+
30  return count;
+
31  }
+
32 
+
41  template <typename T, int R, int C>
+
42  inline int rank(const Eigen::Matrix<T, R, C> & v, int s) {
+ +
44  int size = v.size();
+
45  check_range("rank", "v", size, s);
+
46  --s;
+
47  const T * vv = v.data();
+
48  int count(0);
+
49  T compare(vv[s]);
+
50  for (int i = 0; i < size; ++i)
+
51  if (vv[i] < compare)
+
52  ++count;
+
53  return count;
+
54  }
+
55 
+
56  }
+
57 }
+
58 #endif
+
bool check_range(const char *function, const char *name, const int max, const int index, const int nested_level, const char *error_msg)
Return true if specified index is within range.
Definition: check_range.hpp:29
+
int rank(const std::vector< T > &v, int s)
Return the number of components of v less than v[s].
Definition: rank.hpp:20
+ +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rayleigh__ccdf__log_8hpp.html b/doc/api/html/rayleigh__ccdf__log_8hpp.html new file mode 100644 index 00000000000..63606e9a2ac --- /dev/null +++ b/doc/api/html/rayleigh__ccdf__log_8hpp.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/rayleigh_ccdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
rayleigh_ccdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_scale >
return_type< T_y, T_scale >::type stan::math::rayleigh_ccdf_log (const T_y &y, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rayleigh__ccdf__log_8hpp_source.html b/doc/api/html/rayleigh__ccdf__log_8hpp_source.html new file mode 100644 index 00000000000..ce119547b66 --- /dev/null +++ b/doc/api/html/rayleigh__ccdf__log_8hpp_source.html @@ -0,0 +1,227 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/rayleigh_ccdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
rayleigh_ccdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_RAYLEIGH_CCDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_RAYLEIGH_CCDF_LOG_HPP
+
3 
+
4 #include <boost/random/uniform_real_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + +
20 
+
21 namespace stan {
+
22 
+
23  namespace math {
+
24 
+
25  template <typename T_y, typename T_scale>
+
26  typename return_type<T_y, T_scale>::type
+
27  rayleigh_ccdf_log(const T_y& y, const T_scale& sigma) {
+
28  static const char* function("stan::math::rayleigh_ccdf_log");
+ +
30  T_partials_return;
+
31 
+ + + + + + +
38  using stan::math::square;
+ +
40 
+
41  T_partials_return ccdf_log(0.0);
+
42 
+
43  // check if any vectors are zero length
+
44  if (!(stan::length(y) && stan::length(sigma)))
+
45  return ccdf_log;
+
46 
+
47  check_not_nan(function, "Random variable", y);
+
48  check_nonnegative(function, "Random variable", y);
+
49  check_not_nan(function, "Scale parameter", sigma);
+
50  check_positive(function, "Scale parameter", sigma);
+
51  check_consistent_sizes(function,
+
52  "Random variable", y,
+
53  "Scale parameter", sigma);
+
54 
+
55 
+
56  // set up template expressions wrapping scalars into vector views
+
57  OperandsAndPartials<T_y, T_scale> operands_and_partials(y, sigma);
+
58 
+
59  VectorView<const T_y> y_vec(y);
+
60  VectorView<const T_scale> sigma_vec(sigma);
+
61  size_t N = max_size(y, sigma);
+
62 
+ +
64  for (size_t i = 0; i < length(sigma); i++) {
+
65  inv_sigma[i] = 1.0 / value_of(sigma_vec[i]);
+
66  }
+
67 
+
68  for (size_t n = 0; n < N; n++) {
+
69  const T_partials_return y_dbl = value_of(y_vec[n]);
+
70  const T_partials_return y_sqr = y_dbl * y_dbl;
+
71  const T_partials_return inv_sigma_sqr = inv_sigma[n] * inv_sigma[n];
+
72 
+ +
74  ccdf_log += -0.5 * y_sqr * inv_sigma_sqr;
+
75 
+ +
77  operands_and_partials.d_x1[n] -= y_dbl * inv_sigma_sqr;
+ +
79  operands_and_partials.d_x2[n] += y_sqr * inv_sigma_sqr
+
80  * inv_sigma[n];
+
81  }
+
82 
+
83  return operands_and_partials.to_var(ccdf_log, y, sigma);
+
84  }
+
85  }
+
86 }
+
87 #endif
+ +
return_type< T_y, T_scale >::type rayleigh_ccdf_log(const T_y &y, const T_scale &sigma)
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
A variable implementation that stores operands and derivatives with respect to the variable...
+
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + + + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rayleigh__cdf_8hpp.html b/doc/api/html/rayleigh__cdf_8hpp.html new file mode 100644 index 00000000000..2dad56f1e25 --- /dev/null +++ b/doc/api/html/rayleigh__cdf_8hpp.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/rayleigh_cdf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
rayleigh_cdf.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_scale >
return_type< T_y, T_scale >::type stan::math::rayleigh_cdf (const T_y &y, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rayleigh__cdf_8hpp_source.html b/doc/api/html/rayleigh__cdf_8hpp_source.html new file mode 100644 index 00000000000..4224d5d6e7d --- /dev/null +++ b/doc/api/html/rayleigh__cdf_8hpp_source.html @@ -0,0 +1,241 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/rayleigh_cdf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
rayleigh_cdf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_RAYLEIGH_CDF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_RAYLEIGH_CDF_HPP
+
3 
+
4 #include <boost/random/uniform_real_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + +
20 #include <cmath>
+
21 
+
22 namespace stan {
+
23 
+
24  namespace math {
+
25 
+
26  template <typename T_y, typename T_scale>
+
27  typename return_type<T_y, T_scale>::type
+
28  rayleigh_cdf(const T_y& y, const T_scale& sigma) {
+
29  static const char* function("stan::math::rayleigh_cdf");
+ +
31  T_partials_return;
+
32 
+ + + + + + +
39  using stan::math::square;
+ +
41  using std::exp;
+
42 
+
43  T_partials_return cdf(1.0);
+
44 
+
45  // check if any vectors are zero length
+
46  if (!(stan::length(y) && stan::length(sigma)))
+
47  return cdf;
+
48 
+
49  check_not_nan(function, "Random variable", y);
+
50  check_nonnegative(function, "Random variable", y);
+
51  check_not_nan(function, "Scale parameter", sigma);
+
52  check_positive(function, "Scale parameter", sigma);
+
53  check_consistent_sizes(function,
+
54  "Random variable", y,
+
55  "Scale parameter", sigma);
+
56 
+
57 
+
58  // set up template expressions wrapping scalars into vector views
+
59  OperandsAndPartials<T_y, T_scale> operands_and_partials(y, sigma);
+
60 
+
61  VectorView<const T_y> y_vec(y);
+
62  VectorView<const T_scale> sigma_vec(sigma);
+
63  size_t N = max_size(y, sigma);
+
64 
+ +
66  for (size_t i = 0; i < length(sigma); i++) {
+
67  inv_sigma[i] = 1.0 / value_of(sigma_vec[i]);
+
68  }
+
69 
+
70  for (size_t n = 0; n < N; n++) {
+
71  const T_partials_return y_dbl = value_of(y_vec[n]);
+
72  const T_partials_return y_sqr = y_dbl * y_dbl;
+
73  const T_partials_return inv_sigma_sqr = inv_sigma[n] * inv_sigma[n];
+
74  const T_partials_return exp_val = exp(-0.5 * y_sqr * inv_sigma_sqr);
+
75 
+ +
77  cdf *= (1.0 - exp_val);
+
78  }
+
79 
+
80  // gradients
+
81  for (size_t n = 0; n < N; n++) {
+
82  const T_partials_return y_dbl = value_of(y_vec[n]);
+
83  const T_partials_return y_sqr = square(y_dbl);
+
84  const T_partials_return inv_sigma_sqr = square(inv_sigma[n]);
+
85  const T_partials_return exp_val = exp(-0.5 * y_sqr * inv_sigma_sqr);
+
86  const T_partials_return exp_div_1m_exp = exp_val / (1.0 - exp_val);
+
87 
+ +
89  operands_and_partials.d_x1[n] += y_dbl * inv_sigma_sqr
+
90  * exp_div_1m_exp * cdf;
+ +
92  operands_and_partials.d_x2[n] -= y_sqr * inv_sigma_sqr
+
93  * inv_sigma[n] * exp_div_1m_exp * cdf;
+
94  }
+
95 
+
96  return operands_and_partials.to_var(cdf, y, sigma);
+
97  }
+
98  }
+
99 }
+
100 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
A variable implementation that stores operands and derivatives with respect to the variable...
+
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + + + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+
return_type< T_y, T_scale >::type rayleigh_cdf(const T_y &y, const T_scale &sigma)
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rayleigh__cdf__log_8hpp.html b/doc/api/html/rayleigh__cdf__log_8hpp.html new file mode 100644 index 00000000000..0a44c33ae21 --- /dev/null +++ b/doc/api/html/rayleigh__cdf__log_8hpp.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/rayleigh_cdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
rayleigh_cdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_scale >
return_type< T_y, T_scale >::type stan::math::rayleigh_cdf_log (const T_y &y, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rayleigh__cdf__log_8hpp_source.html b/doc/api/html/rayleigh__cdf__log_8hpp_source.html new file mode 100644 index 00000000000..313fe295f3c --- /dev/null +++ b/doc/api/html/rayleigh__cdf__log_8hpp_source.html @@ -0,0 +1,234 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/rayleigh_cdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
rayleigh_cdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_RAYLEIGH_CDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_RAYLEIGH_CDF_LOG_HPP
+
3 
+
4 #include <boost/random/uniform_real_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + +
20 #include <cmath>
+
21 
+
22 namespace stan {
+
23 
+
24  namespace math {
+
25 
+
26  template <typename T_y, typename T_scale>
+
27  typename return_type<T_y, T_scale>::type
+
28  rayleigh_cdf_log(const T_y& y, const T_scale& sigma) {
+
29  static const char* function("stan::math::rayleigh_cdf_log");
+ +
31  T_partials_return;
+
32 
+ + + + + + +
39  using stan::math::square;
+ +
41  using stan::math::log1m;
+
42  using std::exp;
+
43 
+
44  T_partials_return cdf_log(0.0);
+
45 
+
46  // check if any vectors are zero length
+
47  if (!(stan::length(y) && stan::length(sigma)))
+
48  return cdf_log;
+
49 
+
50  check_not_nan(function, "Random variable", y);
+
51  check_nonnegative(function, "Random variable", y);
+
52  check_not_nan(function, "Scale parameter", sigma);
+
53  check_positive(function, "Scale parameter", sigma);
+
54  check_consistent_sizes(function,
+
55  "Random variable", y,
+
56  "Scale parameter", sigma);
+
57 
+
58  // set up template expressions wrapping scalars into vector views
+
59  OperandsAndPartials<T_y, T_scale> operands_and_partials(y, sigma);
+
60 
+
61  VectorView<const T_y> y_vec(y);
+
62  VectorView<const T_scale> sigma_vec(sigma);
+
63  size_t N = max_size(y, sigma);
+
64 
+ +
66  for (size_t i = 0; i < length(sigma); i++) {
+
67  inv_sigma[i] = 1.0 / value_of(sigma_vec[i]);
+
68  }
+
69 
+
70  for (size_t n = 0; n < N; n++) {
+
71  const T_partials_return y_dbl = value_of(y_vec[n]);
+
72  const T_partials_return y_sqr = y_dbl * y_dbl;
+
73  const T_partials_return inv_sigma_sqr = inv_sigma[n] * inv_sigma[n];
+
74  const T_partials_return exp_val = exp(-0.5 * y_sqr * inv_sigma_sqr);
+
75  const T_partials_return exp_div_1m_exp = exp_val / (1.0 - exp_val);
+
76 
+ +
78  cdf_log += log1m(exp_val);
+
79 
+ +
81  operands_and_partials.d_x1[n] += y_dbl * inv_sigma_sqr
+
82  * exp_div_1m_exp;
+ +
84  operands_and_partials.d_x2[n] -= y_sqr * inv_sigma_sqr
+
85  * inv_sigma[n] * exp_div_1m_exp;
+
86  }
+
87 
+
88  return operands_and_partials.to_var(cdf_log, y, sigma);
+
89  }
+
90  }
+
91 }
+
92 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
A variable implementation that stores operands and derivatives with respect to the variable...
+
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + +
return_type< T_y, T_scale >::type rayleigh_cdf_log(const T_y &y, const T_scale &sigma)
+ + + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
fvar< T > log1m(const fvar< T > &x)
Definition: log1m.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rayleigh__log_8hpp.html b/doc/api/html/rayleigh__log_8hpp.html new file mode 100644 index 00000000000..7337ccf5ce4 --- /dev/null +++ b/doc/api/html/rayleigh__log_8hpp.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/rayleigh_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
rayleigh_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_scale >
return_type< T_y, T_scale >::type stan::math::rayleigh_log (const T_y &y, const T_scale &sigma)
 
template<typename T_y , typename T_scale >
return_type< T_y, T_scale >::type stan::math::rayleigh_log (const T_y &y, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rayleigh__log_8hpp_source.html b/doc/api/html/rayleigh__log_8hpp_source.html new file mode 100644 index 00000000000..4803930ed3d --- /dev/null +++ b/doc/api/html/rayleigh__log_8hpp_source.html @@ -0,0 +1,254 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/rayleigh_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
rayleigh_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_RAYLEIGH_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_RAYLEIGH_LOG_HPP
+
3 
+
4 #include <boost/random/uniform_real_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + +
20 #include <cmath>
+
21 
+
22 namespace stan {
+
23 
+
24  namespace math {
+
25 
+
26  template <bool propto,
+
27  typename T_y, typename T_scale>
+
28  typename return_type<T_y, T_scale>::type
+
29  rayleigh_log(const T_y& y, const T_scale& sigma) {
+
30  static const char* function("stan::math::rayleigh_log");
+ +
32  T_partials_return;
+
33 
+
34  using std::log;
+ + + + + + +
41  using std::log;
+
42 
+
43  // check if any vectors are zero length
+
44  if (!(stan::length(y) && stan::length(sigma)))
+
45  return 0.0;
+
46 
+
47  // set up return value accumulator
+
48  T_partials_return logp(0.0);
+
49 
+
50  // validate args (here done over var, which should be OK)
+
51  check_not_nan(function, "Random variable", y);
+
52  check_positive(function, "Scale parameter", sigma);
+
53  check_positive(function, "Random variable", y);
+
54  check_consistent_sizes(function,
+
55  "Random variable", y,
+
56  "Scale parameter", sigma);
+
57 
+
58  // check if no variables are involved and prop-to
+ +
60  return 0.0;
+
61 
+
62  // set up template expressions wrapping scalars into vector views
+
63  OperandsAndPartials<T_y, T_scale> operands_and_partials(y, sigma);
+
64 
+
65  VectorView<const T_y> y_vec(y);
+
66  VectorView<const T_scale> sigma_vec(sigma);
+
67  size_t N = max_size(y, sigma);
+
68 
+ + +
71  T_partials_return, T_scale> log_sigma(length(sigma));
+
72  for (size_t i = 0; i < length(sigma); i++) {
+
73  inv_sigma[i] = 1.0 / value_of(sigma_vec[i]);
+ +
75  log_sigma[i] = log(value_of(sigma_vec[i]));
+
76  }
+
77 
+
78  for (size_t n = 0; n < N; n++) {
+
79  // pull out values of arguments
+
80  const T_partials_return y_dbl = value_of(y_vec[n]);
+
81 
+
82  // reusable subexpression values
+
83  const T_partials_return y_over_sigma = y_dbl * inv_sigma[n];
+
84 
+
85  static double NEGATIVE_HALF = -0.5;
+
86 
+
87  // log probability
+ +
89  logp -= 2.0 * log_sigma[n];
+ +
91  logp += log(y_dbl);
+
92  // if (include_summand<propto, T_y, T_scale>::value)
+
93  logp += NEGATIVE_HALF * y_over_sigma * y_over_sigma;
+
94 
+
95  // gradients
+
96  T_partials_return scaled_diff = inv_sigma[n] * y_over_sigma;
+ +
98  operands_and_partials.d_x1[n] += 1.0 / y_dbl - scaled_diff;
+ +
100  operands_and_partials.d_x2[n]
+
101  += y_over_sigma * scaled_diff - 2.0 * inv_sigma[n];
+
102  }
+
103  return operands_and_partials.to_var(logp, y, sigma);
+
104  }
+
105 
+
106  template <typename T_y, typename T_scale>
+
107  inline
+ +
109  rayleigh_log(const T_y& y, const T_scale& sigma) {
+
110  return rayleigh_log<false>(y, sigma);
+
111  }
+
112  }
+
113 }
+
114 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
return_type< T_y, T_scale >::type rayleigh_log(const T_y &y, const T_scale &sigma)
+
A variable implementation that stores operands and derivatives with respect to the variable...
+
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + + + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rayleigh__rng_8hpp.html b/doc/api/html/rayleigh__rng_8hpp.html new file mode 100644 index 00000000000..f48a8d2e509 --- /dev/null +++ b/doc/api/html/rayleigh__rng_8hpp.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/rayleigh_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
rayleigh_rng.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
double stan::math::rayleigh_rng (const double sigma, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rayleigh__rng_8hpp_source.html b/doc/api/html/rayleigh__rng_8hpp_source.html new file mode 100644 index 00000000000..5401e5d20d7 --- /dev/null +++ b/doc/api/html/rayleigh__rng_8hpp_source.html @@ -0,0 +1,171 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/rayleigh_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
rayleigh_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_RAYLEIGH_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_RAYLEIGH_RNG_HPP
+
3 
+
4 #include <boost/random/uniform_real_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + +
20 
+
21 namespace stan {
+
22 
+
23  namespace math {
+
24 
+
25  template <class RNG>
+
26  inline double
+
27  rayleigh_rng(const double sigma,
+
28  RNG& rng) {
+
29  using boost::variate_generator;
+
30  using boost::random::uniform_real_distribution;
+
31 
+
32  static const char* function("stan::math::rayleigh_rng");
+
33 
+ +
35 
+
36  check_positive(function, "Scale parameter", sigma);
+
37 
+
38  variate_generator<RNG&, uniform_real_distribution<> >
+
39  uniform_rng(rng, uniform_real_distribution<>(0.0, 1.0));
+
40  return sigma * std::sqrt(-2.0 * std::log(uniform_rng()));
+
41  }
+
42  }
+
43 }
+
44 #endif
+ +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+ +
double rayleigh_rng(const double sigma, RNG &rng)
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ + + +
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ +
double uniform_rng(const double alpha, const double beta, RNG &rng)
Definition: uniform_rng.hpp:22
+ + + + + + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/read__corr___l_8hpp.html b/doc/api/html/read__corr___l_8hpp.html new file mode 100644 index 00000000000..0f838b4151f --- /dev/null +++ b/doc/api/html/read__corr___l_8hpp.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/read_corr_L.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
read_corr_L.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/scal/fun/log1m.hpp>
+#include <stan/math/prim/scal/fun/square.hpp>
+#include <stan/math/prim/mat/fun/sum.hpp>
+#include <cstddef>
+#include <iostream>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::read_corr_L (const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const size_t K)
 Return the Cholesky factor of the correlation matrix of the specified dimensionality corresponding to the specified canonical partial correlations. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::read_corr_L (const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const size_t K, T &log_prob)
 Return the Cholesky factor of the correlation matrix of the specified dimensionality corresponding to the specified canonical partial correlations, incrementing the specified scalar reference with the log absolute determinant of the Jacobian of the transformation. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/read__corr___l_8hpp_source.html b/doc/api/html/read__corr___l_8hpp_source.html new file mode 100644 index 00000000000..9b731d18ec7 --- /dev/null +++ b/doc/api/html/read__corr___l_8hpp_source.html @@ -0,0 +1,193 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/read_corr_L.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
read_corr_L.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_READ_CORR_L_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_READ_CORR_L_HPP
+
3 
+ + + + +
8 #include <cstddef>
+
9 #include <iostream>
+
10 
+
11 namespace stan {
+
12 
+
13  namespace math {
+
14 
+
15 
+
16  // MATRIX TRANSFORMS +/- JACOBIANS
+
17 
+
39  template <typename T>
+
40  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
41  read_corr_L(const Eigen::Array<T, Eigen::Dynamic, 1>& CPCs, // on (-1, 1)
+
42  const size_t K) {
+
43  Eigen::Array<T, Eigen::Dynamic, 1> temp;
+
44  Eigen::Array<T, Eigen::Dynamic, 1> acc(K-1);
+
45  acc.setOnes();
+
46  // Cholesky factor of correlation matrix
+
47  Eigen::Array<T, Eigen::Dynamic, Eigen::Dynamic> L(K, K);
+
48  L.setZero();
+
49 
+
50  size_t position = 0;
+
51  size_t pull = K - 1;
+
52 
+
53  L(0, 0) = 1.0;
+
54  L.col(0).tail(pull) = temp = CPCs.head(pull);
+
55  acc.tail(pull) = T(1.0) - temp.square();
+
56  for (size_t i = 1; i < (K - 1); i++) {
+
57  position += pull;
+
58  pull--;
+
59  temp = CPCs.segment(position, pull);
+
60  L(i, i) = sqrt(acc(i-1));
+
61  L.col(i).tail(pull) = temp * acc.tail(pull).sqrt();
+
62  acc.tail(pull) *= T(1.0) - temp.square();
+
63  }
+
64  L(K-1, K-1) = sqrt(acc(K-2));
+
65  return L.matrix();
+
66  }
+
67 
+
68 
+
93  template <typename T>
+
94  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
95  read_corr_L(const Eigen::Array<T, Eigen::Dynamic, 1>& CPCs,
+
96  const size_t K,
+
97  T& log_prob) {
+
98  using stan::math::log1m;
+
99  using stan::math::square;
+
100  using stan::math::sum;
+
101 
+
102  Eigen::Matrix<T, Eigen::Dynamic, 1> values(CPCs.rows() - 1);
+
103  size_t pos = 0;
+
104  // no need to abs() because this Jacobian determinant
+
105  // is strictly positive (and triangular)
+
106  // see inverse of Jacobian in equation 11 of LKJ paper
+
107  for (size_t k = 1; k <= (K - 2); k++)
+
108  for (size_t i = k + 1; i <= K; i++) {
+
109  values(pos) = (K - k - 1) * log1m(square(CPCs(pos)));
+
110  pos++;
+
111  }
+
112 
+
113  log_prob += 0.5 * sum(values);
+
114  return read_corr_L(CPCs, K);
+
115  }
+
116 
+
117  }
+
118 
+
119 }
+
120 
+
121 #endif
+
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+ +
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+ + +
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > read_corr_L(const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const size_t K)
Return the Cholesky factor of the correlation matrix of the specified dimensionality corresponding to...
Definition: read_corr_L.hpp:41
+ +
fvar< T > log1m(const fvar< T > &x)
Definition: log1m.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/read__corr__matrix_8hpp.html b/doc/api/html/read__corr__matrix_8hpp.html new file mode 100644 index 00000000000..dbbbfe396ab --- /dev/null +++ b/doc/api/html/read__corr__matrix_8hpp.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/read_corr_matrix.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
read_corr_matrix.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::read_corr_matrix (const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const size_t K)
 Return the correlation matrix of the specified dimensionality corresponding to the specified canonical partial correlations. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::read_corr_matrix (const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const size_t K, T &log_prob)
 Return the correlation matrix of the specified dimensionality corresponding to the specified canonical partial correlations, incrementing the specified scalar reference with the log absolute determinant of the Jacobian of the transformation. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/read__corr__matrix_8hpp_source.html b/doc/api/html/read__corr__matrix_8hpp_source.html new file mode 100644 index 00000000000..c85bd2d9d0b --- /dev/null +++ b/doc/api/html/read__corr__matrix_8hpp_source.html @@ -0,0 +1,152 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/read_corr_matrix.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
read_corr_matrix.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_READ_CORR_MATRIX_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_READ_CORR_MATRIX_HPP
+
3 
+ + + +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12 
+
26  template <typename T>
+
27  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
28  read_corr_matrix(const Eigen::Array<T, Eigen::Dynamic, 1>& CPCs,
+
29  const size_t K) {
+
30  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> L
+
31  = read_corr_L(CPCs, K);
+ + +
34  }
+
35 
+
54  template <typename T>
+
55  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
56  read_corr_matrix(const Eigen::Array<T, Eigen::Dynamic, 1>& CPCs,
+
57  const size_t K,
+
58  T& log_prob) {
+
59  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> L
+
60  = read_corr_L(CPCs, K, log_prob);
+ + +
63  }
+
64 
+
65  }
+
66 
+
67 }
+
68 
+
69 #endif
+ +
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > read_corr_matrix(const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const size_t K)
Return the correlation matrix of the specified dimensionality corresponding to the specified canonica...
+
Eigen::Matrix< fvar< T >, R, R > multiply_lower_tri_self_transpose(const Eigen::Matrix< fvar< T >, R, C > &m)
+ +
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > read_corr_L(const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const size_t K)
Return the Cholesky factor of the correlation matrix of the specified dimensionality corresponding to...
Definition: read_corr_L.hpp:41
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/read__cov___l_8hpp.html b/doc/api/html/read__cov___l_8hpp.html new file mode 100644 index 00000000000..fae24a4d0e9 --- /dev/null +++ b/doc/api/html/read__cov___l_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/read_cov_L.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
read_cov_L.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::read_cov_L (const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const Eigen::Array< T, Eigen::Dynamic, 1 > &sds, T &log_prob)
 This is the function that should be called prior to evaluating the density of any elliptical distribution. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/read__cov___l_8hpp_source.html b/doc/api/html/read__cov___l_8hpp_source.html new file mode 100644 index 00000000000..05ae1336ab9 --- /dev/null +++ b/doc/api/html/read__cov___l_8hpp_source.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/read_cov_L.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
read_cov_L.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_READ_COV_L_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_READ_COV_L_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
21  template <typename T>
+
22  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
23  read_cov_L(const Eigen::Array<T, Eigen::Dynamic, 1>& CPCs,
+
24  const Eigen::Array<T, Eigen::Dynamic, 1>& sds,
+
25  T& log_prob) {
+
26  size_t K = sds.rows();
+
27  // adjust due to transformation from correlations to covariances
+
28  log_prob += (sds.log().sum() + stan::math::LOG_2) * K;
+
29  return sds.matrix().asDiagonal() * read_corr_L(CPCs, K, log_prob);
+
30  }
+
31 
+
32 
+
33  }
+
34 
+
35 }
+
36 
+
37 #endif
+
const double LOG_2
The natural logarithm of 2, .
Definition: constants.hpp:33
+
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > read_cov_L(const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const Eigen::Array< T, Eigen::Dynamic, 1 > &sds, T &log_prob)
This is the function that should be called prior to evaluating the density of any elliptical distribu...
Definition: read_cov_L.hpp:23
+ +
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > read_corr_L(const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const size_t K)
Return the Cholesky factor of the correlation matrix of the specified dimensionality corresponding to...
Definition: read_corr_L.hpp:41
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/read__cov__matrix_8hpp.html b/doc/api/html/read__cov__matrix_8hpp.html new file mode 100644 index 00000000000..7686e1527db --- /dev/null +++ b/doc/api/html/read__cov__matrix_8hpp.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/read_cov_matrix.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
read_cov_matrix.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::read_cov_matrix (const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const Eigen::Array< T, Eigen::Dynamic, 1 > &sds, T &log_prob)
 A generally worse alternative to call prior to evaluating the density of an elliptical distribution. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::read_cov_matrix (const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const Eigen::Array< T, Eigen::Dynamic, 1 > &sds)
 Builds a covariance matrix from CPCs and standard deviations. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/read__cov__matrix_8hpp_source.html b/doc/api/html/read__cov__matrix_8hpp_source.html new file mode 100644 index 00000000000..875e9bc64a4 --- /dev/null +++ b/doc/api/html/read__cov__matrix_8hpp_source.html @@ -0,0 +1,155 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/read_cov_matrix.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
read_cov_matrix.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_READ_COV_MATRIX_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_READ_COV_MATRIX_HPP
+
3 
+ + + +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
21  template <typename T>
+
22  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
23  read_cov_matrix(const Eigen::Array<T, Eigen::Dynamic, 1>& CPCs,
+
24  const Eigen::Array<T, Eigen::Dynamic, 1>& sds,
+
25  T& log_prob) {
+
26  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> L
+
27  = read_cov_L(CPCs, sds, log_prob);
+ + +
30  }
+
31 
+
39  template<typename T>
+
40  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
41  read_cov_matrix(const Eigen::Array<T, Eigen::Dynamic, 1>& CPCs,
+
42  const Eigen::Array<T, Eigen::Dynamic, 1>& sds) {
+
43  size_t K = sds.rows();
+
44  Eigen::DiagonalMatrix<T, Eigen::Dynamic> D(K);
+
45  D.diagonal() = sds;
+
46  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> L
+
47  = D * read_corr_L(CPCs, K);
+ + +
50  }
+
51 
+
52  }
+
53 
+
54 }
+
55 
+
56 #endif
+
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > read_cov_matrix(const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const Eigen::Array< T, Eigen::Dynamic, 1 > &sds, T &log_prob)
A generally worse alternative to call prior to evaluating the density of an elliptical distribution...
+ +
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > read_cov_L(const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const Eigen::Array< T, Eigen::Dynamic, 1 > &sds, T &log_prob)
This is the function that should be called prior to evaluating the density of any elliptical distribu...
Definition: read_cov_L.hpp:23
+
Eigen::Matrix< fvar< T >, R, R > multiply_lower_tri_self_transpose(const Eigen::Matrix< fvar< T >, R, C > &m)
+ + +
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > read_corr_L(const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const size_t K)
Return the Cholesky factor of the correlation matrix of the specified dimensionality corresponding to...
Definition: read_corr_L.hpp:41
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/recover__memory_8hpp.html b/doc/api/html/recover__memory_8hpp.html new file mode 100644 index 00000000000..d5a2087657f --- /dev/null +++ b/doc/api/html/recover__memory_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/rev/core/recover_memory.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
recover_memory.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

static void stan::math::recover_memory ()
 Recover memory used for all variables for reuse. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/recover__memory_8hpp_source.html b/doc/api/html/recover__memory_8hpp_source.html new file mode 100644 index 00000000000..18f92f9f453 --- /dev/null +++ b/doc/api/html/recover__memory_8hpp_source.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan/math/rev/core/recover_memory.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
recover_memory.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_RECOVER_MEMORY_HPP
+
2 #define STAN_MATH_REV_CORE_RECOVER_MEMORY_HPP
+
3 
+ + + + +
8 #include <stdexcept>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
19  static inline void recover_memory() {
+
20  if (!empty_nested())
+
21  throw std::logic_error("empty_nested() must be true"
+
22  " before calling recover_memory()");
+ + +
25  for (size_t i = 0; i < ChainableStack::var_alloc_stack_.size(); ++i) {
+ +
27  }
+ + +
30  }
+
31 
+
32  }
+
33 }
+
34 #endif
+
static bool empty_nested()
Return true if there is no nested autodiff being executed.
+ + + +
void recover_all()
Recover all the memory used by the stack allocator.
+
static std::vector< ChainableAllocT * > var_alloc_stack_
+
static std::vector< ChainableT * > var_nochain_stack_
+ +
static void recover_memory()
Recover memory used for all variables for reuse.
+ +
static std::vector< ChainableT * > var_stack_
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/recover__memory__nested_8hpp.html b/doc/api/html/recover__memory__nested_8hpp.html new file mode 100644 index 00000000000..3b1dfdadaa0 --- /dev/null +++ b/doc/api/html/recover__memory__nested_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/rev/core/recover_memory_nested.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
recover_memory_nested.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

static void stan::math::recover_memory_nested ()
 Recover only the memory used for the top nested call. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/recover__memory__nested_8hpp_source.html b/doc/api/html/recover__memory__nested_8hpp_source.html new file mode 100644 index 00000000000..013769abc72 --- /dev/null +++ b/doc/api/html/recover__memory__nested_8hpp_source.html @@ -0,0 +1,162 @@ + + + + + + +Stan Math Library: stan/math/rev/core/recover_memory_nested.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
recover_memory_nested.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_RECOVER_MEMORY_NESTED_HPP
+
2 #define STAN_MATH_REV_CORE_RECOVER_MEMORY_NESTED_HPP
+
3 
+ + + + +
8 #include <stdexcept>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
21  static inline void recover_memory_nested() {
+
22  if (empty_nested())
+
23  throw std::logic_error("empty_nested() must be false"
+
24  " before calling recover_memory_nested()");
+
25 
+ + + +
29 
+ + + +
33 
+ + +
36  ++i) {
+ +
38  }
+ + + +
42 
+ +
44  }
+
45 
+
46  }
+
47 }
+
48 #endif
+
static bool empty_nested()
Return true if there is no nested autodiff being executed.
+ + +
void recover_nested()
recover memory back to the last start_nested call.
+ +
static std::vector< ChainableAllocT * > var_alloc_stack_
+
static std::vector< ChainableT * > var_nochain_stack_
+
static std::vector< size_t > nested_var_nochain_stack_sizes_
+ +
static std::vector< size_t > nested_var_stack_sizes_
+
static void recover_memory_nested()
Recover only the memory used for the top nested call.
+ +
static std::vector< ChainableT * > var_stack_
+
static std::vector< size_t > nested_var_alloc_stack_starts_
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rep__array_8hpp.html b/doc/api/html/rep__array_8hpp.html new file mode 100644 index 00000000000..99dc35de795 --- /dev/null +++ b/doc/api/html/rep__array_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/fun/rep_array.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
rep_array.hpp File Reference
+
+
+
#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
std::vector< T > stan::math::rep_array (const T &x, int n)
 
template<typename T >
std::vector< std::vector< T > > stan::math::rep_array (const T &x, int m, int n)
 
template<typename T >
std::vector< std::vector
+< std::vector< T > > > 
stan::math::rep_array (const T &x, int k, int m, int n)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rep__array_8hpp_source.html b/doc/api/html/rep__array_8hpp_source.html new file mode 100644 index 00000000000..f8314213a43 --- /dev/null +++ b/doc/api/html/rep__array_8hpp_source.html @@ -0,0 +1,156 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/fun/rep_array.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
rep_array.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_ARR_FUN_REP_ARRAY_HPP
+
2 #define STAN_MATH_PRIM_ARR_FUN_REP_ARRAY_HPP
+
3 
+ +
5 #include <vector>
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
11  template <typename T>
+
12  inline std::vector<T>
+
13  rep_array(const T& x, int n) {
+ +
15  check_nonnegative("rep_array", "n", n);
+
16  return std::vector<T>(n, x);
+
17  }
+
18 
+
19  template <typename T>
+
20  inline std::vector<std::vector<T> >
+
21  rep_array(const T& x, int m, int n) {
+
22  using std::vector;
+ +
24  check_nonnegative("rep_array", "rows", m);
+
25  check_nonnegative("rep_array", "cols", n);
+
26  return vector<vector<T> >(m, vector<T>(n, x));
+
27  }
+
28 
+
29  template <typename T>
+
30  inline std::vector<std::vector<std::vector<T> > >
+
31  rep_array(const T& x, int k, int m, int n) {
+
32  using std::vector;
+ +
34  check_nonnegative("rep_array", "shelfs", k);
+
35  check_nonnegative("rep_array", "rows", m);
+
36  check_nonnegative("rep_array", "cols", n);
+
37  return vector<vector<vector<T> > >(k,
+
38  vector<vector<T> >(m,
+
39  vector<T>(n, x)));
+
40  }
+
41 
+
42  }
+
43 }
+
44 
+
45 #endif
+
std::vector< T > rep_array(const T &x, int n)
Definition: rep_array.hpp:13
+ +
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rep__matrix_8hpp.html b/doc/api/html/rep__matrix_8hpp.html new file mode 100644 index 00000000000..18e03e3a3f8 --- /dev/null +++ b/doc/api/html/rep__matrix_8hpp.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/rep_matrix.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
rep_matrix.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T >
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T >::type, Eigen::Dynamic,
+Eigen::Dynamic > 
stan::math::rep_matrix (const T &x, int m, int n)
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::rep_matrix (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v, int n)
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::rep_matrix (const Eigen::Matrix< T, 1, Eigen::Dynamic > &rv, int m)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rep__matrix_8hpp_source.html b/doc/api/html/rep__matrix_8hpp_source.html new file mode 100644 index 00000000000..fbfb805c7a1 --- /dev/null +++ b/doc/api/html/rep__matrix_8hpp_source.html @@ -0,0 +1,158 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/rep_matrix.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
rep_matrix.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_REP_MATRIX_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_REP_MATRIX_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+ + +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline
+
14  Eigen::Matrix<typename boost::math::tools::promote_args<T>::type,
+
15  Eigen::Dynamic, Eigen::Dynamic>
+
16  rep_matrix(const T& x, int m, int n) {
+ +
18  check_nonnegative("rep_matrix", "rows", m);
+
19  check_nonnegative("rep_matrix", "cols", n);
+
20  return Eigen::Matrix<typename boost::math::tools::promote_args<T>::type,
+
21  Eigen::Dynamic, Eigen::Dynamic>::Constant(m, n, x);
+
22  }
+
23 
+
24  template <typename T>
+
25  inline Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
26  rep_matrix(const Eigen::Matrix<T, Eigen::Dynamic, 1>& v, int n) {
+ +
28  check_nonnegative("rep_matrix", "rows", n);
+
29  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> result(v.size(), n);
+
30  result.colwise() = v;
+
31  return result;
+
32  }
+
33 
+
34  template <typename T>
+
35  inline Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
+
36  rep_matrix(const Eigen::Matrix<T, 1, Eigen::Dynamic>& rv, int m) {
+ +
38  check_nonnegative("rep_matrix", "cols", m);
+
39  Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> result(m, rv.size());
+
40  result.rowwise() = rv;
+
41  return result;
+
42  }
+
43  }
+
44 }
+
45 
+
46 #endif
+ + +
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+
Eigen::Matrix< typename boost::math::tools::promote_args< T >::type, Eigen::Dynamic, Eigen::Dynamic > rep_matrix(const T &x, int m, int n)
Definition: rep_matrix.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rep__row__vector_8hpp.html b/doc/api/html/rep__row__vector_8hpp.html new file mode 100644 index 00000000000..e1273129f6b --- /dev/null +++ b/doc/api/html/rep__row__vector_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/rep_row_vector.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
rep_row_vector.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T >::type, 1, Eigen::Dynamic > 
stan::math::rep_row_vector (const T &x, int m)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rep__row__vector_8hpp_source.html b/doc/api/html/rep__row__vector_8hpp_source.html new file mode 100644 index 00000000000..1a29b3cf71c --- /dev/null +++ b/doc/api/html/rep__row__vector_8hpp_source.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/rep_row_vector.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
rep_row_vector.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_REP_ROW_VECTOR_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_REP_ROW_VECTOR_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+ + +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline Eigen::Matrix<typename boost::math::tools::promote_args<T>::type,
+
14  1, Eigen::Dynamic>
+
15  rep_row_vector(const T& x, int m) {
+ +
17  check_nonnegative("rep_row_vector", "m", m);
+
18  return Eigen::Matrix<typename boost::math::tools::promote_args<T>::type,
+
19  1, Eigen::Dynamic>::Constant(m, x);
+
20  }
+
21 
+
22  }
+
23 }
+
24 
+
25 #endif
+
Eigen::Matrix< typename boost::math::tools::promote_args< T >::type, 1, Eigen::Dynamic > rep_row_vector(const T &x, int m)
+ + +
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rep__vector_8hpp.html b/doc/api/html/rep__vector_8hpp.html new file mode 100644 index 00000000000..437d17b8d65 --- /dev/null +++ b/doc/api/html/rep__vector_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/rep_vector.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
rep_vector.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+#include <stan/math/prim/scal/err/check_nonnegative.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T >::type, Eigen::Dynamic, 1 > 
stan::math::rep_vector (const T &x, int n)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rep__vector_8hpp_source.html b/doc/api/html/rep__vector_8hpp_source.html new file mode 100644 index 00000000000..6f145c44d8e --- /dev/null +++ b/doc/api/html/rep__vector_8hpp_source.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/rep_vector.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
rep_vector.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_REP_VECTOR_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_REP_VECTOR_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+ + +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <typename T>
+
13  inline
+
14  Eigen::Matrix<typename boost::math::tools::promote_args<T>::type,
+
15  Eigen::Dynamic, 1>
+
16  rep_vector(const T& x, int n) {
+ +
18  check_nonnegative("rep_vector", "n", n);
+
19  return Eigen::Matrix<typename boost::math::tools::promote_args<T>::type,
+
20  Eigen::Dynamic, 1>::Constant(n, x);
+
21  }
+
22 
+
23 
+
24  }
+
25 }
+
26 
+
27 #endif
+
Eigen::Matrix< typename boost::math::tools::promote_args< T >::type, Eigen::Dynamic, 1 > rep_vector(const T &x, int n)
Definition: rep_vector.hpp:16
+ + +
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/resize_8hpp.html b/doc/api/html/resize_8hpp.html new file mode 100644 index 00000000000..64c8c1c4e79 --- /dev/null +++ b/doc/api/html/resize_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/resize.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
resize.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
void stan::math::resize (T &x, std::vector< size_t > dims)
 Recursively resize the specified vector of vectors, which must bottom out at scalar values, Eigen vectors or Eigen matrices. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/resize_8hpp_source.html b/doc/api/html/resize_8hpp_source.html new file mode 100644 index 00000000000..adeddf18ccf --- /dev/null +++ b/doc/api/html/resize_8hpp_source.html @@ -0,0 +1,171 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/resize.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
resize.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_RESIZE_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_RESIZE_HPP
+
3 
+ +
5 #include <vector>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  namespace {
+
11 
+
12  template <typename T>
+
13  void resize(Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>& x,
+
14  const std::vector<size_t>& dims,
+
15  size_t pos) {
+
16  x.resize(dims[pos], dims[pos+1]);
+
17  }
+
18 
+
19  template <typename T>
+
20  void resize(Eigen::Matrix<T, Eigen::Dynamic, 1>& x,
+
21  const std::vector<size_t>& dims,
+
22  size_t pos) {
+
23  x.resize(dims[pos]);
+
24  }
+
25 
+
26  template <typename T>
+
27  void resize(Eigen::Matrix<T, 1, Eigen::Dynamic>& x,
+
28  const std::vector<size_t>& dims,
+
29  size_t pos) {
+
30  x.resize(dims[pos]);
+
31  }
+
32 
+
33  template <typename T>
+
34  void resize(T /*x*/,
+
35  const std::vector<size_t>& /*dims*/,
+
36  size_t /*pos*/) {
+
37  // no-op
+
38  }
+
39 
+
40  template <typename T>
+
41  void resize(std::vector<T>& x,
+
42  const std::vector<size_t>& dims,
+
43  size_t pos) {
+
44  x.resize(dims[pos]);
+
45  ++pos;
+
46  if (pos >= dims.size()) return; // skips lowest loop to scalar
+
47  for (size_t i = 0; i < x.size(); ++i)
+
48  resize(x[i], dims, pos);
+
49  }
+
50 
+
51  }
+
52 
+
62  template <typename T>
+
63  inline void resize(T& x, std::vector<size_t> dims) {
+
64  resize(x, dims, 0U);
+
65  }
+
66 
+
67  }
+
68 }
+
69 #endif
+
void resize(T &x, std::vector< size_t > dims)
Recursively resize the specified vector of vectors, which must bottom out at scalar values...
Definition: resize.hpp:63
+
void dims(const T &x, std::vector< int > &result)
Definition: dims.hpp:13
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/return__type_8hpp.html b/doc/api/html/return__type_8hpp.html new file mode 100644 index 00000000000..e52820c5b49 --- /dev/null +++ b/doc/api/html/return__type_8hpp.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/return_type.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
return_type.hpp File Reference
+
+
+
#include <stan/math/prim/scal/meta/scalar_type.hpp>
+#include <boost/math/tools/promotion.hpp>
+
+

Go to the source code of this file.

+ + + + + +

+Classes

struct  stan::return_type< T1, T2, T3, T4, T5, T6 >
 Metaprogram to calculate the base scalar return type resulting from promoting all the scalar types of the template parameters. More...
 
+ + + +

+Namespaces

 stan
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/return__type_8hpp_source.html b/doc/api/html/return__type_8hpp_source.html new file mode 100644 index 00000000000..8cf891f58fd --- /dev/null +++ b/doc/api/html/return__type_8hpp_source.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/return_type.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
return_type.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_RETURN_TYPE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_RETURN_TYPE_HPP
+
3 
+ +
5 #include <boost/math/tools/promotion.hpp>
+
6 
+
7 namespace stan {
+
8 
+
13  template <typename T1,
+
14  typename T2 = double,
+
15  typename T3 = double,
+
16  typename T4 = double,
+
17  typename T5 = double,
+
18  typename T6 = double>
+
19  struct return_type {
+
20  typedef typename
+
21  boost::math::tools::promote_args<typename scalar_type<T1>::type,
+
22  typename scalar_type<T2>::type,
+
23  typename scalar_type<T3>::type,
+
24  typename scalar_type<T4>::type,
+
25  typename scalar_type<T5>::type,
+ + +
28  };
+
29 
+
30 }
+
31 #endif
+
32 
+
Metaprogram to calculate the base scalar return type resulting from promoting all the scalar types of...
Definition: return_type.hpp:19
+
scalar_type_helper< is_vector< T >::value, T >::type type
Definition: scalar_type.hpp:38
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2arr_2fun_2log__sum__exp_8hpp.html b/doc/api/html/rev_2arr_2fun_2log__sum__exp_8hpp.html new file mode 100644 index 00000000000..7ca3ee8e78e --- /dev/null +++ b/doc/api/html/rev_2arr_2fun_2log__sum__exp_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/rev/arr/fun/log_sum_exp.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_sum_exp.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <stan/math/rev/scal/fun/calculate_chain.hpp>
+#include <stan/math/prim/arr/fun/log_sum_exp.hpp>
+#include <vector>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::log_sum_exp (const std::vector< var > &x)
 Returns the log sum of exponentials. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2arr_2fun_2log__sum__exp_8hpp_source.html b/doc/api/html/rev_2arr_2fun_2log__sum__exp_8hpp_source.html new file mode 100644 index 00000000000..6f96d4c083c --- /dev/null +++ b/doc/api/html/rev_2arr_2fun_2log__sum__exp_8hpp_source.html @@ -0,0 +1,167 @@ + + + + + + +Stan Math Library: stan/math/rev/arr/fun/log_sum_exp.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_sum_exp.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_ARR_FUN_LOG_SUM_EXP_HPP
+
2 #define STAN_MATH_REV_ARR_FUN_LOG_SUM_EXP_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ + +
7 #include <vector>
+
8 #include <limits>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
13  namespace {
+
14  double log_sum_exp_as_double(const std::vector<var>& x) {
+
15  using std::numeric_limits;
+
16  using std::exp;
+
17  using std::log;
+
18  double max = -numeric_limits<double>::infinity();
+
19  for (size_t i = 0; i < x.size(); ++i)
+
20  if (x[i] > max)
+
21  max = x[i].val();
+
22  double sum = 0.0;
+
23  for (size_t i = 0; i < x.size(); ++i)
+
24  if (x[i] != -numeric_limits<double>::infinity())
+
25  sum += exp(x[i].val() - max);
+
26  return max + log(sum);
+
27  }
+
28 
+
29  class log_sum_exp_vector_vari : public op_vector_vari {
+
30  public:
+
31  explicit log_sum_exp_vector_vari(const std::vector<var>& x) :
+
32  op_vector_vari(log_sum_exp_as_double(x), x) {
+
33  }
+
34  void chain() {
+
35  for (size_t i = 0; i < size_; ++i) {
+
36  vis_[i]->adj_ += adj_ * calculate_chain(vis_[i]->val_, val_);
+
37  }
+
38  }
+
39  };
+
40  }
+
41 
+
45  inline var log_sum_exp(const std::vector<var>& x) {
+
46  return var(new log_sum_exp_vector_vari(x));
+
47  }
+
48 
+
49  }
+
50 }
+
51 #endif
+
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
fvar< T > log_sum_exp(const std::vector< fvar< T > > &v)
Definition: log_sum_exp.hpp:14
+ +
double calculate_chain(const double &x, const double &val)
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
size_t size_
Definition: dot_self.hpp:18
+
int max(const std::vector< int > &x)
Returns the maximum coefficient in the specified column vector.
Definition: max.hpp:21
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2arr_2fun_2sum_8hpp.html b/doc/api/html/rev_2arr_2fun_2sum_8hpp.html new file mode 100644 index 00000000000..a858d23f3b2 --- /dev/null +++ b/doc/api/html/rev_2arr_2fun_2sum_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/rev/arr/fun/sum.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
sum.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  stan::math::sum_v_vari
 Class for sums of variables constructed with standard vectors. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::sum (const std::vector< var > &m)
 Returns the sum of the entries of the specified vector. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2arr_2fun_2sum_8hpp_source.html b/doc/api/html/rev_2arr_2fun_2sum_8hpp_source.html new file mode 100644 index 00000000000..c37dc319203 --- /dev/null +++ b/doc/api/html/rev_2arr_2fun_2sum_8hpp_source.html @@ -0,0 +1,174 @@ + + + + + + +Stan Math Library: stan/math/rev/arr/fun/sum.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
sum.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_ARR_FUN_SUM_HPP
+
2 #define STAN_MATH_REV_ARR_FUN_SUM_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+
5 #include <vector>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
14  class sum_v_vari : public vari {
+
15  protected:
+
16  vari** v_;
+
17  size_t length_;
+
18 
+
19  inline static double sum_of_val(const std::vector<var>& v) {
+
20  double result = 0;
+
21  for (size_t i = 0; i < v.size(); i++)
+
22  result += v[i].val();
+
23  return result;
+
24  }
+
25 
+
26  public:
+
27  explicit sum_v_vari(double value, vari** v, size_t length)
+
28  : vari(value), v_(v), length_(length) {
+
29  }
+
30 
+
31  explicit sum_v_vari(const std::vector<var> &v1)
+
32  : vari(sum_of_val(v1)),
+
33  v_(reinterpret_cast<vari**>(ChainableStack::memalloc_
+
34  .alloc(v1.size() * sizeof(vari*)))),
+
35  length_(v1.size()) {
+
36  for (size_t i = 0; i < length_; i++)
+
37  v_[i] = v1[i].vi_;
+
38  }
+
39 
+
40  virtual void chain() {
+
41  for (size_t i = 0; i < length_; i++) {
+
42  v_[i]->adj_ += adj_;
+
43  }
+
44  }
+
45  };
+
46 
+
53  inline var sum(const std::vector<var>& m) {
+
54  if (m.size() == 0)
+
55  return 0.0;
+
56  return var(new sum_v_vari(m));
+
57  }
+
58 
+
59  }
+
60 }
+
61 #endif
+
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+
sum_v_vari(double value, vari **v, size_t length)
Definition: sum.hpp:27
+ + +
The variable implementation base class.
Definition: vari.hpp:28
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+ +
virtual void chain()
Apply the chain rule to this variable based on the variables on which it depends. ...
Definition: sum.hpp:40
+
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+ +
double adj_
The adjoint of this variable, which is the partial derivative of this variable with respect to the ro...
Definition: vari.hpp:42
+
static double sum_of_val(const std::vector< var > &v)
Definition: sum.hpp:19
+
Class for sums of variables constructed with standard vectors.
Definition: sum.hpp:14
+
sum_v_vari(const std::vector< var > &v1)
Definition: sum.hpp:31
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2arr_2functor_2coupled__ode__system_8hpp.html b/doc/api/html/rev_2arr_2functor_2coupled__ode__system_8hpp.html new file mode 100644 index 00000000000..494f956c689 --- /dev/null +++ b/doc/api/html/rev_2arr_2functor_2coupled__ode__system_8hpp.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan/math/rev/arr/functor/coupled_ode_system.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
coupled_ode_system.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + +

+Classes

struct  stan::math::coupled_ode_system< F, double, stan::math::var >
 The coupled ODE system for known initial values and unknown parameters. More...
 
struct  stan::math::coupled_ode_system< F, stan::math::var, double >
 The coupled ODE system for unknown initial values and known parameters. More...
 
struct  stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >
 The coupled ode system for unknown intial values and unknown parameters. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

void stan::math::add_initial_values (const std::vector< stan::math::var > &y0, std::vector< std::vector< stan::math::var > > &y)
 Increment the state derived from the coupled system in the with the original initial state. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2arr_2functor_2coupled__ode__system_8hpp_source.html b/doc/api/html/rev_2arr_2functor_2coupled__ode__system_8hpp_source.html new file mode 100644 index 00000000000..d933e14833f --- /dev/null +++ b/doc/api/html/rev_2arr_2functor_2coupled__ode__system_8hpp_source.html @@ -0,0 +1,618 @@ + + + + + + +Stan Math Library: stan/math/rev/arr/functor/coupled_ode_system.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
coupled_ode_system.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_ARR_FUNCTOR_COUPLED_ODE_SYSTEM_HPP
+
2 #define STAN_MATH_REV_ARR_FUNCTOR_COUPLED_ODE_SYSTEM_HPP
+
3 
+ +
5 #include <stan/math/rev/core.hpp>
+ + +
8 #include <ostream>
+
9 #include <vector>
+
10 
+
11 namespace stan {
+
12 
+
13  namespace math {
+
14 
+
15  // This code is in this directory because it includes var
+
16  // It is in namespace stan::math so that the partial template
+
17  // specializations are treated as such.
+
18 
+
19 
+
31  void add_initial_values(const std::vector<stan::math::var>& y0,
+
32  std::vector<std::vector<stan::math::var> >& y) {
+
33  for (size_t n = 0; n < y.size(); n++)
+
34  for (size_t m = 0; m < y0.size(); m++)
+
35  y[n][m] += y0[m];
+
36  }
+
37 
+
59  template <typename F>
+
60  struct coupled_ode_system <F, double, stan::math::var> {
+
61  const F& f_;
+
62  const std::vector<double>& y0_dbl_;
+
63  const std::vector<stan::math::var>& theta_;
+
64  std::vector<double> theta_dbl_;
+
65  const std::vector<double>& x_;
+
66  const std::vector<int>& x_int_;
+
67  const size_t N_;
+
68  const size_t M_;
+
69  const size_t size_;
+
70  std::ostream* msgs_;
+
71 
+
84  coupled_ode_system(const F& f,
+
85  const std::vector<double>& y0,
+
86  const std::vector<stan::math::var>& theta,
+
87  const std::vector<double>& x,
+
88  const std::vector<int>& x_int,
+
89  std::ostream* msgs)
+
90  : f_(f),
+
91  y0_dbl_(y0),
+
92  theta_(theta),
+
93  theta_dbl_(theta.size(), 0.0),
+
94  x_(x),
+
95  x_int_(x_int),
+
96  N_(y0.size()),
+
97  M_(theta.size()),
+
98  size_(N_ + N_ * M_),
+
99  msgs_(msgs) {
+
100  for (size_t m = 0; m < M_; m++)
+
101  theta_dbl_[m] = stan::math::value_of(theta[m]);
+
102  }
+
103 
+
118  void operator()(const std::vector<double>& y,
+
119  std::vector<double>& dy_dt,
+
120  double t) {
+
121  using std::vector;
+
122  using stan::math::var;
+
123 
+
124  vector<double> y_base(y.begin(), y.begin()+N_);
+
125  dy_dt = f_(t, y_base, theta_dbl_, x_, x_int_, msgs_);
+
126  stan::math::check_equal("coupled_ode_system",
+
127  "dy_dt", dy_dt.size(), N_);
+
128 
+
129  vector<double> coupled_sys(N_ * M_);
+
130  vector<var> theta_temp;
+
131  vector<var> y_temp;
+
132  vector<var> dy_dt_temp;
+
133  vector<double> grad;
+
134  vector<var> vars;
+
135 
+
136  for (size_t i = 0; i < N_; i++) {
+
137  theta_temp.clear();
+
138  y_temp.clear();
+
139  dy_dt_temp.clear();
+
140  grad.clear();
+
141  vars.clear();
+
142  try {
+ +
144  for (size_t j = 0; j < N_; j++) {
+
145  y_temp.push_back(y[j]);
+
146  vars.push_back(y_temp[j]);
+
147  }
+
148 
+
149  for (size_t j = 0; j < M_; j++) {
+
150  theta_temp.push_back(theta_dbl_[j]);
+
151  vars.push_back(theta_temp[j]);
+
152  }
+
153  dy_dt_temp = f_(t, y_temp, theta_temp, x_, x_int_, msgs_);
+
154  dy_dt_temp[i].grad(vars, grad);
+
155 
+
156  for (size_t j = 0; j < M_; j++) {
+
157  // orders derivatives by equation (i.e. if there are 2 eqns
+
158  // (y1, y2) and 2 parameters (a, b), dy_dt will be ordered as:
+
159  // dy1_dt, dy2_dt, dy1_da, dy2_da, dy1_db, dy2_db
+
160  double temp_deriv = grad[y_temp.size() + j];
+
161  for (size_t k = 0; k < N_; k++)
+
162  temp_deriv += y[N_ + N_ * j + k] * grad[k];
+
163 
+
164  coupled_sys[i + j * N_] = temp_deriv;
+
165  }
+
166  } catch (const std::exception& e) {
+ +
168  throw;
+
169  }
+ +
171  }
+
172 
+
173  dy_dt.insert(dy_dt.end(), coupled_sys.begin(), coupled_sys.end());
+
174  }
+
175 
+
181  size_t size() const {
+
182  return size_;
+
183  }
+
184 
+
198  std::vector<double> initial_state() {
+
199  std::vector<double> state(size_, 0.0);
+
200  for (size_t n = 0; n < N_; n++)
+
201  state[n] = y0_dbl_[n];
+
202  return state;
+
203  }
+
204 
+
205 
+
212  std::vector<std::vector<stan::math::var> >
+
213  decouple_states(const std::vector<std::vector<double> >& y) {
+ +
215  std::vector<stan::math::var> temp_vars;
+
216  std::vector<double> temp_gradients;
+
217  std::vector<std::vector<stan::math::var> > y_return(y.size());
+
218 
+
219  for (size_t i = 0; i < y.size(); i++) {
+
220  temp_vars.clear();
+
221 
+
222  // iterate over number of equations
+
223  for (size_t j = 0; j < N_; j++) {
+
224  temp_gradients.clear();
+
225 
+
226  // iterate over parameters for each equation
+
227  for (size_t k = 0; k < M_; k++)
+
228  temp_gradients.push_back(y[i][y0_dbl_.size()
+
229  + y0_dbl_.size() * k + j]);
+
230 
+
231  temp_vars.push_back(precomputed_gradients(y[i][j],
+
232  theta_,
+
233  temp_gradients));
+
234  }
+
235  y_return[i] = temp_vars;
+
236  }
+
237 
+
238  return y_return;
+
239  }
+
240  };
+
241 
+
242 
+
243 
+
244 
+
245 
+
246 
+
273  template <typename F>
+
274  struct coupled_ode_system <F, stan::math::var, double> {
+
275  const F& f_;
+
276  const std::vector<stan::math::var>& y0_;
+
277  std::vector<double> y0_dbl_;
+
278  const std::vector<double>& theta_dbl_;
+
279  const std::vector<double>& x_;
+
280  const std::vector<int>& x_int_;
+
281  std::ostream* msgs_;
+
282  const size_t N_;
+
283  const size_t M_;
+
284  const size_t size_;
+
285 
+
299  coupled_ode_system(const F& f,
+
300  const std::vector<stan::math::var>& y0,
+
301  const std::vector<double>& theta,
+
302  const std::vector<double>& x,
+
303  const std::vector<int>& x_int,
+
304  std::ostream* msgs)
+
305  : f_(f),
+
306  y0_(y0),
+
307  y0_dbl_(y0.size(), 0.0),
+
308  theta_dbl_(theta),
+
309  x_(x),
+
310  x_int_(x_int),
+
311  msgs_(msgs),
+
312  N_(y0.size()),
+
313  M_(theta.size()),
+
314  size_(N_ + N_ * N_) {
+
315  for (size_t n = 0; n < N_; n++)
+
316  y0_dbl_[n] = stan::math::value_of(y0_[n]);
+
317  }
+
318 
+
332  void operator()(const std::vector<double>& y,
+
333  std::vector<double>& dy_dt,
+
334  double t) {
+
335  std::vector<double> y_base(y.begin(), y.begin() + N_);
+
336  for (size_t n = 0; n < N_; n++)
+
337  y_base[n] += y0_dbl_[n];
+
338 
+
339  dy_dt = f_(t, y_base, theta_dbl_, x_, x_int_, msgs_);
+
340  stan::math::check_equal("coupled_ode_system",
+
341  "dy_dt", dy_dt.size(), N_);
+
342 
+
343  std::vector<double> coupled_sys(N_ * N_);
+
344 
+
345  std::vector<stan::math::var> y_temp;
+
346  std::vector<stan::math::var> dy_dt_temp;
+
347  std::vector<double> grad;
+
348  std::vector<stan::math::var> vars;
+
349 
+
350  for (size_t i = 0; i < N_; i++) {
+
351  y_temp.clear();
+
352  dy_dt_temp.clear();
+
353  grad.clear();
+
354  vars.clear();
+
355  try {
+ +
357  for (size_t j = 0; j < N_; j++) {
+
358  y_temp.push_back(y[j] + y0_dbl_[j]);
+
359  vars.push_back(y_temp[j]);
+
360  }
+
361 
+
362  dy_dt_temp = f_(t, y_temp, theta_dbl_, x_, x_int_, msgs_);
+
363  dy_dt_temp[i].grad(vars, grad);
+
364 
+
365  for (size_t j = 0; j < N_; j++) {
+
366  // orders derivatives by equation (i.e. if there are 2 eqns
+
367  // (y1, y2) and 2 parameters (a, b), dy_dt will be ordered as:
+
368  // dy1_dt, dy2_dt, dy1_da, dy2_da, dy1_db, dy2_db
+
369  double temp_deriv = grad[j];
+
370  for (size_t k = 0; k < N_; k++)
+
371  temp_deriv += y[N_ + N_ * j + k] * grad[k];
+
372 
+
373  coupled_sys[i+j*N_] = temp_deriv;
+
374  }
+
375  } catch (const std::exception& e) {
+ +
377  throw;
+
378  }
+ +
380  }
+
381 
+
382  dy_dt.insert(dy_dt.end(), coupled_sys.begin(), coupled_sys.end());
+
383  }
+
384 
+
390  size_t size() const {
+
391  return size_;
+
392  }
+
393 
+
408  std::vector<double> initial_state() {
+
409  return std::vector<double>(size_, 0.0);
+
410  }
+
411 
+
419  std::vector<std::vector<stan::math::var> >
+
420  decouple_states(const std::vector<std::vector<double> >& y) {
+ +
422  using stan::math::var;
+
423  using std::vector;
+
424 
+
425  vector<var> temp_vars;
+
426  vector<double> temp_gradients;
+
427  vector<vector<var> > y_return(y.size());
+
428 
+
429  for (size_t i = 0; i < y.size(); i++) {
+
430  temp_vars.clear();
+
431 
+
432  // iterate over number of equations
+
433  for (size_t j = 0; j < N_; j++) {
+
434  temp_gradients.clear();
+
435 
+
436  // iterate over parameters for each equation
+
437  for (size_t k = 0; k < N_; k++)
+
438  temp_gradients.push_back(y[i][y0_.size() + y0_.size() * k + j]);
+
439 
+
440  temp_vars.push_back(precomputed_gradients(y[i][j],
+
441  y0_, temp_gradients));
+
442  }
+
443 
+
444  y_return[i] = temp_vars;
+
445  }
+
446 
+
447  add_initial_values(y0_, y_return);
+
448 
+
449  return y_return;
+
450  }
+
451  };
+
452 
+
453 
+
454 
+
455 
+
456 
+
457 
+
458 
+
494  template <typename F>
+ +
496  const F& f_;
+
497  const std::vector<stan::math::var>& y0_;
+
498  std::vector<double> y0_dbl_;
+
499  const std::vector<stan::math::var>& theta_;
+
500  std::vector<double> theta_dbl_;
+
501  const std::vector<double>& x_;
+
502  const std::vector<int>& x_int_;
+
503  const size_t N_;
+
504  const size_t M_;
+
505  const size_t size_;
+
506  std::ostream* msgs_;
+
507 
+
521  coupled_ode_system(const F& f,
+
522  const std::vector<stan::math::var>& y0,
+
523  const std::vector<stan::math::var>& theta,
+
524  const std::vector<double>& x,
+
525  const std::vector<int>& x_int,
+
526  std::ostream* msgs)
+
527  : f_(f),
+
528  y0_(y0),
+
529  y0_dbl_(y0.size(), 0.0),
+
530  theta_(theta),
+
531  theta_dbl_(theta.size(), 0.0),
+
532  x_(x),
+
533  x_int_(x_int),
+
534  N_(y0.size()),
+
535  M_(theta.size()),
+
536  size_(N_ + N_ * (N_ + M_)),
+
537  msgs_(msgs) {
+
538  for (size_t n = 0; n < N_; n++)
+
539  y0_dbl_[n] = stan::math::value_of(y0[n]);
+
540 
+
541  for (size_t m = 0; m < M_; m++)
+
542  theta_dbl_[m] = stan::math::value_of(theta[m]);
+
543  }
+
544 
+
558  void operator()(const std::vector<double>& y,
+
559  std::vector<double>& dy_dt,
+
560  double t) {
+
561  using std::vector;
+
562  using stan::math::var;
+
563 
+
564  vector<double> y_base(y.begin(), y.begin()+N_);
+
565  for (size_t n = 0; n < N_; n++)
+
566  y_base[n] += y0_dbl_[n];
+
567 
+
568  dy_dt = f_(t, y_base, theta_dbl_, x_, x_int_, msgs_);
+
569  stan::math::check_equal("coupled_ode_system",
+
570  "dy_dt", dy_dt.size(), N_);
+
571 
+
572  vector<double> coupled_sys(N_ * (N_ + M_));
+
573  vector<var> theta_temp;
+
574  vector<var> y_temp;
+
575  vector<var> dy_dt_temp;
+
576  vector<double> grad;
+
577  vector<var> vars;
+
578 
+
579  for (size_t i = 0; i < N_; i++) {
+
580  theta_temp.clear();
+
581  y_temp.clear();
+
582  dy_dt_temp.clear();
+
583  grad.clear();
+
584  vars.clear();
+
585  try {
+ +
587 
+
588  for (size_t j = 0; j < N_; j++) {
+
589  y_temp.push_back(y[j] + y0_dbl_[j]);
+
590  vars.push_back(y_temp[j]);
+
591  }
+
592 
+
593  for (size_t j = 0; j < M_; j++) {
+
594  theta_temp.push_back(theta_dbl_[j]);
+
595  vars.push_back(theta_temp[j]);
+
596  }
+
597 
+
598  dy_dt_temp = f_(t, y_temp, theta_temp, x_, x_int_, msgs_);
+
599  dy_dt_temp[i].grad(vars, grad);
+
600 
+
601  for (size_t j = 0; j < N_+M_; j++) {
+
602  // orders derivatives by equation (i.e. if there are 2 eqns
+
603  // (y1, y2) and 2 parameters (a, b), dy_dt will be ordered as:
+
604  // dy1_dt, dy2_dt, dy1_da, dy2_da, dy1_db, dy2_db
+
605  double temp_deriv = grad[j];
+
606  for (size_t k = 0; k < N_; k++)
+
607  temp_deriv += y[N_ + N_ * j + k] * grad[k];
+
608 
+
609  coupled_sys[i + j * N_] = temp_deriv;
+
610  }
+
611  } catch (const std::exception& e) {
+ +
613  throw;
+
614  }
+ +
616  }
+
617  dy_dt.insert(dy_dt.end(), coupled_sys.begin(), coupled_sys.end());
+
618  }
+
619 
+
625  size_t size() const {
+
626  return size_;
+
627  }
+
628 
+
640  std::vector<double> initial_state() {
+
641  return std::vector<double>(size_, 0.0);
+
642  }
+
643 
+
651  std::vector<std::vector<stan::math::var> >
+
652  decouple_states(const std::vector<std::vector<double> >& y) {
+
653  using std::vector;
+
654  using stan::math::var;
+ +
656 
+
657  vector<var> vars = y0_;
+
658  vars.insert(vars.end(), theta_.begin(), theta_.end());
+
659 
+
660  vector<var> temp_vars;
+
661  vector<double> temp_gradients;
+
662  vector<vector<var> > y_return(y.size());
+
663 
+
664  for (size_t i = 0; i < y.size(); i++) {
+
665  temp_vars.clear();
+
666 
+
667  // iterate over number of equations
+
668  for (size_t j = 0; j < N_; j++) {
+
669  temp_gradients.clear();
+
670 
+
671  // iterate over parameters for each equation
+
672  for (size_t k = 0; k < N_ + M_; k++)
+
673  temp_gradients.push_back(y[i][N_ + N_ * k + j]);
+
674 
+
675  temp_vars.push_back(precomputed_gradients(y[i][j],
+
676  vars, temp_gradients));
+
677  }
+
678  y_return[i] = temp_vars;
+
679  }
+
680  add_initial_values(y0_, y_return);
+
681  return y_return;
+
682  }
+
683  };
+
684 
+
685 
+
686  }
+
687 
+
688 }
+
689 
+
690 #endif
+
var precomputed_gradients(const double value, const std::vector< var > &operands, const std::vector< double > &gradients)
This function returns a var for an expression that has the specified value, vector of operands...
+ + +
std::vector< std::vector< stan::math::var > > decouple_states(const std::vector< std::vector< double > > &y)
Returns the base ODE system state corresponding to the specified coupled system state.
+ + +
std::vector< std::vector< stan::math::var > > decouple_states(const std::vector< std::vector< double > > &y)
Return the solutions to the basic ODE system, including appropriate autodiff partial derivatives...
+
coupled_ode_system(const F &f, const std::vector< double > &y0, const std::vector< stan::math::var > &theta, const std::vector< double > &x, const std::vector< int > &x_int, std::ostream *msgs)
Construct a coupled ODE system with the specified base ODE system, base initial state, parameters, data, and a message stream.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ + +
static void grad(chainable *vi)
Compute the gradient for all variables starting from the specified root variable implementation.
Definition: grad.hpp:30
+
std::vector< double > initial_state()
Returns the initial state of the coupled system.
+
std::vector< std::vector< stan::math::var > > decouple_states(const std::vector< std::vector< double > > &y)
Return the basic ODE solutions given the specified coupled system solutions, including the partials v...
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
size_t size() const
Returns the size of the coupled system.
+ + +
int M_
+
void operator()(const std::vector< double > &y, std::vector< double > &dy_dt, double t)
Assign the derivative vector with the system derivatives at the specified state and time...
+ +
size_t size_
Definition: dot_self.hpp:18
+
std::vector< double > initial_state()
Returns the initial state of the coupled system.
+
coupled_ode_system(const F &f, const std::vector< stan::math::var > &y0, const std::vector< double > &theta, const std::vector< double > &x, const std::vector< int > &x_int, std::ostream *msgs)
Construct a coupled ODE system for an unknown initial state and known parameters givne the specified ...
+ + + + + +
void operator()(const std::vector< double > &y, std::vector< double > &dy_dt, double t)
Populates the derivative vector with derivatives of the coupled ODE system state with respect to time...
+ +
bool check_equal(const char *function, const char *name, const T_y &y, const T_eq &eq)
Return true if y is equal to eq.
Definition: check_equal.hpp:90
+ + +
void add_initial_values(const std::vector< stan::math::var > &y0, std::vector< std::vector< stan::math::var > > &y)
Increment the state derived from the coupled system in the with the original initial state...
+ + +
void operator()(const std::vector< double > &y, std::vector< double > &dy_dt, double t)
Calculates the derivative of the coupled ode system with respect to the state y at time t...
+ +
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+ +
std::vector< double > initial_state()
Returns the initial state of the coupled system.
+
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+ +
coupled_ode_system(const F &f, const std::vector< stan::math::var > &y0, const std::vector< stan::math::var > &theta, const std::vector< double > &x, const std::vector< int > &x_int, std::ostream *msgs)
Construct a coupled ODE system with unknown initial value and known parameters, given the base ODE sy...
+ + + +
Base template class for a coupled ordinary differential equation system, which adds sensitivities to ...
+
static void recover_memory_nested()
Recover only the memory used for the top nested call.
+ + + + + +
size_t size() const
Returns the size of the coupled system.
+
int N_
+ + +
size_t size() const
Returns the size of the coupled system.
+ + +
static void start_nested()
Record the current position so that recover_memory_nested() can find it.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2core_2operator__addition_8hpp.html b/doc/api/html/rev_2core_2operator__addition_8hpp.html new file mode 100644 index 00000000000..ac4004da07a --- /dev/null +++ b/doc/api/html/rev_2core_2operator__addition_8hpp.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_addition.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_addition.hpp File Reference
+
+
+
#include <stan/math/rev/core/var.hpp>
+#include <stan/math/rev/core/vv_vari.hpp>
+#include <stan/math/rev/core/vd_vari.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

var stan::math::operator+ (const var &a, const var &b)
 Addition operator for variables (C++). More...
 
var stan::math::operator+ (const var &a, const double b)
 Addition operator for variable and scalar (C++). More...
 
var stan::math::operator+ (const double a, const var &b)
 Addition operator for scalar and variable (C++). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2core_2operator__addition_8hpp_source.html b/doc/api/html/rev_2core_2operator__addition_8hpp_source.html new file mode 100644 index 00000000000..608946ef055 --- /dev/null +++ b/doc/api/html/rev_2core_2operator__addition_8hpp_source.html @@ -0,0 +1,180 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_addition.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_addition.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_OPERATOR_ADDITION_HPP
+
2 #define STAN_MATH_REV_CORE_OPERATOR_ADDITION_HPP
+
3 
+ + + +
7 #include <boost/math/special_functions/fpclassify.hpp>
+
8 #include <limits>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
13  namespace {
+
14  class add_vv_vari : public op_vv_vari {
+
15  public:
+
16  add_vv_vari(vari* avi, vari* bvi) :
+
17  op_vv_vari(avi->val_ + bvi->val_, avi, bvi) {
+
18  }
+
19  void chain() {
+
20  if (unlikely(boost::math::isnan(avi_->val_)
+
21  || boost::math::isnan(bvi_->val_))) {
+
22  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
23  bvi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
24  } else {
+
25  avi_->adj_ += adj_;
+
26  bvi_->adj_ += adj_;
+
27  }
+
28  }
+
29  };
+
30 
+
31  class add_vd_vari : public op_vd_vari {
+
32  public:
+
33  add_vd_vari(vari* avi, double b) :
+
34  op_vd_vari(avi->val_ + b, avi, b) {
+
35  }
+
36  void chain() {
+
37  if (unlikely(boost::math::isnan(avi_->val_)
+
38  || boost::math::isnan(bd_)))
+
39  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
40  else
+
41  avi_->adj_ += adj_;
+
42  }
+
43  };
+
44  }
+
45 
+
84  inline var operator+(const var& a, const var& b) {
+
85  return var(new add_vv_vari(a.vi_, b.vi_));
+
86  }
+
87 
+
99  inline var operator+(const var& a, const double b) {
+
100  if (b == 0.0)
+
101  return a;
+
102  return var(new add_vd_vari(a.vi_, b));
+
103  }
+
104 
+
116  inline var operator+(const double a, const var& b) {
+
117  if (a == 0.0)
+
118  return b;
+
119  return var(new add_vd_vari(b.vi_, a)); // by symmetry
+
120  }
+
121 
+
122  }
+
123 }
+
124 #endif
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
+
#define unlikely(x)
Definition: likely.hpp:9
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
fvar< T > operator+(const fvar< T > &x1, const fvar< T > &x2)
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2core_2operator__division_8hpp.html b/doc/api/html/rev_2core_2operator__division_8hpp.html new file mode 100644 index 00000000000..7e0e2fd1965 --- /dev/null +++ b/doc/api/html/rev_2core_2operator__division_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_division.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_division.hpp File Reference
+
+
+
#include <stan/math/rev/core/var.hpp>
+#include <stan/math/rev/core/vv_vari.hpp>
+#include <stan/math/rev/core/vd_vari.hpp>
+#include <stan/math/rev/core/dv_vari.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

var stan::math::operator/ (const var &a, const var &b)
 Division operator for two variables (C++). More...
 
var stan::math::operator/ (const var &a, const double b)
 Division operator for dividing a variable by a scalar (C++). More...
 
var stan::math::operator/ (const double a, const var &b)
 Division operator for dividing a scalar by a variable (C++). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2core_2operator__division_8hpp_source.html b/doc/api/html/rev_2core_2operator__division_8hpp_source.html new file mode 100644 index 00000000000..6846cc8a6ca --- /dev/null +++ b/doc/api/html/rev_2core_2operator__division_8hpp_source.html @@ -0,0 +1,191 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_division.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_division.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_OPERATOR_DIVISION_HPP
+
2 #define STAN_MATH_REV_CORE_OPERATOR_DIVISION_HPP
+
3 
+ + + + +
8 #include <boost/math/special_functions/fpclassify.hpp>
+
9 #include <limits>
+
10 
+
11 namespace stan {
+
12  namespace math {
+
13 
+
14  namespace {
+
15  // (a/b)' = a' * (1 / b) - b' * (a / [b * b])
+
16  class divide_vv_vari : public op_vv_vari {
+
17  public:
+
18  divide_vv_vari(vari* avi, vari* bvi) :
+
19  op_vv_vari(avi->val_ / bvi->val_, avi, bvi) {
+
20  }
+
21  void chain() {
+
22  if (unlikely(boost::math::isnan(avi_->val_)
+
23  || boost::math::isnan(bvi_->val_))) {
+
24  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
25  bvi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
26  } else {
+
27  avi_->adj_ += adj_ / bvi_->val_;
+
28  bvi_->adj_ -= adj_ * avi_->val_ / (bvi_->val_ * bvi_->val_);
+
29  }
+
30  }
+
31  };
+
32 
+
33  class divide_vd_vari : public op_vd_vari {
+
34  public:
+
35  divide_vd_vari(vari* avi, double b) :
+
36  op_vd_vari(avi->val_ / b, avi, b) {
+
37  }
+
38  void chain() {
+
39  if (unlikely(boost::math::isnan(avi_->val_)
+
40  || boost::math::isnan(bd_)))
+
41  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
42  else
+
43  avi_->adj_ += adj_ / bd_;
+
44  }
+
45  };
+
46 
+
47  class divide_dv_vari : public op_dv_vari {
+
48  public:
+
49  divide_dv_vari(double a, vari* bvi) :
+
50  op_dv_vari(a / bvi->val_, a, bvi) {
+
51  }
+
52  void chain() {
+
53  bvi_->adj_ -= adj_ * ad_ / (bvi_->val_ * bvi_->val_);
+
54  }
+
55  };
+
56  }
+
57 
+
96  inline var operator/(const var& a, const var& b) {
+
97  return var(new divide_vv_vari(a.vi_, b.vi_));
+
98  }
+
99 
+
111  inline var operator/(const var& a, const double b) {
+
112  if (b == 1.0)
+
113  return a;
+
114  return var(new divide_vd_vari(a.vi_, b));
+
115  }
+
116 
+
128  inline var operator/(const double a, const var& b) {
+
129  return var(new divide_dv_vari(a, b.vi_));
+
130  }
+
131 
+
132  }
+
133 }
+
134 #endif
+ +
fvar< T > operator/(const fvar< T > &x1, const fvar< T > &x2)
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
+
#define unlikely(x)
Definition: likely.hpp:9
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2core_2operator__equal_8hpp.html b/doc/api/html/rev_2core_2operator__equal_8hpp.html new file mode 100644 index 00000000000..41953272c90 --- /dev/null +++ b/doc/api/html/rev_2core_2operator__equal_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_equal.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_equal.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

bool stan::math::operator== (const var &a, const var &b)
 Equality operator comparing two variables' values (C++). More...
 
bool stan::math::operator== (const var &a, const double b)
 Equality operator comparing a variable's value and a double (C++). More...
 
bool stan::math::operator== (const double a, const var &b)
 Equality operator comparing a scalar and a variable's value (C++). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2core_2operator__equal_8hpp_source.html b/doc/api/html/rev_2core_2operator__equal_8hpp_source.html new file mode 100644 index 00000000000..9d87c9708ea --- /dev/null +++ b/doc/api/html/rev_2core_2operator__equal_8hpp_source.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_equal.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_equal.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_OPERATOR_EQUAL_HPP
+
2 #define STAN_MATH_REV_CORE_OPERATOR_EQUAL_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
26  inline bool operator==(const var& a, const var& b) {
+
27  return a.val() == b.val();
+
28  }
+
29 
+
39  inline bool operator==(const var& a, const double b) {
+
40  return a.val() == b;
+
41  }
+
42 
+
51  inline bool operator==(const double a, const var& b) {
+
52  return a == b.val();
+
53  }
+
54 
+
55  }
+
56 }
+
57 #endif
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+ +
bool operator==(const fvar< T > &x, const fvar< T > &y)
+
double val() const
Return the value of this variable.
Definition: var.hpp:234
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2core_2operator__greater__than_8hpp.html b/doc/api/html/rev_2core_2operator__greater__than_8hpp.html new file mode 100644 index 00000000000..4b7a6a52b29 --- /dev/null +++ b/doc/api/html/rev_2core_2operator__greater__than_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_greater_than.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_greater_than.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

bool stan::math::operator> (const var &a, const var &b)
 Greater than operator comparing variables' values (C++). More...
 
bool stan::math::operator> (const var &a, const double b)
 Greater than operator comparing variable's value and double (C++). More...
 
bool stan::math::operator> (const double a, const var &b)
 Greater than operator comparing a double and a variable's value (C++). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2core_2operator__greater__than_8hpp_source.html b/doc/api/html/rev_2core_2operator__greater__than_8hpp_source.html new file mode 100644 index 00000000000..cd7e43f7dd8 --- /dev/null +++ b/doc/api/html/rev_2core_2operator__greater__than_8hpp_source.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_greater_than.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_greater_than.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_OPERATOR_GREATER_THAN_HPP
+
2 #define STAN_MATH_REV_CORE_OPERATOR_GREATER_THAN_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
25  inline bool operator>(const var& a, const var& b) {
+
26  return a.val() > b.val();
+
27  }
+
28 
+
37  inline bool operator>(const var& a, const double b) {
+
38  return a.val() > b;
+
39  }
+
40 
+
49  inline bool operator>(const double a, const var& b) {
+
50  return a > b.val();
+
51  }
+
52 
+
53  }
+
54 }
+
55 #endif
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+ +
bool operator>(const fvar< T > &x, const fvar< T > &y)
+
double val() const
Return the value of this variable.
Definition: var.hpp:234
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2core_2operator__greater__than__or__equal_8hpp.html b/doc/api/html/rev_2core_2operator__greater__than__or__equal_8hpp.html new file mode 100644 index 00000000000..35ababc72bb --- /dev/null +++ b/doc/api/html/rev_2core_2operator__greater__than__or__equal_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_greater_than_or_equal.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_greater_than_or_equal.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

bool stan::math::operator>= (const var &a, const var &b)
 Greater than or equal operator comparing two variables' values (C++). More...
 
bool stan::math::operator>= (const var &a, const double b)
 Greater than or equal operator comparing variable's value and double (C++). More...
 
bool stan::math::operator>= (const double a, const var &b)
 Greater than or equal operator comparing double and variable's value (C++). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2core_2operator__greater__than__or__equal_8hpp_source.html b/doc/api/html/rev_2core_2operator__greater__than__or__equal_8hpp_source.html new file mode 100644 index 00000000000..ea3c6bf59dc --- /dev/null +++ b/doc/api/html/rev_2core_2operator__greater__than__or__equal_8hpp_source.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_greater_than_or_equal.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_greater_than_or_equal.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_OPERATOR_GREATER_THAN_OR_EQUAL_HPP
+
2 #define STAN_MATH_REV_CORE_OPERATOR_GREATER_THAN_OR_EQUAL_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
27  inline bool operator>=(const var& a, const var& b) {
+
28  return a.val() >= b.val();
+
29  }
+
30 
+
40  inline bool operator>=(const var& a, const double b) {
+
41  return a.val() >= b;
+
42  }
+
43 
+
53  inline bool operator>=(const double a, const var& b) {
+
54  return a >= b.val();
+
55  }
+
56 
+
57  }
+
58 }
+
59 #endif
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+ +
bool operator>=(const fvar< T > &x, const fvar< T > &y)
+
double val() const
Return the value of this variable.
Definition: var.hpp:234
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2core_2operator__less__than_8hpp.html b/doc/api/html/rev_2core_2operator__less__than_8hpp.html new file mode 100644 index 00000000000..5e47fd59009 --- /dev/null +++ b/doc/api/html/rev_2core_2operator__less__than_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_less_than.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_less_than.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

bool stan::math::operator< (const var &a, const var &b)
 Less than operator comparing variables' values (C++). More...
 
bool stan::math::operator< (const var &a, const double b)
 Less than operator comparing variable's value and a double (C++). More...
 
bool stan::math::operator< (const double a, const var &b)
 Less than operator comparing a double and variable's value (C++). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2core_2operator__less__than_8hpp_source.html b/doc/api/html/rev_2core_2operator__less__than_8hpp_source.html new file mode 100644 index 00000000000..7d8189a03d5 --- /dev/null +++ b/doc/api/html/rev_2core_2operator__less__than_8hpp_source.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_less_than.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_less_than.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_OPERATOR_LESS_THAN_HPP
+
2 #define STAN_MATH_REV_CORE_OPERATOR_LESS_THAN_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
24  inline bool operator<(const var& a, const var& b) {
+
25  return a.val() < b.val();
+
26  }
+
27 
+
36  inline bool operator<(const var& a, const double b) {
+
37  return a.val() < b;
+
38  }
+
39 
+
48  inline bool operator<(const double a, const var& b) {
+
49  return a < b.val();
+
50  }
+
51 
+
52  }
+
53 }
+
54 #endif
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+ +
bool operator<(const fvar< T > &x, double y)
+
double val() const
Return the value of this variable.
Definition: var.hpp:234
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2core_2operator__less__than__or__equal_8hpp.html b/doc/api/html/rev_2core_2operator__less__than__or__equal_8hpp.html new file mode 100644 index 00000000000..9b3ab898fbc --- /dev/null +++ b/doc/api/html/rev_2core_2operator__less__than__or__equal_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_less_than_or_equal.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_less_than_or_equal.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

bool stan::math::operator<= (const var &a, const var &b)
 Less than or equal operator comparing two variables' values (C++). More...
 
bool stan::math::operator<= (const var &a, const double b)
 Less than or equal operator comparing a variable's value and a scalar (C++). More...
 
bool stan::math::operator<= (const double a, const var &b)
 Less than or equal operator comparing a double and variable's value (C++). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2core_2operator__less__than__or__equal_8hpp_source.html b/doc/api/html/rev_2core_2operator__less__than__or__equal_8hpp_source.html new file mode 100644 index 00000000000..988063433e6 --- /dev/null +++ b/doc/api/html/rev_2core_2operator__less__than__or__equal_8hpp_source.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_less_than_or_equal.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_less_than_or_equal.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_OPERATOR_LESS_THAN_OR_EQUAL_HPP
+
2 #define STAN_MATH_REV_CORE_OPERATOR_LESS_THAN_OR_EQUAL_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
26  inline bool operator<=(const var& a, const var& b) {
+
27  return a.val() <= b.val();
+
28  }
+
29 
+
39  inline bool operator<=(const var& a, const double b) {
+
40  return a.val() <= b;
+
41  }
+
42 
+
52  inline bool operator<=(const double a, const var& b) {
+
53  return a <= b.val();
+
54  }
+
55 
+
56  }
+
57 }
+
58 #endif
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
bool operator<=(const fvar< T > &x, const fvar< T > &y)
+ +
double val() const
Return the value of this variable.
Definition: var.hpp:234
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2core_2operator__multiplication_8hpp.html b/doc/api/html/rev_2core_2operator__multiplication_8hpp.html new file mode 100644 index 00000000000..67cefdd7097 --- /dev/null +++ b/doc/api/html/rev_2core_2operator__multiplication_8hpp.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_multiplication.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_multiplication.hpp File Reference
+
+
+
#include <stan/math/rev/core/var.hpp>
+#include <stan/math/rev/core/vv_vari.hpp>
+#include <stan/math/rev/core/vd_vari.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

var stan::math::operator* (const var &a, const var &b)
 Multiplication operator for two variables (C++). More...
 
var stan::math::operator* (const var &a, const double b)
 Multiplication operator for a variable and a scalar (C++). More...
 
var stan::math::operator* (const double a, const var &b)
 Multiplication operator for a scalar and a variable (C++). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2core_2operator__multiplication_8hpp_source.html b/doc/api/html/rev_2core_2operator__multiplication_8hpp_source.html new file mode 100644 index 00000000000..0f77a463079 --- /dev/null +++ b/doc/api/html/rev_2core_2operator__multiplication_8hpp_source.html @@ -0,0 +1,180 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_multiplication.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_multiplication.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_OPERATOR_MULTIPLICATION_HPP
+
2 #define STAN_MATH_REV_CORE_OPERATOR_MULTIPLICATION_HPP
+
3 
+ + + +
7 #include <boost/math/special_functions/fpclassify.hpp>
+
8 #include <limits>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
13  namespace {
+
14  class multiply_vv_vari : public op_vv_vari {
+
15  public:
+
16  multiply_vv_vari(vari* avi, vari* bvi) :
+
17  op_vv_vari(avi->val_ * bvi->val_, avi, bvi) {
+
18  }
+
19  void chain() {
+
20  if (unlikely(boost::math::isnan(avi_->val_)
+
21  || boost::math::isnan(bvi_->val_))) {
+
22  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
23  bvi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
24  } else {
+
25  avi_->adj_ += bvi_->val_ * adj_;
+
26  bvi_->adj_ += avi_->val_ * adj_;
+
27  }
+
28  }
+
29  };
+
30 
+
31  class multiply_vd_vari : public op_vd_vari {
+
32  public:
+
33  multiply_vd_vari(vari* avi, double b) :
+
34  op_vd_vari(avi->val_ * b, avi, b) {
+
35  }
+
36  void chain() {
+
37  if (unlikely(boost::math::isnan(avi_->val_)
+
38  || boost::math::isnan(bd_)))
+
39  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
40  else
+
41  avi_->adj_ += adj_ * bd_;
+
42  }
+
43  };
+
44  }
+
45 
+
83  inline var operator*(const var& a, const var& b) {
+
84  return var(new multiply_vv_vari(a.vi_, b.vi_));
+
85  }
+
86 
+
98  inline var operator*(const var& a, const double b) {
+
99  if (b == 1.0)
+
100  return a;
+
101  return var(new multiply_vd_vari(a.vi_, b));
+
102  }
+
103 
+
115  inline var operator*(const double a, const var& b) {
+
116  if (a == 1.0)
+
117  return b;
+
118  return var(new multiply_vd_vari(b.vi_, a)); // by symmetry
+
119  }
+
120 
+
121  }
+
122 }
+
123 #endif
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
+
#define unlikely(x)
Definition: likely.hpp:9
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ + +
fvar< T > operator*(const fvar< T > &x1, const fvar< T > &x2)
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2core_2operator__not__equal_8hpp.html b/doc/api/html/rev_2core_2operator__not__equal_8hpp.html new file mode 100644 index 00000000000..e96d895ff2e --- /dev/null +++ b/doc/api/html/rev_2core_2operator__not__equal_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_not_equal.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_not_equal.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

bool stan::math::operator!= (const var &a, const var &b)
 Inequality operator comparing two variables' values (C++). More...
 
bool stan::math::operator!= (const var &a, const double b)
 Inequality operator comparing a variable's value and a double (C++). More...
 
bool stan::math::operator!= (const double a, const var &b)
 Inequality operator comparing a double and a variable's value (C++). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2core_2operator__not__equal_8hpp_source.html b/doc/api/html/rev_2core_2operator__not__equal_8hpp_source.html new file mode 100644 index 00000000000..6818bc679af --- /dev/null +++ b/doc/api/html/rev_2core_2operator__not__equal_8hpp_source.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_not_equal.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_not_equal.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_OPERATOR_NOT_EQUAL_HPP
+
2 #define STAN_MATH_REV_CORE_OPERATOR_NOT_EQUAL_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
26  inline bool operator!=(const var& a, const var& b) {
+
27  return a.val() != b.val();
+
28  }
+
29 
+
39  inline bool operator!=(const var& a, const double b) {
+
40  return a.val() != b;
+
41  }
+
42 
+
52  inline bool operator!=(const double a, const var& b) {
+
53  return a != b.val();
+
54  }
+
55 
+
56  }
+
57 }
+
58 #endif
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
bool operator!=(const fvar< T > &x, const fvar< T > &y)
+ +
double val() const
Return the value of this variable.
Definition: var.hpp:234
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2core_2operator__subtraction_8hpp.html b/doc/api/html/rev_2core_2operator__subtraction_8hpp.html new file mode 100644 index 00000000000..bb4c2152b56 --- /dev/null +++ b/doc/api/html/rev_2core_2operator__subtraction_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_subtraction.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
operator_subtraction.hpp File Reference
+
+
+
#include <stan/math/rev/core/var.hpp>
+#include <stan/math/rev/core/vv_vari.hpp>
+#include <stan/math/rev/core/vd_vari.hpp>
+#include <stan/math/rev/core/dv_vari.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

var stan::math::operator- (const var &a, const var &b)
 Subtraction operator for variables (C++). More...
 
var stan::math::operator- (const var &a, const double b)
 Subtraction operator for variable and scalar (C++). More...
 
var stan::math::operator- (const double a, const var &b)
 Subtraction operator for scalar and variable (C++). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2core_2operator__subtraction_8hpp_source.html b/doc/api/html/rev_2core_2operator__subtraction_8hpp_source.html new file mode 100644 index 00000000000..895be7a2f2c --- /dev/null +++ b/doc/api/html/rev_2core_2operator__subtraction_8hpp_source.html @@ -0,0 +1,194 @@ + + + + + + +Stan Math Library: stan/math/rev/core/operator_subtraction.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
operator_subtraction.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_OPERATOR_SUBTRACTION_HPP
+
2 #define STAN_MATH_REV_CORE_OPERATOR_SUBTRACTION_HPP
+
3 
+ + + + +
8 #include <boost/math/special_functions/fpclassify.hpp>
+
9 #include <limits>
+
10 
+
11 namespace stan {
+
12  namespace math {
+
13 
+
14  namespace {
+
15  class subtract_vv_vari : public op_vv_vari {
+
16  public:
+
17  subtract_vv_vari(vari* avi, vari* bvi) :
+
18  op_vv_vari(avi->val_ - bvi->val_, avi, bvi) {
+
19  }
+
20  void chain() {
+
21  if (unlikely(boost::math::isnan(avi_->val_)
+
22  || boost::math::isnan(bvi_->val_))) {
+
23  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
24  bvi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
25  } else {
+
26  avi_->adj_ += adj_;
+
27  bvi_->adj_ -= adj_;
+
28  }
+
29  }
+
30  };
+
31 
+
32  class subtract_vd_vari : public op_vd_vari {
+
33  public:
+
34  subtract_vd_vari(vari* avi, double b) :
+
35  op_vd_vari(avi->val_ - b, avi, b) {
+
36  }
+
37  void chain() {
+
38  if (unlikely(boost::math::isnan(avi_->val_)
+
39  || boost::math::isnan(bd_)))
+
40  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
41  else
+
42  avi_->adj_ += adj_;
+
43  }
+
44  };
+
45 
+
46  class subtract_dv_vari : public op_dv_vari {
+
47  public:
+
48  subtract_dv_vari(double a, vari* bvi) :
+
49  op_dv_vari(a - bvi->val_, a, bvi) {
+
50  }
+
51  void chain() {
+ +
53  || boost::math::isnan(bvi_->val_)))
+
54  bvi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
55  else
+
56  bvi_->adj_ -= adj_;
+
57  }
+
58  };
+
59  }
+
60 
+
99  inline var operator-(const var& a, const var& b) {
+
100  return var(new subtract_vv_vari(a.vi_, b.vi_));
+
101  }
+
102 
+
114  inline var operator-(const var& a, const double b) {
+
115  if (b == 0.0)
+
116  return a;
+
117  return var(new subtract_vd_vari(a.vi_, b));
+
118  }
+
119 
+
131  inline var operator-(const double a, const var& b) {
+
132  return var(new subtract_dv_vari(a, b.vi_));
+
133  }
+
134 
+
135  }
+
136 }
+
137 #endif
+ +
fvar< T > operator-(const fvar< T > &x1, const fvar< T > &x2)
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
+
#define unlikely(x)
Definition: likely.hpp:9
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2core_2std__numeric__limits_8hpp.html b/doc/api/html/rev_2core_2std__numeric__limits_8hpp.html new file mode 100644 index 00000000000..8f1c6bb7041 --- /dev/null +++ b/doc/api/html/rev_2core_2std__numeric__limits_8hpp.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: stan/math/rev/core/std_numeric_limits.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
std_numeric_limits.hpp File Reference
+
+
+
#include <stan/math/rev/core/var.hpp>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + +

+Classes

struct  std::numeric_limits< stan::math::var >
 Specialization of numeric limits for var objects. More...
 
+ + + +

+Namespaces

 std
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2core_2std__numeric__limits_8hpp_source.html b/doc/api/html/rev_2core_2std__numeric__limits_8hpp_source.html new file mode 100644 index 00000000000..b2e44a4d2c8 --- /dev/null +++ b/doc/api/html/rev_2core_2std__numeric__limits_8hpp_source.html @@ -0,0 +1,183 @@ + + + + + + +Stan Math Library: stan/math/rev/core/std_numeric_limits.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
std_numeric_limits.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_STD_NUMERIC_LIMITS_HPP
+
2 #define STAN_MATH_REV_CORE_STD_NUMERIC_LIMITS_HPP
+
3 
+ +
5 #include <limits>
+
6 
+
7 namespace std {
+
8 
+
15  template<>
+
16  struct numeric_limits<stan::math::var> {
+
17  static const bool is_specialized = true;
+ + +
20  static const int digits = numeric_limits<double>::digits;
+
21  static const int digits10 = numeric_limits<double>::digits10;
+
22  static const bool is_signed = numeric_limits<double>::is_signed;
+
23  static const bool is_integer = numeric_limits<double>::is_integer;
+
24  static const bool is_exact = numeric_limits<double>::is_exact;
+
25  static const int radix = numeric_limits<double>::radix;
+ +
27  return numeric_limits<double>::epsilon();
+
28  }
+ +
30  return numeric_limits<double>::round_error();
+
31  }
+
32 
+
33  static const int min_exponent = numeric_limits<double>::min_exponent;
+
34  static const int min_exponent10 = numeric_limits<double>::min_exponent10;
+
35  static const int max_exponent = numeric_limits<double>::max_exponent;
+
36  static const int max_exponent10 = numeric_limits<double>::max_exponent10;
+
37 
+
38  static const bool has_infinity = numeric_limits<double>::has_infinity;
+
39  static const bool has_quiet_NaN = numeric_limits<double>::has_quiet_NaN;
+
40  static const bool has_signaling_NaN
+
41  = numeric_limits<double>::has_signaling_NaN;
+
42  static const float_denorm_style has_denorm
+
43  = numeric_limits<double>::has_denorm;
+
44  static const bool has_denorm_loss = numeric_limits<double>::has_denorm_loss;
+ +
46  return numeric_limits<double>::infinity();
+
47  }
+ +
49  return numeric_limits<double>::quiet_NaN();
+
50  }
+ +
52  return numeric_limits<double>::signaling_NaN();
+
53  }
+ +
55  return numeric_limits<double>::denorm_min();
+
56  }
+
57 
+
58  static const bool is_iec559 = numeric_limits<double>::is_iec559;
+
59  static const bool is_bounded = numeric_limits<double>::is_bounded;
+
60  static const bool is_modulo = numeric_limits<double>::is_modulo;
+
61 
+
62  static const bool traps = numeric_limits<double>::traps;
+
63  static const bool tinyness_before = numeric_limits<double>::tinyness_before;
+
64  static const float_round_style round_style
+
65  = numeric_limits<double>::round_style;
+
66  };
+
67 
+
68 }
+
69 #endif
+ + +
int min(const std::vector< int > &x)
Returns the minimum coefficient in the specified column vector.
Definition: min.hpp:20
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+ + + + +
int max(const std::vector< int > &x)
Returns the maximum coefficient in the specified column vector.
Definition: max.hpp:21
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2core_8hpp.html b/doc/api/html/rev_2core_8hpp.html new file mode 100644 index 00000000000..b4f3bd2ef9a --- /dev/null +++ b/doc/api/html/rev_2core_8hpp.html @@ -0,0 +1,165 @@ + + + + + + +Stan Math Library: stan/math/rev/core.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
core.hpp File Reference
+
+
+
#include <stan/math/rev/core/autodiffstackstorage.hpp>
+#include <stan/math/rev/core/chainable.hpp>
+#include <stan/math/rev/core/chainable_alloc.hpp>
+#include <stan/math/rev/core/chainablestack.hpp>
+#include <stan/math/rev/core/ddv_vari.hpp>
+#include <stan/math/rev/core/dv_vari.hpp>
+#include <stan/math/rev/core/dvd_vari.hpp>
+#include <stan/math/rev/core/dvv_vari.hpp>
+#include <stan/math/rev/core/empty_nested.hpp>
+#include <stan/math/rev/core/gevv_vvv_vari.hpp>
+#include <stan/math/rev/core/grad.hpp>
+#include <stan/math/rev/core/matrix_vari.hpp>
+#include <stan/math/rev/core/nested_size.hpp>
+#include <stan/math/rev/core/operator_addition.hpp>
+#include <stan/math/rev/core/operator_divide_equal.hpp>
+#include <stan/math/rev/core/operator_division.hpp>
+#include <stan/math/rev/core/operator_equal.hpp>
+#include <stan/math/rev/core/operator_greater_than.hpp>
+#include <stan/math/rev/core/operator_greater_than_or_equal.hpp>
+#include <stan/math/rev/core/operator_less_than.hpp>
+#include <stan/math/rev/core/operator_less_than_or_equal.hpp>
+#include <stan/math/rev/core/operator_minus_equal.hpp>
+#include <stan/math/rev/core/operator_multiplication.hpp>
+#include <stan/math/rev/core/operator_multiply_equal.hpp>
+#include <stan/math/rev/core/operator_not_equal.hpp>
+#include <stan/math/rev/core/operator_plus_equal.hpp>
+#include <stan/math/rev/core/operator_subtraction.hpp>
+#include <stan/math/rev/core/operator_unary_decrement.hpp>
+#include <stan/math/rev/core/operator_unary_increment.hpp>
+#include <stan/math/rev/core/operator_unary_negative.hpp>
+#include <stan/math/rev/core/operator_unary_not.hpp>
+#include <stan/math/rev/core/operator_unary_plus.hpp>
+#include <stan/math/rev/core/precomp_v_vari.hpp>
+#include <stan/math/rev/core/precomp_vv_vari.hpp>
+#include <stan/math/rev/core/precomp_vvv_vari.hpp>
+#include <stan/math/rev/core/precomputed_gradients.hpp>
+#include <stan/math/rev/core/print_stack.hpp>
+#include <stan/math/rev/core/recover_memory.hpp>
+#include <stan/math/rev/core/recover_memory_nested.hpp>
+#include <stan/math/rev/core/set_zero_all_adjoints.hpp>
+#include <stan/math/rev/core/start_nested.hpp>
+#include <stan/math/rev/core/std_isinf.hpp>
+#include <stan/math/rev/core/std_isnan.hpp>
+#include <stan/math/rev/core/std_numeric_limits.hpp>
+#include <stan/math/rev/core/stored_gradient_vari.hpp>
+#include <stan/math/rev/core/v_vari.hpp>
+#include <stan/math/rev/core/var.hpp>
+#include <stan/math/rev/core/vari.hpp>
+#include <stan/math/rev/core/vd_vari.hpp>
+#include <stan/math/rev/core/vdd_vari.hpp>
+#include <stan/math/rev/core/vdv_vari.hpp>
+#include <stan/math/rev/core/vector_vari.hpp>
+#include <stan/math/rev/core/vv_vari.hpp>
+#include <stan/math/rev/core/vvd_vari.hpp>
+#include <stan/math/rev/core/vvv_vari.hpp>
+
+

Go to the source code of this file.

+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2core_8hpp_source.html b/doc/api/html/rev_2core_8hpp_source.html new file mode 100644 index 00000000000..605ad947e53 --- /dev/null +++ b/doc/api/html/rev_2core_8hpp_source.html @@ -0,0 +1,223 @@ + + + + + + +Stan Math Library: stan/math/rev/core.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
core.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_HPP
+
2 #define STAN_MATH_REV_CORE_HPP
+
3 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
59 
+
60 #endif
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2_eigen___num_traits_8hpp.html b/doc/api/html/rev_2mat_2fun_2_eigen___num_traits_8hpp.html new file mode 100644 index 00000000000..bdc2c6cc348 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2_eigen___num_traits_8hpp.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/Eigen_NumTraits.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
Eigen_NumTraits.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + +

+Classes

struct  Eigen::NumTraits< stan::math::var >
 Numerical traits template override for Eigen for automatic gradient variables. More...
 
struct  Eigen::internal::significant_decimals_default_impl< stan::math::var, false >
 Implemented this for printing to stream. More...
 
struct  Eigen::internal::scalar_product_traits< stan::math::var, double >
 Scalar product traits override for Eigen for automatic gradient variables. More...
 
struct  Eigen::internal::scalar_product_traits< double, stan::math::var >
 Scalar product traits override for Eigen for automatic gradient variables. More...
 
struct  Eigen::internal::general_matrix_vector_product< Index, stan::math::var, ColMajor, ConjugateLhs, stan::math::var, ConjugateRhs >
 Override matrix-vector and matrix-matrix products to use more efficient implementation. More...
 
struct  Eigen::internal::general_matrix_vector_product< Index, stan::math::var, RowMajor, ConjugateLhs, stan::math::var, ConjugateRhs >
 
struct  Eigen::internal::general_matrix_matrix_product< Index, stan::math::var, LhsStorageOrder, ConjugateLhs, stan::math::var, RhsStorageOrder, ConjugateRhs, ColMajor >
 
+ + + + + + + +

+Namespaces

 Eigen
 (Expert) Numerical traits for algorithmic differentiation variables.
 
 Eigen::internal
 (Expert) Product traits for algorithmic differentiation variables.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2_eigen___num_traits_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2_eigen___num_traits_8hpp_source.html new file mode 100644 index 00000000000..83a49806fc6 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2_eigen___num_traits_8hpp_source.html @@ -0,0 +1,298 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/Eigen_NumTraits.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
Eigen_NumTraits.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_EIGEN_NUMTRAITS_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_EIGEN_NUMTRAITS_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ +
6 #include <limits>
+
7 
+
8 namespace Eigen {
+
9 
+
14  template <>
+
15  struct NumTraits<stan::math::var> {
+ +
22 
+ +
29 
+ +
36 
+
43  inline static Real epsilon() {
+
44  return std::numeric_limits<double>::epsilon();
+
45  }
+
46 
+
50  inline static Real dummy_precision() {
+
51  return 1e-12; // copied from NumTraits.h values for double
+
52  }
+
53 
+
60  inline static Real highest() {
+ +
62  }
+
63 
+
70  inline static Real lowest() {
+ +
72  }
+
73 
+
78  enum {
+
79  IsInteger = 0,
+
80  IsSigned = 1,
+
81  IsComplex = 0,
+
82  RequireInitialization = 0,
+
83  ReadCost = 1,
+
84  AddCost = 1,
+
85  MulCost = 1,
+
86  HasFloatingPoint = 1
+
87  };
+
88  };
+
89 
+
90  namespace internal {
+
94  template<>
+
95  struct significant_decimals_default_impl<stan::math::var, false> {
+
96  static inline int run() {
+
97  using std::ceil;
+
98  using std::log;
+
99  return cast<double, int>(ceil(-log(std::numeric_limits<double>
+
100  ::epsilon())
+
101  / log(10.0)));
+
102  }
+
103  };
+
104 
+
109  template <>
+
110  struct scalar_product_traits<stan::math::var, double> {
+ +
112  };
+
113 
+
118  template <>
+
119  struct scalar_product_traits<double, stan::math::var> {
+ +
121  };
+
122 
+
126  template<typename Index, bool ConjugateLhs, bool ConjugateRhs>
+
127  struct general_matrix_vector_product<Index, stan::math::var, ColMajor,
+
128  ConjugateLhs, stan::math::var,
+
129  ConjugateRhs> {
+ + +
132  typedef typename scalar_product_traits<LhsScalar, RhsScalar>::ReturnType
+ +
134  enum { LhsStorageOrder = ColMajor };
+
135 
+
136  EIGEN_DONT_INLINE static void run(
+
137  Index rows, Index cols,
+
138  const LhsScalar* lhs, Index lhsStride,
+
139  const RhsScalar* rhs, Index rhsIncr,
+
140  ResScalar* res, Index resIncr,
+
141  const ResScalar &alpha) {
+
142  for (Index i = 0; i < rows; i++) {
+
143  res[i*resIncr]
+
144  += stan::math::var
+ +
146  (&alpha,
+
147  (static_cast<int>(LhsStorageOrder) == static_cast<int>(ColMajor))
+
148  ?(&lhs[i]):(&lhs[i*lhsStride]),
+
149  (static_cast<int>(LhsStorageOrder) == static_cast<int>(ColMajor))
+
150  ?(lhsStride):(1),
+
151  rhs, rhsIncr, cols));
+
152  }
+
153  }
+
154  };
+
155  template<typename Index, bool ConjugateLhs, bool ConjugateRhs>
+
156  struct general_matrix_vector_product<Index, stan::math::var,
+
157  RowMajor, ConjugateLhs,
+
158  stan::math::var, ConjugateRhs> {
+ + +
161  typedef typename scalar_product_traits<LhsScalar, RhsScalar>::ReturnType
+ +
163  enum { LhsStorageOrder = RowMajor };
+
164 
+
165  EIGEN_DONT_INLINE static void
+
166  run(Index rows, Index cols,
+
167  const LhsScalar* lhs, Index lhsStride,
+
168  const RhsScalar* rhs, Index rhsIncr,
+
169  ResScalar* res, Index resIncr, const RhsScalar &alpha) {
+
170  for (Index i = 0; i < rows; i++) {
+
171  res[i*resIncr]
+
172  += stan::math::var
+ +
174  (&alpha,
+
175  (static_cast<int>(LhsStorageOrder) == static_cast<int>(ColMajor))
+
176  ? (&lhs[i]) : (&lhs[i*lhsStride]),
+
177  (static_cast<int>(LhsStorageOrder) == static_cast<int>(ColMajor))
+
178  ? (lhsStride) : (1),
+
179  rhs, rhsIncr, cols));
+
180  }
+
181  }
+
182  };
+
183  template<typename Index, int LhsStorageOrder, bool ConjugateLhs,
+
184  int RhsStorageOrder, bool ConjugateRhs>
+
185  struct general_matrix_matrix_product<Index, stan::math::var,
+
186  LhsStorageOrder, ConjugateLhs,
+
187  stan::math::var, RhsStorageOrder,
+
188  ConjugateRhs, ColMajor> {
+ + +
191  typedef typename scalar_product_traits<LhsScalar, RhsScalar>::ReturnType
+ +
193  static void run(Index rows, Index cols, Index depth,
+
194  const LhsScalar* _lhs, Index lhsStride,
+
195  const RhsScalar* _rhs, Index rhsStride,
+
196  ResScalar* res, Index resStride,
+
197  const ResScalar &alpha,
+
198  level3_blocking<LhsScalar, RhsScalar>& /* blocking */,
+
199  GemmParallelInfo<Index>* /* info = 0 */) {
+
200  for (Index i = 0; i < cols; i++) {
+
201  general_matrix_vector_product<Index, LhsScalar, LhsStorageOrder,
+
202  ConjugateLhs, RhsScalar, ConjugateRhs>
+
203  ::run(rows, depth, _lhs, lhsStride,
+
204  &_rhs[(static_cast<int>(RhsStorageOrder)
+
205  == static_cast<int>(ColMajor))
+
206  ? (i*rhsStride) :(i) ],
+
207  (static_cast<int>(RhsStorageOrder)
+
208  == static_cast<int>(ColMajor)) ? (1) : (rhsStride),
+
209  &res[i*resStride], 1, alpha);
+
210  }
+
211  }
+
212  };
+
213  }
+
214 }
+
215 
+
216 #endif
+
static Real lowest()
Return standard library's lowest for double-precision floating point, &#45;std::numeric_limits<double...
+
int rows(const Eigen::Matrix< T, R, C > &m)
Return the number of rows in the specified matrix, vector, or row vector.
Definition: rows.hpp:20
+ + + + +
static EIGEN_DONT_INLINE void run(Index rows, Index cols, const LhsScalar *lhs, Index lhsStride, const RhsScalar *rhs, Index rhsIncr, ResScalar *res, Index resIncr, const ResScalar &alpha)
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
static Real dummy_precision()
Return dummy precision.
+
stan::math::var NonInteger
Non-integer valued variables.
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
static Real highest()
Return standard library's highest for double-precision floating point, std::numeric_limits<double>max...
+ + + + +
stan::math::var Real
Real-valued variables.
+
static Real epsilon()
Return standard library's epsilon for double-precision floating point, std::numeric_limits<double>::e...
+ +
int cols(const Eigen::Matrix< T, R, C > &m)
Return the number of columns in the specified matrix, vector, or row vector.
Definition: cols.hpp:20
+ + +
int max(const std::vector< int > &x)
Returns the maximum coefficient in the specified column vector.
Definition: max.hpp:21
+
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+ +
stan::math::var Nested
Nested variables.
+
static void run(Index rows, Index cols, Index depth, const LhsScalar *_lhs, Index lhsStride, const RhsScalar *_rhs, Index rhsStride, ResScalar *res, Index resStride, const ResScalar &alpha, level3_blocking< LhsScalar, RhsScalar > &, GemmParallelInfo< Index > *)
+ +
fvar< T > ceil(const fvar< T > &x)
Definition: ceil.hpp:11
+
static EIGEN_DONT_INLINE void run(Index rows, Index cols, const LhsScalar *lhs, Index lhsStride, const RhsScalar *rhs, Index rhsIncr, ResScalar *res, Index resIncr, const RhsScalar &alpha)
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2_l_d_l_t__factor_8hpp.html b/doc/api/html/rev_2mat_2fun_2_l_d_l_t__factor_8hpp.html new file mode 100644 index 00000000000..2562f6844bb --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2_l_d_l_t__factor_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/LDLT_factor.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
LDLT_factor.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + +

+Classes

class  stan::math::LDLT_factor< stan::math::var, R, C >
 A template specialization of src/stan/math/matrix/LDLT_factor.hpp for stan::math::var which can be used with all the *_ldlt functions. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2_l_d_l_t__factor_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2_l_d_l_t__factor_8hpp_source.html new file mode 100644 index 00000000000..53d9f11b32f --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2_l_d_l_t__factor_8hpp_source.html @@ -0,0 +1,185 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/LDLT_factor.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
LDLT_factor.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_LDLT_FACTOR_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_LDLT_FACTOR_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ + + +
8 
+
9 namespace stan {
+
10  namespace math {
+
44  template<int R, int C>
+
45  class LDLT_factor<stan::math::var, R, C> {
+
46  public:
+
52  LDLT_factor() : _alloc(new stan::math::LDLT_alloc<R, C>()) {}
+
53 
+
54  explicit LDLT_factor(const Eigen::Matrix<stan::math::var, R, C> &A)
+
55  : _alloc(new stan::math::LDLT_alloc<R, C>()) {
+
56  compute(A);
+
57  }
+
58 
+
67  inline void compute(const Eigen::Matrix<stan::math::var, R, C> &A) {
+
68  stan::math::check_square("comute", "A", A);
+
69  _alloc->compute(A);
+
70  }
+
71 
+
83  template<typename Rhs>
+
84  inline const
+
85  Eigen::internal::solve_retval<Eigen::LDLT<Eigen::Matrix<double, R, C> >,
+
86  Rhs>
+
87  solve(const Eigen::MatrixBase<Rhs>& b) const {
+
88  return _alloc->_ldlt.solve(b);
+
89  }
+
90 
+
96  inline bool success() const {
+
97  bool ret;
+
98  ret = _alloc->N_ != 0;
+
99  ret = ret && _alloc->_ldlt.info() == Eigen::Success;
+
100  ret = ret && _alloc->_ldlt.isPositive();
+
101  ret = ret && (_alloc->_ldlt.vectorD().array() > 0).all();
+
102  return ret;
+
103  }
+
104 
+
112  inline Eigen::VectorXd vectorD() const {
+
113  return _alloc->_ldlt.vectorD();
+
114  }
+
115 
+
116  inline size_t rows() const { return _alloc->N_; }
+
117  inline size_t cols() const { return _alloc->N_; }
+
118 
+
119  typedef size_t size_type;
+ +
121 
+ +
131  };
+
132  }
+
133 }
+
134 #endif
+
LDLT_factor(const Eigen::Matrix< stan::math::var, R, C > &A)
Definition: LDLT_factor.hpp:54
+ + + +
void compute(const Eigen::Matrix< stan::math::var, R, C > &A)
Use the LDLT_factor object to factorize a new matrix.
Definition: LDLT_factor.hpp:67
+ +
stan::math::LDLT_alloc< R, C > * _alloc
The LDLT_alloc object actually contains the factorization but is derived from the chainable_alloc cla...
+
This object stores the actual (double typed) LDLT factorization of an Eigen::Matrix<var> along with poi...
Definition: LDLT_alloc.hpp:20
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
mdivide_left_ldlt_alloc< R1, C1, R2, C2 > * _alloc
+ + + + +
Eigen::VectorXd vectorD() const
The entries of the diagonal matrix D.
+ +
const Eigen::internal::solve_retval< Eigen::LDLT< Eigen::Matrix< double, R, C > >, Rhs > solve(const Eigen::MatrixBase< Rhs > &b) const
Compute the actual numerical result of inv(A)*b.
Definition: LDLT_factor.hpp:87
+
bool success() const
Determine whether the most recent factorization succeeded.
Definition: LDLT_factor.hpp:96
+
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2cholesky__decompose_8hpp.html b/doc/api/html/rev_2mat_2fun_2cholesky__decompose_8hpp.html new file mode 100644 index 00000000000..0aca08a25ed --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2cholesky__decompose_8hpp.html @@ -0,0 +1,143 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/cholesky_decompose.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
cholesky_decompose.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

class  stan::math::cholesky_decompose_v_vari
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + +

+Functions

Eigen::Matrix< var,-1,-1 > stan::math::cholesky_decompose (const Eigen::Matrix< var,-1,-1 > &A)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2cholesky__decompose_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2cholesky__decompose_8hpp_source.html new file mode 100644 index 00000000000..365fc17d3da --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2cholesky__decompose_8hpp_source.html @@ -0,0 +1,305 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/cholesky_decompose.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
cholesky_decompose.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_CHOLESKY_DECOMPOSE_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_CHOLESKY_DECOMPOSE_HPP
+
3 
+ + + + + +
9 #include <stan/math/rev/core.hpp>
+ + + + +
14 
+
15 namespace stan {
+
16  namespace math {
+
17 
+ +
19  public:
+
20  int M_; // A.rows() = A.cols()
+ + +
23 
+
24  /* ctor for cholesky function
+
25  *
+
26  * Stores varis for A
+
27  * Instantiates and stores varis for L
+
28  * Instantiates and stores dummy vari for
+
29  * upper triangular part of var result returned
+
30  * in cholesky_decompose function call
+
31  *
+
32  * variRefL aren't on the chainable
+
33  * autodiff stack, only used for storage
+
34  * and computation. Note that varis for
+
35  * L are constructed externally in
+
36  * cholesky_decompose.
+
37  *
+
38  * @param matrix A
+
39  * @param matrix L, cholesky factor of A
+
40  * */
+
41  cholesky_decompose_v_vari(const Eigen::Matrix<var, -1, -1>& A,
+
42  const Eigen::Matrix<double, -1, -1>& L_A)
+
43  : vari(0.0),
+
44  M_(A.rows()),
+
45  variRefA_(ChainableStack::memalloc_.alloc_array<vari*>
+
46  (A.rows() * (A.rows() + 1) / 2)),
+
47  variRefL_(ChainableStack::memalloc_.alloc_array<vari*>
+
48  (A.rows() * (A.rows() + 1) / 2)) {
+
49  size_t accum = 0;
+
50  size_t accum_i = accum;
+
51  for (size_type j = 0; j < M_; ++j) {
+
52  for (size_type i = j; i < M_; ++i) {
+
53  accum_i += i;
+
54  size_t pos = j + accum_i;
+
55  variRefA_[pos] = A.coeffRef(i, j).vi_;
+
56  variRefL_[pos] = new vari(L_A.coeffRef(i, j), false);
+
57  }
+
58  accum += j;
+
59  accum_i = accum;
+
60  }
+
61  }
+
62 
+
63  /* Reverse mode differentiation
+
64  * algorithm refernce:
+
65  *
+
66  * Mike Giles. An extended collection of matrix
+
67  * derivative results for forward and reverse mode AD.
+
68  * Jan. 2008.
+
69  *
+
70  * Note algorithm as laid out in Giles is
+
71  * row-major, so Eigen::Matrices are explicitly storage
+
72  * order RowMajor, whereas Eigen defaults to
+
73  * ColumnMajor. Also note algorithm
+
74  * starts by calculating the adjoint for
+
75  * A(M_ - 1, M_ - 1), hence pos on line 94 is decremented
+
76  * to start at pos = M_ * (M_ + 1) / 2.
+
77  * */
+
78  virtual void chain() {
+
79  using Eigen::Matrix;
+
80  using Eigen::RowMajor;
+
81  Matrix<double, -1, -1, RowMajor> adjL(M_, M_);
+
82  Matrix<double, -1, -1, RowMajor> LA(M_, M_);
+
83  Matrix<double, -1, -1, RowMajor> adjA(M_, M_);
+
84  size_t pos = 0;
+
85  for (size_type i = 0; i < M_; ++i) {
+
86  for (size_type j = 0; j <= i; ++j) {
+
87  adjL.coeffRef(i, j) = variRefL_[pos]->adj_;
+
88  LA.coeffRef(i, j) = variRefL_[pos]->val_;
+
89  ++pos;
+
90  }
+
91  }
+
92 
+
93  --pos;
+
94  for (int i = M_ - 1; i >= 0; --i) {
+
95  for (int j = i; j >= 0; --j) {
+
96  if (i == j) {
+
97  adjA.coeffRef(i, j) = 0.5 * adjL.coeff(i, j)
+
98  / LA.coeff(i, j);
+
99  } else {
+
100  adjA.coeffRef(i, j) = adjL.coeff(i, j)
+
101  / LA.coeff(j, j);
+
102  adjL.coeffRef(j, j) -= adjL.coeff(i, j)
+
103  * LA.coeff(i, j) / LA.coeff(j, j);
+
104  }
+
105  for (int k = j - 1; k >=0; --k) {
+
106  adjL.coeffRef(i, k) -= adjA.coeff(i, j)
+
107  * LA.coeff(j, k);
+
108  adjL.coeffRef(j, k) -= adjA.coeff(i, j)
+
109  * LA.coeff(i, k);
+
110  }
+
111  variRefA_[pos--]->adj_ += adjA.coeffRef(i, j);
+
112  }
+
113  }
+
114  }
+
115  };
+
116 
+
117  /* Reverse mode specialization of
+
118  * cholesky decomposition
+
119  *
+
120  * Internally calls llt rather than using
+
121  * stan::math::cholesky_decompose in order
+
122  * to use selfadjointView<Lower> optimization.
+
123  *
+
124  * Note chainable stack varis are created
+
125  * below in Matrix<var, -1, -1>
+
126  *
+
127  * @param Matrix A
+
128  * @return L cholesky factor of A
+
129  */
+
130  Eigen::Matrix<var, -1, -1>
+
131  cholesky_decompose(const Eigen::Matrix<var, -1, -1> &A) {
+
132  stan::math::check_square("cholesky_decompose", "A", A);
+
133  stan::math::check_symmetric("cholesky_decompose", "A", A);
+
134 
+
135  Eigen::Matrix<double, -1, -1> L_A(value_of_rec(A));
+
136  Eigen::LLT<Eigen::MatrixXd> L_factor
+
137  = L_A.selfadjointView<Eigen::Lower>().llt();
+
138  check_pos_definite("cholesky_decompose", "m", L_factor);
+
139  L_A = L_factor.matrixL();
+
140 
+
141  // NOTE: this is not a memory leak, this vari is used in the
+
142  // expression graph to evaluate the adjoint, but is not needed
+
143  // for the returned matrix. Memory will be cleaned up with the
+
144  // arena allocator.
+
145  cholesky_decompose_v_vari *baseVari
+
146  = new cholesky_decompose_v_vari(A, L_A);
+
147  stan::math::vari dummy(0.0, false);
+
148  Eigen::Matrix<var, -1, -1> L(A.rows(), A.cols());
+
149  size_t accum = 0;
+
150  size_t accum_i = accum;
+
151  for (size_type j = 0; j < L.cols(); ++j) {
+
152  for (size_type i = j; i < L.cols(); ++i) {
+
153  accum_i += i;
+
154  size_t pos = j + accum_i;
+
155  L.coeffRef(i, j).vi_ = baseVari->variRefL_[pos];
+
156  }
+
157  for (size_type k = 0; k < j; ++k)
+
158  L.coeffRef(k, j).vi_ = &dummy;
+
159  accum += j;
+
160  accum_i = accum;
+
161  }
+
162  return L;
+
163  }
+
164  }
+
165 }
+
166 #endif
+
vari(const double x)
Construct a variable implementation from a value.
Definition: vari.hpp:56
+ +
int rows(const Eigen::Matrix< T, R, C > &m)
Return the number of rows in the specified matrix, vector, or row vector.
Definition: rows.hpp:20
+ + +
virtual void chain()
Apply the chain rule to this variable based on the variables on which it depends. ...
+
cholesky_decompose_v_vari(const Eigen::Matrix< var,-1,-1 > &A, const Eigen::Matrix< double,-1,-1 > &L_A)
+ +
double value_of_rec(const fvar< T > &v)
Return the value of the specified variable.
+
The variable implementation base class.
Definition: vari.hpp:28
+
bool check_symmetric(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is symmetric.
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+ +
const double val_
The value of this variable.
Definition: vari.hpp:36
+
bool check_pos_definite(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified square, symmetric matrix is positive definite.
+
Empty struct for use in boost::condtional<is_constant_struct<T1>::value, T1, dummy>::type as false co...
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+ +
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > cholesky_decompose(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
Return the lower-triangular Cholesky factor (i.e., matrix square root) of the specified square...
+ + + +
double adj_
The adjoint of this variable, which is the partial derivative of this variable with respect to the ro...
Definition: vari.hpp:42
+ +
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2columns__dot__product_8hpp.html b/doc/api/html/rev_2mat_2fun_2columns__dot__product_8hpp.html new file mode 100644 index 00000000000..348ab8ac743 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2columns__dot__product_8hpp.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/columns_dot_product.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
columns_dot_product.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T1 , int R1, int C1, typename T2 , int R2, int C2>
boost::enable_if_c
+< boost::is_same< T1, var >
+::value||boost::is_same< T2,
+var >::value, Eigen::Matrix
+< var, 1, C1 > >::type 
stan::math::columns_dot_product (const Eigen::Matrix< T1, R1, C1 > &v1, const Eigen::Matrix< T2, R2, C2 > &v2)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2columns__dot__product_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2columns__dot__product_8hpp_source.html new file mode 100644 index 00000000000..04930938568 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2columns__dot__product_8hpp_source.html @@ -0,0 +1,160 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/columns_dot_product.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
columns_dot_product.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_COLUMNS_DOT_PRODUCT_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_COLUMNS_DOT_PRODUCT_HPP
+
3 
+ + + + + +
9 #include <stan/math/rev/core.hpp>
+ + + +
13 #include <boost/utility/enable_if.hpp>
+
14 #include <boost/type_traits.hpp>
+
15 #include <vector>
+
16 
+
17 namespace stan {
+
18  namespace math {
+
19 
+
20  template<typename T1, int R1, int C1, typename T2, int R2, int C2>
+
21  inline
+
22  typename boost::enable_if_c<boost::is_same<T1, var>::value ||
+
23  boost::is_same<T2, var>::value,
+
24  Eigen::Matrix<var, 1, C1> >::type
+
25  columns_dot_product(const Eigen::Matrix<T1, R1, C1>& v1,
+
26  const Eigen::Matrix<T2, R2, C2>& v2) {
+ +
28  "v1", v1,
+
29  "v2", v2);
+
30  Eigen::Matrix<var, 1, C1> ret(1, v1.cols());
+
31  for (size_type j = 0; j < v1.cols(); ++j) {
+
32  ret(j) = var(new dot_product_vari<T1, T2>(v1.col(j), v2.col(j)));
+
33  }
+
34  return ret;
+
35  }
+
36 
+
37  }
+
38 }
+
39 #endif
+
Eigen::Matrix< fvar< T >, 1, C1 > columns_dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
+ + +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+ +
bool check_matching_sizes(const char *function, const char *name1, const T_y1 &y1, const char *name2, const T_y2 &y2)
Return true if two structures at the same size.
+ + + + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2columns__dot__self_8hpp.html b/doc/api/html/rev_2mat_2fun_2columns__dot__self_8hpp.html new file mode 100644 index 00000000000..29f5a9bef49 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2columns__dot__self_8hpp.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/columns_dot_self.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
columns_dot_self.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<int R, int C>
Eigen::Matrix< var, 1, C > stan::math::columns_dot_self (const Eigen::Matrix< var, R, C > &x)
 Returns the dot product of each column of a matrix with itself. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2columns__dot__self_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2columns__dot__self_8hpp_source.html new file mode 100644 index 00000000000..944d5e550b0 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2columns__dot__self_8hpp_source.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/columns_dot_self.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
columns_dot_self.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_COLUMNS_DOT_SELF_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_COLUMNS_DOT_SELF_HPP
+
3 
+ + + +
7 #include <stan/math/rev/core.hpp>
+ + +
10 #include <vector>
+
11 
+
12 namespace stan {
+
13  namespace math {
+
14 
+
20  template<int R, int C>
+
21  inline Eigen::Matrix<var, 1, C>
+
22  columns_dot_self(const Eigen::Matrix<var, R, C>& x) {
+
23  Eigen::Matrix<var, 1, C> ret(1, x.cols());
+
24  for (size_type i = 0; i < x.cols(); i++) {
+
25  ret(i) = var(new dot_self_vari(x.col(i)));
+
26  }
+
27  return ret;
+
28  }
+
29 
+
30 
+
31  }
+
32 }
+
33 #endif
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+ + + + +
Eigen::Matrix< fvar< T >, 1, C > columns_dot_self(const Eigen::Matrix< fvar< T >, R, C > &x)
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2crossprod_8hpp.html b/doc/api/html/rev_2mat_2fun_2crossprod_8hpp.html new file mode 100644 index 00000000000..688b0864588 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2crossprod_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/crossprod.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
crossprod.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

matrix_v stan::math::crossprod (const matrix_v &M)
 Returns the result of pre-multiplying a matrix by its own transpose. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2crossprod_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2crossprod_8hpp_source.html new file mode 100644 index 00000000000..f5dd1b21cd6 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2crossprod_8hpp_source.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/crossprod.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
crossprod.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_CROSSPROD_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_CROSSPROD_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
16  inline matrix_v
+
17  crossprod(const matrix_v& M) {
+
18  return tcrossprod(static_cast<matrix_v>(M.transpose()));
+
19  }
+
20 
+
21  }
+
22 }
+
23 #endif
+
Eigen::Matrix< fvar< T >, R, R > tcrossprod(const Eigen::Matrix< fvar< T >, R, C > &m)
Definition: tcrossprod.hpp:17
+
Eigen::Matrix< var, Eigen::Dynamic, Eigen::Dynamic > matrix_v
The type of a matrix holding stan::math::var values.
Definition: typedefs.hpp:21
+ + +
Eigen::Matrix< fvar< T >, C, C > crossprod(const Eigen::Matrix< fvar< T >, R, C > &m)
Definition: crossprod.hpp:17
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2determinant_8hpp.html b/doc/api/html/rev_2mat_2fun_2determinant_8hpp.html new file mode 100644 index 00000000000..3ae4c5fc36c --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2determinant_8hpp.html @@ -0,0 +1,191 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/determinant.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
determinant.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<int R, int C>
var stan::math::determinant (const Eigen::Matrix< var, R, C > &m)
 
+

Variable Documentation

+ +
+
+ + + + +
vari** _adjARef
+
+ +

Definition at line 20 of file determinant.hpp.

+ +
+
+ +
+
+ + + + +
int _cols
+
+ +

Definition at line 18 of file determinant.hpp.

+ +
+
+ +
+
+ + + + +
int _rows
+
+ +

Definition at line 17 of file determinant.hpp.

+ +
+
+ +
+
+ + + + +
double* A_
+
+ +

Definition at line 19 of file determinant.hpp.

+ +
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2determinant_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2determinant_8hpp_source.html new file mode 100644 index 00000000000..f59b3b84a3c --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2determinant_8hpp_source.html @@ -0,0 +1,197 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/determinant.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
determinant.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_DETERMINANT_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_DETERMINANT_HPP
+
3 
+ + + +
7 #include <stan/math/rev/core.hpp>
+ +
9 #include <vector>
+
10 
+
11 namespace stan {
+
12  namespace math {
+
13 
+
14  namespace {
+
15  template<int R, int C>
+
16  class determinant_vari : public vari {
+
17  int _rows;
+
18  int _cols;
+
19  double* A_;
+
20  vari** _adjARef;
+
21 
+
22  public:
+
23  explicit determinant_vari(const Eigen::Matrix<var, R, C> &A)
+
24  : vari(determinant_vari_calc(A)),
+
25  _rows(A.rows()),
+
26  _cols(A.cols()),
+
27  A_(reinterpret_cast<double*>
+
28  (stan::math::ChainableStack::memalloc_
+
29  .alloc(sizeof(double) * A.rows() * A.cols()))),
+
30  _adjARef(reinterpret_cast<vari**>
+
31  (stan::math::ChainableStack::memalloc_
+
32  .alloc(sizeof(vari*) * A.rows() * A.cols()))) {
+
33  size_t pos = 0;
+
34  for (size_type j = 0; j < _cols; j++) {
+
35  for (size_type i = 0; i < _rows; i++) {
+
36  A_[pos] = A(i, j).val();
+
37  _adjARef[pos++] = A(i, j).vi_;
+
38  }
+
39  }
+
40  }
+
41  static
+
42  double determinant_vari_calc(const Eigen::Matrix<var, R, C> &A) {
+
43  Eigen::Matrix<double, R, C> Ad(A.rows(), A.cols());
+
44  for (size_type j = 0; j < A.rows(); j++)
+
45  for (size_type i = 0; i < A.cols(); i++)
+
46  Ad(i, j) = A(i, j).val();
+
47  return Ad.determinant();
+
48  }
+
49  virtual void chain() {
+
50  using Eigen::Matrix;
+
51  using Eigen::Map;
+
52  Matrix<double, R, C> adjA(_rows, _cols);
+
53  adjA = (adj_ * val_) *
+
54  Map<Matrix<double, R, C> >(A_, _rows, _cols).inverse().transpose();
+
55  size_t pos = 0;
+
56  for (size_type j = 0; j < _cols; j++) {
+
57  for (size_type i = 0; i < _rows; i++) {
+
58  _adjARef[pos++]->adj_ += adjA(i, j);
+
59  }
+
60  }
+
61  }
+
62  };
+
63  }
+
64 
+
65  template <int R, int C>
+
66  inline var determinant(const Eigen::Matrix<var, R, C>& m) {
+
67  stan::math::check_square("determinant", "m", m);
+
68  return var(new determinant_vari<R, C>(m));
+
69  }
+
70 
+
71  }
+
72 }
+
73 #endif
+
int rows(const Eigen::Matrix< T, R, C > &m)
Return the number of rows in the specified matrix, vector, or row vector.
Definition: rows.hpp:20
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
double * A_
Definition: determinant.hpp:19
+
AutodiffStackStorage< chainable, chainable_alloc > ChainableStack
+ +
fvar< T > determinant(const Eigen::Matrix< fvar< T >, R, C > &m)
Definition: determinant.hpp:21
+
vari ** _adjARef
Definition: determinant.hpp:20
+
int _rows
Definition: determinant.hpp:17
+
int cols(const Eigen::Matrix< T, R, C > &m)
Return the number of columns in the specified matrix, vector, or row vector.
Definition: cols.hpp:20
+ +
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+
int _cols
Definition: determinant.hpp:18
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2divide_8hpp.html b/doc/api/html/rev_2mat_2fun_2divide_8hpp.html new file mode 100644 index 00000000000..2af2d15bb32 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2divide_8hpp.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/divide.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
divide.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + +

+Functions

double stan::math::divide (double x, double y)
 Return the division of the first scalar by the second scalar. More...
 
template<typename T1 , typename T2 >
var stan::math::divide (const T1 &v, const T2 &c)
 
template<typename T1 , typename T2 , int R, int C>
Eigen::Matrix< var, R, C > stan::math::divide (const Eigen::Matrix< T1, R, C > &v, const T2 &c)
 Return the division of the specified column vector by the specified scalar. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2divide_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2divide_8hpp_source.html new file mode 100644 index 00000000000..e0abe881dc4 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2divide_8hpp_source.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/divide.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
divide.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_DIVIDE_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_DIVIDE_HPP
+
3 
+ + +
6 #include <stan/math/rev/core.hpp>
+ + +
9 #include <vector>
+
10 
+
11 namespace stan {
+
12  namespace math {
+
13 
+
21  inline double
+
22  divide(double x, double y) {
+
23  return x / y;
+
24  }
+
25  template <typename T1, typename T2>
+
26  inline var
+
27  divide(const T1& v, const T2& c) {
+
28  return to_var(v) / to_var(c);
+
29  }
+
37  template <typename T1, typename T2, int R, int C>
+
38  inline Eigen::Matrix<var, R, C>
+
39  divide(const Eigen::Matrix<T1, R, C>& v, const T2& c) {
+
40  return to_var(v) / to_var(c);
+
41  }
+
42 
+
43  }
+
44 }
+
45 #endif
+ +
stan::return_type< T1, T2 >::type divide(const T1 &v, const T2 &c)
Definition: divide.hpp:17
+
var to_var(const double &x)
Converts argument to an automatic differentiation variable.
Definition: to_var.hpp:21
+ + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2dot__product_8hpp.html b/doc/api/html/rev_2mat_2fun_2dot__product_8hpp.html new file mode 100644 index 00000000000..2e228a07cea --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2dot__product_8hpp.html @@ -0,0 +1,200 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/dot_product.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
dot_product.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/fun/typedefs.hpp>
+#include <stan/math/prim/mat/err/check_vector.hpp>
+#include <stan/math/prim/mat/err/check_matching_sizes.hpp>
+#include <stan/math/prim/scal/fun/value_of.hpp>
+#include <stan/math/rev/core.hpp>
+#include <stan/math/rev/mat/fun/typedefs.hpp>
+#include <stan/math/rev/scal/fun/value_of.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + +

+Functions

template<typename T1 , int R1, int C1, typename T2 , int R2, int C2>
boost::enable_if_c
+< boost::is_same< T1, var >
+::value||boost::is_same< T2,
+var >::value, var >::type 
stan::math::dot_product (const Eigen::Matrix< T1, R1, C1 > &v1, const Eigen::Matrix< T2, R2, C2 > &v2)
 Returns the dot product. More...
 
template<typename T1 , typename T2 >
boost::enable_if_c
+< boost::is_same< T1, var >
+::value||boost::is_same< T2,
+var >::value, var >::type 
stan::math::dot_product (const T1 *v1, const T2 *v2, size_t length)
 Returns the dot product. More...
 
template<typename T1 , typename T2 >
boost::enable_if_c
+< boost::is_same< T1, var >
+::value||boost::is_same< T2,
+var >::value, var >::type 
stan::math::dot_product (const std::vector< T1 > &v1, const std::vector< T2 > &v2)
 Returns the dot product. More...
 
+

Variable Documentation

+ +
+
+ + + + +
size_t length_
+
+ +

Definition at line 38 of file dot_product.hpp.

+ +
+
+ +
+
+ + + + +
dot_product_store_type<T1>::type v1_
+
+ +

Definition at line 36 of file dot_product.hpp.

+ +
+
+ +
+
+ + + + +
dot_product_store_type<T2>::type v2_
+
+ +

Definition at line 37 of file dot_product.hpp.

+ +
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2dot__product_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2dot__product_8hpp_source.html new file mode 100644 index 00000000000..d29f901d765 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2dot__product_8hpp_source.html @@ -0,0 +1,365 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/dot_product.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
dot_product.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_DOT_PRODUCT_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_DOT_PRODUCT_HPP
+
3 
+ + + + + +
9 #include <stan/math/rev/core.hpp>
+ + +
12 #include <boost/utility/enable_if.hpp>
+
13 #include <boost/type_traits.hpp>
+
14 #include <vector>
+
15 
+
16 namespace stan {
+
17  namespace math {
+
18 
+
19  namespace {
+
20  template<typename T>
+
21  struct dot_product_store_type;
+
22 
+
23  template<>
+
24  struct dot_product_store_type<var> {
+
25  typedef vari** type;
+
26  };
+
27 
+
28  template<>
+
29  struct dot_product_store_type<double> {
+
30  typedef double* type;
+
31  };
+
32 
+
33  template<typename T1, typename T2>
+
34  class dot_product_vari : public vari {
+
35  protected:
+
36  typename dot_product_store_type<T1>::type v1_;
+
37  typename dot_product_store_type<T2>::type v2_;
+
38  size_t length_;
+
39 
+
40  inline static double var_dot(vari** v1, vari** v2,
+
41  size_t length) {
+
42  Eigen::VectorXd vd1(length), vd2(length);
+
43  for (size_t i = 0; i < length; i++) {
+
44  vd1[i] = v1[i]->val_;
+
45  vd2[i] = v2[i]->val_;
+
46  }
+
47  return vd1.dot(vd2);
+
48  }
+
49 
+
50  inline static double var_dot(const T1* v1, const T2* v2,
+
51  size_t length) {
+ +
53  Eigen::VectorXd vd1(length), vd2(length);
+
54  for (size_t i = 0; i < length; i++) {
+
55  vd1[i] = value_of(v1[i]);
+
56  vd2[i] = value_of(v2[i]);
+
57  }
+
58  return vd1.dot(vd2);
+
59  }
+
60 
+
61  template<typename Derived1, typename Derived2>
+
62  inline static double var_dot(const Eigen::DenseBase<Derived1> &v1,
+
63  const Eigen::DenseBase<Derived2> &v2) {
+ + +
66  Eigen::VectorXd vd1(v1.size()), vd2(v1.size());
+
67  for (int i = 0; i < v1.size(); i++) {
+
68  vd1[i] = value_of(v1[i]);
+
69  vd2[i] = value_of(v2[i]);
+
70  }
+
71  return vd1.dot(vd2);
+
72  }
+
73  inline void chain(vari** v1, vari** v2) {
+
74  for (size_t i = 0; i < length_; i++) {
+
75  v1[i]->adj_ += adj_ * v2_[i]->val_;
+
76  v2[i]->adj_ += adj_ * v1_[i]->val_;
+
77  }
+
78  }
+
79  inline void chain(double* v1, vari** v2) {
+
80  for (size_t i = 0; i < length_; i++) {
+
81  v2[i]->adj_ += adj_ * v1_[i];
+
82  }
+
83  }
+
84  inline void chain(vari** v1, double* v2) {
+
85  for (size_t i = 0; i < length_; i++) {
+
86  v1[i]->adj_ += adj_ * v2_[i];
+
87  }
+
88  }
+
89  inline void initialize(vari** &mem_v, const var *inv,
+
90  vari **shared = NULL) {
+
91  if (shared == NULL) {
+
92  mem_v = reinterpret_cast<vari**>(ChainableStack::memalloc_
+
93  .alloc(length_*sizeof(vari*)));
+
94  for (size_t i = 0; i < length_; i++)
+
95  mem_v[i] = inv[i].vi_;
+
96  } else {
+
97  mem_v = shared;
+
98  }
+
99  }
+
100  template<typename Derived>
+
101  inline void initialize(vari** &mem_v,
+
102  const Eigen::DenseBase<Derived> &inv,
+
103  vari **shared = NULL) {
+
104  if (shared == NULL) {
+
105  mem_v = reinterpret_cast<vari**>(ChainableStack::memalloc_
+
106  .alloc(length_*sizeof(vari*)));
+
107  for (size_t i = 0; i < length_; i++)
+
108  mem_v[i] = inv(i).vi_;
+
109  } else {
+
110  mem_v = shared;
+
111  }
+
112  }
+
113 
+
114  inline void initialize(double* &mem_d, const double *ind,
+
115  double *shared = NULL) {
+
116  if (shared == NULL) {
+
117  mem_d = reinterpret_cast<double*>(ChainableStack::memalloc_
+
118  .alloc(length_*sizeof(double)));
+
119  for (size_t i = 0; i < length_; i++)
+
120  mem_d[i] = ind[i];
+
121  } else {
+
122  mem_d = shared;
+
123  }
+
124  }
+
125  template<typename Derived>
+
126  inline void initialize(double* &mem_d,
+
127  const Eigen::DenseBase<Derived> &ind,
+
128  double *shared = NULL) {
+
129  if (shared == NULL) {
+
130  mem_d = reinterpret_cast<double*>
+
131  (ChainableStack::memalloc_.alloc(length_*sizeof(double)));
+
132  for (size_t i = 0; i < length_; i++)
+
133  mem_d[i] = ind(i);
+
134  } else {
+
135  mem_d = shared;
+
136  }
+
137  }
+
138 
+
139  public:
+
140  dot_product_vari(typename dot_product_store_type<T1>::type v1,
+
141  typename dot_product_store_type<T2>::type v2,
+
142  size_t length)
+
143  : vari(var_dot(v1, v2, length)), v1_(v1), v2_(v2), length_(length) {}
+
144 
+
145  dot_product_vari(const T1* v1, const T2* v2, size_t length,
+
146  dot_product_vari<T1, T2>* shared_v1 = NULL,
+
147  dot_product_vari<T1, T2>* shared_v2 = NULL) :
+
148  vari(var_dot(v1, v2, length)), length_(length) {
+
149  if (shared_v1 == NULL) {
+
150  initialize(v1_, v1);
+
151  } else {
+
152  initialize(v1_, v1, shared_v1->v1_);
+
153  }
+
154  if (shared_v2 == NULL) {
+
155  initialize(v2_, v2);
+
156  } else {
+
157  initialize(v2_, v2, shared_v2->v2_);
+
158  }
+
159  }
+
160  template<typename Derived1, typename Derived2>
+
161  dot_product_vari(const Eigen::DenseBase<Derived1> &v1,
+
162  const Eigen::DenseBase<Derived2> &v2,
+
163  dot_product_vari<T1, T2>* shared_v1 = NULL,
+
164  dot_product_vari<T1, T2>* shared_v2 = NULL) :
+
165  vari(var_dot(v1, v2)), length_(v1.size()) {
+
166  if (shared_v1 == NULL) {
+
167  initialize(v1_, v1);
+
168  } else {
+
169  initialize(v1_, v1, shared_v1->v1_);
+
170  }
+
171  if (shared_v2 == NULL) {
+
172  initialize(v2_, v2);
+
173  } else {
+
174  initialize(v2_, v2, shared_v2->v2_);
+
175  }
+
176  }
+
177  template<int R1, int C1, int R2, int C2>
+
178  dot_product_vari(const Eigen::Matrix<T1, R1, C1> &v1,
+
179  const Eigen::Matrix<T2, R2, C2> &v2,
+
180  dot_product_vari<T1, T2>* shared_v1 = NULL,
+
181  dot_product_vari<T1, T2>* shared_v2 = NULL) :
+
182  vari(var_dot(v1, v2)), length_(v1.size()) {
+
183  if (shared_v1 == NULL) {
+
184  initialize(v1_, v1);
+
185  } else {
+
186  initialize(v1_, v1, shared_v1->v1_);
+
187  }
+
188  if (shared_v2 == NULL) {
+
189  initialize(v2_, v2);
+
190  } else {
+
191  initialize(v2_, v2, shared_v2->v2_);
+
192  }
+
193  }
+
194  virtual void chain() {
+
195  chain(v1_, v2_);
+
196  }
+
197  };
+
198  }
+
199 
+
208  template<typename T1, int R1, int C1, typename T2, int R2, int C2>
+
209  inline
+
210  typename boost::enable_if_c<boost::is_same<T1, var>::value ||
+
211  boost::is_same<T2, var>::value, var>::type
+
212  dot_product(const Eigen::Matrix<T1, R1, C1>& v1,
+
213  const Eigen::Matrix<T2, R2, C2>& v2) {
+
214  stan::math::check_vector("dot_product", "v1", v1);
+
215  stan::math::check_vector("dot_product", "v2", v2);
+
216  stan::math::check_matching_sizes("dot_product",
+
217  "v1", v1,
+
218  "v2", v2);
+
219  return var(new dot_product_vari<T1, T2>(v1, v2));
+
220  }
+
229  template<typename T1, typename T2>
+
230  inline
+
231  typename boost::enable_if_c<boost::is_same<T1, var>::value ||
+
232  boost::is_same<T2, var>::value, var>::type
+
233  dot_product(const T1* v1, const T2* v2, size_t length) {
+
234  return var(new dot_product_vari<T1, T2>(v1, v2, length));
+
235  }
+
236 
+
245  template<typename T1, typename T2>
+
246  inline
+
247  typename boost::enable_if_c<boost::is_same<T1, var>::value ||
+
248  boost::is_same<T2, var>::value, var>::type
+
249  dot_product(const std::vector<T1>& v1,
+
250  const std::vector<T2>& v2) {
+
251  stan::math::check_matching_sizes("dot_product",
+
252  "v1", v1,
+
253  "v2", v2);
+
254  return var(new dot_product_vari<T1, T2>(&v1[0], &v2[0], v1.size()));
+
255  }
+
256 
+
257  }
+
258 }
+
259 #endif
+ +
bool check_vector(const char *function, const char *name, const Eigen::Matrix< T, R, C > &x)
Return true if the matrix is either a row vector or column vector.
+
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
dot_product_store_type< T1 >::type v1_
Definition: dot_product.hpp:36
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
dot_product_store_type< T2 >::type v2_
Definition: dot_product.hpp:37
+
void initialize(T &x, const T &v)
Definition: initialize.hpp:17
+ +
bool check_matching_sizes(const char *function, const char *name1, const T_y1 &y1, const char *name2, const T_y2 &y2)
Return true if two structures at the same size.
+
fvar< T > dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
Definition: dot_product.hpp:20
+ + +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
size_t length_
Definition: dot_product.hpp:38
+ + +
void * alloc(size_t len)
Return a newly allocated block of memory of the appropriate size managed by the stack allocator...
+
fvar< T > inv(const fvar< T > &x)
Definition: inv.hpp:15
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2dot__self_8hpp.html b/doc/api/html/rev_2mat_2fun_2dot__self_8hpp.html new file mode 100644 index 00000000000..120d40bc5e0 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2dot__self_8hpp.html @@ -0,0 +1,164 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/dot_self.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
dot_self.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<int R, int C>
var stan::math::dot_self (const Eigen::Matrix< var, R, C > &v)
 Returns the dot product of a vector with itself. More...
 
+

Variable Documentation

+ +
+
+ + + + +
size_t size_
+
+ +

Definition at line 18 of file dot_self.hpp.

+ +
+
+ +
+
+ + + + +
vari** v_
+
+ +

Definition at line 17 of file dot_self.hpp.

+ +
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2dot__self_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2dot__self_8hpp_source.html new file mode 100644 index 00000000000..efb595588b0 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2dot__self_8hpp_source.html @@ -0,0 +1,200 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/dot_self.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
dot_self.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_DOT_SELF_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_DOT_SELF_HPP
+
3 
+ + + +
7 #include <stan/math/rev/core.hpp>
+ +
9 #include <vector>
+
10 
+
11 namespace stan {
+
12  namespace math {
+
13 
+
14  namespace {
+
15  class dot_self_vari : public vari {
+
16  protected:
+
17  vari** v_;
+
18  size_t size_;
+
19 
+
20  public:
+
21  dot_self_vari(vari** v, size_t size)
+
22  : vari(var_dot_self(v, size)),
+
23  v_(v),
+
24  size_(size) {
+
25  }
+
26  template<typename Derived>
+
27  explicit dot_self_vari(const Eigen::DenseBase<Derived> &v) :
+
28  vari(var_dot_self(v)), size_(v.size()) {
+
29  v_ = reinterpret_cast<vari**>(ChainableStack::memalloc_
+
30  .alloc(size_*sizeof(vari*)));
+
31  for (size_t i = 0; i < size_; i++)
+
32  v_[i] = v[i].vi_;
+
33  }
+
34  template <int R, int C>
+
35  explicit dot_self_vari(const Eigen::Matrix<var, R, C>& v) :
+
36  vari(var_dot_self(v)), size_(v.size()) {
+
37  v_ = reinterpret_cast<vari**>
+
38  (ChainableStack::memalloc_.alloc(size_ * sizeof(vari*)));
+
39  for (size_t i = 0; i < size_; ++i)
+
40  v_[i] = v(i).vi_;
+
41  }
+
42  inline static double square(double x) { return x * x; }
+
43  inline static double var_dot_self(vari** v, size_t size) {
+
44  double sum = 0.0;
+
45  for (size_t i = 0; i < size; ++i)
+
46  sum += square(v[i]->val_);
+
47  return sum;
+
48  }
+
49  template<typename Derived>
+
50  double var_dot_self(const Eigen::DenseBase<Derived> &v) {
+
51  double sum = 0.0;
+
52  for (int i = 0; i < v.size(); ++i)
+
53  sum += square(v(i).vi_->val_);
+
54  return sum;
+
55  }
+
56  template <int R, int C>
+
57  inline static double var_dot_self(const Eigen::Matrix<var, R, C> &v) {
+
58  double sum = 0.0;
+
59  for (int i = 0; i < v.size(); ++i)
+
60  sum += square(v(i).vi_->val_);
+
61  return sum;
+
62  }
+
63  virtual void chain() {
+
64  for (size_t i = 0; i < size_; ++i)
+
65  v_[i]->adj_ += adj_ * 2.0 * v_[i]->val_;
+
66  }
+
67  };
+
68  }
+
79  template<int R, int C>
+
80  inline var dot_self(const Eigen::Matrix<var, R, C>& v) {
+
81  stan::math::check_vector("dot_self", "v", v);
+
82  return var(new dot_self_vari(v));
+
83  }
+
84 
+
85  }
+
86 }
+
87 #endif
+
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+ +
bool check_vector(const char *function, const char *name, const Eigen::Matrix< T, R, C > &x)
Return true if the matrix is either a row vector or column vector.
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
fvar< T > dot_self(const Eigen::Matrix< fvar< T >, R, C > &v)
Definition: dot_self.hpp:16
+
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+ +
size_t size_
Definition: dot_self.hpp:18
+
vari ** v_
Definition: dot_self.hpp:17
+ + +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
void * alloc(size_t len)
Return a newly allocated block of memory of the appropriate size managed by the stack allocator...
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2log__determinant_8hpp.html b/doc/api/html/rev_2mat_2fun_2log__determinant_8hpp.html new file mode 100644 index 00000000000..1a41093dea1 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2log__determinant_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/log_determinant.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_determinant.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<int R, int C>
var stan::math::log_determinant (const Eigen::Matrix< var, R, C > &m)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2log__determinant_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2log__determinant_8hpp_source.html new file mode 100644 index 00000000000..25dd07f2023 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2log__determinant_8hpp_source.html @@ -0,0 +1,162 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/log_determinant.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_determinant.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_LOG_DETERMINANT_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_LOG_DETERMINANT_HPP
+
3 
+ + +
6 #include <stan/math/rev/core.hpp>
+
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  template <int R, int C>
+
13  inline var log_determinant(const Eigen::Matrix<var, R, C>& m) {
+
14  using Eigen::Matrix;
+
15 
+
16  math::check_square("log_determinant", "m", m);
+
17 
+
18  Matrix<double, R, C> m_d(m.rows(), m.cols());
+
19  for (int i = 0; i < m.size(); ++i)
+
20  m_d(i) = m(i).val();
+
21 
+
22  Eigen::FullPivHouseholderQR<Matrix<double, R, C> > hh
+
23  = m_d.fullPivHouseholderQr();
+
24 
+
25  double val = hh.logAbsDeterminant();
+
26 
+
27  vari** varis
+ +
29  for (int i = 0; i < m.size(); ++i)
+
30  varis[i] = m(i).vi_;
+
31 
+
32  Matrix<double, R, C> m_inv_transpose = hh.inverse().transpose();
+
33  double* gradients
+
34  = ChainableStack::memalloc_.alloc_array<double>(m.size());
+
35  for (int i = 0; i < m.size(); ++i)
+
36  gradients[i] = m_inv_transpose(i);
+
37 
+
38  return var(new precomputed_gradients_vari(val, m.size(),
+
39  varis, gradients));
+
40  }
+
41 
+
42  }
+
43 }
+
44 #endif
+ + +
The variable implementation base class.
Definition: vari.hpp:28
+
fvar< T > log_determinant(const Eigen::Matrix< fvar< T >, R, C > &m)
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
A variable implementation taking a sequence of operands and partial derivatives with respect to the o...
+ +
T * alloc_array(size_t n)
Allocate an array on the arena of the specified size to hold values of the specified template paramet...
+
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2log__determinant__ldlt_8hpp.html b/doc/api/html/rev_2mat_2fun_2log__determinant__ldlt_8hpp.html new file mode 100644 index 00000000000..cd7e5b0ee6e --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2log__determinant__ldlt_8hpp.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/log_determinant_ldlt.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_determinant_ldlt.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<int R, int C>
var stan::math::log_determinant_ldlt (stan::math::LDLT_factor< var, R, C > &A)
 
+

Variable Documentation

+ +
+
+ + + + +
const LDLT_alloc<R, C>* _alloc_ldlt
+
+ +

Definition at line 43 of file log_determinant_ldlt.hpp.

+ +
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2log__determinant__ldlt_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2log__determinant__ldlt_8hpp_source.html new file mode 100644 index 00000000000..ceb835dac14 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2log__determinant__ldlt_8hpp_source.html @@ -0,0 +1,161 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/log_determinant_ldlt.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_determinant_ldlt.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_LOG_DETERMINANT_LDLT_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_LOG_DETERMINANT_LDLT_HPP
+
3 
+ +
5 #include <stan/math/rev/core.hpp>
+ + +
8 
+
9 namespace stan {
+
10  namespace math {
+
11  namespace {
+
12 
+
22  template<int R, int C>
+
23  class log_det_ldlt_vari : public vari {
+
24  public:
+
25  explicit log_det_ldlt_vari(const stan::math::LDLT_factor<var, R, C> &A)
+
26  : vari(A._alloc->log_abs_det()), _alloc_ldlt(A._alloc)
+
27  { }
+
28 
+
29  virtual void chain() {
+
30  Eigen::Matrix<double, R, C> invA;
+
31 
+
32  // If we start computing Jacobians, this may be a bit inefficient
+
33  invA.setIdentity(_alloc_ldlt->N_, _alloc_ldlt->N_);
+
34  _alloc_ldlt->_ldlt.solveInPlace(invA);
+
35 
+
36  for (size_t j = 0; j < _alloc_ldlt->N_; j++) {
+
37  for (size_t i = 0; i < _alloc_ldlt->N_; i++) {
+
38  _alloc_ldlt->_variA(i, j)->adj_ += adj_ * invA(i, j);
+
39  }
+
40  }
+
41  }
+
42 
+
43  const LDLT_alloc<R, C> *_alloc_ldlt;
+
44  };
+
45  }
+
46 
+
47  template<int R, int C>
+ +
49  return var(new log_det_ldlt_vari<R, C>(A));
+
50  }
+
51  }
+
52 }
+
53 #endif
+ + +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
mdivide_left_ldlt_alloc< R1, C1, R2, C2 > * _alloc
+ + + +
const LDLT_alloc< R, C > * _alloc_ldlt
+
T log_determinant_ldlt(stan::math::LDLT_factor< T, R, C > &A)
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2log__determinant__spd_8hpp.html b/doc/api/html/rev_2mat_2fun_2log__determinant__spd_8hpp.html new file mode 100644 index 00000000000..06402911746 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2log__determinant__spd_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/log_determinant_spd.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_determinant_spd.hpp File Reference
+
+
+
#include <boost/math/special_functions/fpclassify.hpp>
+#include <stan/math/prim/scal/err/domain_error.hpp>
+#include <stan/math/prim/mat/err/check_square.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/rev/core.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<int R, int C>
var stan::math::log_determinant_spd (const Eigen::Matrix< var, R, C > &m)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2log__determinant__spd_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2log__determinant__spd_8hpp_source.html new file mode 100644 index 00000000000..1e331b03324 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2log__determinant__spd_8hpp_source.html @@ -0,0 +1,193 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/log_determinant_spd.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_determinant_spd.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_LOG_DETERMINANT_SPD_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_LOG_DETERMINANT_SPD_HPP
+
3 
+
4 #include <boost/math/special_functions/fpclassify.hpp>
+ + + +
8 #include <stan/math/rev/core.hpp>
+
9 
+
10 namespace stan {
+
11 
+
12  namespace math {
+
13 
+
14  template <int R, int C>
+
15  inline var log_determinant_spd(const Eigen::Matrix<var, R, C>& m) {
+ +
17  using Eigen::Matrix;
+
18 
+
19  math::check_square("log_determinant_spd", "m", m);
+
20 
+
21  Matrix<double, R, C> m_d(m.rows(), m.cols());
+
22  for (int i = 0; i < m.size(); ++i)
+
23  m_d(i) = m(i).val();
+
24 
+
25  Eigen::LDLT<Matrix<double, R, C> > ldlt(m_d);
+
26  if (ldlt.info() != Eigen::Success) {
+
27  double y = 0;
+
28  domain_error("log_determinant_spd",
+
29  "matrix argument", y,
+
30  "failed LDLT factorization");
+
31  }
+
32 
+
33  // compute the inverse of A (needed for the derivative)
+
34  m_d.setIdentity(m.rows(), m.cols());
+
35  ldlt.solveInPlace(m_d);
+
36 
+
37  if (ldlt.isNegative() || (ldlt.vectorD().array() <= 1e-16).any()) {
+
38  double y = 0;
+
39  domain_error("log_determinant_spd",
+
40  "matrix argument", y,
+
41  "matrix is negative definite");
+
42  }
+
43 
+
44  double val = ldlt.vectorD().array().log().sum();
+
45 
+
46  if (!boost::math::isfinite(val)) {
+
47  double y = 0;
+
48  domain_error("log_determinant_spd",
+
49  "matrix argument", y,
+
50  "log determininant is infinite");
+
51  }
+
52 
+
53  vari** operands = ChainableStack::memalloc_
+
54  .alloc_array<vari*>(m.size());
+
55  for (int i = 0; i < m.size(); ++i)
+
56  operands[i] = m(i).vi_;
+
57 
+
58  double* gradients = ChainableStack::memalloc_
+
59  .alloc_array<double>(m.size());
+
60  for (int i = 0; i < m.size(); ++i)
+
61  gradients[i] = m_d(i);
+
62 
+
63  return var(new precomputed_gradients_vari(val, m.size(),
+
64  operands, gradients));
+
65  }
+
66 
+
67 
+
68  }
+
69 
+
70 }
+
71 #endif
+ +
bool isfinite(const stan::math::var &v)
Checks if the given number has finite value.
+ +
The variable implementation base class.
Definition: vari.hpp:28
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
A variable implementation taking a sequence of operands and partial derivatives with respect to the o...
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ +
T * alloc_array(size_t n)
Allocate an array on the arena of the specified size to hold values of the specified template paramet...
+
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+ +
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+
T log_determinant_spd(const Eigen::Matrix< T, R, C > &m)
Returns the log absolute determinant of the specified square matrix.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2log__softmax_8hpp.html b/doc/api/html/rev_2mat_2fun_2log__softmax_8hpp.html new file mode 100644 index 00000000000..a29299d8027 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2log__softmax_8hpp.html @@ -0,0 +1,194 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/log_softmax.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_softmax.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/fun/log_softmax.hpp>
+#include <stan/math/prim/mat/fun/softmax.hpp>
+#include <stan/math/prim/scal/err/check_nonzero_size.hpp>
+#include <cmath>
+#include <stdexcept>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

Eigen::Matrix< var,
+Eigen::Dynamic, 1 > 
stan::math::log_softmax (const Eigen::Matrix< var, Eigen::Dynamic, 1 > &alpha)
 Return the softmax of the specified Eigen vector. More...
 
+

Variable Documentation

+ +
+
+ + + + +
vari** alpha_
+
+ +

Definition at line 20 of file log_softmax.hpp.

+ +
+
+ +
+
+ + + + +
const int idx_
+
+ +

Definition at line 23 of file log_softmax.hpp.

+ +
+
+ +
+
+ + + + +
const int size_
+
+ +

Definition at line 22 of file log_softmax.hpp.

+ +
+
+ +
+
+ + + + +
const double* softmax_alpha_
+
+ +

Definition at line 21 of file log_softmax.hpp.

+ +
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2log__softmax_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2log__softmax_8hpp_source.html new file mode 100644 index 00000000000..99cdaaffac0 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2log__softmax_8hpp_source.html @@ -0,0 +1,249 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/log_softmax.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_softmax.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_LOG_SOFTMAX_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_LOG_SOFTMAX_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ + + + +
9 #include <cmath>
+
10 #include <stdexcept>
+
11 #include <vector>
+
12 
+
13 namespace stan {
+
14  namespace math {
+
15 
+
16  namespace {
+
17 
+
18  class log_softmax_elt_vari : public vari {
+
19  private:
+
20  vari** alpha_;
+
21  const double* softmax_alpha_;
+
22  const int size_; // array sizes
+
23  const int idx_; // in in softmax output
+
24 
+
25  public:
+
26  log_softmax_elt_vari(double val,
+
27  vari** alpha,
+
28  const double* softmax_alpha,
+
29  int size,
+
30  int idx)
+
31  : vari(val),
+
32  alpha_(alpha),
+
33  softmax_alpha_(softmax_alpha),
+
34  size_(size),
+
35  idx_(idx) {
+
36  }
+
37  void chain() {
+
38  for (int m = 0; m < size_; ++m) {
+
39  if (m == idx_)
+
40  alpha_[m]->adj_ += adj_ * (1 - softmax_alpha_[m]);
+
41  else
+
42  alpha_[m]->adj_ -= adj_ * softmax_alpha_[m];
+
43  }
+
44  }
+
45  };
+
46 
+
47  }
+
48 
+
49 
+
60  inline Eigen::Matrix<var, Eigen::Dynamic, 1>
+
61  log_softmax(const Eigen::Matrix<var, Eigen::Dynamic, 1>& alpha) {
+
62  using Eigen::Matrix;
+
63  using Eigen::Dynamic;
+
64 
+
65  stan::math::check_nonzero_size("log_softmax", "alpha", alpha);
+
66 
+
67  if (alpha.size() == 0)
+
68  throw std::domain_error("arg vector to log_softmax() "
+
69  "must have size > 0");
+
70  if (alpha.size() == 0)
+
71  throw std::domain_error("arg vector to log_softmax() "
+
72  "must have size > 0");
+
73  if (alpha.size() == 0)
+
74  throw std::domain_error("arg vector to log_softmax() "
+
75  "must have size > 0");
+
76 
+
77  vari** alpha_vi_array
+
78  = reinterpret_cast<vari**>
+
79  (chainable::operator new(sizeof(vari*) * alpha.size()));
+
80  for (int i = 0; i < alpha.size(); ++i)
+
81  alpha_vi_array[i] = alpha(i).vi_;
+
82 
+
83 
+
84  Matrix<double, Dynamic, 1> alpha_d(alpha.size());
+
85  for (int i = 0; i < alpha_d.size(); ++i)
+
86  alpha_d(i) = alpha(i).val();
+
87 
+
88  // fold logic of math::softmax() and math::log_softmax()
+
89  // to save computations
+
90 
+
91  Matrix<double, Dynamic, 1> softmax_alpha_d(alpha_d.size());
+
92  Matrix<double, Dynamic, 1> log_softmax_alpha_d(alpha_d.size());
+
93 
+
94  double max_v = alpha_d.maxCoeff();
+
95 
+
96  double sum = 0.0;
+
97  for (int i = 0; i < alpha_d.size(); ++i) {
+
98  softmax_alpha_d(i) = std::exp(alpha_d(i) - max_v);
+
99  sum += softmax_alpha_d(i);
+
100  }
+
101 
+
102  for (int i = 0; i < alpha_d.size(); ++i)
+
103  softmax_alpha_d(i) /= sum;
+
104  double log_sum = std::log(sum);
+
105 
+
106  for (int i = 0; i < alpha_d.size(); ++i)
+
107  log_softmax_alpha_d(i) = (alpha_d(i) - max_v) - log_sum;
+
108 
+
109  // end fold
+
110 
+
111  double* softmax_alpha_d_array
+
112  = reinterpret_cast<double*>
+
113  (chainable::operator new(sizeof(double) * alpha_d.size()));
+
114 
+
115  for (int i = 0; i < alpha_d.size(); ++i)
+
116  softmax_alpha_d_array[i] = softmax_alpha_d(i);
+
117 
+
118  Matrix<var, Dynamic, 1> log_softmax_alpha(alpha.size());
+
119  for (int k = 0; k < log_softmax_alpha.size(); ++k)
+
120  log_softmax_alpha(k)
+
121  = var(new log_softmax_elt_vari(log_softmax_alpha_d[k],
+
122  alpha_vi_array,
+
123  softmax_alpha_d_array,
+
124  alpha.size(),
+
125  k));
+
126  return log_softmax_alpha;
+
127  }
+
128 
+
129 
+
130  }
+
131 }
+
132 
+
133 #endif
+
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+
const int size_
Definition: log_softmax.hpp:22
+ +
const int idx_
Definition: log_softmax.hpp:23
+
const double * softmax_alpha_
Definition: log_softmax.hpp:21
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
The variable implementation base class.
Definition: vari.hpp:28
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
Eigen::Matrix< fvar< T >, Eigen::Dynamic, 1 > log_softmax(const Eigen::Matrix< fvar< T >, Eigen::Dynamic, 1 > &alpha)
Definition: log_softmax.hpp:16
+
bool check_nonzero_size(const char *function, const char *name, const T_y &y)
Return true if the specified matrix/vector is of non-zero size.
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+ +
vari ** alpha_
Definition: log_softmax.hpp:20
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2log__sum__exp_8hpp.html b/doc/api/html/rev_2mat_2fun_2log__sum__exp_8hpp.html new file mode 100644 index 00000000000..63f8cee7e4b --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2log__sum__exp_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/log_sum_exp.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_sum_exp.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<int R, int C>
var stan::math::log_sum_exp (const Eigen::Matrix< var, R, C > &x)
 Returns the log sum of exponentials. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2log__sum__exp_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2log__sum__exp_8hpp_source.html new file mode 100644 index 00000000000..2d10822a3e1 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2log__sum__exp_8hpp_source.html @@ -0,0 +1,175 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/log_sum_exp.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_sum_exp.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_LOG_SUM_EXP_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_LOG_SUM_EXP_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ + + +
8 #include <limits>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
13  namespace {
+
14 
+
15  // these function and the following class just translate
+
16  // log_sum_exp for std::vector for Eigen::Matrix
+
17 
+
18  template <int R, int C>
+
19  double log_sum_exp_as_double(const Eigen::Matrix<var, R, C>& x) {
+
20  using std::numeric_limits;
+
21  using std::exp;
+
22  using std::log;
+
23  double max = -numeric_limits<double>::infinity();
+
24  for (int i = 0; i < x.size(); ++i)
+
25  if (x(i) > max)
+
26  max = x(i).val();
+
27  double sum = 0.0;
+
28  for (int i = 0; i < x.size(); ++i)
+
29  if (x(i) != -numeric_limits<double>::infinity())
+
30  sum += exp(x(i).val() - max);
+
31  return max + log(sum);
+
32  }
+
33 
+
34  class log_sum_exp_matrix_vari : public op_matrix_vari {
+
35  public:
+
36  template <int R, int C>
+
37  explicit log_sum_exp_matrix_vari(const Eigen::Matrix<var, R, C>& x) :
+
38  op_matrix_vari(log_sum_exp_as_double(x), x) {
+
39  }
+
40  void chain() {
+
41  for (size_t i = 0; i < size_; ++i) {
+
42  vis_[i]->adj_ += adj_ * calculate_chain(vis_[i]->val_, val_);
+
43  }
+
44  }
+
45  };
+
46  }
+
47 
+
53  template <int R, int C>
+
54  inline var log_sum_exp(const Eigen::Matrix<var, R, C>& x) {
+
55  return var(new log_sum_exp_matrix_vari(x));
+
56  }
+
57 
+
58  }
+
59 }
+
60 #endif
+
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
fvar< T > log_sum_exp(const std::vector< fvar< T > > &v)
Definition: log_sum_exp.hpp:14
+ +
double calculate_chain(const double &x, const double &val)
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
size_t size_
Definition: dot_self.hpp:18
+ +
int max(const std::vector< int > &x)
Returns the maximum coefficient in the specified column vector.
Definition: max.hpp:21
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2mdivide__left_8hpp.html b/doc/api/html/rev_2mat_2fun_2mdivide__left_8hpp.html new file mode 100644 index 00000000000..b9f0ccbea9c --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2mdivide__left_8hpp.html @@ -0,0 +1,240 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/mdivide_left.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
mdivide_left.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<int R1, int C1, int R2, int C2>
Eigen::Matrix< var, R1, C2 > stan::math::mdivide_left (const Eigen::Matrix< var, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)
 
template<int R1, int C1, int R2, int C2>
Eigen::Matrix< var, R1, C2 > stan::math::mdivide_left (const Eigen::Matrix< var, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)
 
template<int R1, int C1, int R2, int C2>
Eigen::Matrix< var, R1, C2 > stan::math::mdivide_left (const Eigen::Matrix< double, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)
 
+

Variable Documentation

+ +
+
+ + + + +
vari** _variRefA
+
+ +

Definition at line 23 of file mdivide_left.hpp.

+ +
+
+ +
+
+ + + + +
vari** _variRefB
+
+ +

Definition at line 24 of file mdivide_left.hpp.

+ +
+
+ +
+
+ + + + +
vari** _variRefC
+
+ +

Definition at line 25 of file mdivide_left.hpp.

+ +
+
+ +
+
+ + + + +
double* A_
+
+ +

Definition at line 21 of file mdivide_left.hpp.

+ +
+
+ +
+
+ + + + +
double* C_
+
+ +

Definition at line 22 of file mdivide_left.hpp.

+ +
+
+ +
+
+ + + + +
int M_
+
+ +

Definition at line 19 of file mdivide_left.hpp.

+ +
+
+ +
+
+ + + + +
int N_
+
+ +

Definition at line 20 of file mdivide_left.hpp.

+ +
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2mdivide__left_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2mdivide__left_8hpp_source.html new file mode 100644 index 00000000000..51393e51e1a --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2mdivide__left_8hpp_source.html @@ -0,0 +1,483 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/mdivide_left.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
mdivide_left.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_MDIVIDE_LEFT_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_MDIVIDE_LEFT_HPP
+
3 
+ + + +
7 #include <stan/math/rev/core.hpp>
+ + +
10 #include <vector>
+
11 
+
12 namespace stan {
+
13  namespace math {
+
14 
+
15  namespace {
+
16  template <int R1, int C1, int R2, int C2>
+
17  class mdivide_left_vv_vari : public vari {
+
18  public:
+
19  int M_; // A.rows() = A.cols() = B.rows()
+
20  int N_; // B.cols()
+
21  double* A_;
+
22  double* C_;
+
23  vari** _variRefA;
+
24  vari** _variRefB;
+
25  vari** _variRefC;
+
26 
+
27  mdivide_left_vv_vari(const Eigen::Matrix<var, R1, C1> &A,
+
28  const Eigen::Matrix<var, R2, C2> &B)
+
29  : vari(0.0),
+
30  M_(A.rows()),
+
31  N_(B.cols()),
+
32  A_(reinterpret_cast<double*>
+
33  (stan::math::ChainableStack::memalloc_
+
34  .alloc(sizeof(double) * A.rows() * A.cols()))),
+
35  C_(reinterpret_cast<double*>
+
36  (stan::math::ChainableStack::memalloc_
+
37  .alloc(sizeof(double) * B.rows() * B.cols()))),
+
38  _variRefA(reinterpret_cast<vari**>
+
39  (stan::math::ChainableStack::memalloc_
+
40  .alloc(sizeof(vari*) * A.rows() * A.cols()))),
+
41  _variRefB(reinterpret_cast<vari**>
+
42  (stan::math::ChainableStack::memalloc_
+
43  .alloc(sizeof(vari*) * B.rows() * B.cols()))),
+
44  _variRefC(reinterpret_cast<vari**>
+
45  (stan::math::ChainableStack::memalloc_
+
46  .alloc(sizeof(vari*) * B.rows() * B.cols()))) {
+
47  using Eigen::Matrix;
+
48  using Eigen::Map;
+
49 
+
50  size_t pos = 0;
+
51  for (size_type j = 0; j < M_; j++) {
+
52  for (size_type i = 0; i < M_; i++) {
+
53  _variRefA[pos] = A(i, j).vi_;
+
54  A_[pos++] = A(i, j).val();
+
55  }
+
56  }
+
57 
+
58  pos = 0;
+
59  for (size_type j = 0; j < N_; j++) {
+
60  for (size_type i = 0; i < M_; i++) {
+
61  _variRefB[pos] = B(i, j).vi_;
+
62  C_[pos++] = B(i, j).val();
+
63  }
+
64  }
+
65 
+
66  Matrix<double, R1, C2> C(M_, N_);
+
67  C = Map<Matrix<double, R1, C2> >(C_, M_, N_);
+
68 
+
69  C = Map<Matrix<double, R1, C1> >(A_, M_, M_)
+
70  .colPivHouseholderQr().solve(C);
+
71 
+
72  pos = 0;
+
73  for (size_type j = 0; j < N_; j++) {
+
74  for (size_type i = 0; i < M_; i++) {
+
75  C_[pos] = C(i, j);
+
76  _variRefC[pos] = new vari(C_[pos], false);
+
77  pos++;
+
78  }
+
79  }
+
80  }
+
81 
+
82  virtual void chain() {
+
83  using Eigen::Matrix;
+
84  using Eigen::Map;
+
85  Eigen::Matrix<double, R1, C1> adjA(M_, M_);
+
86  Eigen::Matrix<double, R2, C2> adjB(M_, N_);
+
87  Eigen::Matrix<double, R1, C2> adjC(M_, N_);
+
88 
+
89  size_t pos = 0;
+
90  for (size_type j = 0; j < adjC.cols(); j++)
+
91  for (size_type i = 0; i < adjC.rows(); i++)
+
92  adjC(i, j) = _variRefC[pos++]->adj_;
+
93 
+
94 
+
95  adjB = Map<Matrix<double, R1, C1> >(A_, M_, M_)
+
96  .transpose().colPivHouseholderQr().solve(adjC);
+
97  adjA.noalias() = -adjB
+
98  * Map<Matrix<double, R1, C2> >(C_, M_, N_).transpose();
+
99 
+
100  pos = 0;
+
101  for (size_type j = 0; j < adjA.cols(); j++)
+
102  for (size_type i = 0; i < adjA.rows(); i++)
+
103  _variRefA[pos++]->adj_ += adjA(i, j);
+
104 
+
105  pos = 0;
+
106  for (size_type j = 0; j < adjB.cols(); j++)
+
107  for (size_type i = 0; i < adjB.rows(); i++)
+
108  _variRefB[pos++]->adj_ += adjB(i, j);
+
109  }
+
110  };
+
111 
+
112  template <int R1, int C1, int R2, int C2>
+
113  class mdivide_left_dv_vari : public vari {
+
114  public:
+
115  int M_; // A.rows() = A.cols() = B.rows()
+
116  int N_; // B.cols()
+
117  double* A_;
+
118  double* C_;
+
119  vari** _variRefB;
+
120  vari** _variRefC;
+
121 
+
122  mdivide_left_dv_vari(const Eigen::Matrix<double, R1, C1> &A,
+
123  const Eigen::Matrix<var, R2, C2> &B)
+
124  : vari(0.0),
+
125  M_(A.rows()),
+
126  N_(B.cols()),
+
127  A_(reinterpret_cast<double*>
+
128  (stan::math::ChainableStack::memalloc_
+
129  .alloc(sizeof(double) * A.rows() * A.cols()))),
+
130  C_(reinterpret_cast<double*>
+
131  (stan::math::ChainableStack::memalloc_
+
132  .alloc(sizeof(double) * B.rows() * B.cols()))),
+
133  _variRefB(reinterpret_cast<vari**>
+
134  (stan::math::ChainableStack::memalloc_
+
135  .alloc(sizeof(vari*) * B.rows() * B.cols()))),
+
136  _variRefC(reinterpret_cast<vari**>
+
137  (stan::math::ChainableStack::memalloc_
+
138  .alloc(sizeof(vari*) * B.rows() * B.cols()))) {
+
139  using Eigen::Matrix;
+
140  using Eigen::Map;
+
141 
+
142  size_t pos = 0;
+
143  for (size_type j = 0; j < M_; j++) {
+
144  for (size_type i = 0; i < M_; i++) {
+
145  A_[pos++] = A(i, j);
+
146  }
+
147  }
+
148 
+
149  pos = 0;
+
150  for (size_type j = 0; j < N_; j++) {
+
151  for (size_type i = 0; i < M_; i++) {
+
152  _variRefB[pos] = B(i, j).vi_;
+
153  C_[pos++] = B(i, j).val();
+
154  }
+
155  }
+
156 
+
157  Matrix<double, R1, C2> C(M_, N_);
+
158  C = Map<Matrix<double, R1, C2> >(C_, M_, N_);
+
159 
+
160  C = Map<Matrix<double, R1, C1> >(A_, M_, M_)
+
161  .colPivHouseholderQr().solve(C);
+
162 
+
163  pos = 0;
+
164  for (size_type j = 0; j < N_; j++) {
+
165  for (size_type i = 0; i < M_; i++) {
+
166  C_[pos] = C(i, j);
+
167  _variRefC[pos] = new vari(C_[pos], false);
+
168  pos++;
+
169  }
+
170  }
+
171  }
+
172 
+
173  virtual void chain() {
+
174  using Eigen::Matrix;
+
175  using Eigen::Map;
+
176  Eigen::Matrix<double, R2, C2> adjB(M_, N_);
+
177  Eigen::Matrix<double, R1, C2> adjC(M_, N_);
+
178 
+
179  size_t pos = 0;
+
180  for (size_type j = 0; j < adjC.cols(); j++)
+
181  for (size_type i = 0; i < adjC.rows(); i++)
+
182  adjC(i, j) = _variRefC[pos++]->adj_;
+
183 
+
184  adjB = Map<Matrix<double, R1, C1> >(A_, M_, M_)
+
185  .transpose().colPivHouseholderQr().solve(adjC);
+
186 
+
187  pos = 0;
+
188  for (size_type j = 0; j < adjB.cols(); j++)
+
189  for (size_type i = 0; i < adjB.rows(); i++)
+
190  _variRefB[pos++]->adj_ += adjB(i, j);
+
191  }
+
192  };
+
193 
+
194  template <int R1, int C1, int R2, int C2>
+
195  class mdivide_left_vd_vari : public vari {
+
196  public:
+
197  int M_; // A.rows() = A.cols() = B.rows()
+
198  int N_; // B.cols()
+
199  double* A_;
+
200  double* C_;
+
201  vari** _variRefA;
+
202  vari** _variRefC;
+
203 
+
204  mdivide_left_vd_vari(const Eigen::Matrix<var, R1, C1> &A,
+
205  const Eigen::Matrix<double, R2, C2> &B)
+
206  : vari(0.0),
+
207  M_(A.rows()),
+
208  N_(B.cols()),
+
209  A_(reinterpret_cast<double*>
+
210  (stan::math::ChainableStack::memalloc_
+
211  .alloc(sizeof(double) * A.rows() * A.cols()))),
+
212  C_(reinterpret_cast<double*>
+
213  (stan::math::ChainableStack::memalloc_
+
214  .alloc(sizeof(double) * B.rows() * B.cols()))),
+
215  _variRefA(reinterpret_cast<vari**>
+
216  (stan::math::ChainableStack::memalloc_
+
217  .alloc(sizeof(vari*) * A.rows() * A.cols()))),
+
218  _variRefC(reinterpret_cast<vari**>
+
219  (stan::math::ChainableStack::memalloc_
+
220  .alloc(sizeof(vari*) * B.rows() * B.cols()))) {
+
221  using Eigen::Matrix;
+
222  using Eigen::Map;
+
223 
+
224  size_t pos = 0;
+
225  for (size_type j = 0; j < M_; j++) {
+
226  for (size_type i = 0; i < M_; i++) {
+
227  _variRefA[pos] = A(i, j).vi_;
+
228  A_[pos++] = A(i, j).val();
+
229  }
+
230  }
+
231 
+
232  Matrix<double, R1, C2> C(M_, N_);
+
233  C = Map<Matrix<double, R1, C1> >(A_, M_, M_)
+
234  .colPivHouseholderQr().solve(B);
+
235 
+
236  pos = 0;
+
237  for (size_type j = 0; j < N_; j++) {
+
238  for (size_type i = 0; i < M_; i++) {
+
239  C_[pos] = C(i, j);
+
240  _variRefC[pos] = new vari(C_[pos], false);
+
241  pos++;
+
242  }
+
243  }
+
244  }
+
245 
+
246  virtual void chain() {
+
247  using Eigen::Matrix;
+
248  using Eigen::Map;
+
249  Eigen::Matrix<double, R1, C1> adjA(M_, M_);
+
250  Eigen::Matrix<double, R1, C2> adjC(M_, N_);
+
251 
+
252  size_t pos = 0;
+
253  for (size_type j = 0; j < adjC.cols(); j++)
+
254  for (size_type i = 0; i < adjC.rows(); i++)
+
255  adjC(i, j) = _variRefC[pos++]->adj_;
+
256 
+
257  // FIXME: add .noalias() to LHS
+
258  adjA = -Map<Matrix<double, R1, C1> >(A_, M_, M_)
+
259  .transpose()
+
260  .colPivHouseholderQr()
+
261  .solve(adjC*Map<Matrix<double, R1, C2> >(C_, M_, N_).transpose());
+
262 
+
263  pos = 0;
+
264  for (size_type j = 0; j < adjA.cols(); j++)
+
265  for (size_type i = 0; i < adjA.rows(); i++)
+
266  _variRefA[pos++]->adj_ += adjA(i, j);
+
267  }
+
268  };
+
269  }
+
270 
+
271  template <int R1, int C1, int R2, int C2>
+
272  inline
+
273  Eigen::Matrix<var, R1, C2>
+
274  mdivide_left(const Eigen::Matrix<var, R1, C1> &A,
+
275  const Eigen::Matrix<var, R2, C2> &b) {
+
276  Eigen::Matrix<var, R1, C2> res(b.rows(), b.cols());
+
277 
+
278  stan::math::check_square("mdivide_left", "A", A);
+
279  stan::math::check_multiplicable("mdivide_left",
+
280  "A", A,
+
281  "b", b);
+
282 
+
283  // NOTE: this is not a memory leak, this vari is used in the
+
284  // expression graph to evaluate the adjoint, but is not needed
+
285  // for the returned matrix. Memory will be cleaned up with the
+
286  // arena allocator.
+
287  mdivide_left_vv_vari<R1, C1, R2, C2> *baseVari
+
288  = new mdivide_left_vv_vari<R1, C1, R2, C2>(A, b);
+
289 
+
290  size_t pos = 0;
+
291  for (size_type j = 0; j < res.cols(); j++)
+
292  for (size_type i = 0; i < res.rows(); i++)
+
293  res(i, j).vi_ = baseVari->_variRefC[pos++];
+
294 
+
295  return res;
+
296  }
+
297 
+
298  template <int R1, int C1, int R2, int C2>
+
299  inline
+
300  Eigen::Matrix<var, R1, C2>
+
301  mdivide_left(const Eigen::Matrix<var, R1, C1> &A,
+
302  const Eigen::Matrix<double, R2, C2> &b) {
+
303  Eigen::Matrix<var, R1, C2> res(b.rows(), b.cols());
+
304 
+
305  stan::math::check_square("mdivide_left", "A", A);
+
306  stan::math::check_multiplicable("mdivide_left",
+
307  "A", A,
+
308  "b", b);
+
309 
+
310  // NOTE: this is not a memory leak, this vari is used in the
+
311  // expression graph to evaluate the adjoint, but is not needed
+
312  // for the returned matrix. Memory will be cleaned up with the
+
313  // arena allocator.
+
314  mdivide_left_vd_vari<R1, C1, R2, C2> *baseVari
+
315  = new mdivide_left_vd_vari<R1, C1, R2, C2>(A, b);
+
316 
+
317  size_t pos = 0;
+
318  for (size_type j = 0; j < res.cols(); j++)
+
319  for (size_type i = 0; i < res.rows(); i++)
+
320  res(i, j).vi_ = baseVari->_variRefC[pos++];
+
321 
+
322  return res;
+
323  }
+
324 
+
325  template <int R1, int C1, int R2, int C2>
+
326  inline
+
327  Eigen::Matrix<var, R1, C2>
+
328  mdivide_left(const Eigen::Matrix<double, R1, C1> &A,
+
329  const Eigen::Matrix<var, R2, C2> &b) {
+
330  Eigen::Matrix<var, R1, C2> res(b.rows(), b.cols());
+
331 
+
332  stan::math::check_square("mdivide_left", "A", A);
+
333  stan::math::check_multiplicable("mdivide_left",
+
334  "A", A,
+
335  "b", b);
+
336 
+
337  // NOTE: this is not a memory leak, this vari is used in the
+
338  // expression graph to evaluate the adjoint, but is not needed
+
339  // for the returned matrix. Memory will be cleaned up with the
+
340  // arena allocator.
+
341  mdivide_left_dv_vari<R1, C1, R2, C2> *baseVari
+
342  = new mdivide_left_dv_vari<R1, C1, R2, C2>(A, b);
+
343 
+
344  size_t pos = 0;
+
345  for (size_type j = 0; j < res.cols(); j++)
+
346  for (size_type i = 0; i < res.rows(); i++)
+
347  res(i, j).vi_ = baseVari->_variRefC[pos++];
+
348 
+
349  return res;
+
350  }
+
351 
+
352  }
+
353 }
+
354 #endif
+
Eigen::Matrix< fvar< T >, R1, C2 > mdivide_left(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)
+
int rows(const Eigen::Matrix< T, R, C > &m)
Return the number of rows in the specified matrix, vector, or row vector.
Definition: rows.hpp:20
+ + +
double * C_
+
vari ** _variRefB
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
int M_
+
AutodiffStackStorage< chainable, chainable_alloc > ChainableStack
+ +
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+
vari ** _variRefA
+
int cols(const Eigen::Matrix< T, R, C > &m)
Return the number of columns in the specified matrix, vector, or row vector.
Definition: cols.hpp:20
+ +
double * A_
+
Eigen::Matrix< T, C, R > transpose(const Eigen::Matrix< T, R, C > &m)
Definition: transpose.hpp:12
+
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+
int N_
+
vari ** _variRefC
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2mdivide__left__ldlt_8hpp.html b/doc/api/html/rev_2mat_2fun_2mdivide__left__ldlt_8hpp.html new file mode 100644 index 00000000000..df8637db34d --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2mdivide__left__ldlt_8hpp.html @@ -0,0 +1,258 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/mdivide_left_ldlt.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
mdivide_left_ldlt.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + +

+Functions

template<int R1, int C1, int R2, int C2>
Eigen::Matrix< var, R1, C2 > stan::math::mdivide_left_ldlt (const stan::math::LDLT_factor< var, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)
 Returns the solution of the system Ax=b given an LDLT_factor of A. More...
 
template<int R1, int C1, int R2, int C2>
Eigen::Matrix< var, R1, C2 > stan::math::mdivide_left_ldlt (const stan::math::LDLT_factor< var, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)
 Returns the solution of the system Ax=b given an LDLT_factor of A. More...
 
template<int R1, int C1, int R2, int C2>
Eigen::Matrix< var, R1, C2 > stan::math::mdivide_left_ldlt (const stan::math::LDLT_factor< double, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)
 Returns the solution of the system Ax=b given an LDLT_factor of A. More...
 
+

Variable Documentation

+ +
+
+ + + + +
mdivide_left_ldlt_alloc<R1, C1, R2, C2>* _alloc
+
+ +

Definition at line 44 of file mdivide_left_ldlt.hpp.

+ +
+
+ +
+
+ + + + +
const LDLT_alloc<R1, C1>* _alloc_ldlt
+
+ +

Definition at line 45 of file mdivide_left_ldlt.hpp.

+ +
+
+ +
+
+ + + + +
boost::shared_ptr<Eigen::LDLT<Eigen::Matrix<double, R1, C1> > > _ldltP
+
+ +

This share_ptr is used to prevent copying the LDLT factorizations for mdivide_left_ldlt(ldltA, b) when ldltA is a LDLT_factor<double>.

+

The pointer is shared with the LDLT_factor<double> class.

+ +

Definition at line 23 of file mdivide_left_ldlt.hpp.

+ +
+
+ +
+
+ + + + +
vari** _variRefB
+
+ +

Definition at line 42 of file mdivide_left_ldlt.hpp.

+ +
+
+ +
+
+ + + + +
vari** _variRefC
+
+ +

Definition at line 43 of file mdivide_left_ldlt.hpp.

+ +
+
+ +
+
+ + + + +
Eigen::Matrix<double, R2, C2> C_
+
+ +

Definition at line 24 of file mdivide_left_ldlt.hpp.

+ +
+
+ +
+
+ + + + +
int M_
+
+ +

Definition at line 40 of file mdivide_left_ldlt.hpp.

+ +
+
+ +
+
+ + + + +
int N_
+
+ +

Definition at line 41 of file mdivide_left_ldlt.hpp.

+ +
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2mdivide__left__ldlt_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2mdivide__left__ldlt_8hpp_source.html new file mode 100644 index 00000000000..355345484c2 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2mdivide__left__ldlt_8hpp_source.html @@ -0,0 +1,394 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/mdivide_left_ldlt.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
mdivide_left_ldlt.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_MDIVIDE_LEFT_LDLT_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_MDIVIDE_LEFT_LDLT_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ + + + +
9 
+
10 namespace stan {
+
11  namespace math {
+
12  namespace {
+
13  template <int R1, int C1, int R2, int C2>
+
14  class mdivide_left_ldlt_alloc : public chainable_alloc {
+
15  public:
+
16  virtual ~mdivide_left_ldlt_alloc() {}
+
17 
+
23  boost::shared_ptr<Eigen::LDLT<Eigen::Matrix<double, R1, C1> > > _ldltP;
+
24  Eigen::Matrix<double, R2, C2> C_;
+
25  };
+
26 
+
37  template <int R1, int C1, int R2, int C2>
+
38  class mdivide_left_ldlt_vv_vari : public vari {
+
39  public:
+
40  int M_; // A.rows() = A.cols() = B.rows()
+
41  int N_; // B.cols()
+
42  vari** _variRefB;
+
43  vari** _variRefC;
+
44  mdivide_left_ldlt_alloc<R1, C1, R2, C2> *_alloc;
+
45  const LDLT_alloc<R1, C1> *_alloc_ldlt;
+
46 
+
47  mdivide_left_ldlt_vv_vari(const stan::math::LDLT_factor<var, R1, C1> &A,
+
48  const Eigen::Matrix<var, R2, C2> &B)
+
49  : vari(0.0),
+
50  M_(A.rows()),
+
51  N_(B.cols()),
+
52  _variRefB(reinterpret_cast<vari**>
+
53  (stan::math::ChainableStack::memalloc_
+
54  .alloc(sizeof(vari*) * B.rows() * B.cols()))),
+
55  _variRefC(reinterpret_cast<vari**>
+
56  (stan::math::ChainableStack::memalloc_
+
57  .alloc(sizeof(vari*) * B.rows() * B.cols()))),
+
58  _alloc(new mdivide_left_ldlt_alloc<R1, C1, R2, C2>()),
+
59  _alloc_ldlt(A._alloc) {
+
60  int pos = 0;
+
61  _alloc->C_.resize(M_, N_);
+
62  for (int j = 0; j < N_; j++) {
+
63  for (int i = 0; i < M_; i++) {
+
64  _variRefB[pos] = B(i, j).vi_;
+
65  _alloc->C_(i, j) = B(i, j).val();
+
66  pos++;
+
67  }
+
68  }
+
69 
+
70  _alloc_ldlt->_ldlt.solveInPlace(_alloc->C_);
+
71 
+
72  pos = 0;
+
73  for (int j = 0; j < N_; j++) {
+
74  for (int i = 0; i < M_; i++) {
+
75  _variRefC[pos] = new vari(_alloc->C_(i, j), false);
+
76  pos++;
+
77  }
+
78  }
+
79  }
+
80 
+
81  virtual void chain() {
+
82  Eigen::Matrix<double, R1, C1> adjA(M_, M_);
+
83  Eigen::Matrix<double, R2, C2> adjB(M_, N_);
+
84 
+
85  int pos = 0;
+
86  for (int j = 0; j < N_; j++)
+
87  for (int i = 0; i < M_; i++)
+
88  adjB(i, j) = _variRefC[pos++]->adj_;
+
89 
+
90  _alloc_ldlt->_ldlt.solveInPlace(adjB);
+
91  adjA.noalias() = -adjB * _alloc->C_.transpose();
+
92 
+
93  for (int j = 0; j < M_; j++)
+
94  for (int i = 0; i < M_; i++)
+
95  _alloc_ldlt->_variA(i, j)->adj_ += adjA(i, j);
+
96 
+
97  pos = 0;
+
98  for (int j = 0; j < N_; j++)
+
99  for (int i = 0; i < M_; i++)
+
100  _variRefB[pos++]->adj_ += adjB(i, j);
+
101  }
+
102  };
+
103 
+
114  template <int R1, int C1, int R2, int C2>
+
115  class mdivide_left_ldlt_dv_vari : public vari {
+
116  public:
+
117  int M_; // A.rows() = A.cols() = B.rows()
+
118  int N_; // B.cols()
+
119  vari** _variRefB;
+
120  vari** _variRefC;
+
121  mdivide_left_ldlt_alloc<R1, C1, R2, C2> *_alloc;
+
122 
+
123  mdivide_left_ldlt_dv_vari(const stan::math::LDLT_factor<double, R1, C1>
+
124  &A,
+
125  const Eigen::Matrix<var, R2, C2> &B)
+
126  : vari(0.0),
+
127  M_(A.rows()),
+
128  N_(B.cols()),
+
129  _variRefB(reinterpret_cast<vari**>
+
130  (stan::math::ChainableStack::memalloc_
+
131  .alloc(sizeof(vari*) * B.rows() * B.cols()))),
+
132  _variRefC(reinterpret_cast<vari**>
+
133  (stan::math::ChainableStack::memalloc_
+
134  .alloc(sizeof(vari*) * B.rows() * B.cols()))),
+
135  _alloc(new mdivide_left_ldlt_alloc<R1, C1, R2, C2>()) {
+
136  using Eigen::Matrix;
+
137  using Eigen::Map;
+
138 
+
139  int pos = 0;
+
140  _alloc->C_.resize(M_, N_);
+
141  for (int j = 0; j < N_; j++) {
+
142  for (int i = 0; i < M_; i++) {
+
143  _variRefB[pos] = B(i, j).vi_;
+
144  _alloc->C_(i, j) = B(i, j).val();
+
145  pos++;
+
146  }
+
147  }
+
148 
+
149  _alloc->_ldltP = A._ldltP;
+
150  _alloc->_ldltP->solveInPlace(_alloc->C_);
+
151 
+
152  pos = 0;
+
153  for (int j = 0; j < N_; j++) {
+
154  for (int i = 0; i < M_; i++) {
+
155  _variRefC[pos] = new vari(_alloc->C_(i, j), false);
+
156  pos++;
+
157  }
+
158  }
+
159  }
+
160 
+
161  virtual void chain() {
+
162  Eigen::Matrix<double, R2, C2> adjB(M_, N_);
+
163 
+
164  int pos = 0;
+
165  for (int j = 0; j < adjB.cols(); j++)
+
166  for (int i = 0; i < adjB.rows(); i++)
+
167  adjB(i, j) = _variRefC[pos++]->adj_;
+
168 
+
169  _alloc->_ldltP->solveInPlace(adjB);
+
170 
+
171  pos = 0;
+
172  for (int j = 0; j < adjB.cols(); j++)
+
173  for (int i = 0; i < adjB.rows(); i++)
+
174  _variRefB[pos++]->adj_ += adjB(i, j);
+
175  }
+
176  };
+
177 
+
188  template <int R1, int C1, int R2, int C2>
+
189  class mdivide_left_ldlt_vd_vari : public vari {
+
190  public:
+
191  int M_; // A.rows() = A.cols() = B.rows()
+
192  int N_; // B.cols()
+
193  vari** _variRefC;
+
194  mdivide_left_ldlt_alloc<R1, C1, R2, C2> *_alloc;
+
195  const LDLT_alloc<R1, C1> *_alloc_ldlt;
+
196 
+
197  mdivide_left_ldlt_vd_vari(const stan::math::LDLT_factor<var, R1, C1> &A,
+
198  const Eigen::Matrix<double, R2, C2> &B)
+
199  : vari(0.0),
+
200  M_(A.rows()),
+
201  N_(B.cols()),
+
202  _variRefC(reinterpret_cast<vari**>
+
203  (stan::math::ChainableStack::memalloc_
+
204  .alloc(sizeof(vari*) * B.rows() * B.cols()))),
+
205  _alloc(new mdivide_left_ldlt_alloc<R1, C1, R2, C2>()),
+
206  _alloc_ldlt(A._alloc) {
+
207  _alloc->C_ = B;
+
208  _alloc_ldlt->_ldlt.solveInPlace(_alloc->C_);
+
209 
+
210  int pos = 0;
+
211  for (int j = 0; j < N_; j++) {
+
212  for (int i = 0; i < M_; i++) {
+
213  _variRefC[pos] = new vari(_alloc->C_(i, j), false);
+
214  pos++;
+
215  }
+
216  }
+
217  }
+
218 
+
219  virtual void chain() {
+
220  Eigen::Matrix<double, R1, C1> adjA(M_, M_);
+
221  Eigen::Matrix<double, R1, C2> adjC(M_, N_);
+
222 
+
223  int pos = 0;
+
224  for (int j = 0; j < adjC.cols(); j++)
+
225  for (int i = 0; i < adjC.rows(); i++)
+
226  adjC(i, j) = _variRefC[pos++]->adj_;
+
227 
+
228  adjA = -_alloc_ldlt->_ldlt.solve(adjC*_alloc->C_.transpose());
+
229 
+
230  for (int j = 0; j < adjA.cols(); j++)
+
231  for (int i = 0; i < adjA.rows(); i++)
+
232  _alloc_ldlt->_variA(i, j)->adj_ += adjA(i, j);
+
233  }
+
234  };
+
235  }
+
236 
+
244  template <int R1, int C1, int R2, int C2>
+
245  inline Eigen::Matrix<var, R1, C2>
+ +
247  const Eigen::Matrix<var, R2, C2> &b) {
+
248  Eigen::Matrix<var, R1, C2> res(b.rows(), b.cols());
+
249 
+
250  stan::math::check_multiplicable("mdivide_left_ldlt",
+
251  "A", A,
+
252  "b", b);
+
253 
+
254  mdivide_left_ldlt_vv_vari<R1, C1, R2, C2> *baseVari
+
255  = new mdivide_left_ldlt_vv_vari<R1, C1, R2, C2>(A, b);
+
256 
+
257  int pos = 0;
+
258  for (int j = 0; j < res.cols(); j++)
+
259  for (int i = 0; i < res.rows(); i++)
+
260  res(i, j).vi_ = baseVari->_variRefC[pos++];
+
261 
+
262  return res;
+
263  }
+
264 
+
272  template <int R1, int C1, int R2, int C2>
+
273  inline Eigen::Matrix<var, R1, C2>
+ +
275  const Eigen::Matrix<double, R2, C2> &b) {
+
276  Eigen::Matrix<var, R1, C2> res(b.rows(), b.cols());
+
277 
+
278  stan::math::check_multiplicable("mdivide_left_ldlt",
+
279  "A", A,
+
280  "b", b);
+
281 
+
282  mdivide_left_ldlt_vd_vari<R1, C1, R2, C2> *baseVari
+
283  = new mdivide_left_ldlt_vd_vari<R1, C1, R2, C2>(A, b);
+
284 
+
285  int pos = 0;
+
286  for (int j = 0; j < res.cols(); j++)
+
287  for (int i = 0; i < res.rows(); i++)
+
288  res(i, j).vi_ = baseVari->_variRefC[pos++];
+
289 
+
290  return res;
+
291  }
+
292 
+
300  template <int R1, int C1, int R2, int C2>
+
301  inline Eigen::Matrix<var, R1, C2>
+ +
303  const Eigen::Matrix<var, R2, C2> &b) {
+
304  Eigen::Matrix<var, R1, C2> res(b.rows(), b.cols());
+
305 
+
306  stan::math::check_multiplicable("mdivide_left_ldlt",
+
307  "A", A,
+
308  "b", b);
+
309 
+
310  mdivide_left_ldlt_dv_vari<R1, C1, R2, C2> *baseVari
+
311  = new mdivide_left_ldlt_dv_vari<R1, C1, R2, C2>(A, b);
+
312 
+
313  int pos = 0;
+
314  for (int j = 0; j < res.cols(); j++)
+
315  for (int i = 0; i < res.rows(); i++)
+
316  res(i, j).vi_ = baseVari->_variRefC[pos++];
+
317 
+
318  return res;
+
319  }
+
320 
+
321  }
+
322 }
+
323 #endif
+
int rows(const Eigen::Matrix< T, R, C > &m)
Return the number of rows in the specified matrix, vector, or row vector.
Definition: rows.hpp:20
+ + + +
int N_
+
mdivide_left_ldlt_alloc< R1, C1, R2, C2 > * _alloc
+
int M_
+ +
AutodiffStackStorage< chainable, chainable_alloc > ChainableStack
+
vari ** _variRefC
+
Eigen::Matrix< fvar< T2 >, R1, C2 > mdivide_left_ldlt(const stan::math::LDLT_factor< double, R1, C1 > &A, const Eigen::Matrix< fvar< T2 >, R2, C2 > &b)
Returns the solution of the system Ax=b given an LDLT_factor of A.
+
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+
boost::shared_ptr< Eigen::LDLT< Eigen::Matrix< double, R1, C1 > > > _ldltP
This share_ptr is used to prevent copying the LDLT factorizations for mdivide_left_ldlt(ldltA, b) when ldltA is a LDLT_factor<double>.
+ +
int cols(const Eigen::Matrix< T, R, C > &m)
Return the number of columns in the specified matrix, vector, or row vector.
Definition: cols.hpp:20
+ +
const LDLT_alloc< R1, C1 > * _alloc_ldlt
+
Eigen::Matrix< double, R2, C2 > C_
+
vari ** _variRefB
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2mdivide__left__spd_8hpp.html b/doc/api/html/rev_2mat_2fun_2mdivide__left__spd_8hpp.html new file mode 100644 index 00000000000..35b9e35e0cc --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2mdivide__left__spd_8hpp.html @@ -0,0 +1,254 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/mdivide_left_spd.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
mdivide_left_spd.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<int R1, int C1, int R2, int C2>
Eigen::Matrix< var, R1, C2 > stan::math::mdivide_left_spd (const Eigen::Matrix< var, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)
 
template<int R1, int C1, int R2, int C2>
Eigen::Matrix< var, R1, C2 > stan::math::mdivide_left_spd (const Eigen::Matrix< var, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)
 
template<int R1, int C1, int R2, int C2>
Eigen::Matrix< var, R1, C2 > stan::math::mdivide_left_spd (const Eigen::Matrix< double, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)
 
+

Variable Documentation

+ +
+
+ + + + +
mdivide_left_spd_alloc<R1, C1, R2, C2>* _alloc
+
+ +

Definition at line 33 of file mdivide_left_spd.hpp.

+ +
+
+ +
+
+ + + + +
Eigen::LLT< Eigen::Matrix<double, R1, C1> > _llt
+
+ +

Definition at line 21 of file mdivide_left_spd.hpp.

+ +
+
+ +
+
+ + + + +
vari** _variRefA
+
+ +

Definition at line 30 of file mdivide_left_spd.hpp.

+ +
+
+ +
+
+ + + + +
vari** _variRefB
+
+ +

Definition at line 31 of file mdivide_left_spd.hpp.

+ +
+
+ +
+
+ + + + +
vari** _variRefC
+
+ +

Definition at line 32 of file mdivide_left_spd.hpp.

+ +
+
+ +
+
+ + + + +
Eigen::Matrix<double, R2, C2> C_
+
+ +

Definition at line 22 of file mdivide_left_spd.hpp.

+ +
+
+ +
+
+ + + + +
int M_
+
+ +

Definition at line 28 of file mdivide_left_spd.hpp.

+ +
+
+ +
+
+ + + + +
int N_
+
+ +

Definition at line 29 of file mdivide_left_spd.hpp.

+ +
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2mdivide__left__spd_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2mdivide__left__spd_8hpp_source.html new file mode 100644 index 00000000000..146596f7336 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2mdivide__left__spd_8hpp_source.html @@ -0,0 +1,457 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/mdivide_left_spd.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
mdivide_left_spd.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_MDIVIDE_LEFT_SPD_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_MDIVIDE_LEFT_SPD_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ + + + + +
10 #include <vector>
+
11 
+
12 namespace stan {
+
13  namespace math {
+
14 
+
15  namespace {
+
16  template <int R1, int C1, int R2, int C2>
+
17  class mdivide_left_spd_alloc : public chainable_alloc {
+
18  public:
+
19  virtual ~mdivide_left_spd_alloc() {}
+
20 
+
21  Eigen::LLT< Eigen::Matrix<double, R1, C1> > _llt;
+
22  Eigen::Matrix<double, R2, C2> C_;
+
23  };
+
24 
+
25  template <int R1, int C1, int R2, int C2>
+
26  class mdivide_left_spd_vv_vari : public vari {
+
27  public:
+
28  int M_; // A.rows() = A.cols() = B.rows()
+
29  int N_; // B.cols()
+
30  vari** _variRefA;
+
31  vari** _variRefB;
+
32  vari** _variRefC;
+
33  mdivide_left_spd_alloc<R1, C1, R2, C2> *_alloc;
+
34 
+
35  mdivide_left_spd_vv_vari(const Eigen::Matrix<var, R1, C1> &A,
+
36  const Eigen::Matrix<var, R2, C2> &B)
+
37  : vari(0.0),
+
38  M_(A.rows()),
+
39  N_(B.cols()),
+
40  _variRefA(reinterpret_cast<vari**>
+
41  (stan::math::ChainableStack::memalloc_
+
42  .alloc(sizeof(vari*) * A.rows() * A.cols()))),
+
43  _variRefB(reinterpret_cast<vari**>
+
44  (stan::math::ChainableStack::memalloc_
+
45  .alloc(sizeof(vari*) * B.rows() * B.cols()))),
+
46  _variRefC(reinterpret_cast<vari**>
+
47  (stan::math::ChainableStack::memalloc_
+
48  .alloc(sizeof(vari*) * B.rows() * B.cols()))),
+
49  _alloc(new mdivide_left_spd_alloc<R1, C1, R2, C2>()) {
+
50  using Eigen::Matrix;
+
51  using Eigen::Map;
+
52 
+
53  Matrix<double, R1, C1> Ad(A.rows(), A.cols());
+
54 
+
55  size_t pos = 0;
+
56  for (size_type j = 0; j < M_; j++) {
+
57  for (size_type i = 0; i < M_; i++) {
+
58  _variRefA[pos] = A(i, j).vi_;
+
59  Ad(i, j) = A(i, j).val();
+
60  pos++;
+
61  }
+
62  }
+
63 
+
64  pos = 0;
+
65  _alloc->C_.resize(M_, N_);
+
66  for (size_type j = 0; j < N_; j++) {
+
67  for (size_type i = 0; i < M_; i++) {
+
68  _variRefB[pos] = B(i, j).vi_;
+
69  _alloc->C_(i, j) = B(i, j).val();
+
70  pos++;
+
71  }
+
72  }
+
73 
+
74  _alloc->_llt = Ad.llt();
+
75  _alloc->_llt.solveInPlace(_alloc->C_);
+
76 
+
77  pos = 0;
+
78  for (size_type j = 0; j < N_; j++) {
+
79  for (size_type i = 0; i < M_; i++) {
+
80  _variRefC[pos] = new vari(_alloc->C_(i, j), false);
+
81  pos++;
+
82  }
+
83  }
+
84  }
+
85 
+
86  virtual void chain() {
+
87  using Eigen::Matrix;
+
88  using Eigen::Map;
+
89  Eigen::Matrix<double, R1, C1> adjA(M_, M_);
+
90  Eigen::Matrix<double, R2, C2> adjB(M_, N_);
+
91 
+
92  size_t pos = 0;
+
93  for (size_type j = 0; j < N_; j++)
+
94  for (size_type i = 0; i < M_; i++)
+
95  adjB(i, j) = _variRefC[pos++]->adj_;
+
96 
+
97  _alloc->_llt.solveInPlace(adjB);
+
98  adjA.noalias() = -adjB * _alloc->C_.transpose();
+
99 
+
100  pos = 0;
+
101  for (size_type j = 0; j < M_; j++)
+
102  for (size_type i = 0; i < M_; i++)
+
103  _variRefA[pos++]->adj_ += adjA(i, j);
+
104 
+
105  pos = 0;
+
106  for (size_type j = 0; j < N_; j++)
+
107  for (size_type i = 0; i < M_; i++)
+
108  _variRefB[pos++]->adj_ += adjB(i, j);
+
109  }
+
110  };
+
111 
+
112  template <int R1, int C1, int R2, int C2>
+
113  class mdivide_left_spd_dv_vari : public vari {
+
114  public:
+
115  int M_; // A.rows() = A.cols() = B.rows()
+
116  int N_; // B.cols()
+
117  vari** _variRefB;
+
118  vari** _variRefC;
+
119  mdivide_left_spd_alloc<R1, C1, R2, C2> *_alloc;
+
120 
+
121  mdivide_left_spd_dv_vari(const Eigen::Matrix<double, R1, C1> &A,
+
122  const Eigen::Matrix<var, R2, C2> &B)
+
123  : vari(0.0),
+
124  M_(A.rows()),
+
125  N_(B.cols()),
+
126  _variRefB(reinterpret_cast<vari**>
+
127  (stan::math::ChainableStack::memalloc_
+
128  .alloc(sizeof(vari*) * B.rows() * B.cols()))),
+
129  _variRefC(reinterpret_cast<vari**>
+
130  (stan::math::ChainableStack::memalloc_
+
131  .alloc(sizeof(vari*) * B.rows() * B.cols()))),
+
132  _alloc(new mdivide_left_spd_alloc<R1, C1, R2, C2>()) {
+
133  using Eigen::Matrix;
+
134  using Eigen::Map;
+
135 
+
136  size_t pos = 0;
+
137  _alloc->C_.resize(M_, N_);
+
138  for (size_type j = 0; j < N_; j++) {
+
139  for (size_type i = 0; i < M_; i++) {
+
140  _variRefB[pos] = B(i, j).vi_;
+
141  _alloc->C_(i, j) = B(i, j).val();
+
142  pos++;
+
143  }
+
144  }
+
145 
+
146  _alloc->_llt = A.llt();
+
147  _alloc->_llt.solveInPlace(_alloc->C_);
+
148 
+
149  pos = 0;
+
150  for (size_type j = 0; j < N_; j++) {
+
151  for (size_type i = 0; i < M_; i++) {
+
152  _variRefC[pos] = new vari(_alloc->C_(i, j), false);
+
153  pos++;
+
154  }
+
155  }
+
156  }
+
157 
+
158  virtual void chain() {
+
159  using Eigen::Matrix;
+
160  using Eigen::Map;
+
161  Eigen::Matrix<double, R2, C2> adjB(M_, N_);
+
162 
+
163  size_t pos = 0;
+
164  for (size_type j = 0; j < adjB.cols(); j++)
+
165  for (size_type i = 0; i < adjB.rows(); i++)
+
166  adjB(i, j) = _variRefC[pos++]->adj_;
+
167 
+
168  _alloc->_llt.solveInPlace(adjB);
+
169 
+
170  pos = 0;
+
171  for (size_type j = 0; j < adjB.cols(); j++)
+
172  for (size_type i = 0; i < adjB.rows(); i++)
+
173  _variRefB[pos++]->adj_ += adjB(i, j);
+
174  }
+
175  };
+
176 
+
177  template <int R1, int C1, int R2, int C2>
+
178  class mdivide_left_spd_vd_vari : public vari {
+
179  public:
+
180  int M_; // A.rows() = A.cols() = B.rows()
+
181  int N_; // B.cols()
+
182  vari** _variRefA;
+
183  vari** _variRefC;
+
184  mdivide_left_spd_alloc<R1, C1, R2, C2> *_alloc;
+
185 
+
186  mdivide_left_spd_vd_vari(const Eigen::Matrix<var, R1, C1> &A,
+
187  const Eigen::Matrix<double, R2, C2> &B)
+
188  : vari(0.0),
+
189  M_(A.rows()),
+
190  N_(B.cols()),
+
191  _variRefA(reinterpret_cast<vari**>
+
192  (stan::math::ChainableStack::memalloc_
+
193  .alloc(sizeof(vari*) * A.rows() * A.cols()))),
+
194  _variRefC(reinterpret_cast<vari**>
+
195  (stan::math::ChainableStack::memalloc_
+
196  .alloc(sizeof(vari*) * B.rows() * B.cols()))),
+
197  _alloc(new mdivide_left_spd_alloc<R1, C1, R2, C2>()) {
+
198  using Eigen::Matrix;
+
199  using Eigen::Map;
+
200 
+
201  Matrix<double, R1, C1> Ad(A.rows(), A.cols());
+
202 
+
203  size_t pos = 0;
+
204  for (size_type j = 0; j < M_; j++) {
+
205  for (size_type i = 0; i < M_; i++) {
+
206  _variRefA[pos] = A(i, j).vi_;
+
207  Ad(i, j) = A(i, j).val();
+
208  pos++;
+
209  }
+
210  }
+
211 
+
212  _alloc->_llt = Ad.llt();
+
213  _alloc->C_ = _alloc->_llt.solve(B);
+
214 
+
215  pos = 0;
+
216  for (size_type j = 0; j < N_; j++) {
+
217  for (size_type i = 0; i < M_; i++) {
+
218  _variRefC[pos] = new vari(_alloc->C_(i, j), false);
+
219  pos++;
+
220  }
+
221  }
+
222  }
+
223 
+
224  virtual void chain() {
+
225  using Eigen::Matrix;
+
226  using Eigen::Map;
+
227  Eigen::Matrix<double, R1, C1> adjA(M_, M_);
+
228  Eigen::Matrix<double, R1, C2> adjC(M_, N_);
+
229 
+
230  size_t pos = 0;
+
231  for (size_type j = 0; j < adjC.cols(); j++)
+
232  for (size_type i = 0; i < adjC.rows(); i++)
+
233  adjC(i, j) = _variRefC[pos++]->adj_;
+
234 
+
235  adjA = -_alloc->_llt.solve(adjC*_alloc->C_.transpose());
+
236 
+
237  pos = 0;
+
238  for (size_type j = 0; j < adjA.cols(); j++)
+
239  for (size_type i = 0; i < adjA.rows(); i++)
+
240  _variRefA[pos++]->adj_ += adjA(i, j);
+
241  }
+
242  };
+
243  }
+
244 
+
245  template <int R1, int C1, int R2, int C2>
+
246  inline
+
247  Eigen::Matrix<var, R1, C2>
+
248  mdivide_left_spd(const Eigen::Matrix<var, R1, C1> &A,
+
249  const Eigen::Matrix<var, R2, C2> &b) {
+
250  Eigen::Matrix<var, R1, C2> res(b.rows(), b.cols());
+
251 
+
252  stan::math::check_square("mdivide_left_spd", "A", A);
+
253  stan::math::check_multiplicable("mdivide_left_spd",
+
254  "A", A,
+
255  "b", b);
+
256 
+
257  // NOTE: this is not a memory leak, this vari is used in the
+
258  // expression graph to evaluate the adjoint, but is not needed
+
259  // for the returned matrix. Memory will be cleaned up with the
+
260  // arena allocator.
+
261  mdivide_left_spd_vv_vari<R1, C1, R2, C2> *baseVari
+
262  = new mdivide_left_spd_vv_vari<R1, C1, R2, C2>(A, b);
+
263 
+
264  size_t pos = 0;
+
265  for (size_type j = 0; j < res.cols(); j++)
+
266  for (size_type i = 0; i < res.rows(); i++)
+
267  res(i, j).vi_ = baseVari->_variRefC[pos++];
+
268 
+
269  return res;
+
270  }
+
271 
+
272  template <int R1, int C1, int R2, int C2>
+
273  inline
+
274  Eigen::Matrix<var, R1, C2>
+
275  mdivide_left_spd(const Eigen::Matrix<var, R1, C1> &A,
+
276  const Eigen::Matrix<double, R2, C2> &b) {
+
277  Eigen::Matrix<var, R1, C2> res(b.rows(), b.cols());
+
278 
+
279  stan::math::check_square("mdivide_left_spd", "A", A);
+
280  stan::math::check_multiplicable("mdivide_left_spd",
+
281  "A", A,
+
282  "b", b);
+
283 
+
284  // NOTE: this is not a memory leak, this vari is used in the
+
285  // expression graph to evaluate the adjoint, but is not needed
+
286  // for the returned matrix. Memory will be cleaned up with the
+
287  // arena allocator.
+
288  mdivide_left_spd_vd_vari<R1, C1, R2, C2> *baseVari
+
289  = new mdivide_left_spd_vd_vari<R1, C1, R2, C2>(A, b);
+
290 
+
291  size_t pos = 0;
+
292  for (size_type j = 0; j < res.cols(); j++)
+
293  for (size_type i = 0; i < res.rows(); i++)
+
294  res(i, j).vi_ = baseVari->_variRefC[pos++];
+
295 
+
296  return res;
+
297  }
+
298 
+
299  template <int R1, int C1, int R2, int C2>
+
300  inline
+
301  Eigen::Matrix<var, R1, C2>
+
302  mdivide_left_spd(const Eigen::Matrix<double, R1, C1> &A,
+
303  const Eigen::Matrix<var, R2, C2> &b) {
+
304  Eigen::Matrix<var, R1, C2> res(b.rows(), b.cols());
+
305 
+
306  stan::math::check_square("mdivide_left_spd", "A", A);
+
307  stan::math::check_multiplicable("mdivide_left_spd",
+
308  "A", A,
+
309  "b", b);
+
310 
+
311  // NOTE: this is not a memory leak, this vari is used in the
+
312  // expression graph to evaluate the adjoint, but is not needed
+
313  // for the returned matrix. Memory will be cleaned up with the
+
314  // arena allocator.
+
315  mdivide_left_spd_dv_vari<R1, C1, R2, C2> *baseVari
+
316  = new mdivide_left_spd_dv_vari<R1, C1, R2, C2>(A, b);
+
317 
+
318  size_t pos = 0;
+
319  for (size_type j = 0; j < res.cols(); j++)
+
320  for (size_type i = 0; i < res.rows(); i++)
+
321  res(i, j).vi_ = baseVari->_variRefC[pos++];
+
322 
+
323  return res;
+
324  }
+
325 
+
326  }
+
327 }
+
328 #endif
+
int rows(const Eigen::Matrix< T, R, C > &m)
Return the number of rows in the specified matrix, vector, or row vector.
Definition: rows.hpp:20
+ +
int N_
+
vari ** _variRefB
+ +
Eigen::LLT< Eigen::Matrix< double, R1, C1 > > _llt
+
Eigen::Matrix< typename boost::math::tools::promote_args< T1, T2 >::type, R1, C2 > mdivide_left_spd(const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &b)
Returns the solution of the system Ax=b where A is symmetric positive definite.
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
AutodiffStackStorage< chainable, chainable_alloc > ChainableStack
+ +
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+
int M_
+
mdivide_left_spd_alloc< R1, C1, R2, C2 > * _alloc
+
int cols(const Eigen::Matrix< T, R, C > &m)
Return the number of columns in the specified matrix, vector, or row vector.
Definition: cols.hpp:20
+ +
vari ** _variRefC
+
vari ** _variRefA
+
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+
Eigen::Matrix< double, R2, C2 > C_
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2mdivide__left__tri_8hpp.html b/doc/api/html/rev_2mat_2fun_2mdivide__left__tri_8hpp.html new file mode 100644 index 00000000000..ae3acaa144c --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2mdivide__left__tri_8hpp.html @@ -0,0 +1,240 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/mdivide_left_tri.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
mdivide_left_tri.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<int TriView, int R1, int C1, int R2, int C2>
Eigen::Matrix< var, R1, C2 > stan::math::mdivide_left_tri (const Eigen::Matrix< var, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)
 
template<int TriView, int R1, int C1, int R2, int C2>
Eigen::Matrix< var, R1, C2 > stan::math::mdivide_left_tri (const Eigen::Matrix< double, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)
 
template<int TriView, int R1, int C1, int R2, int C2>
Eigen::Matrix< var, R1, C2 > stan::math::mdivide_left_tri (const Eigen::Matrix< var, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)
 
+

Variable Documentation

+ +
+
+ + + + +
vari** _variRefA
+
+ +

Definition at line 23 of file mdivide_left_tri.hpp.

+ +
+
+ +
+
+ + + + +
vari** _variRefB
+
+ +

Definition at line 24 of file mdivide_left_tri.hpp.

+ +
+
+ +
+
+ + + + +
vari** _variRefC
+
+ +

Definition at line 25 of file mdivide_left_tri.hpp.

+ +
+
+ +
+
+ + + + +
double* A_
+
+ +

Definition at line 21 of file mdivide_left_tri.hpp.

+ +
+
+ +
+
+ + + + +
double* C_
+
+ +

Definition at line 22 of file mdivide_left_tri.hpp.

+ +
+
+ +
+
+ + + + +
int M_
+
+ +

Definition at line 19 of file mdivide_left_tri.hpp.

+ +
+
+ +
+
+ + + + +
int N_
+
+ +

Definition at line 20 of file mdivide_left_tri.hpp.

+ +
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2mdivide__left__tri_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2mdivide__left__tri_8hpp_source.html new file mode 100644 index 00000000000..fc2b497bee1 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2mdivide__left__tri_8hpp_source.html @@ -0,0 +1,511 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/mdivide_left_tri.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
mdivide_left_tri.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_MDIVIDE_LEFT_TRI_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_MDIVIDE_LEFT_TRI_HPP
+
3 
+ + + + +
8 #include <stan/math/rev/core.hpp>
+ +
10 #include <vector>
+
11 
+
12 namespace stan {
+
13  namespace math {
+
14 
+
15  namespace {
+
16  template <int TriView, int R1, int C1, int R2, int C2>
+
17  class mdivide_left_tri_vv_vari : public vari {
+
18  public:
+
19  int M_; // A.rows() = A.cols() = B.rows()
+
20  int N_; // B.cols()
+
21  double* A_;
+
22  double* C_;
+
23  vari** _variRefA;
+
24  vari** _variRefB;
+
25  vari** _variRefC;
+
26 
+
27  mdivide_left_tri_vv_vari(const Eigen::Matrix<var, R1, C1> &A,
+
28  const Eigen::Matrix<var, R2, C2> &B)
+
29  : vari(0.0),
+
30  M_(A.rows()),
+
31  N_(B.cols()),
+
32  A_(reinterpret_cast<double*>
+
33  (stan::math::ChainableStack::memalloc_
+
34  .alloc(sizeof(double) * A.rows() * A.cols()))),
+
35  C_(reinterpret_cast<double*>
+
36  (stan::math::ChainableStack::memalloc_
+
37  .alloc(sizeof(double) * B.rows() * B.cols()))),
+
38  _variRefA(reinterpret_cast<vari**>
+
39  (stan::math::ChainableStack::memalloc_
+
40  .alloc(sizeof(vari*) * A.rows() * (A.rows() + 1) / 2))),
+
41  _variRefB(reinterpret_cast<vari**>
+
42  (stan::math::ChainableStack::memalloc_
+
43  .alloc(sizeof(vari*) * B.rows() * B.cols()))),
+
44  _variRefC(reinterpret_cast<vari**>
+
45  (stan::math::ChainableStack::memalloc_
+
46  .alloc(sizeof(vari*) * B.rows() * B.cols()))) {
+
47  using Eigen::Matrix;
+
48  using Eigen::Map;
+
49 
+
50  size_t pos = 0;
+
51  if (TriView == Eigen::Lower) {
+
52  for (size_type j = 0; j < M_; j++)
+
53  for (size_type i = j; i < M_; i++)
+
54  _variRefA[pos++] = A(i, j).vi_;
+
55  } else if (TriView == Eigen::Upper) {
+
56  for (size_type j = 0; j < M_; j++)
+
57  for (size_type i = 0; i < j+1; i++)
+
58  _variRefA[pos++] = A(i, j).vi_;
+
59  }
+
60 
+
61  pos = 0;
+
62  for (size_type j = 0; j < M_; j++) {
+
63  for (size_type i = 0; i < M_; i++) {
+
64  A_[pos++] = A(i, j).val();
+
65  }
+
66  }
+
67 
+
68  pos = 0;
+
69  for (size_type j = 0; j < N_; j++) {
+
70  for (size_type i = 0; i < M_; i++) {
+
71  _variRefB[pos] = B(i, j).vi_;
+
72  C_[pos++] = B(i, j).val();
+
73  }
+
74  }
+
75 
+
76  Matrix<double, R1, C2> C(M_, N_);
+
77  C = Map<Matrix<double, R1, C2> >(C_, M_, N_);
+
78 
+
79  C = Map<Matrix<double, R1, C1> >(A_, M_, M_)
+
80  .template triangularView<TriView>().solve(C);
+
81 
+
82  pos = 0;
+
83  for (size_type j = 0; j < N_; j++) {
+
84  for (size_type i = 0; i < M_; i++) {
+
85  C_[pos] = C(i, j);
+
86  _variRefC[pos] = new vari(C_[pos], false);
+
87  pos++;
+
88  }
+
89  }
+
90  }
+
91 
+
92  virtual void chain() {
+
93  using Eigen::Matrix;
+
94  using Eigen::Map;
+
95  Matrix<double, R1, C1> adjA(M_, M_);
+
96  Matrix<double, R2, C2> adjB(M_, N_);
+
97  Matrix<double, R1, C2> adjC(M_, N_);
+
98 
+
99  size_t pos = 0;
+
100  for (size_type j = 0; j < adjC.cols(); j++)
+
101  for (size_type i = 0; i < adjC.rows(); i++)
+
102  adjC(i, j) = _variRefC[pos++]->adj_;
+
103 
+
104  adjB = Map<Matrix<double, R1, C1> >(A_, M_, M_)
+
105  .template triangularView<TriView>().transpose().solve(adjC);
+
106  adjA.noalias() = -adjB
+
107  * Map<Matrix<double, R1, C2> >(C_, M_, N_).transpose();
+
108 
+
109  pos = 0;
+
110  if (TriView == Eigen::Lower) {
+
111  for (size_type j = 0; j < adjA.cols(); j++)
+
112  for (size_type i = j; i < adjA.rows(); i++)
+
113  _variRefA[pos++]->adj_ += adjA(i, j);
+
114  } else if (TriView == Eigen::Upper) {
+
115  for (size_type j = 0; j < adjA.cols(); j++)
+
116  for (size_type i = 0; i < j+1; i++)
+
117  _variRefA[pos++]->adj_ += adjA(i, j);
+
118  }
+
119 
+
120  pos = 0;
+
121  for (size_type j = 0; j < adjB.cols(); j++)
+
122  for (size_type i = 0; i < adjB.rows(); i++)
+
123  _variRefB[pos++]->adj_ += adjB(i, j);
+
124  }
+
125  };
+
126 
+
127  template <int TriView, int R1, int C1, int R2, int C2>
+
128  class mdivide_left_tri_dv_vari : public vari {
+
129  public:
+
130  int M_; // A.rows() = A.cols() = B.rows()
+
131  int N_; // B.cols()
+
132  double* A_;
+
133  double* C_;
+
134  vari** _variRefB;
+
135  vari** _variRefC;
+
136 
+
137  mdivide_left_tri_dv_vari(const Eigen::Matrix<double, R1, C1> &A,
+
138  const Eigen::Matrix<var, R2, C2> &B)
+
139  : vari(0.0),
+
140  M_(A.rows()),
+
141  N_(B.cols()),
+
142  A_(reinterpret_cast<double*>
+
143  (stan::math::ChainableStack::memalloc_
+
144  .alloc(sizeof(double) * A.rows() * A.cols()))),
+
145  C_(reinterpret_cast<double*>
+
146  (stan::math::ChainableStack::memalloc_
+
147  .alloc(sizeof(double) * B.rows() * B.cols()))),
+
148  _variRefB(reinterpret_cast<vari**>
+
149  (stan::math::ChainableStack::memalloc_
+
150  .alloc(sizeof(vari*) * B.rows() * B.cols()))),
+
151  _variRefC(reinterpret_cast<vari**>
+
152  (stan::math::ChainableStack::memalloc_
+
153  .alloc(sizeof(vari*) * B.rows() * B.cols()))) {
+
154  using Eigen::Matrix;
+
155  using Eigen::Map;
+
156 
+
157  size_t pos = 0;
+
158  for (size_type j = 0; j < M_; j++) {
+
159  for (size_type i = 0; i < M_; i++) {
+
160  A_[pos++] = A(i, j);
+
161  }
+
162  }
+
163 
+
164  pos = 0;
+
165  for (size_type j = 0; j < N_; j++) {
+
166  for (size_type i = 0; i < M_; i++) {
+
167  _variRefB[pos] = B(i, j).vi_;
+
168  C_[pos++] = B(i, j).val();
+
169  }
+
170  }
+
171 
+
172  Matrix<double, R1, C2> C(M_, N_);
+
173  C = Map<Matrix<double, R1, C2> >(C_, M_, N_);
+
174 
+
175  C = Map<Matrix<double, R1, C1> >(A_, M_, M_)
+
176  .template triangularView<TriView>().solve(C);
+
177 
+
178  pos = 0;
+
179  for (size_type j = 0; j < N_; j++) {
+
180  for (size_type i = 0; i < M_; i++) {
+
181  C_[pos] = C(i, j);
+
182  _variRefC[pos] = new vari(C_[pos], false);
+
183  pos++;
+
184  }
+
185  }
+
186  }
+
187 
+
188  virtual void chain() {
+
189  using Eigen::Matrix;
+
190  using Eigen::Map;
+
191  Matrix<double, R2, C2> adjB(M_, N_);
+
192  Matrix<double, R1, C2> adjC(M_, N_);
+
193 
+
194  size_t pos = 0;
+
195  for (size_type j = 0; j < adjC.cols(); j++)
+
196  for (size_type i = 0; i < adjC.rows(); i++)
+
197  adjC(i, j) = _variRefC[pos++]->adj_;
+
198 
+
199  adjB = Map<Matrix<double, R1, C1> >(A_, M_, M_)
+
200  .template triangularView<TriView>().transpose().solve(adjC);
+
201 
+
202  pos = 0;
+
203  for (size_type j = 0; j < adjB.cols(); j++)
+
204  for (size_type i = 0; i < adjB.rows(); i++)
+
205  _variRefB[pos++]->adj_ += adjB(i, j);
+
206  }
+
207  };
+
208 
+
209  template <int TriView, int R1, int C1, int R2, int C2>
+
210  class mdivide_left_tri_vd_vari : public vari {
+
211  public:
+
212  int M_; // A.rows() = A.cols() = B.rows()
+
213  int N_; // B.cols()
+
214  double* A_;
+
215  double* C_;
+
216  vari** _variRefA;
+
217  vari** _variRefC;
+
218 
+
219  mdivide_left_tri_vd_vari(const Eigen::Matrix<var, R1, C1> &A,
+
220  const Eigen::Matrix<double, R2, C2> &B)
+
221  : vari(0.0),
+
222  M_(A.rows()),
+
223  N_(B.cols()),
+
224  A_(reinterpret_cast<double*>
+
225  (stan::math::ChainableStack::memalloc_
+
226  .alloc(sizeof(double) * A.rows() * A.cols()))),
+
227  C_(reinterpret_cast<double*>
+
228  (stan::math::ChainableStack::memalloc_
+
229  .alloc(sizeof(double) * B.rows() * B.cols()))),
+
230  _variRefA(reinterpret_cast<vari**>
+
231  (stan::math::ChainableStack::memalloc_
+
232  .alloc(sizeof(vari*) * A.rows() * (A.rows() + 1) / 2))),
+
233  _variRefC(reinterpret_cast<vari**>
+
234  (stan::math::ChainableStack::memalloc_
+
235  .alloc(sizeof(vari*) * B.rows() * B.cols()))) {
+
236  using Eigen::Matrix;
+
237  using Eigen::Map;
+
238 
+
239  size_t pos = 0;
+
240  if (TriView == Eigen::Lower) {
+
241  for (size_type j = 0; j < M_; j++)
+
242  for (size_type i = j; i < M_; i++)
+
243  _variRefA[pos++] = A(i, j).vi_;
+
244  } else if (TriView == Eigen::Upper) {
+
245  for (size_type j = 0; j < M_; j++)
+
246  for (size_type i = 0; i < j+1; i++)
+
247  _variRefA[pos++] = A(i, j).vi_;
+
248  }
+
249 
+
250  pos = 0;
+
251  for (size_type j = 0; j < M_; j++) {
+
252  for (size_type i = 0; i < M_; i++) {
+
253  A_[pos++] = A(i, j).val();
+
254  }
+
255  }
+
256 
+
257  Matrix<double, R1, C2> C(M_, N_);
+
258  C = Map<Matrix<double, R1, C1> >(A_, M_, M_)
+
259  .template triangularView<TriView>().solve(B);
+
260 
+
261  pos = 0;
+
262  for (size_type j = 0; j < N_; j++) {
+
263  for (size_type i = 0; i < M_; i++) {
+
264  C_[pos] = C(i, j);
+
265  _variRefC[pos] = new vari(C_[pos], false);
+
266  pos++;
+
267  }
+
268  }
+
269  }
+
270 
+
271  virtual void chain() {
+
272  using Eigen::Matrix;
+
273  using Eigen::Map;
+
274  Matrix<double, R1, C1> adjA(M_, M_);
+
275  Matrix<double, R1, C2> adjC(M_, N_);
+
276 
+
277  size_t pos = 0;
+
278  for (size_type j = 0; j < adjC.cols(); j++)
+
279  for (size_type i = 0; i < adjC.rows(); i++)
+
280  adjC(i, j) = _variRefC[pos++]->adj_;
+
281 
+
282  adjA.noalias() = -Map<Matrix<double, R1, C1> >(A_, M_, M_)
+
283  .template triangularView<TriView>()
+
284  .transpose().solve(adjC * Map<Matrix<double, R1, C2> >(C_, M_, N_)
+
285  .transpose());
+
286 
+
287  pos = 0;
+
288  if (TriView == Eigen::Lower) {
+
289  for (size_type j = 0; j < adjA.cols(); j++)
+
290  for (size_type i = j; i < adjA.rows(); i++)
+
291  _variRefA[pos++]->adj_ += adjA(i, j);
+
292  } else if (TriView == Eigen::Upper) {
+
293  for (size_type j = 0; j < adjA.cols(); j++)
+
294  for (size_type i = 0; i < j+1; i++)
+
295  _variRefA[pos++]->adj_ += adjA(i, j);
+
296  }
+
297  }
+
298  };
+
299  }
+
300 
+
301  template <int TriView, int R1, int C1, int R2, int C2>
+
302  inline
+
303  Eigen::Matrix<var, R1, C2>
+
304  mdivide_left_tri(const Eigen::Matrix<var, R1, C1> &A,
+
305  const Eigen::Matrix<var, R2, C2> &b) {
+
306  Eigen::Matrix<var, R1, C2> res(b.rows(), b.cols());
+
307 
+
308  stan::math::check_square("mdivide_left_tri", "A", A);
+
309  stan::math::check_multiplicable("mdivide_left_tri",
+
310  "A", A,
+
311  "b", b);
+
312 
+
313  // NOTE: this is not a memory leak, this vari is used in the
+
314  // expression graph to evaluate the adjoint, but is not needed
+
315  // for the returned matrix. Memory will be cleaned up with the
+
316  // arena allocator.
+
317  mdivide_left_tri_vv_vari<TriView, R1, C1, R2, C2> *baseVari
+
318  = new mdivide_left_tri_vv_vari<TriView, R1, C1, R2, C2>(A, b);
+
319 
+
320  size_t pos = 0;
+
321  for (size_type j = 0; j < res.cols(); j++)
+
322  for (size_type i = 0; i < res.rows(); i++)
+
323  res(i, j).vi_ = baseVari->_variRefC[pos++];
+
324 
+
325  return res;
+
326  }
+
327  template <int TriView, int R1, int C1, int R2, int C2>
+
328  inline
+
329  Eigen::Matrix<var, R1, C2>
+
330  mdivide_left_tri(const Eigen::Matrix<double, R1, C1> &A,
+
331  const Eigen::Matrix<var, R2, C2> &b) {
+
332  Eigen::Matrix<var, R1, C2> res(b.rows(), b.cols());
+
333 
+
334  stan::math::check_square("mdivide_left_tri", "A", A);
+
335  stan::math::check_multiplicable("mdivide_left_tri",
+
336  "A", A,
+
337  "b", b);
+
338 
+
339  // NOTE: this is not a memory leak, this vari is used in the
+
340  // expression graph to evaluate the adjoint, but is not needed
+
341  // for the returned matrix. Memory will be cleaned up with the
+
342  // arena allocator.
+
343  mdivide_left_tri_dv_vari<TriView, R1, C1, R2, C2> *baseVari
+
344  = new mdivide_left_tri_dv_vari<TriView, R1, C1, R2, C2>(A, b);
+
345 
+
346  size_t pos = 0;
+
347  for (size_type j = 0; j < res.cols(); j++)
+
348  for (size_type i = 0; i < res.rows(); i++)
+
349  res(i, j).vi_ = baseVari->_variRefC[pos++];
+
350 
+
351  return res;
+
352  }
+
353  template <int TriView, int R1, int C1, int R2, int C2>
+
354  inline
+
355  Eigen::Matrix<var, R1, C2>
+
356  mdivide_left_tri(const Eigen::Matrix<var, R1, C1> &A,
+
357  const Eigen::Matrix<double, R2, C2> &b) {
+
358  Eigen::Matrix<var, R1, C2> res(b.rows(), b.cols());
+
359 
+
360  stan::math::check_square("mdivide_left_tri", "A", A);
+
361  stan::math::check_multiplicable("mdivide_left_tri",
+
362  "A", A,
+
363  "b", b);
+
364 
+
365  // NOTE: this is not a memory leak, this vari is used in the
+
366  // expression graph to evaluate the adjoint, but is not needed
+
367  // for the returned matrix. Memory will be cleaned up with the
+
368  // arena allocator.
+
369  mdivide_left_tri_vd_vari<TriView, R1, C1, R2, C2> *baseVari
+
370  = new mdivide_left_tri_vd_vari<TriView, R1, C1, R2, C2>(A, b);
+
371 
+
372  size_t pos = 0;
+
373  for (size_type j = 0; j < res.cols(); j++)
+
374  for (size_type i = 0; i < res.rows(); i++)
+
375  res(i, j).vi_ = baseVari->_variRefC[pos++];
+
376 
+
377  return res;
+
378  }
+
379 
+
380  }
+
381 }
+
382 #endif
+
int rows(const Eigen::Matrix< T, R, C > &m)
Return the number of rows in the specified matrix, vector, or row vector.
Definition: rows.hpp:20
+ + +
int N_
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
double * C_
+
Eigen::Matrix< typename boost::math::tools::promote_args< T1, T2 >::type, R1, C2 > mdivide_left_tri(const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &b)
Returns the solution of the system Ax=b when A is triangular.
+
AutodiffStackStorage< chainable, chainable_alloc > ChainableStack
+ +
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+
vari ** _variRefC
+
int cols(const Eigen::Matrix< T, R, C > &m)
Return the number of columns in the specified matrix, vector, or row vector.
Definition: cols.hpp:20
+ +
double * A_
+
vari ** _variRefA
+
Eigen::Matrix< T, C, R > transpose(const Eigen::Matrix< T, R, C > &m)
Definition: transpose.hpp:12
+
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+
int M_
+
vari ** _variRefB
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2multiply_8hpp.html b/doc/api/html/rev_2mat_2fun_2multiply_8hpp.html new file mode 100644 index 00000000000..b91e707fe45 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2multiply_8hpp.html @@ -0,0 +1,170 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/multiply.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
multiply.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <stan/math/rev/mat/fun/Eigen_NumTraits.hpp>
+#include <stan/math/rev/mat/fun/typedefs.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/fun/typedefs.hpp>
+#include <stan/math/prim/mat/err/check_multiplicable.hpp>
+#include <stan/math/rev/mat/fun/to_var.hpp>
+#include <stan/math/rev/mat/fun/dot_product.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits.hpp>
+#include <boost/math/tools/promotion.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T1 , typename T2 >
boost::enable_if_c
+< (boost::is_scalar< T1 >
+::value||boost::is_same< T1,
+var >::value)&&(boost::is_scalar
+< T2 >::value||boost::is_same
+< T2, var >::value), typename
+boost::math::tools::promote_args
+< T1, T2 >::type >::type 
stan::math::multiply (const T1 &v, const T2 &c)
 Return the product of two scalars. More...
 
template<typename T1 , typename T2 , int R2, int C2>
Eigen::Matrix< var, R2, C2 > stan::math::multiply (const T1 &c, const Eigen::Matrix< T2, R2, C2 > &m)
 Return the product of scalar and matrix. More...
 
template<typename T1 , int R1, int C1, typename T2 >
Eigen::Matrix< var, R1, C1 > stan::math::multiply (const Eigen::Matrix< T1, R1, C1 > &m, const T2 &c)
 Return the product of scalar and matrix. More...
 
template<typename T1 , int R1, int C1, typename T2 , int R2, int C2>
boost::enable_if_c
+< boost::is_same< T1, var >
+::value||boost::is_same< T2,
+var >::value, Eigen::Matrix
+< var, R1, C2 > >::type 
stan::math::multiply (const Eigen::Matrix< T1, R1, C1 > &m1, const Eigen::Matrix< T2, R2, C2 > &m2)
 Return the product of the specified matrices. More...
 
template<typename T1 , int C1, typename T2 , int R2>
boost::enable_if_c
+< boost::is_same< T1, var >
+::value||boost::is_same< T2,
+var >::value, var >::type 
stan::math::multiply (const Eigen::Matrix< T1, 1, C1 > &rv, const Eigen::Matrix< T2, R2, 1 > &v)
 Return the scalar product of the specified row vector and specified column vector. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2multiply_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2multiply_8hpp_source.html new file mode 100644 index 00000000000..e8fe3266561 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2multiply_8hpp_source.html @@ -0,0 +1,223 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/multiply.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
multiply.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_MULTIPLY_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_MULTIPLY_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ + + + + + + +
12 #include <boost/utility/enable_if.hpp>
+
13 #include <boost/type_traits.hpp>
+
14 #include <boost/math/tools/promotion.hpp>
+
15 
+
16 namespace stan {
+
17  namespace math {
+
18 
+
25  template <typename T1, typename T2>
+
26  inline typename
+
27  boost::enable_if_c<
+
28  (boost::is_scalar<T1>::value || boost::is_same<T1, var>::value)
+
29  && (boost::is_scalar<T2>::value || boost::is_same<T2, var>::value),
+
30  typename boost::math::tools::promote_args<T1, T2>::type>::type
+
31  multiply(const T1& v, const T2& c) {
+
32  return v * c;
+
33  }
+
34 
+
41  template<typename T1, typename T2, int R2, int C2>
+
42  inline Eigen::Matrix<var, R2, C2>
+
43  multiply(const T1& c, const Eigen::Matrix<T2, R2, C2>& m) {
+
44  // FIXME: pull out to eliminate overpromotion of one side
+
45  // move to matrix.hpp w. promotion?
+
46  return to_var(m) * to_var(c);
+
47  }
+
48 
+
55  template<typename T1, int R1, int C1, typename T2>
+
56  inline Eigen::Matrix<var, R1, C1>
+
57  multiply(const Eigen::Matrix<T1, R1, C1>& m, const T2& c) {
+
58  return to_var(m) * to_var(c);
+
59  }
+
60 
+
71  template<typename T1, int R1, int C1, typename T2, int R2, int C2>
+
72  inline typename
+
73  boost::enable_if_c< boost::is_same<T1, var>::value ||
+
74  boost::is_same<T2, var>::value,
+
75  Eigen::Matrix<var, R1, C2> >::type
+
76  multiply(const Eigen::Matrix<T1, R1, C1>& m1,
+
77  const Eigen::Matrix<T2, R2, C2>& m2) {
+ +
79  "m1", m1,
+
80  "m2", m2);
+
81  Eigen::Matrix<var, R1, C2> result(m1.rows(), m2.cols());
+
82  for (int i = 0; i < m1.rows(); i++) {
+
83  typename Eigen::Matrix<T1, R1, C1>::ConstRowXpr crow(m1.row(i));
+
84  for (int j = 0; j < m2.cols(); j++) {
+
85  typename Eigen::Matrix<T2, R2, C2>::ConstColXpr ccol(m2.col(j));
+
86  if (j == 0) {
+
87  if (i == 0) {
+
88  result(i, j) = var(new dot_product_vari<T1, T2>(crow, ccol));
+
89  } else {
+
90  dot_product_vari<T1, T2> *v2
+
91  = static_cast<dot_product_vari<T1, T2>*>(result(0, j).vi_);
+
92  result(i, j)
+
93  = var(new dot_product_vari<T1, T2>(crow, ccol, NULL, v2));
+
94  }
+
95  } else {
+
96  if (i == 0) {
+
97  dot_product_vari<T1, T2> *v1
+
98  = static_cast<dot_product_vari<T1, T2>*>(result(i, 0).vi_);
+
99  result(i, j)
+
100  = var(new dot_product_vari<T1, T2>(crow, ccol, v1, NULL));
+
101  } else /* if (i != 0 && j != 0) */ {
+
102  dot_product_vari<T1, T2> *v1
+
103  = static_cast<dot_product_vari<T1, T2>*>(result(i, 0).vi_);
+
104  dot_product_vari<T1, T2> *v2
+
105  = static_cast<dot_product_vari<T1, T2>*>(result(0, j).vi_);
+
106  result(i, j)
+
107  = var(new dot_product_vari<T1, T2>(crow, ccol, v1, v2));
+
108  }
+
109  }
+
110  }
+
111  }
+
112  return result;
+
113  }
+
114 
+
124  template <typename T1, int C1, typename T2, int R2>
+
125  inline typename
+
126  boost::enable_if_c< boost::is_same<T1, var>::value ||
+
127  boost::is_same<T2, var>::value, var >::type
+
128  multiply(const Eigen::Matrix<T1, 1, C1>& rv,
+
129  const Eigen::Matrix<T2, R2, 1>& v) {
+
130  if (rv.size() != v.size())
+
131  throw std::domain_error("row vector and vector must be same length "
+
132  "in multiply");
+
133  return dot_product(rv, v);
+
134  }
+
135 
+
136  }
+
137 }
+
138 #endif
+ + + +
Eigen::Matrix< fvar< T >, R1, C1 > multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m, const fvar< T > &c)
Definition: multiply.hpp:20
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
var to_var(const double &x)
Converts argument to an automatic differentiation variable.
Definition: to_var.hpp:21
+ + +
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+
fvar< T > dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
Definition: dot_product.hpp:20
+ +
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2multiply__lower__tri__self__transpose_8hpp.html b/doc/api/html/rev_2mat_2fun_2multiply__lower__tri__self__transpose_8hpp.html new file mode 100644 index 00000000000..385024677a9 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2multiply__lower__tri__self__transpose_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/multiply_lower_tri_self_transpose.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
multiply_lower_tri_self_transpose.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + +

+Functions

matrix_v stan::math::multiply_lower_tri_self_transpose (const matrix_v &L)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2multiply__lower__tri__self__transpose_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2multiply__lower__tri__self__transpose_8hpp_source.html new file mode 100644 index 00000000000..4593f2befb8 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2multiply__lower__tri__self__transpose_8hpp_source.html @@ -0,0 +1,179 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/multiply_lower_tri_self_transpose.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
multiply_lower_tri_self_transpose.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_MULTIPLY_LOWER_TRI_SELF_TRANSPOSE_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_MULTIPLY_LOWER_TRI_SELF_TRANSPOSE_HPP
+
3 
+ + + +
7 #include <stan/math/rev/core.hpp>
+ + + + +
12 #include <boost/math/tools/promotion.hpp>
+
13 #include <vector>
+
14 
+
15 namespace stan {
+
16  namespace math {
+
17 
+
18  inline matrix_v
+ +
20  // stan::math::check_square("multiply_lower_tri_self_transpose",
+
21  // L, "L", (double*)0);
+
22  int K = L.rows();
+
23  int J = L.cols();
+
24  matrix_v LLt(K, K);
+
25  if (K == 0) return LLt;
+
26  // if (K == 1) {
+
27  // LLt(0, 0) = L(0, 0) * L(0, 0);
+
28  // return LLt;
+
29  // }
+
30  int Knz;
+
31  if (K >= J)
+
32  Knz = (K-J)*J + (J * (J + 1)) / 2;
+
33  else // if (K < J)
+
34  Knz = (K * (K + 1)) / 2;
+
35  vari** vs
+
36  = reinterpret_cast<vari**>(ChainableStack::memalloc_
+
37  .alloc(Knz * sizeof(vari*)));
+
38  int pos = 0;
+
39  for (int m = 0; m < K; ++m)
+
40  for (int n = 0; n < ((J < (m+1)) ? J : (m+1)); ++n) {
+
41  vs[pos++] = L(m, n).vi_;
+
42  }
+
43  for (int m = 0, mpos=0; m < K; ++m, mpos += (J < m) ? J : m) {
+
44  LLt(m, m) = var(new dot_self_vari(vs + mpos, (J < (m+1)) ? J : (m+1)));
+
45  for (int n = 0, npos = 0; n < m; ++n, npos += (J < n) ? J : n) {
+
46  LLt(m, n)
+
47  = LLt(n, m)
+
48  = var(new dot_product_vari<var, var>(vs + mpos, vs + npos,
+
49  (J < (n+1))?J:(n+1)));
+
50  }
+
51  }
+
52  return LLt;
+
53  }
+
54 
+
55  }
+
56 }
+
57 #endif
+ + +
The variable implementation base class.
Definition: vari.hpp:28
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+ +
Eigen::Matrix< var, Eigen::Dynamic, Eigen::Dynamic > matrix_v
The type of a matrix holding stan::math::var values.
Definition: typedefs.hpp:21
+
Eigen::Matrix< fvar< T >, R, R > multiply_lower_tri_self_transpose(const Eigen::Matrix< fvar< T >, R, C > &m)
+ + + + +
void * alloc(size_t len)
Return a newly allocated block of memory of the appropriate size managed by the stack allocator...
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2quad__form_8hpp.html b/doc/api/html/rev_2mat_2fun_2quad__form_8hpp.html new file mode 100644 index 00000000000..155da1c9925 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2quad__form_8hpp.html @@ -0,0 +1,220 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/quad_form.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
quad_form.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<typename TA , int RA, int CA, typename TB , int RB, int CB>
boost::enable_if_c
+< boost::is_same< TA, var >
+::value||boost::is_same< TB,
+var >::value, Eigen::Matrix
+< var, CB, CB > >::type 
stan::math::quad_form (const Eigen::Matrix< TA, RA, CA > &A, const Eigen::Matrix< TB, RB, CB > &B)
 
template<typename TA , int RA, int CA, typename TB , int RB>
boost::enable_if_c
+< boost::is_same< TA, var >
+::value||boost::is_same< TB,
+var >::value, var >::type 
stan::math::quad_form (const Eigen::Matrix< TA, RA, CA > &A, const Eigen::Matrix< TB, RB, 1 > &B)
 
+

Variable Documentation

+ +
+
+ + + + +
quad_form_vari_alloc<TA, RA, CA, TB, RB, CB>* _impl
+
+ +

Definition at line 115 of file quad_form.hpp.

+ +
+
+ +
+
+ + + + +
bool _sym
+
+ +

Definition at line 48 of file quad_form.hpp.

+ +
+
+ +
+
+ + + + +
Eigen::Matrix<TA, RA, CA> A_
+
+ +

Definition at line 45 of file quad_form.hpp.

+ +
+
+ +
+
+ + + + +
Eigen::Matrix<TB, RB, CB> B_
+
+ +

Definition at line 46 of file quad_form.hpp.

+ +
+
+ +
+
+ + + + +
Eigen::Matrix<var, CB, CB> C_
+
+ +

Definition at line 47 of file quad_form.hpp.

+ +
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2quad__form_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2quad__form_8hpp_source.html new file mode 100644 index 00000000000..dfdf943eedb --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2quad__form_8hpp_source.html @@ -0,0 +1,284 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/quad_form.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
quad_form.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_QUAD_FORM_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_QUAD_FORM_HPP
+
3 
+
4 #include <boost/utility/enable_if.hpp>
+
5 #include <boost/type_traits.hpp>
+
6 #include <stan/math/rev/core.hpp>
+ + + + + + + + +
15 
+
16 namespace stan {
+
17  namespace math {
+
18  namespace {
+
19  template <typename TA, int RA, int CA, typename TB, int RB, int CB>
+
20  class quad_form_vari_alloc : public chainable_alloc {
+
21  private:
+
22  inline void compute(const Eigen::Matrix<double, RA, CA>& A,
+
23  const Eigen::Matrix<double, RB, CB>& B) {
+
24  Eigen::Matrix<double, CB, CB> Cd(B.transpose()*A*B);
+
25  for (int j = 0; j < C_.cols(); j++) {
+
26  for (int i = 0; i < C_.rows(); i++) {
+
27  if (_sym) {
+
28  C_(i, j) = var(new vari(0.5*(Cd(i, j) + Cd(j, i)), false));
+
29  } else {
+
30  C_(i, j) = var(new vari(Cd(i, j), false));
+
31  }
+
32  }
+
33  }
+
34  }
+
35 
+
36  public:
+
37  quad_form_vari_alloc(const Eigen::Matrix<TA, RA, CA>& A,
+
38  const Eigen::Matrix<TB, RB, CB>& B,
+
39  bool symmetric = false)
+
40  : A_(A), B_(B), C_(B_.cols(), B_.cols()), _sym(symmetric) {
+ +
42  compute(value_of(A), value_of(B));
+
43  }
+
44 
+
45  Eigen::Matrix<TA, RA, CA> A_;
+
46  Eigen::Matrix<TB, RB, CB> B_;
+
47  Eigen::Matrix<var, CB, CB> C_;
+
48  bool _sym;
+
49  };
+
50 
+
51  template <typename TA, int RA, int CA, typename TB, int RB, int CB>
+
52  class quad_form_vari : public vari {
+
53  protected:
+
54  inline void chainA(Eigen::Matrix<double, RA, CA>& A,
+
55  const Eigen::Matrix<double, RB, CB>& Bd,
+
56  const Eigen::Matrix<double, CB, CB>& adjC) {}
+
57  inline void chainB(Eigen::Matrix<double, RB, CB>& B,
+
58  const Eigen::Matrix<double, RA, CA>& Ad,
+
59  const Eigen::Matrix<double, RB, CB>& Bd,
+
60  const Eigen::Matrix<double, CB, CB>& adjC) {}
+
61 
+
62  inline void chainA(Eigen::Matrix<var, RA, CA>& A,
+
63  const Eigen::Matrix<double, RB, CB>& Bd,
+
64  const Eigen::Matrix<double, CB, CB>& adjC) {
+
65  Eigen::Matrix<double, RA, CA> adjA(Bd*adjC*Bd.transpose());
+
66  for (int j = 0; j < A.cols(); j++) {
+
67  for (int i = 0; i < A.rows(); i++) {
+
68  A(i, j).vi_->adj_ += adjA(i, j);
+
69  }
+
70  }
+
71  }
+
72  inline void chainB(Eigen::Matrix<var, RB, CB>& B,
+
73  const Eigen::Matrix<double, RA, CA>& Ad,
+
74  const Eigen::Matrix<double, RB, CB>& Bd,
+
75  const Eigen::Matrix<double, CB, CB>& adjC) {
+
76  Eigen::Matrix<double, RA, CA> adjB(Ad * Bd * adjC.transpose()
+
77  + Ad.transpose()*Bd*adjC);
+
78  for (int j = 0; j < B.cols(); j++)
+
79  for (int i = 0; i < B.rows(); i++)
+
80  B(i, j).vi_->adj_ += adjB(i, j);
+
81  }
+
82 
+
83  inline void chainAB(Eigen::Matrix<TA, RA, CA>& A,
+
84  Eigen::Matrix<TB, RB, CB>& B,
+
85  const Eigen::Matrix<double, RA, CA>& Ad,
+
86  const Eigen::Matrix<double, RB, CB>& Bd,
+
87  const Eigen::Matrix<double, CB, CB>& adjC) {
+
88  chainA(A, Bd, adjC);
+
89  chainB(B, Ad, Bd, adjC);
+
90  }
+
91 
+
92  public:
+
93  quad_form_vari(const Eigen::Matrix<TA, RA, CA>& A,
+
94  const Eigen::Matrix<TB, RB, CB>& B,
+
95  bool symmetric = false)
+
96  : vari(0.0) {
+
97  _impl
+
98  = new quad_form_vari_alloc<TA, RA, CA, TB, RB, CB>(A, B, symmetric);
+
99  }
+
100 
+
101  virtual void chain() {
+
102  using stan::math::value_of;
+
103  Eigen::Matrix<double, CB, CB> adjC(_impl->C_.rows(),
+
104  _impl->C_.cols());
+
105 
+
106  for (int j = 0; j < _impl->C_.cols(); j++)
+
107  for (int i = 0; i < _impl->C_.rows(); i++)
+
108  adjC(i, j) = _impl->C_(i, j).vi_->adj_;
+
109 
+
110  chainAB(_impl->A_, _impl->B_,
+
111  value_of(_impl->A_), value_of(_impl->B_),
+
112  adjC);
+
113  }
+
114 
+
115  quad_form_vari_alloc<TA, RA, CA, TB, RB, CB> *_impl;
+
116  };
+
117  }
+
118 
+
119  template <typename TA, int RA, int CA, typename TB, int RB, int CB>
+
120  inline typename
+
121  boost::enable_if_c< boost::is_same<TA, var>::value ||
+
122  boost::is_same<TB, var>::value,
+
123  Eigen::Matrix<var, CB, CB> >::type
+
124  quad_form(const Eigen::Matrix<TA, RA, CA>& A,
+
125  const Eigen::Matrix<TB, RB, CB>& B) {
+
126  stan::math::check_square("quad_form", "A", A);
+ +
128  "A", A,
+
129  "B", B);
+
130 
+
131  quad_form_vari<TA, RA, CA, TB, RB, CB> *baseVari
+
132  = new quad_form_vari<TA, RA, CA, TB, RB, CB>(A, B);
+
133 
+
134  return baseVari->_impl->C_;
+
135  }
+
136  template <typename TA, int RA, int CA, typename TB, int RB>
+
137  inline typename
+
138  boost::enable_if_c< boost::is_same<TA, var>::value ||
+
139  boost::is_same<TB, var>::value,
+
140  var >::type
+
141  quad_form(const Eigen::Matrix<TA, RA, CA>& A,
+
142  const Eigen::Matrix<TB, RB, 1>& B) {
+
143  stan::math::check_square("quad_form", "A", A);
+ +
145  "A", A,
+
146  "B", B);
+
147 
+
148  quad_form_vari<TA, RA, CA, TB, RB, 1> *baseVari
+
149  = new quad_form_vari<TA, RA, CA, TB, RB, 1>(A, B);
+
150 
+
151  return baseVari->_impl->C_(0, 0);
+
152  }
+
153 
+
154  }
+
155 }
+
156 
+
157 #endif
+
bool _sym
Definition: quad_form.hpp:48
+ + +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
Eigen::Matrix< TB, RB, CB > B_
Definition: quad_form.hpp:46
+ +
Eigen::Matrix< TA, RA, CA > A_
Definition: quad_form.hpp:45
+ +
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+
int cols(const Eigen::Matrix< T, R, C > &m)
Return the number of columns in the specified matrix, vector, or row vector.
Definition: cols.hpp:20
+ + +
Eigen::Matrix< var, CB, CB > C_
Definition: quad_form.hpp:47
+ +
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+
Eigen::Matrix< T, CB, CB > quad_form(const Eigen::Matrix< T, RA, CA > &A, const Eigen::Matrix< T, RB, CB > &B)
Compute B^T A B.
Definition: quad_form.hpp:21
+
quad_form_vari_alloc< TA, RA, CA, TB, RB, CB > * _impl
Definition: quad_form.hpp:115
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2quad__form__sym_8hpp.html b/doc/api/html/rev_2mat_2fun_2quad__form__sym_8hpp.html new file mode 100644 index 00000000000..54975e2ef7d --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2quad__form__sym_8hpp.html @@ -0,0 +1,150 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/quad_form_sym.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
quad_form_sym.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<typename TA , int RA, int CA, typename TB , int RB, int CB>
boost::enable_if_c
+< boost::is_same< TA, var >
+::value||boost::is_same< TB,
+var >::value, Eigen::Matrix
+< var, CB, CB > >::type 
stan::math::quad_form_sym (const Eigen::Matrix< TA, RA, CA > &A, const Eigen::Matrix< TB, RB, CB > &B)
 
template<typename TA , int RA, int CA, typename TB , int RB>
boost::enable_if_c
+< boost::is_same< TA, var >
+::value||boost::is_same< TB,
+var >::value, var >::type 
stan::math::quad_form_sym (const Eigen::Matrix< TA, RA, CA > &A, const Eigen::Matrix< TB, RB, 1 > &B)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2quad__form__sym_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2quad__form__sym_8hpp_source.html new file mode 100644 index 00000000000..9d076b17211 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2quad__form__sym_8hpp_source.html @@ -0,0 +1,181 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/quad_form_sym.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
quad_form_sym.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_QUAD_FORM_SYM_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_QUAD_FORM_SYM_HPP
+
3 
+
4 #include <boost/utility/enable_if.hpp>
+
5 #include <boost/type_traits.hpp>
+
6 #include <stan/math/rev/core.hpp>
+ + + + + + + + + +
16 
+
17 namespace stan {
+
18  namespace math {
+
19 
+
20  template <typename TA, int RA, int CA, typename TB, int RB, int CB>
+
21  inline typename
+
22  boost::enable_if_c< boost::is_same<TA, var>::value ||
+
23  boost::is_same<TB, var>::value,
+
24  Eigen::Matrix<var, CB, CB> >::type
+
25  quad_form_sym(const Eigen::Matrix<TA, RA, CA>& A,
+
26  const Eigen::Matrix<TB, RB, CB>& B) {
+
27  stan::math::check_square("quad_form", "A", A);
+
28  stan::math::check_symmetric("quad_form_sym", "A", A);
+
29  stan::math::check_multiplicable("quad_form_sym",
+
30  "A", A,
+
31  "B", B);
+
32 
+
33  quad_form_vari<TA, RA, CA, TB, RB, CB> *baseVari
+
34  = new quad_form_vari<TA, RA, CA, TB, RB, CB>(A, B, true);
+
35 
+
36  return baseVari->_impl->C_;
+
37  }
+
38  template <typename TA, int RA, int CA, typename TB, int RB>
+
39  inline typename
+
40  boost::enable_if_c< boost::is_same<TA, var>::value ||
+
41  boost::is_same<TB, var>::value,
+
42  var >::type
+
43  quad_form_sym(const Eigen::Matrix<TA, RA, CA>& A,
+
44  const Eigen::Matrix<TB, RB, 1>& B) {
+
45  stan::math::check_square("quad_form", "A", A);
+
46  stan::math::check_symmetric("quad_form_sym", "A", A);
+
47  stan::math::check_multiplicable("quad_form_sym",
+
48  "A", A,
+
49  "B", B);
+
50 
+
51  quad_form_vari<TA, RA, CA, TB, RB, 1> *baseVari
+
52  = new quad_form_vari<TA, RA, CA, TB, RB, 1>(A, B, true);
+
53 
+
54  return baseVari->_impl->C_(0, 0);
+
55  }
+
56  }
+
57 }
+
58 
+
59 #endif
+ + +
bool check_symmetric(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)
Return true if the specified matrix is symmetric.
+ + +
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+ + +
Eigen::Matrix< fvar< T >, CB, CB > quad_form_sym(const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< double, RB, CB > &B)
+ + +
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2rows__dot__product_8hpp.html b/doc/api/html/rev_2mat_2fun_2rows__dot__product_8hpp.html new file mode 100644 index 00000000000..66ba37f1c57 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2rows__dot__product_8hpp.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/rows_dot_product.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
rows_dot_product.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T1 , int R1, int C1, typename T2 , int R2, int C2>
boost::enable_if_c
+< boost::is_same< T1, var >
+::value||boost::is_same< T2,
+var >::value, Eigen::Matrix
+< var, R1, 1 > >::type 
stan::math::rows_dot_product (const Eigen::Matrix< T1, R1, C1 > &v1, const Eigen::Matrix< T2, R2, C2 > &v2)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2rows__dot__product_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2rows__dot__product_8hpp_source.html new file mode 100644 index 00000000000..b0979fb97e4 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2rows__dot__product_8hpp_source.html @@ -0,0 +1,159 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/rows_dot_product.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
rows_dot_product.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_ROWS_DOT_PRODUCT_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_ROWS_DOT_PRODUCT_HPP
+
3 
+ + + + + +
9 #include <stan/math/rev/core.hpp>
+ + + +
13 #include <boost/utility/enable_if.hpp>
+
14 #include <boost/type_traits.hpp>
+
15 #include <vector>
+
16 
+
17 namespace stan {
+
18  namespace math {
+
19 
+
20  template<typename T1, int R1, int C1, typename T2, int R2, int C2>
+
21  inline
+
22  typename boost::enable_if_c<boost::is_same<T1, var>::value ||
+
23  boost::is_same<T2, var>::value,
+
24  Eigen::Matrix<var, R1, 1> >::type
+
25  rows_dot_product(const Eigen::Matrix<T1, R1, C1>& v1,
+
26  const Eigen::Matrix<T2, R2, C2>& v2) {
+ +
28  "v1", v1,
+
29  "v2", v2);
+
30  Eigen::Matrix<var, R1, 1> ret(v1.rows(), 1);
+
31  for (size_type j = 0; j < v1.rows(); ++j) {
+
32  ret(j) = var(new dot_product_vari<T1, T2>(v1.row(j), v2.row(j)));
+
33  }
+
34  return ret;
+
35  }
+
36  }
+
37 }
+
38 #endif
+ + +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+ +
bool check_matching_sizes(const char *function, const char *name1, const T_y1 &y1, const char *name2, const T_y2 &y2)
Return true if two structures at the same size.
+ + + +
Eigen::Matrix< fvar< T >, R1, 1 > rows_dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2sd_8hpp.html b/doc/api/html/rev_2mat_2fun_2sd_8hpp.html new file mode 100644 index 00000000000..f7943a48ec9 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2sd_8hpp.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/sd.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
sd.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/fun/mean.hpp>
+#include <stan/math/rev/core.hpp>
+#include <stan/math/prim/scal/err/check_nonzero_size.hpp>
+#include <boost/math/tools/promotion.hpp>
+#include <cmath>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

var stan::math::sd (const std::vector< var > &v)
 Return the sample standard deviation of the specified standard vector. More...
 
template<int R, int C>
var stan::math::sd (const Eigen::Matrix< var, R, C > &m)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2sd_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2sd_8hpp_source.html new file mode 100644 index 00000000000..c8b3238a533 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2sd_8hpp_source.html @@ -0,0 +1,207 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/sd.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
sd.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_SD_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_SD_HPP
+
3 
+ + +
6 #include <stan/math/rev/core.hpp>
+ +
8 #include <boost/math/tools/promotion.hpp>
+
9 #include <cmath>
+
10 #include <vector>
+
11 
+
12 namespace stan {
+
13 
+
14  namespace math {
+
15 
+
16  namespace { // anonymous
+
17 
+
18  // if x.size() = N, and x[i] = x[j] =
+
19  // then lim sd(x) -> 0 [ d/dx[n] sd(x) ] = sqrt(N) / N
+
20 
+
21  var calc_sd(size_t size,
+
22  const var* dtrs) {
+
23  using std::sqrt;
+
24  vari** varis
+
25  = reinterpret_cast<vari**>(ChainableStack::memalloc_
+
26  .alloc(size * sizeof(vari*)));
+
27  for (size_t i = 0; i < size; ++i)
+
28  varis[i] = dtrs[i].vi_;
+
29  double sum = 0.0;
+
30  for (size_t i = 0; i < size; ++i)
+
31  sum += dtrs[i].vi_->val_;
+
32  double mean = sum / size;
+
33  double sum_of_squares = 0;
+
34  for (size_t i = 0; i < size; ++i) {
+
35  double diff = dtrs[i].vi_->val_ - mean;
+
36  sum_of_squares += diff * diff;
+
37  }
+
38  double variance = sum_of_squares / (size - 1);
+
39  double sd = sqrt(variance);
+
40  double* partials
+
41  = reinterpret_cast<double*>(ChainableStack::memalloc_
+
42  .alloc(size * sizeof(double)));
+
43  if (sum_of_squares < 1e-20) {
+
44  double grad_limit = 1 / std::sqrt(static_cast<double>(size));
+
45  for (size_t i = 0; i < size; ++i)
+
46  partials[i] = grad_limit;
+
47  } else {
+
48  double multiplier = 1 / (sd * (size - 1));
+
49  for (size_t i = 0; i < size; ++i)
+
50  partials[i] = multiplier * (dtrs[i].vi_->val_ - mean);
+
51  }
+
52  return var(new stored_gradient_vari(sd, size,
+
53  varis, partials));
+
54  }
+
55 
+
56  }
+
57 
+
65  var sd(const std::vector<var>& v) {
+
66  stan::math::check_nonzero_size("sd", "v", v);
+
67  if (v.size() == 1) return 0;
+
68  return calc_sd(v.size(), &v[0]);
+
69  }
+
70 
+
71  /*
+
72  * Return the sample standard deviation of the specified vector,
+
73  * row vector, or matrix. Raise domain error if size is not
+
74  * greater than zero.
+
75  *
+
76  * @tparam R number of rows
+
77  * @tparam C number of columns
+
78  * @param[in] m input matrix
+
79  * @return sample standard deviation of specified matrix
+
80  */
+
81  template <int R, int C>
+
82  var sd(const Eigen::Matrix<var, R, C>& m) {
+
83  stan::math::check_nonzero_size("sd", "m", m);
+
84  if (m.size() == 1) return 0;
+
85  return calc_sd(m.size(), &m(0));
+
86  }
+
87 
+
88  }
+
89 }
+
90 
+
91 #endif
+
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+ +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
bool check_nonzero_size(const char *function, const char *name, const T_y &y)
Return true if the specified matrix/vector is of non-zero size.
+
boost::math::tools::promote_args< T >::type sd(const std::vector< T > &v)
Returns the unbiased sample standard deviation of the coefficients in the specified column vector...
Definition: sd.hpp:22
+
boost::math::tools::promote_args< T >::type variance(const std::vector< T > &v)
Returns the sample variance (divide by length - 1) of the coefficients in the specified standard vect...
Definition: variance.hpp:24
+ +
boost::math::tools::promote_args< T >::type mean(const std::vector< T > &v)
Returns the sample mean (i.e., average) of the coefficients in the specified standard vector...
Definition: mean.hpp:23
+ +
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+ +
void * alloc(size_t len)
Return a newly allocated block of memory of the appropriate size managed by the stack allocator...
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2softmax_8hpp.html b/doc/api/html/rev_2mat_2fun_2softmax_8hpp.html new file mode 100644 index 00000000000..605789be4bf --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2softmax_8hpp.html @@ -0,0 +1,191 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/softmax.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
softmax.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

Eigen::Matrix< var,
+Eigen::Dynamic, 1 > 
stan::math::softmax (const Eigen::Matrix< var, Eigen::Dynamic, 1 > &alpha)
 Return the softmax of the specified Eigen vector. More...
 
+

Variable Documentation

+ +
+
+ + + + +
vari** alpha_
+
+ +

Definition at line 16 of file softmax.hpp.

+ +
+
+ +
+
+ + + + +
const int idx_
+
+ +

Definition at line 19 of file softmax.hpp.

+ +
+
+ +
+
+ + + + +
const int size_
+
+ +

Definition at line 18 of file softmax.hpp.

+ +
+
+ +
+
+ + + + +
const double* softmax_alpha_
+
+ +

Definition at line 17 of file softmax.hpp.

+ +
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2softmax_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2softmax_8hpp_source.html new file mode 100644 index 00000000000..df58f89776f --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2softmax_8hpp_source.html @@ -0,0 +1,211 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/softmax.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
softmax.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_SOFTMAX_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_SOFTMAX_HPP
+
3 
+ + +
6 #include <stan/math/rev/core.hpp>
+ +
8 #include <vector>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
13  namespace {
+
14  class softmax_elt_vari : public vari {
+
15  private:
+
16  vari** alpha_;
+
17  const double* softmax_alpha_;
+
18  const int size_; // array sizes
+
19  const int idx_; // in in softmax output
+
20 
+
21  public:
+
22  softmax_elt_vari(double val,
+
23  vari** alpha,
+
24  const double* softmax_alpha,
+
25  int size,
+
26  int idx)
+
27  : vari(val),
+
28  alpha_(alpha),
+
29  softmax_alpha_(softmax_alpha),
+
30  size_(size),
+
31  idx_(idx) {
+
32  }
+
33  void chain() {
+
34  for (int m = 0; m < size_; ++m) {
+
35  if (m == idx_) {
+
36  alpha_[m]->adj_
+
37  += adj_ * softmax_alpha_[idx_] * (1 - softmax_alpha_[m]);
+
38  } else {
+
39  alpha_[m]->adj_
+
40  -= adj_ * softmax_alpha_[idx_] * softmax_alpha_[m];
+
41  }
+
42  }
+
43  }
+
44  };
+
45  }
+
46 
+
47 
+
58  inline Eigen::Matrix<var, Eigen::Dynamic, 1>
+
59  softmax(const Eigen::Matrix<var, Eigen::Dynamic, 1>& alpha) {
+
60  using Eigen::Matrix;
+
61  using Eigen::Dynamic;
+
62 
+
63  stan::math::check_nonzero_size("softmax", "alpha", alpha);
+
64 
+
65  vari** alpha_vi_array
+
66  = reinterpret_cast<vari**>(ChainableStack::memalloc_
+
67  .alloc(sizeof(vari*) * alpha.size()));
+
68  for (int i = 0; i < alpha.size(); ++i)
+
69  alpha_vi_array[i] = alpha(i).vi_;
+
70 
+
71  Matrix<double, Dynamic, 1> alpha_d(alpha.size());
+
72  for (int i = 0; i < alpha_d.size(); ++i)
+
73  alpha_d(i) = alpha(i).val();
+
74 
+
75  Matrix<double, Dynamic, 1> softmax_alpha_d
+
76  = stan::math::softmax(alpha_d);
+
77 
+
78  double* softmax_alpha_d_array
+
79  = reinterpret_cast<double*>(ChainableStack::memalloc_
+
80  .alloc(sizeof(double) * alpha_d.size()));
+
81  for (int i = 0; i < alpha_d.size(); ++i)
+
82  softmax_alpha_d_array[i] = softmax_alpha_d(i);
+
83 
+
84  Matrix<var, Dynamic, 1> softmax_alpha(alpha.size());
+
85  for (int k = 0; k < softmax_alpha.size(); ++k)
+
86  softmax_alpha(k) = var(new softmax_elt_vari(softmax_alpha_d[k],
+
87  alpha_vi_array,
+
88  softmax_alpha_d_array,
+
89  alpha.size(),
+
90  k));
+
91  return softmax_alpha;
+
92  }
+
93 
+
94 
+
95  }
+
96 }
+
97 
+
98 #endif
+
const int size_
Definition: softmax.hpp:18
+ +
Eigen::Matrix< fvar< T >, Eigen::Dynamic, 1 > softmax(const Eigen::Matrix< fvar< T >, Eigen::Dynamic, 1 > &alpha)
Definition: softmax.hpp:14
+ +
The variable implementation base class.
Definition: vari.hpp:28
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
bool check_nonzero_size(const char *function, const char *name, const T_y &y)
Return true if the specified matrix/vector is of non-zero size.
+ +
const double * softmax_alpha_
Definition: softmax.hpp:17
+
const int idx_
Definition: softmax.hpp:19
+ +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
vari ** alpha_
Definition: softmax.hpp:16
+ +
void * alloc(size_t len)
Return a newly allocated block of memory of the appropriate size managed by the stack allocator...
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2sort__asc_8hpp.html b/doc/api/html/rev_2mat_2fun_2sort__asc_8hpp.html new file mode 100644 index 00000000000..22aec4f1f15 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2sort__asc_8hpp.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/sort_asc.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
sort_asc.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <algorithm>
+#include <functional>
+#include <valarray>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

std::vector< var > stan::math::sort_asc (std::vector< var > xs)
 Return the specified standard vector in ascending order with gradients kept. More...
 
template<int R, int C>
Eigen::Matrix< var, R, C > stan::math::sort_asc (Eigen::Matrix< var, R, C > xs)
 Return the specified eigen vector in ascending order with gradients kept. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2sort__asc_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2sort__asc_8hpp_source.html new file mode 100644 index 00000000000..ee83f0c331e --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2sort__asc_8hpp_source.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/sort_asc.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
sort_asc.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_SORT_ASC_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_SORT_ASC_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ +
6 #include <algorithm> // std::sort
+
7 #include <functional> // std::greater
+
8 #include <valarray>
+
9 #include <vector>
+
10 
+
11 namespace stan {
+
12  namespace math {
+
13 
+
21  inline std::vector<var> sort_asc(std::vector<var> xs) {
+
22  std::sort(xs.begin(), xs.end());
+
23  return xs;
+
24  }
+
25 
+
33  template <int R, int C>
+
34  inline typename Eigen::Matrix<var, R, C>
+
35  sort_asc(Eigen::Matrix<var, R, C> xs) {
+
36  std::sort(xs.data(), xs.data()+xs.size());
+
37  return xs;
+
38  }
+
39 
+
40  }
+
41 }
+
42 #endif
+ + +
std::vector< fvar< T > > sort_asc(std::vector< fvar< T > > xs)
Definition: sort_asc.hpp:17
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2sort__desc_8hpp.html b/doc/api/html/rev_2mat_2fun_2sort__desc_8hpp.html new file mode 100644 index 00000000000..c59ddf9ee45 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2sort__desc_8hpp.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/sort_desc.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
sort_desc.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <algorithm>
+#include <functional>
+#include <valarray>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

std::vector< var > stan::math::sort_desc (std::vector< var > xs)
 Return the specified standard vector in descending order with gradients kept. More...
 
template<int R, int C>
Eigen::Matrix< var, R, C > stan::math::sort_desc (Eigen::Matrix< var, R, C > xs)
 Return the specified eigen vector in descending order with gradients kept. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2sort__desc_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2sort__desc_8hpp_source.html new file mode 100644 index 00000000000..9cbd92d69f4 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2sort__desc_8hpp_source.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/sort_desc.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
sort_desc.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_SORT_DESC_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_SORT_DESC_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ +
6 #include <algorithm> // std::sort
+
7 #include <functional> // std::greater
+
8 #include <valarray>
+
9 #include <vector>
+
10 
+
11 namespace stan {
+
12  namespace math {
+
13 
+
21  inline std::vector<var> sort_desc(std::vector<var> xs) {
+
22  std::sort(xs.begin(), xs.end(), std::greater<var>());
+
23  return xs;
+
24  }
+
25 
+
33  template <int R, int C>
+
34  inline typename Eigen::Matrix<var, R, C>
+
35  sort_desc(Eigen::Matrix<var, R, C> xs) {
+
36  std::sort(xs.data(), xs.data()+xs.size(), std::greater<var>());
+
37  return xs;
+
38  }
+
39 
+
40  }
+
41 }
+
42 #endif
+ +
std::vector< fvar< T > > sort_desc(std::vector< fvar< T > > xs)
Definition: sort_desc.hpp:17
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2squared__distance_8hpp.html b/doc/api/html/rev_2mat_2fun_2squared__distance_8hpp.html new file mode 100644 index 00000000000..60f4676b2fc --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2squared__distance_8hpp.html @@ -0,0 +1,188 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/squared_distance.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
squared_distance.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<int R1, int C1, int R2, int C2>
var stan::math::squared_distance (const Eigen::Matrix< var, R1, C1 > &v1, const Eigen::Matrix< var, R2, C2 > &v2)
 
template<int R1, int C1, int R2, int C2>
var stan::math::squared_distance (const Eigen::Matrix< var, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)
 
template<int R1, int C1, int R2, int C2>
var stan::math::squared_distance (const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< var, R2, C2 > &v2)
 
+

Variable Documentation

+ +
+
+ + + + +
size_t length_
+
+ +

Definition at line 26 of file squared_distance.hpp.

+ +
+
+ +
+
+ + + + +
vari** v1_
+
+ +

Definition at line 24 of file squared_distance.hpp.

+ +
+
+ +
+
+ + + + +
double* v2_
+
+ +

Definition at line 25 of file squared_distance.hpp.

+ +
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2squared__distance_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2squared__distance_8hpp_source.html new file mode 100644 index 00000000000..4c650a10c5d --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2squared__distance_8hpp_source.html @@ -0,0 +1,272 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/squared_distance.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
squared_distance.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_SQUARED_DISTANCE_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_SQUARED_DISTANCE_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ + + + + + + + + +
14 #include <vector>
+
15 
+
16 namespace stan {
+
17 
+
18  namespace math {
+
19 
+
20  namespace {
+
21 
+
22  class squared_distance_vv_vari : public vari {
+
23  protected:
+
24  vari** v1_;
+
25  vari** v2_;
+
26  size_t length_;
+
27 
+
28  template <int R1, int C1, int R2, int C2>
+
29  inline static double
+
30  var_squared_distance(const Eigen::Matrix<var, R1, C1> &v1,
+
31  const Eigen::Matrix<var, R2, C2> &v2) {
+
32  using Eigen::Matrix;
+ +
34  typedef typename index_type<Matrix<var, R1, R2> >::type idx_t;
+
35  double result = 0;
+
36  for (idx_t i = 0; i < v1.size(); i++) {
+
37  double diff = v1(i).vi_->val_ - v2(i).vi_->val_;
+
38  result += diff*diff;
+
39  }
+
40  return result;
+
41  }
+
42 
+
43  public:
+
44  template<int R1, int C1, int R2, int C2>
+
45  squared_distance_vv_vari(const Eigen::Matrix<var, R1, C1> &v1,
+
46  const Eigen::Matrix<var, R2, C2> &v2)
+
47  : vari(var_squared_distance(v1, v2)), length_(v1.size()) {
+
48  v1_ = reinterpret_cast<vari**>(ChainableStack::memalloc_
+
49  .alloc(length_*sizeof(vari*)));
+
50  for (size_t i = 0; i < length_; i++)
+
51  v1_[i] = v1(i).vi_;
+
52 
+
53  v2_ = reinterpret_cast<vari**>(ChainableStack::memalloc_
+
54  .alloc(length_*sizeof(vari*)));
+
55  for (size_t i = 0; i < length_; i++)
+
56  v2_[i] = v2(i).vi_;
+
57  }
+
58  virtual void chain() {
+
59  for (size_t i = 0; i < length_; i++) {
+
60  double di = 2 * adj_ * (v1_[i]->val_ - v2_[i]->val_);
+
61  v1_[i]->adj_ += di;
+
62  v2_[i]->adj_ -= di;
+
63  }
+
64  }
+
65  };
+
66  class squared_distance_vd_vari : public vari {
+
67  protected:
+
68  vari** v1_;
+
69  double* v2_;
+
70  size_t length_;
+
71 
+
72  template<int R1, int C1, int R2, int C2>
+
73  inline static double
+
74  var_squared_distance(const Eigen::Matrix<var, R1, C1> &v1,
+
75  const Eigen::Matrix<double, R2, C2> &v2) {
+
76  using Eigen::Matrix;
+ +
78  typedef typename index_type<Matrix<double, R1, C1> >::type idx_t;
+
79 
+
80  double result = 0;
+
81  for (idx_t i = 0; i < v1.size(); i++) {
+
82  double diff = v1(i).vi_->val_ - v2(i);
+
83  result += diff*diff;
+
84  }
+
85  return result;
+
86  }
+
87 
+
88  public:
+
89  template<int R1, int C1, int R2, int C2>
+
90  squared_distance_vd_vari(const Eigen::Matrix<var, R1, C1> &v1,
+
91  const Eigen::Matrix<double, R2, C2> &v2)
+
92  : vari(var_squared_distance(v1, v2)), length_(v1.size()) {
+
93  v1_ = reinterpret_cast<vari**>(ChainableStack::memalloc_
+
94  .alloc(length_*sizeof(vari*)));
+
95  for (size_t i = 0; i < length_; i++)
+
96  v1_[i] = v1(i).vi_;
+
97 
+
98  v2_ = reinterpret_cast<double*>(ChainableStack::memalloc_
+
99  .alloc(length_*sizeof(double)));
+
100  for (size_t i = 0; i < length_; i++)
+
101  v2_[i] = v2(i);
+
102  }
+
103  virtual void chain() {
+
104  for (size_t i = 0; i < length_; i++) {
+
105  v1_[i]->adj_ += 2 * adj_ * (v1_[i]->val_ - v2_[i]);
+
106  }
+
107  }
+
108  };
+
109  }
+
110 
+
111  template<int R1, int C1, int R2, int C2>
+
112  inline var squared_distance(const Eigen::Matrix<var, R1, C1>& v1,
+
113  const Eigen::Matrix<var, R2, C2>& v2) {
+
114  stan::math::check_vector("squared_distance", "v1", v1);
+
115  stan::math::check_vector("squared_distance", "v2", v2);
+
116  stan::math::check_matching_sizes("squared_distance",
+
117  "v1", v1,
+
118  "v2", v2);
+
119  return var(new squared_distance_vv_vari(v1, v2));
+
120  }
+
121  template<int R1, int C1, int R2, int C2>
+
122  inline var squared_distance(const Eigen::Matrix<var, R1, C1>& v1,
+
123  const Eigen::Matrix<double, R2, C2>& v2) {
+
124  stan::math::check_vector("squared_distance", "v1", v1);
+
125  stan::math::check_vector("squared_distance", "v2", v2);
+
126  stan::math::check_matching_sizes("squared_distance",
+
127  "v1", v1,
+
128  "v2", v2);
+
129  return var(new squared_distance_vd_vari(v1, v2));
+
130  }
+
131  template<int R1, int C1, int R2, int C2>
+
132  inline var squared_distance(const Eigen::Matrix<double, R1, C1>& v1,
+
133  const Eigen::Matrix<var, R2, C2>& v2) {
+
134  stan::math::check_vector("squared_distance", "v1", v1);
+
135  stan::math::check_vector("squared_distance", "v2", v2);
+
136  stan::math::check_matching_sizes("squared_distance",
+
137  "v1", v1,
+
138  "v2", v2);
+
139  return var(new squared_distance_vd_vari(v2, v1));
+
140  }
+
141  }
+
142 }
+
143 #endif
+ +
bool check_vector(const char *function, const char *name, const Eigen::Matrix< T, R, C > &x)
Return true if the matrix is either a row vector or column vector.
+ + +
boost::math::tools::promote_args< T1, T2 >::type squared_distance(const Eigen::Matrix< T1, R1, C1 > &v1, const Eigen::Matrix< T2, R2, C2 > &v2)
Returns the squared distance between the specified vectors.
+ +
vari ** v1_
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+ +
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:19
+
size_t length_
+ + +
bool check_matching_sizes(const char *function, const char *name1, const T_y1 &y1, const char *name2, const T_y2 &y2)
Return true if two structures at the same size.
+ + +
vari ** v2_
+
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
void * alloc(size_t len)
Return a newly allocated block of memory of the appropriate size managed by the stack allocator...
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2stan__print_8hpp.html b/doc/api/html/rev_2mat_2fun_2stan__print_8hpp.html new file mode 100644 index 00000000000..74d1526040a --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2stan__print_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/stan_print.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan_print.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <ostream>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + +

+Functions

void stan::math::stan_print (std::ostream *o, const var &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2stan__print_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2stan__print_8hpp_source.html new file mode 100644 index 00000000000..da725f281d9 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2stan__print_8hpp_source.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/stan_print.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan_print.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_STAN_PRINT_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_STAN_PRINT_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+
5 #include <ostream>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  void stan_print(std::ostream* o, const var& x) {
+
11  *o << x.val();
+
12  }
+
13 
+
14  }
+
15 }
+
16 #endif
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
void stan_print(std::ostream *o, const T &x)
Definition: stan_print.hpp:12
+
double val() const
Return the value of this variable.
Definition: var.hpp:234
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2sum_8hpp.html b/doc/api/html/rev_2mat_2fun_2sum_8hpp.html new file mode 100644 index 00000000000..3cdb8fc6477 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2sum_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/sum.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
sum.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + +

+Classes

class  stan::math::sum_eigen_v_vari
 Class for representing sums with constructors for Eigen. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<int R, int C>
var stan::math::sum (const Eigen::Matrix< var, R, C > &m)
 Returns the sum of the coefficients of the specified matrix, column vector or row vector. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2sum_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2sum_8hpp_source.html new file mode 100644 index 00000000000..5d69c45f608 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2sum_8hpp_source.html @@ -0,0 +1,167 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/sum.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
sum.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_SUM_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_SUM_HPP
+
3 
+ + +
6 #include <stan/math/rev/core.hpp>
+ +
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
17  class sum_eigen_v_vari : public sum_v_vari {
+
18  protected:
+
19  template <typename Derived>
+
20  inline static double sum_of_val(const Eigen::DenseBase<Derived>& v) {
+
21  double result = 0;
+
22  for (int i = 0; i < v.size(); i++)
+
23  result += v(i).vi_->val_;
+
24  return result;
+
25  }
+
26 
+
27  public:
+
28  template <int R1, int C1>
+
29  explicit sum_eigen_v_vari(const Eigen::Matrix<var, R1, C1> &v1)
+
30  : sum_v_vari(sum_of_val(v1),
+
31  reinterpret_cast<vari**>(ChainableStack::memalloc_
+
32  .alloc(v1.size()
+
33  * sizeof(vari*))),
+
34  v1.size()) {
+
35  for (size_t i = 0; i < length_; i++)
+
36  v_[i] = v1(i).vi_;
+
37  }
+
38  };
+
39 
+
49  template <int R, int C>
+
50  inline var sum(const Eigen::Matrix<var, R, C>& m) {
+
51  if (m.size() == 0)
+
52  return 0.0;
+
53  return var(new sum_eigen_v_vari(m));
+
54  }
+
55 
+
56  }
+
57 }
+
58 #endif
+
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+ + +
sum_eigen_v_vari(const Eigen::Matrix< var, R1, C1 > &v1)
Definition: sum.hpp:29
+
static double sum_of_val(const Eigen::DenseBase< Derived > &v)
Definition: sum.hpp:20
+
The variable implementation base class.
Definition: vari.hpp:28
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+ + + +
Class for representing sums with constructors for Eigen.
Definition: sum.hpp:17
+
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+ +
Class for sums of variables constructed with standard vectors.
Definition: sum.hpp:14
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2tcrossprod_8hpp.html b/doc/api/html/rev_2mat_2fun_2tcrossprod_8hpp.html new file mode 100644 index 00000000000..4117a566836 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2tcrossprod_8hpp.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/tcrossprod.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
tcrossprod.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

matrix_v stan::math::tcrossprod (const matrix_v &M)
 Returns the result of post-multiplying a matrix by its own transpose. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2tcrossprod_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2tcrossprod_8hpp_source.html new file mode 100644 index 00000000000..4c3dc893ad0 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2tcrossprod_8hpp_source.html @@ -0,0 +1,176 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/tcrossprod.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
tcrossprod.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_TCROSSPROD_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_TCROSSPROD_HPP
+
3 
+ + +
6 #include <stan/math/rev/core.hpp>
+ + + + + +
12 #include <boost/math/tools/promotion.hpp>
+
13 #include <vector>
+
14 
+
15 namespace stan {
+
16  namespace math {
+
17 
+
24  inline matrix_v
+
25  tcrossprod(const matrix_v& M) {
+
26  if (M.rows() == 0)
+
27  return matrix_v(0, 0);
+
28  // if (M.rows() == 1)
+
29  // return M * M.transpose();
+
30 
+
31  // WAS JUST THIS
+
32  // matrix_v result(M.rows(), M.rows());
+
33  // return result.setZero().selfadjointView<Eigen::Upper>().rankUpdate(M);
+
34 
+
35  matrix_v MMt(M.rows(), M.rows());
+
36 
+
37  vari** vs
+
38  = reinterpret_cast<vari**>(ChainableStack::memalloc_
+
39  .alloc((M.rows() * M.cols())
+
40  * sizeof(vari*)));
+
41  int pos = 0;
+
42  for (int m = 0; m < M.rows(); ++m)
+
43  for (int n = 0; n < M.cols(); ++n)
+
44  vs[pos++] = M(m, n).vi_;
+
45  for (int m = 0; m < M.rows(); ++m)
+
46  MMt(m, m) = var(new dot_self_vari(vs + m * M.cols(), M.cols()));
+
47  for (int m = 0; m < M.rows(); ++m) {
+
48  for (int n = 0; n < m; ++n) {
+
49  MMt(m, n) = var(new dot_product_vari<var, var>(vs + m * M.cols(),
+
50  vs + n * M.cols(),
+
51  M.cols()));
+
52  MMt(n, m) = MMt(m, n);
+
53  }
+
54  }
+
55  return MMt;
+
56  }
+
57 
+
58  }
+
59 }
+
60 #endif
+ + + +
The variable implementation base class.
Definition: vari.hpp:28
+
Eigen::Matrix< fvar< T >, R, R > tcrossprod(const Eigen::Matrix< fvar< T >, R, C > &m)
Definition: tcrossprod.hpp:17
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+ +
Eigen::Matrix< var, Eigen::Dynamic, Eigen::Dynamic > matrix_v
The type of a matrix holding stan::math::var values.
Definition: typedefs.hpp:21
+ + + + +
void * alloc(size_t len)
Return a newly allocated block of memory of the appropriate size managed by the stack allocator...
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2trace__gen__inv__quad__form__ldlt_8hpp.html b/doc/api/html/rev_2mat_2fun_2trace__gen__inv__quad__form__ldlt_8hpp.html new file mode 100644 index 00000000000..fa84ac96cd4 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2trace__gen__inv__quad__form__ldlt_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/trace_gen_inv_quad_form_ldlt.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
trace_gen_inv_quad_form_ldlt.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T1 , int R1, int C1, typename T2 , int R2, int C2, typename T3 , int R3, int C3>
boost::enable_if_c
+< stan::is_var< T1 >::value||stan::is_var
+< T2 >::value||stan::is_var
+< T3 >::value, var >::type 
stan::math::trace_gen_inv_quad_form_ldlt (const Eigen::Matrix< T1, R1, C1 > &D, const stan::math::LDLT_factor< T2, R2, C2 > &A, const Eigen::Matrix< T3, R3, C3 > &B)
 Compute the trace of an inverse quadratic form. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2trace__gen__inv__quad__form__ldlt_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2trace__gen__inv__quad__form__ldlt_8hpp_source.html new file mode 100644 index 00000000000..5eb8fbc102b --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2trace__gen__inv__quad__form__ldlt_8hpp_source.html @@ -0,0 +1,166 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/trace_gen_inv_quad_form_ldlt.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
trace_gen_inv_quad_form_ldlt.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_TRACE_GEN_INV_QUAD_FORM_LDLT_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_TRACE_GEN_INV_QUAD_FORM_LDLT_HPP
+
3 
+ +
5 #include <stan/math/rev/core.hpp>
+ + +
8 #include <boost/utility/enable_if.hpp>
+ + + +
12 
+
13 namespace stan {
+
14  namespace math {
+
15 
+
21  template <typename T1, int R1, int C1, typename T2, int R2, int C2,
+
22  typename T3, int R3, int C3>
+
23  inline typename
+
24  boost::enable_if_c<stan::is_var<T1>::value ||
+ +
26  stan::is_var<T3>::value, var>::type
+
27  trace_gen_inv_quad_form_ldlt(const Eigen::Matrix<T1, R1, C1> &D,
+ +
29  const Eigen::Matrix<T3, R3, C3> &B) {
+
30  stan::math::check_square("trace_gen_inv_quad_form_ldlt", "D", D);
+
31  stan::math::check_multiplicable("trace_gen_inv_quad_form_ldlt",
+
32  "A", A,
+
33  "B", B);
+
34  stan::math::check_multiplicable("trace_gen_inv_quad_form_ldlt",
+
35  "B", B,
+
36  "D", D);
+
37 
+
38  trace_inv_quad_form_ldlt_impl<T2, R2, C2, T3, R3, C3> *_impl
+
39  = new trace_inv_quad_form_ldlt_impl<T2, R2, C2, T3, R3, C3>(D, A, B);
+
40 
+
41  return var(new trace_inv_quad_form_ldlt_vari<T2, R2, C2, T3, R3, C3>
+
42  (_impl));
+
43  }
+
44 
+
45 
+
46  }
+
47 }
+
48 
+
49 #endif
+ + + +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
boost::enable_if_c<!stan::is_var< T1 >::value &&!stan::is_var< T2 >::value &&!stan::is_var< T3 >::value, typename boost::math::tools::promote_args< T1, T2, T3 >::type >::type trace_gen_inv_quad_form_ldlt(const Eigen::Matrix< T1, R1, C1 > &D, const stan::math::LDLT_factor< T2, R2, C2 > &A, const Eigen::Matrix< T3, R3, C3 > &B)
+ + +
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+ + + +
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+
quad_form_vari_alloc< TA, RA, CA, TB, RB, CB > * _impl
Definition: quad_form.hpp:115
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2trace__gen__quad__form_8hpp.html b/doc/api/html/rev_2mat_2fun_2trace__gen__quad__form_8hpp.html new file mode 100644 index 00000000000..92c82688fac --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2trace__gen__quad__form_8hpp.html @@ -0,0 +1,201 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/trace_gen_quad_form.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
trace_gen_quad_form.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename TD , int RD, int CD, typename TA , int RA, int CA, typename TB , int RB, int CB>
boost::enable_if_c
+< boost::is_same< TD, var >
+::value||boost::is_same< TA,
+var >::value||boost::is_same
+< TB, var >::value, var >
+::type 
stan::math::trace_gen_quad_form (const Eigen::Matrix< TD, RD, CD > &D, const Eigen::Matrix< TA, RA, CA > &A, const Eigen::Matrix< TB, RB, CB > &B)
 
+

Variable Documentation

+ +
+
+ + + + +
trace_gen_quad_form_vari_alloc<TD, RD, CD, TA, RA, CA, TB, RB, CB>* _impl
+
+ +

Definition at line 104 of file trace_gen_quad_form.hpp.

+ +
+
+ +
+
+ + + + +
Eigen::Matrix<TA, RA, CA> A_
+
+ +

Definition at line 38 of file trace_gen_quad_form.hpp.

+ +
+
+ +
+
+ + + + +
Eigen::Matrix<TB, RB, CB> B_
+
+ +

Definition at line 39 of file trace_gen_quad_form.hpp.

+ +
+
+ +
+
+ + + + +
Eigen::Matrix<TD, RD, CD> D_
+
+ +

Definition at line 37 of file trace_gen_quad_form.hpp.

+ +
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2trace__gen__quad__form_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2trace__gen__quad__form_8hpp_source.html new file mode 100644 index 00000000000..e0b24947551 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2trace__gen__quad__form_8hpp_source.html @@ -0,0 +1,265 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/trace_gen_quad_form.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
trace_gen_quad_form.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_TRACE_GEN_QUAD_FORM_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_TRACE_GEN_QUAD_FORM_HPP
+
3 
+
4 #include <boost/utility/enable_if.hpp>
+
5 #include <boost/type_traits.hpp>
+ + +
8 #include <stan/math/rev/core.hpp>
+ + + + + + +
15 
+
16 namespace stan {
+
17  namespace math {
+
18  namespace {
+
19  template <typename TD, int RD, int CD,
+
20  typename TA, int RA, int CA,
+
21  typename TB, int RB, int CB>
+
22  class trace_gen_quad_form_vari_alloc : public chainable_alloc {
+
23  public:
+
24  trace_gen_quad_form_vari_alloc(const Eigen::Matrix<TD, RD, CD>& D,
+
25  const Eigen::Matrix<TA, RA, CA>& A,
+
26  const Eigen::Matrix<TB, RB, CB>& B)
+
27  : D_(D), A_(A), B_(B)
+
28  { }
+
29 
+
30  double compute() {
+ + +
33  value_of(A_),
+
34  value_of(B_));
+
35  }
+
36 
+
37  Eigen::Matrix<TD, RD, CD> D_;
+
38  Eigen::Matrix<TA, RA, CA> A_;
+
39  Eigen::Matrix<TB, RB, CB> B_;
+
40  };
+
41 
+
42  template <typename TD, int RD, int CD,
+
43  typename TA, int RA, int CA,
+
44  typename TB, int RB, int CB>
+
45  class trace_gen_quad_form_vari : public vari {
+
46  protected:
+
47  static inline void
+
48  computeAdjoints(const double& adj,
+
49  const Eigen::Matrix<double, RD, CD>& D,
+
50  const Eigen::Matrix<double, RA, CA>& A,
+
51  const Eigen::Matrix<double, RB, CB>& B,
+
52  Eigen::Matrix<var, RD, CD> *varD,
+
53  Eigen::Matrix<var, RA, CA> *varA,
+
54  Eigen::Matrix<var, RB, CB> *varB) {
+
55  Eigen::Matrix<double, CA, CB> AtB;
+
56  Eigen::Matrix<double, RA, CB> BD;
+
57  if (varB || varA)
+
58  BD.noalias() = B*D;
+
59  if (varB || varD)
+
60  AtB.noalias() = A.transpose()*B;
+
61 
+
62  if (varB) {
+
63  Eigen::Matrix<double, RB, CB> adjB(adj*(A*BD + AtB*D.transpose()));
+
64  for (int j = 0; j < B.cols(); j++)
+
65  for (int i = 0; i < B.rows(); i++)
+
66  (*varB)(i, j).vi_->adj_ += adjB(i, j);
+
67  }
+
68  if (varA) {
+
69  Eigen::Matrix<double, RA, CA> adjA(adj*(B*BD.transpose()));
+
70  for (int j = 0; j < A.cols(); j++)
+
71  for (int i = 0; i < A.rows(); i++)
+
72  (*varA)(i, j).vi_->adj_ += adjA(i, j);
+
73  }
+
74  if (varD) {
+
75  Eigen::Matrix<double, RD, CD> adjD(adj*(B.transpose()*AtB));
+
76  for (int j = 0; j < D.cols(); j++)
+
77  for (int i = 0; i < D.rows(); i++)
+
78  (*varD)(i, j).vi_->adj_ += adjD(i, j);
+
79  }
+
80  }
+
81 
+
82 
+
83  public:
+
84  explicit
+
85  trace_gen_quad_form_vari(trace_gen_quad_form_vari_alloc
+
86  <TD, RD, CD, TA, RA, CA, TB, RB, CB> *impl)
+
87  : vari(impl->compute()), _impl(impl) { }
+
88 
+
89  virtual void chain() {
+ +
91  computeAdjoints(adj_,
+
92  value_of(_impl->D_),
+
93  value_of(_impl->A_),
+
94  value_of(_impl->B_),
+
95  reinterpret_cast<Eigen::Matrix<var, RD, CD> *>
+
96  (boost::is_same<TD, var>::value?(&_impl->D_):NULL),
+
97  reinterpret_cast<Eigen::Matrix<var, RA, CA> *>
+
98  (boost::is_same<TA, var>::value?(&_impl->A_):NULL),
+
99  reinterpret_cast<Eigen::Matrix<var, RB, CB> *>
+
100  (boost::is_same<TB, var>::value?(&_impl->B_):NULL));
+
101  }
+
102 
+
103  trace_gen_quad_form_vari_alloc<TD, RD, CD, TA, RA, CA, TB, RB, CB>
+ +
105  };
+
106  }
+
107 
+
108  template <typename TD, int RD, int CD,
+
109  typename TA, int RA, int CA,
+
110  typename TB, int RB, int CB>
+
111  inline typename
+
112  boost::enable_if_c< boost::is_same<TD, var>::value ||
+
113  boost::is_same<TA, var>::value ||
+
114  boost::is_same<TB, var>::value,
+
115  var >::type
+
116  trace_gen_quad_form(const Eigen::Matrix<TD, RD, CD>& D,
+
117  const Eigen::Matrix<TA, RA, CA>& A,
+
118  const Eigen::Matrix<TB, RB, CB>& B) {
+
119  stan::math::check_square("trace_gen_quad_form", "A", A);
+
120  stan::math::check_square("trace_gen_quad_form", "D", D);
+
121  stan::math::check_multiplicable("trace_gen_quad_form",
+
122  "A", A,
+
123  "B", B);
+
124  stan::math::check_multiplicable("trace_gen_quad_form",
+
125  "B", B,
+
126  "D", D);
+
127 
+
128  trace_gen_quad_form_vari_alloc<TD, RD, CD, TA, RA, CA, TB, RB, CB>
+
129  *baseVari
+
130  = new trace_gen_quad_form_vari_alloc<TD, RD, CD, TA, RA, CA, TB, RB, CB>
+
131  (D, A, B);
+
132 
+
133  return var(new trace_gen_quad_form_vari
+
134  <TD, RD, CD, TA, RA, CA, TB, RB, CB>(baseVari));
+
135  }
+
136  }
+
137 }
+
138 
+
139 #endif
+
Eigen::Matrix< TB, RB, CB > B_
+ + +
Eigen::Matrix< TA, RA, CA > A_
+
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
trace_gen_quad_form_vari_alloc< TD, RD, CD, TA, RA, CA, TB, RB, CB > * _impl
+
Eigen::Matrix< TD, RD, CD > D_
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
fvar< T > trace_gen_quad_form(const Eigen::Matrix< fvar< T >, RD, CD > &D, const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, CB > &B)
+ + +
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+ + +
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp.html b/doc/api/html/rev_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp.html new file mode 100644 index 00000000000..60e3cf2a248 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp.html @@ -0,0 +1,265 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/trace_inv_quad_form_ldlt.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
trace_inv_quad_form_ldlt.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T2 , int R2, int C2, typename T3 , int R3, int C3>
boost::enable_if_c
+< stan::is_var< T2 >::value||stan::is_var
+< T3 >::value, var >::type 
stan::math::trace_inv_quad_form_ldlt (const stan::math::LDLT_factor< T2, R2, C2 > &A, const Eigen::Matrix< T3, R3, C3 > &B)
 Compute the trace of an inverse quadratic form. More...
 
+

Variable Documentation

+ +
+
+ + + + +
trace_inv_quad_form_ldlt_impl<T2, R2, C2, T3, R3, C3>* _impl
+
+ +

Definition at line 161 of file trace_inv_quad_form_ldlt.hpp.

+ +
+
+ +
+
+ + + + +
stan::math::LDLT_factor<T2, R2, C2> _ldlt
+
+ +

Definition at line 82 of file trace_inv_quad_form_ldlt.hpp.

+ +
+
+ +
+
+ + + + +
double _value
+
+ +

Definition at line 88 of file trace_inv_quad_form_ldlt.hpp.

+ +
+
+ +
+
+ + + + +
Eigen::Matrix<vari*, R3, C3> _variB
+
+ +

Definition at line 85 of file trace_inv_quad_form_ldlt.hpp.

+ +
+
+ +
+
+ + + + +
Eigen::Matrix<vari*, Eigen::Dynamic, Eigen::Dynamic> _variD
+
+ +

Definition at line 84 of file trace_inv_quad_form_ldlt.hpp.

+ +
+
+ +
+
+ + + + +
Eigen::Matrix<double, R3, C3> AinvB_
+
+ +

Definition at line 86 of file trace_inv_quad_form_ldlt.hpp.

+ +
+
+ +
+
+ + + + +
Eigen::Matrix<double, C3, C3> C_
+
+ +

Definition at line 87 of file trace_inv_quad_form_ldlt.hpp.

+ +
+
+ +
+
+ + + + +
Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> D_
+
+ +

Definition at line 83 of file trace_inv_quad_form_ldlt.hpp.

+ +
+
+ +
+
+ + + + +
const int Dtype_
+
+ +

Definition at line 81 of file trace_inv_quad_form_ldlt.hpp.

+ +
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp_source.html new file mode 100644 index 00000000000..e6bb225e368 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp_source.html @@ -0,0 +1,317 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/trace_inv_quad_form_ldlt.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
trace_inv_quad_form_ldlt.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_TRACE_INV_QUAD_FORM_LDLT_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_TRACE_INV_QUAD_FORM_LDLT_HPP
+
3 
+ +
5 #include <stan/math/rev/core.hpp>
+ + +
8 #include <boost/utility/enable_if.hpp>
+ + +
11 
+
12 namespace stan {
+
13  namespace math {
+
14  namespace {
+
15  template <typename T2, int R2, int C2, typename T3, int R3, int C3>
+
16  class trace_inv_quad_form_ldlt_impl : public chainable_alloc {
+
17  protected:
+
18  inline void initializeB(const Eigen::Matrix<var, R3, C3> &B,
+
19  bool haveD) {
+
20  Eigen::Matrix<double, R3, C3> Bd(B.rows(), B.cols());
+
21  _variB.resize(B.rows(), B.cols());
+
22  for (int j = 0; j < B.cols(); j++) {
+
23  for (int i = 0; i < B.rows(); i++) {
+
24  _variB(i, j) = B(i, j).vi_;
+
25  Bd(i, j) = B(i, j).val();
+
26  }
+
27  }
+
28  AinvB_ = _ldlt.solve(Bd);
+
29  if (haveD)
+
30  C_.noalias() = Bd.transpose()*AinvB_;
+
31  else
+
32  _value = (Bd.transpose()*AinvB_).trace();
+
33  }
+
34  inline void initializeB(const Eigen::Matrix<double, R3, C3> &B,
+
35  bool haveD) {
+
36  AinvB_ = _ldlt.solve(B);
+
37  if (haveD)
+
38  C_.noalias() = B.transpose()*AinvB_;
+
39  else
+
40  _value = (B.transpose()*AinvB_).trace();
+
41  }
+
42 
+
43  template<int R1, int C1>
+
44  inline void initializeD(const Eigen::Matrix<var, R1, C1> &D) {
+
45  D_.resize(D.rows(), D.cols());
+
46  _variD.resize(D.rows(), D.cols());
+
47  for (int j = 0; j < D.cols(); j++) {
+
48  for (int i = 0; i < D.rows(); i++) {
+
49  _variD(i, j) = D(i, j).vi_;
+
50  D_(i, j) = D(i, j).val();
+
51  }
+
52  }
+
53  }
+
54  template<int R1, int C1>
+
55  inline void initializeD(const Eigen::Matrix<double, R1, C1> &D) {
+
56  D_ = D;
+
57  }
+
58 
+
59  public:
+
60  template<typename T1, int R1, int C1>
+
61  trace_inv_quad_form_ldlt_impl(const Eigen::Matrix<T1, R1, C1> &D,
+ +
63  &A,
+
64  const Eigen::Matrix<T3, R3, C3> &B)
+
65  : Dtype_(stan::is_var<T1>::value),
+
66  _ldlt(A) {
+
67  initializeB(B, true);
+
68  initializeD(D);
+
69 
+
70  _value = (D_*C_).trace();
+
71  }
+
72 
+
73  trace_inv_quad_form_ldlt_impl(const stan::math::LDLT_factor<T2, R2, C2>
+
74  &A,
+
75  const Eigen::Matrix<T3, R3, C3> &B)
+
76  : Dtype_(2),
+
77  _ldlt(A) {
+
78  initializeB(B, false);
+
79  }
+
80 
+
81  const int Dtype_; // 0 = double, 1 = var, 2 = missing
+ +
83  Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> D_;
+
84  Eigen::Matrix<vari*, Eigen::Dynamic, Eigen::Dynamic> _variD;
+
85  Eigen::Matrix<vari*, R3, C3> _variB;
+
86  Eigen::Matrix<double, R3, C3> AinvB_;
+
87  Eigen::Matrix<double, C3, C3> C_;
+
88  double _value;
+
89  };
+
90 
+
91  template <typename T2, int R2, int C2, typename T3, int R3, int C3>
+
92  class trace_inv_quad_form_ldlt_vari : public vari {
+
93  protected:
+
94  static inline
+
95  void
+
96  chainA(const double &adj,
+
97  trace_inv_quad_form_ldlt_impl<double, R2, C2, T3, R3, C3>
+
98  *impl) {
+
99  }
+
100  static inline
+
101  void
+
102  chainB(const double &adj,
+
103  trace_inv_quad_form_ldlt_impl<T2, R2, C2, double, R3, C3>
+
104  *impl) {
+
105  }
+
106 
+
107  static inline
+
108  void
+
109  chainA(const double &adj,
+
110  trace_inv_quad_form_ldlt_impl<var, R2, C2, T3, R3, C3> *impl) {
+
111  Eigen::Matrix<double, R2, C2> aA;
+
112 
+
113  if (impl->Dtype_ != 2)
+
114  aA.noalias() = -adj * (impl->AinvB_ * impl->D_.transpose()
+
115  * impl->AinvB_.transpose());
+
116  else
+
117  aA.noalias() = -adj*(impl->AinvB_ * impl->AinvB_.transpose());
+
118 
+
119  for (int j = 0; j < aA.cols(); j++)
+
120  for (int i = 0; i < aA.rows(); i++)
+
121  impl->_ldlt._alloc->_variA(i, j)->adj_ += aA(i, j);
+
122  }
+
123  static inline
+
124  void
+
125  chainB(const double &adj,
+
126  trace_inv_quad_form_ldlt_impl<T2, R2, C2, var, R3, C3> *impl) {
+
127  Eigen::Matrix<double, R3, C3> aB;
+
128 
+
129  if (impl->Dtype_ != 2)
+
130  aB.noalias() = adj*impl->AinvB_*(impl->D_ + impl->D_.transpose());
+
131  else
+
132  aB.noalias() = 2*adj*impl->AinvB_;
+
133 
+
134  for (int j = 0; j < aB.cols(); j++)
+
135  for (int i = 0; i < aB.rows(); i++)
+
136  impl->_variB(i, j)->adj_ += aB(i, j);
+
137  }
+
138 
+
139  public:
+
140  explicit trace_inv_quad_form_ldlt_vari
+
141  (trace_inv_quad_form_ldlt_impl<T2, R2, C2, T3, R3, C3> *impl)
+
142  : vari(impl->_value), _impl(impl)
+
143  { }
+
144 
+
145  virtual void chain() {
+
146  // F = trace(D * B' * inv(A) * B)
+
147  // aA = -aF * inv(A') * B * D' * B' * inv(A')
+
148  // aB = aF*(inv(A) * B * D + inv(A') * B * D')
+
149  // aD = aF*(B' * inv(A) * B)
+
150  chainA(adj_, _impl);
+
151 
+
152  chainB(adj_, _impl);
+
153 
+
154  if (_impl->Dtype_ == 1) {
+
155  for (int j = 0; j < _impl->_variD.cols(); j++)
+
156  for (int i = 0; i < _impl->_variD.rows(); i++)
+
157  _impl->_variD(i, j)->adj_ += adj_*_impl->C_(i, j);
+
158  }
+
159  }
+
160 
+
161  trace_inv_quad_form_ldlt_impl<T2, R2, C2, T3, R3, C3> *_impl;
+
162  };
+
163 
+
164  }
+
165 
+
166 
+
172  template <typename T2, int R2, int C2, typename T3, int R3, int C3>
+
173  inline typename
+
174  boost::enable_if_c<stan::is_var<T2>::value ||
+ +
176  var>::type
+ +
178  const Eigen::Matrix<T3, R3, C3> &B) {
+
179  stan::math::check_multiplicable("trace_inv_quad_form_ldlt",
+
180  "A", A,
+
181  "B", B);
+
182 
+
183  trace_inv_quad_form_ldlt_impl<T2, R2, C2, T3, R3, C3> *_impl
+
184  = new trace_inv_quad_form_ldlt_impl<T2, R2, C2, T3, R3, C3>(A, B);
+
185 
+
186  return var(new trace_inv_quad_form_ldlt_vari<T2, R2, C2, T3, R3, C3>
+
187  (_impl));
+
188  }
+
189 
+
190  }
+
191 }
+
192 
+
193 #endif
+ + + + +
Eigen::Matrix< vari *, Eigen::Dynamic, Eigen::Dynamic > _variD
+
const int Dtype_
+
Eigen::Matrix< double, C3, C3 > C_
+
double _value
+
boost::enable_if_c<!stan::is_var< T1 >::value &&!stan::is_var< T2 >::value, typename boost::math::tools::promote_args< T1, T2 >::type >::type trace_inv_quad_form_ldlt(const stan::math::LDLT_factor< T1, R2, C2 > &A, const Eigen::Matrix< T2, R3, C3 > &B)
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > D_
+ +
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+
stan::math::LDLT_factor< T2, R2, C2 > _ldlt
+ + +
Eigen::Matrix< double, R3, C3 > AinvB_
+
T trace(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
Returns the trace of the specified matrix.
Definition: trace.hpp:20
+ +
Eigen::Matrix< vari *, R3, C3 > _variB
+
trace_inv_quad_form_ldlt_impl< T2, R2, C2, T3, R3, C3 > * _impl
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2trace__quad__form_8hpp.html b/doc/api/html/rev_2mat_2fun_2trace__quad__form_8hpp.html new file mode 100644 index 00000000000..c35573b7d16 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2trace__quad__form_8hpp.html @@ -0,0 +1,185 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/trace_quad_form.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
trace_quad_form.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename TA , int RA, int CA, typename TB , int RB, int CB>
boost::enable_if_c
+< boost::is_same< TA, var >
+::value||boost::is_same< TB,
+var >::value, var >::type 
stan::math::trace_quad_form (const Eigen::Matrix< TA, RA, CA > &A, const Eigen::Matrix< TB, RB, CB > &B)
 
+

Variable Documentation

+ +
+
+ + + + +
trace_quad_form_vari_alloc<TA, RA, CA, TB, RB, CB>* _impl
+
+ +

Definition at line 89 of file trace_quad_form.hpp.

+ +
+
+ +
+
+ + + + +
Eigen::Matrix<TA, RA, CA> A_
+
+ +

Definition at line 33 of file trace_quad_form.hpp.

+ +
+
+ +
+
+ + + + +
Eigen::Matrix<TB, RB, CB> B_
+
+ +

Definition at line 34 of file trace_quad_form.hpp.

+ +
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2trace__quad__form_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2trace__quad__form_8hpp_source.html new file mode 100644 index 00000000000..38494126388 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2trace__quad__form_8hpp_source.html @@ -0,0 +1,238 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/trace_quad_form.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
trace_quad_form.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_TRACE_QUAD_FORM_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_TRACE_QUAD_FORM_HPP
+
3 
+
4 #include <boost/utility/enable_if.hpp>
+
5 #include <boost/type_traits.hpp>
+
6 #include <stan/math/rev/core.hpp>
+ + + + + + + + +
15 
+
16 namespace stan {
+
17  namespace math {
+
18  namespace {
+
19  template <typename TA, int RA, int CA, typename TB, int RB, int CB>
+
20  class trace_quad_form_vari_alloc : public chainable_alloc {
+
21  public:
+
22  trace_quad_form_vari_alloc(const Eigen::Matrix<TA, RA, CA>& A,
+
23  const Eigen::Matrix<TB, RB, CB>& B)
+
24  : A_(A), B_(B)
+
25  { }
+
26 
+
27  double compute() {
+ + +
30  value_of(B_));
+
31  }
+
32 
+
33  Eigen::Matrix<TA, RA, CA> A_;
+
34  Eigen::Matrix<TB, RB, CB> B_;
+
35  };
+
36 
+
37  template <typename TA, int RA, int CA, typename TB, int RB, int CB>
+
38  class trace_quad_form_vari : public vari {
+
39  protected:
+
40  static inline void chainA(Eigen::Matrix<double, RA, CA>& A,
+
41  const Eigen::Matrix<double, RB, CB>& Bd,
+
42  const double& adjC) {}
+
43  static inline void chainB(Eigen::Matrix<double, RB, CB>& B,
+
44  const Eigen::Matrix<double, RA, CA>& Ad,
+
45  const Eigen::Matrix<double, RB, CB>& Bd,
+
46  const double& adjC) {}
+
47 
+
48  static inline void chainA(Eigen::Matrix<var, RA, CA>& A,
+
49  const Eigen::Matrix<double, RB, CB>& Bd,
+
50  const double& adjC) {
+
51  Eigen::Matrix<double, RA, CA> adjA(adjC*Bd*Bd.transpose());
+
52  for (int j = 0; j < A.cols(); j++)
+
53  for (int i = 0; i < A.rows(); i++)
+
54  A(i, j).vi_->adj_ += adjA(i, j);
+
55  }
+
56  static inline void chainB(Eigen::Matrix<var, RB, CB>& B,
+
57  const Eigen::Matrix<double, RA, CA>& Ad,
+
58  const Eigen::Matrix<double, RB, CB>& Bd,
+
59  const double& adjC) {
+
60  Eigen::Matrix<double, RA, CA> adjB(adjC*(Ad + Ad.transpose())*Bd);
+
61  for (int j = 0; j < B.cols(); j++)
+
62  for (int i = 0; i < B.rows(); i++)
+
63  B(i, j).vi_->adj_ += adjB(i, j);
+
64  }
+
65 
+
66  inline void chainAB(Eigen::Matrix<TA, RA, CA>& A,
+
67  Eigen::Matrix<TB, RB, CB>& B,
+
68  const Eigen::Matrix<double, RA, CA>& Ad,
+
69  const Eigen::Matrix<double, RB, CB>& Bd,
+
70  const double& adjC) {
+
71  chainA(A, Bd, adjC);
+
72  chainB(B, Ad, Bd, adjC);
+
73  }
+
74 
+
75 
+
76  public:
+
77  explicit
+
78  trace_quad_form_vari
+
79  (trace_quad_form_vari_alloc<TA, RA, CA, TB, RB, CB> *impl)
+
80  : vari(impl->compute()), _impl(impl) { }
+
81 
+
82  virtual void chain() {
+ +
84  chainAB(_impl->A_, _impl->B_,
+
85  value_of(_impl->A_), value_of(_impl->B_),
+
86  adj_);
+
87  }
+
88 
+
89  trace_quad_form_vari_alloc<TA, RA, CA, TB, RB, CB> *_impl;
+
90  };
+
91  }
+
92 
+
93  template <typename TA, int RA, int CA, typename TB, int RB, int CB>
+
94  inline typename
+
95  boost::enable_if_c< boost::is_same<TA, var>::value ||
+
96  boost::is_same<TB, var>::value,
+
97  var >::type
+
98  trace_quad_form(const Eigen::Matrix<TA, RA, CA>& A,
+
99  const Eigen::Matrix<TB, RB, CB>& B) {
+
100  stan::math::check_square("trace_quad_form", "A", A);
+
101  stan::math::check_multiplicable("trace_quad_form",
+
102  "A", A,
+
103  "B", B);
+
104 
+
105  trace_quad_form_vari_alloc<TA, RA, CA, TB, RB, CB> *baseVari
+
106  = new trace_quad_form_vari_alloc<TA, RA, CA, TB, RB, CB>(A, B);
+
107 
+
108  return var(new trace_quad_form_vari<TA, RA, CA, TB, RB, CB>(baseVari));
+
109  }
+
110  }
+
111 }
+
112 
+
113 #endif
+ + +
fvar< T > trace_quad_form(const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, CB > &B)
+
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
Eigen::Matrix< TA, RA, CA > A_
+ +
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
+ +
Eigen::Matrix< TB, RB, CB > B_
+ +
trace_quad_form_vari_alloc< TA, RA, CA, TB, RB, CB > * _impl
+ +
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2typedefs_8hpp.html b/doc/api/html/rev_2mat_2fun_2typedefs_8hpp.html new file mode 100644 index 00000000000..f30de1904ee --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2typedefs_8hpp.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/typedefs.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
typedefs.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Typedefs

typedef Eigen::Matrix< var,
+Eigen::Dynamic, Eigen::Dynamic > 
stan::math::matrix_v
 The type of a matrix holding stan::math::var values. More...
 
typedef Eigen::Matrix< var,
+Eigen::Dynamic, 1 > 
stan::math::vector_v
 The type of a (column) vector holding stan::math::var values. More...
 
typedef Eigen::Matrix< var,
+1, Eigen::Dynamic > 
stan::math::row_vector_v
 The type of a row vector holding stan::math::var values. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2typedefs_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2typedefs_8hpp_source.html new file mode 100644 index 00000000000..d405c798998 --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2typedefs_8hpp_source.html @@ -0,0 +1,143 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/typedefs.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
typedefs.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_TYPEDEFS_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_TYPEDEFS_HPP
+
3 
+ +
5 #include <stan/math/rev/core.hpp>
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
11  typedef
+
12  Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>::Index
+
13  size_type;
+
14 
+
19  typedef
+
20  Eigen::Matrix<var, Eigen::Dynamic, Eigen::Dynamic>
+ +
22 
+
27  typedef
+
28  Eigen::Matrix<var, Eigen::Dynamic, 1>
+ +
30 
+
35  typedef
+
36  Eigen::Matrix<var, 1, Eigen::Dynamic>
+ +
38 
+
39  }
+
40 }
+
41 #endif
+ +
Eigen::Matrix< var, Eigen::Dynamic, 1 > vector_v
The type of a (column) vector holding stan::math::var values.
Definition: typedefs.hpp:29
+
Eigen::Matrix< var, Eigen::Dynamic, Eigen::Dynamic > matrix_v
The type of a matrix holding stan::math::var values.
Definition: typedefs.hpp:21
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+ +
Eigen::Matrix< var, 1, Eigen::Dynamic > row_vector_v
The type of a row vector holding stan::math::var values.
Definition: typedefs.hpp:37
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2variance_8hpp.html b/doc/api/html/rev_2mat_2fun_2variance_8hpp.html new file mode 100644 index 00000000000..028d8ce487a --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2variance_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/variance.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
variance.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/fun/mean.hpp>
+#include <stan/math/rev/core.hpp>
+#include <stan/math/prim/scal/err/check_nonzero_size.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

var stan::math::variance (const std::vector< var > &v)
 Return the sample variance of the specified standard vector. More...
 
template<int R, int C>
var stan::math::variance (const Eigen::Matrix< var, R, C > &m)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2fun_2variance_8hpp_source.html b/doc/api/html/rev_2mat_2fun_2variance_8hpp_source.html new file mode 100644 index 00000000000..20445681fca --- /dev/null +++ b/doc/api/html/rev_2mat_2fun_2variance_8hpp_source.html @@ -0,0 +1,191 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/variance.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
variance.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_VARIANCE_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_VARIANCE_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+ + +
7 #include <stan/math/rev/core.hpp>
+ +
9 #include <vector>
+
10 
+
11 namespace stan {
+
12 
+
13  namespace math {
+
14 
+
15  namespace { // anonymous
+
16 
+
17  var calc_variance(size_t size,
+
18  const var* dtrs) {
+
19  vari** varis = reinterpret_cast<vari**>(ChainableStack::memalloc_
+
20  .alloc(size * sizeof(vari*)));
+
21  for (size_t i = 0; i < size; ++i)
+
22  varis[i] = dtrs[i].vi_;
+
23  double sum = 0.0;
+
24  for (size_t i = 0; i < size; ++i)
+
25  sum += dtrs[i].vi_->val_;
+
26  double mean = sum / size;
+
27  double sum_of_squares = 0;
+
28  for (size_t i = 0; i < size; ++i) {
+
29  double diff = dtrs[i].vi_->val_ - mean;
+
30  sum_of_squares += diff * diff;
+
31  }
+
32  double variance = sum_of_squares / (size - 1);
+
33  double* partials
+
34  = reinterpret_cast<double*>(ChainableStack::memalloc_
+
35  .alloc(size * sizeof(double)));
+
36  double two_over_size_m1 = 2 / (size - 1);
+
37  for (size_t i = 0; i < size; ++i)
+
38  partials[i] = two_over_size_m1 * (dtrs[i].vi_->val_ - mean);
+
39  return var(new stored_gradient_vari(variance, size,
+
40  varis, partials));
+
41  }
+
42 
+
43  }
+
44 
+
52  var variance(const std::vector<var>& v) {
+
53  stan::math::check_nonzero_size("variance", "v", v);
+
54  if (v.size() == 1) return 0;
+
55  return calc_variance(v.size(), &v[0]);
+
56  }
+
57 
+
58  /*
+
59  * Return the sample variance of the specified vector, row vector,
+
60  * or matrix. Raise domain error if size is not greater than
+
61  * zero.
+
62  *
+
63  * @tparam R number of rows
+
64  * @tparam C number of columns
+
65  * @param[in] m input matrix
+
66  * @return sample variance of specified matrix
+
67  */
+
68  template <int R, int C>
+
69  var variance(const Eigen::Matrix<var, R, C>& m) {
+
70  stan::math::check_nonzero_size("variance", "m", m);
+
71  if (m.size() == 1) return 0;
+
72  return calc_variance(m.size(), &m(0));
+
73  }
+
74 
+
75  }
+
76 }
+
77 
+
78 #endif
+
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+ + +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
bool check_nonzero_size(const char *function, const char *name, const T_y &y)
Return true if the specified matrix/vector is of non-zero size.
+
boost::math::tools::promote_args< T >::type variance(const std::vector< T > &v)
Returns the sample variance (divide by length - 1) of the coefficients in the specified standard vect...
Definition: variance.hpp:24
+ +
boost::math::tools::promote_args< T >::type mean(const std::vector< T > &v)
Returns the sample mean (i.e., average) of the coefficients in the specified standard vector...
Definition: mean.hpp:23
+ +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+ +
void * alloc(size_t len)
Return a newly allocated block of memory of the appropriate size managed by the stack allocator...
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2functor_2gradient_8hpp.html b/doc/api/html/rev_2mat_2functor_2gradient_8hpp.html new file mode 100644 index 00000000000..eb577a5ea2a --- /dev/null +++ b/doc/api/html/rev_2mat_2functor_2gradient_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/functor/gradient.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
gradient.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename F >
void stan::math::gradient (const F &f, const Eigen::Matrix< double, Dynamic, 1 > &x, double &fx, Eigen::Matrix< double, Dynamic, 1 > &grad_fx)
 Calculate the value and the gradient of the specified function at the specified argument. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2functor_2gradient_8hpp_source.html b/doc/api/html/rev_2mat_2functor_2gradient_8hpp_source.html new file mode 100644 index 00000000000..f9ac73f9a61 --- /dev/null +++ b/doc/api/html/rev_2mat_2functor_2gradient_8hpp_source.html @@ -0,0 +1,156 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/functor/gradient.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
gradient.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUNCTOR_GRADIENT_HPP
+
2 #define STAN_MATH_REV_MAT_FUNCTOR_GRADIENT_HPP
+
3 
+ +
5 #include <stan/math/rev/core.hpp>
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
11  using Eigen::Dynamic;
+
12 
+
42  template <typename F>
+
43  void
+
44  gradient(const F& f,
+
45  const Eigen::Matrix<double, Dynamic, 1>& x,
+
46  double& fx,
+
47  Eigen::Matrix<double, Dynamic, 1>& grad_fx) {
+
48  using stan::math::var;
+
49  start_nested();
+
50  try {
+
51  Eigen::Matrix<var, Dynamic, 1> x_var(x.size());
+
52  for (int i = 0; i < x.size(); ++i)
+
53  x_var(i) = x(i);
+
54  var fx_var = f(x_var);
+
55  fx = fx_var.val();
+
56  grad_fx.resize(x.size());
+
57  stan::math::grad(fx_var.vi_);
+
58  for (int i = 0; i < x.size(); ++i)
+
59  grad_fx(i) = x_var(i).adj();
+
60  } catch (const std::exception& /*e*/) {
+ +
62  throw;
+
63  }
+ +
65  }
+
66  } // namespace math
+
67 } // namespace stan
+
68 #endif
+ +
static void grad(chainable *vi)
Compute the gradient for all variables starting from the specified root variable implementation.
Definition: grad.hpp:30
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
static void recover_memory_nested()
Recover only the memory used for the top nested call.
+
double val() const
Return the value of this variable.
Definition: var.hpp:234
+
void gradient(const F &f, const Eigen::Matrix< T, Dynamic, 1 > &x, T &fx, Eigen::Matrix< T, Dynamic, 1 > &grad_fx)
Calculate the value and the gradient of the specified function at the specified argument.
Definition: gradient.hpp:44
+
static void start_nested()
Record the current position so that recover_memory_nested() can find it.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2functor_2jacobian_8hpp.html b/doc/api/html/rev_2mat_2functor_2jacobian_8hpp.html new file mode 100644 index 00000000000..0bae49a333a --- /dev/null +++ b/doc/api/html/rev_2mat_2functor_2jacobian_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/functor/jacobian.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
jacobian.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/rev/core.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename F >
void stan::math::jacobian (const F &f, const Eigen::Matrix< double, Dynamic, 1 > &x, Eigen::Matrix< double, Dynamic, 1 > &fx, Eigen::Matrix< double, Dynamic, Dynamic > &J)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2mat_2functor_2jacobian_8hpp_source.html b/doc/api/html/rev_2mat_2functor_2jacobian_8hpp_source.html new file mode 100644 index 00000000000..3565e45fd44 --- /dev/null +++ b/doc/api/html/rev_2mat_2functor_2jacobian_8hpp_source.html @@ -0,0 +1,164 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/functor/jacobian.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
jacobian.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUNCTOR_JACOBIAN_HPP
+
2 #define STAN_MATH_REV_MAT_FUNCTOR_JACOBIAN_HPP
+
3 
+ +
5 #include <stan/math/rev/core.hpp>
+
6 #include <vector>
+
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11  using Eigen::Dynamic;
+
12 
+
13  template <typename F>
+
14  void
+
15  jacobian(const F& f,
+
16  const Eigen::Matrix<double, Dynamic, 1>& x,
+
17  Eigen::Matrix<double, Dynamic, 1>& fx,
+
18  Eigen::Matrix<double, Dynamic, Dynamic>& J) {
+
19  using Eigen::Matrix;
+
20  using stan::math::var;
+
21  start_nested();
+
22  try {
+
23  Matrix<var, Dynamic, 1> x_var(x.size());
+
24  for (int k = 0; k < x.size(); ++k)
+
25  x_var(k) = x(k);
+
26  Matrix<var, Dynamic, 1> fx_var = f(x_var);
+
27  fx.resize(fx_var.size());
+
28  for (int i = 0; i < fx_var.size(); ++i)
+
29  fx(i) = fx_var(i).val();
+
30  J.resize(x.size(), fx_var.size());
+
31  for (int i = 0; i < fx_var.size(); ++i) {
+
32  if (i > 0)
+ +
34  grad(fx_var(i).vi_);
+
35  for (int k = 0; k < x.size(); ++k)
+
36  J(k, i) = x_var(k).adj();
+
37  }
+
38  } catch (const std::exception& e) {
+ +
40  throw;
+
41  }
+ +
43  }
+
44 
+
45  }
+
46 }
+
47 #endif
+ +
static void set_zero_all_adjoints()
Reset all adjoint values in the stack to zero.
+
static void grad(chainable *vi)
Compute the gradient for all variables starting from the specified root variable implementation.
Definition: grad.hpp:30
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+ +
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+
static void recover_memory_nested()
Recover only the memory used for the top nested call.
+
void jacobian(const F &f, const Eigen::Matrix< T, Dynamic, 1 > &x, Eigen::Matrix< T, Dynamic, 1 > &fx, Eigen::Matrix< T, Dynamic, Dynamic > &J)
Definition: jacobian.hpp:16
+
static void start_nested()
Record the current position so that recover_memory_nested() can find it.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2_phi_8hpp.html b/doc/api/html/rev_2scal_2fun_2_phi_8hpp.html new file mode 100644 index 00000000000..527ecbcccde --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2_phi_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/Phi.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
Phi.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::Phi (const stan::math::var &a)
 The unit normal cumulative density function for variables (stan). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2_phi_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2_phi_8hpp_source.html new file mode 100644 index 00000000000..445eaf1e970 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2_phi_8hpp_source.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/Phi.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
Phi.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_PHI_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_PHI_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  namespace {
+
11  class Phi_vari : public op_v_vari {
+
12  public:
+
13  explicit Phi_vari(vari* avi) :
+
14  op_v_vari(stan::math::Phi(avi->val_), avi) {
+
15  }
+
16  void chain() {
+
17  static const double NEG_HALF = -0.5;
+
18  avi_->adj_ += adj_
+ +
20  * std::exp(NEG_HALF * avi_->val_ * avi_->val_);
+
21  }
+
22  };
+
23  }
+
24 
+
66  inline var Phi(const stan::math::var& a) {
+
67  return var(new Phi_vari(a.vi_));
+
68  }
+
69 
+
70  }
+
71 }
+
72 #endif
+
const double INV_SQRT_TWO_PI
Definition: constants.hpp:166
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
fvar< T > Phi(const fvar< T > &x)
Definition: Phi.hpp:14
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2_phi__approx_8hpp.html b/doc/api/html/rev_2scal_2fun_2_phi__approx_8hpp.html new file mode 100644 index 00000000000..4c99c5837f3 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2_phi__approx_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/Phi_approx.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
Phi_approx.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::Phi_approx (const stan::math::var &a)
 Approximation of the unit normal CDF for variables (stan). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2_phi__approx_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2_phi__approx_8hpp_source.html new file mode 100644 index 00000000000..0a318724774 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2_phi__approx_8hpp_source.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/Phi_approx.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
Phi_approx.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_PHI_APPROX_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_PHI_APPROX_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
47  inline var Phi_approx(const stan::math::var& a) {
+
48  // return inv_logit(0.07056 * pow(a, 3.0) + 1.5976 * a);
+
49 
+
50  double av = a.vi_->val_;
+
51  double av_squared = av * av;
+
52  double av_cubed = av * av_squared;
+
53  double f = stan::math::inv_logit(0.07056 * av_cubed + 1.5976 * av);
+
54  double da = f * (1 - f) * (3.0 * 0.07056 * av_squared + 1.5976);
+
55  return var(new precomp_v_vari(f, a.vi_, da));
+
56  }
+
57 
+
58  }
+
59 }
+
60 #endif
+ +
fvar< T > inv_logit(const fvar< T > &x)
Definition: inv_logit.hpp:15
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
boost::math::tools::promote_args< T >::type Phi_approx(T x)
Approximation of the unit normal CDF.
Definition: Phi_approx.hpp:23
+
const double val_
The value of this variable.
Definition: vari.hpp:36
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2abs_8hpp.html b/doc/api/html/rev_2scal_2fun_2abs_8hpp.html new file mode 100644 index 00000000000..2680d1dd07e --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2abs_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/abs.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
abs.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::abs (const var &a)
 Return the absolute value of the variable (std). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2abs_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2abs_8hpp_source.html new file mode 100644 index 00000000000..9a5883e8b63 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2abs_8hpp_source.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/abs.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
abs.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_ABS_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_ABS_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
35  inline var abs(const var& a) {
+
36  return fabs(a);
+
37  }
+
38 
+
39  }
+
40 }
+
41 #endif
+
fvar< T > abs(const fvar< T > &x)
Definition: abs.hpp:15
+
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:14
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2acos_8hpp.html b/doc/api/html/rev_2scal_2fun_2acos_8hpp.html new file mode 100644 index 00000000000..3d52991754e --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2acos_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/acos.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
acos.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <cmath>
+#include <valarray>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::acos (const var &a)
 Return the principal value of the arc cosine of a variable, in radians (cmath). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2acos_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2acos_8hpp_source.html new file mode 100644 index 00000000000..8698ee137f8 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2acos_8hpp_source.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/acos.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
acos.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_ACOS_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_ACOS_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+
5 #include <cmath>
+
6 #include <valarray>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  namespace {
+
12  class acos_vari : public op_v_vari {
+
13  public:
+
14  explicit acos_vari(vari* avi) :
+
15  op_v_vari(std::acos(avi->val_), avi) {
+
16  }
+
17  void chain() {
+
18  avi_->adj_ -= adj_ / std::sqrt(1.0 - (avi_->val_ * avi_->val_));
+
19  }
+
20  };
+
21  }
+
22 
+
59  inline var acos(const var& a) {
+
60  return var(new acos_vari(a.vi_));
+
61  }
+
62 
+
63  }
+
64 }
+
65 #endif
+ +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
fvar< T > acos(const fvar< T > &x)
Definition: acos.hpp:14
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2acosh_8hpp.html b/doc/api/html/rev_2scal_2fun_2acosh_8hpp.html new file mode 100644 index 00000000000..79e2f8d8912 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2acosh_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/acosh.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
acosh.hpp File Reference
+
+
+
#include <math.h>
+#include <stan/math/rev/core.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::acosh (const var &a)
 The inverse hyperbolic cosine function for variables (C99). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2acosh_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2acosh_8hpp_source.html new file mode 100644 index 00000000000..e0d29dbca91 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2acosh_8hpp_source.html @@ -0,0 +1,153 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/acosh.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
acosh.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_ACOSH_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_ACOSH_HPP
+
3 
+
4 #include <math.h>
+
5 #include <stan/math/rev/core.hpp>
+
6 #include <boost/math/special_functions/fpclassify.hpp>
+
7 #include <cmath>
+
8 
+
9 #ifdef _MSC_VER
+
10 #include <boost/math/special_functions/acosh.hpp>
+
11 using boost::math::acosh;
+
12 #endif
+
13 
+
14 namespace stan {
+
15  namespace math {
+
16 
+
17  namespace {
+
18  class acosh_vari : public op_v_vari {
+
19  public:
+
20  acosh_vari(double val, vari* avi) :
+
21  op_v_vari(val, avi) {
+
22  }
+
23  void chain() {
+
24  avi_->adj_ += adj_ / std::sqrt(avi_->val_ * avi_->val_ - 1.0);
+
25  }
+
26  };
+
27  }
+
28 
+
68  inline var acosh(const var& a) {
+
69  if (boost::math::isinf(a.val()) && a > 0.0)
+
70  return var(new acosh_vari(a.val(), a.vi_));
+
71  return var(new acosh_vari(::acosh(a.val()), a.vi_));
+
72  }
+
73 
+
74  }
+
75 }
+
76 #endif
+ +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
bool isinf(const stan::math::var &v)
Checks if the given number is infinite.
Definition: boost_isinf.hpp:22
+
var acosh(const var &a)
The inverse hyperbolic cosine function for variables (C99).
Definition: acosh.hpp:68
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
double val() const
Return the value of this variable.
Definition: var.hpp:234
+
fvar< T > acosh(const fvar< T > &x)
Definition: acosh.hpp:14
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2as__bool_8hpp.html b/doc/api/html/rev_2scal_2fun_2as__bool_8hpp.html new file mode 100644 index 00000000000..766b0004930 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2as__bool_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/as_bool.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
as_bool.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

int stan::math::as_bool (const var &v)
 Return 1 if the argument is unequal to zero and 0 otherwise. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2as__bool_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2as__bool_8hpp_source.html new file mode 100644 index 00000000000..dc8ff120e58 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2as__bool_8hpp_source.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/as_bool.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
as_bool.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_AS_BOOL_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_AS_BOOL_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
15  inline int as_bool(const var& v) {
+
16  return 0.0 != v.vi_->val_;
+
17  }
+
18 
+
19  }
+
20 }
+
21 #endif
+ +
bool as_bool(const T x)
Return 1 if the argument is unequal to zero and 0 otherwise.
Definition: as_bool.hpp:14
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
const double val_
The value of this variable.
Definition: vari.hpp:36
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2asin_8hpp.html b/doc/api/html/rev_2scal_2fun_2asin_8hpp.html new file mode 100644 index 00000000000..67d66e931b7 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2asin_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/asin.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
asin.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::asin (const var &a)
 Return the principal value of the arc sine, in radians, of the specified variable (cmath). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2asin_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2asin_8hpp_source.html new file mode 100644 index 00000000000..8583e7f27fd --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2asin_8hpp_source.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/asin.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
asin.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_ASIN_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_ASIN_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+
5 #include <cmath>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  namespace {
+
11  class asin_vari : public op_v_vari {
+
12  public:
+
13  explicit asin_vari(vari* avi) :
+
14  op_v_vari(std::asin(avi->val_), avi) {
+
15  }
+
16  void chain() {
+
17  avi_->adj_ += adj_ / std::sqrt(1.0 - (avi_->val_ * avi_->val_));
+
18  }
+
19  };
+
20  }
+
21 
+
58  inline var asin(const var& a) {
+
59  return var(new asin_vari(a.vi_));
+
60  }
+
61 
+
62  }
+
63 }
+
64 #endif
+ +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
fvar< T > asin(const fvar< T > &x)
Definition: asin.hpp:12
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2asinh_8hpp.html b/doc/api/html/rev_2scal_2fun_2asinh_8hpp.html new file mode 100644 index 00000000000..53cfb9c1224 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2asinh_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/asinh.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
asinh.hpp File Reference
+
+
+
#include <math.h>
+#include <stan/math/rev/core.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <cmath>
+#include <valarray>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::asinh (const var &a)
 The inverse hyperbolic sine function for variables (C99). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2asinh_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2asinh_8hpp_source.html new file mode 100644 index 00000000000..bd32547559e --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2asinh_8hpp_source.html @@ -0,0 +1,154 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/asinh.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
asinh.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_ASINH_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_ASINH_HPP
+
3 
+
4 #include <math.h>
+
5 #include <stan/math/rev/core.hpp>
+
6 #include <boost/math/special_functions/fpclassify.hpp>
+
7 #include <cmath>
+
8 #include <valarray>
+
9 
+
10 #ifdef _MSC_VER
+
11 #include <boost/math/special_functions/asinh.hpp>
+
12 using boost::math::asinh;
+
13 #endif
+
14 
+
15 namespace stan {
+
16  namespace math {
+
17 
+
18  namespace {
+
19  class asinh_vari : public op_v_vari {
+
20  public:
+
21  asinh_vari(double val, vari* avi) :
+
22  op_v_vari(val, avi) {
+
23  }
+
24  void chain() {
+
25  avi_->adj_ += adj_ / std::sqrt(avi_->val_ * avi_->val_ + 1.0);
+
26  }
+
27  };
+
28  }
+
29 
+
67  inline var asinh(const var& a) {
+
68  if (boost::math::isinf(a.val()))
+
69  return var(new asinh_vari(a.val(), a.vi_));
+
70  return var(new asinh_vari(::asinh(a.val()), a.vi_));
+
71  }
+
72 
+
73  }
+
74 }
+
75 #endif
+ +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
bool isinf(const stan::math::var &v)
Checks if the given number is infinite.
Definition: boost_isinf.hpp:22
+
fvar< T > asinh(const fvar< T > &x)
Definition: asinh.hpp:13
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
var asinh(const var &a)
The inverse hyperbolic sine function for variables (C99).
Definition: asinh.hpp:67
+
double val() const
Return the value of this variable.
Definition: var.hpp:234
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2atan2_8hpp.html b/doc/api/html/rev_2scal_2fun_2atan2_8hpp.html new file mode 100644 index 00000000000..ee85f768592 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2atan2_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/atan2.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
atan2.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <cmath>
+#include <valarray>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

var stan::math::atan2 (const var &a, const var &b)
 Return the principal value of the arc tangent, in radians, of the first variable divided by the second (cmath). More...
 
var stan::math::atan2 (const var &a, const double b)
 Return the principal value of the arc tangent, in radians, of the first variable divided by the second scalar (cmath). More...
 
var stan::math::atan2 (const double a, const var &b)
 Return the principal value of the arc tangent, in radians, of the first scalar divided by the second variable (cmath). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2atan2_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2atan2_8hpp_source.html new file mode 100644 index 00000000000..db8411aa4ae --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2atan2_8hpp_source.html @@ -0,0 +1,174 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/atan2.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
atan2.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_ATAN2_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_ATAN2_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+
5 #include <cmath>
+
6 #include <valarray>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  namespace {
+
12  class atan2_vv_vari : public op_vv_vari {
+
13  public:
+
14  atan2_vv_vari(vari* avi, vari* bvi) :
+
15  op_vv_vari(std::atan2(avi->val_, bvi->val_), avi, bvi) {
+
16  }
+
17  void chain() {
+
18  double a_sq_plus_b_sq = (avi_->val_ * avi_->val_)
+
19  + (bvi_->val_ * bvi_->val_);
+
20  avi_->adj_ += adj_ * bvi_->val_ / a_sq_plus_b_sq;
+
21  bvi_->adj_ -= adj_ * avi_->val_ / a_sq_plus_b_sq;
+
22  }
+
23  };
+
24 
+
25  class atan2_vd_vari : public op_vd_vari {
+
26  public:
+
27  atan2_vd_vari(vari* avi, double b) :
+
28  op_vd_vari(std::atan2(avi->val_, b), avi, b) {
+
29  }
+
30  void chain() {
+
31  double a_sq_plus_b_sq = (avi_->val_ * avi_->val_) + (bd_ * bd_);
+
32  avi_->adj_ += adj_ * bd_ / a_sq_plus_b_sq;
+
33  }
+
34  };
+
35 
+
36  class atan2_dv_vari : public op_dv_vari {
+
37  public:
+
38  atan2_dv_vari(double a, vari* bvi) :
+
39  op_dv_vari(std::atan2(a, bvi->val_), a, bvi) {
+
40  }
+
41  void chain() {
+
42  double a_sq_plus_b_sq = (ad_ * ad_) + (bvi_->val_ * bvi_->val_);
+
43  bvi_->adj_ -= adj_ * ad_ / a_sq_plus_b_sq;
+
44  }
+
45  };
+
46  }
+
47 
+
62  inline var atan2(const var& a, const var& b) {
+
63  return var(new atan2_vv_vari(a.vi_, b.vi_));
+
64  }
+
65 
+
78  inline var atan2(const var& a, const double b) {
+
79  return var(new atan2_vd_vari(a.vi_, b));
+
80  }
+
81 
+
119  inline var atan2(const double a, const var& b) {
+
120  return var(new atan2_dv_vari(a, b.vi_));
+
121  }
+
122 
+
123  }
+
124 }
+
125 #endif
+ +
fvar< T > atan2(const fvar< T > &x1, const fvar< T > &x2)
Definition: atan2.hpp:12
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2atan_8hpp.html b/doc/api/html/rev_2scal_2fun_2atan_8hpp.html new file mode 100644 index 00000000000..ef9493b4437 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2atan_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/atan.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
atan.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <cmath>
+#include <valarray>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::atan (const var &a)
 Return the principal value of the arc tangent, in radians, of the specified variable (cmath). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2atan_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2atan_8hpp_source.html new file mode 100644 index 00000000000..9440d2cc718 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2atan_8hpp_source.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/atan.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
atan.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_ATAN_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_ATAN_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+
5 #include <cmath>
+
6 #include <valarray>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  namespace {
+
12  class atan_vari : public op_v_vari {
+
13  public:
+
14  explicit atan_vari(vari* avi) :
+
15  op_v_vari(std::atan(avi->val_), avi) {
+
16  }
+
17  void chain() {
+
18  avi_->adj_ += adj_ / (1.0 + (avi_->val_ * avi_->val_));
+
19  }
+
20  };
+
21  }
+
22 
+
55  inline var atan(const var& a) {
+
56  return var(new atan_vari(a.vi_));
+
57  }
+
58 
+
59  }
+
60 }
+
61 #endif
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
fvar< T > atan(const fvar< T > &x)
Definition: atan.hpp:12
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2atanh_8hpp.html b/doc/api/html/rev_2scal_2fun_2atanh_8hpp.html new file mode 100644 index 00000000000..0b2559e06b7 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2atanh_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/atanh.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
atanh.hpp File Reference
+
+
+
#include <math.h>
+#include <stan/math/rev/core.hpp>
+#include <cmath>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::atanh (const var &a)
 The inverse hyperbolic tangent function for variables (C99). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2atanh_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2atanh_8hpp_source.html new file mode 100644 index 00000000000..e30ae920aef --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2atanh_8hpp_source.html @@ -0,0 +1,155 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/atanh.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
atanh.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_ATANH_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_ATANH_HPP
+
3 
+
4 #include <math.h>
+
5 #include <stan/math/rev/core.hpp>
+
6 #include <cmath>
+
7 #include <limits>
+
8 
+
9 #ifdef _MSC_VER
+
10 #include <boost/math/special_functions/atanh.hpp>
+
11 using boost::math::atanh;
+
12 #endif
+
13 
+
14 namespace stan {
+
15  namespace math {
+
16 
+
17  namespace {
+
18  class atanh_vari : public op_v_vari {
+
19  public:
+
20  atanh_vari(double val, vari* avi) :
+
21  op_v_vari(val, avi) {
+
22  }
+
23  void chain() {
+
24  avi_->adj_ += adj_ / (1.0 - avi_->val_ * avi_->val_);
+
25  }
+
26  };
+
27  }
+
28 
+
70  inline var atanh(const var& a) {
+
71  if (a == 1.0)
+
72  return var(new atanh_vari(std::numeric_limits<double>::infinity(),
+
73  a.vi_));
+
74  if (a == -1.0)
+
75  return var(new atanh_vari(-std::numeric_limits<double>::infinity(),
+
76  a.vi_));
+
77  return var(new atanh_vari(::atanh(a.val()), a.vi_));
+
78  }
+
79 
+
80  }
+
81 }
+
82 #endif
+ +
fvar< T > atanh(const fvar< T > &x)
Definition: atanh.hpp:13
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
var atanh(const var &a)
The inverse hyperbolic tangent function for variables (C99).
Definition: atanh.hpp:70
+
double val() const
Return the value of this variable.
Definition: var.hpp:234
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2bessel__first__kind_8hpp.html b/doc/api/html/rev_2scal_2fun_2bessel__first__kind_8hpp.html new file mode 100644 index 00000000000..c46d3d23507 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2bessel__first__kind_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/bessel_first_kind.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
bessel_first_kind.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + +

+Functions

var stan::math::bessel_first_kind (const int &v, const var &a)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2bessel__first__kind_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2bessel__first__kind_8hpp_source.html new file mode 100644 index 00000000000..053db6bc33e --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2bessel__first__kind_8hpp_source.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/bessel_first_kind.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
bessel_first_kind.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_BESSEL_FIRST_KIND_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_BESSEL_FIRST_KIND_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ + +
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  namespace {
+
12 
+
13  class bessel_first_kind_dv_vari : public op_dv_vari {
+
14  public:
+
15  bessel_first_kind_dv_vari(int a, vari* bvi) :
+
16  op_dv_vari(stan::math::bessel_first_kind(a, bvi->val_), a, bvi) {
+
17  }
+
18  void chain() {
+
19  bvi_->adj_ += adj_
+
20  * (ad_ * stan::math::bessel_first_kind(ad_, bvi_->val_)
+
21  / bvi_->val_
+
22  - stan::math::bessel_first_kind(ad_ + 1, bvi_->val_));
+
23  }
+
24  };
+
25  }
+
26 
+
27  inline var bessel_first_kind(const int& v,
+
28  const var& a) {
+
29  return var(new bessel_first_kind_dv_vari(v, a.vi_));
+
30  }
+
31 
+
32  }
+
33 }
+
34 #endif
+ +
fvar< T > bessel_first_kind(int v, const fvar< T > &z)
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+ +
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2bessel__second__kind_8hpp.html b/doc/api/html/rev_2scal_2fun_2bessel__second__kind_8hpp.html new file mode 100644 index 00000000000..d291b85cf53 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2bessel__second__kind_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/bessel_second_kind.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
bessel_second_kind.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + +

+Functions

var stan::math::bessel_second_kind (const int &v, const var &a)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2bessel__second__kind_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2bessel__second__kind_8hpp_source.html new file mode 100644 index 00000000000..19fecd8d6f9 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2bessel__second__kind_8hpp_source.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/bessel_second_kind.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
bessel_second_kind.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_BESSEL_SECOND_KIND_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_BESSEL_SECOND_KIND_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ + +
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  namespace {
+
12 
+
13  class bessel_second_kind_dv_vari : public op_dv_vari {
+
14  public:
+
15  bessel_second_kind_dv_vari(int a, vari* bvi) :
+
16  op_dv_vari(stan::math::bessel_second_kind(a, bvi->val_), a, bvi) {
+
17  }
+
18  void chain() {
+
19  bvi_->adj_ += adj_
+
20  * (ad_ * stan::math::bessel_second_kind(ad_, bvi_->val_)
+
21  / bvi_->val_
+
22  - stan::math::bessel_second_kind(ad_ + 1, bvi_->val_));
+
23  }
+
24  };
+
25  }
+
26 
+
27  inline var bessel_second_kind(const int& v,
+
28  const var& a) {
+
29  return var(new bessel_second_kind_dv_vari(v, a.vi_));
+
30  }
+
31 
+
32  }
+
33 }
+
34 #endif
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
fvar< T > bessel_second_kind(int v, const fvar< T > &z)
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2binary__log__loss_8hpp.html b/doc/api/html/rev_2scal_2fun_2binary__log__loss_8hpp.html new file mode 100644 index 00000000000..cd4dfe5362d --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2binary__log__loss_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/binary_log_loss.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
binary_log_loss.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::binary_log_loss (const int y, const stan::math::var &y_hat)
 The log loss function for variables (stan). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2binary__log__loss_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2binary__log__loss_8hpp_source.html new file mode 100644 index 00000000000..97d87bb826b --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2binary__log__loss_8hpp_source.html @@ -0,0 +1,159 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/binary_log_loss.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
binary_log_loss.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_BINARY_LOG_LOSS_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_BINARY_LOG_LOSS_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ + +
7 #include <valarray>
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
12  namespace {
+
13  class binary_log_loss_1_vari : public op_v_vari {
+
14  public:
+
15  explicit binary_log_loss_1_vari(vari* avi) :
+
16  op_v_vari(-std::log(avi->val_), avi) {
+
17  }
+
18  void chain() {
+
19  avi_->adj_ -= adj_ / avi_->val_;
+
20  }
+
21  };
+
22 
+
23  class binary_log_loss_0_vari : public op_v_vari {
+
24  public:
+
25  explicit binary_log_loss_0_vari(vari* avi) :
+
26  op_v_vari(-stan::math::log1p(-avi->val_), avi) {
+
27  }
+
28  void chain() {
+
29  avi_->adj_ += adj_ / (1.0 - avi_->val_);
+
30  }
+
31  };
+
32  }
+
33 
+
68  inline var binary_log_loss(const int y, const stan::math::var& y_hat) {
+
69  if (y == 0)
+
70  return var(new binary_log_loss_0_vari(y_hat.vi_));
+
71  else
+
72  return var(new binary_log_loss_1_vari(y_hat.vi_));
+
73  }
+
74 
+
75  }
+
76 }
+
77 #endif
+ +
fvar< T > binary_log_loss(const int y, const fvar< T > &y_hat)
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
fvar< T > log1p(const fvar< T > &x)
Definition: log1p.hpp:16
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2cbrt_8hpp.html b/doc/api/html/rev_2scal_2fun_2cbrt_8hpp.html new file mode 100644 index 00000000000..5b5e9ab153f --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2cbrt_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/cbrt.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
cbrt.hpp File Reference
+
+
+
#include <math.h>
+#include <stan/math/rev/core.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::cbrt (const var &a)
 Returns the cube root of the specified variable (C99). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2cbrt_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2cbrt_8hpp_source.html new file mode 100644 index 00000000000..1c126e20c48 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2cbrt_8hpp_source.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/cbrt.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
cbrt.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_CBRT_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_CBRT_HPP
+
3 
+
4 #include <math.h>
+
5 #include <stan/math/rev/core.hpp>
+
6 
+
7 #ifdef _MSC_VER
+
8 #include <boost/math/special_functions/cbrt.hpp>
+ +
10 #endif
+
11 
+
12 
+
13 namespace stan {
+
14  namespace math {
+
15 
+
16  namespace {
+
17  class cbrt_vari : public op_v_vari {
+
18  public:
+
19  explicit cbrt_vari(vari* avi) :
+
20  op_v_vari(::cbrt(avi->val_), avi) {
+
21  }
+
22  void chain() {
+
23  avi_->adj_ += adj_ / (3.0 * val_ * val_);
+
24  }
+
25  };
+
26  }
+
27 
+
56  inline var cbrt(const var& a) {
+
57  return var(new cbrt_vari(a.vi_));
+
58  }
+
59 
+
60  }
+
61 }
+
62 #endif
+ +
fvar< T > cbrt(const fvar< T > &x)
Definition: cbrt.hpp:14
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
var cbrt(const var &a)
Returns the cube root of the specified variable (C99).
Definition: cbrt.hpp:56
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2ceil_8hpp.html b/doc/api/html/rev_2scal_2fun_2ceil_8hpp.html new file mode 100644 index 00000000000..d730f92ed7b --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2ceil_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/ceil.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
ceil.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <stan/math/prim/scal/meta/likely.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <cmath>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::ceil (const var &a)
 Return the ceiling of the specified variable (cmath). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2ceil_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2ceil_8hpp_source.html new file mode 100644 index 00000000000..b005426425f --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2ceil_8hpp_source.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/ceil.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
ceil.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_CEIL_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_CEIL_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ +
6 #include <boost/math/special_functions/fpclassify.hpp>
+
7 #include <cmath>
+
8 #include <limits>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
13  namespace {
+
14  class ceil_vari : public op_v_vari {
+
15  public:
+
16  explicit ceil_vari(vari* avi) :
+
17  op_v_vari(std::ceil(avi->val_), avi) {
+
18  }
+
19  void chain() {
+
20  if (unlikely(boost::math::isnan(avi_->val_)))
+
21  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
22  }
+
23  };
+
24  }
+
25 
+
60  inline var ceil(const var& a) {
+
61  return var(new ceil_vari(a.vi_));
+
62  }
+
63 
+
64  }
+
65 }
+
66 #endif
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
+
#define unlikely(x)
Definition: likely.hpp:9
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
fvar< T > ceil(const fvar< T > &x)
Definition: ceil.hpp:11
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2cos_8hpp.html b/doc/api/html/rev_2scal_2fun_2cos_8hpp.html new file mode 100644 index 00000000000..ecad9e4a827 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2cos_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/cos.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
cos.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::cos (const var &a)
 Return the cosine of a radian-scaled variable (cmath). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2cos_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2cos_8hpp_source.html new file mode 100644 index 00000000000..69f3d970c2e --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2cos_8hpp_source.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/cos.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
cos.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_COS_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_COS_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+
5 #include <cmath>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  namespace {
+
11  class cos_vari : public op_v_vari {
+
12  public:
+
13  explicit cos_vari(vari* avi) :
+
14  op_v_vari(std::cos(avi->val_), avi) {
+
15  }
+
16  void chain() {
+
17  avi_->adj_ -= adj_ * std::sin(avi_->val_);
+
18  }
+
19  };
+
20  }
+
21 
+
49  inline var cos(const var& a) {
+
50  return var(new cos_vari(a.vi_));
+
51  }
+
52 
+
53  }
+
54 }
+
55 #endif
+
fvar< T > cos(const fvar< T > &x)
Definition: cos.hpp:13
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
fvar< T > sin(const fvar< T > &x)
Definition: sin.hpp:14
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2cosh_8hpp.html b/doc/api/html/rev_2scal_2fun_2cosh_8hpp.html new file mode 100644 index 00000000000..1c007efb286 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2cosh_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/cosh.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
cosh.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <cmath>
+#include <valarray>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::cosh (const var &a)
 Return the hyperbolic cosine of the specified variable (cmath). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2cosh_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2cosh_8hpp_source.html new file mode 100644 index 00000000000..2cdc2d5adc4 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2cosh_8hpp_source.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/cosh.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
cosh.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_COSH_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_COSH_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+
5 #include <cmath>
+
6 #include <valarray>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  namespace {
+
12  class cosh_vari : public op_v_vari {
+
13  public:
+
14  explicit cosh_vari(vari* avi) :
+
15  op_v_vari(std::cosh(avi->val_), avi) {
+
16  }
+
17  void chain() {
+
18  avi_->adj_ += adj_ * std::sinh(avi_->val_);
+
19  }
+
20  };
+
21  }
+
22 
+
50  inline var cosh(const var& a) {
+
51  return var(new cosh_vari(a.vi_));
+
52  }
+
53 
+
54  }
+
55 }
+
56 #endif
+ +
fvar< T > cosh(const fvar< T > &x)
Definition: cosh.hpp:13
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
fvar< T > sinh(const fvar< T > &x)
Definition: sinh.hpp:14
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2digamma_8hpp.html b/doc/api/html/rev_2scal_2fun_2digamma_8hpp.html new file mode 100644 index 00000000000..8a11a0456dd --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2digamma_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/digamma.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
digamma.hpp File Reference
+
+
+
#include <boost/math/special_functions/zeta.hpp>
+#include <stan/math/rev/core.hpp>
+#include <stan/math/prim/scal/fun/trigamma.hpp>
+#include <stan/math/prim/scal/fun/digamma.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + +

+Functions

var stan::math::digamma (const stan::math::var &a)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2digamma_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2digamma_8hpp_source.html new file mode 100644 index 00000000000..ff899ff57bd --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2digamma_8hpp_source.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/digamma.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
digamma.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_DIGAMMA_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_DIGAMMA_HPP
+
3 
+
4 #include <boost/math/special_functions/zeta.hpp>
+
5 #include <stan/math/rev/core.hpp>
+ + +
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
12  namespace {
+
13  class digamma_vari : public op_v_vari {
+
14  public:
+
15  explicit digamma_vari(vari* avi) :
+
16  op_v_vari(digamma(avi->val_), avi) {
+
17  }
+
18  void chain() {
+
19  avi_->adj_ += adj_ * trigamma(avi_->val_);
+
20  }
+
21  };
+
22  }
+
23 
+
24  inline var digamma(const stan::math::var& a) {
+
25  return var(new digamma_vari(a.vi_));
+
26  }
+
27 
+
28  }
+
29 }
+
30 #endif
+
T trigamma(T x)
Definition: trigamma.hpp:50
+ + +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2erf_8hpp.html b/doc/api/html/rev_2scal_2fun_2erf_8hpp.html new file mode 100644 index 00000000000..4cd7f196215 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2erf_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/erf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
erf.hpp File Reference
+
+
+
#include <math.h>
+#include <stan/math/rev/core.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <cmath>
+#include <valarray>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::erf (const var &a)
 The error function for variables (C99). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2erf_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2erf_8hpp_source.html new file mode 100644 index 00000000000..9fcf4636a19 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2erf_8hpp_source.html @@ -0,0 +1,153 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/erf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
erf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_ERF_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_ERF_HPP
+
3 
+
4 #include <math.h>
+
5 #include <stan/math/rev/core.hpp>
+ +
7 #include <cmath>
+
8 #include <valarray>
+
9 
+
10 #ifdef _MSC_VER
+
11 #include <boost/math/special_functions/erf.hpp>
+
12 using boost::math::erf;
+
13 #endif
+
14 
+
15 namespace stan {
+
16  namespace math {
+
17 
+
18  namespace {
+
19  class erf_vari : public op_v_vari {
+
20  public:
+
21  explicit erf_vari(vari* avi) :
+
22  op_v_vari(::erf(avi->val_), avi) {
+
23  }
+
24  void chain() {
+
25  avi_->adj_ += adj_ * stan::math::TWO_OVER_SQRT_PI
+
26  * std::exp(- avi_->val_ * avi_->val_);
+
27  }
+
28  };
+
29  }
+
30 
+
68  inline var erf(const var& a) {
+
69  return var(new erf_vari(a.vi_));
+
70  }
+
71 
+
72  }
+
73 }
+
74 #endif
+
var erf(const var &a)
The error function for variables (C99).
Definition: erf.hpp:68
+ +
fvar< T > erf(const fvar< T > &x)
Definition: erf.hpp:14
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
const double TWO_OVER_SQRT_PI
Definition: constants.hpp:161
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2erfc_8hpp.html b/doc/api/html/rev_2scal_2fun_2erfc_8hpp.html new file mode 100644 index 00000000000..5eec9c6c104 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2erfc_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/erfc.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
erfc.hpp File Reference
+
+
+
#include <math.h>
+#include <stan/math/rev/core.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <cmath>
+#include <valarray>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::erfc (const var &a)
 The complementary error function for variables (C99). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2erfc_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2erfc_8hpp_source.html new file mode 100644 index 00000000000..8d0aa796c61 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2erfc_8hpp_source.html @@ -0,0 +1,153 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/erfc.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
erfc.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_ERFC_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_ERFC_HPP
+
3 
+
4 #include <math.h>
+
5 #include <stan/math/rev/core.hpp>
+ +
7 #include <cmath>
+
8 #include <valarray>
+
9 
+
10 #ifdef _MSC_VER
+
11 #include <boost/math/special_functions/erf.hpp>
+
12 using boost::math::erfc;
+
13 #endif
+
14 
+
15 namespace stan {
+
16  namespace math {
+
17 
+
18  namespace {
+
19  class erfc_vari : public op_v_vari {
+
20  public:
+
21  explicit erfc_vari(vari* avi) :
+
22  op_v_vari(::erfc(avi->val_), avi) {
+
23  }
+
24  void chain() {
+
25  avi_->adj_ += adj_ * stan::math::NEG_TWO_OVER_SQRT_PI
+
26  * std::exp(- avi_->val_ * avi_->val_);
+
27  }
+
28  };
+
29  }
+
30 
+
68  inline var erfc(const var& a) {
+
69  return var(new erfc_vari(a.vi_));
+
70  }
+
71 
+
72  }
+
73 }
+
74 #endif
+ +
var erfc(const var &a)
The complementary error function for variables (C99).
Definition: erfc.hpp:68
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
const double NEG_TWO_OVER_SQRT_PI
Definition: constants.hpp:163
+ +
fvar< T > erfc(const fvar< T > &x)
Definition: erfc.hpp:14
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2exp2_8hpp.html b/doc/api/html/rev_2scal_2fun_2exp2_8hpp.html new file mode 100644 index 00000000000..cdd6e759ffc --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2exp2_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/exp2.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
exp2.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <cmath>
+#include <valarray>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::exp2 (const var &a)
 Exponentiation base 2 function for variables (C99). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2exp2_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2exp2_8hpp_source.html new file mode 100644 index 00000000000..86f0972b033 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2exp2_8hpp_source.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/exp2.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
exp2.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_EXP2_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_EXP2_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ +
6 #include <cmath>
+
7 #include <valarray>
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
12  namespace {
+
13  class exp2_vari : public op_v_vari {
+
14  public:
+
15  explicit exp2_vari(vari* avi) :
+
16  op_v_vari(std::pow(2.0, avi->val_), avi) {
+
17  }
+
18  void chain() {
+
19  avi_->adj_ += adj_ * val_ * stan::math::LOG_2;
+
20  }
+
21  };
+
22  }
+
23 
+
52  inline var exp2(const var& a) {
+
53  return var(new exp2_vari(a.vi_));
+
54  }
+
55 
+
56  }
+
57 }
+
58 #endif
+
const double LOG_2
The natural logarithm of 2, .
Definition: constants.hpp:33
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
fvar< T > exp2(const fvar< T > &x)
Definition: exp2.hpp:14
+ +
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2exp_8hpp.html b/doc/api/html/rev_2scal_2fun_2exp_8hpp.html new file mode 100644 index 00000000000..a703ffad6d6 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2exp_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/exp.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
exp.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::exp (const var &a)
 Return the exponentiation of the specified variable (cmath). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2exp_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2exp_8hpp_source.html new file mode 100644 index 00000000000..f13c7bace74 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2exp_8hpp_source.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/exp.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
exp.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_EXP_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_EXP_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+
5 #include <cmath>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  namespace {
+
11  class exp_vari : public op_v_vari {
+
12  public:
+
13  explicit exp_vari(vari* avi) :
+
14  op_v_vari(std::exp(avi->val_), avi) {
+
15  }
+
16  void chain() {
+
17  avi_->adj_ += adj_ * val_;
+
18  }
+
19  };
+
20  }
+
21 
+
44  inline var exp(const var& a) {
+
45  return var(new exp_vari(a.vi_));
+
46  }
+
47 
+
48  }
+
49 }
+
50 #endif
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2expm1_8hpp.html b/doc/api/html/rev_2scal_2fun_2expm1_8hpp.html new file mode 100644 index 00000000000..3f4f5c5fecb --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2expm1_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/expm1.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
expm1.hpp File Reference
+
+
+
#include <math.h>
+#include <stan/math/rev/core.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <cmath>
+#include <valarray>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::expm1 (const stan::math::var &a)
 The exponentiation of the specified variable minus 1 (C99). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2expm1_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2expm1_8hpp_source.html new file mode 100644 index 00000000000..8fc8100c9bd --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2expm1_8hpp_source.html @@ -0,0 +1,150 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/expm1.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
expm1.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_EXPM1_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_EXPM1_HPP
+
3 
+
4 #include <math.h>
+
5 #include <stan/math/rev/core.hpp>
+ +
7 #include <cmath>
+
8 #include <valarray>
+
9 
+
10 #ifdef _MSC_VER
+
11 #include <boost/math/special_functions/expm1.hpp>
+
12 using boost::math::expm1;
+
13 #endif
+
14 
+
15 namespace stan {
+
16  namespace math {
+
17 
+
18  namespace {
+
19  class expm1_vari : public op_v_vari {
+
20  public:
+
21  explicit expm1_vari(vari* avi) :
+
22  op_v_vari(::expm1(avi->val_), avi) {
+
23  }
+
24  void chain() {
+
25  avi_->adj_ += adj_ * (val_ + 1.0);
+
26  }
+
27  };
+
28  }
+
29 
+
57  inline var expm1(const stan::math::var& a) {
+
58  return var(new expm1_vari(a.vi_));
+
59  }
+
60 
+
61  }
+
62 }
+
63 #endif
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
var expm1(const stan::math::var &a)
The exponentiation of the specified variable minus 1 (C99).
Definition: expm1.hpp:57
+
fvar< T > expm1(const fvar< T > &x)
Definition: expm1.hpp:12
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2fabs_8hpp.html b/doc/api/html/rev_2scal_2fun_2fabs_8hpp.html new file mode 100644 index 00000000000..183d1d1eb73 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2fabs_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/fabs.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
fabs.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::fabs (const var &a)
 Return the absolute value of the variable (cmath). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2fabs_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2fabs_8hpp_source.html new file mode 100644 index 00000000000..35c619a1868 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2fabs_8hpp_source.html @@ -0,0 +1,143 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/fabs.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
fabs.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_FABS_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_FABS_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ +
6 
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
50  inline var fabs(const var& a) {
+ +
52  // cut-and-paste from abs()
+
53  if (a.val() > 0.0)
+
54  return a;
+
55  else if (a.val() < 0.0)
+
56  return var(new neg_vari(a.vi_));
+
57  else if (a.val() == 0)
+
58  return var(new vari(0));
+
59  else
+ +
61  }
+
62 
+
63  }
+
64 }
+
65 #endif
+ +
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:14
+
const double NOT_A_NUMBER
(Quiet) not-a-number value.
Definition: constants.hpp:56
+
The variable implementation base class.
Definition: vari.hpp:28
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ + +
double val() const
Return the value of this variable.
Definition: var.hpp:234
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2falling__factorial_8hpp.html b/doc/api/html/rev_2scal_2fun_2falling__factorial_8hpp.html new file mode 100644 index 00000000000..1730e00c854 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2falling__factorial_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/falling_factorial.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
falling_factorial.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <stan/math/prim/scal/fun/falling_factorial.hpp>
+#include <boost/math/special_functions/digamma.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

var stan::math::falling_factorial (const var &a, const double &b)
 
var stan::math::falling_factorial (const var &a, const var &b)
 
var stan::math::falling_factorial (const double &a, const var &b)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2falling__factorial_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2falling__factorial_8hpp_source.html new file mode 100644 index 00000000000..7b4b0fae5d9 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2falling__factorial_8hpp_source.html @@ -0,0 +1,182 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/falling_factorial.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
falling_factorial.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_FALLING_FACTORIAL_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_FALLING_FACTORIAL_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ +
6 #include <boost/math/special_functions/digamma.hpp>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  namespace {
+
12 
+
13  class falling_factorial_vv_vari : public op_vv_vari {
+
14  public:
+
15  falling_factorial_vv_vari(vari* avi, vari* bvi) :
+
16  op_vv_vari(stan::math::falling_factorial(avi->val_, bvi->val_),
+
17  avi, bvi) {
+
18  }
+
19  void chain() {
+
20  avi_->adj_ += adj_
+
21  * stan::math::falling_factorial(avi_->val_, bvi_->val_)
+
22  * boost::math::digamma(avi_->val_ + 1);
+
23  bvi_->adj_ -= adj_
+
24  * stan::math::falling_factorial(avi_->val_, bvi_->val_)
+
25  * boost::math::digamma(bvi_->val_ + 1);
+
26  }
+
27  };
+
28 
+
29  class falling_factorial_vd_vari : public op_vd_vari {
+
30  public:
+
31  falling_factorial_vd_vari(vari* avi, double b) :
+
32  op_vd_vari(stan::math::falling_factorial(avi->val_, b), avi, b) {
+
33  }
+
34  void chain() {
+
35  avi_->adj_ += adj_ * stan::math::falling_factorial(avi_->val_, bd_)
+
36  * boost::math::digamma(avi_->val_ + 1);
+
37  }
+
38  };
+
39 
+
40  class falling_factorial_dv_vari : public op_dv_vari {
+
41  public:
+
42  falling_factorial_dv_vari(double a, vari* bvi) :
+
43  op_dv_vari(stan::math::falling_factorial(a, bvi->val_), a, bvi) {
+
44  }
+
45  void chain() {
+
46  bvi_->adj_ += adj_ * -stan::math::falling_factorial(ad_, bvi_->val_)
+
47  * boost::math::digamma(bvi_->val_ + 1);
+
48  }
+
49  };
+
50  }
+
51 
+
52  inline var falling_factorial(const var& a,
+
53  const double& b) {
+
54  return var(new falling_factorial_vd_vari(a.vi_, b));
+
55  }
+
56 
+
57  inline var falling_factorial(const var& a,
+
58  const var& b) {
+
59  return var(new falling_factorial_vv_vari(a.vi_, b.vi_));
+
60  }
+
61 
+
62  inline var falling_factorial(const double& a,
+
63  const var& b) {
+
64  return var(new falling_factorial_dv_vari(a, b.vi_));
+
65  }
+
66  }
+
67 }
+
68 #endif
+ + +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
fvar< T > falling_factorial(const fvar< T > &x, const fvar< T > &n)
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2fdim_8hpp.html b/doc/api/html/rev_2scal_2fun_2fdim_8hpp.html new file mode 100644 index 00000000000..c6eb46bbd67 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2fdim_8hpp.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/fdim.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
fdim.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <stan/math/prim/scal/meta/likely.hpp>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

var stan::math::fdim (const stan::math::var &a, const stan::math::var &b)
 Return the positive difference between the first variable's the value and the second's (C99). More...
 
var stan::math::fdim (const double &a, const stan::math::var &b)
 Return the positive difference between the first value and the value of the second variable (C99). More...
 
var stan::math::fdim (const stan::math::var &a, const double &b)
 Return the positive difference between the first variable's value and the second value (C99). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2fdim_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2fdim_8hpp_source.html new file mode 100644 index 00000000000..39dd834ee02 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2fdim_8hpp_source.html @@ -0,0 +1,200 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/fdim.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
fdim.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_FDIM_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_FDIM_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+
5 #include <boost/math/special_functions/fpclassify.hpp>
+ +
7 #include <limits>
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
12  namespace {
+
13  class fdim_vv_vari : public op_vv_vari {
+
14  public:
+
15  fdim_vv_vari(vari* avi, vari* bvi) :
+
16  op_vv_vari(avi->val_ - bvi->val_, avi, bvi) {
+
17  }
+
18  void chain() {
+
19  if (unlikely(boost::math::isnan(avi_->val_)
+
20  || boost::math::isnan(bvi_->val_))) {
+
21  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
22  bvi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
23  } else {
+
24  avi_->adj_ += adj_;
+
25  bvi_->adj_ -= adj_;
+
26  }
+
27  }
+
28  };
+
29 
+
30  class fdim_vd_vari : public op_vd_vari {
+
31  public:
+
32  fdim_vd_vari(vari* avi, double b) :
+
33  op_vd_vari(avi->val_ - b, avi, b) {
+
34  }
+
35  void chain() {
+
36  if (unlikely(boost::math::isnan(avi_->val_)
+
37  || boost::math::isnan(bd_)))
+
38  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
39  else
+
40  avi_->adj_ += adj_;
+
41  }
+
42  };
+
43 
+
44  class fdim_dv_vari : public op_dv_vari {
+
45  public:
+
46  fdim_dv_vari(double a, vari* bvi) :
+
47  op_dv_vari(a - bvi->val_, a, bvi) {
+
48  }
+
49  void chain() {
+
50  if (unlikely(boost::math::isnan(bvi_->val_)
+
51  || boost::math::isnan(ad_)))
+
52  bvi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
53  else
+
54  bvi_->adj_ -= adj_;
+
55  }
+
56  };
+
57  }
+
58 
+
110  inline var fdim(const stan::math::var& a,
+
111  const stan::math::var& b) {
+
112  if (!(a.vi_->val_ <= b.vi_->val_))
+
113  return var(new fdim_vv_vari(a.vi_, b.vi_));
+
114  else
+
115  return var(new vari(0.0));
+
116  }
+
117 
+
135  inline var fdim(const double& a,
+
136  const stan::math::var& b) {
+
137  return a <= b.vi_->val_
+
138  ? var(new vari(0.0))
+
139  : var(new fdim_dv_vari(a, b.vi_));
+
140  }
+
141 
+
158  inline var fdim(const stan::math::var& a,
+
159  const double& b) {
+
160  return a.vi_->val_ <= b
+
161  ? var(new vari(0.0))
+
162  : var(new fdim_vd_vari(a.vi_, b));
+
163  }
+
164 
+
165  }
+
166 }
+
167 #endif
+ +
The variable implementation base class.
Definition: vari.hpp:28
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
const double val_
The value of this variable.
Definition: vari.hpp:36
+
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
+
#define unlikely(x)
Definition: likely.hpp:9
+
fvar< T > fdim(const fvar< T > &x1, const fvar< T > &x2)
Definition: fdim.hpp:11
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2floor_8hpp.html b/doc/api/html/rev_2scal_2fun_2floor_8hpp.html new file mode 100644 index 00000000000..6cd7c02c6fb --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2floor_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/floor.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
floor.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <stan/math/prim/scal/meta/likely.hpp>
+#include <cmath>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::floor (const var &a)
 Return the floor of the specified variable (cmath). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2floor_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2floor_8hpp_source.html new file mode 100644 index 00000000000..976c9add177 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2floor_8hpp_source.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/floor.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
floor.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_FLOOR_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_FLOOR_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+
5 #include <boost/math/special_functions/fpclassify.hpp>
+ +
7 #include <cmath>
+
8 #include <limits>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
13  namespace {
+
14  class floor_vari : public op_v_vari {
+
15  public:
+
16  explicit floor_vari(vari* avi) :
+
17  op_v_vari(std::floor(avi->val_), avi) {
+
18  }
+
19  void chain() {
+
20  if (unlikely(boost::math::isnan(avi_->val_)))
+
21  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
22  }
+
23  };
+
24  }
+
25 
+
60  inline var floor(const var& a) {
+
61  return var(new floor_vari(a.vi_));
+
62  }
+
63 
+
64  }
+
65 }
+
66 #endif
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
+
#define unlikely(x)
Definition: likely.hpp:9
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
fvar< T > floor(const fvar< T > &x)
Definition: floor.hpp:11
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2fma_8hpp.html b/doc/api/html/rev_2scal_2fun_2fma_8hpp.html new file mode 100644 index 00000000000..f2afb8c0d0c --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2fma_8hpp.html @@ -0,0 +1,153 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/fma.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
fma.hpp File Reference
+
+
+
#include <math.h>
+#include <stan/math/rev/core.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <stan/math/prim/scal/meta/likely.hpp>
+#include <valarray>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + + + + + + + + + + +

+Functions

var stan::math::fma (const stan::math::var &a, const stan::math::var &b, const stan::math::var &c)
 The fused multiply-add function for three variables (C99). More...
 
var stan::math::fma (const stan::math::var &a, const stan::math::var &b, const double &c)
 The fused multiply-add function for two variables and a value (C99). More...
 
var stan::math::fma (const stan::math::var &a, const double &b, const stan::math::var &c)
 The fused multiply-add function for a variable, value, and variable (C99). More...
 
var stan::math::fma (const stan::math::var &a, const double &b, const double &c)
 The fused multiply-add function for a variable and two values (C99). More...
 
var stan::math::fma (const double &a, const stan::math::var &b, const double &c)
 The fused multiply-add function for a value, variable, and value (C99). More...
 
var stan::math::fma (const double &a, const double &b, const stan::math::var &c)
 The fused multiply-add function for two values and a variable, and value (C99). More...
 
var stan::math::fma (const double &a, const stan::math::var &b, const stan::math::var &c)
 The fused multiply-add function for a value and two variables (C99). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2fma_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2fma_8hpp_source.html new file mode 100644 index 00000000000..61fc3969283 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2fma_8hpp_source.html @@ -0,0 +1,276 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/fma.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
fma.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_FMA_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_FMA_HPP
+
3 
+
4 #include <math.h>
+
5 #include <stan/math/rev/core.hpp>
+ +
7 #include <boost/math/special_functions/fpclassify.hpp>
+ +
9 #include <valarray>
+
10 #include <limits>
+
11 
+
12 #ifdef _MSC_VER
+
13 template<typename T>
+
14 T fma(T x, T y, T z) {
+
15  return x*y+z;
+
16 }
+
17 #endif
+
18 
+
19 namespace stan {
+
20  namespace math {
+
21 
+
22  namespace {
+
23  class fma_vvv_vari : public op_vvv_vari {
+
24  public:
+
25  fma_vvv_vari(vari* avi, vari* bvi, vari* cvi) :
+
26  op_vvv_vari(::fma(avi->val_, bvi->val_, cvi->val_),
+
27  avi, bvi, cvi) {
+
28  }
+
29  void chain() {
+
30  if (unlikely(boost::math::isnan(avi_->val_)
+
31  || boost::math::isnan(bvi_->val_)
+
32  || boost::math::isnan(cvi_->val_))) {
+
33  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
34  bvi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
35  cvi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
36  } else {
+
37  avi_->adj_ += adj_ * bvi_->val_;
+
38  bvi_->adj_ += adj_ * avi_->val_;
+
39  cvi_->adj_ += adj_;
+
40  }
+
41  }
+
42  };
+
43 
+
44  class fma_vvd_vari : public op_vvd_vari {
+
45  public:
+
46  fma_vvd_vari(vari* avi, vari* bvi, double c) :
+
47  op_vvd_vari(::fma(avi->val_, bvi->val_, c),
+
48  avi, bvi, c) {
+
49  }
+
50  void chain() {
+
51  if (unlikely(boost::math::isnan(avi_->val_)
+
52  || boost::math::isnan(bvi_->val_)
+
53  || boost::math::isnan(cd_))) {
+
54  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
55  bvi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
56  } else {
+
57  avi_->adj_ += adj_ * bvi_->val_;
+
58  bvi_->adj_ += adj_ * avi_->val_;
+
59  }
+
60  }
+
61  };
+
62 
+
63  class fma_vdv_vari : public op_vdv_vari {
+
64  public:
+
65  fma_vdv_vari(vari* avi, double b, vari* cvi) :
+
66  op_vdv_vari(::fma(avi->val_ , b, cvi->val_),
+
67  avi, b, cvi) {
+
68  }
+
69  void chain() {
+
70  if (unlikely(boost::math::isnan(avi_->val_)
+
71  || boost::math::isnan(cvi_->val_)
+
72  || boost::math::isnan(bd_))) {
+
73  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
74  cvi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
75  } else {
+
76  avi_->adj_ += adj_ * bd_;
+
77  cvi_->adj_ += adj_;
+
78  }
+
79  }
+
80  };
+
81 
+
82  class fma_vdd_vari : public op_vdd_vari {
+
83  public:
+
84  fma_vdd_vari(vari* avi, double b, double c) :
+
85  op_vdd_vari(::fma(avi->val_ , b, c),
+
86  avi, b, c) {
+
87  }
+
88  void chain() {
+
89  if (unlikely(boost::math::isnan(avi_->val_)
+
90  || boost::math::isnan(bd_)
+
91  || boost::math::isnan(cd_)))
+
92  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
93  else
+
94  avi_->adj_ += adj_ * bd_;
+
95  }
+
96  };
+
97 
+
98  class fma_ddv_vari : public op_ddv_vari {
+
99  public:
+
100  fma_ddv_vari(double a, double b, vari* cvi) :
+
101  op_ddv_vari(::fma(a, b, cvi->val_),
+
102  a, b, cvi) {
+
103  }
+
104  void chain() {
+
105  if (unlikely(boost::math::isnan(cvi_->val_)
+
106  || boost::math::isnan(ad_)
+
107  || boost::math::isnan(bd_)))
+
108  cvi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
109  else
+
110  cvi_->adj_ += adj_;
+
111  }
+
112  };
+
113  }
+
114 
+
136  inline var fma(const stan::math::var& a,
+
137  const stan::math::var& b,
+
138  const stan::math::var& c) {
+
139  return var(new fma_vvv_vari(a.vi_, b.vi_, c.vi_));
+
140  }
+
141 
+
161  inline var fma(const stan::math::var& a,
+
162  const stan::math::var& b,
+
163  const double& c) {
+
164  return var(new fma_vvd_vari(a.vi_, b.vi_, c));
+
165  }
+
166 
+
186  inline var fma(const stan::math::var& a,
+
187  const double& b,
+
188  const stan::math::var& c) {
+
189  return var(new fma_vdv_vari(a.vi_, b, c.vi_));
+
190  }
+
191 
+
209  inline var fma(const stan::math::var& a,
+
210  const double& b,
+
211  const double& c) {
+
212  return var(new fma_vdd_vari(a.vi_, b, c));
+
213  }
+
214 
+
232  inline var fma(const double& a,
+
233  const stan::math::var& b,
+
234  const double& c) {
+
235  return var(new fma_vdd_vari(b.vi_, a, c));
+
236  }
+
237 
+
255  inline var fma(const double& a,
+
256  const double& b,
+
257  const stan::math::var& c) {
+
258  return var(new fma_ddv_vari(a, b, c.vi_));
+
259  }
+
260 
+
280  inline var fma(const double& a,
+
281  const stan::math::var& b,
+
282  const stan::math::var& c) {
+
283  return var(new fma_vdv_vari(b.vi_, a, c.vi_)); // a-b symmetry
+
284  }
+
285 
+
286  }
+
287 }
+
288 #endif
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
+
#define unlikely(x)
Definition: likely.hpp:9
+
fvar< typename stan::return_type< T1, T2, T3 >::type > fma(const fvar< T1 > &x1, const fvar< T2 > &x2, const fvar< T3 > &x3)
The fused multiply-add operation (C99).
Definition: fma.hpp:61
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ + +
var fma(const double &a, const stan::math::var &b, const stan::math::var &c)
The fused multiply-add function for a value and two variables (C99).
Definition: fma.hpp:280
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2fmax_8hpp.html b/doc/api/html/rev_2scal_2fun_2fmax_8hpp.html new file mode 100644 index 00000000000..e573f01f272 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2fmax_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/fmax.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
fmax.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <stan/math/rev/scal/fun/is_nan.hpp>
+#include <stan/math/prim/scal/fun/is_nan.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/meta/likely.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

var stan::math::fmax (const stan::math::var &a, const stan::math::var &b)
 Returns the maximum of the two variable arguments (C99). More...
 
var stan::math::fmax (const stan::math::var &a, const double &b)
 Returns the maximum of the variable and scalar, promoting the scalar to a variable if it is larger (C99). More...
 
var stan::math::fmax (const double &a, const stan::math::var &b)
 Returns the maximum of a scalar and variable, promoting the scalar to a variable if it is larger (C99). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2fmax_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2fmax_8hpp_source.html new file mode 100644 index 00000000000..4630f347442 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2fmax_8hpp_source.html @@ -0,0 +1,191 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/fmax.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
fmax.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_FMAX_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_FMAX_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ + +
7 #include <boost/math/special_functions/fpclassify.hpp>
+ + +
10 
+
11 namespace stan {
+
12 
+
13  namespace math {
+
14 
+
63  inline var fmax(const stan::math::var& a,
+
64  const stan::math::var& b) {
+ +
66  if (unlikely(is_nan(a))) {
+
67  if (unlikely(is_nan(b)))
+
68  return var(new precomp_vv_vari(NOT_A_NUMBER,
+
69  a.vi_, b.vi_,
+ +
71 
+
72  return b;
+
73  }
+
74 
+
75  if (unlikely(is_nan(b)))
+
76  return a;
+
77 
+
78  return a > b ? a : b;
+
79  }
+
80 
+
95  inline var fmax(const stan::math::var& a,
+
96  const double& b) {
+ +
98  if (unlikely(is_nan(a))) {
+
99  if (unlikely(is_nan(b)))
+ +
101  a.vi_,
+ +
103 
+
104  return var(b);
+
105  }
+
106 
+
107  if (unlikely(is_nan(b)))
+
108  return a;
+
109 
+
110  return a >= b ? a : var(b);
+
111  }
+
112 
+
127  inline var fmax(const double& a,
+
128  const stan::math::var& b) {
+ +
130  if (unlikely(is_nan(b))) {
+
131  if (unlikely(is_nan(a)))
+ +
133  b.vi_,
+ +
135  return var(a);
+
136  }
+
137 
+
138  if (unlikely(is_nan(a)))
+
139  return b;
+
140 
+
141  return a > b ? var(a) : b;
+
142  }
+
143 
+
144  }
+
145 }
+
146 #endif
+ +
const double NOT_A_NUMBER
(Quiet) not-a-number value.
Definition: constants.hpp:56
+ + +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
#define unlikely(x)
Definition: likely.hpp:9
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ + + +
int is_nan(const fvar< T > &x)
Returns 1 if the input's value is NaN and 0 otherwise.
Definition: is_nan.hpp:22
+
fvar< T > fmax(const fvar< T > &x1, const fvar< T > &x2)
Definition: fmax.hpp:13
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2fmin_8hpp.html b/doc/api/html/rev_2scal_2fun_2fmin_8hpp.html new file mode 100644 index 00000000000..573ce201a8e --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2fmin_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/fmin.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
fmin.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/meta/likely.hpp>
+#include <stan/math/rev/scal/fun/is_nan.hpp>
+#include <stan/math/prim/scal/fun/is_nan.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

var stan::math::fmin (const stan::math::var &a, const stan::math::var &b)
 Returns the minimum of the two variable arguments (C99). More...
 
var stan::math::fmin (const stan::math::var &a, double b)
 Returns the minimum of the variable and scalar, promoting the scalar to a variable if it is larger (C99). More...
 
var stan::math::fmin (double a, const stan::math::var &b)
 Returns the minimum of a scalar and variable, promoting the scalar to a variable if it is larger (C99). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2fmin_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2fmin_8hpp_source.html new file mode 100644 index 00000000000..83c32c14590 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2fmin_8hpp_source.html @@ -0,0 +1,190 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/fmin.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
fmin.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_FMIN_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_FMIN_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+
5 #include <boost/math/special_functions/fpclassify.hpp>
+ + + + +
10 
+
11 namespace stan {
+
12 
+
13  namespace math {
+
14 
+
59  inline var fmin(const stan::math::var& a,
+
60  const stan::math::var& b) {
+ +
62  if (unlikely(is_nan(a))) {
+
63  if (unlikely(is_nan(b)))
+
64  return var(new precomp_vv_vari(NOT_A_NUMBER,
+
65  a.vi_, b.vi_,
+ +
67  return b;
+
68  }
+
69 
+
70  if (unlikely(is_nan(b)))
+
71  return a;
+
72 
+
73  return a < b ? a : b;
+
74  }
+
75 
+
89  inline var fmin(const stan::math::var& a,
+
90  double b) {
+ +
92  if (unlikely(is_nan(a))) {
+
93  if (unlikely(is_nan(b)))
+
94  return var(new precomp_v_vari(NOT_A_NUMBER,
+
95  a.vi_,
+
96  NOT_A_NUMBER));
+
97  return var(b);
+
98  }
+
99 
+
100  if (unlikely(is_nan(b)))
+
101  return a;
+
102 
+
103  return a <= b ? a : var(b);
+
104  }
+
105 
+
120  inline var fmin(double a,
+
121  const stan::math::var& b) {
+ +
123  if (unlikely(is_nan(b))) {
+
124  if (unlikely(is_nan(a)))
+
125  return var(new precomp_v_vari(NOT_A_NUMBER,
+
126  b.vi_,
+
127  NOT_A_NUMBER));
+
128 
+
129  return var(a);
+
130  }
+
131 
+
132  if (unlikely(is_nan(a)))
+
133  return b;
+
134 
+
135  return b <= a ? b : var(a);
+
136  }
+
137 
+
138  }
+
139 }
+
140 #endif
+
fvar< T > fmin(const fvar< T > &x1, const fvar< T > &x2)
Definition: fmin.hpp:13
+ +
const double NOT_A_NUMBER
(Quiet) not-a-number value.
Definition: constants.hpp:56
+ + +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
#define unlikely(x)
Definition: likely.hpp:9
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ + + +
int is_nan(const fvar< T > &x)
Returns 1 if the input's value is NaN and 0 otherwise.
Definition: is_nan.hpp:22
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2fmod_8hpp.html b/doc/api/html/rev_2scal_2fun_2fmod_8hpp.html new file mode 100644 index 00000000000..7abff954ad1 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2fmod_8hpp.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/fmod.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
fmod.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <cmath>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

var stan::math::fmod (const var &a, const var &b)
 Return the floating point remainder after dividing the first variable by the second (cmath). More...
 
var stan::math::fmod (const var &a, const double b)
 Return the floating point remainder after dividing the the first variable by the second scalar (cmath). More...
 
var stan::math::fmod (const double a, const var &b)
 Return the floating point remainder after dividing the first scalar by the second variable (cmath). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2fmod_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2fmod_8hpp_source.html new file mode 100644 index 00000000000..2071888493d --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2fmod_8hpp_source.html @@ -0,0 +1,189 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/fmod.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
fmod.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_FMOD_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_FMOD_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+
5 #include <boost/math/special_functions/fpclassify.hpp>
+
6 #include <cmath>
+
7 #include <limits>
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
12  namespace {
+
13  class fmod_vv_vari : public op_vv_vari {
+
14  public:
+
15  fmod_vv_vari(vari* avi, vari* bvi) :
+
16  op_vv_vari(std::fmod(avi->val_, bvi->val_), avi, bvi) {
+
17  }
+
18  void chain() {
+
19  if (unlikely(boost::math::isnan(avi_->val_)
+
20  || boost::math::isnan(bvi_->val_))) {
+
21  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
22  bvi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
23  } else {
+
24  avi_->adj_ += adj_;
+
25  bvi_->adj_ -= adj_ * static_cast<int>(avi_->val_ / bvi_->val_);
+
26  }
+
27  }
+
28  };
+
29 
+
30  class fmod_vd_vari : public op_vd_vari {
+
31  public:
+
32  fmod_vd_vari(vari* avi, double b) :
+
33  op_vd_vari(std::fmod(avi->val_, b), avi, b) {
+
34  }
+
35  void chain() {
+
36  if (unlikely(boost::math::isnan(avi_->val_)
+
37  || boost::math::isnan(bd_)))
+
38  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
39  else
+
40  avi_->adj_ += adj_;
+
41  }
+
42  };
+
43 
+
44  class fmod_dv_vari : public op_dv_vari {
+
45  public:
+
46  fmod_dv_vari(double a, vari* bvi) :
+
47  op_dv_vari(std::fmod(a, bvi->val_), a, bvi) {
+
48  }
+
49  void chain() {
+
50  if (unlikely(boost::math::isnan(bvi_->val_)
+
51  || boost::math::isnan(ad_))) {
+
52  bvi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
53  } else {
+
54  int d = static_cast<int>(ad_ / bvi_->val_);
+
55  bvi_->adj_ -= adj_ * d;
+
56  }
+
57  }
+
58  };
+
59  }
+
60 
+
103  inline var fmod(const var& a, const var& b) {
+
104  return var(new fmod_vv_vari(a.vi_, b.vi_));
+
105  }
+
106 
+
120  inline var fmod(const var& a, const double b) {
+
121  return var(new fmod_vd_vari(a.vi_, b));
+
122  }
+
123 
+
137  inline var fmod(const double a, const var& b) {
+
138  return var(new fmod_dv_vari(a, b.vi_));
+
139  }
+
140 
+
141  }
+
142 }
+
143 #endif
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
fvar< T > fmod(const fvar< T > &x1, const fvar< T > &x2)
Definition: fmod.hpp:16
+
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
+
#define unlikely(x)
Definition: likely.hpp:9
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2gamma__p_8hpp.html b/doc/api/html/rev_2scal_2fun_2gamma__p_8hpp.html new file mode 100644 index 00000000000..613dc90c81d --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2gamma__p_8hpp.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/gamma_p.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
gamma_p.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <stan/math/prim/scal/fun/gamma_p.hpp>
+#include <boost/math/special_functions/gamma.hpp>
+#include <boost/math/special_functions/digamma.hpp>
+#include <valarray>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

var stan::math::gamma_p (const stan::math::var &a, const stan::math::var &b)
 
var stan::math::gamma_p (const stan::math::var &a, const double &b)
 
var stan::math::gamma_p (const double &a, const stan::math::var &b)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2gamma__p_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2gamma__p_8hpp_source.html new file mode 100644 index 00000000000..34eb192857b --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2gamma__p_8hpp_source.html @@ -0,0 +1,241 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/gamma_p.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
gamma_p.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_GAMMA_P_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_GAMMA_P_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ +
6 #include <boost/math/special_functions/gamma.hpp>
+
7 #include <boost/math/special_functions/digamma.hpp>
+
8 #include <valarray>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
13  namespace {
+
14  class gamma_p_vv_vari : public op_vv_vari {
+
15  public:
+
16  gamma_p_vv_vari(vari* avi, vari* bvi) :
+
17  op_vv_vari(stan::math::gamma_p(avi->val_, bvi->val_),
+
18  avi, bvi) {
+
19  }
+
20  void chain() {
+
21  // return zero derivative as gamma_p is flat
+
22  // to machine precision for b / a > 10
+
23  if (std::fabs(bvi_->val_ / avi_->val_) > 10 ) return;
+
24 
+
25  double u = stan::math::gamma_p(avi_->val_, bvi_->val_);
+
26 
+
27  double S = 0.0;
+
28  double s = 1.0;
+
29  double l = std::log(bvi_->val_);
+
30  double g = boost::math::tgamma(avi_->val_);
+
31  double dig = boost::math::digamma(avi_->val_);
+
32 
+
33  int k = 0;
+
34  double delta = s / (avi_->val_ * avi_->val_);
+
35 
+
36  while (std::fabs(delta) > 1e-6) {
+
37  S += delta;
+
38  ++k;
+
39  s *= -bvi_->val_ / k;
+
40  delta = s / ((k + avi_->val_) * (k + avi_->val_));
+
41  }
+
42 
+
43 
+
44  avi_->adj_ -= adj_ * ((u) * (dig - l)
+
45  + std::exp(avi_->val_ * l) * S / g);
+
46  bvi_->adj_ += adj_ * (std::exp(-bvi_->val_)
+
47  * std::pow(bvi_->val_, avi_->val_ - 1.0) / g);
+
48  }
+
49  };
+
50 
+
51  class gamma_p_vd_vari : public op_vd_vari {
+
52  public:
+
53  gamma_p_vd_vari(vari* avi, double b) :
+
54  op_vd_vari(stan::math::gamma_p(avi->val_, b),
+
55  avi, b) {
+
56  }
+
57  void chain() {
+
58  // return zero derivative as gamma_p is flat
+
59  // to machine precision for b / a > 10
+
60  if (std::fabs(bd_ / avi_->val_) > 10)
+
61  return;
+
62 
+
63  double u = stan::math::gamma_p(avi_->val_, bd_);
+
64 
+
65  double S = 0.0;
+
66  double s = 1.0;
+
67  double l = std::log(bd_);
+
68  double g = boost::math::tgamma(avi_->val_);
+
69  double dig = boost::math::digamma(avi_->val_);
+
70 
+
71  int k = 0;
+
72  double delta = s / (avi_->val_ * avi_->val_);
+
73 
+
74  while (std::fabs(delta) > 1e-6) {
+
75  S += delta;
+
76  ++k;
+
77  s *= -bd_ / k;
+
78  delta = s / ((k + avi_->val_) * (k + avi_->val_));
+
79  }
+
80 
+
81  avi_->adj_ -= adj_ * ((u) * (dig - l)
+
82  + std::exp(avi_->val_ * l) * S / g);
+
83  }
+
84  };
+
85 
+
86  class gamma_p_dv_vari : public op_dv_vari {
+
87  public:
+
88  gamma_p_dv_vari(double a, vari* bvi) :
+
89  op_dv_vari(stan::math::gamma_p(a, bvi->val_),
+
90  a, bvi) {
+
91  }
+
92  void chain() {
+
93  // return zero derivative as gamma_p is flat to
+
94  // machine precision for b / a > 10
+
95  if (std::fabs(bvi_->val_ / ad_) > 10 )
+
96  return;
+
97  bvi_->adj_ += adj_
+
98  * (std::exp(-bvi_->val_) * std::pow(bvi_->val_, ad_ - 1.0)
+
99  / boost::math::tgamma(ad_));
+
100  }
+
101  };
+
102  }
+
103 
+
104  inline var gamma_p(const stan::math::var& a,
+
105  const stan::math::var& b) {
+
106  return var(new gamma_p_vv_vari(a.vi_, b.vi_));
+
107  }
+
108 
+
109  inline var gamma_p(const stan::math::var& a,
+
110  const double& b) {
+
111  return var(new gamma_p_vd_vari(a.vi_, b));
+
112  }
+
113 
+
114  inline var gamma_p(const double& a,
+
115  const stan::math::var& b) {
+
116  return var(new gamma_p_dv_vari(a, b.vi_));
+
117  }
+
118 
+
119  }
+
120 }
+
121 #endif
+ +
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:14
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
fvar< T > gamma_p(const fvar< T > &x1, const fvar< T > &x2)
Definition: gamma_p.hpp:15
+ +
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
fvar< T > tgamma(const fvar< T > &x)
Definition: tgamma.hpp:15
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2gamma__q_8hpp.html b/doc/api/html/rev_2scal_2fun_2gamma__q_8hpp.html new file mode 100644 index 00000000000..3abde7d896e --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2gamma__q_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/gamma_q.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
gamma_q.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <stan/math/prim/scal/fun/gamma_q.hpp>
+#include <stan/math/prim/scal/fun/grad_reg_inc_gamma.hpp>
+#include <boost/math/special_functions/gamma.hpp>
+#include <boost/math/special_functions/digamma.hpp>
+#include <valarray>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

var stan::math::gamma_q (const stan::math::var &a, const stan::math::var &b)
 
var stan::math::gamma_q (const stan::math::var &a, const double &b)
 
var stan::math::gamma_q (const double &a, const stan::math::var &b)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2gamma__q_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2gamma__q_8hpp_source.html new file mode 100644 index 00000000000..d800f9bc7a9 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2gamma__q_8hpp_source.html @@ -0,0 +1,192 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/gamma_q.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
gamma_q.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_GAMMA_Q_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_GAMMA_Q_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ + +
7 #include <boost/math/special_functions/gamma.hpp>
+
8 #include <boost/math/special_functions/digamma.hpp>
+
9 #include <valarray>
+
10 
+
11 namespace stan {
+
12  namespace math {
+
13 
+
14  namespace {
+
15  class gamma_q_vv_vari : public op_vv_vari {
+
16  public:
+
17  gamma_q_vv_vari(vari* avi, vari* bvi) :
+
18  op_vv_vari(stan::math::gamma_q(avi->val_, bvi->val_),
+
19  avi, bvi) {
+
20  }
+
21  void chain() {
+
22  avi_->adj_ += adj_
+
23  * stan::math::grad_reg_inc_gamma(avi_->val_, bvi_->val_,
+
24  boost::math::tgamma(avi_->val_),
+
25  boost::math::digamma(avi_->val_));
+
26  bvi_->adj_ -= adj_
+
27  * boost::math::gamma_p_derivative(avi_->val_, bvi_->val_);
+
28  }
+
29  };
+
30 
+
31  class gamma_q_vd_vari : public op_vd_vari {
+
32  public:
+
33  gamma_q_vd_vari(vari* avi, double b) :
+
34  op_vd_vari(stan::math::gamma_q(avi->val_, b),
+
35  avi, b) {
+
36  }
+
37  void chain() {
+
38  avi_->adj_ += adj_
+
39  * stan::math::grad_reg_inc_gamma(avi_->val_, bd_,
+
40  boost::math::tgamma(avi_->val_),
+
41  boost::math::digamma(avi_->val_));
+
42  }
+
43  };
+
44 
+
45  class gamma_q_dv_vari : public op_dv_vari {
+
46  public:
+
47  gamma_q_dv_vari(double a, vari* bvi) :
+
48  op_dv_vari(stan::math::gamma_q(a, bvi->val_),
+
49  a, bvi) {
+
50  }
+
51  void chain() {
+
52  bvi_->adj_ -= adj_
+
53  * boost::math::gamma_p_derivative(ad_, bvi_->val_);
+
54  }
+
55  };
+
56  }
+
57 
+
58  inline var gamma_q(const stan::math::var& a,
+
59  const stan::math::var& b) {
+
60  return var(new gamma_q_vv_vari(a.vi_, b.vi_));
+
61  }
+
62 
+
63  inline var gamma_q(const stan::math::var& a,
+
64  const double& b) {
+
65  return var(new gamma_q_vd_vari(a.vi_, b));
+
66  }
+
67 
+
68  inline var gamma_q(const double& a,
+
69  const stan::math::var& b) {
+
70  return var(new gamma_q_dv_vari(a, b.vi_));
+
71  }
+
72 
+
73  }
+
74 }
+
75 #endif
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
T grad_reg_inc_gamma(T a, T z, T g, T dig, T precision=1e-6)
+ +
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
fvar< T > tgamma(const fvar< T > &x)
Definition: tgamma.hpp:15
+
fvar< T > gamma_q(const fvar< T > &x1, const fvar< T > &x2)
Definition: gamma_q.hpp:15
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2grad__inc__beta_8hpp.html b/doc/api/html/rev_2scal_2fun_2grad__inc__beta_8hpp.html new file mode 100644 index 00000000000..23570ec552b --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2grad__inc__beta_8hpp.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/grad_inc_beta.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
grad_inc_beta.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + +

+Functions

void stan::math::grad_inc_beta (var &g1, var &g2, const var &a, const var &b, const var &z)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2grad__inc__beta_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2grad__inc__beta_8hpp_source.html new file mode 100644 index 00000000000..fc2dbb67214 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2grad__inc__beta_8hpp_source.html @@ -0,0 +1,168 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/grad_inc_beta.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
grad_inc_beta.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_GRAD_INC_BETA_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_GRAD_INC_BETA_HPP
+
3 
+ +
5 #include <stan/math/rev/core.hpp>
+ + + + + + + + + +
15 #include <cmath>
+
16 
+
17 namespace stan {
+
18  namespace math {
+
19 
+
20  // Gradient of the incomplete beta function beta(a, b, z)
+
21  // with respect to the first two arguments, using the
+
22  // equivalence to a hypergeometric function.
+
23  // See http://dlmf.nist.gov/8.17#ii
+
24  void grad_inc_beta(var& g1, var& g2,
+
25  const var& a, const var& b, const var& z) {
+
26  var c1 = log(z);
+
27  var c2 = log1m(z);
+
28  var c3 = exp(lbeta(a, b)) * inc_beta(a, b, z);
+
29  var C = exp(a * c1 + b * c2) / a;
+
30  var dF1 = 0;
+
31  var dF2 = 0;
+
32  if (value_of(value_of(C)))
+
33  grad_2F1(dF1, dF2, a + b, var(1.0), a + 1, z);
+
34  g1 = (c1 - 1.0 / a) * c3 + C * (dF1 + dF2);
+
35  g2 = c2 * c3 + C * dF1;
+
36  }
+
37 
+
38  }
+
39 }
+
40 #endif
+ + +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > lbeta(const fvar< T > &x1, const fvar< T > &x2)
Definition: lbeta.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
fvar< T > inc_beta(const fvar< T > &a, const fvar< T > &b, const fvar< T > &x)
Definition: inc_beta.hpp:20
+ +
void grad_inc_beta(stan::math::fvar< T > &g1, stan::math::fvar< T > &g2, stan::math::fvar< T > a, stan::math::fvar< T > b, stan::math::fvar< T > z)
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ + + + + + + + +
fvar< T > log1m(const fvar< T > &x)
Definition: log1m.hpp:16
+
void grad_2F1(T &gradA, T &gradC, T a, T b, T c, T z, T precision=1e-6)
Definition: grad_2F1.hpp:13
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2hypot_8hpp.html b/doc/api/html/rev_2scal_2fun_2hypot_8hpp.html new file mode 100644 index 00000000000..13143c215fb --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2hypot_8hpp.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/hypot.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
hypot.hpp File Reference
+
+
+
#include <math.h>
+#include <stan/math/rev/core.hpp>
+#include <cmath>
+#include <valarray>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

var stan::math::hypot (const var &a, const var &b)
 Returns the length of the hypoteneuse of a right triangle with sides of the specified lengths (C99). More...
 
var stan::math::hypot (const var &a, double b)
 Returns the length of the hypoteneuse of a right triangle with sides of the specified lengths (C99). More...
 
var stan::math::hypot (double a, const var &b)
 Returns the length of the hypoteneuse of a right triangle with sides of the specified lengths (C99). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2hypot_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2hypot_8hpp_source.html new file mode 100644 index 00000000000..4a0454c7c8c --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2hypot_8hpp_source.html @@ -0,0 +1,163 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/hypot.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
hypot.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_HYPOT_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_HYPOT_HPP
+
3 
+
4 #include <math.h>
+
5 #include <stan/math/rev/core.hpp>
+
6 #include <cmath>
+
7 #include <valarray>
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
12  namespace {
+
13  class hypot_vv_vari : public op_vv_vari {
+
14  public:
+
15  hypot_vv_vari(vari* avi, vari* bvi) :
+
16  op_vv_vari(::hypot(avi->val_, bvi->val_),
+
17  avi, bvi) {
+
18  }
+
19  void chain() {
+
20  avi_->adj_ += adj_ * avi_->val_ / val_;
+
21  bvi_->adj_ += adj_ * bvi_->val_ / val_;
+
22  }
+
23  };
+
24 
+
25  class hypot_vd_vari : public op_v_vari {
+
26  public:
+
27  hypot_vd_vari(vari* avi, double b) :
+
28  op_v_vari(::hypot(avi->val_, b),
+
29  avi) {
+
30  }
+
31  void chain() {
+
32  avi_->adj_ += adj_ * avi_->val_ / val_;
+
33  }
+
34  };
+
35  }
+
36 
+
53  inline var hypot(const var& a, const var& b) {
+
54  return var(new hypot_vv_vari(a.vi_, b.vi_));
+
55  }
+
56 
+
71  inline var hypot(const var& a, double b) {
+
72  return var(new hypot_vd_vari(a.vi_, b));
+
73  }
+
74 
+
116  inline var hypot(double a, const var& b) {
+
117  return var(new hypot_vd_vari(b.vi_, a));
+
118  }
+
119 
+
120  }
+
121 }
+
122 #endif
+ +
fvar< T > hypot(const fvar< T > &x1, const fvar< T > &x2)
Definition: hypot.hpp:13
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2ibeta_8hpp.html b/doc/api/html/rev_2scal_2fun_2ibeta_8hpp.html new file mode 100644 index 00000000000..ddd7d37ebd0 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2ibeta_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/ibeta.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
ibeta.hpp File Reference
+
+
+
#include <boost/math/special_functions/digamma.hpp>
+#include <boost/math/special_functions/gamma.hpp>
+#include <stan/math/rev/core.hpp>
+#include <stan/math/prim/scal/fun/ibeta.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::ibeta (const var &a, const var &b, const var &x)
 The normalized incomplete beta function of a, b, and x. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2ibeta_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2ibeta_8hpp_source.html new file mode 100644 index 00000000000..321c7ba9dc6 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2ibeta_8hpp_source.html @@ -0,0 +1,347 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/ibeta.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
ibeta.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_IBETA_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_IBETA_HPP
+
3 
+
4 #include <boost/math/special_functions/digamma.hpp>
+
5 #include <boost/math/special_functions/gamma.hpp>
+
6 #include <stan/math/rev/core.hpp>
+ +
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
12  namespace {
+
18  double ibeta_hypergeometric_helper(double a, double b, double z,
+
19  double precision = 1e-8,
+
20  double max_steps = 1000) {
+
21  double val = 0;
+
22  double diff = 1;
+
23  double k = 0;
+
24  double a_2 = a*a;
+
25  double bprod = 1;
+
26  while (std::abs(diff) > precision
+
27  && ++k < max_steps
+
28  && !std::isnan(diff)) {
+
29  val += diff;
+
30  bprod *= b+k-1.0;
+
31  diff = a_2 * std::pow(a+k, -2) * bprod * std::pow(z, k)
+
32  / boost::math::tgamma(k+1);
+
33  }
+
34  return val;
+
35  }
+
36 
+
37  class ibeta_vvv_vari : public op_vvv_vari {
+
38  public:
+
39  ibeta_vvv_vari(vari* avi, vari* bvi, vari* xvi) :
+
40  op_vvv_vari(stan::math::ibeta(avi->val_, bvi->val_, xvi->val_),
+
41  avi, bvi, xvi) {
+
42  }
+
43  void chain() {
+
44  double a = avi_->val_;
+
45  double b = bvi_->val_;
+
46  double c = cvi_->val_;
+
47 
+
48  using std::sin;
+
49  using std::pow;
+
50  using std::log;
+ +
52  using boost::math::tgamma;
+ +
54  using boost::math::ibeta;
+
55  using stan::math::ibeta_hypergeometric_helper;
+
56  avi_->adj_ += adj_ *
+
57  (log(c) - digamma(a) + digamma(a+b)) * val_
+
58  - tgamma(a) * tgamma(a+b) / tgamma(b) * pow(c, a)
+
59  / tgamma(1+a) / tgamma(1+a)
+
60  * ibeta_hypergeometric_helper(a, 1-b, c);
+
61  bvi_->adj_ += adj_ *
+
62  (tgamma(b) * tgamma(a+b) / tgamma(a) * pow(1-c, b)
+
63  * ibeta_hypergeometric_helper(b, 1-a, 1-c)
+
64  / tgamma(b+1) / tgamma(b+1)
+
65  + ibeta(b, a, 1-c) * (digamma(b) - digamma(a+b) - log(1-c)));
+
66  cvi_->adj_ += adj_ *
+
67  boost::math::ibeta_derivative(a, b, c);
+
68  }
+
69  };
+
70  class ibeta_vvd_vari : public op_vvd_vari {
+
71  public:
+
72  ibeta_vvd_vari(vari* avi, vari* bvi, double x) :
+
73  op_vvd_vari(stan::math::ibeta(avi->val_, bvi->val_, x), avi, bvi, x) {
+
74  }
+
75  void chain() {
+
76  double a = avi_->val_;
+
77  double b = bvi_->val_;
+
78  double c = cd_;
+
79 
+
80  using std::sin;
+
81  using std::pow;
+
82  using std::log;
+ +
84  using boost::math::tgamma;
+ +
86  using boost::math::ibeta;
+
87  using stan::math::ibeta_hypergeometric_helper;
+
88  avi_->adj_ += adj_ *
+
89  (log(c) - digamma(a) + digamma(a+b)) * val_ -
+
90  tgamma(a) * tgamma(a+b) / tgamma(b) * pow(c, a)
+
91  / tgamma(1+a) / tgamma(1+a)
+
92  * ibeta_hypergeometric_helper(a, 1-b, c);
+
93  bvi_->adj_ += adj_ *
+
94  (tgamma(b) * tgamma(a+b) / tgamma(a) * pow(1-c, b)
+
95  * ibeta_hypergeometric_helper(b, 1-a, 1-c)
+
96  / tgamma(b+1) / tgamma(b+1)
+
97  + ibeta(b, a, 1-c) * (digamma(b) - digamma(a+b) - log(1-c)));
+
98  }
+
99  };
+
100  class ibeta_vdv_vari : public op_vdv_vari {
+
101  public:
+
102  ibeta_vdv_vari(vari* avi, double b, vari* xvi) :
+
103  op_vdv_vari(stan::math::ibeta(avi->val_, b, xvi->val_), avi, b, xvi) {
+
104  }
+
105  void chain() {
+
106  double a = avi_->val_;
+
107  double b = bd_;
+
108  double c = cvi_->val_;
+
109 
+
110  using std::sin;
+
111  using std::pow;
+
112  using std::log;
+ +
114  using boost::math::tgamma;
+
115  using boost::math::digamma;
+
116  using boost::math::ibeta;
+
117  using stan::math::ibeta_hypergeometric_helper;
+
118  avi_->adj_ += adj_ *
+
119  (log(c) - digamma(a) + digamma(a+b)) * val_
+
120  - tgamma(a) * tgamma(a+b) / tgamma(b) * pow(c, a)
+
121  / tgamma(1+a) / tgamma(1+a)
+
122  * ibeta_hypergeometric_helper(a, 1-b, c);
+
123  cvi_->adj_ += adj_ *
+
124  boost::math::ibeta_derivative(a, b, c);
+
125  }
+
126  };
+
127  class ibeta_vdd_vari : public op_vdd_vari {
+
128  public:
+
129  ibeta_vdd_vari(vari* avi, double b, double x) :
+
130  op_vdd_vari(stan::math::ibeta(avi->val_, b, x), avi, b, x) {
+
131  }
+
132  void chain() {
+
133  double a = avi_->val_;
+
134  double b = bd_;
+
135  double c = cd_;
+
136 
+
137  using std::sin;
+
138  using std::pow;
+
139  using std::log;
+ +
141  using boost::math::tgamma;
+
142  using boost::math::digamma;
+
143  using boost::math::ibeta;
+
144  using stan::math::ibeta_hypergeometric_helper;
+
145  avi_->adj_ += adj_ *
+
146  (log(c) - digamma(a) + digamma(a+b)) * val_
+
147  - tgamma(a) * tgamma(a+b) / tgamma(b) * pow(c, a)
+
148  / tgamma(1+a) / tgamma(1+a)
+
149  * ibeta_hypergeometric_helper(a, 1-b, c);
+
150  }
+
151  };
+
152  class ibeta_dvv_vari : public op_dvv_vari {
+
153  public:
+
154  ibeta_dvv_vari(double a, vari* bvi, vari* xvi) :
+
155  op_dvv_vari(stan::math::ibeta(a, bvi->val_, xvi->val_), a, bvi, xvi) {
+
156  }
+
157  void chain() {
+
158  double a = ad_;
+
159  double b = bvi_->val_;
+
160  double c = cvi_->val_;
+
161 
+
162  using std::sin;
+
163  using std::pow;
+
164  using std::log;
+ +
166  using boost::math::tgamma;
+
167  using boost::math::digamma;
+
168  using boost::math::ibeta;
+
169  using stan::math::ibeta_hypergeometric_helper;
+
170  bvi_->adj_ += adj_ *
+
171  (tgamma(b) * tgamma(a+b) / tgamma(a) * pow(1-c, b)
+
172  * ibeta_hypergeometric_helper(b, 1-a, 1-c)
+
173  / tgamma(b+1) / tgamma(b+1)
+
174  + ibeta(b, a, 1-c) * (digamma(b) - digamma(a+b) - log(1-c)));
+
175  cvi_->adj_ += adj_ *
+
176  boost::math::ibeta_derivative(a, b, c);
+
177  }
+
178  };
+
179  class ibeta_dvd_vari : public op_dvd_vari {
+
180  public:
+
181  ibeta_dvd_vari(double a, vari* bvi, double x) :
+
182  op_dvd_vari(stan::math::ibeta(a, bvi->val_, x), a, bvi, x) {
+
183  }
+
184  void chain() {
+
185  double a = ad_;
+
186  double b = bvi_->val_;
+
187  double c = cd_;
+
188 
+
189  using std::sin;
+
190  using std::pow;
+
191  using std::log;
+ +
193  using boost::math::tgamma;
+
194  using boost::math::digamma;
+
195  using boost::math::ibeta;
+
196  using stan::math::ibeta_hypergeometric_helper;
+
197  bvi_->adj_ += adj_ *
+
198  (tgamma(b) * tgamma(a+b) / tgamma(a) * pow(1-c, b)
+
199  * ibeta_hypergeometric_helper(b, 1-a, 1-c)
+
200  / tgamma(b+1) / tgamma(b+1)
+
201  + ibeta(b, a, 1-c) * (digamma(b) - digamma(a+b) - log(1-c)));
+
202  }
+
203  };
+
204  class ibeta_ddv_vari : public op_ddv_vari {
+
205  public:
+
206  ibeta_ddv_vari(double a, double b, vari* xvi) :
+
207  op_ddv_vari(stan::math::ibeta(a, b, xvi->val_), a, b, xvi) {
+
208  }
+
209  void chain() {
+
210  double a = ad_;
+
211  double b = bd_;
+
212  double c = cvi_->val_;
+
213 
+
214  cvi_->adj_ += adj_ *
+
215  boost::math::ibeta_derivative(a, b, c);
+
216  }
+
217  };
+
218  }
+
219 
+
238  inline var ibeta(const var& a,
+
239  const var& b,
+
240  const var& x) {
+
241  return var(new ibeta_vvv_vari(a.vi_, b.vi_, x.vi_));
+
242  }
+
243 
+
244  }
+
245 }
+
246 #endif
+
fvar< T > abs(const fvar< T > &x)
Definition: abs.hpp:15
+ +
double ibeta(const double a, const double b, const double x)
The normalized incomplete beta function of a, b, and x.
Definition: ibeta.hpp:23
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
int isnan(const stan::math::var &a)
Checks if the given number is NaN.
Definition: std_isnan.hpp:18
+
fvar< T > sin(const fvar< T > &x)
Definition: sin.hpp:14
+ +
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
double e()
Return the base of the natural logarithm.
Definition: constants.hpp:95
+
var ibeta(const var &a, const var &b, const var &x)
The normalized incomplete beta function of a, b, and x.
Definition: ibeta.hpp:238
+
double pi()
Return the value of pi.
Definition: constants.hpp:86
+
double adj_
The adjoint of this variable, which is the partial derivative of this variable with respect to the ro...
Definition: vari.hpp:42
+
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
fvar< T > tgamma(const fvar< T > &x)
Definition: tgamma.hpp:15
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2if__else_8hpp.html b/doc/api/html/rev_2scal_2fun_2if__else_8hpp.html new file mode 100644 index 00000000000..5a8763058ca --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2if__else_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/if_else.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
if_else.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

var stan::math::if_else (bool c, const var &y_true, const var &y_false)
 If the specified condition is true, return the first variable, otherwise return the second variable. More...
 
var stan::math::if_else (bool c, double y_true, const var &y_false)
 If the specified condition is true, return a new variable constructed from the first scalar, otherwise return the second variable. More...
 
var stan::math::if_else (bool c, const var &y_true, const double y_false)
 If the specified condition is true, return the first variable, otherwise return a new variable constructed from the second scalar. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2if__else_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2if__else_8hpp_source.html new file mode 100644 index 00000000000..0436b0af82d --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2if__else_8hpp_source.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/if_else.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
if_else.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_IF_ELSE_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_IF_ELSE_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
17  inline var if_else(bool c, const var& y_true, const var&y_false) {
+
18  return c ? y_true : y_false;
+
19  }
+
29  inline var if_else(bool c, double y_true, const var& y_false) {
+
30  if (c)
+
31  return var(y_true);
+
32  else
+
33  return y_false;
+
34  }
+
44  inline var if_else(bool c, const var& y_true, const double y_false) {
+
45  if (c)
+
46  return y_true;
+
47  else
+
48  return var(y_false);
+
49  }
+
50 
+
51  }
+
52 }
+
53 #endif
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
boost::math::tools::promote_args< T_true, T_false >::type if_else(const bool c, const T_true y_true, const T_false y_false)
Return the second argument if the first argument is true and otherwise return the second argument...
Definition: if_else.hpp:25
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2inc__beta_8hpp.html b/doc/api/html/rev_2scal_2fun_2inc__beta_8hpp.html new file mode 100644 index 00000000000..dc81c743787 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2inc__beta_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/inc_beta.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inc_beta.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + +

+Functions

var stan::math::inc_beta (const stan::math::var &a, const stan::math::var &b, const stan::math::var &c)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2inc__beta_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2inc__beta_8hpp_source.html new file mode 100644 index 00000000000..10ebf09d34e --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2inc__beta_8hpp_source.html @@ -0,0 +1,175 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/inc_beta.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inc_beta.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_INC_BETA_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_INC_BETA_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ + + + + +
10 #include <valarray>
+
11 
+
12 namespace stan {
+
13  namespace math {
+
14 
+
15  namespace {
+
16 
+
17  class inc_beta_vvv_vari : public op_vvv_vari {
+
18  public:
+
19  inc_beta_vvv_vari(vari* avi, vari* bvi, vari* cvi) :
+
20  op_vvv_vari(stan::math::inc_beta(avi->val_, bvi->val_, cvi->val_),
+
21  avi, bvi, cvi) {
+
22  }
+
23  void chain() {
+
24  using stan::math::digamma;
+
25  using stan::math::lbeta;
+
26 
+
27  double d_a; double d_b;
+
28  stan::math::grad_reg_inc_beta(d_a, d_b, avi_->val_, bvi_->val_,
+
29  cvi_->val_, digamma(avi_->val_),
+
30  digamma(bvi_->val_),
+
31  digamma(avi_->val_ + bvi_->val_),
+
32  std::exp(lbeta(avi_->val_,
+
33  bvi_->val_)));
+
34 
+
35  avi_->adj_ += adj_ * d_a;
+
36  bvi_->adj_ += adj_ * d_b;
+
37  cvi_->adj_ += adj_ * std::pow((1-cvi_->val_), bvi_->val_-1)
+
38  * std::pow(cvi_->val_, avi_->val_-1)
+
39  / std::exp(stan::math::lbeta(avi_->val_, bvi_->val_));
+
40  }
+
41  };
+
42 
+
43  }
+
44 
+
45  inline var inc_beta(const stan::math::var& a,
+
46  const stan::math::var& b,
+
47  const stan::math::var& c) {
+
48  return var(new inc_beta_vvv_vari(a.vi_, b.vi_, c.vi_));
+
49  }
+
50 
+
51  }
+
52 }
+
53 #endif
+ +
fvar< T > lbeta(const fvar< T > &x1, const fvar< T > &x2)
Definition: lbeta.hpp:16
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
fvar< T > inc_beta(const fvar< T > &a, const fvar< T > &b, const fvar< T > &x)
Definition: inc_beta.hpp:20
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ + + + +
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
void grad_reg_inc_beta(T &g1, T &g2, T a, T b, T z, T digammaA, T digammaB, T digammaSum, T betaAB)
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2inv_8hpp.html b/doc/api/html/rev_2scal_2fun_2inv_8hpp.html new file mode 100644 index 00000000000..32efc1e01e6 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2inv_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/inv.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <stan/math/prim/scal/fun/inv.hpp>
+#include <valarray>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::inv (const var &a)
 

+\[ \mbox{inv}(x) = \begin{cases} \frac{1}{x} & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+ More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2inv_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2inv_8hpp_source.html new file mode 100644 index 00000000000..88ac44af155 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2inv_8hpp_source.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/inv.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_INV_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_INV_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ +
6 #include <valarray>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  namespace {
+
12  class inv_vari : public op_v_vari {
+
13  public:
+
14  explicit inv_vari(vari* avi) :
+
15  op_v_vari(stan::math::inv(avi->val_), avi) {
+
16  }
+
17  void chain() {
+
18  avi_->adj_ -= adj_ / (avi_->val_ * avi_->val_);
+
19  }
+
20  };
+
21  }
+
22 
+
42  inline var inv(const var& a) {
+
43  return var(new inv_vari(a.vi_));
+
44  }
+
45 
+
46  }
+
47 }
+
48 #endif
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
fvar< T > inv(const fvar< T > &x)
Definition: inv.hpp:15
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2inv___phi_8hpp.html b/doc/api/html/rev_2scal_2fun_2inv___phi_8hpp.html new file mode 100644 index 00000000000..8a9f397ce7a --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2inv___phi_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/inv_Phi.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv_Phi.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::inv_Phi (const stan::math::var &p)
 The inverse of unit normal cumulative density function. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2inv___phi_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2inv___phi_8hpp_source.html new file mode 100644 index 00000000000..28e72718640 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2inv___phi_8hpp_source.html @@ -0,0 +1,150 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/inv_Phi.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv_Phi.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_INV_PHI_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_INV_PHI_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ + + +
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
12  namespace {
+
13  class inv_Phi_vari : public op_v_vari {
+
14  public:
+
15  explicit inv_Phi_vari(vari* avi) :
+
16  op_v_vari(stan::math::inv_Phi(avi->val_), avi) {
+
17  }
+
18  void chain() {
+
19  static const double NEG_HALF = -0.5;
+
20  avi_->adj_ += adj_
+ +
22  / std::exp(NEG_HALF * val_ * val_);
+
23  }
+
24  };
+
25  }
+
26 
+
37  inline var inv_Phi(const stan::math::var& p) {
+
38  return var(new inv_Phi_vari(p.vi_));
+
39  }
+
40 
+
41  }
+
42 }
+
43 #endif
+ +
fvar< T > inv_Phi(const fvar< T > &p)
Definition: inv_Phi.hpp:15
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
const double SQRT_2_TIMES_SQRT_PI
Definition: constants.hpp:158
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2inv__cloglog_8hpp.html b/doc/api/html/rev_2scal_2fun_2inv__cloglog_8hpp.html new file mode 100644 index 00000000000..c1c5ebe9345 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2inv__cloglog_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/inv_cloglog.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv_cloglog.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::inv_cloglog (const stan::math::var &a)
 Return the inverse complementary log-log function applied specified variable (stan). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2inv__cloglog_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2inv__cloglog_8hpp_source.html new file mode 100644 index 00000000000..70891717961 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2inv__cloglog_8hpp_source.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/inv_cloglog.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv_cloglog.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_INV_CLOGLOG_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_INV_CLOGLOG_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  namespace {
+
11  class inv_cloglog_vari : public op_v_vari {
+
12  public:
+
13  explicit inv_cloglog_vari(vari* avi) :
+
14  op_v_vari(stan::math::inv_cloglog(avi->val_), avi) {
+
15  }
+
16  void chain() {
+
17  avi_->adj_ += adj_ * std::exp(avi_->val_ - std::exp(avi_->val_));
+
18  }
+
19  };
+
20  }
+
21 
+
36  inline var inv_cloglog(const stan::math::var& a) {
+
37  return var(new inv_cloglog_vari(a.vi_));
+
38  }
+
39 
+
40  }
+
41 }
+
42 #endif
+ + +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
fvar< T > inv_cloglog(const fvar< T > &x)
Definition: inv_cloglog.hpp:15
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2inv__logit_8hpp.html b/doc/api/html/rev_2scal_2fun_2inv__logit_8hpp.html new file mode 100644 index 00000000000..ab46a6180ff --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2inv__logit_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/inv_logit.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv_logit.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::inv_logit (const stan::math::var &a)
 The inverse logit function for variables (stan). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2inv__logit_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2inv__logit_8hpp_source.html new file mode 100644 index 00000000000..446cc01a4c9 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2inv__logit_8hpp_source.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/inv_logit.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv_logit.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_INV_LOGIT_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_INV_LOGIT_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  namespace {
+
11  class inv_logit_vari : public op_v_vari {
+
12  public:
+
13  explicit inv_logit_vari(vari* avi) :
+
14  op_v_vari(stan::math::inv_logit(avi->val_), avi) {
+
15  }
+
16  void chain() {
+
17  avi_->adj_ += adj_ * val_ * (1.0 - val_);
+
18  }
+
19  };
+
20  }
+
21 
+
34  inline var inv_logit(const stan::math::var& a) {
+
35  return var(new inv_logit_vari(a.vi_));
+
36  }
+
37 
+
38  }
+
39 }
+
40 #endif
+ +
fvar< T > inv_logit(const fvar< T > &x)
Definition: inv_logit.hpp:15
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2inv__sqrt_8hpp.html b/doc/api/html/rev_2scal_2fun_2inv__sqrt_8hpp.html new file mode 100644 index 00000000000..aa7dc20558c --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2inv__sqrt_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/inv_sqrt.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv_sqrt.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <stan/math/prim/scal/fun/inv_sqrt.hpp>
+#include <valarray>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::inv_sqrt (const var &a)
 

+\[ \mbox{inv\_sqrt}(x) = \begin{cases} \frac{1}{\sqrt{x}} & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+ More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2inv__sqrt_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2inv__sqrt_8hpp_source.html new file mode 100644 index 00000000000..bd18d2eb4b1 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2inv__sqrt_8hpp_source.html @@ -0,0 +1,143 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/inv_sqrt.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv_sqrt.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_INV_SQRT_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_INV_SQRT_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ +
6 #include <valarray>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  namespace {
+
12  class inv_sqrt_vari : public op_v_vari {
+
13  public:
+
14  explicit inv_sqrt_vari(vari* avi) :
+
15  op_v_vari(stan::math::inv_sqrt(avi->val_), avi) {
+
16  }
+
17  void chain() {
+
18  avi_->adj_ -= 0.5 * adj_ / (avi_->val_ * std::sqrt(avi_->val_));
+
19  }
+
20  };
+
21  }
+
22 
+
42  inline var inv_sqrt(const var& a) {
+
43  return var(new inv_sqrt_vari(a.vi_));
+
44  }
+
45 
+
46  }
+
47 }
+
48 #endif
+ +
fvar< T > inv_sqrt(const fvar< T > &x)
Definition: inv_sqrt.hpp:15
+
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2inv__square_8hpp.html b/doc/api/html/rev_2scal_2fun_2inv__square_8hpp.html new file mode 100644 index 00000000000..602f79fc95e --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2inv__square_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/inv_square.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inv_square.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <stan/math/prim/scal/fun/inv_square.hpp>
+#include <valarray>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::inv_square (const var &a)
 

+\[ \mbox{inv\_square}(x) = \begin{cases} \frac{1}{x^2} & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+ More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2inv__square_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2inv__square_8hpp_source.html new file mode 100644 index 00000000000..9cf2d8736ca --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2inv__square_8hpp_source.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/inv_square.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inv_square.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_INV_SQUARE_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_INV_SQUARE_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ +
6 #include <valarray>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  namespace {
+
12  class inv_square_vari : public op_v_vari {
+
13  public:
+
14  explicit inv_square_vari(vari* avi) :
+
15  op_v_vari(stan::math::inv_square(avi->val_), avi) {
+
16  }
+
17  void chain() {
+
18  avi_->adj_ -= 2 * adj_ / (avi_->val_ * avi_->val_ * avi_->val_);
+
19  }
+
20  };
+
21  }
+
22 
+
42  inline var inv_square(const var& a) {
+
43  return var(new inv_square_vari(a.vi_));
+
44  }
+
45 
+
46  }
+
47 }
+
48 #endif
+ + +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
fvar< T > inv_square(const fvar< T > &x)
Definition: inv_square.hpp:15
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2is__inf_8hpp.html b/doc/api/html/rev_2scal_2fun_2is__inf_8hpp.html new file mode 100644 index 00000000000..ea3c29e9fb6 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2is__inf_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/is_inf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
is_inf.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

int stan::math::is_inf (const var &v)
 Returns 1 if the input's value is infinite and 0 otherwise. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2is__inf_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2is__inf_8hpp_source.html new file mode 100644 index 00000000000..676901a256e --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2is__inf_8hpp_source.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/is_inf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
is_inf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_IS_INF_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_IS_INF_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ + +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
21  inline
+
22  int
+
23  is_inf(const var& v) {
+
24  return stan::math::is_inf(v.val());
+
25  }
+
26 
+
27  }
+
28 }
+
29 
+
30 #endif
+ + +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
int is_inf(const fvar< T > &x)
Returns 1 if the input's value is infinite and 0 otherwise.
Definition: is_inf.hpp:22
+ +
double val() const
Return the value of this variable.
Definition: var.hpp:234
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2is__nan_8hpp.html b/doc/api/html/rev_2scal_2fun_2is__nan_8hpp.html new file mode 100644 index 00000000000..a986c5ab92d --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2is__nan_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/is_nan.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
is_nan.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

bool stan::math::is_nan (const var &v)
 Returns 1 if the input's value is NaN and 0 otherwise. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2is__nan_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2is__nan_8hpp_source.html new file mode 100644 index 00000000000..0359b49b677 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2is__nan_8hpp_source.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/is_nan.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
is_nan.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_IS_NAN_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_IS_NAN_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ + +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
21  inline bool is_nan(const var& v) {
+
22  return stan::math::is_nan(v.val());
+
23  }
+
24 
+
25  }
+
26 }
+
27 
+
28 #endif
+ + +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+ +
double val() const
Return the value of this variable.
Definition: var.hpp:234
+
int is_nan(const fvar< T > &x)
Returns 1 if the input's value is NaN and 0 otherwise.
Definition: is_nan.hpp:22
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2is__uninitialized_8hpp.html b/doc/api/html/rev_2scal_2fun_2is__uninitialized_8hpp.html new file mode 100644 index 00000000000..414eb14108a --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2is__uninitialized_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/is_uninitialized.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
is_uninitialized.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

bool stan::math::is_uninitialized (var x)
 Returns true if the specified variable is uninitialized. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2is__uninitialized_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2is__uninitialized_8hpp_source.html new file mode 100644 index 00000000000..88340ddd51c --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2is__uninitialized_8hpp_source.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/is_uninitialized.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
is_uninitialized.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_IS_UNINITIALIZED_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_IS_UNINITIALIZED_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ +
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
23  inline bool is_uninitialized(var x) {
+
24  return x.is_uninitialized();
+
25  }
+
26 
+
27  }
+
28 }
+
29 #endif
+ + +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
bool is_uninitialized(T x)
Returns true if the specified variable is uninitialized.
+
bool is_uninitialized()
Return true if this variable has been declared, but not been defined.
Definition: var.hpp:55
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2lgamma_8hpp.html b/doc/api/html/rev_2scal_2fun_2lgamma_8hpp.html new file mode 100644 index 00000000000..35d65ade311 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2lgamma_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/lgamma.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
lgamma.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <boost/math/special_functions/digamma.hpp>
+#include <boost/math/special_functions/gamma.hpp>
+#include <valarray>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::lgamma (const stan::math::var &a)
 The log gamma function for variables (C99). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2lgamma_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2lgamma_8hpp_source.html new file mode 100644 index 00000000000..c434907d07e --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2lgamma_8hpp_source.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/lgamma.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
lgamma.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_LGAMMA_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_LGAMMA_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ +
6 #include <boost/math/special_functions/digamma.hpp>
+
7 #include <boost/math/special_functions/gamma.hpp>
+
8 #include <valarray>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
13  namespace {
+
14  class lgamma_vari : public op_v_vari {
+
15  public:
+
16  lgamma_vari(double value, vari* avi) :
+
17  op_v_vari(value, avi) {
+
18  }
+
19  void chain() {
+
20  avi_->adj_ += adj_ * boost::math::digamma(avi_->val_);
+
21  }
+
22  };
+
23  }
+
24 
+
35  inline var lgamma(const stan::math::var& a) {
+
36  double lgamma_a = boost::math::lgamma(a.val());
+
37  return var(new lgamma_vari(lgamma_a, a.vi_));
+
38  }
+
39 
+
40  }
+
41 }
+
42 #endif
+ +
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
var lgamma(const stan::math::var &a)
The log gamma function for variables (C99).
Definition: lgamma.hpp:35
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
double val() const
Return the value of this variable.
Definition: var.hpp:234
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2lmgamma_8hpp.html b/doc/api/html/rev_2scal_2fun_2lmgamma_8hpp.html new file mode 100644 index 00000000000..6833ad80bd0 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2lmgamma_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/lmgamma.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
lmgamma.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + +

+Functions

var stan::math::lmgamma (int a, const stan::math::var &b)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2lmgamma_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2lmgamma_8hpp_source.html new file mode 100644 index 00000000000..c0e273b34bb --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2lmgamma_8hpp_source.html @@ -0,0 +1,150 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/lmgamma.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
lmgamma.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_LMGAMMA_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_LMGAMMA_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ + + +
8 #include <valarray>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
13  namespace {
+
14  class lmgamma_dv_vari : public op_dv_vari {
+
15  public:
+
16  lmgamma_dv_vari(int a, vari* bvi) :
+
17  op_dv_vari(stan::math::lmgamma(a, bvi->val_), a, bvi) {
+
18  }
+
19  void chain() {
+
20  double deriv = 0;
+
21  for (int i = 1; i < ad_ + 1; i++)
+
22  deriv += stan::math::digamma(bvi_->val_ + (1.0 - i) / 2.0);
+
23  bvi_->adj_ += adj_ * deriv;
+
24  }
+
25  };
+
26  }
+
27 
+
28  inline var lmgamma(int a, const stan::math::var& b) {
+
29  return var(new lmgamma_dv_vari(a, b.vi_));
+
30  }
+
31 
+
32  }
+
33 }
+
34 #endif
+ + +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ + +
fvar< typename stan::return_type< T, int >::type > lmgamma(int x1, const fvar< T > &x2)
Definition: lmgamma.hpp:16
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2log10_8hpp.html b/doc/api/html/rev_2scal_2fun_2log10_8hpp.html new file mode 100644 index 00000000000..118cc713838 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2log10_8hpp.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/log10.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log10.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::log10 (const var &a)
 Return the base 10 log of the specified variable (cmath). More...
 
+

Variable Documentation

+ +
+
+ + + + +
const double exp_val_
+
+ +

Definition at line 14 of file log10.hpp.

+ +
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2log10_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2log10_8hpp_source.html new file mode 100644 index 00000000000..7227d983733 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2log10_8hpp_source.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/log10.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log10.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_LOG10_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_LOG10_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ +
6 #include <cmath>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  namespace {
+
12  class log10_vari : public op_v_vari {
+
13  public:
+
14  const double exp_val_;
+
15  explicit log10_vari(vari* avi) :
+
16  op_v_vari(std::log10(avi->val_), avi),
+
17  exp_val_(avi->val_) {
+
18  }
+
19  void chain() {
+
20  avi_->adj_ += adj_ / (stan::math::LOG_10 * exp_val_);
+
21  }
+
22  };
+
23  }
+
24 
+
54  inline var log10(const var& a) {
+
55  return var(new log10_vari(a.vi_));
+
56  }
+
57 
+
58  }
+
59 }
+
60 #endif
+ +
const double LOG_10
The natural logarithm of 10, .
Definition: constants.hpp:39
+
fvar< T > log10(const fvar< T > &x)
Definition: log10.hpp:15
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
const double exp_val_
Definition: log10.hpp:14
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2log1m_8hpp.html b/doc/api/html/rev_2scal_2fun_2log1m_8hpp.html new file mode 100644 index 00000000000..2364f46ae1b --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2log1m_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/log1m.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log1m.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::log1m (const stan::math::var &a)
 The log (1 - x) function for variables. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2log1m_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2log1m_8hpp_source.html new file mode 100644 index 00000000000..83e62c1b11e --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2log1m_8hpp_source.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/log1m.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log1m.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_LOG1M_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_LOG1M_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  namespace {
+
11  class log1m_vari : public op_v_vari {
+
12  public:
+
13  explicit log1m_vari(vari* avi) :
+
14  op_v_vari(stan::math::log1p(-avi->val_), avi) {
+
15  }
+
16  void chain() {
+
17  avi_->adj_ += adj_ / (avi_->val_ - 1);
+
18  }
+
19  };
+
20  }
+
21 
+
32  inline var log1m(const stan::math::var& a) {
+
33  return var(new log1m_vari(a.vi_));
+
34  }
+
35 
+
36  }
+
37 }
+
38 #endif
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
fvar< T > log1p(const fvar< T > &x)
Definition: log1p.hpp:16
+ +
fvar< T > log1m(const fvar< T > &x)
Definition: log1m.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2log1m__exp_8hpp.html b/doc/api/html/rev_2scal_2fun_2log1m__exp_8hpp.html new file mode 100644 index 00000000000..e426990f688 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2log1m__exp_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/log1m_exp.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log1m_exp.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::log1m_exp (const stan::math::var &a)
 Return the log of 1 minus the exponential of the specified variable. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2log1m__exp_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2log1m__exp_8hpp_source.html new file mode 100644 index 00000000000..8ccdecbc253 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2log1m__exp_8hpp_source.html @@ -0,0 +1,155 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/log1m_exp.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log1m_exp.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_LOG1M_EXP_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_LOG1M_EXP_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ + +
7 #include <cmath>
+
8 
+
9 #ifdef _MSC_VER
+
10 #include <boost/math/special_functions/expm1.hpp>
+
11 using boost::math::expm1;
+
12 #endif
+
13 
+
14 namespace stan {
+
15  namespace math {
+
16 
+
17  namespace {
+
18  class log1m_exp_v_vari : public op_v_vari {
+
19  public:
+
20  explicit log1m_exp_v_vari(vari* avi) :
+
21  op_v_vari(stan::math::log1m_exp(avi->val_),
+
22  avi) {
+
23  }
+
24  void chain() {
+
25  // derivative of
+
26  // log(1-exp(x)) = -exp(x)/(1-exp(x))
+
27  // = -1/(exp(-x)-1)
+
28  // = -1/expm1(-x)
+
29  avi_->adj_ -= adj_ / ::expm1(-(avi_->val_));
+
30  }
+
31  };
+
32  }
+
33 
+
38  inline var log1m_exp(const stan::math::var& a) {
+
39  return var(new log1m_exp_v_vari(a.vi_));
+
40  }
+
41 
+
42  }
+
43 }
+
44 #endif
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
fvar< T > expm1(const fvar< T > &x)
Definition: expm1.hpp:12
+
fvar< T > log1m_exp(const fvar< T > &x)
Definition: log1m_exp.hpp:16
+ +
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2log1p_8hpp.html b/doc/api/html/rev_2scal_2fun_2log1p_8hpp.html new file mode 100644 index 00000000000..41671397536 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2log1p_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/log1p.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log1p.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::log1p (const stan::math::var &a)
 The log (1 + x) function for variables (C99). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2log1p_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2log1p_8hpp_source.html new file mode 100644 index 00000000000..1a8f23751c1 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2log1p_8hpp_source.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/log1p.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log1p.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_LOG1P_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_LOG1P_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ + +
7 #include <valarray>
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
12  namespace {
+
13  class log1p_vari : public op_v_vari {
+
14  public:
+
15  explicit log1p_vari(vari* avi) :
+
16  op_v_vari(stan::math::log1p(avi->val_), avi) {
+
17  }
+
18  void chain() {
+
19  avi_->adj_ += adj_ / (1 + avi_->val_);
+
20  }
+
21  };
+
22  }
+
23 
+
34  inline var log1p(const stan::math::var& a) {
+
35  return var(new log1p_vari(a.vi_));
+
36  }
+
37 
+
38  }
+
39 }
+
40 #endif
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
fvar< T > log1p(const fvar< T > &x)
Definition: log1p.hpp:16
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2log1p__exp_8hpp.html b/doc/api/html/rev_2scal_2fun_2log1p__exp_8hpp.html new file mode 100644 index 00000000000..e41275907e6 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2log1p__exp_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/log1p_exp.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log1p_exp.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::log1p_exp (const stan::math::var &a)
 Return the log of 1 plus the exponential of the specified variable. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2log1p__exp_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2log1p__exp_8hpp_source.html new file mode 100644 index 00000000000..3719cf25f11 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2log1p__exp_8hpp_source.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/log1p_exp.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log1p_exp.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_LOG1P_EXP_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_LOG1P_EXP_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ + +
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  namespace {
+
12  class log1p_exp_v_vari : public op_v_vari {
+
13  public:
+
14  explicit log1p_exp_v_vari(vari* avi) :
+
15  op_v_vari(stan::math::log1p_exp(avi->val_),
+
16  avi) {
+
17  }
+
18  void chain() {
+
19  avi_->adj_ += adj_ * calculate_chain(avi_->val_, val_);
+
20  }
+
21  };
+
22  }
+
23 
+
28  inline var log1p_exp(const stan::math::var& a) {
+
29  return var(new log1p_exp_v_vari(a.vi_));
+
30  }
+
31 
+
32  }
+
33 }
+
34 #endif
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
double calculate_chain(const double &x, const double &val)
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ + +
fvar< T > log1p_exp(const fvar< T > &x)
Definition: log1p_exp.hpp:13
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2log2_8hpp.html b/doc/api/html/rev_2scal_2fun_2log2_8hpp.html new file mode 100644 index 00000000000..c611daa959f --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2log2_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/log2.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log2.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::log2 (const stan::math::var &a)
 Returns the base 2 logarithm of the specified variable (C99). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2log2_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2log2_8hpp_source.html new file mode 100644 index 00000000000..f7ef8f01299 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2log2_8hpp_source.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/log2.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log2.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_LOG2_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_LOG2_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ + +
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  namespace {
+
12  class log2_vari : public op_v_vari {
+
13  public:
+
14  explicit log2_vari(vari* avi) :
+
15  op_v_vari(stan::math::log2(avi->val_), avi) {
+
16  }
+
17  void chain() {
+
18  avi_->adj_ += adj_ / (stan::math::LOG_2 * avi_->val_);
+
19  }
+
20  };
+
21  }
+
22 
+
53  inline var log2(const stan::math::var& a) {
+
54  return var(new log2_vari(a.vi_));
+
55  }
+
56 
+
57  }
+
58 }
+
59 #endif
+
const double LOG_2
The natural logarithm of 2, .
Definition: constants.hpp:33
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ + +
fvar< T > log2(const fvar< T > &x)
Definition: log2.hpp:17
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2log_8hpp.html b/doc/api/html/rev_2scal_2fun_2log_8hpp.html new file mode 100644 index 00000000000..2347877cd06 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2log_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::log (const var &a)
 Return the natural log of the specified variable (cmath). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2log_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2log_8hpp_source.html new file mode 100644 index 00000000000..2a326f91fb7 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2log_8hpp_source.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_LOG_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_LOG_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+
5 #include <cmath>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  namespace {
+
11  class log_vari : public op_v_vari {
+
12  public:
+
13  explicit log_vari(vari* avi) :
+
14  op_v_vari(std::log(avi->val_), avi) {
+
15  }
+
16  void chain() {
+
17  avi_->adj_ += adj_ / avi_->val_;
+
18  }
+
19  };
+
20  }
+
21 
+
50  inline var log(const var& a) {
+
51  return var(new log_vari(a.vi_));
+
52  }
+
53 
+
54  }
+
55 }
+
56 #endif
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2log__diff__exp_8hpp.html b/doc/api/html/rev_2scal_2fun_2log__diff__exp_8hpp.html new file mode 100644 index 00000000000..2885b0d98b0 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2log__diff__exp_8hpp.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/log_diff_exp.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_diff_exp.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

var stan::math::log_diff_exp (const stan::math::var &a, const stan::math::var &b)
 Returns the log sum of exponentials. More...
 
var stan::math::log_diff_exp (const stan::math::var &a, const double &b)
 Returns the log sum of exponentials. More...
 
var stan::math::log_diff_exp (const double &a, const stan::math::var &b)
 Returns the log sum of exponentials. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2log__diff__exp_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2log__diff__exp_8hpp_source.html new file mode 100644 index 00000000000..e74ca34ca2d --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2log__diff__exp_8hpp_source.html @@ -0,0 +1,182 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/log_diff_exp.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_diff_exp.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_LOG_DIFF_EXP_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_LOG_DIFF_EXP_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ + +
7 #include <cmath>
+
8 
+
9 #ifdef _MSC_VER
+
10 #include <boost/math/special_functions/expm1.hpp>
+
11 using boost::math::expm1;
+
12 #endif
+
13 
+
14 namespace stan {
+
15  namespace math {
+
16 
+
17  namespace {
+
18  class log_diff_exp_vv_vari : public op_vv_vari {
+
19  public:
+
20  log_diff_exp_vv_vari(vari* avi, vari* bvi) :
+
21  op_vv_vari(stan::math::log_diff_exp(avi->val_, bvi->val_),
+
22  avi, bvi) {
+
23  }
+
24  void chain() {
+
25  avi_->adj_ += adj_ * calculate_chain(avi_->val_, val_);
+
26  bvi_->adj_ -= adj_ / ::expm1(avi_->val_ - bvi_->val_);
+
27  }
+
28  };
+
29  class log_diff_exp_vd_vari : public op_vd_vari {
+
30  public:
+
31  log_diff_exp_vd_vari(vari* avi, double b) :
+
32  op_vd_vari(stan::math::log_diff_exp(avi->val_, b),
+
33  avi, b) {
+
34  }
+
35  void chain() {
+
36  avi_->adj_ += adj_ * calculate_chain(avi_->val_, val_);
+
37  }
+
38  };
+
39  class log_diff_exp_dv_vari : public op_dv_vari {
+
40  public:
+
41  log_diff_exp_dv_vari(double a, vari* bvi) :
+
42  op_dv_vari(stan::math::log_diff_exp(a, bvi->val_),
+
43  a, bvi) {
+
44  }
+
45  void chain() {
+
46  bvi_->adj_ -= adj_ / ::expm1(ad_ - bvi_->val_);
+
47  }
+
48  };
+
49  }
+
50 
+
54  inline var log_diff_exp(const stan::math::var& a,
+
55  const stan::math::var& b) {
+
56  return var(new log_diff_exp_vv_vari(a.vi_, b.vi_));
+
57  }
+
61  inline var log_diff_exp(const stan::math::var& a,
+
62  const double& b) {
+
63  return var(new log_diff_exp_vd_vari(a.vi_, b));
+
64  }
+
68  inline var log_diff_exp(const double& a,
+
69  const stan::math::var& b) {
+
70  return var(new log_diff_exp_dv_vari(a, b.vi_));
+
71  }
+
72 
+
73  }
+
74 }
+
75 #endif
+ + +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
fvar< T > log_diff_exp(const fvar< T > &x1, const fvar< T > &x2)
+
fvar< T > expm1(const fvar< T > &x)
Definition: expm1.hpp:12
+
double calculate_chain(const double &x, const double &val)
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2log__falling__factorial_8hpp.html b/doc/api/html/rev_2scal_2fun_2log__falling__factorial_8hpp.html new file mode 100644 index 00000000000..97e9d728e17 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2log__falling__factorial_8hpp.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/log_falling_factorial.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_falling_factorial.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <stan/math/prim/scal/fun/log_falling_factorial.hpp>
+#include <boost/math/special_functions/digamma.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

var stan::math::log_falling_factorial (const var &a, const double &b)
 
var stan::math::log_falling_factorial (const var &a, const var &b)
 
var stan::math::log_falling_factorial (const double &a, const var &b)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2log__falling__factorial_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2log__falling__factorial_8hpp_source.html new file mode 100644 index 00000000000..40398b26f20 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2log__falling__factorial_8hpp_source.html @@ -0,0 +1,194 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/log_falling_factorial.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_falling_factorial.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_LOG_FALLING_FACTORIAL_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_LOG_FALLING_FACTORIAL_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ +
6 #include <boost/math/special_functions/digamma.hpp>
+
7 #include <boost/math/special_functions/fpclassify.hpp>
+
8 #include <limits>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
13  namespace {
+
14 
+
15  class log_falling_factorial_vv_vari : public op_vv_vari {
+
16  public:
+
17  log_falling_factorial_vv_vari(vari* avi, vari* bvi) :
+
18  op_vv_vari(stan::math::log_falling_factorial(avi->val_, bvi->val_),
+
19  avi, bvi) {
+
20  }
+
21  void chain() {
+
22  if (unlikely(boost::math::isnan(avi_->val_)
+
23  || boost::math::isnan(bvi_->val_))) {
+
24  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
25  bvi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
26  } else {
+
27  avi_->adj_ += adj_ * boost::math::digamma(avi_->val_ + 1);
+
28  bvi_->adj_ += adj_ * -boost::math::digamma(bvi_->val_ + 1);
+
29  }
+
30  }
+
31  };
+
32 
+
33  class log_falling_factorial_vd_vari : public op_vd_vari {
+
34  public:
+
35  log_falling_factorial_vd_vari(vari* avi, double b) :
+
36  op_vd_vari(stan::math::log_falling_factorial(avi->val_, b), avi, b) {
+
37  }
+
38  void chain() {
+
39  if (unlikely(boost::math::isnan(avi_->val_)
+
40  || boost::math::isnan(bd_)))
+
41  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
42  else
+
43  avi_->adj_ += adj_ * boost::math::digamma(avi_->val_ + 1);
+
44  }
+
45  };
+
46 
+
47  class log_falling_factorial_dv_vari : public op_dv_vari {
+
48  public:
+
49  log_falling_factorial_dv_vari(double a, vari* bvi) :
+
50  op_dv_vari(stan::math::log_falling_factorial(a, bvi->val_), a, bvi) {
+
51  }
+
52  void chain() {
+ +
54  || boost::math::isnan(bvi_->val_)))
+
55  bvi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
56  else
+
57  bvi_->adj_ += adj_ * -boost::math::digamma(bvi_->val_ + 1);
+
58  }
+
59  };
+
60  }
+
61 
+
62  inline var log_falling_factorial(const var& a,
+
63  const double& b) {
+
64  return var(new log_falling_factorial_vd_vari(a.vi_, b));
+
65  }
+
66 
+
67  inline var log_falling_factorial(const var& a,
+
68  const var& b) {
+
69  return var(new log_falling_factorial_vv_vari(a.vi_, b.vi_));
+
70  }
+
71 
+
72  inline var log_falling_factorial(const double& a,
+
73  const var& b) {
+
74  return var(new log_falling_factorial_dv_vari(a, b.vi_));
+
75  }
+
76  }
+
77 }
+
78 #endif
+ +
fvar< T > log_falling_factorial(const fvar< T > &x, const fvar< T > &n)
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
+
#define unlikely(x)
Definition: likely.hpp:9
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2log__mix_8hpp.html b/doc/api/html/rev_2scal_2fun_2log__mix_8hpp.html new file mode 100644 index 00000000000..50f7d31bedc --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2log__mix_8hpp.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/log_mix.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_mix.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

void stan::math::log_mix_partial_helper (const double &theta_val, const double &lambda1_val, const double &lambda2_val, double &one_m_exp_lam2_m_lam1, double &one_m_t_prod_exp_lam2_m_lam1, double &one_d_t_plus_one_m_t_prod_exp_lam2_m_lam1)
 
template<typename T_theta , typename T_lambda1 , typename T_lambda2 >
return_type< T_theta,
+T_lambda1, T_lambda2 >::type 
stan::math::log_mix (const T_theta &theta, const T_lambda1 &lambda1, const T_lambda2 &lambda2)
 Return the log mixture density with specified mixing proportion and log densities and its derivative at each. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2log__mix_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2log__mix_8hpp_source.html new file mode 100644 index 00000000000..608f2b87a6f --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2log__mix_8hpp_source.html @@ -0,0 +1,239 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/log_mix.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_mix.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_LOG_MIX_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_LOG_MIX_HPP
+
3 
+ + + + + + + + +
12 #include <cmath>
+
13 
+
14 namespace stan {
+
15 
+
16  namespace math {
+
17 
+
18  /* Computes shared terms in log_mix partial derivative calculations
+
19  *
+
20  * @param[in] theta_val value of mixing proportion theta.
+
21  * @param[in] lambda1_val value of log density multiplied by theta.
+
22  * @param[in] lambda2_val value of log density multiplied by 1 - theta.
+
23  * @param[out] one_m_exp_lam2_m_lam1 shared term in deriv calculation.
+
24  * @param[out] one_m_t_prod_exp_lam2_m_lam1 shared term in deriv calculation.
+
25  * @param[out] one_d_t_plus_one_m_t_prod_exp_lam2_m_lam1 shared term in deriv calculation.
+
26  */
+
27  inline void
+
28  log_mix_partial_helper(const double& theta_val,
+
29  const double& lambda1_val,
+
30  const double& lambda2_val,
+
31  double& one_m_exp_lam2_m_lam1,
+
32  double& one_m_t_prod_exp_lam2_m_lam1,
+
33  double& one_d_t_plus_one_m_t_prod_exp_lam2_m_lam1) {
+
34  using std::exp;
+
35  double lam2_m_lam1 = lambda2_val - lambda1_val;
+
36  double exp_lam2_m_lam1 = exp(lam2_m_lam1);
+
37  one_m_exp_lam2_m_lam1 = 1 - exp_lam2_m_lam1;
+
38  double one_m_t = 1 - theta_val;
+
39  one_m_t_prod_exp_lam2_m_lam1 = one_m_t * exp_lam2_m_lam1;
+
40  one_d_t_plus_one_m_t_prod_exp_lam2_m_lam1
+
41  = 1 / (theta_val + one_m_t_prod_exp_lam2_m_lam1);
+
42  }
+
43 
+
83  template <typename T_theta,
+
84  typename T_lambda1,
+
85  typename T_lambda2>
+
86  inline
+ +
88  log_mix(const T_theta& theta,
+
89  const T_lambda1& lambda1,
+
90  const T_lambda2& lambda2) {
+
91  using std::log;
+
92  using stan::math::log_mix;
+
93  using stan::math::log1m;
+ +
95 
+ +
97  operands_and_partials(theta, lambda1, lambda2);
+
98 
+
99  double theta_double = value_of(theta);
+
100  const double lambda1_double = value_of(lambda1);
+
101  const double lambda2_double = value_of(lambda2);
+
102 
+
103  double log_mix_function_value
+
104  = log_mix(theta_double, lambda1_double, lambda2_double);
+
105 
+
106  double one_m_exp_lam2_m_lam1(0.0);
+
107  double one_m_t_prod_exp_lam2_m_lam1(0.0);
+
108  double one_d_t_plus_one_m_t_prod_exp_lam2_m_lam1(0.0);
+
109 
+
110  if (lambda1 > lambda2) {
+
111  log_mix_partial_helper(theta_double,
+
112  lambda1_double,
+
113  lambda2_double,
+
114  one_m_exp_lam2_m_lam1,
+
115  one_m_t_prod_exp_lam2_m_lam1,
+
116  one_d_t_plus_one_m_t_prod_exp_lam2_m_lam1);
+
117  } else {
+
118  log_mix_partial_helper(1.0 - theta_double,
+
119  lambda2_double,
+
120  lambda1_double,
+
121  one_m_exp_lam2_m_lam1,
+
122  one_m_t_prod_exp_lam2_m_lam1,
+
123  one_d_t_plus_one_m_t_prod_exp_lam2_m_lam1);
+
124  one_m_exp_lam2_m_lam1 = -one_m_exp_lam2_m_lam1;
+
125  theta_double = one_m_t_prod_exp_lam2_m_lam1;
+
126  one_m_t_prod_exp_lam2_m_lam1 = 1.0 - value_of(theta);
+
127  }
+
128 
+ +
130  operands_and_partials.d_x1[0]
+
131  = one_m_exp_lam2_m_lam1
+
132  * one_d_t_plus_one_m_t_prod_exp_lam2_m_lam1;
+ +
134  operands_and_partials.d_x2[0]
+
135  = theta_double
+
136  * one_d_t_plus_one_m_t_prod_exp_lam2_m_lam1;
+ +
138  operands_and_partials.d_x3[0]
+
139  = one_m_t_prod_exp_lam2_m_lam1
+
140  * one_d_t_plus_one_m_t_prod_exp_lam2_m_lam1;
+
141 
+
142  return operands_and_partials.to_var(log_mix_function_value);
+
143  }
+
144 
+
145  } // namespace math
+
146 
+
147 } // namespace stan
+
148 
+
149 #endif
+ +
void log_mix_partial_helper(const T_theta &theta, const T_lambda1 &lambda1, const T_lambda2 &lambda2, typename promote_args< T_theta, T_lambda1, T_lambda2 >::type(&partials_array)[N])
Definition: log_mix.hpp:31
+
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ + + + +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ + +
fvar< T > log_mix(const fvar< T > &theta, const fvar< T > &lambda1, const fvar< T > &lambda2)
Return the log mixture density with specified mixing proportion and log densities and its derivative ...
Definition: log_mix.hpp:116
+ +
fvar< T > log1m(const fvar< T > &x)
Definition: log1m.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2log__rising__factorial_8hpp.html b/doc/api/html/rev_2scal_2fun_2log__rising__factorial_8hpp.html new file mode 100644 index 00000000000..b6866cebd18 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2log__rising__factorial_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/log_rising_factorial.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_rising_factorial.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

var stan::math::log_rising_factorial (const var &a, const double &b)
 
var stan::math::log_rising_factorial (const var &a, const var &b)
 
var stan::math::log_rising_factorial (const double &a, const var &b)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2log__rising__factorial_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2log__rising__factorial_8hpp_source.html new file mode 100644 index 00000000000..193bd3e1025 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2log__rising__factorial_8hpp_source.html @@ -0,0 +1,181 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/log_rising_factorial.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_rising_factorial.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_LOG_RISING_FACTORIAL_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_LOG_RISING_FACTORIAL_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ + + +
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
12  namespace {
+
13 
+
14  class log_rising_factorial_vv_vari : public op_vv_vari {
+
15  public:
+
16  log_rising_factorial_vv_vari(vari* avi, vari* bvi) :
+
17  op_vv_vari(stan::math::log_rising_factorial(avi->val_, bvi->val_),
+
18  avi, bvi) {
+
19  }
+
20  void chain() {
+
21  avi_->adj_ += adj_ * (digamma(avi_->val_ + bvi_->val_)
+
22  - digamma(avi_->val_));
+
23  bvi_->adj_ += adj_ * digamma(avi_->val_ + bvi_->val_);
+
24  }
+
25  };
+
26 
+
27  class log_rising_factorial_vd_vari : public op_vd_vari {
+
28  public:
+
29  log_rising_factorial_vd_vari(vari* avi, double b) :
+
30  op_vd_vari(stan::math::log_rising_factorial(avi->val_, b), avi, b) {
+
31  }
+
32  void chain() {
+
33  avi_->adj_ += adj_ * (digamma(avi_->val_ + bd_)
+
34  - digamma(avi_->val_));
+
35  }
+
36  };
+
37 
+
38  class log_rising_factorial_dv_vari : public op_dv_vari {
+
39  public:
+
40  log_rising_factorial_dv_vari(double a, vari* bvi) :
+
41  op_dv_vari(stan::math::log_rising_factorial(a, bvi->val_), a, bvi) {
+
42  }
+
43  void chain() {
+
44  bvi_->adj_ += adj_ * digamma(bvi_->val_ + ad_);
+
45  }
+
46  };
+
47  }
+
48 
+
49  inline var log_rising_factorial(const var& a,
+
50  const double& b) {
+
51  return var(new log_rising_factorial_vd_vari(a.vi_, b));
+
52  }
+
53 
+
54  inline var log_rising_factorial(const var& a,
+
55  const var& b) {
+
56  return var(new log_rising_factorial_vv_vari(a.vi_, b.vi_));
+
57  }
+
58 
+
59  inline var log_rising_factorial(const double& a,
+
60  const var& b) {
+
61  return var(new log_rising_factorial_dv_vari(a, b.vi_));
+
62  }
+
63  }
+
64 }
+
65 #endif
+ + + +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+ +
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
fvar< T > log_rising_factorial(const fvar< T > &x, const fvar< T > &n)
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2log__sum__exp_8hpp.html b/doc/api/html/rev_2scal_2fun_2log__sum__exp_8hpp.html new file mode 100644 index 00000000000..39d3873d870 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2log__sum__exp_8hpp.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/log_sum_exp.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
log_sum_exp.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

var stan::math::log_sum_exp (const stan::math::var &a, const stan::math::var &b)
 Returns the log sum of exponentials. More...
 
var stan::math::log_sum_exp (const stan::math::var &a, const double &b)
 Returns the log sum of exponentials. More...
 
var stan::math::log_sum_exp (const double &a, const stan::math::var &b)
 Returns the log sum of exponentials. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2log__sum__exp_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2log__sum__exp_8hpp_source.html new file mode 100644 index 00000000000..b836570621e --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2log__sum__exp_8hpp_source.html @@ -0,0 +1,177 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/log_sum_exp.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
log_sum_exp.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_LOG_SUM_EXP_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_LOG_SUM_EXP_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ + +
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  namespace {
+
12 
+
13  class log_sum_exp_vv_vari : public op_vv_vari {
+
14  public:
+
15  log_sum_exp_vv_vari(vari* avi, vari* bvi) :
+
16  op_vv_vari(stan::math::log_sum_exp(avi->val_, bvi->val_),
+
17  avi, bvi) {
+
18  }
+
19  void chain() {
+
20  avi_->adj_ += adj_ * calculate_chain(avi_->val_, val_);
+
21  bvi_->adj_ += adj_ * calculate_chain(bvi_->val_, val_);
+
22  }
+
23  };
+
24  class log_sum_exp_vd_vari : public op_vd_vari {
+
25  public:
+
26  log_sum_exp_vd_vari(vari* avi, double b) :
+
27  op_vd_vari(stan::math::log_sum_exp(avi->val_, b),
+
28  avi, b) {
+
29  }
+
30  void chain() {
+
31  avi_->adj_ += adj_ * calculate_chain(avi_->val_, val_);
+
32  }
+
33  };
+
34  class log_sum_exp_dv_vari : public op_dv_vari {
+
35  public:
+
36  log_sum_exp_dv_vari(double a, vari* bvi) :
+
37  op_dv_vari(stan::math::log_sum_exp(a, bvi->val_),
+
38  a, bvi) {
+
39  }
+
40  void chain() {
+
41  bvi_->adj_ += adj_ * calculate_chain(bvi_->val_, val_);
+
42  }
+
43  };
+
44 
+
45  }
+
46 
+
50  inline var log_sum_exp(const stan::math::var& a,
+
51  const stan::math::var& b) {
+
52  return var(new log_sum_exp_vv_vari(a.vi_, b.vi_));
+
53  }
+
57  inline var log_sum_exp(const stan::math::var& a,
+
58  const double& b) {
+
59  return var(new log_sum_exp_vd_vari(a.vi_, b));
+
60  }
+
64  inline var log_sum_exp(const double& a,
+
65  const stan::math::var& b) {
+
66  return var(new log_sum_exp_dv_vari(a, b.vi_));
+
67  }
+
68 
+
69  }
+
70 }
+
71 #endif
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
fvar< T > log_sum_exp(const std::vector< fvar< T > > &v)
Definition: log_sum_exp.hpp:14
+ +
double calculate_chain(const double &x, const double &val)
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2modified__bessel__first__kind_8hpp.html b/doc/api/html/rev_2scal_2fun_2modified__bessel__first__kind_8hpp.html new file mode 100644 index 00000000000..6848338bb0c --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2modified__bessel__first__kind_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/modified_bessel_first_kind.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
modified_bessel_first_kind.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + +

+Functions

var stan::math::modified_bessel_first_kind (const int &v, const var &a)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2modified__bessel__first__kind_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2modified__bessel__first__kind_8hpp_source.html new file mode 100644 index 00000000000..4eeb88d4a91 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2modified__bessel__first__kind_8hpp_source.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/modified_bessel_first_kind.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
modified_bessel_first_kind.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_MODIFIED_BESSEL_FIRST_KIND_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_MODIFIED_BESSEL_FIRST_KIND_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  namespace {
+
11 
+
12  class modified_bessel_first_kind_dv_vari : public op_dv_vari {
+
13  public:
+
14  modified_bessel_first_kind_dv_vari(int a, vari* bvi) :
+
15  op_dv_vari(stan::math::modified_bessel_first_kind(a, bvi->val_),
+
16  a, bvi) {
+
17  }
+
18  void chain() {
+
19  bvi_->adj_ += adj_
+
20  * (-ad_ * stan::math::modified_bessel_first_kind(ad_, bvi_->val_)
+
21  / bvi_->val_
+
22  + stan::math::modified_bessel_first_kind(ad_ - 1, bvi_->val_));
+
23  }
+
24  };
+
25  }
+
26 
+
27  inline var modified_bessel_first_kind(const int& v,
+
28  const var& a) {
+
29  return var(new modified_bessel_first_kind_dv_vari(v, a.vi_));
+
30  }
+
31 
+
32  }
+
33 }
+
34 #endif
+ + +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
fvar< T > modified_bessel_first_kind(int v, const fvar< T > &z)
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2modified__bessel__second__kind_8hpp.html b/doc/api/html/rev_2scal_2fun_2modified__bessel__second__kind_8hpp.html new file mode 100644 index 00000000000..f574064ab44 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2modified__bessel__second__kind_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/modified_bessel_second_kind.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
modified_bessel_second_kind.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + +

+Functions

var stan::math::modified_bessel_second_kind (const int &v, const var &a)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2modified__bessel__second__kind_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2modified__bessel__second__kind_8hpp_source.html new file mode 100644 index 00000000000..aca89bda038 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2modified__bessel__second__kind_8hpp_source.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/modified_bessel_second_kind.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
modified_bessel_second_kind.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_MODIFIED_BESSEL_SECOND_KIND_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_MODIFIED_BESSEL_SECOND_KIND_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  namespace {
+
11 
+
12  class modified_bessel_second_kind_dv_vari : public op_dv_vari {
+
13  public:
+
14  modified_bessel_second_kind_dv_vari(int a, vari* bvi) :
+
15  op_dv_vari(stan::math::modified_bessel_second_kind(a, bvi->val_),
+
16  a, bvi) {
+
17  }
+
18  void chain() {
+
19  bvi_->adj_ -= adj_
+
20  * (ad_ * stan::math::modified_bessel_second_kind(ad_, bvi_->val_)
+
21  / bvi_->val_
+
22  + stan::math::modified_bessel_second_kind(ad_ - 1, bvi_->val_));
+
23  }
+
24  };
+
25  }
+
26 
+
27  inline var modified_bessel_second_kind(const int& v,
+
28  const var& a) {
+
29  return var(new modified_bessel_second_kind_dv_vari(v, a.vi_));
+
30  }
+
31 
+
32  }
+
33 }
+
34 #endif
+
fvar< T > modified_bessel_second_kind(int v, const fvar< T > &z)
+ + +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2multiply__log_8hpp.html b/doc/api/html/rev_2scal_2fun_2multiply__log_8hpp.html new file mode 100644 index 00000000000..2a8c692792a --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2multiply__log_8hpp.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/multiply_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
multiply_log.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <stan/math/rev/scal/fun/log.hpp>
+#include <stan/math/prim/scal/fun/multiply_log.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

var stan::math::multiply_log (const var &a, const var &b)
 Return the value of a*log(b). More...
 
var stan::math::multiply_log (const var &a, const double b)
 Return the value of a*log(b). More...
 
var stan::math::multiply_log (const double a, const var &b)
 Return the value of a*log(b). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2multiply__log_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2multiply__log_8hpp_source.html new file mode 100644 index 00000000000..67cb4a4af3e --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2multiply__log_8hpp_source.html @@ -0,0 +1,193 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/multiply_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
multiply_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_MULTIPLY_LOG_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_MULTIPLY_LOG_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ + +
7 #include <boost/math/special_functions/fpclassify.hpp>
+
8 #include <limits>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
13  namespace {
+
14  class multiply_log_vv_vari : public op_vv_vari {
+
15  public:
+
16  multiply_log_vv_vari(vari* avi, vari* bvi) :
+
17  op_vv_vari(stan::math::multiply_log(avi->val_, bvi->val_), avi, bvi) {
+
18  }
+
19  void chain() {
+
20  using std::log;
+
21  if (unlikely(boost::math::isnan(avi_->val_)
+
22  || boost::math::isnan(bvi_->val_))) {
+
23  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
24  bvi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
25  } else {
+
26  avi_->adj_ += adj_ * log(bvi_->val_);
+
27  if (bvi_->val_ == 0.0 && avi_->val_ == 0)
+
28  bvi_->adj_ += adj_ * std::numeric_limits<double>::infinity();
+
29  else
+
30  bvi_->adj_ += adj_ * avi_->val_ / bvi_->val_;
+
31  }
+
32  }
+
33  };
+
34  class multiply_log_vd_vari : public op_vd_vari {
+
35  public:
+
36  multiply_log_vd_vari(vari* avi, double b) :
+
37  op_vd_vari(stan::math::multiply_log(avi->val_, b), avi, b) {
+
38  }
+
39  void chain() {
+
40  using std::log;
+
41  if (unlikely(boost::math::isnan(avi_->val_)
+
42  || boost::math::isnan(bd_)))
+
43  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
44  else
+
45  avi_->adj_ += adj_ * log(bd_);
+
46  }
+
47  };
+
48  class multiply_log_dv_vari : public op_dv_vari {
+
49  public:
+
50  multiply_log_dv_vari(double a, vari* bvi) :
+
51  op_dv_vari(stan::math::multiply_log(a, bvi->val_), a, bvi) {
+
52  }
+
53  void chain() {
+
54  if (bvi_->val_ == 0.0 && ad_ == 0.0)
+
55  bvi_->adj_ += adj_ * std::numeric_limits<double>::infinity();
+
56  else
+
57  bvi_->adj_ += adj_ * ad_ / bvi_->val_;
+
58  }
+
59  };
+
60  }
+
61 
+
74  inline var multiply_log(const var& a, const var& b) {
+
75  return var(new multiply_log_vv_vari(a.vi_, b.vi_));
+
76  }
+
87  inline var multiply_log(const var& a, const double b) {
+
88  return var(new multiply_log_vd_vari(a.vi_, b));
+
89  }
+
101  inline var multiply_log(const double a, const var& b) {
+
102  if (a == 1.0)
+
103  return log(b);
+
104  return var(new multiply_log_dv_vari(a, b.vi_));
+
105  }
+
106 
+
107  }
+
108 }
+
109 #endif
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
+ +
#define unlikely(x)
Definition: likely.hpp:9
+ +
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
fvar< T > multiply_log(const fvar< T > &x1, const fvar< T > &x2)
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2owens__t_8hpp.html b/doc/api/html/rev_2scal_2fun_2owens__t_8hpp.html new file mode 100644 index 00000000000..f1e052e8d1a --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2owens__t_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/owens_t.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
owens_t.hpp File Reference
+
+
+
#include <math.h>
+#include <stan/math/rev/core.hpp>
+#include <stan/math/prim/scal/fun/constants.hpp>
+#include <stan/math/prim/scal/fun/square.hpp>
+#include <boost/math/special_functions/owens_t.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

var stan::math::owens_t (const var &h, const var &a)
 The Owen's T function of h and a. More...
 
var stan::math::owens_t (const var &h, double a)
 The Owen's T function of h and a. More...
 
var stan::math::owens_t (double h, const var &a)
 The Owen's T function of h and a. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2owens__t_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2owens__t_8hpp_source.html new file mode 100644 index 00000000000..eebed4afb00 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2owens__t_8hpp_source.html @@ -0,0 +1,195 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/owens_t.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
owens_t.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_OWENS_T_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_OWENS_T_HPP
+
3 
+
4 #include <math.h>
+
5 #include <stan/math/rev/core.hpp>
+ + +
8 #include <boost/math/special_functions/owens_t.hpp>
+
9 #include <cmath>
+
10 
+
11 #ifdef _MSC_VER
+
12 #include <boost/math/special_functions/erf.hpp>
+
13 using boost::math::erf;
+
14 #endif
+
15 
+
16 namespace stan {
+
17  namespace math {
+
18 
+
19  namespace {
+
20  class owens_t_vv_vari : public op_vv_vari {
+
21  public:
+
22  owens_t_vv_vari(vari* avi, vari* bvi) :
+
23  op_vv_vari(boost::math::owens_t(avi->val_, bvi->val_), avi, bvi) {
+
24  }
+
25  void chain() {
+
26  const double neg_avi_sq_div_2 = -square(avi_->val_) * 0.5;
+
27  const double one_p_bvi_sq = 1.0 + square(bvi_->val_);
+
28 
+
29  avi_->adj_ += adj_ * ::erf(bvi_->val_ * avi_->val_ * INV_SQRT_2)
+
30  * std::exp(neg_avi_sq_div_2) * INV_SQRT_TWO_PI * -0.5;
+
31  bvi_->adj_ += adj_ * std::exp(neg_avi_sq_div_2 * one_p_bvi_sq)
+
32  / (one_p_bvi_sq * 2.0 * pi());
+
33  }
+
34  };
+
35 
+
36  class owens_t_vd_vari : public op_vd_vari {
+
37  public:
+
38  owens_t_vd_vari(vari* avi, double b) :
+
39  op_vd_vari(boost::math::owens_t(avi->val_, b), avi, b) {
+
40  }
+
41  void chain() {
+
42  avi_->adj_ += adj_ * ::erf(bd_ * avi_->val_ * INV_SQRT_2)
+
43  * std::exp(-square(avi_->val_) * 0.5)
+
44  * INV_SQRT_TWO_PI * -0.5;
+
45  }
+
46  };
+
47 
+
48  class owens_t_dv_vari : public op_dv_vari {
+
49  public:
+
50  owens_t_dv_vari(double a, vari* bvi) :
+
51  op_dv_vari(boost::math::owens_t(a, bvi->val_), a, bvi) {
+
52  }
+
53  void chain() {
+
54  const double one_p_bvi_sq = 1.0 + square(bvi_->val_);
+
55  bvi_->adj_ += adj_ * std::exp(-0.5 * square(ad_) * one_p_bvi_sq)
+
56  / (one_p_bvi_sq * 2.0 * pi());
+
57  }
+
58  };
+
59  }
+
60 
+
71  inline var owens_t(const var& h, const var& a) {
+
72  return var(new owens_t_vv_vari(h.vi_, a.vi_));
+
73  }
+
74 
+
85  inline var owens_t(const var& h, double a) {
+
86  return var(new owens_t_vd_vari(h.vi_, a));
+
87  }
+
88 
+
99  inline var owens_t(double h, const var& a) {
+
100  return var(new owens_t_dv_vari(h, a.vi_));
+
101  }
+
102 
+
103  }
+
104 }
+
105 #endif
+
const double INV_SQRT_TWO_PI
Definition: constants.hpp:166
+ + +
fvar< T > erf(const fvar< T > &x)
Definition: erf.hpp:14
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+
fvar< T > owens_t(const fvar< T > &x1, const fvar< T > &x2)
Definition: owens_t.hpp:14
+
const double INV_SQRT_2
The value of 1 over the square root of 2, .
Definition: constants.hpp:27
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
double pi()
Return the value of pi.
Definition: constants.hpp:86
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2pow_8hpp.html b/doc/api/html/rev_2scal_2fun_2pow_8hpp.html new file mode 100644 index 00000000000..2957983a8bf --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2pow_8hpp.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/pow.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
pow.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <stan/math/rev/scal/fun/sqrt.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <cmath>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

var stan::math::pow (const var &base, const var &exponent)
 Return the base raised to the power of the exponent (cmath). More...
 
var stan::math::pow (const var &base, const double exponent)
 Return the base variable raised to the power of the exponent scalar (cmath). More...
 
var stan::math::pow (const double base, const var &exponent)
 Return the base scalar raised to the power of the exponent variable (cmath). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2pow_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2pow_8hpp_source.html new file mode 100644 index 00000000000..2b72526a3cc --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2pow_8hpp_source.html @@ -0,0 +1,202 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/pow.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
pow.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_POW_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_POW_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ +
6 #include <boost/math/special_functions/fpclassify.hpp>
+
7 #include <cmath>
+
8 #include <limits>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
13  namespace {
+
14  class pow_vv_vari : public op_vv_vari {
+
15  public:
+
16  pow_vv_vari(vari* avi, vari* bvi) :
+
17  op_vv_vari(std::pow(avi->val_, bvi->val_), avi, bvi) {
+
18  }
+
19  void chain() {
+
20  if (unlikely(boost::math::isnan(avi_->val_)
+
21  || boost::math::isnan(bvi_->val_))) {
+
22  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
23  bvi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
24  } else {
+
25  if (avi_->val_ == 0.0) return; // partials zero, avoids 0 & log(0)
+
26  avi_->adj_ += adj_ * bvi_->val_ * val_ / avi_->val_;
+
27  bvi_->adj_ += adj_ * std::log(avi_->val_) * val_;
+
28  }
+
29  }
+
30  };
+
31 
+
32  class pow_vd_vari : public op_vd_vari {
+
33  public:
+
34  pow_vd_vari(vari* avi, double b) :
+
35  op_vd_vari(std::pow(avi->val_, b), avi, b) {
+
36  }
+
37  void chain() {
+
38  if (unlikely(boost::math::isnan(avi_->val_)
+
39  || boost::math::isnan(bd_))) {
+
40  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
41  } else {
+
42  if (avi_->val_ == 0.0) return; // partials zero, avoids 0 & log(0)
+
43  avi_->adj_ += adj_ * bd_ * val_ / avi_->val_;
+
44  }
+
45  }
+
46  };
+
47 
+
48  class pow_dv_vari : public op_dv_vari {
+
49  public:
+
50  pow_dv_vari(double a, vari* bvi) :
+
51  op_dv_vari(std::pow(a, bvi->val_), a, bvi) {
+
52  }
+
53  void chain() {
+
54  if (unlikely(boost::math::isnan(bvi_->val_)
+
55  || boost::math::isnan(ad_))) {
+
56  bvi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
57  } else {
+
58  if (ad_ == 0.0) return; // partials zero, avoids 0 & log(0)
+
59  bvi_->adj_ += adj_ * std::log(ad_) * val_;
+
60  }
+
61  }
+
62  };
+
63  }
+
64 
+
103  inline var pow(const var& base, const var& exponent) {
+
104  return var(new pow_vv_vari(base.vi_, exponent.vi_));
+
105  }
+
106 
+
119  inline var pow(const var& base, const double exponent) {
+
120  if (exponent == 0.5)
+
121  return sqrt(base);
+
122  if (exponent == 1.0)
+
123  return base;
+
124  if (exponent == 2.0)
+
125  return base * base; // FIXME: use square()
+
126  return var(new pow_vd_vari(base.vi_, exponent));
+
127  }
+
128 
+
141  inline var pow(const double base, const var& exponent) {
+
142  return var(new pow_dv_vari(base, exponent.vi_));
+
143  }
+
144 
+
145  }
+
146 }
+
147 #endif
+ +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+ +
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
+
#define unlikely(x)
Definition: likely.hpp:9
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2primitive__value_8hpp.html b/doc/api/html/rev_2scal_2fun_2primitive__value_8hpp.html new file mode 100644 index 00000000000..6c2ecdd3672 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2primitive__value_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/primitive_value.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
primitive_value.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

double stan::math::primitive_value (const var &v)
 Return the primitive double value for the specified auto-diff variable. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2primitive__value_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2primitive__value_8hpp_source.html new file mode 100644 index 00000000000..9dbf3ea113f --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2primitive__value_8hpp_source.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/primitive_value.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
primitive_value.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_PRIMITIVE_VALUE_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_PRIMITIVE_VALUE_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
17  inline double primitive_value(const var& v) {
+
18  return v.val();
+
19  }
+
20 
+
21  }
+
22 }
+
23 #endif
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
double primitive_value(const fvar< T > &v)
Return the primitive value of the specified forward-mode autodiff variable.
+ +
double val() const
Return the value of this variable.
Definition: var.hpp:234
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2rising__factorial_8hpp.html b/doc/api/html/rev_2scal_2fun_2rising__factorial_8hpp.html new file mode 100644 index 00000000000..fc6f5b41469 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2rising__factorial_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/rising_factorial.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
rising_factorial.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <stan/math/prim/scal/fun/rising_factorial.hpp>
+#include <boost/math/special_functions/digamma.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

var stan::math::rising_factorial (const var &a, const double &b)
 
var stan::math::rising_factorial (const var &a, const var &b)
 
var stan::math::rising_factorial (const double &a, const var &b)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2rising__factorial_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2rising__factorial_8hpp_source.html new file mode 100644 index 00000000000..fbf937bbf9b --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2rising__factorial_8hpp_source.html @@ -0,0 +1,184 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/rising_factorial.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
rising_factorial.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_RISING_FACTORIAL_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_RISING_FACTORIAL_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ +
6 #include <boost/math/special_functions/digamma.hpp>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  namespace {
+
12 
+
13  class rising_factorial_vv_vari : public op_vv_vari {
+
14  public:
+
15  rising_factorial_vv_vari(vari* avi, vari* bvi) :
+
16  op_vv_vari(stan::math::rising_factorial(avi->val_, bvi->val_),
+
17  avi, bvi) {
+
18  }
+
19  void chain() {
+
20  avi_->adj_ += adj_
+
21  * stan::math::rising_factorial(avi_->val_, bvi_->val_)
+
22  * (boost::math::digamma(avi_->val_ + bvi_->val_)
+
23  - boost::math::digamma(avi_->val_));
+
24  bvi_->adj_ += adj_
+
25  * stan::math::rising_factorial(avi_->val_, bvi_->val_)
+
26  * boost::math::digamma(bvi_->val_ + avi_->val_);
+
27  }
+
28  };
+
29 
+
30  class rising_factorial_vd_vari : public op_vd_vari {
+
31  public:
+
32  rising_factorial_vd_vari(vari* avi, double b) :
+
33  op_vd_vari(stan::math::rising_factorial(avi->val_, b), avi, b) {
+
34  }
+
35  void chain() {
+
36  avi_->adj_ += adj_ * stan::math::rising_factorial(avi_->val_, bd_)
+
37  * (boost::math::digamma(avi_->val_ + bd_)
+
38  - boost::math::digamma(avi_->val_));
+
39  }
+
40  };
+
41 
+
42  class rising_factorial_dv_vari : public op_dv_vari {
+
43  public:
+
44  rising_factorial_dv_vari(double a, vari* bvi) :
+
45  op_dv_vari(stan::math::rising_factorial(a, bvi->val_), a, bvi) {
+
46  }
+
47  void chain() {
+
48  bvi_->adj_ += adj_ * stan::math::rising_factorial(ad_, bvi_->val_)
+
49  * boost::math::digamma(bvi_->val_ + ad_);
+
50  }
+
51  };
+
52  }
+
53 
+
54  inline var rising_factorial(const var& a,
+
55  const double& b) {
+
56  return var(new rising_factorial_vd_vari(a.vi_, b));
+
57  }
+
58 
+
59  inline var rising_factorial(const var& a,
+
60  const var& b) {
+
61  return var(new rising_factorial_vv_vari(a.vi_, b.vi_));
+
62  }
+
63 
+
64  inline var rising_factorial(const double& a,
+
65  const var& b) {
+
66  return var(new rising_factorial_dv_vari(a, b.vi_));
+
67  }
+
68  }
+
69 }
+
70 #endif
+ + +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
fvar< T > rising_factorial(const fvar< T > &x, const fvar< T > &n)
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2round_8hpp.html b/doc/api/html/rev_2scal_2fun_2round_8hpp.html new file mode 100644 index 00000000000..b1b741def89 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2round_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/round.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
round.hpp File Reference
+
+
+
#include <math.h>
+#include <stan/math/rev/core.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::round (const var &a)
 Returns the rounded form of the specified variable (C99). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2round_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2round_8hpp_source.html new file mode 100644 index 00000000000..8afd33d9dc0 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2round_8hpp_source.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/round.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
round.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_ROUND_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_ROUND_HPP
+
3 
+
4 #include <math.h>
+
5 #include <stan/math/rev/core.hpp>
+
6 #include <boost/math/special_functions/fpclassify.hpp>
+
7 #include <limits>
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
12  namespace {
+
13  class round_vari : public op_v_vari {
+
14  public:
+
15  explicit round_vari(vari* avi) :
+
16  op_v_vari(::round(avi->val_), avi) {
+
17  }
+
18  void chain() {
+
19  if (unlikely(boost::math::isnan(avi_->val_)))
+
20  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
21  }
+
22  };
+
23  }
+
24 
+
57  inline var round(const var& a) {
+
58  return var(new round_vari(a.vi_));
+
59  }
+
60 
+
61  }
+
62 }
+
63 #endif
+ +
fvar< T > round(const fvar< T > &x)
Definition: round.hpp:11
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
+
#define unlikely(x)
Definition: likely.hpp:9
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2sin_8hpp.html b/doc/api/html/rev_2scal_2fun_2sin_8hpp.html new file mode 100644 index 00000000000..1e658b42d62 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2sin_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/sin.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
sin.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::sin (const var &a)
 Return the sine of a radian-scaled variable (cmath). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2sin_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2sin_8hpp_source.html new file mode 100644 index 00000000000..a3568f3a82d --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2sin_8hpp_source.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/sin.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
sin.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_SIN_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_SIN_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+
5 #include <cmath>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  namespace {
+
11  class sin_vari : public op_v_vari {
+
12  public:
+
13  explicit sin_vari(vari* avi) :
+
14  op_v_vari(std::sin(avi->val_), avi) {
+
15  }
+
16  void chain() {
+
17  avi_->adj_ += adj_ * std::cos(avi_->val_);
+
18  }
+
19  };
+
20  }
+
21 
+
49  inline var sin(const var& a) {
+
50  return var(new sin_vari(a.vi_));
+
51  }
+
52 
+
53  }
+
54 }
+
55 #endif
+
fvar< T > cos(const fvar< T > &x)
Definition: cos.hpp:13
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
fvar< T > sin(const fvar< T > &x)
Definition: sin.hpp:14
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2sinh_8hpp.html b/doc/api/html/rev_2scal_2fun_2sinh_8hpp.html new file mode 100644 index 00000000000..37603fea711 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2sinh_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/sinh.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
sinh.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <valarray>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::sinh (const var &a)
 Return the hyperbolic sine of the specified variable (cmath). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2sinh_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2sinh_8hpp_source.html new file mode 100644 index 00000000000..14e52a873a8 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2sinh_8hpp_source.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/sinh.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
sinh.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_SINH_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_SINH_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+
5 #include <valarray>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  namespace {
+
11  class sinh_vari : public op_v_vari {
+
12  public:
+
13  explicit sinh_vari(vari* avi) :
+
14  op_v_vari(std::sinh(avi->val_), avi) {
+
15  }
+
16  void chain() {
+
17  avi_->adj_ += adj_ * std::cosh(avi_->val_);
+
18  }
+
19  };
+
20  }
+
21 
+
49  inline var sinh(const var& a) {
+
50  return var(new sinh_vari(a.vi_));
+
51  }
+
52 
+
53  }
+
54 }
+
55 #endif
+ +
fvar< T > cosh(const fvar< T > &x)
Definition: cosh.hpp:13
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
fvar< T > sinh(const fvar< T > &x)
Definition: sinh.hpp:14
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2sqrt_8hpp.html b/doc/api/html/rev_2scal_2fun_2sqrt_8hpp.html new file mode 100644 index 00000000000..cddf472d50a --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2sqrt_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/sqrt.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
sqrt.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::sqrt (const var &a)
 Return the square root of the specified variable (cmath). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2sqrt_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2sqrt_8hpp_source.html new file mode 100644 index 00000000000..abcc15ba761 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2sqrt_8hpp_source.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/sqrt.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
sqrt.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_SQRT_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_SQRT_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+
5 #include <cmath>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  namespace {
+
11  class sqrt_vari : public op_v_vari {
+
12  public:
+
13  explicit sqrt_vari(vari* avi) :
+
14  op_v_vari(std::sqrt(avi->val_), avi) {
+
15  }
+
16  void chain() {
+
17  avi_->adj_ += adj_ / (2.0 * val_);
+
18  }
+
19  };
+
20  }
+
21 
+
50  inline var sqrt(const var& a) {
+
51  return var(new sqrt_vari(a.vi_));
+
52  }
+
53 
+
54  }
+
55 }
+
56 #endif
+ +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2square_8hpp.html b/doc/api/html/rev_2scal_2fun_2square_8hpp.html new file mode 100644 index 00000000000..55add54c7c8 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2square_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/square.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
square.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::square (const var &x)
 Return the square of the input variable. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2square_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2square_8hpp_source.html new file mode 100644 index 00000000000..60cd705d1bd --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2square_8hpp_source.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/square.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
square.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_SQUARE_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_SQUARE_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
9  namespace {
+
10  class square_vari : public op_v_vari {
+
11  public:
+
12  explicit square_vari(vari* avi) :
+
13  op_v_vari(avi->val_ * avi->val_, avi) {
+
14  }
+
15  void chain() {
+
16  avi_->adj_ += adj_ * 2.0 * avi_->val_;
+
17  }
+
18  };
+
19  }
+
20 
+
46  inline var square(const var& x) {
+
47  return var(new square_vari(x.vi_));
+
48  }
+
49 
+
50  }
+
51 }
+
52 #endif
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2step_8hpp.html b/doc/api/html/rev_2scal_2fun_2step_8hpp.html new file mode 100644 index 00000000000..c8fa7155da2 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2step_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/step.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
step.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::step (const stan::math::var &a)
 Return the step, or heaviside, function applied to the specified variable (stan). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2step_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2step_8hpp_source.html new file mode 100644 index 00000000000..8f5b603178d --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2step_8hpp_source.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/step.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
step.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_STEP_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_STEP_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
25  inline var step(const stan::math::var& a) {
+
26  return var(new vari(a.vi_->val_ < 0.0 ? 0.0 : 1.0));
+
27  }
+
28 
+
29  }
+
30 }
+
31 #endif
+ +
The variable implementation base class.
Definition: vari.hpp:28
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
const double val_
The value of this variable.
Definition: vari.hpp:36
+
int step(const T y)
The step, or Heaviside, function.
Definition: step.hpp:29
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2tan_8hpp.html b/doc/api/html/rev_2scal_2fun_2tan_8hpp.html new file mode 100644 index 00000000000..5f847af8b88 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2tan_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/tan.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
tan.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::tan (const var &a)
 Return the tangent of a radian-scaled variable (cmath). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2tan_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2tan_8hpp_source.html new file mode 100644 index 00000000000..ca15a10d51e --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2tan_8hpp_source.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/tan.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
tan.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_TAN_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_TAN_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+
5 #include <cmath>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  namespace {
+
11  class tan_vari : public op_v_vari {
+
12  public:
+
13  explicit tan_vari(vari* avi) :
+
14  op_v_vari(std::tan(avi->val_), avi) {
+
15  }
+
16  void chain() {
+
17  avi_->adj_ += adj_ * (1.0 + val_ * val_);
+
18  }
+
19  };
+
20  }
+
21 
+
49  inline var tan(const var& a) {
+
50  return var(new tan_vari(a.vi_));
+
51  }
+
52 
+
53  }
+
54 }
+
55 #endif
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
fvar< T > tan(const fvar< T > &x)
Definition: tan.hpp:14
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2tanh_8hpp.html b/doc/api/html/rev_2scal_2fun_2tanh_8hpp.html new file mode 100644 index 00000000000..190ddb1001e --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2tanh_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/tanh.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
tanh.hpp File Reference
+
+
+
#include <stan/math/rev/core.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::tanh (const var &a)
 Return the hyperbolic tangent of the specified variable (cmath). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2tanh_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2tanh_8hpp_source.html new file mode 100644 index 00000000000..a040ce64aab --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2tanh_8hpp_source.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/tanh.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
tanh.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_TANH_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_TANH_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+
5 #include <cmath>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  namespace {
+
11  class tanh_vari : public op_v_vari {
+
12  public:
+
13  explicit tanh_vari(vari* avi) :
+
14  op_v_vari(std::tanh(avi->val_), avi) {
+
15  }
+
16  void chain() {
+
17  double cosh = std::cosh(avi_->val_);
+
18  avi_->adj_ += adj_ / (cosh * cosh);
+
19  }
+
20  };
+
21  }
+
22 
+
50  inline var tanh(const var& a) {
+
51  return var(new tanh_vari(a.vi_));
+
52  }
+
53 
+
54  }
+
55 }
+
56 #endif
+ +
fvar< T > cosh(const fvar< T > &x)
Definition: cosh.hpp:13
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
fvar< T > tanh(const fvar< T > &x)
Definition: tanh.hpp:14
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2tgamma_8hpp.html b/doc/api/html/rev_2scal_2fun_2tgamma_8hpp.html new file mode 100644 index 00000000000..1ad0ed7926d --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2tgamma_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/tgamma.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
tgamma.hpp File Reference
+
+
+
#include <boost/math/special_functions/digamma.hpp>
+#include <stan/math/rev/core.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::tgamma (const stan::math::var &a)
 Return the Gamma function applied to the specified variable (C99). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2tgamma_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2tgamma_8hpp_source.html new file mode 100644 index 00000000000..40885730d16 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2tgamma_8hpp_source.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/tgamma.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
tgamma.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_TGAMMA_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_TGAMMA_HPP
+
3 
+
4 #include <boost/math/special_functions/digamma.hpp>
+
5 #include <stan/math/rev/core.hpp>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  namespace {
+
11  class tgamma_vari : public op_v_vari {
+
12  public:
+
13  explicit tgamma_vari(vari* avi) :
+
14  op_v_vari(boost::math::tgamma(avi->val_), avi) {
+
15  }
+
16  void chain() {
+
17  avi_->adj_ += adj_ * val_ * boost::math::digamma(avi_->val_);
+
18  }
+
19  };
+
20  }
+
21 
+
65  inline var tgamma(const stan::math::var& a) {
+
66  return var(new tgamma_vari(a.vi_));
+
67  }
+
68 
+
69  }
+
70 }
+
71 #endif
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
fvar< T > tgamma(const fvar< T > &x)
Definition: tgamma.hpp:15
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2trunc_8hpp.html b/doc/api/html/rev_2scal_2fun_2trunc_8hpp.html new file mode 100644 index 00000000000..53740b201a6 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2trunc_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/trunc.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
trunc.hpp File Reference
+
+
+
#include <math.h>
+#include <stan/math/rev/core.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

var stan::math::trunc (const var &a)
 Returns the truncatation of the specified variable (C99). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2trunc_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2trunc_8hpp_source.html new file mode 100644 index 00000000000..acba0386325 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2trunc_8hpp_source.html @@ -0,0 +1,151 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/trunc.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
trunc.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_TRUNC_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_TRUNC_HPP
+
3 
+
4 #include <math.h>
+
5 #include <stan/math/rev/core.hpp>
+
6 #include <boost/math/special_functions/fpclassify.hpp>
+
7 #include <limits>
+
8 
+
9 #ifdef _MSC_VER
+
10 #include <boost/math/special_functions/trunc.hpp>
+
11 using boost::math::trunc;
+
12 #endif
+
13 
+
14 namespace stan {
+
15  namespace math {
+
16 
+
17  namespace {
+
18  class trunc_vari : public op_v_vari {
+
19  public:
+
20  explicit trunc_vari(vari* avi) :
+
21  op_v_vari(::trunc(avi->val_), avi) {
+
22  }
+
23  void chain() {
+
24  if (unlikely(boost::math::isnan(avi_->val_)))
+
25  avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
+
26  }
+
27  };
+
28  }
+
29 
+
60  inline var trunc(const var& a) {
+
61  return var(new trunc_vari(a.vi_));
+
62  }
+
63 
+
64  }
+
65 }
+
66 #endif
+
var trunc(const var &a)
Returns the truncatation of the specified variable (C99).
Definition: trunc.hpp:60
+ +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
fvar< T > trunc(const fvar< T > &x)
Definition: trunc.hpp:12
+
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
+
#define unlikely(x)
Definition: likely.hpp:9
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2value__of_8hpp.html b/doc/api/html/rev_2scal_2fun_2value__of_8hpp.html new file mode 100644 index 00000000000..7b790d3f475 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2value__of_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/value_of.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
value_of.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

double stan::math::value_of (const var &v)
 Return the value of the specified variable. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2value__of_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2value__of_8hpp_source.html new file mode 100644 index 00000000000..5094cadfa60 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2value__of_8hpp_source.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/value_of.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
value_of.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_VALUE_OF_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_VALUE_OF_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
22  inline double value_of(const var& v) {
+
23  return v.vi_->val_;
+
24  }
+
25 
+
26  }
+
27 }
+
28 #endif
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
const double val_
The value of this variable.
Definition: vari.hpp:36
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2value__of__rec_8hpp.html b/doc/api/html/rev_2scal_2fun_2value__of__rec_8hpp.html new file mode 100644 index 00000000000..182529e6470 --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2value__of__rec_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/value_of_rec.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
value_of_rec.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

double stan::math::value_of_rec (const var &v)
 Return the value of the specified variable. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2fun_2value__of__rec_8hpp_source.html b/doc/api/html/rev_2scal_2fun_2value__of__rec_8hpp_source.html new file mode 100644 index 00000000000..b719e875a3d --- /dev/null +++ b/doc/api/html/rev_2scal_2fun_2value__of__rec_8hpp_source.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/fun/value_of_rec.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
value_of_rec.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_FUN_VALUE_OF_REC_HPP
+
2 #define STAN_MATH_REV_SCAL_FUN_VALUE_OF_REC_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
15  inline double value_of_rec(const var& v) {
+
16  return v.vi_->val_;
+
17  }
+
18 
+
19  }
+
20 }
+
21 #endif
+ +
double value_of_rec(const fvar< T > &v)
Return the value of the specified variable.
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
const double val_
The value of this variable.
Definition: vari.hpp:36
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2meta_2is__var_8hpp.html b/doc/api/html/rev_2scal_2meta_2is__var_8hpp.html new file mode 100644 index 00000000000..c86f6cdbab5 --- /dev/null +++ b/doc/api/html/rev_2scal_2meta_2is__var_8hpp.html @@ -0,0 +1,126 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/meta/is_var.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
is_var.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

struct  stan::is_var< stan::math::var >
 
+ + + +

+Namespaces

 stan
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2meta_2is__var_8hpp_source.html b/doc/api/html/rev_2scal_2meta_2is__var_8hpp_source.html new file mode 100644 index 00000000000..f761f311b54 --- /dev/null +++ b/doc/api/html/rev_2scal_2meta_2is__var_8hpp_source.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/meta/is_var.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
is_var.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_META_IS_VAR_HPP
+
2 #define STAN_MATH_REV_SCAL_META_IS_VAR_HPP
+
3 
+ +
5 #include <stan/math/rev/core.hpp>
+
6 
+
7 namespace stan {
+
8 
+
9  template <>
+
10  struct is_var<stan::math::var> {
+
11  enum { value = true };
+
12  };
+
13 
+
14 }
+
15 #endif
+
16 
+ + + +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2meta_2partials__type_8hpp.html b/doc/api/html/rev_2scal_2meta_2partials__type_8hpp.html new file mode 100644 index 00000000000..a805d0b621c --- /dev/null +++ b/doc/api/html/rev_2scal_2meta_2partials__type_8hpp.html @@ -0,0 +1,126 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/meta/partials_type.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
partials_type.hpp File Reference
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rev_2scal_2meta_2partials__type_8hpp_source.html b/doc/api/html/rev_2scal_2meta_2partials__type_8hpp_source.html new file mode 100644 index 00000000000..427d0efaf1b --- /dev/null +++ b/doc/api/html/rev_2scal_2meta_2partials__type_8hpp_source.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/rev/scal/meta/partials_type.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
partials_type.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_SCAL_META_PARTIALS_TYPE_HPP
+
2 #define STAN_MATH_REV_SCAL_META_PARTIALS_TYPE_HPP
+
3 
+
4 #include <stan/math/rev/core.hpp>
+ +
6 
+
7 namespace stan {
+
8 
+
9  template <>
+
10  struct partials_type<stan::math::var> {
+
11  typedef double type;
+
12  };
+
13 
+
14 }
+
15 #endif
+
16 
+ + + +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/row_8hpp.html b/doc/api/html/row_8hpp.html new file mode 100644 index 00000000000..8b81f08cd23 --- /dev/null +++ b/doc/api/html/row_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/row.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
row.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+1, Eigen::Dynamic > 
stan::math::row (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m, size_t i)
 Return the specified row of the specified matrix, using start-at-1 indexing. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/row_8hpp_source.html b/doc/api/html/row_8hpp_source.html new file mode 100644 index 00000000000..309acdebbd1 --- /dev/null +++ b/doc/api/html/row_8hpp_source.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/row.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
row.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_ROW_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_ROW_HPP
+
3 
+ + +
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
22  template <typename T>
+
23  inline
+
24  Eigen::Matrix<T, 1, Eigen::Dynamic>
+
25  row(const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>& m,
+
26  size_t i) {
+
27  stan::math::check_row_index("row", "j", m, i);
+
28 
+
29  return m.row(i - 1);
+
30  }
+
31 
+
32  }
+
33 }
+
34 #endif
+
bool check_row_index(const char *function, const char *name, const Eigen::Matrix< T_y, R, C > &y, size_t i)
Return true if the specified index is a valid row of the matrix.
+ +
Eigen::Matrix< T, 1, Eigen::Dynamic > row(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m, size_t i)
Return the specified row of the specified matrix, using start-at-1 indexing.
Definition: row.hpp:25
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rows_8hpp.html b/doc/api/html/rows_8hpp.html new file mode 100644 index 00000000000..92c41ea4e52 --- /dev/null +++ b/doc/api/html/rows_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/rows.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
rows.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T , int R, int C>
int stan::math::rows (const Eigen::Matrix< T, R, C > &m)
 Return the number of rows in the specified matrix, vector, or row vector. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/rows_8hpp_source.html b/doc/api/html/rows_8hpp_source.html new file mode 100644 index 00000000000..c89e3a7dc5a --- /dev/null +++ b/doc/api/html/rows_8hpp_source.html @@ -0,0 +1,126 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/rows.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
rows.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_ROWS_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_ROWS_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
19  template <typename T, int R, int C>
+
20  inline int rows(const Eigen::Matrix<T, R, C>& m) {
+
21  return m.rows();
+
22  }
+
23 
+
24  }
+
25 }
+
26 #endif
+
int rows(const Eigen::Matrix< T, R, C > &m)
Return the number of rows in the specified matrix, vector, or row vector.
Definition: rows.hpp:20
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scal_2fun_2promote__scalar_8hpp.html b/doc/api/html/scal_2fun_2promote__scalar_8hpp.html new file mode 100644 index 00000000000..6fe679ea7ff --- /dev/null +++ b/doc/api/html/scal_2fun_2promote__scalar_8hpp.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/promote_scalar.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
promote_scalar.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + +

+Classes

struct  stan::math::promote_scalar_struct< T, S >
 General struct to hold static function for promoting underlying scalar types. More...
 
struct  stan::math::promote_scalar_struct< T, T >
 Struct to hold static function for promoting underlying scalar types. More...
 
struct  stan::math::promote_scalar_struct< T, std::vector< S > >
 Struct to hold static function for promoting underlying scalar types. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T , typename S >
promote_scalar_type< T, S >::type stan::math::promote_scalar (const S &x)
 This is the top-level function to call to promote the scalar types of an input of type S to type T. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scal_2fun_2promote__scalar_8hpp_source.html b/doc/api/html/scal_2fun_2promote__scalar_8hpp_source.html new file mode 100644 index 00000000000..961416c4ff2 --- /dev/null +++ b/doc/api/html/scal_2fun_2promote__scalar_8hpp_source.html @@ -0,0 +1,167 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/promote_scalar.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
promote_scalar.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_PROMOTE_SCALAR_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_PROMOTE_SCALAR_HPP
+
3 
+ + + +
7 #include <vector>
+
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
21  template <typename T, typename S>
+ +
34  static T apply(S x) {
+
35  return T(x);
+
36  }
+
37  };
+
38 
+
46  template <typename T>
+
47  struct promote_scalar_struct<T, T> {
+
54  static T apply(const T& x) {
+
55  return x;
+
56  }
+
57  };
+
58 
+
68  template <typename T, typename S>
+
69  struct promote_scalar_struct<T, std::vector<S> > {
+
78  static std::vector<typename promote_scalar_type<T, S>::type>
+
79  apply(const std::vector<S>& x) {
+
80  typedef std::vector<typename promote_scalar_type<T, S>::type> return_t;
+
81  typedef typename index_type<return_t>::type idx_t;
+
82  return_t y(x.size());
+
83  for (idx_t i = 0; i < x.size(); ++i)
+ +
85  return y;
+
86  }
+
87  };
+
88 
+
98  template <typename T, typename S>
+
99  typename promote_scalar_type<T, S>::type
+
100  promote_scalar(const S& x) {
+ +
102  }
+
103 
+
104 
+
105  }
+
106 }
+
107 
+
108 #endif
+ +
static T apply(const T &x)
Return the unmodified input.
+ +
promote_scalar_type< T, S >::type promote_scalar(const S &x)
This is the top-level function to call to promote the scalar types of an input of type S to type T...
+
static std::vector< typename promote_scalar_type< T, S >::type > apply(const std::vector< S > &x)
Return the standard vector consisting of the recursive promotion of the elements of the input standar...
+
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:19
+
General struct to hold static function for promoting underlying scalar types.
+ +
static T apply(S x)
Return the value of the input argument promoted to the type specified by the template parameter...
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scal_2fun_2promote__scalar__type_8hpp.html b/doc/api/html/scal_2fun_2promote__scalar__type_8hpp.html new file mode 100644 index 00000000000..b9253e1fc04 --- /dev/null +++ b/doc/api/html/scal_2fun_2promote__scalar__type_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/promote_scalar_type.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
promote_scalar_type.hpp File Reference
+
+
+
#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + + +

+Classes

struct  stan::math::promote_scalar_type< T, S >
 Template metaprogram to calculate a type for converting a convertible type. More...
 
struct  stan::math::promote_scalar_type< T, std::vector< S > >
 Template metaprogram to calculate a type for a container whose underlying scalar is converted from the second template parameter type to the first. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scal_2fun_2promote__scalar__type_8hpp_source.html b/doc/api/html/scal_2fun_2promote__scalar__type_8hpp_source.html new file mode 100644 index 00000000000..a7b16145551 --- /dev/null +++ b/doc/api/html/scal_2fun_2promote__scalar__type_8hpp_source.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/promote_scalar_type.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
promote_scalar_type.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_PROMOTE_SCALAR_TYPE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_PROMOTE_SCALAR_TYPE_HPP
+
3 
+
4 #include <vector>
+
5 
+
6 namespace stan {
+
7 
+
8  namespace math {
+
9 
+
10 
+
18  template <typename T, typename S>
+ +
23  typedef T type;
+
24  };
+
25 
+
26 
+
35  template <typename T, typename S>
+
36  struct promote_scalar_type<T, std::vector<S> > {
+
40  typedef std::vector<typename promote_scalar_type<T, S>::type> type;
+
41  };
+
42 
+
43 
+
44  }
+
45 
+
46 }
+
47 
+
48 #endif
+
Template metaprogram to calculate a type for converting a convertible type.
+ +
std::vector< typename promote_scalar_type< T, S >::type > type
The promoted type.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scal_2meta_2container__view_8hpp.html b/doc/api/html/scal_2meta_2container__view_8hpp.html new file mode 100644 index 00000000000..17516dd6669 --- /dev/null +++ b/doc/api/html/scal_2meta_2container__view_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/container_view.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
container_view.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + +

+Classes

class  stan::math::container_view< T1, T2 >
 Primary template class for container view of array y with same structure as T1 and size as x. More...
 
struct  stan::math::dummy
 Empty struct for use in boost::condtional<is_constant_struct<T1>::value, T1, dummy>::type as false condtion for safe indexing. More...
 
class  stan::math::container_view< dummy, T2 >
 Dummy type specialization, used in conjunction with struct dummy as described above. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scal_2meta_2container__view_8hpp_source.html b/doc/api/html/scal_2meta_2container__view_8hpp_source.html new file mode 100644 index 00000000000..8e98b32b8bb --- /dev/null +++ b/doc/api/html/scal_2meta_2container__view_8hpp_source.html @@ -0,0 +1,158 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/container_view.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
container_view.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_CONTAINER_VIEW_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_CONTAINER_VIEW_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7 
+
8  namespace math {
+
9 
+
10 
+
20  template <typename T1, typename T2>
+ +
22  public:
+
29  container_view(const T1& x, T2* y) : y_(y) { }
+
30 
+
39  T2& operator[](int i) {
+
40  return y_[0];
+
41  }
+
42  private:
+
43  T2* y_;
+
44  };
+
45 
+
52  struct dummy { };
+
53 
+
61  template <typename T2>
+
62  class container_view<dummy, T2> {
+
63  public:
+ +
65  template <typename T1>
+
66 
+
73  container_view(const T1& x, scalar_t* y) { }
+
74 
+
81  scalar_t operator[](int n) const {
+
82  throw std::out_of_range("can't access dummy elements.");
+
83  }
+
84  };
+
85  }
+
86 }
+
87 
+
88 #endif
+
container_view(const T1 &x, T2 *y)
Constructor.
+
scalar_type_helper< is_vector< T >::value, T >::type type
Definition: scalar_type.hpp:38
+
Empty struct for use in boost::condtional<is_constant_struct<T1>::value, T1, dummy>::type as false co...
+
stan::scalar_type< T2 >::type scalar_t
+
T2 & operator[](int i)
operator[](int i) returns reference to view, indexed by i Specialization handle appropriate broadcast...
+
scalar_t operator[](int n) const
operator[](int i) throws exception
+
container_view(const T1 &x, scalar_t *y)
Nothing initialized.
+ +
void out_of_range(const char *function, const int max, const int index, const char *msg1="", const char *msg2="")
Throw an out_of_range exception with a consistently formatted message.
+
Primary template class for container view of array y with same structure as T1 and size as x...
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scal_2meta_2get_8hpp.html b/doc/api/html/scal_2meta_2get_8hpp.html new file mode 100644 index 00000000000..fbf331cb4a6 --- /dev/null +++ b/doc/api/html/scal_2meta_2get_8hpp.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/get.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
get.hpp File Reference
+
+
+
#include <cmath>
+#include <cstddef>
+
+

Go to the source code of this file.

+ + + + +

+Namespaces

 stan
 
+ + + + +

+Functions

template<typename T >
stan::get (const T &x, size_t n)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scal_2meta_2get_8hpp_source.html b/doc/api/html/scal_2meta_2get_8hpp_source.html new file mode 100644 index 00000000000..61164d924ce --- /dev/null +++ b/doc/api/html/scal_2meta_2get_8hpp_source.html @@ -0,0 +1,124 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/get.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
get.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_GET_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_GET_HPP
+
3 
+
4 #include <cmath>
+
5 #include <cstddef>
+
6 
+
7 namespace stan {
+
8 
+
9  template <typename T>
+
10  inline T get(const T& x, size_t n) {
+
11  return x;
+
12  }
+
13 
+
14 }
+
15 #endif
+
16 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scal_2meta_2index__type_8hpp.html b/doc/api/html/scal_2meta_2index__type_8hpp.html new file mode 100644 index 00000000000..4e9a94b3210 --- /dev/null +++ b/doc/api/html/scal_2meta_2index__type_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/index_type.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
index_type.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Classes

struct  stan::math::index_type< T >
 Primary template class for the metaprogram to compute the index type of a container. More...
 
struct  stan::math::index_type< const T >
 Template class for metaprogram to compute the type of indexes used in a constant container type. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scal_2meta_2index__type_8hpp_source.html b/doc/api/html/scal_2meta_2index__type_8hpp_source.html new file mode 100644 index 00000000000..f548f4f5bea --- /dev/null +++ b/doc/api/html/scal_2meta_2index__type_8hpp_source.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/index_type.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
index_type.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_INDEX_TYPE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_INDEX_TYPE_HPP
+
3 
+
4 namespace stan {
+
5 
+
6  namespace math {
+
7 
+
18  template <typename T>
+
19  struct index_type {
+
20  };
+
21 
+
22 
+
29  template <typename T>
+
30  struct index_type<const T> {
+
31  typedef typename index_type<T>::type type;
+
32  };
+
33 
+
34  }
+
35 }
+
36 
+
37 
+
38 #endif
+
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:19
+
index_type< T >::type type
Definition: index_type.hpp:31
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scal_2meta_2is__vector_8hpp.html b/doc/api/html/scal_2meta_2is__vector_8hpp.html new file mode 100644 index 00000000000..4832bc0bb91 --- /dev/null +++ b/doc/api/html/scal_2meta_2is__vector_8hpp.html @@ -0,0 +1,124 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/is_vector.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
is_vector.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

struct  stan::is_vector< T >
 
+ + + +

+Namespaces

 stan
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scal_2meta_2is__vector_8hpp_source.html b/doc/api/html/scal_2meta_2is__vector_8hpp_source.html new file mode 100644 index 00000000000..583f9a8d324 --- /dev/null +++ b/doc/api/html/scal_2meta_2is__vector_8hpp_source.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/is_vector.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
is_vector.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_IS_VECTOR_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_IS_VECTOR_HPP
+
3 
+
4 namespace stan {
+
5 
+
6  // FIXME: use boost::type_traits::remove_all_extents to
+
7  // extend to array/ptr types
+
8 
+
9  template <typename T>
+
10  struct is_vector {
+
11  enum { value = 0 };
+
12  typedef T type;
+
13  };
+
14 }
+
15 #endif
+
16 
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scal_2meta_2is__vector__like_8hpp.html b/doc/api/html/scal_2meta_2is__vector__like_8hpp.html new file mode 100644 index 00000000000..43c4ae738e7 --- /dev/null +++ b/doc/api/html/scal_2meta_2is__vector__like_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/is_vector_like.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
is_vector_like.hpp File Reference
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scal_2meta_2is__vector__like_8hpp_source.html b/doc/api/html/scal_2meta_2is__vector__like_8hpp_source.html new file mode 100644 index 00000000000..046a228da8e --- /dev/null +++ b/doc/api/html/scal_2meta_2is__vector__like_8hpp_source.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/is_vector_like.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
is_vector_like.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_IS_VECTOR_LIKE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_IS_VECTOR_LIKE_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7 
+
8  // ****************** additions for new VV *************************
+
9 
+
10  // handles scalar, eigen vec, eigen row vec, std vec
+
11  template <typename T>
+
12  struct is_vector_like {
+ +
14  };
+
15  template <typename T>
+
16  struct is_vector_like<T*> {
+
17  enum { value = true };
+
18  };
+
19  // handles const
+
20  template <typename T>
+
21  struct is_vector_like<const T> {
+ +
23  };
+
24 }
+
25 #endif
+
26 
+ + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scal_2meta_2length_8hpp.html b/doc/api/html/scal_2meta_2length_8hpp.html new file mode 100644 index 00000000000..edb3765c17b --- /dev/null +++ b/doc/api/html/scal_2meta_2length_8hpp.html @@ -0,0 +1,126 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/length.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
length.hpp File Reference
+
+
+
#include <cstdlib>
+
+

Go to the source code of this file.

+ + + + +

+Namespaces

 stan
 
+ + + + +

+Functions

template<typename T >
size_t stan::length (const T &)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scal_2meta_2length_8hpp_source.html b/doc/api/html/scal_2meta_2length_8hpp_source.html new file mode 100644 index 00000000000..b6fb523f25b --- /dev/null +++ b/doc/api/html/scal_2meta_2length_8hpp_source.html @@ -0,0 +1,123 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/length.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
length.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_LENGTH_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_LENGTH_HPP
+
3 
+
4 #include <cstdlib>
+
5 
+
6 namespace stan {
+
7 
+
8  template <typename T>
+
9  size_t length(const T& /*x*/) {
+
10  return 1U;
+
11  }
+
12 }
+
13 #endif
+
14 
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scal_2meta_2value__type_8hpp.html b/doc/api/html/scal_2meta_2value__type_8hpp.html new file mode 100644 index 00000000000..70715e8635b --- /dev/null +++ b/doc/api/html/scal_2meta_2value__type_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/value_type.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
value_type.hpp File Reference
+
+
+
#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + + + + + +

+Classes

struct  stan::math::value_type< T >
 Primary template class for metaprogram to compute the type of values stored in a container. More...
 
struct  stan::math::value_type< const T >
 Template class for metaprogram to compute the type of values stored in a constant container. More...
 
struct  stan::math::value_type< std::vector< T > >
 Template metaprogram class to compute the type of values stored in a standard vector. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scal_2meta_2value__type_8hpp_source.html b/doc/api/html/scal_2meta_2value__type_8hpp_source.html new file mode 100644 index 00000000000..e7253b950cc --- /dev/null +++ b/doc/api/html/scal_2meta_2value__type_8hpp_source.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/value_type.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
value_type.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_VALUE_TYPE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_VALUE_TYPE_HPP
+
3 
+
4 #include <vector>
+
5 
+
6 namespace stan {
+
7 
+
8  namespace math {
+
9 
+
20  template <typename T>
+
21  struct value_type {
+
22  };
+
23 
+
24 
+
31  template <typename T>
+
32  struct value_type<const T> {
+
33  typedef typename value_type<T>::type type;
+
34  };
+
35 
+
36 
+
43  template <typename T>
+
44  struct value_type<std::vector<T> > {
+
49  typedef typename std::vector<T>::value_type type;
+
50  };
+
51 
+
52 
+
53  }
+
54 }
+
55 
+
56 
+
57 #endif
+
value_type< T >::type type
Definition: value_type.hpp:33
+
std::vector< T >::value_type type
Type of value stored in a standard vector with type T entries.
Definition: value_type.hpp:49
+
Primary template class for metaprogram to compute the type of values stored in a container.
Definition: value_type.hpp:21
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scalar__type_8hpp.html b/doc/api/html/scalar__type_8hpp.html new file mode 100644 index 00000000000..4fcad2152b0 --- /dev/null +++ b/doc/api/html/scalar__type_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/scalar_type.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
scalar_type.hpp File Reference
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scalar__type_8hpp_source.html b/doc/api/html/scalar__type_8hpp_source.html new file mode 100644 index 00000000000..36fee904c90 --- /dev/null +++ b/doc/api/html/scalar__type_8hpp_source.html @@ -0,0 +1,166 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/scalar_type.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
scalar_type.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_SCALAR_TYPE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_SCALAR_TYPE_HPP
+
3 
+ + + + + + +
10 
+
11 namespace stan {
+
12 
+
13  namespace {
+
14  template <bool is_vec, typename T>
+
15  struct scalar_type_helper {
+
16  typedef T type;
+
17  };
+
18 
+
19  template <typename T>
+
20  struct scalar_type_helper<true, T> {
+
21  typedef typename
+
22  scalar_type_helper<is_vector<typename
+ +
24  typename stan::math::value_type<T>::type>::type
+
25  type;
+
26  };
+
27  }
+
36  template <typename T>
+
37  struct scalar_type {
+
38  typedef typename scalar_type_helper<is_vector<T>::value, T>::type type;
+
39  };
+
40 
+
41  // ****************** additions for new VV *************************
+
42  template <typename T>
+
43  struct scalar_type<Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> > {
+
44  typedef typename scalar_type<T>::type type;
+
45  };
+
46 
+
47  template <typename T>
+
48  struct scalar_type<T*> {
+
49  typedef typename scalar_type<T>::type type;
+
50  };
+
51 
+
52 
+
53 }
+
54 #endif
+
55 
+
scalar_type< T >::type type
Definition: scalar_type.hpp:49
+
Metaprogram structure to determine the base scalar type of a template argument.
Definition: scalar_type.hpp:37
+ + +
scalar_type_helper< is_vector< T >::value, T >::type type
Definition: scalar_type.hpp:38
+ + + + + +
Primary template class for metaprogram to compute the type of values stored in a container.
Definition: value_type.hpp:21
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scalar__type__pre_8hpp.html b/doc/api/html/scalar__type__pre_8hpp.html new file mode 100644 index 00000000000..3e556a89886 --- /dev/null +++ b/doc/api/html/scalar__type__pre_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/scalar_type_pre.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
scalar_type_pre.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + +

+Classes

struct  stan::scalar_type_pre< T >
 Metaprogram structure to determine the type of first container of the base scalar type of a template argument. More...
 
+ + + +

+Namespaces

 stan
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scalar__type__pre_8hpp_source.html b/doc/api/html/scalar__type__pre_8hpp_source.html new file mode 100644 index 00000000000..bf24ad613a7 --- /dev/null +++ b/doc/api/html/scalar__type__pre_8hpp_source.html @@ -0,0 +1,159 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/scalar_type_pre.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
scalar_type_pre.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_SCALAR_TYPE_PRE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_SCALAR_TYPE_PRE_HPP
+
3 
+ + + + + +
9 
+
10 namespace stan {
+
11 
+
12  namespace {
+
13  template <bool is_vec, typename T, typename T_container>
+
14  struct scalar_type_helper_pre {
+
15  typedef T_container type;
+
16  };
+
17 
+
18  template <typename T, typename T_container>
+
19  struct scalar_type_helper_pre<true, T, T_container> {
+
20  typedef typename
+
21  scalar_type_helper_pre<is_vector<typename stan::math::value_type<T>::type>
+
22  ::value,
+ +
24  typename
+ +
26  type;
+
27  };
+
28  }
+
29 
+
36  template <typename T>
+
37  struct scalar_type_pre {
+
38  typedef typename
+
39  scalar_type_helper_pre<is_vector
+
40  <typename stan::math::value_type<T>::type>::value,
+ + +
43  };
+
44 
+
45 
+
46 }
+
47 #endif
+
48 
+
scalar_type_helper_pre< is_vector< typename stan::math::value_type< T >::type >::value, typename stan::math::value_type< T >::type, T >::type type
+ + + + + +
Metaprogram structure to determine the type of first container of the base scalar type of a template ...
+ +
Primary template class for metaprogram to compute the type of values stored in a container.
Definition: value_type.hpp:21
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scaled__add_8hpp.html b/doc/api/html/scaled__add_8hpp.html new file mode 100644 index 00000000000..288382b1506 --- /dev/null +++ b/doc/api/html/scaled__add_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/fun/scaled_add.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
scaled_add.hpp File Reference
+
+
+
#include <vector>
+#include <cstddef>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + +

+Functions

void stan::math::scaled_add (std::vector< double > &x, const std::vector< double > &y, const double lambda)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scaled__add_8hpp_source.html b/doc/api/html/scaled__add_8hpp_source.html new file mode 100644 index 00000000000..4ffd24bbb81 --- /dev/null +++ b/doc/api/html/scaled__add_8hpp_source.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/fun/scaled_add.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
scaled_add.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_ARR_FUN_SCALED_ADD_HPP
+
2 #define STAN_MATH_PRIM_ARR_FUN_SCALED_ADD_HPP
+
3 
+
4 #include <vector>
+
5 #include <cstddef>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  // x <- x + lambda * y
+
11  inline void scaled_add(std::vector<double>& x,
+
12  const std::vector<double>& y,
+
13  const double lambda) {
+
14  for (size_t i = 0; i < x.size(); ++i)
+
15  x[i] += lambda * y[i];
+
16  }
+
17 
+
18  }
+
19 }
+
20 
+
21 #endif
+
void scaled_add(std::vector< double > &x, const std::vector< double > &y, const double lambda)
Definition: scaled_add.hpp:11
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scaled__inv__chi__square__ccdf__log_8hpp.html b/doc/api/html/scaled__inv__chi__square__ccdf__log_8hpp.html new file mode 100644 index 00000000000..dc717977705 --- /dev/null +++ b/doc/api/html/scaled__inv__chi__square__ccdf__log_8hpp.html @@ -0,0 +1,149 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/scaled_inv_chi_square_ccdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
scaled_inv_chi_square_ccdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_dof , typename T_scale >
return_type< T_y, T_dof,
+T_scale >::type 
stan::math::scaled_inv_chi_square_ccdf_log (const T_y &y, const T_dof &nu, const T_scale &s)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scaled__inv__chi__square__ccdf__log_8hpp_source.html b/doc/api/html/scaled__inv__chi__square__ccdf__log_8hpp_source.html new file mode 100644 index 00000000000..a7e8fcd7947 --- /dev/null +++ b/doc/api/html/scaled__inv__chi__square__ccdf__log_8hpp_source.html @@ -0,0 +1,294 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/scaled_inv_chi_square_ccdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
scaled_inv_chi_square_ccdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_SCALED_INV_CHI_SQUARE_CCDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_SCALED_INV_CHI_SQUARE_CCDF_LOG_HPP
+
3 
+ + + + + + + + + + + + + + + + +
20 #include <boost/random/chi_squared_distribution.hpp>
+
21 #include <boost/random/variate_generator.hpp>
+
22 #include <limits>
+
23 #include <cmath>
+
24 
+
25 namespace stan {
+
26 
+
27  namespace math {
+
28 
+
29  template <typename T_y, typename T_dof, typename T_scale>
+
30  typename return_type<T_y, T_dof, T_scale>::type
+
31  scaled_inv_chi_square_ccdf_log(const T_y& y, const T_dof& nu,
+
32  const T_scale& s) {
+ +
34  T_partials_return;
+
35 
+
36  // Size checks
+
37  if (!(stan::length(y) && stan::length(nu) && stan::length(s)))
+
38  return 0.0;
+
39 
+
40  static const char* function("stan::math::scaled_inv_chi_square_ccdf_log");
+
41 
+ + + + + +
47  using std::exp;
+
48 
+
49  T_partials_return P(0.0);
+
50 
+
51  check_not_nan(function, "Random variable", y);
+
52  check_nonnegative(function, "Random variable", y);
+
53  check_positive_finite(function, "Degrees of freedom parameter", nu);
+
54  check_positive_finite(function, "Scale parameter", s);
+
55  check_consistent_sizes(function,
+
56  "Random variable", y,
+
57  "Degrees of freedom parameter", nu,
+
58  "Scale parameter", s);
+
59 
+
60  // Wrap arguments in vectors
+
61  VectorView<const T_y> y_vec(y);
+
62  VectorView<const T_dof> nu_vec(nu);
+ +
64  size_t N = max_size(y, nu, s);
+
65 
+ +
67  operands_and_partials(y, nu, s);
+
68 
+
69  // Explicit return for extreme values
+
70  // The gradients are technically ill-defined, but treated as zero
+
71  for (size_t i = 0; i < stan::length(y); i++) {
+
72  if (value_of(y_vec[i]) == 0)
+
73  return operands_and_partials.to_var(0.0, y, nu, s);
+
74  }
+
75 
+
76  // Compute cdf_log and its gradients
+
77  using stan::math::gamma_q;
+
78  using stan::math::digamma;
+
79  using boost::math::tgamma;
+
80  using std::exp;
+
81  using std::pow;
+
82  using std::log;
+
83 
+
84  // Cache a few expensive function calls if nu is a parameter
+ +
86  T_partials_return, T_dof> gamma_vec(stan::length(nu));
+ +
88  T_partials_return, T_dof> digamma_vec(stan::length(nu));
+
89 
+ +
91  for (size_t i = 0; i < stan::length(nu); i++) {
+
92  const T_partials_return half_nu_dbl = 0.5 * value_of(nu_vec[i]);
+
93  gamma_vec[i] = tgamma(half_nu_dbl);
+
94  digamma_vec[i] = digamma(half_nu_dbl);
+
95  }
+
96  }
+
97 
+
98  // Compute vectorized cdf_log and gradient
+
99  for (size_t n = 0; n < N; n++) {
+
100  // Explicit results for extreme values
+
101  // The gradients are technically ill-defined, but treated as zero
+
102  if (value_of(y_vec[n]) == std::numeric_limits<double>::infinity()) {
+
103  return operands_and_partials.to_var(stan::math::negative_infinity(),
+
104  y, nu, s);
+
105  }
+
106 
+
107  // Pull out values
+
108  const T_partials_return y_dbl = value_of(y_vec[n]);
+
109  const T_partials_return y_inv_dbl = 1.0 / y_dbl;
+
110  const T_partials_return half_nu_dbl = 0.5 * value_of(nu_vec[n]);
+
111  const T_partials_return s_dbl = value_of(s_vec[n]);
+
112  const T_partials_return half_s2_overx_dbl = 0.5 * s_dbl * s_dbl
+
113  * y_inv_dbl;
+
114  const T_partials_return half_nu_s2_overx_dbl
+
115  = 2.0 * half_nu_dbl * half_s2_overx_dbl;
+
116 
+
117  // Compute
+
118  const T_partials_return Pn = 1.0 - gamma_q(half_nu_dbl,
+
119  half_nu_s2_overx_dbl);
+
120  const T_partials_return gamma_p_deriv = exp(-half_nu_s2_overx_dbl)
+
121  * pow(half_nu_s2_overx_dbl, half_nu_dbl-1) / tgamma(half_nu_dbl);
+
122 
+
123  P += log(Pn);
+
124 
+ +
126  operands_and_partials.d_x1[n] -= half_nu_s2_overx_dbl * y_inv_dbl
+
127  * gamma_p_deriv / Pn;
+ +
129  operands_and_partials.d_x2[n]
+
130  -= (0.5 * stan::math::grad_reg_inc_gamma(half_nu_dbl,
+
131  half_nu_s2_overx_dbl,
+
132  gamma_vec[n],
+
133  digamma_vec[n])
+
134  - half_s2_overx_dbl * gamma_p_deriv)
+
135  / Pn;
+ +
137  operands_and_partials.d_x3[n] += 2.0 * half_nu_dbl * s_dbl * y_inv_dbl
+
138  * gamma_p_deriv / Pn;
+
139  }
+
140 
+
141  return operands_and_partials.to_var(P, y, nu, s);
+
142  }
+
143  }
+
144 }
+
145 #endif
+ + +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
T grad_reg_inc_gamma(T a, T z, T g, T dig, T precision=1e-6)
+ + +
return_type< T_y, T_dof, T_scale >::type scaled_inv_chi_square_ccdf_log(const T_y &y, const T_dof &nu, const T_scale &s)
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
fvar< T > tgamma(const fvar< T > &x)
Definition: tgamma.hpp:15
+
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+
fvar< T > gamma_q(const fvar< T > &x1, const fvar< T > &x2)
Definition: gamma_q.hpp:15
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scaled__inv__chi__square__cdf_8hpp.html b/doc/api/html/scaled__inv__chi__square__cdf_8hpp.html new file mode 100644 index 00000000000..1a66e6e0380 --- /dev/null +++ b/doc/api/html/scaled__inv__chi__square__cdf_8hpp.html @@ -0,0 +1,150 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/scaled_inv_chi_square_cdf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
scaled_inv_chi_square_cdf.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T_y , typename T_dof , typename T_scale >
return_type< T_y, T_dof,
+T_scale >::type 
stan::math::scaled_inv_chi_square_cdf (const T_y &y, const T_dof &nu, const T_scale &s)
 The CDF of a scaled inverse chi-squared density for y with the specified degrees of freedom parameter and scale parameter. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scaled__inv__chi__square__cdf_8hpp_source.html b/doc/api/html/scaled__inv__chi__square__cdf_8hpp_source.html new file mode 100644 index 00000000000..619efdc9966 --- /dev/null +++ b/doc/api/html/scaled__inv__chi__square__cdf_8hpp_source.html @@ -0,0 +1,309 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/scaled_inv_chi_square_cdf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
scaled_inv_chi_square_cdf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_SCALED_INV_CHI_SQUARE_CDF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_SCALED_INV_CHI_SQUARE_CDF_HPP
+
3 
+
4 #include <boost/random/chi_squared_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + +
22 #include <limits>
+
23 #include <cmath>
+
24 
+
25 
+
26 namespace stan {
+
27 
+
28  namespace math {
+
29 
+
44  template <typename T_y, typename T_dof, typename T_scale>
+
45  typename return_type<T_y, T_dof, T_scale>::type
+
46  scaled_inv_chi_square_cdf(const T_y& y, const T_dof& nu,
+
47  const T_scale& s) {
+ +
49  T_partials_return;
+
50 
+
51  // Size checks
+
52  if (!(stan::length(y) && stan::length(nu) && stan::length(s)))
+
53  return 1.0;
+
54 
+
55  static const char* function("stan::math::scaled_inv_chi_square_cdf");
+
56 
+ + + + + +
62  using std::exp;
+
63 
+
64  T_partials_return P(1.0);
+
65 
+
66  check_not_nan(function, "Random variable", y);
+
67  check_nonnegative(function, "Random variable", y);
+
68  check_positive_finite(function, "Degrees of freedom parameter", nu);
+
69  check_positive_finite(function, "Scale parameter", s);
+
70  check_consistent_sizes(function,
+
71  "Random variable", y,
+
72  "Degrees of freedom parameter", nu,
+
73  "Scale parameter", s);
+
74 
+
75  // Wrap arguments in vectors
+
76  VectorView<const T_y> y_vec(y);
+
77  VectorView<const T_dof> nu_vec(nu);
+ +
79  size_t N = max_size(y, nu, s);
+
80 
+ +
82  operands_and_partials(y, nu, s);
+
83 
+
84  // Explicit return for extreme values
+
85  // The gradients are technically ill-defined, but treated as zero
+
86 
+
87  for (size_t i = 0; i < stan::length(y); i++) {
+
88  if (value_of(y_vec[i]) == 0)
+
89  return operands_and_partials.to_var(0.0, y, nu, s);
+
90  }
+
91 
+
92  // Compute CDF and its gradients
+
93  using stan::math::gamma_q;
+
94  using stan::math::digamma;
+
95  using boost::math::tgamma;
+
96  using std::exp;
+
97  using std::pow;
+
98 
+
99  // Cache a few expensive function calls if nu is a parameter
+ +
101  T_partials_return, T_dof> gamma_vec(stan::length(nu));
+ +
103  T_partials_return, T_dof> digamma_vec(stan::length(nu));
+
104 
+ +
106  for (size_t i = 0; i < stan::length(nu); i++) {
+
107  const T_partials_return half_nu_dbl = 0.5 * value_of(nu_vec[i]);
+
108  gamma_vec[i] = tgamma(half_nu_dbl);
+
109  digamma_vec[i] = digamma(half_nu_dbl);
+
110  }
+
111  }
+
112 
+
113  // Compute vectorized CDF and gradient
+
114  for (size_t n = 0; n < N; n++) {
+
115  // Explicit results for extreme values
+
116  // The gradients are technically ill-defined, but treated as zero
+
117  if (value_of(y_vec[n]) == std::numeric_limits<double>::infinity()) {
+
118  continue;
+
119  }
+
120 
+
121  // Pull out values
+
122  const T_partials_return y_dbl = value_of(y_vec[n]);
+
123  const T_partials_return y_inv_dbl = 1.0 / y_dbl;
+
124  const T_partials_return half_nu_dbl = 0.5 * value_of(nu_vec[n]);
+
125  const T_partials_return s_dbl = value_of(s_vec[n]);
+
126  const T_partials_return half_s2_overx_dbl = 0.5 * s_dbl * s_dbl
+
127  * y_inv_dbl;
+
128  const T_partials_return half_nu_s2_overx_dbl
+
129  = 2.0 * half_nu_dbl * half_s2_overx_dbl;
+
130 
+
131  // Compute
+
132  const T_partials_return Pn = gamma_q(half_nu_dbl, half_nu_s2_overx_dbl);
+
133  const T_partials_return gamma_p_deriv = exp(-half_nu_s2_overx_dbl)
+
134  * pow(half_nu_s2_overx_dbl, half_nu_dbl-1) / tgamma(half_nu_dbl);
+
135 
+
136  P *= Pn;
+
137 
+ +
139  operands_and_partials.d_x1[n] += half_nu_s2_overx_dbl * y_inv_dbl
+
140  * gamma_p_deriv / Pn;
+
141 
+
142 
+
143 
+ +
145  operands_and_partials.d_x2[n]
+
146  += (0.5 * stan::math::grad_reg_inc_gamma(half_nu_dbl,
+
147  half_nu_s2_overx_dbl,
+
148  gamma_vec[n],
+
149  digamma_vec[n])
+
150  - half_s2_overx_dbl * gamma_p_deriv)
+
151  / Pn;
+
152 
+ +
154  operands_and_partials.d_x3[n]
+
155  += - 2.0 * half_nu_dbl * s_dbl * y_inv_dbl
+
156  * gamma_p_deriv / Pn;
+
157  }
+
158 
+ +
160  for (size_t n = 0; n < stan::length(y); ++n)
+
161  operands_and_partials.d_x1[n] *= P;
+
162  }
+ +
164  for (size_t n = 0; n < stan::length(nu); ++n)
+
165  operands_and_partials.d_x2[n] *= P;
+
166  }
+ +
168  for (size_t n = 0; n < stan::length(s); ++n)
+
169  operands_and_partials.d_x3[n] *= P;
+
170  }
+
171 
+
172  return operands_and_partials.to_var(P, y, nu, s);
+
173  }
+
174  }
+
175 }
+
176 #endif
+ + +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ + +
return_type< T_y, T_dof, T_scale >::type scaled_inv_chi_square_cdf(const T_y &y, const T_dof &nu, const T_scale &s)
The CDF of a scaled inverse chi-squared density for y with the specified degrees of freedom parameter...
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
T grad_reg_inc_gamma(T a, T z, T g, T dig, T precision=1e-6)
+ + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
fvar< T > tgamma(const fvar< T > &x)
Definition: tgamma.hpp:15
+
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+
fvar< T > gamma_q(const fvar< T > &x1, const fvar< T > &x2)
Definition: gamma_q.hpp:15
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scaled__inv__chi__square__cdf__log_8hpp.html b/doc/api/html/scaled__inv__chi__square__cdf__log_8hpp.html new file mode 100644 index 00000000000..60ab8e15814 --- /dev/null +++ b/doc/api/html/scaled__inv__chi__square__cdf__log_8hpp.html @@ -0,0 +1,149 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/scaled_inv_chi_square_cdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
scaled_inv_chi_square_cdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_dof , typename T_scale >
return_type< T_y, T_dof,
+T_scale >::type 
stan::math::scaled_inv_chi_square_cdf_log (const T_y &y, const T_dof &nu, const T_scale &s)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scaled__inv__chi__square__cdf__log_8hpp_source.html b/doc/api/html/scaled__inv__chi__square__cdf__log_8hpp_source.html new file mode 100644 index 00000000000..8cbac003f87 --- /dev/null +++ b/doc/api/html/scaled__inv__chi__square__cdf__log_8hpp_source.html @@ -0,0 +1,294 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/scaled_inv_chi_square_cdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
scaled_inv_chi_square_cdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_SCALED_INV_CHI_SQUARE_CDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_SCALED_INV_CHI_SQUARE_CDF_LOG_HPP
+
3 
+
4 #include <boost/random/chi_squared_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + +
22 #include <limits>
+
23 #include <cmath>
+
24 
+
25 
+
26 namespace stan {
+
27 
+
28  namespace math {
+
29 
+
30  template <typename T_y, typename T_dof, typename T_scale>
+
31  typename return_type<T_y, T_dof, T_scale>::type
+
32  scaled_inv_chi_square_cdf_log(const T_y& y, const T_dof& nu,
+
33  const T_scale& s) {
+ +
35  T_partials_return;
+
36 
+
37  // Size checks
+
38  if (!(stan::length(y) && stan::length(nu) && stan::length(s)))
+
39  return 0.0;
+
40 
+
41  static const char* function("stan::math::scaled_inv_chi_square_cdf_log");
+
42 
+ + + + + +
48  using std::exp;
+
49 
+
50  T_partials_return P(0.0);
+
51 
+
52  check_not_nan(function, "Random variable", y);
+
53  check_nonnegative(function, "Random variable", y);
+
54  check_positive_finite(function, "Degrees of freedom parameter", nu);
+
55  check_positive_finite(function, "Scale parameter", s);
+
56  check_consistent_sizes(function,
+
57  "Random variable", y,
+
58  "Degrees of freedom parameter", nu,
+
59  "Scale parameter", s);
+
60 
+
61  // Wrap arguments in vectors
+
62  VectorView<const T_y> y_vec(y);
+
63  VectorView<const T_dof> nu_vec(nu);
+ +
65  size_t N = max_size(y, nu, s);
+
66 
+ +
68  operands_and_partials(y, nu, s);
+
69 
+
70  // Explicit return for extreme values
+
71  // The gradients are technically ill-defined, but treated as zero
+
72  for (size_t i = 0; i < stan::length(y); i++) {
+
73  if (value_of(y_vec[i]) == 0)
+
74  return operands_and_partials.to_var(stan::math::negative_infinity(),
+
75  y, nu, s);
+
76  }
+
77 
+
78  // Compute cdf_log and its gradients
+
79  using stan::math::gamma_q;
+
80  using stan::math::digamma;
+
81  using boost::math::tgamma;
+
82  using std::exp;
+
83  using std::pow;
+
84  using std::log;
+
85 
+
86  // Cache a few expensive function calls if nu is a parameter
+ +
88  T_partials_return, T_dof> gamma_vec(stan::length(nu));
+ +
90  T_partials_return, T_dof> digamma_vec(stan::length(nu));
+
91 
+ +
93  for (size_t i = 0; i < stan::length(nu); i++) {
+
94  const T_partials_return half_nu_dbl = 0.5 * value_of(nu_vec[i]);
+
95  gamma_vec[i] = tgamma(half_nu_dbl);
+
96  digamma_vec[i] = digamma(half_nu_dbl);
+
97  }
+
98  }
+
99 
+
100  // Compute vectorized cdf_log and gradient
+
101  for (size_t n = 0; n < N; n++) {
+
102  // Explicit results for extreme values
+
103  // The gradients are technically ill-defined, but treated as zero
+
104  if (value_of(y_vec[n]) == std::numeric_limits<double>::infinity()) {
+
105  continue;
+
106  }
+
107 
+
108  // Pull out values
+
109  const T_partials_return y_dbl = value_of(y_vec[n]);
+
110  const T_partials_return y_inv_dbl = 1.0 / y_dbl;
+
111  const T_partials_return half_nu_dbl = 0.5 * value_of(nu_vec[n]);
+
112  const T_partials_return s_dbl = value_of(s_vec[n]);
+
113  const T_partials_return half_s2_overx_dbl = 0.5 * s_dbl * s_dbl
+
114  * y_inv_dbl;
+
115  const T_partials_return half_nu_s2_overx_dbl
+
116  = 2.0 * half_nu_dbl * half_s2_overx_dbl;
+
117 
+
118  // Compute
+
119  const T_partials_return Pn = gamma_q(half_nu_dbl, half_nu_s2_overx_dbl);
+
120  const T_partials_return gamma_p_deriv = exp(-half_nu_s2_overx_dbl)
+
121  * pow(half_nu_s2_overx_dbl, half_nu_dbl-1) / tgamma(half_nu_dbl);
+
122 
+
123  P += log(Pn);
+
124 
+ +
126  operands_and_partials.d_x1[n] += half_nu_s2_overx_dbl * y_inv_dbl
+
127  * gamma_p_deriv / Pn;
+ +
129  operands_and_partials.d_x2[n]
+
130  += (0.5 * stan::math::grad_reg_inc_gamma(half_nu_dbl,
+
131  half_nu_s2_overx_dbl,
+
132  gamma_vec[n],
+
133  digamma_vec[n])
+
134  - half_s2_overx_dbl * gamma_p_deriv)
+
135  / Pn;
+ +
137  operands_and_partials.d_x3[n] += - 2.0 * half_nu_dbl * s_dbl
+
138  * y_inv_dbl * gamma_p_deriv / Pn;
+
139  }
+
140 
+
141  return operands_and_partials.to_var(P, y, nu, s);
+
142  }
+
143  }
+
144 }
+
145 #endif
+ + +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
T grad_reg_inc_gamma(T a, T z, T g, T dig, T precision=1e-6)
+ + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
fvar< T > tgamma(const fvar< T > &x)
Definition: tgamma.hpp:15
+
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
return_type< T_y, T_dof, T_scale >::type scaled_inv_chi_square_cdf_log(const T_y &y, const T_dof &nu, const T_scale &s)
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+
fvar< T > gamma_q(const fvar< T > &x1, const fvar< T > &x2)
Definition: gamma_q.hpp:15
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scaled__inv__chi__square__log_8hpp.html b/doc/api/html/scaled__inv__chi__square__log_8hpp.html new file mode 100644 index 00000000000..fdfa5942cb0 --- /dev/null +++ b/doc/api/html/scaled__inv__chi__square__log_8hpp.html @@ -0,0 +1,153 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/scaled_inv_chi_square_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
scaled_inv_chi_square_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_dof , typename T_scale >
return_type< T_y, T_dof,
+T_scale >::type 
stan::math::scaled_inv_chi_square_log (const T_y &y, const T_dof &nu, const T_scale &s)
 The log of a scaled inverse chi-squared density for y with the specified degrees of freedom parameter and scale parameter. More...
 
template<typename T_y , typename T_dof , typename T_scale >
return_type< T_y, T_dof,
+T_scale >::type 
stan::math::scaled_inv_chi_square_log (const T_y &y, const T_dof &nu, const T_scale &s)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scaled__inv__chi__square__log_8hpp_source.html b/doc/api/html/scaled__inv__chi__square__log_8hpp_source.html new file mode 100644 index 00000000000..2401d2d0752 --- /dev/null +++ b/doc/api/html/scaled__inv__chi__square__log_8hpp_source.html @@ -0,0 +1,306 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/scaled_inv_chi_square_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
scaled_inv_chi_square_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_SCALED_INV_CHI_SQUARE_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_SCALED_INV_CHI_SQUARE_LOG_HPP
+
3 
+
4 #include <boost/random/chi_squared_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + +
22 #include <cmath>
+
23 
+
24 
+
25 namespace stan {
+
26 
+
27  namespace math {
+
28 
+
48  template <bool propto,
+
49  typename T_y, typename T_dof, typename T_scale>
+
50  typename return_type<T_y, T_dof, T_scale>::type
+
51  scaled_inv_chi_square_log(const T_y& y, const T_dof& nu, const T_scale& s) {
+
52  static const char* function("stan::math::scaled_inv_chi_square_log");
+ +
54  T_partials_return;
+
55 
+ + + + +
60 
+
61  // check if any vectors are zero length
+
62  if (!(stan::length(y)
+
63  && stan::length(nu)
+
64  && stan::length(s)))
+
65  return 0.0;
+
66 
+
67  T_partials_return logp(0.0);
+
68  check_not_nan(function, "Random variable", y);
+
69  check_positive_finite(function, "Degrees of freedom parameter", nu);
+
70  check_positive_finite(function, "Scale parameter", s);
+
71  check_consistent_sizes(function,
+
72  "Random variable", y,
+
73  "Degrees of freedom parameter", nu,
+
74  "Scale parameter", s);
+
75 
+
76  // check if no variables are involved and prop-to
+ +
78  return 0.0;
+
79 
+
80  VectorView<const T_y> y_vec(y);
+
81  VectorView<const T_dof> nu_vec(nu);
+ +
83  size_t N = max_size(y, nu, s);
+
84 
+
85  for (size_t n = 0; n < N; n++) {
+
86  if (value_of(y_vec[n]) <= 0)
+
87  return LOG_ZERO;
+
88  }
+
89 
+
90  using stan::math::lgamma;
+
91  using stan::math::digamma;
+
92  using stan::math::square;
+
93  using std::log;
+
94 
+ +
96  T_partials_return, T_dof> half_nu(length(nu));
+
97  for (size_t i = 0; i < length(nu); i++)
+ +
99  half_nu[i] = 0.5 * value_of(nu_vec[i]);
+
100 
+ +
102  T_partials_return, T_y> log_y(length(y));
+
103  for (size_t i = 0; i < length(y); i++)
+ +
105  log_y[i] = log(value_of(y_vec[i]));
+
106 
+ +
108  T_partials_return, T_y> inv_y(length(y));
+
109  for (size_t i = 0; i < length(y); i++)
+ +
111  inv_y[i] = 1.0 / value_of(y_vec[i]);
+
112 
+ +
114  T_partials_return, T_scale> log_s(length(s));
+
115  for (size_t i = 0; i < length(s); i++)
+ +
117  log_s[i] = log(value_of(s_vec[i]));
+
118 
+ +
120  T_partials_return, T_dof> log_half_nu(length(nu));
+ +
122  T_partials_return, T_dof> lgamma_half_nu(length(nu));
+ +
124  T_partials_return, T_dof>
+
125  digamma_half_nu_over_two(length(nu));
+
126  for (size_t i = 0; i < length(nu); i++) {
+ +
128  lgamma_half_nu[i] = lgamma(half_nu[i]);
+ +
130  log_half_nu[i] = log(half_nu[i]);
+ +
132  digamma_half_nu_over_two[i] = digamma(half_nu[i]) * 0.5;
+
133  }
+
134 
+ +
136  operands_and_partials(y, nu, s);
+
137  for (size_t n = 0; n < N; n++) {
+
138  const T_partials_return s_dbl = value_of(s_vec[n]);
+
139  const T_partials_return nu_dbl = value_of(nu_vec[n]);
+ +
141  logp += half_nu[n] * log_half_nu[n] - lgamma_half_nu[n];
+ +
143  logp += nu_dbl * log_s[n];
+ +
145  logp -= (half_nu[n]+1.0) * log_y[n];
+ +
147  logp -= half_nu[n] * s_dbl*s_dbl * inv_y[n];
+
148 
+ +
150  operands_and_partials.d_x1[n]
+
151  += -(half_nu[n] + 1.0) * inv_y[n]
+
152  + half_nu[n] * s_dbl*s_dbl * inv_y[n]*inv_y[n];
+
153  }
+ +
155  operands_and_partials.d_x2[n]
+
156  += 0.5 * log_half_nu[n] + 0.5
+
157  - digamma_half_nu_over_two[n]
+
158  + log_s[n]
+
159  - 0.5 * log_y[n]
+
160  - 0.5* s_dbl*s_dbl * inv_y[n];
+
161  }
+ +
163  operands_and_partials.d_x3[n]
+
164  += nu_dbl / s_dbl - nu_dbl * inv_y[n] * s_dbl;
+
165  }
+
166  }
+
167  return operands_and_partials.to_var(logp, y, nu, s);
+
168  }
+
169 
+
170  template <typename T_y, typename T_dof, typename T_scale>
+
171  inline
+ +
173  scaled_inv_chi_square_log(const T_y& y, const T_dof& nu, const T_scale& s) {
+
174  return scaled_inv_chi_square_log<false>(y, nu, s);
+
175  }
+
176  }
+
177 }
+
178 #endif
+ + +
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
return_type< T_y, T_dof, T_scale >::type scaled_inv_chi_square_log(const T_y &y, const T_dof &nu, const T_scale &s)
The log of a scaled inverse chi-squared density for y with the specified degrees of freedom parameter...
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
const double LOG_ZERO
Definition: constants.hpp:175
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+ +
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ +
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + + + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scaled__inv__chi__square__rng_8hpp.html b/doc/api/html/scaled__inv__chi__square__rng_8hpp.html new file mode 100644 index 00000000000..ea4e9bf96a0 --- /dev/null +++ b/doc/api/html/scaled__inv__chi__square__rng_8hpp.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/scaled_inv_chi_square_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
scaled_inv_chi_square_rng.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
double stan::math::scaled_inv_chi_square_rng (const double nu, const double s, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/scaled__inv__chi__square__rng_8hpp_source.html b/doc/api/html/scaled__inv__chi__square__rng_8hpp_source.html new file mode 100644 index 00000000000..89ba1e8ecde --- /dev/null +++ b/doc/api/html/scaled__inv__chi__square__rng_8hpp_source.html @@ -0,0 +1,175 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/scaled_inv_chi_square_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
scaled_inv_chi_square_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_SCALED_INV_CHI_SQUARE_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_SCALED_INV_CHI_SQUARE_RNG_HPP
+
3 
+
4 #include <boost/random/chi_squared_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + +
22 
+
23 namespace stan {
+
24 
+
25  namespace math {
+
26 
+
27  template <class RNG>
+
28  inline double
+
29  scaled_inv_chi_square_rng(const double nu,
+
30  const double s,
+
31  RNG& rng) {
+
32  using boost::variate_generator;
+
33  using boost::random::chi_squared_distribution;
+
34 
+
35  static const char* function("stan::math::scaled_inv_chi_square_rng");
+
36 
+ +
38 
+
39  check_positive_finite(function, "Degrees of freedom parameter", nu);
+
40  check_positive_finite(function, "Scale parameter", s);
+
41 
+
42  variate_generator<RNG&, chi_squared_distribution<> >
+
43  chi_square_rng(rng, chi_squared_distribution<>(nu));
+
44  return nu * s / chi_square_rng();
+
45  }
+
46  }
+
47 }
+
48 #endif
+ +
double scaled_inv_chi_square_rng(const double nu, const double s, RNG &rng)
+ +
double chi_square_rng(const double nu, RNG &rng)
+ + + + + + + + + + + + + + +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/search/all_0.html b/doc/api/html/search/all_0.html new file mode 100644 index 00000000000..17b6da85df7 --- /dev/null +++ b/doc/api/html/search/all_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/all_0.js b/doc/api/html/search/all_0.js new file mode 100644 index 00000000000..8f3302ab69d --- /dev/null +++ b/doc/api/html/search/all_0.js @@ -0,0 +1,23 @@ +var searchData= +[ + ['_5fadjaref',['_adjARef',['../rev_2mat_2fun_2determinant_8hpp.html#ac289fdc094f4376437157416320ac3bd',1,'determinant.hpp']]], + ['_5falloc',['_alloc',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4.html#a26108bbfc96084647517312ce22d11a4',1,'stan::math::LDLT_factor< stan::math::var, R, C >::_alloc()'],['../rev_2mat_2fun_2mdivide__left__ldlt_8hpp.html#a6333f1364c14f8f834a56541108a543d',1,'_alloc(): mdivide_left_ldlt.hpp'],['../rev_2mat_2fun_2mdivide__left__spd_8hpp.html#a34c6b6db468ba7b80a549359c6ec304e',1,'_alloc(): mdivide_left_spd.hpp']]], + ['_5falloc_5fldlt',['_alloc_ldlt',['../rev_2mat_2fun_2log__determinant__ldlt_8hpp.html#a09778e4b593c6f100918974eab7ed098',1,'_alloc_ldlt(): log_determinant_ldlt.hpp'],['../rev_2mat_2fun_2mdivide__left__ldlt_8hpp.html#a6dcfe87b81ca8eb9dc23b285f6858057',1,'_alloc_ldlt(): mdivide_left_ldlt.hpp']]], + ['_5fcols',['_cols',['../rev_2mat_2fun_2determinant_8hpp.html#a9c07cb6acc3ea9dc957ef6874d075e7b',1,'determinant.hpp']]], + ['_5fimpl',['_impl',['../rev_2mat_2fun_2quad__form_8hpp.html#a71e132b29586164e054f9efe99b79a06',1,'_impl(): quad_form.hpp'],['../rev_2mat_2fun_2trace__gen__quad__form_8hpp.html#a3101c2c46494cfe7908f939310755c0e',1,'_impl(): trace_gen_quad_form.hpp'],['../rev_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp.html#aacc32115df9c5f164e15a80a4615d7c0',1,'_impl(): trace_inv_quad_form_ldlt.hpp'],['../rev_2mat_2fun_2trace__quad__form_8hpp.html#aa215d337b6b5f4499fbafce1d71d924e',1,'_impl(): trace_quad_form.hpp']]], + ['_5fldlt',['_ldlt',['../classstan_1_1math_1_1_l_d_l_t__alloc.html#a31f5c61c30c291a1d2152783cf85d11f',1,'stan::math::LDLT_alloc::_ldlt()'],['../rev_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp.html#a54837fb3ae10bc0f12a3e8c2fea11e7d',1,'_ldlt(): trace_inv_quad_form_ldlt.hpp']]], + ['_5fldltp',['_ldltP',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#a27b82bfd635b040326895c282e9edb43',1,'stan::math::LDLT_factor< T, R, C >::_ldltP()'],['../rev_2mat_2fun_2mdivide__left__ldlt_8hpp.html#a45a78506bb83f07720da6b8430e8cad7',1,'_ldltP(): mdivide_left_ldlt.hpp']]], + ['_5fllt',['_llt',['../rev_2mat_2fun_2mdivide__left__spd_8hpp.html#a597a07f209a18eb6dc1142bec2dfd08e',1,'mdivide_left_spd.hpp']]], + ['_5fm',['_m',['../classstan_1_1math_1_1welford__covar__estimator.html#a469e4f07d669c1021cfbd5c50db3f290',1,'stan::math::welford_covar_estimator::_m()'],['../classstan_1_1math_1_1welford__var__estimator.html#aa9b83535c85f9f7d70dab642ae6d5e42',1,'stan::math::welford_var_estimator::_m()']]], + ['_5fm2',['_m2',['../classstan_1_1math_1_1welford__covar__estimator.html#aad5f954fb329515cfbd7b3c42c7f08ea',1,'stan::math::welford_covar_estimator::_m2()'],['../classstan_1_1math_1_1welford__var__estimator.html#a6bf443dd58713599fdfa6dcdd2cede20',1,'stan::math::welford_var_estimator::_m2()']]], + ['_5fnum_5fsamples',['_num_samples',['../classstan_1_1math_1_1welford__covar__estimator.html#a5f7ae37d6344c34adf7ec26359540a49',1,'stan::math::welford_covar_estimator::_num_samples()'],['../classstan_1_1math_1_1welford__var__estimator.html#aea7b1397020cfbca06379e8bb1e1b420',1,'stan::math::welford_var_estimator::_num_samples()']]], + ['_5frows',['_rows',['../rev_2mat_2fun_2determinant_8hpp.html#a3e8959363f536b448785cdfdb1dd461a',1,'determinant.hpp']]], + ['_5fsym',['_sym',['../rev_2mat_2fun_2quad__form_8hpp.html#a0f0c3a82aa9cb1ecd7d97fce67fea63d',1,'quad_form.hpp']]], + ['_5fvalue',['_value',['../rev_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp.html#a3e78e92b9e102f837e1433ff78edd53c',1,'trace_inv_quad_form_ldlt.hpp']]], + ['_5fvaria',['_variA',['../classstan_1_1math_1_1_l_d_l_t__alloc.html#a3b0c5b165c4253d8052147bc416b28ea',1,'stan::math::LDLT_alloc']]], + ['_5fvarib',['_variB',['../rev_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp.html#a51e67c28b21506ae447ee657cd885d90',1,'trace_inv_quad_form_ldlt.hpp']]], + ['_5fvarid',['_variD',['../rev_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp.html#afeee220f8848a02798328ad98cde229f',1,'trace_inv_quad_form_ldlt.hpp']]], + ['_5fvarirefa',['_variRefA',['../rev_2mat_2fun_2mdivide__left_8hpp.html#aea7df605462946b48f6c8200fe67a467',1,'_variRefA(): mdivide_left.hpp'],['../rev_2mat_2fun_2mdivide__left__spd_8hpp.html#aea7df605462946b48f6c8200fe67a467',1,'_variRefA(): mdivide_left_spd.hpp'],['../rev_2mat_2fun_2mdivide__left__tri_8hpp.html#aea7df605462946b48f6c8200fe67a467',1,'_variRefA(): mdivide_left_tri.hpp']]], + ['_5fvarirefb',['_variRefB',['../rev_2mat_2fun_2mdivide__left_8hpp.html#aa2a293603982ac5da732ef1c85aabcd4',1,'_variRefB(): mdivide_left.hpp'],['../rev_2mat_2fun_2mdivide__left__ldlt_8hpp.html#aa2a293603982ac5da732ef1c85aabcd4',1,'_variRefB(): mdivide_left_ldlt.hpp'],['../rev_2mat_2fun_2mdivide__left__spd_8hpp.html#aa2a293603982ac5da732ef1c85aabcd4',1,'_variRefB(): mdivide_left_spd.hpp'],['../rev_2mat_2fun_2mdivide__left__tri_8hpp.html#aa2a293603982ac5da732ef1c85aabcd4',1,'_variRefB(): mdivide_left_tri.hpp']]], + ['_5fvarirefc',['_variRefC',['../rev_2mat_2fun_2mdivide__left_8hpp.html#ab81845acdc3a00d1a9358f95da0d560e',1,'_variRefC(): mdivide_left.hpp'],['../rev_2mat_2fun_2mdivide__left__ldlt_8hpp.html#ab81845acdc3a00d1a9358f95da0d560e',1,'_variRefC(): mdivide_left_ldlt.hpp'],['../rev_2mat_2fun_2mdivide__left__spd_8hpp.html#ab81845acdc3a00d1a9358f95da0d560e',1,'_variRefC(): mdivide_left_spd.hpp'],['../rev_2mat_2fun_2mdivide__left__tri_8hpp.html#ab81845acdc3a00d1a9358f95da0d560e',1,'_variRefC(): mdivide_left_tri.hpp']]] +]; diff --git a/doc/api/html/search/all_1.html b/doc/api/html/search/all_1.html new file mode 100644 index 00000000000..e2906449f24 --- /dev/null +++ b/doc/api/html/search/all_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/all_1.js b/doc/api/html/search/all_1.js new file mode 100644 index 00000000000..ec5681d3032 --- /dev/null +++ b/doc/api/html/search/all_1.js @@ -0,0 +1,70 @@ +var searchData= +[ + ['a',['a',['../classstan_1_1_vector_builder.html#a6bbefa466748a220076744c697f393b6',1,'stan::VectorBuilder']]], + ['a_5f',['A_',['../rev_2mat_2fun_2determinant_8hpp.html#a11b6b3ab6459db606ab7f4bfd4ad2823',1,'A_(): determinant.hpp'],['../rev_2mat_2fun_2mdivide__left_8hpp.html#a11b6b3ab6459db606ab7f4bfd4ad2823',1,'A_(): mdivide_left.hpp'],['../rev_2mat_2fun_2mdivide__left__tri_8hpp.html#a11b6b3ab6459db606ab7f4bfd4ad2823',1,'A_(): mdivide_left_tri.hpp'],['../rev_2mat_2fun_2quad__form_8hpp.html#ad6f8769405cee83dff888bcf5d096810',1,'A_(): quad_form.hpp'],['../rev_2mat_2fun_2trace__gen__quad__form_8hpp.html#ad6f8769405cee83dff888bcf5d096810',1,'A_(): trace_gen_quad_form.hpp'],['../rev_2mat_2fun_2trace__quad__form_8hpp.html#ad6f8769405cee83dff888bcf5d096810',1,'A_(): trace_quad_form.hpp']]], + ['abs',['abs',['../namespacestan_1_1math.html#ae560b842e3ed6e5939dc2177bf158265',1,'stan::math::abs(const fvar< T > &x)'],['../namespacestan_1_1math.html#aeb4764556637084eee528b45d8eaa767',1,'stan::math::abs(double x)'],['../namespacestan_1_1math.html#a971adca9c3989255ca1f9568f8e7dc93',1,'stan::math::abs(const var &a)']]], + ['abs_2ehpp',['abs.hpp',['../fwd_2scal_2fun_2abs_8hpp.html',1,'']]], + ['abs_2ehpp',['abs.hpp',['../prim_2scal_2fun_2abs_8hpp.html',1,'']]], + ['abs_2ehpp',['abs.hpp',['../rev_2scal_2fun_2abs_8hpp.html',1,'']]], + ['accumulator',['accumulator',['../classstan_1_1math_1_1accumulator.html#afb44f3c753ac1373482e123df612a266',1,'stan::math::accumulator']]], + ['accumulator',['accumulator',['../classstan_1_1math_1_1accumulator.html',1,'stan::math']]], + ['accumulator_2ehpp',['accumulator.hpp',['../accumulator_8hpp.html',1,'']]], + ['acos',['acos',['../namespacestan_1_1math.html#a6952d8c23d69dc891dbe78e7d4ea7a80',1,'stan::math::acos(const fvar< T > &x)'],['../namespacestan_1_1math.html#a5b472e155399f39ba2d7e26abb50cd7b',1,'stan::math::acos(const var &a)']]], + ['acos_2ehpp',['acos.hpp',['../rev_2scal_2fun_2acos_8hpp.html',1,'']]], + ['acos_2ehpp',['acos.hpp',['../fwd_2scal_2fun_2acos_8hpp.html',1,'']]], + ['acosh',['acosh',['../namespacestan_1_1math.html#ae033720f1a26c44aa9d7fb4dcf547155',1,'stan::math::acosh(const fvar< T > &x)'],['../namespacestan_1_1math.html#a9a8d20387e255363750b779b213d734f',1,'stan::math::acosh(const var &a)']]], + ['acosh_2ehpp',['acosh.hpp',['../fwd_2scal_2fun_2acosh_8hpp.html',1,'']]], + ['acosh_2ehpp',['acosh.hpp',['../rev_2scal_2fun_2acosh_8hpp.html',1,'']]], + ['ad_5f',['ad_',['../classstan_1_1math_1_1op__ddv__vari.html#a268d419189be0d83b45cbd023d888d79',1,'stan::math::op_ddv_vari::ad_()'],['../classstan_1_1math_1_1op__dv__vari.html#a30f5589cb9d3e0ee8a0219316531daee',1,'stan::math::op_dv_vari::ad_()'],['../classstan_1_1math_1_1op__dvd__vari.html#a6f88997d24c47ad9cb0c14cc628f487a',1,'stan::math::op_dvd_vari::ad_()'],['../classstan_1_1math_1_1op__dvv__vari.html#acb47ad05b53b828ecc2dc5d23b2e0d75',1,'stan::math::op_dvv_vari::ad_()']]], + ['add',['add',['../classstan_1_1math_1_1accumulator.html#af2da77a509c4e7e9c16d8a6f691a6901',1,'stan::math::accumulator::add(S x)'],['../classstan_1_1math_1_1accumulator.html#a858c109ee631e131be0d07cf98c702e4',1,'stan::math::accumulator::add(const S &x)'],['../classstan_1_1math_1_1accumulator.html#af66ce8b37f8d8af158dd38784b34d86b',1,'stan::math::accumulator::add(const Eigen::Matrix< S, R, C > &m)'],['../classstan_1_1math_1_1accumulator.html#acf91e7cb369f45142386598d552a30e2',1,'stan::math::accumulator::add(const std::vector< S > &xs)'],['../structstan_1_1math_1_1array__builder.html#a085e0190d7a41c4e33bfa9f542b1d62a',1,'stan::math::array_builder::add()'],['../namespacestan_1_1math.html#ab7092cc09ee412719d685be41a04982a',1,'stan::math::add(const Eigen::Matrix< T1, R, C > &m1, const Eigen::Matrix< T2, R, C > &m2)'],['../namespacestan_1_1math.html#a60c2f0966abaf6f80131423add52053d',1,'stan::math::add(const Eigen::Matrix< T1, R, C > &m, const T2 &c)'],['../namespacestan_1_1math.html#ac7b8d8a7b33160a0c7304efc26fb46db',1,'stan::math::add(const T1 &c, const Eigen::Matrix< T2, R, C > &m)']]], + ['add_2ehpp',['add.hpp',['../add_8hpp.html',1,'']]], + ['add_5finitial_5fvalues',['add_initial_values',['../namespacestan_1_1math.html#a1a238bf34fdfe67aa84300d9822f34be',1,'stan::math']]], + ['add_5fsample',['add_sample',['../classstan_1_1math_1_1welford__covar__estimator.html#a48b13f8f23644e2a35c64f34ee5b97bc',1,'stan::math::welford_covar_estimator::add_sample()'],['../classstan_1_1math_1_1welford__var__estimator.html#ab06deee0c1f179a87969e2a2e76599fd',1,'stan::math::welford_var_estimator::add_sample()']]], + ['addcost',['AddCost',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a768855037a4305f4d90091d81bb92258a9d999dfd79c2ae5df9bf7fe13e625a51',1,'Eigen::NumTraits< stan::math::fvar< T > >::AddCost()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#afbb9dcc15eb3b86fd1ed8a3ef5158634a4114588cd7374efae03440efcad3674c',1,'Eigen::NumTraits< stan::math::var >::AddCost()']]], + ['adj',['adj',['../classstan_1_1math_1_1var.html#a7366cb3fd02521783e25de7615a7d098',1,'stan::math::var']]], + ['adj_5f',['adj_',['../classstan_1_1math_1_1vari.html#a53f635dd2454bc46335f3ad5bd172623',1,'stan::math::vari']]], + ['ainvb_5f',['AinvB_',['../rev_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp.html#ad754f26cc75952ba2508669360793d30',1,'trace_inv_quad_form_ldlt.hpp']]], + ['all_5fconstant',['all_constant',['../structstan_1_1math_1_1_operands_and_partials.html#aa8dceec288c061ab0e63b2573a051992',1,'stan::math::OperandsAndPartials']]], + ['all_5fpartials',['all_partials',['../structstan_1_1math_1_1_operands_and_partials.html#a107929755d71d86230e67a2ae1556c88',1,'stan::math::OperandsAndPartials']]], + ['all_5fvaris',['all_varis',['../structstan_1_1math_1_1_operands_and_partials.html#a9f553909daf309a6b68ad9c73152f6ea',1,'stan::math::OperandsAndPartials']]], + ['alloc',['alloc',['../classstan_1_1math_1_1stack__alloc.html#af867f7a48394cc0422a58f0253cb6c96',1,'stan::math::stack_alloc']]], + ['alloc_5farray',['alloc_array',['../classstan_1_1math_1_1stack__alloc.html#ac00d799a98c424893745b20166cff14b',1,'stan::math::stack_alloc']]], + ['alpha_5f',['alpha_',['../classstan_1_1math_1_1gevv__vvv__vari.html#a8c77333a2a3a85359e417d33291a8b19',1,'stan::math::gevv_vvv_vari::alpha_()'],['../rev_2mat_2fun_2log__softmax_8hpp.html#acd28daa1fad3aaa17c91e2ca90526175',1,'alpha_(): log_softmax.hpp'],['../rev_2mat_2fun_2softmax_8hpp.html#acd28daa1fad3aaa17c91e2ca90526175',1,'alpha_(): softmax.hpp']]], + ['append_5fcol',['append_col',['../namespacestan_1_1math.html#a9f2aa85e5119417b44958458dd714cff',1,'stan::math::append_col(const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &B)'],['../namespacestan_1_1math.html#a10572fe52ef6b2ddbe94aa1549310289',1,'stan::math::append_col(const Eigen::Matrix< T1, 1, C1 > &A, const Eigen::Matrix< T2, 1, C2 > &B)'],['../namespacestan_1_1math.html#a1462dc3a656316092e0557cdc276f377',1,'stan::math::append_col(const Eigen::Matrix< T, R1, C1 > &A, const Eigen::Matrix< T, R2, C2 > &B)'],['../namespacestan_1_1math.html#ac5ba839958285c999e1f3bb5706bb9b6',1,'stan::math::append_col(const Eigen::Matrix< T, 1, C1 > &A, const Eigen::Matrix< T, 1, C2 > &B)']]], + ['append_5fcol_2ehpp',['append_col.hpp',['../append__col_8hpp.html',1,'']]], + ['append_5frow',['append_row',['../namespacestan_1_1math.html#aed867c5cdbb34fe1c10ad212665c8611',1,'stan::math::append_row(const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &B)'],['../namespacestan_1_1math.html#ad3ac4765524854d6b14af8def58431dc',1,'stan::math::append_row(const Eigen::Matrix< T1, R1, 1 > &A, const Eigen::Matrix< T2, R2, 1 > &B)'],['../namespacestan_1_1math.html#ae8edbdc61c53db90c4dd6039221f5a71',1,'stan::math::append_row(const Eigen::Matrix< T, R1, C1 > &A, const Eigen::Matrix< T, R2, C2 > &B)'],['../namespacestan_1_1math.html#a66107dc00c528f6d692bbde30d6af90c',1,'stan::math::append_row(const Eigen::Matrix< T, R1, 1 > &A, const Eigen::Matrix< T, R2, 1 > &B)']]], + ['append_5frow_2ehpp',['append_row.hpp',['../append__row_8hpp.html',1,'']]], + ['apply',['apply',['../structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00-1_00-1_01_4_01_4.html#a1fb52f1fc9db8b4c3679035da9d6317e',1,'stan::math::promote_scalar_struct< T, Eigen::Matrix< S,-1,-1 > >::apply()'],['../structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00-1_01_4_01_4.html#a208f0f24a10b7711e08f5e3ce0ffec9b',1,'stan::math::promote_scalar_struct< T, Eigen::Matrix< S, 1,-1 > >::apply()'],['../structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00-1_00_011_01_4_01_4.html#a9bbd5543d696d149ab4aee5a8144fb1e',1,'stan::math::promote_scalar_struct< T, Eigen::Matrix< S,-1, 1 > >::apply()'],['../structstan_1_1math_1_1promote__scalar__struct.html#a2910fcfa6312889570ddaf88b1c3b54f',1,'stan::math::promote_scalar_struct::apply()'],['../structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_t_01_4.html#a355172d2e18fb6a97677cc7cbff473f6',1,'stan::math::promote_scalar_struct< T, T >::apply()'],['../structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4.html#a1737468cee6801ffd1d111cf2170ac17',1,'stan::math::promote_scalar_struct< T, std::vector< S > >::apply()']]], + ['arr_2ehpp',['arr.hpp',['../arr_8hpp.html',1,'']]], + ['array',['array',['../structstan_1_1math_1_1array__builder.html#a725410c59aa282c6b23c52fd252aa1a3',1,'stan::math::array_builder']]], + ['array_5fbuilder',['array_builder',['../structstan_1_1math_1_1array__builder.html',1,'stan::math']]], + ['array_5fbuilder',['array_builder',['../structstan_1_1math_1_1array__builder.html#a8e2649b71c980137fa5d86433d2be50c',1,'stan::math::array_builder']]], + ['array_5fbuilder_2ehpp',['array_builder.hpp',['../array__builder_8hpp.html',1,'']]], + ['as_5fbool',['as_bool',['../namespacestan_1_1math.html#a3ec93b560b654740be65de81d6f348cc',1,'stan::math::as_bool(const T x)'],['../namespacestan_1_1math.html#ab7ad9c5e9f0b2f99b96133ad7a158f64',1,'stan::math::as_bool(const var &v)']]], + ['as_5fbool_2ehpp',['as_bool.hpp',['../rev_2scal_2fun_2as__bool_8hpp.html',1,'']]], + ['as_5fbool_2ehpp',['as_bool.hpp',['../prim_2scal_2fun_2as__bool_8hpp.html',1,'']]], + ['asin',['asin',['../namespacestan_1_1math.html#a1ab75d0165599717cfd1e90f7edcf250',1,'stan::math::asin(const fvar< T > &x)'],['../namespacestan_1_1math.html#ab710bf940838cc452c426597f55f74dc',1,'stan::math::asin(const var &a)']]], + ['asin_2ehpp',['asin.hpp',['../fwd_2scal_2fun_2asin_8hpp.html',1,'']]], + ['asin_2ehpp',['asin.hpp',['../rev_2scal_2fun_2asin_8hpp.html',1,'']]], + ['asinh',['asinh',['../namespacestan_1_1math.html#a68af8aec6bd04b4d40e5bce59f82b97c',1,'stan::math::asinh(const fvar< T > &x)'],['../namespacestan_1_1math.html#af6d7b01cd76067a0fa8d424b4e81a4fc',1,'stan::math::asinh(const var &a)']]], + ['asinh_2ehpp',['asinh.hpp',['../fwd_2scal_2fun_2asinh_8hpp.html',1,'']]], + ['asinh_2ehpp',['asinh.hpp',['../rev_2scal_2fun_2asinh_8hpp.html',1,'']]], + ['assign',['assign',['../namespacestan_1_1math.html#a5f394c15ea3eb97743382631f91801cf',1,'stan::math::assign(LHS &lhs, const RHS &rhs)'],['../namespacestan_1_1math.html#a5371f0f914e9b79a0700577e5557c0b7',1,'stan::math::assign(Eigen::Matrix< LHS, R1, C1 > &x, const Eigen::Matrix< RHS, R2, C2 > &y)'],['../namespacestan_1_1math.html#a0a80c719463c4e3caa03df731e2c2cb9',1,'stan::math::assign(Eigen::Matrix< LHS, R, C > &x, const Eigen::Matrix< RHS, R, C > &y)'],['../namespacestan_1_1math.html#aa4af3a90ad3b5ec1507dfc1823fdb8da',1,'stan::math::assign(Eigen::Block< LHS > x, const Eigen::Matrix< RHS, R, C > &y)'],['../namespacestan_1_1math.html#a2c6dec98c71fd478c2ee16bc274b464d',1,'stan::math::assign(std::vector< LHS > &x, const std::vector< RHS > &y)']]], + ['assign_2ehpp',['assign.hpp',['../assign_8hpp.html',1,'']]], + ['atan',['atan',['../namespacestan_1_1math.html#a6f0398656b862b1b2eb80145f4877b11',1,'stan::math::atan(const fvar< T > &x)'],['../namespacestan_1_1math.html#a85cb80cff5115679c25d7347ffa89c81',1,'stan::math::atan(const var &a)']]], + ['atan_2ehpp',['atan.hpp',['../rev_2scal_2fun_2atan_8hpp.html',1,'']]], + ['atan_2ehpp',['atan.hpp',['../fwd_2scal_2fun_2atan_8hpp.html',1,'']]], + ['atan2',['atan2',['../namespacestan_1_1math.html#a0c4868ee5c5ab673ee54e5dce3be37f1',1,'stan::math::atan2(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#aee48dfb63f75612a566b876f59d4a8df',1,'stan::math::atan2(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a28a4864b96b98584311eea08a6ff609e',1,'stan::math::atan2(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#a32fe21eb929346e553266ceda0a97f23',1,'stan::math::atan2(const var &a, const var &b)'],['../namespacestan_1_1math.html#acf0d4eeedff1e94221e2b719d0227e25',1,'stan::math::atan2(const var &a, const double b)'],['../namespacestan_1_1math.html#a02a3681701397c99fd57d8816869b92f',1,'stan::math::atan2(const double a, const var &b)']]], + ['atan2_2ehpp',['atan2.hpp',['../fwd_2scal_2fun_2atan2_8hpp.html',1,'']]], + ['atan2_2ehpp',['atan2.hpp',['../rev_2scal_2fun_2atan2_8hpp.html',1,'']]], + ['atanh',['atanh',['../namespacestan_1_1math.html#a9e31606b2cbc69573ec0d7693c8b2a2c',1,'stan::math::atanh(const fvar< T > &x)'],['../namespacestan_1_1math.html#a9cbf81b5222fb11c01b539fab0434bdd',1,'stan::math::atanh(const var &a)']]], + ['atanh_2ehpp',['atanh.hpp',['../fwd_2scal_2fun_2atanh_8hpp.html',1,'']]], + ['atanh_2ehpp',['atanh.hpp',['../rev_2scal_2fun_2atanh_8hpp.html',1,'']]], + ['autocorrelation',['autocorrelation',['../namespacestan_1_1math.html#afd7c65ea100e48abc72f3c1e96fcdbe9',1,'stan::math::autocorrelation(const std::vector< T > &y, std::vector< T > &ac, Eigen::FFT< T > &fft)'],['../namespacestan_1_1math.html#a999404b2520dcd466c62c6ba3ca61f89',1,'stan::math::autocorrelation(const std::vector< T > &y, std::vector< T > &ac)']]], + ['autocorrelation_2ehpp',['autocorrelation.hpp',['../autocorrelation_8hpp.html',1,'']]], + ['autocovariance',['autocovariance',['../namespacestan_1_1math.html#aab515e37311a3070dbc66e69d31359a5',1,'stan::math::autocovariance(const std::vector< T > &y, std::vector< T > &acov, Eigen::FFT< T > &fft)'],['../namespacestan_1_1math.html#acdfe56505f9cbe96a18fc00f76fe79fd',1,'stan::math::autocovariance(const std::vector< T > &y, std::vector< T > &acov)']]], + ['autocovariance_2ehpp',['autocovariance.hpp',['../autocovariance_8hpp.html',1,'']]], + ['autodiffstackstorage',['AutodiffStackStorage',['../structstan_1_1math_1_1_autodiff_stack_storage.html',1,'stan::math']]], + ['autodiffstackstorage_2ehpp',['autodiffstackstorage.hpp',['../autodiffstackstorage_8hpp.html',1,'']]], + ['avi_5f',['avi_',['../classstan_1_1math_1_1op__v__vari.html#a115547abf8f49bc6c524d126ff9965b6',1,'stan::math::op_v_vari::avi_()'],['../classstan_1_1math_1_1op__vd__vari.html#a00e8ccf1cd732f4f2688bc4248fd700f',1,'stan::math::op_vd_vari::avi_()'],['../classstan_1_1math_1_1op__vdd__vari.html#a941aebe177838074a9576f3967f0ca42',1,'stan::math::op_vdd_vari::avi_()'],['../classstan_1_1math_1_1op__vdv__vari.html#aa954e347c9288c85a11bb4306e6ad35b',1,'stan::math::op_vdv_vari::avi_()'],['../classstan_1_1math_1_1op__vv__vari.html#a9fcd1e5dacb0fbd015b28c4773071b6d',1,'stan::math::op_vv_vari::avi_()'],['../classstan_1_1math_1_1op__vvd__vari.html#aca07baf5275497bc4b6e2d42148296c9',1,'stan::math::op_vvd_vari::avi_()'],['../classstan_1_1math_1_1op__vvv__vari.html#ac813cca4e210763164b061732e60d775',1,'stan::math::op_vvv_vari::avi_()']]] +]; diff --git a/doc/api/html/search/all_10.html b/doc/api/html/search/all_10.html new file mode 100644 index 00000000000..c55c8367e4e --- /dev/null +++ b/doc/api/html/search/all_10.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/all_10.js b/doc/api/html/search/all_10.js new file mode 100644 index 00000000000..f9837658d9e --- /dev/null +++ b/doc/api/html/search/all_10.js @@ -0,0 +1,19 @@ +var searchData= +[ + ['qr_5fq',['qr_Q',['../namespacestan_1_1math.html#a4badef735ea8b1cbfca31cbe49a534cf',1,'stan::math::qr_Q(const Eigen::Matrix< fvar< T >, Eigen::Dynamic, Eigen::Dynamic > &m)'],['../namespacestan_1_1math.html#a9559f36eb30f7c55b3576d8540b6bad2',1,'stan::math::qr_Q(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)']]], + ['qr_5fq_2ehpp',['qr_Q.hpp',['../prim_2mat_2fun_2qr___q_8hpp.html',1,'']]], + ['qr_5fq_2ehpp',['qr_Q.hpp',['../fwd_2mat_2fun_2qr___q_8hpp.html',1,'']]], + ['qr_5fr',['qr_R',['../namespacestan_1_1math.html#ae2c6e003d4aa779acef714b05a153c1c',1,'stan::math::qr_R(const Eigen::Matrix< fvar< T >, Eigen::Dynamic, Eigen::Dynamic > &m)'],['../namespacestan_1_1math.html#aebb8132560117eeef1a07ced4b144598',1,'stan::math::qr_R(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)']]], + ['qr_5fr_2ehpp',['qr_R.hpp',['../prim_2mat_2fun_2qr___r_8hpp.html',1,'']]], + ['qr_5fr_2ehpp',['qr_R.hpp',['../fwd_2mat_2fun_2qr___r_8hpp.html',1,'']]], + ['quad_5fform',['quad_form',['../namespacestan_1_1math.html#a88f53cb144d0e550d5113e565a91a947',1,'stan::math::quad_form(const Eigen::Matrix< T, RA, CA > &A, const Eigen::Matrix< T, RB, CB > &B)'],['../namespacestan_1_1math.html#a8166027d80ecdbc607ef3c1c44fd1e8d',1,'stan::math::quad_form(const Eigen::Matrix< T, RA, CA > &A, const Eigen::Matrix< T, RB, 1 > &B)'],['../namespacestan_1_1math.html#ae29c95a66e3c89b411b47a9613f7d00c',1,'stan::math::quad_form(const Eigen::Matrix< TA, RA, CA > &A, const Eigen::Matrix< TB, RB, CB > &B)'],['../namespacestan_1_1math.html#a78760f17a4a1aa70975f3c4abbc1d03d',1,'stan::math::quad_form(const Eigen::Matrix< TA, RA, CA > &A, const Eigen::Matrix< TB, RB, 1 > &B)']]], + ['quad_5fform_2ehpp',['quad_form.hpp',['../prim_2mat_2fun_2quad__form_8hpp.html',1,'']]], + ['quad_5fform_2ehpp',['quad_form.hpp',['../rev_2mat_2fun_2quad__form_8hpp.html',1,'']]], + ['quad_5fform_5fdiag',['quad_form_diag',['../namespacestan_1_1math.html#a55363638ef70a37127901ecb57962048',1,'stan::math']]], + ['quad_5fform_5fdiag_2ehpp',['quad_form_diag.hpp',['../quad__form__diag_8hpp.html',1,'']]], + ['quad_5fform_5fsym',['quad_form_sym',['../namespacestan_1_1math.html#a0e66b8fc7268b26c1f479d762b01f386',1,'stan::math::quad_form_sym(const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< double, RB, CB > &B)'],['../namespacestan_1_1math.html#a3c1c0234ed8a502439ec0036a4a352fe',1,'stan::math::quad_form_sym(const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< double, RB, 1 > &B)'],['../namespacestan_1_1math.html#a8628ce031fccb9fb7239f47b433deb91',1,'stan::math::quad_form_sym(const Eigen::Matrix< double, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, CB > &B)'],['../namespacestan_1_1math.html#ac02e500c362899803fc0e26058dc0197',1,'stan::math::quad_form_sym(const Eigen::Matrix< double, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, 1 > &B)'],['../namespacestan_1_1math.html#a4936ab9c3dab8c4194195de5aa398394',1,'stan::math::quad_form_sym(const Eigen::Matrix< T, RA, CA > &A, const Eigen::Matrix< T, RB, CB > &B)'],['../namespacestan_1_1math.html#a8b0b2bfea6c360dcc5739fd908b39d60',1,'stan::math::quad_form_sym(const Eigen::Matrix< T, RA, CA > &A, const Eigen::Matrix< T, RB, 1 > &B)'],['../namespacestan_1_1math.html#a0e0e772a20247cedc2da98a9c8946c89',1,'stan::math::quad_form_sym(const Eigen::Matrix< TA, RA, CA > &A, const Eigen::Matrix< TB, RB, CB > &B)'],['../namespacestan_1_1math.html#a8e79db5761062cc2b5eebe9edca4127e',1,'stan::math::quad_form_sym(const Eigen::Matrix< TA, RA, CA > &A, const Eigen::Matrix< TB, RB, 1 > &B)']]], + ['quad_5fform_5fsym_2ehpp',['quad_form_sym.hpp',['../rev_2mat_2fun_2quad__form__sym_8hpp.html',1,'']]], + ['quad_5fform_5fsym_2ehpp',['quad_form_sym.hpp',['../prim_2mat_2fun_2quad__form__sym_8hpp.html',1,'']]], + ['quad_5fform_5fsym_2ehpp',['quad_form_sym.hpp',['../fwd_2mat_2fun_2quad__form__sym_8hpp.html',1,'']]], + ['quiet_5fnan',['quiet_NaN',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a57076162eb3f395ddf9f475776bc45f4',1,'std::numeric_limits< stan::math::fvar< T > >::quiet_NaN()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a3fbd271621effc1cd6c5ba6529f88ec9',1,'std::numeric_limits< stan::math::var >::quiet_NaN()']]] +]; diff --git a/doc/api/html/search/all_11.html b/doc/api/html/search/all_11.html new file mode 100644 index 00000000000..6f3943a941a --- /dev/null +++ b/doc/api/html/search/all_11.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/all_11.js b/doc/api/html/search/all_11.js new file mode 100644 index 00000000000..6b3ec2e16e4 --- /dev/null +++ b/doc/api/html/search/all_11.js @@ -0,0 +1,76 @@ +var searchData= +[ + ['radix',['radix',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a587890d74b771c8540cee2cd2d7034ab',1,'std::numeric_limits< stan::math::fvar< T > >::radix()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#aa9ba12ebfa66d3e08f8d215b1113c818',1,'std::numeric_limits< stan::math::var >::radix()']]], + ['rank',['rank',['../namespacestan_1_1math.html#a216dec01fa6146c53b9ec51c5e9dda8d',1,'stan::math::rank(const std::vector< T > &v, int s)'],['../namespacestan_1_1math.html#a4b444aaebeed885fecdbce67ae69498c',1,'stan::math::rank(const Eigen::Matrix< T, R, C > &v, int s)']]], + ['rank_2ehpp',['rank.hpp',['../rank_8hpp.html',1,'']]], + ['rayleigh_5fccdf_5flog',['rayleigh_ccdf_log',['../namespacestan_1_1math.html#a3ca6e149995234eee4801ea4090b34cd',1,'stan::math']]], + ['rayleigh_5fccdf_5flog_2ehpp',['rayleigh_ccdf_log.hpp',['../rayleigh__ccdf__log_8hpp.html',1,'']]], + ['rayleigh_5fcdf',['rayleigh_cdf',['../namespacestan_1_1math.html#abca0bc173ef3459a1eac46296bcd83bc',1,'stan::math']]], + ['rayleigh_5fcdf_2ehpp',['rayleigh_cdf.hpp',['../rayleigh__cdf_8hpp.html',1,'']]], + ['rayleigh_5fcdf_5flog',['rayleigh_cdf_log',['../namespacestan_1_1math.html#ae588257225777f6a33cffb2139f8a4d9',1,'stan::math']]], + ['rayleigh_5fcdf_5flog_2ehpp',['rayleigh_cdf_log.hpp',['../rayleigh__cdf__log_8hpp.html',1,'']]], + ['rayleigh_5flog',['rayleigh_log',['../namespacestan_1_1math.html#a60039dc0a79268bbb0da0a715b309af9',1,'stan::math::rayleigh_log(const T_y &y, const T_scale &sigma)'],['../namespacestan_1_1math.html#a87968a836e36d11622dbe52db277f36e',1,'stan::math::rayleigh_log(const T_y &y, const T_scale &sigma)']]], + ['rayleigh_5flog_2ehpp',['rayleigh_log.hpp',['../rayleigh__log_8hpp.html',1,'']]], + ['rayleigh_5frng',['rayleigh_rng',['../namespacestan_1_1math.html#aab42ace2560fde585011d2f3c5459139',1,'stan::math']]], + ['rayleigh_5frng_2ehpp',['rayleigh_rng.hpp',['../rayleigh__rng_8hpp.html',1,'']]], + ['read_5fcorr_5fl',['read_corr_L',['../namespacestan_1_1math.html#a57f4b9ccc58d2d03aec434abb0795e41',1,'stan::math::read_corr_L(const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const size_t K)'],['../namespacestan_1_1math.html#af6d327921ea7356872f0eec002c0b032',1,'stan::math::read_corr_L(const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const size_t K, T &log_prob)']]], + ['read_5fcorr_5fl_2ehpp',['read_corr_L.hpp',['../read__corr___l_8hpp.html',1,'']]], + ['read_5fcorr_5fmatrix',['read_corr_matrix',['../namespacestan_1_1math.html#a2510336c2dac321c32b171f8ef407a06',1,'stan::math::read_corr_matrix(const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const size_t K)'],['../namespacestan_1_1math.html#a09c8a74b36fb456b0baf2d049427487b',1,'stan::math::read_corr_matrix(const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const size_t K, T &log_prob)']]], + ['read_5fcorr_5fmatrix_2ehpp',['read_corr_matrix.hpp',['../read__corr__matrix_8hpp.html',1,'']]], + ['read_5fcov_5fl',['read_cov_L',['../namespacestan_1_1math.html#a34dc4b0fb00808b0d444b2c656c44c28',1,'stan::math']]], + ['read_5fcov_5fl_2ehpp',['read_cov_L.hpp',['../read__cov___l_8hpp.html',1,'']]], + ['read_5fcov_5fmatrix',['read_cov_matrix',['../namespacestan_1_1math.html#aecf731d715f789bfad7dbb712851c52e',1,'stan::math::read_cov_matrix(const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const Eigen::Array< T, Eigen::Dynamic, 1 > &sds, T &log_prob)'],['../namespacestan_1_1math.html#a60bca98247a2b43a06388e08eade3ea5',1,'stan::math::read_cov_matrix(const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const Eigen::Array< T, Eigen::Dynamic, 1 > &sds)']]], + ['read_5fcov_5fmatrix_2ehpp',['read_cov_matrix.hpp',['../read__cov__matrix_8hpp.html',1,'']]], + ['readcost',['ReadCost',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a768855037a4305f4d90091d81bb92258ac32ba519bab5db01a8b5cd1a4d892c0d',1,'Eigen::NumTraits< stan::math::fvar< T > >::ReadCost()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#afbb9dcc15eb3b86fd1ed8a3ef5158634a9dd6c69861224ab22c6513bfc95f8dac',1,'Eigen::NumTraits< stan::math::var >::ReadCost()']]], + ['real',['Real',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#ac491ba066dc6e2fda3fb4dd69fd4331d',1,'Eigen::NumTraits< stan::math::fvar< T > >::Real()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#a03c90fde3d5351ee5fcf5860c410d934',1,'Eigen::NumTraits< stan::math::var >::Real()']]], + ['recover_5fall',['recover_all',['../classstan_1_1math_1_1stack__alloc.html#af298b06ae054599532498a1ccff4caeb',1,'stan::math::stack_alloc']]], + ['recover_5fmemory',['recover_memory',['../namespacestan_1_1math.html#afe2cbb83ac9ef52296755690e61f4298',1,'stan::math']]], + ['recover_5fmemory_2ehpp',['recover_memory.hpp',['../recover__memory_8hpp.html',1,'']]], + ['recover_5fmemory_5fnested',['recover_memory_nested',['../namespacestan_1_1math.html#a8ebf2b2bc0f63dcb46a176b43e8b369a',1,'stan::math']]], + ['recover_5fmemory_5fnested_2ehpp',['recover_memory_nested.hpp',['../recover__memory__nested_8hpp.html',1,'']]], + ['recover_5fnested',['recover_nested',['../classstan_1_1math_1_1stack__alloc.html#a9e7184bae2a2082fa7f683723379af7b',1,'stan::math::stack_alloc']]], + ['rep_5farray',['rep_array',['../namespacestan_1_1math.html#ad3d78d2735a35451f02bcd2f4da24886',1,'stan::math::rep_array(const T &x, int n)'],['../namespacestan_1_1math.html#a8edf0b7ec2ad24b1fda26a8d58513106',1,'stan::math::rep_array(const T &x, int m, int n)'],['../namespacestan_1_1math.html#a53054db4cfa6672654fbaedafbdae242',1,'stan::math::rep_array(const T &x, int k, int m, int n)']]], + ['rep_5farray_2ehpp',['rep_array.hpp',['../rep__array_8hpp.html',1,'']]], + ['rep_5fmatrix',['rep_matrix',['../namespacestan_1_1math.html#aacc2f4a71f9187885d1fa61a79285eec',1,'stan::math::rep_matrix(const T &x, int m, int n)'],['../namespacestan_1_1math.html#a44e90dfa0b0247bee1e9c739d5aee3b8',1,'stan::math::rep_matrix(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v, int n)'],['../namespacestan_1_1math.html#acbe06e42d623e4c975cd636d06bcd383',1,'stan::math::rep_matrix(const Eigen::Matrix< T, 1, Eigen::Dynamic > &rv, int m)']]], + ['rep_5fmatrix_2ehpp',['rep_matrix.hpp',['../rep__matrix_8hpp.html',1,'']]], + ['rep_5frow_5fvector',['rep_row_vector',['../namespacestan_1_1math.html#a9320ac189d0991ef6200daed95bd3c2d',1,'stan::math']]], + ['rep_5frow_5fvector_2ehpp',['rep_row_vector.hpp',['../rep__row__vector_8hpp.html',1,'']]], + ['rep_5fvector',['rep_vector',['../namespacestan_1_1math.html#a323f6ee7be13a0f7fa7cffa12204ba88',1,'stan::math']]], + ['rep_5fvector_2ehpp',['rep_vector.hpp',['../rep__vector_8hpp.html',1,'']]], + ['requireinitialization',['RequireInitialization',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a768855037a4305f4d90091d81bb92258a9755aac49dbaa87c3a448219f225d903',1,'Eigen::NumTraits< stan::math::fvar< T > >::RequireInitialization()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#afbb9dcc15eb3b86fd1ed8a3ef5158634aaf0cb8ae61102886fd8979a5e0adf442',1,'Eigen::NumTraits< stan::math::var >::RequireInitialization()']]], + ['resize',['resize',['../namespacestan_1_1math.html#a8abf3ffa6d67a158348134225c9d3090',1,'stan::math']]], + ['resize_2ehpp',['resize.hpp',['../resize_8hpp.html',1,'']]], + ['resscalar',['ResScalar',['../struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var15f7d538e8be7d782eccb613a7b1e9bd.html#a2522cf9f6deff42b9d6890624c81a970',1,'Eigen::internal::general_matrix_vector_product< Index, stan::math::var, ColMajor, ConjugateLhs, stan::math::var, ConjugateRhs >::ResScalar()'],['../struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var9294a9f65d48f87d892ffa4de3f3e667.html#ab76d226e6d6bcf0627d4cf50a0353917',1,'Eigen::internal::general_matrix_vector_product< Index, stan::math::var, RowMajor, ConjugateLhs, stan::math::var, ConjugateRhs >::ResScalar()'],['../struct_eigen_1_1internal_1_1general__matrix__matrix__product_3_01_index_00_01stan_1_1math_1_1var1562d71de7db86cb3dfb1784b090bdfc.html#a3825404fee9507304641fdb969cc999c',1,'Eigen::internal::general_matrix_matrix_product< Index, stan::math::var, LhsStorageOrder, ConjugateLhs, stan::math::var, RhsStorageOrder, ConjugateRhs, ColMajor >::ResScalar()']]], + ['restart',['restart',['../classstan_1_1math_1_1welford__covar__estimator.html#a93b3b515ae3114705517faf174d72205',1,'stan::math::welford_covar_estimator::restart()'],['../classstan_1_1math_1_1welford__var__estimator.html#a8fe05482776782589809b802b12c1ce8',1,'stan::math::welford_var_estimator::restart()']]], + ['return_5ftype',['return_type',['../structstan_1_1return__type.html',1,'stan']]], + ['return_5ftype_2ehpp',['return_type.hpp',['../return__type_8hpp.html',1,'']]], + ['returntype',['ReturnType',['../struct_eigen_1_1internal_1_1scalar__product__traits_3_01stan_1_1math_1_1var_00_01double_01_4.html#abf081b5561d2b25d3ecfed025259858d',1,'Eigen::internal::scalar_product_traits< stan::math::var, double >::ReturnType()'],['../struct_eigen_1_1internal_1_1scalar__product__traits_3_01double_00_01stan_1_1math_1_1var_01_4.html#a0fec89098be1ad8d0b1b974eb804b6a9',1,'Eigen::internal::scalar_product_traits< double, stan::math::var >::ReturnType()']]], + ['rhsscalar',['RhsScalar',['../struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var15f7d538e8be7d782eccb613a7b1e9bd.html#a47849dd5a45a554a2588c4e66f479257',1,'Eigen::internal::general_matrix_vector_product< Index, stan::math::var, ColMajor, ConjugateLhs, stan::math::var, ConjugateRhs >::RhsScalar()'],['../struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var9294a9f65d48f87d892ffa4de3f3e667.html#a9cffa44edad4d00c8ea299185f920621',1,'Eigen::internal::general_matrix_vector_product< Index, stan::math::var, RowMajor, ConjugateLhs, stan::math::var, ConjugateRhs >::RhsScalar()'],['../struct_eigen_1_1internal_1_1general__matrix__matrix__product_3_01_index_00_01stan_1_1math_1_1var1562d71de7db86cb3dfb1784b090bdfc.html#abc22c0ecc8cb2bcf46bb25466b882003',1,'Eigen::internal::general_matrix_matrix_product< Index, stan::math::var, LhsStorageOrder, ConjugateLhs, stan::math::var, RhsStorageOrder, ConjugateRhs, ColMajor >::RhsScalar()']]], + ['rising_5ffactorial',['rising_factorial',['../namespacestan_1_1math.html#ac5aa264060b3c4ed7954f07dc0fcf138',1,'stan::math::rising_factorial(const fvar< T > &x, const fvar< T > &n)'],['../namespacestan_1_1math.html#a60a96a3d8a0a67f4ab99175db6b4e859',1,'stan::math::rising_factorial(const fvar< T > &x, const double n)'],['../namespacestan_1_1math.html#a1964156202b850138f2accd71ff18724',1,'stan::math::rising_factorial(const double x, const fvar< T > &n)'],['../namespacestan_1_1math.html#a6db558a6d0b54bf4ea23d9f247c6fbdb',1,'stan::math::rising_factorial(const T1 x, const T2 n)'],['../namespacestan_1_1math.html#a317b1161dabe541d3011714f97684ca4',1,'stan::math::rising_factorial(const var &a, const double &b)'],['../namespacestan_1_1math.html#a4b35a50161c460ac1d885c61bd705d5a',1,'stan::math::rising_factorial(const var &a, const var &b)'],['../namespacestan_1_1math.html#ac4b13a596449384f742cc4b758c2e3b9',1,'stan::math::rising_factorial(const double &a, const var &b)']]], + ['rising_5ffactorial_2ehpp',['rising_factorial.hpp',['../prim_2scal_2fun_2rising__factorial_8hpp.html',1,'']]], + ['rising_5ffactorial_2ehpp',['rising_factorial.hpp',['../rev_2scal_2fun_2rising__factorial_8hpp.html',1,'']]], + ['rising_5ffactorial_2ehpp',['rising_factorial.hpp',['../fwd_2scal_2fun_2rising__factorial_8hpp.html',1,'']]], + ['round',['round',['../namespacestan_1_1math.html#adb73c37a4cec41a69516391a2336fb11',1,'stan::math::round(const fvar< T > &x)'],['../namespacestan_1_1math.html#ab259f70f4c7ebcdf3e032f01efb66c02',1,'stan::math::round(const var &a)']]], + ['round_2ehpp',['round.hpp',['../fwd_2scal_2fun_2round_8hpp.html',1,'']]], + ['round_2ehpp',['round.hpp',['../rev_2scal_2fun_2round_8hpp.html',1,'']]], + ['round_5ferror',['round_error',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a04ab86a7f52d6cb23211b7db997843cf',1,'std::numeric_limits< stan::math::fvar< T > >::round_error()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#ac3591cae0c363bded19db83484c03d9e',1,'std::numeric_limits< stan::math::var >::round_error()']]], + ['round_5fstyle',['round_style',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a17d98bdb7219aae14eb990e0e1272a75',1,'std::numeric_limits< stan::math::fvar< T > >::round_style()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#aabc7fd25500e1560deb8839cb1ee7225',1,'std::numeric_limits< stan::math::var >::round_style()']]], + ['row',['row',['../namespacestan_1_1math.html#ab98e74182d133e210dda425a689f2fb3',1,'stan::math']]], + ['row_2ehpp',['row.hpp',['../row_8hpp.html',1,'']]], + ['row_5fvector_5fd',['row_vector_d',['../namespacestan_1_1math.html#ac61a9b8f4000b9e69bf2d1dcfb34c984',1,'stan::math']]], + ['row_5fvector_5ffd',['row_vector_fd',['../namespacestan_1_1math.html#a93e8ecf4499143a1d39440a4ce690de6',1,'stan::math']]], + ['row_5fvector_5fffd',['row_vector_ffd',['../namespacestan_1_1math.html#ae05b8f0a467a66e088270a5707a9f3b7',1,'stan::math']]], + ['row_5fvector_5fffv',['row_vector_ffv',['../namespacestan_1_1math.html#a0159cba837b1310fe0c68b21ce555d5b',1,'stan::math']]], + ['row_5fvector_5ffv',['row_vector_fv',['../namespacestan_1_1math.html#a87031870214da337be0da09913bc9158',1,'stan::math']]], + ['row_5fvector_5fv',['row_vector_v',['../namespacestan_1_1math.html#a05401bf8bb7f886d11b1ee90495fe153',1,'stan::math']]], + ['rows',['rows',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#a1d7602fffede73ed7f9d54d480299491',1,'stan::math::LDLT_factor< T, R, C >::rows()'],['../classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4.html#ac71a0527f0d5cddaad94fe39b6d6df32',1,'stan::math::LDLT_factor< stan::math::var, R, C >::rows()'],['../namespacestan_1_1math.html#ae17fdbe8f98c5d6c887b49f99e6d4a03',1,'stan::math::rows()']]], + ['rows_2ehpp',['rows.hpp',['../rows_8hpp.html',1,'']]], + ['rows_5fdot_5fproduct',['rows_dot_product',['../namespacestan_1_1math.html#a060626b1758db1e659c0820f77eb7dcf',1,'stan::math::rows_dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)'],['../namespacestan_1_1math.html#aab5f5461d67d595a0c0fd720ae6cd6bd',1,'stan::math::rows_dot_product(const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)'],['../namespacestan_1_1math.html#ac6b02f2791c9c5a29811bf411e5f6e4b',1,'stan::math::rows_dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)'],['../namespacestan_1_1math.html#a6e1fb33918f8c4e61cc7709905db012c',1,'stan::math::rows_dot_product(const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)'],['../namespacestan_1_1math.html#a719a9c5d9d748a503b52d44ed4802193',1,'stan::math::rows_dot_product(const Eigen::Matrix< T1, R1, C1 > &v1, const Eigen::Matrix< T2, R2, C2 > &v2)']]], + ['rows_5fdot_5fproduct_2ehpp',['rows_dot_product.hpp',['../fwd_2mat_2fun_2rows__dot__product_8hpp.html',1,'']]], + ['rows_5fdot_5fproduct_2ehpp',['rows_dot_product.hpp',['../rev_2mat_2fun_2rows__dot__product_8hpp.html',1,'']]], + ['rows_5fdot_5fproduct_2ehpp',['rows_dot_product.hpp',['../prim_2mat_2fun_2rows__dot__product_8hpp.html',1,'']]], + ['rows_5fdot_5fself',['rows_dot_self',['../namespacestan_1_1math.html#a6b6208b5b257e2a7efac35e88ab93e8c',1,'stan::math::rows_dot_self(const Eigen::Matrix< fvar< T >, R, C > &x)'],['../namespacestan_1_1math.html#a1ae75387d4a15a928dfe2be6c987e2cb',1,'stan::math::rows_dot_self(const Eigen::Matrix< T, R, C > &x)']]], + ['rows_5fdot_5fself_2ehpp',['rows_dot_self.hpp',['../fwd_2mat_2fun_2rows__dot__self_8hpp.html',1,'']]], + ['rows_5fdot_5fself_2ehpp',['rows_dot_self.hpp',['../prim_2mat_2fun_2rows__dot__self_8hpp.html',1,'']]], + ['run',['run',['../struct_eigen_1_1internal_1_1significant__decimals__default__impl_3_01stan_1_1math_1_1fvar_3_01_t_01_4_00_01false_01_4.html#a9836117e79b68d6d362a4b775195e6b4',1,'Eigen::internal::significant_decimals_default_impl< stan::math::fvar< T >, false >::run()'],['../struct_eigen_1_1internal_1_1significant__decimals__default__impl_3_01stan_1_1math_1_1var_00_01false_01_4.html#aa8848c328f6a9e8262497de032911cac',1,'Eigen::internal::significant_decimals_default_impl< stan::math::var, false >::run()'],['../struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var15f7d538e8be7d782eccb613a7b1e9bd.html#aadff6f2862e151137086d01212091225',1,'Eigen::internal::general_matrix_vector_product< Index, stan::math::var, ColMajor, ConjugateLhs, stan::math::var, ConjugateRhs >::run()'],['../struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var9294a9f65d48f87d892ffa4de3f3e667.html#a0f5111821a2c44117c26d7567ef5e8e8',1,'Eigen::internal::general_matrix_vector_product< Index, stan::math::var, RowMajor, ConjugateLhs, stan::math::var, ConjugateRhs >::run()'],['../struct_eigen_1_1internal_1_1general__matrix__matrix__product_3_01_index_00_01stan_1_1math_1_1var1562d71de7db86cb3dfb1784b090bdfc.html#ab3c2e42b333cb04d45a7c3895d92aaea',1,'Eigen::internal::general_matrix_matrix_product< Index, stan::math::var, LhsStorageOrder, ConjugateLhs, stan::math::var, RhsStorageOrder, ConjugateRhs, ColMajor >::run()']]] +]; diff --git a/doc/api/html/search/all_12.html b/doc/api/html/search/all_12.html new file mode 100644 index 00000000000..3c7c89ef603 --- /dev/null +++ b/doc/api/html/search/all_12.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/all_12.js b/doc/api/html/search/all_12.js new file mode 100644 index 00000000000..5da5ce9bb64 --- /dev/null +++ b/doc/api/html/search/all_12.js @@ -0,0 +1,184 @@ +var searchData= +[ + ['detail',['detail',['../namespacestan_1_1math_1_1detail.html',1,'stan::math']]], + ['math',['math',['../namespacestan_1_1math.html',1,'stan']]], + ['sample_5fcovariance',['sample_covariance',['../classstan_1_1math_1_1welford__covar__estimator.html#a7d3a664aac837b2448ee6e51b570616a',1,'stan::math::welford_covar_estimator']]], + ['sample_5fmean',['sample_mean',['../classstan_1_1math_1_1welford__covar__estimator.html#ab032fe95b45062bd6b7316810508b50d',1,'stan::math::welford_covar_estimator::sample_mean()'],['../classstan_1_1math_1_1welford__var__estimator.html#aeee360036653a776666878188a4a15a0',1,'stan::math::welford_var_estimator::sample_mean()']]], + ['sample_5fvariance',['sample_variance',['../classstan_1_1math_1_1welford__var__estimator.html#a9dcda25a6b3ee85b207fb2b4975faa08',1,'stan::math::welford_var_estimator']]], + ['scalar',['Scalar',['../classstan_1_1math_1_1var.html#a14e688944f813cad7d31888dbe2854a9',1,'stan::math::var']]], + ['scalar_5fproduct_5ftraits_3c_20double_2c_20stan_3a_3amath_3a_3avar_20_3e',['scalar_product_traits< double, stan::math::var >',['../struct_eigen_1_1internal_1_1scalar__product__traits_3_01double_00_01stan_1_1math_1_1var_01_4.html',1,'Eigen::internal']]], + ['scalar_5fproduct_5ftraits_3c_20stan_3a_3amath_3a_3avar_2c_20double_20_3e',['scalar_product_traits< stan::math::var, double >',['../struct_eigen_1_1internal_1_1scalar__product__traits_3_01stan_1_1math_1_1var_00_01double_01_4.html',1,'Eigen::internal']]], + ['scalar_5ft',['scalar_t',['../classstan_1_1math_1_1container__view_3_01dummy_00_01_t2_01_4.html#a54c09070ade34e51b79b2679b9819304',1,'stan::math::container_view< dummy, T2 >::scalar_t()'],['../classstan_1_1_vector_view.html#a2a17f256f923b7271b7008682995c072',1,'stan::VectorView::scalar_t()'],['../classstan_1_1_vector_view_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html#ab4284d2fe6f3e884e2bc9ec7c5621372',1,'stan::VectorView< const T, is_array, throw_if_accessed >::scalar_t()']]], + ['scalar_5ftype',['scalar_type',['../structstan_1_1scalar__type.html',1,'stan']]], + ['scalar_5ftype_2ehpp',['scalar_type.hpp',['../scalar__type_8hpp.html',1,'']]], + ['scalar_5ftype_3c_20eigen_3a_3amatrix_3c_20t_2c_20eigen_3a_3adynamic_2c_20eigen_3a_3adynamic_20_3e_20_3e',['scalar_type< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > >',['../structstan_1_1scalar__type_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4.html',1,'stan']]], + ['scalar_5ftype_3c_20t_20_2a_20_3e',['scalar_type< T * >',['../structstan_1_1scalar__type_3_01_t_01_5_01_4.html',1,'stan']]], + ['scalar_5ftype_5fpre',['scalar_type_pre',['../structstan_1_1scalar__type__pre.html',1,'stan']]], + ['scalar_5ftype_5fpre_2ehpp',['scalar_type_pre.hpp',['../scalar__type__pre_8hpp.html',1,'']]], + ['scaled_5fadd',['scaled_add',['../namespacestan_1_1math.html#a2eb786f14699d69c39cfdd49893a8006',1,'stan::math']]], + ['scaled_5fadd_2ehpp',['scaled_add.hpp',['../scaled__add_8hpp.html',1,'']]], + ['scaled_5finv_5fchi_5fsquare_5fccdf_5flog',['scaled_inv_chi_square_ccdf_log',['../namespacestan_1_1math.html#a4fefbbf10f04d62902c383f26d98eaee',1,'stan::math']]], + ['scaled_5finv_5fchi_5fsquare_5fccdf_5flog_2ehpp',['scaled_inv_chi_square_ccdf_log.hpp',['../scaled__inv__chi__square__ccdf__log_8hpp.html',1,'']]], + ['scaled_5finv_5fchi_5fsquare_5fcdf',['scaled_inv_chi_square_cdf',['../namespacestan_1_1math.html#aac5ccd3b4bbd2f80b59a6cfaa2a7ebcb',1,'stan::math']]], + ['scaled_5finv_5fchi_5fsquare_5fcdf_2ehpp',['scaled_inv_chi_square_cdf.hpp',['../scaled__inv__chi__square__cdf_8hpp.html',1,'']]], + ['scaled_5finv_5fchi_5fsquare_5fcdf_5flog',['scaled_inv_chi_square_cdf_log',['../namespacestan_1_1math.html#a6f8d0c1c0ea0a346e972a2b461fb2b51',1,'stan::math']]], + ['scaled_5finv_5fchi_5fsquare_5fcdf_5flog_2ehpp',['scaled_inv_chi_square_cdf_log.hpp',['../scaled__inv__chi__square__cdf__log_8hpp.html',1,'']]], + ['scaled_5finv_5fchi_5fsquare_5flog',['scaled_inv_chi_square_log',['../namespacestan_1_1math.html#aa760eab5a913100acb5ad73851ec520f',1,'stan::math::scaled_inv_chi_square_log(const T_y &y, const T_dof &nu, const T_scale &s)'],['../namespacestan_1_1math.html#a469a0510198f66cfb4a23d9f0d185541',1,'stan::math::scaled_inv_chi_square_log(const T_y &y, const T_dof &nu, const T_scale &s)']]], + ['scaled_5finv_5fchi_5fsquare_5flog_2ehpp',['scaled_inv_chi_square_log.hpp',['../scaled__inv__chi__square__log_8hpp.html',1,'']]], + ['scaled_5finv_5fchi_5fsquare_5frng',['scaled_inv_chi_square_rng',['../namespacestan_1_1math.html#aefb144e1487af0dcab52c5f47fcbc93f',1,'stan::math']]], + ['scaled_5finv_5fchi_5fsquare_5frng_2ehpp',['scaled_inv_chi_square_rng.hpp',['../scaled__inv__chi__square__rng_8hpp.html',1,'']]], + ['sd',['sd',['../namespacestan_1_1math.html#a34fd02fe795ea38c98f4a02befed309f',1,'stan::math::sd(const std::vector< T > &v)'],['../namespacestan_1_1math.html#a8e1cb72c1528f0ff383033c642341147',1,'stan::math::sd(const Eigen::Matrix< T, R, C > &m)'],['../namespacestan_1_1math.html#aa6a5f3ceef72929ae7b80e83338d33f3',1,'stan::math::sd(const std::vector< var > &v)'],['../namespacestan_1_1math.html#a706c4baf534be70bbaa1cceae41da186',1,'stan::math::sd(const Eigen::Matrix< var, R, C > &m)']]], + ['sd_2ehpp',['sd.hpp',['../prim_2mat_2fun_2sd_8hpp.html',1,'']]], + ['sd_2ehpp',['sd.hpp',['../rev_2mat_2fun_2sd_8hpp.html',1,'']]], + ['segment',['segment',['../namespacestan_1_1math.html#ad87f51c66f702f242b3c5d207896f5d8',1,'stan::math::segment(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v, size_t i, size_t n)'],['../namespacestan_1_1math.html#a6068f2afa41aeec7f65229719dfda963',1,'stan::math::segment(const Eigen::Matrix< T, 1, Eigen::Dynamic > &v, size_t i, size_t n)'],['../namespacestan_1_1math.html#a721232b5c8e7c068a120719255f5fb0c',1,'stan::math::segment(const std::vector< T > &sv, size_t i, size_t n)']]], + ['segment_2ehpp',['segment.hpp',['../segment_8hpp.html',1,'']]], + ['seq_5fview',['seq_view',['../classstan_1_1math_1_1seq__view.html',1,'stan::math']]], + ['seq_5fview',['seq_view',['../classstan_1_1math_1_1seq__view.html#a0c10cc8d25cff8c90c8bbecf3cd054a1',1,'stan::math::seq_view::seq_view()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_011_01_4_01_4.html#ae570c324a14b81a018475195a77e4430',1,'stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > >::seq_view()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00_01_eigen_1_1_dynamic_01_4_01_4.html#a57ab58ed09da14b8efcf83b9d1528b88',1,'stan::math::seq_view< T, Eigen::Matrix< S, 1, Eigen::Dynamic > >::seq_view()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4.html#a706e3bea5d58f77fd9d6d427e64aa370',1,'stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >::seq_view()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4.html#a42ff5c63f8f83390fc7c585b41c0d5ed',1,'stan::math::seq_view< T, std::vector< S > >::seq_view()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01_t_01_4_01_4.html#a2e9627b1092238710ed116adc7c1cab5',1,'stan::math::seq_view< T, std::vector< T > >::seq_view()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01std_1_1vector_3_01_t_01_4_01_4_01_4.html#ac35e60cb3f9e9f4dde81b8ed3b532a2b',1,'stan::math::seq_view< T, std::vector< std::vector< T > > >::seq_view()'],['../classstan_1_1math_1_1seq__view_3_01double_00_01std_1_1vector_3_01int_01_4_01_4.html#ad82423565c559cd4e889350bc204319b',1,'stan::math::seq_view< double, std::vector< int > >::seq_view()']]], + ['seq_5fview_2ehpp',['seq_view.hpp',['../seq__view_8hpp.html',1,'']]], + ['seq_5fview_3c_20double_2c_20std_3a_3avector_3c_20int_20_3e_20_3e',['seq_view< double, std::vector< int > >',['../classstan_1_1math_1_1seq__view_3_01double_00_01std_1_1vector_3_01int_01_4_01_4.html',1,'stan::math']]], + ['seq_5fview_3c_20t_2c_20eigen_3a_3amatrix_3c_20s_2c_201_2c_20eigen_3a_3adynamic_20_3e_20_3e',['seq_view< T, Eigen::Matrix< S, 1, Eigen::Dynamic > >',['../classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00_01_eigen_1_1_dynamic_01_4_01_4.html',1,'stan::math']]], + ['seq_5fview_3c_20t_2c_20eigen_3a_3amatrix_3c_20s_2c_20eigen_3a_3adynamic_2c_201_20_3e_20_3e',['seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > >',['../classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_011_01_4_01_4.html',1,'stan::math']]], + ['seq_5fview_3c_20t_2c_20eigen_3a_3amatrix_3c_20s_2c_20eigen_3a_3adynamic_2c_20eigen_3a_3adynamic_20_3e_20_3e',['seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >',['../classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4.html',1,'stan::math']]], + ['seq_5fview_3c_20t_2c_20std_3a_3avector_3c_20s_20_3e_20_3e',['seq_view< T, std::vector< S > >',['../classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4.html',1,'stan::math']]], + ['seq_5fview_3c_20t_2c_20std_3a_3avector_3c_20std_3a_3avector_3c_20t_20_3e_20_3e_20_3e',['seq_view< T, std::vector< std::vector< T > > >',['../classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01std_1_1vector_3_01_t_01_4_01_4_01_4.html',1,'stan::math']]], + ['seq_5fview_3c_20t_2c_20std_3a_3avector_3c_20t_20_3e_20_3e',['seq_view< T, std::vector< T > >',['../classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01_t_01_4_01_4.html',1,'stan::math']]], + ['set_5fzero_5fadjoint',['set_zero_adjoint',['../classstan_1_1math_1_1chainable.html#ac7b3d732a6171f2b49667124f363ad6a',1,'stan::math::chainable::set_zero_adjoint()'],['../classstan_1_1math_1_1vari.html#a6b0b807eaa6c50123e23a1867795ee58',1,'stan::math::vari::set_zero_adjoint()']]], + ['set_5fzero_5fall_5fadjoints',['set_zero_all_adjoints',['../namespacestan_1_1math.html#a9614efc6fd66533b74b43ddb69f21d3b',1,'stan::math']]], + ['set_5fzero_5fall_5fadjoints_2ehpp',['set_zero_all_adjoints.hpp',['../set__zero__all__adjoints_8hpp.html',1,'']]], + ['sign',['sign',['../namespacestan_1_1math.html#ad825f81b97ddf0b2e1217f30913559a3',1,'stan::math']]], + ['sign_2ehpp',['sign.hpp',['../sign_8hpp.html',1,'']]], + ['signaling_5fnan',['signaling_NaN',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a1f778384d98f2aeb1d4338ed4fb01c89',1,'std::numeric_limits< stan::math::fvar< T > >::signaling_NaN()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#abe18cd7f77ecf062347231ef1193d404',1,'std::numeric_limits< stan::math::var >::signaling_NaN()']]], + ['significant_5fdecimals_5fdefault_5fimpl_3c_20stan_3a_3amath_3a_3afvar_3c_20t_20_3e_2c_20false_20_3e',['significant_decimals_default_impl< stan::math::fvar< T >, false >',['../struct_eigen_1_1internal_1_1significant__decimals__default__impl_3_01stan_1_1math_1_1fvar_3_01_t_01_4_00_01false_01_4.html',1,'Eigen::internal']]], + ['significant_5fdecimals_5fdefault_5fimpl_3c_20stan_3a_3amath_3a_3avar_2c_20false_20_3e',['significant_decimals_default_impl< stan::math::var, false >',['../struct_eigen_1_1internal_1_1significant__decimals__default__impl_3_01stan_1_1math_1_1var_00_01false_01_4.html',1,'Eigen::internal']]], + ['simplex_5fconstrain',['simplex_constrain',['../namespacestan_1_1math.html#a6341abfdbb8a7f35432a73f27b131688',1,'stan::math::simplex_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y)'],['../namespacestan_1_1math.html#a552a1c130bd90d93271bc9169b2e0ce2',1,'stan::math::simplex_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y, T &lp)']]], + ['simplex_5fconstrain_2ehpp',['simplex_constrain.hpp',['../simplex__constrain_8hpp.html',1,'']]], + ['simplex_5ffree',['simplex_free',['../namespacestan_1_1math.html#a110fab43edbb2ebb9206643900083971',1,'stan::math']]], + ['simplex_5ffree_2ehpp',['simplex_free.hpp',['../simplex__free_8hpp.html',1,'']]], + ['sin',['sin',['../namespacestan_1_1math.html#aff3f2dd84567a0566cfdd7eb10e13607',1,'stan::math::sin(const fvar< T > &x)'],['../namespacestan_1_1math.html#ae306538402ac590b8b84e6ed58989629',1,'stan::math::sin(const var &a)']]], + ['sin_2ehpp',['sin.hpp',['../fwd_2scal_2fun_2sin_8hpp.html',1,'']]], + ['sin_2ehpp',['sin.hpp',['../rev_2scal_2fun_2sin_8hpp.html',1,'']]], + ['singular_5fvalues',['singular_values',['../namespacestan_1_1math.html#a56518b3d36f8b7ce72c9b8f4b77c8f22',1,'stan::math']]], + ['singular_5fvalues_2ehpp',['singular_values.hpp',['../singular__values_8hpp.html',1,'']]], + ['sinh',['sinh',['../namespacestan_1_1math.html#a646a34790ca2b692b2a8c74c4e4fb726',1,'stan::math::sinh(const fvar< T > &x)'],['../namespacestan_1_1math.html#a241b79300774f40a6e67b7156b494462',1,'stan::math::sinh(const var &a)']]], + ['sinh_2ehpp',['sinh.hpp',['../fwd_2scal_2fun_2sinh_8hpp.html',1,'']]], + ['sinh_2ehpp',['sinh.hpp',['../rev_2scal_2fun_2sinh_8hpp.html',1,'']]], + ['size',['size',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html#a14cbf2d4763907cc2eb21b0465b793c4',1,'stan::math::coupled_ode_system< F, double, double >::size()'],['../classstan_1_1math_1_1seq__view.html#ab20467423ddb3b3e45513abb8e4a21d3',1,'stan::math::seq_view::size()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_011_01_4_01_4.html#a3284abfb2471ad555d43a8693658c5ec',1,'stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > >::size()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00_01_eigen_1_1_dynamic_01_4_01_4.html#a8c830a8c9c9c431a71a89cf4b996b27e',1,'stan::math::seq_view< T, Eigen::Matrix< S, 1, Eigen::Dynamic > >::size()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4.html#a07185ddaf17963a5724ddc2c62208922',1,'stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >::size()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4.html#a3a6031049d11ce5429727dcbe5e29130',1,'stan::math::seq_view< T, std::vector< S > >::size()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01_t_01_4_01_4.html#a3f616444293b86fdb17272494c88cc4c',1,'stan::math::seq_view< T, std::vector< T > >::size()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01std_1_1vector_3_01_t_01_4_01_4_01_4.html#ab81a7a5c2de89631c7aec2ab701854a1',1,'stan::math::seq_view< T, std::vector< std::vector< T > > >::size()'],['../classstan_1_1math_1_1seq__view_3_01double_00_01std_1_1vector_3_01int_01_4_01_4.html#af56447dd766a3a5a9d6c97b0a2de9563',1,'stan::math::seq_view< double, std::vector< int > >::size()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#acec587a37d9168a46a1ddd44c651dcd4',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::size()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#ada6e883cd3d290c2cf77df7a1c6940dc',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::size()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#a1ff2fd5ed7f65a31079b8ad3fa931bda',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::size()'],['../classstan_1_1math_1_1op__matrix__vari.html#a35e94de2a37b83f8a1866fd57709be4b',1,'stan::math::op_matrix_vari::size()'],['../classstan_1_1math_1_1op__vector__vari.html#a5e236b4bc3c9f0156532846d31f45c6f',1,'stan::math::op_vector_vari::size()'],['../namespacestan_1_1math.html#aa1f9966aade9c4515d33d3ffa7305462',1,'stan::math::size()']]], + ['size_2ehpp',['size.hpp',['../size_8hpp.html',1,'']]], + ['size_5f',['size_',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html#acf7ec3e134ff5a5c3502e9a96c04e66f',1,'stan::math::coupled_ode_system< F, double, double >::size_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#a072fc6585021385a59831dfef70c8fa1',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::size_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#a26ef004ef67b43c6df80664bd3453108',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::size_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#a98451e6ddfb64254c8bfbc6a6f4055a9',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::size_()'],['../classstan_1_1math_1_1op__matrix__vari.html#a89c5c533bea6db8bca39202531f38348',1,'stan::math::op_matrix_vari::size_()'],['../classstan_1_1math_1_1precomputed__gradients__vari.html#a785ccdd15f3d34aad96351dbfc2131a8',1,'stan::math::precomputed_gradients_vari::size_()'],['../classstan_1_1math_1_1stored__gradient__vari.html#aae7ebe863ce4f2544b1443d50c456a53',1,'stan::math::stored_gradient_vari::size_()'],['../classstan_1_1math_1_1op__vector__vari.html#af182cd25bf9c00f21155fd1e1b9bc64b',1,'stan::math::op_vector_vari::size_()'],['../rev_2mat_2fun_2dot__self_8hpp.html#a5f31775800bbb46b35b5791def1f3acc',1,'size_(): dot_self.hpp'],['../rev_2mat_2fun_2log__softmax_8hpp.html#a50218915641ec8f39877c2565e95a604',1,'size_(): log_softmax.hpp'],['../rev_2mat_2fun_2softmax_8hpp.html#a50218915641ec8f39877c2565e95a604',1,'size_(): softmax.hpp']]], + ['size_5fof',['size_of',['../structstan_1_1size__of__helper.html#a8f7056983b7948acf66a2e8b3e37e855',1,'stan::size_of_helper::size_of()'],['../structstan_1_1size__of__helper_3_01_t_00_01true_01_4.html#af0810fc0270af209916e67d5defe4b7d',1,'stan::size_of_helper< T, true >::size_of()'],['../namespacestan.html#a4741beaf7ec88631fd2735cadf05365f',1,'stan::size_of()']]], + ['size_5fof_2ehpp',['size_of.hpp',['../size__of_8hpp.html',1,'']]], + ['size_5fof_5fhelper',['size_of_helper',['../structstan_1_1size__of__helper.html',1,'stan']]], + ['size_5fof_5fhelper_3c_20t_2c_20true_20_3e',['size_of_helper< T, true >',['../structstan_1_1size__of__helper_3_01_t_00_01true_01_4.html',1,'stan']]], + ['size_5ftype',['size_type',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#ab41da7a836a010a762494c84270edd23',1,'stan::math::LDLT_factor< T, R, C >::size_type()'],['../classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4.html#ab38a23d055a57197a720a66c7b089339',1,'stan::math::LDLT_factor< stan::math::var, R, C >::size_type()'],['../namespacestan_1_1math.html#a98ff1baf06b8c5e2fc241bba99d0a97d',1,'stan::math::size_type()']]], + ['skew_5fnormal_5fccdf_5flog',['skew_normal_ccdf_log',['../namespacestan_1_1math.html#a764774344adc0fc192a79bb25cab62ea',1,'stan::math']]], + ['skew_5fnormal_5fccdf_5flog_2ehpp',['skew_normal_ccdf_log.hpp',['../skew__normal__ccdf__log_8hpp.html',1,'']]], + ['skew_5fnormal_5fcdf',['skew_normal_cdf',['../namespacestan_1_1math.html#a4619194e1d367590916fb133f99385a7',1,'stan::math']]], + ['skew_5fnormal_5fcdf_2ehpp',['skew_normal_cdf.hpp',['../skew__normal__cdf_8hpp.html',1,'']]], + ['skew_5fnormal_5fcdf_5flog',['skew_normal_cdf_log',['../namespacestan_1_1math.html#a244e671c45143752fe0d8e50dd8d64dd',1,'stan::math']]], + ['skew_5fnormal_5fcdf_5flog_2ehpp',['skew_normal_cdf_log.hpp',['../skew__normal__cdf__log_8hpp.html',1,'']]], + ['skew_5fnormal_5flog',['skew_normal_log',['../namespacestan_1_1math.html#a063fa4970b1aced1fe47505e950c5ff9',1,'stan::math::skew_normal_log(const T_y &y, const T_loc &mu, const T_scale &sigma, const T_shape &alpha)'],['../namespacestan_1_1math.html#a9f3802cc8e1abfde6592284133457854',1,'stan::math::skew_normal_log(const T_y &y, const T_loc &mu, const T_scale &sigma, const T_shape &alpha)']]], + ['skew_5fnormal_5flog_2ehpp',['skew_normal_log.hpp',['../skew__normal__log_8hpp.html',1,'']]], + ['skew_5fnormal_5frng',['skew_normal_rng',['../namespacestan_1_1math.html#ae20ce3e4d117da5792ace24dfc92b1ea',1,'stan::math']]], + ['skew_5fnormal_5frng_2ehpp',['skew_normal_rng.hpp',['../skew__normal__rng_8hpp.html',1,'']]], + ['softmax',['softmax',['../namespacestan_1_1math.html#a6f57ef7820025c7b350f84c3aebfe45e',1,'stan::math::softmax(const Eigen::Matrix< fvar< T >, Eigen::Dynamic, 1 > &alpha)'],['../namespacestan_1_1math.html#acd226ffb6c2a089f2e133b74b5fed2b0',1,'stan::math::softmax(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v)'],['../namespacestan_1_1math.html#a9fc994b4977baae2d53f2d0a60c77522',1,'stan::math::softmax(const Eigen::Matrix< var, Eigen::Dynamic, 1 > &alpha)']]], + ['softmax_2ehpp',['softmax.hpp',['../fwd_2mat_2fun_2softmax_8hpp.html',1,'']]], + ['softmax_2ehpp',['softmax.hpp',['../prim_2mat_2fun_2softmax_8hpp.html',1,'']]], + ['softmax_2ehpp',['softmax.hpp',['../rev_2mat_2fun_2softmax_8hpp.html',1,'']]], + ['softmax_5falpha_5f',['softmax_alpha_',['../rev_2mat_2fun_2log__softmax_8hpp.html#a1e7fc23c4da87820ad49b66444825c34',1,'softmax_alpha_(): log_softmax.hpp'],['../rev_2mat_2fun_2softmax_8hpp.html#a1e7fc23c4da87820ad49b66444825c34',1,'softmax_alpha_(): softmax.hpp']]], + ['solve',['solve',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#a0687e6e28885a9c5d0d14bc94cd41d01',1,'stan::math::LDLT_factor< T, R, C >::solve()'],['../classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4.html#a10f45f6aab48c0ffc6b4d0ad0e6c19b9',1,'stan::math::LDLT_factor< stan::math::var, R, C >::solve()']]], + ['solveright',['solveRight',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#a2e05d02dd6e5bb010b14d1fdc71cea64',1,'stan::math::LDLT_factor< T, R, C >']]], + ['sort_2ehpp',['sort.hpp',['../sort_8hpp.html',1,'']]], + ['sort_5fasc',['sort_asc',['../namespacestan_1_1math.html#a941784bb46a4a2fabf3deacebbd71ec5',1,'stan::math::sort_asc(std::vector< fvar< T > > xs)'],['../namespacestan_1_1math.html#a4181de091dfd2ded22cefa4df86720e6',1,'stan::math::sort_asc(Eigen::Matrix< fvar< T >, R, C > xs)'],['../namespacestan_1_1math.html#a80f5418b16ea26e9bc6d2a8f9b764897',1,'stan::math::sort_asc(std::vector< T > xs)'],['../namespacestan_1_1math.html#af9e46c9e96c0e88cc503e4b903247cce',1,'stan::math::sort_asc(Eigen::Matrix< T, R, C > xs)'],['../namespacestan_1_1math.html#a8583739553a742829c5e0b39879af0dd',1,'stan::math::sort_asc(std::vector< var > xs)'],['../namespacestan_1_1math.html#ac0391669326527e057a3f0865703b13d',1,'stan::math::sort_asc(Eigen::Matrix< var, R, C > xs)']]], + ['sort_5fasc_2ehpp',['sort_asc.hpp',['../fwd_2mat_2fun_2sort__asc_8hpp.html',1,'']]], + ['sort_5fasc_2ehpp',['sort_asc.hpp',['../rev_2mat_2fun_2sort__asc_8hpp.html',1,'']]], + ['sort_5fdesc',['sort_desc',['../namespacestan_1_1math.html#a7c06412237c5d6879a4c07f0706303e9',1,'stan::math::sort_desc(std::vector< fvar< T > > xs)'],['../namespacestan_1_1math.html#a27e74300574eb2a6e80e0f4cb029596e',1,'stan::math::sort_desc(Eigen::Matrix< fvar< T >, R, C > xs)'],['../namespacestan_1_1math.html#ab0b2712eab9b95535c0589455ed11cfc',1,'stan::math::sort_desc(std::vector< T > xs)'],['../namespacestan_1_1math.html#a60648efc106b7596ddc356b765b6df81',1,'stan::math::sort_desc(Eigen::Matrix< T, R, C > xs)'],['../namespacestan_1_1math.html#a8cefcb10a8af1224993d04e812f74e5e',1,'stan::math::sort_desc(std::vector< var > xs)'],['../namespacestan_1_1math.html#a5d8d83ef27eeacd30d11964ce32f4186',1,'stan::math::sort_desc(Eigen::Matrix< var, R, C > xs)']]], + ['sort_5fdesc_2ehpp',['sort_desc.hpp',['../fwd_2mat_2fun_2sort__desc_8hpp.html',1,'']]], + ['sort_5fdesc_2ehpp',['sort_desc.hpp',['../rev_2mat_2fun_2sort__desc_8hpp.html',1,'']]], + ['sort_5findices_2ehpp',['sort_indices.hpp',['../sort__indices_8hpp.html',1,'']]], + ['sort_5findices_5fasc',['sort_indices_asc',['../namespacestan_1_1math.html#a4a13ccb29cba05ef0daa9712ee9bf7a3',1,'stan::math']]], + ['sort_5findices_5fasc_2ehpp',['sort_indices_asc.hpp',['../sort__indices__asc_8hpp.html',1,'']]], + ['sort_5findices_5fdesc',['sort_indices_desc',['../namespacestan_1_1math.html#a27f6f9085eb850e9e0fcb98df345aeba',1,'stan::math']]], + ['sort_5findices_5fdesc_2ehpp',['sort_indices_desc.hpp',['../sort__indices__desc_8hpp.html',1,'']]], + ['sqrt',['sqrt',['../namespacestan_1_1math.html#aa5231d132852d58cd3fe610221c9766f',1,'stan::math::sqrt(const fvar< T > &x)'],['../namespacestan_1_1math.html#ab438f4b0a11d8551fe5605237f655730',1,'stan::math::sqrt(const var &a)']]], + ['sqrt_2ehpp',['sqrt.hpp',['../fwd_2scal_2fun_2sqrt_8hpp.html',1,'']]], + ['sqrt_2ehpp',['sqrt.hpp',['../rev_2scal_2fun_2sqrt_8hpp.html',1,'']]], + ['sqrt2',['sqrt2',['../namespacestan_1_1math.html#a1369f60a09e3af4933096de3a54ac28c',1,'stan::math']]], + ['sqrt_5f2',['SQRT_2',['../namespacestan_1_1math.html#a491d6e40aaa2a3e205ea6708dc3c75dd',1,'stan::math']]], + ['sqrt_5f2_5ftimes_5fsqrt_5fpi',['SQRT_2_TIMES_SQRT_PI',['../namespacestan_1_1math.html#aa628c5af5a85d53472f0126fcca44524',1,'stan::math']]], + ['sqrt_5fpi',['SQRT_PI',['../namespacestan_1_1math.html#a3e31fd76fde6e97d14dfb26c5f4ab8d0',1,'stan::math']]], + ['square',['square',['../namespacestan_1_1math.html#ab1ed68bdfff9b340a187964ef7684091',1,'stan::math::square(const fvar< T > &x)'],['../namespacestan_1_1math.html#a056b82f11f784f321bce2c5677089e24',1,'stan::math::square(const T x)'],['../namespacestan_1_1math.html#aa1b349cd070427c412c2c0a0d32327b5',1,'stan::math::square(const var &x)']]], + ['square_2ehpp',['square.hpp',['../prim_2scal_2fun_2square_8hpp.html',1,'']]], + ['square_2ehpp',['square.hpp',['../fwd_2scal_2fun_2square_8hpp.html',1,'']]], + ['square_2ehpp',['square.hpp',['../rev_2scal_2fun_2square_8hpp.html',1,'']]], + ['squared_5fdistance',['squared_distance',['../namespacestan_1_1math.html#a292e430d422bfe4984f9eaa1d20840ab',1,'stan::math::squared_distance(const Eigen::Matrix< T1, R1, C1 > &v1, const Eigen::Matrix< T2, R2, C2 > &v2)'],['../namespacestan_1_1math.html#a2d2e9c8de72e19836336f70e6c03341c',1,'stan::math::squared_distance(const Eigen::Matrix< var, R1, C1 > &v1, const Eigen::Matrix< var, R2, C2 > &v2)'],['../namespacestan_1_1math.html#a57b6cfbac0ae13e4217fba5ff20ac9e4',1,'stan::math::squared_distance(const Eigen::Matrix< var, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)'],['../namespacestan_1_1math.html#aa5483c9ea2644a3b127b36f32668bbec',1,'stan::math::squared_distance(const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< var, R2, C2 > &v2)']]], + ['squared_5fdistance_2ehpp',['squared_distance.hpp',['../rev_2mat_2fun_2squared__distance_8hpp.html',1,'']]], + ['squared_5fdistance_2ehpp',['squared_distance.hpp',['../prim_2mat_2fun_2squared__distance_8hpp.html',1,'']]], + ['stack_5falloc',['stack_alloc',['../classstan_1_1math_1_1stack__alloc.html',1,'stan::math']]], + ['stack_5falloc',['stack_alloc',['../classstan_1_1math_1_1stack__alloc.html#a6008eaa183ed07fb744799103926baac',1,'stan::math::stack_alloc']]], + ['stack_5falloc_2ehpp',['stack_alloc.hpp',['../stack__alloc_8hpp.html',1,'']]], + ['stan',['stan',['../namespacestan.html',1,'']]], + ['stan_2edox',['stan.dox',['../stan_8dox.html',1,'']]], + ['stan_5fmath_5fmajor',['STAN_MATH_MAJOR',['../version_8hpp.html#a64f03843f4437f40d083b7bc1a1206e1',1,'version.hpp']]], + ['stan_5fmath_5fminor',['STAN_MATH_MINOR',['../version_8hpp.html#afae12a425638d2799b253d3eb268190c',1,'version.hpp']]], + ['stan_5fmath_5fpatch',['STAN_MATH_PATCH',['../version_8hpp.html#aacfcdd8a078a3dc181112e6d04b82f49',1,'version.hpp']]], + ['stan_5fprint',['stan_print',['../namespacestan_1_1math.html#a7c14b7fd70050f03a07fdf73a1df06d2',1,'stan::math::stan_print(std::ostream *o, const T &x)'],['../namespacestan_1_1math.html#a37cb2d874adcc950cb0439af044f549f',1,'stan::math::stan_print(std::ostream *o, const std::vector< T > &x)'],['../namespacestan_1_1math.html#ae94f7170ee85d4b353f55e3a044d2345',1,'stan::math::stan_print(std::ostream *o, const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x)'],['../namespacestan_1_1math.html#ad9c9057d71cf2795d0042f665c0f89c1',1,'stan::math::stan_print(std::ostream *o, const Eigen::Matrix< T, 1, Eigen::Dynamic > &x)'],['../namespacestan_1_1math.html#adffa61a0521d0c07b8c4cd7ccbbb4aca',1,'stan::math::stan_print(std::ostream *o, const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &x)'],['../namespacestan_1_1math.html#aab45f57a15327ae4f94a1aef0bcd869f',1,'stan::math::stan_print(std::ostream *o, const var &x)']]], + ['stan_5fprint_2ehpp',['stan_print.hpp',['../prim_2mat_2fun_2stan__print_8hpp.html',1,'']]], + ['stan_5fprint_2ehpp',['stan_print.hpp',['../rev_2mat_2fun_2stan__print_8hpp.html',1,'']]], + ['stan_5fstring',['STAN_STRING',['../version_8hpp.html#a0c96447c79362b9df7ef76867a44d3be',1,'version.hpp']]], + ['stan_5fstring_5fexpand',['STAN_STRING_EXPAND',['../version_8hpp.html#aad2ae61392a9e7bd9be77f2688b93cee',1,'version.hpp']]], + ['start_5fnested',['start_nested',['../classstan_1_1math_1_1stack__alloc.html#abdba5f8d013107c6a37f75e186bd6dfc',1,'stan::math::stack_alloc::start_nested()'],['../namespacestan_1_1math.html#ad4a72c89ed9143a7760cc3611e8a0df0',1,'stan::math::start_nested()']]], + ['start_5fnested_2ehpp',['start_nested.hpp',['../start__nested_8hpp.html',1,'']]], + ['std',['std',['../namespacestd.html',1,'']]], + ['std_5fisinf_2ehpp',['std_isinf.hpp',['../std__isinf_8hpp.html',1,'']]], + ['std_5fisnan_2ehpp',['std_isnan.hpp',['../std__isnan_8hpp.html',1,'']]], + ['std_5fnumeric_5flimits_2ehpp',['std_numeric_limits.hpp',['../fwd_2core_2std__numeric__limits_8hpp.html',1,'']]], + ['std_5fnumeric_5flimits_2ehpp',['std_numeric_limits.hpp',['../rev_2core_2std__numeric__limits_8hpp.html',1,'']]], + ['step',['step',['../namespacestan_1_1math.html#a8fdc5e5ba8e306c2a594e928bfd62ea2',1,'stan::math::step(const T y)'],['../namespacestan_1_1math.html#a8a7c701333f443140d6d4bfdde5b15b3',1,'stan::math::step(const stan::math::var &a)']]], + ['step_2ehpp',['step.hpp',['../rev_2scal_2fun_2step_8hpp.html',1,'']]], + ['step_2ehpp',['step.hpp',['../prim_2scal_2fun_2step_8hpp.html',1,'']]], + ['store_5ftype',['store_type',['../structstan_1_1math_1_1store__type.html',1,'stan::math']]], + ['store_5ftype_3c_20double_20_3e',['store_type< double >',['../structstan_1_1math_1_1store__type_3_01double_01_4.html',1,'stan::math']]], + ['store_5ftype_3c_20eigen_3a_3amatrix_3c_20s_2c_201_2c_20eigen_3a_3adynamic_20_3e_20_3e',['store_type< Eigen::Matrix< S, 1, Eigen::Dynamic > >',['../structstan_1_1math_1_1store__type.html',1,'stan::math']]], + ['store_5ftype_3c_20eigen_3a_3amatrix_3c_20s_2c_20eigen_3a_3adynamic_2c_201_20_3e_20_3e',['store_type< Eigen::Matrix< S, Eigen::Dynamic, 1 > >',['../structstan_1_1math_1_1store__type.html',1,'stan::math']]], + ['store_5ftype_3c_20eigen_3a_3amatrix_3c_20s_2c_20eigen_3a_3adynamic_2c_20eigen_3a_3adynamic_20_3e_20_3e',['store_type< Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >',['../structstan_1_1math_1_1store__type.html',1,'stan::math']]], + ['store_5ftype_3c_20int_20_3e',['store_type< int >',['../structstan_1_1math_1_1store__type_3_01int_01_4.html',1,'stan::math']]], + ['store_5ftype_3c_20s_20_3e',['store_type< S >',['../structstan_1_1math_1_1store__type.html',1,'stan::math']]], + ['store_5ftype_3c_20std_3a_3avector_3c_20int_20_3e_20_3e',['store_type< std::vector< int > >',['../structstan_1_1math_1_1store__type.html',1,'stan::math']]], + ['store_5ftype_3c_20std_3a_3avector_3c_20s_20_3e_20_3e',['store_type< std::vector< S > >',['../structstan_1_1math_1_1store__type.html',1,'stan::math']]], + ['store_5ftype_3c_20std_3a_3avector_3c_20std_3a_3avector_3c_20t_20_3e_20_3e_20_3e',['store_type< std::vector< std::vector< T > > >',['../structstan_1_1math_1_1store__type.html',1,'stan::math']]], + ['store_5ftype_3c_20std_3a_3avector_3c_20t_20_3e_20_3e',['store_type< std::vector< T > >',['../structstan_1_1math_1_1store__type.html',1,'stan::math']]], + ['stored_5fgradient_5fvari',['stored_gradient_vari',['../classstan_1_1math_1_1stored__gradient__vari.html',1,'stan::math']]], + ['stored_5fgradient_5fvari',['stored_gradient_vari',['../classstan_1_1math_1_1stored__gradient__vari.html#a9732c6c4334aea5e617476018e6ca4a5',1,'stan::math::stored_gradient_vari']]], + ['stored_5fgradient_5fvari_2ehpp',['stored_gradient_vari.hpp',['../stored__gradient__vari_8hpp.html',1,'']]], + ['student_5ft_5fccdf_5flog',['student_t_ccdf_log',['../namespacestan_1_1math.html#aa7330bcb373ce5df4f6cedb70d4ba571',1,'stan::math']]], + ['student_5ft_5fccdf_5flog_2ehpp',['student_t_ccdf_log.hpp',['../student__t__ccdf__log_8hpp.html',1,'']]], + ['student_5ft_5fcdf',['student_t_cdf',['../namespacestan_1_1math.html#a6c3707b197842a840217b04e3cc1b0da',1,'stan::math']]], + ['student_5ft_5fcdf_2ehpp',['student_t_cdf.hpp',['../student__t__cdf_8hpp.html',1,'']]], + ['student_5ft_5fcdf_5flog',['student_t_cdf_log',['../namespacestan_1_1math.html#a0cf7b73942cfee4fec76599b966796d1',1,'stan::math']]], + ['student_5ft_5fcdf_5flog_2ehpp',['student_t_cdf_log.hpp',['../student__t__cdf__log_8hpp.html',1,'']]], + ['student_5ft_5flog',['student_t_log',['../namespacestan_1_1math.html#a20962dd5b3da2477c4c2a9170904fb27',1,'stan::math::student_t_log(const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &sigma)'],['../namespacestan_1_1math.html#ab25a0e28b3bd50cfc9fb14e9f410bd3b',1,'stan::math::student_t_log(const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &sigma)']]], + ['student_5ft_5flog_2ehpp',['student_t_log.hpp',['../student__t__log_8hpp.html',1,'']]], + ['student_5ft_5frng',['student_t_rng',['../namespacestan_1_1math.html#a4d151fedbd83f49080ef17c148ef1dad',1,'stan::math']]], + ['student_5ft_5frng_2ehpp',['student_t_rng.hpp',['../student__t__rng_8hpp.html',1,'']]], + ['sub',['sub',['../namespacestan_1_1math.html#a9e4c5e5b76b18a41b28f646104b3cd46',1,'stan::math']]], + ['sub_2ehpp',['sub.hpp',['../sub_8hpp.html',1,'']]], + ['sub_5fcol',['sub_col',['../namespacestan_1_1math.html#a943cb439569c2dc588661a1cc171e2d2',1,'stan::math']]], + ['sub_5fcol_2ehpp',['sub_col.hpp',['../sub__col_8hpp.html',1,'']]], + ['sub_5frow',['sub_row',['../namespacestan_1_1math.html#a019d635ee39f24b69c3f27e96bba4be1',1,'stan::math']]], + ['sub_5frow_2ehpp',['sub_row.hpp',['../sub__row_8hpp.html',1,'']]], + ['subtract',['subtract',['../namespacestan_1_1math.html#a38ba678d90cda4868c14d6d6bc6b509d',1,'stan::math::subtract(const Eigen::Matrix< T1, R, C > &m1, const Eigen::Matrix< T2, R, C > &m2)'],['../namespacestan_1_1math.html#a46fb2ca306088487251df70b19e73aff',1,'stan::math::subtract(const T1 &c, const Eigen::Matrix< T2, R, C > &m)'],['../namespacestan_1_1math.html#a9a8a3f79fa67648f8145c6692d19334b',1,'stan::math::subtract(const Eigen::Matrix< T1, R, C > &m, const T2 &c)']]], + ['subtract_2ehpp',['subtract.hpp',['../subtract_8hpp.html',1,'']]], + ['success',['success',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#a22f6b503fe331aeeac5368b1f10eac0d',1,'stan::math::LDLT_factor< T, R, C >::success()'],['../classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4.html#a3ed28e459ba5ce68d97daf4eb0cc780e',1,'stan::math::LDLT_factor< stan::math::var, R, C >::success()']]], + ['sum',['sum',['../classstan_1_1math_1_1accumulator.html#ad24d63f81d6c3028abc73e102c60edf8',1,'stan::math::accumulator::sum()'],['../namespacestan_1_1math.html#a5e5dda5a9c244efdbd023cc01d47cbf4',1,'stan::math::sum(const std::vector< fvar< T > > &m)'],['../namespacestan_1_1math.html#a03ac5708411da911ccf11be4a5f511f5',1,'stan::math::sum(const Eigen::Matrix< fvar< T >, R, C > &m)'],['../namespacestan_1_1math.html#a1efee0b4f8879a114af50b7e9802745c',1,'stan::math::sum(const std::vector< T > &xs)'],['../namespacestan_1_1math.html#a44c32c2d7e895378feb11c99091765ad',1,'stan::math::sum(const Eigen::Matrix< T, R, C > &v)'],['../namespacestan_1_1math.html#a2538f04d0c683772fb3f46197d8c0059',1,'stan::math::sum(const std::vector< var > &m)'],['../namespacestan_1_1math.html#a1ec64f77d2621d9f1aada5a8d2e90c2b',1,'stan::math::sum(const Eigen::Matrix< var, R, C > &m)']]], + ['sum_2ehpp',['sum.hpp',['../prim_2arr_2fun_2sum_8hpp.html',1,'']]], + ['sum_2ehpp',['sum.hpp',['../fwd_2mat_2fun_2sum_8hpp.html',1,'']]], + ['sum_2ehpp',['sum.hpp',['../rev_2mat_2fun_2sum_8hpp.html',1,'']]], + ['sum_2ehpp',['sum.hpp',['../prim_2mat_2fun_2sum_8hpp.html',1,'']]], + ['sum_2ehpp',['sum.hpp',['../fwd_2arr_2fun_2sum_8hpp.html',1,'']]], + ['sum_2ehpp',['sum.hpp',['../rev_2arr_2fun_2sum_8hpp.html',1,'']]], + ['sum_5feigen_5fv_5fvari',['sum_eigen_v_vari',['../classstan_1_1math_1_1sum__eigen__v__vari.html#a17ea145d6335dc9a5aabe3f02c572e96',1,'stan::math::sum_eigen_v_vari']]], + ['sum_5feigen_5fv_5fvari',['sum_eigen_v_vari',['../classstan_1_1math_1_1sum__eigen__v__vari.html',1,'stan::math']]], + ['sum_5fof_5fval',['sum_of_val',['../classstan_1_1math_1_1sum__v__vari.html#a4d9b8faedd6e0dcde4cbad57ebba2b11',1,'stan::math::sum_v_vari::sum_of_val()'],['../classstan_1_1math_1_1sum__eigen__v__vari.html#a4511b6d534c5adefb3bdf87fae8a87e6',1,'stan::math::sum_eigen_v_vari::sum_of_val()']]], + ['sum_5fv_5fvari',['sum_v_vari',['../classstan_1_1math_1_1sum__v__vari.html',1,'stan::math']]], + ['sum_5fv_5fvari',['sum_v_vari',['../classstan_1_1math_1_1sum__v__vari.html#ae9bf55b4be96685eaaa9bfefcbe23de9',1,'stan::math::sum_v_vari::sum_v_vari(double value, vari **v, size_t length)'],['../classstan_1_1math_1_1sum__v__vari.html#a40d6b74038464b3734839e6df9077681',1,'stan::math::sum_v_vari::sum_v_vari(const std::vector< var > &v1)']]] +]; diff --git a/doc/api/html/search/all_13.html b/doc/api/html/search/all_13.html new file mode 100644 index 00000000000..0bd629b86b2 --- /dev/null +++ b/doc/api/html/search/all_13.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/all_13.js b/doc/api/html/search/all_13.js new file mode 100644 index 00000000000..0e1bdbc7ac6 --- /dev/null +++ b/doc/api/html/search/all_13.js @@ -0,0 +1,68 @@ +var searchData= +[ + ['t_5fpartials_5freturn',['T_partials_return',['../structstan_1_1math_1_1_operands_and_partials.html#a5a7353a1f9d6c9f3771ec0e0e965987d',1,'stan::math::OperandsAndPartials']]], + ['t_5freturn_5ftype',['T_return_type',['../structstan_1_1math_1_1_operands_and_partials.html#af5ecf41f47ef4828640010cac6639e3f',1,'stan::math::OperandsAndPartials']]], + ['tail',['tail',['../namespacestan_1_1math.html#a55548f1b502d1dd6283268b79fc41507',1,'stan::math::tail(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v, size_t n)'],['../namespacestan_1_1math.html#a7d79ddf4f28c8bd68ae569b94fb693c6',1,'stan::math::tail(const Eigen::Matrix< T, 1, Eigen::Dynamic > &rv, size_t n)'],['../namespacestan_1_1math.html#a9956cf78180c6340f61667e797cf7055',1,'stan::math::tail(const std::vector< T > &sv, size_t n)']]], + ['tail_2ehpp',['tail.hpp',['../tail_8hpp.html',1,'']]], + ['tan',['tan',['../namespacestan_1_1math.html#ae09b685b660830075f80caaf8a350676',1,'stan::math::tan(const fvar< T > &x)'],['../namespacestan_1_1math.html#adf8320fd61a3c0c73f2ab8d78d949e58',1,'stan::math::tan(const var &a)']]], + ['tan_2ehpp',['tan.hpp',['../fwd_2scal_2fun_2tan_8hpp.html',1,'']]], + ['tan_2ehpp',['tan.hpp',['../rev_2scal_2fun_2tan_8hpp.html',1,'']]], + ['tangent',['tangent',['../structstan_1_1math_1_1fvar.html#a77961c425581e421a7fa441a7812d468',1,'stan::math::fvar']]], + ['tanh',['tanh',['../namespacestan_1_1math.html#ae11dc45fd471bec1a19462ce58f434b8',1,'stan::math::tanh(const fvar< T > &x)'],['../namespacestan_1_1math.html#a6d342831ec24762b18f71ba4fba54621',1,'stan::math::tanh(const var &a)']]], + ['tanh_2ehpp',['tanh.hpp',['../rev_2scal_2fun_2tanh_8hpp.html',1,'']]], + ['tanh_2ehpp',['tanh.hpp',['../fwd_2scal_2fun_2tanh_8hpp.html',1,'']]], + ['tcrossprod',['tcrossprod',['../namespacestan_1_1math.html#ab379e9a9f74dab16c41d82978cc4b58e',1,'stan::math::tcrossprod(const Eigen::Matrix< fvar< T >, R, C > &m)'],['../namespacestan_1_1math.html#a16b07b3f7d18cdb710806c5793a83d31',1,'stan::math::tcrossprod(const matrix_d &M)'],['../namespacestan_1_1math.html#a03ab719a94e19bfcf26e208ffcf5ff9a',1,'stan::math::tcrossprod(const matrix_v &M)']]], + ['tcrossprod_2ehpp',['tcrossprod.hpp',['../prim_2mat_2fun_2tcrossprod_8hpp.html',1,'']]], + ['tcrossprod_2ehpp',['tcrossprod.hpp',['../fwd_2mat_2fun_2tcrossprod_8hpp.html',1,'']]], + ['tcrossprod_2ehpp',['tcrossprod.hpp',['../rev_2mat_2fun_2tcrossprod_8hpp.html',1,'']]], + ['tgamma',['tgamma',['../namespacestan_1_1math.html#a73eaf0a5d0593bb8610234e0d69e7cec',1,'stan::math::tgamma(const fvar< T > &x)'],['../namespacestan_1_1math.html#af27ba386c3836a69c7d270f89c946268',1,'stan::math::tgamma(const stan::math::var &a)']]], + ['tgamma_2ehpp',['tgamma.hpp',['../fwd_2scal_2fun_2tgamma_8hpp.html',1,'']]], + ['tgamma_2ehpp',['tgamma.hpp',['../rev_2scal_2fun_2tgamma_8hpp.html',1,'']]], + ['theta_5f',['theta_',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#aa83bd4b43f18e3173da624b4955da369',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::theta_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#a25abbeca623eef4288f891dad5f9aef4',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::theta_()']]], + ['theta_5fdbl_5f',['theta_dbl_',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html#a6ea7d3c67d117c7a1c261fd1c4bb624a',1,'stan::math::coupled_ode_system< F, double, double >::theta_dbl_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#a8ed7492f88159d09d0821e2733f7251b',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::theta_dbl_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#a4c5d0452b3d0655d86139a2a7cce6a13',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::theta_dbl_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#ae43208e9fea0c6f456f1e28611109ac8',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::theta_dbl_()']]], + ['tinyness_5fbefore',['tinyness_before',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a8363f29d87fc5d3d73671d8392c812c5',1,'std::numeric_limits< stan::math::fvar< T > >::tinyness_before()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a872009df91ab9e948f8d9a6b4fb79a2d',1,'std::numeric_limits< stan::math::var >::tinyness_before()']]], + ['to_5farray_5f1d',['to_array_1d',['../namespacestan_1_1math.html#a88c990ca9770c6c37d883d87eb82eb6d',1,'stan::math::to_array_1d(const Matrix< T, R, C > &matrix)'],['../namespacestan_1_1math.html#ad927f0ff9564aa04073f673d5e6bddfa',1,'stan::math::to_array_1d(const vector< T > &x)'],['../namespacestan_1_1math.html#a8108c33b0612c8fe8f47767fa1ca6ad1',1,'stan::math::to_array_1d(const vector< vector< T > > &x)']]], + ['to_5farray_5f1d_2ehpp',['to_array_1d.hpp',['../to__array__1d_8hpp.html',1,'']]], + ['to_5farray_5f2d',['to_array_2d',['../namespacestan_1_1math.html#a6cdd0729c27213abdf446412e7f7793c',1,'stan::math']]], + ['to_5farray_5f2d_2ehpp',['to_array_2d.hpp',['../to__array__2d_8hpp.html',1,'']]], + ['to_5ffvar',['to_fvar',['../namespacestan_1_1math.html#ad19a5837a9b5c3e219e5081d8dca3c89',1,'stan::math::to_fvar(const T &x)'],['../namespacestan_1_1math.html#a5d9d67d772eeec5340fde5d2753a14b7',1,'stan::math::to_fvar(const fvar< T > &x)'],['../namespacestan_1_1math.html#adfb48ecaf381b03e60f9df8bab82e60c',1,'stan::math::to_fvar(const Eigen::Matrix< T, R, C > &m)'],['../namespacestan_1_1math.html#a6a866da3d4ca122849b1e0ab9b38687a',1,'stan::math::to_fvar(const Eigen::Matrix< double, R, C > &m)'],['../namespacestan_1_1math.html#aafb79996a9efea5b41d2d61ac2e0ecd3',1,'stan::math::to_fvar(const Eigen::Matrix< T, R, C > &val, const Eigen::Matrix< T, R, C > &deriv)']]], + ['to_5ffvar_2ehpp',['to_fvar.hpp',['../to__fvar_8hpp.html',1,'']]], + ['to_5fmatrix',['to_matrix',['../namespacestan_1_1math.html#a95a142c1899afa9dea4bdc053e959bf7',1,'stan::math::to_matrix(Matrix< T, R, C > matrix)'],['../namespacestan_1_1math.html#a3d53d7c1ac5bb3a3eff436d70b2cfbd6',1,'stan::math::to_matrix(const vector< vector< T > > &vec)'],['../namespacestan_1_1math.html#aaa5894e034cf63df686f4a32b78facbf',1,'stan::math::to_matrix(const vector< vector< int > > &vec)']]], + ['to_5fmatrix_2ehpp',['to_matrix.hpp',['../to__matrix_8hpp.html',1,'']]], + ['to_5frow_5fvector',['to_row_vector',['../namespacestan_1_1math.html#a69c7bf292d2f253217a813e6327899ce',1,'stan::math::to_row_vector(const Matrix< T, R, C > &matrix)'],['../namespacestan_1_1math.html#ab8eb83869b0604ee1a484547330db06f',1,'stan::math::to_row_vector(const vector< T > &vec)'],['../namespacestan_1_1math.html#a0e184ac2d303916513687b326bb01035',1,'stan::math::to_row_vector(const vector< int > &vec)']]], + ['to_5frow_5fvector_2ehpp',['to_row_vector.hpp',['../to__row__vector_8hpp.html',1,'']]], + ['to_5fvar',['to_var',['../structstan_1_1math_1_1_operands_and_partials.html#a5d301d57beac540a4a6c86cf5eac09b7',1,'stan::math::OperandsAndPartials::to_var()'],['../namespacestan_1_1math.html#a06ea285d4408c28e9ec6dc2ca1b571b5',1,'stan::math::to_var(const double &x)'],['../namespacestan_1_1math.html#adad5c0d61bde25dc78e090509b4b3149',1,'stan::math::to_var(const var &x)'],['../namespacestan_1_1math.html#adae9f601dd5faa6dcfa6e4edd7e84be9',1,'stan::math::to_var(const stan::math::matrix_d &m)'],['../namespacestan_1_1math.html#a40674afd6b5163ad3e859fc7da721faf',1,'stan::math::to_var(const matrix_v &m)'],['../namespacestan_1_1math.html#a345ee377fd33a8f5101a87482e098247',1,'stan::math::to_var(const stan::math::vector_d &v)'],['../namespacestan_1_1math.html#abdd6f29816f4c58601da47f272848187',1,'stan::math::to_var(const vector_v &v)'],['../namespacestan_1_1math.html#ac98e7e17d969cb7ee4b36dce58137cba',1,'stan::math::to_var(const stan::math::row_vector_d &rv)'],['../namespacestan_1_1math.html#ac28a0e06bb7bd6be39ef50f90e529ccd',1,'stan::math::to_var(const row_vector_v &rv)']]], + ['to_5fvar_2ehpp',['to_var.hpp',['../to__var_8hpp.html',1,'']]], + ['to_5fvector',['to_vector',['../namespacestan_1_1math.html#ae2aa02a20972263242e2f6a8785cf58d',1,'stan::math::to_vector(const Matrix< T, R, C > &matrix)'],['../namespacestan_1_1math.html#a1cc7916ec81b929389e94c7fd725fd87',1,'stan::math::to_vector(const vector< T > &vec)'],['../namespacestan_1_1math.html#a2fc3b48fe1676d80fd5775f97f2b6a9a',1,'stan::math::to_vector(const vector< int > &vec)']]], + ['to_5fvector_2ehpp',['to_vector.hpp',['../to__vector_8hpp.html',1,'']]], + ['trace',['trace',['../namespacestan_1_1math.html#a7001fd7e0296d5dae6ab0a88e1a28547',1,'stan::math::trace(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)'],['../namespacestan_1_1math.html#a8fb2aa245d794e2a6c352038f4811a37',1,'stan::math::trace(const T &m)']]], + ['trace_2ehpp',['trace.hpp',['../trace_8hpp.html',1,'']]], + ['trace_5fgen_5finv_5fquad_5fform_5fldlt',['trace_gen_inv_quad_form_ldlt',['../namespacestan_1_1math.html#a03da89fcbd2829c84a5beeb9ccbf2ccf',1,'stan::math::trace_gen_inv_quad_form_ldlt(const Eigen::Matrix< T1, R1, C1 > &D, const stan::math::LDLT_factor< T2, R2, C2 > &A, const Eigen::Matrix< T3, R3, C3 > &B)'],['../namespacestan_1_1math.html#af2dc9df09e11dc3e66438bb5d9aa457f',1,'stan::math::trace_gen_inv_quad_form_ldlt(const Eigen::Matrix< T1, R1, C1 > &D, const stan::math::LDLT_factor< T2, R2, C2 > &A, const Eigen::Matrix< T3, R3, C3 > &B)']]], + ['trace_5fgen_5finv_5fquad_5fform_5fldlt_2ehpp',['trace_gen_inv_quad_form_ldlt.hpp',['../prim_2mat_2fun_2trace__gen__inv__quad__form__ldlt_8hpp.html',1,'']]], + ['trace_5fgen_5finv_5fquad_5fform_5fldlt_2ehpp',['trace_gen_inv_quad_form_ldlt.hpp',['../rev_2mat_2fun_2trace__gen__inv__quad__form__ldlt_8hpp.html',1,'']]], + ['trace_5fgen_5fquad_5fform',['trace_gen_quad_form',['../namespacestan_1_1math.html#acd59dd23ba6d346713d117001b99507f',1,'stan::math::trace_gen_quad_form(const Eigen::Matrix< fvar< T >, RD, CD > &D, const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, CB > &B)'],['../namespacestan_1_1math.html#a09d402800ee27ba77d03dc3ec365d22e',1,'stan::math::trace_gen_quad_form(const Eigen::Matrix< double, RD, CD > &D, const Eigen::Matrix< double, RA, CA > &A, const Eigen::Matrix< double, RB, CB > &B)'],['../namespacestan_1_1math.html#a2c0d37f9fa5d50999308a19d8e67714e',1,'stan::math::trace_gen_quad_form(const Eigen::Matrix< TD, RD, CD > &D, const Eigen::Matrix< TA, RA, CA > &A, const Eigen::Matrix< TB, RB, CB > &B)']]], + ['trace_5fgen_5fquad_5fform_2ehpp',['trace_gen_quad_form.hpp',['../prim_2mat_2fun_2trace__gen__quad__form_8hpp.html',1,'']]], + ['trace_5fgen_5fquad_5fform_2ehpp',['trace_gen_quad_form.hpp',['../fwd_2mat_2fun_2trace__gen__quad__form_8hpp.html',1,'']]], + ['trace_5fgen_5fquad_5fform_2ehpp',['trace_gen_quad_form.hpp',['../rev_2mat_2fun_2trace__gen__quad__form_8hpp.html',1,'']]], + ['trace_5finv_5fquad_5fform_5fldlt',['trace_inv_quad_form_ldlt',['../namespacestan_1_1math.html#aaddc5785e5e629683ca0c3d11346d025',1,'stan::math::trace_inv_quad_form_ldlt(const stan::math::LDLT_factor< T1, R2, C2 > &A, const Eigen::Matrix< T2, R3, C3 > &B)'],['../namespacestan_1_1math.html#a04f24e9594341db1cc4ceaf5a69f039b',1,'stan::math::trace_inv_quad_form_ldlt(const stan::math::LDLT_factor< T2, R2, C2 > &A, const Eigen::Matrix< T3, R3, C3 > &B)']]], + ['trace_5finv_5fquad_5fform_5fldlt_2ehpp',['trace_inv_quad_form_ldlt.hpp',['../prim_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp.html',1,'']]], + ['trace_5finv_5fquad_5fform_5fldlt_2ehpp',['trace_inv_quad_form_ldlt.hpp',['../rev_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp.html',1,'']]], + ['trace_5fquad_5fform',['trace_quad_form',['../namespacestan_1_1math.html#a3e0c22a58b3d6fe9d4d6e0131ca791a6',1,'stan::math::trace_quad_form(const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, CB > &B)'],['../namespacestan_1_1math.html#a9bd6d656aebcc1a3937996a31c937a54',1,'stan::math::trace_quad_form(const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< double, RB, CB > &B)'],['../namespacestan_1_1math.html#a171f742f11d2a7929a14ee7c7b47368d',1,'stan::math::trace_quad_form(const Eigen::Matrix< double, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, CB > &B)'],['../namespacestan_1_1math.html#a097af33142548fd565d1dab2233fa3e5',1,'stan::math::trace_quad_form(const Eigen::Matrix< double, RA, CA > &A, const Eigen::Matrix< double, RB, CB > &B)'],['../namespacestan_1_1math.html#a5c7a80225b1cb62153ba5d47a45870fe',1,'stan::math::trace_quad_form(const Eigen::Matrix< TA, RA, CA > &A, const Eigen::Matrix< TB, RB, CB > &B)']]], + ['trace_5fquad_5fform_2ehpp',['trace_quad_form.hpp',['../fwd_2mat_2fun_2trace__quad__form_8hpp.html',1,'']]], + ['trace_5fquad_5fform_2ehpp',['trace_quad_form.hpp',['../prim_2mat_2fun_2trace__quad__form_8hpp.html',1,'']]], + ['trace_5fquad_5fform_2ehpp',['trace_quad_form.hpp',['../rev_2mat_2fun_2trace__quad__form_8hpp.html',1,'']]], + ['transpose',['transpose',['../namespacestan_1_1math.html#a89f315f3af384f2d49a3a26eaef209ac',1,'stan::math']]], + ['transpose_2ehpp',['transpose.hpp',['../transpose_8hpp.html',1,'']]], + ['traps',['traps',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#aacb06d8d52956389bba88fc0196f4d7e',1,'std::numeric_limits< stan::math::fvar< T > >::traps()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#ace9fa9c8c667f38d1c1fac08354c7f9c',1,'std::numeric_limits< stan::math::var >::traps()']]], + ['trigamma',['trigamma',['../namespacestan_1_1math.html#ab18c21bad37c9af26424d0922936355e',1,'stan::math']]], + ['trigamma_2ehpp',['trigamma.hpp',['../trigamma_8hpp.html',1,'']]], + ['trunc',['trunc',['../namespacestan_1_1math.html#a79abc1d4f747b3c26c07b2b1e4871603',1,'stan::math::trunc(const fvar< T > &x)'],['../namespacestan_1_1math.html#a80e85e1eba4076438c72cd986fde40e8',1,'stan::math::trunc(const var &a)']]], + ['trunc_2ehpp',['trunc.hpp',['../rev_2scal_2fun_2trunc_8hpp.html',1,'']]], + ['trunc_2ehpp',['trunc.hpp',['../fwd_2scal_2fun_2trunc_8hpp.html',1,'']]], + ['two_5fover_5fsqrt_5fpi',['TWO_OVER_SQRT_PI',['../namespacestan_1_1math.html#a935530f53a026ebb80fcd9006059e9c8',1,'stan::math']]], + ['type',['type',['../structstan_1_1partials__type_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#af8a313bf6a2791e160112bda56d44288',1,'stan::partials_type< stan::math::fvar< T > >::type()'],['../structstan_1_1math_1_1index__type_3_01std_1_1vector_3_01_t_01_4_01_4.html#ababf4dcdf4c61050637f7a5efc94429c',1,'stan::math::index_type< std::vector< T > >::type()'],['../structstan_1_1is__vector_3_01const_01_t_01_4.html#a438013ddac03fc30456a132b069b6db7',1,'stan::is_vector< const T >::type()'],['../structstan_1_1is__vector_3_01std_1_1vector_3_01_t_01_4_01_4.html#aefecb429647f6ad44faa02cb233050da',1,'stan::is_vector< std::vector< T > >::type()'],['../structstan_1_1math_1_1common__type.html#a79e549f9ee143c7d5bec69a89aaa685f',1,'stan::math::common_type::type()'],['../structstan_1_1math_1_1common__type_3_01std_1_1vector_3_01_t1_01_4_00_01std_1_1vector_3_01_t2_01_4_01_4.html#a3d85f74a9e814b33da63154c2c42831a',1,'stan::math::common_type< std::vector< T1 >, std::vector< T2 > >::type()'],['../structstan_1_1math_1_1common__type_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_eiged8accfa00e73f240c58ad02ac582ba93.html#a1dfda8432ea5cb2fd29673a00f23d9ab',1,'stan::math::common_type< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > >::type()'],['../structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1e90c042d64d8c3a6b9383f570932df58.html#a9e838fc1e9eb5185e868de62a5fe86b5',1,'stan::math::promote_scalar_type< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >::type()'],['../structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_011_01_4_01_4.html#a8b40b9d3384f079cb045ab61a8c6ac73',1,'stan::math::promote_scalar_type< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > >::type()'],['../structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00_01_eigen_1_1_dynamic_01_4_01_4.html#a73857fd39b6e343018a3bda40b7dc579',1,'stan::math::promote_scalar_type< T, Eigen::Matrix< S, 1, Eigen::Dynamic > >::type()'],['../structstan_1_1math_1_1index__type_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4.html#a24d56619b29f61d9addb42dd8df1cdf1',1,'stan::math::index_type< Eigen::Matrix< T, R, C > >::type()'],['../structstan_1_1is__vector_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_011_01_4_01_4.html#ab0c2ebfaeaf2d18b25665573a01dab1e',1,'stan::is_vector< Eigen::Matrix< T, Eigen::Dynamic, 1 > >::type()'],['../structstan_1_1is__vector_3_01_eigen_1_1_matrix_3_01_t_00_011_00_01_eigen_1_1_dynamic_01_4_01_4.html#a07a4e818504882fb191b9d3a5ba6677a',1,'stan::is_vector< Eigen::Matrix< T, 1, Eigen::Dynamic > >::type()'],['../structstan_1_1is__vector_3_01_eigen_1_1_block_3_01_t_01_4_01_4.html#a7e97f9578f2d4c2ffe59e6f6a92012a8',1,'stan::is_vector< Eigen::Block< T > >::type()'],['../structstan_1_1math_1_1store__type.html#a4911dad4e7692aae90f6a93466a3e88b',1,'stan::math::store_type::type()'],['../structstan_1_1math_1_1store__type_3_01double_01_4.html#a36449fc098f0ee60b5e078771f5395e8',1,'stan::math::store_type< double >::type()'],['../structstan_1_1math_1_1store__type_3_01int_01_4.html#aa10e456268690936392e9ea31e24645f',1,'stan::math::store_type< int >::type()'],['../structstan_1_1math_1_1pass__type.html#aaf902ad0b26acab6888195ed0b528ec5',1,'stan::math::pass_type::type()'],['../structstan_1_1math_1_1pass__type_3_01double_01_4.html#adee94e36436cf8e5628e961330047738',1,'stan::math::pass_type< double >::type()'],['../structstan_1_1math_1_1pass__type_3_01int_01_4.html#a6e1bfc775f016451ab261ecede07402c',1,'stan::math::pass_type< int >::type()'],['../structstan_1_1math_1_1value__type_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4.html#a269815862773362350279d4b0317e7e7',1,'stan::math::value_type< Eigen::Matrix< T, R, C > >::type()'],['../structstan_1_1math_1_1promote__scalar__type.html#a171ea87ee9f5562b17a34f59aaf5236d',1,'stan::math::promote_scalar_type::type()'],['../structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4.html#a5b7882075346e87e0765625eac15c615',1,'stan::math::promote_scalar_type< T, std::vector< S > >::type()'],['../structstan_1_1math_1_1child__type.html#a0d005efbf96c2a27150943452b30a6f9',1,'stan::math::child_type::type()'],['../structstan_1_1math_1_1child__type_3_01_t__struct_3_01_t__child_01_4_01_4.html#a641ba0032fa0a71e7216cef157e7d831',1,'stan::math::child_type< T_struct< T_child > >::type()'],['../structstan_1_1math_1_1index__type_3_01const_01_t_01_4.html#a7967da72eaf9cec3dafcbeb8214ec209',1,'stan::math::index_type< const T >::type()'],['../structstan_1_1is__vector.html#a5384dc7751d6efdfd7b7bd9ccc442ca2',1,'stan::is_vector::type()'],['../structstan_1_1partials__return__type.html#a6aec78ebdc1f5d8571c079a3ee013f60',1,'stan::partials_return_type::type()'],['../structstan_1_1partials__type.html#aa407532a83bdc09a2167858e5612b300',1,'stan::partials_type::type()'],['../structstan_1_1return__type.html#af3130731cc471801ccef3bc753dd790b',1,'stan::return_type::type()'],['../structstan_1_1scalar__type.html#aa9068e42d81d7091f822df126fe932b7',1,'stan::scalar_type::type()'],['../structstan_1_1scalar__type_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4.html#a3cbf7ba7c3d16da948863b3180075b36',1,'stan::scalar_type< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > >::type()'],['../structstan_1_1scalar__type_3_01_t_01_5_01_4.html#a38f00242ece28298968a43f30508c940',1,'stan::scalar_type< T * >::type()'],['../structstan_1_1scalar__type__pre.html#a04ba454b3b528f4697c036d2bb19a8a1',1,'stan::scalar_type_pre::type()'],['../structstan_1_1math_1_1value__type_3_01const_01_t_01_4.html#a9f80906cfc8184d851acc6791a4c3443',1,'stan::math::value_type< const T >::type()'],['../structstan_1_1math_1_1value__type_3_01std_1_1vector_3_01_t_01_4_01_4.html#a98df9e1c73f191ad704b8e37a6a1ea23',1,'stan::math::value_type< std::vector< T > >::type()'],['../structstan_1_1partials__type_3_01stan_1_1math_1_1var_01_4.html#a3c2760c483a6ad308e2f340fe934d51d',1,'stan::partials_type< stan::math::var >::type()']]], + ['typedefs_2ehpp',['typedefs.hpp',['../fwd_2mat_2fun_2typedefs_8hpp.html',1,'']]], + ['typedefs_2ehpp',['typedefs.hpp',['../mix_2mat_2fun_2typedefs_8hpp.html',1,'']]], + ['typedefs_2ehpp',['typedefs.hpp',['../prim_2mat_2fun_2typedefs_8hpp.html',1,'']]], + ['typedefs_2ehpp',['typedefs.hpp',['../rev_2mat_2fun_2typedefs_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/all_14.html b/doc/api/html/search/all_14.html new file mode 100644 index 00000000000..2ad638b2770 --- /dev/null +++ b/doc/api/html/search/all_14.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/all_14.js b/doc/api/html/search/all_14.js new file mode 100644 index 00000000000..52e515ae6b1 --- /dev/null +++ b/doc/api/html/search/all_14.js @@ -0,0 +1,22 @@ +var searchData= +[ + ['ub_5fconstrain',['ub_constrain',['../namespacestan_1_1math.html#ad9440f04c389ecf55094919dd4a29561',1,'stan::math::ub_constrain(const T x, const TU ub)'],['../namespacestan_1_1math.html#a0e07e6f25d9cc21ce1467d0d74913a74',1,'stan::math::ub_constrain(const T x, const TU ub, T &lp)']]], + ['ub_5fconstrain_2ehpp',['ub_constrain.hpp',['../ub__constrain_8hpp.html',1,'']]], + ['ub_5ffree',['ub_free',['../namespacestan_1_1math.html#ac11bdd8c7f6eed39bbac5a663c8a81bc',1,'stan::math']]], + ['ub_5ffree_2ehpp',['ub_free.hpp',['../ub__free_8hpp.html',1,'']]], + ['uniform_5fccdf_5flog',['uniform_ccdf_log',['../namespacestan_1_1math.html#a5e2b8fa3c8f27cf5fe06e35971810d52',1,'stan::math']]], + ['uniform_5fccdf_5flog_2ehpp',['uniform_ccdf_log.hpp',['../uniform__ccdf__log_8hpp.html',1,'']]], + ['uniform_5fcdf',['uniform_cdf',['../namespacestan_1_1math.html#aa15c5027f6cc08a719ce42c82f42e8ab',1,'stan::math']]], + ['uniform_5fcdf_2ehpp',['uniform_cdf.hpp',['../uniform__cdf_8hpp.html',1,'']]], + ['uniform_5fcdf_5flog',['uniform_cdf_log',['../namespacestan_1_1math.html#a8f377bbfcb2c65d7c9b22f2a007cdc71',1,'stan::math']]], + ['uniform_5fcdf_5flog_2ehpp',['uniform_cdf_log.hpp',['../uniform__cdf__log_8hpp.html',1,'']]], + ['uniform_5flog',['uniform_log',['../namespacestan_1_1math.html#ae39a215713172d13a104cf33d6186c65',1,'stan::math::uniform_log(const T_y &y, const T_low &alpha, const T_high &beta)'],['../namespacestan_1_1math.html#a9c32b2aba8ca5e5eb4ebe76fd1f9a832',1,'stan::math::uniform_log(const T_y &y, const T_low &alpha, const T_high &beta)']]], + ['uniform_5flog_2ehpp',['uniform_log.hpp',['../uniform__log_8hpp.html',1,'']]], + ['uniform_5frng',['uniform_rng',['../namespacestan_1_1math.html#a10447d2a77f0fdf32e0adce2546cd3cd',1,'stan::math']]], + ['uniform_5frng_2ehpp',['uniform_rng.hpp',['../uniform__rng_8hpp.html',1,'']]], + ['unit_5fvector_5fconstrain',['unit_vector_constrain',['../namespacestan_1_1math.html#a3a07474ecb0ca5f4fdbed0ce6957300f',1,'stan::math::unit_vector_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y)'],['../namespacestan_1_1math.html#ac069d9e617c38341a12a33c73a7090d6',1,'stan::math::unit_vector_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y, T &lp)']]], + ['unit_5fvector_5fconstrain_2ehpp',['unit_vector_constrain.hpp',['../unit__vector__constrain_8hpp.html',1,'']]], + ['unit_5fvector_5ffree',['unit_vector_free',['../namespacestan_1_1math.html#a65fb60ad466e375f68798ff25881e378',1,'stan::math']]], + ['unit_5fvector_5ffree_2ehpp',['unit_vector_free.hpp',['../unit__vector__free_8hpp.html',1,'']]], + ['unlikely',['unlikely',['../likely_8hpp.html#ac6c45889010c1bd68631771b64f18101',1,'likely.hpp']]] +]; diff --git a/doc/api/html/search/all_15.html b/doc/api/html/search/all_15.html new file mode 100644 index 00000000000..d3b5274ba77 --- /dev/null +++ b/doc/api/html/search/all_15.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/all_15.js b/doc/api/html/search/all_15.js new file mode 100644 index 00000000000..14bf39a8dee --- /dev/null +++ b/doc/api/html/search/all_15.js @@ -0,0 +1,90 @@ +var searchData= +[ + ['v1_5f',['v1_',['../classstan_1_1math_1_1gevv__vvv__vari.html#a1b8223780565cab9a3d95dd0bb199b90',1,'stan::math::gevv_vvv_vari::v1_()'],['../rev_2mat_2fun_2dot__product_8hpp.html#a8c886c0e0b0df10a90267645bac46674',1,'v1_(): dot_product.hpp'],['../rev_2mat_2fun_2squared__distance_8hpp.html#a83c5c6dc5ed503252611e6e50af3557a',1,'v1_(): squared_distance.hpp']]], + ['v2_5f',['v2_',['../classstan_1_1math_1_1gevv__vvv__vari.html#a3cfca671d85ffed899debb9730235dbd',1,'stan::math::gevv_vvv_vari::v2_()'],['../rev_2mat_2fun_2dot__product_8hpp.html#a27e3d8b375e8f1fb1cb0078d150879ea',1,'v2_(): dot_product.hpp'],['../rev_2mat_2fun_2squared__distance_8hpp.html#a2157c9243530cdafcfb1665c9e682ed7',1,'v2_(): squared_distance.hpp']]], + ['v_5f',['v_',['../classstan_1_1math_1_1sum__v__vari.html#a02ca46a8d2ffc591718513c98c09c9b6',1,'stan::math::sum_v_vari::v_()'],['../rev_2mat_2fun_2dot__self_8hpp.html#ad96f2a078f01703996f5677e20cc34cd',1,'v_(): dot_self.hpp']]], + ['v_5fvari_2ehpp',['v_vari.hpp',['../v__vari_8hpp.html',1,'']]], + ['val',['val',['../structstan_1_1math_1_1fvar.html#aebf2b1ad415c5f68d5b4c7a94384e3fc',1,'stan::math::fvar::val()'],['../classstan_1_1math_1_1var.html#adee6abba4694821dd182f44657b53bca',1,'stan::math::var::val()']]], + ['val_5f',['val_',['../structstan_1_1math_1_1fvar.html#a5d2e56f89a8dec57599a7d3e62e5e256',1,'stan::math::fvar::val_()'],['../classstan_1_1math_1_1vari.html#a5c8a37e50654a282308ddde46e68ede6',1,'stan::math::vari::val_()']]], + ['validate_5fnon_5fnegative_5findex',['validate_non_negative_index',['../namespacestan_1_1math.html#abb591fca3d88d2a5d587ce6172b62bf4',1,'stan::math']]], + ['validate_5fnon_5fnegative_5findex_2ehpp',['validate_non_negative_index.hpp',['../validate__non__negative__index_8hpp.html',1,'']]], + ['value',['value',['../structstan_1_1is__fvar_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a6babc0753f5871c298d85413e6e110d6a770958271842bd91202a4b530eca5aeb',1,'stan::is_fvar< stan::math::fvar< T > >::value()'],['../structstan_1_1is__vector_3_01const_01_t_01_4.html#a656cea86d76ca8ba6250c1119626294cab7b181e7406ecc9d9512f53eeb423835',1,'stan::is_vector< const T >::value()'],['../structstan_1_1is__vector_3_01std_1_1vector_3_01_t_01_4_01_4.html#a8d1ad2311e4fe396ee0680dc2a489caba8669507d2c0cf8d2013fa55cbc040690',1,'stan::is_vector< std::vector< T > >::value()'],['../structstan_1_1is__vector_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_011_01_4_01_4.html#a4a7b95dadef68bc513e363ebab9f24f0a75a67f94582ddd21b4956e5540578114',1,'stan::is_vector< Eigen::Matrix< T, Eigen::Dynamic, 1 > >::value()'],['../structstan_1_1is__vector_3_01_eigen_1_1_matrix_3_01_t_00_011_00_01_eigen_1_1_dynamic_01_4_01_4.html#a4bf231c4eb911cb5a97177a89497f41ca060ce69961a2ceb1cc29cc4861aa527e',1,'stan::is_vector< Eigen::Matrix< T, 1, Eigen::Dynamic > >::value()'],['../structstan_1_1is__vector_3_01_eigen_1_1_block_3_01_t_01_4_01_4.html#a6e3fbac8c1bd8467c43f299e80414ba9a565f949d7780375faf2d63474a18771c',1,'stan::is_vector< Eigen::Block< T > >::value()'],['../structstan_1_1is__vector__like_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4.html#a509236a119a19272d41689c441e30813acc3bb708be577474e9cd1e11ad5a4ba1',1,'stan::is_vector_like< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > >::value()'],['../structstan_1_1contains__fvar.html#afccc54d2547159c9d61798447f5501f1a5a1eddf5b1539585920063fb6cd6835b',1,'stan::contains_fvar::value()'],['../structstan_1_1contains__nonconstant__struct.html#a3e4835a62414ba3dab201c4587d0b8edaaf8e79ca7e4a151708d1dfb9606071de',1,'stan::contains_nonconstant_struct::value()'],['../structstan_1_1contains__vector.html#af5a11fc5bbcd11df3111deb4e5b044a6a0ab5ee57c23533e870bb22a79156e66b',1,'stan::contains_vector::value()'],['../structstan_1_1error__index.html#a2adc3ca217283b39a292dfce1804bb12a0878d922bbc8cd2f709a333e184dd112',1,'stan::error_index::value()'],['../structstan_1_1math_1_1include__summand.html#a9de568c1ba5fc294e76c988abe0ead99a0a929ac9c4eba12a434fa5b035093df9',1,'stan::math::include_summand::value()'],['../structstan_1_1is__constant.html#a2ccfaae3c831f691f8fe11dfbadcb004aecafc97e964e672dd93bcb490a0a1811',1,'stan::is_constant::value()'],['../structstan_1_1is__constant__struct.html#a0fa28517c89775a548fb66c6e013e5f6a3f9610c0a10a3879fccf6f212dd3d411',1,'stan::is_constant_struct::value()'],['../structstan_1_1is__constant__struct_3_01std_1_1vector_3_01_t_01_4_01_4.html#a070f7c34cc9cb2e4c6c0aeee5836c01da889b9838820d11325b1b1e2e6dcd1f62',1,'stan::is_constant_struct< std::vector< T > >::value()'],['../structstan_1_1is__constant__struct_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4.html#aea795d781322ac5906d689e11faef724a8a919616f9227fcfa43cb7134758120a',1,'stan::is_constant_struct< Eigen::Matrix< T, R, C > >::value()'],['../structstan_1_1is__constant__struct_3_01_eigen_1_1_block_3_01_t_01_4_01_4.html#a1d60387627b8c3629b6714f947081d15ae47d85a4a43fdce9e0a2be294e6e0622',1,'stan::is_constant_struct< Eigen::Block< T > >::value()'],['../structstan_1_1is__fvar.html#aee7f99a61d7b21a79c1dfd4a3619571eab1813e4af114b125e86c4eefb1c67481',1,'stan::is_fvar::value()'],['../structstan_1_1is__var.html#aac384e0e2c72c68ae03dd7f10ca8a192aaeb0f9a9eead1ac6cc943d6a1974a4c1',1,'stan::is_var::value()'],['../structstan_1_1is__var__or__arithmetic.html#ae2274b1dfaae357a2ede5a73ceff221ca4e3e0e0100aa814492acbd85e2138643',1,'stan::is_var_or_arithmetic::value()'],['../structstan_1_1is__vector.html#a73e9760bc4a6b89670604606218d98afa9b19e1572754024bf83375a19efee164',1,'stan::is_vector::value()'],['../structstan_1_1is__vector__like.html#a7c347bcea8f5aa2e059c878a774e939ea2113100a63bb957b1ada362a39a22213',1,'stan::is_vector_like::value()'],['../structstan_1_1is__vector__like_3_01_t_01_5_01_4.html#ac9241b4f77efad2fc0dd173a4ec0f367a50f6d9fb5990e3e623e6e02458926009',1,'stan::is_vector_like< T * >::value()'],['../structstan_1_1is__vector__like_3_01const_01_t_01_4.html#accc6af134d2e9eab199da085ad3e87e3ab859ca004282bbe79a5eeda7238d86da',1,'stan::is_vector_like< const T >::value()'],['../structstan_1_1is__var_3_01stan_1_1math_1_1var_01_4.html#ae4a2b202d3d778d3cbd3b21175de8f6ca0f5ca9489de04d1d3d2f6ccf5783f360',1,'stan::is_var< stan::math::var >::value()']]], + ['value_5fof',['value_of',['../namespacestan_1_1math.html#a541f8f9d951f4d48c457dcecad5e326b',1,'stan::math::value_of(const fvar< T > &v)'],['../namespacestan_1_1math.html#ad6ac4b37c5723681111ef69072288fd4',1,'stan::math::value_of(const Eigen::Matrix< T, R, C > &M)'],['../namespacestan_1_1math.html#a73087d72fd937f4be66684bd2613ae6e',1,'stan::math::value_of(const T x)'],['../namespacestan_1_1math.html#a0a759dd2a7ff07dbf11f60d9e1352bb3',1,'stan::math::value_of(const var &v)']]], + ['value_5fof_2ehpp',['value_of.hpp',['../prim_2scal_2fun_2value__of_8hpp.html',1,'']]], + ['value_5fof_2ehpp',['value_of.hpp',['../rev_2scal_2fun_2value__of_8hpp.html',1,'']]], + ['value_5fof_2ehpp',['value_of.hpp',['../fwd_2scal_2fun_2value__of_8hpp.html',1,'']]], + ['value_5fof_2ehpp',['value_of.hpp',['../prim_2mat_2fun_2value__of_8hpp.html',1,'']]], + ['value_5fof_3c_20double_20_3e',['value_of< double >',['../namespacestan_1_1math.html#a2d7774df98215b7d113075019d74ebbf',1,'stan::math']]], + ['value_5fof_5frec',['value_of_rec',['../namespacestan_1_1math.html#a00b8cbdec7c35e7c93b0f47dae3c5498',1,'stan::math::value_of_rec(const fvar< T > &v)'],['../namespacestan_1_1math.html#ae6b0847f7611d8f396a1f4e112200185',1,'stan::math::value_of_rec(const Eigen::Matrix< T, R, C > &M)'],['../namespacestan_1_1math.html#a7a99d6e8d6986fffb421e859770560bc',1,'stan::math::value_of_rec(const T x)'],['../namespacestan_1_1math.html#ab481d22f60e4cb93d629ac5d9f43bb00',1,'stan::math::value_of_rec(const var &v)']]], + ['value_5fof_5frec_2ehpp',['value_of_rec.hpp',['../fwd_2scal_2fun_2value__of__rec_8hpp.html',1,'']]], + ['value_5fof_5frec_2ehpp',['value_of_rec.hpp',['../prim_2scal_2fun_2value__of__rec_8hpp.html',1,'']]], + ['value_5fof_5frec_2ehpp',['value_of_rec.hpp',['../prim_2mat_2fun_2value__of__rec_8hpp.html',1,'']]], + ['value_5fof_5frec_2ehpp',['value_of_rec.hpp',['../rev_2scal_2fun_2value__of__rec_8hpp.html',1,'']]], + ['value_5fof_5frec_3c_20double_20_3e',['value_of_rec< double >',['../namespacestan_1_1math.html#a7bb47fffd6ec0b1864d5e8bf0b99cf55',1,'stan::math']]], + ['value_5ftype',['value_type',['../structstan_1_1math_1_1value__type.html',1,'stan::math']]], + ['value_5ftype',['value_type',['../structstan_1_1math_1_1fvar.html#ad8078e30a3897fdf9988f8a96bba3704',1,'stan::math::fvar::value_type()'],['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#a2ef573d4866782c4bdcd33865bea11f1',1,'stan::math::LDLT_factor< T, R, C >::value_type()'],['../classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4.html#afd02ee536695f8d22fc5f43add1383d4',1,'stan::math::LDLT_factor< stan::math::var, R, C >::value_type()']]], + ['value_5ftype_2ehpp',['value_type.hpp',['../scal_2meta_2value__type_8hpp.html',1,'']]], + ['value_5ftype_2ehpp',['value_type.hpp',['../mat_2meta_2value__type_8hpp.html',1,'']]], + ['value_5ftype_3c_20const_20t_20_3e',['value_type< const T >',['../structstan_1_1math_1_1value__type_3_01const_01_t_01_4.html',1,'stan::math']]], + ['value_5ftype_3c_20eigen_3a_3amatrix_3c_20t_2c_20r_2c_20c_20_3e_20_3e',['value_type< Eigen::Matrix< T, R, C > >',['../structstan_1_1math_1_1value__type_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4.html',1,'stan::math']]], + ['value_5ftype_3c_20std_3a_3avector_3c_20t_20_3e_20_3e',['value_type< std::vector< T > >',['../structstan_1_1math_1_1value__type_3_01std_1_1vector_3_01_t_01_4_01_4.html',1,'stan::math']]], + ['var',['var',['../classstan_1_1math_1_1var.html',1,'stan::math']]], + ['var',['var',['../classstan_1_1math_1_1vari.html#afc150fe027cd12dd501a9d615a787f19',1,'stan::math::vari::var()'],['../classstan_1_1math_1_1var.html#aad7dd38f48c59f9b59d7f2caa7dcc055',1,'stan::math::var::var()'],['../classstan_1_1math_1_1var.html#ac9dad7e9936150e2d082ab2eb9d07a85',1,'stan::math::var::var(vari *vi)'],['../classstan_1_1math_1_1var.html#a6405710a647d0a5f20b07aa1a41e1b6b',1,'stan::math::var::var(float x)'],['../classstan_1_1math_1_1var.html#a59212fe7f7b20ff643dde22074689ef1',1,'stan::math::var::var(double x)'],['../classstan_1_1math_1_1var.html#a6a333a82fd608b913a239c03272b5b56',1,'stan::math::var::var(long double x)'],['../classstan_1_1math_1_1var.html#ada48c7523cc13f19ff07d14a412b1d2b',1,'stan::math::var::var(bool x)'],['../classstan_1_1math_1_1var.html#ac22e5b84ff8e7934036e7d4fa89c3f14',1,'stan::math::var::var(char x)'],['../classstan_1_1math_1_1var.html#a55ae61a2ae50220be00395aea1c51bfa',1,'stan::math::var::var(short x)'],['../classstan_1_1math_1_1var.html#a1c27d331050539ab689e8d0dae743e51',1,'stan::math::var::var(int x)'],['../classstan_1_1math_1_1var.html#a755001ff6e4f8500f90106b526a2d62b',1,'stan::math::var::var(long x)'],['../classstan_1_1math_1_1var.html#aa19a6ef61012fe9a611b86c5c5df0841',1,'stan::math::var::var(unsigned char x)'],['../classstan_1_1math_1_1var.html#ad8c38d414a8bccbb0761aea7a3d64612',1,'stan::math::var::var(unsigned short x)'],['../classstan_1_1math_1_1var.html#ae10b8ab6f35db859bc7b2831951944b4',1,'stan::math::var::var(unsigned int x)'],['../classstan_1_1math_1_1var.html#aba2a77edbec7e11956c29283f1e50fc0',1,'stan::math::var::var(unsigned long x)']]], + ['var_2ehpp',['var.hpp',['../var_8hpp.html',1,'']]], + ['var_5falloc_5fstack_5f',['var_alloc_stack_',['../structstan_1_1math_1_1_autodiff_stack_storage.html#a4e95a60d3e2d215f4f8020e6ce2f03d8',1,'stan::math::AutodiffStackStorage']]], + ['var_5fnochain_5fstack_5f',['var_nochain_stack_',['../structstan_1_1math_1_1_autodiff_stack_storage.html#ac281684e398a6a4cedcf7c4e75eeb2f1',1,'stan::math::AutodiffStackStorage']]], + ['var_5fstack_5f',['var_stack_',['../structstan_1_1math_1_1_autodiff_stack_storage.html#a3ee9208d01fab7f0d6b3d3fd6f186435',1,'stan::math::AutodiffStackStorage']]], + ['vari',['vari',['../classstan_1_1math_1_1vari.html#a2592847e55b538d33c224023f22f0a5c',1,'stan::math::vari::vari(const double x)'],['../classstan_1_1math_1_1vari.html#abe25e7905dc011cee38d7df47f6917f0',1,'stan::math::vari::vari(const double x, bool stacked)']]], + ['vari',['vari',['../classstan_1_1math_1_1vari.html',1,'stan::math']]], + ['vari_2ehpp',['vari.hpp',['../vari_8hpp.html',1,'']]], + ['variance',['variance',['../namespacestan_1_1math.html#aa433ac2fc47bbd40a6d87f62574dff85',1,'stan::math::variance(const std::vector< T > &v)'],['../namespacestan_1_1math.html#a1f055da8754c2215aac70d7787692f54',1,'stan::math::variance(const Eigen::Matrix< T, R, C > &m)'],['../namespacestan_1_1math.html#ac0400489c86a0f208ed17371ab97254f',1,'stan::math::variance(const std::vector< var > &v)'],['../namespacestan_1_1math.html#a4c5dc6176d49564ace17029793589421',1,'stan::math::variance(const Eigen::Matrix< var, R, C > &m)']]], + ['variance_2ehpp',['variance.hpp',['../rev_2mat_2fun_2variance_8hpp.html',1,'']]], + ['variance_2ehpp',['variance.hpp',['../prim_2mat_2fun_2variance_8hpp.html',1,'']]], + ['varirefa_5f',['variRefA_',['../classstan_1_1math_1_1cholesky__decompose__v__vari.html#acd3834b8b6dd6cfa3b799cac9e7739fc',1,'stan::math::cholesky_decompose_v_vari']]], + ['varirefl_5f',['variRefL_',['../classstan_1_1math_1_1cholesky__decompose__v__vari.html#a733ded3d060d5d780c73a05b6f1402df',1,'stan::math::cholesky_decompose_v_vari']]], + ['varis_5f',['varis_',['../classstan_1_1math_1_1precomputed__gradients__vari.html#aedb6cbfaa40f6882efda15856d4c7d0a',1,'stan::math::precomputed_gradients_vari']]], + ['vd_5fvari_2ehpp',['vd_vari.hpp',['../vd__vari_8hpp.html',1,'']]], + ['vdd_5fvari_2ehpp',['vdd_vari.hpp',['../vdd__vari_8hpp.html',1,'']]], + ['vdv_5fvari_2ehpp',['vdv_vari.hpp',['../vdv__vari_8hpp.html',1,'']]], + ['vector_5fd',['vector_d',['../namespacestan_1_1math.html#ac9e96c15b87fbd704ab9bcf77e7597db',1,'stan::math']]], + ['vector_5ffd',['vector_fd',['../namespacestan_1_1math.html#a961a316bf3b39b578ec6382096da3e9a',1,'stan::math']]], + ['vector_5fffd',['vector_ffd',['../namespacestan_1_1math.html#a846bbc633c1a4c67cd805bbf61f42be0',1,'stan::math']]], + ['vector_5fffv',['vector_ffv',['../namespacestan_1_1math.html#ab1d0aff99d591327d929ee87054978ce',1,'stan::math']]], + ['vector_5ffv',['vector_fv',['../namespacestan_1_1math.html#a5065cc81264dfe941f8e9a3ecfe5ee85',1,'stan::math']]], + ['vector_5fv',['vector_v',['../namespacestan_1_1math.html#aa7d3137027b10bc7758d4c1763b58a8e',1,'stan::math']]], + ['vector_5fvari_2ehpp',['vector_vari.hpp',['../vector__vari_8hpp.html',1,'']]], + ['vectorbuilder',['VectorBuilder',['../classstan_1_1_vector_builder.html#a259630f1a916b23c98b664e173892e79',1,'stan::VectorBuilder']]], + ['vectorbuilder',['VectorBuilder',['../classstan_1_1_vector_builder.html',1,'stan']]], + ['vectorbuilder_2ehpp',['VectorBuilder.hpp',['../_vector_builder_8hpp.html',1,'']]], + ['vectorbuilderhelper',['VectorBuilderHelper',['../classstan_1_1_vector_builder_helper.html#abf2194ad2beb0ec7851ad06e7785cded',1,'stan::VectorBuilderHelper::VectorBuilderHelper()'],['../classstan_1_1_vector_builder_helper_3_01_t1_00_01true_00_01false_01_4.html#a6dc945ef3e7661667f69bb82fc9df177',1,'stan::VectorBuilderHelper< T1, true, false >::VectorBuilderHelper()'],['../classstan_1_1_vector_builder_helper_3_01_t1_00_01true_00_01true_01_4.html#a41c70cddac8238f49b6afde03fe22102',1,'stan::VectorBuilderHelper< T1, true, true >::VectorBuilderHelper()']]], + ['vectorbuilderhelper',['VectorBuilderHelper',['../classstan_1_1_vector_builder_helper.html',1,'stan']]], + ['vectorbuilderhelper_3c_20t1_2c_20true_2c_20false_20_3e',['VectorBuilderHelper< T1, true, false >',['../classstan_1_1_vector_builder_helper_3_01_t1_00_01true_00_01false_01_4.html',1,'stan']]], + ['vectorbuilderhelper_3c_20t1_2c_20true_2c_20true_20_3e',['VectorBuilderHelper< T1, true, true >',['../classstan_1_1_vector_builder_helper_3_01_t1_00_01true_00_01true_01_4.html',1,'stan']]], + ['vectorbuilderhelper_3c_20t1_2c_20used_2c_20stan_3a_3acontains_5fvector_3c_20t2_2c_20t3_2c_20t4_2c_20t5_2c_20t6_2c_20t7_20_3e_3a_3avalue_20_3e',['VectorBuilderHelper< T1, used, stan::contains_vector< T2, T3, T4, T5, T6, T7 >::value >',['../classstan_1_1_vector_builder_helper.html',1,'stan']]], + ['vectord',['vectorD',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#afdec334e2365f43cdbe5a352cb353e2e',1,'stan::math::LDLT_factor< T, R, C >::vectorD()'],['../classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4.html#ac9188aad7bdd50d4031449e7df91f890',1,'stan::math::LDLT_factor< stan::math::var, R, C >::vectorD()']]], + ['vectorview',['VectorView',['../classstan_1_1_vector_view.html#a49530fcffe86b987cc16c9db07433a01',1,'stan::VectorView::VectorView(scalar_t &c)'],['../classstan_1_1_vector_view.html#aa8cf0eb6c25b3e6e7ab4164d3327cab3',1,'stan::VectorView::VectorView(std::vector< scalar_t > &v)'],['../classstan_1_1_vector_view.html#a1a2167039be334fe553432580f7ec4ee',1,'stan::VectorView::VectorView(Eigen::Matrix< scalar_t, R, C > &m)'],['../classstan_1_1_vector_view.html#ace98de1e8835b3317330d98fa34b981b',1,'stan::VectorView::VectorView(scalar_t *x)'],['../classstan_1_1_vector_view_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html#a144dc75865388d9e80c153d6651a9bab',1,'stan::VectorView< const T, is_array, throw_if_accessed >::VectorView(const scalar_t &c)'],['../classstan_1_1_vector_view_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html#a2e063aacbcb8999b921bce5d52557646',1,'stan::VectorView< const T, is_array, throw_if_accessed >::VectorView(const scalar_t *x)'],['../classstan_1_1_vector_view_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html#a8a70c613d18b72f45466591168f354dc',1,'stan::VectorView< const T, is_array, throw_if_accessed >::VectorView(const std::vector< scalar_t > &v)'],['../classstan_1_1_vector_view_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html#af337a1b8ede134a1debe59fbee1cd1e1',1,'stan::VectorView< const T, is_array, throw_if_accessed >::VectorView(const Eigen::Matrix< scalar_t, R, C > &m)'],['../classstan_1_1_vector_view_3_01const_01double_00_01false_00_01false_01_4.html#af57df094db378d9da317b93d23c34ab1',1,'stan::VectorView< const double, false, false >::VectorView()']]], + ['vectorview',['VectorView',['../classstan_1_1_vector_view.html',1,'stan']]], + ['vectorview_2ehpp',['VectorView.hpp',['../_vector_view_8hpp.html',1,'']]], + ['vectorview_3c_20const_20double_2c_20false_2c_20false_20_3e',['VectorView< const double, false, false >',['../classstan_1_1_vector_view_3_01const_01double_00_01false_00_01false_01_4.html',1,'stan']]], + ['vectorview_3c_20const_20t_2c_20is_5farray_2c_20throw_5fif_5faccessed_20_3e',['VectorView< const T, is_array, throw_if_accessed >',['../classstan_1_1_vector_view_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html',1,'stan']]], + ['vectorview_3c_20t_5fpartials_5freturn_2c_20stan_3a_3ais_5fvector_3c_20t1_20_3e_3a_3avalue_2c_20stan_3a_3ais_5fconstant_5fstruct_3c_20t1_20_3e_3a_3avalue_20_3e',['VectorView< T_partials_return, stan::is_vector< T1 >::value, stan::is_constant_struct< T1 >::value >',['../classstan_1_1_vector_view.html',1,'stan']]], + ['vectorview_3c_20t_5fpartials_5freturn_2c_20stan_3a_3ais_5fvector_3c_20t2_20_3e_3a_3avalue_2c_20stan_3a_3ais_5fconstant_5fstruct_3c_20t2_20_3e_3a_3avalue_20_3e',['VectorView< T_partials_return, stan::is_vector< T2 >::value, stan::is_constant_struct< T2 >::value >',['../classstan_1_1_vector_view.html',1,'stan']]], + ['vectorview_3c_20t_5fpartials_5freturn_2c_20stan_3a_3ais_5fvector_3c_20t3_20_3e_3a_3avalue_2c_20stan_3a_3ais_5fconstant_5fstruct_3c_20t3_20_3e_3a_3avalue_20_3e',['VectorView< T_partials_return, stan::is_vector< T3 >::value, stan::is_constant_struct< T3 >::value >',['../classstan_1_1_vector_view.html',1,'stan']]], + ['vectorview_3c_20t_5fpartials_5freturn_2c_20stan_3a_3ais_5fvector_3c_20t4_20_3e_3a_3avalue_2c_20stan_3a_3ais_5fconstant_5fstruct_3c_20t4_20_3e_3a_3avalue_20_3e',['VectorView< T_partials_return, stan::is_vector< T4 >::value, stan::is_constant_struct< T4 >::value >',['../classstan_1_1_vector_view.html',1,'stan']]], + ['vectorview_3c_20t_5fpartials_5freturn_2c_20stan_3a_3ais_5fvector_3c_20t5_20_3e_3a_3avalue_2c_20stan_3a_3ais_5fconstant_5fstruct_3c_20t5_20_3e_3a_3avalue_20_3e',['VectorView< T_partials_return, stan::is_vector< T5 >::value, stan::is_constant_struct< T5 >::value >',['../classstan_1_1_vector_view.html',1,'stan']]], + ['vectorview_3c_20t_5fpartials_5freturn_2c_20stan_3a_3ais_5fvector_3c_20t6_20_3e_3a_3avalue_2c_20stan_3a_3ais_5fconstant_5fstruct_3c_20t6_20_3e_3a_3avalue_20_3e',['VectorView< T_partials_return, stan::is_vector< T6 >::value, stan::is_constant_struct< T6 >::value >',['../classstan_1_1_vector_view.html',1,'stan']]], + ['vectorviewmvt',['VectorViewMvt',['../classstan_1_1_vector_view_mvt.html#a63f250342668fab3df0e18e467a2ae15',1,'stan::VectorViewMvt::VectorViewMvt(matrix_t &m)'],['../classstan_1_1_vector_view_mvt.html#a7e8d6dd9b7067dbf02b7b973806335c0',1,'stan::VectorViewMvt::VectorViewMvt(std::vector< matrix_t > &vm)'],['../classstan_1_1_vector_view_mvt_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html#a5faf023847a5654c294db465351b13d8',1,'stan::VectorViewMvt< const T, is_array, throw_if_accessed >::VectorViewMvt(const matrix_t &m)'],['../classstan_1_1_vector_view_mvt_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html#abf41d99f5c66c8675c68ad2b61ebcc6c',1,'stan::VectorViewMvt< const T, is_array, throw_if_accessed >::VectorViewMvt(const std::vector< matrix_t > &vm)']]], + ['vectorviewmvt',['VectorViewMvt',['../classstan_1_1_vector_view_mvt.html',1,'stan']]], + ['vectorviewmvt_2ehpp',['VectorViewMvt.hpp',['../_vector_view_mvt_8hpp.html',1,'']]], + ['vectorviewmvt_3c_20const_20t_2c_20is_5farray_2c_20throw_5fif_5faccessed_20_3e',['VectorViewMvt< const T, is_array, throw_if_accessed >',['../classstan_1_1_vector_view_mvt_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html',1,'stan']]], + ['version_2ehpp',['version.hpp',['../version_8hpp.html',1,'']]], + ['vi_5f',['vi_',['../classstan_1_1math_1_1var.html#a179b1c61bcd82f0e6c1d109c07ae8e40',1,'stan::math::var']]], + ['vis_5f',['vis_',['../classstan_1_1math_1_1op__matrix__vari.html#a81caaf77e84614aada7a27f0984db8cc',1,'stan::math::op_matrix_vari::vis_()'],['../classstan_1_1math_1_1op__vector__vari.html#aa492abe0afa7a4a030bdeed4a8d36f3f',1,'stan::math::op_vector_vari::vis_()']]], + ['von_5fmises_5flog',['von_mises_log',['../namespacestan_1_1math.html#a3e7a36cd810a693a04ef145882894754',1,'stan::math::von_mises_log(T_y const &y, T_loc const &mu, T_scale const &kappa)'],['../namespacestan_1_1math.html#a8a06353ba5a996ebfc43ec69decf9fb9',1,'stan::math::von_mises_log(T_y const &y, T_loc const &mu, T_scale const &kappa)']]], + ['von_5fmises_5flog_2ehpp',['von_mises_log.hpp',['../von__mises__log_8hpp.html',1,'']]], + ['von_5fmises_5frng',['von_mises_rng',['../namespacestan_1_1math.html#a71998db3e6cfebf31463452f99878b99',1,'stan::math']]], + ['von_5fmises_5frng_2ehpp',['von_mises_rng.hpp',['../von__mises__rng_8hpp.html',1,'']]], + ['vv_5fvari_2ehpp',['vv_vari.hpp',['../vv__vari_8hpp.html',1,'']]], + ['vvd_5fvari_2ehpp',['vvd_vari.hpp',['../vvd__vari_8hpp.html',1,'']]], + ['vvv_5fvari_2ehpp',['vvv_vari.hpp',['../vvv__vari_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/all_16.html b/doc/api/html/search/all_16.html new file mode 100644 index 00000000000..b4e3666ffb8 --- /dev/null +++ b/doc/api/html/search/all_16.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/all_16.js b/doc/api/html/search/all_16.js new file mode 100644 index 00000000000..59e80ad3cbf --- /dev/null +++ b/doc/api/html/search/all_16.js @@ -0,0 +1,25 @@ +var searchData= +[ + ['weibull_5fccdf_5flog',['weibull_ccdf_log',['../namespacestan_1_1math.html#aa0033ce06f5f7b1109a42eee2579955a',1,'stan::math']]], + ['weibull_5fccdf_5flog_2ehpp',['weibull_ccdf_log.hpp',['../weibull__ccdf__log_8hpp.html',1,'']]], + ['weibull_5fcdf',['weibull_cdf',['../namespacestan_1_1math.html#ae943a8f5c87e946a45a4f3b62f99b187',1,'stan::math']]], + ['weibull_5fcdf_2ehpp',['weibull_cdf.hpp',['../weibull__cdf_8hpp.html',1,'']]], + ['weibull_5fcdf_5flog',['weibull_cdf_log',['../namespacestan_1_1math.html#ae94334459868c125f2a6504b69f46158',1,'stan::math']]], + ['weibull_5fcdf_5flog_2ehpp',['weibull_cdf_log.hpp',['../weibull__cdf__log_8hpp.html',1,'']]], + ['weibull_5flog',['weibull_log',['../namespacestan_1_1math.html#a4f3a52747636627895374aa555279a92',1,'stan::math::weibull_log(const T_y &y, const T_shape &alpha, const T_scale &sigma)'],['../namespacestan_1_1math.html#a76561164f1ff9ed6e70bf4a75e6f8ae2',1,'stan::math::weibull_log(const T_y &y, const T_shape &alpha, const T_scale &sigma)']]], + ['weibull_5flog_2ehpp',['weibull_log.hpp',['../weibull__log_8hpp.html',1,'']]], + ['weibull_5frng',['weibull_rng',['../namespacestan_1_1math.html#afd376b3fe82077f0565de1fbef6b4202',1,'stan::math']]], + ['weibull_5frng_2ehpp',['weibull_rng.hpp',['../weibull__rng_8hpp.html',1,'']]], + ['welford_5fcovar_5festimator',['welford_covar_estimator',['../classstan_1_1math_1_1welford__covar__estimator.html#a91b414e3472b5a9d83be8caca053b933',1,'stan::math::welford_covar_estimator']]], + ['welford_5fcovar_5festimator',['welford_covar_estimator',['../classstan_1_1math_1_1welford__covar__estimator.html',1,'stan::math']]], + ['welford_5fcovar_5festimator_2ehpp',['welford_covar_estimator.hpp',['../welford__covar__estimator_8hpp.html',1,'']]], + ['welford_5fvar_5festimator',['welford_var_estimator',['../classstan_1_1math_1_1welford__var__estimator.html',1,'stan::math']]], + ['welford_5fvar_5festimator',['welford_var_estimator',['../classstan_1_1math_1_1welford__var__estimator.html#a6fbed26e157b497f90f22d6a4fa08f50',1,'stan::math::welford_var_estimator']]], + ['welford_5fvar_5festimator_2ehpp',['welford_var_estimator.hpp',['../welford__var__estimator_8hpp.html',1,'']]], + ['wiener_5flog',['wiener_log',['../namespacestan_1_1math.html#ae7a28135e8fe64782357d52062380796',1,'stan::math::wiener_log(const T_y &y, const T_alpha &alpha, const T_tau &tau, const T_beta &beta, const T_delta &delta)'],['../namespacestan_1_1math.html#a51ee0070ef7fdeac83b11eae40b1646a',1,'stan::math::wiener_log(const T_y &y, const T_alpha &alpha, const T_tau &tau, const T_beta &beta, const T_delta &delta)']]], + ['wiener_5flog_2ehpp',['wiener_log.hpp',['../wiener__log_8hpp.html',1,'']]], + ['wishart_5flog',['wishart_log',['../namespacestan_1_1math.html#a91db893054b635d18034d06c161365a1',1,'stan::math::wishart_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &W, const T_dof &nu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &S)'],['../namespacestan_1_1math.html#a951a06ccbb12ca44a08544000372dbf1',1,'stan::math::wishart_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &W, const T_dof &nu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &S)']]], + ['wishart_5flog_2ehpp',['wishart_log.hpp',['../wishart__log_8hpp.html',1,'']]], + ['wishart_5frng',['wishart_rng',['../namespacestan_1_1math.html#a7025b4916694aa80aa0d758a11647b5d',1,'stan::math']]], + ['wishart_5frng_2ehpp',['wishart_rng.hpp',['../wishart__rng_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/all_17.html b/doc/api/html/search/all_17.html new file mode 100644 index 00000000000..6dcb33cf180 --- /dev/null +++ b/doc/api/html/search/all_17.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/all_17.js b/doc/api/html/search/all_17.js new file mode 100644 index 00000000000..7bf82956716 --- /dev/null +++ b/doc/api/html/search/all_17.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['x_5f',['x_',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html#ab317a711e2954c234d5b9ad990acc65d',1,'stan::math::coupled_ode_system< F, double, double >::x_()'],['../structstan_1_1math_1_1array__builder.html#aeeffff75de3c356257e419fc8591afcb',1,'stan::math::array_builder::x_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#ad7ffb5050618453920b1d961b2bc6b58',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::x_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#af3c0dd60d8c28b3beb59f62d91b7c751',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::x_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#aab54fc7a8d0427f32fccc3dcf16fa616',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::x_()']]], + ['x_5fint_5f',['x_int_',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html#a97205cf51b0d9ef15c2698a93b44ec52',1,'stan::math::coupled_ode_system< F, double, double >::x_int_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#aa69a8f9f7d6ecd19c32082fc8981dd2d',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::x_int_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#ada8b248f756fe67a56635aeedd546386',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::x_int_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#a0330e9773cc8d53aa0c0696e5ce731dd',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::x_int_()']]], + ['xs_5f',['xs_',['../sort__indices_8hpp.html#ab9a7299348cbbbadbd23194af720d6e9',1,'sort_indices.hpp']]] +]; diff --git a/doc/api/html/search/all_18.html b/doc/api/html/search/all_18.html new file mode 100644 index 00000000000..f83cb811442 --- /dev/null +++ b/doc/api/html/search/all_18.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/all_18.js b/doc/api/html/search/all_18.js new file mode 100644 index 00000000000..402e68a2262 --- /dev/null +++ b/doc/api/html/search/all_18.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['y0_5f',['y0_',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#aa7ccd9be4ab9be8769513a3deef42c6c',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::y0_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#ae3694159ee6e355b556004bfbc850411',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::y0_()']]], + ['y0_5fdbl_5f',['y0_dbl_',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html#a05858eac16fa32b40205ee4531fdd159',1,'stan::math::coupled_ode_system< F, double, double >::y0_dbl_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#ac10d0e5efa43f212517bfbec68a92027',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::y0_dbl_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#a727d49ad4fc2fdede1cce76919940f8d',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::y0_dbl_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#a6774f7c0364f4787224bcb2bdab839f9',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::y0_dbl_()']]], + ['y_5fcoupled_5f',['y_coupled_',['../structstan_1_1math_1_1coupled__ode__observer.html#ad213dbe6a4b23d20955a4fdfc94d3308',1,'stan::math::coupled_ode_observer']]] +]; diff --git a/doc/api/html/search/all_19.html b/doc/api/html/search/all_19.html new file mode 100644 index 00000000000..7e393a1c72a --- /dev/null +++ b/doc/api/html/search/all_19.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/all_19.js b/doc/api/html/search/all_19.js new file mode 100644 index 00000000000..3d03b3d696f --- /dev/null +++ b/doc/api/html/search/all_19.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['_7eaccumulator',['~accumulator',['../classstan_1_1math_1_1accumulator.html#a298d4088fbfdfca98d2c8e36a5ea4f1c',1,'stan::math::accumulator']]], + ['_7echainable',['~chainable',['../classstan_1_1math_1_1chainable.html#ad496bfaf684b78e944fa28c178e5ac83',1,'stan::math::chainable']]], + ['_7echainable_5falloc',['~chainable_alloc',['../classstan_1_1math_1_1chainable__alloc.html#aaca3bd4f138cfd11f43e984c241463ce',1,'stan::math::chainable_alloc']]], + ['_7egevv_5fvvv_5fvari',['~gevv_vvv_vari',['../classstan_1_1math_1_1gevv__vvv__vari.html#a1d061a4dc39e882750c673965e0d7be5',1,'stan::math::gevv_vvv_vari']]], + ['_7estack_5falloc',['~stack_alloc',['../classstan_1_1math_1_1stack__alloc.html#a946367b4b88dd893103db604c5f23669',1,'stan::math::stack_alloc']]], + ['_7evari',['~vari',['../classstan_1_1math_1_1vari.html#a14e0658a14d11a99e69f6d16f119bbf8',1,'stan::math::vari']]] +]; diff --git a/doc/api/html/search/all_2.html b/doc/api/html/search/all_2.html new file mode 100644 index 00000000000..95ded1222d9 --- /dev/null +++ b/doc/api/html/search/all_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/all_2.js b/doc/api/html/search/all_2.js new file mode 100644 index 00000000000..a46ccb360cb --- /dev/null +++ b/doc/api/html/search/all_2.js @@ -0,0 +1,78 @@ +var searchData= +[ + ['b_5f',['B_',['../rev_2mat_2fun_2quad__form_8hpp.html#a0fd42d63db84319b9384dce7676a9cc7',1,'B_(): quad_form.hpp'],['../rev_2mat_2fun_2trace__gen__quad__form_8hpp.html#a0fd42d63db84319b9384dce7676a9cc7',1,'B_(): trace_gen_quad_form.hpp'],['../rev_2mat_2fun_2trace__quad__form_8hpp.html#a0fd42d63db84319b9384dce7676a9cc7',1,'B_(): trace_quad_form.hpp']]], + ['bd_5f',['bd_',['../classstan_1_1math_1_1op__ddv__vari.html#ae1d70829103888d1008c8910e4cbff2c',1,'stan::math::op_ddv_vari::bd_()'],['../classstan_1_1math_1_1op__vd__vari.html#ae1eaf8ba4cdb63d1f66c4fc2849788fc',1,'stan::math::op_vd_vari::bd_()'],['../classstan_1_1math_1_1op__vdd__vari.html#aa5107d1c0d8c46a91eac4d6621b963c7',1,'stan::math::op_vdd_vari::bd_()'],['../classstan_1_1math_1_1op__vdv__vari.html#a8a8d9b43a909c0246d171d6dc65c8379',1,'stan::math::op_vdv_vari::bd_()']]], + ['bernoulli_5fccdf_5flog',['bernoulli_ccdf_log',['../namespacestan_1_1math.html#a9d8811804a3bb9a9cd943422ce3938db',1,'stan::math']]], + ['bernoulli_5fccdf_5flog_2ehpp',['bernoulli_ccdf_log.hpp',['../bernoulli__ccdf__log_8hpp.html',1,'']]], + ['bernoulli_5fcdf',['bernoulli_cdf',['../namespacestan_1_1math.html#a0b80aeaa1cc10d315d915aba2ddc6180',1,'stan::math']]], + ['bernoulli_5fcdf_2ehpp',['bernoulli_cdf.hpp',['../bernoulli__cdf_8hpp.html',1,'']]], + ['bernoulli_5fcdf_5flog',['bernoulli_cdf_log',['../namespacestan_1_1math.html#ac569e9e067f4d61280974e9a54ac6476',1,'stan::math']]], + ['bernoulli_5fcdf_5flog_2ehpp',['bernoulli_cdf_log.hpp',['../bernoulli__cdf__log_8hpp.html',1,'']]], + ['bernoulli_5flog',['bernoulli_log',['../namespacestan_1_1math.html#a3e360bb277db7a3318c1c368dbccdda8',1,'stan::math::bernoulli_log(const T_n &n, const T_prob &theta)'],['../namespacestan_1_1math.html#a075f08b1d99b150b64d851139be35894',1,'stan::math::bernoulli_log(const T_y &n, const T_prob &theta)']]], + ['bernoulli_5flog_2ehpp',['bernoulli_log.hpp',['../bernoulli__log_8hpp.html',1,'']]], + ['bernoulli_5flogit_5flog',['bernoulli_logit_log',['../namespacestan_1_1math.html#aa9048a0a4bd452c7e797cb5a496b0b97',1,'stan::math::bernoulli_logit_log(const T_n &n, const T_prob &theta)'],['../namespacestan_1_1math.html#a193781437c0aa1a48fe48b24d9ae8130',1,'stan::math::bernoulli_logit_log(const T_n &n, const T_prob &theta)']]], + ['bernoulli_5flogit_5flog_2ehpp',['bernoulli_logit_log.hpp',['../bernoulli__logit__log_8hpp.html',1,'']]], + ['bernoulli_5frng',['bernoulli_rng',['../namespacestan_1_1math.html#ac46d3934578fb7346a900677a3e8c377',1,'stan::math']]], + ['bernoulli_5frng_2ehpp',['bernoulli_rng.hpp',['../bernoulli__rng_8hpp.html',1,'']]], + ['bessel_5ffirst_5fkind',['bessel_first_kind',['../namespacestan_1_1math.html#a0f08e25e46df323a2429edc45d1c8954',1,'stan::math::bessel_first_kind(int v, const fvar< T > &z)'],['../namespacestan_1_1math.html#aebfb3835848bd8550192cd5e090d3b5a',1,'stan::math::bessel_first_kind(const int v, const T2 z)'],['../namespacestan_1_1math.html#a367822396d06842610b32ec1d1010944',1,'stan::math::bessel_first_kind(const int &v, const var &a)']]], + ['bessel_5ffirst_5fkind_2ehpp',['bessel_first_kind.hpp',['../fwd_2scal_2fun_2bessel__first__kind_8hpp.html',1,'']]], + ['bessel_5ffirst_5fkind_2ehpp',['bessel_first_kind.hpp',['../rev_2scal_2fun_2bessel__first__kind_8hpp.html',1,'']]], + ['bessel_5ffirst_5fkind_2ehpp',['bessel_first_kind.hpp',['../prim_2scal_2fun_2bessel__first__kind_8hpp.html',1,'']]], + ['bessel_5fsecond_5fkind',['bessel_second_kind',['../namespacestan_1_1math.html#ab0b227eac2dd4cbc55462ecebe940294',1,'stan::math::bessel_second_kind(int v, const fvar< T > &z)'],['../namespacestan_1_1math.html#a645ce13c6454913ec39be807751604dc',1,'stan::math::bessel_second_kind(const int v, const T2 z)'],['../namespacestan_1_1math.html#a7bff905107813b205e8cf81ace301ef9',1,'stan::math::bessel_second_kind(const int &v, const var &a)']]], + ['bessel_5fsecond_5fkind_2ehpp',['bessel_second_kind.hpp',['../fwd_2scal_2fun_2bessel__second__kind_8hpp.html',1,'']]], + ['bessel_5fsecond_5fkind_2ehpp',['bessel_second_kind.hpp',['../prim_2scal_2fun_2bessel__second__kind_8hpp.html',1,'']]], + ['bessel_5fsecond_5fkind_2ehpp',['bessel_second_kind.hpp',['../rev_2scal_2fun_2bessel__second__kind_8hpp.html',1,'']]], + ['beta_5fbinomial_5fccdf_5flog',['beta_binomial_ccdf_log',['../namespacestan_1_1math.html#ab380fecf1c6c99b602f212cbccc28a83',1,'stan::math']]], + ['beta_5fbinomial_5fccdf_5flog_2ehpp',['beta_binomial_ccdf_log.hpp',['../beta__binomial__ccdf__log_8hpp.html',1,'']]], + ['beta_5fbinomial_5fcdf',['beta_binomial_cdf',['../namespacestan_1_1math.html#a6abc35510e01a52b5138a19bfedb2a3e',1,'stan::math']]], + ['beta_5fbinomial_5fcdf_2ehpp',['beta_binomial_cdf.hpp',['../beta__binomial__cdf_8hpp.html',1,'']]], + ['beta_5fbinomial_5fcdf_5flog',['beta_binomial_cdf_log',['../namespacestan_1_1math.html#adf2c63ba04c87c46bcb0db999d955e9b',1,'stan::math']]], + ['beta_5fbinomial_5fcdf_5flog_2ehpp',['beta_binomial_cdf_log.hpp',['../beta__binomial__cdf__log_8hpp.html',1,'']]], + ['beta_5fbinomial_5flog',['beta_binomial_log',['../namespacestan_1_1math.html#a5c2462b112bf6512c4db7c6abea6478c',1,'stan::math::beta_binomial_log(const T_n &n, const T_N &N, const T_size1 &alpha, const T_size2 &beta)'],['../namespacestan_1_1math.html#a48a71d6f54236310fba1a94b445272f3',1,'stan::math::beta_binomial_log(const T_n &n, const T_N &N, const T_size1 &alpha, const T_size2 &beta)']]], + ['beta_5fbinomial_5flog_2ehpp',['beta_binomial_log.hpp',['../beta__binomial__log_8hpp.html',1,'']]], + ['beta_5fbinomial_5frng',['beta_binomial_rng',['../namespacestan_1_1math.html#ac0443ac7dbd959b40b1a958767857f5e',1,'stan::math']]], + ['beta_5fbinomial_5frng_2ehpp',['beta_binomial_rng.hpp',['../beta__binomial__rng_8hpp.html',1,'']]], + ['beta_5fccdf_5flog',['beta_ccdf_log',['../namespacestan_1_1math.html#a625d31cf8da1c8cd2ea99af113ed6fe6',1,'stan::math']]], + ['beta_5fccdf_5flog_2ehpp',['beta_ccdf_log.hpp',['../beta__ccdf__log_8hpp.html',1,'']]], + ['beta_5fcdf',['beta_cdf',['../namespacestan_1_1math.html#a84beaaff122d602406a515a9dd97bb90',1,'stan::math']]], + ['beta_5fcdf_2ehpp',['beta_cdf.hpp',['../beta__cdf_8hpp.html',1,'']]], + ['beta_5fcdf_5flog',['beta_cdf_log',['../namespacestan_1_1math.html#afa87400b4ecd4bba0d10158cad4f3a8b',1,'stan::math']]], + ['beta_5fcdf_5flog_2ehpp',['beta_cdf_log.hpp',['../beta__cdf__log_8hpp.html',1,'']]], + ['beta_5flog',['beta_log',['../namespacestan_1_1math.html#a0246a55c1c14d2c7ec35a0070af63299',1,'stan::math::beta_log(const T_y &y, const T_scale_succ &alpha, const T_scale_fail &beta)'],['../namespacestan_1_1math.html#a7e5818c82697944b91b483674b14ad22',1,'stan::math::beta_log(const T_y &y, const T_scale_succ &alpha, const T_scale_fail &beta)']]], + ['beta_5flog_2ehpp',['beta_log.hpp',['../beta__log_8hpp.html',1,'']]], + ['beta_5frng',['beta_rng',['../namespacestan_1_1math.html#a7fa2015614535f45c2cb6d5f544643d0',1,'stan::math']]], + ['beta_5frng_2ehpp',['beta_rng.hpp',['../beta__rng_8hpp.html',1,'']]], + ['binary_5flog_5floss',['binary_log_loss',['../namespacestan_1_1math.html#ae0d069b5730083b0203812d63c6f62f3',1,'stan::math::binary_log_loss(const int y, const fvar< T > &y_hat)'],['../namespacestan_1_1math.html#add2a043f562537b8cc57bb35780ac5b5',1,'stan::math::binary_log_loss(const int y, const T y_hat)'],['../namespacestan_1_1math.html#a87b93caccb44639dea5c47f78fe6be28',1,'stan::math::binary_log_loss(const int y, const stan::math::var &y_hat)']]], + ['binary_5flog_5floss_2ehpp',['binary_log_loss.hpp',['../fwd_2scal_2fun_2binary__log__loss_8hpp.html',1,'']]], + ['binary_5flog_5floss_2ehpp',['binary_log_loss.hpp',['../prim_2scal_2fun_2binary__log__loss_8hpp.html',1,'']]], + ['binary_5flog_5floss_2ehpp',['binary_log_loss.hpp',['../rev_2scal_2fun_2binary__log__loss_8hpp.html',1,'']]], + ['binomial_5fccdf_5flog',['binomial_ccdf_log',['../namespacestan_1_1math.html#a92586706a7afc2c968e0c11a9a021f8a',1,'stan::math']]], + ['binomial_5fccdf_5flog_2ehpp',['binomial_ccdf_log.hpp',['../binomial__ccdf__log_8hpp.html',1,'']]], + ['binomial_5fcdf',['binomial_cdf',['../namespacestan_1_1math.html#a25ca53e4f20460de16af84337acba3f0',1,'stan::math']]], + ['binomial_5fcdf_2ehpp',['binomial_cdf.hpp',['../binomial__cdf_8hpp.html',1,'']]], + ['binomial_5fcdf_5flog',['binomial_cdf_log',['../namespacestan_1_1math.html#a96b0617f8ad60887c84b0cd91ebe202e',1,'stan::math']]], + ['binomial_5fcdf_5flog_2ehpp',['binomial_cdf_log.hpp',['../binomial__cdf__log_8hpp.html',1,'']]], + ['binomial_5fcoefficient_5flog',['binomial_coefficient_log',['../namespacestan_1_1math.html#ab3ae920ef2089bb1686eb51c3dc153b4',1,'stan::math::binomial_coefficient_log(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a113b2443c22c0859cc797b7c1bdea59f',1,'stan::math::binomial_coefficient_log(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#a6d6816ab0a50a160820063ffe087a826',1,'stan::math::binomial_coefficient_log(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a27dad23d38c6d5e74c65e7571c70272e',1,'stan::math::binomial_coefficient_log(const T_N N, const T_n n)']]], + ['binomial_5fcoefficient_5flog_2ehpp',['binomial_coefficient_log.hpp',['../fwd_2scal_2fun_2binomial__coefficient__log_8hpp.html',1,'']]], + ['binomial_5fcoefficient_5flog_2ehpp',['binomial_coefficient_log.hpp',['../prim_2scal_2fun_2binomial__coefficient__log_8hpp.html',1,'']]], + ['binomial_5flog',['binomial_log',['../namespacestan_1_1math.html#a9de035dd17c118b3144a9ed9c867378f',1,'stan::math::binomial_log(const T_n &n, const T_N &N, const T_prob &theta)'],['../namespacestan_1_1math.html#a8b3409628d97b7ff020f2c0c694d8d40',1,'stan::math::binomial_log(const T_n &n, const T_N &N, const T_prob &theta)']]], + ['binomial_5flog_2ehpp',['binomial_log.hpp',['../binomial__log_8hpp.html',1,'']]], + ['binomial_5flogit_5flog',['binomial_logit_log',['../namespacestan_1_1math.html#a8f5a9e223a39b11f58fe044dcb2bc7ca',1,'stan::math::binomial_logit_log(const T_n &n, const T_N &N, const T_prob &alpha)'],['../namespacestan_1_1math.html#a5378254419361dd7a0bfacf139b49401',1,'stan::math::binomial_logit_log(const T_n &n, const T_N &N, const T_prob &alpha)']]], + ['binomial_5flogit_5flog_2ehpp',['binomial_logit_log.hpp',['../binomial__logit__log_8hpp.html',1,'']]], + ['binomial_5frng',['binomial_rng',['../namespacestan_1_1math.html#aa41d355d768c2258bf999bc765382f27',1,'stan::math']]], + ['binomial_5frng_2ehpp',['binomial_rng.hpp',['../binomial__rng_8hpp.html',1,'']]], + ['block',['block',['../namespacestan_1_1math.html#a69be3cf865daa6eca4a859f97ffaa8f7',1,'stan::math']]], + ['block_2ehpp',['block.hpp',['../block_8hpp.html',1,'']]], + ['boost',['boost',['../namespaceboost.html',1,'']]], + ['boost_2edox',['boost.dox',['../boost_8dox.html',1,'']]], + ['boost_5ffpclassify_2ehpp',['boost_fpclassify.hpp',['../boost__fpclassify_8hpp.html',1,'']]], + ['boost_5fisfinite_2ehpp',['boost_isfinite.hpp',['../boost__isfinite_8hpp.html',1,'']]], + ['boost_5fisinf_2ehpp',['boost_isinf.hpp',['../boost__isinf_8hpp.html',1,'']]], + ['boost_5fisnan_2ehpp',['boost_isnan.hpp',['../boost__isnan_8hpp.html',1,'']]], + ['boost_5fisnormal_2ehpp',['boost_isnormal.hpp',['../boost__isnormal_8hpp.html',1,'']]], + ['bounded',['bounded',['../structstan_1_1math_1_1detail_1_1bounded.html',1,'stan::math::detail']]], + ['bounded_3c_20t_5fy_2c_20t_5flow_2c_20t_5fhigh_2c_20true_20_3e',['bounded< T_y, T_low, T_high, true >',['../structstan_1_1math_1_1detail_1_1bounded_3_01_t__y_00_01_t__low_00_01_t__high_00_01true_01_4.html',1,'stan::math::detail']]], + ['bvi_5f',['bvi_',['../classstan_1_1math_1_1op__dv__vari.html#a2442bb729d0afe617b6c24accae7d10b',1,'stan::math::op_dv_vari::bvi_()'],['../classstan_1_1math_1_1op__dvd__vari.html#a57237dc3d1b1c0288fdbad9793ac63c7',1,'stan::math::op_dvd_vari::bvi_()'],['../classstan_1_1math_1_1op__dvv__vari.html#a16a4bbb74c4dfc664ab8b208352f6a91',1,'stan::math::op_dvv_vari::bvi_()'],['../classstan_1_1math_1_1op__vv__vari.html#abe4e66ae889c118cb8ca89fcc6f6e216',1,'stan::math::op_vv_vari::bvi_()'],['../classstan_1_1math_1_1op__vvd__vari.html#a0a708211e17a4967f8b32594fda9b33a',1,'stan::math::op_vvd_vari::bvi_()'],['../classstan_1_1math_1_1op__vvv__vari.html#ac8e9a82361ea5fcf0a51f088d29be90e',1,'stan::math::op_vvv_vari::bvi_()']]], + ['bytes_5fallocated',['bytes_allocated',['../classstan_1_1math_1_1stack__alloc.html#ac72fe7b15ca3086766445e2672e0b504',1,'stan::math::stack_alloc']]], + ['math',['math',['../namespaceboost_1_1math.html',1,'boost']]] +]; diff --git a/doc/api/html/search/all_3.html b/doc/api/html/search/all_3.html new file mode 100644 index 00000000000..4d312d03ddc --- /dev/null +++ b/doc/api/html/search/all_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/all_3.js b/doc/api/html/search/all_3.js new file mode 100644 index 00000000000..bc00622de67 --- /dev/null +++ b/doc/api/html/search/all_3.js @@ -0,0 +1,234 @@ +var searchData= +[ + ['c_5f',['C_',['../rev_2mat_2fun_2mdivide__left_8hpp.html#a03e9f8989e0f5a0117b426e2b204933a',1,'C_(): mdivide_left.hpp'],['../rev_2mat_2fun_2mdivide__left__ldlt_8hpp.html#a43b33b1b4279ce27f514eaed1daece58',1,'C_(): mdivide_left_ldlt.hpp'],['../rev_2mat_2fun_2mdivide__left__spd_8hpp.html#a43b33b1b4279ce27f514eaed1daece58',1,'C_(): mdivide_left_spd.hpp'],['../rev_2mat_2fun_2mdivide__left__tri_8hpp.html#a03e9f8989e0f5a0117b426e2b204933a',1,'C_(): mdivide_left_tri.hpp'],['../rev_2mat_2fun_2quad__form_8hpp.html#a2d9d9bf5df5103a65354498227122b4a',1,'C_(): quad_form.hpp'],['../rev_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp.html#ae7e589df75920eb51a2317e6a38db106',1,'C_(): trace_inv_quad_form_ldlt.hpp']]], + ['calculate_5fchain',['calculate_chain',['../namespacestan_1_1math.html#ab9b0e3e51b5cc7ab1da287369ff754d7',1,'stan::math']]], + ['calculate_5fchain_2ehpp',['calculate_chain.hpp',['../calculate__chain_8hpp.html',1,'']]], + ['categorical_5flog',['categorical_log',['../namespacestan_1_1math.html#a583ce356e75d8d7be0126bb00c401afa',1,'stan::math::categorical_log(int n, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)'],['../namespacestan_1_1math.html#a41e12bdd3e7ba1450f8b44ea5a59b0dd',1,'stan::math::categorical_log(const typename math::index_type< Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > >::type n, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)'],['../namespacestan_1_1math.html#a089e388c974ca67ecc06e9c67f75067f',1,'stan::math::categorical_log(const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)'],['../namespacestan_1_1math.html#aabce8d1a6154b04d2689f604b2e2373b',1,'stan::math::categorical_log(const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)']]], + ['categorical_5flog_2ehpp',['categorical_log.hpp',['../categorical__log_8hpp.html',1,'']]], + ['categorical_5flogit_5flog',['categorical_logit_log',['../namespacestan_1_1math.html#a35594af0b1635f8bc2817ca8a2c767f2',1,'stan::math::categorical_logit_log(int n, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &beta)'],['../namespacestan_1_1math.html#aea64526bd00e285844c6eb1246ccf431',1,'stan::math::categorical_logit_log(int n, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &beta)'],['../namespacestan_1_1math.html#ac06f8075869ffd32c8a0385e57bc2170',1,'stan::math::categorical_logit_log(const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &beta)'],['../namespacestan_1_1math.html#ac35ff747de556a8f351efda0e986a832',1,'stan::math::categorical_logit_log(const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &beta)']]], + ['categorical_5flogit_5flog_2ehpp',['categorical_logit_log.hpp',['../categorical__logit__log_8hpp.html',1,'']]], + ['categorical_5frng',['categorical_rng',['../namespacestan_1_1math.html#a1f8b55cdaa59f3fe7718d5b45889cda6',1,'stan::math']]], + ['categorical_5frng_2ehpp',['categorical_rng.hpp',['../categorical__rng_8hpp.html',1,'']]], + ['cauchy_5fccdf_5flog',['cauchy_ccdf_log',['../namespacestan_1_1math.html#aa932af729313abe32571d8a3742385ed',1,'stan::math']]], + ['cauchy_5fccdf_5flog_2ehpp',['cauchy_ccdf_log.hpp',['../cauchy__ccdf__log_8hpp.html',1,'']]], + ['cauchy_5fcdf',['cauchy_cdf',['../namespacestan_1_1math.html#ab7ecad949e8b175b4b60f6f5cb16319b',1,'stan::math']]], + ['cauchy_5fcdf_2ehpp',['cauchy_cdf.hpp',['../cauchy__cdf_8hpp.html',1,'']]], + ['cauchy_5fcdf_5flog',['cauchy_cdf_log',['../namespacestan_1_1math.html#a689566206e25e90e590c2655d3b49032',1,'stan::math']]], + ['cauchy_5fcdf_5flog_2ehpp',['cauchy_cdf_log.hpp',['../cauchy__cdf__log_8hpp.html',1,'']]], + ['cauchy_5flog',['cauchy_log',['../namespacestan_1_1math.html#a57b702de583e1883c8abd5b2fbba4b0d',1,'stan::math::cauchy_log(const T_y &y, const T_loc &mu, const T_scale &sigma)'],['../namespacestan_1_1math.html#a6ffc7f40b61588318f20c738202fc5fc',1,'stan::math::cauchy_log(const T_y &y, const T_loc &mu, const T_scale &sigma)']]], + ['cauchy_5flog_2ehpp',['cauchy_log.hpp',['../cauchy__log_8hpp.html',1,'']]], + ['cauchy_5frng',['cauchy_rng',['../namespacestan_1_1math.html#ab9ddbccee3c214e6fc88f297b6524d0b',1,'stan::math']]], + ['cauchy_5frng_2ehpp',['cauchy_rng.hpp',['../cauchy__rng_8hpp.html',1,'']]], + ['cbrt',['cbrt',['../namespacestan_1_1math.html#a64c0dfe5862fc53f1a18d76f14a1dc7e',1,'stan::math::cbrt(const fvar< T > &x)'],['../namespacestan_1_1math.html#a2a865962fcd8998de077f4a77b0a4ffa',1,'stan::math::cbrt(const var &a)']]], + ['cbrt_2ehpp',['cbrt.hpp',['../fwd_2scal_2fun_2cbrt_8hpp.html',1,'']]], + ['cbrt_2ehpp',['cbrt.hpp',['../rev_2scal_2fun_2cbrt_8hpp.html',1,'']]], + ['cd_5f',['cd_',['../classstan_1_1math_1_1op__dvd__vari.html#aafff013835800b2611e582f75a4a87e1',1,'stan::math::op_dvd_vari::cd_()'],['../classstan_1_1math_1_1op__vdd__vari.html#a7acdfdfc206b8c3e9335af73091bb471',1,'stan::math::op_vdd_vari::cd_()'],['../classstan_1_1math_1_1op__vvd__vari.html#a6184fba1516ee458408d47f8ba4d64fa',1,'stan::math::op_vvd_vari::cd_()']]], + ['ceil',['ceil',['../namespacestan_1_1math.html#ab1b2e9b4a947b81917612a8d1d547afb',1,'stan::math::ceil(const fvar< T > &x)'],['../namespacestan_1_1math.html#a06e924d5a6c94f7593056b5cb1324b66',1,'stan::math::ceil(const var &a)']]], + ['ceil_2ehpp',['ceil.hpp',['../fwd_2scal_2fun_2ceil_8hpp.html',1,'']]], + ['ceil_2ehpp',['ceil.hpp',['../rev_2scal_2fun_2ceil_8hpp.html',1,'']]], + ['chain',['chain',['../classstan_1_1math_1_1partials__vari.html#a707df6188a376afaad836dce8c6ceaf6',1,'stan::math::partials_vari::chain()'],['../classstan_1_1math_1_1sum__v__vari.html#a480eb0c5d04c92a3a4e28952ee14a4bb',1,'stan::math::sum_v_vari::chain()'],['../classstan_1_1math_1_1chainable.html#a38705148cea01e467dce2585312d7128',1,'stan::math::chainable::chain()'],['../classstan_1_1math_1_1gevv__vvv__vari.html#aa0e048f3021fa5bd5b4e20152ab0c77d',1,'stan::math::gevv_vvv_vari::chain()'],['../classstan_1_1math_1_1precomp__v__vari.html#a1ea984c684b3bc8a368c9554d9f0625b',1,'stan::math::precomp_v_vari::chain()'],['../classstan_1_1math_1_1precomp__vv__vari.html#ad3a8d46be2b9b6b8947953d3f537cc4c',1,'stan::math::precomp_vv_vari::chain()'],['../classstan_1_1math_1_1precomp__vvv__vari.html#a2e4939dbd5afb15e897f7af7dfa72640',1,'stan::math::precomp_vvv_vari::chain()'],['../classstan_1_1math_1_1precomputed__gradients__vari.html#a3fdc12d96fed2ae97bc8b6d90c117d1e',1,'stan::math::precomputed_gradients_vari::chain()'],['../classstan_1_1math_1_1stored__gradient__vari.html#a832278a4273ca489bc52148d6300b638',1,'stan::math::stored_gradient_vari::chain()'],['../classstan_1_1math_1_1cholesky__decompose__v__vari.html#aab81d9945c0a4aaa2ea3c8d1888e2b81',1,'stan::math::cholesky_decompose_v_vari::chain()']]], + ['chainable',['chainable',['../classstan_1_1math_1_1chainable.html#a24756ddb4545a3b65beb259afe4eb25f',1,'stan::math::chainable']]], + ['chainable',['chainable',['../classstan_1_1math_1_1chainable.html',1,'stan::math']]], + ['chainable_2ehpp',['chainable.hpp',['../chainable_8hpp.html',1,'']]], + ['chainable_5falloc',['chainable_alloc',['../classstan_1_1math_1_1chainable__alloc.html#a2c6f63c774596d247fb5ef3083a8013d',1,'stan::math::chainable_alloc']]], + ['chainable_5falloc',['chainable_alloc',['../classstan_1_1math_1_1chainable__alloc.html',1,'stan::math']]], + ['chainable_5falloc_2ehpp',['chainable_alloc.hpp',['../chainable__alloc_8hpp.html',1,'']]], + ['chainablestack',['ChainableStack',['../namespacestan_1_1math.html#a947fbc8520096439705d2072a18b43c0',1,'stan::math']]], + ['chainablestack_2ehpp',['chainablestack.hpp',['../chainablestack_8hpp.html',1,'']]], + ['check',['check',['../structstan_1_1math_1_1detail_1_1bounded.html#aacb059ebca7a577b043db54f9f79cc9f',1,'stan::math::detail::bounded::check()'],['../structstan_1_1math_1_1detail_1_1bounded_3_01_t__y_00_01_t__low_00_01_t__high_00_01true_01_4.html#afd17ed95a354d3786d35986021c2f559',1,'stan::math::detail::bounded< T_y, T_low, T_high, true >::check()']]], + ['check_5fbounded',['check_bounded',['../namespacestan_1_1math.html#a16d53b31b377bc3fc120d6469af3d99e',1,'stan::math']]], + ['check_5fbounded_2ehpp',['check_bounded.hpp',['../check__bounded_8hpp.html',1,'']]], + ['check_5fcholesky_5ffactor',['check_cholesky_factor',['../namespacestan_1_1math.html#a2b3c1ad17fc5567f1599fa9d0a218620',1,'stan::math']]], + ['check_5fcholesky_5ffactor_2ehpp',['check_cholesky_factor.hpp',['../check__cholesky__factor_8hpp.html',1,'']]], + ['check_5fcholesky_5ffactor_5fcorr',['check_cholesky_factor_corr',['../namespacestan_1_1math.html#a3f24b6f8e2a52523ae37a7ff2664e9b5',1,'stan::math']]], + ['check_5fcholesky_5ffactor_5fcorr_2ehpp',['check_cholesky_factor_corr.hpp',['../check__cholesky__factor__corr_8hpp.html',1,'']]], + ['check_5fcolumn_5findex',['check_column_index',['../namespacestan_1_1math.html#a16b0a60f741f97efac53254839f24ff8',1,'stan::math']]], + ['check_5fcolumn_5findex_2ehpp',['check_column_index.hpp',['../check__column__index_8hpp.html',1,'']]], + ['check_5fconsistent_5fsize',['check_consistent_size',['../namespacestan_1_1math.html#a6b6ab798e2f2a2ffad6b244efab0a58f',1,'stan::math']]], + ['check_5fconsistent_5fsize_2ehpp',['check_consistent_size.hpp',['../check__consistent__size_8hpp.html',1,'']]], + ['check_5fconsistent_5fsizes',['check_consistent_sizes',['../namespacestan_1_1math.html#a8e8b8fb2cc649fc1f34e75d0b1fe2ca3',1,'stan::math::check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)'],['../namespacestan_1_1math.html#a2fa5d10851fe1307ed7a0ffb768ff861',1,'stan::math::check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2, const char *name3, const T3 &x3)'],['../namespacestan_1_1math.html#a817ff4687b2d9d98f7f7bf82e9286266',1,'stan::math::check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2, const char *name3, const T3 &x3, const char *name4, const T4 &x4)'],['../namespacestan_1_1math.html#a8496e1bd1273f06de6712e3fb81e2c3f',1,'stan::math::check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2, const char *name3, const T3 &x3, const char *name4, const T4 &x4, const char *name5, const T5 &x5)']]], + ['check_5fconsistent_5fsizes_2ehpp',['check_consistent_sizes.hpp',['../check__consistent__sizes_8hpp.html',1,'']]], + ['check_5fcorr_5fmatrix',['check_corr_matrix',['../namespacestan_1_1math.html#a41204c48d930b46e81329d8b00a0793e',1,'stan::math']]], + ['check_5fcorr_5fmatrix_2ehpp',['check_corr_matrix.hpp',['../check__corr__matrix_8hpp.html',1,'']]], + ['check_5fcov_5fmatrix',['check_cov_matrix',['../namespacestan_1_1math.html#aeb915b09e2e60dd76885b6d68655790c',1,'stan::math']]], + ['check_5fcov_5fmatrix_2ehpp',['check_cov_matrix.hpp',['../check__cov__matrix_8hpp.html',1,'']]], + ['check_5fequal',['check_equal',['../namespacestan_1_1math.html#a1d8cfae284cdae1bb7e83d2a136f9a04',1,'stan::math']]], + ['check_5fequal_2ehpp',['check_equal.hpp',['../check__equal_8hpp.html',1,'']]], + ['check_5ffinite',['check_finite',['../namespacestan_1_1math.html#a5bf014e7733b17748049ccc5f3565de3',1,'stan::math']]], + ['check_5ffinite_2ehpp',['check_finite.hpp',['../check__finite_8hpp.html',1,'']]], + ['check_5fgreater',['check_greater',['../namespacestan_1_1math.html#ad60ac97b8f74b7c5ce2feb4bdb9e09e0',1,'stan::math']]], + ['check_5fgreater_2ehpp',['check_greater.hpp',['../check__greater_8hpp.html',1,'']]], + ['check_5fgreater_5for_5fequal',['check_greater_or_equal',['../namespacestan_1_1math.html#a3d5b19f8930c14681349d8444142487e',1,'stan::math']]], + ['check_5fgreater_5for_5fequal_2ehpp',['check_greater_or_equal.hpp',['../check__greater__or__equal_8hpp.html',1,'']]], + ['check_5fldlt_5ffactor',['check_ldlt_factor',['../namespacestan_1_1math.html#a7547b05717280b1cc041309803ec797d',1,'stan::math']]], + ['check_5fldlt_5ffactor_2ehpp',['check_ldlt_factor.hpp',['../check__ldlt__factor_8hpp.html',1,'']]], + ['check_5fless',['check_less',['../namespacestan_1_1math.html#aab225792149dceaec443ce09b93f8744',1,'stan::math']]], + ['check_5fless_2ehpp',['check_less.hpp',['../check__less_8hpp.html',1,'']]], + ['check_5fless_5for_5fequal',['check_less_or_equal',['../namespacestan_1_1math.html#a5e9dd0895901bf876eca824b41f04003',1,'stan::math']]], + ['check_5fless_5for_5fequal_2ehpp',['check_less_or_equal.hpp',['../check__less__or__equal_8hpp.html',1,'']]], + ['check_5flower_5ftriangular',['check_lower_triangular',['../namespacestan_1_1math.html#afe34ba3113cc8f10f179873edb9b60ed',1,'stan::math']]], + ['check_5flower_5ftriangular_2ehpp',['check_lower_triangular.hpp',['../check__lower__triangular_8hpp.html',1,'']]], + ['check_5fmatching_5fdims',['check_matching_dims',['../namespacestan_1_1math.html#aa1149504bbf29d464f23508ca5eccc0a',1,'stan::math']]], + ['check_5fmatching_5fdims_2ehpp',['check_matching_dims.hpp',['../check__matching__dims_8hpp.html',1,'']]], + ['check_5fmatching_5fsizes',['check_matching_sizes',['../namespacestan_1_1math.html#a52ba893fcf6fc650e992c13d41fbc3ae',1,'stan::math']]], + ['check_5fmatching_5fsizes_2ehpp',['check_matching_sizes.hpp',['../check__matching__sizes_8hpp.html',1,'']]], + ['check_5fmultiplicable',['check_multiplicable',['../namespacestan_1_1math.html#a3cfbb4f09fe34b9ece32be051f16ce66',1,'stan::math']]], + ['check_5fmultiplicable_2ehpp',['check_multiplicable.hpp',['../check__multiplicable_8hpp.html',1,'']]], + ['check_5fnonnegative',['check_nonnegative',['../namespacestan_1_1math.html#a7a6be100befb6d08504cf5af8440b236',1,'stan::math']]], + ['check_5fnonnegative_2ehpp',['check_nonnegative.hpp',['../check__nonnegative_8hpp.html',1,'']]], + ['check_5fnonzero_5fsize',['check_nonzero_size',['../namespacestan_1_1math.html#a97c3c23033e47a923ed5ce26a4deeba5',1,'stan::math']]], + ['check_5fnonzero_5fsize_2ehpp',['check_nonzero_size.hpp',['../check__nonzero__size_8hpp.html',1,'']]], + ['check_5fnot_5fnan',['check_not_nan',['../namespacestan_1_1math.html#a7942532ef8f89cee24af75a383835ee1',1,'stan::math']]], + ['check_5fnot_5fnan_2ehpp',['check_not_nan.hpp',['../check__not__nan_8hpp.html',1,'']]], + ['check_5fordered',['check_ordered',['../namespacestan_1_1math.html#a2a7b212a4431aeedca59b2e94c84f788',1,'stan::math::check_ordered(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &y)'],['../namespacestan_1_1math.html#af55e7669a804e68bc9d39ecd06318b23',1,'stan::math::check_ordered(const char *function, const char *name, const std::vector< T_y > &y)']]], + ['check_5fordered_2ehpp',['check_ordered.hpp',['../check__ordered_8hpp.html',1,'']]], + ['check_5fpos_5fdefinite',['check_pos_definite',['../namespacestan_1_1math.html#ac0133fd07702f5253126a385703b7d73',1,'stan::math::check_pos_definite(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)'],['../namespacestan_1_1math.html#ac0662f5d1e64e1adfa2f6216d1d58d6a',1,'stan::math::check_pos_definite(const char *function, const char *name, const Eigen::LDLT< Derived > &cholesky)'],['../namespacestan_1_1math.html#a32de4907da5087c01bfdda45a8ab1ede',1,'stan::math::check_pos_definite(const char *function, const char *name, const Eigen::LLT< Derived > &cholesky)']]], + ['check_5fpos_5fdefinite_2ehpp',['check_pos_definite.hpp',['../check__pos__definite_8hpp.html',1,'']]], + ['check_5fpos_5fsemidefinite',['check_pos_semidefinite',['../namespacestan_1_1math.html#aa26244f58d5a4dfd49181b39d9b4569b',1,'stan::math']]], + ['check_5fpos_5fsemidefinite_2ehpp',['check_pos_semidefinite.hpp',['../check__pos__semidefinite_8hpp.html',1,'']]], + ['check_5fpositive',['check_positive',['../namespacestan_1_1math.html#a814694b1125e641ca7b2e7269c82f966',1,'stan::math']]], + ['check_5fpositive_2ehpp',['check_positive.hpp',['../check__positive_8hpp.html',1,'']]], + ['check_5fpositive_5ffinite',['check_positive_finite',['../namespacestan_1_1math.html#af0725693b09e454f5c8327ac89cf0245',1,'stan::math']]], + ['check_5fpositive_5ffinite_2ehpp',['check_positive_finite.hpp',['../check__positive__finite_8hpp.html',1,'']]], + ['check_5fpositive_5fordered',['check_positive_ordered',['../namespacestan_1_1math.html#a87f00a8c0f07c5a82145a14712437673',1,'stan::math']]], + ['check_5fpositive_5fordered_2ehpp',['check_positive_ordered.hpp',['../check__positive__ordered_8hpp.html',1,'']]], + ['check_5fpositive_5fsize',['check_positive_size',['../namespacestan_1_1math.html#ac6fe1398a136f3dc36d246a2ea747500',1,'stan::math']]], + ['check_5fpositive_5fsize_2ehpp',['check_positive_size.hpp',['../check__positive__size_8hpp.html',1,'']]], + ['check_5frange',['check_range',['../namespacestan_1_1math.html#adcd4dcac328824f71f31d6861b8610ee',1,'stan::math::check_range(const char *function, const char *name, const int max, const int index, const int nested_level, const char *error_msg)'],['../namespacestan_1_1math.html#a8822ad6a9b8706465e8e1f90c336e3c2',1,'stan::math::check_range(const char *function, const char *name, const int max, const int index, const char *error_msg)'],['../namespacestan_1_1math.html#a7e76ffb67d3c6c6c225b0ba7b991f449',1,'stan::math::check_range(const char *function, const char *name, const int max, const int index)']]], + ['check_5frange_2ehpp',['check_range.hpp',['../check__range_8hpp.html',1,'']]], + ['check_5frow_5findex',['check_row_index',['../namespacestan_1_1math.html#acb080867499e68f688b0dcb5c8f4e061',1,'stan::math']]], + ['check_5frow_5findex_2ehpp',['check_row_index.hpp',['../check__row__index_8hpp.html',1,'']]], + ['check_5fsimplex',['check_simplex',['../namespacestan_1_1math.html#a6affd19d4999c427291a2bbb07bce304',1,'stan::math']]], + ['check_5fsimplex_2ehpp',['check_simplex.hpp',['../check__simplex_8hpp.html',1,'']]], + ['check_5fsize_5fmatch',['check_size_match',['../namespacestan_1_1math.html#aa547146eaac690e79a611e50a6dffb4d',1,'stan::math::check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)'],['../namespacestan_1_1math.html#a0c66b22fce7bd878b687d550299eb248',1,'stan::math::check_size_match(const char *function, const char *expr_i, const char *name_i, T_size1 i, const char *expr_j, const char *name_j, T_size2 j)']]], + ['check_5fsize_5fmatch_2ehpp',['check_size_match.hpp',['../check__size__match_8hpp.html',1,'']]], + ['check_5fspsd_5fmatrix',['check_spsd_matrix',['../namespacestan_1_1math.html#a30d5ef4f11dbce1a670766034b416339',1,'stan::math']]], + ['check_5fspsd_5fmatrix_2ehpp',['check_spsd_matrix.hpp',['../check__spsd__matrix_8hpp.html',1,'']]], + ['check_5fsquare',['check_square',['../namespacestan_1_1math.html#a94cfaa76ca5bc3f0ea5ad1d5b9f80727',1,'stan::math']]], + ['check_5fsquare_2ehpp',['check_square.hpp',['../check__square_8hpp.html',1,'']]], + ['check_5fstd_5fvector_5findex',['check_std_vector_index',['../namespacestan_1_1math.html#a7ed873db07e833c14413c319a5bb9837',1,'stan::math']]], + ['check_5fstd_5fvector_5findex_2ehpp',['check_std_vector_index.hpp',['../check__std__vector__index_8hpp.html',1,'']]], + ['check_5fsymmetric',['check_symmetric',['../namespacestan_1_1math.html#a57384e961806a959d95a5444fd8d7190',1,'stan::math']]], + ['check_5fsymmetric_2ehpp',['check_symmetric.hpp',['../check__symmetric_8hpp.html',1,'']]], + ['check_5funit_5fvector',['check_unit_vector',['../namespacestan_1_1math.html#a14e15ece9efbe2751549da6a598964c9',1,'stan::math']]], + ['check_5funit_5fvector_2ehpp',['check_unit_vector.hpp',['../check__unit__vector_8hpp.html',1,'']]], + ['check_5fvector',['check_vector',['../namespacestan_1_1math.html#a5b78e5ddf65db13aaa65a6c58205fbf2',1,'stan::math']]], + ['check_5fvector_2ehpp',['check_vector.hpp',['../check__vector_8hpp.html',1,'']]], + ['chi_5fsquare_5fccdf_5flog',['chi_square_ccdf_log',['../namespacestan_1_1math.html#af270a4206e4a52396b386b54c9a58ae9',1,'stan::math']]], + ['chi_5fsquare_5fccdf_5flog_2ehpp',['chi_square_ccdf_log.hpp',['../chi__square__ccdf__log_8hpp.html',1,'']]], + ['chi_5fsquare_5fcdf',['chi_square_cdf',['../namespacestan_1_1math.html#aa196f552535f61f4b2bd088da74cc142',1,'stan::math']]], + ['chi_5fsquare_5fcdf_2ehpp',['chi_square_cdf.hpp',['../chi__square__cdf_8hpp.html',1,'']]], + ['chi_5fsquare_5fcdf_5flog',['chi_square_cdf_log',['../namespacestan_1_1math.html#acbf0413c908e37c44c24ad81f99aa77f',1,'stan::math']]], + ['chi_5fsquare_5fcdf_5flog_2ehpp',['chi_square_cdf_log.hpp',['../chi__square__cdf__log_8hpp.html',1,'']]], + ['chi_5fsquare_5flog',['chi_square_log',['../namespacestan_1_1math.html#a8a1c945dce01a8a4b4485b7c5bb258ba',1,'stan::math::chi_square_log(const T_y &y, const T_dof &nu)'],['../namespacestan_1_1math.html#a78965d5578823b4bae1dde58e42012c1',1,'stan::math::chi_square_log(const T_y &y, const T_dof &nu)']]], + ['chi_5fsquare_5flog_2ehpp',['chi_square_log.hpp',['../chi__square__log_8hpp.html',1,'']]], + ['chi_5fsquare_5frng',['chi_square_rng',['../namespacestan_1_1math.html#ac1653e58694ea92bc1781e5d332c31e8',1,'stan::math']]], + ['chi_5fsquare_5frng_2ehpp',['chi_square_rng.hpp',['../chi__square__rng_8hpp.html',1,'']]], + ['child_5ftype',['child_type',['../structstan_1_1math_1_1child__type.html',1,'stan::math']]], + ['child_5ftype_2ehpp',['child_type.hpp',['../child__type_8hpp.html',1,'']]], + ['child_5ftype_3c_20t_5fstruct_3c_20t_5fchild_20_3e_20_3e',['child_type< T_struct< T_child > >',['../structstan_1_1math_1_1child__type_3_01_t__struct_3_01_t__child_01_4_01_4.html',1,'stan::math']]], + ['cholesky_5fcorr_5fconstrain',['cholesky_corr_constrain',['../namespacestan_1_1math.html#ab9d24004ec984f89b342414ff6312d0a',1,'stan::math::cholesky_corr_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y, int K)'],['../namespacestan_1_1math.html#a6649012a7c4d7108fb5dc5ebd6a13683',1,'stan::math::cholesky_corr_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y, int K, T &lp)']]], + ['cholesky_5fcorr_5fconstrain_2ehpp',['cholesky_corr_constrain.hpp',['../cholesky__corr__constrain_8hpp.html',1,'']]], + ['cholesky_5fcorr_5ffree',['cholesky_corr_free',['../namespacestan_1_1math.html#aeed4fbb1adce01dfc445cae326e4c482',1,'stan::math']]], + ['cholesky_5fcorr_5ffree_2ehpp',['cholesky_corr_free.hpp',['../cholesky__corr__free_8hpp.html',1,'']]], + ['cholesky_5fdecompose',['cholesky_decompose',['../namespacestan_1_1math.html#a4d798c4cab5a0716a0e338de38617c8e',1,'stan::math::cholesky_decompose(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)'],['../namespacestan_1_1math.html#af8e46af32d475d13fb882b6ae58051de',1,'stan::math::cholesky_decompose(const Eigen::Matrix< var,-1,-1 > &A)']]], + ['cholesky_5fdecompose_2ehpp',['cholesky_decompose.hpp',['../prim_2mat_2fun_2cholesky__decompose_8hpp.html',1,'']]], + ['cholesky_5fdecompose_2ehpp',['cholesky_decompose.hpp',['../rev_2mat_2fun_2cholesky__decompose_8hpp.html',1,'']]], + ['cholesky_5fdecompose_5fv_5fvari',['cholesky_decompose_v_vari',['../classstan_1_1math_1_1cholesky__decompose__v__vari.html#a9906839e06f5ae7c5c31b9d0c5fe1454',1,'stan::math::cholesky_decompose_v_vari']]], + ['cholesky_5fdecompose_5fv_5fvari',['cholesky_decompose_v_vari',['../classstan_1_1math_1_1cholesky__decompose__v__vari.html',1,'stan::math']]], + ['cholesky_5ffactor_5fconstrain',['cholesky_factor_constrain',['../namespacestan_1_1math.html#ae2be4ed6bbf19487de29cfc85718ed3b',1,'stan::math::cholesky_factor_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, int M, int N)'],['../namespacestan_1_1math.html#a8eb630493ae2edfb2dbc9caeda00dfff',1,'stan::math::cholesky_factor_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, int M, int N, T &lp)']]], + ['cholesky_5ffactor_5fconstrain_2ehpp',['cholesky_factor_constrain.hpp',['../cholesky__factor__constrain_8hpp.html',1,'']]], + ['cholesky_5ffactor_5ffree',['cholesky_factor_free',['../namespacestan_1_1math.html#ad9d45c92d30d1120cfa4b71a766e1712',1,'stan::math']]], + ['cholesky_5ffactor_5ffree_2ehpp',['cholesky_factor_free.hpp',['../cholesky__factor__free_8hpp.html',1,'']]], + ['col',['col',['../namespacestan_1_1math.html#a3d822499055d9eefe6cd543ad06e1d3b',1,'stan::math']]], + ['col_2ehpp',['col.hpp',['../col_8hpp.html',1,'']]], + ['cols',['cols',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#a73fd3def8c2a23ff4afbc5db359f4f84',1,'stan::math::LDLT_factor< T, R, C >::cols()'],['../classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4.html#ac34a025473a988e2393db45dfdaa6288',1,'stan::math::LDLT_factor< stan::math::var, R, C >::cols()'],['../namespacestan_1_1math.html#a0798f82fcc76f547303e77224fa25025',1,'stan::math::cols()']]], + ['cols_2ehpp',['cols.hpp',['../cols_8hpp.html',1,'']]], + ['columns_5fdot_5fproduct',['columns_dot_product',['../namespacestan_1_1math.html#ad63b6eb8c9db16d8321d8f2f18632be1',1,'stan::math::columns_dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)'],['../namespacestan_1_1math.html#a415662a8443b30a03b559fad4be26e85',1,'stan::math::columns_dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)'],['../namespacestan_1_1math.html#a8ca0a75054cee6793caf8b97f47f8fa7',1,'stan::math::columns_dot_product(const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)'],['../namespacestan_1_1math.html#a6d03b34aa7329a68f31d1c7bc500c5c8',1,'stan::math::columns_dot_product(const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)'],['../namespacestan_1_1math.html#a09f7ba0991c234a715af5b4968a28014',1,'stan::math::columns_dot_product(const Eigen::Matrix< T1, R1, C1 > &v1, const Eigen::Matrix< T2, R2, C2 > &v2)']]], + ['columns_5fdot_5fproduct_2ehpp',['columns_dot_product.hpp',['../fwd_2mat_2fun_2columns__dot__product_8hpp.html',1,'']]], + ['columns_5fdot_5fproduct_2ehpp',['columns_dot_product.hpp',['../prim_2mat_2fun_2columns__dot__product_8hpp.html',1,'']]], + ['columns_5fdot_5fproduct_2ehpp',['columns_dot_product.hpp',['../rev_2mat_2fun_2columns__dot__product_8hpp.html',1,'']]], + ['columns_5fdot_5fself',['columns_dot_self',['../namespacestan_1_1math.html#a3663d900f7f0bdd57e808301ff142ee1',1,'stan::math::columns_dot_self(const Eigen::Matrix< fvar< T >, R, C > &x)'],['../namespacestan_1_1math.html#a3cc404fd71124d7cea29d4f6d1a767b9',1,'stan::math::columns_dot_self(const Eigen::Matrix< T, R, C > &x)'],['../namespacestan_1_1math.html#a5f1e866e49a056dc81b8b6b673dda0f8',1,'stan::math::columns_dot_self(const Eigen::Matrix< var, R, C > &x)']]], + ['columns_5fdot_5fself_2ehpp',['columns_dot_self.hpp',['../fwd_2mat_2fun_2columns__dot__self_8hpp.html',1,'']]], + ['columns_5fdot_5fself_2ehpp',['columns_dot_self.hpp',['../prim_2mat_2fun_2columns__dot__self_8hpp.html',1,'']]], + ['columns_5fdot_5fself_2ehpp',['columns_dot_self.hpp',['../rev_2mat_2fun_2columns__dot__self_8hpp.html',1,'']]], + ['common_5ftype',['common_type',['../structstan_1_1math_1_1common__type.html',1,'stan::math']]], + ['common_5ftype_2ehpp',['common_type.hpp',['../common__type_8hpp.html',1,'']]], + ['common_5ftype_3c_20eigen_3a_3amatrix_3c_20t1_2c_20r_2c_20c_20_3e_2c_20eigen_3a_3amatrix_3c_20t2_2c_20r_2c_20c_20_3e_20_3e',['common_type< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > >',['../structstan_1_1math_1_1common__type_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_eiged8accfa00e73f240c58ad02ac582ba93.html',1,'stan::math']]], + ['common_5ftype_3c_20std_3a_3avector_3c_20t1_20_3e_2c_20std_3a_3avector_3c_20t2_20_3e_20_3e',['common_type< std::vector< T1 >, std::vector< T2 > >',['../structstan_1_1math_1_1common__type_3_01std_1_1vector_3_01_t1_01_4_00_01std_1_1vector_3_01_t2_01_4_01_4.html',1,'stan::math']]], + ['compute',['compute',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#a0ffe0d59212a19f9039b478abbacd45e',1,'stan::math::LDLT_factor< T, R, C >::compute()'],['../classstan_1_1math_1_1_l_d_l_t__alloc.html#a57ddd5cb234667b1c07becffad3b77de',1,'stan::math::LDLT_alloc::compute()'],['../classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4.html#abb2f0b7a7abb1aee5157b3c2cd3ffa83',1,'stan::math::LDLT_factor< stan::math::var, R, C >::compute()']]], + ['constants_2ehpp',['constants.hpp',['../constants_8hpp.html',1,'']]], + ['constraint_5ftolerance',['CONSTRAINT_TOLERANCE',['../namespacestan_1_1math.html#aece739c5a2672028f0c7848045b89f08',1,'stan::math']]], + ['constraint_5ftolerance_2ehpp',['constraint_tolerance.hpp',['../constraint__tolerance_8hpp.html',1,'']]], + ['container_5fview',['container_view',['../classstan_1_1math_1_1container__view.html',1,'stan::math']]], + ['container_5fview',['container_view',['../classstan_1_1math_1_1container__view_3_01std_1_1vector_3_01_t1_01_4_00_01_t2_01_4.html#ae8c8f2d62c4841ca458580c2af67505f',1,'stan::math::container_view< std::vector< T1 >, T2 >::container_view()'],['../classstan_1_1math_1_1container__view_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_eif0a5cd6c4f7572d0a0485f479012b4cf.html#ada334e228fbc14af8df1cce4d9dc49fa',1,'stan::math::container_view< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > >::container_view()'],['../classstan_1_1math_1_1container__view_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_t2_01_4.html#ad29aea372283a2198c9b41813cb283c6',1,'stan::math::container_view< Eigen::Matrix< T1, R, C >, T2 >::container_view()'],['../classstan_1_1math_1_1container__view_3_01std_1_1vector_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_7f9efd46b00a4e97b56aae6ecc54dbcd.html#aaa03e10bd275d93efd10cce98e9c5ac4',1,'stan::math::container_view< std::vector< Eigen::Matrix< T1, R, C > >, Eigen::Matrix< T2, R, C > >::container_view()'],['../classstan_1_1math_1_1container__view.html#a6fe36f3d62137ef5755cedcc69b64d22',1,'stan::math::container_view::container_view()'],['../classstan_1_1math_1_1container__view_3_01dummy_00_01_t2_01_4.html#a50bf179032b8fe16201ded36c2d195f1',1,'stan::math::container_view< dummy, T2 >::container_view()']]], + ['container_5fview_2ehpp',['container_view.hpp',['../scal_2meta_2container__view_8hpp.html',1,'']]], + ['container_5fview_2ehpp',['container_view.hpp',['../arr_2meta_2container__view_8hpp.html',1,'']]], + ['container_5fview_2ehpp',['container_view.hpp',['../mat_2meta_2container__view_8hpp.html',1,'']]], + ['container_5fview_3c_20dummy_2c_20t2_20_3e',['container_view< dummy, T2 >',['../classstan_1_1math_1_1container__view_3_01dummy_00_01_t2_01_4.html',1,'stan::math']]], + ['container_5fview_3c_20eigen_3a_3amatrix_3c_20t1_2c_20r_2c_20c_20_3e_2c_20eigen_3a_3amatrix_3c_20t2_2c_20r_2c_20c_20_3e_20_3e',['container_view< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > >',['../classstan_1_1math_1_1container__view_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_eif0a5cd6c4f7572d0a0485f479012b4cf.html',1,'stan::math']]], + ['container_5fview_3c_20eigen_3a_3amatrix_3c_20t1_2c_20r_2c_20c_20_3e_2c_20t2_20_3e',['container_view< Eigen::Matrix< T1, R, C >, T2 >',['../classstan_1_1math_1_1container__view_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_t2_01_4.html',1,'stan::math']]], + ['container_5fview_3c_20std_3a_3avector_3c_20eigen_3a_3amatrix_3c_20t1_2c_20r_2c_20c_20_3e_20_3e_2c_20eigen_3a_3amatrix_3c_20t2_2c_20r_2c_20c_20_3e_20_3e',['container_view< std::vector< Eigen::Matrix< T1, R, C > >, Eigen::Matrix< T2, R, C > >',['../classstan_1_1math_1_1container__view_3_01std_1_1vector_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_7f9efd46b00a4e97b56aae6ecc54dbcd.html',1,'stan::math']]], + ['container_5fview_3c_20std_3a_3avector_3c_20t1_20_3e_2c_20t2_20_3e',['container_view< std::vector< T1 >, T2 >',['../classstan_1_1math_1_1container__view_3_01std_1_1vector_3_01_t1_01_4_00_01_t2_01_4.html',1,'stan::math']]], + ['contains_5ffvar',['contains_fvar',['../structstan_1_1contains__fvar.html',1,'stan']]], + ['contains_5ffvar_2ehpp',['contains_fvar.hpp',['../contains__fvar_8hpp.html',1,'']]], + ['contains_5fnonconstant_5fstruct',['contains_nonconstant_struct',['../structstan_1_1contains__nonconstant__struct.html',1,'stan']]], + ['contains_5fnonconstant_5fstruct_2ehpp',['contains_nonconstant_struct.hpp',['../contains__nonconstant__struct_8hpp.html',1,'']]], + ['contains_5fvector',['contains_vector',['../structstan_1_1contains__vector.html',1,'stan']]], + ['contains_5fvector_2ehpp',['contains_vector.hpp',['../contains__vector_8hpp.html',1,'']]], + ['core_2ehpp',['core.hpp',['../fwd_2core_8hpp.html',1,'']]], + ['core_2ehpp',['core.hpp',['../rev_2core_8hpp.html',1,'']]], + ['corr_5fconstrain',['corr_constrain',['../namespacestan_1_1math.html#a6a3c8aa139b956593524b01f21c971a1',1,'stan::math::corr_constrain(const T x)'],['../namespacestan_1_1math.html#a40c9589bc6f6d15d7455de5ad453c8e6',1,'stan::math::corr_constrain(const T x, T &lp)']]], + ['corr_5fconstrain_2ehpp',['corr_constrain.hpp',['../corr__constrain_8hpp.html',1,'']]], + ['corr_5ffree',['corr_free',['../namespacestan_1_1math.html#a9322e1f1baeb5a192c4972dbec311b4e',1,'stan::math']]], + ['corr_5ffree_2ehpp',['corr_free.hpp',['../corr__free_8hpp.html',1,'']]], + ['corr_5fmatrix_5fconstrain',['corr_matrix_constrain',['../namespacestan_1_1math.html#a8321b61db6a84b5d9041777643d53550',1,'stan::math::corr_matrix_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, typename math::index_type< Eigen::Matrix< T, Eigen::Dynamic, 1 > >::type k)'],['../namespacestan_1_1math.html#a65f2b4839829eda2b539a09da332a7fa',1,'stan::math::corr_matrix_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, typename math::index_type< Eigen::Matrix< T, Eigen::Dynamic, 1 > >::type k, T &lp)']]], + ['corr_5fmatrix_5fconstrain_2ehpp',['corr_matrix_constrain.hpp',['../corr__matrix__constrain_8hpp.html',1,'']]], + ['corr_5fmatrix_5ffree',['corr_matrix_free',['../namespacestan_1_1math.html#a34f63590ae0c736b6113d578d0899da1',1,'stan::math']]], + ['corr_5fmatrix_5ffree_2ehpp',['corr_matrix_free.hpp',['../corr__matrix__free_8hpp.html',1,'']]], + ['cos',['cos',['../namespacestan_1_1math.html#ae6cb3a9041ae0b7855b398c3e11cda48',1,'stan::math::cos(const fvar< T > &x)'],['../namespacestan_1_1math.html#a0f3ac00ed58d998daed7f4d97195e967',1,'stan::math::cos(const var &a)']]], + ['cos_2ehpp',['cos.hpp',['../rev_2scal_2fun_2cos_8hpp.html',1,'']]], + ['cos_2ehpp',['cos.hpp',['../fwd_2scal_2fun_2cos_8hpp.html',1,'']]], + ['cosh',['cosh',['../namespacestan_1_1math.html#aee4fa5213b343a52756c138107ac180b',1,'stan::math::cosh(const fvar< T > &x)'],['../namespacestan_1_1math.html#ab2a43fcaf01cfef4c73074e77390a205',1,'stan::math::cosh(const var &a)']]], + ['cosh_2ehpp',['cosh.hpp',['../rev_2scal_2fun_2cosh_8hpp.html',1,'']]], + ['cosh_2ehpp',['cosh.hpp',['../fwd_2scal_2fun_2cosh_8hpp.html',1,'']]], + ['coupled_5fode_5fobserver',['coupled_ode_observer',['../structstan_1_1math_1_1coupled__ode__observer.html',1,'stan::math']]], + ['coupled_5fode_5fobserver',['coupled_ode_observer',['../structstan_1_1math_1_1coupled__ode__observer.html#a1cbc3b0af0db1af7a2614619963dafb2',1,'stan::math::coupled_ode_observer']]], + ['coupled_5fode_5fobserver_2ehpp',['coupled_ode_observer.hpp',['../coupled__ode__observer_8hpp.html',1,'']]], + ['coupled_5fode_5fsystem',['coupled_ode_system',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html#a40185af10295bf1b41f2e1361ce1df2f',1,'stan::math::coupled_ode_system< F, double, double >::coupled_ode_system()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#a6f7d9914ea3740d8b6e5105a87aa2cd8',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::coupled_ode_system()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#aa09103f609e2d9bc433071465f9c1b9f',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::coupled_ode_system()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#ae9edecb8350c8aefd15c59c7e476e87d',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::coupled_ode_system()']]], + ['coupled_5fode_5fsystem',['coupled_ode_system',['../structstan_1_1math_1_1coupled__ode__system.html',1,'stan::math']]], + ['coupled_5fode_5fsystem_2ehpp',['coupled_ode_system.hpp',['../rev_2arr_2functor_2coupled__ode__system_8hpp.html',1,'']]], + ['coupled_5fode_5fsystem_2ehpp',['coupled_ode_system.hpp',['../prim_2arr_2functor_2coupled__ode__system_8hpp.html',1,'']]], + ['coupled_5fode_5fsystem_3c_20f_2c_20double_2c_20double_20_3e',['coupled_ode_system< F, double, double >',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html',1,'stan::math']]], + ['coupled_5fode_5fsystem_3c_20f_2c_20double_2c_20stan_3a_3amath_3a_3avar_20_3e',['coupled_ode_system< F, double, stan::math::var >',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html',1,'stan::math']]], + ['coupled_5fode_5fsystem_3c_20f_2c_20stan_3a_3amath_3a_3avar_2c_20double_20_3e',['coupled_ode_system< F, stan::math::var, double >',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html',1,'stan::math']]], + ['coupled_5fode_5fsystem_3c_20f_2c_20stan_3a_3amath_3a_3avar_2c_20stan_3a_3amath_3a_3avar_20_3e',['coupled_ode_system< F, stan::math::var, stan::math::var >',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html',1,'stan::math']]], + ['cov_5fmatrix_5fconstrain',['cov_matrix_constrain',['../namespacestan_1_1math.html#a1ad6b90cf2d3d3d25d2cf64a12effede',1,'stan::math::cov_matrix_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, typename math::index_type< Eigen::Matrix< T, Eigen::Dynamic, 1 > >::type K)'],['../namespacestan_1_1math.html#a417c6032fe62186f7c8fb5452e4173d8',1,'stan::math::cov_matrix_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, typename math::index_type< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > >::type K, T &lp)']]], + ['cov_5fmatrix_5fconstrain_2ehpp',['cov_matrix_constrain.hpp',['../cov__matrix__constrain_8hpp.html',1,'']]], + ['cov_5fmatrix_5fconstrain_5flkj',['cov_matrix_constrain_lkj',['../namespacestan_1_1math.html#a6e398c69a5845680ca945fa9ec6ec401',1,'stan::math::cov_matrix_constrain_lkj(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, size_t k)'],['../namespacestan_1_1math.html#ad179abe18f235b3000ad7a000b3abb29',1,'stan::math::cov_matrix_constrain_lkj(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, size_t k, T &lp)']]], + ['cov_5fmatrix_5fconstrain_5flkj_2ehpp',['cov_matrix_constrain_lkj.hpp',['../cov__matrix__constrain__lkj_8hpp.html',1,'']]], + ['cov_5fmatrix_5ffree',['cov_matrix_free',['../namespacestan_1_1math.html#a485d3c2cd12e516bb13a1d48f9a43386',1,'stan::math']]], + ['cov_5fmatrix_5ffree_2ehpp',['cov_matrix_free.hpp',['../cov__matrix__free_8hpp.html',1,'']]], + ['cov_5fmatrix_5ffree_5flkj',['cov_matrix_free_lkj',['../namespacestan_1_1math.html#a9021324082d4241367fdd17da025a32d',1,'stan::math']]], + ['cov_5fmatrix_5ffree_5flkj_2ehpp',['cov_matrix_free_lkj.hpp',['../cov__matrix__free__lkj_8hpp.html',1,'']]], + ['crossprod',['crossprod',['../namespacestan_1_1math.html#abd303ef11dc0c73cda2f743a3b67fbf1',1,'stan::math::crossprod(const Eigen::Matrix< fvar< T >, R, C > &m)'],['../namespacestan_1_1math.html#a62cc3a137ff3220bdd0137a52a4b9714',1,'stan::math::crossprod(const matrix_d &M)'],['../namespacestan_1_1math.html#a8605c80796abfc9c7082d001e8fd4501',1,'stan::math::crossprod(const matrix_v &M)']]], + ['crossprod_2ehpp',['crossprod.hpp',['../rev_2mat_2fun_2crossprod_8hpp.html',1,'']]], + ['crossprod_2ehpp',['crossprod.hpp',['../fwd_2mat_2fun_2crossprod_8hpp.html',1,'']]], + ['crossprod_2ehpp',['crossprod.hpp',['../prim_2mat_2fun_2crossprod_8hpp.html',1,'']]], + ['csr_5fextract_5fu',['csr_extract_u',['../group__csr__format.html#ga989f196379081c782be06612b5731dcb',1,'stan::math::csr_extract_u(const Eigen::SparseMatrix< T, Eigen::RowMajor > &A)'],['../group__csr__format.html#ga221b0a757cf0703a929342d2b4cea763',1,'stan::math::csr_extract_u(const Eigen::Matrix< T, R, C > &A)']]], + ['csr_5fextract_5fu_2ehpp',['csr_extract_u.hpp',['../csr__extract__u_8hpp.html',1,'']]], + ['csr_5fextract_5fv',['csr_extract_v',['../group__csr__format.html#gade78a62d0fd64b0d5da2370256cbb6e0',1,'stan::math::csr_extract_v(const Eigen::SparseMatrix< T, Eigen::RowMajor > &A)'],['../group__csr__format.html#ga01e6e2504c5eb6d0b289aa51172cd729',1,'stan::math::csr_extract_v(const Eigen::Matrix< T, R, C > &A)']]], + ['csr_5fextract_5fv_2ehpp',['csr_extract_v.hpp',['../csr__extract__v_8hpp.html',1,'']]], + ['csr_5fextract_5fw',['csr_extract_w',['../group__csr__format.html#gae45bfd671760b4f442d272456b2ae01c',1,'stan::math::csr_extract_w(const Eigen::SparseMatrix< T, Eigen::RowMajor > &A)'],['../group__csr__format.html#ga0fdafcbb6706d2656fcf1ece6a20fad4',1,'stan::math::csr_extract_w(const Eigen::Matrix< T, R, C > &A)']]], + ['csr_5fextract_5fw_2ehpp',['csr_extract_w.hpp',['../csr__extract__w_8hpp.html',1,'']]], + ['compressed_20sparse_20row_20matrix_20format_2e',['Compressed Sparse Row matrix format.',['../group__csr__format.html',1,'']]], + ['csr_5fmatrix_5ftimes_5fvector',['csr_matrix_times_vector',['../namespacestan_1_1math.html#a9e045cbd4b736cc0cf57025b1d8f72fe',1,'stan::math']]], + ['csr_5fmatrix_5ftimes_5fvector_2ehpp',['csr_matrix_times_vector.hpp',['../csr__matrix__times__vector_8hpp.html',1,'']]], + ['csr_5fto_5fdense_5fmatrix',['csr_to_dense_matrix',['../group__csr__format.html#gab28ee38f5eb51242d9c9280202baff5f',1,'stan::math']]], + ['csr_5fto_5fdense_5fmatrix_2ehpp',['csr_to_dense_matrix.hpp',['../csr__to__dense__matrix_8hpp.html',1,'']]], + ['csr_5fu_5fto_5fz',['csr_u_to_z',['../group__csr__format.html#gaf4e1bf7c971d0b9eb931654ea309a2bf',1,'stan::math']]], + ['csr_5fu_5fto_5fz_2ehpp',['csr_u_to_z.hpp',['../csr__u__to__z_8hpp.html',1,'']]], + ['cumulative_5fsum',['cumulative_sum',['../namespacestan_1_1math.html#a7340f6be8ae1e121c6d854005560fef5',1,'stan::math::cumulative_sum(const std::vector< T > &x)'],['../namespacestan_1_1math.html#a92fcacf229225bb313cf894cc1406a17',1,'stan::math::cumulative_sum(const Eigen::Matrix< T, R, C > &m)']]], + ['cumulative_5fsum_2ehpp',['cumulative_sum.hpp',['../cumulative__sum_8hpp.html',1,'']]], + ['cvi_5f',['cvi_',['../classstan_1_1math_1_1op__ddv__vari.html#a56c1fc22f4f329cca3da733c6eb0f73a',1,'stan::math::op_ddv_vari::cvi_()'],['../classstan_1_1math_1_1op__dvv__vari.html#aaddf51db2da17712cf73941d9a65c072',1,'stan::math::op_dvv_vari::cvi_()'],['../classstan_1_1math_1_1op__vdv__vari.html#a7fb6e0e51feb1099d20918fe951f83e9',1,'stan::math::op_vdv_vari::cvi_()'],['../classstan_1_1math_1_1op__vvv__vari.html#ad8b02ef27dfacf65c9e4eac914cc800e',1,'stan::math::op_vvv_vari::cvi_()']]] +]; diff --git a/doc/api/html/search/all_4.html b/doc/api/html/search/all_4.html new file mode 100644 index 00000000000..d72a9104cd7 --- /dev/null +++ b/doc/api/html/search/all_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/all_4.js b/doc/api/html/search/all_4.js new file mode 100644 index 00000000000..57ce3315449 --- /dev/null +++ b/doc/api/html/search/all_4.js @@ -0,0 +1,85 @@ +var searchData= +[ + ['d_5f',['d_',['../structstan_1_1math_1_1fvar.html#a8478b986831654e68268036549d4489c',1,'stan::math::fvar::d_()'],['../rev_2mat_2fun_2trace__gen__quad__form_8hpp.html#a03ff78e0a9fe71f688e2e446a4852786',1,'D_(): trace_gen_quad_form.hpp'],['../rev_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp.html#a6360b469a2b983248c4871e3fa37ca26',1,'D_(): trace_inv_quad_form_ldlt.hpp']]], + ['d_5fx1',['d_x1',['../structstan_1_1math_1_1_operands_and_partials.html#aa9678e6ac255ae9c0dc1e965237d6f2b',1,'stan::math::OperandsAndPartials']]], + ['d_5fx2',['d_x2',['../structstan_1_1math_1_1_operands_and_partials.html#a9757d2a2abf9bb8f5e96bef74248cf11',1,'stan::math::OperandsAndPartials']]], + ['d_5fx3',['d_x3',['../structstan_1_1math_1_1_operands_and_partials.html#adff5d76e13bd6e5b3295eed6af97c589',1,'stan::math::OperandsAndPartials']]], + ['d_5fx4',['d_x4',['../structstan_1_1math_1_1_operands_and_partials.html#a3a22b6c508236a0e21e88e910f82e735',1,'stan::math::OperandsAndPartials']]], + ['d_5fx5',['d_x5',['../structstan_1_1math_1_1_operands_and_partials.html#ab191b607e899615698112eb3277ee156',1,'stan::math::OperandsAndPartials']]], + ['d_5fx6',['d_x6',['../structstan_1_1math_1_1_operands_and_partials.html#a0a7faaf239c0c8a07b1f46e3364133b4',1,'stan::math::OperandsAndPartials']]], + ['da_5f',['da_',['../classstan_1_1math_1_1precomp__v__vari.html#aebcc7a60e78ba7f4156697faaf9cc0f0',1,'stan::math::precomp_v_vari::da_()'],['../classstan_1_1math_1_1precomp__vv__vari.html#af97b5e93718119df5074e486f4825bea',1,'stan::math::precomp_vv_vari::da_()'],['../classstan_1_1math_1_1precomp__vvv__vari.html#ab917bd646e4c1e48cc62c0200b4be8ca',1,'stan::math::precomp_vvv_vari::da_()']]], + ['db_5f',['db_',['../classstan_1_1math_1_1precomp__vv__vari.html#a135ab5b456986b163575aceb179a8a40',1,'stan::math::precomp_vv_vari::db_()'],['../classstan_1_1math_1_1precomp__vvv__vari.html#ae0b4d2b33c8c29d99021b4693a1247ce',1,'stan::math::precomp_vvv_vari::db_()']]], + ['dc_5f',['dc_',['../classstan_1_1math_1_1precomp__vvv__vari.html#ad4e4385c71e5c0ae76b62e1f581600b0',1,'stan::math::precomp_vvv_vari']]], + ['ddv_5fvari_2ehpp',['ddv_vari.hpp',['../ddv__vari_8hpp.html',1,'']]], + ['decouple_5fstates',['decouple_states',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html#a4fa261df6b9bba8fa617000f661ab330',1,'stan::math::coupled_ode_system< F, double, double >::decouple_states()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#ae5a23e98720f934c3ce7d26901b34b6f',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::decouple_states()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#a8980f6cc5827c50c671266150388caee',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::decouple_states()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#ac07a596c9b7dbac47dbe7e6c1310d560',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::decouple_states()']]], + ['denorm_5fmin',['denorm_min',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a83a3f6cc9f8616ff3a1a0d25c13febd0',1,'std::numeric_limits< stan::math::fvar< T > >::denorm_min()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a28a2bf586d50372baccd5ad89656691e',1,'std::numeric_limits< stan::math::var >::denorm_min()']]], + ['derivative',['derivative',['../namespacestan_1_1math.html#a0597dca74b96a4287c6f848489288d44',1,'stan::math']]], + ['derivative_2ehpp',['derivative.hpp',['../derivative_8hpp.html',1,'']]], + ['determinant',['determinant',['../namespacestan_1_1math.html#a63ab2582fc9a5a31d3d4f38a6420174e',1,'stan::math::determinant(const Eigen::Matrix< fvar< T >, R, C > &m)'],['../namespacestan_1_1math.html#ab65e9ab0e6f725c7e11068b0be2af84f',1,'stan::math::determinant(const Eigen::Matrix< T, R, C > &m)'],['../namespacestan_1_1math.html#a25cf09ca9596a572e5040deaecfba87f',1,'stan::math::determinant(const Eigen::Matrix< var, R, C > &m)']]], + ['determinant_2ehpp',['determinant.hpp',['../fwd_2mat_2fun_2determinant_8hpp.html',1,'']]], + ['determinant_2ehpp',['determinant.hpp',['../rev_2mat_2fun_2determinant_8hpp.html',1,'']]], + ['determinant_2ehpp',['determinant.hpp',['../prim_2mat_2fun_2determinant_8hpp.html',1,'']]], + ['diag_5fmatrix',['diag_matrix',['../namespacestan_1_1math.html#a8174ad2b40453c1bfcbdf59bf76e030d',1,'stan::math']]], + ['diag_5fmatrix_2ehpp',['diag_matrix.hpp',['../diag__matrix_8hpp.html',1,'']]], + ['diag_5fpost_5fmultiply',['diag_post_multiply',['../namespacestan_1_1math.html#ada475ab6293a9b7e5d3e6c1f92315008',1,'stan::math']]], + ['diag_5fpost_5fmultiply_2ehpp',['diag_post_multiply.hpp',['../diag__post__multiply_8hpp.html',1,'']]], + ['diag_5fpre_5fmultiply',['diag_pre_multiply',['../namespacestan_1_1math.html#a97acdd27ef5fca2cd111010f6fccf6b8',1,'stan::math']]], + ['diag_5fpre_5fmultiply_2ehpp',['diag_pre_multiply.hpp',['../diag__pre__multiply_8hpp.html',1,'']]], + ['diagonal',['diagonal',['../namespacestan_1_1math.html#a2e96160f66cf84ab9a4bae027645e5a5',1,'stan::math']]], + ['diagonal_2ehpp',['diagonal.hpp',['../diagonal_8hpp.html',1,'']]], + ['digamma',['digamma',['../namespacestan_1_1math.html#a69702aaa101bf602072fa7bf5fccb48a',1,'stan::math::digamma(const fvar< T > &x)'],['../namespacestan_1_1math.html#a5eb54ce92709046c6d168e851d2481c7',1,'stan::math::digamma(double x)'],['../namespacestan_1_1math.html#a366ba0d22b63d45054e4a022e4ffa994',1,'stan::math::digamma(const stan::math::var &a)']]], + ['digamma_2ehpp',['digamma.hpp',['../prim_2scal_2fun_2digamma_8hpp.html',1,'']]], + ['digamma_2ehpp',['digamma.hpp',['../fwd_2scal_2fun_2digamma_8hpp.html',1,'']]], + ['digamma_2ehpp',['digamma.hpp',['../rev_2scal_2fun_2digamma_8hpp.html',1,'']]], + ['digits',['digits',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#acacc88b265be440d023641830e9555e8',1,'std::numeric_limits< stan::math::fvar< T > >::digits()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a6f832c798083861791d8f8422d297cc5',1,'std::numeric_limits< stan::math::var >::digits()']]], + ['digits10',['digits10',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#ac72f6fb71cb6f7e4066f6cb4d4d264a8',1,'std::numeric_limits< stan::math::fvar< T > >::digits10()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a306499deadac99dc6648a436dd1b91e7',1,'std::numeric_limits< stan::math::var >::digits10()']]], + ['dims',['dims',['../namespacestan_1_1math.html#a2b9073e39033e56eb31344091f0170fd',1,'stan::math::dims(const T &x, std::vector< int > &result)'],['../namespacestan_1_1math.html#af95a2dcde478c06e3543511821618902',1,'stan::math::dims(const Eigen::Matrix< T, R, C > &x, std::vector< int > &result)'],['../namespacestan_1_1math.html#a467589eef4220a87d457c8a268a1fd5d',1,'stan::math::dims(const std::vector< T > &x, std::vector< int > &result)'],['../namespacestan_1_1math.html#a33777ee768c7032331ca8b92e5323384',1,'stan::math::dims(const T &x)']]], + ['dims_2ehpp',['dims.hpp',['../dims_8hpp.html',1,'']]], + ['dirichlet_5flog',['dirichlet_log',['../namespacestan_1_1math.html#a301c4fce1eeb151070f72a81c33ccde4',1,'stan::math::dirichlet_log(const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta, const Eigen::Matrix< T_prior_sample_size, Eigen::Dynamic, 1 > &alpha)'],['../namespacestan_1_1math.html#a610a90b8b664189d397c8549c2aa0214',1,'stan::math::dirichlet_log(const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta, const Eigen::Matrix< T_prior_sample_size, Eigen::Dynamic, 1 > &alpha)']]], + ['dirichlet_5flog_2ehpp',['dirichlet_log.hpp',['../dirichlet__log_8hpp.html',1,'']]], + ['dirichlet_5frng',['dirichlet_rng',['../namespacestan_1_1math.html#acb288324f889b7da57f2960570f459ea',1,'stan::math']]], + ['dirichlet_5frng_2ehpp',['dirichlet_rng.hpp',['../dirichlet__rng_8hpp.html',1,'']]], + ['dist',['dist',['../namespacestan_1_1math.html#ae86020a972c6efc6b3407c3cfc30f4a6',1,'stan::math']]], + ['dist_2ehpp',['dist.hpp',['../dist_8hpp.html',1,'']]], + ['distance',['distance',['../namespacestan_1_1math.html#acc0a62287bdf0c0420386fccc0a13ca9',1,'stan::math']]], + ['distance_2ehpp',['distance.hpp',['../distance_8hpp.html',1,'']]], + ['divide',['divide',['../namespacestan_1_1math.html#a0bbb4ba8df580321dbf92d0c563cc523',1,'stan::math::divide(const T1 &v, const T2 &c)'],['../namespacestan_1_1math.html#ab1f35909d12ac43b74d180a49d68b674',1,'stan::math::divide(const Eigen::Matrix< fvar< T >, R, C > &v, const fvar< T > &c)'],['../namespacestan_1_1math.html#abfbe71733db295fc195305aee8437732',1,'stan::math::divide(const Eigen::Matrix< fvar< T >, R, C > &v, const double c)'],['../namespacestan_1_1math.html#ab549dab5e1bff51b30678fbd8d1f8a41',1,'stan::math::divide(const Eigen::Matrix< double, R, C > &v, const fvar< T > &c)'],['../namespacestan_1_1math.html#a082ee76b34a2ea656d2c8ab9186c1a2b',1,'stan::math::divide(const Eigen::Matrix< double, R, C > &m, T c)'],['../namespacestan_1_1math.html#aaf04cebee51d38a543e0ec689ae1399c',1,'stan::math::divide(const int x, const int y)'],['../namespacestan_1_1math.html#a66343caaf5970081f4eedc8b178bc4d0',1,'stan::math::divide(double x, double y)'],['../namespacestan_1_1math.html#ae0aad4b9e552bacdbcac3b0bbd783d31',1,'stan::math::divide(const T1 &v, const T2 &c)'],['../namespacestan_1_1math.html#a818fcac13304ea5c8679b3fc38e51ac1',1,'stan::math::divide(const Eigen::Matrix< T1, R, C > &v, const T2 &c)']]], + ['divide_2ehpp',['divide.hpp',['../rev_2mat_2fun_2divide_8hpp.html',1,'']]], + ['divide_2ehpp',['divide.hpp',['../fwd_2mat_2fun_2divide_8hpp.html',1,'']]], + ['divide_2ehpp',['divide.hpp',['../prim_2mat_2fun_2divide_8hpp.html',1,'']]], + ['divide_2ehpp',['divide.hpp',['../prim_2scal_2fun_2divide_8hpp.html',1,'']]], + ['do_5flkj_5fconstant',['do_lkj_constant',['../namespacestan_1_1math.html#a3832e36ec9ea72ce740753adb3b0d132',1,'stan::math']]], + ['domain_5ferror',['domain_error',['../namespacestan_1_1math.html#aeebafad688145fc64353e4f455d014bd',1,'stan::math::domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)'],['../namespacestan_1_1math.html#a108d489a4a749c8e429b519d9e26c157',1,'stan::math::domain_error(const char *function, const char *name, const T &y, const char *msg1)']]], + ['domain_5ferror_2ehpp',['domain_error.hpp',['../domain__error_8hpp.html',1,'']]], + ['domain_5ferror_5fvec',['domain_error_vec',['../namespacestan_1_1math.html#a7c23bfe9ebcb5747ed175a59b2182072',1,'stan::math::domain_error_vec(const char *function, const char *name, const T &y, const size_t i, const char *msg1, const char *msg2)'],['../namespacestan_1_1math.html#ae3f55be80da8ff729d5850c653d2b28d',1,'stan::math::domain_error_vec(const char *function, const char *name, const T &y, const size_t i, const char *msg)']]], + ['domain_5ferror_5fvec_2ehpp',['domain_error_vec.hpp',['../domain__error__vec_8hpp.html',1,'']]], + ['dot',['dot',['../namespacestan_1_1math.html#afd3b73319bd8df9dad1d3902997d8e89',1,'stan::math']]], + ['dot_2ehpp',['dot.hpp',['../dot_8hpp.html',1,'']]], + ['dot_5fproduct',['dot_product',['../namespacestan_1_1math.html#a495321127b7e0ebdd4d52654d226e16b',1,'stan::math::dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)'],['../namespacestan_1_1math.html#af55524d5b711066af73968df35ddeb2c',1,'stan::math::dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)'],['../namespacestan_1_1math.html#a74f6624e3a637cb98d3ae10a42a44135',1,'stan::math::dot_product(const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)'],['../namespacestan_1_1math.html#a4a386f813bee88dc6d771ba0f0c90f82',1,'stan::math::dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2, size_type &length)'],['../namespacestan_1_1math.html#af58d380f8784b977f1372ca00caa779e',1,'stan::math::dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2, size_type &length)'],['../namespacestan_1_1math.html#a7893eb903c5877be710060cc1f733ece',1,'stan::math::dot_product(const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2, size_type &length)'],['../namespacestan_1_1math.html#a3dfb7deab1e93815803096f298e722a3',1,'stan::math::dot_product(const std::vector< fvar< T > > &v1, const std::vector< fvar< T > > &v2)'],['../namespacestan_1_1math.html#ade870e95240c98560c7146fc1569811e',1,'stan::math::dot_product(const std::vector< double > &v1, const std::vector< fvar< T > > &v2)'],['../namespacestan_1_1math.html#a092173dbe404bf00d732a86b18ed7cc0',1,'stan::math::dot_product(const std::vector< fvar< T > > &v1, const std::vector< double > &v2)'],['../namespacestan_1_1math.html#a4d2848b5eca56fff0922803874f97b58',1,'stan::math::dot_product(const std::vector< fvar< T > > &v1, const std::vector< fvar< T > > &v2, size_type &length)'],['../namespacestan_1_1math.html#af6af240b31f8d6bc2c9acce4b8fc3ebd',1,'stan::math::dot_product(const std::vector< double > &v1, const std::vector< fvar< T > > &v2, size_type &length)'],['../namespacestan_1_1math.html#a590dde9498d871fff74858d1f7ef2667',1,'stan::math::dot_product(const std::vector< fvar< T > > &v1, const std::vector< double > &v2, size_type &length)'],['../namespacestan_1_1math.html#af8d73851895fb151fdf79e55bf33e98e',1,'stan::math::dot_product(const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)'],['../namespacestan_1_1math.html#a58da447df259e9e092e8fd910b338e1f',1,'stan::math::dot_product(const double *v1, const double *v2, size_t length)'],['../namespacestan_1_1math.html#ab7cd93708bf432b3bd3d284958972ede',1,'stan::math::dot_product(const std::vector< double > &v1, const std::vector< double > &v2)'],['../namespacestan_1_1math.html#ad70b6ae039b48ca04b071daf5e265363',1,'stan::math::dot_product(const Eigen::Matrix< T1, R1, C1 > &v1, const Eigen::Matrix< T2, R2, C2 > &v2)'],['../namespacestan_1_1math.html#afc208771c9df3e3e96901fb27a05dde0',1,'stan::math::dot_product(const T1 *v1, const T2 *v2, size_t length)'],['../namespacestan_1_1math.html#a07462a84486826d0b7fe3cfebb51d386',1,'stan::math::dot_product(const std::vector< T1 > &v1, const std::vector< T2 > &v2)']]], + ['dot_5fproduct_2ehpp',['dot_product.hpp',['../prim_2mat_2fun_2dot__product_8hpp.html',1,'']]], + ['dot_5fproduct_2ehpp',['dot_product.hpp',['../rev_2mat_2fun_2dot__product_8hpp.html',1,'']]], + ['dot_5fproduct_2ehpp',['dot_product.hpp',['../fwd_2mat_2fun_2dot__product_8hpp.html',1,'']]], + ['dot_5fself',['dot_self',['../namespacestan_1_1math.html#a1edae52ce70f3f0a9f7eb15f3416007c',1,'stan::math::dot_self(const Eigen::Matrix< fvar< T >, R, C > &v)'],['../namespacestan_1_1math.html#a8a6a4ef7c701db7984297d153580c8d4',1,'stan::math::dot_self(const std::vector< double > &x)'],['../namespacestan_1_1math.html#ac81ab85d390fcb594884773a85fac657',1,'stan::math::dot_self(const Eigen::Matrix< double, R, C > &v)'],['../namespacestan_1_1math.html#add9f13b58d14d7b7b8cc43ab30a434d0',1,'stan::math::dot_self(const Eigen::Matrix< var, R, C > &v)']]], + ['dot_5fself_2ehpp',['dot_self.hpp',['../fwd_2mat_2fun_2dot__self_8hpp.html',1,'']]], + ['dot_5fself_2ehpp',['dot_self.hpp',['../prim_2arr_2fun_2dot__self_8hpp.html',1,'']]], + ['dot_5fself_2ehpp',['dot_self.hpp',['../prim_2mat_2fun_2dot__self_8hpp.html',1,'']]], + ['dot_5fself_2ehpp',['dot_self.hpp',['../rev_2mat_2fun_2dot__self_8hpp.html',1,'']]], + ['dotval_5f',['dotval_',['../classstan_1_1math_1_1gevv__vvv__vari.html#a674d2c68ca4a0bfce7d38c644e430d7a',1,'stan::math::gevv_vvv_vari']]], + ['double_5fexponential_5fccdf_5flog',['double_exponential_ccdf_log',['../namespacestan_1_1math.html#ab670b33f7d9f8cd15406cce67ffbe2c9',1,'stan::math']]], + ['double_5fexponential_5fccdf_5flog_2ehpp',['double_exponential_ccdf_log.hpp',['../double__exponential__ccdf__log_8hpp.html',1,'']]], + ['double_5fexponential_5fcdf',['double_exponential_cdf',['../namespacestan_1_1math.html#a658493a49a4e83ac55393a5d43c47ba7',1,'stan::math']]], + ['double_5fexponential_5fcdf_2ehpp',['double_exponential_cdf.hpp',['../double__exponential__cdf_8hpp.html',1,'']]], + ['double_5fexponential_5fcdf_5flog',['double_exponential_cdf_log',['../namespacestan_1_1math.html#aa71f7d99df6f1817ad1badc771e30a5e',1,'stan::math']]], + ['double_5fexponential_5fcdf_5flog_2ehpp',['double_exponential_cdf_log.hpp',['../double__exponential__cdf__log_8hpp.html',1,'']]], + ['double_5fexponential_5flog',['double_exponential_log',['../namespacestan_1_1math.html#a465bb5ed0b5bb209aa43f2ac71fc3597',1,'stan::math::double_exponential_log(const T_y &y, const T_loc &mu, const T_scale &sigma)'],['../namespacestan_1_1math.html#ac96b2758687c3d1eab564e67d18f8922',1,'stan::math::double_exponential_log(const T_y &y, const T_loc &mu, const T_scale &sigma)']]], + ['double_5fexponential_5flog_2ehpp',['double_exponential_log.hpp',['../double__exponential__log_8hpp.html',1,'']]], + ['double_5fexponential_5frng',['double_exponential_rng',['../namespacestan_1_1math.html#aa6ebff3092eb40851fa1f63b7b7196f8',1,'stan::math']]], + ['double_5fexponential_5frng_2ehpp',['double_exponential_rng.hpp',['../double__exponential__rng_8hpp.html',1,'']]], + ['dtrs_5f',['dtrs_',['../classstan_1_1math_1_1stored__gradient__vari.html#ae5c373b3fc563e291e189571057c2027',1,'stan::math::stored_gradient_vari']]], + ['dtype_5f',['Dtype_',['../rev_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp.html#a7c830ea3da654e2c30a3e8d4c41610e8',1,'trace_inv_quad_form_ldlt.hpp']]], + ['dummy',['dummy',['../structstan_1_1math_1_1dummy.html',1,'stan::math']]], + ['dummy_5fprecision',['dummy_precision',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a4c08b4bba00a46601d760d90fdba943d',1,'Eigen::NumTraits< stan::math::fvar< T > >::dummy_precision()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#a66eef3581ef6582fbb03a30749bc87b2',1,'Eigen::NumTraits< stan::math::var >::dummy_precision()']]], + ['dv_5fvari_2ehpp',['dv_vari.hpp',['../dv__vari_8hpp.html',1,'']]], + ['dvd_5fvari_2ehpp',['dvd_vari.hpp',['../dvd__vari_8hpp.html',1,'']]], + ['dvv_5fvari_2ehpp',['dvv_vari.hpp',['../dvv__vari_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/all_5.html b/doc/api/html/search/all_5.html new file mode 100644 index 00000000000..99ef7267045 --- /dev/null +++ b/doc/api/html/search/all_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/all_5.js b/doc/api/html/search/all_5.js new file mode 100644 index 00000000000..0d242d78f04 --- /dev/null +++ b/doc/api/html/search/all_5.js @@ -0,0 +1,62 @@ +var searchData= +[ + ['e',['e',['../namespacestan_1_1math.html#a3b650a0131d41167ef4837ecc7d02be5',1,'stan::math::e()'],['../namespacestan_1_1math.html#a66f94e47c6dc073bbd3929903b4431fe',1,'stan::math::E()']]], + ['eigen',['Eigen',['../namespace_eigen.html',1,'']]], + ['eigen_2edox',['Eigen.dox',['../_eigen_8dox.html',1,'']]], + ['eigen_2ehpp',['Eigen.hpp',['../_eigen_8hpp.html',1,'']]], + ['eigen_5fnumtraits_2ehpp',['Eigen_NumTraits.hpp',['../fwd_2mat_2fun_2_eigen___num_traits_8hpp.html',1,'']]], + ['eigen_5fnumtraits_2ehpp',['Eigen_NumTraits.hpp',['../rev_2mat_2fun_2_eigen___num_traits_8hpp.html',1,'']]], + ['eigenvalues_5fsym',['eigenvalues_sym',['../namespacestan_1_1math.html#a2e454ec91241f2f6e70aa05e7b7698ff',1,'stan::math']]], + ['eigenvalues_5fsym_2ehpp',['eigenvalues_sym.hpp',['../eigenvalues__sym_8hpp.html',1,'']]], + ['eigenvectors_5fsym',['eigenvectors_sym',['../namespacestan_1_1math.html#a9fd77067fef0a78dd5d8f9527969631e',1,'stan::math']]], + ['eigenvectors_5fsym_2ehpp',['eigenvectors_sym.hpp',['../eigenvectors__sym_8hpp.html',1,'']]], + ['elt_5fdivide',['elt_divide',['../namespacestan_1_1math.html#a75c3cc187f569c795118c72bcc1e5c58',1,'stan::math::elt_divide(const Eigen::Matrix< T1, R, C > &m1, const Eigen::Matrix< T2, R, C > &m2)'],['../namespacestan_1_1math.html#adc5d04e1b1dde0ea7455380ec27d4528',1,'stan::math::elt_divide(const Eigen::Matrix< T1, R, C > &m, T2 s)'],['../namespacestan_1_1math.html#ad4d728ca306346624b833cee2777c23d',1,'stan::math::elt_divide(T1 s, const Eigen::Matrix< T2, R, C > &m)']]], + ['elt_5fdivide_2ehpp',['elt_divide.hpp',['../elt__divide_8hpp.html',1,'']]], + ['elt_5fmultiply',['elt_multiply',['../namespacestan_1_1math.html#a2edc3d65b32928692984bd66a1b3bb56',1,'stan::math']]], + ['elt_5fmultiply_2ehpp',['elt_multiply.hpp',['../elt__multiply_8hpp.html',1,'']]], + ['empty_5fnested',['empty_nested',['../namespacestan_1_1math.html#a430f171295b91277dc60dfa2177c7c0b',1,'stan::math']]], + ['empty_5fnested_2ehpp',['empty_nested.hpp',['../empty__nested_8hpp.html',1,'']]], + ['epsilon',['epsilon',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#abf9a7000542d5141f8f6791282aecc5e',1,'std::numeric_limits< stan::math::fvar< T > >::epsilon()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a8532a2c2276f85829398e8eed1fffede',1,'Eigen::NumTraits< stan::math::fvar< T > >::epsilon()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a9721f6791342af12c178669b3ed87ccc',1,'std::numeric_limits< stan::math::var >::epsilon()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#a6ee32c875e248190487e374103f1d599',1,'Eigen::NumTraits< stan::math::var >::epsilon()'],['../namespacestan_1_1math.html#a5ffd625c2083751d7ccabb7dbe39cbe0',1,'stan::math::EPSILON()']]], + ['erf',['erf',['../namespacestan_1_1math.html#aa283efca22c0544054a6534443e6e762',1,'stan::math::erf(const fvar< T > &x)'],['../namespacestan_1_1math.html#a759d52872682fdf0d6a7a6d75b4f1d9e',1,'stan::math::erf(const var &a)']]], + ['erf_2ehpp',['erf.hpp',['../rev_2scal_2fun_2erf_8hpp.html',1,'']]], + ['erf_2ehpp',['erf.hpp',['../fwd_2scal_2fun_2erf_8hpp.html',1,'']]], + ['erfc',['erfc',['../namespacestan_1_1math.html#ab4c763e4f09069eed96a4e96e33ea8ea',1,'stan::math::erfc(const fvar< T > &x)'],['../namespacestan_1_1math.html#a8a8543e9c729e794bcbdff2ed223eb45',1,'stan::math::erfc(const var &a)']]], + ['erfc_2ehpp',['erfc.hpp',['../fwd_2scal_2fun_2erfc_8hpp.html',1,'']]], + ['erfc_2ehpp',['erfc.hpp',['../rev_2scal_2fun_2erfc_8hpp.html',1,'']]], + ['error_5findex',['error_index',['../structstan_1_1error__index.html',1,'stan']]], + ['error_5findex_2ehpp',['error_index.hpp',['../error__index_8hpp.html',1,'']]], + ['eval_5fgevv',['eval_gevv',['../classstan_1_1math_1_1gevv__vvv__vari.html#a9baad1e3c1fe91eabc1cdb68982426df',1,'stan::math::gevv_vvv_vari']]], + ['exp',['exp',['../namespacestan_1_1math.html#a11f31444e8584e4debf0d6b706d66880',1,'stan::math::exp(const fvar< T > &x)'],['../namespacestan_1_1math.html#a7ad4663394747a548b42f8cbe9def1f7',1,'stan::math::exp(const Eigen::Matrix< T, Rows, Cols > &m)'],['../namespacestan_1_1math.html#ab3bd08f492d4ae400850ecb98b9b6cb9',1,'stan::math::exp(const Eigen::Matrix< double, Rows, Cols > &m)'],['../namespacestan_1_1math.html#ae43b048d4a5f53f94501773c93689a65',1,'stan::math::exp(const var &a)']]], + ['exp_2ehpp',['exp.hpp',['../fwd_2scal_2fun_2exp_8hpp.html',1,'']]], + ['exp_2ehpp',['exp.hpp',['../prim_2mat_2fun_2exp_8hpp.html',1,'']]], + ['exp_2ehpp',['exp.hpp',['../rev_2scal_2fun_2exp_8hpp.html',1,'']]], + ['exp2',['exp2',['../namespacestan_1_1math.html#a8c3a577694c8f584e56160580fe0821b',1,'stan::math::exp2(const fvar< T > &x)'],['../namespacestan_1_1math.html#a0ef734d7c3b8ebd689012295bf826e94',1,'stan::math::exp2(const T y)'],['../namespacestan_1_1math.html#a9fd4650bbf246a10ac798c71da8b99d5',1,'stan::math::exp2(const var &a)']]], + ['exp2_2ehpp',['exp2.hpp',['../rev_2scal_2fun_2exp2_8hpp.html',1,'']]], + ['exp2_2ehpp',['exp2.hpp',['../fwd_2scal_2fun_2exp2_8hpp.html',1,'']]], + ['exp2_2ehpp',['exp2.hpp',['../prim_2scal_2fun_2exp2_8hpp.html',1,'']]], + ['exp_5fmod_5fnormal_5fccdf_5flog',['exp_mod_normal_ccdf_log',['../namespacestan_1_1math.html#a497ff815eeadaffe3204d33359c4be82',1,'stan::math']]], + ['exp_5fmod_5fnormal_5fccdf_5flog_2ehpp',['exp_mod_normal_ccdf_log.hpp',['../exp__mod__normal__ccdf__log_8hpp.html',1,'']]], + ['exp_5fmod_5fnormal_5fcdf',['exp_mod_normal_cdf',['../namespacestan_1_1math.html#a2b29301645f48dedc57b97409062250c',1,'stan::math']]], + ['exp_5fmod_5fnormal_5fcdf_2ehpp',['exp_mod_normal_cdf.hpp',['../exp__mod__normal__cdf_8hpp.html',1,'']]], + ['exp_5fmod_5fnormal_5fcdf_5flog',['exp_mod_normal_cdf_log',['../namespacestan_1_1math.html#ad0e32ac964461952d77df48cd30c6f1d',1,'stan::math']]], + ['exp_5fmod_5fnormal_5fcdf_5flog_2ehpp',['exp_mod_normal_cdf_log.hpp',['../exp__mod__normal__cdf__log_8hpp.html',1,'']]], + ['exp_5fmod_5fnormal_5flog',['exp_mod_normal_log',['../namespacestan_1_1math.html#af27bb81f9220a9ba9082903fd55dff66',1,'stan::math::exp_mod_normal_log(const T_y &y, const T_loc &mu, const T_scale &sigma, const T_inv_scale &lambda)'],['../namespacestan_1_1math.html#a50a3cd94db2760437551ea466247cf8e',1,'stan::math::exp_mod_normal_log(const T_y &y, const T_loc &mu, const T_scale &sigma, const T_inv_scale &lambda)']]], + ['exp_5fmod_5fnormal_5flog_2ehpp',['exp_mod_normal_log.hpp',['../exp__mod__normal__log_8hpp.html',1,'']]], + ['exp_5fmod_5fnormal_5frng',['exp_mod_normal_rng',['../namespacestan_1_1math.html#a40d3c6fbf610e2c0e997a039f2ed98e8',1,'stan::math']]], + ['exp_5fmod_5fnormal_5frng_2ehpp',['exp_mod_normal_rng.hpp',['../exp__mod__normal__rng_8hpp.html',1,'']]], + ['exp_5fval_5f',['exp_val_',['../rev_2scal_2fun_2log10_8hpp.html#ad5fa8da685c6b471f471d6ed4fc99ebd',1,'log10.hpp']]], + ['expm1',['expm1',['../namespacestan_1_1math.html#a8a76b658b94fcf8943f4fb41c586ec94',1,'stan::math::expm1(const fvar< T > &x)'],['../namespacestan_1_1math.html#a8c632ff37556a4989fb351042da3a05a',1,'stan::math::expm1(const stan::math::var &a)']]], + ['expm1_2ehpp',['expm1.hpp',['../fwd_2scal_2fun_2expm1_8hpp.html',1,'']]], + ['expm1_2ehpp',['expm1.hpp',['../rev_2scal_2fun_2expm1_8hpp.html',1,'']]], + ['exponential_5fccdf_5flog',['exponential_ccdf_log',['../namespacestan_1_1math.html#a42c92f31b24600c6ce05b4f21f54fb00',1,'stan::math']]], + ['exponential_5fccdf_5flog_2ehpp',['exponential_ccdf_log.hpp',['../exponential__ccdf__log_8hpp.html',1,'']]], + ['exponential_5fcdf',['exponential_cdf',['../namespacestan_1_1math.html#ac753dcf58b69f0bbf7b001bfe19a3e44',1,'stan::math']]], + ['exponential_5fcdf_2ehpp',['exponential_cdf.hpp',['../exponential__cdf_8hpp.html',1,'']]], + ['exponential_5fcdf_5flog',['exponential_cdf_log',['../namespacestan_1_1math.html#a8fbf986074ea063853c8d244c3c17e0f',1,'stan::math']]], + ['exponential_5fcdf_5flog_2ehpp',['exponential_cdf_log.hpp',['../exponential__cdf__log_8hpp.html',1,'']]], + ['exponential_5flog',['exponential_log',['../namespacestan_1_1math.html#addcdf998d9f336fd9e4118acc6c7a129',1,'stan::math::exponential_log(const T_y &y, const T_inv_scale &beta)'],['../namespacestan_1_1math.html#af3653c4e36237f4d7403af9f64abbcd2',1,'stan::math::exponential_log(const T_y &y, const T_inv_scale &beta)']]], + ['exponential_5flog_2ehpp',['exponential_log.hpp',['../exponential__log_8hpp.html',1,'']]], + ['exponential_5frng',['exponential_rng',['../namespacestan_1_1math.html#a6cfcce609912c9a6e1b2fad1e5055a1d',1,'stan::math']]], + ['exponential_5frng_2ehpp',['exponential_rng.hpp',['../exponential__rng_8hpp.html',1,'']]], + ['internal',['internal',['../namespace_eigen_1_1internal.html',1,'Eigen']]] +]; diff --git a/doc/api/html/search/all_6.html b/doc/api/html/search/all_6.html new file mode 100644 index 00000000000..6133ab3af1a --- /dev/null +++ b/doc/api/html/search/all_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/all_6.js b/doc/api/html/search/all_6.js new file mode 100644 index 00000000000..b4128d6463d --- /dev/null +++ b/doc/api/html/search/all_6.js @@ -0,0 +1,62 @@ +var searchData= +[ + ['f32',['F32',['../namespacestan_1_1math.html#ada2421cf831c518a6260f60d19eb5c32',1,'stan::math']]], + ['f32_2ehpp',['F32.hpp',['../_f32_8hpp.html',1,'']]], + ['f_5f',['f_',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html#a6d34cf58dd65908c274346f9faffa1c9',1,'stan::math::coupled_ode_system< F, double, double >::f_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#a29bdd2a1b78ae39b6be208202254d641',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::f_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#a315e28cc50d328c6b384142310e9721b',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::f_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#afedc7496fd5c35ba1e8325d71c8100be',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::f_()']]], + ['fabs',['fabs',['../namespacestan_1_1math.html#a6c79c9be5c64873b74f3c6924fef6911',1,'stan::math::fabs(const fvar< T > &x)'],['../namespacestan_1_1math.html#aea8428395b18c89bc01669915993b8e7',1,'stan::math::fabs(const var &a)']]], + ['fabs_2ehpp',['fabs.hpp',['../rev_2scal_2fun_2fabs_8hpp.html',1,'']]], + ['fabs_2ehpp',['fabs.hpp',['../fwd_2scal_2fun_2fabs_8hpp.html',1,'']]], + ['factor_5fcov_5fmatrix',['factor_cov_matrix',['../namespacestan_1_1math.html#a9d6ef71b2e1a2a216a031d8403458bdd',1,'stan::math']]], + ['factor_5fcov_5fmatrix_2ehpp',['factor_cov_matrix.hpp',['../factor__cov__matrix_8hpp.html',1,'']]], + ['factor_5fu',['factor_U',['../namespacestan_1_1math.html#aa6d09763679360f53f07ae20e8efc262',1,'stan::math']]], + ['factor_5fu_2ehpp',['factor_U.hpp',['../factor___u_8hpp.html',1,'']]], + ['falling_5ffactorial',['falling_factorial',['../namespacestan_1_1math.html#aae3974a012285e3d020d46cc454812ed',1,'stan::math::falling_factorial(const fvar< T > &x, const fvar< T > &n)'],['../namespacestan_1_1math.html#a203c9c81e4a4b48e47e052422fcf679d',1,'stan::math::falling_factorial(const fvar< T > &x, const double n)'],['../namespacestan_1_1math.html#a5a3c08d051a8e4bc83c6ad9132af4099',1,'stan::math::falling_factorial(const double x, const fvar< T > &n)'],['../namespacestan_1_1math.html#ad65933117ab43cb486fb65023d8e5f3c',1,'stan::math::falling_factorial(const T1 x, const T2 n)'],['../namespacestan_1_1math.html#a96fdf588b0a37df21c5b67ed7370b003',1,'stan::math::falling_factorial(const var &a, const double &b)'],['../namespacestan_1_1math.html#a78f5570887f609618c63c727afda46ba',1,'stan::math::falling_factorial(const var &a, const var &b)'],['../namespacestan_1_1math.html#add6fa4b14f17cc4df149df09224a18b9',1,'stan::math::falling_factorial(const double &a, const var &b)']]], + ['falling_5ffactorial_2ehpp',['falling_factorial.hpp',['../fwd_2scal_2fun_2falling__factorial_8hpp.html',1,'']]], + ['falling_5ffactorial_2ehpp',['falling_factorial.hpp',['../prim_2scal_2fun_2falling__factorial_8hpp.html',1,'']]], + ['falling_5ffactorial_2ehpp',['falling_factorial.hpp',['../rev_2scal_2fun_2falling__factorial_8hpp.html',1,'']]], + ['fdim',['fdim',['../namespacestan_1_1math.html#a535e91c206d8cfd9e61042c25108f23a',1,'stan::math::fdim(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a9af93d6decc446332dedd367db295bcb',1,'stan::math::fdim(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#a9448d07d7e87cd638f65ce95350c0e8b',1,'stan::math::fdim(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a7d2db622c0f83134b7f3ebd1eec3c1d6',1,'stan::math::fdim(T1 a, T2 b)'],['../namespacestan_1_1math.html#a6f899b184aa38d3a5f814518611a0666',1,'stan::math::fdim(const stan::math::var &a, const stan::math::var &b)'],['../namespacestan_1_1math.html#a6fe00d070fb14766341060f7f0fe2627',1,'stan::math::fdim(const double &a, const stan::math::var &b)'],['../namespacestan_1_1math.html#a014a74412301cf66626baa1fe1491d94',1,'stan::math::fdim(const stan::math::var &a, const double &b)']]], + ['fdim_2ehpp',['fdim.hpp',['../fwd_2scal_2fun_2fdim_8hpp.html',1,'']]], + ['fdim_2ehpp',['fdim.hpp',['../prim_2scal_2fun_2fdim_8hpp.html',1,'']]], + ['fdim_2ehpp',['fdim.hpp',['../rev_2scal_2fun_2fdim_8hpp.html',1,'']]], + ['fill',['fill',['../namespacestan_1_1math.html#a6d362e53d3d40b61e68fdd08dc5eb38b',1,'stan::math::fill(T &x, const S &y)'],['../namespacestan_1_1math.html#a73e791042ed648602eed1754679feff4',1,'stan::math::fill(Eigen::Matrix< T, R, C > &x, const S &y)'],['../namespacestan_1_1math.html#aa7f5d81c4d45f2407096def8810ffe00',1,'stan::math::fill(std::vector< T > &x, const S &y)']]], + ['fill_2ehpp',['fill.hpp',['../fill_8hpp.html',1,'']]], + ['finite_5fdiff_5fgrad_5fhessian',['finite_diff_grad_hessian',['../namespacestan_1_1math.html#a138f3242eba971c17756586ace2c15d3',1,'stan::math']]], + ['finite_5fdiff_5fgrad_5fhessian_2ehpp',['finite_diff_grad_hessian.hpp',['../finite__diff__grad__hessian_8hpp.html',1,'']]], + ['finite_5fdiff_5fgradient',['finite_diff_gradient',['../namespacestan_1_1math.html#ab34b9d54bbdc2b13f358a73a3dface45',1,'stan::math']]], + ['finite_5fdiff_5fgradient_2ehpp',['finite_diff_gradient.hpp',['../finite__diff__gradient_8hpp.html',1,'']]], + ['finite_5fdiff_5fhess_5fhelper',['finite_diff_hess_helper',['../namespacestan_1_1math.html#a9cfae14a02b57bee53b454f64b58c0b1',1,'stan::math']]], + ['finite_5fdiff_5fhessian',['finite_diff_hessian',['../namespacestan_1_1math.html#a8b6ed64f691a457cb6691d7b478b4a1d',1,'stan::math']]], + ['finite_5fdiff_5fhessian_2ehpp',['finite_diff_hessian.hpp',['../finite__diff__hessian_8hpp.html',1,'']]], + ['floor',['floor',['../namespacestan_1_1math.html#a16e5a2666b377e37fe807765ba5f6aaf',1,'stan::math::floor(const fvar< T > &x)'],['../namespacestan_1_1math.html#a66dea6b6d18e39c5b0f38d3204aa04d5',1,'stan::math::floor(const var &a)']]], + ['floor_2ehpp',['floor.hpp',['../fwd_2scal_2fun_2floor_8hpp.html',1,'']]], + ['floor_2ehpp',['floor.hpp',['../rev_2scal_2fun_2floor_8hpp.html',1,'']]], + ['fma',['fma',['../namespacestan_1_1math.html#ad52e5d20122b9db1d2ec7c57417d19b3',1,'stan::math::fma(const fvar< T1 > &x1, const fvar< T2 > &x2, const fvar< T3 > &x3)'],['../namespacestan_1_1math.html#abc95573545bf325172b18d2ec6b4f3f4',1,'stan::math::fma(const T1 &x1, const fvar< T2 > &x2, const fvar< T3 > &x3)'],['../namespacestan_1_1math.html#aebb72eea615a5b2effad60c4f5c1ccbc',1,'stan::math::fma(const fvar< T1 > &x1, const T2 &x2, const fvar< T3 > &x3)'],['../namespacestan_1_1math.html#a1e283e1daef5282717309ddb1302d5dc',1,'stan::math::fma(const fvar< T1 > &x1, const fvar< T2 > &x2, const T3 &x3)'],['../namespacestan_1_1math.html#a085357acaef6e7ac8f3e7d16e6b38aa3',1,'stan::math::fma(const T1 &x1, const T2 &x2, const fvar< T3 > &x3)'],['../namespacestan_1_1math.html#afaf7c6a98ccaf08b9964b9d9258c6d13',1,'stan::math::fma(const fvar< T1 > &x1, const T2 &x2, const T3 &x3)'],['../namespacestan_1_1math.html#a31f25245e8d92c7e406808b1aad777a9',1,'stan::math::fma(const T1 &x1, const fvar< T2 > &x2, const T3 &x3)'],['../namespacestan_1_1math.html#a3f3ab44e4f8a8430bd1fd19e37101555',1,'stan::math::fma(const stan::math::var &a, const stan::math::var &b, const stan::math::var &c)'],['../namespacestan_1_1math.html#ab57371eb5b1cf21e7fa089e89758bdef',1,'stan::math::fma(const stan::math::var &a, const stan::math::var &b, const double &c)'],['../namespacestan_1_1math.html#a2d1708d9819f74c9b8663c802a2d1a2a',1,'stan::math::fma(const stan::math::var &a, const double &b, const stan::math::var &c)'],['../namespacestan_1_1math.html#a6a7340a4f23e33e671e53c2582c63272',1,'stan::math::fma(const stan::math::var &a, const double &b, const double &c)'],['../namespacestan_1_1math.html#ab4becb131eda9f3e3f1ca06e373fea66',1,'stan::math::fma(const double &a, const stan::math::var &b, const double &c)'],['../namespacestan_1_1math.html#ad6917da974098b0bb02883839f1ae0e1',1,'stan::math::fma(const double &a, const double &b, const stan::math::var &c)'],['../namespacestan_1_1math.html#ae9f288e71a8a7012ad123ca361f6a739',1,'stan::math::fma(const double &a, const stan::math::var &b, const stan::math::var &c)']]], + ['fma_2ehpp',['fma.hpp',['../fwd_2scal_2fun_2fma_8hpp.html',1,'']]], + ['fma_2ehpp',['fma.hpp',['../rev_2scal_2fun_2fma_8hpp.html',1,'']]], + ['fmax',['fmax',['../namespacestan_1_1math.html#a1f0dc47791c87f86c9f93d2cba273c25',1,'stan::math::fmax(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#adb8de59f858592b97409ca71d68f4442',1,'stan::math::fmax(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#aad0fec224f4c675618141528549640ba',1,'stan::math::fmax(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#ab57bd2f169eb820c21273293d2cfa01b',1,'stan::math::fmax(const stan::math::var &a, const stan::math::var &b)'],['../namespacestan_1_1math.html#a5e72a34aed1af28919d940399a07c3d0',1,'stan::math::fmax(const stan::math::var &a, const double &b)'],['../namespacestan_1_1math.html#a8a200e969bd57383ff4f89516c0690b5',1,'stan::math::fmax(const double &a, const stan::math::var &b)']]], + ['fmax_2ehpp',['fmax.hpp',['../rev_2scal_2fun_2fmax_8hpp.html',1,'']]], + ['fmax_2ehpp',['fmax.hpp',['../fwd_2scal_2fun_2fmax_8hpp.html',1,'']]], + ['fmin',['fmin',['../namespacestan_1_1math.html#ae765dc2aa344a1893f66bffbdab0267c',1,'stan::math::fmin(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a6ade89f8b882cb15b0478176fd997cd1',1,'stan::math::fmin(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a00cdcc6569e6ac1d6a40d2f7157566a1',1,'stan::math::fmin(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#a3ff067261be560b2502178b590a7a068',1,'stan::math::fmin(const stan::math::var &a, const stan::math::var &b)'],['../namespacestan_1_1math.html#a2e9c72371629b0a266acc6795d723aa6',1,'stan::math::fmin(const stan::math::var &a, double b)'],['../namespacestan_1_1math.html#af78692904b139471b470740ce866468e',1,'stan::math::fmin(double a, const stan::math::var &b)']]], + ['fmin_2ehpp',['fmin.hpp',['../fwd_2scal_2fun_2fmin_8hpp.html',1,'']]], + ['fmin_2ehpp',['fmin.hpp',['../rev_2scal_2fun_2fmin_8hpp.html',1,'']]], + ['fmod',['fmod',['../namespacestan_1_1math.html#ac9f40b2c56584ebd33037769fddc4d3f',1,'stan::math::fmod(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#ad0970b532a9f823834c492e98356e730',1,'stan::math::fmod(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#a5fdbe01b71fb403869c2fa9ebb1fb90c',1,'stan::math::fmod(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a935933626162d429e5a7f06ca0bde103',1,'stan::math::fmod(const var &a, const var &b)'],['../namespacestan_1_1math.html#ab9ecd1367428932c3515ef3c374e6e9e',1,'stan::math::fmod(const var &a, const double b)'],['../namespacestan_1_1math.html#a6806c0d68c9e23e905b4ca36119734bd',1,'stan::math::fmod(const double a, const var &b)']]], + ['fmod_2ehpp',['fmod.hpp',['../fwd_2scal_2fun_2fmod_8hpp.html',1,'']]], + ['fmod_2ehpp',['fmod.hpp',['../rev_2scal_2fun_2fmod_8hpp.html',1,'']]], + ['fpclassify',['fpclassify',['../namespaceboost_1_1math.html#addcd4cb377863a7bb79a82dc82de96e1',1,'boost::math']]], + ['frechet_5fccdf_5flog',['frechet_ccdf_log',['../namespacestan_1_1math.html#a34680a4c6abd1d998326e44a212aa6d8',1,'stan::math']]], + ['frechet_5fccdf_5flog_2ehpp',['frechet_ccdf_log.hpp',['../frechet__ccdf__log_8hpp.html',1,'']]], + ['frechet_5fcdf',['frechet_cdf',['../namespacestan_1_1math.html#a252058aec5645d61efd61e155b788be7',1,'stan::math']]], + ['frechet_5fcdf_2ehpp',['frechet_cdf.hpp',['../frechet__cdf_8hpp.html',1,'']]], + ['frechet_5fcdf_5flog',['frechet_cdf_log',['../namespacestan_1_1math.html#aad1ba53b1f236710eed4f8377dc06471',1,'stan::math']]], + ['frechet_5fcdf_5flog_2ehpp',['frechet_cdf_log.hpp',['../frechet__cdf__log_8hpp.html',1,'']]], + ['frechet_5flog',['frechet_log',['../namespacestan_1_1math.html#a17f910a5107250d4b47468fe1e7487cc',1,'stan::math::frechet_log(const T_y &y, const T_shape &alpha, const T_scale &sigma)'],['../namespacestan_1_1math.html#a63f05e7ee3898b2f48b4b2658dad51c5',1,'stan::math::frechet_log(const T_y &y, const T_shape &alpha, const T_scale &sigma)']]], + ['frechet_5flog_2ehpp',['frechet_log.hpp',['../frechet__log_8hpp.html',1,'']]], + ['frechet_5frng',['frechet_rng',['../namespacestan_1_1math.html#a85bd113906fdeaf57e662a598ad99689',1,'stan::math']]], + ['frechet_5frng_2ehpp',['frechet_rng.hpp',['../frechet__rng_8hpp.html',1,'']]], + ['free_5fall',['free_all',['../classstan_1_1math_1_1stack__alloc.html#af65518d98ebd980303efa6cc3af76073',1,'stan::math::stack_alloc']]], + ['fun_2ehpp',['fun.hpp',['../fun_8hpp.html',1,'']]], + ['functor_2ehpp',['functor.hpp',['../functor_8hpp.html',1,'']]], + ['fvar',['fvar',['../structstan_1_1math_1_1fvar.html',1,'stan::math']]], + ['fvar',['fvar',['../structstan_1_1math_1_1fvar.html#ae4c326ef0c87161eca2431e8698664c2',1,'stan::math::fvar::fvar()'],['../structstan_1_1math_1_1fvar.html#a923f4b28c579d63838897b7199af0b9d',1,'stan::math::fvar::fvar(const fvar< T > &x)'],['../structstan_1_1math_1_1fvar.html#a309b11ed4f7f0b807e5a99ffe4544624',1,'stan::math::fvar::fvar(const TV &val, const TD &deriv)'],['../structstan_1_1math_1_1fvar.html#a9d15782da37b06ece7d293c94e0150a3',1,'stan::math::fvar::fvar(const TV &val)']]], + ['fvar_2ehpp',['fvar.hpp',['../fvar_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/all_7.html b/doc/api/html/search/all_7.html new file mode 100644 index 00000000000..574812594f7 --- /dev/null +++ b/doc/api/html/search/all_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/all_7.js b/doc/api/html/search/all_7.js new file mode 100644 index 00000000000..c2b94ac94ec --- /dev/null +++ b/doc/api/html/search/all_7.js @@ -0,0 +1,74 @@ +var searchData= +[ + ['gamma_5fccdf_5flog',['gamma_ccdf_log',['../namespacestan_1_1math.html#ae2f6f9efb0e1bacdc6415b6e0d6d6f00',1,'stan::math']]], + ['gamma_5fccdf_5flog_2ehpp',['gamma_ccdf_log.hpp',['../gamma__ccdf__log_8hpp.html',1,'']]], + ['gamma_5fcdf',['gamma_cdf',['../namespacestan_1_1math.html#ad927dbc83dc93b41cfb7a1ab6dccbd9e',1,'stan::math']]], + ['gamma_5fcdf_2ehpp',['gamma_cdf.hpp',['../gamma__cdf_8hpp.html',1,'']]], + ['gamma_5fcdf_5flog',['gamma_cdf_log',['../namespacestan_1_1math.html#af878fa8fc2eaeec210aff65ec83f5323',1,'stan::math']]], + ['gamma_5fcdf_5flog_2ehpp',['gamma_cdf_log.hpp',['../gamma__cdf__log_8hpp.html',1,'']]], + ['gamma_5flog',['gamma_log',['../namespacestan_1_1math.html#aab77693b33e10406f7ca5d85ce97107f',1,'stan::math::gamma_log(const T_y &y, const T_shape &alpha, const T_inv_scale &beta)'],['../namespacestan_1_1math.html#a03197f2fe5c3a96f77a9727f2db29d38',1,'stan::math::gamma_log(const T_y &y, const T_shape &alpha, const T_inv_scale &beta)']]], + ['gamma_5flog_2ehpp',['gamma_log.hpp',['../gamma__log_8hpp.html',1,'']]], + ['gamma_5fp',['gamma_p',['../namespacestan_1_1math.html#aa0fad89bd8e78eee42230dd92bcf1b15',1,'stan::math::gamma_p(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#abdd446def1c6803882dfa29838addc79',1,'stan::math::gamma_p(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#a764de29e557ee65caaff1b94388a9367',1,'stan::math::gamma_p(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#aed411d626d4ae01a76584c454a83673f',1,'stan::math::gamma_p(double x, double a)'],['../namespacestan_1_1math.html#ad9ec26628247b9e474e1b3254aae0b32',1,'stan::math::gamma_p(const stan::math::var &a, const stan::math::var &b)'],['../namespacestan_1_1math.html#ad392cbaa9872996da3127a359929cea4',1,'stan::math::gamma_p(const stan::math::var &a, const double &b)'],['../namespacestan_1_1math.html#aa3db0274d59a42798f93e66d0d411dd8',1,'stan::math::gamma_p(const double &a, const stan::math::var &b)']]], + ['gamma_5fp_2ehpp',['gamma_p.hpp',['../prim_2scal_2fun_2gamma__p_8hpp.html',1,'']]], + ['gamma_5fp_2ehpp',['gamma_p.hpp',['../rev_2scal_2fun_2gamma__p_8hpp.html',1,'']]], + ['gamma_5fp_2ehpp',['gamma_p.hpp',['../fwd_2scal_2fun_2gamma__p_8hpp.html',1,'']]], + ['gamma_5fq',['gamma_q',['../namespacestan_1_1math.html#a743267027c96ebef239be63589a6d594',1,'stan::math::gamma_q(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a7c57ec58c3534caee0c89fbdf56ed28d',1,'stan::math::gamma_q(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#a2ac85a7ace8ea6fdaa4fd19a40e8c87b',1,'stan::math::gamma_q(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a0830ba049b81bc98ea9fbcf1eb7b4bd6',1,'stan::math::gamma_q(double x, double a)'],['../namespacestan_1_1math.html#ac8ed9105d1156ceaca26ab323f1a2648',1,'stan::math::gamma_q(const stan::math::var &a, const stan::math::var &b)'],['../namespacestan_1_1math.html#af97d9968df786f813758bce4a8909f62',1,'stan::math::gamma_q(const stan::math::var &a, const double &b)'],['../namespacestan_1_1math.html#acb9a338d5f5fd18bddf0e8225f6cc27d',1,'stan::math::gamma_q(const double &a, const stan::math::var &b)']]], + ['gamma_5fq_2ehpp',['gamma_q.hpp',['../fwd_2scal_2fun_2gamma__q_8hpp.html',1,'']]], + ['gamma_5fq_2ehpp',['gamma_q.hpp',['../prim_2scal_2fun_2gamma__q_8hpp.html',1,'']]], + ['gamma_5fq_2ehpp',['gamma_q.hpp',['../rev_2scal_2fun_2gamma__q_8hpp.html',1,'']]], + ['gamma_5frng',['gamma_rng',['../namespacestan_1_1math.html#aacf6ec5f55f56b5756804a1771259a58',1,'stan::math']]], + ['gamma_5frng_2ehpp',['gamma_rng.hpp',['../gamma__rng_8hpp.html',1,'']]], + ['gaussian_5fdlm_5fobs_5flog',['gaussian_dlm_obs_log',['../namespacestan_1_1math.html#a439b46e03e6dbd7269b60989cf31de85',1,'stan::math::gaussian_dlm_obs_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_F, Eigen::Dynamic, Eigen::Dynamic > &F, const Eigen::Matrix< T_G, Eigen::Dynamic, Eigen::Dynamic > &G, const Eigen::Matrix< T_V, Eigen::Dynamic, Eigen::Dynamic > &V, const Eigen::Matrix< T_W, Eigen::Dynamic, Eigen::Dynamic > &W, const Eigen::Matrix< T_m0, Eigen::Dynamic, 1 > &m0, const Eigen::Matrix< T_C0, Eigen::Dynamic, Eigen::Dynamic > &C0)'],['../namespacestan_1_1math.html#ad7da6e923e5a19bed55c94a109d2e4cd',1,'stan::math::gaussian_dlm_obs_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_F, Eigen::Dynamic, Eigen::Dynamic > &F, const Eigen::Matrix< T_G, Eigen::Dynamic, Eigen::Dynamic > &G, const Eigen::Matrix< T_V, Eigen::Dynamic, Eigen::Dynamic > &V, const Eigen::Matrix< T_W, Eigen::Dynamic, Eigen::Dynamic > &W, const Eigen::Matrix< T_m0, Eigen::Dynamic, 1 > &m0, const Eigen::Matrix< T_C0, Eigen::Dynamic, Eigen::Dynamic > &C0)'],['../namespacestan_1_1math.html#a9a72bf8a0cfb7fd70089f9fb7fb5ce9a',1,'stan::math::gaussian_dlm_obs_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_F, Eigen::Dynamic, Eigen::Dynamic > &F, const Eigen::Matrix< T_G, Eigen::Dynamic, Eigen::Dynamic > &G, const Eigen::Matrix< T_V, Eigen::Dynamic, 1 > &V, const Eigen::Matrix< T_W, Eigen::Dynamic, Eigen::Dynamic > &W, const Eigen::Matrix< T_m0, Eigen::Dynamic, 1 > &m0, const Eigen::Matrix< T_C0, Eigen::Dynamic, Eigen::Dynamic > &C0)'],['../namespacestan_1_1math.html#a99ad1baa9f1a423304ac19aa0e345075',1,'stan::math::gaussian_dlm_obs_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_F, Eigen::Dynamic, Eigen::Dynamic > &F, const Eigen::Matrix< T_G, Eigen::Dynamic, Eigen::Dynamic > &G, const Eigen::Matrix< T_V, Eigen::Dynamic, 1 > &V, const Eigen::Matrix< T_W, Eigen::Dynamic, Eigen::Dynamic > &W, const Eigen::Matrix< T_m0, Eigen::Dynamic, 1 > &m0, const Eigen::Matrix< T_C0, Eigen::Dynamic, Eigen::Dynamic > &C0)']]], + ['gaussian_5fdlm_5fobs_5flog_2ehpp',['gaussian_dlm_obs_log.hpp',['../gaussian__dlm__obs__log_8hpp.html',1,'']]], + ['general_5fmatrix_5fmatrix_5fproduct_3c_20index_2c_20stan_3a_3amath_3a_3avar_2c_20lhsstorageorder_2c_20conjugatelhs_2c_20stan_3a_3amath_3a_3avar_2c_20rhsstorageorder_2c_20conjugaterhs_2c_20colmajor_20_3e',['general_matrix_matrix_product< Index, stan::math::var, LhsStorageOrder, ConjugateLhs, stan::math::var, RhsStorageOrder, ConjugateRhs, ColMajor >',['../struct_eigen_1_1internal_1_1general__matrix__matrix__product_3_01_index_00_01stan_1_1math_1_1var1562d71de7db86cb3dfb1784b090bdfc.html',1,'Eigen::internal']]], + ['general_5fmatrix_5fvector_5fproduct_3c_20index_2c_20stan_3a_3amath_3a_3avar_2c_20colmajor_2c_20conjugatelhs_2c_20stan_3a_3amath_3a_3avar_2c_20conjugaterhs_20_3e',['general_matrix_vector_product< Index, stan::math::var, ColMajor, ConjugateLhs, stan::math::var, ConjugateRhs >',['../struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var15f7d538e8be7d782eccb613a7b1e9bd.html',1,'Eigen::internal']]], + ['general_5fmatrix_5fvector_5fproduct_3c_20index_2c_20stan_3a_3amath_3a_3avar_2c_20rowmajor_2c_20conjugatelhs_2c_20stan_3a_3amath_3a_3avar_2c_20conjugaterhs_20_3e',['general_matrix_vector_product< Index, stan::math::var, RowMajor, ConjugateLhs, stan::math::var, ConjugateRhs >',['../struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var9294a9f65d48f87d892ffa4de3f3e667.html',1,'Eigen::internal']]], + ['get',['get',['../namespacestan.html#a431bd201f09a215cccb16cda10a1e840',1,'stan::get(const std::vector< T > &x, size_t n)'],['../namespacestan.html#aa0b8055d979ee18e43048b99eccb5640',1,'stan::get(const Eigen::Matrix< T, R, C > &m, size_t n)'],['../namespacestan.html#a2e926e5518c0c2f289f79d23010815d3',1,'stan::get(const T &x, size_t n)']]], + ['get_2ehpp',['get.hpp',['../arr_2meta_2get_8hpp.html',1,'']]], + ['get_2ehpp',['get.hpp',['../mat_2meta_2get_8hpp.html',1,'']]], + ['get_2ehpp',['get.hpp',['../scal_2meta_2get_8hpp.html',1,'']]], + ['get_5fbase1',['get_base1',['../namespacestan_1_1math.html#a7535c86e2c9ee9d5391a8cc63187317e',1,'stan::math::get_base1(const std::vector< T > &x, size_t i, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#aca7c84b936da0d3422507927cf9a68cc',1,'stan::math::get_base1(const std::vector< std::vector< T > > &x, size_t i1, size_t i2, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#a714e39ba9fcbbd90c787a51d511c9af1',1,'stan::math::get_base1(const std::vector< std::vector< std::vector< T > > > &x, size_t i1, size_t i2, size_t i3, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#aa23b355397df347249da513307fd6667',1,'stan::math::get_base1(const std::vector< std::vector< std::vector< std::vector< T > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#a25c1fac0445beea55c521c94f360e13e',1,'stan::math::get_base1(const std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#a20a82151947fc8816c5ce5b7bc6d8abd',1,'stan::math::get_base1(const std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, size_t i6, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#a6fb72caff19c8ce19dc6e3c25c79f7b8',1,'stan::math::get_base1(const std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, size_t i6, size_t i7, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#accc97dd76490d575638ebb22da233a53',1,'stan::math::get_base1(const std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, size_t i6, size_t i7, size_t i8, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#a8d5ea3228150cb118441cced9ed49a92',1,'stan::math::get_base1(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &x, size_t m, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#a51091bb67549e42c241f4e08e7d291d6',1,'stan::math::get_base1(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &x, size_t m, size_t n, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#ab0dbeed50ff3f8630ea3cd54f9ecb804',1,'stan::math::get_base1(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, size_t m, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#abf9dcd5236495d3f581b31dd05b9a227',1,'stan::math::get_base1(const Eigen::Matrix< T, 1, Eigen::Dynamic > &x, size_t n, const char *error_msg, size_t idx)']]], + ['get_5fbase1_2ehpp',['get_base1.hpp',['../get__base1_8hpp.html',1,'']]], + ['get_5fbase1_5flhs',['get_base1_lhs',['../namespacestan_1_1math.html#ac54b1427fd9d0765f0200dc9caa830f9',1,'stan::math::get_base1_lhs(std::vector< T > &x, size_t i, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#a4d5711f99869d05a6263218f3256e582',1,'stan::math::get_base1_lhs(std::vector< std::vector< T > > &x, size_t i1, size_t i2, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#a37f3ceaa6197904ef662f1edc8245e1a',1,'stan::math::get_base1_lhs(std::vector< std::vector< std::vector< T > > > &x, size_t i1, size_t i2, size_t i3, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#a3132eb36eaf861cfbd119b38e0a85a15',1,'stan::math::get_base1_lhs(std::vector< std::vector< std::vector< std::vector< T > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#afbcc061003aabcaf675f4415adc80c0a',1,'stan::math::get_base1_lhs(std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#a1958245532761be08be7ac9bc781f3a7',1,'stan::math::get_base1_lhs(std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, size_t i6, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#aedc7fc712ebe439bec1892c8f69447cd',1,'stan::math::get_base1_lhs(std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, size_t i6, size_t i7, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#a64467731d9abfaf97ea8d541d528142c',1,'stan::math::get_base1_lhs(std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, size_t i6, size_t i7, size_t i8, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#a0843cd960568745e5ace70f2c45ec6c3',1,'stan::math::get_base1_lhs(Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &x, size_t m, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#af8cb7e6e670cddcdf5527ec92fa3ff37',1,'stan::math::get_base1_lhs(Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &x, size_t m, size_t n, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#adffeab694f7588c92dc97b6736e5be7b',1,'stan::math::get_base1_lhs(Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, size_t m, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#a6133d90708e16760b6394c6ca6a305ff',1,'stan::math::get_base1_lhs(Eigen::Matrix< T, 1, Eigen::Dynamic > &x, size_t n, const char *error_msg, size_t idx)']]], + ['get_5fbase1_5flhs_2ehpp',['get_base1_lhs.hpp',['../get__base1__lhs_8hpp.html',1,'']]], + ['get_5flp',['get_lp',['../namespacestan_1_1math.html#ac0fd1b6e6ba9738332204bae823dc006',1,'stan::math']]], + ['get_5flp_2ehpp',['get_lp.hpp',['../get__lp_8hpp.html',1,'']]], + ['gevv_5fvvv_5fvari',['gevv_vvv_vari',['../classstan_1_1math_1_1gevv__vvv__vari.html',1,'stan::math']]], + ['gevv_5fvvv_5fvari',['gevv_vvv_vari',['../classstan_1_1math_1_1gevv__vvv__vari.html#af573bcde4dada4aa9bc27fd9dfcff9c9',1,'stan::math::gevv_vvv_vari']]], + ['gevv_5fvvv_5fvari_2ehpp',['gevv_vvv_vari.hpp',['../gevv__vvv__vari_8hpp.html',1,'']]], + ['grad',['grad',['../classstan_1_1math_1_1var.html#afd46b70001b3e7d5de80a2883ba71fae',1,'stan::math::var::grad(std::vector< var > &x, std::vector< double > &g)'],['../classstan_1_1math_1_1var.html#a1070c041b598347663bbff358cbc2d37',1,'stan::math::var::grad()'],['../namespacestan_1_1math.html#ae6c32f9b52bef3a296432df037f96af3',1,'stan::math::grad(chainable *vi)'],['../namespacestan_1_1math.html#ae6c32f9b52bef3a296432df037f96af3',1,'stan::math::grad(chainable *vi)'],['../namespacestan_1_1math.html#a78c351f7c1ef5ea39c047fe102f70da3',1,'stan::math::grad(var &v, Eigen::Matrix< var, Eigen::Dynamic, 1 > &x, Eigen::VectorXd &g)']]], + ['grad_2ehpp',['grad.hpp',['../core_2grad_8hpp.html',1,'']]], + ['grad_2ehpp',['grad.hpp',['../mat_2fun_2grad_8hpp.html',1,'']]], + ['grad_5f2f1',['grad_2F1',['../namespacestan_1_1math.html#a43226a00b6c2d3f3a2ab5906490f3136',1,'stan::math']]], + ['grad_5f2f1_2ehpp',['grad_2F1.hpp',['../grad__2_f1_8hpp.html',1,'']]], + ['grad_5ff32',['grad_F32',['../namespacestan_1_1math.html#a02dd0b6c85425c2005e265d8e66852a8',1,'stan::math']]], + ['grad_5ff32_2ehpp',['grad_F32.hpp',['../grad___f32_8hpp.html',1,'']]], + ['grad_5fhessian',['grad_hessian',['../namespacestan_1_1math.html#a66e0d2efc95d0241c473938c5850a0a6',1,'stan::math']]], + ['grad_5fhessian_2ehpp',['grad_hessian.hpp',['../grad__hessian_8hpp.html',1,'']]], + ['grad_5finc_5fbeta',['grad_inc_beta',['../namespacestan_1_1math.html#a8fb6dcbe4585fc38ff9374aa5164582f',1,'stan::math::grad_inc_beta(stan::math::fvar< T > &g1, stan::math::fvar< T > &g2, stan::math::fvar< T > a, stan::math::fvar< T > b, stan::math::fvar< T > z)'],['../namespacestan_1_1math.html#a33cb272bd839945c13d7b41058c35c51',1,'stan::math::grad_inc_beta(double &g1, double &g2, double a, double b, double z)'],['../namespacestan_1_1math.html#a25f15a75139ebb4a3b599a1190d39fc1',1,'stan::math::grad_inc_beta(var &g1, var &g2, const var &a, const var &b, const var &z)']]], + ['grad_5finc_5fbeta_2ehpp',['grad_inc_beta.hpp',['../prim_2scal_2fun_2grad__inc__beta_8hpp.html',1,'']]], + ['grad_5finc_5fbeta_2ehpp',['grad_inc_beta.hpp',['../fwd_2scal_2fun_2grad__inc__beta_8hpp.html',1,'']]], + ['grad_5finc_5fbeta_2ehpp',['grad_inc_beta.hpp',['../rev_2scal_2fun_2grad__inc__beta_8hpp.html',1,'']]], + ['grad_5freg_5finc_5fbeta',['grad_reg_inc_beta',['../namespacestan_1_1math.html#a11eeb59eb3ae4f0710a7e417478c1212',1,'stan::math']]], + ['grad_5freg_5finc_5fbeta_2ehpp',['grad_reg_inc_beta.hpp',['../grad__reg__inc__beta_8hpp.html',1,'']]], + ['grad_5freg_5finc_5fgamma',['grad_reg_inc_gamma',['../namespacestan_1_1math.html#a6336e9873f3029f5abe54c4914c71cb2',1,'stan::math']]], + ['grad_5freg_5finc_5fgamma_2ehpp',['grad_reg_inc_gamma.hpp',['../grad__reg__inc__gamma_8hpp.html',1,'']]], + ['grad_5ftr_5fmat_5ftimes_5fhessian',['grad_tr_mat_times_hessian',['../namespacestan_1_1math.html#a53f2f8fea732e1e05f78ed0dd394b33f',1,'stan::math']]], + ['grad_5ftr_5fmat_5ftimes_5fhessian_2ehpp',['grad_tr_mat_times_hessian.hpp',['../grad__tr__mat__times__hessian_8hpp.html',1,'']]], + ['gradient',['gradient',['../namespacestan_1_1math.html#a9cd625b9cec928434683f6c6502094f4',1,'stan::math::gradient(const F &f, const Eigen::Matrix< T, Dynamic, 1 > &x, T &fx, Eigen::Matrix< T, Dynamic, 1 > &grad_fx)'],['../namespacestan_1_1math.html#a42d25361a4bcf7ddb7fdb7edd35b8060',1,'stan::math::gradient(const F &f, const Eigen::Matrix< double, Dynamic, 1 > &x, double &fx, Eigen::Matrix< double, Dynamic, 1 > &grad_fx)']]], + ['gradient_2ehpp',['gradient.hpp',['../rev_2mat_2functor_2gradient_8hpp.html',1,'']]], + ['gradient_2ehpp',['gradient.hpp',['../fwd_2mat_2functor_2gradient_8hpp.html',1,'']]], + ['gradient_5fdot_5fvector',['gradient_dot_vector',['../namespacestan_1_1math.html#a7cf96fceee3cea400cdf078180c61c04',1,'stan::math']]], + ['gradient_5fdot_5fvector_2ehpp',['gradient_dot_vector.hpp',['../gradient__dot__vector_8hpp.html',1,'']]], + ['gradients_5f',['gradients_',['../classstan_1_1math_1_1precomputed__gradients__vari.html#ab1b2c58490560a34da96fee3d4057620',1,'stan::math::precomputed_gradients_vari']]], + ['gumbel_5fccdf_5flog',['gumbel_ccdf_log',['../namespacestan_1_1math.html#a9da900adc6bb1216e99f604001cd4caa',1,'stan::math']]], + ['gumbel_5fccdf_5flog_2ehpp',['gumbel_ccdf_log.hpp',['../gumbel__ccdf__log_8hpp.html',1,'']]], + ['gumbel_5fcdf',['gumbel_cdf',['../namespacestan_1_1math.html#a52ac5bc9a01ebadccc004463b054697c',1,'stan::math']]], + ['gumbel_5fcdf_2ehpp',['gumbel_cdf.hpp',['../gumbel__cdf_8hpp.html',1,'']]], + ['gumbel_5fcdf_5flog',['gumbel_cdf_log',['../namespacestan_1_1math.html#a06f4009f162e58a62a583b84f2d5ccf9',1,'stan::math']]], + ['gumbel_5fcdf_5flog_2ehpp',['gumbel_cdf_log.hpp',['../gumbel__cdf__log_8hpp.html',1,'']]], + ['gumbel_5flog',['gumbel_log',['../namespacestan_1_1math.html#aa5fda97c2d23cb9fd2091e5bd1002e5d',1,'stan::math::gumbel_log(const T_y &y, const T_loc &mu, const T_scale &beta)'],['../namespacestan_1_1math.html#a166ad02fac07d4a084655f8fde1ec2ec',1,'stan::math::gumbel_log(const T_y &y, const T_loc &mu, const T_scale &beta)']]], + ['gumbel_5flog_2ehpp',['gumbel_log.hpp',['../gumbel__log_8hpp.html',1,'']]], + ['gumbel_5frng',['gumbel_rng',['../namespacestan_1_1math.html#afb7ad70ee185c1e0720086617431f71a',1,'stan::math']]], + ['gumbel_5frng_2ehpp',['gumbel_rng.hpp',['../gumbel__rng_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/all_8.html b/doc/api/html/search/all_8.html new file mode 100644 index 00000000000..0179bdd4632 --- /dev/null +++ b/doc/api/html/search/all_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/all_8.js b/doc/api/html/search/all_8.js new file mode 100644 index 00000000000..37c83cdbf8f --- /dev/null +++ b/doc/api/html/search/all_8.js @@ -0,0 +1,23 @@ +var searchData= +[ + ['has_5fdenorm',['has_denorm',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a96150abba41617a326d932898f40a271',1,'std::numeric_limits< stan::math::fvar< T > >::has_denorm()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a0bad4d5dc17300ba94f978bb2fe4b5f0',1,'std::numeric_limits< stan::math::var >::has_denorm()']]], + ['has_5fdenorm_5floss',['has_denorm_loss',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#ac1a4413e08377758bcf63a241e0a69ee',1,'std::numeric_limits< stan::math::fvar< T > >::has_denorm_loss()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a972b6c088d09e9ae9600cd8e7bf84d08',1,'std::numeric_limits< stan::math::var >::has_denorm_loss()']]], + ['has_5finfinity',['has_infinity',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#adf78371272a42d7f5eb8836365c04764',1,'std::numeric_limits< stan::math::fvar< T > >::has_infinity()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a48d4f72d9050f2ffa14e92db913c3f9c',1,'std::numeric_limits< stan::math::var >::has_infinity()']]], + ['has_5fquiet_5fnan',['has_quiet_NaN',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a8e45cb7bac1df9211bedbe9fb7463762',1,'std::numeric_limits< stan::math::fvar< T > >::has_quiet_NaN()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a9fce52f2fab68553a36500922c7b00c7',1,'std::numeric_limits< stan::math::var >::has_quiet_NaN()']]], + ['has_5fsignaling_5fnan',['has_signaling_NaN',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a1638acb74a052c73f6f967df41b48616',1,'std::numeric_limits< stan::math::fvar< T > >::has_signaling_NaN()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a192d5e3131211bc8d64187c98fb791e4',1,'std::numeric_limits< stan::math::var >::has_signaling_NaN()']]], + ['hasfloatingpoint',['HasFloatingPoint',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a768855037a4305f4d90091d81bb92258a331e8b0d5aeefe0c3d552cddade41ae3',1,'Eigen::NumTraits< stan::math::fvar< T > >::HasFloatingPoint()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#afbb9dcc15eb3b86fd1ed8a3ef5158634a725304337ba652873babd17b350f8cdc',1,'Eigen::NumTraits< stan::math::var >::HasFloatingPoint()']]], + ['head',['head',['../namespacestan_1_1math.html#ae824fde6dc6e0f4ac3d37b86fb266414',1,'stan::math::head(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v, size_t n)'],['../namespacestan_1_1math.html#ada1d4ceb7d5aac027e9ec6adcb18755a',1,'stan::math::head(const Eigen::Matrix< T, 1, Eigen::Dynamic > &rv, size_t n)'],['../namespacestan_1_1math.html#a5e746ba14994b318a0a192a97a0a28db',1,'stan::math::head(const std::vector< T > &sv, size_t n)']]], + ['head_2ehpp',['head.hpp',['../head_8hpp.html',1,'']]], + ['hessian',['hessian',['../namespacestan_1_1math.html#a096c5d2b24b7de8a268a02b1f0705b42',1,'stan::math::hessian(const F &f, const Eigen::Matrix< double, Dynamic, 1 > &x, double &fx, Eigen::Matrix< double, Dynamic, 1 > &grad, Eigen::Matrix< double, Dynamic, Dynamic > &H)'],['../namespacestan_1_1math.html#acb8989a5749e54167301ac0720992d08',1,'stan::math::hessian(const F &f, const Eigen::Matrix< T, Dynamic, 1 > &x, T &fx, Eigen::Matrix< T, Dynamic, 1 > &grad, Eigen::Matrix< T, Dynamic, Dynamic > &H)']]], + ['hessian_2ehpp',['hessian.hpp',['../hessian_8hpp.html',1,'']]], + ['hessian_5ftimes_5fvector',['hessian_times_vector',['../namespacestan_1_1math.html#a399d8cf66bb4db2d5139566b9da2c5f3',1,'stan::math::hessian_times_vector(const F &f, const Eigen::Matrix< double, Dynamic, 1 > &x, const Eigen::Matrix< double, Dynamic, 1 > &v, double &fx, Eigen::Matrix< double, Dynamic, 1 > &Hv)'],['../namespacestan_1_1math.html#a1021570cd0ba1864f2f346cf2d78f13e',1,'stan::math::hessian_times_vector(const F &f, const Eigen::Matrix< T, Dynamic, 1 > &x, const Eigen::Matrix< T, Dynamic, 1 > &v, T &fx, Eigen::Matrix< T, Dynamic, 1 > &Hv)']]], + ['hessian_5ftimes_5fvector_2ehpp',['hessian_times_vector.hpp',['../hessian__times__vector_8hpp.html',1,'']]], + ['highest',['highest',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a1412b5d850985532c6901671a1e83996',1,'Eigen::NumTraits< stan::math::fvar< T > >::highest()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#a836253452e51c2bd07cf9f86baadc52e',1,'Eigen::NumTraits< stan::math::var >::highest()']]], + ['hypergeometric_5flog',['hypergeometric_log',['../namespacestan_1_1math.html#acf091835ddc913687ab4d34c3eee662e',1,'stan::math::hypergeometric_log(const T_n &n, const T_N &N, const T_a &a, const T_b &b)'],['../namespacestan_1_1math.html#a28d194254677d4503c2f5d7c6c4f6224',1,'stan::math::hypergeometric_log(const T_n &n, const T_N &N, const T_a &a, const T_b &b)']]], + ['hypergeometric_5flog_2ehpp',['hypergeometric_log.hpp',['../hypergeometric__log_8hpp.html',1,'']]], + ['hypergeometric_5frng',['hypergeometric_rng',['../namespacestan_1_1math.html#a3878889879be4781cc8d560f534ab123',1,'stan::math']]], + ['hypergeometric_5frng_2ehpp',['hypergeometric_rng.hpp',['../hypergeometric__rng_8hpp.html',1,'']]], + ['hypot',['hypot',['../namespacestan_1_1math.html#acd88cd5e3b00b9d099acd2482ca6fbf2',1,'stan::math::hypot(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a490944d221f2b68baf4092667f490ae8',1,'stan::math::hypot(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#afd2f4416bf256405e515c0640dec5fe2',1,'stan::math::hypot(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a0827e995b465dcb291c3de1a77e2b547',1,'stan::math::hypot(const var &a, const var &b)'],['../namespacestan_1_1math.html#abcb40e789140be0e0b93a44e055a6cfc',1,'stan::math::hypot(const var &a, double b)'],['../namespacestan_1_1math.html#a5c9d2305ce89a46a7d182e6014fd0b3f',1,'stan::math::hypot(double a, const var &b)']]], + ['hypot_2ehpp',['hypot.hpp',['../fwd_2scal_2fun_2hypot_8hpp.html',1,'']]], + ['hypot_2ehpp',['hypot.hpp',['../rev_2scal_2fun_2hypot_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/all_9.html b/doc/api/html/search/all_9.html new file mode 100644 index 00000000000..cd46d440567 --- /dev/null +++ b/doc/api/html/search/all_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/all_9.js b/doc/api/html/search/all_9.js new file mode 100644 index 00000000000..31264a2f05a --- /dev/null +++ b/doc/api/html/search/all_9.js @@ -0,0 +1,164 @@ +var searchData= +[ + ['ibeta',['ibeta',['../namespacestan_1_1math.html#af7b430ac57e75ba2d55843cd868506e1',1,'stan::math::ibeta(const double a, const double b, const double x)'],['../namespacestan_1_1math.html#a8c7547dffd79bc54378fb3906345500e',1,'stan::math::ibeta(const var &a, const var &b, const var &x)']]], + ['ibeta_2ehpp',['ibeta.hpp',['../rev_2scal_2fun_2ibeta_8hpp.html',1,'']]], + ['ibeta_2ehpp',['ibeta.hpp',['../prim_2scal_2fun_2ibeta_8hpp.html',1,'']]], + ['identity_5fconstrain',['identity_constrain',['../namespacestan_1_1math.html#afa7ea9a437cf38e48ec72cec173d7465',1,'stan::math::identity_constrain(T x)'],['../namespacestan_1_1math.html#a7925ed2737df76a38ae17c13f85e9141',1,'stan::math::identity_constrain(const T x, T &)']]], + ['identity_5fconstrain_2ehpp',['identity_constrain.hpp',['../identity__constrain_8hpp.html',1,'']]], + ['identity_5ffree',['identity_free',['../namespacestan_1_1math.html#ac50a1ae328bd1f7195b0c77a16a684ab',1,'stan::math']]], + ['identity_5ffree_2ehpp',['identity_free.hpp',['../identity__free_8hpp.html',1,'']]], + ['idx_5f',['idx_',['../rev_2mat_2fun_2log__softmax_8hpp.html#a48e1ddf96b6a9b19ecead9aca544bb31',1,'idx_(): log_softmax.hpp'],['../rev_2mat_2fun_2softmax_8hpp.html#a48e1ddf96b6a9b19ecead9aca544bb31',1,'idx_(): softmax.hpp']]], + ['if_5felse',['if_else',['../namespacestan_1_1math.html#a65e2d3e3ab44f347f3ebaacb67845015',1,'stan::math::if_else(const bool c, const T_true y_true, const T_false y_false)'],['../namespacestan_1_1math.html#abb35d5a60bdc11a5d09eb629c50b5db5',1,'stan::math::if_else(bool c, const var &y_true, const var &y_false)'],['../namespacestan_1_1math.html#abc1dc3a479994402ee1959b75fa2c70f',1,'stan::math::if_else(bool c, double y_true, const var &y_false)'],['../namespacestan_1_1math.html#a09912038470cc9d13d754296b1fe6949',1,'stan::math::if_else(bool c, const var &y_true, const double y_false)']]], + ['if_5felse_2ehpp',['if_else.hpp',['../prim_2scal_2fun_2if__else_8hpp.html',1,'']]], + ['if_5felse_2ehpp',['if_else.hpp',['../rev_2scal_2fun_2if__else_8hpp.html',1,'']]], + ['inc_5fbeta',['inc_beta',['../namespacestan_1_1math.html#af9988ca802426ba048ba5d5d9ad71e2e',1,'stan::math::inc_beta(const fvar< T > &a, const fvar< T > &b, const fvar< T > &x)'],['../namespacestan_1_1math.html#a01192e5a2e1c208f78818b57b4d6aa78',1,'stan::math::inc_beta(const double &a, const double &b, const double &x)'],['../namespacestan_1_1math.html#abf29f2f025873816925c6786842d0afe',1,'stan::math::inc_beta(const stan::math::var &a, const stan::math::var &b, const stan::math::var &c)']]], + ['inc_5fbeta_2ehpp',['inc_beta.hpp',['../fwd_2scal_2fun_2inc__beta_8hpp.html',1,'']]], + ['inc_5fbeta_2ehpp',['inc_beta.hpp',['../prim_2scal_2fun_2inc__beta_8hpp.html',1,'']]], + ['inc_5fbeta_2ehpp',['inc_beta.hpp',['../rev_2scal_2fun_2inc__beta_8hpp.html',1,'']]], + ['inc_5fbeta_5fdda',['inc_beta_dda',['../namespacestan_1_1math.html#a9c265eb14e915edc9bd457e93aaaf166',1,'stan::math']]], + ['inc_5fbeta_5fdda_2ehpp',['inc_beta_dda.hpp',['../inc__beta__dda_8hpp.html',1,'']]], + ['inc_5fbeta_5fddb',['inc_beta_ddb',['../namespacestan_1_1math.html#afc99a6a1e74fd1daeab96f7eeb3b05a8',1,'stan::math']]], + ['inc_5fbeta_5fddb_2ehpp',['inc_beta_ddb.hpp',['../inc__beta__ddb_8hpp.html',1,'']]], + ['inc_5fbeta_5fddz',['inc_beta_ddz',['../namespacestan_1_1math.html#a2412f96d2114b4c15efb1ddbddaef35b',1,'stan::math::inc_beta_ddz(T a, T b, T z)'],['../namespacestan_1_1math.html#a3e5957e2cb19140e6c7bacf5c68320b7',1,'stan::math::inc_beta_ddz(double a, double b, double z)']]], + ['inc_5fbeta_5fddz_2ehpp',['inc_beta_ddz.hpp',['../inc__beta__ddz_8hpp.html',1,'']]], + ['include_5fsummand',['include_summand',['../structstan_1_1math_1_1include__summand.html',1,'stan::math']]], + ['include_5fsummand_2ehpp',['include_summand.hpp',['../include__summand_8hpp.html',1,'']]], + ['index_5ftype',['index_type',['../structstan_1_1math_1_1index__type.html',1,'stan::math']]], + ['index_5ftype_2ehpp',['index_type.hpp',['../mat_2meta_2index__type_8hpp.html',1,'']]], + ['index_5ftype_2ehpp',['index_type.hpp',['../arr_2meta_2index__type_8hpp.html',1,'']]], + ['index_5ftype_2ehpp',['index_type.hpp',['../scal_2meta_2index__type_8hpp.html',1,'']]], + ['index_5ftype_3c_20const_20t_20_3e',['index_type< const T >',['../structstan_1_1math_1_1index__type_3_01const_01_t_01_4.html',1,'stan::math']]], + ['index_5ftype_3c_20eigen_3a_3amatrix_3c_20t_2c_20r_2c_20c_20_3e_20_3e',['index_type< Eigen::Matrix< T, R, C > >',['../structstan_1_1math_1_1index__type_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4.html',1,'stan::math']]], + ['index_5ftype_3c_20std_3a_3avector_3c_20t_20_3e_20_3e',['index_type< std::vector< T > >',['../structstan_1_1math_1_1index__type_3_01std_1_1vector_3_01_t_01_4_01_4.html',1,'stan::math']]], + ['infinity',['infinity',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#afb373d33a5d27f12cc75f8655207fd6b',1,'std::numeric_limits< stan::math::fvar< T > >::infinity()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a124f44266afc97648e4d3cb9f1379090',1,'std::numeric_limits< stan::math::var >::infinity()']]], + ['infty',['INFTY',['../namespacestan_1_1math.html#a7f2ac8ebf3095e9934715bb34f0669b3',1,'stan::math']]], + ['init_5fdependent',['init_dependent',['../classstan_1_1math_1_1chainable.html#ab8163d092584348d410d1866274253ff',1,'stan::math::chainable::init_dependent()'],['../classstan_1_1math_1_1vari.html#a21778f1c5e751d47ede33938a5045a8d',1,'stan::math::vari::init_dependent()']]], + ['initial_5fstate',['initial_state',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html#a6ed6425673c2af35796dcb8ec69b78a2',1,'stan::math::coupled_ode_system< F, double, double >::initial_state()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#a3e039bc430a91652cfa3a25ea104c876',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::initial_state()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#a90f14fa30557743ca18115488de7f59e',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::initial_state()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#aa338d8c630209cd7d8d98334acfa03ba',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::initial_state()']]], + ['initialize',['initialize',['../namespacestan_1_1math.html#af81e05dfd6918524dafff10715f21a8d',1,'stan::math::initialize(T &x, const T &v)'],['../namespacestan_1_1math.html#a5ad7882cc7a7e2e07016e006d2092427',1,'stan::math::initialize(T &x, V v)'],['../namespacestan_1_1math.html#a1cb47e7569cabd57a1c0c6816ca48293',1,'stan::math::initialize(Eigen::Matrix< T, R, C > &x, const V &v)'],['../namespacestan_1_1math.html#ad27706378f77dc22746ad74721d495d4',1,'stan::math::initialize(std::vector< T > &x, const V &v)']]], + ['initialize_2ehpp',['initialize.hpp',['../initialize_8hpp.html',1,'']]], + ['initialize_5fvariable',['initialize_variable',['../namespacestan_1_1math.html#aebdf0a5cd40134110da3230d6fdea989',1,'stan::math::initialize_variable(var &variable, const var &value)'],['../namespacestan_1_1math.html#ad1bb474a393fa5277ff69c9498cb3809',1,'stan::math::initialize_variable(Eigen::Matrix< var, R, C > &matrix, const var &value)'],['../namespacestan_1_1math.html#ada62635d3e2320c9e36ac59a1c4bbdb0',1,'stan::math::initialize_variable(std::vector< T > &variables, const var &value)']]], + ['initialize_5fvariable_2ehpp',['initialize_variable.hpp',['../initialize__variable_8hpp.html',1,'']]], + ['int_5fstep',['int_step',['../namespacestan_1_1math.html#a8c507cff4b7b473cd86e1d428fb03136',1,'stan::math']]], + ['int_5fstep_2ehpp',['int_step.hpp',['../int__step_8hpp.html',1,'']]], + ['integrate_5fode',['integrate_ode',['../namespacestan_1_1math.html#a57c148a430fffb6b4a865d25742b3412',1,'stan::math']]], + ['integrate_5fode_2ehpp',['integrate_ode.hpp',['../integrate__ode_8hpp.html',1,'']]], + ['inv',['inv',['../namespacestan_1_1math.html#a2a5386561ba622e05cb64345fdad6a3b',1,'stan::math::inv(const fvar< T > &x)'],['../namespacestan_1_1math.html#ab64935e0bdac8227bfd9608285d4e699',1,'stan::math::inv(const T x)'],['../namespacestan_1_1math.html#ad0b645189bc4899956bdba20158a0ee6',1,'stan::math::inv(const var &a)']]], + ['inv_2ehpp',['inv.hpp',['../prim_2scal_2fun_2inv_8hpp.html',1,'']]], + ['inv_2ehpp',['inv.hpp',['../rev_2scal_2fun_2inv_8hpp.html',1,'']]], + ['inv_2ehpp',['inv.hpp',['../fwd_2scal_2fun_2inv_8hpp.html',1,'']]], + ['inv_5fchi_5fsquare_5fccdf_5flog',['inv_chi_square_ccdf_log',['../namespacestan_1_1math.html#a24a32a9537cf8218b73109b93379b5b1',1,'stan::math']]], + ['inv_5fchi_5fsquare_5fccdf_5flog_2ehpp',['inv_chi_square_ccdf_log.hpp',['../inv__chi__square__ccdf__log_8hpp.html',1,'']]], + ['inv_5fchi_5fsquare_5fcdf',['inv_chi_square_cdf',['../namespacestan_1_1math.html#a372e143655badb8f25e542697f689f39',1,'stan::math']]], + ['inv_5fchi_5fsquare_5fcdf_2ehpp',['inv_chi_square_cdf.hpp',['../inv__chi__square__cdf_8hpp.html',1,'']]], + ['inv_5fchi_5fsquare_5fcdf_5flog',['inv_chi_square_cdf_log',['../namespacestan_1_1math.html#aae005376416b29d9118470b9c2d18133',1,'stan::math']]], + ['inv_5fchi_5fsquare_5fcdf_5flog_2ehpp',['inv_chi_square_cdf_log.hpp',['../inv__chi__square__cdf__log_8hpp.html',1,'']]], + ['inv_5fchi_5fsquare_5flog',['inv_chi_square_log',['../namespacestan_1_1math.html#aae83a74c666a703da52db606eb478f50',1,'stan::math::inv_chi_square_log(const T_y &y, const T_dof &nu)'],['../namespacestan_1_1math.html#a19b9a4f2fd21b540a7d50a37d23f0869',1,'stan::math::inv_chi_square_log(const T_y &y, const T_dof &nu)']]], + ['inv_5fchi_5fsquare_5flog_2ehpp',['inv_chi_square_log.hpp',['../inv__chi__square__log_8hpp.html',1,'']]], + ['inv_5fchi_5fsquare_5frng',['inv_chi_square_rng',['../namespacestan_1_1math.html#a8159125045ed1c5ee551537c9983921f',1,'stan::math']]], + ['inv_5fchi_5fsquare_5frng_2ehpp',['inv_chi_square_rng.hpp',['../inv__chi__square__rng_8hpp.html',1,'']]], + ['inv_5fcloglog',['inv_cloglog',['../namespacestan_1_1math.html#aba00ed1e73c3a2366226aa4c83e4d8b9',1,'stan::math::inv_cloglog(const fvar< T > &x)'],['../namespacestan_1_1math.html#a008bf0b6c2ab38d088b0aba5d7b10c8d',1,'stan::math::inv_cloglog(T x)'],['../namespacestan_1_1math.html#ab834f530318a33700ba2c66b74ea3bf5',1,'stan::math::inv_cloglog(const stan::math::var &a)']]], + ['inv_5fcloglog_2ehpp',['inv_cloglog.hpp',['../fwd_2scal_2fun_2inv__cloglog_8hpp.html',1,'']]], + ['inv_5fcloglog_2ehpp',['inv_cloglog.hpp',['../prim_2scal_2fun_2inv__cloglog_8hpp.html',1,'']]], + ['inv_5fcloglog_2ehpp',['inv_cloglog.hpp',['../rev_2scal_2fun_2inv__cloglog_8hpp.html',1,'']]], + ['inv_5fgamma_5fccdf_5flog',['inv_gamma_ccdf_log',['../namespacestan_1_1math.html#af2b35d989d0d1a9cb6ea163bbbd14ed3',1,'stan::math']]], + ['inv_5fgamma_5fccdf_5flog_2ehpp',['inv_gamma_ccdf_log.hpp',['../inv__gamma__ccdf__log_8hpp.html',1,'']]], + ['inv_5fgamma_5fcdf',['inv_gamma_cdf',['../namespacestan_1_1math.html#a195c84d2f45abc7bcf28c1d9e3fd8cf8',1,'stan::math']]], + ['inv_5fgamma_5fcdf_2ehpp',['inv_gamma_cdf.hpp',['../inv__gamma__cdf_8hpp.html',1,'']]], + ['inv_5fgamma_5fcdf_5flog',['inv_gamma_cdf_log',['../namespacestan_1_1math.html#a0e622170c7270f1a441235f98248d3a3',1,'stan::math']]], + ['inv_5fgamma_5fcdf_5flog_2ehpp',['inv_gamma_cdf_log.hpp',['../inv__gamma__cdf__log_8hpp.html',1,'']]], + ['inv_5fgamma_5flog',['inv_gamma_log',['../namespacestan_1_1math.html#ad34fa642137e07f723c995d42e78df2c',1,'stan::math::inv_gamma_log(const T_y &y, const T_shape &alpha, const T_scale &beta)'],['../namespacestan_1_1math.html#a2a6c6fb67d4de25708140e5fce64e4f4',1,'stan::math::inv_gamma_log(const T_y &y, const T_shape &alpha, const T_scale &beta)']]], + ['inv_5fgamma_5flog_2ehpp',['inv_gamma_log.hpp',['../inv__gamma__log_8hpp.html',1,'']]], + ['inv_5fgamma_5frng',['inv_gamma_rng',['../namespacestan_1_1math.html#a3222e632ba4aaeb90753a96520799867',1,'stan::math']]], + ['inv_5fgamma_5frng_2ehpp',['inv_gamma_rng.hpp',['../inv__gamma__rng_8hpp.html',1,'']]], + ['inv_5flogit',['inv_logit',['../namespacestan_1_1math.html#a76a22ee34432be58edb4b6ed9469370a',1,'stan::math::inv_logit(const fvar< T > &x)'],['../namespacestan_1_1math.html#ad2c4834fc581f55acf8491ec3f80ecb7',1,'stan::math::inv_logit(const T a)'],['../namespacestan_1_1math.html#ad7d7861511ad7d8a82e17a1e9fa573de',1,'stan::math::inv_logit(const stan::math::var &a)']]], + ['inv_5flogit_2ehpp',['inv_logit.hpp',['../fwd_2scal_2fun_2inv__logit_8hpp.html',1,'']]], + ['inv_5flogit_2ehpp',['inv_logit.hpp',['../prim_2scal_2fun_2inv__logit_8hpp.html',1,'']]], + ['inv_5flogit_2ehpp',['inv_logit.hpp',['../rev_2scal_2fun_2inv__logit_8hpp.html',1,'']]], + ['inv_5fphi',['inv_Phi',['../namespacestan_1_1math.html#a91bcae4b6bdf262f91673bf7b15fea99',1,'stan::math::inv_Phi(const fvar< T > &p)'],['../namespacestan_1_1math.html#a24ce9274d4f9c0ebe500fbe3a0ac4560',1,'stan::math::inv_Phi(double p)'],['../namespacestan_1_1math.html#a3450dbd4a7dae0165e11a40e1b0d4b37',1,'stan::math::inv_Phi(const stan::math::var &p)']]], + ['inv_5fphi_2ehpp',['inv_Phi.hpp',['../fwd_2scal_2fun_2inv___phi_8hpp.html',1,'']]], + ['inv_5fphi_2ehpp',['inv_Phi.hpp',['../prim_2scal_2fun_2inv___phi_8hpp.html',1,'']]], + ['inv_5fphi_2ehpp',['inv_Phi.hpp',['../rev_2scal_2fun_2inv___phi_8hpp.html',1,'']]], + ['inv_5fsqrt',['inv_sqrt',['../namespacestan_1_1math.html#aca2d4971bfd22beacb304bdd5b9d3395',1,'stan::math::inv_sqrt(const fvar< T > &x)'],['../namespacestan_1_1math.html#a4b4db5e98585c71cc7c14319f96e0c04',1,'stan::math::inv_sqrt(const T x)'],['../namespacestan_1_1math.html#a4f3e1382ec567be20643caef30076869',1,'stan::math::inv_sqrt(const var &a)']]], + ['inv_5fsqrt_2ehpp',['inv_sqrt.hpp',['../fwd_2scal_2fun_2inv__sqrt_8hpp.html',1,'']]], + ['inv_5fsqrt_2ehpp',['inv_sqrt.hpp',['../prim_2scal_2fun_2inv__sqrt_8hpp.html',1,'']]], + ['inv_5fsqrt_2ehpp',['inv_sqrt.hpp',['../rev_2scal_2fun_2inv__sqrt_8hpp.html',1,'']]], + ['inv_5fsqrt_5f2',['INV_SQRT_2',['../namespacestan_1_1math.html#a5491e346d5a812af988f8de4a5948c88',1,'stan::math']]], + ['inv_5fsqrt_5ftwo_5fpi',['INV_SQRT_TWO_PI',['../namespacestan_1_1math.html#a44d54686aa26009d0e9101be42afd877',1,'stan::math']]], + ['inv_5fsquare',['inv_square',['../namespacestan_1_1math.html#aa7c1f6b0f3c9f48fa30e09f2d929336d',1,'stan::math::inv_square(const fvar< T > &x)'],['../namespacestan_1_1math.html#a3d2e922aa13e2dfae510fc13d86eaea3',1,'stan::math::inv_square(const T x)'],['../namespacestan_1_1math.html#aa347bbaada35746d4fbd644549416ce3',1,'stan::math::inv_square(const var &a)']]], + ['inv_5fsquare_2ehpp',['inv_square.hpp',['../fwd_2scal_2fun_2inv__square_8hpp.html',1,'']]], + ['inv_5fsquare_2ehpp',['inv_square.hpp',['../prim_2scal_2fun_2inv__square_8hpp.html',1,'']]], + ['inv_5fsquare_2ehpp',['inv_square.hpp',['../rev_2scal_2fun_2inv__square_8hpp.html',1,'']]], + ['inv_5fwishart_5flog',['inv_wishart_log',['../namespacestan_1_1math.html#a56c063912bf059644103aaf8787f71e9',1,'stan::math::inv_wishart_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &W, const T_dof &nu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &S)'],['../namespacestan_1_1math.html#a96f8f9a5add1c91cbe30c887265da81f',1,'stan::math::inv_wishart_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &W, const T_dof &nu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &S)']]], + ['inv_5fwishart_5flog_2ehpp',['inv_wishart_log.hpp',['../inv__wishart__log_8hpp.html',1,'']]], + ['inv_5fwishart_5frng',['inv_wishart_rng',['../namespacestan_1_1math.html#a639b9495c8bb2917100b52b7ed889d3c',1,'stan::math']]], + ['inv_5fwishart_5frng_2ehpp',['inv_wishart_rng.hpp',['../inv__wishart__rng_8hpp.html',1,'']]], + ['invalid_5fargument',['invalid_argument',['../namespacestan_1_1math.html#a9bcb1af5657f92ccadf5204fc43377fd',1,'stan::math::invalid_argument(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)'],['../namespacestan_1_1math.html#aacf5709c614035ef60053a348e18554c',1,'stan::math::invalid_argument(const char *function, const char *name, const T &y, const char *msg1)']]], + ['invalid_5fargument_2ehpp',['invalid_argument.hpp',['../invalid__argument_8hpp.html',1,'']]], + ['invalid_5fargument_5fvec',['invalid_argument_vec',['../namespacestan_1_1math.html#add7b2630385b99ef7045818ba8fe2a97',1,'stan::math::invalid_argument_vec(const char *function, const char *name, const T &y, const size_t i, const char *msg1, const char *msg2)'],['../namespacestan_1_1math.html#a309a8690ee903eea7e5847e4d93483f4',1,'stan::math::invalid_argument_vec(const char *function, const char *name, const T &y, const size_t i, const char *msg)']]], + ['invalid_5fargument_5fvec_2ehpp',['invalid_argument_vec.hpp',['../invalid__argument__vec_8hpp.html',1,'']]], + ['inverse',['inverse',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#a5b44e5dd48e3e8b8dbc4bc7a37b64d86',1,'stan::math::LDLT_factor< T, R, C >::inverse()'],['../namespacestan_1_1math.html#aab64bf2ca0e8e628e49119ed995c1c67',1,'stan::math::inverse(const Eigen::Matrix< fvar< T >, R, C > &m)'],['../namespacestan_1_1math.html#ad621964cbb3b06ba80811cd58e3048a0',1,'stan::math::inverse(const Eigen::Matrix< T, R, C > &m)']]], + ['inverse_2ehpp',['inverse.hpp',['../fwd_2mat_2fun_2inverse_8hpp.html',1,'']]], + ['inverse_2ehpp',['inverse.hpp',['../prim_2mat_2fun_2inverse_8hpp.html',1,'']]], + ['inverse_5fsoftmax',['inverse_softmax',['../namespacestan_1_1math.html#a1edc35cc581dda178263f6a4a4fd1158',1,'stan::math']]], + ['inverse_5fsoftmax_2ehpp',['inverse_softmax.hpp',['../inverse__softmax_8hpp.html',1,'']]], + ['inverse_5fspd',['inverse_spd',['../namespacestan_1_1math.html#a69d2c003918b45e95edb84ea58b84c68',1,'stan::math']]], + ['inverse_5fspd_2ehpp',['inverse_spd.hpp',['../inverse__spd_8hpp.html',1,'']]], + ['is_5faligned',['is_aligned',['../namespacestan_1_1math.html#a7add35b0758b1d0541f7e919c36412f9',1,'stan::math']]], + ['is_5fbounded',['is_bounded',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#ab5deb46224220ecfb8a9376482c9e8ac',1,'std::numeric_limits< stan::math::fvar< T > >::is_bounded()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#ae161cee3b942d452a926a36aec60f299',1,'std::numeric_limits< stan::math::var >::is_bounded()']]], + ['is_5fconstant',['is_constant',['../structstan_1_1is__constant.html',1,'stan']]], + ['is_5fconstant_2ehpp',['is_constant.hpp',['../is__constant_8hpp.html',1,'']]], + ['is_5fconstant_5fstruct',['is_constant_struct',['../structstan_1_1is__constant__struct.html',1,'stan']]], + ['is_5fconstant_5fstruct_2ehpp',['is_constant_struct.hpp',['../is__constant__struct_8hpp.html',1,'']]], + ['is_5fconstant_5fstruct_3c_20eigen_3a_3ablock_3c_20t_20_3e_20_3e',['is_constant_struct< Eigen::Block< T > >',['../structstan_1_1is__constant__struct_3_01_eigen_1_1_block_3_01_t_01_4_01_4.html',1,'stan']]], + ['is_5fconstant_5fstruct_3c_20eigen_3a_3amatrix_3c_20t_2c_20r_2c_20c_20_3e_20_3e',['is_constant_struct< Eigen::Matrix< T, R, C > >',['../structstan_1_1is__constant__struct_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4.html',1,'stan']]], + ['is_5fconstant_5fstruct_3c_20std_3a_3avector_3c_20t_20_3e_20_3e',['is_constant_struct< std::vector< T > >',['../structstan_1_1is__constant__struct_3_01std_1_1vector_3_01_t_01_4_01_4.html',1,'stan']]], + ['is_5fexact',['is_exact',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a90261feaf68874a9040f1d6154cb07d8',1,'std::numeric_limits< stan::math::fvar< T > >::is_exact()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a4ac573b4bf27192ba455fd19e227f9a8',1,'std::numeric_limits< stan::math::var >::is_exact()']]], + ['is_5ffvar',['is_fvar',['../structstan_1_1is__fvar.html',1,'stan']]], + ['is_5ffvar_2ehpp',['is_fvar.hpp',['../fwd_2scal_2meta_2is__fvar_8hpp.html',1,'']]], + ['is_5ffvar_2ehpp',['is_fvar.hpp',['../prim_2scal_2meta_2is__fvar_8hpp.html',1,'']]], + ['is_5ffvar_3c_20stan_3a_3amath_3a_3afvar_3c_20t_20_3e_20_3e',['is_fvar< stan::math::fvar< T > >',['../structstan_1_1is__fvar_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html',1,'stan']]], + ['is_5fiec559',['is_iec559',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a14d89ae2412cdc6332ef210bde59f6b6',1,'std::numeric_limits< stan::math::fvar< T > >::is_iec559()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a6bd55581d326ebf3ed6a1c496db0b9e0',1,'std::numeric_limits< stan::math::var >::is_iec559()']]], + ['is_5finf',['is_inf',['../namespacestan_1_1math.html#ad359149ebad087910f96e62f88287c1f',1,'stan::math::is_inf(const fvar< T > &x)'],['../namespacestan_1_1math.html#ae0020ce04cad9a5eb9b55abb690863fa',1,'stan::math::is_inf(const double x)'],['../namespacestan_1_1math.html#a2c050932da2e90902bda668170379545',1,'stan::math::is_inf(const var &v)']]], + ['is_5finf_2ehpp',['is_inf.hpp',['../rev_2scal_2fun_2is__inf_8hpp.html',1,'']]], + ['is_5finf_2ehpp',['is_inf.hpp',['../fwd_2scal_2fun_2is__inf_8hpp.html',1,'']]], + ['is_5finf_2ehpp',['is_inf.hpp',['../prim_2scal_2fun_2is__inf_8hpp.html',1,'']]], + ['is_5finteger',['is_integer',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#aea8d495294cc702f7a01231a1dac200d',1,'std::numeric_limits< stan::math::fvar< T > >::is_integer()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a77274abe077c86132768f758f855d4de',1,'std::numeric_limits< stan::math::var >::is_integer()']]], + ['is_5fmodulo',['is_modulo',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a32a765f274b13b613d32ba4d134c4744',1,'std::numeric_limits< stan::math::fvar< T > >::is_modulo()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#adf7187f7525889c004c4f82c2ce732df',1,'std::numeric_limits< stan::math::var >::is_modulo()']]], + ['is_5fnan',['is_nan',['../namespacestan_1_1math.html#a921dd9cd85ce1a6fca79c7b07cd80b99',1,'stan::math::is_nan(const fvar< T > &x)'],['../namespacestan_1_1math.html#ae01488df30a81c36b1a00391b9541e1d',1,'stan::math::is_nan(double x)'],['../namespacestan_1_1math.html#acf8ef1e06cddc77c4c56311f937cc183',1,'stan::math::is_nan(const var &v)']]], + ['is_5fnan_2ehpp',['is_nan.hpp',['../prim_2scal_2fun_2is__nan_8hpp.html',1,'']]], + ['is_5fnan_2ehpp',['is_nan.hpp',['../fwd_2scal_2fun_2is__nan_8hpp.html',1,'']]], + ['is_5fnan_2ehpp',['is_nan.hpp',['../rev_2scal_2fun_2is__nan_8hpp.html',1,'']]], + ['is_5fsigned',['is_signed',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#af3bbfcf12af3e66ff24ce68db3bcc1e7',1,'std::numeric_limits< stan::math::fvar< T > >::is_signed()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a63ac9208e3acc5ca9bcdba7e5f56765e',1,'std::numeric_limits< stan::math::var >::is_signed()']]], + ['is_5fspecialized',['is_specialized',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a59a2dde71269caf7efeb7152be6ce533',1,'std::numeric_limits< stan::math::fvar< T > >::is_specialized()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#acd76962ff1fcc794becaaf166d8680a6',1,'std::numeric_limits< stan::math::var >::is_specialized()']]], + ['is_5funinitialized',['is_uninitialized',['../classstan_1_1math_1_1var.html#a255e54d15bd3bda71d3e86ce19bc40ce',1,'stan::math::var::is_uninitialized()'],['../namespacestan_1_1math.html#a40c14c26dc55a985e05695b3ff1eeef2',1,'stan::math::is_uninitialized(T x)'],['../namespacestan_1_1math.html#a2f8d228f0969deddaf2c485f07452fd5',1,'stan::math::is_uninitialized(var x)']]], + ['is_5funinitialized_2ehpp',['is_uninitialized.hpp',['../rev_2scal_2fun_2is__uninitialized_8hpp.html',1,'']]], + ['is_5funinitialized_2ehpp',['is_uninitialized.hpp',['../prim_2scal_2fun_2is__uninitialized_8hpp.html',1,'']]], + ['is_5fvar',['is_var',['../structstan_1_1is__var.html',1,'stan']]], + ['is_5fvar_2ehpp',['is_var.hpp',['../rev_2scal_2meta_2is__var_8hpp.html',1,'']]], + ['is_5fvar_2ehpp',['is_var.hpp',['../prim_2scal_2meta_2is__var_8hpp.html',1,'']]], + ['is_5fvar_3c_20stan_3a_3amath_3a_3avar_20_3e',['is_var< stan::math::var >',['../structstan_1_1is__var_3_01stan_1_1math_1_1var_01_4.html',1,'stan']]], + ['is_5fvar_5for_5farithmetic',['is_var_or_arithmetic',['../structstan_1_1is__var__or__arithmetic.html',1,'stan']]], + ['is_5fvar_5for_5farithmetic_2ehpp',['is_var_or_arithmetic.hpp',['../is__var__or__arithmetic_8hpp.html',1,'']]], + ['is_5fvector',['is_vector',['../structstan_1_1is__vector.html',1,'stan']]], + ['is_5fvector_2ehpp',['is_vector.hpp',['../scal_2meta_2is__vector_8hpp.html',1,'']]], + ['is_5fvector_2ehpp',['is_vector.hpp',['../arr_2meta_2is__vector_8hpp.html',1,'']]], + ['is_5fvector_2ehpp',['is_vector.hpp',['../mat_2meta_2is__vector_8hpp.html',1,'']]], + ['is_5fvector_3c_20const_20t_20_3e',['is_vector< const T >',['../structstan_1_1is__vector_3_01const_01_t_01_4.html',1,'stan']]], + ['is_5fvector_3c_20eigen_3a_3ablock_3c_20t_20_3e_20_3e',['is_vector< Eigen::Block< T > >',['../structstan_1_1is__vector_3_01_eigen_1_1_block_3_01_t_01_4_01_4.html',1,'stan']]], + ['is_5fvector_3c_20eigen_3a_3amatrix_3c_20t_2c_201_2c_20eigen_3a_3adynamic_20_3e_20_3e',['is_vector< Eigen::Matrix< T, 1, Eigen::Dynamic > >',['../structstan_1_1is__vector_3_01_eigen_1_1_matrix_3_01_t_00_011_00_01_eigen_1_1_dynamic_01_4_01_4.html',1,'stan']]], + ['is_5fvector_3c_20eigen_3a_3amatrix_3c_20t_2c_20eigen_3a_3adynamic_2c_201_20_3e_20_3e',['is_vector< Eigen::Matrix< T, Eigen::Dynamic, 1 > >',['../structstan_1_1is__vector_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_011_01_4_01_4.html',1,'stan']]], + ['is_5fvector_3c_20std_3a_3avector_3c_20t_20_3e_20_3e',['is_vector< std::vector< T > >',['../structstan_1_1is__vector_3_01std_1_1vector_3_01_t_01_4_01_4.html',1,'stan']]], + ['is_5fvector_5flike',['is_vector_like',['../structstan_1_1is__vector__like.html',1,'stan']]], + ['is_5fvector_5flike_2ehpp',['is_vector_like.hpp',['../scal_2meta_2is__vector__like_8hpp.html',1,'']]], + ['is_5fvector_5flike_2ehpp',['is_vector_like.hpp',['../mat_2meta_2is__vector__like_8hpp.html',1,'']]], + ['is_5fvector_5flike_3c_20const_20t_20_3e',['is_vector_like< const T >',['../structstan_1_1is__vector__like_3_01const_01_t_01_4.html',1,'stan']]], + ['is_5fvector_5flike_3c_20eigen_3a_3amatrix_3c_20t_2c_20eigen_3a_3adynamic_2c_20eigen_3a_3adynamic_20_3e_20_3e',['is_vector_like< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > >',['../structstan_1_1is__vector__like_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4.html',1,'stan']]], + ['is_5fvector_5flike_3c_20t_20_2a_20_3e',['is_vector_like< T * >',['../structstan_1_1is__vector__like_3_01_t_01_5_01_4.html',1,'stan']]], + ['iscomplex',['IsComplex',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a768855037a4305f4d90091d81bb92258a927bbae55331d3b6f7cb4c78a5fad146',1,'Eigen::NumTraits< stan::math::fvar< T > >::IsComplex()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#afbb9dcc15eb3b86fd1ed8a3ef5158634a9138c6bf5ace7c298c0c3a65d2c4e505',1,'Eigen::NumTraits< stan::math::var >::IsComplex()']]], + ['isfinite',['isfinite',['../namespaceboost_1_1math.html#a99b3c9ca2565e57981ac77d110c0f26d',1,'boost::math']]], + ['isinf',['isinf',['../namespacestd.html#a0bd8de4059fbba0fe38dc56567f2158a',1,'std::isinf()'],['../namespaceboost_1_1math.html#a3d7d6e376e25db9cff72f82ca4c3e684',1,'boost::math::isinf()']]], + ['isinteger',['IsInteger',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a768855037a4305f4d90091d81bb92258a274287a3cdae5ae4d48890ae91d32b4b',1,'Eigen::NumTraits< stan::math::fvar< T > >::IsInteger()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#afbb9dcc15eb3b86fd1ed8a3ef5158634adc43be51c2a6f27df544131c7c87ea00',1,'Eigen::NumTraits< stan::math::var >::IsInteger()']]], + ['isnan',['isnan',['../namespacestd.html#a3a2f34cf599093f31edcc8e056311305',1,'std::isnan()'],['../namespaceboost_1_1math.html#a9ec9f6ad1870e35178068fd12a0d04ea',1,'boost::math::isnan()']]], + ['isnormal',['isnormal',['../namespaceboost_1_1math.html#aa0100dc26ee826099c1d04ddc6cf3c89',1,'boost::math']]], + ['issigned',['IsSigned',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a768855037a4305f4d90091d81bb92258a0bc04ee5f79e5accb84c3ae8b03f2fbc',1,'Eigen::NumTraits< stan::math::fvar< T > >::IsSigned()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#afbb9dcc15eb3b86fd1ed8a3ef5158634a7aa15fd85e5ac1c996ce5ddefa802df0',1,'Eigen::NumTraits< stan::math::var >::IsSigned()']]] +]; diff --git a/doc/api/html/search/all_a.html b/doc/api/html/search/all_a.html new file mode 100644 index 00000000000..eab655301ba --- /dev/null +++ b/doc/api/html/search/all_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/all_a.js b/doc/api/html/search/all_a.js new file mode 100644 index 00000000000..f90fb5e2386 --- /dev/null +++ b/doc/api/html/search/all_a.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['jacobian',['jacobian',['../namespacestan_1_1math.html#a72c855fa18077624b60fb19bfe1045b2',1,'stan::math::jacobian(const F &f, const Eigen::Matrix< T, Dynamic, 1 > &x, Eigen::Matrix< T, Dynamic, 1 > &fx, Eigen::Matrix< T, Dynamic, Dynamic > &J)'],['../namespacestan_1_1math.html#a40cb12dbca88db90b1b3f8654ea193a5',1,'stan::math::jacobian(const F &f, const Eigen::Matrix< double, Dynamic, 1 > &x, Eigen::Matrix< double, Dynamic, 1 > &fx, Eigen::Matrix< double, Dynamic, Dynamic > &J)']]], + ['jacobian_2ehpp',['jacobian.hpp',['../fwd_2mat_2functor_2jacobian_8hpp.html',1,'']]], + ['jacobian_2ehpp',['jacobian.hpp',['../rev_2mat_2functor_2jacobian_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/all_b.html b/doc/api/html/search/all_b.html new file mode 100644 index 00000000000..a2c161e0bde --- /dev/null +++ b/doc/api/html/search/all_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/all_b.js b/doc/api/html/search/all_b.js new file mode 100644 index 00000000000..a40341a3a5d --- /dev/null +++ b/doc/api/html/search/all_b.js @@ -0,0 +1,179 @@ +var searchData= +[ + ['lb_5fconstrain',['lb_constrain',['../namespacestan_1_1math.html#a02477dd575f3d242826df72489faac4c',1,'stan::math::lb_constrain(const T x, const TL lb)'],['../namespacestan_1_1math.html#a8344b3154a81f8601776582238bac99f',1,'stan::math::lb_constrain(const T x, const TL lb, T &lp)']]], + ['lb_5fconstrain_2ehpp',['lb_constrain.hpp',['../lb__constrain_8hpp.html',1,'']]], + ['lb_5ffree',['lb_free',['../namespacestan_1_1math.html#a0e416b7c30dd2ea4fc78254732fa8a52',1,'stan::math']]], + ['lb_5ffree_2ehpp',['lb_free.hpp',['../lb__free_8hpp.html',1,'']]], + ['lbeta',['lbeta',['../namespacestan_1_1math.html#ac51be9d210e223a8aa4241e2d725e295',1,'stan::math::lbeta(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a2ef6e7b5ed43b5410d852961a8050647',1,'stan::math::lbeta(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a00c0745f2a667014a98b6113cc80b2a5',1,'stan::math::lbeta(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#af37c166c79a3e66d101d682b3474f6ab',1,'stan::math::lbeta(const T1 a, const T2 b)']]], + ['lbeta_2ehpp',['lbeta.hpp',['../fwd_2scal_2fun_2lbeta_8hpp.html',1,'']]], + ['lbeta_2ehpp',['lbeta.hpp',['../prim_2scal_2fun_2lbeta_8hpp.html',1,'']]], + ['ldlt_5falloc',['LDLT_alloc',['../classstan_1_1math_1_1_l_d_l_t__alloc.html',1,'stan::math']]], + ['ldlt_5falloc',['LDLT_alloc',['../classstan_1_1math_1_1_l_d_l_t__alloc.html#a5fc32fdc53e7e4c25fdb0343202f1280',1,'stan::math::LDLT_alloc::LDLT_alloc()'],['../classstan_1_1math_1_1_l_d_l_t__alloc.html#a7a68a93a89754c5b566bd5ad2fc9b40e',1,'stan::math::LDLT_alloc::LDLT_alloc(const Eigen::Matrix< var, R, C > &A)']]], + ['ldlt_5falloc_2ehpp',['LDLT_alloc.hpp',['../_l_d_l_t__alloc_8hpp.html',1,'']]], + ['ldlt_5ffactor',['LDLT_factor',['../classstan_1_1math_1_1_l_d_l_t__factor.html',1,'stan::math']]], + ['ldlt_5ffactor',['LDLT_factor',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#a0de1ea9ce3323c55650a7ee9eef34891',1,'stan::math::LDLT_factor< T, R, C >::LDLT_factor()'],['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#acd8fab9a85153322a4b00d8fbf00d7f8',1,'stan::math::LDLT_factor< T, R, C >::LDLT_factor(const Eigen::Matrix< T, R, C > &A)'],['../classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4.html#ade86bbc6c4946e8c2ae0a5e64448bb0c',1,'stan::math::LDLT_factor< stan::math::var, R, C >::LDLT_factor()'],['../classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4.html#a2af6b704a60e27003e78625da2a3065a',1,'stan::math::LDLT_factor< stan::math::var, R, C >::LDLT_factor(const Eigen::Matrix< stan::math::var, R, C > &A)']]], + ['ldlt_5ffactor_2ehpp',['LDLT_factor.hpp',['../prim_2mat_2fun_2_l_d_l_t__factor_8hpp.html',1,'']]], + ['ldlt_5ffactor_2ehpp',['LDLT_factor.hpp',['../rev_2mat_2fun_2_l_d_l_t__factor_8hpp.html',1,'']]], + ['ldlt_5ffactor_3c_20stan_3a_3amath_3a_3avar_2c_20r_2c_20c_20_3e',['LDLT_factor< stan::math::var, R, C >',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4.html',1,'stan::math']]], + ['ldlt_5ffactor_3c_20t_2c_20r_2c_20c_20_3e',['LDLT_factor< T, R, C >',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html',1,'stan::math']]], + ['length',['length',['../namespacestan.html#adb2e0700b1ec87a5e080cd50026b0182',1,'stan::length(const std::vector< T > &x)'],['../namespacestan.html#a12b8544448f77da1a773c7b7c0ebdc01',1,'stan::length(const Eigen::Matrix< T, R, C > &m)'],['../namespacestan.html#a59c48c2ee48c5a6e8048fa2d6a035445',1,'stan::length(const T &)']]], + ['length_2ehpp',['length.hpp',['../mat_2meta_2length_8hpp.html',1,'']]], + ['length_2ehpp',['length.hpp',['../scal_2meta_2length_8hpp.html',1,'']]], + ['length_2ehpp',['length.hpp',['../arr_2meta_2length_8hpp.html',1,'']]], + ['length_5f',['length_',['../classstan_1_1math_1_1sum__v__vari.html#af6d64dee35e248318e7335b4483157c0',1,'stan::math::sum_v_vari::length_()'],['../classstan_1_1math_1_1gevv__vvv__vari.html#a3162ad4ae0b41adf5d342af16e51bad2',1,'stan::math::gevv_vvv_vari::length_()'],['../rev_2mat_2fun_2dot__product_8hpp.html#af0c9b7dcc98dce1d0edf7cb6ce49103b',1,'length_(): dot_product.hpp'],['../rev_2mat_2fun_2squared__distance_8hpp.html#af0c9b7dcc98dce1d0edf7cb6ce49103b',1,'length_(): squared_distance.hpp']]], + ['length_5fmvt',['length_mvt',['../namespacestan.html#add91fbddf46aa1057d3b6c269ae55b7f',1,'stan::length_mvt(const T &)'],['../namespacestan.html#a846e41c458181de76ce756303c68da3c',1,'stan::length_mvt(const Eigen::Matrix< T, R, C > &)'],['../namespacestan.html#a4e27fd808f2599e38dd78ec23e6cdb61',1,'stan::length_mvt(const std::vector< Eigen::Matrix< T, R, C > > &x)']]], + ['length_5fmvt_2ehpp',['length_mvt.hpp',['../length__mvt_8hpp.html',1,'']]], + ['lgamma',['lgamma',['../namespacestan_1_1math.html#aead76f03bdbc60484ad760fc31bad40f',1,'stan::math::lgamma(const fvar< T > &x)'],['../namespacestan_1_1math.html#a836f46d7f63f5118a32cad11382c0551',1,'stan::math::lgamma(double x)'],['../namespacestan_1_1math.html#a21018562738b2bf94984bcb7e1c9865b',1,'stan::math::lgamma(const stan::math::var &a)']]], + ['lgamma_2ehpp',['lgamma.hpp',['../fwd_2scal_2fun_2lgamma_8hpp.html',1,'']]], + ['lgamma_2ehpp',['lgamma.hpp',['../prim_2scal_2fun_2lgamma_8hpp.html',1,'']]], + ['lgamma_2ehpp',['lgamma.hpp',['../rev_2scal_2fun_2lgamma_8hpp.html',1,'']]], + ['lhsscalar',['LhsScalar',['../struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var15f7d538e8be7d782eccb613a7b1e9bd.html#a335fbbc22adeef44a09930c5946a8e31',1,'Eigen::internal::general_matrix_vector_product< Index, stan::math::var, ColMajor, ConjugateLhs, stan::math::var, ConjugateRhs >::LhsScalar()'],['../struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var9294a9f65d48f87d892ffa4de3f3e667.html#a5dd7e6007fb92c2a44027cdbef8a7e92',1,'Eigen::internal::general_matrix_vector_product< Index, stan::math::var, RowMajor, ConjugateLhs, stan::math::var, ConjugateRhs >::LhsScalar()'],['../struct_eigen_1_1internal_1_1general__matrix__matrix__product_3_01_index_00_01stan_1_1math_1_1var1562d71de7db86cb3dfb1784b090bdfc.html#a608aaa8cbb64beb505f0729f2c57667e',1,'Eigen::internal::general_matrix_matrix_product< Index, stan::math::var, LhsStorageOrder, ConjugateLhs, stan::math::var, RhsStorageOrder, ConjugateRhs, ColMajor >::LhsScalar()']]], + ['lhsstorageorder',['LhsStorageOrder',['../struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var15f7d538e8be7d782eccb613a7b1e9bd.html#a762803421099da2b85339c00099d5e2dab916a097ea488839806672c0c220a1db',1,'Eigen::internal::general_matrix_vector_product< Index, stan::math::var, ColMajor, ConjugateLhs, stan::math::var, ConjugateRhs >::LhsStorageOrder()'],['../struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var9294a9f65d48f87d892ffa4de3f3e667.html#a0e66c8428c8c62b75471845733b2cff7af87f397005bde706c888a1069ba3409e',1,'Eigen::internal::general_matrix_vector_product< Index, stan::math::var, RowMajor, ConjugateLhs, stan::math::var, ConjugateRhs >::LhsStorageOrder()']]], + ['likely',['likely',['../likely_8hpp.html#a217a0bd562b98ae8c2ffce44935351e1',1,'likely.hpp']]], + ['likely_2ehpp',['likely.hpp',['../likely_8hpp.html',1,'']]], + ['lkj_5fcorr_5fcholesky_5flog',['lkj_corr_cholesky_log',['../namespacestan_1_1math.html#a0399f5f1c54dbda27be7f12d7d888e1d',1,'stan::math::lkj_corr_cholesky_log(const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L, const T_shape &eta)'],['../namespacestan_1_1math.html#ac6e9853bf29b95ed22f4342bd2ac1629',1,'stan::math::lkj_corr_cholesky_log(const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L, const T_shape &eta)']]], + ['lkj_5fcorr_5fcholesky_5flog_2ehpp',['lkj_corr_cholesky_log.hpp',['../lkj__corr__cholesky__log_8hpp.html',1,'']]], + ['lkj_5fcorr_5fcholesky_5frng',['lkj_corr_cholesky_rng',['../namespacestan_1_1math.html#a873e4c1def8700568d76f9296bbd8d24',1,'stan::math']]], + ['lkj_5fcorr_5fcholesky_5frng_2ehpp',['lkj_corr_cholesky_rng.hpp',['../lkj__corr__cholesky__rng_8hpp.html',1,'']]], + ['lkj_5fcorr_5flog',['lkj_corr_log',['../namespacestan_1_1math.html#af0cb454dc9397439a74c185da61a3d5e',1,'stan::math::lkj_corr_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const T_shape &eta)'],['../namespacestan_1_1math.html#a015685882d7704cd76e15e5966e42b5e',1,'stan::math::lkj_corr_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const T_shape &eta)']]], + ['lkj_5fcorr_5flog_2ehpp',['lkj_corr_log.hpp',['../lkj__corr__log_8hpp.html',1,'']]], + ['lkj_5fcorr_5frng',['lkj_corr_rng',['../namespacestan_1_1math.html#a7a32027fc9306df3c5a0418fa44826fa',1,'stan::math']]], + ['lkj_5fcorr_5frng_2ehpp',['lkj_corr_rng.hpp',['../lkj__corr__rng_8hpp.html',1,'']]], + ['lkj_5fcov_5flog',['lkj_cov_log',['../namespacestan_1_1math.html#a4d5d029cbf5c052432705dc9ad334df6',1,'stan::math::lkj_cov_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_scale, Eigen::Dynamic, 1 > &sigma, const T_shape &eta)'],['../namespacestan_1_1math.html#a3cfaea69c195f4531f7688a19fc7bd14',1,'stan::math::lkj_cov_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_scale, Eigen::Dynamic, 1 > &sigma, const T_shape &eta)'],['../namespacestan_1_1math.html#a5295c9eddd1e8643bb1c9fa0fb284917',1,'stan::math::lkj_cov_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const T_loc &mu, const T_scale &sigma, const T_shape &eta)'],['../namespacestan_1_1math.html#ab0a8d3846d804d39d6f0883e54aa2c7e',1,'stan::math::lkj_cov_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const T_loc &mu, const T_scale &sigma, const T_shape &eta)']]], + ['lkj_5fcov_5flog_2ehpp',['lkj_cov_log.hpp',['../lkj__cov__log_8hpp.html',1,'']]], + ['lmgamma',['lmgamma',['../namespacestan_1_1math.html#ad46d6e08f7b6e9b9e8941572d30b104e',1,'stan::math::lmgamma(int x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a0ee0706b2cb6d2e1da2c3b6041c06a56',1,'stan::math::lmgamma(const int k, T x)'],['../namespacestan_1_1math.html#a3f77e1a76bdde13d243f68d45c1d392b',1,'stan::math::lmgamma(int a, const stan::math::var &b)']]], + ['lmgamma_2ehpp',['lmgamma.hpp',['../fwd_2scal_2fun_2lmgamma_8hpp.html',1,'']]], + ['lmgamma_2ehpp',['lmgamma.hpp',['../prim_2scal_2fun_2lmgamma_8hpp.html',1,'']]], + ['lmgamma_2ehpp',['lmgamma.hpp',['../rev_2scal_2fun_2lmgamma_8hpp.html',1,'']]], + ['log',['log',['../namespacestan_1_1math.html#a915ada1e5971c467aa16ee926997a442',1,'stan::math::log(const fvar< T > &x)'],['../namespacestan_1_1math.html#ac3b52b30a04e9a9f216b49ef06ab7a61',1,'stan::math::log(const Eigen::Matrix< T, Rows, Cols > &m)'],['../namespacestan_1_1math.html#a8a236280de2603e0ead1966468f0ceea',1,'stan::math::log(const var &a)']]], + ['log_2ehpp',['log.hpp',['../fwd_2scal_2fun_2log_8hpp.html',1,'']]], + ['log_2ehpp',['log.hpp',['../prim_2mat_2fun_2log_8hpp.html',1,'']]], + ['log_2ehpp',['log.hpp',['../rev_2scal_2fun_2log_8hpp.html',1,'']]], + ['log10',['log10',['../namespacestan_1_1math.html#a808cbb5ac4003f28e2538805ebe338ef',1,'stan::math::log10(const fvar< T > &x)'],['../namespacestan_1_1math.html#a21f4f7c092e2bc9a089885628b86c004',1,'stan::math::log10()'],['../namespacestan_1_1math.html#af56e2f9808a531946681d3644307edeb',1,'stan::math::log10(const var &a)']]], + ['log10_2ehpp',['log10.hpp',['../rev_2scal_2fun_2log10_8hpp.html',1,'']]], + ['log10_2ehpp',['log10.hpp',['../fwd_2scal_2fun_2log10_8hpp.html',1,'']]], + ['log1m',['log1m',['../namespacestan_1_1math.html#a8d92a982acd829e77b3f5b975baa6aed',1,'stan::math::log1m(const fvar< T > &x)'],['../namespacestan_1_1math.html#a4f92092fb8a70b31d00898bbbe769612',1,'stan::math::log1m(T x)'],['../namespacestan_1_1math.html#a5aaee0104c1b99038dda2dbb769abae1',1,'stan::math::log1m(const stan::math::var &a)']]], + ['log1m_2ehpp',['log1m.hpp',['../fwd_2scal_2fun_2log1m_8hpp.html',1,'']]], + ['log1m_2ehpp',['log1m.hpp',['../prim_2scal_2fun_2log1m_8hpp.html',1,'']]], + ['log1m_2ehpp',['log1m.hpp',['../rev_2scal_2fun_2log1m_8hpp.html',1,'']]], + ['log1m_5fexp',['log1m_exp',['../namespacestan_1_1math.html#a7760d28e8fddf268113469b44463de07',1,'stan::math::log1m_exp(const fvar< T > &x)'],['../namespacestan_1_1math.html#a3ce261caf05bd371c430e82a0e6389a5',1,'stan::math::log1m_exp(const T a)'],['../namespacestan_1_1math.html#aab62e8d3067ce13dea1b2ee4f38618b1',1,'stan::math::log1m_exp(const stan::math::var &a)']]], + ['log1m_5fexp_2ehpp',['log1m_exp.hpp',['../fwd_2scal_2fun_2log1m__exp_8hpp.html',1,'']]], + ['log1m_5fexp_2ehpp',['log1m_exp.hpp',['../prim_2scal_2fun_2log1m__exp_8hpp.html',1,'']]], + ['log1m_5fexp_2ehpp',['log1m_exp.hpp',['../rev_2scal_2fun_2log1m__exp_8hpp.html',1,'']]], + ['log1m_5finv_5flogit',['log1m_inv_logit',['../namespacestan_1_1math.html#a79f286f8a9043aee8a1a844493da0d55',1,'stan::math::log1m_inv_logit(const fvar< T > &x)'],['../namespacestan_1_1math.html#ac7f71c696a5e0da4daab30e5f3704842',1,'stan::math::log1m_inv_logit(const T u)']]], + ['log1m_5finv_5flogit_2ehpp',['log1m_inv_logit.hpp',['../fwd_2scal_2fun_2log1m__inv__logit_8hpp.html',1,'']]], + ['log1m_5finv_5flogit_2ehpp',['log1m_inv_logit.hpp',['../prim_2scal_2fun_2log1m__inv__logit_8hpp.html',1,'']]], + ['log1p',['log1p',['../namespacestan_1_1math.html#aa16e57e82fb1e17f74ef43592748ff32',1,'stan::math::log1p(const fvar< T > &x)'],['../namespacestan_1_1math.html#a5166d3c58ad8ce0aedbf104179888b69',1,'stan::math::log1p(const T x)'],['../namespacestan_1_1math.html#a9851bec44891899ceacfc17ef6e86b21',1,'stan::math::log1p(const stan::math::var &a)']]], + ['log1p_2ehpp',['log1p.hpp',['../fwd_2scal_2fun_2log1p_8hpp.html',1,'']]], + ['log1p_2ehpp',['log1p.hpp',['../prim_2scal_2fun_2log1p_8hpp.html',1,'']]], + ['log1p_2ehpp',['log1p.hpp',['../rev_2scal_2fun_2log1p_8hpp.html',1,'']]], + ['log1p_5fexp',['log1p_exp',['../namespacestan_1_1math.html#a0fe928ad2b96b802f6d488ba43167489',1,'stan::math::log1p_exp(const fvar< T > &x)'],['../namespacestan_1_1math.html#a88151def26813dec3e04c4a8b9674091',1,'stan::math::log1p_exp(const T a)'],['../namespacestan_1_1math.html#abaffb88be27fafab634c74e14508e0f3',1,'stan::math::log1p_exp(const stan::math::var &a)']]], + ['log1p_5fexp_2ehpp',['log1p_exp.hpp',['../fwd_2scal_2fun_2log1p__exp_8hpp.html',1,'']]], + ['log1p_5fexp_2ehpp',['log1p_exp.hpp',['../prim_2scal_2fun_2log1p__exp_8hpp.html',1,'']]], + ['log1p_5fexp_2ehpp',['log1p_exp.hpp',['../rev_2scal_2fun_2log1p__exp_8hpp.html',1,'']]], + ['log2',['log2',['../namespacestan_1_1math.html#a4eea39b4ca603cff7518068499884364',1,'stan::math::log2(const fvar< T > &x)'],['../namespacestan_1_1math.html#aa25e1572bf46e3a6b9ee270f0c7e2c4d',1,'stan::math::log2(const T a)'],['../namespacestan_1_1math.html#a947ba3fe3c87293f7c57395007100c79',1,'stan::math::log2()'],['../namespacestan_1_1math.html#a6322be7704b2efc1e36951b46bb88568',1,'stan::math::log2(const stan::math::var &a)']]], + ['log2_2ehpp',['log2.hpp',['../fwd_2scal_2fun_2log2_8hpp.html',1,'']]], + ['log2_2ehpp',['log2.hpp',['../prim_2scal_2fun_2log2_8hpp.html',1,'']]], + ['log2_2ehpp',['log2.hpp',['../rev_2scal_2fun_2log2_8hpp.html',1,'']]], + ['log_5f10',['LOG_10',['../namespacestan_1_1math.html#ab773773e2db53015eb48ab1730816fb5',1,'stan::math']]], + ['log_5f2',['LOG_2',['../namespacestan_1_1math.html#a43fb48f0a7f26bc60c1dfb572283b149',1,'stan::math']]], + ['log_5fabs_5fdet',['log_abs_det',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#a4762da221ad734ac0d1572df6a16de9c',1,'stan::math::LDLT_factor< T, R, C >::log_abs_det()'],['../classstan_1_1math_1_1_l_d_l_t__alloc.html#ab5039b38ec6d0cf6fb6ef49f4d837ce3',1,'stan::math::LDLT_alloc::log_abs_det()']]], + ['log_5fdeterminant',['log_determinant',['../namespacestan_1_1math.html#a6f88bd206be351748e56aebf7e58289a',1,'stan::math::log_determinant(const Eigen::Matrix< fvar< T >, R, C > &m)'],['../namespacestan_1_1math.html#aca29dad18932e3ca17ac52fd0238b364',1,'stan::math::log_determinant(const Eigen::Matrix< T, R, C > &m)'],['../namespacestan_1_1math.html#ae83dcd77f80cb38f31af8c5284370112',1,'stan::math::log_determinant(const Eigen::Matrix< var, R, C > &m)']]], + ['log_5fdeterminant_2ehpp',['log_determinant.hpp',['../rev_2mat_2fun_2log__determinant_8hpp.html',1,'']]], + ['log_5fdeterminant_2ehpp',['log_determinant.hpp',['../fwd_2mat_2fun_2log__determinant_8hpp.html',1,'']]], + ['log_5fdeterminant_2ehpp',['log_determinant.hpp',['../prim_2mat_2fun_2log__determinant_8hpp.html',1,'']]], + ['log_5fdeterminant_5fldlt',['log_determinant_ldlt',['../namespacestan_1_1math.html#a1d95f632b80e8653fe5891209bdeda45',1,'stan::math::log_determinant_ldlt(stan::math::LDLT_factor< T, R, C > &A)'],['../namespacestan_1_1math.html#acc785decbbbee8de2a2b8f2df9715d48',1,'stan::math::log_determinant_ldlt(stan::math::LDLT_factor< var, R, C > &A)']]], + ['log_5fdeterminant_5fldlt_2ehpp',['log_determinant_ldlt.hpp',['../prim_2mat_2fun_2log__determinant__ldlt_8hpp.html',1,'']]], + ['log_5fdeterminant_5fldlt_2ehpp',['log_determinant_ldlt.hpp',['../rev_2mat_2fun_2log__determinant__ldlt_8hpp.html',1,'']]], + ['log_5fdeterminant_5fspd',['log_determinant_spd',['../namespacestan_1_1math.html#ae9a296d4414d0193108c70b350a05cfc',1,'stan::math::log_determinant_spd(const Eigen::Matrix< T, R, C > &m)'],['../namespacestan_1_1math.html#a18ff74da7a827b5e433fc8d65d8b73e9',1,'stan::math::log_determinant_spd(const Eigen::Matrix< var, R, C > &m)']]], + ['log_5fdeterminant_5fspd_2ehpp',['log_determinant_spd.hpp',['../prim_2mat_2fun_2log__determinant__spd_8hpp.html',1,'']]], + ['log_5fdeterminant_5fspd_2ehpp',['log_determinant_spd.hpp',['../rev_2mat_2fun_2log__determinant__spd_8hpp.html',1,'']]], + ['log_5fdiff_5fexp',['log_diff_exp',['../namespacestan_1_1math.html#a1ba84f8c43b399f555647a0402a710ef',1,'stan::math::log_diff_exp(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a34180da33deb01d13fcf6c5907d1309e',1,'stan::math::log_diff_exp(const T1 &x1, const fvar< T2 > &x2)'],['../namespacestan_1_1math.html#a246fe73ae519573f2232d2f44ac379be',1,'stan::math::log_diff_exp(const fvar< T1 > &x1, const T2 &x2)'],['../namespacestan_1_1math.html#a685dbad032c2794fbc8bca7f44119eab',1,'stan::math::log_diff_exp(const T1 x, const T2 y)'],['../namespacestan_1_1math.html#a43fccfff5553aa860351a147ab10e301',1,'stan::math::log_diff_exp(const stan::math::var &a, const stan::math::var &b)'],['../namespacestan_1_1math.html#a7a09bd43a4ade10703b6a1fb521d09e8',1,'stan::math::log_diff_exp(const stan::math::var &a, const double &b)'],['../namespacestan_1_1math.html#a03afe35a61cd6068465799e22d600879',1,'stan::math::log_diff_exp(const double &a, const stan::math::var &b)']]], + ['log_5fdiff_5fexp_2ehpp',['log_diff_exp.hpp',['../fwd_2scal_2fun_2log__diff__exp_8hpp.html',1,'']]], + ['log_5fdiff_5fexp_2ehpp',['log_diff_exp.hpp',['../prim_2scal_2fun_2log__diff__exp_8hpp.html',1,'']]], + ['log_5fdiff_5fexp_2ehpp',['log_diff_exp.hpp',['../rev_2scal_2fun_2log__diff__exp_8hpp.html',1,'']]], + ['log_5ffalling_5ffactorial',['log_falling_factorial',['../namespacestan_1_1math.html#a58e4116dfd00db87062ef7c0f76e8c27',1,'stan::math::log_falling_factorial(const fvar< T > &x, const fvar< T > &n)'],['../namespacestan_1_1math.html#a3f457257e68af25bdccd60c4da5c1449',1,'stan::math::log_falling_factorial(const double x, const fvar< T > &n)'],['../namespacestan_1_1math.html#a50150f9605147c167f749bf31c9e42a2',1,'stan::math::log_falling_factorial(const fvar< T > &x, const double n)'],['../namespacestan_1_1math.html#afd407ae0bf698d58b8e59e580749e705',1,'stan::math::log_falling_factorial(const T1 x, const T2 n)'],['../namespacestan_1_1math.html#a6f5951b9e0e640a8f2f53348015387c4',1,'stan::math::log_falling_factorial(const var &a, const double &b)'],['../namespacestan_1_1math.html#a1a6fbe2cf74d7dc89d10999d512c3efd',1,'stan::math::log_falling_factorial(const var &a, const var &b)'],['../namespacestan_1_1math.html#a599bc1031e28ecc3cc192b07bdced6ed',1,'stan::math::log_falling_factorial(const double &a, const var &b)']]], + ['log_5ffalling_5ffactorial_2ehpp',['log_falling_factorial.hpp',['../fwd_2scal_2fun_2log__falling__factorial_8hpp.html',1,'']]], + ['log_5ffalling_5ffactorial_2ehpp',['log_falling_factorial.hpp',['../prim_2scal_2fun_2log__falling__factorial_8hpp.html',1,'']]], + ['log_5ffalling_5ffactorial_2ehpp',['log_falling_factorial.hpp',['../rev_2scal_2fun_2log__falling__factorial_8hpp.html',1,'']]], + ['log_5fhalf',['LOG_HALF',['../namespacestan_1_1math.html#a84525339d1870944d63c1cce6caa1af1',1,'stan::math']]], + ['log_5finv_5flogit',['log_inv_logit',['../namespacestan_1_1math.html#acd2fe56bce70a04dd11e8a5a32b1b51c',1,'stan::math::log_inv_logit(const fvar< T > &x)'],['../namespacestan_1_1math.html#ad5be889d1ef4284654a04e400f5371a7',1,'stan::math::log_inv_logit(const T &u)']]], + ['log_5finv_5flogit_2ehpp',['log_inv_logit.hpp',['../fwd_2scal_2fun_2log__inv__logit_8hpp.html',1,'']]], + ['log_5finv_5flogit_2ehpp',['log_inv_logit.hpp',['../prim_2scal_2fun_2log__inv__logit_8hpp.html',1,'']]], + ['log_5finv_5flogit_5fdiff',['log_inv_logit_diff',['../namespacestan_1_1math.html#ad4e08116b9ebf4a6592aa9f8fa393669',1,'stan::math']]], + ['log_5fmix',['log_mix',['../namespacestan_1_1math.html#a014f4431773309ae7fd1420b0f6aa99f',1,'stan::math::log_mix(const fvar< T > &theta, const fvar< T > &lambda1, const fvar< T > &lambda2)'],['../namespacestan_1_1math.html#aed956136160f52953529970a3ae4ef40',1,'stan::math::log_mix(const fvar< T > &theta, const fvar< T > &lambda1, const double lambda2)'],['../namespacestan_1_1math.html#a53f58fdf08759c58af217840a92ed4e8',1,'stan::math::log_mix(const fvar< T > &theta, const double lambda1, const fvar< T > &lambda2)'],['../namespacestan_1_1math.html#afd1210cb19932c4552f899d1582929e9',1,'stan::math::log_mix(const double theta, const fvar< T > &lambda1, const fvar< T > &lambda2)'],['../namespacestan_1_1math.html#a780462344be6c31a646da6cfbeb6c421',1,'stan::math::log_mix(const fvar< T > &theta, const double lambda1, const double lambda2)'],['../namespacestan_1_1math.html#aebd9e68e3b8dc002039c1afda1dce392',1,'stan::math::log_mix(const double theta, const fvar< T > &lambda1, const double lambda2)'],['../namespacestan_1_1math.html#a35eaca2241efa84971cb2aaa4efacbb0',1,'stan::math::log_mix(const double theta, const double lambda1, const fvar< T > &lambda2)'],['../namespacestan_1_1math.html#a1b7b9cda7f1b3234cc4b3fc20e595482',1,'stan::math::log_mix(double theta, double lambda1, double lambda2)'],['../namespacestan_1_1math.html#a91f87ac712232f684f398ff5e5865887',1,'stan::math::log_mix(const T_theta &theta, const T_lambda1 &lambda1, const T_lambda2 &lambda2)']]], + ['log_5fmix_2ehpp',['log_mix.hpp',['../fwd_2scal_2fun_2log__mix_8hpp.html',1,'']]], + ['log_5fmix_2ehpp',['log_mix.hpp',['../prim_2scal_2fun_2log__mix_8hpp.html',1,'']]], + ['log_5fmix_2ehpp',['log_mix.hpp',['../rev_2scal_2fun_2log__mix_8hpp.html',1,'']]], + ['log_5fmix_5fpartial_5fhelper',['log_mix_partial_helper',['../namespacestan_1_1math.html#a9c93f2640b5f95b586b9521b09e52c31',1,'stan::math::log_mix_partial_helper(const T_theta &theta, const T_lambda1 &lambda1, const T_lambda2 &lambda2, typename promote_args< T_theta, T_lambda1, T_lambda2 >::type(&partials_array)[N])'],['../namespacestan_1_1math.html#a8b3e6e5267f60e3537dd8bdd0299a3ee',1,'stan::math::log_mix_partial_helper(const double &theta_val, const double &lambda1_val, const double &lambda2_val, double &one_m_exp_lam2_m_lam1, double &one_m_t_prod_exp_lam2_m_lam1, double &one_d_t_plus_one_m_t_prod_exp_lam2_m_lam1)']]], + ['log_5fpi',['LOG_PI',['../namespacestan_1_1math.html#af6dd9cf6abfd8930528d3635890982b1',1,'stan::math']]], + ['log_5fpi_5fover_5ffour',['LOG_PI_OVER_FOUR',['../namespacestan_1_1math.html#a177764626d2378e0d7bdfb26aac187b6',1,'stan::math']]], + ['log_5frising_5ffactorial',['log_rising_factorial',['../namespacestan_1_1math.html#aa4aff0dd42a2b0b33ac55e9a45f35b1e',1,'stan::math::log_rising_factorial(const fvar< T > &x, const fvar< T > &n)'],['../namespacestan_1_1math.html#a08d954744a945ff1f82a27d2eedb887f',1,'stan::math::log_rising_factorial(const fvar< T > &x, const double n)'],['../namespacestan_1_1math.html#a5ab4f0019045b98139b0626204e8f2a2',1,'stan::math::log_rising_factorial(const double x, const fvar< T > &n)'],['../namespacestan_1_1math.html#a05002f0d4de2c84705dc2bbadfce6b6c',1,'stan::math::log_rising_factorial(const T1 x, const T2 n)'],['../namespacestan_1_1math.html#a6353b21fe0f6314e677e0c0ec1d27e2a',1,'stan::math::log_rising_factorial(const var &a, const double &b)'],['../namespacestan_1_1math.html#a57ff05bb4af6475162c98f06f5ccd186',1,'stan::math::log_rising_factorial(const var &a, const var &b)'],['../namespacestan_1_1math.html#a5b4b56e93a461861d24468412ec75a3a',1,'stan::math::log_rising_factorial(const double &a, const var &b)']]], + ['log_5frising_5ffactorial_2ehpp',['log_rising_factorial.hpp',['../fwd_2scal_2fun_2log__rising__factorial_8hpp.html',1,'']]], + ['log_5frising_5ffactorial_2ehpp',['log_rising_factorial.hpp',['../prim_2scal_2fun_2log__rising__factorial_8hpp.html',1,'']]], + ['log_5frising_5ffactorial_2ehpp',['log_rising_factorial.hpp',['../rev_2scal_2fun_2log__rising__factorial_8hpp.html',1,'']]], + ['log_5fsoftmax',['log_softmax',['../namespacestan_1_1math.html#a558975cc79251cd99966f99ed8795ddc',1,'stan::math::log_softmax(const Eigen::Matrix< fvar< T >, Eigen::Dynamic, 1 > &alpha)'],['../namespacestan_1_1math.html#a0f60a82d68ef90f7cd5e9f02f121a5d1',1,'stan::math::log_softmax(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v)'],['../namespacestan_1_1math.html#a443bda462051b08fcd0274c3ae1c73aa',1,'stan::math::log_softmax(const Eigen::Matrix< var, Eigen::Dynamic, 1 > &alpha)']]], + ['log_5fsoftmax_2ehpp',['log_softmax.hpp',['../prim_2mat_2fun_2log__softmax_8hpp.html',1,'']]], + ['log_5fsoftmax_2ehpp',['log_softmax.hpp',['../rev_2mat_2fun_2log__softmax_8hpp.html',1,'']]], + ['log_5fsoftmax_2ehpp',['log_softmax.hpp',['../fwd_2mat_2fun_2log__softmax_8hpp.html',1,'']]], + ['log_5fsqrt_5fpi',['LOG_SQRT_PI',['../namespacestan_1_1math.html#ab836723c882918b6263042bdefa3c0d7',1,'stan::math']]], + ['log_5fsum_5fexp',['log_sum_exp',['../namespacestan_1_1math.html#ac86474622fba4524c529c4b8024e4ceb',1,'stan::math::log_sum_exp(const std::vector< fvar< T > > &v)'],['../namespacestan_1_1math.html#a34a4bb0a8db85be07d98d3b2e2fc96c4',1,'stan::math::log_sum_exp(const Eigen::Matrix< fvar< T >, R, C > &v)'],['../namespacestan_1_1math.html#a177e64b45d304afc52540d776de8dbe1',1,'stan::math::log_sum_exp(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#aa0497ca733bb52ba08323b12ed654bc8',1,'stan::math::log_sum_exp(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#ab43880eef5d3a9017c9ab46fa2d1ef65',1,'stan::math::log_sum_exp(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#a9e67f9b1692743a9db4462e98bb49ef5',1,'stan::math::log_sum_exp(const std::vector< double > &x)'],['../namespacestan_1_1math.html#ac1fb47266493c7da21a6508944d65bdf',1,'stan::math::log_sum_exp(const Eigen::Matrix< double, R, C > &x)'],['../namespacestan_1_1math.html#a554e6f04e24049b7fe6e56f60abbc560',1,'stan::math::log_sum_exp(const T2 &a, const T1 &b)'],['../namespacestan_1_1math.html#add3072490832a96e50ca3143e4226e67',1,'stan::math::log_sum_exp(const std::vector< var > &x)'],['../namespacestan_1_1math.html#aa99a093a231daf213b589a2c96644fd7',1,'stan::math::log_sum_exp(const Eigen::Matrix< var, R, C > &x)'],['../namespacestan_1_1math.html#a50e133913e946710e85efc00306a2610',1,'stan::math::log_sum_exp(const stan::math::var &a, const stan::math::var &b)'],['../namespacestan_1_1math.html#a3c2ea975711d2420728cce2878bca93c',1,'stan::math::log_sum_exp(const stan::math::var &a, const double &b)'],['../namespacestan_1_1math.html#a04418b73a6d6efd660a67d9af4546840',1,'stan::math::log_sum_exp(const double &a, const stan::math::var &b)']]], + ['log_5fsum_5fexp_2ehpp',['log_sum_exp.hpp',['../prim_2arr_2fun_2log__sum__exp_8hpp.html',1,'']]], + ['log_5fsum_5fexp_2ehpp',['log_sum_exp.hpp',['../prim_2mat_2fun_2log__sum__exp_8hpp.html',1,'']]], + ['log_5fsum_5fexp_2ehpp',['log_sum_exp.hpp',['../rev_2scal_2fun_2log__sum__exp_8hpp.html',1,'']]], + ['log_5fsum_5fexp_2ehpp',['log_sum_exp.hpp',['../fwd_2scal_2fun_2log__sum__exp_8hpp.html',1,'']]], + ['log_5fsum_5fexp_2ehpp',['log_sum_exp.hpp',['../prim_2scal_2fun_2log__sum__exp_8hpp.html',1,'']]], + ['log_5fsum_5fexp_2ehpp',['log_sum_exp.hpp',['../fwd_2arr_2fun_2log__sum__exp_8hpp.html',1,'']]], + ['log_5fsum_5fexp_2ehpp',['log_sum_exp.hpp',['../rev_2arr_2fun_2log__sum__exp_8hpp.html',1,'']]], + ['log_5fsum_5fexp_2ehpp',['log_sum_exp.hpp',['../rev_2mat_2fun_2log__sum__exp_8hpp.html',1,'']]], + ['log_5fsum_5fexp_2ehpp',['log_sum_exp.hpp',['../fwd_2mat_2fun_2log__sum__exp_8hpp.html',1,'']]], + ['log_5ftwo',['LOG_TWO',['../namespacestan_1_1math.html#ad7a5d92de812b4b632801cf8e32dbe7d',1,'stan::math']]], + ['log_5ftwo_5fpi',['LOG_TWO_PI',['../namespacestan_1_1math.html#a938e5d349b0ffdfdae9674f9dd4dbebe',1,'stan::math']]], + ['log_5fzero',['LOG_ZERO',['../namespacestan_1_1math.html#acd99e429af3a997976a017d6a580e3f9',1,'stan::math']]], + ['logical_5fand',['logical_and',['../namespacestan_1_1math.html#adc35bab2db89b3ceda66f11e1fa53ec8',1,'stan::math']]], + ['logical_5fand_2ehpp',['logical_and.hpp',['../logical__and_8hpp.html',1,'']]], + ['logical_5feq',['logical_eq',['../namespacestan_1_1math.html#ab2213736b55fd6696fa0120fd3fe72e4',1,'stan::math']]], + ['logical_5feq_2ehpp',['logical_eq.hpp',['../logical__eq_8hpp.html',1,'']]], + ['logical_5fgt',['logical_gt',['../namespacestan_1_1math.html#aba86bfd994302061a0260e1202fca777',1,'stan::math']]], + ['logical_5fgt_2ehpp',['logical_gt.hpp',['../logical__gt_8hpp.html',1,'']]], + ['logical_5fgte',['logical_gte',['../namespacestan_1_1math.html#ac6bb0b8623192207d35e207ea312d8be',1,'stan::math']]], + ['logical_5fgte_2ehpp',['logical_gte.hpp',['../logical__gte_8hpp.html',1,'']]], + ['logical_5flt',['logical_lt',['../namespacestan_1_1math.html#a0b5bd91412749e10933f304b54aef88f',1,'stan::math']]], + ['logical_5flt_2ehpp',['logical_lt.hpp',['../logical__lt_8hpp.html',1,'']]], + ['logical_5flte',['logical_lte',['../namespacestan_1_1math.html#af3649d4c704962c4502cd6220a5e2230',1,'stan::math']]], + ['logical_5flte_2ehpp',['logical_lte.hpp',['../logical__lte_8hpp.html',1,'']]], + ['logical_5fnegation',['logical_negation',['../namespacestan_1_1math.html#aad2fc9ce55dfac079d930335beb7e4a8',1,'stan::math']]], + ['logical_5fnegation_2ehpp',['logical_negation.hpp',['../logical__negation_8hpp.html',1,'']]], + ['logical_5fneq',['logical_neq',['../namespacestan_1_1math.html#a206eb210d8e7e2c718af25c40de8f9d1',1,'stan::math']]], + ['logical_5fneq_2ehpp',['logical_neq.hpp',['../logical__neq_8hpp.html',1,'']]], + ['logical_5for',['logical_or',['../namespacestan_1_1math.html#ac74007e2d5f55d5ae4a308f535869aee',1,'stan::math']]], + ['logical_5for_2ehpp',['logical_or.hpp',['../logical__or_8hpp.html',1,'']]], + ['logistic_5fccdf_5flog',['logistic_ccdf_log',['../namespacestan_1_1math.html#a2fd36ac96595c375db7fddc885c30794',1,'stan::math']]], + ['logistic_5fccdf_5flog_2ehpp',['logistic_ccdf_log.hpp',['../logistic__ccdf__log_8hpp.html',1,'']]], + ['logistic_5fcdf',['logistic_cdf',['../namespacestan_1_1math.html#a1e1ca40295978d785324b33f3a78c96b',1,'stan::math']]], + ['logistic_5fcdf_2ehpp',['logistic_cdf.hpp',['../logistic__cdf_8hpp.html',1,'']]], + ['logistic_5fcdf_5flog',['logistic_cdf_log',['../namespacestan_1_1math.html#a88d9fcb73b6a1d04896031edc0d8e510',1,'stan::math']]], + ['logistic_5fcdf_5flog_2ehpp',['logistic_cdf_log.hpp',['../logistic__cdf__log_8hpp.html',1,'']]], + ['logistic_5flog',['logistic_log',['../namespacestan_1_1math.html#a431d5fcf935535cbe08981286652d57b',1,'stan::math::logistic_log(const T_y &y, const T_loc &mu, const T_scale &sigma)'],['../namespacestan_1_1math.html#a35fdf5c03ed2e39d081df54372622eec',1,'stan::math::logistic_log(const T_y &y, const T_loc &mu, const T_scale &sigma)']]], + ['logistic_5flog_2ehpp',['logistic_log.hpp',['../logistic__log_8hpp.html',1,'']]], + ['logistic_5frng',['logistic_rng',['../namespacestan_1_1math.html#ac9fc8e75fbb17cb5f22079e90fac128b',1,'stan::math']]], + ['logistic_5frng_2ehpp',['logistic_rng.hpp',['../logistic__rng_8hpp.html',1,'']]], + ['logit',['logit',['../namespacestan_1_1math.html#ab025eaf1e6f5c920f69c37e7a7f8b319',1,'stan::math::logit(const fvar< T > &x)'],['../namespacestan_1_1math.html#a53342d0c2cd3a6e440c533070054aca3',1,'stan::math::logit(const T a)']]], + ['logit_2ehpp',['logit.hpp',['../fwd_2scal_2fun_2logit_8hpp.html',1,'']]], + ['logit_2ehpp',['logit.hpp',['../prim_2scal_2fun_2logit_8hpp.html',1,'']]], + ['lognormal_5fccdf_5flog',['lognormal_ccdf_log',['../namespacestan_1_1math.html#afacb0f2c6b58bc55e506f3bfcf9ba829',1,'stan::math']]], + ['lognormal_5fccdf_5flog_2ehpp',['lognormal_ccdf_log.hpp',['../lognormal__ccdf__log_8hpp.html',1,'']]], + ['lognormal_5fcdf',['lognormal_cdf',['../namespacestan_1_1math.html#a9536cc20905aca8f393138adbe71bb73',1,'stan::math']]], + ['lognormal_5fcdf_2ehpp',['lognormal_cdf.hpp',['../lognormal__cdf_8hpp.html',1,'']]], + ['lognormal_5fcdf_5flog',['lognormal_cdf_log',['../namespacestan_1_1math.html#a1a771406ab16c52532e52bebc21c31f6',1,'stan::math']]], + ['lognormal_5fcdf_5flog_2ehpp',['lognormal_cdf_log.hpp',['../lognormal__cdf__log_8hpp.html',1,'']]], + ['lognormal_5flog',['lognormal_log',['../namespacestan_1_1math.html#a623bb0aad5e3d872d52d0443a46ad270',1,'stan::math::lognormal_log(const T_y &y, const T_loc &mu, const T_scale &sigma)'],['../namespacestan_1_1math.html#a2bfc3796274f4ccd677f96792551c127',1,'stan::math::lognormal_log(const T_y &y, const T_loc &mu, const T_scale &sigma)']]], + ['lognormal_5flog_2ehpp',['lognormal_log.hpp',['../lognormal__log_8hpp.html',1,'']]], + ['lognormal_5frng',['lognormal_rng',['../namespacestan_1_1math.html#af5a619e160ca64fff9f2d69b32bf69b6',1,'stan::math']]], + ['lognormal_5frng_2ehpp',['lognormal_rng.hpp',['../lognormal__rng_8hpp.html',1,'']]], + ['lowest',['lowest',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#aaf7446de33e7a3e5f21b4548ccaf5c7a',1,'Eigen::NumTraits< stan::math::fvar< T > >::lowest()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#a4888e98688ab32e913800888a9fe04dc',1,'Eigen::NumTraits< stan::math::var >::lowest()']]], + ['lub_5fconstrain',['lub_constrain',['../namespacestan_1_1math.html#a5cc0ef5cf22dda83988c062b529dc3a6',1,'stan::math::lub_constrain(const T x, TL lb, TU ub)'],['../namespacestan_1_1math.html#ab51cc5fe98ac938435e614765e30655a',1,'stan::math::lub_constrain(const T x, const TL lb, const TU ub, T &lp)']]], + ['lub_5fconstrain_2ehpp',['lub_constrain.hpp',['../lub__constrain_8hpp.html',1,'']]], + ['lub_5ffree',['lub_free',['../namespacestan_1_1math.html#ab9fa09fdc448652a57d364d70d6e88e3',1,'stan::math']]], + ['lub_5ffree_2ehpp',['lub_free.hpp',['../lub__free_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/all_c.html b/doc/api/html/search/all_c.html new file mode 100644 index 00000000000..bdd3ee2c502 --- /dev/null +++ b/doc/api/html/search/all_c.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/all_c.js b/doc/api/html/search/all_c.js new file mode 100644 index 00000000000..cdb180623f3 --- /dev/null +++ b/doc/api/html/search/all_c.js @@ -0,0 +1,114 @@ +var searchData= +[ + ['m_5f',['M_',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html#a75ffbfd056a73814a0a9c766f2ca9280',1,'stan::math::coupled_ode_system< F, double, double >::M_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#ace943e49e8e81900dba84aa7ad248e1d',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::M_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#abd51105f9c70eaa4e41604db57814b5d',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::M_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#abcd5c75ee971a0346ce26db1fb99d8f2',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::M_()'],['../classstan_1_1math_1_1cholesky__decompose__v__vari.html#a79f912f6bd3f5fe607c1da2f496dc546',1,'stan::math::cholesky_decompose_v_vari::M_()'],['../rev_2mat_2fun_2mdivide__left_8hpp.html#ac7022caeebffc39337bdfd893db75983',1,'M_(): mdivide_left.hpp'],['../rev_2mat_2fun_2mdivide__left__ldlt_8hpp.html#ac7022caeebffc39337bdfd893db75983',1,'M_(): mdivide_left_ldlt.hpp'],['../rev_2mat_2fun_2mdivide__left__spd_8hpp.html#ac7022caeebffc39337bdfd893db75983',1,'M_(): mdivide_left_spd.hpp'],['../rev_2mat_2fun_2mdivide__left__tri_8hpp.html#ac7022caeebffc39337bdfd893db75983',1,'M_(): mdivide_left_tri.hpp']]], + ['machine_5fprecision',['machine_precision',['../namespacestan_1_1math.html#a173839dddd0a8ac8afa710b9e3d5008a',1,'stan::math']]], + ['mainpage_2edox',['mainpage.dox',['../mainpage_8dox.html',1,'']]], + ['major_5fversion',['MAJOR_VERSION',['../namespacestan_1_1math.html#a8a063d6b0347cc193b69270211e8aadd',1,'stan::math']]], + ['make_5fnu',['make_nu',['../namespacestan_1_1math.html#a71d39c88943f3fb8e45759c62d68953b',1,'stan::math']]], + ['make_5fnu_2ehpp',['make_nu.hpp',['../make__nu_8hpp.html',1,'']]], + ['math_2ehpp',['math.hpp',['../math_8hpp.html',1,'']]], + ['matrix_5fd',['matrix_d',['../namespacestan_1_1math.html#a735db87876a1e603cdfb3c8b3c41aab6',1,'stan::math']]], + ['matrix_5ffd',['matrix_fd',['../namespacestan_1_1math.html#a12edd55403c6b7a6a7a859aef1990df5',1,'stan::math']]], + ['matrix_5fffd',['matrix_ffd',['../namespacestan_1_1math.html#ac1a8f07814e249e758d3347cbf3ce23f',1,'stan::math']]], + ['matrix_5fffv',['matrix_ffv',['../namespacestan_1_1math.html#af7ad1f7cc49caf90a56fe364405e1187',1,'stan::math']]], + ['matrix_5ffv',['matrix_fv',['../namespacestan_1_1math.html#a401abbdecf03e1aaa673aae55ea22fad',1,'stan::math']]], + ['matrix_5fnormal_5fprec_5flog',['matrix_normal_prec_log',['../namespacestan_1_1math.html#a3feb895ef1190ad6e77185e70a3fa66d',1,'stan::math::matrix_normal_prec_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_Mu, Eigen::Dynamic, Eigen::Dynamic > &Mu, const Eigen::Matrix< T_Sigma, Eigen::Dynamic, Eigen::Dynamic > &Sigma, const Eigen::Matrix< T_D, Eigen::Dynamic, Eigen::Dynamic > &D)'],['../namespacestan_1_1math.html#add509bb48f33e775f906f8e9e0c0c4f9',1,'stan::math::matrix_normal_prec_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_Mu, Eigen::Dynamic, Eigen::Dynamic > &Mu, const Eigen::Matrix< T_Sigma, Eigen::Dynamic, Eigen::Dynamic > &Sigma, const Eigen::Matrix< T_D, Eigen::Dynamic, Eigen::Dynamic > &D)']]], + ['matrix_5fnormal_5fprec_5flog_2ehpp',['matrix_normal_prec_log.hpp',['../matrix__normal__prec__log_8hpp.html',1,'']]], + ['matrix_5ft',['matrix_t',['../classstan_1_1_vector_view_mvt.html#a2c3d0382bf37405f20e83adec38db42e',1,'stan::VectorViewMvt::matrix_t()'],['../classstan_1_1_vector_view_mvt_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html#af2e32ce2c7cafcf155a77b88eae07d65',1,'stan::VectorViewMvt< const T, is_array, throw_if_accessed >::matrix_t()']]], + ['matrix_5fv',['matrix_v',['../namespacestan_1_1math.html#a5eec679edf26abd1fdf8cf56053caf8e',1,'stan::math']]], + ['matrix_5fvari_2ehpp',['matrix_vari.hpp',['../matrix__vari_8hpp.html',1,'']]], + ['matrixldlt',['matrixLDLT',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#a3b6f930baacb4fb2ecca1acf8d104ffb',1,'stan::math::LDLT_factor< T, R, C >']]], + ['max',['max',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a54b8e07a42d555f9783640b49428da2c',1,'std::numeric_limits< stan::math::fvar< T > >::max()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a7ac4e8fcb64946415100aa2ff28799ee',1,'std::numeric_limits< stan::math::var >::max()'],['../namespacestan_1_1math.html#a5da0ef87756d3dbd20ca4ff5a3efa10d',1,'stan::math::max(const std::vector< int > &x)'],['../namespacestan_1_1math.html#acde414919e0e4dcfa72d565679819091',1,'stan::math::max(const std::vector< T > &x)'],['../namespacestan_1_1math.html#ae3f299773dc20e8305fc16df1be8d029',1,'stan::math::max(const Eigen::Matrix< T, R, C > &m)']]], + ['max_2ehpp',['max.hpp',['../max_8hpp.html',1,'']]], + ['max_5fexponent',['max_exponent',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a1537bd90d3b2f97e27229e0c219d0807',1,'std::numeric_limits< stan::math::fvar< T > >::max_exponent()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a4d417e7f57df3e7866b33e606b7a67c4',1,'std::numeric_limits< stan::math::var >::max_exponent()']]], + ['max_5fexponent10',['max_exponent10',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a582122c752ff0b7505c495a5ed7c315b',1,'std::numeric_limits< stan::math::fvar< T > >::max_exponent10()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a314c4f743a150c8d335692086c6ca564',1,'std::numeric_limits< stan::math::var >::max_exponent10()']]], + ['max_5fsize',['max_size',['../namespacestan.html#a8b2c79a3a686dcf90566be8492e1065d',1,'stan::max_size(const T1 &x1, const T2 &x2)'],['../namespacestan.html#ac5ca4bf16c3b5c453162473c67f844bb',1,'stan::max_size(const T1 &x1, const T2 &x2, const T3 &x3)'],['../namespacestan.html#afff0e381090b0d490dc3b23f3eaf8846',1,'stan::max_size(const T1 &x1, const T2 &x2, const T3 &x3, const T4 &x4)']]], + ['max_5fsize_2ehpp',['max_size.hpp',['../max__size_8hpp.html',1,'']]], + ['max_5fsize_5fmvt',['max_size_mvt',['../namespacestan.html#a7abf6526ceb23475508fd42299a7a369',1,'stan::max_size_mvt(const T1 &x1, const T2 &x2)'],['../namespacestan.html#affb43a3cfb08d96ce95ce951e6c9a41b',1,'stan::max_size_mvt(const T1 &x1, const T2 &x2, const T3 &x3)'],['../namespacestan.html#a78263bfb6e683bf6d4f2cf48cec9d875',1,'stan::max_size_mvt(const T1 &x1, const T2 &x2, const T3 &x3, const T4 &x4)']]], + ['max_5fsize_5fmvt_2ehpp',['max_size_mvt.hpp',['../max__size__mvt_8hpp.html',1,'']]], + ['mdivide_5fleft',['mdivide_left',['../namespacestan_1_1math.html#a0f50d0ea5c9343dae0945012924f127c',1,'stan::math::mdivide_left(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)'],['../namespacestan_1_1math.html#a1b9c580ecf4fc5b7a9e7523325a6cbe5',1,'stan::math::mdivide_left(const Eigen::Matrix< double, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)'],['../namespacestan_1_1math.html#a933154f105a6d18864cfca8a8e2ff12c',1,'stan::math::mdivide_left(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)'],['../namespacestan_1_1math.html#a78e254b9ffb28a6fe6820f9f84412907',1,'stan::math::mdivide_left(const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &b)'],['../namespacestan_1_1math.html#aef0d163d45e4ee75444257dea341b731',1,'stan::math::mdivide_left(const Eigen::Matrix< var, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)'],['../namespacestan_1_1math.html#ad6f9550fa3c3a000d8fb1657681d7ecb',1,'stan::math::mdivide_left(const Eigen::Matrix< var, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)'],['../namespacestan_1_1math.html#ad0203466ed040dd643c8b6d4a78d7f53',1,'stan::math::mdivide_left(const Eigen::Matrix< double, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)']]], + ['mdivide_5fleft_2ehpp',['mdivide_left.hpp',['../prim_2mat_2fun_2mdivide__left_8hpp.html',1,'']]], + ['mdivide_5fleft_2ehpp',['mdivide_left.hpp',['../rev_2mat_2fun_2mdivide__left_8hpp.html',1,'']]], + ['mdivide_5fleft_2ehpp',['mdivide_left.hpp',['../fwd_2mat_2fun_2mdivide__left_8hpp.html',1,'']]], + ['mdivide_5fleft_5fldlt',['mdivide_left_ldlt',['../namespacestan_1_1math.html#a63890dd40cd8ad08a55c3b4e8616c741',1,'stan::math::mdivide_left_ldlt(const stan::math::LDLT_factor< double, R1, C1 > &A, const Eigen::Matrix< fvar< T2 >, R2, C2 > &b)'],['../namespacestan_1_1math.html#a8d06ecbc0a8e5cc50c42861bb20f1b0e',1,'stan::math::mdivide_left_ldlt(const stan::math::LDLT_factor< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &b)'],['../namespacestan_1_1math.html#a84f1163f092f8ce7053a67d3d46302ef',1,'stan::math::mdivide_left_ldlt(const stan::math::LDLT_factor< var, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)'],['../namespacestan_1_1math.html#a6a4be1cd5b51a7d2758a75e9541ad042',1,'stan::math::mdivide_left_ldlt(const stan::math::LDLT_factor< var, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)'],['../namespacestan_1_1math.html#aed166703ba12f63c6cad94e0cc5a6f8f',1,'stan::math::mdivide_left_ldlt(const stan::math::LDLT_factor< double, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)']]], + ['mdivide_5fleft_5fldlt_2ehpp',['mdivide_left_ldlt.hpp',['../rev_2mat_2fun_2mdivide__left__ldlt_8hpp.html',1,'']]], + ['mdivide_5fleft_5fldlt_2ehpp',['mdivide_left_ldlt.hpp',['../fwd_2mat_2fun_2mdivide__left__ldlt_8hpp.html',1,'']]], + ['mdivide_5fleft_5fldlt_2ehpp',['mdivide_left_ldlt.hpp',['../prim_2mat_2fun_2mdivide__left__ldlt_8hpp.html',1,'']]], + ['mdivide_5fleft_5fspd',['mdivide_left_spd',['../namespacestan_1_1math.html#af0e78140ced17ce9be79c29b9f23321b',1,'stan::math::mdivide_left_spd(const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &b)'],['../namespacestan_1_1math.html#a1ba7ed90b8091cf3dee35b9d4688cbc0',1,'stan::math::mdivide_left_spd(const Eigen::Matrix< var, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)'],['../namespacestan_1_1math.html#ae3487ef4bdd1b20d8d5e5f7d5ff57738',1,'stan::math::mdivide_left_spd(const Eigen::Matrix< var, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)'],['../namespacestan_1_1math.html#a4b8412be81e5c41c2b59e761476ac82a',1,'stan::math::mdivide_left_spd(const Eigen::Matrix< double, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)']]], + ['mdivide_5fleft_5fspd_2ehpp',['mdivide_left_spd.hpp',['../prim_2mat_2fun_2mdivide__left__spd_8hpp.html',1,'']]], + ['mdivide_5fleft_5fspd_2ehpp',['mdivide_left_spd.hpp',['../rev_2mat_2fun_2mdivide__left__spd_8hpp.html',1,'']]], + ['mdivide_5fleft_5ftri',['mdivide_left_tri',['../namespacestan_1_1math.html#ab9ef591181f40598fd3c012c6e5e354d',1,'stan::math::mdivide_left_tri(const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &b)'],['../namespacestan_1_1math.html#a1e94b2554b4728e4932aded1d71eb026',1,'stan::math::mdivide_left_tri(const Eigen::Matrix< T, R1, C1 > &A)'],['../namespacestan_1_1math.html#a2622a3a81c3faba8fa3c3dfc5f848b48',1,'stan::math::mdivide_left_tri(const Eigen::Matrix< var, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)'],['../namespacestan_1_1math.html#aa1f2d1a3336eefc43a12affb5862e663',1,'stan::math::mdivide_left_tri(const Eigen::Matrix< double, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)'],['../namespacestan_1_1math.html#a318338a3886f5b653a5e5d284db4ce50',1,'stan::math::mdivide_left_tri(const Eigen::Matrix< var, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)']]], + ['mdivide_5fleft_5ftri_2ehpp',['mdivide_left_tri.hpp',['../rev_2mat_2fun_2mdivide__left__tri_8hpp.html',1,'']]], + ['mdivide_5fleft_5ftri_2ehpp',['mdivide_left_tri.hpp',['../prim_2mat_2fun_2mdivide__left__tri_8hpp.html',1,'']]], + ['mdivide_5fleft_5ftri_5flow',['mdivide_left_tri_low',['../namespacestan_1_1math.html#a7eb79c8ce7ae730ba02342b4241aeac1',1,'stan::math::mdivide_left_tri_low(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)'],['../namespacestan_1_1math.html#a98e366981089fe4cd134efa82492ced2',1,'stan::math::mdivide_left_tri_low(const Eigen::Matrix< double, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)'],['../namespacestan_1_1math.html#a5d6c4407f5ae843d0c12e15863591d22',1,'stan::math::mdivide_left_tri_low(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)'],['../namespacestan_1_1math.html#a154c4bb61dd8dce054238940b75aeaac',1,'stan::math::mdivide_left_tri_low(const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &b)'],['../namespacestan_1_1math.html#afdd9357ad5b52be5547eecdde95e968b',1,'stan::math::mdivide_left_tri_low(const Eigen::Matrix< T, R1, C1 > &A)']]], + ['mdivide_5fleft_5ftri_5flow_2ehpp',['mdivide_left_tri_low.hpp',['../fwd_2mat_2fun_2mdivide__left__tri__low_8hpp.html',1,'']]], + ['mdivide_5fleft_5ftri_5flow_2ehpp',['mdivide_left_tri_low.hpp',['../prim_2mat_2fun_2mdivide__left__tri__low_8hpp.html',1,'']]], + ['mdivide_5fright',['mdivide_right',['../namespacestan_1_1math.html#a2ad09daa535a7aeda34199d43a8e9e29',1,'stan::math::mdivide_right(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)'],['../namespacestan_1_1math.html#a56f6566409d59f27b6f3086afeb0b18b',1,'stan::math::mdivide_right(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)'],['../namespacestan_1_1math.html#a9769485dc9f11852020b153b2ffe8bff',1,'stan::math::mdivide_right(const Eigen::Matrix< double, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)'],['../namespacestan_1_1math.html#a3fc8c5bb0af596842ae6cc7f11556f56',1,'stan::math::mdivide_right(const Eigen::Matrix< T1, R1, C1 > &b, const Eigen::Matrix< T2, R2, C2 > &A)']]], + ['mdivide_5fright_2ehpp',['mdivide_right.hpp',['../fwd_2mat_2fun_2mdivide__right_8hpp.html',1,'']]], + ['mdivide_5fright_2ehpp',['mdivide_right.hpp',['../prim_2mat_2fun_2mdivide__right_8hpp.html',1,'']]], + ['mdivide_5fright_5fldlt',['mdivide_right_ldlt',['../namespacestan_1_1math.html#ad9f8ca30a27a0a70d32477a9fb4c4e25',1,'stan::math::mdivide_right_ldlt(const Eigen::Matrix< T1, R1, C1 > &b, const stan::math::LDLT_factor< T2, R2, C2 > &A)'],['../namespacestan_1_1math.html#a1f4edbfe01ea37356acd24cc948425c8',1,'stan::math::mdivide_right_ldlt(const Eigen::Matrix< double, R1, C1 > &b, const stan::math::LDLT_factor< double, R2, C2 > &A)']]], + ['mdivide_5fright_5fldlt_2ehpp',['mdivide_right_ldlt.hpp',['../mdivide__right__ldlt_8hpp.html',1,'']]], + ['mdivide_5fright_5fspd',['mdivide_right_spd',['../namespacestan_1_1math.html#ab73c90537220c0205f5355895a14621c',1,'stan::math']]], + ['mdivide_5fright_5fspd_2ehpp',['mdivide_right_spd.hpp',['../mdivide__right__spd_8hpp.html',1,'']]], + ['mdivide_5fright_5ftri',['mdivide_right_tri',['../namespacestan_1_1math.html#a43a692492445dff37a2594267d530796',1,'stan::math']]], + ['mdivide_5fright_5ftri_2ehpp',['mdivide_right_tri.hpp',['../mdivide__right__tri_8hpp.html',1,'']]], + ['mdivide_5fright_5ftri_5flow',['mdivide_right_tri_low',['../namespacestan_1_1math.html#a5309461c7fc32ca494e80af0722766af',1,'stan::math::mdivide_right_tri_low(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)'],['../namespacestan_1_1math.html#a51cb38185a25a0971268ba6507af8667',1,'stan::math::mdivide_right_tri_low(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)'],['../namespacestan_1_1math.html#a046824a9236dae195f0c0e5eb69dd8a6',1,'stan::math::mdivide_right_tri_low(const Eigen::Matrix< double, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)'],['../namespacestan_1_1math.html#a38aef2711a500bdb997863f0dc6b5d17',1,'stan::math::mdivide_right_tri_low(const Eigen::Matrix< T1, R1, C1 > &b, const Eigen::Matrix< T2, R2, C2 > &A)']]], + ['mdivide_5fright_5ftri_5flow_2ehpp',['mdivide_right_tri_low.hpp',['../fwd_2mat_2fun_2mdivide__right__tri__low_8hpp.html',1,'']]], + ['mdivide_5fright_5ftri_5flow_2ehpp',['mdivide_right_tri_low.hpp',['../prim_2mat_2fun_2mdivide__right__tri__low_8hpp.html',1,'']]], + ['mean',['mean',['../namespacestan_1_1math.html#a3443c4ac994b039a7f055c55c5afa8a3',1,'stan::math::mean(const std::vector< T > &v)'],['../namespacestan_1_1math.html#a8074c0041b93407c473fd26a7c45dc88',1,'stan::math::mean(const Eigen::Matrix< T, R, C > &m)']]], + ['mean_2ehpp',['mean.hpp',['../mean_8hpp.html',1,'']]], + ['memalloc_5f',['memalloc_',['../structstan_1_1math_1_1_autodiff_stack_storage.html#a1397a6cac3999e6be0b4c7a92cfa4c3e',1,'stan::math::AutodiffStackStorage']]], + ['min',['min',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a1f98885d72104f524c0cbccbd7ac3152',1,'std::numeric_limits< stan::math::fvar< T > >::min()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a8d71ee2cb09cc89fbc145616d5123f80',1,'std::numeric_limits< stan::math::var >::min()'],['../namespacestan_1_1math.html#a3f076860549f63d55c0e4985dce78099',1,'stan::math::min(const std::vector< int > &x)'],['../namespacestan_1_1math.html#a9e9c3a01030d96fd4c8f28e2ed8d3d61',1,'stan::math::min(const std::vector< T > &x)'],['../namespacestan_1_1math.html#a86f2380e5c54a549e0f74ffd51204d33',1,'stan::math::min(const Eigen::Matrix< T, R, C > &m)']]], + ['min_2ehpp',['min.hpp',['../min_8hpp.html',1,'']]], + ['min_5fexponent',['min_exponent',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#abe6b4be3af27ba2fa504246bc080c9d6',1,'std::numeric_limits< stan::math::fvar< T > >::min_exponent()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#ac5b86cfb9a7c727c9acecc63d1846f88',1,'std::numeric_limits< stan::math::var >::min_exponent()']]], + ['min_5fexponent10',['min_exponent10',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a18d66a0fb3aedba11174e9dddf46e64a',1,'std::numeric_limits< stan::math::fvar< T > >::min_exponent10()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a3b2ecdc49b475fd7c29e5db504e93993',1,'std::numeric_limits< stan::math::var >::min_exponent10()']]], + ['minor_5fversion',['MINOR_VERSION',['../namespacestan_1_1math.html#a60295ca22b8701af9a3ccf3b607231f4',1,'stan::math']]], + ['minus',['minus',['../namespacestan_1_1math.html#a87b343d6dc12982c2b76c453650c0797',1,'stan::math']]], + ['minus_2ehpp',['minus.hpp',['../minus_8hpp.html',1,'']]], + ['modified_5fbessel_5ffirst_5fkind',['modified_bessel_first_kind',['../namespacestan_1_1math.html#adcb3160540f6fe745abb846df2174742',1,'stan::math::modified_bessel_first_kind(int v, const fvar< T > &z)'],['../namespacestan_1_1math.html#acafecf14b103c7c17da33368d07b1565',1,'stan::math::modified_bessel_first_kind(const int v, const T2 z)'],['../namespacestan_1_1math.html#a5625b66e071a9b57af3f0dd9325c79bd',1,'stan::math::modified_bessel_first_kind(const int &v, const var &a)']]], + ['modified_5fbessel_5ffirst_5fkind_2ehpp',['modified_bessel_first_kind.hpp',['../fwd_2scal_2fun_2modified__bessel__first__kind_8hpp.html',1,'']]], + ['modified_5fbessel_5ffirst_5fkind_2ehpp',['modified_bessel_first_kind.hpp',['../rev_2scal_2fun_2modified__bessel__first__kind_8hpp.html',1,'']]], + ['modified_5fbessel_5ffirst_5fkind_2ehpp',['modified_bessel_first_kind.hpp',['../prim_2scal_2fun_2modified__bessel__first__kind_8hpp.html',1,'']]], + ['modified_5fbessel_5fsecond_5fkind',['modified_bessel_second_kind',['../namespacestan_1_1math.html#a3277f8bf3ed3b3e36a61dedd4ed0449b',1,'stan::math::modified_bessel_second_kind(int v, const fvar< T > &z)'],['../namespacestan_1_1math.html#a72ce86f3db5478cad4666c9cf1d05a6e',1,'stan::math::modified_bessel_second_kind(const int v, const T2 z)'],['../namespacestan_1_1math.html#a1f39f5d25033d6fb49cf875cc18fa956',1,'stan::math::modified_bessel_second_kind(const int &v, const var &a)']]], + ['modified_5fbessel_5fsecond_5fkind_2ehpp',['modified_bessel_second_kind.hpp',['../fwd_2scal_2fun_2modified__bessel__second__kind_8hpp.html',1,'']]], + ['modified_5fbessel_5fsecond_5fkind_2ehpp',['modified_bessel_second_kind.hpp',['../prim_2scal_2fun_2modified__bessel__second__kind_8hpp.html',1,'']]], + ['modified_5fbessel_5fsecond_5fkind_2ehpp',['modified_bessel_second_kind.hpp',['../rev_2scal_2fun_2modified__bessel__second__kind_8hpp.html',1,'']]], + ['modulus',['modulus',['../namespacestan_1_1math.html#afcf62df7cae63f67b1c5c67651bc8dcf',1,'stan::math']]], + ['modulus_2ehpp',['modulus.hpp',['../modulus_8hpp.html',1,'']]], + ['msgs_5f',['msgs_',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html#a9d0ef30c3aeabb040639ffd88416c029',1,'stan::math::coupled_ode_system< F, double, double >::msgs_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#a1d598b9ae88d390a54ed701bc9752999',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::msgs_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#a1a1ce668b29fbe51a12c7af59aad2db4',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::msgs_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#a06205d852a2e980e30107a290f9e5876',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::msgs_()']]], + ['mulcost',['MulCost',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a768855037a4305f4d90091d81bb92258af070b8b29b40c7b0d09de7e7ee843f62',1,'Eigen::NumTraits< stan::math::fvar< T > >::MulCost()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#afbb9dcc15eb3b86fd1ed8a3ef5158634a7a31da528ea371cfe78010d1f09b2130',1,'Eigen::NumTraits< stan::math::var >::MulCost()']]], + ['multi_5fgp_5fcholesky_5flog',['multi_gp_cholesky_log',['../namespacestan_1_1math.html#a07d240bac837d28cf3d5922de0271cf8',1,'stan::math::multi_gp_cholesky_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L, const Eigen::Matrix< T_w, Eigen::Dynamic, 1 > &w)'],['../namespacestan_1_1math.html#a44ed8a0eabcdfa57bc7fde011d30bf8c',1,'stan::math::multi_gp_cholesky_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L, const Eigen::Matrix< T_w, Eigen::Dynamic, 1 > &w)']]], + ['multi_5fgp_5fcholesky_5flog_2ehpp',['multi_gp_cholesky_log.hpp',['../multi__gp__cholesky__log_8hpp.html',1,'']]], + ['multi_5fgp_5flog',['multi_gp_log',['../namespacestan_1_1math.html#a74b27063a645fbb1e20add3cc5f2aed5',1,'stan::math::multi_gp_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &Sigma, const Eigen::Matrix< T_w, Eigen::Dynamic, 1 > &w)'],['../namespacestan_1_1math.html#a3535a644a9ec735e4c5ed0951909d1ab',1,'stan::math::multi_gp_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &Sigma, const Eigen::Matrix< T_w, Eigen::Dynamic, 1 > &w)']]], + ['multi_5fgp_5flog_2ehpp',['multi_gp_log.hpp',['../multi__gp__log_8hpp.html',1,'']]], + ['multi_5fnormal_5fcholesky_5flog',['multi_normal_cholesky_log',['../namespacestan_1_1math.html#a73c48789407296b1fd9497d3e27ef26d',1,'stan::math::multi_normal_cholesky_log(const T_y &y, const T_loc &mu, const T_covar &L)'],['../namespacestan_1_1math.html#af5aed6517d1de44fc193a8bf7b018bfe',1,'stan::math::multi_normal_cholesky_log(const T_y &y, const T_loc &mu, const T_covar &L)']]], + ['multi_5fnormal_5fcholesky_5flog_2ehpp',['multi_normal_cholesky_log.hpp',['../multi__normal__cholesky__log_8hpp.html',1,'']]], + ['multi_5fnormal_5fcholesky_5frng',['multi_normal_cholesky_rng',['../namespacestan_1_1math.html#a0a05ae7884660def13b35c9d3d59a708',1,'stan::math']]], + ['multi_5fnormal_5fcholesky_5frng_2ehpp',['multi_normal_cholesky_rng.hpp',['../multi__normal__cholesky__rng_8hpp.html',1,'']]], + ['multi_5fnormal_5flog',['multi_normal_log',['../namespacestan_1_1math.html#a69fa873591f0954b506eb709537a73f8',1,'stan::math::multi_normal_log(const T_y &y, const T_loc &mu, const T_covar &Sigma)'],['../namespacestan_1_1math.html#a38c98c7961178da90570cb63499eb2b8',1,'stan::math::multi_normal_log(const T_y &y, const T_loc &mu, const T_covar &Sigma)']]], + ['multi_5fnormal_5flog_2ehpp',['multi_normal_log.hpp',['../multi__normal__log_8hpp.html',1,'']]], + ['multi_5fnormal_5fprec_5flog',['multi_normal_prec_log',['../namespacestan_1_1math.html#a83fb51aaff3da3d727bc12a3cdd106c5',1,'stan::math::multi_normal_prec_log(const T_y &y, const T_loc &mu, const T_covar &Sigma)'],['../namespacestan_1_1math.html#a79191e304518140dbaf8feaab2c90aab',1,'stan::math::multi_normal_prec_log(const T_y &y, const T_loc &mu, const T_covar &Sigma)']]], + ['multi_5fnormal_5fprec_5flog_2ehpp',['multi_normal_prec_log.hpp',['../multi__normal__prec__log_8hpp.html',1,'']]], + ['multi_5fnormal_5frng',['multi_normal_rng',['../namespacestan_1_1math.html#a46c260fca0e710ffa12410e53da4cbc0',1,'stan::math']]], + ['multi_5fnormal_5frng_2ehpp',['multi_normal_rng.hpp',['../multi__normal__rng_8hpp.html',1,'']]], + ['multi_5fstudent_5ft_5flog',['multi_student_t_log',['../namespacestan_1_1math.html#ac7b9a72ca7018cbf7883d7104345b4f6',1,'stan::math::multi_student_t_log(const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &Sigma)'],['../namespacestan_1_1math.html#a1e1b7da1cebae4c8db3067f614c777aa',1,'stan::math::multi_student_t_log(const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &Sigma)']]], + ['multi_5fstudent_5ft_5flog_2ehpp',['multi_student_t_log.hpp',['../multi__student__t__log_8hpp.html',1,'']]], + ['multi_5fstudent_5ft_5frng',['multi_student_t_rng',['../namespacestan_1_1math.html#aca9dfb65a8ae0210632ae0c42b2ae5c6',1,'stan::math']]], + ['multi_5fstudent_5ft_5frng_2ehpp',['multi_student_t_rng.hpp',['../multi__student__t__rng_8hpp.html',1,'']]], + ['multinomial_5flog',['multinomial_log',['../namespacestan_1_1math.html#a65b47c026be99de35988287412664e3d',1,'stan::math::multinomial_log(const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)'],['../namespacestan_1_1math.html#ae23c14c3cb5d40c6fa46b89ddc5d5285',1,'stan::math::multinomial_log(const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)']]], + ['multinomial_5flog_2ehpp',['multinomial_log.hpp',['../multinomial__log_8hpp.html',1,'']]], + ['multinomial_5frng',['multinomial_rng',['../namespacestan_1_1math.html#a99ab77cc7ea8b9f49a61abe7576c8331',1,'stan::math']]], + ['multinomial_5frng_2ehpp',['multinomial_rng.hpp',['../multinomial__rng_8hpp.html',1,'']]], + ['multiply',['multiply',['../namespacestan_1_1math.html#a35a69b84ead3c81cbaff702ac429e1cc',1,'stan::math::multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m, const fvar< T > &c)'],['../namespacestan_1_1math.html#aa473aa547cf1bb658edb99fd1182e989',1,'stan::math::multiply(const Eigen::Matrix< fvar< T >, R2, C2 > &m, const double c)'],['../namespacestan_1_1math.html#a81ca3cf29874f3f7a3334b0b7e5db09b',1,'stan::math::multiply(const Eigen::Matrix< double, R1, C1 > &m, const fvar< T > &c)'],['../namespacestan_1_1math.html#a00de5667a1e8f49293a35bcd21e86104',1,'stan::math::multiply(const fvar< T > &c, const Eigen::Matrix< fvar< T >, R1, C1 > &m)'],['../namespacestan_1_1math.html#ad58b9aa1f80267935b6dc1bf57a20090',1,'stan::math::multiply(const double c, const Eigen::Matrix< fvar< T >, R1, C1 > &m)'],['../namespacestan_1_1math.html#a18ef18d2345a17eb4044bb4697c18ca3',1,'stan::math::multiply(const fvar< T > &c, const Eigen::Matrix< double, R1, C1 > &m)'],['../namespacestan_1_1math.html#a79dea45b5f0a70316514dadfa5bd5ea2',1,'stan::math::multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m1, const Eigen::Matrix< fvar< T >, R2, C2 > &m2)'],['../namespacestan_1_1math.html#aa34755674f81a0403550b728a50b390d',1,'stan::math::multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m1, const Eigen::Matrix< double, R2, C2 > &m2)'],['../namespacestan_1_1math.html#a22fc2abfda7f892c5eeb8fec8f8cd765',1,'stan::math::multiply(const Eigen::Matrix< double, R1, C1 > &m1, const Eigen::Matrix< fvar< T >, R2, C2 > &m2)'],['../namespacestan_1_1math.html#a69034d7594d58dd7f6362caa5aebe03d',1,'stan::math::multiply(const Eigen::Matrix< fvar< T >, 1, C1 > &rv, const Eigen::Matrix< fvar< T >, R2, 1 > &v)'],['../namespacestan_1_1math.html#ace64b783b01a987d981c17cbcc33e4b6',1,'stan::math::multiply(const Eigen::Matrix< fvar< T >, 1, C1 > &rv, const Eigen::Matrix< double, R2, 1 > &v)'],['../namespacestan_1_1math.html#a7af8534a80b35c3af6a6cf23cdddd46c',1,'stan::math::multiply(const Eigen::Matrix< double, 1, C1 > &rv, const Eigen::Matrix< fvar< T >, R2, 1 > &v)'],['../namespacestan_1_1math.html#a919d4a6495c489841df3d0423200b147',1,'stan::math::multiply(const Eigen::Matrix< double, R, C > &m, T c)'],['../namespacestan_1_1math.html#a5a2b6dbfb5543b73dac8496091745ec1',1,'stan::math::multiply(T c, const Eigen::Matrix< double, R, C > &m)'],['../namespacestan_1_1math.html#aeefbdef5245cd4f80dcee30d2a36131f',1,'stan::math::multiply(const Eigen::Matrix< double, R1, C1 > &m1, const Eigen::Matrix< double, R2, C2 > &m2)'],['../namespacestan_1_1math.html#a6e67698775aaac248efa49b646ca2a51',1,'stan::math::multiply(const Eigen::Matrix< double, 1, C1 > &rv, const Eigen::Matrix< double, R2, 1 > &v)'],['../namespacestan_1_1math.html#a064999d72ccfe825466a8d35221270c6',1,'stan::math::multiply(const T1 &v, const T2 &c)'],['../namespacestan_1_1math.html#a2287bd9466a58f7df6ca88bf3374c7e9',1,'stan::math::multiply(const T1 &c, const Eigen::Matrix< T2, R2, C2 > &m)'],['../namespacestan_1_1math.html#a0671954ee3596b7ca59ec1e3bf832c63',1,'stan::math::multiply(const Eigen::Matrix< T1, R1, C1 > &m, const T2 &c)'],['../namespacestan_1_1math.html#a6ba7d9d70a0b0c4515d767bcde7d2f66',1,'stan::math::multiply(const Eigen::Matrix< T1, R1, C1 > &m1, const Eigen::Matrix< T2, R2, C2 > &m2)'],['../namespacestan_1_1math.html#aeaecf22fee1b8944975a8124cd294bf0',1,'stan::math::multiply(const Eigen::Matrix< T1, 1, C1 > &rv, const Eigen::Matrix< T2, R2, 1 > &v)']]], + ['multiply_2ehpp',['multiply.hpp',['../fwd_2mat_2fun_2multiply_8hpp.html',1,'']]], + ['multiply_2ehpp',['multiply.hpp',['../prim_2mat_2fun_2multiply_8hpp.html',1,'']]], + ['multiply_2ehpp',['multiply.hpp',['../rev_2mat_2fun_2multiply_8hpp.html',1,'']]], + ['multiply_5flog',['multiply_log',['../namespacestan_1_1math.html#a055efd6bb49a1df5ea4da98d1078d0e6',1,'stan::math::multiply_log(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#abafa25b9871a31fc9bad3b23e43f24e4',1,'stan::math::multiply_log(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#ac0df8fa73f8f9435f44780baa1379dc6',1,'stan::math::multiply_log(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#a0f15d9bf40cdab5e3ef75cea2595244c',1,'stan::math::multiply_log(const T_a a, const T_b b)'],['../namespacestan_1_1math.html#a3da7e77b75bf5f288ddc7c546f941c70',1,'stan::math::multiply_log(const var &a, const var &b)'],['../namespacestan_1_1math.html#aa05bd638024e60440e56c8ee4a0dbab3',1,'stan::math::multiply_log(const var &a, const double b)'],['../namespacestan_1_1math.html#a3c980d72501fd340f6148c125c1da018',1,'stan::math::multiply_log(const double a, const var &b)']]], + ['multiply_5flog_2ehpp',['multiply_log.hpp',['../rev_2scal_2fun_2multiply__log_8hpp.html',1,'']]], + ['multiply_5flog_2ehpp',['multiply_log.hpp',['../prim_2scal_2fun_2multiply__log_8hpp.html',1,'']]], + ['multiply_5flog_2ehpp',['multiply_log.hpp',['../fwd_2scal_2fun_2multiply__log_8hpp.html',1,'']]], + ['multiply_5flower_5ftri_5fself_5ftranspose',['multiply_lower_tri_self_transpose',['../namespacestan_1_1math.html#a0d671dcfc6f4c1b4896c5d8bc4568acf',1,'stan::math::multiply_lower_tri_self_transpose(const Eigen::Matrix< fvar< T >, R, C > &m)'],['../namespacestan_1_1math.html#a3c0c953951f141b35277fe2308777cff',1,'stan::math::multiply_lower_tri_self_transpose(const matrix_d &L)'],['../namespacestan_1_1math.html#a6f4d12daa275a9a471974f6447396266',1,'stan::math::multiply_lower_tri_self_transpose(const matrix_v &L)']]], + ['multiply_5flower_5ftri_5fself_5ftranspose_2ehpp',['multiply_lower_tri_self_transpose.hpp',['../fwd_2mat_2fun_2multiply__lower__tri__self__transpose_8hpp.html',1,'']]], + ['multiply_5flower_5ftri_5fself_5ftranspose_2ehpp',['multiply_lower_tri_self_transpose.hpp',['../prim_2mat_2fun_2multiply__lower__tri__self__transpose_8hpp.html',1,'']]], + ['multiply_5flower_5ftri_5fself_5ftranspose_2ehpp',['multiply_lower_tri_self_transpose.hpp',['../rev_2mat_2fun_2multiply__lower__tri__self__transpose_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/all_d.html b/doc/api/html/search/all_d.html new file mode 100644 index 00000000000..d51093367e6 --- /dev/null +++ b/doc/api/html/search/all_d.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/all_d.js b/doc/api/html/search/all_d.js new file mode 100644 index 00000000000..d9e093da096 --- /dev/null +++ b/doc/api/html/search/all_d.js @@ -0,0 +1,64 @@ +var searchData= +[ + ['n_5f',['n_',['../structstan_1_1math_1_1coupled__ode__observer.html#ad24f4f0e485caa6ca0f4f149624c5109',1,'stan::math::coupled_ode_observer::n_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html#ad90fed9acd912ce41cf2478a0bae8071',1,'stan::math::coupled_ode_system< F, double, double >::N_()'],['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#af6c64c2f48290202674bc63736abf0d9',1,'stan::math::LDLT_factor< T, R, C >::N_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#ac2046745fac3341408eb20d04fbd8340',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::N_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#aa6c3adcb5d16141d88f7c59f57794980',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::N_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#a27a807c37bfbd4c8f0b9fd8674c26d51',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::N_()'],['../classstan_1_1math_1_1_l_d_l_t__alloc.html#a80ff851844006a74407e5958b1aa41a8',1,'stan::math::LDLT_alloc::N_()'],['../rev_2mat_2fun_2mdivide__left_8hpp.html#a733553beee6dadc63ea8c537055a9e04',1,'N_(): mdivide_left.hpp'],['../rev_2mat_2fun_2mdivide__left__ldlt_8hpp.html#a733553beee6dadc63ea8c537055a9e04',1,'N_(): mdivide_left_ldlt.hpp'],['../rev_2mat_2fun_2mdivide__left__spd_8hpp.html#a733553beee6dadc63ea8c537055a9e04',1,'N_(): mdivide_left_spd.hpp'],['../rev_2mat_2fun_2mdivide__left__tri_8hpp.html#a733553beee6dadc63ea8c537055a9e04',1,'N_(): mdivide_left_tri.hpp']]], + ['neg_5fbinomial_5f2_5fccdf_5flog',['neg_binomial_2_ccdf_log',['../namespacestan_1_1math.html#a63d35a349ee49712178c19dde27fcc5d',1,'stan::math']]], + ['neg_5fbinomial_5f2_5fccdf_5flog_2ehpp',['neg_binomial_2_ccdf_log.hpp',['../neg__binomial__2__ccdf__log_8hpp.html',1,'']]], + ['neg_5fbinomial_5f2_5fcdf',['neg_binomial_2_cdf',['../namespacestan_1_1math.html#a6bc7b5ee1f4534f7c6eb509f08c1dd8b',1,'stan::math']]], + ['neg_5fbinomial_5f2_5fcdf_2ehpp',['neg_binomial_2_cdf.hpp',['../neg__binomial__2__cdf_8hpp.html',1,'']]], + ['neg_5fbinomial_5f2_5fcdf_5flog',['neg_binomial_2_cdf_log',['../namespacestan_1_1math.html#ade0a4ada20d2611ea7b7c717bcfd42ad',1,'stan::math']]], + ['neg_5fbinomial_5f2_5fcdf_5flog_2ehpp',['neg_binomial_2_cdf_log.hpp',['../neg__binomial__2__cdf__log_8hpp.html',1,'']]], + ['neg_5fbinomial_5f2_5flog',['neg_binomial_2_log',['../namespacestan_1_1math.html#a72735047f883b88395f4e50e515140d2',1,'stan::math::neg_binomial_2_log(const T_n &n, const T_location &mu, const T_precision &phi)'],['../namespacestan_1_1math.html#abf533af613ce70cc7b53fd678c2363b7',1,'stan::math::neg_binomial_2_log(const T_n &n, const T_location &mu, const T_precision &phi)']]], + ['neg_5fbinomial_5f2_5flog_2ehpp',['neg_binomial_2_log.hpp',['../neg__binomial__2__log_8hpp.html',1,'']]], + ['neg_5fbinomial_5f2_5flog_5flog',['neg_binomial_2_log_log',['../namespacestan_1_1math.html#a07f9603fcb9767d59c7aa75cfbd489e9',1,'stan::math::neg_binomial_2_log_log(const T_n &n, const T_log_location &eta, const T_precision &phi)'],['../namespacestan_1_1math.html#aef63f32976322da20fcea2a0c15fb888',1,'stan::math::neg_binomial_2_log_log(const T_n &n, const T_log_location &eta, const T_precision &phi)']]], + ['neg_5fbinomial_5f2_5flog_5flog_2ehpp',['neg_binomial_2_log_log.hpp',['../neg__binomial__2__log__log_8hpp.html',1,'']]], + ['neg_5fbinomial_5f2_5flog_5frng',['neg_binomial_2_log_rng',['../namespacestan_1_1math.html#a626a27ed755b59249175c99dd2548ea3',1,'stan::math']]], + ['neg_5fbinomial_5f2_5flog_5frng_2ehpp',['neg_binomial_2_log_rng.hpp',['../neg__binomial__2__log__rng_8hpp.html',1,'']]], + ['neg_5fbinomial_5f2_5frng',['neg_binomial_2_rng',['../namespacestan_1_1math.html#a1088da4c2c0c2b157862fbad43c75d0a',1,'stan::math']]], + ['neg_5fbinomial_5f2_5frng_2ehpp',['neg_binomial_2_rng.hpp',['../neg__binomial__2__rng_8hpp.html',1,'']]], + ['neg_5fbinomial_5fccdf_5flog',['neg_binomial_ccdf_log',['../namespacestan_1_1math.html#a176323fd45f7f70cf9fa801310c3c614',1,'stan::math']]], + ['neg_5fbinomial_5fccdf_5flog_2ehpp',['neg_binomial_ccdf_log.hpp',['../neg__binomial__ccdf__log_8hpp.html',1,'']]], + ['neg_5fbinomial_5fcdf',['neg_binomial_cdf',['../namespacestan_1_1math.html#a31e90bd5f65cafdcd66b41617bf31718',1,'stan::math']]], + ['neg_5fbinomial_5fcdf_2ehpp',['neg_binomial_cdf.hpp',['../neg__binomial__cdf_8hpp.html',1,'']]], + ['neg_5fbinomial_5fcdf_5flog',['neg_binomial_cdf_log',['../namespacestan_1_1math.html#a51e5ebf37ccf49350280631039a23017',1,'stan::math']]], + ['neg_5fbinomial_5fcdf_5flog_2ehpp',['neg_binomial_cdf_log.hpp',['../neg__binomial__cdf__log_8hpp.html',1,'']]], + ['neg_5fbinomial_5flog',['neg_binomial_log',['../namespacestan_1_1math.html#a5b3f283f0d71f78bb437e1e1c4fdb805',1,'stan::math::neg_binomial_log(const T_n &n, const T_shape &alpha, const T_inv_scale &beta)'],['../namespacestan_1_1math.html#a24147a6471d65586101de3a5dfa4a53c',1,'stan::math::neg_binomial_log(const T_n &n, const T_shape &alpha, const T_inv_scale &beta)']]], + ['neg_5fbinomial_5flog_2ehpp',['neg_binomial_log.hpp',['../neg__binomial__log_8hpp.html',1,'']]], + ['neg_5fbinomial_5frng',['neg_binomial_rng',['../namespacestan_1_1math.html#a898e2ab003c78229367378b150c78aca',1,'stan::math']]], + ['neg_5fbinomial_5frng_2ehpp',['neg_binomial_rng.hpp',['../neg__binomial__rng_8hpp.html',1,'']]], + ['neg_5flog_5fpi',['NEG_LOG_PI',['../namespacestan_1_1math.html#a0f964e25c3ad3515549ead08428ff7cf',1,'stan::math']]], + ['neg_5flog_5fsqrt_5fpi',['NEG_LOG_SQRT_PI',['../namespacestan_1_1math.html#afb4a282e2196987e10d2bb65f12ec55a',1,'stan::math']]], + ['neg_5flog_5fsqrt_5ftwo_5fpi',['NEG_LOG_SQRT_TWO_PI',['../namespacestan_1_1math.html#a59f7f156224f9e60c2fb3e99034212eb',1,'stan::math']]], + ['neg_5flog_5ftwo',['NEG_LOG_TWO',['../namespacestan_1_1math.html#aa546788809cd7f0be4a9872bc8009325',1,'stan::math']]], + ['neg_5flog_5ftwo_5fover_5ftwo',['NEG_LOG_TWO_OVER_TWO',['../namespacestan_1_1math.html#a9b0bc03717322aa20ea2be9d6e488738',1,'stan::math']]], + ['neg_5flog_5ftwo_5fpi',['NEG_LOG_TWO_PI',['../namespacestan_1_1math.html#a2fc867325cdad6b9dcc2e7443ddf5956',1,'stan::math']]], + ['neg_5ftwo_5fover_5fsqrt_5fpi',['NEG_TWO_OVER_SQRT_PI',['../namespacestan_1_1math.html#a344504ea0c1f4f956c85ea8027a07ba9',1,'stan::math']]], + ['negative_5fepsilon',['NEGATIVE_EPSILON',['../namespacestan_1_1math.html#a1dcea3a9752d079c9f972040b873b704',1,'stan::math']]], + ['negative_5finfinity',['negative_infinity',['../namespacestan_1_1math.html#a34bffe91b7a24cb29bd69cb60814c39e',1,'stan::math']]], + ['negative_5finfty',['NEGATIVE_INFTY',['../namespacestan_1_1math.html#aa37d0f67f02e0a0b5797ed9f4df56bfb',1,'stan::math']]], + ['nested',['Nested',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#ac1d414db60208827e11bf100a6f5fa49',1,'Eigen::NumTraits< stan::math::fvar< T > >::Nested()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#a77e37676bb3d1900f8a49c159cd330db',1,'Eigen::NumTraits< stan::math::var >::Nested()']]], + ['nested_5fsize',['nested_size',['../namespacestan_1_1math.html#ac0f68ac575a2b8dff3a7a2359962c607',1,'stan::math']]], + ['nested_5fsize_2ehpp',['nested_size.hpp',['../nested__size_8hpp.html',1,'']]], + ['nested_5fvar_5falloc_5fstack_5fstarts_5f',['nested_var_alloc_stack_starts_',['../structstan_1_1math_1_1_autodiff_stack_storage.html#a86825610c9b89e0635a1efe420fb502c',1,'stan::math::AutodiffStackStorage']]], + ['nested_5fvar_5fnochain_5fstack_5fsizes_5f',['nested_var_nochain_stack_sizes_',['../structstan_1_1math_1_1_autodiff_stack_storage.html#a15080f06483a3215ce0513e0274db5f5',1,'stan::math::AutodiffStackStorage']]], + ['nested_5fvar_5fstack_5fsizes_5f',['nested_var_stack_sizes_',['../structstan_1_1math_1_1_autodiff_stack_storage.html#aaa52587fef6c965ff959745bedaab58b',1,'stan::math::AutodiffStackStorage']]], + ['noninteger',['NonInteger',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#aa05b23229e883f730e17b2d853943086',1,'Eigen::NumTraits< stan::math::fvar< T > >::NonInteger()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#a34b81621f635c4d8159b8e7f27c31a7e',1,'Eigen::NumTraits< stan::math::var >::NonInteger()']]], + ['normal_5fccdf_5flog',['normal_ccdf_log',['../namespacestan_1_1math.html#a2214490cfe7d81bdc51318028cd7df94',1,'stan::math']]], + ['normal_5fccdf_5flog_2ehpp',['normal_ccdf_log.hpp',['../normal__ccdf__log_8hpp.html',1,'']]], + ['normal_5fcdf',['normal_cdf',['../namespacestan_1_1math.html#aa2b9ee666af5f1741dc9f75108176386',1,'stan::math']]], + ['normal_5fcdf_2ehpp',['normal_cdf.hpp',['../normal__cdf_8hpp.html',1,'']]], + ['normal_5fcdf_5flog',['normal_cdf_log',['../namespacestan_1_1math.html#a6d0b3b3339016b3282cf360feb7cd0f9',1,'stan::math']]], + ['normal_5fcdf_5flog_2ehpp',['normal_cdf_log.hpp',['../normal__cdf__log_8hpp.html',1,'']]], + ['normal_5flog',['normal_log',['../namespacestan_1_1math.html#a1b7d387734f07e63bf2713b610f73a2d',1,'stan::math::normal_log(const T_y &y, const T_loc &mu, const T_scale &sigma)'],['../namespacestan_1_1math.html#afc2fd29076680ce830285130b5fd6f81',1,'stan::math::normal_log(const T_y &y, const T_loc &mu, const T_scale &sigma)']]], + ['normal_5flog_2ehpp',['normal_log.hpp',['../normal__log_8hpp.html',1,'']]], + ['normal_5frng',['normal_rng',['../namespacestan_1_1math.html#ac70652885c9903a1122575590075bc78',1,'stan::math']]], + ['normal_5frng_2ehpp',['normal_rng.hpp',['../normal__rng_8hpp.html',1,'']]], + ['not_5fa_5fnumber',['NOT_A_NUMBER',['../namespacestan_1_1math.html#a9cf147700a2e38335abc618b2c913b8a',1,'stan::math::NOT_A_NUMBER()'],['../namespacestan_1_1math.html#a381493bccc58bd993d797a2a5458c486',1,'stan::math::not_a_number()']]], + ['num_5felements',['num_elements',['../namespacestan_1_1math.html#ac360c5b10dbf87d81e346f2be7d19ade',1,'stan::math::num_elements(const T &x)'],['../namespacestan_1_1math.html#a3e716815601bf5055a2d7fbfd8a757ea',1,'stan::math::num_elements(const Eigen::Matrix< T, R, C > &m)'],['../namespacestan_1_1math.html#a38a5d6d7f867666902fcd0adbe602920',1,'stan::math::num_elements(const std::vector< T > &v)']]], + ['num_5felements_2ehpp',['num_elements.hpp',['../num__elements_8hpp.html',1,'']]], + ['num_5fsamples',['num_samples',['../classstan_1_1math_1_1welford__covar__estimator.html#a2ec375fd25e5d9a0c04b05082632f2fe',1,'stan::math::welford_covar_estimator::num_samples()'],['../classstan_1_1math_1_1welford__var__estimator.html#aec56710e92822346d88c9560e89bac31',1,'stan::math::welford_var_estimator::num_samples()']]], + ['numeric_5flimits_3c_20stan_3a_3amath_3a_3afvar_3c_20t_20_3e_20_3e',['numeric_limits< stan::math::fvar< T > >',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html',1,'std']]], + ['numeric_5flimits_3c_20stan_3a_3amath_3a_3avar_20_3e',['numeric_limits< stan::math::var >',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html',1,'std']]], + ['numtraits_3c_20stan_3a_3amath_3a_3afvar_3c_20t_20_3e_20_3e',['NumTraits< stan::math::fvar< T > >',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html',1,'Eigen']]], + ['numtraits_3c_20stan_3a_3amath_3a_3avar_20_3e',['NumTraits< stan::math::var >',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html',1,'Eigen']]], + ['nvaris',['nvaris',['../structstan_1_1math_1_1_operands_and_partials.html#a17131a81b370e8e27ae5284aa31bc43b',1,'stan::math::OperandsAndPartials']]] +]; diff --git a/doc/api/html/search/all_e.html b/doc/api/html/search/all_e.html new file mode 100644 index 00000000000..3cda0172edb --- /dev/null +++ b/doc/api/html/search/all_e.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/all_e.js b/doc/api/html/search/all_e.js new file mode 100644 index 00000000000..c8757c31afc --- /dev/null +++ b/doc/api/html/search/all_e.js @@ -0,0 +1,99 @@ +var searchData= +[ + ['op_5fddv_5fvari',['op_ddv_vari',['../classstan_1_1math_1_1op__ddv__vari.html',1,'stan::math']]], + ['op_5fddv_5fvari',['op_ddv_vari',['../classstan_1_1math_1_1op__ddv__vari.html#ace53db6f0edb4a841be08a8692d1db68',1,'stan::math::op_ddv_vari']]], + ['op_5fdv_5fvari',['op_dv_vari',['../classstan_1_1math_1_1op__dv__vari.html',1,'stan::math']]], + ['op_5fdv_5fvari',['op_dv_vari',['../classstan_1_1math_1_1op__dv__vari.html#a323e4ee6a54cf1beeb8427c1e1b2e844',1,'stan::math::op_dv_vari']]], + ['op_5fdvd_5fvari',['op_dvd_vari',['../classstan_1_1math_1_1op__dvd__vari.html',1,'stan::math']]], + ['op_5fdvd_5fvari',['op_dvd_vari',['../classstan_1_1math_1_1op__dvd__vari.html#ac81bd4c694f92f8f6bebc20b02571535',1,'stan::math::op_dvd_vari']]], + ['op_5fdvv_5fvari',['op_dvv_vari',['../classstan_1_1math_1_1op__dvv__vari.html',1,'stan::math']]], + ['op_5fdvv_5fvari',['op_dvv_vari',['../classstan_1_1math_1_1op__dvv__vari.html#a311ec040af4430d5d2ca608ab21c4bd3',1,'stan::math::op_dvv_vari']]], + ['op_5fmatrix_5fvari',['op_matrix_vari',['../classstan_1_1math_1_1op__matrix__vari.html',1,'stan::math']]], + ['op_5fmatrix_5fvari',['op_matrix_vari',['../classstan_1_1math_1_1op__matrix__vari.html#a38f1c03104b4d76ec79aca62a1d0f66f',1,'stan::math::op_matrix_vari']]], + ['op_5fv_5fvari',['op_v_vari',['../classstan_1_1math_1_1op__v__vari.html',1,'stan::math']]], + ['op_5fv_5fvari',['op_v_vari',['../classstan_1_1math_1_1op__v__vari.html#a9d5d71fd9963d2e5c8bff707127b2380',1,'stan::math::op_v_vari']]], + ['op_5fvd_5fvari',['op_vd_vari',['../classstan_1_1math_1_1op__vd__vari.html',1,'stan::math']]], + ['op_5fvd_5fvari',['op_vd_vari',['../classstan_1_1math_1_1op__vd__vari.html#a013c49536757793f7b912c7f1b046111',1,'stan::math::op_vd_vari']]], + ['op_5fvdd_5fvari',['op_vdd_vari',['../classstan_1_1math_1_1op__vdd__vari.html',1,'stan::math']]], + ['op_5fvdd_5fvari',['op_vdd_vari',['../classstan_1_1math_1_1op__vdd__vari.html#abceb88fe7a28682e996e02e92615a9d1',1,'stan::math::op_vdd_vari']]], + ['op_5fvdv_5fvari',['op_vdv_vari',['../classstan_1_1math_1_1op__vdv__vari.html',1,'stan::math']]], + ['op_5fvdv_5fvari',['op_vdv_vari',['../classstan_1_1math_1_1op__vdv__vari.html#a68c779eb803deaffa3b31f69bfc8b329',1,'stan::math::op_vdv_vari']]], + ['op_5fvector_5fvari',['op_vector_vari',['../classstan_1_1math_1_1op__vector__vari.html',1,'stan::math']]], + ['op_5fvector_5fvari',['op_vector_vari',['../classstan_1_1math_1_1op__vector__vari.html#ac291df279dc87ae570666da57c96315c',1,'stan::math::op_vector_vari']]], + ['op_5fvv_5fvari',['op_vv_vari',['../classstan_1_1math_1_1op__vv__vari.html#a3dcab4ca1dbd8919683d11d13419278e',1,'stan::math::op_vv_vari']]], + ['op_5fvv_5fvari',['op_vv_vari',['../classstan_1_1math_1_1op__vv__vari.html',1,'stan::math']]], + ['op_5fvvd_5fvari',['op_vvd_vari',['../classstan_1_1math_1_1op__vvd__vari.html#a9d05288a55b07c9dedc37436f42fa4b6',1,'stan::math::op_vvd_vari']]], + ['op_5fvvd_5fvari',['op_vvd_vari',['../classstan_1_1math_1_1op__vvd__vari.html',1,'stan::math']]], + ['op_5fvvv_5fvari',['op_vvv_vari',['../classstan_1_1math_1_1op__vvv__vari.html#ac1e794e5ed125a3183d00d84d22cb7aa',1,'stan::math::op_vvv_vari']]], + ['op_5fvvv_5fvari',['op_vvv_vari',['../classstan_1_1math_1_1op__vvv__vari.html',1,'stan::math']]], + ['operandsandpartials',['OperandsAndPartials',['../structstan_1_1math_1_1_operands_and_partials.html#ab89a553dc2caead793ca640e8c2f4c2d',1,'stan::math::OperandsAndPartials']]], + ['operandsandpartials',['OperandsAndPartials',['../structstan_1_1math_1_1_operands_and_partials.html',1,'stan::math']]], + ['operandsandpartials_2ehpp',['OperandsAndPartials.hpp',['../_operands_and_partials_8hpp.html',1,'']]], + ['operator_20delete',['operator delete',['../classstan_1_1math_1_1chainable.html#ad1e5a4d2b24e2be589ac518a9a13771d',1,'stan::math::chainable']]], + ['operator_20new',['operator new',['../classstan_1_1math_1_1chainable.html#a669334f2d01990ab50f2b33cd7dff780',1,'stan::math::chainable']]], + ['operator_21',['operator!',['../namespacestan_1_1math.html#aeee31e071296bea410dd943347b9a65d',1,'stan::math']]], + ['operator_21_3d',['operator!=',['../namespacestan_1_1math.html#a65438bf17da7bbedb06bc7c381cea865',1,'stan::math::operator!=(const fvar< T > &x, const fvar< T > &y)'],['../namespacestan_1_1math.html#a41e121241958fdcc4d2190bc532e9bc5',1,'stan::math::operator!=(const fvar< T > &x, double y)'],['../namespacestan_1_1math.html#ae982faec66434385fda1c728b0b2bf3d',1,'stan::math::operator!=(double x, const fvar< T > &y)'],['../namespacestan_1_1math.html#ae23eb5d64637b32c92292456aa006ff0',1,'stan::math::operator!=(const var &a, const var &b)'],['../namespacestan_1_1math.html#a570111dc15835a88afcfb8130b4746fd',1,'stan::math::operator!=(const var &a, const double b)'],['../namespacestan_1_1math.html#aa6464b66683b8cf12702e71c155853b7',1,'stan::math::operator!=(const double a, const var &b)']]], + ['operator_28_29',['operator()',['../structstan_1_1math_1_1coupled__ode__observer.html#a6c0c4107e1d62a89395e5ee17e5a43c4',1,'stan::math::coupled_ode_observer::operator()()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html#a210cec0472790c60d5956c8266359e9e',1,'stan::math::coupled_ode_system< F, double, double >::operator()()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#ae5558bc9ccc59ad33e9ad67b94f56559',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::operator()()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#a170dd3b8b24add9ce7f0e7339347dacb',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::operator()()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#a6e5880919ed793c60d730ca82901f247',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::operator()()']]], + ['operator_2a',['operator*',['../classstan_1_1math_1_1var.html#a7d48485af46f48f88abf8d8af40738a3',1,'stan::math::var::operator*()'],['../namespacestan_1_1math.html#afcc9ba66175e049c6020fe363231d694',1,'stan::math::operator*(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#ad613e6b4387544fecd361475490d9dd3',1,'stan::math::operator*(double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a5ee4488ea32a5bf3cce50117e14b2d07',1,'stan::math::operator*(const fvar< T > &x1, double x2)'],['../namespacestan_1_1math.html#a436203414c825bb8765ea82786313909',1,'stan::math::operator*(const var &a, const var &b)'],['../namespacestan_1_1math.html#ae63dc18994ab79b22ff3f6a37fe784db',1,'stan::math::operator*(const var &a, const double b)'],['../namespacestan_1_1math.html#aa6de4291925b8d2f8a7060617e276c5e',1,'stan::math::operator*(const double a, const var &b)']]], + ['operator_2a_3d',['operator*=',['../structstan_1_1math_1_1fvar.html#a9b2feee9256c7d918fc9773ca228283b',1,'stan::math::fvar::operator*=(const fvar< T > &x2)'],['../structstan_1_1math_1_1fvar.html#abd9f85bd70a9b6fa3dc107794cec3ca1',1,'stan::math::fvar::operator*=(double x2)'],['../classstan_1_1math_1_1var.html#a80bc83a2b3ab358f9f1df08203505e23',1,'stan::math::var::operator*=(const var &b)'],['../classstan_1_1math_1_1var.html#affbb26eba0c14f42c4d70c98c4b40dae',1,'stan::math::var::operator*=(const double b)']]], + ['operator_2b',['operator+',['../namespacestan_1_1math.html#a51a0614c9ba674f03e3d1b7586e99d27',1,'stan::math::operator+(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a3fbabb3f7eeef5d7605eefad9c2fbef7',1,'stan::math::operator+(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#adbceec5a6822fd0c58529d6f64208f3b',1,'stan::math::operator+(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#afcb4c7bced043de79d94676dac3cfc4b',1,'stan::math::operator+(const var &a, const var &b)'],['../namespacestan_1_1math.html#ab7ec1a6c24e3a21e00c42142d582d944',1,'stan::math::operator+(const var &a, const double b)'],['../namespacestan_1_1math.html#abe2a79efe1e8415fb532a27b26406798',1,'stan::math::operator+(const double a, const var &b)'],['../namespacestan_1_1math.html#a28f17a8253887d3b573fd59c5a4c6769',1,'stan::math::operator+(const var &a)']]], + ['operator_2b_2b',['operator++',['../structstan_1_1math_1_1fvar.html#ac3d87dc556498952498b6d1c1dcbe204',1,'stan::math::fvar::operator++()'],['../structstan_1_1math_1_1fvar.html#a248def528083576a747b27ea46452040',1,'stan::math::fvar::operator++(int)'],['../namespacestan_1_1math.html#aab33c64042765d924f07e7490788e6d4',1,'stan::math::operator++(var &a)'],['../namespacestan_1_1math.html#a3597f71f364d94814268d4911f111674',1,'stan::math::operator++(var &a, int)']]], + ['operator_2b_3d',['operator+=',['../structstan_1_1math_1_1fvar.html#a2e8ed7892827b43ec62736e8999bafd5',1,'stan::math::fvar::operator+=(const fvar< T > &x2)'],['../structstan_1_1math_1_1fvar.html#acae80a3166aa968368a99ba92e7bad19',1,'stan::math::fvar::operator+=(double x2)'],['../classstan_1_1math_1_1var.html#a87ea11fd8f1b21c7a79a849886839d54',1,'stan::math::var::operator+=(const var &b)'],['../classstan_1_1math_1_1var.html#afc6f49ac3b8054a323c9cd6e051c25c1',1,'stan::math::var::operator+=(const double b)']]], + ['operator_2d',['operator-',['../namespacestan_1_1math.html#a6a200e70e0f2b422b6623cf4b19d04da',1,'stan::math::operator-(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a87d89d23df91de283beda449d480b437',1,'stan::math::operator-(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#afd8dea434972aa3008e352349069e206',1,'stan::math::operator-(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#aedeee50b418200d06eb867d0ef3b3125',1,'stan::math::operator-(const fvar< T > &x)'],['../namespacestan_1_1math.html#a971b741313ecc65a639076acc188614a',1,'stan::math::operator-(const var &a, const var &b)'],['../namespacestan_1_1math.html#abec4b5043616cea0be01ee41fd899198',1,'stan::math::operator-(const var &a, const double b)'],['../namespacestan_1_1math.html#a9586c6690c5088deedcbac089158960a',1,'stan::math::operator-(const double a, const var &b)'],['../namespacestan_1_1math.html#a2f8564365599db5cea0b51b635ea482a',1,'stan::math::operator-(const var &a)']]], + ['operator_2d_2d',['operator--',['../structstan_1_1math_1_1fvar.html#a08587bd5322f627971294a39b0444bf3',1,'stan::math::fvar::operator--()'],['../structstan_1_1math_1_1fvar.html#acf9a3dcefdc0dd474caa41285435cf0b',1,'stan::math::fvar::operator--(int)'],['../namespacestan_1_1math.html#a10e496e6e1fd02a0378a729ada4f39df',1,'stan::math::operator--(var &a)'],['../namespacestan_1_1math.html#abcadc96f506e9f1408647cdce4d09092',1,'stan::math::operator--(var &a, int)']]], + ['operator_2d_3d',['operator-=',['../structstan_1_1math_1_1fvar.html#ab4b948b7db1f825efd3e86acc2f19ec6',1,'stan::math::fvar::operator-=(const fvar< T > &x2)'],['../structstan_1_1math_1_1fvar.html#a903c6290c55fce2413d4b3528456aaca',1,'stan::math::fvar::operator-=(double x2)'],['../classstan_1_1math_1_1var.html#a8892192fd51894b90e59a213fe02aeb9',1,'stan::math::var::operator-=(const var &b)'],['../classstan_1_1math_1_1var.html#a64099b5dc9c4df90b81b2ac28158a3d1',1,'stan::math::var::operator-=(const double b)']]], + ['operator_2d_3e',['operator->',['../classstan_1_1math_1_1var.html#acb10b163ad0fbc84829baed06ddda8e7',1,'stan::math::var']]], + ['operator_2f',['operator/',['../namespacestan_1_1math.html#a1eba6f623c3c2c0714e2eabbae90290f',1,'stan::math::operator/(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a02aad69947e40bd42636143eadd38621',1,'stan::math::operator/(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#aef4e969693a718ffefbe5d45916ddef3',1,'stan::math::operator/(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a2cbbe36fe5dcdd2996fe40afdd874983',1,'stan::math::operator/(const Eigen::Matrix< fvar< T >, R, C > &v, const fvar< T > &c)'],['../namespacestan_1_1math.html#a48b310fd13ba04c615b74671f262b25d',1,'stan::math::operator/(const Eigen::Matrix< fvar< T >, R, C > &v, const double c)'],['../namespacestan_1_1math.html#a7174185d7dd2b83e370d535d35870c4a',1,'stan::math::operator/(const Eigen::Matrix< double, R, C > &v, const fvar< T > &c)'],['../namespacestan_1_1math.html#ac15f9adeb9753deea83b30e18aaf8e98',1,'stan::math::operator/(const var &a, const var &b)'],['../namespacestan_1_1math.html#aa12be933cc2e01e203a6ffa09508d319',1,'stan::math::operator/(const var &a, const double b)'],['../namespacestan_1_1math.html#a81ad2fbfb99eb063eda9ef0b466b2014',1,'stan::math::operator/(const double a, const var &b)']]], + ['operator_2f_3d',['operator/=',['../structstan_1_1math_1_1fvar.html#adb1aa48e4920de7b5bdba267aa2a175f',1,'stan::math::fvar::operator/=(const fvar< T > &x2)'],['../structstan_1_1math_1_1fvar.html#a3c292c2e417a54f690fc9f66b4d10ccd',1,'stan::math::fvar::operator/=(double x2)'],['../classstan_1_1math_1_1var.html#aa158a69964d0f86042daa3e279ecff3f',1,'stan::math::var::operator/=(const var &b)'],['../classstan_1_1math_1_1var.html#aed7f04ab2dbd9f847a6ed68bf845c052',1,'stan::math::var::operator/=(const double b)']]], + ['operator_3c',['operator<',['../namespacestan_1_1math.html#af2c489941c560664036ee190c9028360',1,'stan::math::operator<(const fvar< T > &x, double y)'],['../namespacestan_1_1math.html#a0194df340cc3564835ff04086374cf97',1,'stan::math::operator<(double x, const fvar< T > &y)'],['../namespacestan_1_1math.html#a50b0c7ff4961eb7333aa81f685da55f4',1,'stan::math::operator<(const fvar< T > &x, const fvar< T > &y)'],['../namespacestan_1_1math.html#afe39e7c1b0831663418188ab23b98965',1,'stan::math::operator<(const var &a, const var &b)'],['../namespacestan_1_1math.html#a021f473185983f63d23ee362605249d8',1,'stan::math::operator<(const var &a, const double b)'],['../namespacestan_1_1math.html#aec5a959d8186caa585d5922a4facf649',1,'stan::math::operator<(const double a, const var &b)']]], + ['operator_3c_3c',['operator<<',['../structstan_1_1math_1_1fvar.html#a2225724f72699f1d59e9aecc1b98f2b4',1,'stan::math::fvar::operator<<()'],['../classstan_1_1math_1_1var.html#a3545860122fa159c57e23dd0fbfbf5cd',1,'stan::math::var::operator<<()'],['../classstan_1_1math_1_1vari.html#abd24d4e4eb6b0c65c8447bd2cc73b200',1,'stan::math::vari::operator<<()']]], + ['operator_3c_3d',['operator<=',['../namespacestan_1_1math.html#a450ef8aaef08c3137f70a087ae3905c6',1,'stan::math::operator<=(const fvar< T > &x, const fvar< T > &y)'],['../namespacestan_1_1math.html#ab95d660226997cbba13176cec459adaf',1,'stan::math::operator<=(const fvar< T > &x, double y)'],['../namespacestan_1_1math.html#aca5de0aa5a40e981ece663f96ad41997',1,'stan::math::operator<=(double x, const fvar< T > &y)'],['../namespacestan_1_1math.html#aee09427479a707c4e715677d5036307b',1,'stan::math::operator<=(const var &a, const var &b)'],['../namespacestan_1_1math.html#a1f46c552a80c056955c460a1796d724d',1,'stan::math::operator<=(const var &a, const double b)'],['../namespacestan_1_1math.html#a79e6962678ac8407d6d004c48988c1a2',1,'stan::math::operator<=(const double a, const var &b)']]], + ['operator_3d_3d',['operator==',['../namespacestan_1_1math.html#a431129b4a75d77ab60f6cd749bef5a11',1,'stan::math::operator==(const fvar< T > &x, const fvar< T > &y)'],['../namespacestan_1_1math.html#a15161ab182b02d135f79a13d68c7318d',1,'stan::math::operator==(const fvar< T > &x, double y)'],['../namespacestan_1_1math.html#a4930059b979a995acd759a0746bfc201',1,'stan::math::operator==(double x, const fvar< T > &y)'],['../namespacestan_1_1math.html#a62e8c00dc01b2df161d0d242c124b046',1,'stan::math::operator==(const var &a, const var &b)'],['../namespacestan_1_1math.html#ad239b56697788a42a944361e26b56e56',1,'stan::math::operator==(const var &a, const double b)'],['../namespacestan_1_1math.html#add97c0c3a895203b8ab3205aca59d088',1,'stan::math::operator==(const double a, const var &b)']]], + ['operator_3e',['operator>',['../namespacestan_1_1math.html#a17fefa51b18df1adec77e49f4e792fbc',1,'stan::math::operator>(const fvar< T > &x, const fvar< T > &y)'],['../namespacestan_1_1math.html#a9c850c94b22aab8ffd895bdf8faebded',1,'stan::math::operator>(const fvar< T > &x, double y)'],['../namespacestan_1_1math.html#aba7b92bb244d32edb94b17c8039ae826',1,'stan::math::operator>(double x, const fvar< T > &y)'],['../namespacestan_1_1math.html#a465afbe6fb2692b02b60d9760e5cbda9',1,'stan::math::operator>(const var &a, const var &b)'],['../namespacestan_1_1math.html#a361d2b2ac2c39919dc71183312855c92',1,'stan::math::operator>(const var &a, const double b)'],['../namespacestan_1_1math.html#a34b9438d0ef1f58b41a228a1154308aa',1,'stan::math::operator>(const double a, const var &b)']]], + ['operator_3e_3d',['operator>=',['../namespacestan_1_1math.html#a5dee5c21281cc75cad8ebf9f6c43b98f',1,'stan::math::operator>=(const fvar< T > &x, const fvar< T > &y)'],['../namespacestan_1_1math.html#ac2097caea2b790905ee2948ef72727df',1,'stan::math::operator>=(const fvar< T > &x, double y)'],['../namespacestan_1_1math.html#a813edaa4311e1a4c206952f75a85eba8',1,'stan::math::operator>=(double x, const fvar< T > &y)'],['../namespacestan_1_1math.html#a938fb84cef113596828ad131e513fa1e',1,'stan::math::operator>=(const var &a, const var &b)'],['../namespacestan_1_1math.html#a055bb2d4f3560761f3383b0f499e7fe7',1,'stan::math::operator>=(const var &a, const double b)'],['../namespacestan_1_1math.html#a4492a18f751e82a980740f7beac0e025',1,'stan::math::operator>=(const double a, const var &b)']]], + ['operator_5b_5d',['operator[]',['../classstan_1_1math_1_1container__view_3_01std_1_1vector_3_01_t1_01_4_00_01_t2_01_4.html#a4216d34813cec95c003ba84396fa104d',1,'stan::math::container_view< std::vector< T1 >, T2 >::operator[]()'],['../classstan_1_1math_1_1container__view_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_eif0a5cd6c4f7572d0a0485f479012b4cf.html#acfe66b51d58fa11069c5ad4b9efea9ec',1,'stan::math::container_view< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > >::operator[]()'],['../classstan_1_1math_1_1container__view_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_t2_01_4.html#af2100b835c918d3f7c7bac8d6ec32937',1,'stan::math::container_view< Eigen::Matrix< T1, R, C >, T2 >::operator[]()'],['../classstan_1_1math_1_1container__view_3_01std_1_1vector_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_7f9efd46b00a4e97b56aae6ecc54dbcd.html#a4d1e0a210d7659d350c6169b8af39c2a',1,'stan::math::container_view< std::vector< Eigen::Matrix< T1, R, C > >, Eigen::Matrix< T2, R, C > >::operator[]()'],['../classstan_1_1math_1_1seq__view.html#abdd1705b880895c4e32e917fad70fb0b',1,'stan::math::seq_view::operator[]()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_011_01_4_01_4.html#a6466225a392d75a98f0ae43c5f001820',1,'stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > >::operator[]()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00_01_eigen_1_1_dynamic_01_4_01_4.html#aafd342f1f6f9851fd8f8e3494b36068e',1,'stan::math::seq_view< T, Eigen::Matrix< S, 1, Eigen::Dynamic > >::operator[]()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4.html#ab45edf39aad64a4093db924b02322af9',1,'stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >::operator[]()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4.html#acfe4d699397a114cabd8d970e569aac6',1,'stan::math::seq_view< T, std::vector< S > >::operator[]()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01_t_01_4_01_4.html#afe1bd346e72ac6adc53826801a7e54f2',1,'stan::math::seq_view< T, std::vector< T > >::operator[]()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01std_1_1vector_3_01_t_01_4_01_4_01_4.html#aa8d34d4dd171acbd81d642aea1b8b61e',1,'stan::math::seq_view< T, std::vector< std::vector< T > > >::operator[]()'],['../classstan_1_1math_1_1seq__view_3_01double_00_01std_1_1vector_3_01int_01_4_01_4.html#a05bbd23ec952656521365f99d575a64c',1,'stan::math::seq_view< double, std::vector< int > >::operator[]()'],['../classstan_1_1math_1_1container__view.html#a7ed8e00a52b48d1ba3ebbc4fa38e11ce',1,'stan::math::container_view::operator[]()'],['../classstan_1_1math_1_1container__view_3_01dummy_00_01_t2_01_4.html#a19e3e8ef5cb77f25dc82a3da6711d7b8',1,'stan::math::container_view< dummy, T2 >::operator[]()'],['../classstan_1_1_vector_builder_helper.html#a623364e0ee8645a55bb93d3b067bd306',1,'stan::VectorBuilderHelper::operator[]()'],['../classstan_1_1_vector_builder_helper_3_01_t1_00_01true_00_01false_01_4.html#a195496da4a18cc0cb2d3dc098af401a6',1,'stan::VectorBuilderHelper< T1, true, false >::operator[]()'],['../classstan_1_1_vector_builder_helper_3_01_t1_00_01true_00_01true_01_4.html#af2507b7e73412f828261a9b4e2c28c18',1,'stan::VectorBuilderHelper< T1, true, true >::operator[]()'],['../classstan_1_1_vector_builder.html#adf708a313726a2ae1ba979269ccee104',1,'stan::VectorBuilder::operator[]()'],['../classstan_1_1_vector_view.html#afa380e5d11746837925198eeb8669299',1,'stan::VectorView::operator[]()'],['../classstan_1_1_vector_view_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html#a4ebd6fad997a99a0cb1ed71e4143befe',1,'stan::VectorView< const T, is_array, throw_if_accessed >::operator[]()'],['../classstan_1_1_vector_view_3_01const_01double_00_01false_00_01false_01_4.html#a2d4a632cfb7533c7ab183c8437b9433c',1,'stan::VectorView< const double, false, false >::operator[]()'],['../classstan_1_1_vector_view_mvt.html#a279439cc5038dfd0ea4da7fe58c1f6d0',1,'stan::VectorViewMvt::operator[]()'],['../classstan_1_1_vector_view_mvt_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html#af1df7ae176f5dc3acafcb45663ea82a3',1,'stan::VectorViewMvt< const T, is_array, throw_if_accessed >::operator[]()'],['../classstan_1_1math_1_1op__matrix__vari.html#aa8857333f18280ecedc008d53cd39315',1,'stan::math::op_matrix_vari::operator[]()'],['../classstan_1_1math_1_1op__vector__vari.html#ab928e591879ce7be3edfe498b5c9c4e8',1,'stan::math::op_vector_vari::operator[]()']]], + ['operator_5faddition_2ehpp',['operator_addition.hpp',['../rev_2core_2operator__addition_8hpp.html',1,'']]], + ['operator_5faddition_2ehpp',['operator_addition.hpp',['../fwd_2core_2operator__addition_8hpp.html',1,'']]], + ['operator_5fdivide_5fequal_2ehpp',['operator_divide_equal.hpp',['../operator__divide__equal_8hpp.html',1,'']]], + ['operator_5fdivision_2ehpp',['operator_division.hpp',['../fwd_2core_2operator__division_8hpp.html',1,'']]], + ['operator_5fdivision_2ehpp',['operator_division.hpp',['../rev_2core_2operator__division_8hpp.html',1,'']]], + ['operator_5fequal_2ehpp',['operator_equal.hpp',['../rev_2core_2operator__equal_8hpp.html',1,'']]], + ['operator_5fequal_2ehpp',['operator_equal.hpp',['../fwd_2core_2operator__equal_8hpp.html',1,'']]], + ['operator_5fgreater_5fthan_2ehpp',['operator_greater_than.hpp',['../rev_2core_2operator__greater__than_8hpp.html',1,'']]], + ['operator_5fgreater_5fthan_2ehpp',['operator_greater_than.hpp',['../fwd_2core_2operator__greater__than_8hpp.html',1,'']]], + ['operator_5fgreater_5fthan_5for_5fequal_2ehpp',['operator_greater_than_or_equal.hpp',['../fwd_2core_2operator__greater__than__or__equal_8hpp.html',1,'']]], + ['operator_5fgreater_5fthan_5for_5fequal_2ehpp',['operator_greater_than_or_equal.hpp',['../rev_2core_2operator__greater__than__or__equal_8hpp.html',1,'']]], + ['operator_5fless_5fthan_2ehpp',['operator_less_than.hpp',['../fwd_2core_2operator__less__than_8hpp.html',1,'']]], + ['operator_5fless_5fthan_2ehpp',['operator_less_than.hpp',['../rev_2core_2operator__less__than_8hpp.html',1,'']]], + ['operator_5fless_5fthan_5for_5fequal_2ehpp',['operator_less_than_or_equal.hpp',['../fwd_2core_2operator__less__than__or__equal_8hpp.html',1,'']]], + ['operator_5fless_5fthan_5for_5fequal_2ehpp',['operator_less_than_or_equal.hpp',['../rev_2core_2operator__less__than__or__equal_8hpp.html',1,'']]], + ['operator_5fminus_5fequal_2ehpp',['operator_minus_equal.hpp',['../operator__minus__equal_8hpp.html',1,'']]], + ['operator_5fmultiplication_2ehpp',['operator_multiplication.hpp',['../fwd_2core_2operator__multiplication_8hpp.html',1,'']]], + ['operator_5fmultiplication_2ehpp',['operator_multiplication.hpp',['../rev_2core_2operator__multiplication_8hpp.html',1,'']]], + ['operator_5fmultiply_5fequal_2ehpp',['operator_multiply_equal.hpp',['../operator__multiply__equal_8hpp.html',1,'']]], + ['operator_5fnot_5fequal_2ehpp',['operator_not_equal.hpp',['../rev_2core_2operator__not__equal_8hpp.html',1,'']]], + ['operator_5fnot_5fequal_2ehpp',['operator_not_equal.hpp',['../fwd_2core_2operator__not__equal_8hpp.html',1,'']]], + ['operator_5fplus_5fequal_2ehpp',['operator_plus_equal.hpp',['../operator__plus__equal_8hpp.html',1,'']]], + ['operator_5fsubtraction_2ehpp',['operator_subtraction.hpp',['../fwd_2core_2operator__subtraction_8hpp.html',1,'']]], + ['operator_5fsubtraction_2ehpp',['operator_subtraction.hpp',['../rev_2core_2operator__subtraction_8hpp.html',1,'']]], + ['operator_5funary_5fdecrement_2ehpp',['operator_unary_decrement.hpp',['../operator__unary__decrement_8hpp.html',1,'']]], + ['operator_5funary_5fincrement_2ehpp',['operator_unary_increment.hpp',['../operator__unary__increment_8hpp.html',1,'']]], + ['operator_5funary_5fminus_2ehpp',['operator_unary_minus.hpp',['../operator__unary__minus_8hpp.html',1,'']]], + ['operator_5funary_5fnegative_2ehpp',['operator_unary_negative.hpp',['../operator__unary__negative_8hpp.html',1,'']]], + ['operator_5funary_5fnot_2ehpp',['operator_unary_not.hpp',['../operator__unary__not_8hpp.html',1,'']]], + ['operator_5funary_5fplus_2ehpp',['operator_unary_plus.hpp',['../operator__unary__plus_8hpp.html',1,'']]], + ['ordered_5fconstrain',['ordered_constrain',['../namespacestan_1_1math.html#a5062f9b21b2fb755ad3189fe236bed93',1,'stan::math::ordered_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x)'],['../namespacestan_1_1math.html#ae5638796e15590c237b7eaece1531631',1,'stan::math::ordered_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, T &lp)']]], + ['ordered_5fconstrain_2ehpp',['ordered_constrain.hpp',['../ordered__constrain_8hpp.html',1,'']]], + ['ordered_5ffree',['ordered_free',['../namespacestan_1_1math.html#a679b3a9baaf02aeee0c15d763efa06b0',1,'stan::math']]], + ['ordered_5ffree_2ehpp',['ordered_free.hpp',['../ordered__free_8hpp.html',1,'']]], + ['ordered_5flogistic_5flog',['ordered_logistic_log',['../namespacestan_1_1math.html#aae845ae3d07989bc9976a15f52caa997',1,'stan::math::ordered_logistic_log(int y, const T_lambda &lambda, const Eigen::Matrix< T_cut, Eigen::Dynamic, 1 > &c)'],['../namespacestan_1_1math.html#a5623d34d128b956b6dfb2031150c8c87',1,'stan::math::ordered_logistic_log(int y, const T_lambda &lambda, const Eigen::Matrix< T_cut, Eigen::Dynamic, 1 > &c)']]], + ['ordered_5flogistic_5flog_2ehpp',['ordered_logistic_log.hpp',['../ordered__logistic__log_8hpp.html',1,'']]], + ['ordered_5flogistic_5frng',['ordered_logistic_rng',['../namespacestan_1_1math.html#a432a3d83d286fe609fc79c6ef4f8ea74',1,'stan::math']]], + ['ordered_5flogistic_5frng_2ehpp',['ordered_logistic_rng.hpp',['../ordered__logistic__rng_8hpp.html',1,'']]], + ['out_5fof_5frange',['out_of_range',['../namespacestan_1_1math.html#a34583d3983ee4d61d09004ce3e278250',1,'stan::math']]], + ['out_5fof_5frange_2ehpp',['out_of_range.hpp',['../out__of__range_8hpp.html',1,'']]], + ['owens_5ft',['owens_t',['../namespacestan_1_1math.html#a9b09a69d6aeee461a009b6355889e9e4',1,'stan::math::owens_t(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a69de529b5013ba833af1ea6eff199194',1,'stan::math::owens_t(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a316ab3b95493d045d77de4f8b96ed56a',1,'stan::math::owens_t(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#af099f2a72adf07f89f5f27f405d7afab',1,'stan::math::owens_t(const double h, const double a)'],['../namespacestan_1_1math.html#a3a3be132b9586de8773f1489ad485e0a',1,'stan::math::owens_t(const var &h, const var &a)'],['../namespacestan_1_1math.html#aa226754d101430c9bdf91ece0a9eb1d7',1,'stan::math::owens_t(const var &h, double a)'],['../namespacestan_1_1math.html#a1a8dab8811eeb8705651daeefc449816',1,'stan::math::owens_t(double h, const var &a)']]], + ['owens_5ft_2ehpp',['owens_t.hpp',['../prim_2scal_2fun_2owens__t_8hpp.html',1,'']]], + ['owens_5ft_2ehpp',['owens_t.hpp',['../rev_2scal_2fun_2owens__t_8hpp.html',1,'']]], + ['owens_5ft_2ehpp',['owens_t.hpp',['../fwd_2scal_2fun_2owens__t_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/all_f.html b/doc/api/html/search/all_f.html new file mode 100644 index 00000000000..7419b0297ed --- /dev/null +++ b/doc/api/html/search/all_f.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/all_f.js b/doc/api/html/search/all_f.js new file mode 100644 index 00000000000..3a0856ce291 --- /dev/null +++ b/doc/api/html/search/all_f.js @@ -0,0 +1,128 @@ +var searchData= +[ + ['pareto_5fccdf_5flog',['pareto_ccdf_log',['../namespacestan_1_1math.html#ae265a3d80fc60a58c6642e3cb32e5a3e',1,'stan::math']]], + ['pareto_5fccdf_5flog_2ehpp',['pareto_ccdf_log.hpp',['../pareto__ccdf__log_8hpp.html',1,'']]], + ['pareto_5fcdf',['pareto_cdf',['../namespacestan_1_1math.html#a04334b6b9aefbc902c156c6ebabd1b7f',1,'stan::math']]], + ['pareto_5fcdf_2ehpp',['pareto_cdf.hpp',['../pareto__cdf_8hpp.html',1,'']]], + ['pareto_5fcdf_5flog',['pareto_cdf_log',['../namespacestan_1_1math.html#a32b395deb308bc16b82587a97bfb1eba',1,'stan::math']]], + ['pareto_5fcdf_5flog_2ehpp',['pareto_cdf_log.hpp',['../pareto__cdf__log_8hpp.html',1,'']]], + ['pareto_5flog',['pareto_log',['../namespacestan_1_1math.html#a4eefb96c196d0c61694de1fda5d9a8c6',1,'stan::math::pareto_log(const T_y &y, const T_scale &y_min, const T_shape &alpha)'],['../namespacestan_1_1math.html#a3f851b988a9325dc6ea8398d45ff1601',1,'stan::math::pareto_log(const T_y &y, const T_scale &y_min, const T_shape &alpha)']]], + ['pareto_5flog_2ehpp',['pareto_log.hpp',['../pareto__log_8hpp.html',1,'']]], + ['pareto_5frng',['pareto_rng',['../namespacestan_1_1math.html#a624fd25c2bd925d2b96971c70b695245',1,'stan::math']]], + ['pareto_5frng_2ehpp',['pareto_rng.hpp',['../pareto__rng_8hpp.html',1,'']]], + ['pareto_5ftype_5f2_5fccdf_5flog',['pareto_type_2_ccdf_log',['../namespacestan_1_1math.html#ab4f7adad4637fb745bceb3be2db2c6d2',1,'stan::math']]], + ['pareto_5ftype_5f2_5fccdf_5flog_2ehpp',['pareto_type_2_ccdf_log.hpp',['../pareto__type__2__ccdf__log_8hpp.html',1,'']]], + ['pareto_5ftype_5f2_5fcdf',['pareto_type_2_cdf',['../namespacestan_1_1math.html#a6aa9090877913c41608ec9edc7644718',1,'stan::math']]], + ['pareto_5ftype_5f2_5fcdf_2ehpp',['pareto_type_2_cdf.hpp',['../pareto__type__2__cdf_8hpp.html',1,'']]], + ['pareto_5ftype_5f2_5fcdf_5flog',['pareto_type_2_cdf_log',['../namespacestan_1_1math.html#acc69970c0086687e5c19c7c3d4fe5108',1,'stan::math']]], + ['pareto_5ftype_5f2_5fcdf_5flog_2ehpp',['pareto_type_2_cdf_log.hpp',['../pareto__type__2__cdf__log_8hpp.html',1,'']]], + ['pareto_5ftype_5f2_5flog',['pareto_type_2_log',['../namespacestan_1_1math.html#a078e211e38ac272092603cdf728f3f02',1,'stan::math::pareto_type_2_log(const T_y &y, const T_loc &mu, const T_scale &lambda, const T_shape &alpha)'],['../namespacestan_1_1math.html#a5bd3253943ad32c19d36887e748a4aa6',1,'stan::math::pareto_type_2_log(const T_y &y, const T_loc &mu, const T_scale &lambda, const T_shape &alpha)']]], + ['pareto_5ftype_5f2_5flog_2ehpp',['pareto_type_2_log.hpp',['../pareto__type__2__log_8hpp.html',1,'']]], + ['pareto_5ftype_5f2_5frng',['pareto_type_2_rng',['../namespacestan_1_1math.html#af55974320ebae90f0e36341934d8a57b',1,'stan::math']]], + ['pareto_5ftype_5f2_5frng_2ehpp',['pareto_type_2_rng.hpp',['../pareto__type__2__rng_8hpp.html',1,'']]], + ['partial_5fderivative',['partial_derivative',['../namespacestan_1_1math.html#adbb5b4072a22debb013dab8742e321df',1,'stan::math']]], + ['partial_5fderivative_2ehpp',['partial_derivative.hpp',['../partial__derivative_8hpp.html',1,'']]], + ['partials_5f',['partials_',['../classstan_1_1math_1_1stored__gradient__vari.html#a318f47f75b1b24dd3ad5751fa741b6a4',1,'stan::math::stored_gradient_vari']]], + ['partials_5freturn_5ftype',['partials_return_type',['../structstan_1_1partials__return__type.html',1,'stan']]], + ['partials_5freturn_5ftype_2ehpp',['partials_return_type.hpp',['../partials__return__type_8hpp.html',1,'']]], + ['partials_5ftype',['partials_type',['../structstan_1_1partials__type.html',1,'stan']]], + ['partials_5ftype_2ehpp',['partials_type.hpp',['../fwd_2scal_2meta_2partials__type_8hpp.html',1,'']]], + ['partials_5ftype_2ehpp',['partials_type.hpp',['../prim_2scal_2meta_2partials__type_8hpp.html',1,'']]], + ['partials_5ftype_2ehpp',['partials_type.hpp',['../rev_2scal_2meta_2partials__type_8hpp.html',1,'']]], + ['partials_5ftype_3c_20stan_3a_3amath_3a_3afvar_3c_20t_20_3e_20_3e',['partials_type< stan::math::fvar< T > >',['../structstan_1_1partials__type_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html',1,'stan']]], + ['partials_5ftype_3c_20stan_3a_3amath_3a_3avar_20_3e',['partials_type< stan::math::var >',['../structstan_1_1partials__type_3_01stan_1_1math_1_1var_01_4.html',1,'stan']]], + ['partials_5fvari',['partials_vari',['../classstan_1_1math_1_1partials__vari.html',1,'stan::math']]], + ['partials_5fvari',['partials_vari',['../classstan_1_1math_1_1partials__vari.html#a804753ffe5a9b1820b9a7f05bd258752',1,'stan::math::partials_vari']]], + ['pass_5ftype',['pass_type',['../structstan_1_1math_1_1pass__type.html',1,'stan::math']]], + ['pass_5ftype_3c_20double_20_3e',['pass_type< double >',['../structstan_1_1math_1_1pass__type_3_01double_01_4.html',1,'stan::math']]], + ['pass_5ftype_3c_20int_20_3e',['pass_type< int >',['../structstan_1_1math_1_1pass__type_3_01int_01_4.html',1,'stan::math']]], + ['patch_5fversion',['PATCH_VERSION',['../namespacestan_1_1math.html#ad4c620fffa8fa7ddd68ffb46fb64667b',1,'stan::math']]], + ['phi',['Phi',['../namespacestan_1_1math.html#ac73a2c7f20161172ffee17c7c880019f',1,'stan::math::Phi(const fvar< T > &x)'],['../namespacestan_1_1math.html#ac85644bbd92359d699f374adea62c643',1,'stan::math::Phi(const T x)'],['../namespacestan_1_1math.html#ad88a365e721ffe6c1da4115e378bebf4',1,'stan::math::Phi(const stan::math::var &a)']]], + ['phi_2ehpp',['Phi.hpp',['../rev_2scal_2fun_2_phi_8hpp.html',1,'']]], + ['phi_2ehpp',['Phi.hpp',['../fwd_2scal_2fun_2_phi_8hpp.html',1,'']]], + ['phi_2ehpp',['Phi.hpp',['../prim_2scal_2fun_2_phi_8hpp.html',1,'']]], + ['phi_5fapprox',['Phi_approx',['../namespacestan_1_1math.html#a6cf4bf2074175fd7bcde43f9f94e4d16',1,'stan::math::Phi_approx(T x)'],['../namespacestan_1_1math.html#afa0a2a4530d320ca7945a09ae88783f3',1,'stan::math::Phi_approx(const stan::math::var &a)']]], + ['phi_5fapprox_2ehpp',['Phi_approx.hpp',['../prim_2scal_2fun_2_phi__approx_8hpp.html',1,'']]], + ['phi_5fapprox_2ehpp',['Phi_approx.hpp',['../rev_2scal_2fun_2_phi__approx_8hpp.html',1,'']]], + ['pi',['pi',['../namespacestan_1_1math.html#aa2ffd66726e0532160e16e6b48d6f428',1,'stan::math']]], + ['poisson_5fccdf_5flog',['poisson_ccdf_log',['../namespacestan_1_1math.html#ad069a055750c038c054eb7ecabfb53bf',1,'stan::math']]], + ['poisson_5fccdf_5flog_2ehpp',['poisson_ccdf_log.hpp',['../poisson__ccdf__log_8hpp.html',1,'']]], + ['poisson_5fcdf',['poisson_cdf',['../namespacestan_1_1math.html#a84009ffe822acedc6362015fd08107be',1,'stan::math']]], + ['poisson_5fcdf_2ehpp',['poisson_cdf.hpp',['../poisson__cdf_8hpp.html',1,'']]], + ['poisson_5fcdf_5flog',['poisson_cdf_log',['../namespacestan_1_1math.html#acc9138a37ffe00ff85c6824447e85db1',1,'stan::math']]], + ['poisson_5fcdf_5flog_2ehpp',['poisson_cdf_log.hpp',['../poisson__cdf__log_8hpp.html',1,'']]], + ['poisson_5flog',['poisson_log',['../namespacestan_1_1math.html#ae7a95ee36796c1a077510303bb2535c2',1,'stan::math::poisson_log(const T_n &n, const T_rate &lambda)'],['../namespacestan_1_1math.html#a202d918359198306069f71f1477a046f',1,'stan::math::poisson_log(const T_n &n, const T_rate &lambda)']]], + ['poisson_5flog_2ehpp',['poisson_log.hpp',['../poisson__log_8hpp.html',1,'']]], + ['poisson_5flog_5flog',['poisson_log_log',['../namespacestan_1_1math.html#a4a06118d9d96bde7ee5d8c28eb08e5ec',1,'stan::math::poisson_log_log(const T_n &n, const T_log_rate &alpha)'],['../namespacestan_1_1math.html#a5d441b4aee12ece4fc2d1b4d8027c7a0',1,'stan::math::poisson_log_log(const T_n &n, const T_log_rate &alpha)']]], + ['poisson_5flog_5flog_2ehpp',['poisson_log_log.hpp',['../poisson__log__log_8hpp.html',1,'']]], + ['poisson_5flog_5frng',['poisson_log_rng',['../namespacestan_1_1math.html#ac3cdc8d2997b25f9ed799555ecf37106',1,'stan::math']]], + ['poisson_5flog_5frng_2ehpp',['poisson_log_rng.hpp',['../poisson__log__rng_8hpp.html',1,'']]], + ['poisson_5fmax_5frate',['POISSON_MAX_RATE',['../namespacestan_1_1math.html#a4ea938c86917d89bbd13e4edcbecb1be',1,'stan::math']]], + ['poisson_5frng',['poisson_rng',['../namespacestan_1_1math.html#a8f7aaf7ee5cf0eb93778d7f30db23834',1,'stan::math']]], + ['poisson_5frng_2ehpp',['poisson_rng.hpp',['../poisson__rng_8hpp.html',1,'']]], + ['positive_5fconstrain',['positive_constrain',['../namespacestan_1_1math.html#a6cf6708d0fb577e217e81463282cae71',1,'stan::math::positive_constrain(const T x)'],['../namespacestan_1_1math.html#a9f9c43fc857272a76bb4030122ac91ed',1,'stan::math::positive_constrain(const T x, T &lp)']]], + ['positive_5fconstrain_2ehpp',['positive_constrain.hpp',['../positive__constrain_8hpp.html',1,'']]], + ['positive_5ffree',['positive_free',['../namespacestan_1_1math.html#a6a20798b12abb29d73f7391168f836f9',1,'stan::math']]], + ['positive_5ffree_2ehpp',['positive_free.hpp',['../positive__free_8hpp.html',1,'']]], + ['positive_5finfinity',['positive_infinity',['../namespacestan_1_1math.html#a34675a70d3df614d88d33ddbdd49b49a',1,'stan::math']]], + ['positive_5fordered_5fconstrain',['positive_ordered_constrain',['../namespacestan_1_1math.html#ada937f012b7d54cebdf8d9414f6fdbad',1,'stan::math::positive_ordered_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x)'],['../namespacestan_1_1math.html#a7879746a7bed2564ae72c2916658e5a5',1,'stan::math::positive_ordered_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, T &lp)']]], + ['positive_5fordered_5fconstrain_2ehpp',['positive_ordered_constrain.hpp',['../positive__ordered__constrain_8hpp.html',1,'']]], + ['positive_5fordered_5ffree',['positive_ordered_free',['../namespacestan_1_1math.html#af81e69a15e82f86eefba93f8dcd3966e',1,'stan::math']]], + ['positive_5fordered_5ffree_2ehpp',['positive_ordered_free.hpp',['../positive__ordered__free_8hpp.html',1,'']]], + ['pow',['pow',['../namespacestan_1_1math.html#a27caea996a79cd150f26db44fd635684',1,'stan::math::pow(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#ab594b61f84170ba4b4b887f6a911a0d6',1,'stan::math::pow(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a7b8ae604ced89240175e69281577be04',1,'stan::math::pow(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#a32adb49018d9fd61d3c568d1edcdb3c0',1,'stan::math::pow(const var &base, const var &exponent)'],['../namespacestan_1_1math.html#aff1b3f97cd1cf4c7391d160f9a3db4f6',1,'stan::math::pow(const var &base, const double exponent)'],['../namespacestan_1_1math.html#a52dafae271ea06210bf3cbe2545ead16',1,'stan::math::pow(const double base, const var &exponent)']]], + ['pow_2ehpp',['pow.hpp',['../fwd_2scal_2fun_2pow_8hpp.html',1,'']]], + ['pow_2ehpp',['pow.hpp',['../rev_2scal_2fun_2pow_8hpp.html',1,'']]], + ['precomp_5fv_5fvari',['precomp_v_vari',['../classstan_1_1math_1_1precomp__v__vari.html',1,'stan::math']]], + ['precomp_5fv_5fvari',['precomp_v_vari',['../classstan_1_1math_1_1precomp__v__vari.html#a0c517d5c59eff9c50c47be525b646a3a',1,'stan::math::precomp_v_vari']]], + ['precomp_5fv_5fvari_2ehpp',['precomp_v_vari.hpp',['../precomp__v__vari_8hpp.html',1,'']]], + ['precomp_5fvv_5fvari',['precomp_vv_vari',['../classstan_1_1math_1_1precomp__vv__vari.html',1,'stan::math']]], + ['precomp_5fvv_5fvari',['precomp_vv_vari',['../classstan_1_1math_1_1precomp__vv__vari.html#af33cdfd8e10840954045d5437ea0b521',1,'stan::math::precomp_vv_vari']]], + ['precomp_5fvv_5fvari_2ehpp',['precomp_vv_vari.hpp',['../precomp__vv__vari_8hpp.html',1,'']]], + ['precomp_5fvvv_5fvari',['precomp_vvv_vari',['../classstan_1_1math_1_1precomp__vvv__vari.html#a6d8ea94d167987d3aa4f437079f4f2c0',1,'stan::math::precomp_vvv_vari']]], + ['precomp_5fvvv_5fvari',['precomp_vvv_vari',['../classstan_1_1math_1_1precomp__vvv__vari.html',1,'stan::math']]], + ['precomp_5fvvv_5fvari_2ehpp',['precomp_vvv_vari.hpp',['../precomp__vvv__vari_8hpp.html',1,'']]], + ['precomputed_5fgradients',['precomputed_gradients',['../namespacestan_1_1math.html#a2ae0c4c9c64db8bb166f67caf352b35f',1,'stan::math']]], + ['precomputed_5fgradients_2ehpp',['precomputed_gradients.hpp',['../precomputed__gradients_8hpp.html',1,'']]], + ['precomputed_5fgradients_5fvari',['precomputed_gradients_vari',['../classstan_1_1math_1_1precomputed__gradients__vari.html',1,'stan::math']]], + ['precomputed_5fgradients_5fvari',['precomputed_gradients_vari',['../classstan_1_1math_1_1precomputed__gradients__vari.html#afab325fb81b8370a78f3455be5ebdeb6',1,'stan::math::precomputed_gradients_vari::precomputed_gradients_vari(double val, size_t size, vari **varis, double *gradients)'],['../classstan_1_1math_1_1precomputed__gradients__vari.html#a1e7e812862a9af73da3a8c50f0d65302',1,'stan::math::precomputed_gradients_vari::precomputed_gradients_vari(double val, const std::vector< var > &vars, const std::vector< double > &gradients)']]], + ['primitive_5fvalue',['primitive_value',['../namespacestan_1_1math.html#a24337e3af682981f05d1cc022e675891',1,'stan::math::primitive_value(const fvar< T > &v)'],['../namespacestan_1_1math.html#af8cbc3a490edf340544fb12df544269e',1,'stan::math::primitive_value(T x)'],['../namespacestan_1_1math.html#a0491e419195548cdede51a384547aef2',1,'stan::math::primitive_value(const T &x)'],['../namespacestan_1_1math.html#a0ccbe1638f463027973553dec7175dbc',1,'stan::math::primitive_value(const var &v)']]], + ['primitive_5fvalue_2ehpp',['primitive_value.hpp',['../fwd_2scal_2fun_2primitive__value_8hpp.html',1,'']]], + ['primitive_5fvalue_2ehpp',['primitive_value.hpp',['../prim_2scal_2fun_2primitive__value_8hpp.html',1,'']]], + ['primitive_5fvalue_2ehpp',['primitive_value.hpp',['../rev_2scal_2fun_2primitive__value_8hpp.html',1,'']]], + ['print_5fmat_5fsize',['print_mat_size',['../namespacestan_1_1math.html#aa8f00af063b839677434c6a0f92629a3',1,'stan::math']]], + ['print_5fstack',['print_stack',['../namespacestan_1_1math.html#a0611cecb5356e187818c1901134c7665',1,'stan::math']]], + ['print_5fstack_2ehpp',['print_stack.hpp',['../print__stack_8hpp.html',1,'']]], + ['prob_5fconstrain',['prob_constrain',['../namespacestan_1_1math.html#a7a0b9c35bc619ea5fbac226e985bbc1d',1,'stan::math::prob_constrain(const T x)'],['../namespacestan_1_1math.html#a3b5c8822124337e5d000cfa60046c5fa',1,'stan::math::prob_constrain(const T x, T &lp)']]], + ['prob_5fconstrain_2ehpp',['prob_constrain.hpp',['../prob__constrain_8hpp.html',1,'']]], + ['prob_5ffree',['prob_free',['../namespacestan_1_1math.html#a533afff719fe3e21bf53d2fa53d2fbe3',1,'stan::math']]], + ['prob_5ffree_2ehpp',['prob_free.hpp',['../prob__free_8hpp.html',1,'']]], + ['prod',['prod',['../namespacestan_1_1math.html#a1649a895ec6e79097d5645a3f8b8a1e6',1,'stan::math::prod(const std::vector< T > &v)'],['../namespacestan_1_1math.html#ad7082de8742d87f7a0fa0842207341c9',1,'stan::math::prod(const Eigen::Matrix< T, R, C > &v)']]], + ['prod_2ehpp',['prod.hpp',['../prod_8hpp.html',1,'']]], + ['promote',['promote',['../structstan_1_1math_1_1promoter.html#ab3df6e7131a09943826d1b995142d7d6',1,'stan::math::promoter::promote()'],['../structstan_1_1math_1_1promoter_3_01_t_00_01_t_01_4.html#ac8db3f3f3410059f5cae51383f1b38c2',1,'stan::math::promoter< T, T >::promote()'],['../structstan_1_1math_1_1promoter_3_01std_1_1vector_3_01_f_01_4_00_01std_1_1vector_3_01_t_01_4_01_4.html#a357d5eb63ba812437c51640670cef745',1,'stan::math::promoter< std::vector< F >, std::vector< T > >::promote()'],['../structstan_1_1math_1_1promoter_3_01std_1_1vector_3_01_t_01_4_00_01std_1_1vector_3_01_t_01_4_01_4.html#adb1706254fcd6734bf986e2cd01b093f',1,'stan::math::promoter< std::vector< T >, std::vector< T > >::promote()'],['../structstan_1_1math_1_1promoter_3_01_eigen_1_1_matrix_3_01_f_00_01_r_00_01_c_01_4_00_01_eigen_1_142b48fda94601374e41a81325f3f7b84.html#a9964d13b9f2f05efca2b21ac165210d8',1,'stan::math::promoter< Eigen::Matrix< F, R, C >, Eigen::Matrix< T, R, C > >::promote()'],['../structstan_1_1math_1_1promoter_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_00_01_eigen_1_12d7fadf0560f1f2f3abc5388b7666f9c.html#a525fc8cb91f5c4c22195cdb004b1eb0f',1,'stan::math::promoter< Eigen::Matrix< T, R, C >, Eigen::Matrix< T, R, C > >::promote()']]], + ['promote_5fcommon',['promote_common',['../namespacestan_1_1math.html#a300cf63dd3332cff2161fdc32aec4026',1,'stan::math']]], + ['promote_5fcommon_2ehpp',['promote_common.hpp',['../promote__common_8hpp.html',1,'']]], + ['promote_5fscalar',['promote_scalar',['../namespacestan_1_1math.html#a4815c45c3f87ea98453880863e3a0b94',1,'stan::math']]], + ['promote_5fscalar_2ehpp',['promote_scalar.hpp',['../scal_2fun_2promote__scalar_8hpp.html',1,'']]], + ['promote_5fscalar_2ehpp',['promote_scalar.hpp',['../mat_2fun_2promote__scalar_8hpp.html',1,'']]], + ['promote_5fscalar_5fstruct',['promote_scalar_struct',['../structstan_1_1math_1_1promote__scalar__struct.html',1,'stan::math']]], + ['promote_5fscalar_5fstruct_3c_20t_2c_20eigen_3a_3amatrix_3c_20s_2c_201_2c_2d1_20_3e_20_3e',['promote_scalar_struct< T, Eigen::Matrix< S, 1,-1 > >',['../structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00-1_01_4_01_4.html',1,'stan::math']]], + ['promote_5fscalar_5fstruct_3c_20t_2c_20eigen_3a_3amatrix_3c_20s_2c_2d1_2c_201_20_3e_20_3e',['promote_scalar_struct< T, Eigen::Matrix< S,-1, 1 > >',['../structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00-1_00_011_01_4_01_4.html',1,'stan::math']]], + ['promote_5fscalar_5fstruct_3c_20t_2c_20eigen_3a_3amatrix_3c_20s_2c_2d1_2c_2d1_20_3e_20_3e',['promote_scalar_struct< T, Eigen::Matrix< S,-1,-1 > >',['../structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00-1_00-1_01_4_01_4.html',1,'stan::math']]], + ['promote_5fscalar_5fstruct_3c_20t_2c_20std_3a_3avector_3c_20s_20_3e_20_3e',['promote_scalar_struct< T, std::vector< S > >',['../structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4.html',1,'stan::math']]], + ['promote_5fscalar_5fstruct_3c_20t_2c_20t_20_3e',['promote_scalar_struct< T, T >',['../structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_t_01_4.html',1,'stan::math']]], + ['promote_5fscalar_5ftype',['promote_scalar_type',['../structstan_1_1math_1_1promote__scalar__type.html',1,'stan::math']]], + ['promote_5fscalar_5ftype_2ehpp',['promote_scalar_type.hpp',['../scal_2fun_2promote__scalar__type_8hpp.html',1,'']]], + ['promote_5fscalar_5ftype_2ehpp',['promote_scalar_type.hpp',['../mat_2fun_2promote__scalar__type_8hpp.html',1,'']]], + ['promote_5fscalar_5ftype_3c_20t_2c_20eigen_3a_3amatrix_3c_20s_2c_201_2c_20eigen_3a_3adynamic_20_3e_20_3e',['promote_scalar_type< T, Eigen::Matrix< S, 1, Eigen::Dynamic > >',['../structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00_01_eigen_1_1_dynamic_01_4_01_4.html',1,'stan::math']]], + ['promote_5fscalar_5ftype_3c_20t_2c_20eigen_3a_3amatrix_3c_20s_2c_20eigen_3a_3adynamic_2c_201_20_3e_20_3e',['promote_scalar_type< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > >',['../structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_011_01_4_01_4.html',1,'stan::math']]], + ['promote_5fscalar_5ftype_3c_20t_2c_20eigen_3a_3amatrix_3c_20s_2c_20eigen_3a_3adynamic_2c_20eigen_3a_3adynamic_20_3e_20_3e',['promote_scalar_type< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >',['../structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1e90c042d64d8c3a6b9383f570932df58.html',1,'stan::math']]], + ['promote_5fscalar_5ftype_3c_20t_2c_20std_3a_3avector_3c_20s_20_3e_20_3e',['promote_scalar_type< T, std::vector< S > >',['../structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4.html',1,'stan::math']]], + ['promote_5fto',['promote_to',['../structstan_1_1math_1_1promoter.html#a892e350b17a5930b9de4a9ff05eddc39',1,'stan::math::promoter::promote_to()'],['../structstan_1_1math_1_1promoter_3_01_t_00_01_t_01_4.html#a108a1ffe4c0560f0c0b384270ea801f1',1,'stan::math::promoter< T, T >::promote_to()'],['../structstan_1_1math_1_1promoter_3_01std_1_1vector_3_01_f_01_4_00_01std_1_1vector_3_01_t_01_4_01_4.html#a3da744179c9bbe7fe2ac326a4dcba352',1,'stan::math::promoter< std::vector< F >, std::vector< T > >::promote_to()'],['../structstan_1_1math_1_1promoter_3_01std_1_1vector_3_01_t_01_4_00_01std_1_1vector_3_01_t_01_4_01_4.html#a099437577ccd004d58c5b2ee3e5acf06',1,'stan::math::promoter< std::vector< T >, std::vector< T > >::promote_to()'],['../structstan_1_1math_1_1promoter_3_01_eigen_1_1_matrix_3_01_f_00_01_r_00_01_c_01_4_00_01_eigen_1_142b48fda94601374e41a81325f3f7b84.html#a68d5ee667d0706baf7dd52f08f6a87fd',1,'stan::math::promoter< Eigen::Matrix< F, R, C >, Eigen::Matrix< T, R, C > >::promote_to()'],['../structstan_1_1math_1_1promoter_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_00_01_eigen_1_12d7fadf0560f1f2f3abc5388b7666f9c.html#a9ff5ceffa5a1a568b750eb2f676d1da9',1,'stan::math::promoter< Eigen::Matrix< T, R, C >, Eigen::Matrix< T, R, C > >::promote_to()']]], + ['promoter',['promoter',['../structstan_1_1math_1_1promoter.html',1,'stan::math']]], + ['promoter_2ehpp',['promoter.hpp',['../promoter_8hpp.html',1,'']]], + ['promoter_3c_20eigen_3a_3amatrix_3c_20f_2c_20r_2c_20c_20_3e_2c_20eigen_3a_3amatrix_3c_20t_2c_20r_2c_20c_20_3e_20_3e',['promoter< Eigen::Matrix< F, R, C >, Eigen::Matrix< T, R, C > >',['../structstan_1_1math_1_1promoter_3_01_eigen_1_1_matrix_3_01_f_00_01_r_00_01_c_01_4_00_01_eigen_1_142b48fda94601374e41a81325f3f7b84.html',1,'stan::math']]], + ['promoter_3c_20eigen_3a_3amatrix_3c_20t_2c_20r_2c_20c_20_3e_2c_20eigen_3a_3amatrix_3c_20t_2c_20r_2c_20c_20_3e_20_3e',['promoter< Eigen::Matrix< T, R, C >, Eigen::Matrix< T, R, C > >',['../structstan_1_1math_1_1promoter_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_00_01_eigen_1_12d7fadf0560f1f2f3abc5388b7666f9c.html',1,'stan::math']]], + ['promoter_3c_20std_3a_3avector_3c_20f_20_3e_2c_20std_3a_3avector_3c_20t_20_3e_20_3e',['promoter< std::vector< F >, std::vector< T > >',['../structstan_1_1math_1_1promoter_3_01std_1_1vector_3_01_f_01_4_00_01std_1_1vector_3_01_t_01_4_01_4.html',1,'stan::math']]], + ['promoter_3c_20std_3a_3avector_3c_20t_20_3e_2c_20std_3a_3avector_3c_20t_20_3e_20_3e',['promoter< std::vector< T >, std::vector< T > >',['../structstan_1_1math_1_1promoter_3_01std_1_1vector_3_01_t_01_4_00_01std_1_1vector_3_01_t_01_4_01_4.html',1,'stan::math']]], + ['promoter_3c_20t_2c_20t_20_3e',['promoter< T, T >',['../structstan_1_1math_1_1promoter_3_01_t_00_01_t_01_4.html',1,'stan::math']]] +]; diff --git a/doc/api/html/search/classes_0.html b/doc/api/html/search/classes_0.html new file mode 100644 index 00000000000..fabdc036792 --- /dev/null +++ b/doc/api/html/search/classes_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/classes_0.js b/doc/api/html/search/classes_0.js new file mode 100644 index 00000000000..59d13ba5347 --- /dev/null +++ b/doc/api/html/search/classes_0.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['accumulator',['accumulator',['../classstan_1_1math_1_1accumulator.html',1,'stan::math']]], + ['array_5fbuilder',['array_builder',['../structstan_1_1math_1_1array__builder.html',1,'stan::math']]], + ['autodiffstackstorage',['AutodiffStackStorage',['../structstan_1_1math_1_1_autodiff_stack_storage.html',1,'stan::math']]] +]; diff --git a/doc/api/html/search/classes_1.html b/doc/api/html/search/classes_1.html new file mode 100644 index 00000000000..800b6ae1bf3 --- /dev/null +++ b/doc/api/html/search/classes_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/classes_1.js b/doc/api/html/search/classes_1.js new file mode 100644 index 00000000000..ecb32fdf9a9 --- /dev/null +++ b/doc/api/html/search/classes_1.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['bounded',['bounded',['../structstan_1_1math_1_1detail_1_1bounded.html',1,'stan::math::detail']]], + ['bounded_3c_20t_5fy_2c_20t_5flow_2c_20t_5fhigh_2c_20true_20_3e',['bounded< T_y, T_low, T_high, true >',['../structstan_1_1math_1_1detail_1_1bounded_3_01_t__y_00_01_t__low_00_01_t__high_00_01true_01_4.html',1,'stan::math::detail']]] +]; diff --git a/doc/api/html/search/classes_2.html b/doc/api/html/search/classes_2.html new file mode 100644 index 00000000000..f65d263c0c7 --- /dev/null +++ b/doc/api/html/search/classes_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/classes_2.js b/doc/api/html/search/classes_2.js new file mode 100644 index 00000000000..7bc89c5c85c --- /dev/null +++ b/doc/api/html/search/classes_2.js @@ -0,0 +1,26 @@ +var searchData= +[ + ['chainable',['chainable',['../classstan_1_1math_1_1chainable.html',1,'stan::math']]], + ['chainable_5falloc',['chainable_alloc',['../classstan_1_1math_1_1chainable__alloc.html',1,'stan::math']]], + ['child_5ftype',['child_type',['../structstan_1_1math_1_1child__type.html',1,'stan::math']]], + ['child_5ftype_3c_20t_5fstruct_3c_20t_5fchild_20_3e_20_3e',['child_type< T_struct< T_child > >',['../structstan_1_1math_1_1child__type_3_01_t__struct_3_01_t__child_01_4_01_4.html',1,'stan::math']]], + ['cholesky_5fdecompose_5fv_5fvari',['cholesky_decompose_v_vari',['../classstan_1_1math_1_1cholesky__decompose__v__vari.html',1,'stan::math']]], + ['common_5ftype',['common_type',['../structstan_1_1math_1_1common__type.html',1,'stan::math']]], + ['common_5ftype_3c_20eigen_3a_3amatrix_3c_20t1_2c_20r_2c_20c_20_3e_2c_20eigen_3a_3amatrix_3c_20t2_2c_20r_2c_20c_20_3e_20_3e',['common_type< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > >',['../structstan_1_1math_1_1common__type_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_eiged8accfa00e73f240c58ad02ac582ba93.html',1,'stan::math']]], + ['common_5ftype_3c_20std_3a_3avector_3c_20t1_20_3e_2c_20std_3a_3avector_3c_20t2_20_3e_20_3e',['common_type< std::vector< T1 >, std::vector< T2 > >',['../structstan_1_1math_1_1common__type_3_01std_1_1vector_3_01_t1_01_4_00_01std_1_1vector_3_01_t2_01_4_01_4.html',1,'stan::math']]], + ['container_5fview',['container_view',['../classstan_1_1math_1_1container__view.html',1,'stan::math']]], + ['container_5fview_3c_20dummy_2c_20t2_20_3e',['container_view< dummy, T2 >',['../classstan_1_1math_1_1container__view_3_01dummy_00_01_t2_01_4.html',1,'stan::math']]], + ['container_5fview_3c_20eigen_3a_3amatrix_3c_20t1_2c_20r_2c_20c_20_3e_2c_20eigen_3a_3amatrix_3c_20t2_2c_20r_2c_20c_20_3e_20_3e',['container_view< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > >',['../classstan_1_1math_1_1container__view_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_eif0a5cd6c4f7572d0a0485f479012b4cf.html',1,'stan::math']]], + ['container_5fview_3c_20eigen_3a_3amatrix_3c_20t1_2c_20r_2c_20c_20_3e_2c_20t2_20_3e',['container_view< Eigen::Matrix< T1, R, C >, T2 >',['../classstan_1_1math_1_1container__view_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_t2_01_4.html',1,'stan::math']]], + ['container_5fview_3c_20std_3a_3avector_3c_20eigen_3a_3amatrix_3c_20t1_2c_20r_2c_20c_20_3e_20_3e_2c_20eigen_3a_3amatrix_3c_20t2_2c_20r_2c_20c_20_3e_20_3e',['container_view< std::vector< Eigen::Matrix< T1, R, C > >, Eigen::Matrix< T2, R, C > >',['../classstan_1_1math_1_1container__view_3_01std_1_1vector_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_7f9efd46b00a4e97b56aae6ecc54dbcd.html',1,'stan::math']]], + ['container_5fview_3c_20std_3a_3avector_3c_20t1_20_3e_2c_20t2_20_3e',['container_view< std::vector< T1 >, T2 >',['../classstan_1_1math_1_1container__view_3_01std_1_1vector_3_01_t1_01_4_00_01_t2_01_4.html',1,'stan::math']]], + ['contains_5ffvar',['contains_fvar',['../structstan_1_1contains__fvar.html',1,'stan']]], + ['contains_5fnonconstant_5fstruct',['contains_nonconstant_struct',['../structstan_1_1contains__nonconstant__struct.html',1,'stan']]], + ['contains_5fvector',['contains_vector',['../structstan_1_1contains__vector.html',1,'stan']]], + ['coupled_5fode_5fobserver',['coupled_ode_observer',['../structstan_1_1math_1_1coupled__ode__observer.html',1,'stan::math']]], + ['coupled_5fode_5fsystem',['coupled_ode_system',['../structstan_1_1math_1_1coupled__ode__system.html',1,'stan::math']]], + ['coupled_5fode_5fsystem_3c_20f_2c_20double_2c_20double_20_3e',['coupled_ode_system< F, double, double >',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html',1,'stan::math']]], + ['coupled_5fode_5fsystem_3c_20f_2c_20double_2c_20stan_3a_3amath_3a_3avar_20_3e',['coupled_ode_system< F, double, stan::math::var >',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html',1,'stan::math']]], + ['coupled_5fode_5fsystem_3c_20f_2c_20stan_3a_3amath_3a_3avar_2c_20double_20_3e',['coupled_ode_system< F, stan::math::var, double >',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html',1,'stan::math']]], + ['coupled_5fode_5fsystem_3c_20f_2c_20stan_3a_3amath_3a_3avar_2c_20stan_3a_3amath_3a_3avar_20_3e',['coupled_ode_system< F, stan::math::var, stan::math::var >',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html',1,'stan::math']]] +]; diff --git a/doc/api/html/search/classes_3.html b/doc/api/html/search/classes_3.html new file mode 100644 index 00000000000..927e837f11f --- /dev/null +++ b/doc/api/html/search/classes_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/classes_3.js b/doc/api/html/search/classes_3.js new file mode 100644 index 00000000000..c853fec504b --- /dev/null +++ b/doc/api/html/search/classes_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['dummy',['dummy',['../structstan_1_1math_1_1dummy.html',1,'stan::math']]] +]; diff --git a/doc/api/html/search/classes_4.html b/doc/api/html/search/classes_4.html new file mode 100644 index 00000000000..a447290ed6d --- /dev/null +++ b/doc/api/html/search/classes_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/classes_4.js b/doc/api/html/search/classes_4.js new file mode 100644 index 00000000000..86ec0fc8089 --- /dev/null +++ b/doc/api/html/search/classes_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['error_5findex',['error_index',['../structstan_1_1error__index.html',1,'stan']]] +]; diff --git a/doc/api/html/search/classes_5.html b/doc/api/html/search/classes_5.html new file mode 100644 index 00000000000..63484c451e6 --- /dev/null +++ b/doc/api/html/search/classes_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/classes_5.js b/doc/api/html/search/classes_5.js new file mode 100644 index 00000000000..a7fc67b1af5 --- /dev/null +++ b/doc/api/html/search/classes_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['fvar',['fvar',['../structstan_1_1math_1_1fvar.html',1,'stan::math']]] +]; diff --git a/doc/api/html/search/classes_6.html b/doc/api/html/search/classes_6.html new file mode 100644 index 00000000000..f3d70354c67 --- /dev/null +++ b/doc/api/html/search/classes_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/classes_6.js b/doc/api/html/search/classes_6.js new file mode 100644 index 00000000000..0df8e84866d --- /dev/null +++ b/doc/api/html/search/classes_6.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['general_5fmatrix_5fmatrix_5fproduct_3c_20index_2c_20stan_3a_3amath_3a_3avar_2c_20lhsstorageorder_2c_20conjugatelhs_2c_20stan_3a_3amath_3a_3avar_2c_20rhsstorageorder_2c_20conjugaterhs_2c_20colmajor_20_3e',['general_matrix_matrix_product< Index, stan::math::var, LhsStorageOrder, ConjugateLhs, stan::math::var, RhsStorageOrder, ConjugateRhs, ColMajor >',['../struct_eigen_1_1internal_1_1general__matrix__matrix__product_3_01_index_00_01stan_1_1math_1_1var1562d71de7db86cb3dfb1784b090bdfc.html',1,'Eigen::internal']]], + ['general_5fmatrix_5fvector_5fproduct_3c_20index_2c_20stan_3a_3amath_3a_3avar_2c_20colmajor_2c_20conjugatelhs_2c_20stan_3a_3amath_3a_3avar_2c_20conjugaterhs_20_3e',['general_matrix_vector_product< Index, stan::math::var, ColMajor, ConjugateLhs, stan::math::var, ConjugateRhs >',['../struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var15f7d538e8be7d782eccb613a7b1e9bd.html',1,'Eigen::internal']]], + ['general_5fmatrix_5fvector_5fproduct_3c_20index_2c_20stan_3a_3amath_3a_3avar_2c_20rowmajor_2c_20conjugatelhs_2c_20stan_3a_3amath_3a_3avar_2c_20conjugaterhs_20_3e',['general_matrix_vector_product< Index, stan::math::var, RowMajor, ConjugateLhs, stan::math::var, ConjugateRhs >',['../struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var9294a9f65d48f87d892ffa4de3f3e667.html',1,'Eigen::internal']]], + ['gevv_5fvvv_5fvari',['gevv_vvv_vari',['../classstan_1_1math_1_1gevv__vvv__vari.html',1,'stan::math']]] +]; diff --git a/doc/api/html/search/classes_7.html b/doc/api/html/search/classes_7.html new file mode 100644 index 00000000000..9e5f5c9861d --- /dev/null +++ b/doc/api/html/search/classes_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/classes_7.js b/doc/api/html/search/classes_7.js new file mode 100644 index 00000000000..5f0c744105d --- /dev/null +++ b/doc/api/html/search/classes_7.js @@ -0,0 +1,28 @@ +var searchData= +[ + ['include_5fsummand',['include_summand',['../structstan_1_1math_1_1include__summand.html',1,'stan::math']]], + ['index_5ftype',['index_type',['../structstan_1_1math_1_1index__type.html',1,'stan::math']]], + ['index_5ftype_3c_20const_20t_20_3e',['index_type< const T >',['../structstan_1_1math_1_1index__type_3_01const_01_t_01_4.html',1,'stan::math']]], + ['index_5ftype_3c_20eigen_3a_3amatrix_3c_20t_2c_20r_2c_20c_20_3e_20_3e',['index_type< Eigen::Matrix< T, R, C > >',['../structstan_1_1math_1_1index__type_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4.html',1,'stan::math']]], + ['index_5ftype_3c_20std_3a_3avector_3c_20t_20_3e_20_3e',['index_type< std::vector< T > >',['../structstan_1_1math_1_1index__type_3_01std_1_1vector_3_01_t_01_4_01_4.html',1,'stan::math']]], + ['is_5fconstant',['is_constant',['../structstan_1_1is__constant.html',1,'stan']]], + ['is_5fconstant_5fstruct',['is_constant_struct',['../structstan_1_1is__constant__struct.html',1,'stan']]], + ['is_5fconstant_5fstruct_3c_20eigen_3a_3ablock_3c_20t_20_3e_20_3e',['is_constant_struct< Eigen::Block< T > >',['../structstan_1_1is__constant__struct_3_01_eigen_1_1_block_3_01_t_01_4_01_4.html',1,'stan']]], + ['is_5fconstant_5fstruct_3c_20eigen_3a_3amatrix_3c_20t_2c_20r_2c_20c_20_3e_20_3e',['is_constant_struct< Eigen::Matrix< T, R, C > >',['../structstan_1_1is__constant__struct_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4.html',1,'stan']]], + ['is_5fconstant_5fstruct_3c_20std_3a_3avector_3c_20t_20_3e_20_3e',['is_constant_struct< std::vector< T > >',['../structstan_1_1is__constant__struct_3_01std_1_1vector_3_01_t_01_4_01_4.html',1,'stan']]], + ['is_5ffvar',['is_fvar',['../structstan_1_1is__fvar.html',1,'stan']]], + ['is_5ffvar_3c_20stan_3a_3amath_3a_3afvar_3c_20t_20_3e_20_3e',['is_fvar< stan::math::fvar< T > >',['../structstan_1_1is__fvar_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html',1,'stan']]], + ['is_5fvar',['is_var',['../structstan_1_1is__var.html',1,'stan']]], + ['is_5fvar_3c_20stan_3a_3amath_3a_3avar_20_3e',['is_var< stan::math::var >',['../structstan_1_1is__var_3_01stan_1_1math_1_1var_01_4.html',1,'stan']]], + ['is_5fvar_5for_5farithmetic',['is_var_or_arithmetic',['../structstan_1_1is__var__or__arithmetic.html',1,'stan']]], + ['is_5fvector',['is_vector',['../structstan_1_1is__vector.html',1,'stan']]], + ['is_5fvector_3c_20const_20t_20_3e',['is_vector< const T >',['../structstan_1_1is__vector_3_01const_01_t_01_4.html',1,'stan']]], + ['is_5fvector_3c_20eigen_3a_3ablock_3c_20t_20_3e_20_3e',['is_vector< Eigen::Block< T > >',['../structstan_1_1is__vector_3_01_eigen_1_1_block_3_01_t_01_4_01_4.html',1,'stan']]], + ['is_5fvector_3c_20eigen_3a_3amatrix_3c_20t_2c_201_2c_20eigen_3a_3adynamic_20_3e_20_3e',['is_vector< Eigen::Matrix< T, 1, Eigen::Dynamic > >',['../structstan_1_1is__vector_3_01_eigen_1_1_matrix_3_01_t_00_011_00_01_eigen_1_1_dynamic_01_4_01_4.html',1,'stan']]], + ['is_5fvector_3c_20eigen_3a_3amatrix_3c_20t_2c_20eigen_3a_3adynamic_2c_201_20_3e_20_3e',['is_vector< Eigen::Matrix< T, Eigen::Dynamic, 1 > >',['../structstan_1_1is__vector_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_011_01_4_01_4.html',1,'stan']]], + ['is_5fvector_3c_20std_3a_3avector_3c_20t_20_3e_20_3e',['is_vector< std::vector< T > >',['../structstan_1_1is__vector_3_01std_1_1vector_3_01_t_01_4_01_4.html',1,'stan']]], + ['is_5fvector_5flike',['is_vector_like',['../structstan_1_1is__vector__like.html',1,'stan']]], + ['is_5fvector_5flike_3c_20const_20t_20_3e',['is_vector_like< const T >',['../structstan_1_1is__vector__like_3_01const_01_t_01_4.html',1,'stan']]], + ['is_5fvector_5flike_3c_20eigen_3a_3amatrix_3c_20t_2c_20eigen_3a_3adynamic_2c_20eigen_3a_3adynamic_20_3e_20_3e',['is_vector_like< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > >',['../structstan_1_1is__vector__like_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4.html',1,'stan']]], + ['is_5fvector_5flike_3c_20t_20_2a_20_3e',['is_vector_like< T * >',['../structstan_1_1is__vector__like_3_01_t_01_5_01_4.html',1,'stan']]] +]; diff --git a/doc/api/html/search/classes_8.html b/doc/api/html/search/classes_8.html new file mode 100644 index 00000000000..82c35b32efa --- /dev/null +++ b/doc/api/html/search/classes_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/classes_8.js b/doc/api/html/search/classes_8.js new file mode 100644 index 00000000000..9e4e159ea4a --- /dev/null +++ b/doc/api/html/search/classes_8.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['ldlt_5falloc',['LDLT_alloc',['../classstan_1_1math_1_1_l_d_l_t__alloc.html',1,'stan::math']]], + ['ldlt_5ffactor',['LDLT_factor',['../classstan_1_1math_1_1_l_d_l_t__factor.html',1,'stan::math']]], + ['ldlt_5ffactor_3c_20stan_3a_3amath_3a_3avar_2c_20r_2c_20c_20_3e',['LDLT_factor< stan::math::var, R, C >',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4.html',1,'stan::math']]], + ['ldlt_5ffactor_3c_20t_2c_20r_2c_20c_20_3e',['LDLT_factor< T, R, C >',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html',1,'stan::math']]] +]; diff --git a/doc/api/html/search/classes_9.html b/doc/api/html/search/classes_9.html new file mode 100644 index 00000000000..4e83ac829b2 --- /dev/null +++ b/doc/api/html/search/classes_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/classes_9.js b/doc/api/html/search/classes_9.js new file mode 100644 index 00000000000..197e2df3764 --- /dev/null +++ b/doc/api/html/search/classes_9.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['numeric_5flimits_3c_20stan_3a_3amath_3a_3afvar_3c_20t_20_3e_20_3e',['numeric_limits< stan::math::fvar< T > >',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html',1,'std']]], + ['numeric_5flimits_3c_20stan_3a_3amath_3a_3avar_20_3e',['numeric_limits< stan::math::var >',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html',1,'std']]], + ['numtraits_3c_20stan_3a_3amath_3a_3afvar_3c_20t_20_3e_20_3e',['NumTraits< stan::math::fvar< T > >',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html',1,'Eigen']]], + ['numtraits_3c_20stan_3a_3amath_3a_3avar_20_3e',['NumTraits< stan::math::var >',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html',1,'Eigen']]] +]; diff --git a/doc/api/html/search/classes_a.html b/doc/api/html/search/classes_a.html new file mode 100644 index 00000000000..616feb69a2f --- /dev/null +++ b/doc/api/html/search/classes_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/classes_a.js b/doc/api/html/search/classes_a.js new file mode 100644 index 00000000000..ba5f363edf7 --- /dev/null +++ b/doc/api/html/search/classes_a.js @@ -0,0 +1,17 @@ +var searchData= +[ + ['op_5fddv_5fvari',['op_ddv_vari',['../classstan_1_1math_1_1op__ddv__vari.html',1,'stan::math']]], + ['op_5fdv_5fvari',['op_dv_vari',['../classstan_1_1math_1_1op__dv__vari.html',1,'stan::math']]], + ['op_5fdvd_5fvari',['op_dvd_vari',['../classstan_1_1math_1_1op__dvd__vari.html',1,'stan::math']]], + ['op_5fdvv_5fvari',['op_dvv_vari',['../classstan_1_1math_1_1op__dvv__vari.html',1,'stan::math']]], + ['op_5fmatrix_5fvari',['op_matrix_vari',['../classstan_1_1math_1_1op__matrix__vari.html',1,'stan::math']]], + ['op_5fv_5fvari',['op_v_vari',['../classstan_1_1math_1_1op__v__vari.html',1,'stan::math']]], + ['op_5fvd_5fvari',['op_vd_vari',['../classstan_1_1math_1_1op__vd__vari.html',1,'stan::math']]], + ['op_5fvdd_5fvari',['op_vdd_vari',['../classstan_1_1math_1_1op__vdd__vari.html',1,'stan::math']]], + ['op_5fvdv_5fvari',['op_vdv_vari',['../classstan_1_1math_1_1op__vdv__vari.html',1,'stan::math']]], + ['op_5fvector_5fvari',['op_vector_vari',['../classstan_1_1math_1_1op__vector__vari.html',1,'stan::math']]], + ['op_5fvv_5fvari',['op_vv_vari',['../classstan_1_1math_1_1op__vv__vari.html',1,'stan::math']]], + ['op_5fvvd_5fvari',['op_vvd_vari',['../classstan_1_1math_1_1op__vvd__vari.html',1,'stan::math']]], + ['op_5fvvv_5fvari',['op_vvv_vari',['../classstan_1_1math_1_1op__vvv__vari.html',1,'stan::math']]], + ['operandsandpartials',['OperandsAndPartials',['../structstan_1_1math_1_1_operands_and_partials.html',1,'stan::math']]] +]; diff --git a/doc/api/html/search/classes_b.html b/doc/api/html/search/classes_b.html new file mode 100644 index 00000000000..44611522005 --- /dev/null +++ b/doc/api/html/search/classes_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/classes_b.js b/doc/api/html/search/classes_b.js new file mode 100644 index 00000000000..31e6bc4bf8f --- /dev/null +++ b/doc/api/html/search/classes_b.js @@ -0,0 +1,32 @@ +var searchData= +[ + ['partials_5freturn_5ftype',['partials_return_type',['../structstan_1_1partials__return__type.html',1,'stan']]], + ['partials_5ftype',['partials_type',['../structstan_1_1partials__type.html',1,'stan']]], + ['partials_5ftype_3c_20stan_3a_3amath_3a_3afvar_3c_20t_20_3e_20_3e',['partials_type< stan::math::fvar< T > >',['../structstan_1_1partials__type_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html',1,'stan']]], + ['partials_5ftype_3c_20stan_3a_3amath_3a_3avar_20_3e',['partials_type< stan::math::var >',['../structstan_1_1partials__type_3_01stan_1_1math_1_1var_01_4.html',1,'stan']]], + ['partials_5fvari',['partials_vari',['../classstan_1_1math_1_1partials__vari.html',1,'stan::math']]], + ['pass_5ftype',['pass_type',['../structstan_1_1math_1_1pass__type.html',1,'stan::math']]], + ['pass_5ftype_3c_20double_20_3e',['pass_type< double >',['../structstan_1_1math_1_1pass__type_3_01double_01_4.html',1,'stan::math']]], + ['pass_5ftype_3c_20int_20_3e',['pass_type< int >',['../structstan_1_1math_1_1pass__type_3_01int_01_4.html',1,'stan::math']]], + ['precomp_5fv_5fvari',['precomp_v_vari',['../classstan_1_1math_1_1precomp__v__vari.html',1,'stan::math']]], + ['precomp_5fvv_5fvari',['precomp_vv_vari',['../classstan_1_1math_1_1precomp__vv__vari.html',1,'stan::math']]], + ['precomp_5fvvv_5fvari',['precomp_vvv_vari',['../classstan_1_1math_1_1precomp__vvv__vari.html',1,'stan::math']]], + ['precomputed_5fgradients_5fvari',['precomputed_gradients_vari',['../classstan_1_1math_1_1precomputed__gradients__vari.html',1,'stan::math']]], + ['promote_5fscalar_5fstruct',['promote_scalar_struct',['../structstan_1_1math_1_1promote__scalar__struct.html',1,'stan::math']]], + ['promote_5fscalar_5fstruct_3c_20t_2c_20eigen_3a_3amatrix_3c_20s_2c_201_2c_2d1_20_3e_20_3e',['promote_scalar_struct< T, Eigen::Matrix< S, 1,-1 > >',['../structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00-1_01_4_01_4.html',1,'stan::math']]], + ['promote_5fscalar_5fstruct_3c_20t_2c_20eigen_3a_3amatrix_3c_20s_2c_2d1_2c_201_20_3e_20_3e',['promote_scalar_struct< T, Eigen::Matrix< S,-1, 1 > >',['../structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00-1_00_011_01_4_01_4.html',1,'stan::math']]], + ['promote_5fscalar_5fstruct_3c_20t_2c_20eigen_3a_3amatrix_3c_20s_2c_2d1_2c_2d1_20_3e_20_3e',['promote_scalar_struct< T, Eigen::Matrix< S,-1,-1 > >',['../structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00-1_00-1_01_4_01_4.html',1,'stan::math']]], + ['promote_5fscalar_5fstruct_3c_20t_2c_20std_3a_3avector_3c_20s_20_3e_20_3e',['promote_scalar_struct< T, std::vector< S > >',['../structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4.html',1,'stan::math']]], + ['promote_5fscalar_5fstruct_3c_20t_2c_20t_20_3e',['promote_scalar_struct< T, T >',['../structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_t_01_4.html',1,'stan::math']]], + ['promote_5fscalar_5ftype',['promote_scalar_type',['../structstan_1_1math_1_1promote__scalar__type.html',1,'stan::math']]], + ['promote_5fscalar_5ftype_3c_20t_2c_20eigen_3a_3amatrix_3c_20s_2c_201_2c_20eigen_3a_3adynamic_20_3e_20_3e',['promote_scalar_type< T, Eigen::Matrix< S, 1, Eigen::Dynamic > >',['../structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00_01_eigen_1_1_dynamic_01_4_01_4.html',1,'stan::math']]], + ['promote_5fscalar_5ftype_3c_20t_2c_20eigen_3a_3amatrix_3c_20s_2c_20eigen_3a_3adynamic_2c_201_20_3e_20_3e',['promote_scalar_type< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > >',['../structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_011_01_4_01_4.html',1,'stan::math']]], + ['promote_5fscalar_5ftype_3c_20t_2c_20eigen_3a_3amatrix_3c_20s_2c_20eigen_3a_3adynamic_2c_20eigen_3a_3adynamic_20_3e_20_3e',['promote_scalar_type< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >',['../structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1e90c042d64d8c3a6b9383f570932df58.html',1,'stan::math']]], + ['promote_5fscalar_5ftype_3c_20t_2c_20std_3a_3avector_3c_20s_20_3e_20_3e',['promote_scalar_type< T, std::vector< S > >',['../structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4.html',1,'stan::math']]], + ['promoter',['promoter',['../structstan_1_1math_1_1promoter.html',1,'stan::math']]], + ['promoter_3c_20eigen_3a_3amatrix_3c_20f_2c_20r_2c_20c_20_3e_2c_20eigen_3a_3amatrix_3c_20t_2c_20r_2c_20c_20_3e_20_3e',['promoter< Eigen::Matrix< F, R, C >, Eigen::Matrix< T, R, C > >',['../structstan_1_1math_1_1promoter_3_01_eigen_1_1_matrix_3_01_f_00_01_r_00_01_c_01_4_00_01_eigen_1_142b48fda94601374e41a81325f3f7b84.html',1,'stan::math']]], + ['promoter_3c_20eigen_3a_3amatrix_3c_20t_2c_20r_2c_20c_20_3e_2c_20eigen_3a_3amatrix_3c_20t_2c_20r_2c_20c_20_3e_20_3e',['promoter< Eigen::Matrix< T, R, C >, Eigen::Matrix< T, R, C > >',['../structstan_1_1math_1_1promoter_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_00_01_eigen_1_12d7fadf0560f1f2f3abc5388b7666f9c.html',1,'stan::math']]], + ['promoter_3c_20std_3a_3avector_3c_20f_20_3e_2c_20std_3a_3avector_3c_20t_20_3e_20_3e',['promoter< std::vector< F >, std::vector< T > >',['../structstan_1_1math_1_1promoter_3_01std_1_1vector_3_01_f_01_4_00_01std_1_1vector_3_01_t_01_4_01_4.html',1,'stan::math']]], + ['promoter_3c_20std_3a_3avector_3c_20t_20_3e_2c_20std_3a_3avector_3c_20t_20_3e_20_3e',['promoter< std::vector< T >, std::vector< T > >',['../structstan_1_1math_1_1promoter_3_01std_1_1vector_3_01_t_01_4_00_01std_1_1vector_3_01_t_01_4_01_4.html',1,'stan::math']]], + ['promoter_3c_20t_2c_20t_20_3e',['promoter< T, T >',['../structstan_1_1math_1_1promoter_3_01_t_00_01_t_01_4.html',1,'stan::math']]] +]; diff --git a/doc/api/html/search/classes_c.html b/doc/api/html/search/classes_c.html new file mode 100644 index 00000000000..8f92c8632a0 --- /dev/null +++ b/doc/api/html/search/classes_c.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/classes_c.js b/doc/api/html/search/classes_c.js new file mode 100644 index 00000000000..cea8cc7b0c4 --- /dev/null +++ b/doc/api/html/search/classes_c.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['return_5ftype',['return_type',['../structstan_1_1return__type.html',1,'stan']]] +]; diff --git a/doc/api/html/search/classes_d.html b/doc/api/html/search/classes_d.html new file mode 100644 index 00000000000..9690cf0bac8 --- /dev/null +++ b/doc/api/html/search/classes_d.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/classes_d.js b/doc/api/html/search/classes_d.js new file mode 100644 index 00000000000..4471801a2cb --- /dev/null +++ b/doc/api/html/search/classes_d.js @@ -0,0 +1,36 @@ +var searchData= +[ + ['scalar_5fproduct_5ftraits_3c_20double_2c_20stan_3a_3amath_3a_3avar_20_3e',['scalar_product_traits< double, stan::math::var >',['../struct_eigen_1_1internal_1_1scalar__product__traits_3_01double_00_01stan_1_1math_1_1var_01_4.html',1,'Eigen::internal']]], + ['scalar_5fproduct_5ftraits_3c_20stan_3a_3amath_3a_3avar_2c_20double_20_3e',['scalar_product_traits< stan::math::var, double >',['../struct_eigen_1_1internal_1_1scalar__product__traits_3_01stan_1_1math_1_1var_00_01double_01_4.html',1,'Eigen::internal']]], + ['scalar_5ftype',['scalar_type',['../structstan_1_1scalar__type.html',1,'stan']]], + ['scalar_5ftype_3c_20eigen_3a_3amatrix_3c_20t_2c_20eigen_3a_3adynamic_2c_20eigen_3a_3adynamic_20_3e_20_3e',['scalar_type< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > >',['../structstan_1_1scalar__type_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4.html',1,'stan']]], + ['scalar_5ftype_3c_20t_20_2a_20_3e',['scalar_type< T * >',['../structstan_1_1scalar__type_3_01_t_01_5_01_4.html',1,'stan']]], + ['scalar_5ftype_5fpre',['scalar_type_pre',['../structstan_1_1scalar__type__pre.html',1,'stan']]], + ['seq_5fview',['seq_view',['../classstan_1_1math_1_1seq__view.html',1,'stan::math']]], + ['seq_5fview_3c_20double_2c_20std_3a_3avector_3c_20int_20_3e_20_3e',['seq_view< double, std::vector< int > >',['../classstan_1_1math_1_1seq__view_3_01double_00_01std_1_1vector_3_01int_01_4_01_4.html',1,'stan::math']]], + ['seq_5fview_3c_20t_2c_20eigen_3a_3amatrix_3c_20s_2c_201_2c_20eigen_3a_3adynamic_20_3e_20_3e',['seq_view< T, Eigen::Matrix< S, 1, Eigen::Dynamic > >',['../classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00_01_eigen_1_1_dynamic_01_4_01_4.html',1,'stan::math']]], + ['seq_5fview_3c_20t_2c_20eigen_3a_3amatrix_3c_20s_2c_20eigen_3a_3adynamic_2c_201_20_3e_20_3e',['seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > >',['../classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_011_01_4_01_4.html',1,'stan::math']]], + ['seq_5fview_3c_20t_2c_20eigen_3a_3amatrix_3c_20s_2c_20eigen_3a_3adynamic_2c_20eigen_3a_3adynamic_20_3e_20_3e',['seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >',['../classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4.html',1,'stan::math']]], + ['seq_5fview_3c_20t_2c_20std_3a_3avector_3c_20s_20_3e_20_3e',['seq_view< T, std::vector< S > >',['../classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4.html',1,'stan::math']]], + ['seq_5fview_3c_20t_2c_20std_3a_3avector_3c_20std_3a_3avector_3c_20t_20_3e_20_3e_20_3e',['seq_view< T, std::vector< std::vector< T > > >',['../classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01std_1_1vector_3_01_t_01_4_01_4_01_4.html',1,'stan::math']]], + ['seq_5fview_3c_20t_2c_20std_3a_3avector_3c_20t_20_3e_20_3e',['seq_view< T, std::vector< T > >',['../classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01_t_01_4_01_4.html',1,'stan::math']]], + ['significant_5fdecimals_5fdefault_5fimpl_3c_20stan_3a_3amath_3a_3afvar_3c_20t_20_3e_2c_20false_20_3e',['significant_decimals_default_impl< stan::math::fvar< T >, false >',['../struct_eigen_1_1internal_1_1significant__decimals__default__impl_3_01stan_1_1math_1_1fvar_3_01_t_01_4_00_01false_01_4.html',1,'Eigen::internal']]], + ['significant_5fdecimals_5fdefault_5fimpl_3c_20stan_3a_3amath_3a_3avar_2c_20false_20_3e',['significant_decimals_default_impl< stan::math::var, false >',['../struct_eigen_1_1internal_1_1significant__decimals__default__impl_3_01stan_1_1math_1_1var_00_01false_01_4.html',1,'Eigen::internal']]], + ['size_5fof_5fhelper',['size_of_helper',['../structstan_1_1size__of__helper.html',1,'stan']]], + ['size_5fof_5fhelper_3c_20t_2c_20true_20_3e',['size_of_helper< T, true >',['../structstan_1_1size__of__helper_3_01_t_00_01true_01_4.html',1,'stan']]], + ['stack_5falloc',['stack_alloc',['../classstan_1_1math_1_1stack__alloc.html',1,'stan::math']]], + ['store_5ftype',['store_type',['../structstan_1_1math_1_1store__type.html',1,'stan::math']]], + ['store_5ftype_3c_20double_20_3e',['store_type< double >',['../structstan_1_1math_1_1store__type_3_01double_01_4.html',1,'stan::math']]], + ['store_5ftype_3c_20eigen_3a_3amatrix_3c_20s_2c_201_2c_20eigen_3a_3adynamic_20_3e_20_3e',['store_type< Eigen::Matrix< S, 1, Eigen::Dynamic > >',['../structstan_1_1math_1_1store__type.html',1,'stan::math']]], + ['store_5ftype_3c_20eigen_3a_3amatrix_3c_20s_2c_20eigen_3a_3adynamic_2c_201_20_3e_20_3e',['store_type< Eigen::Matrix< S, Eigen::Dynamic, 1 > >',['../structstan_1_1math_1_1store__type.html',1,'stan::math']]], + ['store_5ftype_3c_20eigen_3a_3amatrix_3c_20s_2c_20eigen_3a_3adynamic_2c_20eigen_3a_3adynamic_20_3e_20_3e',['store_type< Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >',['../structstan_1_1math_1_1store__type.html',1,'stan::math']]], + ['store_5ftype_3c_20int_20_3e',['store_type< int >',['../structstan_1_1math_1_1store__type_3_01int_01_4.html',1,'stan::math']]], + ['store_5ftype_3c_20s_20_3e',['store_type< S >',['../structstan_1_1math_1_1store__type.html',1,'stan::math']]], + ['store_5ftype_3c_20std_3a_3avector_3c_20int_20_3e_20_3e',['store_type< std::vector< int > >',['../structstan_1_1math_1_1store__type.html',1,'stan::math']]], + ['store_5ftype_3c_20std_3a_3avector_3c_20s_20_3e_20_3e',['store_type< std::vector< S > >',['../structstan_1_1math_1_1store__type.html',1,'stan::math']]], + ['store_5ftype_3c_20std_3a_3avector_3c_20std_3a_3avector_3c_20t_20_3e_20_3e_20_3e',['store_type< std::vector< std::vector< T > > >',['../structstan_1_1math_1_1store__type.html',1,'stan::math']]], + ['store_5ftype_3c_20std_3a_3avector_3c_20t_20_3e_20_3e',['store_type< std::vector< T > >',['../structstan_1_1math_1_1store__type.html',1,'stan::math']]], + ['stored_5fgradient_5fvari',['stored_gradient_vari',['../classstan_1_1math_1_1stored__gradient__vari.html',1,'stan::math']]], + ['sum_5feigen_5fv_5fvari',['sum_eigen_v_vari',['../classstan_1_1math_1_1sum__eigen__v__vari.html',1,'stan::math']]], + ['sum_5fv_5fvari',['sum_v_vari',['../classstan_1_1math_1_1sum__v__vari.html',1,'stan::math']]] +]; diff --git a/doc/api/html/search/classes_e.html b/doc/api/html/search/classes_e.html new file mode 100644 index 00000000000..24a3ef3abaf --- /dev/null +++ b/doc/api/html/search/classes_e.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/classes_e.js b/doc/api/html/search/classes_e.js new file mode 100644 index 00000000000..b956c6f2d72 --- /dev/null +++ b/doc/api/html/search/classes_e.js @@ -0,0 +1,25 @@ +var searchData= +[ + ['value_5ftype',['value_type',['../structstan_1_1math_1_1value__type.html',1,'stan::math']]], + ['value_5ftype_3c_20const_20t_20_3e',['value_type< const T >',['../structstan_1_1math_1_1value__type_3_01const_01_t_01_4.html',1,'stan::math']]], + ['value_5ftype_3c_20eigen_3a_3amatrix_3c_20t_2c_20r_2c_20c_20_3e_20_3e',['value_type< Eigen::Matrix< T, R, C > >',['../structstan_1_1math_1_1value__type_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4.html',1,'stan::math']]], + ['value_5ftype_3c_20std_3a_3avector_3c_20t_20_3e_20_3e',['value_type< std::vector< T > >',['../structstan_1_1math_1_1value__type_3_01std_1_1vector_3_01_t_01_4_01_4.html',1,'stan::math']]], + ['var',['var',['../classstan_1_1math_1_1var.html',1,'stan::math']]], + ['vari',['vari',['../classstan_1_1math_1_1vari.html',1,'stan::math']]], + ['vectorbuilder',['VectorBuilder',['../classstan_1_1_vector_builder.html',1,'stan']]], + ['vectorbuilderhelper',['VectorBuilderHelper',['../classstan_1_1_vector_builder_helper.html',1,'stan']]], + ['vectorbuilderhelper_3c_20t1_2c_20true_2c_20false_20_3e',['VectorBuilderHelper< T1, true, false >',['../classstan_1_1_vector_builder_helper_3_01_t1_00_01true_00_01false_01_4.html',1,'stan']]], + ['vectorbuilderhelper_3c_20t1_2c_20true_2c_20true_20_3e',['VectorBuilderHelper< T1, true, true >',['../classstan_1_1_vector_builder_helper_3_01_t1_00_01true_00_01true_01_4.html',1,'stan']]], + ['vectorbuilderhelper_3c_20t1_2c_20used_2c_20stan_3a_3acontains_5fvector_3c_20t2_2c_20t3_2c_20t4_2c_20t5_2c_20t6_2c_20t7_20_3e_3a_3avalue_20_3e',['VectorBuilderHelper< T1, used, stan::contains_vector< T2, T3, T4, T5, T6, T7 >::value >',['../classstan_1_1_vector_builder_helper.html',1,'stan']]], + ['vectorview',['VectorView',['../classstan_1_1_vector_view.html',1,'stan']]], + ['vectorview_3c_20const_20double_2c_20false_2c_20false_20_3e',['VectorView< const double, false, false >',['../classstan_1_1_vector_view_3_01const_01double_00_01false_00_01false_01_4.html',1,'stan']]], + ['vectorview_3c_20const_20t_2c_20is_5farray_2c_20throw_5fif_5faccessed_20_3e',['VectorView< const T, is_array, throw_if_accessed >',['../classstan_1_1_vector_view_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html',1,'stan']]], + ['vectorview_3c_20t_5fpartials_5freturn_2c_20stan_3a_3ais_5fvector_3c_20t1_20_3e_3a_3avalue_2c_20stan_3a_3ais_5fconstant_5fstruct_3c_20t1_20_3e_3a_3avalue_20_3e',['VectorView< T_partials_return, stan::is_vector< T1 >::value, stan::is_constant_struct< T1 >::value >',['../classstan_1_1_vector_view.html',1,'stan']]], + ['vectorview_3c_20t_5fpartials_5freturn_2c_20stan_3a_3ais_5fvector_3c_20t2_20_3e_3a_3avalue_2c_20stan_3a_3ais_5fconstant_5fstruct_3c_20t2_20_3e_3a_3avalue_20_3e',['VectorView< T_partials_return, stan::is_vector< T2 >::value, stan::is_constant_struct< T2 >::value >',['../classstan_1_1_vector_view.html',1,'stan']]], + ['vectorview_3c_20t_5fpartials_5freturn_2c_20stan_3a_3ais_5fvector_3c_20t3_20_3e_3a_3avalue_2c_20stan_3a_3ais_5fconstant_5fstruct_3c_20t3_20_3e_3a_3avalue_20_3e',['VectorView< T_partials_return, stan::is_vector< T3 >::value, stan::is_constant_struct< T3 >::value >',['../classstan_1_1_vector_view.html',1,'stan']]], + ['vectorview_3c_20t_5fpartials_5freturn_2c_20stan_3a_3ais_5fvector_3c_20t4_20_3e_3a_3avalue_2c_20stan_3a_3ais_5fconstant_5fstruct_3c_20t4_20_3e_3a_3avalue_20_3e',['VectorView< T_partials_return, stan::is_vector< T4 >::value, stan::is_constant_struct< T4 >::value >',['../classstan_1_1_vector_view.html',1,'stan']]], + ['vectorview_3c_20t_5fpartials_5freturn_2c_20stan_3a_3ais_5fvector_3c_20t5_20_3e_3a_3avalue_2c_20stan_3a_3ais_5fconstant_5fstruct_3c_20t5_20_3e_3a_3avalue_20_3e',['VectorView< T_partials_return, stan::is_vector< T5 >::value, stan::is_constant_struct< T5 >::value >',['../classstan_1_1_vector_view.html',1,'stan']]], + ['vectorview_3c_20t_5fpartials_5freturn_2c_20stan_3a_3ais_5fvector_3c_20t6_20_3e_3a_3avalue_2c_20stan_3a_3ais_5fconstant_5fstruct_3c_20t6_20_3e_3a_3avalue_20_3e',['VectorView< T_partials_return, stan::is_vector< T6 >::value, stan::is_constant_struct< T6 >::value >',['../classstan_1_1_vector_view.html',1,'stan']]], + ['vectorviewmvt',['VectorViewMvt',['../classstan_1_1_vector_view_mvt.html',1,'stan']]], + ['vectorviewmvt_3c_20const_20t_2c_20is_5farray_2c_20throw_5fif_5faccessed_20_3e',['VectorViewMvt< const T, is_array, throw_if_accessed >',['../classstan_1_1_vector_view_mvt_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html',1,'stan']]] +]; diff --git a/doc/api/html/search/classes_f.html b/doc/api/html/search/classes_f.html new file mode 100644 index 00000000000..cee523ad6b4 --- /dev/null +++ b/doc/api/html/search/classes_f.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/classes_f.js b/doc/api/html/search/classes_f.js new file mode 100644 index 00000000000..1ec991ecb31 --- /dev/null +++ b/doc/api/html/search/classes_f.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['welford_5fcovar_5festimator',['welford_covar_estimator',['../classstan_1_1math_1_1welford__covar__estimator.html',1,'stan::math']]], + ['welford_5fvar_5festimator',['welford_var_estimator',['../classstan_1_1math_1_1welford__var__estimator.html',1,'stan::math']]] +]; diff --git a/doc/api/html/search/close.png b/doc/api/html/search/close.png new file mode 100644 index 00000000000..9342d3dfeea Binary files /dev/null and b/doc/api/html/search/close.png differ diff --git a/doc/api/html/search/defines_0.html b/doc/api/html/search/defines_0.html new file mode 100644 index 00000000000..c2f0b46cfb5 --- /dev/null +++ b/doc/api/html/search/defines_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/defines_0.js b/doc/api/html/search/defines_0.js new file mode 100644 index 00000000000..eff5b84cb86 --- /dev/null +++ b/doc/api/html/search/defines_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['likely',['likely',['../likely_8hpp.html#a217a0bd562b98ae8c2ffce44935351e1',1,'likely.hpp']]] +]; diff --git a/doc/api/html/search/defines_1.html b/doc/api/html/search/defines_1.html new file mode 100644 index 00000000000..9e1d9fa1160 --- /dev/null +++ b/doc/api/html/search/defines_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/defines_1.js b/doc/api/html/search/defines_1.js new file mode 100644 index 00000000000..ad5efef2bc6 --- /dev/null +++ b/doc/api/html/search/defines_1.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['stan_5fmath_5fmajor',['STAN_MATH_MAJOR',['../version_8hpp.html#a64f03843f4437f40d083b7bc1a1206e1',1,'version.hpp']]], + ['stan_5fmath_5fminor',['STAN_MATH_MINOR',['../version_8hpp.html#afae12a425638d2799b253d3eb268190c',1,'version.hpp']]], + ['stan_5fmath_5fpatch',['STAN_MATH_PATCH',['../version_8hpp.html#aacfcdd8a078a3dc181112e6d04b82f49',1,'version.hpp']]], + ['stan_5fstring',['STAN_STRING',['../version_8hpp.html#a0c96447c79362b9df7ef76867a44d3be',1,'version.hpp']]], + ['stan_5fstring_5fexpand',['STAN_STRING_EXPAND',['../version_8hpp.html#aad2ae61392a9e7bd9be77f2688b93cee',1,'version.hpp']]] +]; diff --git a/doc/api/html/search/defines_2.html b/doc/api/html/search/defines_2.html new file mode 100644 index 00000000000..6ef4b980d71 --- /dev/null +++ b/doc/api/html/search/defines_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/defines_2.js b/doc/api/html/search/defines_2.js new file mode 100644 index 00000000000..9ae36d47053 --- /dev/null +++ b/doc/api/html/search/defines_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['unlikely',['unlikely',['../likely_8hpp.html#ac6c45889010c1bd68631771b64f18101',1,'likely.hpp']]] +]; diff --git a/doc/api/html/search/enumvalues_0.html b/doc/api/html/search/enumvalues_0.html new file mode 100644 index 00000000000..3e00fcf61a6 --- /dev/null +++ b/doc/api/html/search/enumvalues_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/enumvalues_0.js b/doc/api/html/search/enumvalues_0.js new file mode 100644 index 00000000000..a6697b90534 --- /dev/null +++ b/doc/api/html/search/enumvalues_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['addcost',['AddCost',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a768855037a4305f4d90091d81bb92258a9d999dfd79c2ae5df9bf7fe13e625a51',1,'Eigen::NumTraits< stan::math::fvar< T > >::AddCost()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#afbb9dcc15eb3b86fd1ed8a3ef5158634a4114588cd7374efae03440efcad3674c',1,'Eigen::NumTraits< stan::math::var >::AddCost()']]] +]; diff --git a/doc/api/html/search/enumvalues_1.html b/doc/api/html/search/enumvalues_1.html new file mode 100644 index 00000000000..0e575c969a7 --- /dev/null +++ b/doc/api/html/search/enumvalues_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/enumvalues_1.js b/doc/api/html/search/enumvalues_1.js new file mode 100644 index 00000000000..0732be675f8 --- /dev/null +++ b/doc/api/html/search/enumvalues_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['hasfloatingpoint',['HasFloatingPoint',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a768855037a4305f4d90091d81bb92258a331e8b0d5aeefe0c3d552cddade41ae3',1,'Eigen::NumTraits< stan::math::fvar< T > >::HasFloatingPoint()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#afbb9dcc15eb3b86fd1ed8a3ef5158634a725304337ba652873babd17b350f8cdc',1,'Eigen::NumTraits< stan::math::var >::HasFloatingPoint()']]] +]; diff --git a/doc/api/html/search/enumvalues_2.html b/doc/api/html/search/enumvalues_2.html new file mode 100644 index 00000000000..e59f4acb752 --- /dev/null +++ b/doc/api/html/search/enumvalues_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/enumvalues_2.js b/doc/api/html/search/enumvalues_2.js new file mode 100644 index 00000000000..405d6ebfbc0 --- /dev/null +++ b/doc/api/html/search/enumvalues_2.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['iscomplex',['IsComplex',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a768855037a4305f4d90091d81bb92258a927bbae55331d3b6f7cb4c78a5fad146',1,'Eigen::NumTraits< stan::math::fvar< T > >::IsComplex()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#afbb9dcc15eb3b86fd1ed8a3ef5158634a9138c6bf5ace7c298c0c3a65d2c4e505',1,'Eigen::NumTraits< stan::math::var >::IsComplex()']]], + ['isinteger',['IsInteger',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a768855037a4305f4d90091d81bb92258a274287a3cdae5ae4d48890ae91d32b4b',1,'Eigen::NumTraits< stan::math::fvar< T > >::IsInteger()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#afbb9dcc15eb3b86fd1ed8a3ef5158634adc43be51c2a6f27df544131c7c87ea00',1,'Eigen::NumTraits< stan::math::var >::IsInteger()']]], + ['issigned',['IsSigned',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a768855037a4305f4d90091d81bb92258a0bc04ee5f79e5accb84c3ae8b03f2fbc',1,'Eigen::NumTraits< stan::math::fvar< T > >::IsSigned()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#afbb9dcc15eb3b86fd1ed8a3ef5158634a7aa15fd85e5ac1c996ce5ddefa802df0',1,'Eigen::NumTraits< stan::math::var >::IsSigned()']]] +]; diff --git a/doc/api/html/search/enumvalues_3.html b/doc/api/html/search/enumvalues_3.html new file mode 100644 index 00000000000..0a2d754e4d2 --- /dev/null +++ b/doc/api/html/search/enumvalues_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/enumvalues_3.js b/doc/api/html/search/enumvalues_3.js new file mode 100644 index 00000000000..643c190cd0d --- /dev/null +++ b/doc/api/html/search/enumvalues_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['lhsstorageorder',['LhsStorageOrder',['../struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var15f7d538e8be7d782eccb613a7b1e9bd.html#a762803421099da2b85339c00099d5e2dab916a097ea488839806672c0c220a1db',1,'Eigen::internal::general_matrix_vector_product< Index, stan::math::var, ColMajor, ConjugateLhs, stan::math::var, ConjugateRhs >::LhsStorageOrder()'],['../struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var9294a9f65d48f87d892ffa4de3f3e667.html#a0e66c8428c8c62b75471845733b2cff7af87f397005bde706c888a1069ba3409e',1,'Eigen::internal::general_matrix_vector_product< Index, stan::math::var, RowMajor, ConjugateLhs, stan::math::var, ConjugateRhs >::LhsStorageOrder()']]] +]; diff --git a/doc/api/html/search/enumvalues_4.html b/doc/api/html/search/enumvalues_4.html new file mode 100644 index 00000000000..1258082bbfe --- /dev/null +++ b/doc/api/html/search/enumvalues_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/enumvalues_4.js b/doc/api/html/search/enumvalues_4.js new file mode 100644 index 00000000000..036263d6bb8 --- /dev/null +++ b/doc/api/html/search/enumvalues_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['mulcost',['MulCost',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a768855037a4305f4d90091d81bb92258af070b8b29b40c7b0d09de7e7ee843f62',1,'Eigen::NumTraits< stan::math::fvar< T > >::MulCost()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#afbb9dcc15eb3b86fd1ed8a3ef5158634a7a31da528ea371cfe78010d1f09b2130',1,'Eigen::NumTraits< stan::math::var >::MulCost()']]] +]; diff --git a/doc/api/html/search/enumvalues_5.html b/doc/api/html/search/enumvalues_5.html new file mode 100644 index 00000000000..e42d495996d --- /dev/null +++ b/doc/api/html/search/enumvalues_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/enumvalues_5.js b/doc/api/html/search/enumvalues_5.js new file mode 100644 index 00000000000..39dea6ca028 --- /dev/null +++ b/doc/api/html/search/enumvalues_5.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['readcost',['ReadCost',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a768855037a4305f4d90091d81bb92258ac32ba519bab5db01a8b5cd1a4d892c0d',1,'Eigen::NumTraits< stan::math::fvar< T > >::ReadCost()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#afbb9dcc15eb3b86fd1ed8a3ef5158634a9dd6c69861224ab22c6513bfc95f8dac',1,'Eigen::NumTraits< stan::math::var >::ReadCost()']]], + ['requireinitialization',['RequireInitialization',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a768855037a4305f4d90091d81bb92258a9755aac49dbaa87c3a448219f225d903',1,'Eigen::NumTraits< stan::math::fvar< T > >::RequireInitialization()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#afbb9dcc15eb3b86fd1ed8a3ef5158634aaf0cb8ae61102886fd8979a5e0adf442',1,'Eigen::NumTraits< stan::math::var >::RequireInitialization()']]] +]; diff --git a/doc/api/html/search/enumvalues_6.html b/doc/api/html/search/enumvalues_6.html new file mode 100644 index 00000000000..96249ec49e6 --- /dev/null +++ b/doc/api/html/search/enumvalues_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/enumvalues_6.js b/doc/api/html/search/enumvalues_6.js new file mode 100644 index 00000000000..63ab3129887 --- /dev/null +++ b/doc/api/html/search/enumvalues_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['value',['value',['../structstan_1_1is__fvar_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a6babc0753f5871c298d85413e6e110d6a770958271842bd91202a4b530eca5aeb',1,'stan::is_fvar< stan::math::fvar< T > >::value()'],['../structstan_1_1is__vector_3_01const_01_t_01_4.html#a656cea86d76ca8ba6250c1119626294cab7b181e7406ecc9d9512f53eeb423835',1,'stan::is_vector< const T >::value()'],['../structstan_1_1is__vector_3_01std_1_1vector_3_01_t_01_4_01_4.html#a8d1ad2311e4fe396ee0680dc2a489caba8669507d2c0cf8d2013fa55cbc040690',1,'stan::is_vector< std::vector< T > >::value()'],['../structstan_1_1is__vector_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_011_01_4_01_4.html#a4a7b95dadef68bc513e363ebab9f24f0a75a67f94582ddd21b4956e5540578114',1,'stan::is_vector< Eigen::Matrix< T, Eigen::Dynamic, 1 > >::value()'],['../structstan_1_1is__vector_3_01_eigen_1_1_matrix_3_01_t_00_011_00_01_eigen_1_1_dynamic_01_4_01_4.html#a4bf231c4eb911cb5a97177a89497f41ca060ce69961a2ceb1cc29cc4861aa527e',1,'stan::is_vector< Eigen::Matrix< T, 1, Eigen::Dynamic > >::value()'],['../structstan_1_1is__vector_3_01_eigen_1_1_block_3_01_t_01_4_01_4.html#a6e3fbac8c1bd8467c43f299e80414ba9a565f949d7780375faf2d63474a18771c',1,'stan::is_vector< Eigen::Block< T > >::value()'],['../structstan_1_1is__vector__like_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4.html#a509236a119a19272d41689c441e30813acc3bb708be577474e9cd1e11ad5a4ba1',1,'stan::is_vector_like< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > >::value()'],['../structstan_1_1contains__fvar.html#afccc54d2547159c9d61798447f5501f1a5a1eddf5b1539585920063fb6cd6835b',1,'stan::contains_fvar::value()'],['../structstan_1_1contains__nonconstant__struct.html#a3e4835a62414ba3dab201c4587d0b8edaaf8e79ca7e4a151708d1dfb9606071de',1,'stan::contains_nonconstant_struct::value()'],['../structstan_1_1contains__vector.html#af5a11fc5bbcd11df3111deb4e5b044a6a0ab5ee57c23533e870bb22a79156e66b',1,'stan::contains_vector::value()'],['../structstan_1_1error__index.html#a2adc3ca217283b39a292dfce1804bb12a0878d922bbc8cd2f709a333e184dd112',1,'stan::error_index::value()'],['../structstan_1_1math_1_1include__summand.html#a9de568c1ba5fc294e76c988abe0ead99a0a929ac9c4eba12a434fa5b035093df9',1,'stan::math::include_summand::value()'],['../structstan_1_1is__constant.html#a2ccfaae3c831f691f8fe11dfbadcb004aecafc97e964e672dd93bcb490a0a1811',1,'stan::is_constant::value()'],['../structstan_1_1is__constant__struct.html#a0fa28517c89775a548fb66c6e013e5f6a3f9610c0a10a3879fccf6f212dd3d411',1,'stan::is_constant_struct::value()'],['../structstan_1_1is__constant__struct_3_01std_1_1vector_3_01_t_01_4_01_4.html#a070f7c34cc9cb2e4c6c0aeee5836c01da889b9838820d11325b1b1e2e6dcd1f62',1,'stan::is_constant_struct< std::vector< T > >::value()'],['../structstan_1_1is__constant__struct_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4.html#aea795d781322ac5906d689e11faef724a8a919616f9227fcfa43cb7134758120a',1,'stan::is_constant_struct< Eigen::Matrix< T, R, C > >::value()'],['../structstan_1_1is__constant__struct_3_01_eigen_1_1_block_3_01_t_01_4_01_4.html#a1d60387627b8c3629b6714f947081d15ae47d85a4a43fdce9e0a2be294e6e0622',1,'stan::is_constant_struct< Eigen::Block< T > >::value()'],['../structstan_1_1is__fvar.html#aee7f99a61d7b21a79c1dfd4a3619571eab1813e4af114b125e86c4eefb1c67481',1,'stan::is_fvar::value()'],['../structstan_1_1is__var.html#aac384e0e2c72c68ae03dd7f10ca8a192aaeb0f9a9eead1ac6cc943d6a1974a4c1',1,'stan::is_var::value()'],['../structstan_1_1is__var__or__arithmetic.html#ae2274b1dfaae357a2ede5a73ceff221ca4e3e0e0100aa814492acbd85e2138643',1,'stan::is_var_or_arithmetic::value()'],['../structstan_1_1is__vector.html#a73e9760bc4a6b89670604606218d98afa9b19e1572754024bf83375a19efee164',1,'stan::is_vector::value()'],['../structstan_1_1is__vector__like.html#a7c347bcea8f5aa2e059c878a774e939ea2113100a63bb957b1ada362a39a22213',1,'stan::is_vector_like::value()'],['../structstan_1_1is__vector__like_3_01_t_01_5_01_4.html#ac9241b4f77efad2fc0dd173a4ec0f367a50f6d9fb5990e3e623e6e02458926009',1,'stan::is_vector_like< T * >::value()'],['../structstan_1_1is__vector__like_3_01const_01_t_01_4.html#accc6af134d2e9eab199da085ad3e87e3ab859ca004282bbe79a5eeda7238d86da',1,'stan::is_vector_like< const T >::value()'],['../structstan_1_1is__var_3_01stan_1_1math_1_1var_01_4.html#ae4a2b202d3d778d3cbd3b21175de8f6ca0f5ca9489de04d1d3d2f6ccf5783f360',1,'stan::is_var< stan::math::var >::value()']]] +]; diff --git a/doc/api/html/search/files_0.html b/doc/api/html/search/files_0.html new file mode 100644 index 00000000000..c7aa36c96f0 --- /dev/null +++ b/doc/api/html/search/files_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/files_0.js b/doc/api/html/search/files_0.js new file mode 100644 index 00000000000..9583facf820 --- /dev/null +++ b/doc/api/html/search/files_0.js @@ -0,0 +1,32 @@ +var searchData= +[ + ['abs_2ehpp',['abs.hpp',['../fwd_2scal_2fun_2abs_8hpp.html',1,'']]], + ['abs_2ehpp',['abs.hpp',['../prim_2scal_2fun_2abs_8hpp.html',1,'']]], + ['abs_2ehpp',['abs.hpp',['../rev_2scal_2fun_2abs_8hpp.html',1,'']]], + ['accumulator_2ehpp',['accumulator.hpp',['../accumulator_8hpp.html',1,'']]], + ['acos_2ehpp',['acos.hpp',['../fwd_2scal_2fun_2acos_8hpp.html',1,'']]], + ['acos_2ehpp',['acos.hpp',['../rev_2scal_2fun_2acos_8hpp.html',1,'']]], + ['acosh_2ehpp',['acosh.hpp',['../fwd_2scal_2fun_2acosh_8hpp.html',1,'']]], + ['acosh_2ehpp',['acosh.hpp',['../rev_2scal_2fun_2acosh_8hpp.html',1,'']]], + ['add_2ehpp',['add.hpp',['../add_8hpp.html',1,'']]], + ['append_5fcol_2ehpp',['append_col.hpp',['../append__col_8hpp.html',1,'']]], + ['append_5frow_2ehpp',['append_row.hpp',['../append__row_8hpp.html',1,'']]], + ['arr_2ehpp',['arr.hpp',['../arr_8hpp.html',1,'']]], + ['array_5fbuilder_2ehpp',['array_builder.hpp',['../array__builder_8hpp.html',1,'']]], + ['as_5fbool_2ehpp',['as_bool.hpp',['../prim_2scal_2fun_2as__bool_8hpp.html',1,'']]], + ['as_5fbool_2ehpp',['as_bool.hpp',['../rev_2scal_2fun_2as__bool_8hpp.html',1,'']]], + ['asin_2ehpp',['asin.hpp',['../fwd_2scal_2fun_2asin_8hpp.html',1,'']]], + ['asin_2ehpp',['asin.hpp',['../rev_2scal_2fun_2asin_8hpp.html',1,'']]], + ['asinh_2ehpp',['asinh.hpp',['../fwd_2scal_2fun_2asinh_8hpp.html',1,'']]], + ['asinh_2ehpp',['asinh.hpp',['../rev_2scal_2fun_2asinh_8hpp.html',1,'']]], + ['assign_2ehpp',['assign.hpp',['../assign_8hpp.html',1,'']]], + ['atan_2ehpp',['atan.hpp',['../rev_2scal_2fun_2atan_8hpp.html',1,'']]], + ['atan_2ehpp',['atan.hpp',['../fwd_2scal_2fun_2atan_8hpp.html',1,'']]], + ['atan2_2ehpp',['atan2.hpp',['../rev_2scal_2fun_2atan2_8hpp.html',1,'']]], + ['atan2_2ehpp',['atan2.hpp',['../fwd_2scal_2fun_2atan2_8hpp.html',1,'']]], + ['atanh_2ehpp',['atanh.hpp',['../fwd_2scal_2fun_2atanh_8hpp.html',1,'']]], + ['atanh_2ehpp',['atanh.hpp',['../rev_2scal_2fun_2atanh_8hpp.html',1,'']]], + ['autocorrelation_2ehpp',['autocorrelation.hpp',['../autocorrelation_8hpp.html',1,'']]], + ['autocovariance_2ehpp',['autocovariance.hpp',['../autocovariance_8hpp.html',1,'']]], + ['autodiffstackstorage_2ehpp',['autodiffstackstorage.hpp',['../autodiffstackstorage_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/files_1.html b/doc/api/html/search/files_1.html new file mode 100644 index 00000000000..eca1c805425 --- /dev/null +++ b/doc/api/html/search/files_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/files_1.js b/doc/api/html/search/files_1.js new file mode 100644 index 00000000000..dfa5d9178cf --- /dev/null +++ b/doc/api/html/search/files_1.js @@ -0,0 +1,43 @@ +var searchData= +[ + ['bernoulli_5fccdf_5flog_2ehpp',['bernoulli_ccdf_log.hpp',['../bernoulli__ccdf__log_8hpp.html',1,'']]], + ['bernoulli_5fcdf_2ehpp',['bernoulli_cdf.hpp',['../bernoulli__cdf_8hpp.html',1,'']]], + ['bernoulli_5fcdf_5flog_2ehpp',['bernoulli_cdf_log.hpp',['../bernoulli__cdf__log_8hpp.html',1,'']]], + ['bernoulli_5flog_2ehpp',['bernoulli_log.hpp',['../bernoulli__log_8hpp.html',1,'']]], + ['bernoulli_5flogit_5flog_2ehpp',['bernoulli_logit_log.hpp',['../bernoulli__logit__log_8hpp.html',1,'']]], + ['bernoulli_5frng_2ehpp',['bernoulli_rng.hpp',['../bernoulli__rng_8hpp.html',1,'']]], + ['bessel_5ffirst_5fkind_2ehpp',['bessel_first_kind.hpp',['../rev_2scal_2fun_2bessel__first__kind_8hpp.html',1,'']]], + ['bessel_5ffirst_5fkind_2ehpp',['bessel_first_kind.hpp',['../fwd_2scal_2fun_2bessel__first__kind_8hpp.html',1,'']]], + ['bessel_5ffirst_5fkind_2ehpp',['bessel_first_kind.hpp',['../prim_2scal_2fun_2bessel__first__kind_8hpp.html',1,'']]], + ['bessel_5fsecond_5fkind_2ehpp',['bessel_second_kind.hpp',['../fwd_2scal_2fun_2bessel__second__kind_8hpp.html',1,'']]], + ['bessel_5fsecond_5fkind_2ehpp',['bessel_second_kind.hpp',['../prim_2scal_2fun_2bessel__second__kind_8hpp.html',1,'']]], + ['bessel_5fsecond_5fkind_2ehpp',['bessel_second_kind.hpp',['../rev_2scal_2fun_2bessel__second__kind_8hpp.html',1,'']]], + ['beta_5fbinomial_5fccdf_5flog_2ehpp',['beta_binomial_ccdf_log.hpp',['../beta__binomial__ccdf__log_8hpp.html',1,'']]], + ['beta_5fbinomial_5fcdf_2ehpp',['beta_binomial_cdf.hpp',['../beta__binomial__cdf_8hpp.html',1,'']]], + ['beta_5fbinomial_5fcdf_5flog_2ehpp',['beta_binomial_cdf_log.hpp',['../beta__binomial__cdf__log_8hpp.html',1,'']]], + ['beta_5fbinomial_5flog_2ehpp',['beta_binomial_log.hpp',['../beta__binomial__log_8hpp.html',1,'']]], + ['beta_5fbinomial_5frng_2ehpp',['beta_binomial_rng.hpp',['../beta__binomial__rng_8hpp.html',1,'']]], + ['beta_5fccdf_5flog_2ehpp',['beta_ccdf_log.hpp',['../beta__ccdf__log_8hpp.html',1,'']]], + ['beta_5fcdf_2ehpp',['beta_cdf.hpp',['../beta__cdf_8hpp.html',1,'']]], + ['beta_5fcdf_5flog_2ehpp',['beta_cdf_log.hpp',['../beta__cdf__log_8hpp.html',1,'']]], + ['beta_5flog_2ehpp',['beta_log.hpp',['../beta__log_8hpp.html',1,'']]], + ['beta_5frng_2ehpp',['beta_rng.hpp',['../beta__rng_8hpp.html',1,'']]], + ['binary_5flog_5floss_2ehpp',['binary_log_loss.hpp',['../fwd_2scal_2fun_2binary__log__loss_8hpp.html',1,'']]], + ['binary_5flog_5floss_2ehpp',['binary_log_loss.hpp',['../prim_2scal_2fun_2binary__log__loss_8hpp.html',1,'']]], + ['binary_5flog_5floss_2ehpp',['binary_log_loss.hpp',['../rev_2scal_2fun_2binary__log__loss_8hpp.html',1,'']]], + ['binomial_5fccdf_5flog_2ehpp',['binomial_ccdf_log.hpp',['../binomial__ccdf__log_8hpp.html',1,'']]], + ['binomial_5fcdf_2ehpp',['binomial_cdf.hpp',['../binomial__cdf_8hpp.html',1,'']]], + ['binomial_5fcdf_5flog_2ehpp',['binomial_cdf_log.hpp',['../binomial__cdf__log_8hpp.html',1,'']]], + ['binomial_5fcoefficient_5flog_2ehpp',['binomial_coefficient_log.hpp',['../fwd_2scal_2fun_2binomial__coefficient__log_8hpp.html',1,'']]], + ['binomial_5fcoefficient_5flog_2ehpp',['binomial_coefficient_log.hpp',['../prim_2scal_2fun_2binomial__coefficient__log_8hpp.html',1,'']]], + ['binomial_5flog_2ehpp',['binomial_log.hpp',['../binomial__log_8hpp.html',1,'']]], + ['binomial_5flogit_5flog_2ehpp',['binomial_logit_log.hpp',['../binomial__logit__log_8hpp.html',1,'']]], + ['binomial_5frng_2ehpp',['binomial_rng.hpp',['../binomial__rng_8hpp.html',1,'']]], + ['block_2ehpp',['block.hpp',['../block_8hpp.html',1,'']]], + ['boost_2edox',['boost.dox',['../boost_8dox.html',1,'']]], + ['boost_5ffpclassify_2ehpp',['boost_fpclassify.hpp',['../boost__fpclassify_8hpp.html',1,'']]], + ['boost_5fisfinite_2ehpp',['boost_isfinite.hpp',['../boost__isfinite_8hpp.html',1,'']]], + ['boost_5fisinf_2ehpp',['boost_isinf.hpp',['../boost__isinf_8hpp.html',1,'']]], + ['boost_5fisnan_2ehpp',['boost_isnan.hpp',['../boost__isnan_8hpp.html',1,'']]], + ['boost_5fisnormal_2ehpp',['boost_isnormal.hpp',['../boost__isnormal_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/files_10.html b/doc/api/html/search/files_10.html new file mode 100644 index 00000000000..4ac316cd820 --- /dev/null +++ b/doc/api/html/search/files_10.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/files_10.js b/doc/api/html/search/files_10.js new file mode 100644 index 00000000000..d60564c4020 --- /dev/null +++ b/doc/api/html/search/files_10.js @@ -0,0 +1,33 @@ +var searchData= +[ + ['rank_2ehpp',['rank.hpp',['../rank_8hpp.html',1,'']]], + ['rayleigh_5fccdf_5flog_2ehpp',['rayleigh_ccdf_log.hpp',['../rayleigh__ccdf__log_8hpp.html',1,'']]], + ['rayleigh_5fcdf_2ehpp',['rayleigh_cdf.hpp',['../rayleigh__cdf_8hpp.html',1,'']]], + ['rayleigh_5fcdf_5flog_2ehpp',['rayleigh_cdf_log.hpp',['../rayleigh__cdf__log_8hpp.html',1,'']]], + ['rayleigh_5flog_2ehpp',['rayleigh_log.hpp',['../rayleigh__log_8hpp.html',1,'']]], + ['rayleigh_5frng_2ehpp',['rayleigh_rng.hpp',['../rayleigh__rng_8hpp.html',1,'']]], + ['read_5fcorr_5fl_2ehpp',['read_corr_L.hpp',['../read__corr___l_8hpp.html',1,'']]], + ['read_5fcorr_5fmatrix_2ehpp',['read_corr_matrix.hpp',['../read__corr__matrix_8hpp.html',1,'']]], + ['read_5fcov_5fl_2ehpp',['read_cov_L.hpp',['../read__cov___l_8hpp.html',1,'']]], + ['read_5fcov_5fmatrix_2ehpp',['read_cov_matrix.hpp',['../read__cov__matrix_8hpp.html',1,'']]], + ['recover_5fmemory_2ehpp',['recover_memory.hpp',['../recover__memory_8hpp.html',1,'']]], + ['recover_5fmemory_5fnested_2ehpp',['recover_memory_nested.hpp',['../recover__memory__nested_8hpp.html',1,'']]], + ['rep_5farray_2ehpp',['rep_array.hpp',['../rep__array_8hpp.html',1,'']]], + ['rep_5fmatrix_2ehpp',['rep_matrix.hpp',['../rep__matrix_8hpp.html',1,'']]], + ['rep_5frow_5fvector_2ehpp',['rep_row_vector.hpp',['../rep__row__vector_8hpp.html',1,'']]], + ['rep_5fvector_2ehpp',['rep_vector.hpp',['../rep__vector_8hpp.html',1,'']]], + ['resize_2ehpp',['resize.hpp',['../resize_8hpp.html',1,'']]], + ['return_5ftype_2ehpp',['return_type.hpp',['../return__type_8hpp.html',1,'']]], + ['rising_5ffactorial_2ehpp',['rising_factorial.hpp',['../fwd_2scal_2fun_2rising__factorial_8hpp.html',1,'']]], + ['rising_5ffactorial_2ehpp',['rising_factorial.hpp',['../rev_2scal_2fun_2rising__factorial_8hpp.html',1,'']]], + ['rising_5ffactorial_2ehpp',['rising_factorial.hpp',['../prim_2scal_2fun_2rising__factorial_8hpp.html',1,'']]], + ['round_2ehpp',['round.hpp',['../fwd_2scal_2fun_2round_8hpp.html',1,'']]], + ['round_2ehpp',['round.hpp',['../rev_2scal_2fun_2round_8hpp.html',1,'']]], + ['row_2ehpp',['row.hpp',['../row_8hpp.html',1,'']]], + ['rows_2ehpp',['rows.hpp',['../rows_8hpp.html',1,'']]], + ['rows_5fdot_5fproduct_2ehpp',['rows_dot_product.hpp',['../rev_2mat_2fun_2rows__dot__product_8hpp.html',1,'']]], + ['rows_5fdot_5fproduct_2ehpp',['rows_dot_product.hpp',['../fwd_2mat_2fun_2rows__dot__product_8hpp.html',1,'']]], + ['rows_5fdot_5fproduct_2ehpp',['rows_dot_product.hpp',['../prim_2mat_2fun_2rows__dot__product_8hpp.html',1,'']]], + ['rows_5fdot_5fself_2ehpp',['rows_dot_self.hpp',['../prim_2mat_2fun_2rows__dot__self_8hpp.html',1,'']]], + ['rows_5fdot_5fself_2ehpp',['rows_dot_self.hpp',['../fwd_2mat_2fun_2rows__dot__self_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/files_11.html b/doc/api/html/search/files_11.html new file mode 100644 index 00000000000..afd23115856 --- /dev/null +++ b/doc/api/html/search/files_11.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/files_11.js b/doc/api/html/search/files_11.js new file mode 100644 index 00000000000..f062fbce4ba --- /dev/null +++ b/doc/api/html/search/files_11.js @@ -0,0 +1,76 @@ +var searchData= +[ + ['scalar_5ftype_2ehpp',['scalar_type.hpp',['../scalar__type_8hpp.html',1,'']]], + ['scalar_5ftype_5fpre_2ehpp',['scalar_type_pre.hpp',['../scalar__type__pre_8hpp.html',1,'']]], + ['scaled_5fadd_2ehpp',['scaled_add.hpp',['../scaled__add_8hpp.html',1,'']]], + ['scaled_5finv_5fchi_5fsquare_5fccdf_5flog_2ehpp',['scaled_inv_chi_square_ccdf_log.hpp',['../scaled__inv__chi__square__ccdf__log_8hpp.html',1,'']]], + ['scaled_5finv_5fchi_5fsquare_5fcdf_2ehpp',['scaled_inv_chi_square_cdf.hpp',['../scaled__inv__chi__square__cdf_8hpp.html',1,'']]], + ['scaled_5finv_5fchi_5fsquare_5fcdf_5flog_2ehpp',['scaled_inv_chi_square_cdf_log.hpp',['../scaled__inv__chi__square__cdf__log_8hpp.html',1,'']]], + ['scaled_5finv_5fchi_5fsquare_5flog_2ehpp',['scaled_inv_chi_square_log.hpp',['../scaled__inv__chi__square__log_8hpp.html',1,'']]], + ['scaled_5finv_5fchi_5fsquare_5frng_2ehpp',['scaled_inv_chi_square_rng.hpp',['../scaled__inv__chi__square__rng_8hpp.html',1,'']]], + ['sd_2ehpp',['sd.hpp',['../prim_2mat_2fun_2sd_8hpp.html',1,'']]], + ['sd_2ehpp',['sd.hpp',['../rev_2mat_2fun_2sd_8hpp.html',1,'']]], + ['segment_2ehpp',['segment.hpp',['../segment_8hpp.html',1,'']]], + ['seq_5fview_2ehpp',['seq_view.hpp',['../seq__view_8hpp.html',1,'']]], + ['set_5fzero_5fall_5fadjoints_2ehpp',['set_zero_all_adjoints.hpp',['../set__zero__all__adjoints_8hpp.html',1,'']]], + ['sign_2ehpp',['sign.hpp',['../sign_8hpp.html',1,'']]], + ['simplex_5fconstrain_2ehpp',['simplex_constrain.hpp',['../simplex__constrain_8hpp.html',1,'']]], + ['simplex_5ffree_2ehpp',['simplex_free.hpp',['../simplex__free_8hpp.html',1,'']]], + ['sin_2ehpp',['sin.hpp',['../rev_2scal_2fun_2sin_8hpp.html',1,'']]], + ['sin_2ehpp',['sin.hpp',['../fwd_2scal_2fun_2sin_8hpp.html',1,'']]], + ['singular_5fvalues_2ehpp',['singular_values.hpp',['../singular__values_8hpp.html',1,'']]], + ['sinh_2ehpp',['sinh.hpp',['../fwd_2scal_2fun_2sinh_8hpp.html',1,'']]], + ['sinh_2ehpp',['sinh.hpp',['../rev_2scal_2fun_2sinh_8hpp.html',1,'']]], + ['size_2ehpp',['size.hpp',['../size_8hpp.html',1,'']]], + ['size_5fof_2ehpp',['size_of.hpp',['../size__of_8hpp.html',1,'']]], + ['skew_5fnormal_5fccdf_5flog_2ehpp',['skew_normal_ccdf_log.hpp',['../skew__normal__ccdf__log_8hpp.html',1,'']]], + ['skew_5fnormal_5fcdf_2ehpp',['skew_normal_cdf.hpp',['../skew__normal__cdf_8hpp.html',1,'']]], + ['skew_5fnormal_5fcdf_5flog_2ehpp',['skew_normal_cdf_log.hpp',['../skew__normal__cdf__log_8hpp.html',1,'']]], + ['skew_5fnormal_5flog_2ehpp',['skew_normal_log.hpp',['../skew__normal__log_8hpp.html',1,'']]], + ['skew_5fnormal_5frng_2ehpp',['skew_normal_rng.hpp',['../skew__normal__rng_8hpp.html',1,'']]], + ['softmax_2ehpp',['softmax.hpp',['../fwd_2mat_2fun_2softmax_8hpp.html',1,'']]], + ['softmax_2ehpp',['softmax.hpp',['../prim_2mat_2fun_2softmax_8hpp.html',1,'']]], + ['softmax_2ehpp',['softmax.hpp',['../rev_2mat_2fun_2softmax_8hpp.html',1,'']]], + ['sort_2ehpp',['sort.hpp',['../sort_8hpp.html',1,'']]], + ['sort_5fasc_2ehpp',['sort_asc.hpp',['../fwd_2mat_2fun_2sort__asc_8hpp.html',1,'']]], + ['sort_5fasc_2ehpp',['sort_asc.hpp',['../rev_2mat_2fun_2sort__asc_8hpp.html',1,'']]], + ['sort_5fdesc_2ehpp',['sort_desc.hpp',['../rev_2mat_2fun_2sort__desc_8hpp.html',1,'']]], + ['sort_5fdesc_2ehpp',['sort_desc.hpp',['../fwd_2mat_2fun_2sort__desc_8hpp.html',1,'']]], + ['sort_5findices_2ehpp',['sort_indices.hpp',['../sort__indices_8hpp.html',1,'']]], + ['sort_5findices_5fasc_2ehpp',['sort_indices_asc.hpp',['../sort__indices__asc_8hpp.html',1,'']]], + ['sort_5findices_5fdesc_2ehpp',['sort_indices_desc.hpp',['../sort__indices__desc_8hpp.html',1,'']]], + ['sqrt_2ehpp',['sqrt.hpp',['../fwd_2scal_2fun_2sqrt_8hpp.html',1,'']]], + ['sqrt_2ehpp',['sqrt.hpp',['../rev_2scal_2fun_2sqrt_8hpp.html',1,'']]], + ['square_2ehpp',['square.hpp',['../fwd_2scal_2fun_2square_8hpp.html',1,'']]], + ['square_2ehpp',['square.hpp',['../prim_2scal_2fun_2square_8hpp.html',1,'']]], + ['square_2ehpp',['square.hpp',['../rev_2scal_2fun_2square_8hpp.html',1,'']]], + ['squared_5fdistance_2ehpp',['squared_distance.hpp',['../prim_2mat_2fun_2squared__distance_8hpp.html',1,'']]], + ['squared_5fdistance_2ehpp',['squared_distance.hpp',['../rev_2mat_2fun_2squared__distance_8hpp.html',1,'']]], + ['stack_5falloc_2ehpp',['stack_alloc.hpp',['../stack__alloc_8hpp.html',1,'']]], + ['stan_2edox',['stan.dox',['../stan_8dox.html',1,'']]], + ['stan_5fprint_2ehpp',['stan_print.hpp',['../rev_2mat_2fun_2stan__print_8hpp.html',1,'']]], + ['stan_5fprint_2ehpp',['stan_print.hpp',['../prim_2mat_2fun_2stan__print_8hpp.html',1,'']]], + ['start_5fnested_2ehpp',['start_nested.hpp',['../start__nested_8hpp.html',1,'']]], + ['std_5fisinf_2ehpp',['std_isinf.hpp',['../std__isinf_8hpp.html',1,'']]], + ['std_5fisnan_2ehpp',['std_isnan.hpp',['../std__isnan_8hpp.html',1,'']]], + ['std_5fnumeric_5flimits_2ehpp',['std_numeric_limits.hpp',['../fwd_2core_2std__numeric__limits_8hpp.html',1,'']]], + ['std_5fnumeric_5flimits_2ehpp',['std_numeric_limits.hpp',['../rev_2core_2std__numeric__limits_8hpp.html',1,'']]], + ['step_2ehpp',['step.hpp',['../prim_2scal_2fun_2step_8hpp.html',1,'']]], + ['step_2ehpp',['step.hpp',['../rev_2scal_2fun_2step_8hpp.html',1,'']]], + ['stored_5fgradient_5fvari_2ehpp',['stored_gradient_vari.hpp',['../stored__gradient__vari_8hpp.html',1,'']]], + ['student_5ft_5fccdf_5flog_2ehpp',['student_t_ccdf_log.hpp',['../student__t__ccdf__log_8hpp.html',1,'']]], + ['student_5ft_5fcdf_2ehpp',['student_t_cdf.hpp',['../student__t__cdf_8hpp.html',1,'']]], + ['student_5ft_5fcdf_5flog_2ehpp',['student_t_cdf_log.hpp',['../student__t__cdf__log_8hpp.html',1,'']]], + ['student_5ft_5flog_2ehpp',['student_t_log.hpp',['../student__t__log_8hpp.html',1,'']]], + ['student_5ft_5frng_2ehpp',['student_t_rng.hpp',['../student__t__rng_8hpp.html',1,'']]], + ['sub_2ehpp',['sub.hpp',['../sub_8hpp.html',1,'']]], + ['sub_5fcol_2ehpp',['sub_col.hpp',['../sub__col_8hpp.html',1,'']]], + ['sub_5frow_2ehpp',['sub_row.hpp',['../sub__row_8hpp.html',1,'']]], + ['subtract_2ehpp',['subtract.hpp',['../subtract_8hpp.html',1,'']]], + ['sum_2ehpp',['sum.hpp',['../rev_2mat_2fun_2sum_8hpp.html',1,'']]], + ['sum_2ehpp',['sum.hpp',['../rev_2arr_2fun_2sum_8hpp.html',1,'']]], + ['sum_2ehpp',['sum.hpp',['../fwd_2mat_2fun_2sum_8hpp.html',1,'']]], + ['sum_2ehpp',['sum.hpp',['../prim_2arr_2fun_2sum_8hpp.html',1,'']]], + ['sum_2ehpp',['sum.hpp',['../fwd_2arr_2fun_2sum_8hpp.html',1,'']]], + ['sum_2ehpp',['sum.hpp',['../prim_2mat_2fun_2sum_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/files_12.html b/doc/api/html/search/files_12.html new file mode 100644 index 00000000000..247951b8db6 --- /dev/null +++ b/doc/api/html/search/files_12.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/files_12.js b/doc/api/html/search/files_12.js new file mode 100644 index 00000000000..c9ad3600f80 --- /dev/null +++ b/doc/api/html/search/files_12.js @@ -0,0 +1,39 @@ +var searchData= +[ + ['tail_2ehpp',['tail.hpp',['../tail_8hpp.html',1,'']]], + ['tan_2ehpp',['tan.hpp',['../fwd_2scal_2fun_2tan_8hpp.html',1,'']]], + ['tan_2ehpp',['tan.hpp',['../rev_2scal_2fun_2tan_8hpp.html',1,'']]], + ['tanh_2ehpp',['tanh.hpp',['../fwd_2scal_2fun_2tanh_8hpp.html',1,'']]], + ['tanh_2ehpp',['tanh.hpp',['../rev_2scal_2fun_2tanh_8hpp.html',1,'']]], + ['tcrossprod_2ehpp',['tcrossprod.hpp',['../prim_2mat_2fun_2tcrossprod_8hpp.html',1,'']]], + ['tcrossprod_2ehpp',['tcrossprod.hpp',['../fwd_2mat_2fun_2tcrossprod_8hpp.html',1,'']]], + ['tcrossprod_2ehpp',['tcrossprod.hpp',['../rev_2mat_2fun_2tcrossprod_8hpp.html',1,'']]], + ['tgamma_2ehpp',['tgamma.hpp',['../fwd_2scal_2fun_2tgamma_8hpp.html',1,'']]], + ['tgamma_2ehpp',['tgamma.hpp',['../rev_2scal_2fun_2tgamma_8hpp.html',1,'']]], + ['to_5farray_5f1d_2ehpp',['to_array_1d.hpp',['../to__array__1d_8hpp.html',1,'']]], + ['to_5farray_5f2d_2ehpp',['to_array_2d.hpp',['../to__array__2d_8hpp.html',1,'']]], + ['to_5ffvar_2ehpp',['to_fvar.hpp',['../to__fvar_8hpp.html',1,'']]], + ['to_5fmatrix_2ehpp',['to_matrix.hpp',['../to__matrix_8hpp.html',1,'']]], + ['to_5frow_5fvector_2ehpp',['to_row_vector.hpp',['../to__row__vector_8hpp.html',1,'']]], + ['to_5fvar_2ehpp',['to_var.hpp',['../to__var_8hpp.html',1,'']]], + ['to_5fvector_2ehpp',['to_vector.hpp',['../to__vector_8hpp.html',1,'']]], + ['trace_2ehpp',['trace.hpp',['../trace_8hpp.html',1,'']]], + ['trace_5fgen_5finv_5fquad_5fform_5fldlt_2ehpp',['trace_gen_inv_quad_form_ldlt.hpp',['../rev_2mat_2fun_2trace__gen__inv__quad__form__ldlt_8hpp.html',1,'']]], + ['trace_5fgen_5finv_5fquad_5fform_5fldlt_2ehpp',['trace_gen_inv_quad_form_ldlt.hpp',['../prim_2mat_2fun_2trace__gen__inv__quad__form__ldlt_8hpp.html',1,'']]], + ['trace_5fgen_5fquad_5fform_2ehpp',['trace_gen_quad_form.hpp',['../prim_2mat_2fun_2trace__gen__quad__form_8hpp.html',1,'']]], + ['trace_5fgen_5fquad_5fform_2ehpp',['trace_gen_quad_form.hpp',['../fwd_2mat_2fun_2trace__gen__quad__form_8hpp.html',1,'']]], + ['trace_5fgen_5fquad_5fform_2ehpp',['trace_gen_quad_form.hpp',['../rev_2mat_2fun_2trace__gen__quad__form_8hpp.html',1,'']]], + ['trace_5finv_5fquad_5fform_5fldlt_2ehpp',['trace_inv_quad_form_ldlt.hpp',['../prim_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp.html',1,'']]], + ['trace_5finv_5fquad_5fform_5fldlt_2ehpp',['trace_inv_quad_form_ldlt.hpp',['../rev_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp.html',1,'']]], + ['trace_5fquad_5fform_2ehpp',['trace_quad_form.hpp',['../fwd_2mat_2fun_2trace__quad__form_8hpp.html',1,'']]], + ['trace_5fquad_5fform_2ehpp',['trace_quad_form.hpp',['../rev_2mat_2fun_2trace__quad__form_8hpp.html',1,'']]], + ['trace_5fquad_5fform_2ehpp',['trace_quad_form.hpp',['../prim_2mat_2fun_2trace__quad__form_8hpp.html',1,'']]], + ['transpose_2ehpp',['transpose.hpp',['../transpose_8hpp.html',1,'']]], + ['trigamma_2ehpp',['trigamma.hpp',['../trigamma_8hpp.html',1,'']]], + ['trunc_2ehpp',['trunc.hpp',['../rev_2scal_2fun_2trunc_8hpp.html',1,'']]], + ['trunc_2ehpp',['trunc.hpp',['../fwd_2scal_2fun_2trunc_8hpp.html',1,'']]], + ['typedefs_2ehpp',['typedefs.hpp',['../mix_2mat_2fun_2typedefs_8hpp.html',1,'']]], + ['typedefs_2ehpp',['typedefs.hpp',['../prim_2mat_2fun_2typedefs_8hpp.html',1,'']]], + ['typedefs_2ehpp',['typedefs.hpp',['../rev_2mat_2fun_2typedefs_8hpp.html',1,'']]], + ['typedefs_2ehpp',['typedefs.hpp',['../fwd_2mat_2fun_2typedefs_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/files_13.html b/doc/api/html/search/files_13.html new file mode 100644 index 00000000000..019294799b4 --- /dev/null +++ b/doc/api/html/search/files_13.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/files_13.js b/doc/api/html/search/files_13.js new file mode 100644 index 00000000000..3056db9fe57 --- /dev/null +++ b/doc/api/html/search/files_13.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['ub_5fconstrain_2ehpp',['ub_constrain.hpp',['../ub__constrain_8hpp.html',1,'']]], + ['ub_5ffree_2ehpp',['ub_free.hpp',['../ub__free_8hpp.html',1,'']]], + ['uniform_5fccdf_5flog_2ehpp',['uniform_ccdf_log.hpp',['../uniform__ccdf__log_8hpp.html',1,'']]], + ['uniform_5fcdf_2ehpp',['uniform_cdf.hpp',['../uniform__cdf_8hpp.html',1,'']]], + ['uniform_5fcdf_5flog_2ehpp',['uniform_cdf_log.hpp',['../uniform__cdf__log_8hpp.html',1,'']]], + ['uniform_5flog_2ehpp',['uniform_log.hpp',['../uniform__log_8hpp.html',1,'']]], + ['uniform_5frng_2ehpp',['uniform_rng.hpp',['../uniform__rng_8hpp.html',1,'']]], + ['unit_5fvector_5fconstrain_2ehpp',['unit_vector_constrain.hpp',['../unit__vector__constrain_8hpp.html',1,'']]], + ['unit_5fvector_5ffree_2ehpp',['unit_vector_free.hpp',['../unit__vector__free_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/files_14.html b/doc/api/html/search/files_14.html new file mode 100644 index 00000000000..9dc5ea513d8 --- /dev/null +++ b/doc/api/html/search/files_14.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/files_14.js b/doc/api/html/search/files_14.js new file mode 100644 index 00000000000..3b47538dec7 --- /dev/null +++ b/doc/api/html/search/files_14.js @@ -0,0 +1,32 @@ +var searchData= +[ + ['v_5fvari_2ehpp',['v_vari.hpp',['../v__vari_8hpp.html',1,'']]], + ['validate_5fnon_5fnegative_5findex_2ehpp',['validate_non_negative_index.hpp',['../validate__non__negative__index_8hpp.html',1,'']]], + ['value_5fof_2ehpp',['value_of.hpp',['../fwd_2scal_2fun_2value__of_8hpp.html',1,'']]], + ['value_5fof_2ehpp',['value_of.hpp',['../prim_2mat_2fun_2value__of_8hpp.html',1,'']]], + ['value_5fof_2ehpp',['value_of.hpp',['../rev_2scal_2fun_2value__of_8hpp.html',1,'']]], + ['value_5fof_2ehpp',['value_of.hpp',['../prim_2scal_2fun_2value__of_8hpp.html',1,'']]], + ['value_5fof_5frec_2ehpp',['value_of_rec.hpp',['../rev_2scal_2fun_2value__of__rec_8hpp.html',1,'']]], + ['value_5fof_5frec_2ehpp',['value_of_rec.hpp',['../fwd_2scal_2fun_2value__of__rec_8hpp.html',1,'']]], + ['value_5fof_5frec_2ehpp',['value_of_rec.hpp',['../prim_2mat_2fun_2value__of__rec_8hpp.html',1,'']]], + ['value_5fof_5frec_2ehpp',['value_of_rec.hpp',['../prim_2scal_2fun_2value__of__rec_8hpp.html',1,'']]], + ['value_5ftype_2ehpp',['value_type.hpp',['../mat_2meta_2value__type_8hpp.html',1,'']]], + ['value_5ftype_2ehpp',['value_type.hpp',['../scal_2meta_2value__type_8hpp.html',1,'']]], + ['var_2ehpp',['var.hpp',['../var_8hpp.html',1,'']]], + ['vari_2ehpp',['vari.hpp',['../vari_8hpp.html',1,'']]], + ['variance_2ehpp',['variance.hpp',['../prim_2mat_2fun_2variance_8hpp.html',1,'']]], + ['variance_2ehpp',['variance.hpp',['../rev_2mat_2fun_2variance_8hpp.html',1,'']]], + ['vd_5fvari_2ehpp',['vd_vari.hpp',['../vd__vari_8hpp.html',1,'']]], + ['vdd_5fvari_2ehpp',['vdd_vari.hpp',['../vdd__vari_8hpp.html',1,'']]], + ['vdv_5fvari_2ehpp',['vdv_vari.hpp',['../vdv__vari_8hpp.html',1,'']]], + ['vector_5fvari_2ehpp',['vector_vari.hpp',['../vector__vari_8hpp.html',1,'']]], + ['vectorbuilder_2ehpp',['VectorBuilder.hpp',['../_vector_builder_8hpp.html',1,'']]], + ['vectorview_2ehpp',['VectorView.hpp',['../_vector_view_8hpp.html',1,'']]], + ['vectorviewmvt_2ehpp',['VectorViewMvt.hpp',['../_vector_view_mvt_8hpp.html',1,'']]], + ['version_2ehpp',['version.hpp',['../version_8hpp.html',1,'']]], + ['von_5fmises_5flog_2ehpp',['von_mises_log.hpp',['../von__mises__log_8hpp.html',1,'']]], + ['von_5fmises_5frng_2ehpp',['von_mises_rng.hpp',['../von__mises__rng_8hpp.html',1,'']]], + ['vv_5fvari_2ehpp',['vv_vari.hpp',['../vv__vari_8hpp.html',1,'']]], + ['vvd_5fvari_2ehpp',['vvd_vari.hpp',['../vvd__vari_8hpp.html',1,'']]], + ['vvv_5fvari_2ehpp',['vvv_vari.hpp',['../vvv__vari_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/files_15.html b/doc/api/html/search/files_15.html new file mode 100644 index 00000000000..5b4d499a94e --- /dev/null +++ b/doc/api/html/search/files_15.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/files_15.js b/doc/api/html/search/files_15.js new file mode 100644 index 00000000000..020955acfa9 --- /dev/null +++ b/doc/api/html/search/files_15.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['weibull_5fccdf_5flog_2ehpp',['weibull_ccdf_log.hpp',['../weibull__ccdf__log_8hpp.html',1,'']]], + ['weibull_5fcdf_2ehpp',['weibull_cdf.hpp',['../weibull__cdf_8hpp.html',1,'']]], + ['weibull_5fcdf_5flog_2ehpp',['weibull_cdf_log.hpp',['../weibull__cdf__log_8hpp.html',1,'']]], + ['weibull_5flog_2ehpp',['weibull_log.hpp',['../weibull__log_8hpp.html',1,'']]], + ['weibull_5frng_2ehpp',['weibull_rng.hpp',['../weibull__rng_8hpp.html',1,'']]], + ['welford_5fcovar_5festimator_2ehpp',['welford_covar_estimator.hpp',['../welford__covar__estimator_8hpp.html',1,'']]], + ['welford_5fvar_5festimator_2ehpp',['welford_var_estimator.hpp',['../welford__var__estimator_8hpp.html',1,'']]], + ['wiener_5flog_2ehpp',['wiener_log.hpp',['../wiener__log_8hpp.html',1,'']]], + ['wishart_5flog_2ehpp',['wishart_log.hpp',['../wishart__log_8hpp.html',1,'']]], + ['wishart_5frng_2ehpp',['wishart_rng.hpp',['../wishart__rng_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/files_2.html b/doc/api/html/search/files_2.html new file mode 100644 index 00000000000..04a8a463426 --- /dev/null +++ b/doc/api/html/search/files_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/files_2.js b/doc/api/html/search/files_2.js new file mode 100644 index 00000000000..3291fdbd748 --- /dev/null +++ b/doc/api/html/search/files_2.js @@ -0,0 +1,114 @@ +var searchData= +[ + ['calculate_5fchain_2ehpp',['calculate_chain.hpp',['../calculate__chain_8hpp.html',1,'']]], + ['categorical_5flog_2ehpp',['categorical_log.hpp',['../categorical__log_8hpp.html',1,'']]], + ['categorical_5flogit_5flog_2ehpp',['categorical_logit_log.hpp',['../categorical__logit__log_8hpp.html',1,'']]], + ['categorical_5frng_2ehpp',['categorical_rng.hpp',['../categorical__rng_8hpp.html',1,'']]], + ['cauchy_5fccdf_5flog_2ehpp',['cauchy_ccdf_log.hpp',['../cauchy__ccdf__log_8hpp.html',1,'']]], + ['cauchy_5fcdf_2ehpp',['cauchy_cdf.hpp',['../cauchy__cdf_8hpp.html',1,'']]], + ['cauchy_5fcdf_5flog_2ehpp',['cauchy_cdf_log.hpp',['../cauchy__cdf__log_8hpp.html',1,'']]], + ['cauchy_5flog_2ehpp',['cauchy_log.hpp',['../cauchy__log_8hpp.html',1,'']]], + ['cauchy_5frng_2ehpp',['cauchy_rng.hpp',['../cauchy__rng_8hpp.html',1,'']]], + ['cbrt_2ehpp',['cbrt.hpp',['../fwd_2scal_2fun_2cbrt_8hpp.html',1,'']]], + ['cbrt_2ehpp',['cbrt.hpp',['../rev_2scal_2fun_2cbrt_8hpp.html',1,'']]], + ['ceil_2ehpp',['ceil.hpp',['../fwd_2scal_2fun_2ceil_8hpp.html',1,'']]], + ['ceil_2ehpp',['ceil.hpp',['../rev_2scal_2fun_2ceil_8hpp.html',1,'']]], + ['chainable_2ehpp',['chainable.hpp',['../chainable_8hpp.html',1,'']]], + ['chainable_5falloc_2ehpp',['chainable_alloc.hpp',['../chainable__alloc_8hpp.html',1,'']]], + ['chainablestack_2ehpp',['chainablestack.hpp',['../chainablestack_8hpp.html',1,'']]], + ['check_5fbounded_2ehpp',['check_bounded.hpp',['../check__bounded_8hpp.html',1,'']]], + ['check_5fcholesky_5ffactor_2ehpp',['check_cholesky_factor.hpp',['../check__cholesky__factor_8hpp.html',1,'']]], + ['check_5fcholesky_5ffactor_5fcorr_2ehpp',['check_cholesky_factor_corr.hpp',['../check__cholesky__factor__corr_8hpp.html',1,'']]], + ['check_5fcolumn_5findex_2ehpp',['check_column_index.hpp',['../check__column__index_8hpp.html',1,'']]], + ['check_5fconsistent_5fsize_2ehpp',['check_consistent_size.hpp',['../check__consistent__size_8hpp.html',1,'']]], + ['check_5fconsistent_5fsizes_2ehpp',['check_consistent_sizes.hpp',['../check__consistent__sizes_8hpp.html',1,'']]], + ['check_5fcorr_5fmatrix_2ehpp',['check_corr_matrix.hpp',['../check__corr__matrix_8hpp.html',1,'']]], + ['check_5fcov_5fmatrix_2ehpp',['check_cov_matrix.hpp',['../check__cov__matrix_8hpp.html',1,'']]], + ['check_5fequal_2ehpp',['check_equal.hpp',['../check__equal_8hpp.html',1,'']]], + ['check_5ffinite_2ehpp',['check_finite.hpp',['../check__finite_8hpp.html',1,'']]], + ['check_5fgreater_2ehpp',['check_greater.hpp',['../check__greater_8hpp.html',1,'']]], + ['check_5fgreater_5for_5fequal_2ehpp',['check_greater_or_equal.hpp',['../check__greater__or__equal_8hpp.html',1,'']]], + ['check_5fldlt_5ffactor_2ehpp',['check_ldlt_factor.hpp',['../check__ldlt__factor_8hpp.html',1,'']]], + ['check_5fless_2ehpp',['check_less.hpp',['../check__less_8hpp.html',1,'']]], + ['check_5fless_5for_5fequal_2ehpp',['check_less_or_equal.hpp',['../check__less__or__equal_8hpp.html',1,'']]], + ['check_5flower_5ftriangular_2ehpp',['check_lower_triangular.hpp',['../check__lower__triangular_8hpp.html',1,'']]], + ['check_5fmatching_5fdims_2ehpp',['check_matching_dims.hpp',['../check__matching__dims_8hpp.html',1,'']]], + ['check_5fmatching_5fsizes_2ehpp',['check_matching_sizes.hpp',['../check__matching__sizes_8hpp.html',1,'']]], + ['check_5fmultiplicable_2ehpp',['check_multiplicable.hpp',['../check__multiplicable_8hpp.html',1,'']]], + ['check_5fnonnegative_2ehpp',['check_nonnegative.hpp',['../check__nonnegative_8hpp.html',1,'']]], + ['check_5fnonzero_5fsize_2ehpp',['check_nonzero_size.hpp',['../check__nonzero__size_8hpp.html',1,'']]], + ['check_5fnot_5fnan_2ehpp',['check_not_nan.hpp',['../check__not__nan_8hpp.html',1,'']]], + ['check_5fordered_2ehpp',['check_ordered.hpp',['../check__ordered_8hpp.html',1,'']]], + ['check_5fpos_5fdefinite_2ehpp',['check_pos_definite.hpp',['../check__pos__definite_8hpp.html',1,'']]], + ['check_5fpos_5fsemidefinite_2ehpp',['check_pos_semidefinite.hpp',['../check__pos__semidefinite_8hpp.html',1,'']]], + ['check_5fpositive_2ehpp',['check_positive.hpp',['../check__positive_8hpp.html',1,'']]], + ['check_5fpositive_5ffinite_2ehpp',['check_positive_finite.hpp',['../check__positive__finite_8hpp.html',1,'']]], + ['check_5fpositive_5fordered_2ehpp',['check_positive_ordered.hpp',['../check__positive__ordered_8hpp.html',1,'']]], + ['check_5fpositive_5fsize_2ehpp',['check_positive_size.hpp',['../check__positive__size_8hpp.html',1,'']]], + ['check_5frange_2ehpp',['check_range.hpp',['../check__range_8hpp.html',1,'']]], + ['check_5frow_5findex_2ehpp',['check_row_index.hpp',['../check__row__index_8hpp.html',1,'']]], + ['check_5fsimplex_2ehpp',['check_simplex.hpp',['../check__simplex_8hpp.html',1,'']]], + ['check_5fsize_5fmatch_2ehpp',['check_size_match.hpp',['../check__size__match_8hpp.html',1,'']]], + ['check_5fspsd_5fmatrix_2ehpp',['check_spsd_matrix.hpp',['../check__spsd__matrix_8hpp.html',1,'']]], + ['check_5fsquare_2ehpp',['check_square.hpp',['../check__square_8hpp.html',1,'']]], + ['check_5fstd_5fvector_5findex_2ehpp',['check_std_vector_index.hpp',['../check__std__vector__index_8hpp.html',1,'']]], + ['check_5fsymmetric_2ehpp',['check_symmetric.hpp',['../check__symmetric_8hpp.html',1,'']]], + ['check_5funit_5fvector_2ehpp',['check_unit_vector.hpp',['../check__unit__vector_8hpp.html',1,'']]], + ['check_5fvector_2ehpp',['check_vector.hpp',['../check__vector_8hpp.html',1,'']]], + ['chi_5fsquare_5fccdf_5flog_2ehpp',['chi_square_ccdf_log.hpp',['../chi__square__ccdf__log_8hpp.html',1,'']]], + ['chi_5fsquare_5fcdf_2ehpp',['chi_square_cdf.hpp',['../chi__square__cdf_8hpp.html',1,'']]], + ['chi_5fsquare_5fcdf_5flog_2ehpp',['chi_square_cdf_log.hpp',['../chi__square__cdf__log_8hpp.html',1,'']]], + ['chi_5fsquare_5flog_2ehpp',['chi_square_log.hpp',['../chi__square__log_8hpp.html',1,'']]], + ['chi_5fsquare_5frng_2ehpp',['chi_square_rng.hpp',['../chi__square__rng_8hpp.html',1,'']]], + ['child_5ftype_2ehpp',['child_type.hpp',['../child__type_8hpp.html',1,'']]], + ['cholesky_5fcorr_5fconstrain_2ehpp',['cholesky_corr_constrain.hpp',['../cholesky__corr__constrain_8hpp.html',1,'']]], + ['cholesky_5fcorr_5ffree_2ehpp',['cholesky_corr_free.hpp',['../cholesky__corr__free_8hpp.html',1,'']]], + ['cholesky_5fdecompose_2ehpp',['cholesky_decompose.hpp',['../prim_2mat_2fun_2cholesky__decompose_8hpp.html',1,'']]], + ['cholesky_5fdecompose_2ehpp',['cholesky_decompose.hpp',['../rev_2mat_2fun_2cholesky__decompose_8hpp.html',1,'']]], + ['cholesky_5ffactor_5fconstrain_2ehpp',['cholesky_factor_constrain.hpp',['../cholesky__factor__constrain_8hpp.html',1,'']]], + ['cholesky_5ffactor_5ffree_2ehpp',['cholesky_factor_free.hpp',['../cholesky__factor__free_8hpp.html',1,'']]], + ['col_2ehpp',['col.hpp',['../col_8hpp.html',1,'']]], + ['cols_2ehpp',['cols.hpp',['../cols_8hpp.html',1,'']]], + ['columns_5fdot_5fproduct_2ehpp',['columns_dot_product.hpp',['../rev_2mat_2fun_2columns__dot__product_8hpp.html',1,'']]], + ['columns_5fdot_5fproduct_2ehpp',['columns_dot_product.hpp',['../prim_2mat_2fun_2columns__dot__product_8hpp.html',1,'']]], + ['columns_5fdot_5fproduct_2ehpp',['columns_dot_product.hpp',['../fwd_2mat_2fun_2columns__dot__product_8hpp.html',1,'']]], + ['columns_5fdot_5fself_2ehpp',['columns_dot_self.hpp',['../rev_2mat_2fun_2columns__dot__self_8hpp.html',1,'']]], + ['columns_5fdot_5fself_2ehpp',['columns_dot_self.hpp',['../prim_2mat_2fun_2columns__dot__self_8hpp.html',1,'']]], + ['columns_5fdot_5fself_2ehpp',['columns_dot_self.hpp',['../fwd_2mat_2fun_2columns__dot__self_8hpp.html',1,'']]], + ['common_5ftype_2ehpp',['common_type.hpp',['../common__type_8hpp.html',1,'']]], + ['constants_2ehpp',['constants.hpp',['../constants_8hpp.html',1,'']]], + ['constraint_5ftolerance_2ehpp',['constraint_tolerance.hpp',['../constraint__tolerance_8hpp.html',1,'']]], + ['container_5fview_2ehpp',['container_view.hpp',['../scal_2meta_2container__view_8hpp.html',1,'']]], + ['container_5fview_2ehpp',['container_view.hpp',['../mat_2meta_2container__view_8hpp.html',1,'']]], + ['container_5fview_2ehpp',['container_view.hpp',['../arr_2meta_2container__view_8hpp.html',1,'']]], + ['contains_5ffvar_2ehpp',['contains_fvar.hpp',['../contains__fvar_8hpp.html',1,'']]], + ['contains_5fnonconstant_5fstruct_2ehpp',['contains_nonconstant_struct.hpp',['../contains__nonconstant__struct_8hpp.html',1,'']]], + ['contains_5fvector_2ehpp',['contains_vector.hpp',['../contains__vector_8hpp.html',1,'']]], + ['core_2ehpp',['core.hpp',['../rev_2core_8hpp.html',1,'']]], + ['core_2ehpp',['core.hpp',['../fwd_2core_8hpp.html',1,'']]], + ['corr_5fconstrain_2ehpp',['corr_constrain.hpp',['../corr__constrain_8hpp.html',1,'']]], + ['corr_5ffree_2ehpp',['corr_free.hpp',['../corr__free_8hpp.html',1,'']]], + ['corr_5fmatrix_5fconstrain_2ehpp',['corr_matrix_constrain.hpp',['../corr__matrix__constrain_8hpp.html',1,'']]], + ['corr_5fmatrix_5ffree_2ehpp',['corr_matrix_free.hpp',['../corr__matrix__free_8hpp.html',1,'']]], + ['cos_2ehpp',['cos.hpp',['../fwd_2scal_2fun_2cos_8hpp.html',1,'']]], + ['cos_2ehpp',['cos.hpp',['../rev_2scal_2fun_2cos_8hpp.html',1,'']]], + ['cosh_2ehpp',['cosh.hpp',['../fwd_2scal_2fun_2cosh_8hpp.html',1,'']]], + ['cosh_2ehpp',['cosh.hpp',['../rev_2scal_2fun_2cosh_8hpp.html',1,'']]], + ['coupled_5fode_5fobserver_2ehpp',['coupled_ode_observer.hpp',['../coupled__ode__observer_8hpp.html',1,'']]], + ['coupled_5fode_5fsystem_2ehpp',['coupled_ode_system.hpp',['../rev_2arr_2functor_2coupled__ode__system_8hpp.html',1,'']]], + ['coupled_5fode_5fsystem_2ehpp',['coupled_ode_system.hpp',['../prim_2arr_2functor_2coupled__ode__system_8hpp.html',1,'']]], + ['cov_5fmatrix_5fconstrain_2ehpp',['cov_matrix_constrain.hpp',['../cov__matrix__constrain_8hpp.html',1,'']]], + ['cov_5fmatrix_5fconstrain_5flkj_2ehpp',['cov_matrix_constrain_lkj.hpp',['../cov__matrix__constrain__lkj_8hpp.html',1,'']]], + ['cov_5fmatrix_5ffree_2ehpp',['cov_matrix_free.hpp',['../cov__matrix__free_8hpp.html',1,'']]], + ['cov_5fmatrix_5ffree_5flkj_2ehpp',['cov_matrix_free_lkj.hpp',['../cov__matrix__free__lkj_8hpp.html',1,'']]], + ['crossprod_2ehpp',['crossprod.hpp',['../fwd_2mat_2fun_2crossprod_8hpp.html',1,'']]], + ['crossprod_2ehpp',['crossprod.hpp',['../rev_2mat_2fun_2crossprod_8hpp.html',1,'']]], + ['crossprod_2ehpp',['crossprod.hpp',['../prim_2mat_2fun_2crossprod_8hpp.html',1,'']]], + ['csr_5fextract_5fu_2ehpp',['csr_extract_u.hpp',['../csr__extract__u_8hpp.html',1,'']]], + ['csr_5fextract_5fv_2ehpp',['csr_extract_v.hpp',['../csr__extract__v_8hpp.html',1,'']]], + ['csr_5fextract_5fw_2ehpp',['csr_extract_w.hpp',['../csr__extract__w_8hpp.html',1,'']]], + ['csr_5fmatrix_5ftimes_5fvector_2ehpp',['csr_matrix_times_vector.hpp',['../csr__matrix__times__vector_8hpp.html',1,'']]], + ['csr_5fto_5fdense_5fmatrix_2ehpp',['csr_to_dense_matrix.hpp',['../csr__to__dense__matrix_8hpp.html',1,'']]], + ['csr_5fu_5fto_5fz_2ehpp',['csr_u_to_z.hpp',['../csr__u__to__z_8hpp.html',1,'']]], + ['cumulative_5fsum_2ehpp',['cumulative_sum.hpp',['../cumulative__sum_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/files_3.html b/doc/api/html/search/files_3.html new file mode 100644 index 00000000000..0dc9a561e53 --- /dev/null +++ b/doc/api/html/search/files_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/files_3.js b/doc/api/html/search/files_3.js new file mode 100644 index 00000000000..928dc3a249c --- /dev/null +++ b/doc/api/html/search/files_3.js @@ -0,0 +1,42 @@ +var searchData= +[ + ['ddv_5fvari_2ehpp',['ddv_vari.hpp',['../ddv__vari_8hpp.html',1,'']]], + ['derivative_2ehpp',['derivative.hpp',['../derivative_8hpp.html',1,'']]], + ['determinant_2ehpp',['determinant.hpp',['../fwd_2mat_2fun_2determinant_8hpp.html',1,'']]], + ['determinant_2ehpp',['determinant.hpp',['../prim_2mat_2fun_2determinant_8hpp.html',1,'']]], + ['determinant_2ehpp',['determinant.hpp',['../rev_2mat_2fun_2determinant_8hpp.html',1,'']]], + ['diag_5fmatrix_2ehpp',['diag_matrix.hpp',['../diag__matrix_8hpp.html',1,'']]], + ['diag_5fpost_5fmultiply_2ehpp',['diag_post_multiply.hpp',['../diag__post__multiply_8hpp.html',1,'']]], + ['diag_5fpre_5fmultiply_2ehpp',['diag_pre_multiply.hpp',['../diag__pre__multiply_8hpp.html',1,'']]], + ['diagonal_2ehpp',['diagonal.hpp',['../diagonal_8hpp.html',1,'']]], + ['digamma_2ehpp',['digamma.hpp',['../rev_2scal_2fun_2digamma_8hpp.html',1,'']]], + ['digamma_2ehpp',['digamma.hpp',['../prim_2scal_2fun_2digamma_8hpp.html',1,'']]], + ['digamma_2ehpp',['digamma.hpp',['../fwd_2scal_2fun_2digamma_8hpp.html',1,'']]], + ['dims_2ehpp',['dims.hpp',['../dims_8hpp.html',1,'']]], + ['dirichlet_5flog_2ehpp',['dirichlet_log.hpp',['../dirichlet__log_8hpp.html',1,'']]], + ['dirichlet_5frng_2ehpp',['dirichlet_rng.hpp',['../dirichlet__rng_8hpp.html',1,'']]], + ['dist_2ehpp',['dist.hpp',['../dist_8hpp.html',1,'']]], + ['distance_2ehpp',['distance.hpp',['../distance_8hpp.html',1,'']]], + ['divide_2ehpp',['divide.hpp',['../fwd_2mat_2fun_2divide_8hpp.html',1,'']]], + ['divide_2ehpp',['divide.hpp',['../prim_2mat_2fun_2divide_8hpp.html',1,'']]], + ['divide_2ehpp',['divide.hpp',['../prim_2scal_2fun_2divide_8hpp.html',1,'']]], + ['divide_2ehpp',['divide.hpp',['../rev_2mat_2fun_2divide_8hpp.html',1,'']]], + ['domain_5ferror_2ehpp',['domain_error.hpp',['../domain__error_8hpp.html',1,'']]], + ['domain_5ferror_5fvec_2ehpp',['domain_error_vec.hpp',['../domain__error__vec_8hpp.html',1,'']]], + ['dot_2ehpp',['dot.hpp',['../dot_8hpp.html',1,'']]], + ['dot_5fproduct_2ehpp',['dot_product.hpp',['../fwd_2mat_2fun_2dot__product_8hpp.html',1,'']]], + ['dot_5fproduct_2ehpp',['dot_product.hpp',['../prim_2mat_2fun_2dot__product_8hpp.html',1,'']]], + ['dot_5fproduct_2ehpp',['dot_product.hpp',['../rev_2mat_2fun_2dot__product_8hpp.html',1,'']]], + ['dot_5fself_2ehpp',['dot_self.hpp',['../rev_2mat_2fun_2dot__self_8hpp.html',1,'']]], + ['dot_5fself_2ehpp',['dot_self.hpp',['../fwd_2mat_2fun_2dot__self_8hpp.html',1,'']]], + ['dot_5fself_2ehpp',['dot_self.hpp',['../prim_2arr_2fun_2dot__self_8hpp.html',1,'']]], + ['dot_5fself_2ehpp',['dot_self.hpp',['../prim_2mat_2fun_2dot__self_8hpp.html',1,'']]], + ['double_5fexponential_5fccdf_5flog_2ehpp',['double_exponential_ccdf_log.hpp',['../double__exponential__ccdf__log_8hpp.html',1,'']]], + ['double_5fexponential_5fcdf_2ehpp',['double_exponential_cdf.hpp',['../double__exponential__cdf_8hpp.html',1,'']]], + ['double_5fexponential_5fcdf_5flog_2ehpp',['double_exponential_cdf_log.hpp',['../double__exponential__cdf__log_8hpp.html',1,'']]], + ['double_5fexponential_5flog_2ehpp',['double_exponential_log.hpp',['../double__exponential__log_8hpp.html',1,'']]], + ['double_5fexponential_5frng_2ehpp',['double_exponential_rng.hpp',['../double__exponential__rng_8hpp.html',1,'']]], + ['dv_5fvari_2ehpp',['dv_vari.hpp',['../dv__vari_8hpp.html',1,'']]], + ['dvd_5fvari_2ehpp',['dvd_vari.hpp',['../dvd__vari_8hpp.html',1,'']]], + ['dvv_5fvari_2ehpp',['dvv_vari.hpp',['../dvv__vari_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/files_4.html b/doc/api/html/search/files_4.html new file mode 100644 index 00000000000..891b5da3400 --- /dev/null +++ b/doc/api/html/search/files_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/files_4.js b/doc/api/html/search/files_4.js new file mode 100644 index 00000000000..788b486a77f --- /dev/null +++ b/doc/api/html/search/files_4.js @@ -0,0 +1,35 @@ +var searchData= +[ + ['eigen_2edox',['Eigen.dox',['../_eigen_8dox.html',1,'']]], + ['eigen_2ehpp',['Eigen.hpp',['../_eigen_8hpp.html',1,'']]], + ['eigen_5fnumtraits_2ehpp',['Eigen_NumTraits.hpp',['../fwd_2mat_2fun_2_eigen___num_traits_8hpp.html',1,'']]], + ['eigen_5fnumtraits_2ehpp',['Eigen_NumTraits.hpp',['../rev_2mat_2fun_2_eigen___num_traits_8hpp.html',1,'']]], + ['eigenvalues_5fsym_2ehpp',['eigenvalues_sym.hpp',['../eigenvalues__sym_8hpp.html',1,'']]], + ['eigenvectors_5fsym_2ehpp',['eigenvectors_sym.hpp',['../eigenvectors__sym_8hpp.html',1,'']]], + ['elt_5fdivide_2ehpp',['elt_divide.hpp',['../elt__divide_8hpp.html',1,'']]], + ['elt_5fmultiply_2ehpp',['elt_multiply.hpp',['../elt__multiply_8hpp.html',1,'']]], + ['empty_5fnested_2ehpp',['empty_nested.hpp',['../empty__nested_8hpp.html',1,'']]], + ['erf_2ehpp',['erf.hpp',['../fwd_2scal_2fun_2erf_8hpp.html',1,'']]], + ['erf_2ehpp',['erf.hpp',['../rev_2scal_2fun_2erf_8hpp.html',1,'']]], + ['erfc_2ehpp',['erfc.hpp',['../fwd_2scal_2fun_2erfc_8hpp.html',1,'']]], + ['erfc_2ehpp',['erfc.hpp',['../rev_2scal_2fun_2erfc_8hpp.html',1,'']]], + ['error_5findex_2ehpp',['error_index.hpp',['../error__index_8hpp.html',1,'']]], + ['exp_2ehpp',['exp.hpp',['../fwd_2scal_2fun_2exp_8hpp.html',1,'']]], + ['exp_2ehpp',['exp.hpp',['../prim_2mat_2fun_2exp_8hpp.html',1,'']]], + ['exp_2ehpp',['exp.hpp',['../rev_2scal_2fun_2exp_8hpp.html',1,'']]], + ['exp2_2ehpp',['exp2.hpp',['../fwd_2scal_2fun_2exp2_8hpp.html',1,'']]], + ['exp2_2ehpp',['exp2.hpp',['../prim_2scal_2fun_2exp2_8hpp.html',1,'']]], + ['exp2_2ehpp',['exp2.hpp',['../rev_2scal_2fun_2exp2_8hpp.html',1,'']]], + ['exp_5fmod_5fnormal_5fccdf_5flog_2ehpp',['exp_mod_normal_ccdf_log.hpp',['../exp__mod__normal__ccdf__log_8hpp.html',1,'']]], + ['exp_5fmod_5fnormal_5fcdf_2ehpp',['exp_mod_normal_cdf.hpp',['../exp__mod__normal__cdf_8hpp.html',1,'']]], + ['exp_5fmod_5fnormal_5fcdf_5flog_2ehpp',['exp_mod_normal_cdf_log.hpp',['../exp__mod__normal__cdf__log_8hpp.html',1,'']]], + ['exp_5fmod_5fnormal_5flog_2ehpp',['exp_mod_normal_log.hpp',['../exp__mod__normal__log_8hpp.html',1,'']]], + ['exp_5fmod_5fnormal_5frng_2ehpp',['exp_mod_normal_rng.hpp',['../exp__mod__normal__rng_8hpp.html',1,'']]], + ['expm1_2ehpp',['expm1.hpp',['../rev_2scal_2fun_2expm1_8hpp.html',1,'']]], + ['expm1_2ehpp',['expm1.hpp',['../fwd_2scal_2fun_2expm1_8hpp.html',1,'']]], + ['exponential_5fccdf_5flog_2ehpp',['exponential_ccdf_log.hpp',['../exponential__ccdf__log_8hpp.html',1,'']]], + ['exponential_5fcdf_2ehpp',['exponential_cdf.hpp',['../exponential__cdf_8hpp.html',1,'']]], + ['exponential_5fcdf_5flog_2ehpp',['exponential_cdf_log.hpp',['../exponential__cdf__log_8hpp.html',1,'']]], + ['exponential_5flog_2ehpp',['exponential_log.hpp',['../exponential__log_8hpp.html',1,'']]], + ['exponential_5frng_2ehpp',['exponential_rng.hpp',['../exponential__rng_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/files_5.html b/doc/api/html/search/files_5.html new file mode 100644 index 00000000000..1741195c0f3 --- /dev/null +++ b/doc/api/html/search/files_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/files_5.js b/doc/api/html/search/files_5.js new file mode 100644 index 00000000000..6d7cfada37c --- /dev/null +++ b/doc/api/html/search/files_5.js @@ -0,0 +1,36 @@ +var searchData= +[ + ['f32_2ehpp',['F32.hpp',['../_f32_8hpp.html',1,'']]], + ['fabs_2ehpp',['fabs.hpp',['../fwd_2scal_2fun_2fabs_8hpp.html',1,'']]], + ['fabs_2ehpp',['fabs.hpp',['../rev_2scal_2fun_2fabs_8hpp.html',1,'']]], + ['factor_5fcov_5fmatrix_2ehpp',['factor_cov_matrix.hpp',['../factor__cov__matrix_8hpp.html',1,'']]], + ['factor_5fu_2ehpp',['factor_U.hpp',['../factor___u_8hpp.html',1,'']]], + ['falling_5ffactorial_2ehpp',['falling_factorial.hpp',['../prim_2scal_2fun_2falling__factorial_8hpp.html',1,'']]], + ['falling_5ffactorial_2ehpp',['falling_factorial.hpp',['../fwd_2scal_2fun_2falling__factorial_8hpp.html',1,'']]], + ['falling_5ffactorial_2ehpp',['falling_factorial.hpp',['../rev_2scal_2fun_2falling__factorial_8hpp.html',1,'']]], + ['fdim_2ehpp',['fdim.hpp',['../prim_2scal_2fun_2fdim_8hpp.html',1,'']]], + ['fdim_2ehpp',['fdim.hpp',['../rev_2scal_2fun_2fdim_8hpp.html',1,'']]], + ['fdim_2ehpp',['fdim.hpp',['../fwd_2scal_2fun_2fdim_8hpp.html',1,'']]], + ['fill_2ehpp',['fill.hpp',['../fill_8hpp.html',1,'']]], + ['finite_5fdiff_5fgrad_5fhessian_2ehpp',['finite_diff_grad_hessian.hpp',['../finite__diff__grad__hessian_8hpp.html',1,'']]], + ['finite_5fdiff_5fgradient_2ehpp',['finite_diff_gradient.hpp',['../finite__diff__gradient_8hpp.html',1,'']]], + ['finite_5fdiff_5fhessian_2ehpp',['finite_diff_hessian.hpp',['../finite__diff__hessian_8hpp.html',1,'']]], + ['floor_2ehpp',['floor.hpp',['../fwd_2scal_2fun_2floor_8hpp.html',1,'']]], + ['floor_2ehpp',['floor.hpp',['../rev_2scal_2fun_2floor_8hpp.html',1,'']]], + ['fma_2ehpp',['fma.hpp',['../fwd_2scal_2fun_2fma_8hpp.html',1,'']]], + ['fma_2ehpp',['fma.hpp',['../rev_2scal_2fun_2fma_8hpp.html',1,'']]], + ['fmax_2ehpp',['fmax.hpp',['../fwd_2scal_2fun_2fmax_8hpp.html',1,'']]], + ['fmax_2ehpp',['fmax.hpp',['../rev_2scal_2fun_2fmax_8hpp.html',1,'']]], + ['fmin_2ehpp',['fmin.hpp',['../fwd_2scal_2fun_2fmin_8hpp.html',1,'']]], + ['fmin_2ehpp',['fmin.hpp',['../rev_2scal_2fun_2fmin_8hpp.html',1,'']]], + ['fmod_2ehpp',['fmod.hpp',['../fwd_2scal_2fun_2fmod_8hpp.html',1,'']]], + ['fmod_2ehpp',['fmod.hpp',['../rev_2scal_2fun_2fmod_8hpp.html',1,'']]], + ['frechet_5fccdf_5flog_2ehpp',['frechet_ccdf_log.hpp',['../frechet__ccdf__log_8hpp.html',1,'']]], + ['frechet_5fcdf_2ehpp',['frechet_cdf.hpp',['../frechet__cdf_8hpp.html',1,'']]], + ['frechet_5fcdf_5flog_2ehpp',['frechet_cdf_log.hpp',['../frechet__cdf__log_8hpp.html',1,'']]], + ['frechet_5flog_2ehpp',['frechet_log.hpp',['../frechet__log_8hpp.html',1,'']]], + ['frechet_5frng_2ehpp',['frechet_rng.hpp',['../frechet__rng_8hpp.html',1,'']]], + ['fun_2ehpp',['fun.hpp',['../fun_8hpp.html',1,'']]], + ['functor_2ehpp',['functor.hpp',['../functor_8hpp.html',1,'']]], + ['fvar_2ehpp',['fvar.hpp',['../fvar_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/files_6.html b/doc/api/html/search/files_6.html new file mode 100644 index 00000000000..262d3da249e --- /dev/null +++ b/doc/api/html/search/files_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/files_6.js b/doc/api/html/search/files_6.js new file mode 100644 index 00000000000..bd2ff98b81e --- /dev/null +++ b/doc/api/html/search/files_6.js @@ -0,0 +1,41 @@ +var searchData= +[ + ['gamma_5fccdf_5flog_2ehpp',['gamma_ccdf_log.hpp',['../gamma__ccdf__log_8hpp.html',1,'']]], + ['gamma_5fcdf_2ehpp',['gamma_cdf.hpp',['../gamma__cdf_8hpp.html',1,'']]], + ['gamma_5fcdf_5flog_2ehpp',['gamma_cdf_log.hpp',['../gamma__cdf__log_8hpp.html',1,'']]], + ['gamma_5flog_2ehpp',['gamma_log.hpp',['../gamma__log_8hpp.html',1,'']]], + ['gamma_5fp_2ehpp',['gamma_p.hpp',['../prim_2scal_2fun_2gamma__p_8hpp.html',1,'']]], + ['gamma_5fp_2ehpp',['gamma_p.hpp',['../rev_2scal_2fun_2gamma__p_8hpp.html',1,'']]], + ['gamma_5fp_2ehpp',['gamma_p.hpp',['../fwd_2scal_2fun_2gamma__p_8hpp.html',1,'']]], + ['gamma_5fq_2ehpp',['gamma_q.hpp',['../rev_2scal_2fun_2gamma__q_8hpp.html',1,'']]], + ['gamma_5fq_2ehpp',['gamma_q.hpp',['../fwd_2scal_2fun_2gamma__q_8hpp.html',1,'']]], + ['gamma_5fq_2ehpp',['gamma_q.hpp',['../prim_2scal_2fun_2gamma__q_8hpp.html',1,'']]], + ['gamma_5frng_2ehpp',['gamma_rng.hpp',['../gamma__rng_8hpp.html',1,'']]], + ['gaussian_5fdlm_5fobs_5flog_2ehpp',['gaussian_dlm_obs_log.hpp',['../gaussian__dlm__obs__log_8hpp.html',1,'']]], + ['get_2ehpp',['get.hpp',['../mat_2meta_2get_8hpp.html',1,'']]], + ['get_2ehpp',['get.hpp',['../scal_2meta_2get_8hpp.html',1,'']]], + ['get_2ehpp',['get.hpp',['../arr_2meta_2get_8hpp.html',1,'']]], + ['get_5fbase1_2ehpp',['get_base1.hpp',['../get__base1_8hpp.html',1,'']]], + ['get_5fbase1_5flhs_2ehpp',['get_base1_lhs.hpp',['../get__base1__lhs_8hpp.html',1,'']]], + ['get_5flp_2ehpp',['get_lp.hpp',['../get__lp_8hpp.html',1,'']]], + ['gevv_5fvvv_5fvari_2ehpp',['gevv_vvv_vari.hpp',['../gevv__vvv__vari_8hpp.html',1,'']]], + ['grad_2ehpp',['grad.hpp',['../mat_2fun_2grad_8hpp.html',1,'']]], + ['grad_2ehpp',['grad.hpp',['../core_2grad_8hpp.html',1,'']]], + ['grad_5f2f1_2ehpp',['grad_2F1.hpp',['../grad__2_f1_8hpp.html',1,'']]], + ['grad_5ff32_2ehpp',['grad_F32.hpp',['../grad___f32_8hpp.html',1,'']]], + ['grad_5fhessian_2ehpp',['grad_hessian.hpp',['../grad__hessian_8hpp.html',1,'']]], + ['grad_5finc_5fbeta_2ehpp',['grad_inc_beta.hpp',['../rev_2scal_2fun_2grad__inc__beta_8hpp.html',1,'']]], + ['grad_5finc_5fbeta_2ehpp',['grad_inc_beta.hpp',['../prim_2scal_2fun_2grad__inc__beta_8hpp.html',1,'']]], + ['grad_5finc_5fbeta_2ehpp',['grad_inc_beta.hpp',['../fwd_2scal_2fun_2grad__inc__beta_8hpp.html',1,'']]], + ['grad_5freg_5finc_5fbeta_2ehpp',['grad_reg_inc_beta.hpp',['../grad__reg__inc__beta_8hpp.html',1,'']]], + ['grad_5freg_5finc_5fgamma_2ehpp',['grad_reg_inc_gamma.hpp',['../grad__reg__inc__gamma_8hpp.html',1,'']]], + ['grad_5ftr_5fmat_5ftimes_5fhessian_2ehpp',['grad_tr_mat_times_hessian.hpp',['../grad__tr__mat__times__hessian_8hpp.html',1,'']]], + ['gradient_2ehpp',['gradient.hpp',['../rev_2mat_2functor_2gradient_8hpp.html',1,'']]], + ['gradient_2ehpp',['gradient.hpp',['../fwd_2mat_2functor_2gradient_8hpp.html',1,'']]], + ['gradient_5fdot_5fvector_2ehpp',['gradient_dot_vector.hpp',['../gradient__dot__vector_8hpp.html',1,'']]], + ['gumbel_5fccdf_5flog_2ehpp',['gumbel_ccdf_log.hpp',['../gumbel__ccdf__log_8hpp.html',1,'']]], + ['gumbel_5fcdf_2ehpp',['gumbel_cdf.hpp',['../gumbel__cdf_8hpp.html',1,'']]], + ['gumbel_5fcdf_5flog_2ehpp',['gumbel_cdf_log.hpp',['../gumbel__cdf__log_8hpp.html',1,'']]], + ['gumbel_5flog_2ehpp',['gumbel_log.hpp',['../gumbel__log_8hpp.html',1,'']]], + ['gumbel_5frng_2ehpp',['gumbel_rng.hpp',['../gumbel__rng_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/files_7.html b/doc/api/html/search/files_7.html new file mode 100644 index 00000000000..c5355726dff --- /dev/null +++ b/doc/api/html/search/files_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/files_7.js b/doc/api/html/search/files_7.js new file mode 100644 index 00000000000..0e84c9f064f --- /dev/null +++ b/doc/api/html/search/files_7.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['head_2ehpp',['head.hpp',['../head_8hpp.html',1,'']]], + ['hessian_2ehpp',['hessian.hpp',['../hessian_8hpp.html',1,'']]], + ['hessian_5ftimes_5fvector_2ehpp',['hessian_times_vector.hpp',['../hessian__times__vector_8hpp.html',1,'']]], + ['hypergeometric_5flog_2ehpp',['hypergeometric_log.hpp',['../hypergeometric__log_8hpp.html',1,'']]], + ['hypergeometric_5frng_2ehpp',['hypergeometric_rng.hpp',['../hypergeometric__rng_8hpp.html',1,'']]], + ['hypot_2ehpp',['hypot.hpp',['../fwd_2scal_2fun_2hypot_8hpp.html',1,'']]], + ['hypot_2ehpp',['hypot.hpp',['../rev_2scal_2fun_2hypot_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/files_8.html b/doc/api/html/search/files_8.html new file mode 100644 index 00000000000..21c328afade --- /dev/null +++ b/doc/api/html/search/files_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/files_8.js b/doc/api/html/search/files_8.js new file mode 100644 index 00000000000..da3eaf9f7b6 --- /dev/null +++ b/doc/api/html/search/files_8.js @@ -0,0 +1,79 @@ +var searchData= +[ + ['ibeta_2ehpp',['ibeta.hpp',['../prim_2scal_2fun_2ibeta_8hpp.html',1,'']]], + ['ibeta_2ehpp',['ibeta.hpp',['../rev_2scal_2fun_2ibeta_8hpp.html',1,'']]], + ['identity_5fconstrain_2ehpp',['identity_constrain.hpp',['../identity__constrain_8hpp.html',1,'']]], + ['identity_5ffree_2ehpp',['identity_free.hpp',['../identity__free_8hpp.html',1,'']]], + ['if_5felse_2ehpp',['if_else.hpp',['../prim_2scal_2fun_2if__else_8hpp.html',1,'']]], + ['if_5felse_2ehpp',['if_else.hpp',['../rev_2scal_2fun_2if__else_8hpp.html',1,'']]], + ['inc_5fbeta_2ehpp',['inc_beta.hpp',['../fwd_2scal_2fun_2inc__beta_8hpp.html',1,'']]], + ['inc_5fbeta_2ehpp',['inc_beta.hpp',['../prim_2scal_2fun_2inc__beta_8hpp.html',1,'']]], + ['inc_5fbeta_2ehpp',['inc_beta.hpp',['../rev_2scal_2fun_2inc__beta_8hpp.html',1,'']]], + ['inc_5fbeta_5fdda_2ehpp',['inc_beta_dda.hpp',['../inc__beta__dda_8hpp.html',1,'']]], + ['inc_5fbeta_5fddb_2ehpp',['inc_beta_ddb.hpp',['../inc__beta__ddb_8hpp.html',1,'']]], + ['inc_5fbeta_5fddz_2ehpp',['inc_beta_ddz.hpp',['../inc__beta__ddz_8hpp.html',1,'']]], + ['include_5fsummand_2ehpp',['include_summand.hpp',['../include__summand_8hpp.html',1,'']]], + ['index_5ftype_2ehpp',['index_type.hpp',['../arr_2meta_2index__type_8hpp.html',1,'']]], + ['index_5ftype_2ehpp',['index_type.hpp',['../mat_2meta_2index__type_8hpp.html',1,'']]], + ['index_5ftype_2ehpp',['index_type.hpp',['../scal_2meta_2index__type_8hpp.html',1,'']]], + ['initialize_2ehpp',['initialize.hpp',['../initialize_8hpp.html',1,'']]], + ['initialize_5fvariable_2ehpp',['initialize_variable.hpp',['../initialize__variable_8hpp.html',1,'']]], + ['int_5fstep_2ehpp',['int_step.hpp',['../int__step_8hpp.html',1,'']]], + ['integrate_5fode_2ehpp',['integrate_ode.hpp',['../integrate__ode_8hpp.html',1,'']]], + ['inv_2ehpp',['inv.hpp',['../rev_2scal_2fun_2inv_8hpp.html',1,'']]], + ['inv_2ehpp',['inv.hpp',['../fwd_2scal_2fun_2inv_8hpp.html',1,'']]], + ['inv_2ehpp',['inv.hpp',['../prim_2scal_2fun_2inv_8hpp.html',1,'']]], + ['inv_5fchi_5fsquare_5fccdf_5flog_2ehpp',['inv_chi_square_ccdf_log.hpp',['../inv__chi__square__ccdf__log_8hpp.html',1,'']]], + ['inv_5fchi_5fsquare_5fcdf_2ehpp',['inv_chi_square_cdf.hpp',['../inv__chi__square__cdf_8hpp.html',1,'']]], + ['inv_5fchi_5fsquare_5fcdf_5flog_2ehpp',['inv_chi_square_cdf_log.hpp',['../inv__chi__square__cdf__log_8hpp.html',1,'']]], + ['inv_5fchi_5fsquare_5flog_2ehpp',['inv_chi_square_log.hpp',['../inv__chi__square__log_8hpp.html',1,'']]], + ['inv_5fchi_5fsquare_5frng_2ehpp',['inv_chi_square_rng.hpp',['../inv__chi__square__rng_8hpp.html',1,'']]], + ['inv_5fcloglog_2ehpp',['inv_cloglog.hpp',['../fwd_2scal_2fun_2inv__cloglog_8hpp.html',1,'']]], + ['inv_5fcloglog_2ehpp',['inv_cloglog.hpp',['../prim_2scal_2fun_2inv__cloglog_8hpp.html',1,'']]], + ['inv_5fcloglog_2ehpp',['inv_cloglog.hpp',['../rev_2scal_2fun_2inv__cloglog_8hpp.html',1,'']]], + ['inv_5fgamma_5fccdf_5flog_2ehpp',['inv_gamma_ccdf_log.hpp',['../inv__gamma__ccdf__log_8hpp.html',1,'']]], + ['inv_5fgamma_5fcdf_2ehpp',['inv_gamma_cdf.hpp',['../inv__gamma__cdf_8hpp.html',1,'']]], + ['inv_5fgamma_5fcdf_5flog_2ehpp',['inv_gamma_cdf_log.hpp',['../inv__gamma__cdf__log_8hpp.html',1,'']]], + ['inv_5fgamma_5flog_2ehpp',['inv_gamma_log.hpp',['../inv__gamma__log_8hpp.html',1,'']]], + ['inv_5fgamma_5frng_2ehpp',['inv_gamma_rng.hpp',['../inv__gamma__rng_8hpp.html',1,'']]], + ['inv_5flogit_2ehpp',['inv_logit.hpp',['../fwd_2scal_2fun_2inv__logit_8hpp.html',1,'']]], + ['inv_5flogit_2ehpp',['inv_logit.hpp',['../prim_2scal_2fun_2inv__logit_8hpp.html',1,'']]], + ['inv_5flogit_2ehpp',['inv_logit.hpp',['../rev_2scal_2fun_2inv__logit_8hpp.html',1,'']]], + ['inv_5fphi_2ehpp',['inv_Phi.hpp',['../rev_2scal_2fun_2inv___phi_8hpp.html',1,'']]], + ['inv_5fphi_2ehpp',['inv_Phi.hpp',['../prim_2scal_2fun_2inv___phi_8hpp.html',1,'']]], + ['inv_5fphi_2ehpp',['inv_Phi.hpp',['../fwd_2scal_2fun_2inv___phi_8hpp.html',1,'']]], + ['inv_5fsqrt_2ehpp',['inv_sqrt.hpp',['../prim_2scal_2fun_2inv__sqrt_8hpp.html',1,'']]], + ['inv_5fsqrt_2ehpp',['inv_sqrt.hpp',['../rev_2scal_2fun_2inv__sqrt_8hpp.html',1,'']]], + ['inv_5fsqrt_2ehpp',['inv_sqrt.hpp',['../fwd_2scal_2fun_2inv__sqrt_8hpp.html',1,'']]], + ['inv_5fsquare_2ehpp',['inv_square.hpp',['../fwd_2scal_2fun_2inv__square_8hpp.html',1,'']]], + ['inv_5fsquare_2ehpp',['inv_square.hpp',['../prim_2scal_2fun_2inv__square_8hpp.html',1,'']]], + ['inv_5fsquare_2ehpp',['inv_square.hpp',['../rev_2scal_2fun_2inv__square_8hpp.html',1,'']]], + ['inv_5fwishart_5flog_2ehpp',['inv_wishart_log.hpp',['../inv__wishart__log_8hpp.html',1,'']]], + ['inv_5fwishart_5frng_2ehpp',['inv_wishart_rng.hpp',['../inv__wishart__rng_8hpp.html',1,'']]], + ['invalid_5fargument_2ehpp',['invalid_argument.hpp',['../invalid__argument_8hpp.html',1,'']]], + ['invalid_5fargument_5fvec_2ehpp',['invalid_argument_vec.hpp',['../invalid__argument__vec_8hpp.html',1,'']]], + ['inverse_2ehpp',['inverse.hpp',['../prim_2mat_2fun_2inverse_8hpp.html',1,'']]], + ['inverse_2ehpp',['inverse.hpp',['../fwd_2mat_2fun_2inverse_8hpp.html',1,'']]], + ['inverse_5fsoftmax_2ehpp',['inverse_softmax.hpp',['../inverse__softmax_8hpp.html',1,'']]], + ['inverse_5fspd_2ehpp',['inverse_spd.hpp',['../inverse__spd_8hpp.html',1,'']]], + ['is_5fconstant_2ehpp',['is_constant.hpp',['../is__constant_8hpp.html',1,'']]], + ['is_5fconstant_5fstruct_2ehpp',['is_constant_struct.hpp',['../is__constant__struct_8hpp.html',1,'']]], + ['is_5ffvar_2ehpp',['is_fvar.hpp',['../prim_2scal_2meta_2is__fvar_8hpp.html',1,'']]], + ['is_5ffvar_2ehpp',['is_fvar.hpp',['../fwd_2scal_2meta_2is__fvar_8hpp.html',1,'']]], + ['is_5finf_2ehpp',['is_inf.hpp',['../rev_2scal_2fun_2is__inf_8hpp.html',1,'']]], + ['is_5finf_2ehpp',['is_inf.hpp',['../fwd_2scal_2fun_2is__inf_8hpp.html',1,'']]], + ['is_5finf_2ehpp',['is_inf.hpp',['../prim_2scal_2fun_2is__inf_8hpp.html',1,'']]], + ['is_5fnan_2ehpp',['is_nan.hpp',['../rev_2scal_2fun_2is__nan_8hpp.html',1,'']]], + ['is_5fnan_2ehpp',['is_nan.hpp',['../fwd_2scal_2fun_2is__nan_8hpp.html',1,'']]], + ['is_5fnan_2ehpp',['is_nan.hpp',['../prim_2scal_2fun_2is__nan_8hpp.html',1,'']]], + ['is_5funinitialized_2ehpp',['is_uninitialized.hpp',['../prim_2scal_2fun_2is__uninitialized_8hpp.html',1,'']]], + ['is_5funinitialized_2ehpp',['is_uninitialized.hpp',['../rev_2scal_2fun_2is__uninitialized_8hpp.html',1,'']]], + ['is_5fvar_2ehpp',['is_var.hpp',['../prim_2scal_2meta_2is__var_8hpp.html',1,'']]], + ['is_5fvar_2ehpp',['is_var.hpp',['../rev_2scal_2meta_2is__var_8hpp.html',1,'']]], + ['is_5fvar_5for_5farithmetic_2ehpp',['is_var_or_arithmetic.hpp',['../is__var__or__arithmetic_8hpp.html',1,'']]], + ['is_5fvector_2ehpp',['is_vector.hpp',['../scal_2meta_2is__vector_8hpp.html',1,'']]], + ['is_5fvector_2ehpp',['is_vector.hpp',['../arr_2meta_2is__vector_8hpp.html',1,'']]], + ['is_5fvector_2ehpp',['is_vector.hpp',['../mat_2meta_2is__vector_8hpp.html',1,'']]], + ['is_5fvector_5flike_2ehpp',['is_vector_like.hpp',['../scal_2meta_2is__vector__like_8hpp.html',1,'']]], + ['is_5fvector_5flike_2ehpp',['is_vector_like.hpp',['../mat_2meta_2is__vector__like_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/files_9.html b/doc/api/html/search/files_9.html new file mode 100644 index 00000000000..00a520120ce --- /dev/null +++ b/doc/api/html/search/files_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/files_9.js b/doc/api/html/search/files_9.js new file mode 100644 index 00000000000..1dd13774d67 --- /dev/null +++ b/doc/api/html/search/files_9.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['jacobian_2ehpp',['jacobian.hpp',['../fwd_2mat_2functor_2jacobian_8hpp.html',1,'']]], + ['jacobian_2ehpp',['jacobian.hpp',['../rev_2mat_2functor_2jacobian_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/files_a.html b/doc/api/html/search/files_a.html new file mode 100644 index 00000000000..ab047558cce --- /dev/null +++ b/doc/api/html/search/files_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/files_a.js b/doc/api/html/search/files_a.js new file mode 100644 index 00000000000..f1d9d55bbec --- /dev/null +++ b/doc/api/html/search/files_a.js @@ -0,0 +1,104 @@ +var searchData= +[ + ['lb_5fconstrain_2ehpp',['lb_constrain.hpp',['../lb__constrain_8hpp.html',1,'']]], + ['lb_5ffree_2ehpp',['lb_free.hpp',['../lb__free_8hpp.html',1,'']]], + ['lbeta_2ehpp',['lbeta.hpp',['../fwd_2scal_2fun_2lbeta_8hpp.html',1,'']]], + ['lbeta_2ehpp',['lbeta.hpp',['../prim_2scal_2fun_2lbeta_8hpp.html',1,'']]], + ['ldlt_5falloc_2ehpp',['LDLT_alloc.hpp',['../_l_d_l_t__alloc_8hpp.html',1,'']]], + ['ldlt_5ffactor_2ehpp',['LDLT_factor.hpp',['../rev_2mat_2fun_2_l_d_l_t__factor_8hpp.html',1,'']]], + ['ldlt_5ffactor_2ehpp',['LDLT_factor.hpp',['../prim_2mat_2fun_2_l_d_l_t__factor_8hpp.html',1,'']]], + ['length_2ehpp',['length.hpp',['../scal_2meta_2length_8hpp.html',1,'']]], + ['length_2ehpp',['length.hpp',['../arr_2meta_2length_8hpp.html',1,'']]], + ['length_2ehpp',['length.hpp',['../mat_2meta_2length_8hpp.html',1,'']]], + ['length_5fmvt_2ehpp',['length_mvt.hpp',['../length__mvt_8hpp.html',1,'']]], + ['lgamma_2ehpp',['lgamma.hpp',['../fwd_2scal_2fun_2lgamma_8hpp.html',1,'']]], + ['lgamma_2ehpp',['lgamma.hpp',['../prim_2scal_2fun_2lgamma_8hpp.html',1,'']]], + ['lgamma_2ehpp',['lgamma.hpp',['../rev_2scal_2fun_2lgamma_8hpp.html',1,'']]], + ['likely_2ehpp',['likely.hpp',['../likely_8hpp.html',1,'']]], + ['lkj_5fcorr_5fcholesky_5flog_2ehpp',['lkj_corr_cholesky_log.hpp',['../lkj__corr__cholesky__log_8hpp.html',1,'']]], + ['lkj_5fcorr_5fcholesky_5frng_2ehpp',['lkj_corr_cholesky_rng.hpp',['../lkj__corr__cholesky__rng_8hpp.html',1,'']]], + ['lkj_5fcorr_5flog_2ehpp',['lkj_corr_log.hpp',['../lkj__corr__log_8hpp.html',1,'']]], + ['lkj_5fcorr_5frng_2ehpp',['lkj_corr_rng.hpp',['../lkj__corr__rng_8hpp.html',1,'']]], + ['lkj_5fcov_5flog_2ehpp',['lkj_cov_log.hpp',['../lkj__cov__log_8hpp.html',1,'']]], + ['lmgamma_2ehpp',['lmgamma.hpp',['../fwd_2scal_2fun_2lmgamma_8hpp.html',1,'']]], + ['lmgamma_2ehpp',['lmgamma.hpp',['../prim_2scal_2fun_2lmgamma_8hpp.html',1,'']]], + ['lmgamma_2ehpp',['lmgamma.hpp',['../rev_2scal_2fun_2lmgamma_8hpp.html',1,'']]], + ['log_2ehpp',['log.hpp',['../prim_2mat_2fun_2log_8hpp.html',1,'']]], + ['log_2ehpp',['log.hpp',['../rev_2scal_2fun_2log_8hpp.html',1,'']]], + ['log_2ehpp',['log.hpp',['../fwd_2scal_2fun_2log_8hpp.html',1,'']]], + ['log10_2ehpp',['log10.hpp',['../fwd_2scal_2fun_2log10_8hpp.html',1,'']]], + ['log10_2ehpp',['log10.hpp',['../rev_2scal_2fun_2log10_8hpp.html',1,'']]], + ['log1m_2ehpp',['log1m.hpp',['../fwd_2scal_2fun_2log1m_8hpp.html',1,'']]], + ['log1m_2ehpp',['log1m.hpp',['../rev_2scal_2fun_2log1m_8hpp.html',1,'']]], + ['log1m_2ehpp',['log1m.hpp',['../prim_2scal_2fun_2log1m_8hpp.html',1,'']]], + ['log1m_5fexp_2ehpp',['log1m_exp.hpp',['../fwd_2scal_2fun_2log1m__exp_8hpp.html',1,'']]], + ['log1m_5fexp_2ehpp',['log1m_exp.hpp',['../prim_2scal_2fun_2log1m__exp_8hpp.html',1,'']]], + ['log1m_5fexp_2ehpp',['log1m_exp.hpp',['../rev_2scal_2fun_2log1m__exp_8hpp.html',1,'']]], + ['log1m_5finv_5flogit_2ehpp',['log1m_inv_logit.hpp',['../fwd_2scal_2fun_2log1m__inv__logit_8hpp.html',1,'']]], + ['log1m_5finv_5flogit_2ehpp',['log1m_inv_logit.hpp',['../prim_2scal_2fun_2log1m__inv__logit_8hpp.html',1,'']]], + ['log1p_2ehpp',['log1p.hpp',['../fwd_2scal_2fun_2log1p_8hpp.html',1,'']]], + ['log1p_2ehpp',['log1p.hpp',['../prim_2scal_2fun_2log1p_8hpp.html',1,'']]], + ['log1p_2ehpp',['log1p.hpp',['../rev_2scal_2fun_2log1p_8hpp.html',1,'']]], + ['log1p_5fexp_2ehpp',['log1p_exp.hpp',['../fwd_2scal_2fun_2log1p__exp_8hpp.html',1,'']]], + ['log1p_5fexp_2ehpp',['log1p_exp.hpp',['../prim_2scal_2fun_2log1p__exp_8hpp.html',1,'']]], + ['log1p_5fexp_2ehpp',['log1p_exp.hpp',['../rev_2scal_2fun_2log1p__exp_8hpp.html',1,'']]], + ['log2_2ehpp',['log2.hpp',['../fwd_2scal_2fun_2log2_8hpp.html',1,'']]], + ['log2_2ehpp',['log2.hpp',['../prim_2scal_2fun_2log2_8hpp.html',1,'']]], + ['log2_2ehpp',['log2.hpp',['../rev_2scal_2fun_2log2_8hpp.html',1,'']]], + ['log_5fdeterminant_2ehpp',['log_determinant.hpp',['../prim_2mat_2fun_2log__determinant_8hpp.html',1,'']]], + ['log_5fdeterminant_2ehpp',['log_determinant.hpp',['../fwd_2mat_2fun_2log__determinant_8hpp.html',1,'']]], + ['log_5fdeterminant_2ehpp',['log_determinant.hpp',['../rev_2mat_2fun_2log__determinant_8hpp.html',1,'']]], + ['log_5fdeterminant_5fldlt_2ehpp',['log_determinant_ldlt.hpp',['../prim_2mat_2fun_2log__determinant__ldlt_8hpp.html',1,'']]], + ['log_5fdeterminant_5fldlt_2ehpp',['log_determinant_ldlt.hpp',['../rev_2mat_2fun_2log__determinant__ldlt_8hpp.html',1,'']]], + ['log_5fdeterminant_5fspd_2ehpp',['log_determinant_spd.hpp',['../prim_2mat_2fun_2log__determinant__spd_8hpp.html',1,'']]], + ['log_5fdeterminant_5fspd_2ehpp',['log_determinant_spd.hpp',['../rev_2mat_2fun_2log__determinant__spd_8hpp.html',1,'']]], + ['log_5fdiff_5fexp_2ehpp',['log_diff_exp.hpp',['../fwd_2scal_2fun_2log__diff__exp_8hpp.html',1,'']]], + ['log_5fdiff_5fexp_2ehpp',['log_diff_exp.hpp',['../prim_2scal_2fun_2log__diff__exp_8hpp.html',1,'']]], + ['log_5fdiff_5fexp_2ehpp',['log_diff_exp.hpp',['../rev_2scal_2fun_2log__diff__exp_8hpp.html',1,'']]], + ['log_5ffalling_5ffactorial_2ehpp',['log_falling_factorial.hpp',['../fwd_2scal_2fun_2log__falling__factorial_8hpp.html',1,'']]], + ['log_5ffalling_5ffactorial_2ehpp',['log_falling_factorial.hpp',['../prim_2scal_2fun_2log__falling__factorial_8hpp.html',1,'']]], + ['log_5ffalling_5ffactorial_2ehpp',['log_falling_factorial.hpp',['../rev_2scal_2fun_2log__falling__factorial_8hpp.html',1,'']]], + ['log_5finv_5flogit_2ehpp',['log_inv_logit.hpp',['../fwd_2scal_2fun_2log__inv__logit_8hpp.html',1,'']]], + ['log_5finv_5flogit_2ehpp',['log_inv_logit.hpp',['../prim_2scal_2fun_2log__inv__logit_8hpp.html',1,'']]], + ['log_5fmix_2ehpp',['log_mix.hpp',['../prim_2scal_2fun_2log__mix_8hpp.html',1,'']]], + ['log_5fmix_2ehpp',['log_mix.hpp',['../fwd_2scal_2fun_2log__mix_8hpp.html',1,'']]], + ['log_5fmix_2ehpp',['log_mix.hpp',['../rev_2scal_2fun_2log__mix_8hpp.html',1,'']]], + ['log_5frising_5ffactorial_2ehpp',['log_rising_factorial.hpp',['../rev_2scal_2fun_2log__rising__factorial_8hpp.html',1,'']]], + ['log_5frising_5ffactorial_2ehpp',['log_rising_factorial.hpp',['../fwd_2scal_2fun_2log__rising__factorial_8hpp.html',1,'']]], + ['log_5frising_5ffactorial_2ehpp',['log_rising_factorial.hpp',['../prim_2scal_2fun_2log__rising__factorial_8hpp.html',1,'']]], + ['log_5fsoftmax_2ehpp',['log_softmax.hpp',['../prim_2mat_2fun_2log__softmax_8hpp.html',1,'']]], + ['log_5fsoftmax_2ehpp',['log_softmax.hpp',['../fwd_2mat_2fun_2log__softmax_8hpp.html',1,'']]], + ['log_5fsoftmax_2ehpp',['log_softmax.hpp',['../rev_2mat_2fun_2log__softmax_8hpp.html',1,'']]], + ['log_5fsum_5fexp_2ehpp',['log_sum_exp.hpp',['../rev_2mat_2fun_2log__sum__exp_8hpp.html',1,'']]], + ['log_5fsum_5fexp_2ehpp',['log_sum_exp.hpp',['../fwd_2scal_2fun_2log__sum__exp_8hpp.html',1,'']]], + ['log_5fsum_5fexp_2ehpp',['log_sum_exp.hpp',['../rev_2scal_2fun_2log__sum__exp_8hpp.html',1,'']]], + ['log_5fsum_5fexp_2ehpp',['log_sum_exp.hpp',['../prim_2arr_2fun_2log__sum__exp_8hpp.html',1,'']]], + ['log_5fsum_5fexp_2ehpp',['log_sum_exp.hpp',['../prim_2mat_2fun_2log__sum__exp_8hpp.html',1,'']]], + ['log_5fsum_5fexp_2ehpp',['log_sum_exp.hpp',['../fwd_2arr_2fun_2log__sum__exp_8hpp.html',1,'']]], + ['log_5fsum_5fexp_2ehpp',['log_sum_exp.hpp',['../fwd_2mat_2fun_2log__sum__exp_8hpp.html',1,'']]], + ['log_5fsum_5fexp_2ehpp',['log_sum_exp.hpp',['../prim_2scal_2fun_2log__sum__exp_8hpp.html',1,'']]], + ['log_5fsum_5fexp_2ehpp',['log_sum_exp.hpp',['../rev_2arr_2fun_2log__sum__exp_8hpp.html',1,'']]], + ['logical_5fand_2ehpp',['logical_and.hpp',['../logical__and_8hpp.html',1,'']]], + ['logical_5feq_2ehpp',['logical_eq.hpp',['../logical__eq_8hpp.html',1,'']]], + ['logical_5fgt_2ehpp',['logical_gt.hpp',['../logical__gt_8hpp.html',1,'']]], + ['logical_5fgte_2ehpp',['logical_gte.hpp',['../logical__gte_8hpp.html',1,'']]], + ['logical_5flt_2ehpp',['logical_lt.hpp',['../logical__lt_8hpp.html',1,'']]], + ['logical_5flte_2ehpp',['logical_lte.hpp',['../logical__lte_8hpp.html',1,'']]], + ['logical_5fnegation_2ehpp',['logical_negation.hpp',['../logical__negation_8hpp.html',1,'']]], + ['logical_5fneq_2ehpp',['logical_neq.hpp',['../logical__neq_8hpp.html',1,'']]], + ['logical_5for_2ehpp',['logical_or.hpp',['../logical__or_8hpp.html',1,'']]], + ['logistic_5fccdf_5flog_2ehpp',['logistic_ccdf_log.hpp',['../logistic__ccdf__log_8hpp.html',1,'']]], + ['logistic_5fcdf_2ehpp',['logistic_cdf.hpp',['../logistic__cdf_8hpp.html',1,'']]], + ['logistic_5fcdf_5flog_2ehpp',['logistic_cdf_log.hpp',['../logistic__cdf__log_8hpp.html',1,'']]], + ['logistic_5flog_2ehpp',['logistic_log.hpp',['../logistic__log_8hpp.html',1,'']]], + ['logistic_5frng_2ehpp',['logistic_rng.hpp',['../logistic__rng_8hpp.html',1,'']]], + ['logit_2ehpp',['logit.hpp',['../prim_2scal_2fun_2logit_8hpp.html',1,'']]], + ['logit_2ehpp',['logit.hpp',['../fwd_2scal_2fun_2logit_8hpp.html',1,'']]], + ['lognormal_5fccdf_5flog_2ehpp',['lognormal_ccdf_log.hpp',['../lognormal__ccdf__log_8hpp.html',1,'']]], + ['lognormal_5fcdf_2ehpp',['lognormal_cdf.hpp',['../lognormal__cdf_8hpp.html',1,'']]], + ['lognormal_5fcdf_5flog_2ehpp',['lognormal_cdf_log.hpp',['../lognormal__cdf__log_8hpp.html',1,'']]], + ['lognormal_5flog_2ehpp',['lognormal_log.hpp',['../lognormal__log_8hpp.html',1,'']]], + ['lognormal_5frng_2ehpp',['lognormal_rng.hpp',['../lognormal__rng_8hpp.html',1,'']]], + ['lub_5fconstrain_2ehpp',['lub_constrain.hpp',['../lub__constrain_8hpp.html',1,'']]], + ['lub_5ffree_2ehpp',['lub_free.hpp',['../lub__free_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/files_b.html b/doc/api/html/search/files_b.html new file mode 100644 index 00000000000..11010e1bf79 --- /dev/null +++ b/doc/api/html/search/files_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/files_b.js b/doc/api/html/search/files_b.js new file mode 100644 index 00000000000..37c5a908540 --- /dev/null +++ b/doc/api/html/search/files_b.js @@ -0,0 +1,60 @@ +var searchData= +[ + ['mainpage_2edox',['mainpage.dox',['../mainpage_8dox.html',1,'']]], + ['make_5fnu_2ehpp',['make_nu.hpp',['../make__nu_8hpp.html',1,'']]], + ['math_2ehpp',['math.hpp',['../math_8hpp.html',1,'']]], + ['matrix_5fnormal_5fprec_5flog_2ehpp',['matrix_normal_prec_log.hpp',['../matrix__normal__prec__log_8hpp.html',1,'']]], + ['matrix_5fvari_2ehpp',['matrix_vari.hpp',['../matrix__vari_8hpp.html',1,'']]], + ['max_2ehpp',['max.hpp',['../max_8hpp.html',1,'']]], + ['max_5fsize_2ehpp',['max_size.hpp',['../max__size_8hpp.html',1,'']]], + ['max_5fsize_5fmvt_2ehpp',['max_size_mvt.hpp',['../max__size__mvt_8hpp.html',1,'']]], + ['mdivide_5fleft_2ehpp',['mdivide_left.hpp',['../prim_2mat_2fun_2mdivide__left_8hpp.html',1,'']]], + ['mdivide_5fleft_2ehpp',['mdivide_left.hpp',['../rev_2mat_2fun_2mdivide__left_8hpp.html',1,'']]], + ['mdivide_5fleft_2ehpp',['mdivide_left.hpp',['../fwd_2mat_2fun_2mdivide__left_8hpp.html',1,'']]], + ['mdivide_5fleft_5fldlt_2ehpp',['mdivide_left_ldlt.hpp',['../rev_2mat_2fun_2mdivide__left__ldlt_8hpp.html',1,'']]], + ['mdivide_5fleft_5fldlt_2ehpp',['mdivide_left_ldlt.hpp',['../fwd_2mat_2fun_2mdivide__left__ldlt_8hpp.html',1,'']]], + ['mdivide_5fleft_5fldlt_2ehpp',['mdivide_left_ldlt.hpp',['../prim_2mat_2fun_2mdivide__left__ldlt_8hpp.html',1,'']]], + ['mdivide_5fleft_5fspd_2ehpp',['mdivide_left_spd.hpp',['../prim_2mat_2fun_2mdivide__left__spd_8hpp.html',1,'']]], + ['mdivide_5fleft_5fspd_2ehpp',['mdivide_left_spd.hpp',['../rev_2mat_2fun_2mdivide__left__spd_8hpp.html',1,'']]], + ['mdivide_5fleft_5ftri_2ehpp',['mdivide_left_tri.hpp',['../prim_2mat_2fun_2mdivide__left__tri_8hpp.html',1,'']]], + ['mdivide_5fleft_5ftri_2ehpp',['mdivide_left_tri.hpp',['../rev_2mat_2fun_2mdivide__left__tri_8hpp.html',1,'']]], + ['mdivide_5fleft_5ftri_5flow_2ehpp',['mdivide_left_tri_low.hpp',['../fwd_2mat_2fun_2mdivide__left__tri__low_8hpp.html',1,'']]], + ['mdivide_5fleft_5ftri_5flow_2ehpp',['mdivide_left_tri_low.hpp',['../prim_2mat_2fun_2mdivide__left__tri__low_8hpp.html',1,'']]], + ['mdivide_5fright_2ehpp',['mdivide_right.hpp',['../fwd_2mat_2fun_2mdivide__right_8hpp.html',1,'']]], + ['mdivide_5fright_2ehpp',['mdivide_right.hpp',['../prim_2mat_2fun_2mdivide__right_8hpp.html',1,'']]], + ['mdivide_5fright_5fldlt_2ehpp',['mdivide_right_ldlt.hpp',['../mdivide__right__ldlt_8hpp.html',1,'']]], + ['mdivide_5fright_5fspd_2ehpp',['mdivide_right_spd.hpp',['../mdivide__right__spd_8hpp.html',1,'']]], + ['mdivide_5fright_5ftri_2ehpp',['mdivide_right_tri.hpp',['../mdivide__right__tri_8hpp.html',1,'']]], + ['mdivide_5fright_5ftri_5flow_2ehpp',['mdivide_right_tri_low.hpp',['../fwd_2mat_2fun_2mdivide__right__tri__low_8hpp.html',1,'']]], + ['mdivide_5fright_5ftri_5flow_2ehpp',['mdivide_right_tri_low.hpp',['../prim_2mat_2fun_2mdivide__right__tri__low_8hpp.html',1,'']]], + ['mean_2ehpp',['mean.hpp',['../mean_8hpp.html',1,'']]], + ['min_2ehpp',['min.hpp',['../min_8hpp.html',1,'']]], + ['minus_2ehpp',['minus.hpp',['../minus_8hpp.html',1,'']]], + ['modified_5fbessel_5ffirst_5fkind_2ehpp',['modified_bessel_first_kind.hpp',['../fwd_2scal_2fun_2modified__bessel__first__kind_8hpp.html',1,'']]], + ['modified_5fbessel_5ffirst_5fkind_2ehpp',['modified_bessel_first_kind.hpp',['../prim_2scal_2fun_2modified__bessel__first__kind_8hpp.html',1,'']]], + ['modified_5fbessel_5ffirst_5fkind_2ehpp',['modified_bessel_first_kind.hpp',['../rev_2scal_2fun_2modified__bessel__first__kind_8hpp.html',1,'']]], + ['modified_5fbessel_5fsecond_5fkind_2ehpp',['modified_bessel_second_kind.hpp',['../fwd_2scal_2fun_2modified__bessel__second__kind_8hpp.html',1,'']]], + ['modified_5fbessel_5fsecond_5fkind_2ehpp',['modified_bessel_second_kind.hpp',['../prim_2scal_2fun_2modified__bessel__second__kind_8hpp.html',1,'']]], + ['modified_5fbessel_5fsecond_5fkind_2ehpp',['modified_bessel_second_kind.hpp',['../rev_2scal_2fun_2modified__bessel__second__kind_8hpp.html',1,'']]], + ['modulus_2ehpp',['modulus.hpp',['../modulus_8hpp.html',1,'']]], + ['multi_5fgp_5fcholesky_5flog_2ehpp',['multi_gp_cholesky_log.hpp',['../multi__gp__cholesky__log_8hpp.html',1,'']]], + ['multi_5fgp_5flog_2ehpp',['multi_gp_log.hpp',['../multi__gp__log_8hpp.html',1,'']]], + ['multi_5fnormal_5fcholesky_5flog_2ehpp',['multi_normal_cholesky_log.hpp',['../multi__normal__cholesky__log_8hpp.html',1,'']]], + ['multi_5fnormal_5fcholesky_5frng_2ehpp',['multi_normal_cholesky_rng.hpp',['../multi__normal__cholesky__rng_8hpp.html',1,'']]], + ['multi_5fnormal_5flog_2ehpp',['multi_normal_log.hpp',['../multi__normal__log_8hpp.html',1,'']]], + ['multi_5fnormal_5fprec_5flog_2ehpp',['multi_normal_prec_log.hpp',['../multi__normal__prec__log_8hpp.html',1,'']]], + ['multi_5fnormal_5frng_2ehpp',['multi_normal_rng.hpp',['../multi__normal__rng_8hpp.html',1,'']]], + ['multi_5fstudent_5ft_5flog_2ehpp',['multi_student_t_log.hpp',['../multi__student__t__log_8hpp.html',1,'']]], + ['multi_5fstudent_5ft_5frng_2ehpp',['multi_student_t_rng.hpp',['../multi__student__t__rng_8hpp.html',1,'']]], + ['multinomial_5flog_2ehpp',['multinomial_log.hpp',['../multinomial__log_8hpp.html',1,'']]], + ['multinomial_5frng_2ehpp',['multinomial_rng.hpp',['../multinomial__rng_8hpp.html',1,'']]], + ['multiply_2ehpp',['multiply.hpp',['../rev_2mat_2fun_2multiply_8hpp.html',1,'']]], + ['multiply_2ehpp',['multiply.hpp',['../fwd_2mat_2fun_2multiply_8hpp.html',1,'']]], + ['multiply_2ehpp',['multiply.hpp',['../prim_2mat_2fun_2multiply_8hpp.html',1,'']]], + ['multiply_5flog_2ehpp',['multiply_log.hpp',['../rev_2scal_2fun_2multiply__log_8hpp.html',1,'']]], + ['multiply_5flog_2ehpp',['multiply_log.hpp',['../fwd_2scal_2fun_2multiply__log_8hpp.html',1,'']]], + ['multiply_5flog_2ehpp',['multiply_log.hpp',['../prim_2scal_2fun_2multiply__log_8hpp.html',1,'']]], + ['multiply_5flower_5ftri_5fself_5ftranspose_2ehpp',['multiply_lower_tri_self_transpose.hpp',['../rev_2mat_2fun_2multiply__lower__tri__self__transpose_8hpp.html',1,'']]], + ['multiply_5flower_5ftri_5fself_5ftranspose_2ehpp',['multiply_lower_tri_self_transpose.hpp',['../prim_2mat_2fun_2multiply__lower__tri__self__transpose_8hpp.html',1,'']]], + ['multiply_5flower_5ftri_5fself_5ftranspose_2ehpp',['multiply_lower_tri_self_transpose.hpp',['../fwd_2mat_2fun_2multiply__lower__tri__self__transpose_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/files_c.html b/doc/api/html/search/files_c.html new file mode 100644 index 00000000000..6fbd1357c0e --- /dev/null +++ b/doc/api/html/search/files_c.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/files_c.js b/doc/api/html/search/files_c.js new file mode 100644 index 00000000000..58c1bd7064e --- /dev/null +++ b/doc/api/html/search/files_c.js @@ -0,0 +1,22 @@ +var searchData= +[ + ['neg_5fbinomial_5f2_5fccdf_5flog_2ehpp',['neg_binomial_2_ccdf_log.hpp',['../neg__binomial__2__ccdf__log_8hpp.html',1,'']]], + ['neg_5fbinomial_5f2_5fcdf_2ehpp',['neg_binomial_2_cdf.hpp',['../neg__binomial__2__cdf_8hpp.html',1,'']]], + ['neg_5fbinomial_5f2_5fcdf_5flog_2ehpp',['neg_binomial_2_cdf_log.hpp',['../neg__binomial__2__cdf__log_8hpp.html',1,'']]], + ['neg_5fbinomial_5f2_5flog_2ehpp',['neg_binomial_2_log.hpp',['../neg__binomial__2__log_8hpp.html',1,'']]], + ['neg_5fbinomial_5f2_5flog_5flog_2ehpp',['neg_binomial_2_log_log.hpp',['../neg__binomial__2__log__log_8hpp.html',1,'']]], + ['neg_5fbinomial_5f2_5flog_5frng_2ehpp',['neg_binomial_2_log_rng.hpp',['../neg__binomial__2__log__rng_8hpp.html',1,'']]], + ['neg_5fbinomial_5f2_5frng_2ehpp',['neg_binomial_2_rng.hpp',['../neg__binomial__2__rng_8hpp.html',1,'']]], + ['neg_5fbinomial_5fccdf_5flog_2ehpp',['neg_binomial_ccdf_log.hpp',['../neg__binomial__ccdf__log_8hpp.html',1,'']]], + ['neg_5fbinomial_5fcdf_2ehpp',['neg_binomial_cdf.hpp',['../neg__binomial__cdf_8hpp.html',1,'']]], + ['neg_5fbinomial_5fcdf_5flog_2ehpp',['neg_binomial_cdf_log.hpp',['../neg__binomial__cdf__log_8hpp.html',1,'']]], + ['neg_5fbinomial_5flog_2ehpp',['neg_binomial_log.hpp',['../neg__binomial__log_8hpp.html',1,'']]], + ['neg_5fbinomial_5frng_2ehpp',['neg_binomial_rng.hpp',['../neg__binomial__rng_8hpp.html',1,'']]], + ['nested_5fsize_2ehpp',['nested_size.hpp',['../nested__size_8hpp.html',1,'']]], + ['normal_5fccdf_5flog_2ehpp',['normal_ccdf_log.hpp',['../normal__ccdf__log_8hpp.html',1,'']]], + ['normal_5fcdf_2ehpp',['normal_cdf.hpp',['../normal__cdf_8hpp.html',1,'']]], + ['normal_5fcdf_5flog_2ehpp',['normal_cdf_log.hpp',['../normal__cdf__log_8hpp.html',1,'']]], + ['normal_5flog_2ehpp',['normal_log.hpp',['../normal__log_8hpp.html',1,'']]], + ['normal_5frng_2ehpp',['normal_rng.hpp',['../normal__rng_8hpp.html',1,'']]], + ['num_5felements_2ehpp',['num_elements.hpp',['../num__elements_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/files_d.html b/doc/api/html/search/files_d.html new file mode 100644 index 00000000000..1201a33c105 --- /dev/null +++ b/doc/api/html/search/files_d.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/files_d.js b/doc/api/html/search/files_d.js new file mode 100644 index 00000000000..c31627e04f6 --- /dev/null +++ b/doc/api/html/search/files_d.js @@ -0,0 +1,42 @@ +var searchData= +[ + ['operandsandpartials_2ehpp',['OperandsAndPartials.hpp',['../_operands_and_partials_8hpp.html',1,'']]], + ['operator_5faddition_2ehpp',['operator_addition.hpp',['../rev_2core_2operator__addition_8hpp.html',1,'']]], + ['operator_5faddition_2ehpp',['operator_addition.hpp',['../fwd_2core_2operator__addition_8hpp.html',1,'']]], + ['operator_5fdivide_5fequal_2ehpp',['operator_divide_equal.hpp',['../operator__divide__equal_8hpp.html',1,'']]], + ['operator_5fdivision_2ehpp',['operator_division.hpp',['../rev_2core_2operator__division_8hpp.html',1,'']]], + ['operator_5fdivision_2ehpp',['operator_division.hpp',['../fwd_2core_2operator__division_8hpp.html',1,'']]], + ['operator_5fequal_2ehpp',['operator_equal.hpp',['../fwd_2core_2operator__equal_8hpp.html',1,'']]], + ['operator_5fequal_2ehpp',['operator_equal.hpp',['../rev_2core_2operator__equal_8hpp.html',1,'']]], + ['operator_5fgreater_5fthan_2ehpp',['operator_greater_than.hpp',['../rev_2core_2operator__greater__than_8hpp.html',1,'']]], + ['operator_5fgreater_5fthan_2ehpp',['operator_greater_than.hpp',['../fwd_2core_2operator__greater__than_8hpp.html',1,'']]], + ['operator_5fgreater_5fthan_5for_5fequal_2ehpp',['operator_greater_than_or_equal.hpp',['../fwd_2core_2operator__greater__than__or__equal_8hpp.html',1,'']]], + ['operator_5fgreater_5fthan_5for_5fequal_2ehpp',['operator_greater_than_or_equal.hpp',['../rev_2core_2operator__greater__than__or__equal_8hpp.html',1,'']]], + ['operator_5fless_5fthan_2ehpp',['operator_less_than.hpp',['../fwd_2core_2operator__less__than_8hpp.html',1,'']]], + ['operator_5fless_5fthan_2ehpp',['operator_less_than.hpp',['../rev_2core_2operator__less__than_8hpp.html',1,'']]], + ['operator_5fless_5fthan_5for_5fequal_2ehpp',['operator_less_than_or_equal.hpp',['../fwd_2core_2operator__less__than__or__equal_8hpp.html',1,'']]], + ['operator_5fless_5fthan_5for_5fequal_2ehpp',['operator_less_than_or_equal.hpp',['../rev_2core_2operator__less__than__or__equal_8hpp.html',1,'']]], + ['operator_5fminus_5fequal_2ehpp',['operator_minus_equal.hpp',['../operator__minus__equal_8hpp.html',1,'']]], + ['operator_5fmultiplication_2ehpp',['operator_multiplication.hpp',['../rev_2core_2operator__multiplication_8hpp.html',1,'']]], + ['operator_5fmultiplication_2ehpp',['operator_multiplication.hpp',['../fwd_2core_2operator__multiplication_8hpp.html',1,'']]], + ['operator_5fmultiply_5fequal_2ehpp',['operator_multiply_equal.hpp',['../operator__multiply__equal_8hpp.html',1,'']]], + ['operator_5fnot_5fequal_2ehpp',['operator_not_equal.hpp',['../fwd_2core_2operator__not__equal_8hpp.html',1,'']]], + ['operator_5fnot_5fequal_2ehpp',['operator_not_equal.hpp',['../rev_2core_2operator__not__equal_8hpp.html',1,'']]], + ['operator_5fplus_5fequal_2ehpp',['operator_plus_equal.hpp',['../operator__plus__equal_8hpp.html',1,'']]], + ['operator_5fsubtraction_2ehpp',['operator_subtraction.hpp',['../fwd_2core_2operator__subtraction_8hpp.html',1,'']]], + ['operator_5fsubtraction_2ehpp',['operator_subtraction.hpp',['../rev_2core_2operator__subtraction_8hpp.html',1,'']]], + ['operator_5funary_5fdecrement_2ehpp',['operator_unary_decrement.hpp',['../operator__unary__decrement_8hpp.html',1,'']]], + ['operator_5funary_5fincrement_2ehpp',['operator_unary_increment.hpp',['../operator__unary__increment_8hpp.html',1,'']]], + ['operator_5funary_5fminus_2ehpp',['operator_unary_minus.hpp',['../operator__unary__minus_8hpp.html',1,'']]], + ['operator_5funary_5fnegative_2ehpp',['operator_unary_negative.hpp',['../operator__unary__negative_8hpp.html',1,'']]], + ['operator_5funary_5fnot_2ehpp',['operator_unary_not.hpp',['../operator__unary__not_8hpp.html',1,'']]], + ['operator_5funary_5fplus_2ehpp',['operator_unary_plus.hpp',['../operator__unary__plus_8hpp.html',1,'']]], + ['ordered_5fconstrain_2ehpp',['ordered_constrain.hpp',['../ordered__constrain_8hpp.html',1,'']]], + ['ordered_5ffree_2ehpp',['ordered_free.hpp',['../ordered__free_8hpp.html',1,'']]], + ['ordered_5flogistic_5flog_2ehpp',['ordered_logistic_log.hpp',['../ordered__logistic__log_8hpp.html',1,'']]], + ['ordered_5flogistic_5frng_2ehpp',['ordered_logistic_rng.hpp',['../ordered__logistic__rng_8hpp.html',1,'']]], + ['out_5fof_5frange_2ehpp',['out_of_range.hpp',['../out__of__range_8hpp.html',1,'']]], + ['owens_5ft_2ehpp',['owens_t.hpp',['../fwd_2scal_2fun_2owens__t_8hpp.html',1,'']]], + ['owens_5ft_2ehpp',['owens_t.hpp',['../prim_2scal_2fun_2owens__t_8hpp.html',1,'']]], + ['owens_5ft_2ehpp',['owens_t.hpp',['../rev_2scal_2fun_2owens__t_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/files_e.html b/doc/api/html/search/files_e.html new file mode 100644 index 00000000000..2d919977de0 --- /dev/null +++ b/doc/api/html/search/files_e.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/files_e.js b/doc/api/html/search/files_e.js new file mode 100644 index 00000000000..5c5c108d718 --- /dev/null +++ b/doc/api/html/search/files_e.js @@ -0,0 +1,53 @@ +var searchData= +[ + ['pareto_5fccdf_5flog_2ehpp',['pareto_ccdf_log.hpp',['../pareto__ccdf__log_8hpp.html',1,'']]], + ['pareto_5fcdf_2ehpp',['pareto_cdf.hpp',['../pareto__cdf_8hpp.html',1,'']]], + ['pareto_5fcdf_5flog_2ehpp',['pareto_cdf_log.hpp',['../pareto__cdf__log_8hpp.html',1,'']]], + ['pareto_5flog_2ehpp',['pareto_log.hpp',['../pareto__log_8hpp.html',1,'']]], + ['pareto_5frng_2ehpp',['pareto_rng.hpp',['../pareto__rng_8hpp.html',1,'']]], + ['pareto_5ftype_5f2_5fccdf_5flog_2ehpp',['pareto_type_2_ccdf_log.hpp',['../pareto__type__2__ccdf__log_8hpp.html',1,'']]], + ['pareto_5ftype_5f2_5fcdf_2ehpp',['pareto_type_2_cdf.hpp',['../pareto__type__2__cdf_8hpp.html',1,'']]], + ['pareto_5ftype_5f2_5fcdf_5flog_2ehpp',['pareto_type_2_cdf_log.hpp',['../pareto__type__2__cdf__log_8hpp.html',1,'']]], + ['pareto_5ftype_5f2_5flog_2ehpp',['pareto_type_2_log.hpp',['../pareto__type__2__log_8hpp.html',1,'']]], + ['pareto_5ftype_5f2_5frng_2ehpp',['pareto_type_2_rng.hpp',['../pareto__type__2__rng_8hpp.html',1,'']]], + ['partial_5fderivative_2ehpp',['partial_derivative.hpp',['../partial__derivative_8hpp.html',1,'']]], + ['partials_5freturn_5ftype_2ehpp',['partials_return_type.hpp',['../partials__return__type_8hpp.html',1,'']]], + ['partials_5ftype_2ehpp',['partials_type.hpp',['../prim_2scal_2meta_2partials__type_8hpp.html',1,'']]], + ['partials_5ftype_2ehpp',['partials_type.hpp',['../rev_2scal_2meta_2partials__type_8hpp.html',1,'']]], + ['partials_5ftype_2ehpp',['partials_type.hpp',['../fwd_2scal_2meta_2partials__type_8hpp.html',1,'']]], + ['phi_2ehpp',['Phi.hpp',['../prim_2scal_2fun_2_phi_8hpp.html',1,'']]], + ['phi_2ehpp',['Phi.hpp',['../fwd_2scal_2fun_2_phi_8hpp.html',1,'']]], + ['phi_2ehpp',['Phi.hpp',['../rev_2scal_2fun_2_phi_8hpp.html',1,'']]], + ['phi_5fapprox_2ehpp',['Phi_approx.hpp',['../prim_2scal_2fun_2_phi__approx_8hpp.html',1,'']]], + ['phi_5fapprox_2ehpp',['Phi_approx.hpp',['../rev_2scal_2fun_2_phi__approx_8hpp.html',1,'']]], + ['poisson_5fccdf_5flog_2ehpp',['poisson_ccdf_log.hpp',['../poisson__ccdf__log_8hpp.html',1,'']]], + ['poisson_5fcdf_2ehpp',['poisson_cdf.hpp',['../poisson__cdf_8hpp.html',1,'']]], + ['poisson_5fcdf_5flog_2ehpp',['poisson_cdf_log.hpp',['../poisson__cdf__log_8hpp.html',1,'']]], + ['poisson_5flog_2ehpp',['poisson_log.hpp',['../poisson__log_8hpp.html',1,'']]], + ['poisson_5flog_5flog_2ehpp',['poisson_log_log.hpp',['../poisson__log__log_8hpp.html',1,'']]], + ['poisson_5flog_5frng_2ehpp',['poisson_log_rng.hpp',['../poisson__log__rng_8hpp.html',1,'']]], + ['poisson_5frng_2ehpp',['poisson_rng.hpp',['../poisson__rng_8hpp.html',1,'']]], + ['positive_5fconstrain_2ehpp',['positive_constrain.hpp',['../positive__constrain_8hpp.html',1,'']]], + ['positive_5ffree_2ehpp',['positive_free.hpp',['../positive__free_8hpp.html',1,'']]], + ['positive_5fordered_5fconstrain_2ehpp',['positive_ordered_constrain.hpp',['../positive__ordered__constrain_8hpp.html',1,'']]], + ['positive_5fordered_5ffree_2ehpp',['positive_ordered_free.hpp',['../positive__ordered__free_8hpp.html',1,'']]], + ['pow_2ehpp',['pow.hpp',['../fwd_2scal_2fun_2pow_8hpp.html',1,'']]], + ['pow_2ehpp',['pow.hpp',['../rev_2scal_2fun_2pow_8hpp.html',1,'']]], + ['precomp_5fv_5fvari_2ehpp',['precomp_v_vari.hpp',['../precomp__v__vari_8hpp.html',1,'']]], + ['precomp_5fvv_5fvari_2ehpp',['precomp_vv_vari.hpp',['../precomp__vv__vari_8hpp.html',1,'']]], + ['precomp_5fvvv_5fvari_2ehpp',['precomp_vvv_vari.hpp',['../precomp__vvv__vari_8hpp.html',1,'']]], + ['precomputed_5fgradients_2ehpp',['precomputed_gradients.hpp',['../precomputed__gradients_8hpp.html',1,'']]], + ['primitive_5fvalue_2ehpp',['primitive_value.hpp',['../rev_2scal_2fun_2primitive__value_8hpp.html',1,'']]], + ['primitive_5fvalue_2ehpp',['primitive_value.hpp',['../prim_2scal_2fun_2primitive__value_8hpp.html',1,'']]], + ['primitive_5fvalue_2ehpp',['primitive_value.hpp',['../fwd_2scal_2fun_2primitive__value_8hpp.html',1,'']]], + ['print_5fstack_2ehpp',['print_stack.hpp',['../print__stack_8hpp.html',1,'']]], + ['prob_5fconstrain_2ehpp',['prob_constrain.hpp',['../prob__constrain_8hpp.html',1,'']]], + ['prob_5ffree_2ehpp',['prob_free.hpp',['../prob__free_8hpp.html',1,'']]], + ['prod_2ehpp',['prod.hpp',['../prod_8hpp.html',1,'']]], + ['promote_5fcommon_2ehpp',['promote_common.hpp',['../promote__common_8hpp.html',1,'']]], + ['promote_5fscalar_2ehpp',['promote_scalar.hpp',['../scal_2fun_2promote__scalar_8hpp.html',1,'']]], + ['promote_5fscalar_2ehpp',['promote_scalar.hpp',['../mat_2fun_2promote__scalar_8hpp.html',1,'']]], + ['promote_5fscalar_5ftype_2ehpp',['promote_scalar_type.hpp',['../mat_2fun_2promote__scalar__type_8hpp.html',1,'']]], + ['promote_5fscalar_5ftype_2ehpp',['promote_scalar_type.hpp',['../scal_2fun_2promote__scalar__type_8hpp.html',1,'']]], + ['promoter_2ehpp',['promoter.hpp',['../promoter_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/files_f.html b/doc/api/html/search/files_f.html new file mode 100644 index 00000000000..95985b3d18b --- /dev/null +++ b/doc/api/html/search/files_f.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/files_f.js b/doc/api/html/search/files_f.js new file mode 100644 index 00000000000..01a6945ac40 --- /dev/null +++ b/doc/api/html/search/files_f.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['qr_5fq_2ehpp',['qr_Q.hpp',['../fwd_2mat_2fun_2qr___q_8hpp.html',1,'']]], + ['qr_5fq_2ehpp',['qr_Q.hpp',['../prim_2mat_2fun_2qr___q_8hpp.html',1,'']]], + ['qr_5fr_2ehpp',['qr_R.hpp',['../prim_2mat_2fun_2qr___r_8hpp.html',1,'']]], + ['qr_5fr_2ehpp',['qr_R.hpp',['../fwd_2mat_2fun_2qr___r_8hpp.html',1,'']]], + ['quad_5fform_2ehpp',['quad_form.hpp',['../rev_2mat_2fun_2quad__form_8hpp.html',1,'']]], + ['quad_5fform_2ehpp',['quad_form.hpp',['../prim_2mat_2fun_2quad__form_8hpp.html',1,'']]], + ['quad_5fform_5fdiag_2ehpp',['quad_form_diag.hpp',['../quad__form__diag_8hpp.html',1,'']]], + ['quad_5fform_5fsym_2ehpp',['quad_form_sym.hpp',['../rev_2mat_2fun_2quad__form__sym_8hpp.html',1,'']]], + ['quad_5fform_5fsym_2ehpp',['quad_form_sym.hpp',['../fwd_2mat_2fun_2quad__form__sym_8hpp.html',1,'']]], + ['quad_5fform_5fsym_2ehpp',['quad_form_sym.hpp',['../prim_2mat_2fun_2quad__form__sym_8hpp.html',1,'']]] +]; diff --git a/doc/api/html/search/functions_0.html b/doc/api/html/search/functions_0.html new file mode 100644 index 00000000000..16a5a527a80 --- /dev/null +++ b/doc/api/html/search/functions_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/functions_0.js b/doc/api/html/search/functions_0.js new file mode 100644 index 00000000000..1aa50bf1d30 --- /dev/null +++ b/doc/api/html/search/functions_0.js @@ -0,0 +1,27 @@ +var searchData= +[ + ['abs',['abs',['../namespacestan_1_1math.html#ae560b842e3ed6e5939dc2177bf158265',1,'stan::math::abs(const fvar< T > &x)'],['../namespacestan_1_1math.html#aeb4764556637084eee528b45d8eaa767',1,'stan::math::abs(double x)'],['../namespacestan_1_1math.html#a971adca9c3989255ca1f9568f8e7dc93',1,'stan::math::abs(const var &a)']]], + ['accumulator',['accumulator',['../classstan_1_1math_1_1accumulator.html#afb44f3c753ac1373482e123df612a266',1,'stan::math::accumulator']]], + ['acos',['acos',['../namespacestan_1_1math.html#a6952d8c23d69dc891dbe78e7d4ea7a80',1,'stan::math::acos(const fvar< T > &x)'],['../namespacestan_1_1math.html#a5b472e155399f39ba2d7e26abb50cd7b',1,'stan::math::acos(const var &a)']]], + ['acosh',['acosh',['../namespacestan_1_1math.html#ae033720f1a26c44aa9d7fb4dcf547155',1,'stan::math::acosh(const fvar< T > &x)'],['../namespacestan_1_1math.html#a9a8d20387e255363750b779b213d734f',1,'stan::math::acosh(const var &a)']]], + ['add',['add',['../classstan_1_1math_1_1accumulator.html#af2da77a509c4e7e9c16d8a6f691a6901',1,'stan::math::accumulator::add(S x)'],['../classstan_1_1math_1_1accumulator.html#a858c109ee631e131be0d07cf98c702e4',1,'stan::math::accumulator::add(const S &x)'],['../classstan_1_1math_1_1accumulator.html#af66ce8b37f8d8af158dd38784b34d86b',1,'stan::math::accumulator::add(const Eigen::Matrix< S, R, C > &m)'],['../classstan_1_1math_1_1accumulator.html#acf91e7cb369f45142386598d552a30e2',1,'stan::math::accumulator::add(const std::vector< S > &xs)'],['../structstan_1_1math_1_1array__builder.html#a085e0190d7a41c4e33bfa9f542b1d62a',1,'stan::math::array_builder::add()'],['../namespacestan_1_1math.html#ab7092cc09ee412719d685be41a04982a',1,'stan::math::add(const Eigen::Matrix< T1, R, C > &m1, const Eigen::Matrix< T2, R, C > &m2)'],['../namespacestan_1_1math.html#a60c2f0966abaf6f80131423add52053d',1,'stan::math::add(const Eigen::Matrix< T1, R, C > &m, const T2 &c)'],['../namespacestan_1_1math.html#ac7b8d8a7b33160a0c7304efc26fb46db',1,'stan::math::add(const T1 &c, const Eigen::Matrix< T2, R, C > &m)']]], + ['add_5finitial_5fvalues',['add_initial_values',['../namespacestan_1_1math.html#a1a238bf34fdfe67aa84300d9822f34be',1,'stan::math']]], + ['add_5fsample',['add_sample',['../classstan_1_1math_1_1welford__covar__estimator.html#a48b13f8f23644e2a35c64f34ee5b97bc',1,'stan::math::welford_covar_estimator::add_sample()'],['../classstan_1_1math_1_1welford__var__estimator.html#ab06deee0c1f179a87969e2a2e76599fd',1,'stan::math::welford_var_estimator::add_sample()']]], + ['adj',['adj',['../classstan_1_1math_1_1var.html#a7366cb3fd02521783e25de7615a7d098',1,'stan::math::var']]], + ['alloc',['alloc',['../classstan_1_1math_1_1stack__alloc.html#af867f7a48394cc0422a58f0253cb6c96',1,'stan::math::stack_alloc']]], + ['alloc_5farray',['alloc_array',['../classstan_1_1math_1_1stack__alloc.html#ac00d799a98c424893745b20166cff14b',1,'stan::math::stack_alloc']]], + ['append_5fcol',['append_col',['../namespacestan_1_1math.html#a9f2aa85e5119417b44958458dd714cff',1,'stan::math::append_col(const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &B)'],['../namespacestan_1_1math.html#a10572fe52ef6b2ddbe94aa1549310289',1,'stan::math::append_col(const Eigen::Matrix< T1, 1, C1 > &A, const Eigen::Matrix< T2, 1, C2 > &B)'],['../namespacestan_1_1math.html#a1462dc3a656316092e0557cdc276f377',1,'stan::math::append_col(const Eigen::Matrix< T, R1, C1 > &A, const Eigen::Matrix< T, R2, C2 > &B)'],['../namespacestan_1_1math.html#ac5ba839958285c999e1f3bb5706bb9b6',1,'stan::math::append_col(const Eigen::Matrix< T, 1, C1 > &A, const Eigen::Matrix< T, 1, C2 > &B)']]], + ['append_5frow',['append_row',['../namespacestan_1_1math.html#aed867c5cdbb34fe1c10ad212665c8611',1,'stan::math::append_row(const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &B)'],['../namespacestan_1_1math.html#ad3ac4765524854d6b14af8def58431dc',1,'stan::math::append_row(const Eigen::Matrix< T1, R1, 1 > &A, const Eigen::Matrix< T2, R2, 1 > &B)'],['../namespacestan_1_1math.html#ae8edbdc61c53db90c4dd6039221f5a71',1,'stan::math::append_row(const Eigen::Matrix< T, R1, C1 > &A, const Eigen::Matrix< T, R2, C2 > &B)'],['../namespacestan_1_1math.html#a66107dc00c528f6d692bbde30d6af90c',1,'stan::math::append_row(const Eigen::Matrix< T, R1, 1 > &A, const Eigen::Matrix< T, R2, 1 > &B)']]], + ['apply',['apply',['../structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00-1_00-1_01_4_01_4.html#a1fb52f1fc9db8b4c3679035da9d6317e',1,'stan::math::promote_scalar_struct< T, Eigen::Matrix< S,-1,-1 > >::apply()'],['../structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00-1_01_4_01_4.html#a208f0f24a10b7711e08f5e3ce0ffec9b',1,'stan::math::promote_scalar_struct< T, Eigen::Matrix< S, 1,-1 > >::apply()'],['../structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00-1_00_011_01_4_01_4.html#a9bbd5543d696d149ab4aee5a8144fb1e',1,'stan::math::promote_scalar_struct< T, Eigen::Matrix< S,-1, 1 > >::apply()'],['../structstan_1_1math_1_1promote__scalar__struct.html#a2910fcfa6312889570ddaf88b1c3b54f',1,'stan::math::promote_scalar_struct::apply()'],['../structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_t_01_4.html#a355172d2e18fb6a97677cc7cbff473f6',1,'stan::math::promote_scalar_struct< T, T >::apply()'],['../structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4.html#a1737468cee6801ffd1d111cf2170ac17',1,'stan::math::promote_scalar_struct< T, std::vector< S > >::apply()']]], + ['array',['array',['../structstan_1_1math_1_1array__builder.html#a725410c59aa282c6b23c52fd252aa1a3',1,'stan::math::array_builder']]], + ['array_5fbuilder',['array_builder',['../structstan_1_1math_1_1array__builder.html#a8e2649b71c980137fa5d86433d2be50c',1,'stan::math::array_builder']]], + ['as_5fbool',['as_bool',['../namespacestan_1_1math.html#a3ec93b560b654740be65de81d6f348cc',1,'stan::math::as_bool(const T x)'],['../namespacestan_1_1math.html#ab7ad9c5e9f0b2f99b96133ad7a158f64',1,'stan::math::as_bool(const var &v)']]], + ['asin',['asin',['../namespacestan_1_1math.html#a1ab75d0165599717cfd1e90f7edcf250',1,'stan::math::asin(const fvar< T > &x)'],['../namespacestan_1_1math.html#ab710bf940838cc452c426597f55f74dc',1,'stan::math::asin(const var &a)']]], + ['asinh',['asinh',['../namespacestan_1_1math.html#a68af8aec6bd04b4d40e5bce59f82b97c',1,'stan::math::asinh(const fvar< T > &x)'],['../namespacestan_1_1math.html#af6d7b01cd76067a0fa8d424b4e81a4fc',1,'stan::math::asinh(const var &a)']]], + ['assign',['assign',['../namespacestan_1_1math.html#a5f394c15ea3eb97743382631f91801cf',1,'stan::math::assign(LHS &lhs, const RHS &rhs)'],['../namespacestan_1_1math.html#a5371f0f914e9b79a0700577e5557c0b7',1,'stan::math::assign(Eigen::Matrix< LHS, R1, C1 > &x, const Eigen::Matrix< RHS, R2, C2 > &y)'],['../namespacestan_1_1math.html#a0a80c719463c4e3caa03df731e2c2cb9',1,'stan::math::assign(Eigen::Matrix< LHS, R, C > &x, const Eigen::Matrix< RHS, R, C > &y)'],['../namespacestan_1_1math.html#aa4af3a90ad3b5ec1507dfc1823fdb8da',1,'stan::math::assign(Eigen::Block< LHS > x, const Eigen::Matrix< RHS, R, C > &y)'],['../namespacestan_1_1math.html#a2c6dec98c71fd478c2ee16bc274b464d',1,'stan::math::assign(std::vector< LHS > &x, const std::vector< RHS > &y)']]], + ['atan',['atan',['../namespacestan_1_1math.html#a6f0398656b862b1b2eb80145f4877b11',1,'stan::math::atan(const fvar< T > &x)'],['../namespacestan_1_1math.html#a85cb80cff5115679c25d7347ffa89c81',1,'stan::math::atan(const var &a)']]], + ['atan2',['atan2',['../namespacestan_1_1math.html#a0c4868ee5c5ab673ee54e5dce3be37f1',1,'stan::math::atan2(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#aee48dfb63f75612a566b876f59d4a8df',1,'stan::math::atan2(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a28a4864b96b98584311eea08a6ff609e',1,'stan::math::atan2(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#a32fe21eb929346e553266ceda0a97f23',1,'stan::math::atan2(const var &a, const var &b)'],['../namespacestan_1_1math.html#acf0d4eeedff1e94221e2b719d0227e25',1,'stan::math::atan2(const var &a, const double b)'],['../namespacestan_1_1math.html#a02a3681701397c99fd57d8816869b92f',1,'stan::math::atan2(const double a, const var &b)']]], + ['atanh',['atanh',['../namespacestan_1_1math.html#a9e31606b2cbc69573ec0d7693c8b2a2c',1,'stan::math::atanh(const fvar< T > &x)'],['../namespacestan_1_1math.html#a9cbf81b5222fb11c01b539fab0434bdd',1,'stan::math::atanh(const var &a)']]], + ['autocorrelation',['autocorrelation',['../namespacestan_1_1math.html#afd7c65ea100e48abc72f3c1e96fcdbe9',1,'stan::math::autocorrelation(const std::vector< T > &y, std::vector< T > &ac, Eigen::FFT< T > &fft)'],['../namespacestan_1_1math.html#a999404b2520dcd466c62c6ba3ca61f89',1,'stan::math::autocorrelation(const std::vector< T > &y, std::vector< T > &ac)']]], + ['autocovariance',['autocovariance',['../namespacestan_1_1math.html#aab515e37311a3070dbc66e69d31359a5',1,'stan::math::autocovariance(const std::vector< T > &y, std::vector< T > &acov, Eigen::FFT< T > &fft)'],['../namespacestan_1_1math.html#acdfe56505f9cbe96a18fc00f76fe79fd',1,'stan::math::autocovariance(const std::vector< T > &y, std::vector< T > &acov)']]] +]; diff --git a/doc/api/html/search/functions_1.html b/doc/api/html/search/functions_1.html new file mode 100644 index 00000000000..3b4eacfebfc --- /dev/null +++ b/doc/api/html/search/functions_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/functions_1.js b/doc/api/html/search/functions_1.js new file mode 100644 index 00000000000..8b9e99b33d1 --- /dev/null +++ b/doc/api/html/search/functions_1.js @@ -0,0 +1,31 @@ +var searchData= +[ + ['bernoulli_5fccdf_5flog',['bernoulli_ccdf_log',['../namespacestan_1_1math.html#a9d8811804a3bb9a9cd943422ce3938db',1,'stan::math']]], + ['bernoulli_5fcdf',['bernoulli_cdf',['../namespacestan_1_1math.html#a0b80aeaa1cc10d315d915aba2ddc6180',1,'stan::math']]], + ['bernoulli_5fcdf_5flog',['bernoulli_cdf_log',['../namespacestan_1_1math.html#ac569e9e067f4d61280974e9a54ac6476',1,'stan::math']]], + ['bernoulli_5flog',['bernoulli_log',['../namespacestan_1_1math.html#a3e360bb277db7a3318c1c368dbccdda8',1,'stan::math::bernoulli_log(const T_n &n, const T_prob &theta)'],['../namespacestan_1_1math.html#a075f08b1d99b150b64d851139be35894',1,'stan::math::bernoulli_log(const T_y &n, const T_prob &theta)']]], + ['bernoulli_5flogit_5flog',['bernoulli_logit_log',['../namespacestan_1_1math.html#aa9048a0a4bd452c7e797cb5a496b0b97',1,'stan::math::bernoulli_logit_log(const T_n &n, const T_prob &theta)'],['../namespacestan_1_1math.html#a193781437c0aa1a48fe48b24d9ae8130',1,'stan::math::bernoulli_logit_log(const T_n &n, const T_prob &theta)']]], + ['bernoulli_5frng',['bernoulli_rng',['../namespacestan_1_1math.html#ac46d3934578fb7346a900677a3e8c377',1,'stan::math']]], + ['bessel_5ffirst_5fkind',['bessel_first_kind',['../namespacestan_1_1math.html#a0f08e25e46df323a2429edc45d1c8954',1,'stan::math::bessel_first_kind(int v, const fvar< T > &z)'],['../namespacestan_1_1math.html#aebfb3835848bd8550192cd5e090d3b5a',1,'stan::math::bessel_first_kind(const int v, const T2 z)'],['../namespacestan_1_1math.html#a367822396d06842610b32ec1d1010944',1,'stan::math::bessel_first_kind(const int &v, const var &a)']]], + ['bessel_5fsecond_5fkind',['bessel_second_kind',['../namespacestan_1_1math.html#ab0b227eac2dd4cbc55462ecebe940294',1,'stan::math::bessel_second_kind(int v, const fvar< T > &z)'],['../namespacestan_1_1math.html#a645ce13c6454913ec39be807751604dc',1,'stan::math::bessel_second_kind(const int v, const T2 z)'],['../namespacestan_1_1math.html#a7bff905107813b205e8cf81ace301ef9',1,'stan::math::bessel_second_kind(const int &v, const var &a)']]], + ['beta_5fbinomial_5fccdf_5flog',['beta_binomial_ccdf_log',['../namespacestan_1_1math.html#ab380fecf1c6c99b602f212cbccc28a83',1,'stan::math']]], + ['beta_5fbinomial_5fcdf',['beta_binomial_cdf',['../namespacestan_1_1math.html#a6abc35510e01a52b5138a19bfedb2a3e',1,'stan::math']]], + ['beta_5fbinomial_5fcdf_5flog',['beta_binomial_cdf_log',['../namespacestan_1_1math.html#adf2c63ba04c87c46bcb0db999d955e9b',1,'stan::math']]], + ['beta_5fbinomial_5flog',['beta_binomial_log',['../namespacestan_1_1math.html#a5c2462b112bf6512c4db7c6abea6478c',1,'stan::math::beta_binomial_log(const T_n &n, const T_N &N, const T_size1 &alpha, const T_size2 &beta)'],['../namespacestan_1_1math.html#a48a71d6f54236310fba1a94b445272f3',1,'stan::math::beta_binomial_log(const T_n &n, const T_N &N, const T_size1 &alpha, const T_size2 &beta)']]], + ['beta_5fbinomial_5frng',['beta_binomial_rng',['../namespacestan_1_1math.html#ac0443ac7dbd959b40b1a958767857f5e',1,'stan::math']]], + ['beta_5fccdf_5flog',['beta_ccdf_log',['../namespacestan_1_1math.html#a625d31cf8da1c8cd2ea99af113ed6fe6',1,'stan::math']]], + ['beta_5fcdf',['beta_cdf',['../namespacestan_1_1math.html#a84beaaff122d602406a515a9dd97bb90',1,'stan::math']]], + ['beta_5fcdf_5flog',['beta_cdf_log',['../namespacestan_1_1math.html#afa87400b4ecd4bba0d10158cad4f3a8b',1,'stan::math']]], + ['beta_5flog',['beta_log',['../namespacestan_1_1math.html#a0246a55c1c14d2c7ec35a0070af63299',1,'stan::math::beta_log(const T_y &y, const T_scale_succ &alpha, const T_scale_fail &beta)'],['../namespacestan_1_1math.html#a7e5818c82697944b91b483674b14ad22',1,'stan::math::beta_log(const T_y &y, const T_scale_succ &alpha, const T_scale_fail &beta)']]], + ['beta_5frng',['beta_rng',['../namespacestan_1_1math.html#a7fa2015614535f45c2cb6d5f544643d0',1,'stan::math']]], + ['binary_5flog_5floss',['binary_log_loss',['../namespacestan_1_1math.html#ae0d069b5730083b0203812d63c6f62f3',1,'stan::math::binary_log_loss(const int y, const fvar< T > &y_hat)'],['../namespacestan_1_1math.html#add2a043f562537b8cc57bb35780ac5b5',1,'stan::math::binary_log_loss(const int y, const T y_hat)'],['../namespacestan_1_1math.html#a87b93caccb44639dea5c47f78fe6be28',1,'stan::math::binary_log_loss(const int y, const stan::math::var &y_hat)']]], + ['binomial_5fccdf_5flog',['binomial_ccdf_log',['../namespacestan_1_1math.html#a92586706a7afc2c968e0c11a9a021f8a',1,'stan::math']]], + ['binomial_5fcdf',['binomial_cdf',['../namespacestan_1_1math.html#a25ca53e4f20460de16af84337acba3f0',1,'stan::math']]], + ['binomial_5fcdf_5flog',['binomial_cdf_log',['../namespacestan_1_1math.html#a96b0617f8ad60887c84b0cd91ebe202e',1,'stan::math']]], + ['binomial_5fcoefficient_5flog',['binomial_coefficient_log',['../namespacestan_1_1math.html#ab3ae920ef2089bb1686eb51c3dc153b4',1,'stan::math::binomial_coefficient_log(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a113b2443c22c0859cc797b7c1bdea59f',1,'stan::math::binomial_coefficient_log(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#a6d6816ab0a50a160820063ffe087a826',1,'stan::math::binomial_coefficient_log(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a27dad23d38c6d5e74c65e7571c70272e',1,'stan::math::binomial_coefficient_log(const T_N N, const T_n n)']]], + ['binomial_5flog',['binomial_log',['../namespacestan_1_1math.html#a9de035dd17c118b3144a9ed9c867378f',1,'stan::math::binomial_log(const T_n &n, const T_N &N, const T_prob &theta)'],['../namespacestan_1_1math.html#a8b3409628d97b7ff020f2c0c694d8d40',1,'stan::math::binomial_log(const T_n &n, const T_N &N, const T_prob &theta)']]], + ['binomial_5flogit_5flog',['binomial_logit_log',['../namespacestan_1_1math.html#a8f5a9e223a39b11f58fe044dcb2bc7ca',1,'stan::math::binomial_logit_log(const T_n &n, const T_N &N, const T_prob &alpha)'],['../namespacestan_1_1math.html#a5378254419361dd7a0bfacf139b49401',1,'stan::math::binomial_logit_log(const T_n &n, const T_N &N, const T_prob &alpha)']]], + ['binomial_5frng',['binomial_rng',['../namespacestan_1_1math.html#aa41d355d768c2258bf999bc765382f27',1,'stan::math']]], + ['block',['block',['../namespacestan_1_1math.html#a69be3cf865daa6eca4a859f97ffaa8f7',1,'stan::math']]], + ['bytes_5fallocated',['bytes_allocated',['../classstan_1_1math_1_1stack__alloc.html#ac72fe7b15ca3086766445e2672e0b504',1,'stan::math::stack_alloc']]] +]; diff --git a/doc/api/html/search/functions_10.html b/doc/api/html/search/functions_10.html new file mode 100644 index 00000000000..52cb0d3c430 --- /dev/null +++ b/doc/api/html/search/functions_10.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/functions_10.js b/doc/api/html/search/functions_10.js new file mode 100644 index 00000000000..0df6624c9ef --- /dev/null +++ b/doc/api/html/search/functions_10.js @@ -0,0 +1,31 @@ +var searchData= +[ + ['rank',['rank',['../namespacestan_1_1math.html#a216dec01fa6146c53b9ec51c5e9dda8d',1,'stan::math::rank(const std::vector< T > &v, int s)'],['../namespacestan_1_1math.html#a4b444aaebeed885fecdbce67ae69498c',1,'stan::math::rank(const Eigen::Matrix< T, R, C > &v, int s)']]], + ['rayleigh_5fccdf_5flog',['rayleigh_ccdf_log',['../namespacestan_1_1math.html#a3ca6e149995234eee4801ea4090b34cd',1,'stan::math']]], + ['rayleigh_5fcdf',['rayleigh_cdf',['../namespacestan_1_1math.html#abca0bc173ef3459a1eac46296bcd83bc',1,'stan::math']]], + ['rayleigh_5fcdf_5flog',['rayleigh_cdf_log',['../namespacestan_1_1math.html#ae588257225777f6a33cffb2139f8a4d9',1,'stan::math']]], + ['rayleigh_5flog',['rayleigh_log',['../namespacestan_1_1math.html#a60039dc0a79268bbb0da0a715b309af9',1,'stan::math::rayleigh_log(const T_y &y, const T_scale &sigma)'],['../namespacestan_1_1math.html#a87968a836e36d11622dbe52db277f36e',1,'stan::math::rayleigh_log(const T_y &y, const T_scale &sigma)']]], + ['rayleigh_5frng',['rayleigh_rng',['../namespacestan_1_1math.html#aab42ace2560fde585011d2f3c5459139',1,'stan::math']]], + ['read_5fcorr_5fl',['read_corr_L',['../namespacestan_1_1math.html#a57f4b9ccc58d2d03aec434abb0795e41',1,'stan::math::read_corr_L(const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const size_t K)'],['../namespacestan_1_1math.html#af6d327921ea7356872f0eec002c0b032',1,'stan::math::read_corr_L(const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const size_t K, T &log_prob)']]], + ['read_5fcorr_5fmatrix',['read_corr_matrix',['../namespacestan_1_1math.html#a2510336c2dac321c32b171f8ef407a06',1,'stan::math::read_corr_matrix(const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const size_t K)'],['../namespacestan_1_1math.html#a09c8a74b36fb456b0baf2d049427487b',1,'stan::math::read_corr_matrix(const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const size_t K, T &log_prob)']]], + ['read_5fcov_5fl',['read_cov_L',['../namespacestan_1_1math.html#a34dc4b0fb00808b0d444b2c656c44c28',1,'stan::math']]], + ['read_5fcov_5fmatrix',['read_cov_matrix',['../namespacestan_1_1math.html#aecf731d715f789bfad7dbb712851c52e',1,'stan::math::read_cov_matrix(const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const Eigen::Array< T, Eigen::Dynamic, 1 > &sds, T &log_prob)'],['../namespacestan_1_1math.html#a60bca98247a2b43a06388e08eade3ea5',1,'stan::math::read_cov_matrix(const Eigen::Array< T, Eigen::Dynamic, 1 > &CPCs, const Eigen::Array< T, Eigen::Dynamic, 1 > &sds)']]], + ['recover_5fall',['recover_all',['../classstan_1_1math_1_1stack__alloc.html#af298b06ae054599532498a1ccff4caeb',1,'stan::math::stack_alloc']]], + ['recover_5fmemory',['recover_memory',['../namespacestan_1_1math.html#afe2cbb83ac9ef52296755690e61f4298',1,'stan::math']]], + ['recover_5fmemory_5fnested',['recover_memory_nested',['../namespacestan_1_1math.html#a8ebf2b2bc0f63dcb46a176b43e8b369a',1,'stan::math']]], + ['recover_5fnested',['recover_nested',['../classstan_1_1math_1_1stack__alloc.html#a9e7184bae2a2082fa7f683723379af7b',1,'stan::math::stack_alloc']]], + ['rep_5farray',['rep_array',['../namespacestan_1_1math.html#ad3d78d2735a35451f02bcd2f4da24886',1,'stan::math::rep_array(const T &x, int n)'],['../namespacestan_1_1math.html#a8edf0b7ec2ad24b1fda26a8d58513106',1,'stan::math::rep_array(const T &x, int m, int n)'],['../namespacestan_1_1math.html#a53054db4cfa6672654fbaedafbdae242',1,'stan::math::rep_array(const T &x, int k, int m, int n)']]], + ['rep_5fmatrix',['rep_matrix',['../namespacestan_1_1math.html#aacc2f4a71f9187885d1fa61a79285eec',1,'stan::math::rep_matrix(const T &x, int m, int n)'],['../namespacestan_1_1math.html#a44e90dfa0b0247bee1e9c739d5aee3b8',1,'stan::math::rep_matrix(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v, int n)'],['../namespacestan_1_1math.html#acbe06e42d623e4c975cd636d06bcd383',1,'stan::math::rep_matrix(const Eigen::Matrix< T, 1, Eigen::Dynamic > &rv, int m)']]], + ['rep_5frow_5fvector',['rep_row_vector',['../namespacestan_1_1math.html#a9320ac189d0991ef6200daed95bd3c2d',1,'stan::math']]], + ['rep_5fvector',['rep_vector',['../namespacestan_1_1math.html#a323f6ee7be13a0f7fa7cffa12204ba88',1,'stan::math']]], + ['resize',['resize',['../namespacestan_1_1math.html#a8abf3ffa6d67a158348134225c9d3090',1,'stan::math']]], + ['restart',['restart',['../classstan_1_1math_1_1welford__covar__estimator.html#a93b3b515ae3114705517faf174d72205',1,'stan::math::welford_covar_estimator::restart()'],['../classstan_1_1math_1_1welford__var__estimator.html#a8fe05482776782589809b802b12c1ce8',1,'stan::math::welford_var_estimator::restart()']]], + ['rising_5ffactorial',['rising_factorial',['../namespacestan_1_1math.html#ac5aa264060b3c4ed7954f07dc0fcf138',1,'stan::math::rising_factorial(const fvar< T > &x, const fvar< T > &n)'],['../namespacestan_1_1math.html#a60a96a3d8a0a67f4ab99175db6b4e859',1,'stan::math::rising_factorial(const fvar< T > &x, const double n)'],['../namespacestan_1_1math.html#a1964156202b850138f2accd71ff18724',1,'stan::math::rising_factorial(const double x, const fvar< T > &n)'],['../namespacestan_1_1math.html#a6db558a6d0b54bf4ea23d9f247c6fbdb',1,'stan::math::rising_factorial(const T1 x, const T2 n)'],['../namespacestan_1_1math.html#a317b1161dabe541d3011714f97684ca4',1,'stan::math::rising_factorial(const var &a, const double &b)'],['../namespacestan_1_1math.html#a4b35a50161c460ac1d885c61bd705d5a',1,'stan::math::rising_factorial(const var &a, const var &b)'],['../namespacestan_1_1math.html#ac4b13a596449384f742cc4b758c2e3b9',1,'stan::math::rising_factorial(const double &a, const var &b)']]], + ['round',['round',['../namespacestan_1_1math.html#adb73c37a4cec41a69516391a2336fb11',1,'stan::math::round(const fvar< T > &x)'],['../namespacestan_1_1math.html#ab259f70f4c7ebcdf3e032f01efb66c02',1,'stan::math::round(const var &a)']]], + ['round_5ferror',['round_error',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a04ab86a7f52d6cb23211b7db997843cf',1,'std::numeric_limits< stan::math::fvar< T > >::round_error()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#ac3591cae0c363bded19db83484c03d9e',1,'std::numeric_limits< stan::math::var >::round_error()']]], + ['row',['row',['../namespacestan_1_1math.html#ab98e74182d133e210dda425a689f2fb3',1,'stan::math']]], + ['rows',['rows',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#a1d7602fffede73ed7f9d54d480299491',1,'stan::math::LDLT_factor< T, R, C >::rows()'],['../classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4.html#ac71a0527f0d5cddaad94fe39b6d6df32',1,'stan::math::LDLT_factor< stan::math::var, R, C >::rows()'],['../namespacestan_1_1math.html#ae17fdbe8f98c5d6c887b49f99e6d4a03',1,'stan::math::rows()']]], + ['rows_5fdot_5fproduct',['rows_dot_product',['../namespacestan_1_1math.html#a060626b1758db1e659c0820f77eb7dcf',1,'stan::math::rows_dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)'],['../namespacestan_1_1math.html#aab5f5461d67d595a0c0fd720ae6cd6bd',1,'stan::math::rows_dot_product(const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)'],['../namespacestan_1_1math.html#ac6b02f2791c9c5a29811bf411e5f6e4b',1,'stan::math::rows_dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)'],['../namespacestan_1_1math.html#a6e1fb33918f8c4e61cc7709905db012c',1,'stan::math::rows_dot_product(const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)'],['../namespacestan_1_1math.html#a719a9c5d9d748a503b52d44ed4802193',1,'stan::math::rows_dot_product(const Eigen::Matrix< T1, R1, C1 > &v1, const Eigen::Matrix< T2, R2, C2 > &v2)']]], + ['rows_5fdot_5fself',['rows_dot_self',['../namespacestan_1_1math.html#a6b6208b5b257e2a7efac35e88ab93e8c',1,'stan::math::rows_dot_self(const Eigen::Matrix< fvar< T >, R, C > &x)'],['../namespacestan_1_1math.html#a1ae75387d4a15a928dfe2be6c987e2cb',1,'stan::math::rows_dot_self(const Eigen::Matrix< T, R, C > &x)']]], + ['run',['run',['../struct_eigen_1_1internal_1_1significant__decimals__default__impl_3_01stan_1_1math_1_1fvar_3_01_t_01_4_00_01false_01_4.html#a9836117e79b68d6d362a4b775195e6b4',1,'Eigen::internal::significant_decimals_default_impl< stan::math::fvar< T >, false >::run()'],['../struct_eigen_1_1internal_1_1significant__decimals__default__impl_3_01stan_1_1math_1_1var_00_01false_01_4.html#aa8848c328f6a9e8262497de032911cac',1,'Eigen::internal::significant_decimals_default_impl< stan::math::var, false >::run()'],['../struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var15f7d538e8be7d782eccb613a7b1e9bd.html#aadff6f2862e151137086d01212091225',1,'Eigen::internal::general_matrix_vector_product< Index, stan::math::var, ColMajor, ConjugateLhs, stan::math::var, ConjugateRhs >::run()'],['../struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var9294a9f65d48f87d892ffa4de3f3e667.html#a0f5111821a2c44117c26d7567ef5e8e8',1,'Eigen::internal::general_matrix_vector_product< Index, stan::math::var, RowMajor, ConjugateLhs, stan::math::var, ConjugateRhs >::run()'],['../struct_eigen_1_1internal_1_1general__matrix__matrix__product_3_01_index_00_01stan_1_1math_1_1var1562d71de7db86cb3dfb1784b090bdfc.html#ab3c2e42b333cb04d45a7c3895d92aaea',1,'Eigen::internal::general_matrix_matrix_product< Index, stan::math::var, LhsStorageOrder, ConjugateLhs, stan::math::var, RhsStorageOrder, ConjugateRhs, ColMajor >::run()']]] +]; diff --git a/doc/api/html/search/functions_11.html b/doc/api/html/search/functions_11.html new file mode 100644 index 00000000000..5e91b098a94 --- /dev/null +++ b/doc/api/html/search/functions_11.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/functions_11.js b/doc/api/html/search/functions_11.js new file mode 100644 index 00000000000..dc5d4050da7 --- /dev/null +++ b/doc/api/html/search/functions_11.js @@ -0,0 +1,61 @@ +var searchData= +[ + ['sample_5fcovariance',['sample_covariance',['../classstan_1_1math_1_1welford__covar__estimator.html#a7d3a664aac837b2448ee6e51b570616a',1,'stan::math::welford_covar_estimator']]], + ['sample_5fmean',['sample_mean',['../classstan_1_1math_1_1welford__covar__estimator.html#ab032fe95b45062bd6b7316810508b50d',1,'stan::math::welford_covar_estimator::sample_mean()'],['../classstan_1_1math_1_1welford__var__estimator.html#aeee360036653a776666878188a4a15a0',1,'stan::math::welford_var_estimator::sample_mean()']]], + ['sample_5fvariance',['sample_variance',['../classstan_1_1math_1_1welford__var__estimator.html#a9dcda25a6b3ee85b207fb2b4975faa08',1,'stan::math::welford_var_estimator']]], + ['scaled_5fadd',['scaled_add',['../namespacestan_1_1math.html#a2eb786f14699d69c39cfdd49893a8006',1,'stan::math']]], + ['scaled_5finv_5fchi_5fsquare_5fccdf_5flog',['scaled_inv_chi_square_ccdf_log',['../namespacestan_1_1math.html#a4fefbbf10f04d62902c383f26d98eaee',1,'stan::math']]], + ['scaled_5finv_5fchi_5fsquare_5fcdf',['scaled_inv_chi_square_cdf',['../namespacestan_1_1math.html#aac5ccd3b4bbd2f80b59a6cfaa2a7ebcb',1,'stan::math']]], + ['scaled_5finv_5fchi_5fsquare_5fcdf_5flog',['scaled_inv_chi_square_cdf_log',['../namespacestan_1_1math.html#a6f8d0c1c0ea0a346e972a2b461fb2b51',1,'stan::math']]], + ['scaled_5finv_5fchi_5fsquare_5flog',['scaled_inv_chi_square_log',['../namespacestan_1_1math.html#aa760eab5a913100acb5ad73851ec520f',1,'stan::math::scaled_inv_chi_square_log(const T_y &y, const T_dof &nu, const T_scale &s)'],['../namespacestan_1_1math.html#a469a0510198f66cfb4a23d9f0d185541',1,'stan::math::scaled_inv_chi_square_log(const T_y &y, const T_dof &nu, const T_scale &s)']]], + ['scaled_5finv_5fchi_5fsquare_5frng',['scaled_inv_chi_square_rng',['../namespacestan_1_1math.html#aefb144e1487af0dcab52c5f47fcbc93f',1,'stan::math']]], + ['sd',['sd',['../namespacestan_1_1math.html#a34fd02fe795ea38c98f4a02befed309f',1,'stan::math::sd(const std::vector< T > &v)'],['../namespacestan_1_1math.html#a8e1cb72c1528f0ff383033c642341147',1,'stan::math::sd(const Eigen::Matrix< T, R, C > &m)'],['../namespacestan_1_1math.html#aa6a5f3ceef72929ae7b80e83338d33f3',1,'stan::math::sd(const std::vector< var > &v)'],['../namespacestan_1_1math.html#a706c4baf534be70bbaa1cceae41da186',1,'stan::math::sd(const Eigen::Matrix< var, R, C > &m)']]], + ['segment',['segment',['../namespacestan_1_1math.html#ad87f51c66f702f242b3c5d207896f5d8',1,'stan::math::segment(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v, size_t i, size_t n)'],['../namespacestan_1_1math.html#a6068f2afa41aeec7f65229719dfda963',1,'stan::math::segment(const Eigen::Matrix< T, 1, Eigen::Dynamic > &v, size_t i, size_t n)'],['../namespacestan_1_1math.html#a721232b5c8e7c068a120719255f5fb0c',1,'stan::math::segment(const std::vector< T > &sv, size_t i, size_t n)']]], + ['seq_5fview',['seq_view',['../classstan_1_1math_1_1seq__view.html#a0c10cc8d25cff8c90c8bbecf3cd054a1',1,'stan::math::seq_view::seq_view()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_011_01_4_01_4.html#ae570c324a14b81a018475195a77e4430',1,'stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > >::seq_view()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00_01_eigen_1_1_dynamic_01_4_01_4.html#a57ab58ed09da14b8efcf83b9d1528b88',1,'stan::math::seq_view< T, Eigen::Matrix< S, 1, Eigen::Dynamic > >::seq_view()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4.html#a706e3bea5d58f77fd9d6d427e64aa370',1,'stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >::seq_view()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4.html#a42ff5c63f8f83390fc7c585b41c0d5ed',1,'stan::math::seq_view< T, std::vector< S > >::seq_view()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01_t_01_4_01_4.html#a2e9627b1092238710ed116adc7c1cab5',1,'stan::math::seq_view< T, std::vector< T > >::seq_view()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01std_1_1vector_3_01_t_01_4_01_4_01_4.html#ac35e60cb3f9e9f4dde81b8ed3b532a2b',1,'stan::math::seq_view< T, std::vector< std::vector< T > > >::seq_view()'],['../classstan_1_1math_1_1seq__view_3_01double_00_01std_1_1vector_3_01int_01_4_01_4.html#ad82423565c559cd4e889350bc204319b',1,'stan::math::seq_view< double, std::vector< int > >::seq_view()']]], + ['set_5fzero_5fadjoint',['set_zero_adjoint',['../classstan_1_1math_1_1chainable.html#ac7b3d732a6171f2b49667124f363ad6a',1,'stan::math::chainable::set_zero_adjoint()'],['../classstan_1_1math_1_1vari.html#a6b0b807eaa6c50123e23a1867795ee58',1,'stan::math::vari::set_zero_adjoint()']]], + ['set_5fzero_5fall_5fadjoints',['set_zero_all_adjoints',['../namespacestan_1_1math.html#a9614efc6fd66533b74b43ddb69f21d3b',1,'stan::math']]], + ['sign',['sign',['../namespacestan_1_1math.html#ad825f81b97ddf0b2e1217f30913559a3',1,'stan::math']]], + ['signaling_5fnan',['signaling_NaN',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a1f778384d98f2aeb1d4338ed4fb01c89',1,'std::numeric_limits< stan::math::fvar< T > >::signaling_NaN()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#abe18cd7f77ecf062347231ef1193d404',1,'std::numeric_limits< stan::math::var >::signaling_NaN()']]], + ['simplex_5fconstrain',['simplex_constrain',['../namespacestan_1_1math.html#a6341abfdbb8a7f35432a73f27b131688',1,'stan::math::simplex_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y)'],['../namespacestan_1_1math.html#a552a1c130bd90d93271bc9169b2e0ce2',1,'stan::math::simplex_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y, T &lp)']]], + ['simplex_5ffree',['simplex_free',['../namespacestan_1_1math.html#a110fab43edbb2ebb9206643900083971',1,'stan::math']]], + ['sin',['sin',['../namespacestan_1_1math.html#aff3f2dd84567a0566cfdd7eb10e13607',1,'stan::math::sin(const fvar< T > &x)'],['../namespacestan_1_1math.html#ae306538402ac590b8b84e6ed58989629',1,'stan::math::sin(const var &a)']]], + ['singular_5fvalues',['singular_values',['../namespacestan_1_1math.html#a56518b3d36f8b7ce72c9b8f4b77c8f22',1,'stan::math']]], + ['sinh',['sinh',['../namespacestan_1_1math.html#a646a34790ca2b692b2a8c74c4e4fb726',1,'stan::math::sinh(const fvar< T > &x)'],['../namespacestan_1_1math.html#a241b79300774f40a6e67b7156b494462',1,'stan::math::sinh(const var &a)']]], + ['size',['size',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html#a14cbf2d4763907cc2eb21b0465b793c4',1,'stan::math::coupled_ode_system< F, double, double >::size()'],['../classstan_1_1math_1_1seq__view.html#ab20467423ddb3b3e45513abb8e4a21d3',1,'stan::math::seq_view::size()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_011_01_4_01_4.html#a3284abfb2471ad555d43a8693658c5ec',1,'stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > >::size()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00_01_eigen_1_1_dynamic_01_4_01_4.html#a8c830a8c9c9c431a71a89cf4b996b27e',1,'stan::math::seq_view< T, Eigen::Matrix< S, 1, Eigen::Dynamic > >::size()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4.html#a07185ddaf17963a5724ddc2c62208922',1,'stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >::size()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4.html#a3a6031049d11ce5429727dcbe5e29130',1,'stan::math::seq_view< T, std::vector< S > >::size()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01_t_01_4_01_4.html#a3f616444293b86fdb17272494c88cc4c',1,'stan::math::seq_view< T, std::vector< T > >::size()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01std_1_1vector_3_01_t_01_4_01_4_01_4.html#ab81a7a5c2de89631c7aec2ab701854a1',1,'stan::math::seq_view< T, std::vector< std::vector< T > > >::size()'],['../classstan_1_1math_1_1seq__view_3_01double_00_01std_1_1vector_3_01int_01_4_01_4.html#af56447dd766a3a5a9d6c97b0a2de9563',1,'stan::math::seq_view< double, std::vector< int > >::size()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#acec587a37d9168a46a1ddd44c651dcd4',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::size()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#ada6e883cd3d290c2cf77df7a1c6940dc',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::size()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#a1ff2fd5ed7f65a31079b8ad3fa931bda',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::size()'],['../classstan_1_1math_1_1op__matrix__vari.html#a35e94de2a37b83f8a1866fd57709be4b',1,'stan::math::op_matrix_vari::size()'],['../classstan_1_1math_1_1op__vector__vari.html#a5e236b4bc3c9f0156532846d31f45c6f',1,'stan::math::op_vector_vari::size()'],['../namespacestan_1_1math.html#aa1f9966aade9c4515d33d3ffa7305462',1,'stan::math::size()']]], + ['size_5fof',['size_of',['../structstan_1_1size__of__helper.html#a8f7056983b7948acf66a2e8b3e37e855',1,'stan::size_of_helper::size_of()'],['../structstan_1_1size__of__helper_3_01_t_00_01true_01_4.html#af0810fc0270af209916e67d5defe4b7d',1,'stan::size_of_helper< T, true >::size_of()'],['../namespacestan.html#a4741beaf7ec88631fd2735cadf05365f',1,'stan::size_of()']]], + ['skew_5fnormal_5fccdf_5flog',['skew_normal_ccdf_log',['../namespacestan_1_1math.html#a764774344adc0fc192a79bb25cab62ea',1,'stan::math']]], + ['skew_5fnormal_5fcdf',['skew_normal_cdf',['../namespacestan_1_1math.html#a4619194e1d367590916fb133f99385a7',1,'stan::math']]], + ['skew_5fnormal_5fcdf_5flog',['skew_normal_cdf_log',['../namespacestan_1_1math.html#a244e671c45143752fe0d8e50dd8d64dd',1,'stan::math']]], + ['skew_5fnormal_5flog',['skew_normal_log',['../namespacestan_1_1math.html#a063fa4970b1aced1fe47505e950c5ff9',1,'stan::math::skew_normal_log(const T_y &y, const T_loc &mu, const T_scale &sigma, const T_shape &alpha)'],['../namespacestan_1_1math.html#a9f3802cc8e1abfde6592284133457854',1,'stan::math::skew_normal_log(const T_y &y, const T_loc &mu, const T_scale &sigma, const T_shape &alpha)']]], + ['skew_5fnormal_5frng',['skew_normal_rng',['../namespacestan_1_1math.html#ae20ce3e4d117da5792ace24dfc92b1ea',1,'stan::math']]], + ['softmax',['softmax',['../namespacestan_1_1math.html#a6f57ef7820025c7b350f84c3aebfe45e',1,'stan::math::softmax(const Eigen::Matrix< fvar< T >, Eigen::Dynamic, 1 > &alpha)'],['../namespacestan_1_1math.html#acd226ffb6c2a089f2e133b74b5fed2b0',1,'stan::math::softmax(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v)'],['../namespacestan_1_1math.html#a9fc994b4977baae2d53f2d0a60c77522',1,'stan::math::softmax(const Eigen::Matrix< var, Eigen::Dynamic, 1 > &alpha)']]], + ['solve',['solve',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#a0687e6e28885a9c5d0d14bc94cd41d01',1,'stan::math::LDLT_factor< T, R, C >::solve()'],['../classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4.html#a10f45f6aab48c0ffc6b4d0ad0e6c19b9',1,'stan::math::LDLT_factor< stan::math::var, R, C >::solve()']]], + ['solveright',['solveRight',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#a2e05d02dd6e5bb010b14d1fdc71cea64',1,'stan::math::LDLT_factor< T, R, C >']]], + ['sort_5fasc',['sort_asc',['../namespacestan_1_1math.html#a941784bb46a4a2fabf3deacebbd71ec5',1,'stan::math::sort_asc(std::vector< fvar< T > > xs)'],['../namespacestan_1_1math.html#a4181de091dfd2ded22cefa4df86720e6',1,'stan::math::sort_asc(Eigen::Matrix< fvar< T >, R, C > xs)'],['../namespacestan_1_1math.html#a80f5418b16ea26e9bc6d2a8f9b764897',1,'stan::math::sort_asc(std::vector< T > xs)'],['../namespacestan_1_1math.html#af9e46c9e96c0e88cc503e4b903247cce',1,'stan::math::sort_asc(Eigen::Matrix< T, R, C > xs)'],['../namespacestan_1_1math.html#a8583739553a742829c5e0b39879af0dd',1,'stan::math::sort_asc(std::vector< var > xs)'],['../namespacestan_1_1math.html#ac0391669326527e057a3f0865703b13d',1,'stan::math::sort_asc(Eigen::Matrix< var, R, C > xs)']]], + ['sort_5fdesc',['sort_desc',['../namespacestan_1_1math.html#a7c06412237c5d6879a4c07f0706303e9',1,'stan::math::sort_desc(std::vector< fvar< T > > xs)'],['../namespacestan_1_1math.html#a27e74300574eb2a6e80e0f4cb029596e',1,'stan::math::sort_desc(Eigen::Matrix< fvar< T >, R, C > xs)'],['../namespacestan_1_1math.html#ab0b2712eab9b95535c0589455ed11cfc',1,'stan::math::sort_desc(std::vector< T > xs)'],['../namespacestan_1_1math.html#a60648efc106b7596ddc356b765b6df81',1,'stan::math::sort_desc(Eigen::Matrix< T, R, C > xs)'],['../namespacestan_1_1math.html#a8cefcb10a8af1224993d04e812f74e5e',1,'stan::math::sort_desc(std::vector< var > xs)'],['../namespacestan_1_1math.html#a5d8d83ef27eeacd30d11964ce32f4186',1,'stan::math::sort_desc(Eigen::Matrix< var, R, C > xs)']]], + ['sort_5findices_5fasc',['sort_indices_asc',['../namespacestan_1_1math.html#a4a13ccb29cba05ef0daa9712ee9bf7a3',1,'stan::math']]], + ['sort_5findices_5fdesc',['sort_indices_desc',['../namespacestan_1_1math.html#a27f6f9085eb850e9e0fcb98df345aeba',1,'stan::math']]], + ['sqrt',['sqrt',['../namespacestan_1_1math.html#aa5231d132852d58cd3fe610221c9766f',1,'stan::math::sqrt(const fvar< T > &x)'],['../namespacestan_1_1math.html#ab438f4b0a11d8551fe5605237f655730',1,'stan::math::sqrt(const var &a)']]], + ['sqrt2',['sqrt2',['../namespacestan_1_1math.html#a1369f60a09e3af4933096de3a54ac28c',1,'stan::math']]], + ['square',['square',['../namespacestan_1_1math.html#ab1ed68bdfff9b340a187964ef7684091',1,'stan::math::square(const fvar< T > &x)'],['../namespacestan_1_1math.html#a056b82f11f784f321bce2c5677089e24',1,'stan::math::square(const T x)'],['../namespacestan_1_1math.html#aa1b349cd070427c412c2c0a0d32327b5',1,'stan::math::square(const var &x)']]], + ['squared_5fdistance',['squared_distance',['../namespacestan_1_1math.html#a292e430d422bfe4984f9eaa1d20840ab',1,'stan::math::squared_distance(const Eigen::Matrix< T1, R1, C1 > &v1, const Eigen::Matrix< T2, R2, C2 > &v2)'],['../namespacestan_1_1math.html#a2d2e9c8de72e19836336f70e6c03341c',1,'stan::math::squared_distance(const Eigen::Matrix< var, R1, C1 > &v1, const Eigen::Matrix< var, R2, C2 > &v2)'],['../namespacestan_1_1math.html#a57b6cfbac0ae13e4217fba5ff20ac9e4',1,'stan::math::squared_distance(const Eigen::Matrix< var, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)'],['../namespacestan_1_1math.html#aa5483c9ea2644a3b127b36f32668bbec',1,'stan::math::squared_distance(const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< var, R2, C2 > &v2)']]], + ['stack_5falloc',['stack_alloc',['../classstan_1_1math_1_1stack__alloc.html#a6008eaa183ed07fb744799103926baac',1,'stan::math::stack_alloc']]], + ['stan_5fprint',['stan_print',['../namespacestan_1_1math.html#a7c14b7fd70050f03a07fdf73a1df06d2',1,'stan::math::stan_print(std::ostream *o, const T &x)'],['../namespacestan_1_1math.html#a37cb2d874adcc950cb0439af044f549f',1,'stan::math::stan_print(std::ostream *o, const std::vector< T > &x)'],['../namespacestan_1_1math.html#ae94f7170ee85d4b353f55e3a044d2345',1,'stan::math::stan_print(std::ostream *o, const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x)'],['../namespacestan_1_1math.html#ad9c9057d71cf2795d0042f665c0f89c1',1,'stan::math::stan_print(std::ostream *o, const Eigen::Matrix< T, 1, Eigen::Dynamic > &x)'],['../namespacestan_1_1math.html#adffa61a0521d0c07b8c4cd7ccbbb4aca',1,'stan::math::stan_print(std::ostream *o, const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &x)'],['../namespacestan_1_1math.html#aab45f57a15327ae4f94a1aef0bcd869f',1,'stan::math::stan_print(std::ostream *o, const var &x)']]], + ['start_5fnested',['start_nested',['../classstan_1_1math_1_1stack__alloc.html#abdba5f8d013107c6a37f75e186bd6dfc',1,'stan::math::stack_alloc::start_nested()'],['../namespacestan_1_1math.html#ad4a72c89ed9143a7760cc3611e8a0df0',1,'stan::math::start_nested()']]], + ['step',['step',['../namespacestan_1_1math.html#a8fdc5e5ba8e306c2a594e928bfd62ea2',1,'stan::math::step(const T y)'],['../namespacestan_1_1math.html#a8a7c701333f443140d6d4bfdde5b15b3',1,'stan::math::step(const stan::math::var &a)']]], + ['stored_5fgradient_5fvari',['stored_gradient_vari',['../classstan_1_1math_1_1stored__gradient__vari.html#a9732c6c4334aea5e617476018e6ca4a5',1,'stan::math::stored_gradient_vari']]], + ['student_5ft_5fccdf_5flog',['student_t_ccdf_log',['../namespacestan_1_1math.html#aa7330bcb373ce5df4f6cedb70d4ba571',1,'stan::math']]], + ['student_5ft_5fcdf',['student_t_cdf',['../namespacestan_1_1math.html#a6c3707b197842a840217b04e3cc1b0da',1,'stan::math']]], + ['student_5ft_5fcdf_5flog',['student_t_cdf_log',['../namespacestan_1_1math.html#a0cf7b73942cfee4fec76599b966796d1',1,'stan::math']]], + ['student_5ft_5flog',['student_t_log',['../namespacestan_1_1math.html#a20962dd5b3da2477c4c2a9170904fb27',1,'stan::math::student_t_log(const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &sigma)'],['../namespacestan_1_1math.html#ab25a0e28b3bd50cfc9fb14e9f410bd3b',1,'stan::math::student_t_log(const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &sigma)']]], + ['student_5ft_5frng',['student_t_rng',['../namespacestan_1_1math.html#a4d151fedbd83f49080ef17c148ef1dad',1,'stan::math']]], + ['sub',['sub',['../namespacestan_1_1math.html#a9e4c5e5b76b18a41b28f646104b3cd46',1,'stan::math']]], + ['sub_5fcol',['sub_col',['../namespacestan_1_1math.html#a943cb439569c2dc588661a1cc171e2d2',1,'stan::math']]], + ['sub_5frow',['sub_row',['../namespacestan_1_1math.html#a019d635ee39f24b69c3f27e96bba4be1',1,'stan::math']]], + ['subtract',['subtract',['../namespacestan_1_1math.html#a38ba678d90cda4868c14d6d6bc6b509d',1,'stan::math::subtract(const Eigen::Matrix< T1, R, C > &m1, const Eigen::Matrix< T2, R, C > &m2)'],['../namespacestan_1_1math.html#a46fb2ca306088487251df70b19e73aff',1,'stan::math::subtract(const T1 &c, const Eigen::Matrix< T2, R, C > &m)'],['../namespacestan_1_1math.html#a9a8a3f79fa67648f8145c6692d19334b',1,'stan::math::subtract(const Eigen::Matrix< T1, R, C > &m, const T2 &c)']]], + ['success',['success',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#a22f6b503fe331aeeac5368b1f10eac0d',1,'stan::math::LDLT_factor< T, R, C >::success()'],['../classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4.html#a3ed28e459ba5ce68d97daf4eb0cc780e',1,'stan::math::LDLT_factor< stan::math::var, R, C >::success()']]], + ['sum',['sum',['../classstan_1_1math_1_1accumulator.html#ad24d63f81d6c3028abc73e102c60edf8',1,'stan::math::accumulator::sum()'],['../namespacestan_1_1math.html#a5e5dda5a9c244efdbd023cc01d47cbf4',1,'stan::math::sum(const std::vector< fvar< T > > &m)'],['../namespacestan_1_1math.html#a03ac5708411da911ccf11be4a5f511f5',1,'stan::math::sum(const Eigen::Matrix< fvar< T >, R, C > &m)'],['../namespacestan_1_1math.html#a1efee0b4f8879a114af50b7e9802745c',1,'stan::math::sum(const std::vector< T > &xs)'],['../namespacestan_1_1math.html#a44c32c2d7e895378feb11c99091765ad',1,'stan::math::sum(const Eigen::Matrix< T, R, C > &v)'],['../namespacestan_1_1math.html#a2538f04d0c683772fb3f46197d8c0059',1,'stan::math::sum(const std::vector< var > &m)'],['../namespacestan_1_1math.html#a1ec64f77d2621d9f1aada5a8d2e90c2b',1,'stan::math::sum(const Eigen::Matrix< var, R, C > &m)']]], + ['sum_5feigen_5fv_5fvari',['sum_eigen_v_vari',['../classstan_1_1math_1_1sum__eigen__v__vari.html#a17ea145d6335dc9a5aabe3f02c572e96',1,'stan::math::sum_eigen_v_vari']]], + ['sum_5fof_5fval',['sum_of_val',['../classstan_1_1math_1_1sum__v__vari.html#a4d9b8faedd6e0dcde4cbad57ebba2b11',1,'stan::math::sum_v_vari::sum_of_val()'],['../classstan_1_1math_1_1sum__eigen__v__vari.html#a4511b6d534c5adefb3bdf87fae8a87e6',1,'stan::math::sum_eigen_v_vari::sum_of_val()']]], + ['sum_5fv_5fvari',['sum_v_vari',['../classstan_1_1math_1_1sum__v__vari.html#ae9bf55b4be96685eaaa9bfefcbe23de9',1,'stan::math::sum_v_vari::sum_v_vari(double value, vari **v, size_t length)'],['../classstan_1_1math_1_1sum__v__vari.html#a40d6b74038464b3734839e6df9077681',1,'stan::math::sum_v_vari::sum_v_vari(const std::vector< var > &v1)']]] +]; diff --git a/doc/api/html/search/functions_12.html b/doc/api/html/search/functions_12.html new file mode 100644 index 00000000000..1ab0742ba67 --- /dev/null +++ b/doc/api/html/search/functions_12.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/functions_12.js b/doc/api/html/search/functions_12.js new file mode 100644 index 00000000000..c0faa4f3cc0 --- /dev/null +++ b/doc/api/html/search/functions_12.js @@ -0,0 +1,24 @@ +var searchData= +[ + ['tail',['tail',['../namespacestan_1_1math.html#a55548f1b502d1dd6283268b79fc41507',1,'stan::math::tail(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v, size_t n)'],['../namespacestan_1_1math.html#a7d79ddf4f28c8bd68ae569b94fb693c6',1,'stan::math::tail(const Eigen::Matrix< T, 1, Eigen::Dynamic > &rv, size_t n)'],['../namespacestan_1_1math.html#a9956cf78180c6340f61667e797cf7055',1,'stan::math::tail(const std::vector< T > &sv, size_t n)']]], + ['tan',['tan',['../namespacestan_1_1math.html#ae09b685b660830075f80caaf8a350676',1,'stan::math::tan(const fvar< T > &x)'],['../namespacestan_1_1math.html#adf8320fd61a3c0c73f2ab8d78d949e58',1,'stan::math::tan(const var &a)']]], + ['tangent',['tangent',['../structstan_1_1math_1_1fvar.html#a77961c425581e421a7fa441a7812d468',1,'stan::math::fvar']]], + ['tanh',['tanh',['../namespacestan_1_1math.html#ae11dc45fd471bec1a19462ce58f434b8',1,'stan::math::tanh(const fvar< T > &x)'],['../namespacestan_1_1math.html#a6d342831ec24762b18f71ba4fba54621',1,'stan::math::tanh(const var &a)']]], + ['tcrossprod',['tcrossprod',['../namespacestan_1_1math.html#ab379e9a9f74dab16c41d82978cc4b58e',1,'stan::math::tcrossprod(const Eigen::Matrix< fvar< T >, R, C > &m)'],['../namespacestan_1_1math.html#a16b07b3f7d18cdb710806c5793a83d31',1,'stan::math::tcrossprod(const matrix_d &M)'],['../namespacestan_1_1math.html#a03ab719a94e19bfcf26e208ffcf5ff9a',1,'stan::math::tcrossprod(const matrix_v &M)']]], + ['tgamma',['tgamma',['../namespacestan_1_1math.html#a73eaf0a5d0593bb8610234e0d69e7cec',1,'stan::math::tgamma(const fvar< T > &x)'],['../namespacestan_1_1math.html#af27ba386c3836a69c7d270f89c946268',1,'stan::math::tgamma(const stan::math::var &a)']]], + ['to_5farray_5f1d',['to_array_1d',['../namespacestan_1_1math.html#a88c990ca9770c6c37d883d87eb82eb6d',1,'stan::math::to_array_1d(const Matrix< T, R, C > &matrix)'],['../namespacestan_1_1math.html#ad927f0ff9564aa04073f673d5e6bddfa',1,'stan::math::to_array_1d(const vector< T > &x)'],['../namespacestan_1_1math.html#a8108c33b0612c8fe8f47767fa1ca6ad1',1,'stan::math::to_array_1d(const vector< vector< T > > &x)']]], + ['to_5farray_5f2d',['to_array_2d',['../namespacestan_1_1math.html#a6cdd0729c27213abdf446412e7f7793c',1,'stan::math']]], + ['to_5ffvar',['to_fvar',['../namespacestan_1_1math.html#ad19a5837a9b5c3e219e5081d8dca3c89',1,'stan::math::to_fvar(const T &x)'],['../namespacestan_1_1math.html#a5d9d67d772eeec5340fde5d2753a14b7',1,'stan::math::to_fvar(const fvar< T > &x)'],['../namespacestan_1_1math.html#adfb48ecaf381b03e60f9df8bab82e60c',1,'stan::math::to_fvar(const Eigen::Matrix< T, R, C > &m)'],['../namespacestan_1_1math.html#a6a866da3d4ca122849b1e0ab9b38687a',1,'stan::math::to_fvar(const Eigen::Matrix< double, R, C > &m)'],['../namespacestan_1_1math.html#aafb79996a9efea5b41d2d61ac2e0ecd3',1,'stan::math::to_fvar(const Eigen::Matrix< T, R, C > &val, const Eigen::Matrix< T, R, C > &deriv)']]], + ['to_5fmatrix',['to_matrix',['../namespacestan_1_1math.html#a95a142c1899afa9dea4bdc053e959bf7',1,'stan::math::to_matrix(Matrix< T, R, C > matrix)'],['../namespacestan_1_1math.html#a3d53d7c1ac5bb3a3eff436d70b2cfbd6',1,'stan::math::to_matrix(const vector< vector< T > > &vec)'],['../namespacestan_1_1math.html#aaa5894e034cf63df686f4a32b78facbf',1,'stan::math::to_matrix(const vector< vector< int > > &vec)']]], + ['to_5frow_5fvector',['to_row_vector',['../namespacestan_1_1math.html#a69c7bf292d2f253217a813e6327899ce',1,'stan::math::to_row_vector(const Matrix< T, R, C > &matrix)'],['../namespacestan_1_1math.html#ab8eb83869b0604ee1a484547330db06f',1,'stan::math::to_row_vector(const vector< T > &vec)'],['../namespacestan_1_1math.html#a0e184ac2d303916513687b326bb01035',1,'stan::math::to_row_vector(const vector< int > &vec)']]], + ['to_5fvar',['to_var',['../structstan_1_1math_1_1_operands_and_partials.html#a5d301d57beac540a4a6c86cf5eac09b7',1,'stan::math::OperandsAndPartials::to_var()'],['../namespacestan_1_1math.html#a06ea285d4408c28e9ec6dc2ca1b571b5',1,'stan::math::to_var(const double &x)'],['../namespacestan_1_1math.html#adad5c0d61bde25dc78e090509b4b3149',1,'stan::math::to_var(const var &x)'],['../namespacestan_1_1math.html#adae9f601dd5faa6dcfa6e4edd7e84be9',1,'stan::math::to_var(const stan::math::matrix_d &m)'],['../namespacestan_1_1math.html#a40674afd6b5163ad3e859fc7da721faf',1,'stan::math::to_var(const matrix_v &m)'],['../namespacestan_1_1math.html#a345ee377fd33a8f5101a87482e098247',1,'stan::math::to_var(const stan::math::vector_d &v)'],['../namespacestan_1_1math.html#abdd6f29816f4c58601da47f272848187',1,'stan::math::to_var(const vector_v &v)'],['../namespacestan_1_1math.html#ac98e7e17d969cb7ee4b36dce58137cba',1,'stan::math::to_var(const stan::math::row_vector_d &rv)'],['../namespacestan_1_1math.html#ac28a0e06bb7bd6be39ef50f90e529ccd',1,'stan::math::to_var(const row_vector_v &rv)']]], + ['to_5fvector',['to_vector',['../namespacestan_1_1math.html#ae2aa02a20972263242e2f6a8785cf58d',1,'stan::math::to_vector(const Matrix< T, R, C > &matrix)'],['../namespacestan_1_1math.html#a1cc7916ec81b929389e94c7fd725fd87',1,'stan::math::to_vector(const vector< T > &vec)'],['../namespacestan_1_1math.html#a2fc3b48fe1676d80fd5775f97f2b6a9a',1,'stan::math::to_vector(const vector< int > &vec)']]], + ['trace',['trace',['../namespacestan_1_1math.html#a7001fd7e0296d5dae6ab0a88e1a28547',1,'stan::math::trace(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)'],['../namespacestan_1_1math.html#a8fb2aa245d794e2a6c352038f4811a37',1,'stan::math::trace(const T &m)']]], + ['trace_5fgen_5finv_5fquad_5fform_5fldlt',['trace_gen_inv_quad_form_ldlt',['../namespacestan_1_1math.html#a03da89fcbd2829c84a5beeb9ccbf2ccf',1,'stan::math::trace_gen_inv_quad_form_ldlt(const Eigen::Matrix< T1, R1, C1 > &D, const stan::math::LDLT_factor< T2, R2, C2 > &A, const Eigen::Matrix< T3, R3, C3 > &B)'],['../namespacestan_1_1math.html#af2dc9df09e11dc3e66438bb5d9aa457f',1,'stan::math::trace_gen_inv_quad_form_ldlt(const Eigen::Matrix< T1, R1, C1 > &D, const stan::math::LDLT_factor< T2, R2, C2 > &A, const Eigen::Matrix< T3, R3, C3 > &B)']]], + ['trace_5fgen_5fquad_5fform',['trace_gen_quad_form',['../namespacestan_1_1math.html#acd59dd23ba6d346713d117001b99507f',1,'stan::math::trace_gen_quad_form(const Eigen::Matrix< fvar< T >, RD, CD > &D, const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, CB > &B)'],['../namespacestan_1_1math.html#a09d402800ee27ba77d03dc3ec365d22e',1,'stan::math::trace_gen_quad_form(const Eigen::Matrix< double, RD, CD > &D, const Eigen::Matrix< double, RA, CA > &A, const Eigen::Matrix< double, RB, CB > &B)'],['../namespacestan_1_1math.html#a2c0d37f9fa5d50999308a19d8e67714e',1,'stan::math::trace_gen_quad_form(const Eigen::Matrix< TD, RD, CD > &D, const Eigen::Matrix< TA, RA, CA > &A, const Eigen::Matrix< TB, RB, CB > &B)']]], + ['trace_5finv_5fquad_5fform_5fldlt',['trace_inv_quad_form_ldlt',['../namespacestan_1_1math.html#aaddc5785e5e629683ca0c3d11346d025',1,'stan::math::trace_inv_quad_form_ldlt(const stan::math::LDLT_factor< T1, R2, C2 > &A, const Eigen::Matrix< T2, R3, C3 > &B)'],['../namespacestan_1_1math.html#a04f24e9594341db1cc4ceaf5a69f039b',1,'stan::math::trace_inv_quad_form_ldlt(const stan::math::LDLT_factor< T2, R2, C2 > &A, const Eigen::Matrix< T3, R3, C3 > &B)']]], + ['trace_5fquad_5fform',['trace_quad_form',['../namespacestan_1_1math.html#a3e0c22a58b3d6fe9d4d6e0131ca791a6',1,'stan::math::trace_quad_form(const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, CB > &B)'],['../namespacestan_1_1math.html#a9bd6d656aebcc1a3937996a31c937a54',1,'stan::math::trace_quad_form(const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< double, RB, CB > &B)'],['../namespacestan_1_1math.html#a171f742f11d2a7929a14ee7c7b47368d',1,'stan::math::trace_quad_form(const Eigen::Matrix< double, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, CB > &B)'],['../namespacestan_1_1math.html#a097af33142548fd565d1dab2233fa3e5',1,'stan::math::trace_quad_form(const Eigen::Matrix< double, RA, CA > &A, const Eigen::Matrix< double, RB, CB > &B)'],['../namespacestan_1_1math.html#a5c7a80225b1cb62153ba5d47a45870fe',1,'stan::math::trace_quad_form(const Eigen::Matrix< TA, RA, CA > &A, const Eigen::Matrix< TB, RB, CB > &B)']]], + ['transpose',['transpose',['../namespacestan_1_1math.html#a89f315f3af384f2d49a3a26eaef209ac',1,'stan::math']]], + ['trigamma',['trigamma',['../namespacestan_1_1math.html#ab18c21bad37c9af26424d0922936355e',1,'stan::math']]], + ['trunc',['trunc',['../namespacestan_1_1math.html#a79abc1d4f747b3c26c07b2b1e4871603',1,'stan::math::trunc(const fvar< T > &x)'],['../namespacestan_1_1math.html#a80e85e1eba4076438c72cd986fde40e8',1,'stan::math::trunc(const var &a)']]] +]; diff --git a/doc/api/html/search/functions_13.html b/doc/api/html/search/functions_13.html new file mode 100644 index 00000000000..724f5c10896 --- /dev/null +++ b/doc/api/html/search/functions_13.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/functions_13.js b/doc/api/html/search/functions_13.js new file mode 100644 index 00000000000..d810c16ffa3 --- /dev/null +++ b/doc/api/html/search/functions_13.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['ub_5fconstrain',['ub_constrain',['../namespacestan_1_1math.html#ad9440f04c389ecf55094919dd4a29561',1,'stan::math::ub_constrain(const T x, const TU ub)'],['../namespacestan_1_1math.html#a0e07e6f25d9cc21ce1467d0d74913a74',1,'stan::math::ub_constrain(const T x, const TU ub, T &lp)']]], + ['ub_5ffree',['ub_free',['../namespacestan_1_1math.html#ac11bdd8c7f6eed39bbac5a663c8a81bc',1,'stan::math']]], + ['uniform_5fccdf_5flog',['uniform_ccdf_log',['../namespacestan_1_1math.html#a5e2b8fa3c8f27cf5fe06e35971810d52',1,'stan::math']]], + ['uniform_5fcdf',['uniform_cdf',['../namespacestan_1_1math.html#aa15c5027f6cc08a719ce42c82f42e8ab',1,'stan::math']]], + ['uniform_5fcdf_5flog',['uniform_cdf_log',['../namespacestan_1_1math.html#a8f377bbfcb2c65d7c9b22f2a007cdc71',1,'stan::math']]], + ['uniform_5flog',['uniform_log',['../namespacestan_1_1math.html#ae39a215713172d13a104cf33d6186c65',1,'stan::math::uniform_log(const T_y &y, const T_low &alpha, const T_high &beta)'],['../namespacestan_1_1math.html#a9c32b2aba8ca5e5eb4ebe76fd1f9a832',1,'stan::math::uniform_log(const T_y &y, const T_low &alpha, const T_high &beta)']]], + ['uniform_5frng',['uniform_rng',['../namespacestan_1_1math.html#a10447d2a77f0fdf32e0adce2546cd3cd',1,'stan::math']]], + ['unit_5fvector_5fconstrain',['unit_vector_constrain',['../namespacestan_1_1math.html#a3a07474ecb0ca5f4fdbed0ce6957300f',1,'stan::math::unit_vector_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y)'],['../namespacestan_1_1math.html#ac069d9e617c38341a12a33c73a7090d6',1,'stan::math::unit_vector_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y, T &lp)']]], + ['unit_5fvector_5ffree',['unit_vector_free',['../namespacestan_1_1math.html#a65fb60ad466e375f68798ff25881e378',1,'stan::math']]] +]; diff --git a/doc/api/html/search/functions_14.html b/doc/api/html/search/functions_14.html new file mode 100644 index 00000000000..396906bd309 --- /dev/null +++ b/doc/api/html/search/functions_14.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/functions_14.js b/doc/api/html/search/functions_14.js new file mode 100644 index 00000000000..eeab4679078 --- /dev/null +++ b/doc/api/html/search/functions_14.js @@ -0,0 +1,19 @@ +var searchData= +[ + ['val',['val',['../structstan_1_1math_1_1fvar.html#aebf2b1ad415c5f68d5b4c7a94384e3fc',1,'stan::math::fvar::val()'],['../classstan_1_1math_1_1var.html#adee6abba4694821dd182f44657b53bca',1,'stan::math::var::val()']]], + ['validate_5fnon_5fnegative_5findex',['validate_non_negative_index',['../namespacestan_1_1math.html#abb591fca3d88d2a5d587ce6172b62bf4',1,'stan::math']]], + ['value_5fof',['value_of',['../namespacestan_1_1math.html#a541f8f9d951f4d48c457dcecad5e326b',1,'stan::math::value_of(const fvar< T > &v)'],['../namespacestan_1_1math.html#ad6ac4b37c5723681111ef69072288fd4',1,'stan::math::value_of(const Eigen::Matrix< T, R, C > &M)'],['../namespacestan_1_1math.html#a73087d72fd937f4be66684bd2613ae6e',1,'stan::math::value_of(const T x)'],['../namespacestan_1_1math.html#a0a759dd2a7ff07dbf11f60d9e1352bb3',1,'stan::math::value_of(const var &v)']]], + ['value_5fof_3c_20double_20_3e',['value_of< double >',['../namespacestan_1_1math.html#a2d7774df98215b7d113075019d74ebbf',1,'stan::math']]], + ['value_5fof_5frec',['value_of_rec',['../namespacestan_1_1math.html#a00b8cbdec7c35e7c93b0f47dae3c5498',1,'stan::math::value_of_rec(const fvar< T > &v)'],['../namespacestan_1_1math.html#ae6b0847f7611d8f396a1f4e112200185',1,'stan::math::value_of_rec(const Eigen::Matrix< T, R, C > &M)'],['../namespacestan_1_1math.html#a7a99d6e8d6986fffb421e859770560bc',1,'stan::math::value_of_rec(const T x)'],['../namespacestan_1_1math.html#ab481d22f60e4cb93d629ac5d9f43bb00',1,'stan::math::value_of_rec(const var &v)']]], + ['value_5fof_5frec_3c_20double_20_3e',['value_of_rec< double >',['../namespacestan_1_1math.html#a7bb47fffd6ec0b1864d5e8bf0b99cf55',1,'stan::math']]], + ['var',['var',['../classstan_1_1math_1_1var.html#aad7dd38f48c59f9b59d7f2caa7dcc055',1,'stan::math::var::var()'],['../classstan_1_1math_1_1var.html#ac9dad7e9936150e2d082ab2eb9d07a85',1,'stan::math::var::var(vari *vi)'],['../classstan_1_1math_1_1var.html#a6405710a647d0a5f20b07aa1a41e1b6b',1,'stan::math::var::var(float x)'],['../classstan_1_1math_1_1var.html#a59212fe7f7b20ff643dde22074689ef1',1,'stan::math::var::var(double x)'],['../classstan_1_1math_1_1var.html#a6a333a82fd608b913a239c03272b5b56',1,'stan::math::var::var(long double x)'],['../classstan_1_1math_1_1var.html#ada48c7523cc13f19ff07d14a412b1d2b',1,'stan::math::var::var(bool x)'],['../classstan_1_1math_1_1var.html#ac22e5b84ff8e7934036e7d4fa89c3f14',1,'stan::math::var::var(char x)'],['../classstan_1_1math_1_1var.html#a55ae61a2ae50220be00395aea1c51bfa',1,'stan::math::var::var(short x)'],['../classstan_1_1math_1_1var.html#a1c27d331050539ab689e8d0dae743e51',1,'stan::math::var::var(int x)'],['../classstan_1_1math_1_1var.html#a755001ff6e4f8500f90106b526a2d62b',1,'stan::math::var::var(long x)'],['../classstan_1_1math_1_1var.html#aa19a6ef61012fe9a611b86c5c5df0841',1,'stan::math::var::var(unsigned char x)'],['../classstan_1_1math_1_1var.html#ad8c38d414a8bccbb0761aea7a3d64612',1,'stan::math::var::var(unsigned short x)'],['../classstan_1_1math_1_1var.html#ae10b8ab6f35db859bc7b2831951944b4',1,'stan::math::var::var(unsigned int x)'],['../classstan_1_1math_1_1var.html#aba2a77edbec7e11956c29283f1e50fc0',1,'stan::math::var::var(unsigned long x)']]], + ['vari',['vari',['../classstan_1_1math_1_1vari.html#a2592847e55b538d33c224023f22f0a5c',1,'stan::math::vari::vari(const double x)'],['../classstan_1_1math_1_1vari.html#abe25e7905dc011cee38d7df47f6917f0',1,'stan::math::vari::vari(const double x, bool stacked)']]], + ['variance',['variance',['../namespacestan_1_1math.html#aa433ac2fc47bbd40a6d87f62574dff85',1,'stan::math::variance(const std::vector< T > &v)'],['../namespacestan_1_1math.html#a1f055da8754c2215aac70d7787692f54',1,'stan::math::variance(const Eigen::Matrix< T, R, C > &m)'],['../namespacestan_1_1math.html#ac0400489c86a0f208ed17371ab97254f',1,'stan::math::variance(const std::vector< var > &v)'],['../namespacestan_1_1math.html#a4c5dc6176d49564ace17029793589421',1,'stan::math::variance(const Eigen::Matrix< var, R, C > &m)']]], + ['vectorbuilder',['VectorBuilder',['../classstan_1_1_vector_builder.html#a259630f1a916b23c98b664e173892e79',1,'stan::VectorBuilder']]], + ['vectorbuilderhelper',['VectorBuilderHelper',['../classstan_1_1_vector_builder_helper.html#abf2194ad2beb0ec7851ad06e7785cded',1,'stan::VectorBuilderHelper::VectorBuilderHelper()'],['../classstan_1_1_vector_builder_helper_3_01_t1_00_01true_00_01false_01_4.html#a6dc945ef3e7661667f69bb82fc9df177',1,'stan::VectorBuilderHelper< T1, true, false >::VectorBuilderHelper()'],['../classstan_1_1_vector_builder_helper_3_01_t1_00_01true_00_01true_01_4.html#a41c70cddac8238f49b6afde03fe22102',1,'stan::VectorBuilderHelper< T1, true, true >::VectorBuilderHelper()']]], + ['vectord',['vectorD',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#afdec334e2365f43cdbe5a352cb353e2e',1,'stan::math::LDLT_factor< T, R, C >::vectorD()'],['../classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4.html#ac9188aad7bdd50d4031449e7df91f890',1,'stan::math::LDLT_factor< stan::math::var, R, C >::vectorD()']]], + ['vectorview',['VectorView',['../classstan_1_1_vector_view.html#a49530fcffe86b987cc16c9db07433a01',1,'stan::VectorView::VectorView(scalar_t &c)'],['../classstan_1_1_vector_view.html#aa8cf0eb6c25b3e6e7ab4164d3327cab3',1,'stan::VectorView::VectorView(std::vector< scalar_t > &v)'],['../classstan_1_1_vector_view.html#a1a2167039be334fe553432580f7ec4ee',1,'stan::VectorView::VectorView(Eigen::Matrix< scalar_t, R, C > &m)'],['../classstan_1_1_vector_view.html#ace98de1e8835b3317330d98fa34b981b',1,'stan::VectorView::VectorView(scalar_t *x)'],['../classstan_1_1_vector_view_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html#a144dc75865388d9e80c153d6651a9bab',1,'stan::VectorView< const T, is_array, throw_if_accessed >::VectorView(const scalar_t &c)'],['../classstan_1_1_vector_view_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html#a2e063aacbcb8999b921bce5d52557646',1,'stan::VectorView< const T, is_array, throw_if_accessed >::VectorView(const scalar_t *x)'],['../classstan_1_1_vector_view_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html#a8a70c613d18b72f45466591168f354dc',1,'stan::VectorView< const T, is_array, throw_if_accessed >::VectorView(const std::vector< scalar_t > &v)'],['../classstan_1_1_vector_view_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html#af337a1b8ede134a1debe59fbee1cd1e1',1,'stan::VectorView< const T, is_array, throw_if_accessed >::VectorView(const Eigen::Matrix< scalar_t, R, C > &m)'],['../classstan_1_1_vector_view_3_01const_01double_00_01false_00_01false_01_4.html#af57df094db378d9da317b93d23c34ab1',1,'stan::VectorView< const double, false, false >::VectorView()']]], + ['vectorviewmvt',['VectorViewMvt',['../classstan_1_1_vector_view_mvt.html#a63f250342668fab3df0e18e467a2ae15',1,'stan::VectorViewMvt::VectorViewMvt(matrix_t &m)'],['../classstan_1_1_vector_view_mvt.html#a7e8d6dd9b7067dbf02b7b973806335c0',1,'stan::VectorViewMvt::VectorViewMvt(std::vector< matrix_t > &vm)'],['../classstan_1_1_vector_view_mvt_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html#a5faf023847a5654c294db465351b13d8',1,'stan::VectorViewMvt< const T, is_array, throw_if_accessed >::VectorViewMvt(const matrix_t &m)'],['../classstan_1_1_vector_view_mvt_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html#abf41d99f5c66c8675c68ad2b61ebcc6c',1,'stan::VectorViewMvt< const T, is_array, throw_if_accessed >::VectorViewMvt(const std::vector< matrix_t > &vm)']]], + ['von_5fmises_5flog',['von_mises_log',['../namespacestan_1_1math.html#a3e7a36cd810a693a04ef145882894754',1,'stan::math::von_mises_log(T_y const &y, T_loc const &mu, T_scale const &kappa)'],['../namespacestan_1_1math.html#a8a06353ba5a996ebfc43ec69decf9fb9',1,'stan::math::von_mises_log(T_y const &y, T_loc const &mu, T_scale const &kappa)']]], + ['von_5fmises_5frng',['von_mises_rng',['../namespacestan_1_1math.html#a71998db3e6cfebf31463452f99878b99',1,'stan::math']]] +]; diff --git a/doc/api/html/search/functions_15.html b/doc/api/html/search/functions_15.html new file mode 100644 index 00000000000..2dee32be29e --- /dev/null +++ b/doc/api/html/search/functions_15.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/functions_15.js b/doc/api/html/search/functions_15.js new file mode 100644 index 00000000000..e94b28b2621 --- /dev/null +++ b/doc/api/html/search/functions_15.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['weibull_5fccdf_5flog',['weibull_ccdf_log',['../namespacestan_1_1math.html#aa0033ce06f5f7b1109a42eee2579955a',1,'stan::math']]], + ['weibull_5fcdf',['weibull_cdf',['../namespacestan_1_1math.html#ae943a8f5c87e946a45a4f3b62f99b187',1,'stan::math']]], + ['weibull_5fcdf_5flog',['weibull_cdf_log',['../namespacestan_1_1math.html#ae94334459868c125f2a6504b69f46158',1,'stan::math']]], + ['weibull_5flog',['weibull_log',['../namespacestan_1_1math.html#a4f3a52747636627895374aa555279a92',1,'stan::math::weibull_log(const T_y &y, const T_shape &alpha, const T_scale &sigma)'],['../namespacestan_1_1math.html#a76561164f1ff9ed6e70bf4a75e6f8ae2',1,'stan::math::weibull_log(const T_y &y, const T_shape &alpha, const T_scale &sigma)']]], + ['weibull_5frng',['weibull_rng',['../namespacestan_1_1math.html#afd376b3fe82077f0565de1fbef6b4202',1,'stan::math']]], + ['welford_5fcovar_5festimator',['welford_covar_estimator',['../classstan_1_1math_1_1welford__covar__estimator.html#a91b414e3472b5a9d83be8caca053b933',1,'stan::math::welford_covar_estimator']]], + ['welford_5fvar_5festimator',['welford_var_estimator',['../classstan_1_1math_1_1welford__var__estimator.html#a6fbed26e157b497f90f22d6a4fa08f50',1,'stan::math::welford_var_estimator']]], + ['wiener_5flog',['wiener_log',['../namespacestan_1_1math.html#ae7a28135e8fe64782357d52062380796',1,'stan::math::wiener_log(const T_y &y, const T_alpha &alpha, const T_tau &tau, const T_beta &beta, const T_delta &delta)'],['../namespacestan_1_1math.html#a51ee0070ef7fdeac83b11eae40b1646a',1,'stan::math::wiener_log(const T_y &y, const T_alpha &alpha, const T_tau &tau, const T_beta &beta, const T_delta &delta)']]], + ['wishart_5flog',['wishart_log',['../namespacestan_1_1math.html#a91db893054b635d18034d06c161365a1',1,'stan::math::wishart_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &W, const T_dof &nu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &S)'],['../namespacestan_1_1math.html#a951a06ccbb12ca44a08544000372dbf1',1,'stan::math::wishart_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &W, const T_dof &nu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &S)']]], + ['wishart_5frng',['wishart_rng',['../namespacestan_1_1math.html#a7025b4916694aa80aa0d758a11647b5d',1,'stan::math']]] +]; diff --git a/doc/api/html/search/functions_16.html b/doc/api/html/search/functions_16.html new file mode 100644 index 00000000000..55d2cdaf25d --- /dev/null +++ b/doc/api/html/search/functions_16.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/functions_16.js b/doc/api/html/search/functions_16.js new file mode 100644 index 00000000000..3d03b3d696f --- /dev/null +++ b/doc/api/html/search/functions_16.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['_7eaccumulator',['~accumulator',['../classstan_1_1math_1_1accumulator.html#a298d4088fbfdfca98d2c8e36a5ea4f1c',1,'stan::math::accumulator']]], + ['_7echainable',['~chainable',['../classstan_1_1math_1_1chainable.html#ad496bfaf684b78e944fa28c178e5ac83',1,'stan::math::chainable']]], + ['_7echainable_5falloc',['~chainable_alloc',['../classstan_1_1math_1_1chainable__alloc.html#aaca3bd4f138cfd11f43e984c241463ce',1,'stan::math::chainable_alloc']]], + ['_7egevv_5fvvv_5fvari',['~gevv_vvv_vari',['../classstan_1_1math_1_1gevv__vvv__vari.html#a1d061a4dc39e882750c673965e0d7be5',1,'stan::math::gevv_vvv_vari']]], + ['_7estack_5falloc',['~stack_alloc',['../classstan_1_1math_1_1stack__alloc.html#a946367b4b88dd893103db604c5f23669',1,'stan::math::stack_alloc']]], + ['_7evari',['~vari',['../classstan_1_1math_1_1vari.html#a14e0658a14d11a99e69f6d16f119bbf8',1,'stan::math::vari']]] +]; diff --git a/doc/api/html/search/functions_2.html b/doc/api/html/search/functions_2.html new file mode 100644 index 00000000000..78be8b41988 --- /dev/null +++ b/doc/api/html/search/functions_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/functions_2.js b/doc/api/html/search/functions_2.js new file mode 100644 index 00000000000..84419395cf8 --- /dev/null +++ b/doc/api/html/search/functions_2.js @@ -0,0 +1,94 @@ +var searchData= +[ + ['calculate_5fchain',['calculate_chain',['../namespacestan_1_1math.html#ab9b0e3e51b5cc7ab1da287369ff754d7',1,'stan::math']]], + ['categorical_5flog',['categorical_log',['../namespacestan_1_1math.html#a583ce356e75d8d7be0126bb00c401afa',1,'stan::math::categorical_log(int n, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)'],['../namespacestan_1_1math.html#a41e12bdd3e7ba1450f8b44ea5a59b0dd',1,'stan::math::categorical_log(const typename math::index_type< Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > >::type n, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)'],['../namespacestan_1_1math.html#a089e388c974ca67ecc06e9c67f75067f',1,'stan::math::categorical_log(const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)'],['../namespacestan_1_1math.html#aabce8d1a6154b04d2689f604b2e2373b',1,'stan::math::categorical_log(const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)']]], + ['categorical_5flogit_5flog',['categorical_logit_log',['../namespacestan_1_1math.html#a35594af0b1635f8bc2817ca8a2c767f2',1,'stan::math::categorical_logit_log(int n, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &beta)'],['../namespacestan_1_1math.html#aea64526bd00e285844c6eb1246ccf431',1,'stan::math::categorical_logit_log(int n, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &beta)'],['../namespacestan_1_1math.html#ac06f8075869ffd32c8a0385e57bc2170',1,'stan::math::categorical_logit_log(const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &beta)'],['../namespacestan_1_1math.html#ac35ff747de556a8f351efda0e986a832',1,'stan::math::categorical_logit_log(const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &beta)']]], + ['categorical_5frng',['categorical_rng',['../namespacestan_1_1math.html#a1f8b55cdaa59f3fe7718d5b45889cda6',1,'stan::math']]], + ['cauchy_5fccdf_5flog',['cauchy_ccdf_log',['../namespacestan_1_1math.html#aa932af729313abe32571d8a3742385ed',1,'stan::math']]], + ['cauchy_5fcdf',['cauchy_cdf',['../namespacestan_1_1math.html#ab7ecad949e8b175b4b60f6f5cb16319b',1,'stan::math']]], + ['cauchy_5fcdf_5flog',['cauchy_cdf_log',['../namespacestan_1_1math.html#a689566206e25e90e590c2655d3b49032',1,'stan::math']]], + ['cauchy_5flog',['cauchy_log',['../namespacestan_1_1math.html#a57b702de583e1883c8abd5b2fbba4b0d',1,'stan::math::cauchy_log(const T_y &y, const T_loc &mu, const T_scale &sigma)'],['../namespacestan_1_1math.html#a6ffc7f40b61588318f20c738202fc5fc',1,'stan::math::cauchy_log(const T_y &y, const T_loc &mu, const T_scale &sigma)']]], + ['cauchy_5frng',['cauchy_rng',['../namespacestan_1_1math.html#ab9ddbccee3c214e6fc88f297b6524d0b',1,'stan::math']]], + ['cbrt',['cbrt',['../namespacestan_1_1math.html#a64c0dfe5862fc53f1a18d76f14a1dc7e',1,'stan::math::cbrt(const fvar< T > &x)'],['../namespacestan_1_1math.html#a2a865962fcd8998de077f4a77b0a4ffa',1,'stan::math::cbrt(const var &a)']]], + ['ceil',['ceil',['../namespacestan_1_1math.html#ab1b2e9b4a947b81917612a8d1d547afb',1,'stan::math::ceil(const fvar< T > &x)'],['../namespacestan_1_1math.html#a06e924d5a6c94f7593056b5cb1324b66',1,'stan::math::ceil(const var &a)']]], + ['chain',['chain',['../classstan_1_1math_1_1partials__vari.html#a707df6188a376afaad836dce8c6ceaf6',1,'stan::math::partials_vari::chain()'],['../classstan_1_1math_1_1sum__v__vari.html#a480eb0c5d04c92a3a4e28952ee14a4bb',1,'stan::math::sum_v_vari::chain()'],['../classstan_1_1math_1_1chainable.html#a38705148cea01e467dce2585312d7128',1,'stan::math::chainable::chain()'],['../classstan_1_1math_1_1gevv__vvv__vari.html#aa0e048f3021fa5bd5b4e20152ab0c77d',1,'stan::math::gevv_vvv_vari::chain()'],['../classstan_1_1math_1_1precomp__v__vari.html#a1ea984c684b3bc8a368c9554d9f0625b',1,'stan::math::precomp_v_vari::chain()'],['../classstan_1_1math_1_1precomp__vv__vari.html#ad3a8d46be2b9b6b8947953d3f537cc4c',1,'stan::math::precomp_vv_vari::chain()'],['../classstan_1_1math_1_1precomp__vvv__vari.html#a2e4939dbd5afb15e897f7af7dfa72640',1,'stan::math::precomp_vvv_vari::chain()'],['../classstan_1_1math_1_1precomputed__gradients__vari.html#a3fdc12d96fed2ae97bc8b6d90c117d1e',1,'stan::math::precomputed_gradients_vari::chain()'],['../classstan_1_1math_1_1stored__gradient__vari.html#a832278a4273ca489bc52148d6300b638',1,'stan::math::stored_gradient_vari::chain()'],['../classstan_1_1math_1_1cholesky__decompose__v__vari.html#aab81d9945c0a4aaa2ea3c8d1888e2b81',1,'stan::math::cholesky_decompose_v_vari::chain()']]], + ['chainable',['chainable',['../classstan_1_1math_1_1chainable.html#a24756ddb4545a3b65beb259afe4eb25f',1,'stan::math::chainable']]], + ['chainable_5falloc',['chainable_alloc',['../classstan_1_1math_1_1chainable__alloc.html#a2c6f63c774596d247fb5ef3083a8013d',1,'stan::math::chainable_alloc']]], + ['check',['check',['../structstan_1_1math_1_1detail_1_1bounded.html#aacb059ebca7a577b043db54f9f79cc9f',1,'stan::math::detail::bounded::check()'],['../structstan_1_1math_1_1detail_1_1bounded_3_01_t__y_00_01_t__low_00_01_t__high_00_01true_01_4.html#afd17ed95a354d3786d35986021c2f559',1,'stan::math::detail::bounded< T_y, T_low, T_high, true >::check()']]], + ['check_5fbounded',['check_bounded',['../namespacestan_1_1math.html#a16d53b31b377bc3fc120d6469af3d99e',1,'stan::math']]], + ['check_5fcholesky_5ffactor',['check_cholesky_factor',['../namespacestan_1_1math.html#a2b3c1ad17fc5567f1599fa9d0a218620',1,'stan::math']]], + ['check_5fcholesky_5ffactor_5fcorr',['check_cholesky_factor_corr',['../namespacestan_1_1math.html#a3f24b6f8e2a52523ae37a7ff2664e9b5',1,'stan::math']]], + ['check_5fcolumn_5findex',['check_column_index',['../namespacestan_1_1math.html#a16b0a60f741f97efac53254839f24ff8',1,'stan::math']]], + ['check_5fconsistent_5fsize',['check_consistent_size',['../namespacestan_1_1math.html#a6b6ab798e2f2a2ffad6b244efab0a58f',1,'stan::math']]], + ['check_5fconsistent_5fsizes',['check_consistent_sizes',['../namespacestan_1_1math.html#a8e8b8fb2cc649fc1f34e75d0b1fe2ca3',1,'stan::math::check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)'],['../namespacestan_1_1math.html#a2fa5d10851fe1307ed7a0ffb768ff861',1,'stan::math::check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2, const char *name3, const T3 &x3)'],['../namespacestan_1_1math.html#a817ff4687b2d9d98f7f7bf82e9286266',1,'stan::math::check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2, const char *name3, const T3 &x3, const char *name4, const T4 &x4)'],['../namespacestan_1_1math.html#a8496e1bd1273f06de6712e3fb81e2c3f',1,'stan::math::check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2, const char *name3, const T3 &x3, const char *name4, const T4 &x4, const char *name5, const T5 &x5)']]], + ['check_5fcorr_5fmatrix',['check_corr_matrix',['../namespacestan_1_1math.html#a41204c48d930b46e81329d8b00a0793e',1,'stan::math']]], + ['check_5fcov_5fmatrix',['check_cov_matrix',['../namespacestan_1_1math.html#aeb915b09e2e60dd76885b6d68655790c',1,'stan::math']]], + ['check_5fequal',['check_equal',['../namespacestan_1_1math.html#a1d8cfae284cdae1bb7e83d2a136f9a04',1,'stan::math']]], + ['check_5ffinite',['check_finite',['../namespacestan_1_1math.html#a5bf014e7733b17748049ccc5f3565de3',1,'stan::math']]], + ['check_5fgreater',['check_greater',['../namespacestan_1_1math.html#ad60ac97b8f74b7c5ce2feb4bdb9e09e0',1,'stan::math']]], + ['check_5fgreater_5for_5fequal',['check_greater_or_equal',['../namespacestan_1_1math.html#a3d5b19f8930c14681349d8444142487e',1,'stan::math']]], + ['check_5fldlt_5ffactor',['check_ldlt_factor',['../namespacestan_1_1math.html#a7547b05717280b1cc041309803ec797d',1,'stan::math']]], + ['check_5fless',['check_less',['../namespacestan_1_1math.html#aab225792149dceaec443ce09b93f8744',1,'stan::math']]], + ['check_5fless_5for_5fequal',['check_less_or_equal',['../namespacestan_1_1math.html#a5e9dd0895901bf876eca824b41f04003',1,'stan::math']]], + ['check_5flower_5ftriangular',['check_lower_triangular',['../namespacestan_1_1math.html#afe34ba3113cc8f10f179873edb9b60ed',1,'stan::math']]], + ['check_5fmatching_5fdims',['check_matching_dims',['../namespacestan_1_1math.html#aa1149504bbf29d464f23508ca5eccc0a',1,'stan::math']]], + ['check_5fmatching_5fsizes',['check_matching_sizes',['../namespacestan_1_1math.html#a52ba893fcf6fc650e992c13d41fbc3ae',1,'stan::math']]], + ['check_5fmultiplicable',['check_multiplicable',['../namespacestan_1_1math.html#a3cfbb4f09fe34b9ece32be051f16ce66',1,'stan::math']]], + ['check_5fnonnegative',['check_nonnegative',['../namespacestan_1_1math.html#a7a6be100befb6d08504cf5af8440b236',1,'stan::math']]], + ['check_5fnonzero_5fsize',['check_nonzero_size',['../namespacestan_1_1math.html#a97c3c23033e47a923ed5ce26a4deeba5',1,'stan::math']]], + ['check_5fnot_5fnan',['check_not_nan',['../namespacestan_1_1math.html#a7942532ef8f89cee24af75a383835ee1',1,'stan::math']]], + ['check_5fordered',['check_ordered',['../namespacestan_1_1math.html#a2a7b212a4431aeedca59b2e94c84f788',1,'stan::math::check_ordered(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &y)'],['../namespacestan_1_1math.html#af55e7669a804e68bc9d39ecd06318b23',1,'stan::math::check_ordered(const char *function, const char *name, const std::vector< T_y > &y)']]], + ['check_5fpos_5fdefinite',['check_pos_definite',['../namespacestan_1_1math.html#ac0133fd07702f5253126a385703b7d73',1,'stan::math::check_pos_definite(const char *function, const char *name, const Eigen::Matrix< T_y, Dynamic, Dynamic > &y)'],['../namespacestan_1_1math.html#ac0662f5d1e64e1adfa2f6216d1d58d6a',1,'stan::math::check_pos_definite(const char *function, const char *name, const Eigen::LDLT< Derived > &cholesky)'],['../namespacestan_1_1math.html#a32de4907da5087c01bfdda45a8ab1ede',1,'stan::math::check_pos_definite(const char *function, const char *name, const Eigen::LLT< Derived > &cholesky)']]], + ['check_5fpos_5fsemidefinite',['check_pos_semidefinite',['../namespacestan_1_1math.html#aa26244f58d5a4dfd49181b39d9b4569b',1,'stan::math']]], + ['check_5fpositive',['check_positive',['../namespacestan_1_1math.html#a814694b1125e641ca7b2e7269c82f966',1,'stan::math']]], + ['check_5fpositive_5ffinite',['check_positive_finite',['../namespacestan_1_1math.html#af0725693b09e454f5c8327ac89cf0245',1,'stan::math']]], + ['check_5fpositive_5fordered',['check_positive_ordered',['../namespacestan_1_1math.html#a87f00a8c0f07c5a82145a14712437673',1,'stan::math']]], + ['check_5fpositive_5fsize',['check_positive_size',['../namespacestan_1_1math.html#ac6fe1398a136f3dc36d246a2ea747500',1,'stan::math']]], + ['check_5frange',['check_range',['../namespacestan_1_1math.html#adcd4dcac328824f71f31d6861b8610ee',1,'stan::math::check_range(const char *function, const char *name, const int max, const int index, const int nested_level, const char *error_msg)'],['../namespacestan_1_1math.html#a8822ad6a9b8706465e8e1f90c336e3c2',1,'stan::math::check_range(const char *function, const char *name, const int max, const int index, const char *error_msg)'],['../namespacestan_1_1math.html#a7e76ffb67d3c6c6c225b0ba7b991f449',1,'stan::math::check_range(const char *function, const char *name, const int max, const int index)']]], + ['check_5frow_5findex',['check_row_index',['../namespacestan_1_1math.html#acb080867499e68f688b0dcb5c8f4e061',1,'stan::math']]], + ['check_5fsimplex',['check_simplex',['../namespacestan_1_1math.html#a6affd19d4999c427291a2bbb07bce304',1,'stan::math']]], + ['check_5fsize_5fmatch',['check_size_match',['../namespacestan_1_1math.html#aa547146eaac690e79a611e50a6dffb4d',1,'stan::math::check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)'],['../namespacestan_1_1math.html#a0c66b22fce7bd878b687d550299eb248',1,'stan::math::check_size_match(const char *function, const char *expr_i, const char *name_i, T_size1 i, const char *expr_j, const char *name_j, T_size2 j)']]], + ['check_5fspsd_5fmatrix',['check_spsd_matrix',['../namespacestan_1_1math.html#a30d5ef4f11dbce1a670766034b416339',1,'stan::math']]], + ['check_5fsquare',['check_square',['../namespacestan_1_1math.html#a94cfaa76ca5bc3f0ea5ad1d5b9f80727',1,'stan::math']]], + ['check_5fstd_5fvector_5findex',['check_std_vector_index',['../namespacestan_1_1math.html#a7ed873db07e833c14413c319a5bb9837',1,'stan::math']]], + ['check_5fsymmetric',['check_symmetric',['../namespacestan_1_1math.html#a57384e961806a959d95a5444fd8d7190',1,'stan::math']]], + ['check_5funit_5fvector',['check_unit_vector',['../namespacestan_1_1math.html#a14e15ece9efbe2751549da6a598964c9',1,'stan::math']]], + ['check_5fvector',['check_vector',['../namespacestan_1_1math.html#a5b78e5ddf65db13aaa65a6c58205fbf2',1,'stan::math']]], + ['chi_5fsquare_5fccdf_5flog',['chi_square_ccdf_log',['../namespacestan_1_1math.html#af270a4206e4a52396b386b54c9a58ae9',1,'stan::math']]], + ['chi_5fsquare_5fcdf',['chi_square_cdf',['../namespacestan_1_1math.html#aa196f552535f61f4b2bd088da74cc142',1,'stan::math']]], + ['chi_5fsquare_5fcdf_5flog',['chi_square_cdf_log',['../namespacestan_1_1math.html#acbf0413c908e37c44c24ad81f99aa77f',1,'stan::math']]], + ['chi_5fsquare_5flog',['chi_square_log',['../namespacestan_1_1math.html#a8a1c945dce01a8a4b4485b7c5bb258ba',1,'stan::math::chi_square_log(const T_y &y, const T_dof &nu)'],['../namespacestan_1_1math.html#a78965d5578823b4bae1dde58e42012c1',1,'stan::math::chi_square_log(const T_y &y, const T_dof &nu)']]], + ['chi_5fsquare_5frng',['chi_square_rng',['../namespacestan_1_1math.html#ac1653e58694ea92bc1781e5d332c31e8',1,'stan::math']]], + ['cholesky_5fcorr_5fconstrain',['cholesky_corr_constrain',['../namespacestan_1_1math.html#ab9d24004ec984f89b342414ff6312d0a',1,'stan::math::cholesky_corr_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y, int K)'],['../namespacestan_1_1math.html#a6649012a7c4d7108fb5dc5ebd6a13683',1,'stan::math::cholesky_corr_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y, int K, T &lp)']]], + ['cholesky_5fcorr_5ffree',['cholesky_corr_free',['../namespacestan_1_1math.html#aeed4fbb1adce01dfc445cae326e4c482',1,'stan::math']]], + ['cholesky_5fdecompose',['cholesky_decompose',['../namespacestan_1_1math.html#a4d798c4cab5a0716a0e338de38617c8e',1,'stan::math::cholesky_decompose(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)'],['../namespacestan_1_1math.html#af8e46af32d475d13fb882b6ae58051de',1,'stan::math::cholesky_decompose(const Eigen::Matrix< var,-1,-1 > &A)']]], + ['cholesky_5fdecompose_5fv_5fvari',['cholesky_decompose_v_vari',['../classstan_1_1math_1_1cholesky__decompose__v__vari.html#a9906839e06f5ae7c5c31b9d0c5fe1454',1,'stan::math::cholesky_decompose_v_vari']]], + ['cholesky_5ffactor_5fconstrain',['cholesky_factor_constrain',['../namespacestan_1_1math.html#ae2be4ed6bbf19487de29cfc85718ed3b',1,'stan::math::cholesky_factor_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, int M, int N)'],['../namespacestan_1_1math.html#a8eb630493ae2edfb2dbc9caeda00dfff',1,'stan::math::cholesky_factor_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, int M, int N, T &lp)']]], + ['cholesky_5ffactor_5ffree',['cholesky_factor_free',['../namespacestan_1_1math.html#ad9d45c92d30d1120cfa4b71a766e1712',1,'stan::math']]], + ['col',['col',['../namespacestan_1_1math.html#a3d822499055d9eefe6cd543ad06e1d3b',1,'stan::math']]], + ['cols',['cols',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#a73fd3def8c2a23ff4afbc5db359f4f84',1,'stan::math::LDLT_factor< T, R, C >::cols()'],['../classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4.html#ac34a025473a988e2393db45dfdaa6288',1,'stan::math::LDLT_factor< stan::math::var, R, C >::cols()'],['../namespacestan_1_1math.html#a0798f82fcc76f547303e77224fa25025',1,'stan::math::cols()']]], + ['columns_5fdot_5fproduct',['columns_dot_product',['../namespacestan_1_1math.html#ad63b6eb8c9db16d8321d8f2f18632be1',1,'stan::math::columns_dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)'],['../namespacestan_1_1math.html#a415662a8443b30a03b559fad4be26e85',1,'stan::math::columns_dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)'],['../namespacestan_1_1math.html#a8ca0a75054cee6793caf8b97f47f8fa7',1,'stan::math::columns_dot_product(const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)'],['../namespacestan_1_1math.html#a6d03b34aa7329a68f31d1c7bc500c5c8',1,'stan::math::columns_dot_product(const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)'],['../namespacestan_1_1math.html#a09f7ba0991c234a715af5b4968a28014',1,'stan::math::columns_dot_product(const Eigen::Matrix< T1, R1, C1 > &v1, const Eigen::Matrix< T2, R2, C2 > &v2)']]], + ['columns_5fdot_5fself',['columns_dot_self',['../namespacestan_1_1math.html#a3663d900f7f0bdd57e808301ff142ee1',1,'stan::math::columns_dot_self(const Eigen::Matrix< fvar< T >, R, C > &x)'],['../namespacestan_1_1math.html#a3cc404fd71124d7cea29d4f6d1a767b9',1,'stan::math::columns_dot_self(const Eigen::Matrix< T, R, C > &x)'],['../namespacestan_1_1math.html#a5f1e866e49a056dc81b8b6b673dda0f8',1,'stan::math::columns_dot_self(const Eigen::Matrix< var, R, C > &x)']]], + ['compute',['compute',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#a0ffe0d59212a19f9039b478abbacd45e',1,'stan::math::LDLT_factor< T, R, C >::compute()'],['../classstan_1_1math_1_1_l_d_l_t__alloc.html#a57ddd5cb234667b1c07becffad3b77de',1,'stan::math::LDLT_alloc::compute()'],['../classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4.html#abb2f0b7a7abb1aee5157b3c2cd3ffa83',1,'stan::math::LDLT_factor< stan::math::var, R, C >::compute()']]], + ['container_5fview',['container_view',['../classstan_1_1math_1_1container__view_3_01std_1_1vector_3_01_t1_01_4_00_01_t2_01_4.html#ae8c8f2d62c4841ca458580c2af67505f',1,'stan::math::container_view< std::vector< T1 >, T2 >::container_view()'],['../classstan_1_1math_1_1container__view_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_eif0a5cd6c4f7572d0a0485f479012b4cf.html#ada334e228fbc14af8df1cce4d9dc49fa',1,'stan::math::container_view< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > >::container_view()'],['../classstan_1_1math_1_1container__view_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_t2_01_4.html#ad29aea372283a2198c9b41813cb283c6',1,'stan::math::container_view< Eigen::Matrix< T1, R, C >, T2 >::container_view()'],['../classstan_1_1math_1_1container__view_3_01std_1_1vector_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_7f9efd46b00a4e97b56aae6ecc54dbcd.html#aaa03e10bd275d93efd10cce98e9c5ac4',1,'stan::math::container_view< std::vector< Eigen::Matrix< T1, R, C > >, Eigen::Matrix< T2, R, C > >::container_view()'],['../classstan_1_1math_1_1container__view.html#a6fe36f3d62137ef5755cedcc69b64d22',1,'stan::math::container_view::container_view()'],['../classstan_1_1math_1_1container__view_3_01dummy_00_01_t2_01_4.html#a50bf179032b8fe16201ded36c2d195f1',1,'stan::math::container_view< dummy, T2 >::container_view()']]], + ['corr_5fconstrain',['corr_constrain',['../namespacestan_1_1math.html#a6a3c8aa139b956593524b01f21c971a1',1,'stan::math::corr_constrain(const T x)'],['../namespacestan_1_1math.html#a40c9589bc6f6d15d7455de5ad453c8e6',1,'stan::math::corr_constrain(const T x, T &lp)']]], + ['corr_5ffree',['corr_free',['../namespacestan_1_1math.html#a9322e1f1baeb5a192c4972dbec311b4e',1,'stan::math']]], + ['corr_5fmatrix_5fconstrain',['corr_matrix_constrain',['../namespacestan_1_1math.html#a8321b61db6a84b5d9041777643d53550',1,'stan::math::corr_matrix_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, typename math::index_type< Eigen::Matrix< T, Eigen::Dynamic, 1 > >::type k)'],['../namespacestan_1_1math.html#a65f2b4839829eda2b539a09da332a7fa',1,'stan::math::corr_matrix_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, typename math::index_type< Eigen::Matrix< T, Eigen::Dynamic, 1 > >::type k, T &lp)']]], + ['corr_5fmatrix_5ffree',['corr_matrix_free',['../namespacestan_1_1math.html#a34f63590ae0c736b6113d578d0899da1',1,'stan::math']]], + ['cos',['cos',['../namespacestan_1_1math.html#ae6cb3a9041ae0b7855b398c3e11cda48',1,'stan::math::cos(const fvar< T > &x)'],['../namespacestan_1_1math.html#a0f3ac00ed58d998daed7f4d97195e967',1,'stan::math::cos(const var &a)']]], + ['cosh',['cosh',['../namespacestan_1_1math.html#aee4fa5213b343a52756c138107ac180b',1,'stan::math::cosh(const fvar< T > &x)'],['../namespacestan_1_1math.html#ab2a43fcaf01cfef4c73074e77390a205',1,'stan::math::cosh(const var &a)']]], + ['coupled_5fode_5fobserver',['coupled_ode_observer',['../structstan_1_1math_1_1coupled__ode__observer.html#a1cbc3b0af0db1af7a2614619963dafb2',1,'stan::math::coupled_ode_observer']]], + ['coupled_5fode_5fsystem',['coupled_ode_system',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html#a40185af10295bf1b41f2e1361ce1df2f',1,'stan::math::coupled_ode_system< F, double, double >::coupled_ode_system()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#a6f7d9914ea3740d8b6e5105a87aa2cd8',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::coupled_ode_system()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#aa09103f609e2d9bc433071465f9c1b9f',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::coupled_ode_system()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#ae9edecb8350c8aefd15c59c7e476e87d',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::coupled_ode_system()']]], + ['cov_5fmatrix_5fconstrain',['cov_matrix_constrain',['../namespacestan_1_1math.html#a1ad6b90cf2d3d3d25d2cf64a12effede',1,'stan::math::cov_matrix_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, typename math::index_type< Eigen::Matrix< T, Eigen::Dynamic, 1 > >::type K)'],['../namespacestan_1_1math.html#a417c6032fe62186f7c8fb5452e4173d8',1,'stan::math::cov_matrix_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, typename math::index_type< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > >::type K, T &lp)']]], + ['cov_5fmatrix_5fconstrain_5flkj',['cov_matrix_constrain_lkj',['../namespacestan_1_1math.html#a6e398c69a5845680ca945fa9ec6ec401',1,'stan::math::cov_matrix_constrain_lkj(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, size_t k)'],['../namespacestan_1_1math.html#ad179abe18f235b3000ad7a000b3abb29',1,'stan::math::cov_matrix_constrain_lkj(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, size_t k, T &lp)']]], + ['cov_5fmatrix_5ffree',['cov_matrix_free',['../namespacestan_1_1math.html#a485d3c2cd12e516bb13a1d48f9a43386',1,'stan::math']]], + ['cov_5fmatrix_5ffree_5flkj',['cov_matrix_free_lkj',['../namespacestan_1_1math.html#a9021324082d4241367fdd17da025a32d',1,'stan::math']]], + ['crossprod',['crossprod',['../namespacestan_1_1math.html#abd303ef11dc0c73cda2f743a3b67fbf1',1,'stan::math::crossprod(const Eigen::Matrix< fvar< T >, R, C > &m)'],['../namespacestan_1_1math.html#a62cc3a137ff3220bdd0137a52a4b9714',1,'stan::math::crossprod(const matrix_d &M)'],['../namespacestan_1_1math.html#a8605c80796abfc9c7082d001e8fd4501',1,'stan::math::crossprod(const matrix_v &M)']]], + ['csr_5fextract_5fu',['csr_extract_u',['../group__csr__format.html#ga989f196379081c782be06612b5731dcb',1,'stan::math::csr_extract_u(const Eigen::SparseMatrix< T, Eigen::RowMajor > &A)'],['../group__csr__format.html#ga221b0a757cf0703a929342d2b4cea763',1,'stan::math::csr_extract_u(const Eigen::Matrix< T, R, C > &A)']]], + ['csr_5fextract_5fv',['csr_extract_v',['../group__csr__format.html#gade78a62d0fd64b0d5da2370256cbb6e0',1,'stan::math::csr_extract_v(const Eigen::SparseMatrix< T, Eigen::RowMajor > &A)'],['../group__csr__format.html#ga01e6e2504c5eb6d0b289aa51172cd729',1,'stan::math::csr_extract_v(const Eigen::Matrix< T, R, C > &A)']]], + ['csr_5fextract_5fw',['csr_extract_w',['../group__csr__format.html#gae45bfd671760b4f442d272456b2ae01c',1,'stan::math::csr_extract_w(const Eigen::SparseMatrix< T, Eigen::RowMajor > &A)'],['../group__csr__format.html#ga0fdafcbb6706d2656fcf1ece6a20fad4',1,'stan::math::csr_extract_w(const Eigen::Matrix< T, R, C > &A)']]], + ['csr_5fmatrix_5ftimes_5fvector',['csr_matrix_times_vector',['../namespacestan_1_1math.html#a9e045cbd4b736cc0cf57025b1d8f72fe',1,'stan::math']]], + ['csr_5fto_5fdense_5fmatrix',['csr_to_dense_matrix',['../group__csr__format.html#gab28ee38f5eb51242d9c9280202baff5f',1,'stan::math']]], + ['csr_5fu_5fto_5fz',['csr_u_to_z',['../group__csr__format.html#gaf4e1bf7c971d0b9eb931654ea309a2bf',1,'stan::math']]], + ['cumulative_5fsum',['cumulative_sum',['../namespacestan_1_1math.html#a7340f6be8ae1e121c6d854005560fef5',1,'stan::math::cumulative_sum(const std::vector< T > &x)'],['../namespacestan_1_1math.html#a92fcacf229225bb313cf894cc1406a17',1,'stan::math::cumulative_sum(const Eigen::Matrix< T, R, C > &m)']]] +]; diff --git a/doc/api/html/search/functions_3.html b/doc/api/html/search/functions_3.html new file mode 100644 index 00000000000..ebf2eebd0f7 --- /dev/null +++ b/doc/api/html/search/functions_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/functions_3.js b/doc/api/html/search/functions_3.js new file mode 100644 index 00000000000..aa6c18d1f7e --- /dev/null +++ b/doc/api/html/search/functions_3.js @@ -0,0 +1,30 @@ +var searchData= +[ + ['decouple_5fstates',['decouple_states',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html#a4fa261df6b9bba8fa617000f661ab330',1,'stan::math::coupled_ode_system< F, double, double >::decouple_states()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#ae5a23e98720f934c3ce7d26901b34b6f',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::decouple_states()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#a8980f6cc5827c50c671266150388caee',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::decouple_states()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#ac07a596c9b7dbac47dbe7e6c1310d560',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::decouple_states()']]], + ['denorm_5fmin',['denorm_min',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a83a3f6cc9f8616ff3a1a0d25c13febd0',1,'std::numeric_limits< stan::math::fvar< T > >::denorm_min()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a28a2bf586d50372baccd5ad89656691e',1,'std::numeric_limits< stan::math::var >::denorm_min()']]], + ['derivative',['derivative',['../namespacestan_1_1math.html#a0597dca74b96a4287c6f848489288d44',1,'stan::math']]], + ['determinant',['determinant',['../namespacestan_1_1math.html#a63ab2582fc9a5a31d3d4f38a6420174e',1,'stan::math::determinant(const Eigen::Matrix< fvar< T >, R, C > &m)'],['../namespacestan_1_1math.html#ab65e9ab0e6f725c7e11068b0be2af84f',1,'stan::math::determinant(const Eigen::Matrix< T, R, C > &m)'],['../namespacestan_1_1math.html#a25cf09ca9596a572e5040deaecfba87f',1,'stan::math::determinant(const Eigen::Matrix< var, R, C > &m)']]], + ['diag_5fmatrix',['diag_matrix',['../namespacestan_1_1math.html#a8174ad2b40453c1bfcbdf59bf76e030d',1,'stan::math']]], + ['diag_5fpost_5fmultiply',['diag_post_multiply',['../namespacestan_1_1math.html#ada475ab6293a9b7e5d3e6c1f92315008',1,'stan::math']]], + ['diag_5fpre_5fmultiply',['diag_pre_multiply',['../namespacestan_1_1math.html#a97acdd27ef5fca2cd111010f6fccf6b8',1,'stan::math']]], + ['diagonal',['diagonal',['../namespacestan_1_1math.html#a2e96160f66cf84ab9a4bae027645e5a5',1,'stan::math']]], + ['digamma',['digamma',['../namespacestan_1_1math.html#a69702aaa101bf602072fa7bf5fccb48a',1,'stan::math::digamma(const fvar< T > &x)'],['../namespacestan_1_1math.html#a5eb54ce92709046c6d168e851d2481c7',1,'stan::math::digamma(double x)'],['../namespacestan_1_1math.html#a366ba0d22b63d45054e4a022e4ffa994',1,'stan::math::digamma(const stan::math::var &a)']]], + ['dims',['dims',['../namespacestan_1_1math.html#a2b9073e39033e56eb31344091f0170fd',1,'stan::math::dims(const T &x, std::vector< int > &result)'],['../namespacestan_1_1math.html#af95a2dcde478c06e3543511821618902',1,'stan::math::dims(const Eigen::Matrix< T, R, C > &x, std::vector< int > &result)'],['../namespacestan_1_1math.html#a467589eef4220a87d457c8a268a1fd5d',1,'stan::math::dims(const std::vector< T > &x, std::vector< int > &result)'],['../namespacestan_1_1math.html#a33777ee768c7032331ca8b92e5323384',1,'stan::math::dims(const T &x)']]], + ['dirichlet_5flog',['dirichlet_log',['../namespacestan_1_1math.html#a301c4fce1eeb151070f72a81c33ccde4',1,'stan::math::dirichlet_log(const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta, const Eigen::Matrix< T_prior_sample_size, Eigen::Dynamic, 1 > &alpha)'],['../namespacestan_1_1math.html#a610a90b8b664189d397c8549c2aa0214',1,'stan::math::dirichlet_log(const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta, const Eigen::Matrix< T_prior_sample_size, Eigen::Dynamic, 1 > &alpha)']]], + ['dirichlet_5frng',['dirichlet_rng',['../namespacestan_1_1math.html#acb288324f889b7da57f2960570f459ea',1,'stan::math']]], + ['dist',['dist',['../namespacestan_1_1math.html#ae86020a972c6efc6b3407c3cfc30f4a6',1,'stan::math']]], + ['distance',['distance',['../namespacestan_1_1math.html#acc0a62287bdf0c0420386fccc0a13ca9',1,'stan::math']]], + ['divide',['divide',['../namespacestan_1_1math.html#a0bbb4ba8df580321dbf92d0c563cc523',1,'stan::math::divide(const T1 &v, const T2 &c)'],['../namespacestan_1_1math.html#ab1f35909d12ac43b74d180a49d68b674',1,'stan::math::divide(const Eigen::Matrix< fvar< T >, R, C > &v, const fvar< T > &c)'],['../namespacestan_1_1math.html#abfbe71733db295fc195305aee8437732',1,'stan::math::divide(const Eigen::Matrix< fvar< T >, R, C > &v, const double c)'],['../namespacestan_1_1math.html#ab549dab5e1bff51b30678fbd8d1f8a41',1,'stan::math::divide(const Eigen::Matrix< double, R, C > &v, const fvar< T > &c)'],['../namespacestan_1_1math.html#a082ee76b34a2ea656d2c8ab9186c1a2b',1,'stan::math::divide(const Eigen::Matrix< double, R, C > &m, T c)'],['../namespacestan_1_1math.html#aaf04cebee51d38a543e0ec689ae1399c',1,'stan::math::divide(const int x, const int y)'],['../namespacestan_1_1math.html#a66343caaf5970081f4eedc8b178bc4d0',1,'stan::math::divide(double x, double y)'],['../namespacestan_1_1math.html#ae0aad4b9e552bacdbcac3b0bbd783d31',1,'stan::math::divide(const T1 &v, const T2 &c)'],['../namespacestan_1_1math.html#a818fcac13304ea5c8679b3fc38e51ac1',1,'stan::math::divide(const Eigen::Matrix< T1, R, C > &v, const T2 &c)']]], + ['do_5flkj_5fconstant',['do_lkj_constant',['../namespacestan_1_1math.html#a3832e36ec9ea72ce740753adb3b0d132',1,'stan::math']]], + ['domain_5ferror',['domain_error',['../namespacestan_1_1math.html#aeebafad688145fc64353e4f455d014bd',1,'stan::math::domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)'],['../namespacestan_1_1math.html#a108d489a4a749c8e429b519d9e26c157',1,'stan::math::domain_error(const char *function, const char *name, const T &y, const char *msg1)']]], + ['domain_5ferror_5fvec',['domain_error_vec',['../namespacestan_1_1math.html#a7c23bfe9ebcb5747ed175a59b2182072',1,'stan::math::domain_error_vec(const char *function, const char *name, const T &y, const size_t i, const char *msg1, const char *msg2)'],['../namespacestan_1_1math.html#ae3f55be80da8ff729d5850c653d2b28d',1,'stan::math::domain_error_vec(const char *function, const char *name, const T &y, const size_t i, const char *msg)']]], + ['dot',['dot',['../namespacestan_1_1math.html#afd3b73319bd8df9dad1d3902997d8e89',1,'stan::math']]], + ['dot_5fproduct',['dot_product',['../namespacestan_1_1math.html#a495321127b7e0ebdd4d52654d226e16b',1,'stan::math::dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)'],['../namespacestan_1_1math.html#af55524d5b711066af73968df35ddeb2c',1,'stan::math::dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)'],['../namespacestan_1_1math.html#a74f6624e3a637cb98d3ae10a42a44135',1,'stan::math::dot_product(const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)'],['../namespacestan_1_1math.html#a4a386f813bee88dc6d771ba0f0c90f82',1,'stan::math::dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2, size_type &length)'],['../namespacestan_1_1math.html#af58d380f8784b977f1372ca00caa779e',1,'stan::math::dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2, size_type &length)'],['../namespacestan_1_1math.html#a7893eb903c5877be710060cc1f733ece',1,'stan::math::dot_product(const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2, size_type &length)'],['../namespacestan_1_1math.html#a3dfb7deab1e93815803096f298e722a3',1,'stan::math::dot_product(const std::vector< fvar< T > > &v1, const std::vector< fvar< T > > &v2)'],['../namespacestan_1_1math.html#ade870e95240c98560c7146fc1569811e',1,'stan::math::dot_product(const std::vector< double > &v1, const std::vector< fvar< T > > &v2)'],['../namespacestan_1_1math.html#a092173dbe404bf00d732a86b18ed7cc0',1,'stan::math::dot_product(const std::vector< fvar< T > > &v1, const std::vector< double > &v2)'],['../namespacestan_1_1math.html#a4d2848b5eca56fff0922803874f97b58',1,'stan::math::dot_product(const std::vector< fvar< T > > &v1, const std::vector< fvar< T > > &v2, size_type &length)'],['../namespacestan_1_1math.html#af6af240b31f8d6bc2c9acce4b8fc3ebd',1,'stan::math::dot_product(const std::vector< double > &v1, const std::vector< fvar< T > > &v2, size_type &length)'],['../namespacestan_1_1math.html#a590dde9498d871fff74858d1f7ef2667',1,'stan::math::dot_product(const std::vector< fvar< T > > &v1, const std::vector< double > &v2, size_type &length)'],['../namespacestan_1_1math.html#af8d73851895fb151fdf79e55bf33e98e',1,'stan::math::dot_product(const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)'],['../namespacestan_1_1math.html#a58da447df259e9e092e8fd910b338e1f',1,'stan::math::dot_product(const double *v1, const double *v2, size_t length)'],['../namespacestan_1_1math.html#ab7cd93708bf432b3bd3d284958972ede',1,'stan::math::dot_product(const std::vector< double > &v1, const std::vector< double > &v2)'],['../namespacestan_1_1math.html#ad70b6ae039b48ca04b071daf5e265363',1,'stan::math::dot_product(const Eigen::Matrix< T1, R1, C1 > &v1, const Eigen::Matrix< T2, R2, C2 > &v2)'],['../namespacestan_1_1math.html#afc208771c9df3e3e96901fb27a05dde0',1,'stan::math::dot_product(const T1 *v1, const T2 *v2, size_t length)'],['../namespacestan_1_1math.html#a07462a84486826d0b7fe3cfebb51d386',1,'stan::math::dot_product(const std::vector< T1 > &v1, const std::vector< T2 > &v2)']]], + ['dot_5fself',['dot_self',['../namespacestan_1_1math.html#a1edae52ce70f3f0a9f7eb15f3416007c',1,'stan::math::dot_self(const Eigen::Matrix< fvar< T >, R, C > &v)'],['../namespacestan_1_1math.html#a8a6a4ef7c701db7984297d153580c8d4',1,'stan::math::dot_self(const std::vector< double > &x)'],['../namespacestan_1_1math.html#ac81ab85d390fcb594884773a85fac657',1,'stan::math::dot_self(const Eigen::Matrix< double, R, C > &v)'],['../namespacestan_1_1math.html#add9f13b58d14d7b7b8cc43ab30a434d0',1,'stan::math::dot_self(const Eigen::Matrix< var, R, C > &v)']]], + ['double_5fexponential_5fccdf_5flog',['double_exponential_ccdf_log',['../namespacestan_1_1math.html#ab670b33f7d9f8cd15406cce67ffbe2c9',1,'stan::math']]], + ['double_5fexponential_5fcdf',['double_exponential_cdf',['../namespacestan_1_1math.html#a658493a49a4e83ac55393a5d43c47ba7',1,'stan::math']]], + ['double_5fexponential_5fcdf_5flog',['double_exponential_cdf_log',['../namespacestan_1_1math.html#aa71f7d99df6f1817ad1badc771e30a5e',1,'stan::math']]], + ['double_5fexponential_5flog',['double_exponential_log',['../namespacestan_1_1math.html#a465bb5ed0b5bb209aa43f2ac71fc3597',1,'stan::math::double_exponential_log(const T_y &y, const T_loc &mu, const T_scale &sigma)'],['../namespacestan_1_1math.html#ac96b2758687c3d1eab564e67d18f8922',1,'stan::math::double_exponential_log(const T_y &y, const T_loc &mu, const T_scale &sigma)']]], + ['double_5fexponential_5frng',['double_exponential_rng',['../namespacestan_1_1math.html#aa6ebff3092eb40851fa1f63b7b7196f8',1,'stan::math']]], + ['dummy_5fprecision',['dummy_precision',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a4c08b4bba00a46601d760d90fdba943d',1,'Eigen::NumTraits< stan::math::fvar< T > >::dummy_precision()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#a66eef3581ef6582fbb03a30749bc87b2',1,'Eigen::NumTraits< stan::math::var >::dummy_precision()']]] +]; diff --git a/doc/api/html/search/functions_4.html b/doc/api/html/search/functions_4.html new file mode 100644 index 00000000000..7317ea9163d --- /dev/null +++ b/doc/api/html/search/functions_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/functions_4.js b/doc/api/html/search/functions_4.js new file mode 100644 index 00000000000..802b7f0aea4 --- /dev/null +++ b/doc/api/html/search/functions_4.js @@ -0,0 +1,26 @@ +var searchData= +[ + ['e',['e',['../namespacestan_1_1math.html#a3b650a0131d41167ef4837ecc7d02be5',1,'stan::math']]], + ['eigenvalues_5fsym',['eigenvalues_sym',['../namespacestan_1_1math.html#a2e454ec91241f2f6e70aa05e7b7698ff',1,'stan::math']]], + ['eigenvectors_5fsym',['eigenvectors_sym',['../namespacestan_1_1math.html#a9fd77067fef0a78dd5d8f9527969631e',1,'stan::math']]], + ['elt_5fdivide',['elt_divide',['../namespacestan_1_1math.html#a75c3cc187f569c795118c72bcc1e5c58',1,'stan::math::elt_divide(const Eigen::Matrix< T1, R, C > &m1, const Eigen::Matrix< T2, R, C > &m2)'],['../namespacestan_1_1math.html#adc5d04e1b1dde0ea7455380ec27d4528',1,'stan::math::elt_divide(const Eigen::Matrix< T1, R, C > &m, T2 s)'],['../namespacestan_1_1math.html#ad4d728ca306346624b833cee2777c23d',1,'stan::math::elt_divide(T1 s, const Eigen::Matrix< T2, R, C > &m)']]], + ['elt_5fmultiply',['elt_multiply',['../namespacestan_1_1math.html#a2edc3d65b32928692984bd66a1b3bb56',1,'stan::math']]], + ['empty_5fnested',['empty_nested',['../namespacestan_1_1math.html#a430f171295b91277dc60dfa2177c7c0b',1,'stan::math']]], + ['epsilon',['epsilon',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#abf9a7000542d5141f8f6791282aecc5e',1,'std::numeric_limits< stan::math::fvar< T > >::epsilon()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a8532a2c2276f85829398e8eed1fffede',1,'Eigen::NumTraits< stan::math::fvar< T > >::epsilon()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a9721f6791342af12c178669b3ed87ccc',1,'std::numeric_limits< stan::math::var >::epsilon()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#a6ee32c875e248190487e374103f1d599',1,'Eigen::NumTraits< stan::math::var >::epsilon()']]], + ['erf',['erf',['../namespacestan_1_1math.html#aa283efca22c0544054a6534443e6e762',1,'stan::math::erf(const fvar< T > &x)'],['../namespacestan_1_1math.html#a759d52872682fdf0d6a7a6d75b4f1d9e',1,'stan::math::erf(const var &a)']]], + ['erfc',['erfc',['../namespacestan_1_1math.html#ab4c763e4f09069eed96a4e96e33ea8ea',1,'stan::math::erfc(const fvar< T > &x)'],['../namespacestan_1_1math.html#a8a8543e9c729e794bcbdff2ed223eb45',1,'stan::math::erfc(const var &a)']]], + ['eval_5fgevv',['eval_gevv',['../classstan_1_1math_1_1gevv__vvv__vari.html#a9baad1e3c1fe91eabc1cdb68982426df',1,'stan::math::gevv_vvv_vari']]], + ['exp',['exp',['../namespacestan_1_1math.html#a11f31444e8584e4debf0d6b706d66880',1,'stan::math::exp(const fvar< T > &x)'],['../namespacestan_1_1math.html#a7ad4663394747a548b42f8cbe9def1f7',1,'stan::math::exp(const Eigen::Matrix< T, Rows, Cols > &m)'],['../namespacestan_1_1math.html#ab3bd08f492d4ae400850ecb98b9b6cb9',1,'stan::math::exp(const Eigen::Matrix< double, Rows, Cols > &m)'],['../namespacestan_1_1math.html#ae43b048d4a5f53f94501773c93689a65',1,'stan::math::exp(const var &a)']]], + ['exp2',['exp2',['../namespacestan_1_1math.html#a8c3a577694c8f584e56160580fe0821b',1,'stan::math::exp2(const fvar< T > &x)'],['../namespacestan_1_1math.html#a0ef734d7c3b8ebd689012295bf826e94',1,'stan::math::exp2(const T y)'],['../namespacestan_1_1math.html#a9fd4650bbf246a10ac798c71da8b99d5',1,'stan::math::exp2(const var &a)']]], + ['exp_5fmod_5fnormal_5fccdf_5flog',['exp_mod_normal_ccdf_log',['../namespacestan_1_1math.html#a497ff815eeadaffe3204d33359c4be82',1,'stan::math']]], + ['exp_5fmod_5fnormal_5fcdf',['exp_mod_normal_cdf',['../namespacestan_1_1math.html#a2b29301645f48dedc57b97409062250c',1,'stan::math']]], + ['exp_5fmod_5fnormal_5fcdf_5flog',['exp_mod_normal_cdf_log',['../namespacestan_1_1math.html#ad0e32ac964461952d77df48cd30c6f1d',1,'stan::math']]], + ['exp_5fmod_5fnormal_5flog',['exp_mod_normal_log',['../namespacestan_1_1math.html#af27bb81f9220a9ba9082903fd55dff66',1,'stan::math::exp_mod_normal_log(const T_y &y, const T_loc &mu, const T_scale &sigma, const T_inv_scale &lambda)'],['../namespacestan_1_1math.html#a50a3cd94db2760437551ea466247cf8e',1,'stan::math::exp_mod_normal_log(const T_y &y, const T_loc &mu, const T_scale &sigma, const T_inv_scale &lambda)']]], + ['exp_5fmod_5fnormal_5frng',['exp_mod_normal_rng',['../namespacestan_1_1math.html#a40d3c6fbf610e2c0e997a039f2ed98e8',1,'stan::math']]], + ['expm1',['expm1',['../namespacestan_1_1math.html#a8a76b658b94fcf8943f4fb41c586ec94',1,'stan::math::expm1(const fvar< T > &x)'],['../namespacestan_1_1math.html#a8c632ff37556a4989fb351042da3a05a',1,'stan::math::expm1(const stan::math::var &a)']]], + ['exponential_5fccdf_5flog',['exponential_ccdf_log',['../namespacestan_1_1math.html#a42c92f31b24600c6ce05b4f21f54fb00',1,'stan::math']]], + ['exponential_5fcdf',['exponential_cdf',['../namespacestan_1_1math.html#ac753dcf58b69f0bbf7b001bfe19a3e44',1,'stan::math']]], + ['exponential_5fcdf_5flog',['exponential_cdf_log',['../namespacestan_1_1math.html#a8fbf986074ea063853c8d244c3c17e0f',1,'stan::math']]], + ['exponential_5flog',['exponential_log',['../namespacestan_1_1math.html#addcdf998d9f336fd9e4118acc6c7a129',1,'stan::math::exponential_log(const T_y &y, const T_inv_scale &beta)'],['../namespacestan_1_1math.html#af3653c4e36237f4d7403af9f64abbcd2',1,'stan::math::exponential_log(const T_y &y, const T_inv_scale &beta)']]], + ['exponential_5frng',['exponential_rng',['../namespacestan_1_1math.html#a6cfcce609912c9a6e1b2fad1e5055a1d',1,'stan::math']]] +]; diff --git a/doc/api/html/search/functions_5.html b/doc/api/html/search/functions_5.html new file mode 100644 index 00000000000..1f1d9ce1b73 --- /dev/null +++ b/doc/api/html/search/functions_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/functions_5.js b/doc/api/html/search/functions_5.js new file mode 100644 index 00000000000..1e35420e0c1 --- /dev/null +++ b/doc/api/html/search/functions_5.js @@ -0,0 +1,27 @@ +var searchData= +[ + ['f32',['F32',['../namespacestan_1_1math.html#ada2421cf831c518a6260f60d19eb5c32',1,'stan::math']]], + ['fabs',['fabs',['../namespacestan_1_1math.html#a6c79c9be5c64873b74f3c6924fef6911',1,'stan::math::fabs(const fvar< T > &x)'],['../namespacestan_1_1math.html#aea8428395b18c89bc01669915993b8e7',1,'stan::math::fabs(const var &a)']]], + ['factor_5fcov_5fmatrix',['factor_cov_matrix',['../namespacestan_1_1math.html#a9d6ef71b2e1a2a216a031d8403458bdd',1,'stan::math']]], + ['factor_5fu',['factor_U',['../namespacestan_1_1math.html#aa6d09763679360f53f07ae20e8efc262',1,'stan::math']]], + ['falling_5ffactorial',['falling_factorial',['../namespacestan_1_1math.html#aae3974a012285e3d020d46cc454812ed',1,'stan::math::falling_factorial(const fvar< T > &x, const fvar< T > &n)'],['../namespacestan_1_1math.html#a203c9c81e4a4b48e47e052422fcf679d',1,'stan::math::falling_factorial(const fvar< T > &x, const double n)'],['../namespacestan_1_1math.html#a5a3c08d051a8e4bc83c6ad9132af4099',1,'stan::math::falling_factorial(const double x, const fvar< T > &n)'],['../namespacestan_1_1math.html#ad65933117ab43cb486fb65023d8e5f3c',1,'stan::math::falling_factorial(const T1 x, const T2 n)'],['../namespacestan_1_1math.html#a96fdf588b0a37df21c5b67ed7370b003',1,'stan::math::falling_factorial(const var &a, const double &b)'],['../namespacestan_1_1math.html#a78f5570887f609618c63c727afda46ba',1,'stan::math::falling_factorial(const var &a, const var &b)'],['../namespacestan_1_1math.html#add6fa4b14f17cc4df149df09224a18b9',1,'stan::math::falling_factorial(const double &a, const var &b)']]], + ['fdim',['fdim',['../namespacestan_1_1math.html#a535e91c206d8cfd9e61042c25108f23a',1,'stan::math::fdim(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a9af93d6decc446332dedd367db295bcb',1,'stan::math::fdim(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#a9448d07d7e87cd638f65ce95350c0e8b',1,'stan::math::fdim(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a7d2db622c0f83134b7f3ebd1eec3c1d6',1,'stan::math::fdim(T1 a, T2 b)'],['../namespacestan_1_1math.html#a6f899b184aa38d3a5f814518611a0666',1,'stan::math::fdim(const stan::math::var &a, const stan::math::var &b)'],['../namespacestan_1_1math.html#a6fe00d070fb14766341060f7f0fe2627',1,'stan::math::fdim(const double &a, const stan::math::var &b)'],['../namespacestan_1_1math.html#a014a74412301cf66626baa1fe1491d94',1,'stan::math::fdim(const stan::math::var &a, const double &b)']]], + ['fill',['fill',['../namespacestan_1_1math.html#a6d362e53d3d40b61e68fdd08dc5eb38b',1,'stan::math::fill(T &x, const S &y)'],['../namespacestan_1_1math.html#a73e791042ed648602eed1754679feff4',1,'stan::math::fill(Eigen::Matrix< T, R, C > &x, const S &y)'],['../namespacestan_1_1math.html#aa7f5d81c4d45f2407096def8810ffe00',1,'stan::math::fill(std::vector< T > &x, const S &y)']]], + ['finite_5fdiff_5fgrad_5fhessian',['finite_diff_grad_hessian',['../namespacestan_1_1math.html#a138f3242eba971c17756586ace2c15d3',1,'stan::math']]], + ['finite_5fdiff_5fgradient',['finite_diff_gradient',['../namespacestan_1_1math.html#ab34b9d54bbdc2b13f358a73a3dface45',1,'stan::math']]], + ['finite_5fdiff_5fhess_5fhelper',['finite_diff_hess_helper',['../namespacestan_1_1math.html#a9cfae14a02b57bee53b454f64b58c0b1',1,'stan::math']]], + ['finite_5fdiff_5fhessian',['finite_diff_hessian',['../namespacestan_1_1math.html#a8b6ed64f691a457cb6691d7b478b4a1d',1,'stan::math']]], + ['floor',['floor',['../namespacestan_1_1math.html#a16e5a2666b377e37fe807765ba5f6aaf',1,'stan::math::floor(const fvar< T > &x)'],['../namespacestan_1_1math.html#a66dea6b6d18e39c5b0f38d3204aa04d5',1,'stan::math::floor(const var &a)']]], + ['fma',['fma',['../namespacestan_1_1math.html#ad52e5d20122b9db1d2ec7c57417d19b3',1,'stan::math::fma(const fvar< T1 > &x1, const fvar< T2 > &x2, const fvar< T3 > &x3)'],['../namespacestan_1_1math.html#abc95573545bf325172b18d2ec6b4f3f4',1,'stan::math::fma(const T1 &x1, const fvar< T2 > &x2, const fvar< T3 > &x3)'],['../namespacestan_1_1math.html#aebb72eea615a5b2effad60c4f5c1ccbc',1,'stan::math::fma(const fvar< T1 > &x1, const T2 &x2, const fvar< T3 > &x3)'],['../namespacestan_1_1math.html#a1e283e1daef5282717309ddb1302d5dc',1,'stan::math::fma(const fvar< T1 > &x1, const fvar< T2 > &x2, const T3 &x3)'],['../namespacestan_1_1math.html#a085357acaef6e7ac8f3e7d16e6b38aa3',1,'stan::math::fma(const T1 &x1, const T2 &x2, const fvar< T3 > &x3)'],['../namespacestan_1_1math.html#afaf7c6a98ccaf08b9964b9d9258c6d13',1,'stan::math::fma(const fvar< T1 > &x1, const T2 &x2, const T3 &x3)'],['../namespacestan_1_1math.html#a31f25245e8d92c7e406808b1aad777a9',1,'stan::math::fma(const T1 &x1, const fvar< T2 > &x2, const T3 &x3)'],['../namespacestan_1_1math.html#a3f3ab44e4f8a8430bd1fd19e37101555',1,'stan::math::fma(const stan::math::var &a, const stan::math::var &b, const stan::math::var &c)'],['../namespacestan_1_1math.html#ab57371eb5b1cf21e7fa089e89758bdef',1,'stan::math::fma(const stan::math::var &a, const stan::math::var &b, const double &c)'],['../namespacestan_1_1math.html#a2d1708d9819f74c9b8663c802a2d1a2a',1,'stan::math::fma(const stan::math::var &a, const double &b, const stan::math::var &c)'],['../namespacestan_1_1math.html#a6a7340a4f23e33e671e53c2582c63272',1,'stan::math::fma(const stan::math::var &a, const double &b, const double &c)'],['../namespacestan_1_1math.html#ab4becb131eda9f3e3f1ca06e373fea66',1,'stan::math::fma(const double &a, const stan::math::var &b, const double &c)'],['../namespacestan_1_1math.html#ad6917da974098b0bb02883839f1ae0e1',1,'stan::math::fma(const double &a, const double &b, const stan::math::var &c)'],['../namespacestan_1_1math.html#ae9f288e71a8a7012ad123ca361f6a739',1,'stan::math::fma(const double &a, const stan::math::var &b, const stan::math::var &c)']]], + ['fmax',['fmax',['../namespacestan_1_1math.html#a1f0dc47791c87f86c9f93d2cba273c25',1,'stan::math::fmax(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#adb8de59f858592b97409ca71d68f4442',1,'stan::math::fmax(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#aad0fec224f4c675618141528549640ba',1,'stan::math::fmax(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#ab57bd2f169eb820c21273293d2cfa01b',1,'stan::math::fmax(const stan::math::var &a, const stan::math::var &b)'],['../namespacestan_1_1math.html#a5e72a34aed1af28919d940399a07c3d0',1,'stan::math::fmax(const stan::math::var &a, const double &b)'],['../namespacestan_1_1math.html#a8a200e969bd57383ff4f89516c0690b5',1,'stan::math::fmax(const double &a, const stan::math::var &b)']]], + ['fmin',['fmin',['../namespacestan_1_1math.html#ae765dc2aa344a1893f66bffbdab0267c',1,'stan::math::fmin(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a6ade89f8b882cb15b0478176fd997cd1',1,'stan::math::fmin(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a00cdcc6569e6ac1d6a40d2f7157566a1',1,'stan::math::fmin(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#a3ff067261be560b2502178b590a7a068',1,'stan::math::fmin(const stan::math::var &a, const stan::math::var &b)'],['../namespacestan_1_1math.html#a2e9c72371629b0a266acc6795d723aa6',1,'stan::math::fmin(const stan::math::var &a, double b)'],['../namespacestan_1_1math.html#af78692904b139471b470740ce866468e',1,'stan::math::fmin(double a, const stan::math::var &b)']]], + ['fmod',['fmod',['../namespacestan_1_1math.html#ac9f40b2c56584ebd33037769fddc4d3f',1,'stan::math::fmod(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#ad0970b532a9f823834c492e98356e730',1,'stan::math::fmod(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#a5fdbe01b71fb403869c2fa9ebb1fb90c',1,'stan::math::fmod(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a935933626162d429e5a7f06ca0bde103',1,'stan::math::fmod(const var &a, const var &b)'],['../namespacestan_1_1math.html#ab9ecd1367428932c3515ef3c374e6e9e',1,'stan::math::fmod(const var &a, const double b)'],['../namespacestan_1_1math.html#a6806c0d68c9e23e905b4ca36119734bd',1,'stan::math::fmod(const double a, const var &b)']]], + ['fpclassify',['fpclassify',['../namespaceboost_1_1math.html#addcd4cb377863a7bb79a82dc82de96e1',1,'boost::math']]], + ['frechet_5fccdf_5flog',['frechet_ccdf_log',['../namespacestan_1_1math.html#a34680a4c6abd1d998326e44a212aa6d8',1,'stan::math']]], + ['frechet_5fcdf',['frechet_cdf',['../namespacestan_1_1math.html#a252058aec5645d61efd61e155b788be7',1,'stan::math']]], + ['frechet_5fcdf_5flog',['frechet_cdf_log',['../namespacestan_1_1math.html#aad1ba53b1f236710eed4f8377dc06471',1,'stan::math']]], + ['frechet_5flog',['frechet_log',['../namespacestan_1_1math.html#a17f910a5107250d4b47468fe1e7487cc',1,'stan::math::frechet_log(const T_y &y, const T_shape &alpha, const T_scale &sigma)'],['../namespacestan_1_1math.html#a63f05e7ee3898b2f48b4b2658dad51c5',1,'stan::math::frechet_log(const T_y &y, const T_shape &alpha, const T_scale &sigma)']]], + ['frechet_5frng',['frechet_rng',['../namespacestan_1_1math.html#a85bd113906fdeaf57e662a598ad99689',1,'stan::math']]], + ['free_5fall',['free_all',['../classstan_1_1math_1_1stack__alloc.html#af65518d98ebd980303efa6cc3af76073',1,'stan::math::stack_alloc']]], + ['fvar',['fvar',['../structstan_1_1math_1_1fvar.html#ae4c326ef0c87161eca2431e8698664c2',1,'stan::math::fvar::fvar()'],['../structstan_1_1math_1_1fvar.html#a923f4b28c579d63838897b7199af0b9d',1,'stan::math::fvar::fvar(const fvar< T > &x)'],['../structstan_1_1math_1_1fvar.html#a309b11ed4f7f0b807e5a99ffe4544624',1,'stan::math::fvar::fvar(const TV &val, const TD &deriv)'],['../structstan_1_1math_1_1fvar.html#a9d15782da37b06ece7d293c94e0150a3',1,'stan::math::fvar::fvar(const TV &val)']]] +]; diff --git a/doc/api/html/search/functions_6.html b/doc/api/html/search/functions_6.html new file mode 100644 index 00000000000..c9faaa6a996 --- /dev/null +++ b/doc/api/html/search/functions_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/functions_6.js b/doc/api/html/search/functions_6.js new file mode 100644 index 00000000000..9e100d8c53d --- /dev/null +++ b/doc/api/html/search/functions_6.js @@ -0,0 +1,31 @@ +var searchData= +[ + ['gamma_5fccdf_5flog',['gamma_ccdf_log',['../namespacestan_1_1math.html#ae2f6f9efb0e1bacdc6415b6e0d6d6f00',1,'stan::math']]], + ['gamma_5fcdf',['gamma_cdf',['../namespacestan_1_1math.html#ad927dbc83dc93b41cfb7a1ab6dccbd9e',1,'stan::math']]], + ['gamma_5fcdf_5flog',['gamma_cdf_log',['../namespacestan_1_1math.html#af878fa8fc2eaeec210aff65ec83f5323',1,'stan::math']]], + ['gamma_5flog',['gamma_log',['../namespacestan_1_1math.html#aab77693b33e10406f7ca5d85ce97107f',1,'stan::math::gamma_log(const T_y &y, const T_shape &alpha, const T_inv_scale &beta)'],['../namespacestan_1_1math.html#a03197f2fe5c3a96f77a9727f2db29d38',1,'stan::math::gamma_log(const T_y &y, const T_shape &alpha, const T_inv_scale &beta)']]], + ['gamma_5fp',['gamma_p',['../namespacestan_1_1math.html#aa0fad89bd8e78eee42230dd92bcf1b15',1,'stan::math::gamma_p(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#abdd446def1c6803882dfa29838addc79',1,'stan::math::gamma_p(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#a764de29e557ee65caaff1b94388a9367',1,'stan::math::gamma_p(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#aed411d626d4ae01a76584c454a83673f',1,'stan::math::gamma_p(double x, double a)'],['../namespacestan_1_1math.html#ad9ec26628247b9e474e1b3254aae0b32',1,'stan::math::gamma_p(const stan::math::var &a, const stan::math::var &b)'],['../namespacestan_1_1math.html#ad392cbaa9872996da3127a359929cea4',1,'stan::math::gamma_p(const stan::math::var &a, const double &b)'],['../namespacestan_1_1math.html#aa3db0274d59a42798f93e66d0d411dd8',1,'stan::math::gamma_p(const double &a, const stan::math::var &b)']]], + ['gamma_5fq',['gamma_q',['../namespacestan_1_1math.html#a743267027c96ebef239be63589a6d594',1,'stan::math::gamma_q(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a7c57ec58c3534caee0c89fbdf56ed28d',1,'stan::math::gamma_q(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#a2ac85a7ace8ea6fdaa4fd19a40e8c87b',1,'stan::math::gamma_q(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a0830ba049b81bc98ea9fbcf1eb7b4bd6',1,'stan::math::gamma_q(double x, double a)'],['../namespacestan_1_1math.html#ac8ed9105d1156ceaca26ab323f1a2648',1,'stan::math::gamma_q(const stan::math::var &a, const stan::math::var &b)'],['../namespacestan_1_1math.html#af97d9968df786f813758bce4a8909f62',1,'stan::math::gamma_q(const stan::math::var &a, const double &b)'],['../namespacestan_1_1math.html#acb9a338d5f5fd18bddf0e8225f6cc27d',1,'stan::math::gamma_q(const double &a, const stan::math::var &b)']]], + ['gamma_5frng',['gamma_rng',['../namespacestan_1_1math.html#aacf6ec5f55f56b5756804a1771259a58',1,'stan::math']]], + ['gaussian_5fdlm_5fobs_5flog',['gaussian_dlm_obs_log',['../namespacestan_1_1math.html#a439b46e03e6dbd7269b60989cf31de85',1,'stan::math::gaussian_dlm_obs_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_F, Eigen::Dynamic, Eigen::Dynamic > &F, const Eigen::Matrix< T_G, Eigen::Dynamic, Eigen::Dynamic > &G, const Eigen::Matrix< T_V, Eigen::Dynamic, Eigen::Dynamic > &V, const Eigen::Matrix< T_W, Eigen::Dynamic, Eigen::Dynamic > &W, const Eigen::Matrix< T_m0, Eigen::Dynamic, 1 > &m0, const Eigen::Matrix< T_C0, Eigen::Dynamic, Eigen::Dynamic > &C0)'],['../namespacestan_1_1math.html#ad7da6e923e5a19bed55c94a109d2e4cd',1,'stan::math::gaussian_dlm_obs_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_F, Eigen::Dynamic, Eigen::Dynamic > &F, const Eigen::Matrix< T_G, Eigen::Dynamic, Eigen::Dynamic > &G, const Eigen::Matrix< T_V, Eigen::Dynamic, Eigen::Dynamic > &V, const Eigen::Matrix< T_W, Eigen::Dynamic, Eigen::Dynamic > &W, const Eigen::Matrix< T_m0, Eigen::Dynamic, 1 > &m0, const Eigen::Matrix< T_C0, Eigen::Dynamic, Eigen::Dynamic > &C0)'],['../namespacestan_1_1math.html#a9a72bf8a0cfb7fd70089f9fb7fb5ce9a',1,'stan::math::gaussian_dlm_obs_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_F, Eigen::Dynamic, Eigen::Dynamic > &F, const Eigen::Matrix< T_G, Eigen::Dynamic, Eigen::Dynamic > &G, const Eigen::Matrix< T_V, Eigen::Dynamic, 1 > &V, const Eigen::Matrix< T_W, Eigen::Dynamic, Eigen::Dynamic > &W, const Eigen::Matrix< T_m0, Eigen::Dynamic, 1 > &m0, const Eigen::Matrix< T_C0, Eigen::Dynamic, Eigen::Dynamic > &C0)'],['../namespacestan_1_1math.html#a99ad1baa9f1a423304ac19aa0e345075',1,'stan::math::gaussian_dlm_obs_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_F, Eigen::Dynamic, Eigen::Dynamic > &F, const Eigen::Matrix< T_G, Eigen::Dynamic, Eigen::Dynamic > &G, const Eigen::Matrix< T_V, Eigen::Dynamic, 1 > &V, const Eigen::Matrix< T_W, Eigen::Dynamic, Eigen::Dynamic > &W, const Eigen::Matrix< T_m0, Eigen::Dynamic, 1 > &m0, const Eigen::Matrix< T_C0, Eigen::Dynamic, Eigen::Dynamic > &C0)']]], + ['get',['get',['../namespacestan.html#a431bd201f09a215cccb16cda10a1e840',1,'stan::get(const std::vector< T > &x, size_t n)'],['../namespacestan.html#aa0b8055d979ee18e43048b99eccb5640',1,'stan::get(const Eigen::Matrix< T, R, C > &m, size_t n)'],['../namespacestan.html#a2e926e5518c0c2f289f79d23010815d3',1,'stan::get(const T &x, size_t n)']]], + ['get_5fbase1',['get_base1',['../namespacestan_1_1math.html#a7535c86e2c9ee9d5391a8cc63187317e',1,'stan::math::get_base1(const std::vector< T > &x, size_t i, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#aca7c84b936da0d3422507927cf9a68cc',1,'stan::math::get_base1(const std::vector< std::vector< T > > &x, size_t i1, size_t i2, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#a714e39ba9fcbbd90c787a51d511c9af1',1,'stan::math::get_base1(const std::vector< std::vector< std::vector< T > > > &x, size_t i1, size_t i2, size_t i3, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#aa23b355397df347249da513307fd6667',1,'stan::math::get_base1(const std::vector< std::vector< std::vector< std::vector< T > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#a25c1fac0445beea55c521c94f360e13e',1,'stan::math::get_base1(const std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#a20a82151947fc8816c5ce5b7bc6d8abd',1,'stan::math::get_base1(const std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, size_t i6, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#a6fb72caff19c8ce19dc6e3c25c79f7b8',1,'stan::math::get_base1(const std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, size_t i6, size_t i7, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#accc97dd76490d575638ebb22da233a53',1,'stan::math::get_base1(const std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, size_t i6, size_t i7, size_t i8, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#a8d5ea3228150cb118441cced9ed49a92',1,'stan::math::get_base1(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &x, size_t m, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#a51091bb67549e42c241f4e08e7d291d6',1,'stan::math::get_base1(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &x, size_t m, size_t n, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#ab0dbeed50ff3f8630ea3cd54f9ecb804',1,'stan::math::get_base1(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, size_t m, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#abf9dcd5236495d3f581b31dd05b9a227',1,'stan::math::get_base1(const Eigen::Matrix< T, 1, Eigen::Dynamic > &x, size_t n, const char *error_msg, size_t idx)']]], + ['get_5fbase1_5flhs',['get_base1_lhs',['../namespacestan_1_1math.html#ac54b1427fd9d0765f0200dc9caa830f9',1,'stan::math::get_base1_lhs(std::vector< T > &x, size_t i, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#a4d5711f99869d05a6263218f3256e582',1,'stan::math::get_base1_lhs(std::vector< std::vector< T > > &x, size_t i1, size_t i2, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#a37f3ceaa6197904ef662f1edc8245e1a',1,'stan::math::get_base1_lhs(std::vector< std::vector< std::vector< T > > > &x, size_t i1, size_t i2, size_t i3, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#a3132eb36eaf861cfbd119b38e0a85a15',1,'stan::math::get_base1_lhs(std::vector< std::vector< std::vector< std::vector< T > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#afbcc061003aabcaf675f4415adc80c0a',1,'stan::math::get_base1_lhs(std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#a1958245532761be08be7ac9bc781f3a7',1,'stan::math::get_base1_lhs(std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, size_t i6, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#aedc7fc712ebe439bec1892c8f69447cd',1,'stan::math::get_base1_lhs(std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, size_t i6, size_t i7, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#a64467731d9abfaf97ea8d541d528142c',1,'stan::math::get_base1_lhs(std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< T > > > > > > > > &x, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, size_t i6, size_t i7, size_t i8, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#a0843cd960568745e5ace70f2c45ec6c3',1,'stan::math::get_base1_lhs(Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &x, size_t m, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#af8cb7e6e670cddcdf5527ec92fa3ff37',1,'stan::math::get_base1_lhs(Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &x, size_t m, size_t n, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#adffeab694f7588c92dc97b6736e5be7b',1,'stan::math::get_base1_lhs(Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, size_t m, const char *error_msg, size_t idx)'],['../namespacestan_1_1math.html#a6133d90708e16760b6394c6ca6a305ff',1,'stan::math::get_base1_lhs(Eigen::Matrix< T, 1, Eigen::Dynamic > &x, size_t n, const char *error_msg, size_t idx)']]], + ['get_5flp',['get_lp',['../namespacestan_1_1math.html#ac0fd1b6e6ba9738332204bae823dc006',1,'stan::math']]], + ['gevv_5fvvv_5fvari',['gevv_vvv_vari',['../classstan_1_1math_1_1gevv__vvv__vari.html#af573bcde4dada4aa9bc27fd9dfcff9c9',1,'stan::math::gevv_vvv_vari']]], + ['grad',['grad',['../classstan_1_1math_1_1var.html#afd46b70001b3e7d5de80a2883ba71fae',1,'stan::math::var::grad(std::vector< var > &x, std::vector< double > &g)'],['../classstan_1_1math_1_1var.html#a1070c041b598347663bbff358cbc2d37',1,'stan::math::var::grad()'],['../namespacestan_1_1math.html#ae6c32f9b52bef3a296432df037f96af3',1,'stan::math::grad(chainable *vi)'],['../namespacestan_1_1math.html#ae6c32f9b52bef3a296432df037f96af3',1,'stan::math::grad(chainable *vi)'],['../namespacestan_1_1math.html#a78c351f7c1ef5ea39c047fe102f70da3',1,'stan::math::grad(var &v, Eigen::Matrix< var, Eigen::Dynamic, 1 > &x, Eigen::VectorXd &g)']]], + ['grad_5f2f1',['grad_2F1',['../namespacestan_1_1math.html#a43226a00b6c2d3f3a2ab5906490f3136',1,'stan::math']]], + ['grad_5ff32',['grad_F32',['../namespacestan_1_1math.html#a02dd0b6c85425c2005e265d8e66852a8',1,'stan::math']]], + ['grad_5fhessian',['grad_hessian',['../namespacestan_1_1math.html#a66e0d2efc95d0241c473938c5850a0a6',1,'stan::math']]], + ['grad_5finc_5fbeta',['grad_inc_beta',['../namespacestan_1_1math.html#a8fb6dcbe4585fc38ff9374aa5164582f',1,'stan::math::grad_inc_beta(stan::math::fvar< T > &g1, stan::math::fvar< T > &g2, stan::math::fvar< T > a, stan::math::fvar< T > b, stan::math::fvar< T > z)'],['../namespacestan_1_1math.html#a33cb272bd839945c13d7b41058c35c51',1,'stan::math::grad_inc_beta(double &g1, double &g2, double a, double b, double z)'],['../namespacestan_1_1math.html#a25f15a75139ebb4a3b599a1190d39fc1',1,'stan::math::grad_inc_beta(var &g1, var &g2, const var &a, const var &b, const var &z)']]], + ['grad_5freg_5finc_5fbeta',['grad_reg_inc_beta',['../namespacestan_1_1math.html#a11eeb59eb3ae4f0710a7e417478c1212',1,'stan::math']]], + ['grad_5freg_5finc_5fgamma',['grad_reg_inc_gamma',['../namespacestan_1_1math.html#a6336e9873f3029f5abe54c4914c71cb2',1,'stan::math']]], + ['grad_5ftr_5fmat_5ftimes_5fhessian',['grad_tr_mat_times_hessian',['../namespacestan_1_1math.html#a53f2f8fea732e1e05f78ed0dd394b33f',1,'stan::math']]], + ['gradient',['gradient',['../namespacestan_1_1math.html#a9cd625b9cec928434683f6c6502094f4',1,'stan::math::gradient(const F &f, const Eigen::Matrix< T, Dynamic, 1 > &x, T &fx, Eigen::Matrix< T, Dynamic, 1 > &grad_fx)'],['../namespacestan_1_1math.html#a42d25361a4bcf7ddb7fdb7edd35b8060',1,'stan::math::gradient(const F &f, const Eigen::Matrix< double, Dynamic, 1 > &x, double &fx, Eigen::Matrix< double, Dynamic, 1 > &grad_fx)']]], + ['gradient_5fdot_5fvector',['gradient_dot_vector',['../namespacestan_1_1math.html#a7cf96fceee3cea400cdf078180c61c04',1,'stan::math']]], + ['gumbel_5fccdf_5flog',['gumbel_ccdf_log',['../namespacestan_1_1math.html#a9da900adc6bb1216e99f604001cd4caa',1,'stan::math']]], + ['gumbel_5fcdf',['gumbel_cdf',['../namespacestan_1_1math.html#a52ac5bc9a01ebadccc004463b054697c',1,'stan::math']]], + ['gumbel_5fcdf_5flog',['gumbel_cdf_log',['../namespacestan_1_1math.html#a06f4009f162e58a62a583b84f2d5ccf9',1,'stan::math']]], + ['gumbel_5flog',['gumbel_log',['../namespacestan_1_1math.html#aa5fda97c2d23cb9fd2091e5bd1002e5d',1,'stan::math::gumbel_log(const T_y &y, const T_loc &mu, const T_scale &beta)'],['../namespacestan_1_1math.html#a166ad02fac07d4a084655f8fde1ec2ec',1,'stan::math::gumbel_log(const T_y &y, const T_loc &mu, const T_scale &beta)']]], + ['gumbel_5frng',['gumbel_rng',['../namespacestan_1_1math.html#afb7ad70ee185c1e0720086617431f71a',1,'stan::math']]] +]; diff --git a/doc/api/html/search/functions_7.html b/doc/api/html/search/functions_7.html new file mode 100644 index 00000000000..ec330da83bb --- /dev/null +++ b/doc/api/html/search/functions_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/functions_7.js b/doc/api/html/search/functions_7.js new file mode 100644 index 00000000000..a5792af36ae --- /dev/null +++ b/doc/api/html/search/functions_7.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['head',['head',['../namespacestan_1_1math.html#ae824fde6dc6e0f4ac3d37b86fb266414',1,'stan::math::head(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v, size_t n)'],['../namespacestan_1_1math.html#ada1d4ceb7d5aac027e9ec6adcb18755a',1,'stan::math::head(const Eigen::Matrix< T, 1, Eigen::Dynamic > &rv, size_t n)'],['../namespacestan_1_1math.html#a5e746ba14994b318a0a192a97a0a28db',1,'stan::math::head(const std::vector< T > &sv, size_t n)']]], + ['hessian',['hessian',['../namespacestan_1_1math.html#a096c5d2b24b7de8a268a02b1f0705b42',1,'stan::math::hessian(const F &f, const Eigen::Matrix< double, Dynamic, 1 > &x, double &fx, Eigen::Matrix< double, Dynamic, 1 > &grad, Eigen::Matrix< double, Dynamic, Dynamic > &H)'],['../namespacestan_1_1math.html#acb8989a5749e54167301ac0720992d08',1,'stan::math::hessian(const F &f, const Eigen::Matrix< T, Dynamic, 1 > &x, T &fx, Eigen::Matrix< T, Dynamic, 1 > &grad, Eigen::Matrix< T, Dynamic, Dynamic > &H)']]], + ['hessian_5ftimes_5fvector',['hessian_times_vector',['../namespacestan_1_1math.html#a399d8cf66bb4db2d5139566b9da2c5f3',1,'stan::math::hessian_times_vector(const F &f, const Eigen::Matrix< double, Dynamic, 1 > &x, const Eigen::Matrix< double, Dynamic, 1 > &v, double &fx, Eigen::Matrix< double, Dynamic, 1 > &Hv)'],['../namespacestan_1_1math.html#a1021570cd0ba1864f2f346cf2d78f13e',1,'stan::math::hessian_times_vector(const F &f, const Eigen::Matrix< T, Dynamic, 1 > &x, const Eigen::Matrix< T, Dynamic, 1 > &v, T &fx, Eigen::Matrix< T, Dynamic, 1 > &Hv)']]], + ['highest',['highest',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a1412b5d850985532c6901671a1e83996',1,'Eigen::NumTraits< stan::math::fvar< T > >::highest()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#a836253452e51c2bd07cf9f86baadc52e',1,'Eigen::NumTraits< stan::math::var >::highest()']]], + ['hypergeometric_5flog',['hypergeometric_log',['../namespacestan_1_1math.html#acf091835ddc913687ab4d34c3eee662e',1,'stan::math::hypergeometric_log(const T_n &n, const T_N &N, const T_a &a, const T_b &b)'],['../namespacestan_1_1math.html#a28d194254677d4503c2f5d7c6c4f6224',1,'stan::math::hypergeometric_log(const T_n &n, const T_N &N, const T_a &a, const T_b &b)']]], + ['hypergeometric_5frng',['hypergeometric_rng',['../namespacestan_1_1math.html#a3878889879be4781cc8d560f534ab123',1,'stan::math']]], + ['hypot',['hypot',['../namespacestan_1_1math.html#acd88cd5e3b00b9d099acd2482ca6fbf2',1,'stan::math::hypot(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a490944d221f2b68baf4092667f490ae8',1,'stan::math::hypot(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#afd2f4416bf256405e515c0640dec5fe2',1,'stan::math::hypot(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a0827e995b465dcb291c3de1a77e2b547',1,'stan::math::hypot(const var &a, const var &b)'],['../namespacestan_1_1math.html#abcb40e789140be0e0b93a44e055a6cfc',1,'stan::math::hypot(const var &a, double b)'],['../namespacestan_1_1math.html#a5c9d2305ce89a46a7d182e6014fd0b3f',1,'stan::math::hypot(double a, const var &b)']]] +]; diff --git a/doc/api/html/search/functions_8.html b/doc/api/html/search/functions_8.html new file mode 100644 index 00000000000..afd4facf81c --- /dev/null +++ b/doc/api/html/search/functions_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/functions_8.js b/doc/api/html/search/functions_8.js new file mode 100644 index 00000000000..f0ec1a129dc --- /dev/null +++ b/doc/api/html/search/functions_8.js @@ -0,0 +1,49 @@ +var searchData= +[ + ['ibeta',['ibeta',['../namespacestan_1_1math.html#af7b430ac57e75ba2d55843cd868506e1',1,'stan::math::ibeta(const double a, const double b, const double x)'],['../namespacestan_1_1math.html#a8c7547dffd79bc54378fb3906345500e',1,'stan::math::ibeta(const var &a, const var &b, const var &x)']]], + ['identity_5fconstrain',['identity_constrain',['../namespacestan_1_1math.html#afa7ea9a437cf38e48ec72cec173d7465',1,'stan::math::identity_constrain(T x)'],['../namespacestan_1_1math.html#a7925ed2737df76a38ae17c13f85e9141',1,'stan::math::identity_constrain(const T x, T &)']]], + ['identity_5ffree',['identity_free',['../namespacestan_1_1math.html#ac50a1ae328bd1f7195b0c77a16a684ab',1,'stan::math']]], + ['if_5felse',['if_else',['../namespacestan_1_1math.html#a65e2d3e3ab44f347f3ebaacb67845015',1,'stan::math::if_else(const bool c, const T_true y_true, const T_false y_false)'],['../namespacestan_1_1math.html#abb35d5a60bdc11a5d09eb629c50b5db5',1,'stan::math::if_else(bool c, const var &y_true, const var &y_false)'],['../namespacestan_1_1math.html#abc1dc3a479994402ee1959b75fa2c70f',1,'stan::math::if_else(bool c, double y_true, const var &y_false)'],['../namespacestan_1_1math.html#a09912038470cc9d13d754296b1fe6949',1,'stan::math::if_else(bool c, const var &y_true, const double y_false)']]], + ['inc_5fbeta',['inc_beta',['../namespacestan_1_1math.html#af9988ca802426ba048ba5d5d9ad71e2e',1,'stan::math::inc_beta(const fvar< T > &a, const fvar< T > &b, const fvar< T > &x)'],['../namespacestan_1_1math.html#a01192e5a2e1c208f78818b57b4d6aa78',1,'stan::math::inc_beta(const double &a, const double &b, const double &x)'],['../namespacestan_1_1math.html#abf29f2f025873816925c6786842d0afe',1,'stan::math::inc_beta(const stan::math::var &a, const stan::math::var &b, const stan::math::var &c)']]], + ['inc_5fbeta_5fdda',['inc_beta_dda',['../namespacestan_1_1math.html#a9c265eb14e915edc9bd457e93aaaf166',1,'stan::math']]], + ['inc_5fbeta_5fddb',['inc_beta_ddb',['../namespacestan_1_1math.html#afc99a6a1e74fd1daeab96f7eeb3b05a8',1,'stan::math']]], + ['inc_5fbeta_5fddz',['inc_beta_ddz',['../namespacestan_1_1math.html#a2412f96d2114b4c15efb1ddbddaef35b',1,'stan::math::inc_beta_ddz(T a, T b, T z)'],['../namespacestan_1_1math.html#a3e5957e2cb19140e6c7bacf5c68320b7',1,'stan::math::inc_beta_ddz(double a, double b, double z)']]], + ['infinity',['infinity',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#afb373d33a5d27f12cc75f8655207fd6b',1,'std::numeric_limits< stan::math::fvar< T > >::infinity()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a124f44266afc97648e4d3cb9f1379090',1,'std::numeric_limits< stan::math::var >::infinity()']]], + ['init_5fdependent',['init_dependent',['../classstan_1_1math_1_1chainable.html#ab8163d092584348d410d1866274253ff',1,'stan::math::chainable::init_dependent()'],['../classstan_1_1math_1_1vari.html#a21778f1c5e751d47ede33938a5045a8d',1,'stan::math::vari::init_dependent()']]], + ['initial_5fstate',['initial_state',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html#a6ed6425673c2af35796dcb8ec69b78a2',1,'stan::math::coupled_ode_system< F, double, double >::initial_state()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#a3e039bc430a91652cfa3a25ea104c876',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::initial_state()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#a90f14fa30557743ca18115488de7f59e',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::initial_state()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#aa338d8c630209cd7d8d98334acfa03ba',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::initial_state()']]], + ['initialize',['initialize',['../namespacestan_1_1math.html#af81e05dfd6918524dafff10715f21a8d',1,'stan::math::initialize(T &x, const T &v)'],['../namespacestan_1_1math.html#a5ad7882cc7a7e2e07016e006d2092427',1,'stan::math::initialize(T &x, V v)'],['../namespacestan_1_1math.html#a1cb47e7569cabd57a1c0c6816ca48293',1,'stan::math::initialize(Eigen::Matrix< T, R, C > &x, const V &v)'],['../namespacestan_1_1math.html#ad27706378f77dc22746ad74721d495d4',1,'stan::math::initialize(std::vector< T > &x, const V &v)']]], + ['initialize_5fvariable',['initialize_variable',['../namespacestan_1_1math.html#aebdf0a5cd40134110da3230d6fdea989',1,'stan::math::initialize_variable(var &variable, const var &value)'],['../namespacestan_1_1math.html#ad1bb474a393fa5277ff69c9498cb3809',1,'stan::math::initialize_variable(Eigen::Matrix< var, R, C > &matrix, const var &value)'],['../namespacestan_1_1math.html#ada62635d3e2320c9e36ac59a1c4bbdb0',1,'stan::math::initialize_variable(std::vector< T > &variables, const var &value)']]], + ['int_5fstep',['int_step',['../namespacestan_1_1math.html#a8c507cff4b7b473cd86e1d428fb03136',1,'stan::math']]], + ['integrate_5fode',['integrate_ode',['../namespacestan_1_1math.html#a57c148a430fffb6b4a865d25742b3412',1,'stan::math']]], + ['inv',['inv',['../namespacestan_1_1math.html#a2a5386561ba622e05cb64345fdad6a3b',1,'stan::math::inv(const fvar< T > &x)'],['../namespacestan_1_1math.html#ab64935e0bdac8227bfd9608285d4e699',1,'stan::math::inv(const T x)'],['../namespacestan_1_1math.html#ad0b645189bc4899956bdba20158a0ee6',1,'stan::math::inv(const var &a)']]], + ['inv_5fchi_5fsquare_5fccdf_5flog',['inv_chi_square_ccdf_log',['../namespacestan_1_1math.html#a24a32a9537cf8218b73109b93379b5b1',1,'stan::math']]], + ['inv_5fchi_5fsquare_5fcdf',['inv_chi_square_cdf',['../namespacestan_1_1math.html#a372e143655badb8f25e542697f689f39',1,'stan::math']]], + ['inv_5fchi_5fsquare_5fcdf_5flog',['inv_chi_square_cdf_log',['../namespacestan_1_1math.html#aae005376416b29d9118470b9c2d18133',1,'stan::math']]], + ['inv_5fchi_5fsquare_5flog',['inv_chi_square_log',['../namespacestan_1_1math.html#aae83a74c666a703da52db606eb478f50',1,'stan::math::inv_chi_square_log(const T_y &y, const T_dof &nu)'],['../namespacestan_1_1math.html#a19b9a4f2fd21b540a7d50a37d23f0869',1,'stan::math::inv_chi_square_log(const T_y &y, const T_dof &nu)']]], + ['inv_5fchi_5fsquare_5frng',['inv_chi_square_rng',['../namespacestan_1_1math.html#a8159125045ed1c5ee551537c9983921f',1,'stan::math']]], + ['inv_5fcloglog',['inv_cloglog',['../namespacestan_1_1math.html#aba00ed1e73c3a2366226aa4c83e4d8b9',1,'stan::math::inv_cloglog(const fvar< T > &x)'],['../namespacestan_1_1math.html#a008bf0b6c2ab38d088b0aba5d7b10c8d',1,'stan::math::inv_cloglog(T x)'],['../namespacestan_1_1math.html#ab834f530318a33700ba2c66b74ea3bf5',1,'stan::math::inv_cloglog(const stan::math::var &a)']]], + ['inv_5fgamma_5fccdf_5flog',['inv_gamma_ccdf_log',['../namespacestan_1_1math.html#af2b35d989d0d1a9cb6ea163bbbd14ed3',1,'stan::math']]], + ['inv_5fgamma_5fcdf',['inv_gamma_cdf',['../namespacestan_1_1math.html#a195c84d2f45abc7bcf28c1d9e3fd8cf8',1,'stan::math']]], + ['inv_5fgamma_5fcdf_5flog',['inv_gamma_cdf_log',['../namespacestan_1_1math.html#a0e622170c7270f1a441235f98248d3a3',1,'stan::math']]], + ['inv_5fgamma_5flog',['inv_gamma_log',['../namespacestan_1_1math.html#ad34fa642137e07f723c995d42e78df2c',1,'stan::math::inv_gamma_log(const T_y &y, const T_shape &alpha, const T_scale &beta)'],['../namespacestan_1_1math.html#a2a6c6fb67d4de25708140e5fce64e4f4',1,'stan::math::inv_gamma_log(const T_y &y, const T_shape &alpha, const T_scale &beta)']]], + ['inv_5fgamma_5frng',['inv_gamma_rng',['../namespacestan_1_1math.html#a3222e632ba4aaeb90753a96520799867',1,'stan::math']]], + ['inv_5flogit',['inv_logit',['../namespacestan_1_1math.html#a76a22ee34432be58edb4b6ed9469370a',1,'stan::math::inv_logit(const fvar< T > &x)'],['../namespacestan_1_1math.html#ad2c4834fc581f55acf8491ec3f80ecb7',1,'stan::math::inv_logit(const T a)'],['../namespacestan_1_1math.html#ad7d7861511ad7d8a82e17a1e9fa573de',1,'stan::math::inv_logit(const stan::math::var &a)']]], + ['inv_5fphi',['inv_Phi',['../namespacestan_1_1math.html#a91bcae4b6bdf262f91673bf7b15fea99',1,'stan::math::inv_Phi(const fvar< T > &p)'],['../namespacestan_1_1math.html#a24ce9274d4f9c0ebe500fbe3a0ac4560',1,'stan::math::inv_Phi(double p)'],['../namespacestan_1_1math.html#a3450dbd4a7dae0165e11a40e1b0d4b37',1,'stan::math::inv_Phi(const stan::math::var &p)']]], + ['inv_5fsqrt',['inv_sqrt',['../namespacestan_1_1math.html#aca2d4971bfd22beacb304bdd5b9d3395',1,'stan::math::inv_sqrt(const fvar< T > &x)'],['../namespacestan_1_1math.html#a4b4db5e98585c71cc7c14319f96e0c04',1,'stan::math::inv_sqrt(const T x)'],['../namespacestan_1_1math.html#a4f3e1382ec567be20643caef30076869',1,'stan::math::inv_sqrt(const var &a)']]], + ['inv_5fsquare',['inv_square',['../namespacestan_1_1math.html#aa7c1f6b0f3c9f48fa30e09f2d929336d',1,'stan::math::inv_square(const fvar< T > &x)'],['../namespacestan_1_1math.html#a3d2e922aa13e2dfae510fc13d86eaea3',1,'stan::math::inv_square(const T x)'],['../namespacestan_1_1math.html#aa347bbaada35746d4fbd644549416ce3',1,'stan::math::inv_square(const var &a)']]], + ['inv_5fwishart_5flog',['inv_wishart_log',['../namespacestan_1_1math.html#a56c063912bf059644103aaf8787f71e9',1,'stan::math::inv_wishart_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &W, const T_dof &nu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &S)'],['../namespacestan_1_1math.html#a96f8f9a5add1c91cbe30c887265da81f',1,'stan::math::inv_wishart_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &W, const T_dof &nu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &S)']]], + ['inv_5fwishart_5frng',['inv_wishart_rng',['../namespacestan_1_1math.html#a639b9495c8bb2917100b52b7ed889d3c',1,'stan::math']]], + ['invalid_5fargument',['invalid_argument',['../namespacestan_1_1math.html#a9bcb1af5657f92ccadf5204fc43377fd',1,'stan::math::invalid_argument(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)'],['../namespacestan_1_1math.html#aacf5709c614035ef60053a348e18554c',1,'stan::math::invalid_argument(const char *function, const char *name, const T &y, const char *msg1)']]], + ['invalid_5fargument_5fvec',['invalid_argument_vec',['../namespacestan_1_1math.html#add7b2630385b99ef7045818ba8fe2a97',1,'stan::math::invalid_argument_vec(const char *function, const char *name, const T &y, const size_t i, const char *msg1, const char *msg2)'],['../namespacestan_1_1math.html#a309a8690ee903eea7e5847e4d93483f4',1,'stan::math::invalid_argument_vec(const char *function, const char *name, const T &y, const size_t i, const char *msg)']]], + ['inverse',['inverse',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#a5b44e5dd48e3e8b8dbc4bc7a37b64d86',1,'stan::math::LDLT_factor< T, R, C >::inverse()'],['../namespacestan_1_1math.html#aab64bf2ca0e8e628e49119ed995c1c67',1,'stan::math::inverse(const Eigen::Matrix< fvar< T >, R, C > &m)'],['../namespacestan_1_1math.html#ad621964cbb3b06ba80811cd58e3048a0',1,'stan::math::inverse(const Eigen::Matrix< T, R, C > &m)']]], + ['inverse_5fsoftmax',['inverse_softmax',['../namespacestan_1_1math.html#a1edc35cc581dda178263f6a4a4fd1158',1,'stan::math']]], + ['inverse_5fspd',['inverse_spd',['../namespacestan_1_1math.html#a69d2c003918b45e95edb84ea58b84c68',1,'stan::math']]], + ['is_5faligned',['is_aligned',['../namespacestan_1_1math.html#a7add35b0758b1d0541f7e919c36412f9',1,'stan::math']]], + ['is_5finf',['is_inf',['../namespacestan_1_1math.html#ad359149ebad087910f96e62f88287c1f',1,'stan::math::is_inf(const fvar< T > &x)'],['../namespacestan_1_1math.html#ae0020ce04cad9a5eb9b55abb690863fa',1,'stan::math::is_inf(const double x)'],['../namespacestan_1_1math.html#a2c050932da2e90902bda668170379545',1,'stan::math::is_inf(const var &v)']]], + ['is_5fnan',['is_nan',['../namespacestan_1_1math.html#a921dd9cd85ce1a6fca79c7b07cd80b99',1,'stan::math::is_nan(const fvar< T > &x)'],['../namespacestan_1_1math.html#ae01488df30a81c36b1a00391b9541e1d',1,'stan::math::is_nan(double x)'],['../namespacestan_1_1math.html#acf8ef1e06cddc77c4c56311f937cc183',1,'stan::math::is_nan(const var &v)']]], + ['is_5funinitialized',['is_uninitialized',['../classstan_1_1math_1_1var.html#a255e54d15bd3bda71d3e86ce19bc40ce',1,'stan::math::var::is_uninitialized()'],['../namespacestan_1_1math.html#a40c14c26dc55a985e05695b3ff1eeef2',1,'stan::math::is_uninitialized(T x)'],['../namespacestan_1_1math.html#a2f8d228f0969deddaf2c485f07452fd5',1,'stan::math::is_uninitialized(var x)']]], + ['isfinite',['isfinite',['../namespaceboost_1_1math.html#a99b3c9ca2565e57981ac77d110c0f26d',1,'boost::math']]], + ['isinf',['isinf',['../namespacestd.html#a0bd8de4059fbba0fe38dc56567f2158a',1,'std::isinf()'],['../namespaceboost_1_1math.html#a3d7d6e376e25db9cff72f82ca4c3e684',1,'boost::math::isinf()']]], + ['isnan',['isnan',['../namespacestd.html#a3a2f34cf599093f31edcc8e056311305',1,'std::isnan()'],['../namespaceboost_1_1math.html#a9ec9f6ad1870e35178068fd12a0d04ea',1,'boost::math::isnan()']]], + ['isnormal',['isnormal',['../namespaceboost_1_1math.html#aa0100dc26ee826099c1d04ddc6cf3c89',1,'boost::math']]] +]; diff --git a/doc/api/html/search/functions_9.html b/doc/api/html/search/functions_9.html new file mode 100644 index 00000000000..542b9e0a294 --- /dev/null +++ b/doc/api/html/search/functions_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/functions_9.js b/doc/api/html/search/functions_9.js new file mode 100644 index 00000000000..3d8867ace9a --- /dev/null +++ b/doc/api/html/search/functions_9.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['jacobian',['jacobian',['../namespacestan_1_1math.html#a72c855fa18077624b60fb19bfe1045b2',1,'stan::math::jacobian(const F &f, const Eigen::Matrix< T, Dynamic, 1 > &x, Eigen::Matrix< T, Dynamic, 1 > &fx, Eigen::Matrix< T, Dynamic, Dynamic > &J)'],['../namespacestan_1_1math.html#a40cb12dbca88db90b1b3f8654ea193a5',1,'stan::math::jacobian(const F &f, const Eigen::Matrix< double, Dynamic, 1 > &x, Eigen::Matrix< double, Dynamic, 1 > &fx, Eigen::Matrix< double, Dynamic, Dynamic > &J)']]] +]; diff --git a/doc/api/html/search/functions_a.html b/doc/api/html/search/functions_a.html new file mode 100644 index 00000000000..94fd395d6f2 --- /dev/null +++ b/doc/api/html/search/functions_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/functions_a.js b/doc/api/html/search/functions_a.js new file mode 100644 index 00000000000..6710d4ff842 --- /dev/null +++ b/doc/api/html/search/functions_a.js @@ -0,0 +1,61 @@ +var searchData= +[ + ['lb_5fconstrain',['lb_constrain',['../namespacestan_1_1math.html#a02477dd575f3d242826df72489faac4c',1,'stan::math::lb_constrain(const T x, const TL lb)'],['../namespacestan_1_1math.html#a8344b3154a81f8601776582238bac99f',1,'stan::math::lb_constrain(const T x, const TL lb, T &lp)']]], + ['lb_5ffree',['lb_free',['../namespacestan_1_1math.html#a0e416b7c30dd2ea4fc78254732fa8a52',1,'stan::math']]], + ['lbeta',['lbeta',['../namespacestan_1_1math.html#ac51be9d210e223a8aa4241e2d725e295',1,'stan::math::lbeta(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a2ef6e7b5ed43b5410d852961a8050647',1,'stan::math::lbeta(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a00c0745f2a667014a98b6113cc80b2a5',1,'stan::math::lbeta(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#af37c166c79a3e66d101d682b3474f6ab',1,'stan::math::lbeta(const T1 a, const T2 b)']]], + ['ldlt_5falloc',['LDLT_alloc',['../classstan_1_1math_1_1_l_d_l_t__alloc.html#a5fc32fdc53e7e4c25fdb0343202f1280',1,'stan::math::LDLT_alloc::LDLT_alloc()'],['../classstan_1_1math_1_1_l_d_l_t__alloc.html#a7a68a93a89754c5b566bd5ad2fc9b40e',1,'stan::math::LDLT_alloc::LDLT_alloc(const Eigen::Matrix< var, R, C > &A)']]], + ['ldlt_5ffactor',['LDLT_factor',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#a0de1ea9ce3323c55650a7ee9eef34891',1,'stan::math::LDLT_factor< T, R, C >::LDLT_factor()'],['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#acd8fab9a85153322a4b00d8fbf00d7f8',1,'stan::math::LDLT_factor< T, R, C >::LDLT_factor(const Eigen::Matrix< T, R, C > &A)'],['../classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4.html#ade86bbc6c4946e8c2ae0a5e64448bb0c',1,'stan::math::LDLT_factor< stan::math::var, R, C >::LDLT_factor()'],['../classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4.html#a2af6b704a60e27003e78625da2a3065a',1,'stan::math::LDLT_factor< stan::math::var, R, C >::LDLT_factor(const Eigen::Matrix< stan::math::var, R, C > &A)']]], + ['length',['length',['../namespacestan.html#adb2e0700b1ec87a5e080cd50026b0182',1,'stan::length(const std::vector< T > &x)'],['../namespacestan.html#a12b8544448f77da1a773c7b7c0ebdc01',1,'stan::length(const Eigen::Matrix< T, R, C > &m)'],['../namespacestan.html#a59c48c2ee48c5a6e8048fa2d6a035445',1,'stan::length(const T &)']]], + ['length_5fmvt',['length_mvt',['../namespacestan.html#add91fbddf46aa1057d3b6c269ae55b7f',1,'stan::length_mvt(const T &)'],['../namespacestan.html#a846e41c458181de76ce756303c68da3c',1,'stan::length_mvt(const Eigen::Matrix< T, R, C > &)'],['../namespacestan.html#a4e27fd808f2599e38dd78ec23e6cdb61',1,'stan::length_mvt(const std::vector< Eigen::Matrix< T, R, C > > &x)']]], + ['lgamma',['lgamma',['../namespacestan_1_1math.html#aead76f03bdbc60484ad760fc31bad40f',1,'stan::math::lgamma(const fvar< T > &x)'],['../namespacestan_1_1math.html#a836f46d7f63f5118a32cad11382c0551',1,'stan::math::lgamma(double x)'],['../namespacestan_1_1math.html#a21018562738b2bf94984bcb7e1c9865b',1,'stan::math::lgamma(const stan::math::var &a)']]], + ['lkj_5fcorr_5fcholesky_5flog',['lkj_corr_cholesky_log',['../namespacestan_1_1math.html#a0399f5f1c54dbda27be7f12d7d888e1d',1,'stan::math::lkj_corr_cholesky_log(const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L, const T_shape &eta)'],['../namespacestan_1_1math.html#ac6e9853bf29b95ed22f4342bd2ac1629',1,'stan::math::lkj_corr_cholesky_log(const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L, const T_shape &eta)']]], + ['lkj_5fcorr_5fcholesky_5frng',['lkj_corr_cholesky_rng',['../namespacestan_1_1math.html#a873e4c1def8700568d76f9296bbd8d24',1,'stan::math']]], + ['lkj_5fcorr_5flog',['lkj_corr_log',['../namespacestan_1_1math.html#af0cb454dc9397439a74c185da61a3d5e',1,'stan::math::lkj_corr_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const T_shape &eta)'],['../namespacestan_1_1math.html#a015685882d7704cd76e15e5966e42b5e',1,'stan::math::lkj_corr_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const T_shape &eta)']]], + ['lkj_5fcorr_5frng',['lkj_corr_rng',['../namespacestan_1_1math.html#a7a32027fc9306df3c5a0418fa44826fa',1,'stan::math']]], + ['lkj_5fcov_5flog',['lkj_cov_log',['../namespacestan_1_1math.html#a4d5d029cbf5c052432705dc9ad334df6',1,'stan::math::lkj_cov_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_scale, Eigen::Dynamic, 1 > &sigma, const T_shape &eta)'],['../namespacestan_1_1math.html#a3cfaea69c195f4531f7688a19fc7bd14',1,'stan::math::lkj_cov_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_loc, Eigen::Dynamic, 1 > &mu, const Eigen::Matrix< T_scale, Eigen::Dynamic, 1 > &sigma, const T_shape &eta)'],['../namespacestan_1_1math.html#a5295c9eddd1e8643bb1c9fa0fb284917',1,'stan::math::lkj_cov_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const T_loc &mu, const T_scale &sigma, const T_shape &eta)'],['../namespacestan_1_1math.html#ab0a8d3846d804d39d6f0883e54aa2c7e',1,'stan::math::lkj_cov_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const T_loc &mu, const T_scale &sigma, const T_shape &eta)']]], + ['lmgamma',['lmgamma',['../namespacestan_1_1math.html#ad46d6e08f7b6e9b9e8941572d30b104e',1,'stan::math::lmgamma(int x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a0ee0706b2cb6d2e1da2c3b6041c06a56',1,'stan::math::lmgamma(const int k, T x)'],['../namespacestan_1_1math.html#a3f77e1a76bdde13d243f68d45c1d392b',1,'stan::math::lmgamma(int a, const stan::math::var &b)']]], + ['log',['log',['../namespacestan_1_1math.html#a915ada1e5971c467aa16ee926997a442',1,'stan::math::log(const fvar< T > &x)'],['../namespacestan_1_1math.html#ac3b52b30a04e9a9f216b49ef06ab7a61',1,'stan::math::log(const Eigen::Matrix< T, Rows, Cols > &m)'],['../namespacestan_1_1math.html#a8a236280de2603e0ead1966468f0ceea',1,'stan::math::log(const var &a)']]], + ['log10',['log10',['../namespacestan_1_1math.html#a808cbb5ac4003f28e2538805ebe338ef',1,'stan::math::log10(const fvar< T > &x)'],['../namespacestan_1_1math.html#a21f4f7c092e2bc9a089885628b86c004',1,'stan::math::log10()'],['../namespacestan_1_1math.html#af56e2f9808a531946681d3644307edeb',1,'stan::math::log10(const var &a)']]], + ['log1m',['log1m',['../namespacestan_1_1math.html#a8d92a982acd829e77b3f5b975baa6aed',1,'stan::math::log1m(const fvar< T > &x)'],['../namespacestan_1_1math.html#a4f92092fb8a70b31d00898bbbe769612',1,'stan::math::log1m(T x)'],['../namespacestan_1_1math.html#a5aaee0104c1b99038dda2dbb769abae1',1,'stan::math::log1m(const stan::math::var &a)']]], + ['log1m_5fexp',['log1m_exp',['../namespacestan_1_1math.html#a7760d28e8fddf268113469b44463de07',1,'stan::math::log1m_exp(const fvar< T > &x)'],['../namespacestan_1_1math.html#a3ce261caf05bd371c430e82a0e6389a5',1,'stan::math::log1m_exp(const T a)'],['../namespacestan_1_1math.html#aab62e8d3067ce13dea1b2ee4f38618b1',1,'stan::math::log1m_exp(const stan::math::var &a)']]], + ['log1m_5finv_5flogit',['log1m_inv_logit',['../namespacestan_1_1math.html#a79f286f8a9043aee8a1a844493da0d55',1,'stan::math::log1m_inv_logit(const fvar< T > &x)'],['../namespacestan_1_1math.html#ac7f71c696a5e0da4daab30e5f3704842',1,'stan::math::log1m_inv_logit(const T u)']]], + ['log1p',['log1p',['../namespacestan_1_1math.html#aa16e57e82fb1e17f74ef43592748ff32',1,'stan::math::log1p(const fvar< T > &x)'],['../namespacestan_1_1math.html#a5166d3c58ad8ce0aedbf104179888b69',1,'stan::math::log1p(const T x)'],['../namespacestan_1_1math.html#a9851bec44891899ceacfc17ef6e86b21',1,'stan::math::log1p(const stan::math::var &a)']]], + ['log1p_5fexp',['log1p_exp',['../namespacestan_1_1math.html#a0fe928ad2b96b802f6d488ba43167489',1,'stan::math::log1p_exp(const fvar< T > &x)'],['../namespacestan_1_1math.html#a88151def26813dec3e04c4a8b9674091',1,'stan::math::log1p_exp(const T a)'],['../namespacestan_1_1math.html#abaffb88be27fafab634c74e14508e0f3',1,'stan::math::log1p_exp(const stan::math::var &a)']]], + ['log2',['log2',['../namespacestan_1_1math.html#a4eea39b4ca603cff7518068499884364',1,'stan::math::log2(const fvar< T > &x)'],['../namespacestan_1_1math.html#aa25e1572bf46e3a6b9ee270f0c7e2c4d',1,'stan::math::log2(const T a)'],['../namespacestan_1_1math.html#a947ba3fe3c87293f7c57395007100c79',1,'stan::math::log2()'],['../namespacestan_1_1math.html#a6322be7704b2efc1e36951b46bb88568',1,'stan::math::log2(const stan::math::var &a)']]], + ['log_5fabs_5fdet',['log_abs_det',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#a4762da221ad734ac0d1572df6a16de9c',1,'stan::math::LDLT_factor< T, R, C >::log_abs_det()'],['../classstan_1_1math_1_1_l_d_l_t__alloc.html#ab5039b38ec6d0cf6fb6ef49f4d837ce3',1,'stan::math::LDLT_alloc::log_abs_det()']]], + ['log_5fdeterminant',['log_determinant',['../namespacestan_1_1math.html#a6f88bd206be351748e56aebf7e58289a',1,'stan::math::log_determinant(const Eigen::Matrix< fvar< T >, R, C > &m)'],['../namespacestan_1_1math.html#aca29dad18932e3ca17ac52fd0238b364',1,'stan::math::log_determinant(const Eigen::Matrix< T, R, C > &m)'],['../namespacestan_1_1math.html#ae83dcd77f80cb38f31af8c5284370112',1,'stan::math::log_determinant(const Eigen::Matrix< var, R, C > &m)']]], + ['log_5fdeterminant_5fldlt',['log_determinant_ldlt',['../namespacestan_1_1math.html#a1d95f632b80e8653fe5891209bdeda45',1,'stan::math::log_determinant_ldlt(stan::math::LDLT_factor< T, R, C > &A)'],['../namespacestan_1_1math.html#acc785decbbbee8de2a2b8f2df9715d48',1,'stan::math::log_determinant_ldlt(stan::math::LDLT_factor< var, R, C > &A)']]], + ['log_5fdeterminant_5fspd',['log_determinant_spd',['../namespacestan_1_1math.html#ae9a296d4414d0193108c70b350a05cfc',1,'stan::math::log_determinant_spd(const Eigen::Matrix< T, R, C > &m)'],['../namespacestan_1_1math.html#a18ff74da7a827b5e433fc8d65d8b73e9',1,'stan::math::log_determinant_spd(const Eigen::Matrix< var, R, C > &m)']]], + ['log_5fdiff_5fexp',['log_diff_exp',['../namespacestan_1_1math.html#a1ba84f8c43b399f555647a0402a710ef',1,'stan::math::log_diff_exp(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a34180da33deb01d13fcf6c5907d1309e',1,'stan::math::log_diff_exp(const T1 &x1, const fvar< T2 > &x2)'],['../namespacestan_1_1math.html#a246fe73ae519573f2232d2f44ac379be',1,'stan::math::log_diff_exp(const fvar< T1 > &x1, const T2 &x2)'],['../namespacestan_1_1math.html#a685dbad032c2794fbc8bca7f44119eab',1,'stan::math::log_diff_exp(const T1 x, const T2 y)'],['../namespacestan_1_1math.html#a43fccfff5553aa860351a147ab10e301',1,'stan::math::log_diff_exp(const stan::math::var &a, const stan::math::var &b)'],['../namespacestan_1_1math.html#a7a09bd43a4ade10703b6a1fb521d09e8',1,'stan::math::log_diff_exp(const stan::math::var &a, const double &b)'],['../namespacestan_1_1math.html#a03afe35a61cd6068465799e22d600879',1,'stan::math::log_diff_exp(const double &a, const stan::math::var &b)']]], + ['log_5ffalling_5ffactorial',['log_falling_factorial',['../namespacestan_1_1math.html#a58e4116dfd00db87062ef7c0f76e8c27',1,'stan::math::log_falling_factorial(const fvar< T > &x, const fvar< T > &n)'],['../namespacestan_1_1math.html#a3f457257e68af25bdccd60c4da5c1449',1,'stan::math::log_falling_factorial(const double x, const fvar< T > &n)'],['../namespacestan_1_1math.html#a50150f9605147c167f749bf31c9e42a2',1,'stan::math::log_falling_factorial(const fvar< T > &x, const double n)'],['../namespacestan_1_1math.html#afd407ae0bf698d58b8e59e580749e705',1,'stan::math::log_falling_factorial(const T1 x, const T2 n)'],['../namespacestan_1_1math.html#a6f5951b9e0e640a8f2f53348015387c4',1,'stan::math::log_falling_factorial(const var &a, const double &b)'],['../namespacestan_1_1math.html#a1a6fbe2cf74d7dc89d10999d512c3efd',1,'stan::math::log_falling_factorial(const var &a, const var &b)'],['../namespacestan_1_1math.html#a599bc1031e28ecc3cc192b07bdced6ed',1,'stan::math::log_falling_factorial(const double &a, const var &b)']]], + ['log_5finv_5flogit',['log_inv_logit',['../namespacestan_1_1math.html#acd2fe56bce70a04dd11e8a5a32b1b51c',1,'stan::math::log_inv_logit(const fvar< T > &x)'],['../namespacestan_1_1math.html#ad5be889d1ef4284654a04e400f5371a7',1,'stan::math::log_inv_logit(const T &u)']]], + ['log_5finv_5flogit_5fdiff',['log_inv_logit_diff',['../namespacestan_1_1math.html#ad4e08116b9ebf4a6592aa9f8fa393669',1,'stan::math']]], + ['log_5fmix',['log_mix',['../namespacestan_1_1math.html#a014f4431773309ae7fd1420b0f6aa99f',1,'stan::math::log_mix(const fvar< T > &theta, const fvar< T > &lambda1, const fvar< T > &lambda2)'],['../namespacestan_1_1math.html#aed956136160f52953529970a3ae4ef40',1,'stan::math::log_mix(const fvar< T > &theta, const fvar< T > &lambda1, const double lambda2)'],['../namespacestan_1_1math.html#a53f58fdf08759c58af217840a92ed4e8',1,'stan::math::log_mix(const fvar< T > &theta, const double lambda1, const fvar< T > &lambda2)'],['../namespacestan_1_1math.html#afd1210cb19932c4552f899d1582929e9',1,'stan::math::log_mix(const double theta, const fvar< T > &lambda1, const fvar< T > &lambda2)'],['../namespacestan_1_1math.html#a780462344be6c31a646da6cfbeb6c421',1,'stan::math::log_mix(const fvar< T > &theta, const double lambda1, const double lambda2)'],['../namespacestan_1_1math.html#aebd9e68e3b8dc002039c1afda1dce392',1,'stan::math::log_mix(const double theta, const fvar< T > &lambda1, const double lambda2)'],['../namespacestan_1_1math.html#a35eaca2241efa84971cb2aaa4efacbb0',1,'stan::math::log_mix(const double theta, const double lambda1, const fvar< T > &lambda2)'],['../namespacestan_1_1math.html#a1b7b9cda7f1b3234cc4b3fc20e595482',1,'stan::math::log_mix(double theta, double lambda1, double lambda2)'],['../namespacestan_1_1math.html#a91f87ac712232f684f398ff5e5865887',1,'stan::math::log_mix(const T_theta &theta, const T_lambda1 &lambda1, const T_lambda2 &lambda2)']]], + ['log_5fmix_5fpartial_5fhelper',['log_mix_partial_helper',['../namespacestan_1_1math.html#a9c93f2640b5f95b586b9521b09e52c31',1,'stan::math::log_mix_partial_helper(const T_theta &theta, const T_lambda1 &lambda1, const T_lambda2 &lambda2, typename promote_args< T_theta, T_lambda1, T_lambda2 >::type(&partials_array)[N])'],['../namespacestan_1_1math.html#a8b3e6e5267f60e3537dd8bdd0299a3ee',1,'stan::math::log_mix_partial_helper(const double &theta_val, const double &lambda1_val, const double &lambda2_val, double &one_m_exp_lam2_m_lam1, double &one_m_t_prod_exp_lam2_m_lam1, double &one_d_t_plus_one_m_t_prod_exp_lam2_m_lam1)']]], + ['log_5frising_5ffactorial',['log_rising_factorial',['../namespacestan_1_1math.html#aa4aff0dd42a2b0b33ac55e9a45f35b1e',1,'stan::math::log_rising_factorial(const fvar< T > &x, const fvar< T > &n)'],['../namespacestan_1_1math.html#a08d954744a945ff1f82a27d2eedb887f',1,'stan::math::log_rising_factorial(const fvar< T > &x, const double n)'],['../namespacestan_1_1math.html#a5ab4f0019045b98139b0626204e8f2a2',1,'stan::math::log_rising_factorial(const double x, const fvar< T > &n)'],['../namespacestan_1_1math.html#a05002f0d4de2c84705dc2bbadfce6b6c',1,'stan::math::log_rising_factorial(const T1 x, const T2 n)'],['../namespacestan_1_1math.html#a6353b21fe0f6314e677e0c0ec1d27e2a',1,'stan::math::log_rising_factorial(const var &a, const double &b)'],['../namespacestan_1_1math.html#a57ff05bb4af6475162c98f06f5ccd186',1,'stan::math::log_rising_factorial(const var &a, const var &b)'],['../namespacestan_1_1math.html#a5b4b56e93a461861d24468412ec75a3a',1,'stan::math::log_rising_factorial(const double &a, const var &b)']]], + ['log_5fsoftmax',['log_softmax',['../namespacestan_1_1math.html#a558975cc79251cd99966f99ed8795ddc',1,'stan::math::log_softmax(const Eigen::Matrix< fvar< T >, Eigen::Dynamic, 1 > &alpha)'],['../namespacestan_1_1math.html#a0f60a82d68ef90f7cd5e9f02f121a5d1',1,'stan::math::log_softmax(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v)'],['../namespacestan_1_1math.html#a443bda462051b08fcd0274c3ae1c73aa',1,'stan::math::log_softmax(const Eigen::Matrix< var, Eigen::Dynamic, 1 > &alpha)']]], + ['log_5fsum_5fexp',['log_sum_exp',['../namespacestan_1_1math.html#ac86474622fba4524c529c4b8024e4ceb',1,'stan::math::log_sum_exp(const std::vector< fvar< T > > &v)'],['../namespacestan_1_1math.html#a34a4bb0a8db85be07d98d3b2e2fc96c4',1,'stan::math::log_sum_exp(const Eigen::Matrix< fvar< T >, R, C > &v)'],['../namespacestan_1_1math.html#a177e64b45d304afc52540d776de8dbe1',1,'stan::math::log_sum_exp(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#aa0497ca733bb52ba08323b12ed654bc8',1,'stan::math::log_sum_exp(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#ab43880eef5d3a9017c9ab46fa2d1ef65',1,'stan::math::log_sum_exp(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#a9e67f9b1692743a9db4462e98bb49ef5',1,'stan::math::log_sum_exp(const std::vector< double > &x)'],['../namespacestan_1_1math.html#ac1fb47266493c7da21a6508944d65bdf',1,'stan::math::log_sum_exp(const Eigen::Matrix< double, R, C > &x)'],['../namespacestan_1_1math.html#a554e6f04e24049b7fe6e56f60abbc560',1,'stan::math::log_sum_exp(const T2 &a, const T1 &b)'],['../namespacestan_1_1math.html#add3072490832a96e50ca3143e4226e67',1,'stan::math::log_sum_exp(const std::vector< var > &x)'],['../namespacestan_1_1math.html#aa99a093a231daf213b589a2c96644fd7',1,'stan::math::log_sum_exp(const Eigen::Matrix< var, R, C > &x)'],['../namespacestan_1_1math.html#a50e133913e946710e85efc00306a2610',1,'stan::math::log_sum_exp(const stan::math::var &a, const stan::math::var &b)'],['../namespacestan_1_1math.html#a3c2ea975711d2420728cce2878bca93c',1,'stan::math::log_sum_exp(const stan::math::var &a, const double &b)'],['../namespacestan_1_1math.html#a04418b73a6d6efd660a67d9af4546840',1,'stan::math::log_sum_exp(const double &a, const stan::math::var &b)']]], + ['logical_5fand',['logical_and',['../namespacestan_1_1math.html#adc35bab2db89b3ceda66f11e1fa53ec8',1,'stan::math']]], + ['logical_5feq',['logical_eq',['../namespacestan_1_1math.html#ab2213736b55fd6696fa0120fd3fe72e4',1,'stan::math']]], + ['logical_5fgt',['logical_gt',['../namespacestan_1_1math.html#aba86bfd994302061a0260e1202fca777',1,'stan::math']]], + ['logical_5fgte',['logical_gte',['../namespacestan_1_1math.html#ac6bb0b8623192207d35e207ea312d8be',1,'stan::math']]], + ['logical_5flt',['logical_lt',['../namespacestan_1_1math.html#a0b5bd91412749e10933f304b54aef88f',1,'stan::math']]], + ['logical_5flte',['logical_lte',['../namespacestan_1_1math.html#af3649d4c704962c4502cd6220a5e2230',1,'stan::math']]], + ['logical_5fnegation',['logical_negation',['../namespacestan_1_1math.html#aad2fc9ce55dfac079d930335beb7e4a8',1,'stan::math']]], + ['logical_5fneq',['logical_neq',['../namespacestan_1_1math.html#a206eb210d8e7e2c718af25c40de8f9d1',1,'stan::math']]], + ['logical_5for',['logical_or',['../namespacestan_1_1math.html#ac74007e2d5f55d5ae4a308f535869aee',1,'stan::math']]], + ['logistic_5fccdf_5flog',['logistic_ccdf_log',['../namespacestan_1_1math.html#a2fd36ac96595c375db7fddc885c30794',1,'stan::math']]], + ['logistic_5fcdf',['logistic_cdf',['../namespacestan_1_1math.html#a1e1ca40295978d785324b33f3a78c96b',1,'stan::math']]], + ['logistic_5fcdf_5flog',['logistic_cdf_log',['../namespacestan_1_1math.html#a88d9fcb73b6a1d04896031edc0d8e510',1,'stan::math']]], + ['logistic_5flog',['logistic_log',['../namespacestan_1_1math.html#a431d5fcf935535cbe08981286652d57b',1,'stan::math::logistic_log(const T_y &y, const T_loc &mu, const T_scale &sigma)'],['../namespacestan_1_1math.html#a35fdf5c03ed2e39d081df54372622eec',1,'stan::math::logistic_log(const T_y &y, const T_loc &mu, const T_scale &sigma)']]], + ['logistic_5frng',['logistic_rng',['../namespacestan_1_1math.html#ac9fc8e75fbb17cb5f22079e90fac128b',1,'stan::math']]], + ['logit',['logit',['../namespacestan_1_1math.html#ab025eaf1e6f5c920f69c37e7a7f8b319',1,'stan::math::logit(const fvar< T > &x)'],['../namespacestan_1_1math.html#a53342d0c2cd3a6e440c533070054aca3',1,'stan::math::logit(const T a)']]], + ['lognormal_5fccdf_5flog',['lognormal_ccdf_log',['../namespacestan_1_1math.html#afacb0f2c6b58bc55e506f3bfcf9ba829',1,'stan::math']]], + ['lognormal_5fcdf',['lognormal_cdf',['../namespacestan_1_1math.html#a9536cc20905aca8f393138adbe71bb73',1,'stan::math']]], + ['lognormal_5fcdf_5flog',['lognormal_cdf_log',['../namespacestan_1_1math.html#a1a771406ab16c52532e52bebc21c31f6',1,'stan::math']]], + ['lognormal_5flog',['lognormal_log',['../namespacestan_1_1math.html#a623bb0aad5e3d872d52d0443a46ad270',1,'stan::math::lognormal_log(const T_y &y, const T_loc &mu, const T_scale &sigma)'],['../namespacestan_1_1math.html#a2bfc3796274f4ccd677f96792551c127',1,'stan::math::lognormal_log(const T_y &y, const T_loc &mu, const T_scale &sigma)']]], + ['lognormal_5frng',['lognormal_rng',['../namespacestan_1_1math.html#af5a619e160ca64fff9f2d69b32bf69b6',1,'stan::math']]], + ['lowest',['lowest',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#aaf7446de33e7a3e5f21b4548ccaf5c7a',1,'Eigen::NumTraits< stan::math::fvar< T > >::lowest()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#a4888e98688ab32e913800888a9fe04dc',1,'Eigen::NumTraits< stan::math::var >::lowest()']]], + ['lub_5fconstrain',['lub_constrain',['../namespacestan_1_1math.html#a5cc0ef5cf22dda83988c062b529dc3a6',1,'stan::math::lub_constrain(const T x, TL lb, TU ub)'],['../namespacestan_1_1math.html#ab51cc5fe98ac938435e614765e30655a',1,'stan::math::lub_constrain(const T x, const TL lb, const TU ub, T &lp)']]], + ['lub_5ffree',['lub_free',['../namespacestan_1_1math.html#ab9fa09fdc448652a57d364d70d6e88e3',1,'stan::math']]] +]; diff --git a/doc/api/html/search/functions_b.html b/doc/api/html/search/functions_b.html new file mode 100644 index 00000000000..1a03617de08 --- /dev/null +++ b/doc/api/html/search/functions_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/functions_b.js b/doc/api/html/search/functions_b.js new file mode 100644 index 00000000000..5b2782e7241 --- /dev/null +++ b/doc/api/html/search/functions_b.js @@ -0,0 +1,40 @@ +var searchData= +[ + ['machine_5fprecision',['machine_precision',['../namespacestan_1_1math.html#a173839dddd0a8ac8afa710b9e3d5008a',1,'stan::math']]], + ['make_5fnu',['make_nu',['../namespacestan_1_1math.html#a71d39c88943f3fb8e45759c62d68953b',1,'stan::math']]], + ['matrix_5fnormal_5fprec_5flog',['matrix_normal_prec_log',['../namespacestan_1_1math.html#a3feb895ef1190ad6e77185e70a3fa66d',1,'stan::math::matrix_normal_prec_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_Mu, Eigen::Dynamic, Eigen::Dynamic > &Mu, const Eigen::Matrix< T_Sigma, Eigen::Dynamic, Eigen::Dynamic > &Sigma, const Eigen::Matrix< T_D, Eigen::Dynamic, Eigen::Dynamic > &D)'],['../namespacestan_1_1math.html#add509bb48f33e775f906f8e9e0c0c4f9',1,'stan::math::matrix_normal_prec_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_Mu, Eigen::Dynamic, Eigen::Dynamic > &Mu, const Eigen::Matrix< T_Sigma, Eigen::Dynamic, Eigen::Dynamic > &Sigma, const Eigen::Matrix< T_D, Eigen::Dynamic, Eigen::Dynamic > &D)']]], + ['matrixldlt',['matrixLDLT',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#a3b6f930baacb4fb2ecca1acf8d104ffb',1,'stan::math::LDLT_factor< T, R, C >']]], + ['max',['max',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a54b8e07a42d555f9783640b49428da2c',1,'std::numeric_limits< stan::math::fvar< T > >::max()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a7ac4e8fcb64946415100aa2ff28799ee',1,'std::numeric_limits< stan::math::var >::max()'],['../namespacestan_1_1math.html#a5da0ef87756d3dbd20ca4ff5a3efa10d',1,'stan::math::max(const std::vector< int > &x)'],['../namespacestan_1_1math.html#acde414919e0e4dcfa72d565679819091',1,'stan::math::max(const std::vector< T > &x)'],['../namespacestan_1_1math.html#ae3f299773dc20e8305fc16df1be8d029',1,'stan::math::max(const Eigen::Matrix< T, R, C > &m)']]], + ['max_5fsize',['max_size',['../namespacestan.html#a8b2c79a3a686dcf90566be8492e1065d',1,'stan::max_size(const T1 &x1, const T2 &x2)'],['../namespacestan.html#ac5ca4bf16c3b5c453162473c67f844bb',1,'stan::max_size(const T1 &x1, const T2 &x2, const T3 &x3)'],['../namespacestan.html#afff0e381090b0d490dc3b23f3eaf8846',1,'stan::max_size(const T1 &x1, const T2 &x2, const T3 &x3, const T4 &x4)']]], + ['max_5fsize_5fmvt',['max_size_mvt',['../namespacestan.html#a7abf6526ceb23475508fd42299a7a369',1,'stan::max_size_mvt(const T1 &x1, const T2 &x2)'],['../namespacestan.html#affb43a3cfb08d96ce95ce951e6c9a41b',1,'stan::max_size_mvt(const T1 &x1, const T2 &x2, const T3 &x3)'],['../namespacestan.html#a78263bfb6e683bf6d4f2cf48cec9d875',1,'stan::max_size_mvt(const T1 &x1, const T2 &x2, const T3 &x3, const T4 &x4)']]], + ['mdivide_5fleft',['mdivide_left',['../namespacestan_1_1math.html#a0f50d0ea5c9343dae0945012924f127c',1,'stan::math::mdivide_left(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)'],['../namespacestan_1_1math.html#a1b9c580ecf4fc5b7a9e7523325a6cbe5',1,'stan::math::mdivide_left(const Eigen::Matrix< double, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)'],['../namespacestan_1_1math.html#a933154f105a6d18864cfca8a8e2ff12c',1,'stan::math::mdivide_left(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)'],['../namespacestan_1_1math.html#a78e254b9ffb28a6fe6820f9f84412907',1,'stan::math::mdivide_left(const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &b)'],['../namespacestan_1_1math.html#aef0d163d45e4ee75444257dea341b731',1,'stan::math::mdivide_left(const Eigen::Matrix< var, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)'],['../namespacestan_1_1math.html#ad6f9550fa3c3a000d8fb1657681d7ecb',1,'stan::math::mdivide_left(const Eigen::Matrix< var, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)'],['../namespacestan_1_1math.html#ad0203466ed040dd643c8b6d4a78d7f53',1,'stan::math::mdivide_left(const Eigen::Matrix< double, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)']]], + ['mdivide_5fleft_5fldlt',['mdivide_left_ldlt',['../namespacestan_1_1math.html#a63890dd40cd8ad08a55c3b4e8616c741',1,'stan::math::mdivide_left_ldlt(const stan::math::LDLT_factor< double, R1, C1 > &A, const Eigen::Matrix< fvar< T2 >, R2, C2 > &b)'],['../namespacestan_1_1math.html#a8d06ecbc0a8e5cc50c42861bb20f1b0e',1,'stan::math::mdivide_left_ldlt(const stan::math::LDLT_factor< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &b)'],['../namespacestan_1_1math.html#a84f1163f092f8ce7053a67d3d46302ef',1,'stan::math::mdivide_left_ldlt(const stan::math::LDLT_factor< var, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)'],['../namespacestan_1_1math.html#a6a4be1cd5b51a7d2758a75e9541ad042',1,'stan::math::mdivide_left_ldlt(const stan::math::LDLT_factor< var, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)'],['../namespacestan_1_1math.html#aed166703ba12f63c6cad94e0cc5a6f8f',1,'stan::math::mdivide_left_ldlt(const stan::math::LDLT_factor< double, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)']]], + ['mdivide_5fleft_5fspd',['mdivide_left_spd',['../namespacestan_1_1math.html#af0e78140ced17ce9be79c29b9f23321b',1,'stan::math::mdivide_left_spd(const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &b)'],['../namespacestan_1_1math.html#a1ba7ed90b8091cf3dee35b9d4688cbc0',1,'stan::math::mdivide_left_spd(const Eigen::Matrix< var, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)'],['../namespacestan_1_1math.html#ae3487ef4bdd1b20d8d5e5f7d5ff57738',1,'stan::math::mdivide_left_spd(const Eigen::Matrix< var, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)'],['../namespacestan_1_1math.html#a4b8412be81e5c41c2b59e761476ac82a',1,'stan::math::mdivide_left_spd(const Eigen::Matrix< double, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)']]], + ['mdivide_5fleft_5ftri',['mdivide_left_tri',['../namespacestan_1_1math.html#ab9ef591181f40598fd3c012c6e5e354d',1,'stan::math::mdivide_left_tri(const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &b)'],['../namespacestan_1_1math.html#a1e94b2554b4728e4932aded1d71eb026',1,'stan::math::mdivide_left_tri(const Eigen::Matrix< T, R1, C1 > &A)'],['../namespacestan_1_1math.html#a2622a3a81c3faba8fa3c3dfc5f848b48',1,'stan::math::mdivide_left_tri(const Eigen::Matrix< var, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)'],['../namespacestan_1_1math.html#aa1f2d1a3336eefc43a12affb5862e663',1,'stan::math::mdivide_left_tri(const Eigen::Matrix< double, R1, C1 > &A, const Eigen::Matrix< var, R2, C2 > &b)'],['../namespacestan_1_1math.html#a318338a3886f5b653a5e5d284db4ce50',1,'stan::math::mdivide_left_tri(const Eigen::Matrix< var, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)']]], + ['mdivide_5fleft_5ftri_5flow',['mdivide_left_tri_low',['../namespacestan_1_1math.html#a7eb79c8ce7ae730ba02342b4241aeac1',1,'stan::math::mdivide_left_tri_low(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)'],['../namespacestan_1_1math.html#a98e366981089fe4cd134efa82492ced2',1,'stan::math::mdivide_left_tri_low(const Eigen::Matrix< double, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)'],['../namespacestan_1_1math.html#a5d6c4407f5ae843d0c12e15863591d22',1,'stan::math::mdivide_left_tri_low(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)'],['../namespacestan_1_1math.html#a154c4bb61dd8dce054238940b75aeaac',1,'stan::math::mdivide_left_tri_low(const Eigen::Matrix< T1, R1, C1 > &A, const Eigen::Matrix< T2, R2, C2 > &b)'],['../namespacestan_1_1math.html#afdd9357ad5b52be5547eecdde95e968b',1,'stan::math::mdivide_left_tri_low(const Eigen::Matrix< T, R1, C1 > &A)']]], + ['mdivide_5fright',['mdivide_right',['../namespacestan_1_1math.html#a2ad09daa535a7aeda34199d43a8e9e29',1,'stan::math::mdivide_right(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)'],['../namespacestan_1_1math.html#a56f6566409d59f27b6f3086afeb0b18b',1,'stan::math::mdivide_right(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)'],['../namespacestan_1_1math.html#a9769485dc9f11852020b153b2ffe8bff',1,'stan::math::mdivide_right(const Eigen::Matrix< double, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)'],['../namespacestan_1_1math.html#a3fc8c5bb0af596842ae6cc7f11556f56',1,'stan::math::mdivide_right(const Eigen::Matrix< T1, R1, C1 > &b, const Eigen::Matrix< T2, R2, C2 > &A)']]], + ['mdivide_5fright_5fldlt',['mdivide_right_ldlt',['../namespacestan_1_1math.html#ad9f8ca30a27a0a70d32477a9fb4c4e25',1,'stan::math::mdivide_right_ldlt(const Eigen::Matrix< T1, R1, C1 > &b, const stan::math::LDLT_factor< T2, R2, C2 > &A)'],['../namespacestan_1_1math.html#a1f4edbfe01ea37356acd24cc948425c8',1,'stan::math::mdivide_right_ldlt(const Eigen::Matrix< double, R1, C1 > &b, const stan::math::LDLT_factor< double, R2, C2 > &A)']]], + ['mdivide_5fright_5fspd',['mdivide_right_spd',['../namespacestan_1_1math.html#ab73c90537220c0205f5355895a14621c',1,'stan::math']]], + ['mdivide_5fright_5ftri',['mdivide_right_tri',['../namespacestan_1_1math.html#a43a692492445dff37a2594267d530796',1,'stan::math']]], + ['mdivide_5fright_5ftri_5flow',['mdivide_right_tri_low',['../namespacestan_1_1math.html#a5309461c7fc32ca494e80af0722766af',1,'stan::math::mdivide_right_tri_low(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)'],['../namespacestan_1_1math.html#a51cb38185a25a0971268ba6507af8667',1,'stan::math::mdivide_right_tri_low(const Eigen::Matrix< fvar< T >, R1, C1 > &A, const Eigen::Matrix< double, R2, C2 > &b)'],['../namespacestan_1_1math.html#a046824a9236dae195f0c0e5eb69dd8a6',1,'stan::math::mdivide_right_tri_low(const Eigen::Matrix< double, R1, C1 > &A, const Eigen::Matrix< fvar< T >, R2, C2 > &b)'],['../namespacestan_1_1math.html#a38aef2711a500bdb997863f0dc6b5d17',1,'stan::math::mdivide_right_tri_low(const Eigen::Matrix< T1, R1, C1 > &b, const Eigen::Matrix< T2, R2, C2 > &A)']]], + ['mean',['mean',['../namespacestan_1_1math.html#a3443c4ac994b039a7f055c55c5afa8a3',1,'stan::math::mean(const std::vector< T > &v)'],['../namespacestan_1_1math.html#a8074c0041b93407c473fd26a7c45dc88',1,'stan::math::mean(const Eigen::Matrix< T, R, C > &m)']]], + ['min',['min',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a1f98885d72104f524c0cbccbd7ac3152',1,'std::numeric_limits< stan::math::fvar< T > >::min()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a8d71ee2cb09cc89fbc145616d5123f80',1,'std::numeric_limits< stan::math::var >::min()'],['../namespacestan_1_1math.html#a3f076860549f63d55c0e4985dce78099',1,'stan::math::min(const std::vector< int > &x)'],['../namespacestan_1_1math.html#a9e9c3a01030d96fd4c8f28e2ed8d3d61',1,'stan::math::min(const std::vector< T > &x)'],['../namespacestan_1_1math.html#a86f2380e5c54a549e0f74ffd51204d33',1,'stan::math::min(const Eigen::Matrix< T, R, C > &m)']]], + ['minus',['minus',['../namespacestan_1_1math.html#a87b343d6dc12982c2b76c453650c0797',1,'stan::math']]], + ['modified_5fbessel_5ffirst_5fkind',['modified_bessel_first_kind',['../namespacestan_1_1math.html#adcb3160540f6fe745abb846df2174742',1,'stan::math::modified_bessel_first_kind(int v, const fvar< T > &z)'],['../namespacestan_1_1math.html#acafecf14b103c7c17da33368d07b1565',1,'stan::math::modified_bessel_first_kind(const int v, const T2 z)'],['../namespacestan_1_1math.html#a5625b66e071a9b57af3f0dd9325c79bd',1,'stan::math::modified_bessel_first_kind(const int &v, const var &a)']]], + ['modified_5fbessel_5fsecond_5fkind',['modified_bessel_second_kind',['../namespacestan_1_1math.html#a3277f8bf3ed3b3e36a61dedd4ed0449b',1,'stan::math::modified_bessel_second_kind(int v, const fvar< T > &z)'],['../namespacestan_1_1math.html#a72ce86f3db5478cad4666c9cf1d05a6e',1,'stan::math::modified_bessel_second_kind(const int v, const T2 z)'],['../namespacestan_1_1math.html#a1f39f5d25033d6fb49cf875cc18fa956',1,'stan::math::modified_bessel_second_kind(const int &v, const var &a)']]], + ['modulus',['modulus',['../namespacestan_1_1math.html#afcf62df7cae63f67b1c5c67651bc8dcf',1,'stan::math']]], + ['multi_5fgp_5fcholesky_5flog',['multi_gp_cholesky_log',['../namespacestan_1_1math.html#a07d240bac837d28cf3d5922de0271cf8',1,'stan::math::multi_gp_cholesky_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L, const Eigen::Matrix< T_w, Eigen::Dynamic, 1 > &w)'],['../namespacestan_1_1math.html#a44ed8a0eabcdfa57bc7fde011d30bf8c',1,'stan::math::multi_gp_cholesky_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &L, const Eigen::Matrix< T_w, Eigen::Dynamic, 1 > &w)']]], + ['multi_5fgp_5flog',['multi_gp_log',['../namespacestan_1_1math.html#a74b27063a645fbb1e20add3cc5f2aed5',1,'stan::math::multi_gp_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &Sigma, const Eigen::Matrix< T_w, Eigen::Dynamic, 1 > &w)'],['../namespacestan_1_1math.html#a3535a644a9ec735e4c5ed0951909d1ab',1,'stan::math::multi_gp_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const Eigen::Matrix< T_covar, Eigen::Dynamic, Eigen::Dynamic > &Sigma, const Eigen::Matrix< T_w, Eigen::Dynamic, 1 > &w)']]], + ['multi_5fnormal_5fcholesky_5flog',['multi_normal_cholesky_log',['../namespacestan_1_1math.html#a73c48789407296b1fd9497d3e27ef26d',1,'stan::math::multi_normal_cholesky_log(const T_y &y, const T_loc &mu, const T_covar &L)'],['../namespacestan_1_1math.html#af5aed6517d1de44fc193a8bf7b018bfe',1,'stan::math::multi_normal_cholesky_log(const T_y &y, const T_loc &mu, const T_covar &L)']]], + ['multi_5fnormal_5fcholesky_5frng',['multi_normal_cholesky_rng',['../namespacestan_1_1math.html#a0a05ae7884660def13b35c9d3d59a708',1,'stan::math']]], + ['multi_5fnormal_5flog',['multi_normal_log',['../namespacestan_1_1math.html#a69fa873591f0954b506eb709537a73f8',1,'stan::math::multi_normal_log(const T_y &y, const T_loc &mu, const T_covar &Sigma)'],['../namespacestan_1_1math.html#a38c98c7961178da90570cb63499eb2b8',1,'stan::math::multi_normal_log(const T_y &y, const T_loc &mu, const T_covar &Sigma)']]], + ['multi_5fnormal_5fprec_5flog',['multi_normal_prec_log',['../namespacestan_1_1math.html#a83fb51aaff3da3d727bc12a3cdd106c5',1,'stan::math::multi_normal_prec_log(const T_y &y, const T_loc &mu, const T_covar &Sigma)'],['../namespacestan_1_1math.html#a79191e304518140dbaf8feaab2c90aab',1,'stan::math::multi_normal_prec_log(const T_y &y, const T_loc &mu, const T_covar &Sigma)']]], + ['multi_5fnormal_5frng',['multi_normal_rng',['../namespacestan_1_1math.html#a46c260fca0e710ffa12410e53da4cbc0',1,'stan::math']]], + ['multi_5fstudent_5ft_5flog',['multi_student_t_log',['../namespacestan_1_1math.html#ac7b9a72ca7018cbf7883d7104345b4f6',1,'stan::math::multi_student_t_log(const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &Sigma)'],['../namespacestan_1_1math.html#a1e1b7da1cebae4c8db3067f614c777aa',1,'stan::math::multi_student_t_log(const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &Sigma)']]], + ['multi_5fstudent_5ft_5frng',['multi_student_t_rng',['../namespacestan_1_1math.html#aca9dfb65a8ae0210632ae0c42b2ae5c6',1,'stan::math']]], + ['multinomial_5flog',['multinomial_log',['../namespacestan_1_1math.html#a65b47c026be99de35988287412664e3d',1,'stan::math::multinomial_log(const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)'],['../namespacestan_1_1math.html#ae23c14c3cb5d40c6fa46b89ddc5d5285',1,'stan::math::multinomial_log(const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)']]], + ['multinomial_5frng',['multinomial_rng',['../namespacestan_1_1math.html#a99ab77cc7ea8b9f49a61abe7576c8331',1,'stan::math']]], + ['multiply',['multiply',['../namespacestan_1_1math.html#a35a69b84ead3c81cbaff702ac429e1cc',1,'stan::math::multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m, const fvar< T > &c)'],['../namespacestan_1_1math.html#aa473aa547cf1bb658edb99fd1182e989',1,'stan::math::multiply(const Eigen::Matrix< fvar< T >, R2, C2 > &m, const double c)'],['../namespacestan_1_1math.html#a81ca3cf29874f3f7a3334b0b7e5db09b',1,'stan::math::multiply(const Eigen::Matrix< double, R1, C1 > &m, const fvar< T > &c)'],['../namespacestan_1_1math.html#a00de5667a1e8f49293a35bcd21e86104',1,'stan::math::multiply(const fvar< T > &c, const Eigen::Matrix< fvar< T >, R1, C1 > &m)'],['../namespacestan_1_1math.html#ad58b9aa1f80267935b6dc1bf57a20090',1,'stan::math::multiply(const double c, const Eigen::Matrix< fvar< T >, R1, C1 > &m)'],['../namespacestan_1_1math.html#a18ef18d2345a17eb4044bb4697c18ca3',1,'stan::math::multiply(const fvar< T > &c, const Eigen::Matrix< double, R1, C1 > &m)'],['../namespacestan_1_1math.html#a79dea45b5f0a70316514dadfa5bd5ea2',1,'stan::math::multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m1, const Eigen::Matrix< fvar< T >, R2, C2 > &m2)'],['../namespacestan_1_1math.html#aa34755674f81a0403550b728a50b390d',1,'stan::math::multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m1, const Eigen::Matrix< double, R2, C2 > &m2)'],['../namespacestan_1_1math.html#a22fc2abfda7f892c5eeb8fec8f8cd765',1,'stan::math::multiply(const Eigen::Matrix< double, R1, C1 > &m1, const Eigen::Matrix< fvar< T >, R2, C2 > &m2)'],['../namespacestan_1_1math.html#a69034d7594d58dd7f6362caa5aebe03d',1,'stan::math::multiply(const Eigen::Matrix< fvar< T >, 1, C1 > &rv, const Eigen::Matrix< fvar< T >, R2, 1 > &v)'],['../namespacestan_1_1math.html#ace64b783b01a987d981c17cbcc33e4b6',1,'stan::math::multiply(const Eigen::Matrix< fvar< T >, 1, C1 > &rv, const Eigen::Matrix< double, R2, 1 > &v)'],['../namespacestan_1_1math.html#a7af8534a80b35c3af6a6cf23cdddd46c',1,'stan::math::multiply(const Eigen::Matrix< double, 1, C1 > &rv, const Eigen::Matrix< fvar< T >, R2, 1 > &v)'],['../namespacestan_1_1math.html#a919d4a6495c489841df3d0423200b147',1,'stan::math::multiply(const Eigen::Matrix< double, R, C > &m, T c)'],['../namespacestan_1_1math.html#a5a2b6dbfb5543b73dac8496091745ec1',1,'stan::math::multiply(T c, const Eigen::Matrix< double, R, C > &m)'],['../namespacestan_1_1math.html#aeefbdef5245cd4f80dcee30d2a36131f',1,'stan::math::multiply(const Eigen::Matrix< double, R1, C1 > &m1, const Eigen::Matrix< double, R2, C2 > &m2)'],['../namespacestan_1_1math.html#a6e67698775aaac248efa49b646ca2a51',1,'stan::math::multiply(const Eigen::Matrix< double, 1, C1 > &rv, const Eigen::Matrix< double, R2, 1 > &v)'],['../namespacestan_1_1math.html#a064999d72ccfe825466a8d35221270c6',1,'stan::math::multiply(const T1 &v, const T2 &c)'],['../namespacestan_1_1math.html#a2287bd9466a58f7df6ca88bf3374c7e9',1,'stan::math::multiply(const T1 &c, const Eigen::Matrix< T2, R2, C2 > &m)'],['../namespacestan_1_1math.html#a0671954ee3596b7ca59ec1e3bf832c63',1,'stan::math::multiply(const Eigen::Matrix< T1, R1, C1 > &m, const T2 &c)'],['../namespacestan_1_1math.html#a6ba7d9d70a0b0c4515d767bcde7d2f66',1,'stan::math::multiply(const Eigen::Matrix< T1, R1, C1 > &m1, const Eigen::Matrix< T2, R2, C2 > &m2)'],['../namespacestan_1_1math.html#aeaecf22fee1b8944975a8124cd294bf0',1,'stan::math::multiply(const Eigen::Matrix< T1, 1, C1 > &rv, const Eigen::Matrix< T2, R2, 1 > &v)']]], + ['multiply_5flog',['multiply_log',['../namespacestan_1_1math.html#a055efd6bb49a1df5ea4da98d1078d0e6',1,'stan::math::multiply_log(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#abafa25b9871a31fc9bad3b23e43f24e4',1,'stan::math::multiply_log(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#ac0df8fa73f8f9435f44780baa1379dc6',1,'stan::math::multiply_log(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#a0f15d9bf40cdab5e3ef75cea2595244c',1,'stan::math::multiply_log(const T_a a, const T_b b)'],['../namespacestan_1_1math.html#a3da7e77b75bf5f288ddc7c546f941c70',1,'stan::math::multiply_log(const var &a, const var &b)'],['../namespacestan_1_1math.html#aa05bd638024e60440e56c8ee4a0dbab3',1,'stan::math::multiply_log(const var &a, const double b)'],['../namespacestan_1_1math.html#a3c980d72501fd340f6148c125c1da018',1,'stan::math::multiply_log(const double a, const var &b)']]], + ['multiply_5flower_5ftri_5fself_5ftranspose',['multiply_lower_tri_self_transpose',['../namespacestan_1_1math.html#a0d671dcfc6f4c1b4896c5d8bc4568acf',1,'stan::math::multiply_lower_tri_self_transpose(const Eigen::Matrix< fvar< T >, R, C > &m)'],['../namespacestan_1_1math.html#a3c0c953951f141b35277fe2308777cff',1,'stan::math::multiply_lower_tri_self_transpose(const matrix_d &L)'],['../namespacestan_1_1math.html#a6f4d12daa275a9a471974f6447396266',1,'stan::math::multiply_lower_tri_self_transpose(const matrix_v &L)']]] +]; diff --git a/doc/api/html/search/functions_c.html b/doc/api/html/search/functions_c.html new file mode 100644 index 00000000000..a6536e94199 --- /dev/null +++ b/doc/api/html/search/functions_c.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/functions_c.js b/doc/api/html/search/functions_c.js new file mode 100644 index 00000000000..4bde07d8148 --- /dev/null +++ b/doc/api/html/search/functions_c.js @@ -0,0 +1,25 @@ +var searchData= +[ + ['neg_5fbinomial_5f2_5fccdf_5flog',['neg_binomial_2_ccdf_log',['../namespacestan_1_1math.html#a63d35a349ee49712178c19dde27fcc5d',1,'stan::math']]], + ['neg_5fbinomial_5f2_5fcdf',['neg_binomial_2_cdf',['../namespacestan_1_1math.html#a6bc7b5ee1f4534f7c6eb509f08c1dd8b',1,'stan::math']]], + ['neg_5fbinomial_5f2_5fcdf_5flog',['neg_binomial_2_cdf_log',['../namespacestan_1_1math.html#ade0a4ada20d2611ea7b7c717bcfd42ad',1,'stan::math']]], + ['neg_5fbinomial_5f2_5flog',['neg_binomial_2_log',['../namespacestan_1_1math.html#a72735047f883b88395f4e50e515140d2',1,'stan::math::neg_binomial_2_log(const T_n &n, const T_location &mu, const T_precision &phi)'],['../namespacestan_1_1math.html#abf533af613ce70cc7b53fd678c2363b7',1,'stan::math::neg_binomial_2_log(const T_n &n, const T_location &mu, const T_precision &phi)']]], + ['neg_5fbinomial_5f2_5flog_5flog',['neg_binomial_2_log_log',['../namespacestan_1_1math.html#a07f9603fcb9767d59c7aa75cfbd489e9',1,'stan::math::neg_binomial_2_log_log(const T_n &n, const T_log_location &eta, const T_precision &phi)'],['../namespacestan_1_1math.html#aef63f32976322da20fcea2a0c15fb888',1,'stan::math::neg_binomial_2_log_log(const T_n &n, const T_log_location &eta, const T_precision &phi)']]], + ['neg_5fbinomial_5f2_5flog_5frng',['neg_binomial_2_log_rng',['../namespacestan_1_1math.html#a626a27ed755b59249175c99dd2548ea3',1,'stan::math']]], + ['neg_5fbinomial_5f2_5frng',['neg_binomial_2_rng',['../namespacestan_1_1math.html#a1088da4c2c0c2b157862fbad43c75d0a',1,'stan::math']]], + ['neg_5fbinomial_5fccdf_5flog',['neg_binomial_ccdf_log',['../namespacestan_1_1math.html#a176323fd45f7f70cf9fa801310c3c614',1,'stan::math']]], + ['neg_5fbinomial_5fcdf',['neg_binomial_cdf',['../namespacestan_1_1math.html#a31e90bd5f65cafdcd66b41617bf31718',1,'stan::math']]], + ['neg_5fbinomial_5fcdf_5flog',['neg_binomial_cdf_log',['../namespacestan_1_1math.html#a51e5ebf37ccf49350280631039a23017',1,'stan::math']]], + ['neg_5fbinomial_5flog',['neg_binomial_log',['../namespacestan_1_1math.html#a5b3f283f0d71f78bb437e1e1c4fdb805',1,'stan::math::neg_binomial_log(const T_n &n, const T_shape &alpha, const T_inv_scale &beta)'],['../namespacestan_1_1math.html#a24147a6471d65586101de3a5dfa4a53c',1,'stan::math::neg_binomial_log(const T_n &n, const T_shape &alpha, const T_inv_scale &beta)']]], + ['neg_5fbinomial_5frng',['neg_binomial_rng',['../namespacestan_1_1math.html#a898e2ab003c78229367378b150c78aca',1,'stan::math']]], + ['negative_5finfinity',['negative_infinity',['../namespacestan_1_1math.html#a34bffe91b7a24cb29bd69cb60814c39e',1,'stan::math']]], + ['nested_5fsize',['nested_size',['../namespacestan_1_1math.html#ac0f68ac575a2b8dff3a7a2359962c607',1,'stan::math']]], + ['normal_5fccdf_5flog',['normal_ccdf_log',['../namespacestan_1_1math.html#a2214490cfe7d81bdc51318028cd7df94',1,'stan::math']]], + ['normal_5fcdf',['normal_cdf',['../namespacestan_1_1math.html#aa2b9ee666af5f1741dc9f75108176386',1,'stan::math']]], + ['normal_5fcdf_5flog',['normal_cdf_log',['../namespacestan_1_1math.html#a6d0b3b3339016b3282cf360feb7cd0f9',1,'stan::math']]], + ['normal_5flog',['normal_log',['../namespacestan_1_1math.html#a1b7d387734f07e63bf2713b610f73a2d',1,'stan::math::normal_log(const T_y &y, const T_loc &mu, const T_scale &sigma)'],['../namespacestan_1_1math.html#afc2fd29076680ce830285130b5fd6f81',1,'stan::math::normal_log(const T_y &y, const T_loc &mu, const T_scale &sigma)']]], + ['normal_5frng',['normal_rng',['../namespacestan_1_1math.html#ac70652885c9903a1122575590075bc78',1,'stan::math']]], + ['not_5fa_5fnumber',['not_a_number',['../namespacestan_1_1math.html#a381493bccc58bd993d797a2a5458c486',1,'stan::math']]], + ['num_5felements',['num_elements',['../namespacestan_1_1math.html#ac360c5b10dbf87d81e346f2be7d19ade',1,'stan::math::num_elements(const T &x)'],['../namespacestan_1_1math.html#a3e716815601bf5055a2d7fbfd8a757ea',1,'stan::math::num_elements(const Eigen::Matrix< T, R, C > &m)'],['../namespacestan_1_1math.html#a38a5d6d7f867666902fcd0adbe602920',1,'stan::math::num_elements(const std::vector< T > &v)']]], + ['num_5fsamples',['num_samples',['../classstan_1_1math_1_1welford__covar__estimator.html#a2ec375fd25e5d9a0c04b05082632f2fe',1,'stan::math::welford_covar_estimator::num_samples()'],['../classstan_1_1math_1_1welford__var__estimator.html#aec56710e92822346d88c9560e89bac31',1,'stan::math::welford_var_estimator::num_samples()']]] +]; diff --git a/doc/api/html/search/functions_d.html b/doc/api/html/search/functions_d.html new file mode 100644 index 00000000000..8cdcc06f338 --- /dev/null +++ b/doc/api/html/search/functions_d.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/functions_d.js b/doc/api/html/search/functions_d.js new file mode 100644 index 00000000000..51a864d9e2c --- /dev/null +++ b/doc/api/html/search/functions_d.js @@ -0,0 +1,45 @@ +var searchData= +[ + ['op_5fddv_5fvari',['op_ddv_vari',['../classstan_1_1math_1_1op__ddv__vari.html#ace53db6f0edb4a841be08a8692d1db68',1,'stan::math::op_ddv_vari']]], + ['op_5fdv_5fvari',['op_dv_vari',['../classstan_1_1math_1_1op__dv__vari.html#a323e4ee6a54cf1beeb8427c1e1b2e844',1,'stan::math::op_dv_vari']]], + ['op_5fdvd_5fvari',['op_dvd_vari',['../classstan_1_1math_1_1op__dvd__vari.html#ac81bd4c694f92f8f6bebc20b02571535',1,'stan::math::op_dvd_vari']]], + ['op_5fdvv_5fvari',['op_dvv_vari',['../classstan_1_1math_1_1op__dvv__vari.html#a311ec040af4430d5d2ca608ab21c4bd3',1,'stan::math::op_dvv_vari']]], + ['op_5fmatrix_5fvari',['op_matrix_vari',['../classstan_1_1math_1_1op__matrix__vari.html#a38f1c03104b4d76ec79aca62a1d0f66f',1,'stan::math::op_matrix_vari']]], + ['op_5fv_5fvari',['op_v_vari',['../classstan_1_1math_1_1op__v__vari.html#a9d5d71fd9963d2e5c8bff707127b2380',1,'stan::math::op_v_vari']]], + ['op_5fvd_5fvari',['op_vd_vari',['../classstan_1_1math_1_1op__vd__vari.html#a013c49536757793f7b912c7f1b046111',1,'stan::math::op_vd_vari']]], + ['op_5fvdd_5fvari',['op_vdd_vari',['../classstan_1_1math_1_1op__vdd__vari.html#abceb88fe7a28682e996e02e92615a9d1',1,'stan::math::op_vdd_vari']]], + ['op_5fvdv_5fvari',['op_vdv_vari',['../classstan_1_1math_1_1op__vdv__vari.html#a68c779eb803deaffa3b31f69bfc8b329',1,'stan::math::op_vdv_vari']]], + ['op_5fvector_5fvari',['op_vector_vari',['../classstan_1_1math_1_1op__vector__vari.html#ac291df279dc87ae570666da57c96315c',1,'stan::math::op_vector_vari']]], + ['op_5fvv_5fvari',['op_vv_vari',['../classstan_1_1math_1_1op__vv__vari.html#a3dcab4ca1dbd8919683d11d13419278e',1,'stan::math::op_vv_vari']]], + ['op_5fvvd_5fvari',['op_vvd_vari',['../classstan_1_1math_1_1op__vvd__vari.html#a9d05288a55b07c9dedc37436f42fa4b6',1,'stan::math::op_vvd_vari']]], + ['op_5fvvv_5fvari',['op_vvv_vari',['../classstan_1_1math_1_1op__vvv__vari.html#ac1e794e5ed125a3183d00d84d22cb7aa',1,'stan::math::op_vvv_vari']]], + ['operandsandpartials',['OperandsAndPartials',['../structstan_1_1math_1_1_operands_and_partials.html#ab89a553dc2caead793ca640e8c2f4c2d',1,'stan::math::OperandsAndPartials']]], + ['operator_20delete',['operator delete',['../classstan_1_1math_1_1chainable.html#ad1e5a4d2b24e2be589ac518a9a13771d',1,'stan::math::chainable']]], + ['operator_20new',['operator new',['../classstan_1_1math_1_1chainable.html#a669334f2d01990ab50f2b33cd7dff780',1,'stan::math::chainable']]], + ['operator_21',['operator!',['../namespacestan_1_1math.html#aeee31e071296bea410dd943347b9a65d',1,'stan::math']]], + ['operator_21_3d',['operator!=',['../namespacestan_1_1math.html#a65438bf17da7bbedb06bc7c381cea865',1,'stan::math::operator!=(const fvar< T > &x, const fvar< T > &y)'],['../namespacestan_1_1math.html#a41e121241958fdcc4d2190bc532e9bc5',1,'stan::math::operator!=(const fvar< T > &x, double y)'],['../namespacestan_1_1math.html#ae982faec66434385fda1c728b0b2bf3d',1,'stan::math::operator!=(double x, const fvar< T > &y)'],['../namespacestan_1_1math.html#ae23eb5d64637b32c92292456aa006ff0',1,'stan::math::operator!=(const var &a, const var &b)'],['../namespacestan_1_1math.html#a570111dc15835a88afcfb8130b4746fd',1,'stan::math::operator!=(const var &a, const double b)'],['../namespacestan_1_1math.html#aa6464b66683b8cf12702e71c155853b7',1,'stan::math::operator!=(const double a, const var &b)']]], + ['operator_28_29',['operator()',['../structstan_1_1math_1_1coupled__ode__observer.html#a6c0c4107e1d62a89395e5ee17e5a43c4',1,'stan::math::coupled_ode_observer::operator()()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html#a210cec0472790c60d5956c8266359e9e',1,'stan::math::coupled_ode_system< F, double, double >::operator()()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#ae5558bc9ccc59ad33e9ad67b94f56559',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::operator()()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#a170dd3b8b24add9ce7f0e7339347dacb',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::operator()()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#a6e5880919ed793c60d730ca82901f247',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::operator()()']]], + ['operator_2a',['operator*',['../classstan_1_1math_1_1var.html#a7d48485af46f48f88abf8d8af40738a3',1,'stan::math::var::operator*()'],['../namespacestan_1_1math.html#afcc9ba66175e049c6020fe363231d694',1,'stan::math::operator*(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#ad613e6b4387544fecd361475490d9dd3',1,'stan::math::operator*(double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a5ee4488ea32a5bf3cce50117e14b2d07',1,'stan::math::operator*(const fvar< T > &x1, double x2)'],['../namespacestan_1_1math.html#a436203414c825bb8765ea82786313909',1,'stan::math::operator*(const var &a, const var &b)'],['../namespacestan_1_1math.html#ae63dc18994ab79b22ff3f6a37fe784db',1,'stan::math::operator*(const var &a, const double b)'],['../namespacestan_1_1math.html#aa6de4291925b8d2f8a7060617e276c5e',1,'stan::math::operator*(const double a, const var &b)']]], + ['operator_2a_3d',['operator*=',['../structstan_1_1math_1_1fvar.html#a9b2feee9256c7d918fc9773ca228283b',1,'stan::math::fvar::operator*=(const fvar< T > &x2)'],['../structstan_1_1math_1_1fvar.html#abd9f85bd70a9b6fa3dc107794cec3ca1',1,'stan::math::fvar::operator*=(double x2)'],['../classstan_1_1math_1_1var.html#a80bc83a2b3ab358f9f1df08203505e23',1,'stan::math::var::operator*=(const var &b)'],['../classstan_1_1math_1_1var.html#affbb26eba0c14f42c4d70c98c4b40dae',1,'stan::math::var::operator*=(const double b)']]], + ['operator_2b',['operator+',['../namespacestan_1_1math.html#a51a0614c9ba674f03e3d1b7586e99d27',1,'stan::math::operator+(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a3fbabb3f7eeef5d7605eefad9c2fbef7',1,'stan::math::operator+(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#adbceec5a6822fd0c58529d6f64208f3b',1,'stan::math::operator+(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#afcb4c7bced043de79d94676dac3cfc4b',1,'stan::math::operator+(const var &a, const var &b)'],['../namespacestan_1_1math.html#ab7ec1a6c24e3a21e00c42142d582d944',1,'stan::math::operator+(const var &a, const double b)'],['../namespacestan_1_1math.html#abe2a79efe1e8415fb532a27b26406798',1,'stan::math::operator+(const double a, const var &b)'],['../namespacestan_1_1math.html#a28f17a8253887d3b573fd59c5a4c6769',1,'stan::math::operator+(const var &a)']]], + ['operator_2b_2b',['operator++',['../structstan_1_1math_1_1fvar.html#ac3d87dc556498952498b6d1c1dcbe204',1,'stan::math::fvar::operator++()'],['../structstan_1_1math_1_1fvar.html#a248def528083576a747b27ea46452040',1,'stan::math::fvar::operator++(int)'],['../namespacestan_1_1math.html#aab33c64042765d924f07e7490788e6d4',1,'stan::math::operator++(var &a)'],['../namespacestan_1_1math.html#a3597f71f364d94814268d4911f111674',1,'stan::math::operator++(var &a, int)']]], + ['operator_2b_3d',['operator+=',['../structstan_1_1math_1_1fvar.html#a2e8ed7892827b43ec62736e8999bafd5',1,'stan::math::fvar::operator+=(const fvar< T > &x2)'],['../structstan_1_1math_1_1fvar.html#acae80a3166aa968368a99ba92e7bad19',1,'stan::math::fvar::operator+=(double x2)'],['../classstan_1_1math_1_1var.html#a87ea11fd8f1b21c7a79a849886839d54',1,'stan::math::var::operator+=(const var &b)'],['../classstan_1_1math_1_1var.html#afc6f49ac3b8054a323c9cd6e051c25c1',1,'stan::math::var::operator+=(const double b)']]], + ['operator_2d',['operator-',['../namespacestan_1_1math.html#a6a200e70e0f2b422b6623cf4b19d04da',1,'stan::math::operator-(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a87d89d23df91de283beda449d480b437',1,'stan::math::operator-(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#afd8dea434972aa3008e352349069e206',1,'stan::math::operator-(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#aedeee50b418200d06eb867d0ef3b3125',1,'stan::math::operator-(const fvar< T > &x)'],['../namespacestan_1_1math.html#a971b741313ecc65a639076acc188614a',1,'stan::math::operator-(const var &a, const var &b)'],['../namespacestan_1_1math.html#abec4b5043616cea0be01ee41fd899198',1,'stan::math::operator-(const var &a, const double b)'],['../namespacestan_1_1math.html#a9586c6690c5088deedcbac089158960a',1,'stan::math::operator-(const double a, const var &b)'],['../namespacestan_1_1math.html#a2f8564365599db5cea0b51b635ea482a',1,'stan::math::operator-(const var &a)']]], + ['operator_2d_2d',['operator--',['../structstan_1_1math_1_1fvar.html#a08587bd5322f627971294a39b0444bf3',1,'stan::math::fvar::operator--()'],['../structstan_1_1math_1_1fvar.html#acf9a3dcefdc0dd474caa41285435cf0b',1,'stan::math::fvar::operator--(int)'],['../namespacestan_1_1math.html#a10e496e6e1fd02a0378a729ada4f39df',1,'stan::math::operator--(var &a)'],['../namespacestan_1_1math.html#abcadc96f506e9f1408647cdce4d09092',1,'stan::math::operator--(var &a, int)']]], + ['operator_2d_3d',['operator-=',['../structstan_1_1math_1_1fvar.html#ab4b948b7db1f825efd3e86acc2f19ec6',1,'stan::math::fvar::operator-=(const fvar< T > &x2)'],['../structstan_1_1math_1_1fvar.html#a903c6290c55fce2413d4b3528456aaca',1,'stan::math::fvar::operator-=(double x2)'],['../classstan_1_1math_1_1var.html#a8892192fd51894b90e59a213fe02aeb9',1,'stan::math::var::operator-=(const var &b)'],['../classstan_1_1math_1_1var.html#a64099b5dc9c4df90b81b2ac28158a3d1',1,'stan::math::var::operator-=(const double b)']]], + ['operator_2d_3e',['operator->',['../classstan_1_1math_1_1var.html#acb10b163ad0fbc84829baed06ddda8e7',1,'stan::math::var']]], + ['operator_2f',['operator/',['../namespacestan_1_1math.html#a1eba6f623c3c2c0714e2eabbae90290f',1,'stan::math::operator/(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a02aad69947e40bd42636143eadd38621',1,'stan::math::operator/(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#aef4e969693a718ffefbe5d45916ddef3',1,'stan::math::operator/(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a2cbbe36fe5dcdd2996fe40afdd874983',1,'stan::math::operator/(const Eigen::Matrix< fvar< T >, R, C > &v, const fvar< T > &c)'],['../namespacestan_1_1math.html#a48b310fd13ba04c615b74671f262b25d',1,'stan::math::operator/(const Eigen::Matrix< fvar< T >, R, C > &v, const double c)'],['../namespacestan_1_1math.html#a7174185d7dd2b83e370d535d35870c4a',1,'stan::math::operator/(const Eigen::Matrix< double, R, C > &v, const fvar< T > &c)'],['../namespacestan_1_1math.html#ac15f9adeb9753deea83b30e18aaf8e98',1,'stan::math::operator/(const var &a, const var &b)'],['../namespacestan_1_1math.html#aa12be933cc2e01e203a6ffa09508d319',1,'stan::math::operator/(const var &a, const double b)'],['../namespacestan_1_1math.html#a81ad2fbfb99eb063eda9ef0b466b2014',1,'stan::math::operator/(const double a, const var &b)']]], + ['operator_2f_3d',['operator/=',['../structstan_1_1math_1_1fvar.html#adb1aa48e4920de7b5bdba267aa2a175f',1,'stan::math::fvar::operator/=(const fvar< T > &x2)'],['../structstan_1_1math_1_1fvar.html#a3c292c2e417a54f690fc9f66b4d10ccd',1,'stan::math::fvar::operator/=(double x2)'],['../classstan_1_1math_1_1var.html#aa158a69964d0f86042daa3e279ecff3f',1,'stan::math::var::operator/=(const var &b)'],['../classstan_1_1math_1_1var.html#aed7f04ab2dbd9f847a6ed68bf845c052',1,'stan::math::var::operator/=(const double b)']]], + ['operator_3c',['operator<',['../namespacestan_1_1math.html#af2c489941c560664036ee190c9028360',1,'stan::math::operator<(const fvar< T > &x, double y)'],['../namespacestan_1_1math.html#a0194df340cc3564835ff04086374cf97',1,'stan::math::operator<(double x, const fvar< T > &y)'],['../namespacestan_1_1math.html#a50b0c7ff4961eb7333aa81f685da55f4',1,'stan::math::operator<(const fvar< T > &x, const fvar< T > &y)'],['../namespacestan_1_1math.html#afe39e7c1b0831663418188ab23b98965',1,'stan::math::operator<(const var &a, const var &b)'],['../namespacestan_1_1math.html#a021f473185983f63d23ee362605249d8',1,'stan::math::operator<(const var &a, const double b)'],['../namespacestan_1_1math.html#aec5a959d8186caa585d5922a4facf649',1,'stan::math::operator<(const double a, const var &b)']]], + ['operator_3c_3d',['operator<=',['../namespacestan_1_1math.html#a450ef8aaef08c3137f70a087ae3905c6',1,'stan::math::operator<=(const fvar< T > &x, const fvar< T > &y)'],['../namespacestan_1_1math.html#ab95d660226997cbba13176cec459adaf',1,'stan::math::operator<=(const fvar< T > &x, double y)'],['../namespacestan_1_1math.html#aca5de0aa5a40e981ece663f96ad41997',1,'stan::math::operator<=(double x, const fvar< T > &y)'],['../namespacestan_1_1math.html#aee09427479a707c4e715677d5036307b',1,'stan::math::operator<=(const var &a, const var &b)'],['../namespacestan_1_1math.html#a1f46c552a80c056955c460a1796d724d',1,'stan::math::operator<=(const var &a, const double b)'],['../namespacestan_1_1math.html#a79e6962678ac8407d6d004c48988c1a2',1,'stan::math::operator<=(const double a, const var &b)']]], + ['operator_3d_3d',['operator==',['../namespacestan_1_1math.html#a431129b4a75d77ab60f6cd749bef5a11',1,'stan::math::operator==(const fvar< T > &x, const fvar< T > &y)'],['../namespacestan_1_1math.html#a15161ab182b02d135f79a13d68c7318d',1,'stan::math::operator==(const fvar< T > &x, double y)'],['../namespacestan_1_1math.html#a4930059b979a995acd759a0746bfc201',1,'stan::math::operator==(double x, const fvar< T > &y)'],['../namespacestan_1_1math.html#a62e8c00dc01b2df161d0d242c124b046',1,'stan::math::operator==(const var &a, const var &b)'],['../namespacestan_1_1math.html#ad239b56697788a42a944361e26b56e56',1,'stan::math::operator==(const var &a, const double b)'],['../namespacestan_1_1math.html#add97c0c3a895203b8ab3205aca59d088',1,'stan::math::operator==(const double a, const var &b)']]], + ['operator_3e',['operator>',['../namespacestan_1_1math.html#a17fefa51b18df1adec77e49f4e792fbc',1,'stan::math::operator>(const fvar< T > &x, const fvar< T > &y)'],['../namespacestan_1_1math.html#a9c850c94b22aab8ffd895bdf8faebded',1,'stan::math::operator>(const fvar< T > &x, double y)'],['../namespacestan_1_1math.html#aba7b92bb244d32edb94b17c8039ae826',1,'stan::math::operator>(double x, const fvar< T > &y)'],['../namespacestan_1_1math.html#a465afbe6fb2692b02b60d9760e5cbda9',1,'stan::math::operator>(const var &a, const var &b)'],['../namespacestan_1_1math.html#a361d2b2ac2c39919dc71183312855c92',1,'stan::math::operator>(const var &a, const double b)'],['../namespacestan_1_1math.html#a34b9438d0ef1f58b41a228a1154308aa',1,'stan::math::operator>(const double a, const var &b)']]], + ['operator_3e_3d',['operator>=',['../namespacestan_1_1math.html#a5dee5c21281cc75cad8ebf9f6c43b98f',1,'stan::math::operator>=(const fvar< T > &x, const fvar< T > &y)'],['../namespacestan_1_1math.html#ac2097caea2b790905ee2948ef72727df',1,'stan::math::operator>=(const fvar< T > &x, double y)'],['../namespacestan_1_1math.html#a813edaa4311e1a4c206952f75a85eba8',1,'stan::math::operator>=(double x, const fvar< T > &y)'],['../namespacestan_1_1math.html#a938fb84cef113596828ad131e513fa1e',1,'stan::math::operator>=(const var &a, const var &b)'],['../namespacestan_1_1math.html#a055bb2d4f3560761f3383b0f499e7fe7',1,'stan::math::operator>=(const var &a, const double b)'],['../namespacestan_1_1math.html#a4492a18f751e82a980740f7beac0e025',1,'stan::math::operator>=(const double a, const var &b)']]], + ['operator_5b_5d',['operator[]',['../classstan_1_1math_1_1container__view_3_01std_1_1vector_3_01_t1_01_4_00_01_t2_01_4.html#a4216d34813cec95c003ba84396fa104d',1,'stan::math::container_view< std::vector< T1 >, T2 >::operator[]()'],['../classstan_1_1math_1_1container__view_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_eif0a5cd6c4f7572d0a0485f479012b4cf.html#acfe66b51d58fa11069c5ad4b9efea9ec',1,'stan::math::container_view< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > >::operator[]()'],['../classstan_1_1math_1_1container__view_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_t2_01_4.html#af2100b835c918d3f7c7bac8d6ec32937',1,'stan::math::container_view< Eigen::Matrix< T1, R, C >, T2 >::operator[]()'],['../classstan_1_1math_1_1container__view_3_01std_1_1vector_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_7f9efd46b00a4e97b56aae6ecc54dbcd.html#a4d1e0a210d7659d350c6169b8af39c2a',1,'stan::math::container_view< std::vector< Eigen::Matrix< T1, R, C > >, Eigen::Matrix< T2, R, C > >::operator[]()'],['../classstan_1_1math_1_1seq__view.html#abdd1705b880895c4e32e917fad70fb0b',1,'stan::math::seq_view::operator[]()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_011_01_4_01_4.html#a6466225a392d75a98f0ae43c5f001820',1,'stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > >::operator[]()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00_01_eigen_1_1_dynamic_01_4_01_4.html#aafd342f1f6f9851fd8f8e3494b36068e',1,'stan::math::seq_view< T, Eigen::Matrix< S, 1, Eigen::Dynamic > >::operator[]()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4.html#ab45edf39aad64a4093db924b02322af9',1,'stan::math::seq_view< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >::operator[]()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4.html#acfe4d699397a114cabd8d970e569aac6',1,'stan::math::seq_view< T, std::vector< S > >::operator[]()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01_t_01_4_01_4.html#afe1bd346e72ac6adc53826801a7e54f2',1,'stan::math::seq_view< T, std::vector< T > >::operator[]()'],['../classstan_1_1math_1_1seq__view_3_01_t_00_01std_1_1vector_3_01std_1_1vector_3_01_t_01_4_01_4_01_4.html#aa8d34d4dd171acbd81d642aea1b8b61e',1,'stan::math::seq_view< T, std::vector< std::vector< T > > >::operator[]()'],['../classstan_1_1math_1_1seq__view_3_01double_00_01std_1_1vector_3_01int_01_4_01_4.html#a05bbd23ec952656521365f99d575a64c',1,'stan::math::seq_view< double, std::vector< int > >::operator[]()'],['../classstan_1_1math_1_1container__view.html#a7ed8e00a52b48d1ba3ebbc4fa38e11ce',1,'stan::math::container_view::operator[]()'],['../classstan_1_1math_1_1container__view_3_01dummy_00_01_t2_01_4.html#a19e3e8ef5cb77f25dc82a3da6711d7b8',1,'stan::math::container_view< dummy, T2 >::operator[]()'],['../classstan_1_1_vector_builder_helper.html#a623364e0ee8645a55bb93d3b067bd306',1,'stan::VectorBuilderHelper::operator[]()'],['../classstan_1_1_vector_builder_helper_3_01_t1_00_01true_00_01false_01_4.html#a195496da4a18cc0cb2d3dc098af401a6',1,'stan::VectorBuilderHelper< T1, true, false >::operator[]()'],['../classstan_1_1_vector_builder_helper_3_01_t1_00_01true_00_01true_01_4.html#af2507b7e73412f828261a9b4e2c28c18',1,'stan::VectorBuilderHelper< T1, true, true >::operator[]()'],['../classstan_1_1_vector_builder.html#adf708a313726a2ae1ba979269ccee104',1,'stan::VectorBuilder::operator[]()'],['../classstan_1_1_vector_view.html#afa380e5d11746837925198eeb8669299',1,'stan::VectorView::operator[]()'],['../classstan_1_1_vector_view_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html#a4ebd6fad997a99a0cb1ed71e4143befe',1,'stan::VectorView< const T, is_array, throw_if_accessed >::operator[]()'],['../classstan_1_1_vector_view_3_01const_01double_00_01false_00_01false_01_4.html#a2d4a632cfb7533c7ab183c8437b9433c',1,'stan::VectorView< const double, false, false >::operator[]()'],['../classstan_1_1_vector_view_mvt.html#a279439cc5038dfd0ea4da7fe58c1f6d0',1,'stan::VectorViewMvt::operator[]()'],['../classstan_1_1_vector_view_mvt_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html#af1df7ae176f5dc3acafcb45663ea82a3',1,'stan::VectorViewMvt< const T, is_array, throw_if_accessed >::operator[]()'],['../classstan_1_1math_1_1op__matrix__vari.html#aa8857333f18280ecedc008d53cd39315',1,'stan::math::op_matrix_vari::operator[]()'],['../classstan_1_1math_1_1op__vector__vari.html#ab928e591879ce7be3edfe498b5c9c4e8',1,'stan::math::op_vector_vari::operator[]()']]], + ['ordered_5fconstrain',['ordered_constrain',['../namespacestan_1_1math.html#a5062f9b21b2fb755ad3189fe236bed93',1,'stan::math::ordered_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x)'],['../namespacestan_1_1math.html#ae5638796e15590c237b7eaece1531631',1,'stan::math::ordered_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, T &lp)']]], + ['ordered_5ffree',['ordered_free',['../namespacestan_1_1math.html#a679b3a9baaf02aeee0c15d763efa06b0',1,'stan::math']]], + ['ordered_5flogistic_5flog',['ordered_logistic_log',['../namespacestan_1_1math.html#aae845ae3d07989bc9976a15f52caa997',1,'stan::math::ordered_logistic_log(int y, const T_lambda &lambda, const Eigen::Matrix< T_cut, Eigen::Dynamic, 1 > &c)'],['../namespacestan_1_1math.html#a5623d34d128b956b6dfb2031150c8c87',1,'stan::math::ordered_logistic_log(int y, const T_lambda &lambda, const Eigen::Matrix< T_cut, Eigen::Dynamic, 1 > &c)']]], + ['ordered_5flogistic_5frng',['ordered_logistic_rng',['../namespacestan_1_1math.html#a432a3d83d286fe609fc79c6ef4f8ea74',1,'stan::math']]], + ['out_5fof_5frange',['out_of_range',['../namespacestan_1_1math.html#a34583d3983ee4d61d09004ce3e278250',1,'stan::math']]], + ['owens_5ft',['owens_t',['../namespacestan_1_1math.html#a9b09a69d6aeee461a009b6355889e9e4',1,'stan::math::owens_t(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a69de529b5013ba833af1ea6eff199194',1,'stan::math::owens_t(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a316ab3b95493d045d77de4f8b96ed56a',1,'stan::math::owens_t(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#af099f2a72adf07f89f5f27f405d7afab',1,'stan::math::owens_t(const double h, const double a)'],['../namespacestan_1_1math.html#a3a3be132b9586de8773f1489ad485e0a',1,'stan::math::owens_t(const var &h, const var &a)'],['../namespacestan_1_1math.html#aa226754d101430c9bdf91ece0a9eb1d7',1,'stan::math::owens_t(const var &h, double a)'],['../namespacestan_1_1math.html#a1a8dab8811eeb8705651daeefc449816',1,'stan::math::owens_t(double h, const var &a)']]] +]; diff --git a/doc/api/html/search/functions_e.html b/doc/api/html/search/functions_e.html new file mode 100644 index 00000000000..649b2c9af63 --- /dev/null +++ b/doc/api/html/search/functions_e.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/functions_e.js b/doc/api/html/search/functions_e.js new file mode 100644 index 00000000000..d601ca8488a --- /dev/null +++ b/doc/api/html/search/functions_e.js @@ -0,0 +1,46 @@ +var searchData= +[ + ['pareto_5fccdf_5flog',['pareto_ccdf_log',['../namespacestan_1_1math.html#ae265a3d80fc60a58c6642e3cb32e5a3e',1,'stan::math']]], + ['pareto_5fcdf',['pareto_cdf',['../namespacestan_1_1math.html#a04334b6b9aefbc902c156c6ebabd1b7f',1,'stan::math']]], + ['pareto_5fcdf_5flog',['pareto_cdf_log',['../namespacestan_1_1math.html#a32b395deb308bc16b82587a97bfb1eba',1,'stan::math']]], + ['pareto_5flog',['pareto_log',['../namespacestan_1_1math.html#a4eefb96c196d0c61694de1fda5d9a8c6',1,'stan::math::pareto_log(const T_y &y, const T_scale &y_min, const T_shape &alpha)'],['../namespacestan_1_1math.html#a3f851b988a9325dc6ea8398d45ff1601',1,'stan::math::pareto_log(const T_y &y, const T_scale &y_min, const T_shape &alpha)']]], + ['pareto_5frng',['pareto_rng',['../namespacestan_1_1math.html#a624fd25c2bd925d2b96971c70b695245',1,'stan::math']]], + ['pareto_5ftype_5f2_5fccdf_5flog',['pareto_type_2_ccdf_log',['../namespacestan_1_1math.html#ab4f7adad4637fb745bceb3be2db2c6d2',1,'stan::math']]], + ['pareto_5ftype_5f2_5fcdf',['pareto_type_2_cdf',['../namespacestan_1_1math.html#a6aa9090877913c41608ec9edc7644718',1,'stan::math']]], + ['pareto_5ftype_5f2_5fcdf_5flog',['pareto_type_2_cdf_log',['../namespacestan_1_1math.html#acc69970c0086687e5c19c7c3d4fe5108',1,'stan::math']]], + ['pareto_5ftype_5f2_5flog',['pareto_type_2_log',['../namespacestan_1_1math.html#a078e211e38ac272092603cdf728f3f02',1,'stan::math::pareto_type_2_log(const T_y &y, const T_loc &mu, const T_scale &lambda, const T_shape &alpha)'],['../namespacestan_1_1math.html#a5bd3253943ad32c19d36887e748a4aa6',1,'stan::math::pareto_type_2_log(const T_y &y, const T_loc &mu, const T_scale &lambda, const T_shape &alpha)']]], + ['pareto_5ftype_5f2_5frng',['pareto_type_2_rng',['../namespacestan_1_1math.html#af55974320ebae90f0e36341934d8a57b',1,'stan::math']]], + ['partial_5fderivative',['partial_derivative',['../namespacestan_1_1math.html#adbb5b4072a22debb013dab8742e321df',1,'stan::math']]], + ['partials_5fvari',['partials_vari',['../classstan_1_1math_1_1partials__vari.html#a804753ffe5a9b1820b9a7f05bd258752',1,'stan::math::partials_vari']]], + ['phi',['Phi',['../namespacestan_1_1math.html#ac73a2c7f20161172ffee17c7c880019f',1,'stan::math::Phi(const fvar< T > &x)'],['../namespacestan_1_1math.html#ac85644bbd92359d699f374adea62c643',1,'stan::math::Phi(const T x)'],['../namespacestan_1_1math.html#ad88a365e721ffe6c1da4115e378bebf4',1,'stan::math::Phi(const stan::math::var &a)']]], + ['phi_5fapprox',['Phi_approx',['../namespacestan_1_1math.html#a6cf4bf2074175fd7bcde43f9f94e4d16',1,'stan::math::Phi_approx(T x)'],['../namespacestan_1_1math.html#afa0a2a4530d320ca7945a09ae88783f3',1,'stan::math::Phi_approx(const stan::math::var &a)']]], + ['pi',['pi',['../namespacestan_1_1math.html#aa2ffd66726e0532160e16e6b48d6f428',1,'stan::math']]], + ['poisson_5fccdf_5flog',['poisson_ccdf_log',['../namespacestan_1_1math.html#ad069a055750c038c054eb7ecabfb53bf',1,'stan::math']]], + ['poisson_5fcdf',['poisson_cdf',['../namespacestan_1_1math.html#a84009ffe822acedc6362015fd08107be',1,'stan::math']]], + ['poisson_5fcdf_5flog',['poisson_cdf_log',['../namespacestan_1_1math.html#acc9138a37ffe00ff85c6824447e85db1',1,'stan::math']]], + ['poisson_5flog',['poisson_log',['../namespacestan_1_1math.html#ae7a95ee36796c1a077510303bb2535c2',1,'stan::math::poisson_log(const T_n &n, const T_rate &lambda)'],['../namespacestan_1_1math.html#a202d918359198306069f71f1477a046f',1,'stan::math::poisson_log(const T_n &n, const T_rate &lambda)']]], + ['poisson_5flog_5flog',['poisson_log_log',['../namespacestan_1_1math.html#a4a06118d9d96bde7ee5d8c28eb08e5ec',1,'stan::math::poisson_log_log(const T_n &n, const T_log_rate &alpha)'],['../namespacestan_1_1math.html#a5d441b4aee12ece4fc2d1b4d8027c7a0',1,'stan::math::poisson_log_log(const T_n &n, const T_log_rate &alpha)']]], + ['poisson_5flog_5frng',['poisson_log_rng',['../namespacestan_1_1math.html#ac3cdc8d2997b25f9ed799555ecf37106',1,'stan::math']]], + ['poisson_5frng',['poisson_rng',['../namespacestan_1_1math.html#a8f7aaf7ee5cf0eb93778d7f30db23834',1,'stan::math']]], + ['positive_5fconstrain',['positive_constrain',['../namespacestan_1_1math.html#a6cf6708d0fb577e217e81463282cae71',1,'stan::math::positive_constrain(const T x)'],['../namespacestan_1_1math.html#a9f9c43fc857272a76bb4030122ac91ed',1,'stan::math::positive_constrain(const T x, T &lp)']]], + ['positive_5ffree',['positive_free',['../namespacestan_1_1math.html#a6a20798b12abb29d73f7391168f836f9',1,'stan::math']]], + ['positive_5finfinity',['positive_infinity',['../namespacestan_1_1math.html#a34675a70d3df614d88d33ddbdd49b49a',1,'stan::math']]], + ['positive_5fordered_5fconstrain',['positive_ordered_constrain',['../namespacestan_1_1math.html#ada937f012b7d54cebdf8d9414f6fdbad',1,'stan::math::positive_ordered_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x)'],['../namespacestan_1_1math.html#a7879746a7bed2564ae72c2916658e5a5',1,'stan::math::positive_ordered_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, T &lp)']]], + ['positive_5fordered_5ffree',['positive_ordered_free',['../namespacestan_1_1math.html#af81e69a15e82f86eefba93f8dcd3966e',1,'stan::math']]], + ['pow',['pow',['../namespacestan_1_1math.html#a27caea996a79cd150f26db44fd635684',1,'stan::math::pow(const fvar< T > &x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#ab594b61f84170ba4b4b887f6a911a0d6',1,'stan::math::pow(const double x1, const fvar< T > &x2)'],['../namespacestan_1_1math.html#a7b8ae604ced89240175e69281577be04',1,'stan::math::pow(const fvar< T > &x1, const double x2)'],['../namespacestan_1_1math.html#a32adb49018d9fd61d3c568d1edcdb3c0',1,'stan::math::pow(const var &base, const var &exponent)'],['../namespacestan_1_1math.html#aff1b3f97cd1cf4c7391d160f9a3db4f6',1,'stan::math::pow(const var &base, const double exponent)'],['../namespacestan_1_1math.html#a52dafae271ea06210bf3cbe2545ead16',1,'stan::math::pow(const double base, const var &exponent)']]], + ['precomp_5fv_5fvari',['precomp_v_vari',['../classstan_1_1math_1_1precomp__v__vari.html#a0c517d5c59eff9c50c47be525b646a3a',1,'stan::math::precomp_v_vari']]], + ['precomp_5fvv_5fvari',['precomp_vv_vari',['../classstan_1_1math_1_1precomp__vv__vari.html#af33cdfd8e10840954045d5437ea0b521',1,'stan::math::precomp_vv_vari']]], + ['precomp_5fvvv_5fvari',['precomp_vvv_vari',['../classstan_1_1math_1_1precomp__vvv__vari.html#a6d8ea94d167987d3aa4f437079f4f2c0',1,'stan::math::precomp_vvv_vari']]], + ['precomputed_5fgradients',['precomputed_gradients',['../namespacestan_1_1math.html#a2ae0c4c9c64db8bb166f67caf352b35f',1,'stan::math']]], + ['precomputed_5fgradients_5fvari',['precomputed_gradients_vari',['../classstan_1_1math_1_1precomputed__gradients__vari.html#afab325fb81b8370a78f3455be5ebdeb6',1,'stan::math::precomputed_gradients_vari::precomputed_gradients_vari(double val, size_t size, vari **varis, double *gradients)'],['../classstan_1_1math_1_1precomputed__gradients__vari.html#a1e7e812862a9af73da3a8c50f0d65302',1,'stan::math::precomputed_gradients_vari::precomputed_gradients_vari(double val, const std::vector< var > &vars, const std::vector< double > &gradients)']]], + ['primitive_5fvalue',['primitive_value',['../namespacestan_1_1math.html#a24337e3af682981f05d1cc022e675891',1,'stan::math::primitive_value(const fvar< T > &v)'],['../namespacestan_1_1math.html#af8cbc3a490edf340544fb12df544269e',1,'stan::math::primitive_value(T x)'],['../namespacestan_1_1math.html#a0491e419195548cdede51a384547aef2',1,'stan::math::primitive_value(const T &x)'],['../namespacestan_1_1math.html#a0ccbe1638f463027973553dec7175dbc',1,'stan::math::primitive_value(const var &v)']]], + ['print_5fmat_5fsize',['print_mat_size',['../namespacestan_1_1math.html#aa8f00af063b839677434c6a0f92629a3',1,'stan::math']]], + ['print_5fstack',['print_stack',['../namespacestan_1_1math.html#a0611cecb5356e187818c1901134c7665',1,'stan::math']]], + ['prob_5fconstrain',['prob_constrain',['../namespacestan_1_1math.html#a7a0b9c35bc619ea5fbac226e985bbc1d',1,'stan::math::prob_constrain(const T x)'],['../namespacestan_1_1math.html#a3b5c8822124337e5d000cfa60046c5fa',1,'stan::math::prob_constrain(const T x, T &lp)']]], + ['prob_5ffree',['prob_free',['../namespacestan_1_1math.html#a533afff719fe3e21bf53d2fa53d2fbe3',1,'stan::math']]], + ['prod',['prod',['../namespacestan_1_1math.html#a1649a895ec6e79097d5645a3f8b8a1e6',1,'stan::math::prod(const std::vector< T > &v)'],['../namespacestan_1_1math.html#ad7082de8742d87f7a0fa0842207341c9',1,'stan::math::prod(const Eigen::Matrix< T, R, C > &v)']]], + ['promote',['promote',['../structstan_1_1math_1_1promoter.html#ab3df6e7131a09943826d1b995142d7d6',1,'stan::math::promoter::promote()'],['../structstan_1_1math_1_1promoter_3_01_t_00_01_t_01_4.html#ac8db3f3f3410059f5cae51383f1b38c2',1,'stan::math::promoter< T, T >::promote()'],['../structstan_1_1math_1_1promoter_3_01std_1_1vector_3_01_f_01_4_00_01std_1_1vector_3_01_t_01_4_01_4.html#a357d5eb63ba812437c51640670cef745',1,'stan::math::promoter< std::vector< F >, std::vector< T > >::promote()'],['../structstan_1_1math_1_1promoter_3_01std_1_1vector_3_01_t_01_4_00_01std_1_1vector_3_01_t_01_4_01_4.html#adb1706254fcd6734bf986e2cd01b093f',1,'stan::math::promoter< std::vector< T >, std::vector< T > >::promote()'],['../structstan_1_1math_1_1promoter_3_01_eigen_1_1_matrix_3_01_f_00_01_r_00_01_c_01_4_00_01_eigen_1_142b48fda94601374e41a81325f3f7b84.html#a9964d13b9f2f05efca2b21ac165210d8',1,'stan::math::promoter< Eigen::Matrix< F, R, C >, Eigen::Matrix< T, R, C > >::promote()'],['../structstan_1_1math_1_1promoter_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_00_01_eigen_1_12d7fadf0560f1f2f3abc5388b7666f9c.html#a525fc8cb91f5c4c22195cdb004b1eb0f',1,'stan::math::promoter< Eigen::Matrix< T, R, C >, Eigen::Matrix< T, R, C > >::promote()']]], + ['promote_5fcommon',['promote_common',['../namespacestan_1_1math.html#a300cf63dd3332cff2161fdc32aec4026',1,'stan::math']]], + ['promote_5fscalar',['promote_scalar',['../namespacestan_1_1math.html#a4815c45c3f87ea98453880863e3a0b94',1,'stan::math']]], + ['promote_5fto',['promote_to',['../structstan_1_1math_1_1promoter.html#a892e350b17a5930b9de4a9ff05eddc39',1,'stan::math::promoter::promote_to()'],['../structstan_1_1math_1_1promoter_3_01_t_00_01_t_01_4.html#a108a1ffe4c0560f0c0b384270ea801f1',1,'stan::math::promoter< T, T >::promote_to()'],['../structstan_1_1math_1_1promoter_3_01std_1_1vector_3_01_f_01_4_00_01std_1_1vector_3_01_t_01_4_01_4.html#a3da744179c9bbe7fe2ac326a4dcba352',1,'stan::math::promoter< std::vector< F >, std::vector< T > >::promote_to()'],['../structstan_1_1math_1_1promoter_3_01std_1_1vector_3_01_t_01_4_00_01std_1_1vector_3_01_t_01_4_01_4.html#a099437577ccd004d58c5b2ee3e5acf06',1,'stan::math::promoter< std::vector< T >, std::vector< T > >::promote_to()'],['../structstan_1_1math_1_1promoter_3_01_eigen_1_1_matrix_3_01_f_00_01_r_00_01_c_01_4_00_01_eigen_1_142b48fda94601374e41a81325f3f7b84.html#a68d5ee667d0706baf7dd52f08f6a87fd',1,'stan::math::promoter< Eigen::Matrix< F, R, C >, Eigen::Matrix< T, R, C > >::promote_to()'],['../structstan_1_1math_1_1promoter_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_00_01_eigen_1_12d7fadf0560f1f2f3abc5388b7666f9c.html#a9ff5ceffa5a1a568b750eb2f676d1da9',1,'stan::math::promoter< Eigen::Matrix< T, R, C >, Eigen::Matrix< T, R, C > >::promote_to()']]] +]; diff --git a/doc/api/html/search/functions_f.html b/doc/api/html/search/functions_f.html new file mode 100644 index 00000000000..386c7d46b17 --- /dev/null +++ b/doc/api/html/search/functions_f.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/functions_f.js b/doc/api/html/search/functions_f.js new file mode 100644 index 00000000000..e76df623b45 --- /dev/null +++ b/doc/api/html/search/functions_f.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['qr_5fq',['qr_Q',['../namespacestan_1_1math.html#a4badef735ea8b1cbfca31cbe49a534cf',1,'stan::math::qr_Q(const Eigen::Matrix< fvar< T >, Eigen::Dynamic, Eigen::Dynamic > &m)'],['../namespacestan_1_1math.html#a9559f36eb30f7c55b3576d8540b6bad2',1,'stan::math::qr_Q(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)']]], + ['qr_5fr',['qr_R',['../namespacestan_1_1math.html#ae2c6e003d4aa779acef714b05a153c1c',1,'stan::math::qr_R(const Eigen::Matrix< fvar< T >, Eigen::Dynamic, Eigen::Dynamic > &m)'],['../namespacestan_1_1math.html#aebb8132560117eeef1a07ced4b144598',1,'stan::math::qr_R(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)']]], + ['quad_5fform',['quad_form',['../namespacestan_1_1math.html#a88f53cb144d0e550d5113e565a91a947',1,'stan::math::quad_form(const Eigen::Matrix< T, RA, CA > &A, const Eigen::Matrix< T, RB, CB > &B)'],['../namespacestan_1_1math.html#a8166027d80ecdbc607ef3c1c44fd1e8d',1,'stan::math::quad_form(const Eigen::Matrix< T, RA, CA > &A, const Eigen::Matrix< T, RB, 1 > &B)'],['../namespacestan_1_1math.html#ae29c95a66e3c89b411b47a9613f7d00c',1,'stan::math::quad_form(const Eigen::Matrix< TA, RA, CA > &A, const Eigen::Matrix< TB, RB, CB > &B)'],['../namespacestan_1_1math.html#a78760f17a4a1aa70975f3c4abbc1d03d',1,'stan::math::quad_form(const Eigen::Matrix< TA, RA, CA > &A, const Eigen::Matrix< TB, RB, 1 > &B)']]], + ['quad_5fform_5fdiag',['quad_form_diag',['../namespacestan_1_1math.html#a55363638ef70a37127901ecb57962048',1,'stan::math']]], + ['quad_5fform_5fsym',['quad_form_sym',['../namespacestan_1_1math.html#a0e66b8fc7268b26c1f479d762b01f386',1,'stan::math::quad_form_sym(const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< double, RB, CB > &B)'],['../namespacestan_1_1math.html#a3c1c0234ed8a502439ec0036a4a352fe',1,'stan::math::quad_form_sym(const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< double, RB, 1 > &B)'],['../namespacestan_1_1math.html#a8628ce031fccb9fb7239f47b433deb91',1,'stan::math::quad_form_sym(const Eigen::Matrix< double, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, CB > &B)'],['../namespacestan_1_1math.html#ac02e500c362899803fc0e26058dc0197',1,'stan::math::quad_form_sym(const Eigen::Matrix< double, RA, CA > &A, const Eigen::Matrix< fvar< T >, RB, 1 > &B)'],['../namespacestan_1_1math.html#a4936ab9c3dab8c4194195de5aa398394',1,'stan::math::quad_form_sym(const Eigen::Matrix< T, RA, CA > &A, const Eigen::Matrix< T, RB, CB > &B)'],['../namespacestan_1_1math.html#a8b0b2bfea6c360dcc5739fd908b39d60',1,'stan::math::quad_form_sym(const Eigen::Matrix< T, RA, CA > &A, const Eigen::Matrix< T, RB, 1 > &B)'],['../namespacestan_1_1math.html#a0e0e772a20247cedc2da98a9c8946c89',1,'stan::math::quad_form_sym(const Eigen::Matrix< TA, RA, CA > &A, const Eigen::Matrix< TB, RB, CB > &B)'],['../namespacestan_1_1math.html#a8e79db5761062cc2b5eebe9edca4127e',1,'stan::math::quad_form_sym(const Eigen::Matrix< TA, RA, CA > &A, const Eigen::Matrix< TB, RB, 1 > &B)']]], + ['quiet_5fnan',['quiet_NaN',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a57076162eb3f395ddf9f475776bc45f4',1,'std::numeric_limits< stan::math::fvar< T > >::quiet_NaN()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a3fbd271621effc1cd6c5ba6529f88ec9',1,'std::numeric_limits< stan::math::var >::quiet_NaN()']]] +]; diff --git a/doc/api/html/search/groups_0.html b/doc/api/html/search/groups_0.html new file mode 100644 index 00000000000..2090afa2060 --- /dev/null +++ b/doc/api/html/search/groups_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/groups_0.js b/doc/api/html/search/groups_0.js new file mode 100644 index 00000000000..8fc7657e976 --- /dev/null +++ b/doc/api/html/search/groups_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['compressed_20sparse_20row_20matrix_20format_2e',['Compressed Sparse Row matrix format.',['../group__csr__format.html',1,'']]] +]; diff --git a/doc/api/html/search/mag_sel.png b/doc/api/html/search/mag_sel.png new file mode 100644 index 00000000000..81f6040a209 Binary files /dev/null and b/doc/api/html/search/mag_sel.png differ diff --git a/doc/api/html/search/namespaces_0.html b/doc/api/html/search/namespaces_0.html new file mode 100644 index 00000000000..dc6068615d9 --- /dev/null +++ b/doc/api/html/search/namespaces_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/namespaces_0.js b/doc/api/html/search/namespaces_0.js new file mode 100644 index 00000000000..65285fe078e --- /dev/null +++ b/doc/api/html/search/namespaces_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['boost',['boost',['../namespaceboost.html',1,'']]], + ['math',['math',['../namespaceboost_1_1math.html',1,'boost']]] +]; diff --git a/doc/api/html/search/namespaces_1.html b/doc/api/html/search/namespaces_1.html new file mode 100644 index 00000000000..1bc022925de --- /dev/null +++ b/doc/api/html/search/namespaces_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/namespaces_1.js b/doc/api/html/search/namespaces_1.js new file mode 100644 index 00000000000..5e56472a9b9 --- /dev/null +++ b/doc/api/html/search/namespaces_1.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['eigen',['Eigen',['../namespace_eigen.html',1,'']]], + ['internal',['internal',['../namespace_eigen_1_1internal.html',1,'Eigen']]] +]; diff --git a/doc/api/html/search/namespaces_2.html b/doc/api/html/search/namespaces_2.html new file mode 100644 index 00000000000..da0fa4a15ca --- /dev/null +++ b/doc/api/html/search/namespaces_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/namespaces_2.js b/doc/api/html/search/namespaces_2.js new file mode 100644 index 00000000000..f9fd2b8a387 --- /dev/null +++ b/doc/api/html/search/namespaces_2.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['detail',['detail',['../namespacestan_1_1math_1_1detail.html',1,'stan::math']]], + ['math',['math',['../namespacestan_1_1math.html',1,'stan']]], + ['stan',['stan',['../namespacestan.html',1,'']]], + ['std',['std',['../namespacestd.html',1,'']]] +]; diff --git a/doc/api/html/search/nomatches.html b/doc/api/html/search/nomatches.html new file mode 100644 index 00000000000..b1ded27e9ad --- /dev/null +++ b/doc/api/html/search/nomatches.html @@ -0,0 +1,12 @@ + + + + + + + +
+
No Matches
+
+ + diff --git a/doc/api/html/search/related_0.html b/doc/api/html/search/related_0.html new file mode 100644 index 00000000000..b6476349f46 --- /dev/null +++ b/doc/api/html/search/related_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/related_0.js b/doc/api/html/search/related_0.js new file mode 100644 index 00000000000..c9156baa878 --- /dev/null +++ b/doc/api/html/search/related_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['operator_3c_3c',['operator<<',['../structstan_1_1math_1_1fvar.html#a2225724f72699f1d59e9aecc1b98f2b4',1,'stan::math::fvar::operator<<()'],['../classstan_1_1math_1_1var.html#a3545860122fa159c57e23dd0fbfbf5cd',1,'stan::math::var::operator<<()'],['../classstan_1_1math_1_1vari.html#abd24d4e4eb6b0c65c8447bd2cc73b200',1,'stan::math::vari::operator<<()']]] +]; diff --git a/doc/api/html/search/related_1.html b/doc/api/html/search/related_1.html new file mode 100644 index 00000000000..66fb1d10550 --- /dev/null +++ b/doc/api/html/search/related_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/related_1.js b/doc/api/html/search/related_1.js new file mode 100644 index 00000000000..8c74da51ad6 --- /dev/null +++ b/doc/api/html/search/related_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['var',['var',['../classstan_1_1math_1_1vari.html#afc150fe027cd12dd501a9d615a787f19',1,'stan::math::vari']]] +]; diff --git a/doc/api/html/search/search.css b/doc/api/html/search/search.css new file mode 100644 index 00000000000..4d7612ff63e --- /dev/null +++ b/doc/api/html/search/search.css @@ -0,0 +1,271 @@ +/*---------------- Search Box */ + +#FSearchBox { + float: left; +} + +#MSearchBox { + white-space : nowrap; + position: absolute; + float: none; + display: inline; + margin-top: 8px; + right: 0px; + width: 170px; + z-index: 102; + background-color: white; +} + +#MSearchBox .left +{ + display:block; + position:absolute; + left:10px; + width:20px; + height:19px; + background:url('search_l.png') no-repeat; + background-position:right; +} + +#MSearchSelect { + display:block; + position:absolute; + width:20px; + height:19px; +} + +.left #MSearchSelect { + left:4px; +} + +.right #MSearchSelect { + right:5px; +} + +#MSearchField { + display:block; + position:absolute; + height:19px; + background:url('search_m.png') repeat-x; + border:none; + width:111px; + margin-left:20px; + padding-left:4px; + color: #909090; + outline: none; + font: 9pt Arial, Verdana, sans-serif; +} + +#FSearchBox #MSearchField { + margin-left:15px; +} + +#MSearchBox .right { + display:block; + position:absolute; + right:10px; + top:0px; + width:20px; + height:19px; + background:url('search_r.png') no-repeat; + background-position:left; +} + +#MSearchClose { + display: none; + position: absolute; + top: 4px; + background : none; + border: none; + margin: 0px 4px 0px 0px; + padding: 0px 0px; + outline: none; +} + +.left #MSearchClose { + left: 6px; +} + +.right #MSearchClose { + right: 2px; +} + +.MSearchBoxActive #MSearchField { + color: #000000; +} + +/*---------------- Search filter selection */ + +#MSearchSelectWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #90A5CE; + background-color: #F9FAFC; + z-index: 1; + padding-top: 4px; + padding-bottom: 4px; + -moz-border-radius: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +.SelectItem { + font: 8pt Arial, Verdana, sans-serif; + padding-left: 2px; + padding-right: 12px; + border: 0px; +} + +span.SelectionMark { + margin-right: 4px; + font-family: monospace; + outline-style: none; + text-decoration: none; +} + +a.SelectItem { + display: block; + outline-style: none; + color: #000000; + text-decoration: none; + padding-left: 6px; + padding-right: 12px; +} + +a.SelectItem:focus, +a.SelectItem:active { + color: #000000; + outline-style: none; + text-decoration: none; +} + +a.SelectItem:hover { + color: #FFFFFF; + background-color: #3D578C; + outline-style: none; + text-decoration: none; + cursor: pointer; + display: block; +} + +/*---------------- Search results window */ + +iframe#MSearchResults { + width: 60ex; + height: 15em; +} + +#MSearchResultsWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #000; + background-color: #EEF1F7; +} + +/* ----------------------------------- */ + + +#SRIndex { + clear:both; + padding-bottom: 15px; +} + +.SREntry { + font-size: 10pt; + padding-left: 1ex; +} + +.SRPage .SREntry { + font-size: 8pt; + padding: 1px 5px; +} + +body.SRPage { + margin: 5px 2px; +} + +.SRChildren { + padding-left: 3ex; padding-bottom: .5em +} + +.SRPage .SRChildren { + display: none; +} + +.SRSymbol { + font-weight: bold; + color: #425E97; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRScope { + display: block; + color: #425E97; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRSymbol:focus, a.SRSymbol:active, +a.SRScope:focus, a.SRScope:active { + text-decoration: underline; +} + +span.SRScope { + padding-left: 4px; +} + +.SRPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; +} + +.SRResult { + display: none; +} + +DIV.searchresults { + margin-left: 10px; + margin-right: 10px; +} + +/*---------------- External search page results */ + +.searchresult { + background-color: #F0F3F8; +} + +.pages b { + color: white; + padding: 5px 5px 3px 5px; + background-image: url("../tab_a.png"); + background-repeat: repeat-x; + text-shadow: 0 1px 1px #000000; +} + +.pages { + line-height: 17px; + margin-left: 4px; + text-decoration: none; +} + +.hl { + font-weight: bold; +} + +#searchresults { + margin-bottom: 20px; +} + +.searchpages { + margin-top: 10px; +} + diff --git a/doc/api/html/search/search.js b/doc/api/html/search/search.js new file mode 100644 index 00000000000..7eee1ac76a5 --- /dev/null +++ b/doc/api/html/search/search.js @@ -0,0 +1,813 @@ +// Search script generated by doxygen +// Copyright (C) 2009 by Dimitri van Heesch. + +// The code in this file is loosly based on main.js, part of Natural Docs, +// which is Copyright (C) 2003-2008 Greg Valure +// Natural Docs is licensed under the GPL. + +var indexSectionsWithContent = +{ + 0: "_abcdefghijlmnopqrstuvwxy~", + 1: "abcdefgilnoprsvw", + 2: "bes", + 3: "abcdefghijlmnopqrstuvw", + 4: "abcdefghijlmnopqrstuvw~", + 5: "_abcdefghilmnprstvxy", + 6: "clmnrstv", + 7: "ahilmrv", + 8: "ov", + 9: "lsu", + 10: "c" +}; + +var indexSectionNames = +{ + 0: "all", + 1: "classes", + 2: "namespaces", + 3: "files", + 4: "functions", + 5: "variables", + 6: "typedefs", + 7: "enumvalues", + 8: "related", + 9: "defines", + 10: "groups" +}; + +function convertToId(search) +{ + var result = ''; + for (i=0;i do a search + { + this.Search(); + } + } + + this.OnSearchSelectKey = function(evt) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 && this.searchIndex0) // Up + { + this.searchIndex--; + this.OnSelectItem(this.searchIndex); + } + else if (e.keyCode==13 || e.keyCode==27) + { + this.OnSelectItem(this.searchIndex); + this.CloseSelectionWindow(); + this.DOMSearchField().focus(); + } + return false; + } + + // --------- Actions + + // Closes the results window. + this.CloseResultsWindow = function() + { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.Activate(false); + } + + this.CloseSelectionWindow = function() + { + this.DOMSearchSelectWindow().style.display = 'none'; + } + + // Performs a search. + this.Search = function() + { + this.keyTimeout = 0; + + // strip leading whitespace + var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + + var code = searchValue.toLowerCase().charCodeAt(0); + var idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair + { + idxChar = searchValue.substr(0, 2); + } + + var resultsPage; + var resultsPageWithSearch; + var hasResultsPage; + + var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) + { + var hexCode=idx.toString(16); + resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; + resultsPageWithSearch = resultsPage+'?'+escape(searchValue); + hasResultsPage = true; + } + else // nothing available for this search term + { + resultsPage = this.resultsPath + '/nomatches.html'; + resultsPageWithSearch = resultsPage; + hasResultsPage = false; + } + + window.frames.MSearchResults.location = resultsPageWithSearch; + var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + + if (domPopupSearchResultsWindow.style.display!='block') + { + var domSearchBox = this.DOMSearchBox(); + this.DOMSearchClose().style.display = 'inline'; + if (this.insideFrame) + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + domPopupSearchResultsWindow.style.position = 'relative'; + domPopupSearchResultsWindow.style.display = 'block'; + var width = document.body.clientWidth - 8; // the -8 is for IE :-( + domPopupSearchResultsWindow.style.width = width + 'px'; + domPopupSearchResults.style.width = width + 'px'; + } + else + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth; + var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; + domPopupSearchResultsWindow.style.display = 'block'; + left -= domPopupSearchResults.offsetWidth; + domPopupSearchResultsWindow.style.top = top + 'px'; + domPopupSearchResultsWindow.style.left = left + 'px'; + } + } + + this.lastSearchValue = searchValue; + this.lastResultsPage = resultsPage; + } + + // -------- Activation Functions + + // Activates or deactivates the search panel, resetting things to + // their default values if necessary. + this.Activate = function(isActive) + { + if (isActive || // open it + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) + { + this.DOMSearchBox().className = 'MSearchBoxActive'; + + var searchField = this.DOMSearchField(); + + if (searchField.value == this.searchLabel) // clear "Search" term upon entry + { + searchField.value = ''; + this.searchActive = true; + } + } + else if (!isActive) // directly remove the panel + { + this.DOMSearchBox().className = 'MSearchBoxInactive'; + this.DOMSearchField().value = this.searchLabel; + this.searchActive = false; + this.lastSearchValue = '' + this.lastResultsPage = ''; + } + } +} + +// ----------------------------------------------------------------------- + +// The class that handles everything on the search results page. +function SearchResults(name) +{ + // The number of matches from the last run of . + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; + + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) + { + var parentElement = document.getElementById(id); + var element = parentElement.firstChild; + + while (element && element!=parentElement) + { + if (element.nodeName == 'DIV' && element.className == 'SRChildren') + { + return element; + } + + if (element.nodeName == 'DIV' && element.hasChildNodes()) + { + element = element.firstChild; + } + else if (element.nextSibling) + { + element = element.nextSibling; + } + else + { + do + { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) + { + element = element.nextSibling; + } + } + } + } + + this.Toggle = function(id) + { + var element = this.FindChildElement(id); + if (element) + { + if (element.style.display == 'block') + { + element.style.display = 'none'; + } + else + { + element.style.display = 'block'; + } + } + } + + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) + { + if (!search) // get search word from URL + { + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + var resultRows = document.getElementsByTagName("div"); + var matches = 0; + + var i = 0; + while (i < resultRows.length) + { + var row = resultRows.item(i); + if (row.className == "SRResult") + { + var rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) + { + row.style.display = 'block'; + matches++; + } + else + { + row.style.display = 'none'; + } + } + i++; + } + document.getElementById("Searching").style.display='none'; + if (matches == 0) // no results + { + document.getElementById("NoMatches").style.display='block'; + } + else // at least one result + { + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; + } + + // return the first item with index index or higher that is visible + this.NavNext = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index++; + } + return focusItem; + } + + this.NavPrev = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index--; + } + return focusItem; + } + + this.ProcessKeys = function(e) + { + if (e.type == "keydown") + { + this.repeatOn = false; + this.lastKey = e.keyCode; + } + else if (e.type == "keypress") + { + if (!this.repeatOn) + { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown + } + } + else if (e.type == "keyup") + { + this.lastKey = 0; + this.repeatOn = false; + } + return this.lastKey!=0; + } + + this.Nav = function(evt,itemIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + var newIndex = itemIndex-1; + var focusItem = this.NavPrev(newIndex); + if (focusItem) + { + var child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') // children visible + { + var n=0; + var tmpElem; + while (1) // search for last child + { + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) + { + focusItem = tmpElem; + } + else // found it! + { + break; + } + n++; + } + } + } + if (focusItem) + { + focusItem.focus(); + } + else // return focus to search field + { + parent.document.getElementById("MSearchField").focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = itemIndex+1; + var focusItem; + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') // children visible + { + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); + } + else if (this.lastKey==39) // Right + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } + else if (this.lastKey==37) // Left + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } + + this.NavChild = function(evt,itemIndex,childIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + if (childIndex>0) + { + var newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } + else // already at first child, jump to parent + { + document.getElementById('Item'+itemIndex).focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = childIndex+1; + var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) // last child, jump to parent next parent + { + elem = this.NavNext(itemIndex+1); + } + if (elem) + { + elem.focus(); + } + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } +} + +function setKeyActions(elem,action) +{ + elem.setAttribute('onkeydown',action); + elem.setAttribute('onkeypress',action); + elem.setAttribute('onkeyup',action); +} + +function setClassAttr(elem,attr) +{ + elem.setAttribute('class',attr); + elem.setAttribute('className',attr); +} + +function createResults() +{ + var results = document.getElementById("SRResults"); + for (var e=0; e + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/typedefs_0.js b/doc/api/html/search/typedefs_0.js new file mode 100644 index 00000000000..22990584599 --- /dev/null +++ b/doc/api/html/search/typedefs_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['chainablestack',['ChainableStack',['../namespacestan_1_1math.html#a947fbc8520096439705d2072a18b43c0',1,'stan::math']]] +]; diff --git a/doc/api/html/search/typedefs_1.html b/doc/api/html/search/typedefs_1.html new file mode 100644 index 00000000000..455fe2b2b9d --- /dev/null +++ b/doc/api/html/search/typedefs_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/typedefs_1.js b/doc/api/html/search/typedefs_1.js new file mode 100644 index 00000000000..2c05a02d5ac --- /dev/null +++ b/doc/api/html/search/typedefs_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['lhsscalar',['LhsScalar',['../struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var15f7d538e8be7d782eccb613a7b1e9bd.html#a335fbbc22adeef44a09930c5946a8e31',1,'Eigen::internal::general_matrix_vector_product< Index, stan::math::var, ColMajor, ConjugateLhs, stan::math::var, ConjugateRhs >::LhsScalar()'],['../struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var9294a9f65d48f87d892ffa4de3f3e667.html#a5dd7e6007fb92c2a44027cdbef8a7e92',1,'Eigen::internal::general_matrix_vector_product< Index, stan::math::var, RowMajor, ConjugateLhs, stan::math::var, ConjugateRhs >::LhsScalar()'],['../struct_eigen_1_1internal_1_1general__matrix__matrix__product_3_01_index_00_01stan_1_1math_1_1var1562d71de7db86cb3dfb1784b090bdfc.html#a608aaa8cbb64beb505f0729f2c57667e',1,'Eigen::internal::general_matrix_matrix_product< Index, stan::math::var, LhsStorageOrder, ConjugateLhs, stan::math::var, RhsStorageOrder, ConjugateRhs, ColMajor >::LhsScalar()']]] +]; diff --git a/doc/api/html/search/typedefs_2.html b/doc/api/html/search/typedefs_2.html new file mode 100644 index 00000000000..fac5dbac552 --- /dev/null +++ b/doc/api/html/search/typedefs_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/typedefs_2.js b/doc/api/html/search/typedefs_2.js new file mode 100644 index 00000000000..11916274ebe --- /dev/null +++ b/doc/api/html/search/typedefs_2.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['matrix_5fd',['matrix_d',['../namespacestan_1_1math.html#a735db87876a1e603cdfb3c8b3c41aab6',1,'stan::math']]], + ['matrix_5ffd',['matrix_fd',['../namespacestan_1_1math.html#a12edd55403c6b7a6a7a859aef1990df5',1,'stan::math']]], + ['matrix_5fffd',['matrix_ffd',['../namespacestan_1_1math.html#ac1a8f07814e249e758d3347cbf3ce23f',1,'stan::math']]], + ['matrix_5fffv',['matrix_ffv',['../namespacestan_1_1math.html#af7ad1f7cc49caf90a56fe364405e1187',1,'stan::math']]], + ['matrix_5ffv',['matrix_fv',['../namespacestan_1_1math.html#a401abbdecf03e1aaa673aae55ea22fad',1,'stan::math']]], + ['matrix_5ft',['matrix_t',['../classstan_1_1_vector_view_mvt.html#a2c3d0382bf37405f20e83adec38db42e',1,'stan::VectorViewMvt::matrix_t()'],['../classstan_1_1_vector_view_mvt_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html#af2e32ce2c7cafcf155a77b88eae07d65',1,'stan::VectorViewMvt< const T, is_array, throw_if_accessed >::matrix_t()']]], + ['matrix_5fv',['matrix_v',['../namespacestan_1_1math.html#a5eec679edf26abd1fdf8cf56053caf8e',1,'stan::math']]] +]; diff --git a/doc/api/html/search/typedefs_3.html b/doc/api/html/search/typedefs_3.html new file mode 100644 index 00000000000..9cb52e46739 --- /dev/null +++ b/doc/api/html/search/typedefs_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/typedefs_3.js b/doc/api/html/search/typedefs_3.js new file mode 100644 index 00000000000..224c8b35f4c --- /dev/null +++ b/doc/api/html/search/typedefs_3.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['nested',['Nested',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#ac1d414db60208827e11bf100a6f5fa49',1,'Eigen::NumTraits< stan::math::fvar< T > >::Nested()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#a77e37676bb3d1900f8a49c159cd330db',1,'Eigen::NumTraits< stan::math::var >::Nested()']]], + ['noninteger',['NonInteger',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#aa05b23229e883f730e17b2d853943086',1,'Eigen::NumTraits< stan::math::fvar< T > >::NonInteger()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#a34b81621f635c4d8159b8e7f27c31a7e',1,'Eigen::NumTraits< stan::math::var >::NonInteger()']]] +]; diff --git a/doc/api/html/search/typedefs_4.html b/doc/api/html/search/typedefs_4.html new file mode 100644 index 00000000000..64c6ccef135 --- /dev/null +++ b/doc/api/html/search/typedefs_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/typedefs_4.js b/doc/api/html/search/typedefs_4.js new file mode 100644 index 00000000000..6832debe5e0 --- /dev/null +++ b/doc/api/html/search/typedefs_4.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['real',['Real',['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#ac491ba066dc6e2fda3fb4dd69fd4331d',1,'Eigen::NumTraits< stan::math::fvar< T > >::Real()'],['../struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html#a03c90fde3d5351ee5fcf5860c410d934',1,'Eigen::NumTraits< stan::math::var >::Real()']]], + ['resscalar',['ResScalar',['../struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var15f7d538e8be7d782eccb613a7b1e9bd.html#a2522cf9f6deff42b9d6890624c81a970',1,'Eigen::internal::general_matrix_vector_product< Index, stan::math::var, ColMajor, ConjugateLhs, stan::math::var, ConjugateRhs >::ResScalar()'],['../struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var9294a9f65d48f87d892ffa4de3f3e667.html#ab76d226e6d6bcf0627d4cf50a0353917',1,'Eigen::internal::general_matrix_vector_product< Index, stan::math::var, RowMajor, ConjugateLhs, stan::math::var, ConjugateRhs >::ResScalar()'],['../struct_eigen_1_1internal_1_1general__matrix__matrix__product_3_01_index_00_01stan_1_1math_1_1var1562d71de7db86cb3dfb1784b090bdfc.html#a3825404fee9507304641fdb969cc999c',1,'Eigen::internal::general_matrix_matrix_product< Index, stan::math::var, LhsStorageOrder, ConjugateLhs, stan::math::var, RhsStorageOrder, ConjugateRhs, ColMajor >::ResScalar()']]], + ['returntype',['ReturnType',['../struct_eigen_1_1internal_1_1scalar__product__traits_3_01stan_1_1math_1_1var_00_01double_01_4.html#abf081b5561d2b25d3ecfed025259858d',1,'Eigen::internal::scalar_product_traits< stan::math::var, double >::ReturnType()'],['../struct_eigen_1_1internal_1_1scalar__product__traits_3_01double_00_01stan_1_1math_1_1var_01_4.html#a0fec89098be1ad8d0b1b974eb804b6a9',1,'Eigen::internal::scalar_product_traits< double, stan::math::var >::ReturnType()']]], + ['rhsscalar',['RhsScalar',['../struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var15f7d538e8be7d782eccb613a7b1e9bd.html#a47849dd5a45a554a2588c4e66f479257',1,'Eigen::internal::general_matrix_vector_product< Index, stan::math::var, ColMajor, ConjugateLhs, stan::math::var, ConjugateRhs >::RhsScalar()'],['../struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var9294a9f65d48f87d892ffa4de3f3e667.html#a9cffa44edad4d00c8ea299185f920621',1,'Eigen::internal::general_matrix_vector_product< Index, stan::math::var, RowMajor, ConjugateLhs, stan::math::var, ConjugateRhs >::RhsScalar()'],['../struct_eigen_1_1internal_1_1general__matrix__matrix__product_3_01_index_00_01stan_1_1math_1_1var1562d71de7db86cb3dfb1784b090bdfc.html#abc22c0ecc8cb2bcf46bb25466b882003',1,'Eigen::internal::general_matrix_matrix_product< Index, stan::math::var, LhsStorageOrder, ConjugateLhs, stan::math::var, RhsStorageOrder, ConjugateRhs, ColMajor >::RhsScalar()']]], + ['row_5fvector_5fd',['row_vector_d',['../namespacestan_1_1math.html#ac61a9b8f4000b9e69bf2d1dcfb34c984',1,'stan::math']]], + ['row_5fvector_5ffd',['row_vector_fd',['../namespacestan_1_1math.html#a93e8ecf4499143a1d39440a4ce690de6',1,'stan::math']]], + ['row_5fvector_5fffd',['row_vector_ffd',['../namespacestan_1_1math.html#ae05b8f0a467a66e088270a5707a9f3b7',1,'stan::math']]], + ['row_5fvector_5fffv',['row_vector_ffv',['../namespacestan_1_1math.html#a0159cba837b1310fe0c68b21ce555d5b',1,'stan::math']]], + ['row_5fvector_5ffv',['row_vector_fv',['../namespacestan_1_1math.html#a87031870214da337be0da09913bc9158',1,'stan::math']]], + ['row_5fvector_5fv',['row_vector_v',['../namespacestan_1_1math.html#a05401bf8bb7f886d11b1ee90495fe153',1,'stan::math']]] +]; diff --git a/doc/api/html/search/typedefs_5.html b/doc/api/html/search/typedefs_5.html new file mode 100644 index 00000000000..e014348b9a5 --- /dev/null +++ b/doc/api/html/search/typedefs_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/typedefs_5.js b/doc/api/html/search/typedefs_5.js new file mode 100644 index 00000000000..0772006c6fe --- /dev/null +++ b/doc/api/html/search/typedefs_5.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['scalar',['Scalar',['../classstan_1_1math_1_1var.html#a14e688944f813cad7d31888dbe2854a9',1,'stan::math::var']]], + ['scalar_5ft',['scalar_t',['../classstan_1_1math_1_1container__view_3_01dummy_00_01_t2_01_4.html#a54c09070ade34e51b79b2679b9819304',1,'stan::math::container_view< dummy, T2 >::scalar_t()'],['../classstan_1_1_vector_view.html#a2a17f256f923b7271b7008682995c072',1,'stan::VectorView::scalar_t()'],['../classstan_1_1_vector_view_3_01const_01_t_00_01is__array_00_01throw__if__accessed_01_4.html#ab4284d2fe6f3e884e2bc9ec7c5621372',1,'stan::VectorView< const T, is_array, throw_if_accessed >::scalar_t()']]], + ['size_5ftype',['size_type',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#ab41da7a836a010a762494c84270edd23',1,'stan::math::LDLT_factor< T, R, C >::size_type()'],['../classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4.html#ab38a23d055a57197a720a66c7b089339',1,'stan::math::LDLT_factor< stan::math::var, R, C >::size_type()'],['../namespacestan_1_1math.html#a98ff1baf06b8c5e2fc241bba99d0a97d',1,'stan::math::size_type()']]] +]; diff --git a/doc/api/html/search/typedefs_6.html b/doc/api/html/search/typedefs_6.html new file mode 100644 index 00000000000..25d6aef5d47 --- /dev/null +++ b/doc/api/html/search/typedefs_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/typedefs_6.js b/doc/api/html/search/typedefs_6.js new file mode 100644 index 00000000000..9915f68b78d --- /dev/null +++ b/doc/api/html/search/typedefs_6.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['t_5fpartials_5freturn',['T_partials_return',['../structstan_1_1math_1_1_operands_and_partials.html#a5a7353a1f9d6c9f3771ec0e0e965987d',1,'stan::math::OperandsAndPartials']]], + ['t_5freturn_5ftype',['T_return_type',['../structstan_1_1math_1_1_operands_and_partials.html#af5ecf41f47ef4828640010cac6639e3f',1,'stan::math::OperandsAndPartials']]], + ['type',['type',['../structstan_1_1partials__type_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#af8a313bf6a2791e160112bda56d44288',1,'stan::partials_type< stan::math::fvar< T > >::type()'],['../structstan_1_1math_1_1index__type_3_01std_1_1vector_3_01_t_01_4_01_4.html#ababf4dcdf4c61050637f7a5efc94429c',1,'stan::math::index_type< std::vector< T > >::type()'],['../structstan_1_1is__vector_3_01const_01_t_01_4.html#a438013ddac03fc30456a132b069b6db7',1,'stan::is_vector< const T >::type()'],['../structstan_1_1is__vector_3_01std_1_1vector_3_01_t_01_4_01_4.html#aefecb429647f6ad44faa02cb233050da',1,'stan::is_vector< std::vector< T > >::type()'],['../structstan_1_1math_1_1common__type.html#a79e549f9ee143c7d5bec69a89aaa685f',1,'stan::math::common_type::type()'],['../structstan_1_1math_1_1common__type_3_01std_1_1vector_3_01_t1_01_4_00_01std_1_1vector_3_01_t2_01_4_01_4.html#a3d85f74a9e814b33da63154c2c42831a',1,'stan::math::common_type< std::vector< T1 >, std::vector< T2 > >::type()'],['../structstan_1_1math_1_1common__type_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_eiged8accfa00e73f240c58ad02ac582ba93.html#a1dfda8432ea5cb2fd29673a00f23d9ab',1,'stan::math::common_type< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > >::type()'],['../structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1e90c042d64d8c3a6b9383f570932df58.html#a9e838fc1e9eb5185e868de62a5fe86b5',1,'stan::math::promote_scalar_type< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >::type()'],['../structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_011_01_4_01_4.html#a8b40b9d3384f079cb045ab61a8c6ac73',1,'stan::math::promote_scalar_type< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > >::type()'],['../structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00_01_eigen_1_1_dynamic_01_4_01_4.html#a73857fd39b6e343018a3bda40b7dc579',1,'stan::math::promote_scalar_type< T, Eigen::Matrix< S, 1, Eigen::Dynamic > >::type()'],['../structstan_1_1math_1_1index__type_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4.html#a24d56619b29f61d9addb42dd8df1cdf1',1,'stan::math::index_type< Eigen::Matrix< T, R, C > >::type()'],['../structstan_1_1is__vector_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_011_01_4_01_4.html#ab0c2ebfaeaf2d18b25665573a01dab1e',1,'stan::is_vector< Eigen::Matrix< T, Eigen::Dynamic, 1 > >::type()'],['../structstan_1_1is__vector_3_01_eigen_1_1_matrix_3_01_t_00_011_00_01_eigen_1_1_dynamic_01_4_01_4.html#a07a4e818504882fb191b9d3a5ba6677a',1,'stan::is_vector< Eigen::Matrix< T, 1, Eigen::Dynamic > >::type()'],['../structstan_1_1is__vector_3_01_eigen_1_1_block_3_01_t_01_4_01_4.html#a7e97f9578f2d4c2ffe59e6f6a92012a8',1,'stan::is_vector< Eigen::Block< T > >::type()'],['../structstan_1_1math_1_1store__type.html#a4911dad4e7692aae90f6a93466a3e88b',1,'stan::math::store_type::type()'],['../structstan_1_1math_1_1store__type_3_01double_01_4.html#a36449fc098f0ee60b5e078771f5395e8',1,'stan::math::store_type< double >::type()'],['../structstan_1_1math_1_1store__type_3_01int_01_4.html#aa10e456268690936392e9ea31e24645f',1,'stan::math::store_type< int >::type()'],['../structstan_1_1math_1_1pass__type.html#aaf902ad0b26acab6888195ed0b528ec5',1,'stan::math::pass_type::type()'],['../structstan_1_1math_1_1pass__type_3_01double_01_4.html#adee94e36436cf8e5628e961330047738',1,'stan::math::pass_type< double >::type()'],['../structstan_1_1math_1_1pass__type_3_01int_01_4.html#a6e1bfc775f016451ab261ecede07402c',1,'stan::math::pass_type< int >::type()'],['../structstan_1_1math_1_1value__type_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4.html#a269815862773362350279d4b0317e7e7',1,'stan::math::value_type< Eigen::Matrix< T, R, C > >::type()'],['../structstan_1_1math_1_1promote__scalar__type.html#a171ea87ee9f5562b17a34f59aaf5236d',1,'stan::math::promote_scalar_type::type()'],['../structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4.html#a5b7882075346e87e0765625eac15c615',1,'stan::math::promote_scalar_type< T, std::vector< S > >::type()'],['../structstan_1_1math_1_1child__type.html#a0d005efbf96c2a27150943452b30a6f9',1,'stan::math::child_type::type()'],['../structstan_1_1math_1_1child__type_3_01_t__struct_3_01_t__child_01_4_01_4.html#a641ba0032fa0a71e7216cef157e7d831',1,'stan::math::child_type< T_struct< T_child > >::type()'],['../structstan_1_1math_1_1index__type_3_01const_01_t_01_4.html#a7967da72eaf9cec3dafcbeb8214ec209',1,'stan::math::index_type< const T >::type()'],['../structstan_1_1is__vector.html#a5384dc7751d6efdfd7b7bd9ccc442ca2',1,'stan::is_vector::type()'],['../structstan_1_1partials__return__type.html#a6aec78ebdc1f5d8571c079a3ee013f60',1,'stan::partials_return_type::type()'],['../structstan_1_1partials__type.html#aa407532a83bdc09a2167858e5612b300',1,'stan::partials_type::type()'],['../structstan_1_1return__type.html#af3130731cc471801ccef3bc753dd790b',1,'stan::return_type::type()'],['../structstan_1_1scalar__type.html#aa9068e42d81d7091f822df126fe932b7',1,'stan::scalar_type::type()'],['../structstan_1_1scalar__type_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4.html#a3cbf7ba7c3d16da948863b3180075b36',1,'stan::scalar_type< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > >::type()'],['../structstan_1_1scalar__type_3_01_t_01_5_01_4.html#a38f00242ece28298968a43f30508c940',1,'stan::scalar_type< T * >::type()'],['../structstan_1_1scalar__type__pre.html#a04ba454b3b528f4697c036d2bb19a8a1',1,'stan::scalar_type_pre::type()'],['../structstan_1_1math_1_1value__type_3_01const_01_t_01_4.html#a9f80906cfc8184d851acc6791a4c3443',1,'stan::math::value_type< const T >::type()'],['../structstan_1_1math_1_1value__type_3_01std_1_1vector_3_01_t_01_4_01_4.html#a98df9e1c73f191ad704b8e37a6a1ea23',1,'stan::math::value_type< std::vector< T > >::type()'],['../structstan_1_1partials__type_3_01stan_1_1math_1_1var_01_4.html#a3c2760c483a6ad308e2f340fe934d51d',1,'stan::partials_type< stan::math::var >::type()']]] +]; diff --git a/doc/api/html/search/typedefs_7.html b/doc/api/html/search/typedefs_7.html new file mode 100644 index 00000000000..77c19301ea3 --- /dev/null +++ b/doc/api/html/search/typedefs_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/typedefs_7.js b/doc/api/html/search/typedefs_7.js new file mode 100644 index 00000000000..d97d3cb6ccc --- /dev/null +++ b/doc/api/html/search/typedefs_7.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['value_5ftype',['value_type',['../structstan_1_1math_1_1fvar.html#ad8078e30a3897fdf9988f8a96bba3704',1,'stan::math::fvar::value_type()'],['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#a2ef573d4866782c4bdcd33865bea11f1',1,'stan::math::LDLT_factor< T, R, C >::value_type()'],['../classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4.html#afd02ee536695f8d22fc5f43add1383d4',1,'stan::math::LDLT_factor< stan::math::var, R, C >::value_type()']]], + ['vector_5fd',['vector_d',['../namespacestan_1_1math.html#ac9e96c15b87fbd704ab9bcf77e7597db',1,'stan::math']]], + ['vector_5ffd',['vector_fd',['../namespacestan_1_1math.html#a961a316bf3b39b578ec6382096da3e9a',1,'stan::math']]], + ['vector_5fffd',['vector_ffd',['../namespacestan_1_1math.html#a846bbc633c1a4c67cd805bbf61f42be0',1,'stan::math']]], + ['vector_5fffv',['vector_ffv',['../namespacestan_1_1math.html#ab1d0aff99d591327d929ee87054978ce',1,'stan::math']]], + ['vector_5ffv',['vector_fv',['../namespacestan_1_1math.html#a5065cc81264dfe941f8e9a3ecfe5ee85',1,'stan::math']]], + ['vector_5fv',['vector_v',['../namespacestan_1_1math.html#aa7d3137027b10bc7758d4c1763b58a8e',1,'stan::math']]] +]; diff --git a/doc/api/html/search/variables_0.html b/doc/api/html/search/variables_0.html new file mode 100644 index 00000000000..1b8adc9b338 --- /dev/null +++ b/doc/api/html/search/variables_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/variables_0.js b/doc/api/html/search/variables_0.js new file mode 100644 index 00000000000..8f3302ab69d --- /dev/null +++ b/doc/api/html/search/variables_0.js @@ -0,0 +1,23 @@ +var searchData= +[ + ['_5fadjaref',['_adjARef',['../rev_2mat_2fun_2determinant_8hpp.html#ac289fdc094f4376437157416320ac3bd',1,'determinant.hpp']]], + ['_5falloc',['_alloc',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01stan_1_1math_1_1var_00_01_r_00_01_c_01_4.html#a26108bbfc96084647517312ce22d11a4',1,'stan::math::LDLT_factor< stan::math::var, R, C >::_alloc()'],['../rev_2mat_2fun_2mdivide__left__ldlt_8hpp.html#a6333f1364c14f8f834a56541108a543d',1,'_alloc(): mdivide_left_ldlt.hpp'],['../rev_2mat_2fun_2mdivide__left__spd_8hpp.html#a34c6b6db468ba7b80a549359c6ec304e',1,'_alloc(): mdivide_left_spd.hpp']]], + ['_5falloc_5fldlt',['_alloc_ldlt',['../rev_2mat_2fun_2log__determinant__ldlt_8hpp.html#a09778e4b593c6f100918974eab7ed098',1,'_alloc_ldlt(): log_determinant_ldlt.hpp'],['../rev_2mat_2fun_2mdivide__left__ldlt_8hpp.html#a6dcfe87b81ca8eb9dc23b285f6858057',1,'_alloc_ldlt(): mdivide_left_ldlt.hpp']]], + ['_5fcols',['_cols',['../rev_2mat_2fun_2determinant_8hpp.html#a9c07cb6acc3ea9dc957ef6874d075e7b',1,'determinant.hpp']]], + ['_5fimpl',['_impl',['../rev_2mat_2fun_2quad__form_8hpp.html#a71e132b29586164e054f9efe99b79a06',1,'_impl(): quad_form.hpp'],['../rev_2mat_2fun_2trace__gen__quad__form_8hpp.html#a3101c2c46494cfe7908f939310755c0e',1,'_impl(): trace_gen_quad_form.hpp'],['../rev_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp.html#aacc32115df9c5f164e15a80a4615d7c0',1,'_impl(): trace_inv_quad_form_ldlt.hpp'],['../rev_2mat_2fun_2trace__quad__form_8hpp.html#aa215d337b6b5f4499fbafce1d71d924e',1,'_impl(): trace_quad_form.hpp']]], + ['_5fldlt',['_ldlt',['../classstan_1_1math_1_1_l_d_l_t__alloc.html#a31f5c61c30c291a1d2152783cf85d11f',1,'stan::math::LDLT_alloc::_ldlt()'],['../rev_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp.html#a54837fb3ae10bc0f12a3e8c2fea11e7d',1,'_ldlt(): trace_inv_quad_form_ldlt.hpp']]], + ['_5fldltp',['_ldltP',['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#a27b82bfd635b040326895c282e9edb43',1,'stan::math::LDLT_factor< T, R, C >::_ldltP()'],['../rev_2mat_2fun_2mdivide__left__ldlt_8hpp.html#a45a78506bb83f07720da6b8430e8cad7',1,'_ldltP(): mdivide_left_ldlt.hpp']]], + ['_5fllt',['_llt',['../rev_2mat_2fun_2mdivide__left__spd_8hpp.html#a597a07f209a18eb6dc1142bec2dfd08e',1,'mdivide_left_spd.hpp']]], + ['_5fm',['_m',['../classstan_1_1math_1_1welford__covar__estimator.html#a469e4f07d669c1021cfbd5c50db3f290',1,'stan::math::welford_covar_estimator::_m()'],['../classstan_1_1math_1_1welford__var__estimator.html#aa9b83535c85f9f7d70dab642ae6d5e42',1,'stan::math::welford_var_estimator::_m()']]], + ['_5fm2',['_m2',['../classstan_1_1math_1_1welford__covar__estimator.html#aad5f954fb329515cfbd7b3c42c7f08ea',1,'stan::math::welford_covar_estimator::_m2()'],['../classstan_1_1math_1_1welford__var__estimator.html#a6bf443dd58713599fdfa6dcdd2cede20',1,'stan::math::welford_var_estimator::_m2()']]], + ['_5fnum_5fsamples',['_num_samples',['../classstan_1_1math_1_1welford__covar__estimator.html#a5f7ae37d6344c34adf7ec26359540a49',1,'stan::math::welford_covar_estimator::_num_samples()'],['../classstan_1_1math_1_1welford__var__estimator.html#aea7b1397020cfbca06379e8bb1e1b420',1,'stan::math::welford_var_estimator::_num_samples()']]], + ['_5frows',['_rows',['../rev_2mat_2fun_2determinant_8hpp.html#a3e8959363f536b448785cdfdb1dd461a',1,'determinant.hpp']]], + ['_5fsym',['_sym',['../rev_2mat_2fun_2quad__form_8hpp.html#a0f0c3a82aa9cb1ecd7d97fce67fea63d',1,'quad_form.hpp']]], + ['_5fvalue',['_value',['../rev_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp.html#a3e78e92b9e102f837e1433ff78edd53c',1,'trace_inv_quad_form_ldlt.hpp']]], + ['_5fvaria',['_variA',['../classstan_1_1math_1_1_l_d_l_t__alloc.html#a3b0c5b165c4253d8052147bc416b28ea',1,'stan::math::LDLT_alloc']]], + ['_5fvarib',['_variB',['../rev_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp.html#a51e67c28b21506ae447ee657cd885d90',1,'trace_inv_quad_form_ldlt.hpp']]], + ['_5fvarid',['_variD',['../rev_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp.html#afeee220f8848a02798328ad98cde229f',1,'trace_inv_quad_form_ldlt.hpp']]], + ['_5fvarirefa',['_variRefA',['../rev_2mat_2fun_2mdivide__left_8hpp.html#aea7df605462946b48f6c8200fe67a467',1,'_variRefA(): mdivide_left.hpp'],['../rev_2mat_2fun_2mdivide__left__spd_8hpp.html#aea7df605462946b48f6c8200fe67a467',1,'_variRefA(): mdivide_left_spd.hpp'],['../rev_2mat_2fun_2mdivide__left__tri_8hpp.html#aea7df605462946b48f6c8200fe67a467',1,'_variRefA(): mdivide_left_tri.hpp']]], + ['_5fvarirefb',['_variRefB',['../rev_2mat_2fun_2mdivide__left_8hpp.html#aa2a293603982ac5da732ef1c85aabcd4',1,'_variRefB(): mdivide_left.hpp'],['../rev_2mat_2fun_2mdivide__left__ldlt_8hpp.html#aa2a293603982ac5da732ef1c85aabcd4',1,'_variRefB(): mdivide_left_ldlt.hpp'],['../rev_2mat_2fun_2mdivide__left__spd_8hpp.html#aa2a293603982ac5da732ef1c85aabcd4',1,'_variRefB(): mdivide_left_spd.hpp'],['../rev_2mat_2fun_2mdivide__left__tri_8hpp.html#aa2a293603982ac5da732ef1c85aabcd4',1,'_variRefB(): mdivide_left_tri.hpp']]], + ['_5fvarirefc',['_variRefC',['../rev_2mat_2fun_2mdivide__left_8hpp.html#ab81845acdc3a00d1a9358f95da0d560e',1,'_variRefC(): mdivide_left.hpp'],['../rev_2mat_2fun_2mdivide__left__ldlt_8hpp.html#ab81845acdc3a00d1a9358f95da0d560e',1,'_variRefC(): mdivide_left_ldlt.hpp'],['../rev_2mat_2fun_2mdivide__left__spd_8hpp.html#ab81845acdc3a00d1a9358f95da0d560e',1,'_variRefC(): mdivide_left_spd.hpp'],['../rev_2mat_2fun_2mdivide__left__tri_8hpp.html#ab81845acdc3a00d1a9358f95da0d560e',1,'_variRefC(): mdivide_left_tri.hpp']]] +]; diff --git a/doc/api/html/search/variables_1.html b/doc/api/html/search/variables_1.html new file mode 100644 index 00000000000..78f63cd1eb6 --- /dev/null +++ b/doc/api/html/search/variables_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/variables_1.js b/doc/api/html/search/variables_1.js new file mode 100644 index 00000000000..4bf984f0222 --- /dev/null +++ b/doc/api/html/search/variables_1.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['a',['a',['../classstan_1_1_vector_builder.html#a6bbefa466748a220076744c697f393b6',1,'stan::VectorBuilder']]], + ['a_5f',['A_',['../rev_2mat_2fun_2determinant_8hpp.html#a11b6b3ab6459db606ab7f4bfd4ad2823',1,'A_(): determinant.hpp'],['../rev_2mat_2fun_2mdivide__left_8hpp.html#a11b6b3ab6459db606ab7f4bfd4ad2823',1,'A_(): mdivide_left.hpp'],['../rev_2mat_2fun_2mdivide__left__tri_8hpp.html#a11b6b3ab6459db606ab7f4bfd4ad2823',1,'A_(): mdivide_left_tri.hpp'],['../rev_2mat_2fun_2quad__form_8hpp.html#ad6f8769405cee83dff888bcf5d096810',1,'A_(): quad_form.hpp'],['../rev_2mat_2fun_2trace__gen__quad__form_8hpp.html#ad6f8769405cee83dff888bcf5d096810',1,'A_(): trace_gen_quad_form.hpp'],['../rev_2mat_2fun_2trace__quad__form_8hpp.html#ad6f8769405cee83dff888bcf5d096810',1,'A_(): trace_quad_form.hpp']]], + ['ad_5f',['ad_',['../classstan_1_1math_1_1op__ddv__vari.html#a268d419189be0d83b45cbd023d888d79',1,'stan::math::op_ddv_vari::ad_()'],['../classstan_1_1math_1_1op__dv__vari.html#a30f5589cb9d3e0ee8a0219316531daee',1,'stan::math::op_dv_vari::ad_()'],['../classstan_1_1math_1_1op__dvd__vari.html#a6f88997d24c47ad9cb0c14cc628f487a',1,'stan::math::op_dvd_vari::ad_()'],['../classstan_1_1math_1_1op__dvv__vari.html#acb47ad05b53b828ecc2dc5d23b2e0d75',1,'stan::math::op_dvv_vari::ad_()']]], + ['adj_5f',['adj_',['../classstan_1_1math_1_1vari.html#a53f635dd2454bc46335f3ad5bd172623',1,'stan::math::vari']]], + ['ainvb_5f',['AinvB_',['../rev_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp.html#ad754f26cc75952ba2508669360793d30',1,'trace_inv_quad_form_ldlt.hpp']]], + ['all_5fconstant',['all_constant',['../structstan_1_1math_1_1_operands_and_partials.html#aa8dceec288c061ab0e63b2573a051992',1,'stan::math::OperandsAndPartials']]], + ['all_5fpartials',['all_partials',['../structstan_1_1math_1_1_operands_and_partials.html#a107929755d71d86230e67a2ae1556c88',1,'stan::math::OperandsAndPartials']]], + ['all_5fvaris',['all_varis',['../structstan_1_1math_1_1_operands_and_partials.html#a9f553909daf309a6b68ad9c73152f6ea',1,'stan::math::OperandsAndPartials']]], + ['alpha_5f',['alpha_',['../classstan_1_1math_1_1gevv__vvv__vari.html#a8c77333a2a3a85359e417d33291a8b19',1,'stan::math::gevv_vvv_vari::alpha_()'],['../rev_2mat_2fun_2log__softmax_8hpp.html#acd28daa1fad3aaa17c91e2ca90526175',1,'alpha_(): log_softmax.hpp'],['../rev_2mat_2fun_2softmax_8hpp.html#acd28daa1fad3aaa17c91e2ca90526175',1,'alpha_(): softmax.hpp']]], + ['avi_5f',['avi_',['../classstan_1_1math_1_1op__v__vari.html#a115547abf8f49bc6c524d126ff9965b6',1,'stan::math::op_v_vari::avi_()'],['../classstan_1_1math_1_1op__vd__vari.html#a00e8ccf1cd732f4f2688bc4248fd700f',1,'stan::math::op_vd_vari::avi_()'],['../classstan_1_1math_1_1op__vdd__vari.html#a941aebe177838074a9576f3967f0ca42',1,'stan::math::op_vdd_vari::avi_()'],['../classstan_1_1math_1_1op__vdv__vari.html#aa954e347c9288c85a11bb4306e6ad35b',1,'stan::math::op_vdv_vari::avi_()'],['../classstan_1_1math_1_1op__vv__vari.html#a9fcd1e5dacb0fbd015b28c4773071b6d',1,'stan::math::op_vv_vari::avi_()'],['../classstan_1_1math_1_1op__vvd__vari.html#aca07baf5275497bc4b6e2d42148296c9',1,'stan::math::op_vvd_vari::avi_()'],['../classstan_1_1math_1_1op__vvv__vari.html#ac813cca4e210763164b061732e60d775',1,'stan::math::op_vvv_vari::avi_()']]] +]; diff --git a/doc/api/html/search/variables_10.html b/doc/api/html/search/variables_10.html new file mode 100644 index 00000000000..c43ead3a785 --- /dev/null +++ b/doc/api/html/search/variables_10.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/variables_10.js b/doc/api/html/search/variables_10.js new file mode 100644 index 00000000000..7498d466aef --- /dev/null +++ b/doc/api/html/search/variables_10.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['theta_5f',['theta_',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#aa83bd4b43f18e3173da624b4955da369',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::theta_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#a25abbeca623eef4288f891dad5f9aef4',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::theta_()']]], + ['theta_5fdbl_5f',['theta_dbl_',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html#a6ea7d3c67d117c7a1c261fd1c4bb624a',1,'stan::math::coupled_ode_system< F, double, double >::theta_dbl_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#a8ed7492f88159d09d0821e2733f7251b',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::theta_dbl_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#a4c5d0452b3d0655d86139a2a7cce6a13',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::theta_dbl_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#ae43208e9fea0c6f456f1e28611109ac8',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::theta_dbl_()']]], + ['tinyness_5fbefore',['tinyness_before',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a8363f29d87fc5d3d73671d8392c812c5',1,'std::numeric_limits< stan::math::fvar< T > >::tinyness_before()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a872009df91ab9e948f8d9a6b4fb79a2d',1,'std::numeric_limits< stan::math::var >::tinyness_before()']]], + ['traps',['traps',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#aacb06d8d52956389bba88fc0196f4d7e',1,'std::numeric_limits< stan::math::fvar< T > >::traps()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#ace9fa9c8c667f38d1c1fac08354c7f9c',1,'std::numeric_limits< stan::math::var >::traps()']]], + ['two_5fover_5fsqrt_5fpi',['TWO_OVER_SQRT_PI',['../namespacestan_1_1math.html#a935530f53a026ebb80fcd9006059e9c8',1,'stan::math']]] +]; diff --git a/doc/api/html/search/variables_11.html b/doc/api/html/search/variables_11.html new file mode 100644 index 00000000000..d9dbba90777 --- /dev/null +++ b/doc/api/html/search/variables_11.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/variables_11.js b/doc/api/html/search/variables_11.js new file mode 100644 index 00000000000..8c23d301ae2 --- /dev/null +++ b/doc/api/html/search/variables_11.js @@ -0,0 +1,15 @@ +var searchData= +[ + ['v1_5f',['v1_',['../classstan_1_1math_1_1gevv__vvv__vari.html#a1b8223780565cab9a3d95dd0bb199b90',1,'stan::math::gevv_vvv_vari::v1_()'],['../rev_2mat_2fun_2dot__product_8hpp.html#a8c886c0e0b0df10a90267645bac46674',1,'v1_(): dot_product.hpp'],['../rev_2mat_2fun_2squared__distance_8hpp.html#a83c5c6dc5ed503252611e6e50af3557a',1,'v1_(): squared_distance.hpp']]], + ['v2_5f',['v2_',['../classstan_1_1math_1_1gevv__vvv__vari.html#a3cfca671d85ffed899debb9730235dbd',1,'stan::math::gevv_vvv_vari::v2_()'],['../rev_2mat_2fun_2dot__product_8hpp.html#a27e3d8b375e8f1fb1cb0078d150879ea',1,'v2_(): dot_product.hpp'],['../rev_2mat_2fun_2squared__distance_8hpp.html#a2157c9243530cdafcfb1665c9e682ed7',1,'v2_(): squared_distance.hpp']]], + ['v_5f',['v_',['../classstan_1_1math_1_1sum__v__vari.html#a02ca46a8d2ffc591718513c98c09c9b6',1,'stan::math::sum_v_vari::v_()'],['../rev_2mat_2fun_2dot__self_8hpp.html#ad96f2a078f01703996f5677e20cc34cd',1,'v_(): dot_self.hpp']]], + ['val_5f',['val_',['../structstan_1_1math_1_1fvar.html#a5d2e56f89a8dec57599a7d3e62e5e256',1,'stan::math::fvar::val_()'],['../classstan_1_1math_1_1vari.html#a5c8a37e50654a282308ddde46e68ede6',1,'stan::math::vari::val_()']]], + ['var_5falloc_5fstack_5f',['var_alloc_stack_',['../structstan_1_1math_1_1_autodiff_stack_storage.html#a4e95a60d3e2d215f4f8020e6ce2f03d8',1,'stan::math::AutodiffStackStorage']]], + ['var_5fnochain_5fstack_5f',['var_nochain_stack_',['../structstan_1_1math_1_1_autodiff_stack_storage.html#ac281684e398a6a4cedcf7c4e75eeb2f1',1,'stan::math::AutodiffStackStorage']]], + ['var_5fstack_5f',['var_stack_',['../structstan_1_1math_1_1_autodiff_stack_storage.html#a3ee9208d01fab7f0d6b3d3fd6f186435',1,'stan::math::AutodiffStackStorage']]], + ['varirefa_5f',['variRefA_',['../classstan_1_1math_1_1cholesky__decompose__v__vari.html#acd3834b8b6dd6cfa3b799cac9e7739fc',1,'stan::math::cholesky_decompose_v_vari']]], + ['varirefl_5f',['variRefL_',['../classstan_1_1math_1_1cholesky__decompose__v__vari.html#a733ded3d060d5d780c73a05b6f1402df',1,'stan::math::cholesky_decompose_v_vari']]], + ['varis_5f',['varis_',['../classstan_1_1math_1_1precomputed__gradients__vari.html#aedb6cbfaa40f6882efda15856d4c7d0a',1,'stan::math::precomputed_gradients_vari']]], + ['vi_5f',['vi_',['../classstan_1_1math_1_1var.html#a179b1c61bcd82f0e6c1d109c07ae8e40',1,'stan::math::var']]], + ['vis_5f',['vis_',['../classstan_1_1math_1_1op__matrix__vari.html#a81caaf77e84614aada7a27f0984db8cc',1,'stan::math::op_matrix_vari::vis_()'],['../classstan_1_1math_1_1op__vector__vari.html#aa492abe0afa7a4a030bdeed4a8d36f3f',1,'stan::math::op_vector_vari::vis_()']]] +]; diff --git a/doc/api/html/search/variables_12.html b/doc/api/html/search/variables_12.html new file mode 100644 index 00000000000..faca26f37a3 --- /dev/null +++ b/doc/api/html/search/variables_12.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/variables_12.js b/doc/api/html/search/variables_12.js new file mode 100644 index 00000000000..7bf82956716 --- /dev/null +++ b/doc/api/html/search/variables_12.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['x_5f',['x_',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html#ab317a711e2954c234d5b9ad990acc65d',1,'stan::math::coupled_ode_system< F, double, double >::x_()'],['../structstan_1_1math_1_1array__builder.html#aeeffff75de3c356257e419fc8591afcb',1,'stan::math::array_builder::x_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#ad7ffb5050618453920b1d961b2bc6b58',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::x_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#af3c0dd60d8c28b3beb59f62d91b7c751',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::x_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#aab54fc7a8d0427f32fccc3dcf16fa616',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::x_()']]], + ['x_5fint_5f',['x_int_',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html#a97205cf51b0d9ef15c2698a93b44ec52',1,'stan::math::coupled_ode_system< F, double, double >::x_int_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#aa69a8f9f7d6ecd19c32082fc8981dd2d',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::x_int_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#ada8b248f756fe67a56635aeedd546386',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::x_int_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#a0330e9773cc8d53aa0c0696e5ce731dd',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::x_int_()']]], + ['xs_5f',['xs_',['../sort__indices_8hpp.html#ab9a7299348cbbbadbd23194af720d6e9',1,'sort_indices.hpp']]] +]; diff --git a/doc/api/html/search/variables_13.html b/doc/api/html/search/variables_13.html new file mode 100644 index 00000000000..3e6377437e0 --- /dev/null +++ b/doc/api/html/search/variables_13.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/variables_13.js b/doc/api/html/search/variables_13.js new file mode 100644 index 00000000000..402e68a2262 --- /dev/null +++ b/doc/api/html/search/variables_13.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['y0_5f',['y0_',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#aa7ccd9be4ab9be8769513a3deef42c6c',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::y0_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#ae3694159ee6e355b556004bfbc850411',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::y0_()']]], + ['y0_5fdbl_5f',['y0_dbl_',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html#a05858eac16fa32b40205ee4531fdd159',1,'stan::math::coupled_ode_system< F, double, double >::y0_dbl_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#ac10d0e5efa43f212517bfbec68a92027',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::y0_dbl_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#a727d49ad4fc2fdede1cce76919940f8d',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::y0_dbl_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#a6774f7c0364f4787224bcb2bdab839f9',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::y0_dbl_()']]], + ['y_5fcoupled_5f',['y_coupled_',['../structstan_1_1math_1_1coupled__ode__observer.html#ad213dbe6a4b23d20955a4fdfc94d3308',1,'stan::math::coupled_ode_observer']]] +]; diff --git a/doc/api/html/search/variables_2.html b/doc/api/html/search/variables_2.html new file mode 100644 index 00000000000..ea80d20140b --- /dev/null +++ b/doc/api/html/search/variables_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/variables_2.js b/doc/api/html/search/variables_2.js new file mode 100644 index 00000000000..2ce6ab29539 --- /dev/null +++ b/doc/api/html/search/variables_2.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['b_5f',['B_',['../rev_2mat_2fun_2quad__form_8hpp.html#a0fd42d63db84319b9384dce7676a9cc7',1,'B_(): quad_form.hpp'],['../rev_2mat_2fun_2trace__gen__quad__form_8hpp.html#a0fd42d63db84319b9384dce7676a9cc7',1,'B_(): trace_gen_quad_form.hpp'],['../rev_2mat_2fun_2trace__quad__form_8hpp.html#a0fd42d63db84319b9384dce7676a9cc7',1,'B_(): trace_quad_form.hpp']]], + ['bd_5f',['bd_',['../classstan_1_1math_1_1op__ddv__vari.html#ae1d70829103888d1008c8910e4cbff2c',1,'stan::math::op_ddv_vari::bd_()'],['../classstan_1_1math_1_1op__vd__vari.html#ae1eaf8ba4cdb63d1f66c4fc2849788fc',1,'stan::math::op_vd_vari::bd_()'],['../classstan_1_1math_1_1op__vdd__vari.html#aa5107d1c0d8c46a91eac4d6621b963c7',1,'stan::math::op_vdd_vari::bd_()'],['../classstan_1_1math_1_1op__vdv__vari.html#a8a8d9b43a909c0246d171d6dc65c8379',1,'stan::math::op_vdv_vari::bd_()']]], + ['bvi_5f',['bvi_',['../classstan_1_1math_1_1op__dv__vari.html#a2442bb729d0afe617b6c24accae7d10b',1,'stan::math::op_dv_vari::bvi_()'],['../classstan_1_1math_1_1op__dvd__vari.html#a57237dc3d1b1c0288fdbad9793ac63c7',1,'stan::math::op_dvd_vari::bvi_()'],['../classstan_1_1math_1_1op__dvv__vari.html#a16a4bbb74c4dfc664ab8b208352f6a91',1,'stan::math::op_dvv_vari::bvi_()'],['../classstan_1_1math_1_1op__vv__vari.html#abe4e66ae889c118cb8ca89fcc6f6e216',1,'stan::math::op_vv_vari::bvi_()'],['../classstan_1_1math_1_1op__vvd__vari.html#a0a708211e17a4967f8b32594fda9b33a',1,'stan::math::op_vvd_vari::bvi_()'],['../classstan_1_1math_1_1op__vvv__vari.html#ac8e9a82361ea5fcf0a51f088d29be90e',1,'stan::math::op_vvv_vari::bvi_()']]] +]; diff --git a/doc/api/html/search/variables_3.html b/doc/api/html/search/variables_3.html new file mode 100644 index 00000000000..0dca26f47b7 --- /dev/null +++ b/doc/api/html/search/variables_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/variables_3.js b/doc/api/html/search/variables_3.js new file mode 100644 index 00000000000..d231ff7fca4 --- /dev/null +++ b/doc/api/html/search/variables_3.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['c_5f',['C_',['../rev_2mat_2fun_2mdivide__left_8hpp.html#a03e9f8989e0f5a0117b426e2b204933a',1,'C_(): mdivide_left.hpp'],['../rev_2mat_2fun_2mdivide__left__ldlt_8hpp.html#a43b33b1b4279ce27f514eaed1daece58',1,'C_(): mdivide_left_ldlt.hpp'],['../rev_2mat_2fun_2mdivide__left__spd_8hpp.html#a43b33b1b4279ce27f514eaed1daece58',1,'C_(): mdivide_left_spd.hpp'],['../rev_2mat_2fun_2mdivide__left__tri_8hpp.html#a03e9f8989e0f5a0117b426e2b204933a',1,'C_(): mdivide_left_tri.hpp'],['../rev_2mat_2fun_2quad__form_8hpp.html#a2d9d9bf5df5103a65354498227122b4a',1,'C_(): quad_form.hpp'],['../rev_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp.html#ae7e589df75920eb51a2317e6a38db106',1,'C_(): trace_inv_quad_form_ldlt.hpp']]], + ['cd_5f',['cd_',['../classstan_1_1math_1_1op__dvd__vari.html#aafff013835800b2611e582f75a4a87e1',1,'stan::math::op_dvd_vari::cd_()'],['../classstan_1_1math_1_1op__vdd__vari.html#a7acdfdfc206b8c3e9335af73091bb471',1,'stan::math::op_vdd_vari::cd_()'],['../classstan_1_1math_1_1op__vvd__vari.html#a6184fba1516ee458408d47f8ba4d64fa',1,'stan::math::op_vvd_vari::cd_()']]], + ['constraint_5ftolerance',['CONSTRAINT_TOLERANCE',['../namespacestan_1_1math.html#aece739c5a2672028f0c7848045b89f08',1,'stan::math']]], + ['cvi_5f',['cvi_',['../classstan_1_1math_1_1op__ddv__vari.html#a56c1fc22f4f329cca3da733c6eb0f73a',1,'stan::math::op_ddv_vari::cvi_()'],['../classstan_1_1math_1_1op__dvv__vari.html#aaddf51db2da17712cf73941d9a65c072',1,'stan::math::op_dvv_vari::cvi_()'],['../classstan_1_1math_1_1op__vdv__vari.html#a7fb6e0e51feb1099d20918fe951f83e9',1,'stan::math::op_vdv_vari::cvi_()'],['../classstan_1_1math_1_1op__vvv__vari.html#ad8b02ef27dfacf65c9e4eac914cc800e',1,'stan::math::op_vvv_vari::cvi_()']]] +]; diff --git a/doc/api/html/search/variables_4.html b/doc/api/html/search/variables_4.html new file mode 100644 index 00000000000..400e8e9b41a --- /dev/null +++ b/doc/api/html/search/variables_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/variables_4.js b/doc/api/html/search/variables_4.js new file mode 100644 index 00000000000..aa6a7bef852 --- /dev/null +++ b/doc/api/html/search/variables_4.js @@ -0,0 +1,18 @@ +var searchData= +[ + ['d_5f',['d_',['../structstan_1_1math_1_1fvar.html#a8478b986831654e68268036549d4489c',1,'stan::math::fvar::d_()'],['../rev_2mat_2fun_2trace__gen__quad__form_8hpp.html#a03ff78e0a9fe71f688e2e446a4852786',1,'D_(): trace_gen_quad_form.hpp'],['../rev_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp.html#a6360b469a2b983248c4871e3fa37ca26',1,'D_(): trace_inv_quad_form_ldlt.hpp']]], + ['d_5fx1',['d_x1',['../structstan_1_1math_1_1_operands_and_partials.html#aa9678e6ac255ae9c0dc1e965237d6f2b',1,'stan::math::OperandsAndPartials']]], + ['d_5fx2',['d_x2',['../structstan_1_1math_1_1_operands_and_partials.html#a9757d2a2abf9bb8f5e96bef74248cf11',1,'stan::math::OperandsAndPartials']]], + ['d_5fx3',['d_x3',['../structstan_1_1math_1_1_operands_and_partials.html#adff5d76e13bd6e5b3295eed6af97c589',1,'stan::math::OperandsAndPartials']]], + ['d_5fx4',['d_x4',['../structstan_1_1math_1_1_operands_and_partials.html#a3a22b6c508236a0e21e88e910f82e735',1,'stan::math::OperandsAndPartials']]], + ['d_5fx5',['d_x5',['../structstan_1_1math_1_1_operands_and_partials.html#ab191b607e899615698112eb3277ee156',1,'stan::math::OperandsAndPartials']]], + ['d_5fx6',['d_x6',['../structstan_1_1math_1_1_operands_and_partials.html#a0a7faaf239c0c8a07b1f46e3364133b4',1,'stan::math::OperandsAndPartials']]], + ['da_5f',['da_',['../classstan_1_1math_1_1precomp__v__vari.html#aebcc7a60e78ba7f4156697faaf9cc0f0',1,'stan::math::precomp_v_vari::da_()'],['../classstan_1_1math_1_1precomp__vv__vari.html#af97b5e93718119df5074e486f4825bea',1,'stan::math::precomp_vv_vari::da_()'],['../classstan_1_1math_1_1precomp__vvv__vari.html#ab917bd646e4c1e48cc62c0200b4be8ca',1,'stan::math::precomp_vvv_vari::da_()']]], + ['db_5f',['db_',['../classstan_1_1math_1_1precomp__vv__vari.html#a135ab5b456986b163575aceb179a8a40',1,'stan::math::precomp_vv_vari::db_()'],['../classstan_1_1math_1_1precomp__vvv__vari.html#ae0b4d2b33c8c29d99021b4693a1247ce',1,'stan::math::precomp_vvv_vari::db_()']]], + ['dc_5f',['dc_',['../classstan_1_1math_1_1precomp__vvv__vari.html#ad4e4385c71e5c0ae76b62e1f581600b0',1,'stan::math::precomp_vvv_vari']]], + ['digits',['digits',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#acacc88b265be440d023641830e9555e8',1,'std::numeric_limits< stan::math::fvar< T > >::digits()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a6f832c798083861791d8f8422d297cc5',1,'std::numeric_limits< stan::math::var >::digits()']]], + ['digits10',['digits10',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#ac72f6fb71cb6f7e4066f6cb4d4d264a8',1,'std::numeric_limits< stan::math::fvar< T > >::digits10()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a306499deadac99dc6648a436dd1b91e7',1,'std::numeric_limits< stan::math::var >::digits10()']]], + ['dotval_5f',['dotval_',['../classstan_1_1math_1_1gevv__vvv__vari.html#a674d2c68ca4a0bfce7d38c644e430d7a',1,'stan::math::gevv_vvv_vari']]], + ['dtrs_5f',['dtrs_',['../classstan_1_1math_1_1stored__gradient__vari.html#ae5c373b3fc563e291e189571057c2027',1,'stan::math::stored_gradient_vari']]], + ['dtype_5f',['Dtype_',['../rev_2mat_2fun_2trace__inv__quad__form__ldlt_8hpp.html#a7c830ea3da654e2c30a3e8d4c41610e8',1,'trace_inv_quad_form_ldlt.hpp']]] +]; diff --git a/doc/api/html/search/variables_5.html b/doc/api/html/search/variables_5.html new file mode 100644 index 00000000000..7f1241f94be --- /dev/null +++ b/doc/api/html/search/variables_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/variables_5.js b/doc/api/html/search/variables_5.js new file mode 100644 index 00000000000..922954c7558 --- /dev/null +++ b/doc/api/html/search/variables_5.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['e',['E',['../namespacestan_1_1math.html#a66f94e47c6dc073bbd3929903b4431fe',1,'stan::math']]], + ['epsilon',['EPSILON',['../namespacestan_1_1math.html#a5ffd625c2083751d7ccabb7dbe39cbe0',1,'stan::math']]], + ['exp_5fval_5f',['exp_val_',['../rev_2scal_2fun_2log10_8hpp.html#ad5fa8da685c6b471f471d6ed4fc99ebd',1,'log10.hpp']]] +]; diff --git a/doc/api/html/search/variables_6.html b/doc/api/html/search/variables_6.html new file mode 100644 index 00000000000..7536df8d5a7 --- /dev/null +++ b/doc/api/html/search/variables_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/variables_6.js b/doc/api/html/search/variables_6.js new file mode 100644 index 00000000000..2ff096a1a10 --- /dev/null +++ b/doc/api/html/search/variables_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['f_5f',['f_',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html#a6d34cf58dd65908c274346f9faffa1c9',1,'stan::math::coupled_ode_system< F, double, double >::f_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#a29bdd2a1b78ae39b6be208202254d641',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::f_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#a315e28cc50d328c6b384142310e9721b',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::f_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#afedc7496fd5c35ba1e8325d71c8100be',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::f_()']]] +]; diff --git a/doc/api/html/search/variables_7.html b/doc/api/html/search/variables_7.html new file mode 100644 index 00000000000..66186a69945 --- /dev/null +++ b/doc/api/html/search/variables_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/variables_7.js b/doc/api/html/search/variables_7.js new file mode 100644 index 00000000000..35abf156076 --- /dev/null +++ b/doc/api/html/search/variables_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['gradients_5f',['gradients_',['../classstan_1_1math_1_1precomputed__gradients__vari.html#ab1b2c58490560a34da96fee3d4057620',1,'stan::math::precomputed_gradients_vari']]] +]; diff --git a/doc/api/html/search/variables_8.html b/doc/api/html/search/variables_8.html new file mode 100644 index 00000000000..aa13bf24a5b --- /dev/null +++ b/doc/api/html/search/variables_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/variables_8.js b/doc/api/html/search/variables_8.js new file mode 100644 index 00000000000..1d15f4df355 --- /dev/null +++ b/doc/api/html/search/variables_8.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['has_5fdenorm',['has_denorm',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a96150abba41617a326d932898f40a271',1,'std::numeric_limits< stan::math::fvar< T > >::has_denorm()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a0bad4d5dc17300ba94f978bb2fe4b5f0',1,'std::numeric_limits< stan::math::var >::has_denorm()']]], + ['has_5fdenorm_5floss',['has_denorm_loss',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#ac1a4413e08377758bcf63a241e0a69ee',1,'std::numeric_limits< stan::math::fvar< T > >::has_denorm_loss()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a972b6c088d09e9ae9600cd8e7bf84d08',1,'std::numeric_limits< stan::math::var >::has_denorm_loss()']]], + ['has_5finfinity',['has_infinity',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#adf78371272a42d7f5eb8836365c04764',1,'std::numeric_limits< stan::math::fvar< T > >::has_infinity()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a48d4f72d9050f2ffa14e92db913c3f9c',1,'std::numeric_limits< stan::math::var >::has_infinity()']]], + ['has_5fquiet_5fnan',['has_quiet_NaN',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a8e45cb7bac1df9211bedbe9fb7463762',1,'std::numeric_limits< stan::math::fvar< T > >::has_quiet_NaN()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a9fce52f2fab68553a36500922c7b00c7',1,'std::numeric_limits< stan::math::var >::has_quiet_NaN()']]], + ['has_5fsignaling_5fnan',['has_signaling_NaN',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a1638acb74a052c73f6f967df41b48616',1,'std::numeric_limits< stan::math::fvar< T > >::has_signaling_NaN()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a192d5e3131211bc8d64187c98fb791e4',1,'std::numeric_limits< stan::math::var >::has_signaling_NaN()']]] +]; diff --git a/doc/api/html/search/variables_9.html b/doc/api/html/search/variables_9.html new file mode 100644 index 00000000000..78cc249f7db --- /dev/null +++ b/doc/api/html/search/variables_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/variables_9.js b/doc/api/html/search/variables_9.js new file mode 100644 index 00000000000..eacc18a41fd --- /dev/null +++ b/doc/api/html/search/variables_9.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['idx_5f',['idx_',['../rev_2mat_2fun_2log__softmax_8hpp.html#a48e1ddf96b6a9b19ecead9aca544bb31',1,'idx_(): log_softmax.hpp'],['../rev_2mat_2fun_2softmax_8hpp.html#a48e1ddf96b6a9b19ecead9aca544bb31',1,'idx_(): softmax.hpp']]], + ['infty',['INFTY',['../namespacestan_1_1math.html#a7f2ac8ebf3095e9934715bb34f0669b3',1,'stan::math']]], + ['inv_5fsqrt_5f2',['INV_SQRT_2',['../namespacestan_1_1math.html#a5491e346d5a812af988f8de4a5948c88',1,'stan::math']]], + ['inv_5fsqrt_5ftwo_5fpi',['INV_SQRT_TWO_PI',['../namespacestan_1_1math.html#a44d54686aa26009d0e9101be42afd877',1,'stan::math']]], + ['is_5fbounded',['is_bounded',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#ab5deb46224220ecfb8a9376482c9e8ac',1,'std::numeric_limits< stan::math::fvar< T > >::is_bounded()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#ae161cee3b942d452a926a36aec60f299',1,'std::numeric_limits< stan::math::var >::is_bounded()']]], + ['is_5fexact',['is_exact',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a90261feaf68874a9040f1d6154cb07d8',1,'std::numeric_limits< stan::math::fvar< T > >::is_exact()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a4ac573b4bf27192ba455fd19e227f9a8',1,'std::numeric_limits< stan::math::var >::is_exact()']]], + ['is_5fiec559',['is_iec559',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a14d89ae2412cdc6332ef210bde59f6b6',1,'std::numeric_limits< stan::math::fvar< T > >::is_iec559()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a6bd55581d326ebf3ed6a1c496db0b9e0',1,'std::numeric_limits< stan::math::var >::is_iec559()']]], + ['is_5finteger',['is_integer',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#aea8d495294cc702f7a01231a1dac200d',1,'std::numeric_limits< stan::math::fvar< T > >::is_integer()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a77274abe077c86132768f758f855d4de',1,'std::numeric_limits< stan::math::var >::is_integer()']]], + ['is_5fmodulo',['is_modulo',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a32a765f274b13b613d32ba4d134c4744',1,'std::numeric_limits< stan::math::fvar< T > >::is_modulo()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#adf7187f7525889c004c4f82c2ce732df',1,'std::numeric_limits< stan::math::var >::is_modulo()']]], + ['is_5fsigned',['is_signed',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#af3bbfcf12af3e66ff24ce68db3bcc1e7',1,'std::numeric_limits< stan::math::fvar< T > >::is_signed()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a63ac9208e3acc5ca9bcdba7e5f56765e',1,'std::numeric_limits< stan::math::var >::is_signed()']]], + ['is_5fspecialized',['is_specialized',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a59a2dde71269caf7efeb7152be6ce533',1,'std::numeric_limits< stan::math::fvar< T > >::is_specialized()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#acd76962ff1fcc794becaaf166d8680a6',1,'std::numeric_limits< stan::math::var >::is_specialized()']]] +]; diff --git a/doc/api/html/search/variables_a.html b/doc/api/html/search/variables_a.html new file mode 100644 index 00000000000..592abaa33c9 --- /dev/null +++ b/doc/api/html/search/variables_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/variables_a.js b/doc/api/html/search/variables_a.js new file mode 100644 index 00000000000..b520d7b50f4 --- /dev/null +++ b/doc/api/html/search/variables_a.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['length_5f',['length_',['../classstan_1_1math_1_1sum__v__vari.html#af6d64dee35e248318e7335b4483157c0',1,'stan::math::sum_v_vari::length_()'],['../classstan_1_1math_1_1gevv__vvv__vari.html#a3162ad4ae0b41adf5d342af16e51bad2',1,'stan::math::gevv_vvv_vari::length_()'],['../rev_2mat_2fun_2dot__product_8hpp.html#af0c9b7dcc98dce1d0edf7cb6ce49103b',1,'length_(): dot_product.hpp'],['../rev_2mat_2fun_2squared__distance_8hpp.html#af0c9b7dcc98dce1d0edf7cb6ce49103b',1,'length_(): squared_distance.hpp']]], + ['log_5f10',['LOG_10',['../namespacestan_1_1math.html#ab773773e2db53015eb48ab1730816fb5',1,'stan::math']]], + ['log_5f2',['LOG_2',['../namespacestan_1_1math.html#a43fb48f0a7f26bc60c1dfb572283b149',1,'stan::math']]], + ['log_5fhalf',['LOG_HALF',['../namespacestan_1_1math.html#a84525339d1870944d63c1cce6caa1af1',1,'stan::math']]], + ['log_5fpi',['LOG_PI',['../namespacestan_1_1math.html#af6dd9cf6abfd8930528d3635890982b1',1,'stan::math']]], + ['log_5fpi_5fover_5ffour',['LOG_PI_OVER_FOUR',['../namespacestan_1_1math.html#a177764626d2378e0d7bdfb26aac187b6',1,'stan::math']]], + ['log_5fsqrt_5fpi',['LOG_SQRT_PI',['../namespacestan_1_1math.html#ab836723c882918b6263042bdefa3c0d7',1,'stan::math']]], + ['log_5ftwo',['LOG_TWO',['../namespacestan_1_1math.html#ad7a5d92de812b4b632801cf8e32dbe7d',1,'stan::math']]], + ['log_5ftwo_5fpi',['LOG_TWO_PI',['../namespacestan_1_1math.html#a938e5d349b0ffdfdae9674f9dd4dbebe',1,'stan::math']]], + ['log_5fzero',['LOG_ZERO',['../namespacestan_1_1math.html#acd99e429af3a997976a017d6a580e3f9',1,'stan::math']]] +]; diff --git a/doc/api/html/search/variables_b.html b/doc/api/html/search/variables_b.html new file mode 100644 index 00000000000..78052a1e03c --- /dev/null +++ b/doc/api/html/search/variables_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/variables_b.js b/doc/api/html/search/variables_b.js new file mode 100644 index 00000000000..f8d5d3ea2a1 --- /dev/null +++ b/doc/api/html/search/variables_b.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['m_5f',['M_',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html#a75ffbfd056a73814a0a9c766f2ca9280',1,'stan::math::coupled_ode_system< F, double, double >::M_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#ace943e49e8e81900dba84aa7ad248e1d',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::M_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#abd51105f9c70eaa4e41604db57814b5d',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::M_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#abcd5c75ee971a0346ce26db1fb99d8f2',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::M_()'],['../classstan_1_1math_1_1cholesky__decompose__v__vari.html#a79f912f6bd3f5fe607c1da2f496dc546',1,'stan::math::cholesky_decompose_v_vari::M_()'],['../rev_2mat_2fun_2mdivide__left_8hpp.html#ac7022caeebffc39337bdfd893db75983',1,'M_(): mdivide_left.hpp'],['../rev_2mat_2fun_2mdivide__left__ldlt_8hpp.html#ac7022caeebffc39337bdfd893db75983',1,'M_(): mdivide_left_ldlt.hpp'],['../rev_2mat_2fun_2mdivide__left__spd_8hpp.html#ac7022caeebffc39337bdfd893db75983',1,'M_(): mdivide_left_spd.hpp'],['../rev_2mat_2fun_2mdivide__left__tri_8hpp.html#ac7022caeebffc39337bdfd893db75983',1,'M_(): mdivide_left_tri.hpp']]], + ['major_5fversion',['MAJOR_VERSION',['../namespacestan_1_1math.html#a8a063d6b0347cc193b69270211e8aadd',1,'stan::math']]], + ['max_5fexponent',['max_exponent',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a1537bd90d3b2f97e27229e0c219d0807',1,'std::numeric_limits< stan::math::fvar< T > >::max_exponent()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a4d417e7f57df3e7866b33e606b7a67c4',1,'std::numeric_limits< stan::math::var >::max_exponent()']]], + ['max_5fexponent10',['max_exponent10',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a582122c752ff0b7505c495a5ed7c315b',1,'std::numeric_limits< stan::math::fvar< T > >::max_exponent10()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a314c4f743a150c8d335692086c6ca564',1,'std::numeric_limits< stan::math::var >::max_exponent10()']]], + ['memalloc_5f',['memalloc_',['../structstan_1_1math_1_1_autodiff_stack_storage.html#a1397a6cac3999e6be0b4c7a92cfa4c3e',1,'stan::math::AutodiffStackStorage']]], + ['min_5fexponent',['min_exponent',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#abe6b4be3af27ba2fa504246bc080c9d6',1,'std::numeric_limits< stan::math::fvar< T > >::min_exponent()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#ac5b86cfb9a7c727c9acecc63d1846f88',1,'std::numeric_limits< stan::math::var >::min_exponent()']]], + ['min_5fexponent10',['min_exponent10',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a18d66a0fb3aedba11174e9dddf46e64a',1,'std::numeric_limits< stan::math::fvar< T > >::min_exponent10()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#a3b2ecdc49b475fd7c29e5db504e93993',1,'std::numeric_limits< stan::math::var >::min_exponent10()']]], + ['minor_5fversion',['MINOR_VERSION',['../namespacestan_1_1math.html#a60295ca22b8701af9a3ccf3b607231f4',1,'stan::math']]], + ['msgs_5f',['msgs_',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html#a9d0ef30c3aeabb040639ffd88416c029',1,'stan::math::coupled_ode_system< F, double, double >::msgs_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#a1d598b9ae88d390a54ed701bc9752999',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::msgs_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#a1a1ce668b29fbe51a12c7af59aad2db4',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::msgs_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#a06205d852a2e980e30107a290f9e5876',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::msgs_()']]] +]; diff --git a/doc/api/html/search/variables_c.html b/doc/api/html/search/variables_c.html new file mode 100644 index 00000000000..b2260e465b7 --- /dev/null +++ b/doc/api/html/search/variables_c.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/variables_c.js b/doc/api/html/search/variables_c.js new file mode 100644 index 00000000000..3ff975b2abd --- /dev/null +++ b/doc/api/html/search/variables_c.js @@ -0,0 +1,18 @@ +var searchData= +[ + ['n_5f',['n_',['../structstan_1_1math_1_1coupled__ode__observer.html#ad24f4f0e485caa6ca0f4f149624c5109',1,'stan::math::coupled_ode_observer::n_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html#ad90fed9acd912ce41cf2478a0bae8071',1,'stan::math::coupled_ode_system< F, double, double >::N_()'],['../classstan_1_1math_1_1_l_d_l_t__factor_3_01_t_00_01_r_00_01_c_01_4.html#af6c64c2f48290202674bc63736abf0d9',1,'stan::math::LDLT_factor< T, R, C >::N_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#ac2046745fac3341408eb20d04fbd8340',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::N_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#aa6c3adcb5d16141d88f7c59f57794980',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::N_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#a27a807c37bfbd4c8f0b9fd8674c26d51',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::N_()'],['../classstan_1_1math_1_1_l_d_l_t__alloc.html#a80ff851844006a74407e5958b1aa41a8',1,'stan::math::LDLT_alloc::N_()'],['../rev_2mat_2fun_2mdivide__left_8hpp.html#a733553beee6dadc63ea8c537055a9e04',1,'N_(): mdivide_left.hpp'],['../rev_2mat_2fun_2mdivide__left__ldlt_8hpp.html#a733553beee6dadc63ea8c537055a9e04',1,'N_(): mdivide_left_ldlt.hpp'],['../rev_2mat_2fun_2mdivide__left__spd_8hpp.html#a733553beee6dadc63ea8c537055a9e04',1,'N_(): mdivide_left_spd.hpp'],['../rev_2mat_2fun_2mdivide__left__tri_8hpp.html#a733553beee6dadc63ea8c537055a9e04',1,'N_(): mdivide_left_tri.hpp']]], + ['neg_5flog_5fpi',['NEG_LOG_PI',['../namespacestan_1_1math.html#a0f964e25c3ad3515549ead08428ff7cf',1,'stan::math']]], + ['neg_5flog_5fsqrt_5fpi',['NEG_LOG_SQRT_PI',['../namespacestan_1_1math.html#afb4a282e2196987e10d2bb65f12ec55a',1,'stan::math']]], + ['neg_5flog_5fsqrt_5ftwo_5fpi',['NEG_LOG_SQRT_TWO_PI',['../namespacestan_1_1math.html#a59f7f156224f9e60c2fb3e99034212eb',1,'stan::math']]], + ['neg_5flog_5ftwo',['NEG_LOG_TWO',['../namespacestan_1_1math.html#aa546788809cd7f0be4a9872bc8009325',1,'stan::math']]], + ['neg_5flog_5ftwo_5fover_5ftwo',['NEG_LOG_TWO_OVER_TWO',['../namespacestan_1_1math.html#a9b0bc03717322aa20ea2be9d6e488738',1,'stan::math']]], + ['neg_5flog_5ftwo_5fpi',['NEG_LOG_TWO_PI',['../namespacestan_1_1math.html#a2fc867325cdad6b9dcc2e7443ddf5956',1,'stan::math']]], + ['neg_5ftwo_5fover_5fsqrt_5fpi',['NEG_TWO_OVER_SQRT_PI',['../namespacestan_1_1math.html#a344504ea0c1f4f956c85ea8027a07ba9',1,'stan::math']]], + ['negative_5fepsilon',['NEGATIVE_EPSILON',['../namespacestan_1_1math.html#a1dcea3a9752d079c9f972040b873b704',1,'stan::math']]], + ['negative_5finfty',['NEGATIVE_INFTY',['../namespacestan_1_1math.html#aa37d0f67f02e0a0b5797ed9f4df56bfb',1,'stan::math']]], + ['nested_5fvar_5falloc_5fstack_5fstarts_5f',['nested_var_alloc_stack_starts_',['../structstan_1_1math_1_1_autodiff_stack_storage.html#a86825610c9b89e0635a1efe420fb502c',1,'stan::math::AutodiffStackStorage']]], + ['nested_5fvar_5fnochain_5fstack_5fsizes_5f',['nested_var_nochain_stack_sizes_',['../structstan_1_1math_1_1_autodiff_stack_storage.html#a15080f06483a3215ce0513e0274db5f5',1,'stan::math::AutodiffStackStorage']]], + ['nested_5fvar_5fstack_5fsizes_5f',['nested_var_stack_sizes_',['../structstan_1_1math_1_1_autodiff_stack_storage.html#aaa52587fef6c965ff959745bedaab58b',1,'stan::math::AutodiffStackStorage']]], + ['not_5fa_5fnumber',['NOT_A_NUMBER',['../namespacestan_1_1math.html#a9cf147700a2e38335abc618b2c913b8a',1,'stan::math']]], + ['nvaris',['nvaris',['../structstan_1_1math_1_1_operands_and_partials.html#a17131a81b370e8e27ae5284aa31bc43b',1,'stan::math::OperandsAndPartials']]] +]; diff --git a/doc/api/html/search/variables_d.html b/doc/api/html/search/variables_d.html new file mode 100644 index 00000000000..f47799968f8 --- /dev/null +++ b/doc/api/html/search/variables_d.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/variables_d.js b/doc/api/html/search/variables_d.js new file mode 100644 index 00000000000..c6d9493ed76 --- /dev/null +++ b/doc/api/html/search/variables_d.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['partials_5f',['partials_',['../classstan_1_1math_1_1stored__gradient__vari.html#a318f47f75b1b24dd3ad5751fa741b6a4',1,'stan::math::stored_gradient_vari']]], + ['patch_5fversion',['PATCH_VERSION',['../namespacestan_1_1math.html#ad4c620fffa8fa7ddd68ffb46fb64667b',1,'stan::math']]], + ['poisson_5fmax_5frate',['POISSON_MAX_RATE',['../namespacestan_1_1math.html#a4ea938c86917d89bbd13e4edcbecb1be',1,'stan::math']]] +]; diff --git a/doc/api/html/search/variables_e.html b/doc/api/html/search/variables_e.html new file mode 100644 index 00000000000..1165006622f --- /dev/null +++ b/doc/api/html/search/variables_e.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/variables_e.js b/doc/api/html/search/variables_e.js new file mode 100644 index 00000000000..1e4f6acdd3b --- /dev/null +++ b/doc/api/html/search/variables_e.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['radix',['radix',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a587890d74b771c8540cee2cd2d7034ab',1,'std::numeric_limits< stan::math::fvar< T > >::radix()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#aa9ba12ebfa66d3e08f8d215b1113c818',1,'std::numeric_limits< stan::math::var >::radix()']]], + ['round_5fstyle',['round_style',['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html#a17d98bdb7219aae14eb990e0e1272a75',1,'std::numeric_limits< stan::math::fvar< T > >::round_style()'],['../structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html#aabc7fd25500e1560deb8839cb1ee7225',1,'std::numeric_limits< stan::math::var >::round_style()']]] +]; diff --git a/doc/api/html/search/variables_f.html b/doc/api/html/search/variables_f.html new file mode 100644 index 00000000000..537dd7c28e9 --- /dev/null +++ b/doc/api/html/search/variables_f.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/doc/api/html/search/variables_f.js b/doc/api/html/search/variables_f.js new file mode 100644 index 00000000000..19f85022b1d --- /dev/null +++ b/doc/api/html/search/variables_f.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['size_5f',['size_',['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html#acf7ec3e134ff5a5c3502e9a96c04e66f',1,'stan::math::coupled_ode_system< F, double, double >::size_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html#a072fc6585021385a59831dfef70c8fa1',1,'stan::math::coupled_ode_system< F, double, stan::math::var >::size_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html#a26ef004ef67b43c6df80664bd3453108',1,'stan::math::coupled_ode_system< F, stan::math::var, double >::size_()'],['../structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html#a98451e6ddfb64254c8bfbc6a6f4055a9',1,'stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::size_()'],['../classstan_1_1math_1_1op__matrix__vari.html#a89c5c533bea6db8bca39202531f38348',1,'stan::math::op_matrix_vari::size_()'],['../classstan_1_1math_1_1precomputed__gradients__vari.html#a785ccdd15f3d34aad96351dbfc2131a8',1,'stan::math::precomputed_gradients_vari::size_()'],['../classstan_1_1math_1_1stored__gradient__vari.html#aae7ebe863ce4f2544b1443d50c456a53',1,'stan::math::stored_gradient_vari::size_()'],['../classstan_1_1math_1_1op__vector__vari.html#af182cd25bf9c00f21155fd1e1b9bc64b',1,'stan::math::op_vector_vari::size_()'],['../rev_2mat_2fun_2dot__self_8hpp.html#a5f31775800bbb46b35b5791def1f3acc',1,'size_(): dot_self.hpp'],['../rev_2mat_2fun_2log__softmax_8hpp.html#a50218915641ec8f39877c2565e95a604',1,'size_(): log_softmax.hpp'],['../rev_2mat_2fun_2softmax_8hpp.html#a50218915641ec8f39877c2565e95a604',1,'size_(): softmax.hpp']]], + ['softmax_5falpha_5f',['softmax_alpha_',['../rev_2mat_2fun_2log__softmax_8hpp.html#a1e7fc23c4da87820ad49b66444825c34',1,'softmax_alpha_(): log_softmax.hpp'],['../rev_2mat_2fun_2softmax_8hpp.html#a1e7fc23c4da87820ad49b66444825c34',1,'softmax_alpha_(): softmax.hpp']]], + ['sqrt_5f2',['SQRT_2',['../namespacestan_1_1math.html#a491d6e40aaa2a3e205ea6708dc3c75dd',1,'stan::math']]], + ['sqrt_5f2_5ftimes_5fsqrt_5fpi',['SQRT_2_TIMES_SQRT_PI',['../namespacestan_1_1math.html#aa628c5af5a85d53472f0126fcca44524',1,'stan::math']]], + ['sqrt_5fpi',['SQRT_PI',['../namespacestan_1_1math.html#a3e31fd76fde6e97d14dfb26c5f4ab8d0',1,'stan::math']]] +]; diff --git a/doc/api/html/segment_8hpp.html b/doc/api/html/segment_8hpp.html new file mode 100644 index 00000000000..49018e35d0b --- /dev/null +++ b/doc/api/html/segment_8hpp.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/segment.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
segment.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::segment (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v, size_t i, size_t n)
 Return the specified number of elements as a vector starting from the specified element - 1 of the specified vector. More...
 
template<typename T >
Eigen::Matrix< T,
+1, Eigen::Dynamic > 
stan::math::segment (const Eigen::Matrix< T, 1, Eigen::Dynamic > &v, size_t i, size_t n)
 
template<typename T >
std::vector< T > stan::math::segment (const std::vector< T > &sv, size_t i, size_t n)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/segment_8hpp_source.html b/doc/api/html/segment_8hpp_source.html new file mode 100644 index 00000000000..ab6b02b5d9c --- /dev/null +++ b/doc/api/html/segment_8hpp_source.html @@ -0,0 +1,179 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/segment.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
segment.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_SEGMENT_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_SEGMENT_HPP
+
3 
+ + + +
7 #include <vector>
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
16  template <typename T>
+
17  inline
+
18  Eigen::Matrix<T, Eigen::Dynamic, 1>
+
19  segment(const Eigen::Matrix<T, Eigen::Dynamic, 1>& v,
+
20  size_t i, size_t n) {
+
21  stan::math::check_greater("segment", "n", i, 0.0);
+
22  stan::math::check_less_or_equal("segment", "n", i,
+
23  static_cast<size_t>(v.rows()));
+
24  if (n != 0) {
+
25  stan::math::check_greater("segment", "n", i+n-1, 0.0);
+
26  stan::math::check_less_or_equal("segment", "n", i+n-1,
+
27  static_cast<size_t>(v.rows()));
+
28  }
+
29  return v.segment(i-1, n);
+
30  }
+
31 
+
32  template <typename T>
+
33  inline
+
34  Eigen::Matrix<T, 1, Eigen::Dynamic>
+
35  segment(const Eigen::Matrix<T, 1, Eigen::Dynamic>& v,
+
36  size_t i, size_t n) {
+
37  stan::math::check_greater("segment", "n", i, 0.0);
+
38  stan::math::check_less_or_equal("segment", "n", i,
+
39  static_cast<size_t>(v.cols()));
+
40  if (n != 0) {
+
41  stan::math::check_greater("segment", "n", i+n-1, 0.0);
+
42  stan::math::check_less_or_equal("segment", "n", i + n - 1,
+
43  static_cast<size_t>(v.cols()));
+
44  }
+
45 
+
46  return v.segment(i-1, n);
+
47  }
+
48 
+
49 
+
50  template <typename T>
+
51  std::vector<T>
+
52  segment(const std::vector<T>& sv,
+
53  size_t i, size_t n) {
+
54  stan::math::check_greater("segment", "i", i, 0.0);
+
55  stan::math::check_less_or_equal("segment", "i", i, sv.size());
+
56  if (n != 0) {
+
57  stan::math::check_greater("segment", "i+n-1", i + n - 1, 0.0);
+
58  stan::math::check_less_or_equal("segment", "i+n-1", i + n - 1,
+
59  static_cast<size_t>(sv.size()));
+
60  }
+
61  std::vector<T> s;
+
62  for (size_t j = 0; j < n; ++j)
+
63  s.push_back(sv[i + j - 1]);
+
64  return s;
+
65  }
+
66 
+
67  }
+
68 }
+
69 #endif
+ + + +
bool check_less_or_equal(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is less or equal to high.
+
Eigen::Matrix< T, Eigen::Dynamic, 1 > segment(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v, size_t i, size_t n)
Return the specified number of elements as a vector starting from the specified element - 1 of the sp...
Definition: segment.hpp:19
+
bool check_greater(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is strictly greater than low.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/seq__view_8hpp.html b/doc/api/html/seq__view_8hpp.html new file mode 100644 index 00000000000..c78a069e6f5 --- /dev/null +++ b/doc/api/html/seq__view_8hpp.html @@ -0,0 +1,155 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/meta/seq_view.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
seq_view.hpp File Reference
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/seq__view_8hpp_source.html b/doc/api/html/seq__view_8hpp_source.html new file mode 100644 index 00000000000..daaf3713abd --- /dev/null +++ b/doc/api/html/seq__view_8hpp_source.html @@ -0,0 +1,342 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/meta/seq_view.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
seq_view.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_META_SEQ_VIEW_HPP
+
2 #define STAN_MATH_PRIM_MAT_META_SEQ_VIEW_HPP
+
3 
+ +
5 #include <vector>
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+
11 
+
12  template <typename T>
+
13  struct store_type {
+
14  typedef const T& type;
+
15  };
+
16  template <>
+
17  struct store_type<double> {
+
18  typedef const double type;
+
19  };
+
20  template <>
+
21  struct store_type<int> {
+
22  typedef const int type;
+
23  };
+
24 
+
25 
+
26  template <typename T>
+
27  struct pass_type {
+
28  typedef const T& type;
+
29  };
+
30  template <>
+
31  struct pass_type<double> {
+
32  typedef double type;
+
33  };
+
34  template <>
+
35  struct pass_type<int> {
+
36  typedef int type;
+
37  };
+
38 
+
39 
+
40  // S assignable to T
+
41  template <typename T, typename S>
+
42  class seq_view {
+
43  private:
+
44  typename store_type<S>::type x_;
+
45  public:
+
46  explicit seq_view(typename pass_type<S>::type x)
+
47  : x_(x) {
+
48  }
+
49  inline typename pass_type<T>::type
+
50  operator[](int n) const {
+
51  return x_;
+
52  }
+
53  int size() const {
+
54  return 1;
+
55  }
+
56  };
+
57 
+
58  template <typename T, typename S>
+
59  class seq_view<T, Eigen::Matrix<S, Eigen::Dynamic, 1> > {
+
60  private:
+ +
62  public:
+
63  explicit seq_view(typename
+
64  pass_type<Eigen::Matrix<S, Eigen::Dynamic, 1> >::type x)
+
65  : x_(x) {
+
66  }
+
67  inline typename pass_type<T>::type
+
68  operator[](int n) const {
+
69  return x_(n);
+
70  }
+
71  int size() const {
+
72  return x_.size();
+
73  }
+
74  };
+
75 
+
76 
+
77  template <typename T, typename S>
+
78  class seq_view<T, Eigen::Matrix<S, 1, Eigen::Dynamic> > {
+
79  private:
+ +
81  public:
+
82  explicit seq_view(typename pass_type
+
83  <Eigen::Matrix<S, 1, Eigen::Dynamic> >::type x)
+
84  : x_(x) {
+
85  }
+
86  inline typename pass_type<T>::type
+
87  operator[](int n) const {
+
88  return x_(n);
+
89  }
+
90  int size() const {
+
91  return x_.size();
+
92  }
+
93  };
+
94 
+
95 
+
96 
+
97  // row-major order of returns to match std::vector
+
98  template <typename T, typename S>
+
99  class seq_view<T, Eigen::Matrix<S, Eigen::Dynamic, Eigen::Dynamic> > {
+
100  private:
+
101  typename store_type<Eigen::Matrix
+
102  <S, Eigen::Dynamic, Eigen::Dynamic> >::type x_;
+
103  public:
+
104  explicit
+
105  seq_view(typename pass_type<Eigen::Matrix
+
106  <S, Eigen::Dynamic, Eigen::Dynamic> >::type x)
+
107  : x_(x) {
+
108  }
+
109  inline typename pass_type<T>::type
+
110  operator[](int n) const {
+
111  return x_(n / x_.cols(), n % x_.cols());
+
112  }
+
113  int size() const {
+
114  return x_.size();
+
115  }
+
116  };
+
117 
+
118  // question is how expensive the ctor is
+
119  template <typename T, typename S>
+
120  class seq_view<T, std::vector<S> > {
+
121  private:
+
122  typename store_type<std::vector<S> >::type x_;
+
123  const size_t elt_size_;
+
124  public:
+
125  explicit seq_view(typename pass_type<std::vector<S> >::type x)
+
126  : x_(x),
+
127  elt_size_(x_.size() == 0 ? 0 : seq_view<T, S>(x_[0]).size()) {
+
128  }
+
129  inline typename pass_type<T>::type
+
130  operator[](int n) const {
+
131  return seq_view<T, S>(x_[n / elt_size_])[n % elt_size_];
+
132  }
+
133  int size() const {
+
134  return x_.size() * elt_size_;
+
135  }
+
136  };
+
137 
+
138  // BELOW HERE JUST FOR EFFICIENCY
+
139 
+
140  template <typename T>
+
141  class seq_view<T, std::vector<T> > {
+
142  private:
+
143  typename store_type<std::vector<T> >::type x_;
+
144  public:
+
145  explicit seq_view(typename pass_type<std::vector<T> >::type x)
+
146  : x_(x) {
+
147  }
+
148  inline typename pass_type<T>::type
+
149  operator[](int n) const {
+
150  return x_[n];
+
151  }
+
152  int size() const {
+
153  return x_.size();
+
154  }
+
155  };
+
156 
+
157  // if vector of S with S assignable to T, also works
+
158  // use enable_if? (and disable_if for the general case)
+
159  template <typename T>
+
160  class seq_view<T, std::vector<std::vector<T> > > {
+
161  private:
+
162  typename store_type<std::vector<std::vector<T> > >::type x_;
+
163  const size_t cols_;
+
164  public:
+
165  explicit seq_view(typename pass_type
+
166  <std::vector<std::vector<T> > >::type x)
+
167  : x_(x),
+
168  cols_(x_.size() == 0 ? 0 : x_[0].size()) { }
+
169  inline typename pass_type<T>::type
+
170  operator[](int n) const {
+
171  return x_[n / cols_][n % cols_];
+
172  }
+
173  int size() const {
+
174  return x_.size() * cols_;
+
175  }
+
176  };
+
177 
+
178  template <>
+
179  class seq_view<double, std::vector<int> > {
+
180  private:
+
181  store_type<std::vector<int> >::type x_;
+
182  public:
+
183  explicit seq_view(pass_type<std::vector<int> >::type x)
+
184  : x_(x) {
+
185  }
+
186  inline pass_type<double>::type operator[](int n) const {
+
187  return x_[n];
+
188  }
+
189  int size() const {
+
190  return x_.size();
+
191  }
+
192  };
+
193 
+
194 
+
195 
+
196 
+
197  }
+
198 }
+
199 
+
200 #endif
+ +
pass_type< T >::type operator[](int n) const
Definition: seq_view.hpp:130
+
int size() const
Definition: seq_view.hpp:53
+ + +
seq_view(typename pass_type< Eigen::Matrix< S, 1, Eigen::Dynamic > >::type x)
Definition: seq_view.hpp:82
+
seq_view(typename pass_type< S >::type x)
Definition: seq_view.hpp:46
+ + + + +
seq_view(typename pass_type< Eigen::Matrix< S, Eigen::Dynamic, 1 > >::type x)
Definition: seq_view.hpp:63
+ + +
pass_type< double >::type operator[](int n) const
Definition: seq_view.hpp:186
+
seq_view(typename pass_type< std::vector< S > >::type x)
Definition: seq_view.hpp:125
+ +
seq_view(pass_type< std::vector< int > >::type x)
Definition: seq_view.hpp:183
+ + +
seq_view(typename pass_type< std::vector< std::vector< T > > >::type x)
Definition: seq_view.hpp:165
+ +
pass_type< T >::type operator[](int n) const
Definition: seq_view.hpp:149
+ + + + + +
seq_view(typename pass_type< Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >::type x)
Definition: seq_view.hpp:105
+ + + +
seq_view(typename pass_type< std::vector< T > >::type x)
Definition: seq_view.hpp:145
+
pass_type< T >::type operator[](int n) const
Definition: seq_view.hpp:50
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/set__zero__all__adjoints_8hpp.html b/doc/api/html/set__zero__all__adjoints_8hpp.html new file mode 100644 index 00000000000..43f3645dc74 --- /dev/null +++ b/doc/api/html/set__zero__all__adjoints_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/rev/core/set_zero_all_adjoints.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
set_zero_all_adjoints.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

static void stan::math::set_zero_all_adjoints ()
 Reset all adjoint values in the stack to zero. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/set__zero__all__adjoints_8hpp_source.html b/doc/api/html/set__zero__all__adjoints_8hpp_source.html new file mode 100644 index 00000000000..9f63189fb09 --- /dev/null +++ b/doc/api/html/set__zero__all__adjoints_8hpp_source.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/rev/core/set_zero_all_adjoints.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
set_zero_all_adjoints.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_SET_ZERO_ALL_ADJOINTS_HPP
+
2 #define STAN_MATH_REV_CORE_SET_ZERO_ALL_ADJOINTS_HPP
+
3 
+ + + +
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
14  static void set_zero_all_adjoints() {
+
15  for (size_t i = 0; i < ChainableStack::var_stack_.size(); ++i)
+
16  ChainableStack::var_stack_[i]->set_zero_adjoint();
+
17  for (size_t i = 0; i < ChainableStack::var_nochain_stack_.size(); ++i)
+
18  ChainableStack::var_nochain_stack_[i]->set_zero_adjoint();
+
19  }
+
20 
+
21  }
+
22 }
+
23 #endif
+
static void set_zero_all_adjoints()
Reset all adjoint values in the stack to zero.
+ +
static std::vector< ChainableT * > var_nochain_stack_
+ + +
static std::vector< ChainableT * > var_stack_
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/sign_8hpp.html b/doc/api/html/sign_8hpp.html new file mode 100644 index 00000000000..2937af569b9 --- /dev/null +++ b/doc/api/html/sign_8hpp.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/sign.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
sign.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
int stan::math::sign (const T &z)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/sign_8hpp_source.html b/doc/api/html/sign_8hpp_source.html new file mode 100644 index 00000000000..4b3cae29e33 --- /dev/null +++ b/doc/api/html/sign_8hpp_source.html @@ -0,0 +1,125 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/sign.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
sign.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_SIGN_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_SIGN_HPP
+
3 
+
4 namespace stan {
+
5  namespace math {
+
6 
+
7  // returns 1 if NaN is passed in.
+
8  template<typename T>
+
9  inline int sign(const T& z) {
+
10  return (z == 0) ? 0 : z < 0 ? -1 : 1;
+
11  }
+
12  }
+
13 }
+
14 
+
15 #endif
+
16 
+
int sign(const T &z)
Definition: sign.hpp:9
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/simplex__constrain_8hpp.html b/doc/api/html/simplex__constrain_8hpp.html new file mode 100644 index 00000000000..42bc695e0ae --- /dev/null +++ b/doc/api/html/simplex__constrain_8hpp.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/simplex_constrain.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
simplex_constrain.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::simplex_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y)
 Return the simplex corresponding to the specified free vector. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::simplex_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y, T &lp)
 Return the simplex corresponding to the specified free vector and increment the specified log probability reference with the log absolute Jacobian determinant of the transform. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/simplex__constrain_8hpp_source.html b/doc/api/html/simplex__constrain_8hpp_source.html new file mode 100644 index 00000000000..37439946455 --- /dev/null +++ b/doc/api/html/simplex__constrain_8hpp_source.html @@ -0,0 +1,200 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/simplex_constrain.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
simplex_constrain.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_SIMPLEX_CONSTRAIN_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_SIMPLEX_CONSTRAIN_HPP
+
3 
+ + + + + + +
10 #include <cmath>
+
11 
+
12 namespace stan {
+
13 
+
14  namespace math {
+
15 
+
28  template <typename T>
+
29  Eigen::Matrix<T, Eigen::Dynamic, 1>
+
30  simplex_constrain(const Eigen::Matrix<T, Eigen::Dynamic, 1>& y) {
+
31  // cut & paste simplex_constrain(Eigen::Matrix, T) w/o Jacobian
+
32  using Eigen::Matrix;
+
33  using Eigen::Dynamic;
+ + +
36  using stan::math::logit;
+
37  using stan::math::log1m;
+
38  using std::log;
+
39  typedef typename index_type<Matrix<T, Dynamic, 1> >::type size_type;
+
40 
+
41 
+
42  int Km1 = y.size();
+
43  Matrix<T, Dynamic, 1> x(Km1 + 1);
+
44  T stick_len(1.0);
+
45  for (size_type k = 0; k < Km1; ++k) {
+
46  T z_k(inv_logit(y(k) - log(Km1 - k)));
+
47  x(k) = stick_len * z_k;
+
48  stick_len -= x(k);
+
49  }
+
50  x(Km1) = stick_len;
+
51  return x;
+
52  }
+
53 
+
67  template <typename T>
+
68  Eigen::Matrix<T, Eigen::Dynamic, 1>
+
69  simplex_constrain(const Eigen::Matrix<T, Eigen::Dynamic, 1>& y,
+
70  T& lp) {
+
71  using Eigen::Dynamic;
+
72  using Eigen::Matrix;
+ + +
75  using stan::math::logit;
+
76  using stan::math::log1m;
+ +
78  using std::log;
+
79 
+
80  typedef typename index_type<Matrix<T, Dynamic, 1> >::type size_type;
+
81 
+
82  int Km1 = y.size(); // K = Km1 + 1
+
83  Matrix<T, Dynamic, 1> x(Km1 + 1);
+
84  T stick_len(1.0);
+
85  for (size_type k = 0; k < Km1; ++k) {
+
86  double eq_share = -log(Km1 - k); // = logit(1.0/(Km1 + 1 - k));
+
87  T adj_y_k(y(k) + eq_share);
+
88  T z_k(inv_logit(adj_y_k));
+
89  x(k) = stick_len * z_k;
+
90  lp += log(stick_len);
+
91  lp -= log1p_exp(-adj_y_k);
+
92  lp -= log1p_exp(adj_y_k);
+
93  stick_len -= x(k); // equivalently *= (1 - z_k);
+
94  }
+
95  x(Km1) = stick_len; // no Jacobian contrib for last dim
+
96  return x;
+
97  }
+
98 
+
99  }
+
100 
+
101 }
+
102 
+
103 #endif
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
fvar< T > inv_logit(const fvar< T > &x)
Definition: inv_logit.hpp:15
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:19
+ + + +
fvar< T > logit(const fvar< T > &x)
Definition: logit.hpp:17
+ +
fvar< T > log1p_exp(const fvar< T > &x)
Definition: log1p_exp.hpp:13
+
Eigen::Matrix< T, Eigen::Dynamic, 1 > simplex_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y)
Return the simplex corresponding to the specified free vector.
+ + +
fvar< T > log1m(const fvar< T > &x)
Definition: log1m.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/simplex__free_8hpp.html b/doc/api/html/simplex__free_8hpp.html new file mode 100644 index 00000000000..310ad0173ee --- /dev/null +++ b/doc/api/html/simplex__free_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/simplex_free.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
simplex_free.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::simplex_free (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x)
 Return an unconstrained vector that when transformed produces the specified simplex. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/simplex__free_8hpp_source.html b/doc/api/html/simplex__free_8hpp_source.html new file mode 100644 index 00000000000..388e7ad3b30 --- /dev/null +++ b/doc/api/html/simplex__free_8hpp_source.html @@ -0,0 +1,161 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/simplex_free.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
simplex_free.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_SIMPLEX_FREE_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_SIMPLEX_FREE_HPP
+
3 
+ + + + +
8 #include <cmath>
+
9 
+
10 namespace stan {
+
11 
+
12  namespace math {
+
13 
+
28  template <typename T>
+
29  Eigen::Matrix<T, Eigen::Dynamic, 1>
+
30  simplex_free(const Eigen::Matrix<T, Eigen::Dynamic, 1>& x) {
+
31  using Eigen::Dynamic;
+
32  using Eigen::Matrix;
+ +
34  using stan::math::logit;
+
35  using std::log;
+
36 
+
37  typedef typename index_type<Matrix<T, Dynamic, 1> >::type size_type;
+
38 
+
39  stan::math::check_simplex("stan::math::simplex_free",
+
40  "Simplex variable", x);
+
41  int Km1 = x.size() - 1;
+
42  Eigen::Matrix<T, Eigen::Dynamic, 1> y(Km1);
+
43  T stick_len(x(Km1));
+
44  for (size_type k = Km1; --k >= 0; ) {
+
45  stick_len += x(k);
+
46  T z_k(x(k) / stick_len);
+
47  y(k) = logit(z_k) + log(Km1 - k);
+
48  // note: log(Km1 - k) = logit(1.0 / (Km1 + 1 - k));
+
49  }
+
50  return y;
+
51  }
+
52 
+
53  }
+
54 
+
55 }
+
56 
+
57 #endif
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:19
+ + +
fvar< T > logit(const fvar< T > &x)
Definition: logit.hpp:17
+
Eigen::Matrix< T, Eigen::Dynamic, 1 > simplex_free(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x)
Return an unconstrained vector that when transformed produces the specified simplex.
+
bool check_simplex(const char *function, const char *name, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)
Return true if the specified vector is simplex.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/singular__values_8hpp.html b/doc/api/html/singular__values_8hpp.html new file mode 100644 index 00000000000..68c8afe0c43 --- /dev/null +++ b/doc/api/html/singular__values_8hpp.html @@ -0,0 +1,131 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/singular_values.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
singular_values.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::singular_values (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
 Return the vector of the singular values of the specified matrix in decreasing order of magnitude. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/singular__values_8hpp_source.html b/doc/api/html/singular__values_8hpp_source.html new file mode 100644 index 00000000000..8902ff673de --- /dev/null +++ b/doc/api/html/singular__values_8hpp_source.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/singular_values.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
singular_values.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_SINGULAR_VALUES_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_SINGULAR_VALUES_HPP
+
3 
+
4 // NOTE: if using this with rev mode, include numeric_limits
+
5 // or else this seg-faults.
+ +
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
19  template <typename T>
+
20  Eigen::Matrix<T, Eigen::Dynamic, 1>
+
21  singular_values(const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>& m) {
+
22  return Eigen::JacobiSVD
+
23  <Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> >(m).singularValues();
+
24  }
+
25 
+
26  }
+
27 }
+
28 #endif
+
Eigen::Matrix< T, Eigen::Dynamic, 1 > singular_values(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
Return the vector of the singular values of the specified matrix in decreasing order of magnitude...
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/size_8hpp.html b/doc/api/html/size_8hpp.html new file mode 100644 index 00000000000..198e2fb4c3e --- /dev/null +++ b/doc/api/html/size_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/size.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
size.hpp File Reference
+
+
+
#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
int stan::math::size (const std::vector< T > &x)
 Return the size of the specified standard vector. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/size_8hpp_source.html b/doc/api/html/size_8hpp_source.html new file mode 100644 index 00000000000..d24479e1c50 --- /dev/null +++ b/doc/api/html/size_8hpp_source.html @@ -0,0 +1,125 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/size.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
size.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_SIZE_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_SIZE_HPP
+
3 
+
4 #include <vector>
+
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
16  template <typename T>
+
17  inline int size(const std::vector<T>& x) {
+
18  return static_cast<int>(x.size());
+
19  }
+
20 
+
21  }
+
22 }
+
23 #endif
+
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/size__of_8hpp.html b/doc/api/html/size__of_8hpp.html new file mode 100644 index 00000000000..0eb0555601c --- /dev/null +++ b/doc/api/html/size__of_8hpp.html @@ -0,0 +1,136 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/size_of.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
size_of.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + +

+Classes

struct  stan::size_of_helper< T, is_vec >
 
struct  stan::size_of_helper< T, true >
 
+ + + +

+Namespaces

 stan
 
+ + + + +

+Functions

template<typename T >
size_t stan::size_of (const T &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/size__of_8hpp_source.html b/doc/api/html/size__of_8hpp_source.html new file mode 100644 index 00000000000..9f249c04994 --- /dev/null +++ b/doc/api/html/size__of_8hpp_source.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/meta/size_of.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
size_of.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_SIZE_OF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_META_SIZE_OF_HPP
+
3 
+ + + +
7 
+
8 namespace stan {
+
9 
+
10 
+
11 
+
12  template<typename T, bool is_vec>
+
13  struct size_of_helper {
+
14  static size_t size_of(const T& /*x*/) {
+
15  return 1U;
+
16  }
+
17  };
+
18 
+
19  template<typename T>
+
20  struct size_of_helper<T, true> {
+
21  static size_t size_of(const T& x) {
+
22  return x.size();
+
23  }
+
24  };
+
25 
+
26  template <typename T>
+
27  size_t size_of(const T& x) {
+ +
29  }
+
30 
+
31 }
+
32 #endif
+
33 
+
static size_t size_of(const T &)
Definition: size_of.hpp:14
+
static size_t size_of(const T &x)
Definition: size_of.hpp:21
+ + + +
size_t size_of(const T &x)
Definition: size_of.hpp:27
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/skew__normal__ccdf__log_8hpp.html b/doc/api/html/skew__normal__ccdf__log_8hpp.html new file mode 100644 index 00000000000..defc178de86 --- /dev/null +++ b/doc/api/html/skew__normal__ccdf__log_8hpp.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/skew_normal_ccdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
skew_normal_ccdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
return_type< T_y, T_loc,
+T_scale, T_shape >::type 
stan::math::skew_normal_ccdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_shape &alpha)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/skew__normal__ccdf__log_8hpp_source.html b/doc/api/html/skew__normal__ccdf__log_8hpp_source.html new file mode 100644 index 00000000000..4a4c9fef834 --- /dev/null +++ b/doc/api/html/skew__normal__ccdf__log_8hpp_source.html @@ -0,0 +1,262 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/skew_normal_ccdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
skew_normal_ccdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_SKEW_NORMAL_CCDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_SKEW_NORMAL_CCDF_LOG_HPP
+
3 
+
4 #include <boost/random/variate_generator.hpp>
+
5 #include <boost/math/distributions.hpp>
+ + + + + + + + + + + + +
18 #include <cmath>
+
19 
+
20 namespace stan {
+
21 
+
22  namespace math {
+
23 
+
24  template <typename T_y, typename T_loc, typename T_scale, typename T_shape>
+
25  typename return_type<T_y, T_loc, T_scale, T_shape>::type
+
26  skew_normal_ccdf_log(const T_y& y, const T_loc& mu, const T_scale& sigma,
+
27  const T_shape& alpha) {
+
28  static const char* function("stan::math::skew_normal_ccdf_log");
+
29  typedef typename stan::partials_return_type<T_y, T_loc, T_scale,
+
30  T_shape>::type
+
31  T_partials_return;
+
32 
+ + + + +
37  using stan::math::owens_t;
+ +
39 
+
40  T_partials_return ccdf_log(0.0);
+
41 
+
42  // check if any vectors are zero length
+
43  if (!(stan::length(y)
+
44  && stan::length(mu)
+
45  && stan::length(sigma)
+
46  && stan::length(alpha)))
+
47  return ccdf_log;
+
48 
+
49  check_not_nan(function, "Random variable", y);
+
50  check_finite(function, "Location parameter", mu);
+
51  check_not_nan(function, "Scale parameter", sigma);
+
52  check_positive(function, "Scale parameter", sigma);
+
53  check_finite(function, "Shape parameter", alpha);
+
54  check_not_nan(function, "Shape parameter", alpha);
+
55  check_consistent_sizes(function,
+
56  "Random variable", y,
+
57  "Location parameter", mu,
+
58  "Scale parameter", sigma,
+
59  "Shape paramter", alpha);
+
60 
+ +
62  operands_and_partials(y, mu, sigma, alpha);
+
63 
+
64  using stan::math::SQRT_2;
+
65  using stan::math::pi;
+
66  using std::log;
+
67  using std::exp;
+
68 
+
69  VectorView<const T_y> y_vec(y);
+
70  VectorView<const T_loc> mu_vec(mu);
+
71  VectorView<const T_scale> sigma_vec(sigma);
+
72  VectorView<const T_shape> alpha_vec(alpha);
+
73  size_t N = max_size(y, mu, sigma, alpha);
+
74  const double SQRT_TWO_OVER_PI = std::sqrt(2.0 / stan::math::pi());
+
75 
+
76  for (size_t n = 0; n < N; n++) {
+
77  const T_partials_return y_dbl = value_of(y_vec[n]);
+
78  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
79  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
80  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
81  const T_partials_return alpha_dbl_sq = alpha_dbl * alpha_dbl;
+
82  const T_partials_return diff = (y_dbl - mu_dbl) / sigma_dbl;
+
83  const T_partials_return diff_sq = diff * diff;
+
84  const T_partials_return scaled_diff = diff / SQRT_2;
+
85  const T_partials_return scaled_diff_sq = diff_sq * 0.5;
+
86  const T_partials_return ccdf_log_ = 1.0 - 0.5 * erfc(-scaled_diff)
+
87  + 2 * owens_t(diff, alpha_dbl);
+
88 
+
89  // ccdf_log
+
90  ccdf_log += log(ccdf_log_);
+
91 
+
92  // gradients
+
93  const T_partials_return deriv_erfc = SQRT_TWO_OVER_PI * 0.5
+
94  * exp(-scaled_diff_sq) / sigma_dbl;
+
95  const T_partials_return deriv_owens = erf(alpha_dbl * scaled_diff)
+
96  * exp(-scaled_diff_sq) / SQRT_TWO_OVER_PI / (-2.0 * pi()) / sigma_dbl;
+
97  const T_partials_return rep_deriv = (-2.0 * deriv_owens + deriv_erfc)
+
98  / ccdf_log_;
+
99 
+ +
101  operands_and_partials.d_x1[n] -= rep_deriv;
+ +
103  operands_and_partials.d_x2[n] += rep_deriv;
+ +
105  operands_and_partials.d_x3[n] += rep_deriv * diff;
+ +
107  operands_and_partials.d_x4[n] -= -2.0 * exp(-0.5 * diff_sq
+
108  * (1.0 + alpha_dbl_sq))
+
109  / ((1 + alpha_dbl_sq) * 2.0 * pi()) / ccdf_log_;
+
110  }
+
111 
+
112  return operands_and_partials.to_var(ccdf_log, y, mu, sigma, alpha);
+
113  }
+
114  }
+
115 }
+
116 #endif
+
117 
+ +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
fvar< T > erf(const fvar< T > &x)
Definition: erf.hpp:14
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ +
fvar< T > owens_t(const fvar< T > &x1, const fvar< T > &x2)
Definition: owens_t.hpp:14
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
return_type< T_y, T_loc, T_scale, T_shape >::type skew_normal_ccdf_log(const T_y &y, const T_loc &mu, const T_scale &sigma, const T_shape &alpha)
+
const double SQRT_2
The value of the square root of 2, .
Definition: constants.hpp:21
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
VectorView< T_partials_return, is_vector< T4 >::value, is_constant_struct< T4 >::value > d_x4
+
A variable implementation that stores operands and derivatives with respect to the variable...
+
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ + +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
fvar< T > erfc(const fvar< T > &x)
Definition: erfc.hpp:14
+
double pi()
Return the value of pi.
Definition: constants.hpp:86
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/skew__normal__cdf_8hpp.html b/doc/api/html/skew__normal__cdf_8hpp.html new file mode 100644 index 00000000000..636b4b62d5e --- /dev/null +++ b/doc/api/html/skew__normal__cdf_8hpp.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/skew_normal_cdf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
skew_normal_cdf.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
return_type< T_y, T_loc,
+T_scale, T_shape >::type 
stan::math::skew_normal_cdf (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_shape &alpha)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/skew__normal__cdf_8hpp_source.html b/doc/api/html/skew__normal__cdf_8hpp_source.html new file mode 100644 index 00000000000..2c734d7ee1e --- /dev/null +++ b/doc/api/html/skew__normal__cdf_8hpp_source.html @@ -0,0 +1,278 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/skew_normal_cdf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
skew_normal_cdf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_SKEW_NORMAL_CDF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_SKEW_NORMAL_CDF_HPP
+
3 
+
4 #include <boost/random/variate_generator.hpp>
+
5 #include <boost/math/distributions.hpp>
+ + + + + + + + + + + + +
18 #include <cmath>
+
19 
+
20 namespace stan {
+
21 
+
22  namespace math {
+
23 
+
24  template <typename T_y, typename T_loc, typename T_scale, typename T_shape>
+
25  typename return_type<T_y, T_loc, T_scale, T_shape>::type
+
26  skew_normal_cdf(const T_y& y, const T_loc& mu, const T_scale& sigma,
+
27  const T_shape& alpha) {
+
28  static const char* function("stan::math::skew_normal_cdf");
+
29  typedef typename stan::partials_return_type<T_y, T_loc, T_scale,
+
30  T_shape>::type
+
31  T_partials_return;
+
32 
+ + + + +
37  using stan::math::owens_t;
+ +
39 
+
40  T_partials_return cdf(1.0);
+
41 
+
42  // check if any vectors are zero length
+
43  if (!(stan::length(y)
+
44  && stan::length(mu)
+
45  && stan::length(sigma)
+
46  && stan::length(alpha)))
+
47  return cdf;
+
48 
+
49  check_not_nan(function, "Random variable", y);
+
50  check_finite(function, "Location parameter", mu);
+
51  check_not_nan(function, "Scale parameter", sigma);
+
52  check_positive(function, "Scale parameter", sigma);
+
53  check_finite(function, "Shape parameter", alpha);
+
54  check_not_nan(function, "Shape parameter", alpha);
+
55  check_consistent_sizes(function,
+
56  "Random variable", y,
+
57  "Location parameter", mu,
+
58  "Scale parameter", sigma,
+
59  "Shape paramter", alpha);
+
60 
+ +
62  operands_and_partials(y, mu, sigma, alpha);
+
63 
+
64  using stan::math::SQRT_2;
+
65  using stan::math::pi;
+
66  using std::exp;
+
67 
+
68  VectorView<const T_y> y_vec(y);
+
69  VectorView<const T_loc> mu_vec(mu);
+
70  VectorView<const T_scale> sigma_vec(sigma);
+
71  VectorView<const T_shape> alpha_vec(alpha);
+
72  size_t N = max_size(y, mu, sigma, alpha);
+
73  const double SQRT_TWO_OVER_PI = std::sqrt(2.0 / stan::math::pi());
+
74 
+
75  for (size_t n = 0; n < N; n++) {
+
76  const T_partials_return y_dbl = value_of(y_vec[n]);
+
77  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
78  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
79  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
80  const T_partials_return alpha_dbl_sq = alpha_dbl * alpha_dbl;
+
81  const T_partials_return diff = (y_dbl - mu_dbl) / sigma_dbl;
+
82  const T_partials_return diff_sq = diff * diff;
+
83  const T_partials_return scaled_diff = diff / SQRT_2;
+
84  const T_partials_return scaled_diff_sq = diff_sq * 0.5;
+
85  const T_partials_return cdf_ = 0.5 * erfc(-scaled_diff) - 2
+
86  * owens_t(diff, alpha_dbl);
+
87 
+
88  // cdf
+
89  cdf *= cdf_;
+
90 
+
91  // gradients
+
92  const T_partials_return deriv_erfc = SQRT_TWO_OVER_PI * 0.5
+
93  * exp(-scaled_diff_sq)
+
94  / sigma_dbl;
+
95  const T_partials_return deriv_owens = erf(alpha_dbl * scaled_diff)
+
96  * exp(-scaled_diff_sq) / SQRT_TWO_OVER_PI / (-2.0 * pi()) / sigma_dbl;
+
97  const T_partials_return rep_deriv = (-2.0 * deriv_owens + deriv_erfc)
+
98  / cdf_;
+
99 
+ +
101  operands_and_partials.d_x1[n] += rep_deriv;
+ +
103  operands_and_partials.d_x2[n] -= rep_deriv;
+ +
105  operands_and_partials.d_x3[n] -= rep_deriv * diff;
+ +
107  operands_and_partials.d_x4[n] += -2.0 * exp(-0.5 * diff_sq
+
108  * (1.0 + alpha_dbl_sq))
+
109  / ((1 + alpha_dbl_sq) * 2.0 * pi()) / cdf_;
+
110  }
+
111 
+ +
113  for (size_t n = 0; n < stan::length(y); ++n)
+
114  operands_and_partials.d_x1[n] *= cdf;
+
115  }
+ +
117  for (size_t n = 0; n < stan::length(mu); ++n)
+
118  operands_and_partials.d_x2[n] *= cdf;
+
119  }
+ +
121  for (size_t n = 0; n < stan::length(sigma); ++n)
+
122  operands_and_partials.d_x3[n] *= cdf;
+
123  }
+ +
125  for (size_t n = 0; n < stan::length(alpha); ++n)
+
126  operands_and_partials.d_x4[n] *= cdf;
+
127  }
+
128 
+
129  return operands_and_partials.to_var(cdf, y, mu, sigma, alpha);
+
130  }
+
131  }
+
132 }
+
133 #endif
+
134 
+ +
return_type< T_y, T_loc, T_scale, T_shape >::type skew_normal_cdf(const T_y &y, const T_loc &mu, const T_scale &sigma, const T_shape &alpha)
+
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
fvar< T > erf(const fvar< T > &x)
Definition: erf.hpp:14
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ +
fvar< T > owens_t(const fvar< T > &x1, const fvar< T > &x2)
Definition: owens_t.hpp:14
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
const double SQRT_2
The value of the square root of 2, .
Definition: constants.hpp:21
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
VectorView< T_partials_return, is_vector< T4 >::value, is_constant_struct< T4 >::value > d_x4
+
A variable implementation that stores operands and derivatives with respect to the variable...
+
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ + +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
fvar< T > erfc(const fvar< T > &x)
Definition: erfc.hpp:14
+
double pi()
Return the value of pi.
Definition: constants.hpp:86
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/skew__normal__cdf__log_8hpp.html b/doc/api/html/skew__normal__cdf__log_8hpp.html new file mode 100644 index 00000000000..2bee01f73a3 --- /dev/null +++ b/doc/api/html/skew__normal__cdf__log_8hpp.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/skew_normal_cdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
skew_normal_cdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
return_type< T_y, T_loc,
+T_scale, T_shape >::type 
stan::math::skew_normal_cdf_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_shape &alpha)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/skew__normal__cdf__log_8hpp_source.html b/doc/api/html/skew__normal__cdf__log_8hpp_source.html new file mode 100644 index 00000000000..4780f73d007 --- /dev/null +++ b/doc/api/html/skew__normal__cdf__log_8hpp_source.html @@ -0,0 +1,263 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/skew_normal_cdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
skew_normal_cdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_SKEW_NORMAL_CDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_SKEW_NORMAL_CDF_LOG_HPP
+
3 
+
4 #include <boost/random/variate_generator.hpp>
+
5 #include <boost/math/distributions.hpp>
+ + + + + + + + + + + + +
18 #include <cmath>
+
19 
+
20 namespace stan {
+
21 
+
22  namespace math {
+
23 
+
24  template <typename T_y, typename T_loc, typename T_scale, typename T_shape>
+
25  typename return_type<T_y, T_loc, T_scale, T_shape>::type
+
26  skew_normal_cdf_log(const T_y& y, const T_loc& mu, const T_scale& sigma,
+
27  const T_shape& alpha) {
+
28  static const char* function("stan::math::skew_normal_cdf_log");
+
29  typedef typename stan::partials_return_type<T_y, T_loc, T_scale,
+
30  T_shape>::type
+
31  T_partials_return;
+
32 
+ + + + + +
38  using stan::math::owens_t;
+
39 
+
40  T_partials_return cdf_log(0.0);
+
41 
+
42  // check if any vectors are zero length
+
43  if (!(stan::length(y)
+
44  && stan::length(mu)
+
45  && stan::length(sigma)
+
46  && stan::length(alpha)))
+
47  return cdf_log;
+
48 
+
49  check_not_nan(function, "Random variable", y);
+
50  check_finite(function, "Location parameter", mu);
+
51  check_not_nan(function, "Scale parameter", sigma);
+
52  check_positive(function, "Scale parameter", sigma);
+
53  check_finite(function, "Shape parameter", alpha);
+
54  check_not_nan(function, "Shape parameter", alpha);
+
55  check_consistent_sizes(function,
+
56  "Random variable", y,
+
57  "Location parameter", mu,
+
58  "Scale parameter", sigma,
+
59  "Shape paramter", alpha);
+
60 
+
61 
+ +
63  operands_and_partials(y, mu, sigma, alpha);
+
64 
+
65  using stan::math::SQRT_2;
+
66  using stan::math::pi;
+
67  using std::log;
+
68  using std::exp;
+
69 
+
70  VectorView<const T_y> y_vec(y);
+
71  VectorView<const T_loc> mu_vec(mu);
+
72  VectorView<const T_scale> sigma_vec(sigma);
+
73  VectorView<const T_shape> alpha_vec(alpha);
+
74  size_t N = max_size(y, mu, sigma, alpha);
+
75  const double SQRT_TWO_OVER_PI = std::sqrt(2.0 / stan::math::pi());
+
76 
+
77  for (size_t n = 0; n < N; n++) {
+
78  const T_partials_return y_dbl = value_of(y_vec[n]);
+
79  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
80  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
81  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
82  const T_partials_return alpha_dbl_sq = alpha_dbl * alpha_dbl;
+
83  const T_partials_return diff = (y_dbl - mu_dbl) / sigma_dbl;
+
84  const T_partials_return diff_sq = diff * diff;
+
85  const T_partials_return scaled_diff = diff / SQRT_2;
+
86  const T_partials_return scaled_diff_sq = diff_sq * 0.5;
+
87  const T_partials_return cdf_log_ = 0.5 * erfc(-scaled_diff) - 2
+
88  * owens_t(diff, alpha_dbl);
+
89 
+
90  // cdf_log
+
91  cdf_log += log(cdf_log_);
+
92 
+
93  // gradients
+
94  const T_partials_return deriv_erfc = SQRT_TWO_OVER_PI * 0.5
+
95  * exp(-scaled_diff_sq) / sigma_dbl;
+
96  const T_partials_return deriv_owens = erf(alpha_dbl * scaled_diff)
+
97  * exp(-scaled_diff_sq) / SQRT_TWO_OVER_PI / (-2.0 * pi()) / sigma_dbl;
+
98  const T_partials_return rep_deriv = (-2.0 * deriv_owens + deriv_erfc)
+
99  / cdf_log_;
+
100 
+ +
102  operands_and_partials.d_x1[n] += rep_deriv;
+ +
104  operands_and_partials.d_x2[n] -= rep_deriv;
+ +
106  operands_and_partials.d_x3[n] -= rep_deriv * diff;
+ +
108  operands_and_partials.d_x4[n] += -2.0 * exp(-0.5 * diff_sq
+
109  * (1.0 + alpha_dbl_sq))
+
110  / ((1 + alpha_dbl_sq) * 2.0 * pi()) / cdf_log_;
+
111  }
+
112 
+
113  return operands_and_partials.to_var(cdf_log, y, mu, sigma, alpha);
+
114  }
+
115  }
+
116 }
+
117 #endif
+
118 
+ +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
fvar< T > erf(const fvar< T > &x)
Definition: erf.hpp:14
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ +
fvar< T > owens_t(const fvar< T > &x1, const fvar< T > &x2)
Definition: owens_t.hpp:14
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
const double SQRT_2
The value of the square root of 2, .
Definition: constants.hpp:21
+ +
return_type< T_y, T_loc, T_scale, T_shape >::type skew_normal_cdf_log(const T_y &y, const T_loc &mu, const T_scale &sigma, const T_shape &alpha)
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
VectorView< T_partials_return, is_vector< T4 >::value, is_constant_struct< T4 >::value > d_x4
+
A variable implementation that stores operands and derivatives with respect to the variable...
+
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ + +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
fvar< T > erfc(const fvar< T > &x)
Definition: erfc.hpp:14
+
double pi()
Return the value of pi.
Definition: constants.hpp:86
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/skew__normal__log_8hpp.html b/doc/api/html/skew__normal__log_8hpp.html new file mode 100644 index 00000000000..3dbae64a9da --- /dev/null +++ b/doc/api/html/skew__normal__log_8hpp.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/skew_normal_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
skew_normal_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_loc , typename T_scale , typename T_shape >
return_type< T_y, T_loc,
+T_scale, T_shape >::type 
stan::math::skew_normal_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_shape &alpha)
 
template<typename T_y , typename T_loc , typename T_scale , typename T_shape >
return_type< T_y, T_loc,
+T_scale, T_shape >::type 
stan::math::skew_normal_log (const T_y &y, const T_loc &mu, const T_scale &sigma, const T_shape &alpha)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/skew__normal__log_8hpp_source.html b/doc/api/html/skew__normal__log_8hpp_source.html new file mode 100644 index 00000000000..d2b660e2706 --- /dev/null +++ b/doc/api/html/skew__normal__log_8hpp_source.html @@ -0,0 +1,299 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/skew_normal_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
skew_normal_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_SKEW_NORMAL_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_SKEW_NORMAL_LOG_HPP
+
3 
+
4 #include <boost/random/variate_generator.hpp>
+
5 #include <boost/math/distributions.hpp>
+ + + + + + + + + + + + +
18 #include <cmath>
+
19 
+
20 namespace stan {
+
21 
+
22  namespace math {
+
23 
+
24  template <bool propto,
+
25  typename T_y, typename T_loc, typename T_scale, typename T_shape>
+
26  typename return_type<T_y, T_loc, T_scale, T_shape>::type
+
27  skew_normal_log(const T_y& y, const T_loc& mu, const T_scale& sigma,
+
28  const T_shape& alpha) {
+
29  static const char* function("stan::math::skew_normal_log");
+
30  typedef typename stan::partials_return_type<T_y, T_loc,
+
31  T_scale, T_shape>::type
+
32  T_partials_return;
+
33 
+
34  using std::log;
+ + + + + + + +
42  using std::exp;
+
43 
+
44  // check if any vectors are zero length
+
45  if (!(stan::length(y)
+
46  && stan::length(mu)
+
47  && stan::length(sigma)
+
48  && stan::length(alpha)))
+
49  return 0.0;
+
50 
+
51  // set up return value accumulator
+
52  T_partials_return logp(0.0);
+
53 
+
54  // validate args (here done over var, which should be OK)
+
55  check_not_nan(function, "Random variable", y);
+
56  check_finite(function, "Location parameter", mu);
+
57  check_finite(function, "Shape parameter", alpha);
+
58  check_positive(function, "Scale parameter", sigma);
+
59  check_consistent_sizes(function,
+
60  "Random variable", y,
+
61  "Location parameter", mu,
+
62  "Scale parameter", sigma,
+
63  "Shape paramter", alpha);
+
64 
+
65  // check if no variables are involved and prop-to
+ +
67  return 0.0;
+
68 
+
69  // set up template expressions wrapping scalars into vector views
+ +
71  operands_and_partials(y, mu, sigma, alpha);
+
72 
+
73  using boost::math::erfc;
+
74  using boost::math::erf;
+
75  using std::log;
+
76 
+
77  VectorView<const T_y> y_vec(y);
+
78  VectorView<const T_loc> mu_vec(mu);
+
79  VectorView<const T_scale> sigma_vec(sigma);
+
80  VectorView<const T_shape> alpha_vec(alpha);
+
81  size_t N = max_size(y, mu, sigma, alpha);
+
82 
+ + +
85  T_partials_return, T_scale> log_sigma(length(sigma));
+
86  for (size_t i = 0; i < length(sigma); i++) {
+
87  inv_sigma[i] = 1.0 / value_of(sigma_vec[i]);
+ +
89  log_sigma[i] = log(value_of(sigma_vec[i]));
+
90  }
+
91 
+
92  for (size_t n = 0; n < N; n++) {
+
93  // pull out values of arguments
+
94  const T_partials_return y_dbl = value_of(y_vec[n]);
+
95  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
96  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
97  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
98 
+
99  // reusable subexpression values
+
100  const T_partials_return y_minus_mu_over_sigma
+
101  = (y_dbl - mu_dbl) * inv_sigma[n];
+
102  const double pi_dbl = stan::math::pi();
+
103 
+
104  // log probability
+ +
106  logp -= 0.5 * log(2.0 * pi_dbl);
+ +
108  logp -= log(sigma_dbl);
+ +
110  logp -= y_minus_mu_over_sigma * y_minus_mu_over_sigma / 2.0;
+ +
112  logp += log(erfc(-alpha_dbl * y_minus_mu_over_sigma
+
113  / std::sqrt(2.0)));
+
114 
+
115  // gradients
+
116  T_partials_return deriv_logerf
+
117  = 2.0 / std::sqrt(pi_dbl)
+
118  * exp(-alpha_dbl * y_minus_mu_over_sigma / std::sqrt(2.0)
+
119  * alpha_dbl * y_minus_mu_over_sigma / std::sqrt(2.0))
+
120  / (1 + erf(alpha_dbl * y_minus_mu_over_sigma
+
121  / std::sqrt(2.0)));
+ +
123  operands_and_partials.d_x1[n]
+
124  += -y_minus_mu_over_sigma / sigma_dbl
+
125  + deriv_logerf * alpha_dbl / (sigma_dbl * std::sqrt(2.0));
+ +
127  operands_and_partials.d_x2[n]
+
128  += y_minus_mu_over_sigma / sigma_dbl
+
129  + deriv_logerf * -alpha_dbl / (sigma_dbl * std::sqrt(2.0));
+ +
131  operands_and_partials.d_x3[n]
+
132  += -1.0 / sigma_dbl
+
133  + y_minus_mu_over_sigma * y_minus_mu_over_sigma / sigma_dbl
+
134  - deriv_logerf * y_minus_mu_over_sigma * alpha_dbl
+
135  / (sigma_dbl * std::sqrt(2.0));
+ +
137  operands_and_partials.d_x4[n]
+
138  += deriv_logerf * y_minus_mu_over_sigma / std::sqrt(2.0);
+
139  }
+
140  return operands_and_partials.to_var(logp, y, mu, sigma, alpha);
+
141  }
+
142 
+
143  template <typename T_y, typename T_loc, typename T_scale, typename T_shape>
+
144  inline
+ +
146  skew_normal_log(const T_y& y, const T_loc& mu, const T_scale& sigma,
+
147  const T_shape& alpha) {
+
148  return skew_normal_log<false>(y, mu, sigma, alpha);
+
149  }
+
150  }
+
151 }
+
152 #endif
+
153 
+ +
return_type< T_y, T_loc, T_scale, T_shape >::type skew_normal_log(const T_y &y, const T_loc &mu, const T_scale &sigma, const T_shape &alpha)
+
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
fvar< T > erf(const fvar< T > &x)
Definition: erf.hpp:14
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
VectorView< T_partials_return, is_vector< T4 >::value, is_constant_struct< T4 >::value > d_x4
+
A variable implementation that stores operands and derivatives with respect to the variable...
+
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ + +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
fvar< T > erfc(const fvar< T > &x)
Definition: erfc.hpp:14
+
double pi()
Return the value of pi.
Definition: constants.hpp:86
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/skew__normal__rng_8hpp.html b/doc/api/html/skew__normal__rng_8hpp.html new file mode 100644 index 00000000000..de752881be9 --- /dev/null +++ b/doc/api/html/skew__normal__rng_8hpp.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/skew_normal_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
skew_normal_rng.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
double stan::math::skew_normal_rng (const double mu, const double sigma, const double alpha, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/skew__normal__rng_8hpp_source.html b/doc/api/html/skew__normal__rng_8hpp_source.html new file mode 100644 index 00000000000..506901fe77c --- /dev/null +++ b/doc/api/html/skew__normal__rng_8hpp_source.html @@ -0,0 +1,168 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/skew_normal_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
skew_normal_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_SKEW_NORMAL_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_SKEW_NORMAL_RNG_HPP
+
3 
+
4 #include <boost/random/variate_generator.hpp>
+
5 #include <boost/math/distributions.hpp>
+ + + + + + + + + + + +
17 
+
18 namespace stan {
+
19 
+
20  namespace math {
+
21 
+
22  template <class RNG>
+
23  inline double
+
24  skew_normal_rng(const double mu,
+
25  const double sigma,
+
26  const double alpha,
+
27  RNG& rng) {
+
28  boost::math::skew_normal_distribution<> dist(mu, sigma, alpha);
+
29 
+
30  static const char* function("stan::math::skew_normal_rng");
+
31 
+ + +
34 
+
35  check_finite(function, "Location parameter", mu);
+
36  check_finite(function, "Shape parameter", alpha);
+
37  check_positive(function, "Scale parameter", sigma);
+
38 
+
39  return quantile(dist, stan::math::uniform_rng(0.0, 1.0, rng));
+
40  }
+
41  }
+
42 }
+
43 #endif
+
44 
+ + +
double skew_normal_rng(const double mu, const double sigma, const double alpha, RNG &rng)
+ + +
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+ + +
double uniform_rng(const double alpha, const double beta, RNG &rng)
Definition: uniform_rng.hpp:22
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + + + +
double dist(const std::vector< double > &x, const std::vector< double > &y)
Definition: dist.hpp:11
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/sort_8hpp.html b/doc/api/html/sort_8hpp.html new file mode 100644 index 00000000000..d977abf780d --- /dev/null +++ b/doc/api/html/sort_8hpp.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/sort.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
sort.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <vector>
+#include <algorithm>
+#include <functional>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + + + + + +

+Functions

template<typename T >
std::vector< T > stan::math::sort_asc (std::vector< T > xs)
 Return the specified standard vector in ascending order. More...
 
template<typename T >
std::vector< T > stan::math::sort_desc (std::vector< T > xs)
 Return the specified standard vector in descending order. More...
 
template<typename T , int R, int C>
Eigen::Matrix< T, R, C > stan::math::sort_asc (Eigen::Matrix< T, R, C > xs)
 Return the specified eigen vector in ascending order. More...
 
template<typename T , int R, int C>
Eigen::Matrix< T, R, C > stan::math::sort_desc (Eigen::Matrix< T, R, C > xs)
 Return the specified eigen vector in descending order. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/sort_8hpp_source.html b/doc/api/html/sort_8hpp_source.html new file mode 100644 index 00000000000..d67b3fcdb91 --- /dev/null +++ b/doc/api/html/sort_8hpp_source.html @@ -0,0 +1,150 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/sort.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
sort.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_SORT_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_SORT_HPP
+
3 
+ +
5 #include <vector>
+
6 #include <algorithm> // std::sort
+
7 #include <functional> // std::greater
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
19  template <typename T>
+
20  inline typename std::vector<T> sort_asc(std::vector<T> xs) {
+
21  std::sort(xs.begin(), xs.end());
+
22  return xs;
+
23  }
+
24 
+
32  template <typename T>
+
33  inline typename std::vector<T> sort_desc(std::vector<T> xs) {
+
34  std::sort(xs.begin(), xs.end(), std::greater<T>());
+
35  return xs;
+
36  }
+
37 
+
45  template <typename T, int R, int C>
+
46  inline typename Eigen::Matrix<T, R, C> sort_asc(Eigen::Matrix<T, R, C> xs) {
+
47  std::sort(xs.data(), xs.data()+xs.size());
+
48  return xs;
+
49  }
+
50 
+
58  template <typename T, int R, int C>
+
59  inline typename Eigen::Matrix<T, R, C>
+
60  sort_desc(Eigen::Matrix<T, R, C> xs) {
+
61  std::sort(xs.data(), xs.data()+xs.size(), std::greater<T>());
+
62  return xs;
+
63  }
+
64 
+
65  }
+
66 }
+
67 #endif
+
std::vector< fvar< T > > sort_desc(std::vector< fvar< T > > xs)
Definition: sort_desc.hpp:17
+ +
std::vector< fvar< T > > sort_asc(std::vector< fvar< T > > xs)
Definition: sort_asc.hpp:17
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/sort__indices_8hpp.html b/doc/api/html/sort__indices_8hpp.html new file mode 100644 index 00000000000..482e8988cd2 --- /dev/null +++ b/doc/api/html/sort__indices_8hpp.html @@ -0,0 +1,142 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/sort_indices.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
sort_indices.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/meta/index_type.hpp>
+#include <stan/math/prim/arr/meta/index_type.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+

Variable Documentation

+ +
+
+ + + + +
const C& xs_
+
+ +

Definition at line 25 of file sort_indices.hpp.

+ +
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/sort__indices_8hpp_source.html b/doc/api/html/sort__indices_8hpp_source.html new file mode 100644 index 00000000000..8422728a9ad --- /dev/null +++ b/doc/api/html/sort__indices_8hpp_source.html @@ -0,0 +1,162 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/sort_indices.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
sort_indices.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_SORT_INDICES_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_SORT_INDICES_HPP
+
3 
+ + + +
7 #include <algorithm> // std::sort
+
8 #include <iostream>
+
9 #include <vector>
+
10 
+
11 namespace stan {
+
12 
+
13  namespace math {
+
14 
+
22  namespace {
+
23  template <bool ascending, typename C>
+
24  class index_comparator {
+
25  const C& xs_;
+
26 
+
27  public:
+
34  explicit index_comparator(const C& xs) : xs_(xs) { }
+
35 
+
44  bool operator()(int i, int j) const {
+
45  if (ascending)
+
46  return xs_[i-1] < xs_[j-1];
+
47  else
+
48  return xs_[i-1] > xs_[j-1];
+
49  }
+
50  };
+
51 
+
52 
+
63  template <bool ascending, typename C>
+
64  std::vector<int> sort_indices(const C& xs) {
+
65  typedef typename index_type<C>::type idx_t;
+
66  idx_t size = xs.size();
+
67  std::vector<int> idxs;
+
68  idxs.resize(size);
+
69  for (idx_t i = 0; i < size; ++i)
+
70  idxs[i] = i + 1;
+
71  index_comparator<ascending, C> comparator(xs);
+
72  std::sort(idxs.begin(), idxs.end(), comparator);
+
73  return idxs;
+
74  }
+
75 
+
76  }
+
77 
+
78  }
+
79 }
+
80 #endif
+ + + +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
const C & xs_
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/sort__indices__asc_8hpp.html b/doc/api/html/sort__indices__asc_8hpp.html new file mode 100644 index 00000000000..99676be6f2c --- /dev/null +++ b/doc/api/html/sort__indices__asc_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/sort_indices_asc.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
sort_indices_asc.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/meta/index_type.hpp>
+#include <stan/math/prim/mat/fun/sort_indices.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename C >
std::vector< int > stan::math::sort_indices_asc (const C &xs)
 Return a sorted copy of the argument container in ascending order. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/sort__indices__asc_8hpp_source.html b/doc/api/html/sort__indices__asc_8hpp_source.html new file mode 100644 index 00000000000..f384d1a69fe --- /dev/null +++ b/doc/api/html/sort__indices__asc_8hpp_source.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/sort_indices_asc.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
sort_indices_asc.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_SORT_INDICES_ASC_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_SORT_INDICES_ASC_HPP
+
3 
+ + + +
7 #include <algorithm> // std::sort
+
8 #include <iostream>
+
9 #include <vector>
+
10 
+
11 namespace stan {
+
12 
+
13  namespace math {
+
14 
+
22  template <typename C>
+
23  std::vector<int> sort_indices_asc(const C& xs) {
+
24  return sort_indices<true>(xs);
+
25  }
+
26 
+
27  }
+
28 }
+
29 #endif
+ +
std::vector< int > sort_indices_asc(const C &xs)
Return a sorted copy of the argument container in ascending order.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/sort__indices__desc_8hpp.html b/doc/api/html/sort__indices__desc_8hpp.html new file mode 100644 index 00000000000..39cb46f2926 --- /dev/null +++ b/doc/api/html/sort__indices__desc_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/sort_indices_desc.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
sort_indices_desc.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/meta/index_type.hpp>
+#include <stan/math/prim/mat/fun/sort_indices.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename C >
std::vector< int > stan::math::sort_indices_desc (const C &xs)
 Return a sorted copy of the argument container in ascending order. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/sort__indices__desc_8hpp_source.html b/doc/api/html/sort__indices__desc_8hpp_source.html new file mode 100644 index 00000000000..b5ea67b706e --- /dev/null +++ b/doc/api/html/sort__indices__desc_8hpp_source.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/sort_indices_desc.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
sort_indices_desc.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_SORT_INDICES_DESC_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_SORT_INDICES_DESC_HPP
+
3 
+ + + +
7 #include <algorithm> // std::sort
+
8 #include <iostream>
+
9 #include <vector>
+
10 
+
11 namespace stan {
+
12 
+
13  namespace math {
+
14 
+
22  template <typename C>
+
23  std::vector<int> sort_indices_desc(const C& xs) {
+
24  return sort_indices<false>(xs);
+
25  }
+
26 
+
27 
+
28  }
+
29 }
+
30 #endif
+ + + +
std::vector< int > sort_indices_desc(const C &xs)
Return a sorted copy of the argument container in ascending order.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/stack__alloc_8hpp.html b/doc/api/html/stack__alloc_8hpp.html new file mode 100644 index 00000000000..762d851ca8a --- /dev/null +++ b/doc/api/html/stack__alloc_8hpp.html @@ -0,0 +1,143 @@ + + + + + + +Stan Math Library: stan/math/memory/stack_alloc.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stack_alloc.hpp File Reference
+
+
+
#include <stdint.h>
+#include <stan/math/prim/scal/meta/likely.hpp>
+#include <cstdlib>
+#include <cstddef>
+#include <sstream>
+#include <stdexcept>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  stan::math::stack_alloc
 An instance of this class provides a memory pool through which blocks of raw memory may be allocated and then collected simultaneously. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
bool stan::math::is_aligned (T *ptr, unsigned int bytes_aligned)
 Return true if the specified pointer is aligned on the number of bytes. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/stack__alloc_8hpp_source.html b/doc/api/html/stack__alloc_8hpp_source.html new file mode 100644 index 00000000000..666547c3fa1 --- /dev/null +++ b/doc/api/html/stack__alloc_8hpp_source.html @@ -0,0 +1,292 @@ + + + + + + +Stan Math Library: stan/math/memory/stack_alloc.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stack_alloc.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_MEMORY_STACK_ALLOC_HPP
+
2 #define STAN_MATH_MEMORY_STACK_ALLOC_HPP
+
3 
+
4 // TODO(Bob): <cstddef> replaces this ifdef in C++11, until then this
+
5 // is best we can do to get safe pointer casts to uints.
+
6 #if defined(_MSC_VER)
+
7  #include <msinttypes.h> // Microsoft Visual Studio lacks full stdint.h
+
8 #else
+
9  #include <stdint.h>
+
10 #endif
+ +
12 #include <cstdlib>
+
13 #include <cstddef>
+
14 #include <sstream>
+
15 #include <stdexcept>
+
16 #include <vector>
+
17 
+
18 namespace stan {
+
19 
+
20  namespace math {
+
21 
+
33  template <typename T>
+
34  bool is_aligned(T* ptr, unsigned int bytes_aligned) {
+
35  return (reinterpret_cast<uintptr_t>(ptr) % bytes_aligned) == 0U;
+
36  }
+
37 
+
38 
+
39  namespace {
+
40  const size_t DEFAULT_INITIAL_NBYTES = 1 << 16; // 64KB
+
41 
+
42 
+
43  // FIXME: enforce alignment
+
44  // big fun to inline, but only called twice
+
45  inline char* eight_byte_aligned_malloc(size_t size) {
+
46  char* ptr = static_cast<char*>(malloc(size));
+
47  if (!ptr) return ptr; // malloc failed to alloc
+
48  if (!is_aligned(ptr, 8U)) {
+
49  std::stringstream s;
+
50  s << "invalid alignment to 8 bytes, ptr="
+
51  << reinterpret_cast<uintptr_t>(ptr)
+
52  << std::endl;
+
53  throw std::runtime_error(s.str());
+
54  }
+
55  return ptr;
+
56  }
+
57  }
+
58 
+
78  class stack_alloc {
+
79  private:
+
80  std::vector<char*> blocks_; // storage for blocks,
+
81  // may be bigger than cur_block_
+
82  std::vector<size_t> sizes_; // could store initial & shift for others
+
83  size_t cur_block_; // index into blocks_ for next alloc
+
84  char* cur_block_end_; // ptr to cur_block_ptr_ + sizes_[cur_block_]
+
85  char* next_loc_; // ptr to next available spot in cur
+
86  // block
+
87  // next three for keeping track of nested allocations on top of stack:
+
88  std::vector<size_t> nested_cur_blocks_;
+
89  std::vector<char*> nested_next_locs_;
+
90  std::vector<char*> nested_cur_block_ends_;
+
91 
+
92 
+
101  char* move_to_next_block(size_t len) {
+
102  char* result;
+
103  ++cur_block_;
+
104  // Find the next block (if any) containing at least len bytes.
+
105  while ((cur_block_ < blocks_.size()) && (sizes_[cur_block_] < len))
+
106  ++cur_block_;
+
107  // Allocate a new block if necessary.
+
108  if (unlikely(cur_block_ >= blocks_.size())) {
+
109  // New block should be max(2*size of last block, len) bytes.
+
110  size_t newsize = sizes_.back() * 2;
+
111  if (newsize < len)
+
112  newsize = len;
+
113  blocks_.push_back(eight_byte_aligned_malloc(newsize));
+
114  if (!blocks_.back())
+
115  throw std::bad_alloc();
+
116  sizes_.push_back(newsize);
+
117  }
+
118  result = blocks_[cur_block_];
+
119  // Get the object's state back in order.
+
120  next_loc_ = result + len;
+
121  cur_block_end_ = result + sizes_[cur_block_];
+
122  return result;
+
123  }
+
124 
+
125  public:
+
135  explicit stack_alloc(size_t initial_nbytes = DEFAULT_INITIAL_NBYTES) :
+
136  blocks_(1, eight_byte_aligned_malloc(initial_nbytes)),
+
137  sizes_(1, initial_nbytes),
+
138  cur_block_(0),
+
139  cur_block_end_(blocks_[0] + initial_nbytes),
+
140  next_loc_(blocks_[0]) {
+
141  if (!blocks_[0])
+
142  throw std::bad_alloc(); // no msg allowed in bad_alloc ctor
+
143  }
+
144 
+ +
152  // free ALL blocks
+
153  for (size_t i = 0; i < blocks_.size(); ++i)
+
154  if (blocks_[i])
+
155  free(blocks_[i]);
+
156  }
+
157 
+
170  inline void* alloc(size_t len) {
+
171  // Typically, just return and increment the next location.
+
172  char* result = next_loc_;
+
173  next_loc_ += len;
+
174  // Occasionally, we have to switch blocks.
+
175  if (unlikely(next_loc_ >= cur_block_end_))
+
176  result = move_to_next_block(len);
+
177  return reinterpret_cast<void*>(result);
+
178  }
+
179 
+
188  template <typename T>
+
189  inline
+
190  T* alloc_array(size_t n) {
+
191  return static_cast<T*>(alloc(n * sizeof(T)));
+
192  }
+
193 
+
194 
+
201  inline void recover_all() {
+
202  cur_block_ = 0;
+
203  next_loc_ = blocks_[0];
+
204  cur_block_end_ = next_loc_ + sizes_[0];
+
205  }
+
206 
+
211  inline void start_nested() {
+
212  nested_cur_blocks_.push_back(cur_block_);
+
213  nested_next_locs_.push_back(next_loc_);
+
214  nested_cur_block_ends_.push_back(cur_block_end_);
+
215  }
+
216 
+
220  inline void recover_nested() {
+
221  if (unlikely(nested_cur_blocks_.empty()))
+
222  recover_all();
+
223 
+
224  cur_block_ = nested_cur_blocks_.back();
+
225  nested_cur_blocks_.pop_back();
+
226 
+
227  next_loc_ = nested_next_locs_.back();
+
228  nested_next_locs_.pop_back();
+
229 
+
230  cur_block_end_ = nested_cur_block_ends_.back();
+
231  nested_cur_block_ends_.pop_back();
+
232  }
+
233 
+
239  inline void free_all() {
+
240  // frees all BUT the first (index 0) block
+
241  for (size_t i = 1; i < blocks_.size(); ++i)
+
242  if (blocks_[i])
+
243  free(blocks_[i]);
+
244  sizes_.resize(1);
+
245  blocks_.resize(1);
+
246  recover_all();
+
247  }
+
248 
+
259  size_t bytes_allocated() {
+
260  size_t sum = 0;
+
261  for (size_t i = 0; i <= cur_block_; ++i) {
+
262  sum += sizes_[i];
+
263  }
+
264  return sum;
+
265  }
+
266  };
+
267 
+
268  }
+
269 }
+
270 #endif
+
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20
+
~stack_alloc()
Destroy this memory allocator.
+
void recover_nested()
recover memory back to the last start_nested call.
+
void free_all()
Free all memory used by the stack allocator other than the initial block allocation back to the syste...
+
void recover_all()
Recover all the memory used by the stack allocator.
+
#define unlikely(x)
Definition: likely.hpp:9
+
size_t bytes_allocated()
Return number of bytes allocated to this instance by the heap.
+ +
T * alloc_array(size_t n)
Allocate an array on the arena of the specified size to hold values of the specified template paramet...
+
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
void start_nested()
Store current positions before doing nested operation so can recover back to start.
+
bool is_aligned(T *ptr, unsigned int bytes_aligned)
Return true if the specified pointer is aligned on the number of bytes.
Definition: stack_alloc.hpp:34
+
stack_alloc(size_t initial_nbytes=DEFAULT_INITIAL_NBYTES)
Construct a resizable stack allocator initially holding the specified number of bytes.
+
An instance of this class provides a memory pool through which blocks of raw memory may be allocated ...
Definition: stack_alloc.hpp:78
+
void * alloc(size_t len)
Return a newly allocated block of memory of the appropriate size managed by the stack allocator...
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/stan_8dox.html b/doc/api/html/stan_8dox.html new file mode 100644 index 00000000000..cf8a4131c84 --- /dev/null +++ b/doc/api/html/stan_8dox.html @@ -0,0 +1,113 @@ + + + + + + +Stan Math Library: doxygen/stan.dox File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
doxygen/stan.dox File Reference
+
+
+ + + + + +

+Namespaces

 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/stanlogo-main.png b/doc/api/html/stanlogo-main.png new file mode 100644 index 00000000000..8aed8c729d0 Binary files /dev/null and b/doc/api/html/stanlogo-main.png differ diff --git a/doc/api/html/start__nested_8hpp.html b/doc/api/html/start__nested_8hpp.html new file mode 100644 index 00000000000..aacf8b9926c --- /dev/null +++ b/doc/api/html/start__nested_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/rev/core/start_nested.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
start_nested.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

static void stan::math::start_nested ()
 Record the current position so that recover_memory_nested() can find it. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/start__nested_8hpp_source.html b/doc/api/html/start__nested_8hpp_source.html new file mode 100644 index 00000000000..604913dad98 --- /dev/null +++ b/doc/api/html/start__nested_8hpp_source.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/rev/core/start_nested.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
start_nested.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_START_NESTED_HPP
+
2 #define STAN_MATH_REV_CORE_START_NESTED_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
13  static inline void start_nested() {
+ +
15  .push_back(ChainableStack::var_stack_.size());
+ + + + + +
21  }
+
22 
+
23  }
+
24 }
+
25 #endif
+ +
static std::vector< ChainableAllocT * > var_alloc_stack_
+
static std::vector< ChainableT * > var_nochain_stack_
+
static std::vector< size_t > nested_var_nochain_stack_sizes_
+
static std::vector< size_t > nested_var_stack_sizes_
+
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
void start_nested()
Store current positions before doing nested operation so can recover back to start.
+ +
static std::vector< ChainableT * > var_stack_
+
static void start_nested()
Record the current position so that recover_memory_nested() can find it.
+
static std::vector< size_t > nested_var_alloc_stack_starts_
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/std__isinf_8hpp.html b/doc/api/html/std__isinf_8hpp.html new file mode 100644 index 00000000000..74390143ee1 --- /dev/null +++ b/doc/api/html/std__isinf_8hpp.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: stan/math/rev/core/std_isinf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
std_isinf.hpp File Reference
+
+
+
#include <stan/math/rev/core/var.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + +

+Namespaces

 std
 
+ + + + +

+Functions

int std::isinf (const stan::math::var &a)
 Checks if the given number is infinite. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/std__isinf_8hpp_source.html b/doc/api/html/std__isinf_8hpp_source.html new file mode 100644 index 00000000000..36c77641b05 --- /dev/null +++ b/doc/api/html/std__isinf_8hpp_source.html @@ -0,0 +1,126 @@ + + + + + + +Stan Math Library: stan/math/rev/core/std_isinf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
std_isinf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_STD_ISINF_HPP
+
2 #define STAN_MATH_REV_CORE_STD_ISINF_HPP
+
3 
+ +
5 #include <cmath>
+
6 
+
7 namespace std {
+
8 
+
18  inline int isinf(const stan::math::var& a) {
+
19  return isinf(a.val());
+
20  }
+
21 
+
22 }
+
23 #endif
+
int isinf(const stan::math::var &a)
Checks if the given number is infinite.
Definition: std_isinf.hpp:18
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+ +
double val() const
Return the value of this variable.
Definition: var.hpp:234
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/std__isnan_8hpp.html b/doc/api/html/std__isnan_8hpp.html new file mode 100644 index 00000000000..066722eb406 --- /dev/null +++ b/doc/api/html/std__isnan_8hpp.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: stan/math/rev/core/std_isnan.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
std_isnan.hpp File Reference
+
+
+
#include <stan/math/rev/core/var.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + +

+Namespaces

 std
 
+ + + + +

+Functions

int std::isnan (const stan::math::var &a)
 Checks if the given number is NaN. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/std__isnan_8hpp_source.html b/doc/api/html/std__isnan_8hpp_source.html new file mode 100644 index 00000000000..b40bf7866fe --- /dev/null +++ b/doc/api/html/std__isnan_8hpp_source.html @@ -0,0 +1,126 @@ + + + + + + +Stan Math Library: stan/math/rev/core/std_isnan.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
std_isnan.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_STD_ISNAN_HPP
+
2 #define STAN_MATH_REV_CORE_STD_ISNAN_HPP
+
3 
+ +
5 #include <cmath>
+
6 
+
7 namespace std {
+
8 
+
18  inline int isnan(const stan::math::var& a) {
+
19  return isnan(a.val());
+
20  }
+
21 
+
22 }
+
23 #endif
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
int isnan(const stan::math::var &a)
Checks if the given number is NaN.
Definition: std_isnan.hpp:18
+ +
double val() const
Return the value of this variable.
Definition: var.hpp:234
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/stored__gradient__vari_8hpp.html b/doc/api/html/stored__gradient__vari_8hpp.html new file mode 100644 index 00000000000..8fff05c10bc --- /dev/null +++ b/doc/api/html/stored__gradient__vari_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/rev/core/stored_gradient_vari.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stored_gradient_vari.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + +

+Classes

class  stan::math::stored_gradient_vari
 A var implementation that stores the daughter variable implementation pointers and the partial derivative with respect to the result explicitly in arrays constructed on the auto-diff memory stack. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/stored__gradient__vari_8hpp_source.html b/doc/api/html/stored__gradient__vari_8hpp_source.html new file mode 100644 index 00000000000..d7d2c7ec7d2 --- /dev/null +++ b/doc/api/html/stored__gradient__vari_8hpp_source.html @@ -0,0 +1,154 @@ + + + + + + +Stan Math Library: stan/math/rev/core/stored_gradient_vari.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stored_gradient_vari.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_STORED_GRADIENT_VARI_HPP
+
2 #define STAN_MATH_REV_CORE_STORED_GRADIENT_VARI_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7 
+
8  namespace math {
+
9 
+
18  class stored_gradient_vari : public vari {
+
19  protected:
+
20  size_t size_;
+ +
22  double* partials_;
+
23 
+
24  public:
+
35  stored_gradient_vari(double value,
+
36  size_t size,
+
37  vari** dtrs,
+
38  double* partials)
+
39  : vari(value),
+
40  size_(size),
+
41  dtrs_(dtrs),
+
42  partials_(partials) {
+
43  }
+
44 
+
49  void chain() {
+
50  for (size_t i = 0; i < size_; ++i)
+
51  dtrs_[i]->adj_ += adj_ * partials_[i];
+
52  }
+
53  };
+
54 
+
55  }
+
56 }
+
57 
+
58 #endif
+
stored_gradient_vari(double value, size_t size, vari **dtrs, double *partials)
Construct a stored gradient vari with the specified value, size, daughter varis, and partial derivati...
+ +
The variable implementation base class.
Definition: vari.hpp:28
+
A var implementation that stores the daughter variable implementation pointers and the partial deriva...
+ +
void chain()
Propagate derivatives through this vari with partial derivatives given for the daughter vari by the s...
+ + +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
double adj_
The adjoint of this variable, which is the partial derivative of this variable with respect to the ro...
Definition: vari.hpp:42
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4-members.html b/doc/api/html/struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4-members.html new file mode 100644 index 00000000000..fb21bece3fa --- /dev/null +++ b/doc/api/html/struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4-members.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
Eigen::NumTraits< stan::math::fvar< T > > Member List
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html b/doc/api/html/struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html new file mode 100644 index 00000000000..df3cb920cd5 --- /dev/null +++ b/doc/api/html/struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html @@ -0,0 +1,386 @@ + + + + + + +Stan Math Library: Eigen::NumTraits< stan::math::fvar< T > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
Eigen::NumTraits< stan::math::fvar< T > > Struct Template Reference
+
+
+ +

Numerical traits template override for Eigen for automatic gradient variables. + More...

+ +

#include <Eigen_NumTraits.hpp>

+ + + + + + + + + + + + + + +

+Public Types

enum  {
+  IsInteger = 0, +IsSigned = 1, +IsComplex = 0, +RequireInitialization = 1, +
+  ReadCost = 1, +AddCost = 1, +MulCost = 1, +HasFloatingPoint = 1 +
+ }
 Properties for automatic differentiation variables read by Eigen matrix library. More...
 
typedef stan::math::fvar< T > Real
 Real-valued variables. More...
 
typedef stan::math::fvar< T > NonInteger
 Non-integer valued variables. More...
 
typedef stan::math::fvar< T > Nested
 Nested variables. More...
 
+ + + + + + + + + + + + + +

+Static Public Member Functions

static Real epsilon ()
 Return standard library's epsilon for double-precision floating point, std::numeric_limits<double>::epsilon(). More...
 
static Real dummy_precision ()
 Return dummy precision. More...
 
static Real highest ()
 Return standard library's highest for double-precision floating point, std::numeric_limits<double>max(). More...
 
static Real lowest ()
 Return standard library's lowest for double-precision floating point, &#45;std::numeric_limits<double>max(). More...
 
+

Detailed Description

+

template<typename T>
+struct Eigen::NumTraits< stan::math::fvar< T > >

+ +

Numerical traits template override for Eigen for automatic gradient variables.

+ +

Definition at line 15 of file Eigen_NumTraits.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T >
+ + + + +
typedef stan::math::fvar<T> Eigen::NumTraits< stan::math::fvar< T > >::Nested
+
+ +

Nested variables.

+

Required for numerical traits.

+ +

Definition at line 35 of file Eigen_NumTraits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + +
typedef stan::math::fvar<T> Eigen::NumTraits< stan::math::fvar< T > >::NonInteger
+
+ +

Non-integer valued variables.

+

Required for numerical traits.

+ +

Definition at line 28 of file Eigen_NumTraits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + +
typedef stan::math::fvar<T> Eigen::NumTraits< stan::math::fvar< T > >::Real
+
+ +

Real-valued variables.

+

Required for numerical traits.

+ +

Definition at line 21 of file Eigen_NumTraits.hpp.

+ +
+
+

Member Enumeration Documentation

+ +
+
+
+template<typename T >
+ + + + +
anonymous enum
+
+ +

Properties for automatic differentiation variables read by Eigen matrix library.

+ + + + + + + + + +
Enumerator
IsInteger  +
IsSigned  +
IsComplex  +
RequireInitialization  +
ReadCost  +
AddCost  +
MulCost  +
HasFloatingPoint  +
+ +

Definition at line 78 of file Eigen_NumTraits.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + +
static Real Eigen::NumTraits< stan::math::fvar< T > >::dummy_precision ()
+
+inlinestatic
+
+ +

Return dummy precision.

+ +

Definition at line 50 of file Eigen_NumTraits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + +
static Real Eigen::NumTraits< stan::math::fvar< T > >::epsilon ()
+
+inlinestatic
+
+ +

Return standard library's epsilon for double-precision floating point, std::numeric_limits<double>::epsilon().

+
Returns
Same epsilon as a double.
+ +

Definition at line 43 of file Eigen_NumTraits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + +
static Real Eigen::NumTraits< stan::math::fvar< T > >::highest ()
+
+inlinestatic
+
+ +

Return standard library's highest for double-precision floating point, std::numeric_limits<double>max().

+
Returns
Same highest value as a double.
+ +

Definition at line 60 of file Eigen_NumTraits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + +
static Real Eigen::NumTraits< stan::math::fvar< T > >::lowest ()
+
+inlinestatic
+
+ +

Return standard library's lowest for double-precision floating point, &#45;std::numeric_limits<double>max().

+
Returns
Same lowest value as a double.
+ +

Definition at line 70 of file Eigen_NumTraits.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4-members.html b/doc/api/html/struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4-members.html new file mode 100644 index 00000000000..f54d137a471 --- /dev/null +++ b/doc/api/html/struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4-members.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
Eigen::NumTraits< stan::math::var > Member List
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html b/doc/api/html/struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html new file mode 100644 index 00000000000..d84f39786b4 --- /dev/null +++ b/doc/api/html/struct_eigen_1_1_num_traits_3_01stan_1_1math_1_1var_01_4.html @@ -0,0 +1,370 @@ + + + + + + +Stan Math Library: Eigen::NumTraits< stan::math::var > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
Eigen::NumTraits< stan::math::var > Struct Template Reference
+
+
+ +

Numerical traits template override for Eigen for automatic gradient variables. + More...

+ +

#include <Eigen_NumTraits.hpp>

+ + + + + + + + + + + + + + +

+Public Types

enum  {
+  IsInteger = 0, +IsSigned = 1, +IsComplex = 0, +RequireInitialization = 0, +
+  ReadCost = 1, +AddCost = 1, +MulCost = 1, +HasFloatingPoint = 1 +
+ }
 Properties for automatic differentiation variables read by Eigen matrix library. More...
 
typedef stan::math::var Real
 Real-valued variables. More...
 
typedef stan::math::var NonInteger
 Non-integer valued variables. More...
 
typedef stan::math::var Nested
 Nested variables. More...
 
+ + + + + + + + + + + + + +

+Static Public Member Functions

static Real epsilon ()
 Return standard library's epsilon for double-precision floating point, std::numeric_limits<double>::epsilon(). More...
 
static Real dummy_precision ()
 Return dummy precision. More...
 
static Real highest ()
 Return standard library's highest for double-precision floating point, std::numeric_limits<double>max(). More...
 
static Real lowest ()
 Return standard library's lowest for double-precision floating point, &#45;std::numeric_limits<double>max(). More...
 
+

Detailed Description

+

template<>
+struct Eigen::NumTraits< stan::math::var >

+ +

Numerical traits template override for Eigen for automatic gradient variables.

+ +

Definition at line 15 of file Eigen_NumTraits.hpp.

+

Member Typedef Documentation

+ +
+
+ + + + +
typedef stan::math::var Eigen::NumTraits< stan::math::var >::Nested
+
+ +

Nested variables.

+

Required for numerical traits.

+ +

Definition at line 35 of file Eigen_NumTraits.hpp.

+ +
+
+ +
+
+ + + + +
typedef stan::math::var Eigen::NumTraits< stan::math::var >::NonInteger
+
+ +

Non-integer valued variables.

+

Required for numerical traits.

+ +

Definition at line 28 of file Eigen_NumTraits.hpp.

+ +
+
+ +
+
+ + + + +
typedef stan::math::var Eigen::NumTraits< stan::math::var >::Real
+
+ +

Real-valued variables.

+

Required for numerical traits.

+ +

Definition at line 21 of file Eigen_NumTraits.hpp.

+ +
+
+

Member Enumeration Documentation

+ +
+
+ + + + +
anonymous enum
+
+ +

Properties for automatic differentiation variables read by Eigen matrix library.

+ + + + + + + + + +
Enumerator
IsInteger  +
IsSigned  +
IsComplex  +
RequireInitialization  +
ReadCost  +
AddCost  +
MulCost  +
HasFloatingPoint  +
+ +

Definition at line 78 of file Eigen_NumTraits.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
static Real Eigen::NumTraits< stan::math::var >::dummy_precision ()
+
+inlinestatic
+
+ +

Return dummy precision.

+ +

Definition at line 50 of file Eigen_NumTraits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
static Real Eigen::NumTraits< stan::math::var >::epsilon ()
+
+inlinestatic
+
+ +

Return standard library's epsilon for double-precision floating point, std::numeric_limits<double>::epsilon().

+
Returns
Same epsilon as a double.
+ +

Definition at line 43 of file Eigen_NumTraits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
static Real Eigen::NumTraits< stan::math::var >::highest ()
+
+inlinestatic
+
+ +

Return standard library's highest for double-precision floating point, std::numeric_limits<double>max().

+
Returns
Same highest value as a double.
+ +

Definition at line 60 of file Eigen_NumTraits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
static Real Eigen::NumTraits< stan::math::var >::lowest ()
+
+inlinestatic
+
+ +

Return standard library's lowest for double-precision floating point, &#45;std::numeric_limits<double>max().

+
Returns
Same lowest value as a double.
+ +

Definition at line 70 of file Eigen_NumTraits.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/struct_eigen_1_1internal_1_1general__matrix__matrix__product_3_01_index_00_01stan_1_1math_1_1var1562d71de7db86cb3dfb1784b090bdfc.html b/doc/api/html/struct_eigen_1_1internal_1_1general__matrix__matrix__product_3_01_index_00_01stan_1_1math_1_1var1562d71de7db86cb3dfb1784b090bdfc.html new file mode 100644 index 00000000000..679d1faacf5 --- /dev/null +++ b/doc/api/html/struct_eigen_1_1internal_1_1general__matrix__matrix__product_3_01_index_00_01stan_1_1math_1_1var1562d71de7db86cb3dfb1784b090bdfc.html @@ -0,0 +1,290 @@ + + + + + + +Stan Math Library: Eigen::internal::general_matrix_matrix_product< Index, stan::math::var, LhsStorageOrder, ConjugateLhs, stan::math::var, RhsStorageOrder, ConjugateRhs, ColMajor > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
Eigen::internal::general_matrix_matrix_product< Index, stan::math::var, LhsStorageOrder, ConjugateLhs, stan::math::var, RhsStorageOrder, ConjugateRhs, ColMajor > Struct Template Reference
+
+
+ +

#include <Eigen_NumTraits.hpp>

+ + + + + + + + +

+Public Types

typedef stan::math::var LhsScalar
 
typedef stan::math::var RhsScalar
 
typedef scalar_product_traits
+< LhsScalar, RhsScalar >
+::ReturnType 
ResScalar
 
+ + + +

+Static Public Member Functions

static void run (Index rows, Index cols, Index depth, const LhsScalar *_lhs, Index lhsStride, const RhsScalar *_rhs, Index rhsStride, ResScalar *res, Index resStride, const ResScalar &alpha, level3_blocking< LhsScalar, RhsScalar > &, GemmParallelInfo< Index > *)
 
+

Detailed Description

+

template<typename Index, int LhsStorageOrder, bool ConjugateLhs, int RhsStorageOrder, bool ConjugateRhs>
+struct Eigen::internal::general_matrix_matrix_product< Index, stan::math::var, LhsStorageOrder, ConjugateLhs, stan::math::var, RhsStorageOrder, ConjugateRhs, ColMajor >

+ + +

Definition at line 185 of file Eigen_NumTraits.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename Index , int LhsStorageOrder, bool ConjugateLhs, int RhsStorageOrder, bool ConjugateRhs>
+ + + + +
typedef stan::math::var Eigen::internal::general_matrix_matrix_product< Index, stan::math::var, LhsStorageOrder, ConjugateLhs, stan::math::var, RhsStorageOrder, ConjugateRhs, ColMajor >::LhsScalar
+
+ +

Definition at line 189 of file Eigen_NumTraits.hpp.

+ +
+
+ +
+
+
+template<typename Index , int LhsStorageOrder, bool ConjugateLhs, int RhsStorageOrder, bool ConjugateRhs>
+ + + + +
typedef scalar_product_traits<LhsScalar, RhsScalar>::ReturnType Eigen::internal::general_matrix_matrix_product< Index, stan::math::var, LhsStorageOrder, ConjugateLhs, stan::math::var, RhsStorageOrder, ConjugateRhs, ColMajor >::ResScalar
+
+ +

Definition at line 192 of file Eigen_NumTraits.hpp.

+ +
+
+ +
+
+
+template<typename Index , int LhsStorageOrder, bool ConjugateLhs, int RhsStorageOrder, bool ConjugateRhs>
+ + + + +
typedef stan::math::var Eigen::internal::general_matrix_matrix_product< Index, stan::math::var, LhsStorageOrder, ConjugateLhs, stan::math::var, RhsStorageOrder, ConjugateRhs, ColMajor >::RhsScalar
+
+ +

Definition at line 190 of file Eigen_NumTraits.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename Index , int LhsStorageOrder, bool ConjugateLhs, int RhsStorageOrder, bool ConjugateRhs>
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static void Eigen::internal::general_matrix_matrix_product< Index, stan::math::var, LhsStorageOrder, ConjugateLhs, stan::math::var, RhsStorageOrder, ConjugateRhs, ColMajor >::run (Index rows,
Index cols,
Index depth,
const LhsScalar_lhs,
Index lhsStride,
const RhsScalar_rhs,
Index rhsStride,
ResScalarres,
Index resStride,
const ResScalaralpha,
level3_blocking< LhsScalar, RhsScalar > & ,
GemmParallelInfo< Index > *  
)
+
+inlinestatic
+
+ +

Definition at line 193 of file Eigen_NumTraits.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/struct_eigen_1_1internal_1_1general__matrix__matrix__product_3_01_index_00_01stan_1_1math_1_1varf3b6731d70373160146ce2026a0dac85.html b/doc/api/html/struct_eigen_1_1internal_1_1general__matrix__matrix__product_3_01_index_00_01stan_1_1math_1_1varf3b6731d70373160146ce2026a0dac85.html new file mode 100644 index 00000000000..f381e77b251 --- /dev/null +++ b/doc/api/html/struct_eigen_1_1internal_1_1general__matrix__matrix__product_3_01_index_00_01stan_1_1math_1_1varf3b6731d70373160146ce2026a0dac85.html @@ -0,0 +1,117 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
Eigen::internal::general_matrix_matrix_product< Index, stan::math::var, LhsStorageOrder, ConjugateLhs, stan::math::var, RhsStorageOrder, ConjugateRhs, ColMajor > Member List
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var15f7d538e8be7d782eccb613a7b1e9bd.html b/doc/api/html/struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var15f7d538e8be7d782eccb613a7b1e9bd.html new file mode 100644 index 00000000000..5420a0df9ad --- /dev/null +++ b/doc/api/html/struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var15f7d538e8be7d782eccb613a7b1e9bd.html @@ -0,0 +1,300 @@ + + + + + + +Stan Math Library: Eigen::internal::general_matrix_vector_product< Index, stan::math::var, ColMajor, ConjugateLhs, stan::math::var, ConjugateRhs > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
Eigen::internal::general_matrix_vector_product< Index, stan::math::var, ColMajor, ConjugateLhs, stan::math::var, ConjugateRhs > Struct Template Reference
+
+
+ +

Override matrix-vector and matrix-matrix products to use more efficient implementation. + More...

+ +

#include <Eigen_NumTraits.hpp>

+ + + + + + + + + + +

+Public Types

enum  { LhsStorageOrder = ColMajor + }
 
typedef stan::math::var LhsScalar
 
typedef stan::math::var RhsScalar
 
typedef scalar_product_traits
+< LhsScalar, RhsScalar >
+::ReturnType 
ResScalar
 
+ + + +

+Static Public Member Functions

static EIGEN_DONT_INLINE void run (Index rows, Index cols, const LhsScalar *lhs, Index lhsStride, const RhsScalar *rhs, Index rhsIncr, ResScalar *res, Index resIncr, const ResScalar &alpha)
 
+

Detailed Description

+

template<typename Index, bool ConjugateLhs, bool ConjugateRhs>
+struct Eigen::internal::general_matrix_vector_product< Index, stan::math::var, ColMajor, ConjugateLhs, stan::math::var, ConjugateRhs >

+ +

Override matrix-vector and matrix-matrix products to use more efficient implementation.

+ +

Definition at line 127 of file Eigen_NumTraits.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename Index , bool ConjugateLhs, bool ConjugateRhs>
+ + + + +
typedef stan::math::var Eigen::internal::general_matrix_vector_product< Index, stan::math::var, ColMajor, ConjugateLhs, stan::math::var, ConjugateRhs >::LhsScalar
+
+ +

Definition at line 130 of file Eigen_NumTraits.hpp.

+ +
+
+ +
+
+
+template<typename Index , bool ConjugateLhs, bool ConjugateRhs>
+ + + + +
typedef scalar_product_traits<LhsScalar, RhsScalar>::ReturnType Eigen::internal::general_matrix_vector_product< Index, stan::math::var, ColMajor, ConjugateLhs, stan::math::var, ConjugateRhs >::ResScalar
+
+ +

Definition at line 133 of file Eigen_NumTraits.hpp.

+ +
+
+ +
+
+
+template<typename Index , bool ConjugateLhs, bool ConjugateRhs>
+ + + + +
typedef stan::math::var Eigen::internal::general_matrix_vector_product< Index, stan::math::var, ColMajor, ConjugateLhs, stan::math::var, ConjugateRhs >::RhsScalar
+
+ +

Definition at line 131 of file Eigen_NumTraits.hpp.

+ +
+
+

Member Enumeration Documentation

+ +
+
+
+template<typename Index , bool ConjugateLhs, bool ConjugateRhs>
+ + + + +
anonymous enum
+
+ + +
Enumerator
LhsStorageOrder  +
+ +

Definition at line 134 of file Eigen_NumTraits.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename Index , bool ConjugateLhs, bool ConjugateRhs>
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static EIGEN_DONT_INLINE void Eigen::internal::general_matrix_vector_product< Index, stan::math::var, ColMajor, ConjugateLhs, stan::math::var, ConjugateRhs >::run (Index rows,
Index cols,
const LhsScalarlhs,
Index lhsStride,
const RhsScalarrhs,
Index rhsIncr,
ResScalarres,
Index resIncr,
const ResScalaralpha 
)
+
+inlinestatic
+
+ +

Definition at line 136 of file Eigen_NumTraits.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var71c77536c223327119dda5c0c28735b6.html b/doc/api/html/struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var71c77536c223327119dda5c0c28735b6.html new file mode 100644 index 00000000000..e2223a45b0e --- /dev/null +++ b/doc/api/html/struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var71c77536c223327119dda5c0c28735b6.html @@ -0,0 +1,118 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
Eigen::internal::general_matrix_vector_product< Index, stan::math::var, ColMajor, ConjugateLhs, stan::math::var, ConjugateRhs > Member List
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var9294a9f65d48f87d892ffa4de3f3e667.html b/doc/api/html/struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var9294a9f65d48f87d892ffa4de3f3e667.html new file mode 100644 index 00000000000..1c24cf03f66 --- /dev/null +++ b/doc/api/html/struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1var9294a9f65d48f87d892ffa4de3f3e667.html @@ -0,0 +1,296 @@ + + + + + + +Stan Math Library: Eigen::internal::general_matrix_vector_product< Index, stan::math::var, RowMajor, ConjugateLhs, stan::math::var, ConjugateRhs > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
Eigen::internal::general_matrix_vector_product< Index, stan::math::var, RowMajor, ConjugateLhs, stan::math::var, ConjugateRhs > Struct Template Reference
+
+
+ +

#include <Eigen_NumTraits.hpp>

+ + + + + + + + + + +

+Public Types

enum  { LhsStorageOrder = RowMajor + }
 
typedef stan::math::var LhsScalar
 
typedef stan::math::var RhsScalar
 
typedef scalar_product_traits
+< LhsScalar, RhsScalar >
+::ReturnType 
ResScalar
 
+ + + +

+Static Public Member Functions

static EIGEN_DONT_INLINE void run (Index rows, Index cols, const LhsScalar *lhs, Index lhsStride, const RhsScalar *rhs, Index rhsIncr, ResScalar *res, Index resIncr, const RhsScalar &alpha)
 
+

Detailed Description

+

template<typename Index, bool ConjugateLhs, bool ConjugateRhs>
+struct Eigen::internal::general_matrix_vector_product< Index, stan::math::var, RowMajor, ConjugateLhs, stan::math::var, ConjugateRhs >

+ + +

Definition at line 156 of file Eigen_NumTraits.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename Index , bool ConjugateLhs, bool ConjugateRhs>
+ + + + +
typedef stan::math::var Eigen::internal::general_matrix_vector_product< Index, stan::math::var, RowMajor, ConjugateLhs, stan::math::var, ConjugateRhs >::LhsScalar
+
+ +

Definition at line 159 of file Eigen_NumTraits.hpp.

+ +
+
+ +
+
+
+template<typename Index , bool ConjugateLhs, bool ConjugateRhs>
+ + + + +
typedef scalar_product_traits<LhsScalar, RhsScalar>::ReturnType Eigen::internal::general_matrix_vector_product< Index, stan::math::var, RowMajor, ConjugateLhs, stan::math::var, ConjugateRhs >::ResScalar
+
+ +

Definition at line 162 of file Eigen_NumTraits.hpp.

+ +
+
+ +
+
+
+template<typename Index , bool ConjugateLhs, bool ConjugateRhs>
+ + + + +
typedef stan::math::var Eigen::internal::general_matrix_vector_product< Index, stan::math::var, RowMajor, ConjugateLhs, stan::math::var, ConjugateRhs >::RhsScalar
+
+ +

Definition at line 160 of file Eigen_NumTraits.hpp.

+ +
+
+

Member Enumeration Documentation

+ +
+
+
+template<typename Index , bool ConjugateLhs, bool ConjugateRhs>
+ + + + +
anonymous enum
+
+ + +
Enumerator
LhsStorageOrder  +
+ +

Definition at line 163 of file Eigen_NumTraits.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename Index , bool ConjugateLhs, bool ConjugateRhs>
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static EIGEN_DONT_INLINE void Eigen::internal::general_matrix_vector_product< Index, stan::math::var, RowMajor, ConjugateLhs, stan::math::var, ConjugateRhs >::run (Index rows,
Index cols,
const LhsScalarlhs,
Index lhsStride,
const RhsScalarrhs,
Index rhsIncr,
ResScalarres,
Index resIncr,
const RhsScalaralpha 
)
+
+inlinestatic
+
+ +

Definition at line 166 of file Eigen_NumTraits.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1varbd0af5ef968e29c3656d9f9e82823103.html b/doc/api/html/struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1varbd0af5ef968e29c3656d9f9e82823103.html new file mode 100644 index 00000000000..5279c79026a --- /dev/null +++ b/doc/api/html/struct_eigen_1_1internal_1_1general__matrix__vector__product_3_01_index_00_01stan_1_1math_1_1varbd0af5ef968e29c3656d9f9e82823103.html @@ -0,0 +1,118 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
Eigen::internal::general_matrix_vector_product< Index, stan::math::var, RowMajor, ConjugateLhs, stan::math::var, ConjugateRhs > Member List
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/struct_eigen_1_1internal_1_1scalar__product__traits_3_01double_00_01stan_1_1math_1_1var_01_4-members.html b/doc/api/html/struct_eigen_1_1internal_1_1scalar__product__traits_3_01double_00_01stan_1_1math_1_1var_01_4-members.html new file mode 100644 index 00000000000..4b0abde7e04 --- /dev/null +++ b/doc/api/html/struct_eigen_1_1internal_1_1scalar__product__traits_3_01double_00_01stan_1_1math_1_1var_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
Eigen::internal::scalar_product_traits< double, stan::math::var > Member List
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/struct_eigen_1_1internal_1_1scalar__product__traits_3_01double_00_01stan_1_1math_1_1var_01_4.html b/doc/api/html/struct_eigen_1_1internal_1_1scalar__product__traits_3_01double_00_01stan_1_1math_1_1var_01_4.html new file mode 100644 index 00000000000..4f697cb3043 --- /dev/null +++ b/doc/api/html/struct_eigen_1_1internal_1_1scalar__product__traits_3_01double_00_01stan_1_1math_1_1var_01_4.html @@ -0,0 +1,149 @@ + + + + + + +Stan Math Library: Eigen::internal::scalar_product_traits< double, stan::math::var > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
Eigen::internal::scalar_product_traits< double, stan::math::var > Struct Template Reference
+
+
+ +

Scalar product traits override for Eigen for automatic gradient variables. + More...

+ +

#include <Eigen_NumTraits.hpp>

+ + + + +

+Public Types

typedef stan::math::var ReturnType
 
+

Detailed Description

+

template<>
+struct Eigen::internal::scalar_product_traits< double, stan::math::var >

+ +

Scalar product traits override for Eigen for automatic gradient variables.

+ +

Definition at line 119 of file Eigen_NumTraits.hpp.

+

Member Typedef Documentation

+ +
+
+ + + + +
typedef stan::math::var Eigen::internal::scalar_product_traits< double, stan::math::var >::ReturnType
+
+ +

Definition at line 120 of file Eigen_NumTraits.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/struct_eigen_1_1internal_1_1scalar__product__traits_3_01stan_1_1math_1_1var_00_01double_01_4-members.html b/doc/api/html/struct_eigen_1_1internal_1_1scalar__product__traits_3_01stan_1_1math_1_1var_00_01double_01_4-members.html new file mode 100644 index 00000000000..55cf7e50f96 --- /dev/null +++ b/doc/api/html/struct_eigen_1_1internal_1_1scalar__product__traits_3_01stan_1_1math_1_1var_00_01double_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
Eigen::internal::scalar_product_traits< stan::math::var, double > Member List
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/struct_eigen_1_1internal_1_1scalar__product__traits_3_01stan_1_1math_1_1var_00_01double_01_4.html b/doc/api/html/struct_eigen_1_1internal_1_1scalar__product__traits_3_01stan_1_1math_1_1var_00_01double_01_4.html new file mode 100644 index 00000000000..00e3bebe71a --- /dev/null +++ b/doc/api/html/struct_eigen_1_1internal_1_1scalar__product__traits_3_01stan_1_1math_1_1var_00_01double_01_4.html @@ -0,0 +1,149 @@ + + + + + + +Stan Math Library: Eigen::internal::scalar_product_traits< stan::math::var, double > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
Eigen::internal::scalar_product_traits< stan::math::var, double > Struct Template Reference
+
+
+ +

Scalar product traits override for Eigen for automatic gradient variables. + More...

+ +

#include <Eigen_NumTraits.hpp>

+ + + + +

+Public Types

typedef stan::math::var ReturnType
 
+

Detailed Description

+

template<>
+struct Eigen::internal::scalar_product_traits< stan::math::var, double >

+ +

Scalar product traits override for Eigen for automatic gradient variables.

+ +

Definition at line 110 of file Eigen_NumTraits.hpp.

+

Member Typedef Documentation

+ +
+
+ + + + +
typedef stan::math::var Eigen::internal::scalar_product_traits< stan::math::var, double >::ReturnType
+
+ +

Definition at line 111 of file Eigen_NumTraits.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/struct_eigen_1_1internal_1_1significant__decimals__default__impl_3_01stan_1_1math_1_1fvar_3_01_t_01_4_00_01false_01_4-members.html b/doc/api/html/struct_eigen_1_1internal_1_1significant__decimals__default__impl_3_01stan_1_1math_1_1fvar_3_01_t_01_4_00_01false_01_4-members.html new file mode 100644 index 00000000000..e8b812e676f --- /dev/null +++ b/doc/api/html/struct_eigen_1_1internal_1_1significant__decimals__default__impl_3_01stan_1_1math_1_1fvar_3_01_t_01_4_00_01false_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
Eigen::internal::significant_decimals_default_impl< stan::math::fvar< T >, false > Member List
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/struct_eigen_1_1internal_1_1significant__decimals__default__impl_3_01stan_1_1math_1_1fvar_3_01_t_01_4_00_01false_01_4.html b/doc/api/html/struct_eigen_1_1internal_1_1significant__decimals__default__impl_3_01stan_1_1math_1_1fvar_3_01_t_01_4_00_01false_01_4.html new file mode 100644 index 00000000000..fb4cfd03779 --- /dev/null +++ b/doc/api/html/struct_eigen_1_1internal_1_1significant__decimals__default__impl_3_01stan_1_1math_1_1fvar_3_01_t_01_4_00_01false_01_4.html @@ -0,0 +1,162 @@ + + + + + + +Stan Math Library: Eigen::internal::significant_decimals_default_impl< stan::math::fvar< T >, false > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
Eigen::internal::significant_decimals_default_impl< stan::math::fvar< T >, false > Struct Template Reference
+
+
+ +

Implemented this for printing to stream. + More...

+ +

#include <Eigen_NumTraits.hpp>

+ + + + +

+Static Public Member Functions

static int run ()
 
+

Detailed Description

+

template<typename T>
+struct Eigen::internal::significant_decimals_default_impl< stan::math::fvar< T >, false >

+ +

Implemented this for printing to stream.

+ +

Definition at line 95 of file Eigen_NumTraits.hpp.

+

Member Function Documentation

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + +
static int Eigen::internal::significant_decimals_default_impl< stan::math::fvar< T >, false >::run ()
+
+inlinestatic
+
+ +

Definition at line 96 of file Eigen_NumTraits.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/struct_eigen_1_1internal_1_1significant__decimals__default__impl_3_01stan_1_1math_1_1var_00_01false_01_4-members.html b/doc/api/html/struct_eigen_1_1internal_1_1significant__decimals__default__impl_3_01stan_1_1math_1_1var_00_01false_01_4-members.html new file mode 100644 index 00000000000..72f83a801ed --- /dev/null +++ b/doc/api/html/struct_eigen_1_1internal_1_1significant__decimals__default__impl_3_01stan_1_1math_1_1var_00_01false_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
Eigen::internal::significant_decimals_default_impl< stan::math::var, false > Member List
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/struct_eigen_1_1internal_1_1significant__decimals__default__impl_3_01stan_1_1math_1_1var_00_01false_01_4.html b/doc/api/html/struct_eigen_1_1internal_1_1significant__decimals__default__impl_3_01stan_1_1math_1_1var_00_01false_01_4.html new file mode 100644 index 00000000000..eae59619ae0 --- /dev/null +++ b/doc/api/html/struct_eigen_1_1internal_1_1significant__decimals__default__impl_3_01stan_1_1math_1_1var_00_01false_01_4.html @@ -0,0 +1,160 @@ + + + + + + +Stan Math Library: Eigen::internal::significant_decimals_default_impl< stan::math::var, false > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
Eigen::internal::significant_decimals_default_impl< stan::math::var, false > Struct Template Reference
+
+
+ +

Implemented this for printing to stream. + More...

+ +

#include <Eigen_NumTraits.hpp>

+ + + + +

+Static Public Member Functions

static int run ()
 
+

Detailed Description

+

template<>
+struct Eigen::internal::significant_decimals_default_impl< stan::math::var, false >

+ +

Implemented this for printing to stream.

+ +

Definition at line 95 of file Eigen_NumTraits.hpp.

+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
static int Eigen::internal::significant_decimals_default_impl< stan::math::var, false >::run ()
+
+inlinestatic
+
+ +

Definition at line 96 of file Eigen_NumTraits.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1contains__fvar-members.html b/doc/api/html/structstan_1_1contains__fvar-members.html new file mode 100644 index 00000000000..cffd1dc5b3a --- /dev/null +++ b/doc/api/html/structstan_1_1contains__fvar-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::contains_fvar< T1, T2, T3, T4, T5, T6 > Member List
+
+
+ +

This is the complete list of members for stan::contains_fvar< T1, T2, T3, T4, T5, T6 >, including all inherited members.

+ + +
value enum valuestan::contains_fvar< T1, T2, T3, T4, T5, T6 >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1contains__fvar.html b/doc/api/html/structstan_1_1contains__fvar.html new file mode 100644 index 00000000000..2c8bb61bd0c --- /dev/null +++ b/doc/api/html/structstan_1_1contains__fvar.html @@ -0,0 +1,156 @@ + + + + + + +Stan Math Library: stan::contains_fvar< T1, T2, T3, T4, T5, T6 > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::contains_fvar< T1, T2, T3, T4, T5, T6 > Struct Template Reference
+
+
+ +

Metaprogram to calculate the base scalar return type resulting from promoting all the scalar types of the template parameters. + More...

+ +

#include <contains_fvar.hpp>

+ + + + +

+Public Types

enum  { value + }
 
+

Detailed Description

+

template<typename T1, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double>
+struct stan::contains_fvar< T1, T2, T3, T4, T5, T6 >

+ +

Metaprogram to calculate the base scalar return type resulting from promoting all the scalar types of the template parameters.

+ +

Definition at line 19 of file contains_fvar.hpp.

+

Member Enumeration Documentation

+ +
+
+
+template<typename T1, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double>
+ + + + +
anonymous enum
+
+ + +
Enumerator
value  +
+ +

Definition at line 20 of file contains_fvar.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1contains__nonconstant__struct-members.html b/doc/api/html/structstan_1_1contains__nonconstant__struct-members.html new file mode 100644 index 00000000000..ccd5557c9a4 --- /dev/null +++ b/doc/api/html/structstan_1_1contains__nonconstant__struct-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::contains_nonconstant_struct< T1, T2, T3, T4, T5, T6 > Member List
+
+
+ +

This is the complete list of members for stan::contains_nonconstant_struct< T1, T2, T3, T4, T5, T6 >, including all inherited members.

+ + +
value enum valuestan::contains_nonconstant_struct< T1, T2, T3, T4, T5, T6 >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1contains__nonconstant__struct.html b/doc/api/html/structstan_1_1contains__nonconstant__struct.html new file mode 100644 index 00000000000..198b116b192 --- /dev/null +++ b/doc/api/html/structstan_1_1contains__nonconstant__struct.html @@ -0,0 +1,152 @@ + + + + + + +Stan Math Library: stan::contains_nonconstant_struct< T1, T2, T3, T4, T5, T6 > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::contains_nonconstant_struct< T1, T2, T3, T4, T5, T6 > Struct Template Reference
+
+
+ +

#include <contains_nonconstant_struct.hpp>

+ + + + +

+Public Types

enum  { value + }
 
+

Detailed Description

+

template<typename T1, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double>
+struct stan::contains_nonconstant_struct< T1, T2, T3, T4, T5, T6 >

+ + +

Definition at line 14 of file contains_nonconstant_struct.hpp.

+

Member Enumeration Documentation

+ +
+
+
+template<typename T1 , typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double>
+ + + + +
anonymous enum
+
+ + +
Enumerator
value  +
+ +

Definition at line 15 of file contains_nonconstant_struct.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1contains__vector-members.html b/doc/api/html/structstan_1_1contains__vector-members.html new file mode 100644 index 00000000000..f645dc8329e --- /dev/null +++ b/doc/api/html/structstan_1_1contains__vector-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::contains_vector< T1, T2, T3, T4, T5, T6 > Member List
+
+
+ +

This is the complete list of members for stan::contains_vector< T1, T2, T3, T4, T5, T6 >, including all inherited members.

+ + +
value enum valuestan::contains_vector< T1, T2, T3, T4, T5, T6 >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1contains__vector.html b/doc/api/html/structstan_1_1contains__vector.html new file mode 100644 index 00000000000..ed77cae4d84 --- /dev/null +++ b/doc/api/html/structstan_1_1contains__vector.html @@ -0,0 +1,152 @@ + + + + + + +Stan Math Library: stan::contains_vector< T1, T2, T3, T4, T5, T6 > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::contains_vector< T1, T2, T3, T4, T5, T6 > Struct Template Reference
+
+
+ +

#include <contains_vector.hpp>

+ + + + +

+Public Types

enum  { value + }
 
+

Detailed Description

+

template<typename T1, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double>
+struct stan::contains_vector< T1, T2, T3, T4, T5, T6 >

+ + +

Definition at line 14 of file contains_vector.hpp.

+

Member Enumeration Documentation

+ +
+
+
+template<typename T1 , typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double>
+ + + + +
anonymous enum
+
+ + +
Enumerator
value  +
+ +

Definition at line 15 of file contains_vector.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1error__index-members.html b/doc/api/html/structstan_1_1error__index-members.html new file mode 100644 index 00000000000..d28d988f5f7 --- /dev/null +++ b/doc/api/html/structstan_1_1error__index-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::error_index Member List
+
+
+ +

This is the complete list of members for stan::error_index, including all inherited members.

+ + +
value enum valuestan::error_index
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1error__index.html b/doc/api/html/structstan_1_1error__index.html new file mode 100644 index 00000000000..a6cc5ca01a9 --- /dev/null +++ b/doc/api/html/structstan_1_1error__index.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan::error_index Struct Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::error_index Struct Reference
+
+
+ +

#include <error_index.hpp>

+ + + + +

+Public Types

enum  { value + }
 
+

Detailed Description

+
+

Definition at line 6 of file error_index.hpp.

+

Member Enumeration Documentation

+ +
+
+ + + + +
anonymous enum
+
+ + +
Enumerator
value  +
+ +

Definition at line 7 of file error_index.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__constant-members.html b/doc/api/html/structstan_1_1is__constant-members.html new file mode 100644 index 00000000000..16523f05547 --- /dev/null +++ b/doc/api/html/structstan_1_1is__constant-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::is_constant< T > Member List
+
+
+ +

This is the complete list of members for stan::is_constant< T >, including all inherited members.

+ + +
value enum valuestan::is_constant< T >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__constant.html b/doc/api/html/structstan_1_1is__constant.html new file mode 100644 index 00000000000..cf903840797 --- /dev/null +++ b/doc/api/html/structstan_1_1is__constant.html @@ -0,0 +1,167 @@ + + + + + + +Stan Math Library: stan::is_constant< T > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::is_constant< T > Struct Template Reference
+
+
+ +

Metaprogramming struct to detect whether a given type is constant in the mathematical sense (not the C++ const sense). + More...

+ +

#include <is_constant.hpp>

+ + + + + +

+Public Types

enum  { value = boost::is_convertible<T, double>::value + }
 A boolean constant with equal to true if the type parameter T is a mathematical constant. More...
 
+

Detailed Description

+

template<typename T>
+struct stan::is_constant< T >

+ +

Metaprogramming struct to detect whether a given type is constant in the mathematical sense (not the C++ const sense).

+

If the parameter type is constant, value will be equal to true.

+

The baseline implementation in this abstract base class is to classify a type T as constant if it can be converted (i.e., assigned) to a double. This baseline should be overridden for any type that should be treated as a variable.

+
Template Parameters
+ + +
TType being tested.
+
+
+ +

Definition at line 22 of file is_constant.hpp.

+

Member Enumeration Documentation

+ +
+
+
+template<typename T >
+ + + + +
anonymous enum
+
+ +

A boolean constant with equal to true if the type parameter T is a mathematical constant.

+ + +
Enumerator
value  +
+ +

Definition at line 27 of file is_constant.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__constant__struct-members.html b/doc/api/html/structstan_1_1is__constant__struct-members.html new file mode 100644 index 00000000000..af463de7682 --- /dev/null +++ b/doc/api/html/structstan_1_1is__constant__struct-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::is_constant_struct< T > Member List
+
+
+ +

This is the complete list of members for stan::is_constant_struct< T >, including all inherited members.

+ + +
value enum valuestan::is_constant_struct< T >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__constant__struct.html b/doc/api/html/structstan_1_1is__constant__struct.html new file mode 100644 index 00000000000..e242f244dad --- /dev/null +++ b/doc/api/html/structstan_1_1is__constant__struct.html @@ -0,0 +1,156 @@ + + + + + + +Stan Math Library: stan::is_constant_struct< T > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::is_constant_struct< T > Struct Template Reference
+
+
+ +

Metaprogram to determine if a type has a base scalar type that can be assigned to type double. + More...

+ +

#include <is_constant_struct.hpp>

+ + + + +

+Public Types

enum  { value = is_constant<T>::value + }
 
+

Detailed Description

+

template<typename T>
+struct stan::is_constant_struct< T >

+ +

Metaprogram to determine if a type has a base scalar type that can be assigned to type double.

+ +

Definition at line 16 of file is_constant_struct.hpp.

+

Member Enumeration Documentation

+ +
+
+
+template<typename T >
+ + + + +
anonymous enum
+
+ + +
Enumerator
value  +
+ +

Definition at line 17 of file is_constant_struct.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__constant__struct_3_01_eigen_1_1_block_3_01_t_01_4_01_4-members.html b/doc/api/html/structstan_1_1is__constant__struct_3_01_eigen_1_1_block_3_01_t_01_4_01_4-members.html new file mode 100644 index 00000000000..d94c3f5c6e8 --- /dev/null +++ b/doc/api/html/structstan_1_1is__constant__struct_3_01_eigen_1_1_block_3_01_t_01_4_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::is_constant_struct< Eigen::Block< T > > Member List
+
+
+ +

This is the complete list of members for stan::is_constant_struct< Eigen::Block< T > >, including all inherited members.

+ + +
value enum valuestan::is_constant_struct< Eigen::Block< T > >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__constant__struct_3_01_eigen_1_1_block_3_01_t_01_4_01_4.html b/doc/api/html/structstan_1_1is__constant__struct_3_01_eigen_1_1_block_3_01_t_01_4_01_4.html new file mode 100644 index 00000000000..319ea8e8e75 --- /dev/null +++ b/doc/api/html/structstan_1_1is__constant__struct_3_01_eigen_1_1_block_3_01_t_01_4_01_4.html @@ -0,0 +1,152 @@ + + + + + + +Stan Math Library: stan::is_constant_struct< Eigen::Block< T > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::is_constant_struct< Eigen::Block< T > > Struct Template Reference
+
+
+ +

#include <is_constant_struct.hpp>

+ + + + +

+Public Types

enum  { value = is_constant_struct<T>::value + }
 
+

Detailed Description

+

template<typename T>
+struct stan::is_constant_struct< Eigen::Block< T > >

+ + +

Definition at line 31 of file is_constant_struct.hpp.

+

Member Enumeration Documentation

+ +
+
+
+template<typename T >
+ + + + +
anonymous enum
+
+ + +
Enumerator
value  +
+ +

Definition at line 32 of file is_constant_struct.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__constant__struct_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4-members.html b/doc/api/html/structstan_1_1is__constant__struct_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4-members.html new file mode 100644 index 00000000000..46d6616a745 --- /dev/null +++ b/doc/api/html/structstan_1_1is__constant__struct_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::is_constant_struct< Eigen::Matrix< T, R, C > > Member List
+
+
+ +

This is the complete list of members for stan::is_constant_struct< Eigen::Matrix< T, R, C > >, including all inherited members.

+ + +
value enum valuestan::is_constant_struct< Eigen::Matrix< T, R, C > >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__constant__struct_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4.html b/doc/api/html/structstan_1_1is__constant__struct_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4.html new file mode 100644 index 00000000000..8a45b8e421d --- /dev/null +++ b/doc/api/html/structstan_1_1is__constant__struct_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4.html @@ -0,0 +1,152 @@ + + + + + + +Stan Math Library: stan::is_constant_struct< Eigen::Matrix< T, R, C > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::is_constant_struct< Eigen::Matrix< T, R, C > > Struct Template Reference
+
+
+ +

#include <is_constant_struct.hpp>

+ + + + +

+Public Types

enum  { value = is_constant_struct<T>::value + }
 
+

Detailed Description

+

template<typename T, int R, int C>
+struct stan::is_constant_struct< Eigen::Matrix< T, R, C > >

+ + +

Definition at line 26 of file is_constant_struct.hpp.

+

Member Enumeration Documentation

+ +
+
+
+template<typename T , int R, int C>
+ + + + +
anonymous enum
+
+ + +
Enumerator
value  +
+ +

Definition at line 27 of file is_constant_struct.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__constant__struct_3_01std_1_1vector_3_01_t_01_4_01_4-members.html b/doc/api/html/structstan_1_1is__constant__struct_3_01std_1_1vector_3_01_t_01_4_01_4-members.html new file mode 100644 index 00000000000..bdf7fad0c4c --- /dev/null +++ b/doc/api/html/structstan_1_1is__constant__struct_3_01std_1_1vector_3_01_t_01_4_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::is_constant_struct< std::vector< T > > Member List
+
+
+ +

This is the complete list of members for stan::is_constant_struct< std::vector< T > >, including all inherited members.

+ + +
value enum valuestan::is_constant_struct< std::vector< T > >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__constant__struct_3_01std_1_1vector_3_01_t_01_4_01_4.html b/doc/api/html/structstan_1_1is__constant__struct_3_01std_1_1vector_3_01_t_01_4_01_4.html new file mode 100644 index 00000000000..6b5359c3baf --- /dev/null +++ b/doc/api/html/structstan_1_1is__constant__struct_3_01std_1_1vector_3_01_t_01_4_01_4.html @@ -0,0 +1,152 @@ + + + + + + +Stan Math Library: stan::is_constant_struct< std::vector< T > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::is_constant_struct< std::vector< T > > Struct Template Reference
+
+
+ +

#include <is_constant_struct.hpp>

+ + + + +

+Public Types

enum  { value = is_constant_struct<T>::value + }
 
+

Detailed Description

+

template<typename T>
+struct stan::is_constant_struct< std::vector< T > >

+ + +

Definition at line 21 of file is_constant_struct.hpp.

+

Member Enumeration Documentation

+ +
+
+
+template<typename T >
+ + + + +
anonymous enum
+
+ + +
Enumerator
value  +
+ +

Definition at line 22 of file is_constant_struct.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__fvar-members.html b/doc/api/html/structstan_1_1is__fvar-members.html new file mode 100644 index 00000000000..f06982ea2cb --- /dev/null +++ b/doc/api/html/structstan_1_1is__fvar-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::is_fvar< T > Member List
+
+
+ +

This is the complete list of members for stan::is_fvar< T >, including all inherited members.

+ + +
value enum valuestan::is_fvar< T >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__fvar.html b/doc/api/html/structstan_1_1is__fvar.html new file mode 100644 index 00000000000..e9a9f7d640e --- /dev/null +++ b/doc/api/html/structstan_1_1is__fvar.html @@ -0,0 +1,152 @@ + + + + + + +Stan Math Library: stan::is_fvar< T > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::is_fvar< T > Struct Template Reference
+
+
+ +

#include <is_fvar.hpp>

+ + + + +

+Public Types

enum  { value = false + }
 
+

Detailed Description

+

template<typename T>
+struct stan::is_fvar< T >

+ + +

Definition at line 7 of file is_fvar.hpp.

+

Member Enumeration Documentation

+ +
+
+
+template<typename T >
+ + + + +
anonymous enum
+
+ + +
Enumerator
value  +
+ +

Definition at line 8 of file is_fvar.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__fvar_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4-members.html b/doc/api/html/structstan_1_1is__fvar_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4-members.html new file mode 100644 index 00000000000..83922c5a066 --- /dev/null +++ b/doc/api/html/structstan_1_1is__fvar_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::is_fvar< stan::math::fvar< T > > Member List
+
+
+ +

This is the complete list of members for stan::is_fvar< stan::math::fvar< T > >, including all inherited members.

+ + +
value enum valuestan::is_fvar< stan::math::fvar< T > >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__fvar_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html b/doc/api/html/structstan_1_1is__fvar_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html new file mode 100644 index 00000000000..1e159af0d21 --- /dev/null +++ b/doc/api/html/structstan_1_1is__fvar_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html @@ -0,0 +1,152 @@ + + + + + + +Stan Math Library: stan::is_fvar< stan::math::fvar< T > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::is_fvar< stan::math::fvar< T > > Struct Template Reference
+
+
+ +

#include <is_fvar.hpp>

+ + + + +

+Public Types

enum  { value = true + }
 
+

Detailed Description

+

template<typename T>
+struct stan::is_fvar< stan::math::fvar< T > >

+ + +

Definition at line 10 of file is_fvar.hpp.

+

Member Enumeration Documentation

+ +
+
+
+template<typename T >
+ + + + +
anonymous enum
+
+ + +
Enumerator
value  +
+ +

Definition at line 11 of file is_fvar.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__var-members.html b/doc/api/html/structstan_1_1is__var-members.html new file mode 100644 index 00000000000..a5eeb1a4837 --- /dev/null +++ b/doc/api/html/structstan_1_1is__var-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::is_var< T > Member List
+
+
+ +

This is the complete list of members for stan::is_var< T >, including all inherited members.

+ + +
value enum valuestan::is_var< T >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__var.html b/doc/api/html/structstan_1_1is__var.html new file mode 100644 index 00000000000..66ee3d75850 --- /dev/null +++ b/doc/api/html/structstan_1_1is__var.html @@ -0,0 +1,152 @@ + + + + + + +Stan Math Library: stan::is_var< T > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::is_var< T > Struct Template Reference
+
+
+ +

#include <is_var.hpp>

+ + + + +

+Public Types

enum  { value = false + }
 
+

Detailed Description

+

template<typename T>
+struct stan::is_var< T >

+ + +

Definition at line 7 of file is_var.hpp.

+

Member Enumeration Documentation

+ +
+
+
+template<typename T >
+ + + + +
anonymous enum
+
+ + +
Enumerator
value  +
+ +

Definition at line 8 of file is_var.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__var_3_01stan_1_1math_1_1var_01_4-members.html b/doc/api/html/structstan_1_1is__var_3_01stan_1_1math_1_1var_01_4-members.html new file mode 100644 index 00000000000..80825201ab9 --- /dev/null +++ b/doc/api/html/structstan_1_1is__var_3_01stan_1_1math_1_1var_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::is_var< stan::math::var > Member List
+
+
+ +

This is the complete list of members for stan::is_var< stan::math::var >, including all inherited members.

+ + +
value enum valuestan::is_var< stan::math::var >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__var_3_01stan_1_1math_1_1var_01_4.html b/doc/api/html/structstan_1_1is__var_3_01stan_1_1math_1_1var_01_4.html new file mode 100644 index 00000000000..7275f97c61f --- /dev/null +++ b/doc/api/html/structstan_1_1is__var_3_01stan_1_1math_1_1var_01_4.html @@ -0,0 +1,150 @@ + + + + + + +Stan Math Library: stan::is_var< stan::math::var > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::is_var< stan::math::var > Struct Template Reference
+
+
+ +

#include <is_var.hpp>

+ + + + +

+Public Types

enum  { value = true + }
 
+

Detailed Description

+

template<>
+struct stan::is_var< stan::math::var >

+ + +

Definition at line 10 of file is_var.hpp.

+

Member Enumeration Documentation

+ +
+
+ + + + +
anonymous enum
+
+ + +
Enumerator
value  +
+ +

Definition at line 11 of file is_var.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__var__or__arithmetic-members.html b/doc/api/html/structstan_1_1is__var__or__arithmetic-members.html new file mode 100644 index 00000000000..f6dfd4ea6b2 --- /dev/null +++ b/doc/api/html/structstan_1_1is__var__or__arithmetic-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::is_var_or_arithmetic< T1, T2, T3, T4, T5, T6 > Member List
+
+
+ +

This is the complete list of members for stan::is_var_or_arithmetic< T1, T2, T3, T4, T5, T6 >, including all inherited members.

+ + +
value enum valuestan::is_var_or_arithmetic< T1, T2, T3, T4, T5, T6 >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__var__or__arithmetic.html b/doc/api/html/structstan_1_1is__var__or__arithmetic.html new file mode 100644 index 00000000000..6f915956c9b --- /dev/null +++ b/doc/api/html/structstan_1_1is__var__or__arithmetic.html @@ -0,0 +1,152 @@ + + + + + + +Stan Math Library: stan::is_var_or_arithmetic< T1, T2, T3, T4, T5, T6 > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::is_var_or_arithmetic< T1, T2, T3, T4, T5, T6 > Struct Template Reference
+
+
+ +

#include <is_var_or_arithmetic.hpp>

+ + + + +

+Public Types

enum  { value + }
 
+

Detailed Description

+

template<typename T1, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double>
+struct stan::is_var_or_arithmetic< T1, T2, T3, T4, T5, T6 >

+ + +

Definition at line 16 of file is_var_or_arithmetic.hpp.

+

Member Enumeration Documentation

+ +
+
+
+template<typename T1 , typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double>
+ + + + +
anonymous enum
+
+ + +
Enumerator
value  +
+ +

Definition at line 17 of file is_var_or_arithmetic.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__vector-members.html b/doc/api/html/structstan_1_1is__vector-members.html new file mode 100644 index 00000000000..c1dcde6229d --- /dev/null +++ b/doc/api/html/structstan_1_1is__vector-members.html @@ -0,0 +1,115 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::is_vector< T > Member List
+
+
+ +

This is the complete list of members for stan::is_vector< T >, including all inherited members.

+ + + +
type typedefstan::is_vector< T >
value enum valuestan::is_vector< T >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__vector.html b/doc/api/html/structstan_1_1is__vector.html new file mode 100644 index 00000000000..c3cd348f87b --- /dev/null +++ b/doc/api/html/structstan_1_1is__vector.html @@ -0,0 +1,171 @@ + + + + + + +Stan Math Library: stan::is_vector< T > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::is_vector< T > Struct Template Reference
+
+
+ +

#include <is_vector.hpp>

+ + + + + + +

+Public Types

enum  { value = 0 + }
 
typedef T type
 
+

Detailed Description

+

template<typename T>
+struct stan::is_vector< T >

+ + +

Definition at line 10 of file is_vector.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T>
+ + + + +
typedef T stan::is_vector< T >::type
+
+ +

Definition at line 12 of file is_vector.hpp.

+ +
+
+

Member Enumeration Documentation

+ +
+
+
+template<typename T>
+ + + + +
anonymous enum
+
+ + +
Enumerator
value  +
+ +

Definition at line 11 of file is_vector.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__vector_3_01_eigen_1_1_block_3_01_t_01_4_01_4-members.html b/doc/api/html/structstan_1_1is__vector_3_01_eigen_1_1_block_3_01_t_01_4_01_4-members.html new file mode 100644 index 00000000000..ae6031d9915 --- /dev/null +++ b/doc/api/html/structstan_1_1is__vector_3_01_eigen_1_1_block_3_01_t_01_4_01_4-members.html @@ -0,0 +1,115 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::is_vector< Eigen::Block< T > > Member List
+
+
+ +

This is the complete list of members for stan::is_vector< Eigen::Block< T > >, including all inherited members.

+ + + +
type typedefstan::is_vector< Eigen::Block< T > >
value enum valuestan::is_vector< Eigen::Block< T > >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__vector_3_01_eigen_1_1_block_3_01_t_01_4_01_4.html b/doc/api/html/structstan_1_1is__vector_3_01_eigen_1_1_block_3_01_t_01_4_01_4.html new file mode 100644 index 00000000000..9bbadcd3bed --- /dev/null +++ b/doc/api/html/structstan_1_1is__vector_3_01_eigen_1_1_block_3_01_t_01_4_01_4.html @@ -0,0 +1,171 @@ + + + + + + +Stan Math Library: stan::is_vector< Eigen::Block< T > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::is_vector< Eigen::Block< T > > Struct Template Reference
+
+
+ +

#include <is_vector.hpp>

+ + + + + + +

+Public Types

enum  { value = 1 + }
 
typedef T type
 
+

Detailed Description

+

template<typename T>
+struct stan::is_vector< Eigen::Block< T > >

+ + +

Definition at line 23 of file is_vector.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T >
+ + + + +
typedef T stan::is_vector< Eigen::Block< T > >::type
+
+ +

Definition at line 25 of file is_vector.hpp.

+ +
+
+

Member Enumeration Documentation

+ +
+
+
+template<typename T >
+ + + + +
anonymous enum
+
+ + +
Enumerator
value  +
+ +

Definition at line 24 of file is_vector.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__vector_3_01_eigen_1_1_matrix_3_01_t_00_011_00_01_eigen_1_1_dynamic_01_4_01_4-members.html b/doc/api/html/structstan_1_1is__vector_3_01_eigen_1_1_matrix_3_01_t_00_011_00_01_eigen_1_1_dynamic_01_4_01_4-members.html new file mode 100644 index 00000000000..5c5f0df09a2 --- /dev/null +++ b/doc/api/html/structstan_1_1is__vector_3_01_eigen_1_1_matrix_3_01_t_00_011_00_01_eigen_1_1_dynamic_01_4_01_4-members.html @@ -0,0 +1,115 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::is_vector< Eigen::Matrix< T, 1, Eigen::Dynamic > > Member List
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__vector_3_01_eigen_1_1_matrix_3_01_t_00_011_00_01_eigen_1_1_dynamic_01_4_01_4.html b/doc/api/html/structstan_1_1is__vector_3_01_eigen_1_1_matrix_3_01_t_00_011_00_01_eigen_1_1_dynamic_01_4_01_4.html new file mode 100644 index 00000000000..db533a8527d --- /dev/null +++ b/doc/api/html/structstan_1_1is__vector_3_01_eigen_1_1_matrix_3_01_t_00_011_00_01_eigen_1_1_dynamic_01_4_01_4.html @@ -0,0 +1,171 @@ + + + + + + +Stan Math Library: stan::is_vector< Eigen::Matrix< T, 1, Eigen::Dynamic > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::is_vector< Eigen::Matrix< T, 1, Eigen::Dynamic > > Struct Template Reference
+
+
+ +

#include <is_vector.hpp>

+ + + + + + +

+Public Types

enum  { value = 1 + }
 
typedef T type
 
+

Detailed Description

+

template<typename T>
+struct stan::is_vector< Eigen::Matrix< T, 1, Eigen::Dynamic > >

+ + +

Definition at line 18 of file is_vector.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T >
+ + + + +
typedef T stan::is_vector< Eigen::Matrix< T, 1, Eigen::Dynamic > >::type
+
+ +

Definition at line 20 of file is_vector.hpp.

+ +
+
+

Member Enumeration Documentation

+ +
+
+
+template<typename T >
+ + + + +
anonymous enum
+
+ + +
Enumerator
value  +
+ +

Definition at line 19 of file is_vector.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__vector_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_011_01_4_01_4-members.html b/doc/api/html/structstan_1_1is__vector_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_011_01_4_01_4-members.html new file mode 100644 index 00000000000..5747e34aca4 --- /dev/null +++ b/doc/api/html/structstan_1_1is__vector_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_011_01_4_01_4-members.html @@ -0,0 +1,115 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::is_vector< Eigen::Matrix< T, Eigen::Dynamic, 1 > > Member List
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__vector_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_011_01_4_01_4.html b/doc/api/html/structstan_1_1is__vector_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_011_01_4_01_4.html new file mode 100644 index 00000000000..8699b2a83f2 --- /dev/null +++ b/doc/api/html/structstan_1_1is__vector_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_011_01_4_01_4.html @@ -0,0 +1,171 @@ + + + + + + +Stan Math Library: stan::is_vector< Eigen::Matrix< T, Eigen::Dynamic, 1 > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::is_vector< Eigen::Matrix< T, Eigen::Dynamic, 1 > > Struct Template Reference
+
+
+ +

#include <is_vector.hpp>

+ + + + + + +

+Public Types

enum  { value = 1 + }
 
typedef T type
 
+

Detailed Description

+

template<typename T>
+struct stan::is_vector< Eigen::Matrix< T, Eigen::Dynamic, 1 > >

+ + +

Definition at line 13 of file is_vector.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T >
+ + + + +
typedef T stan::is_vector< Eigen::Matrix< T, Eigen::Dynamic, 1 > >::type
+
+ +

Definition at line 15 of file is_vector.hpp.

+ +
+
+

Member Enumeration Documentation

+ +
+
+
+template<typename T >
+ + + + +
anonymous enum
+
+ + +
Enumerator
value  +
+ +

Definition at line 14 of file is_vector.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__vector_3_01const_01_t_01_4-members.html b/doc/api/html/structstan_1_1is__vector_3_01const_01_t_01_4-members.html new file mode 100644 index 00000000000..d1fd7c516bc --- /dev/null +++ b/doc/api/html/structstan_1_1is__vector_3_01const_01_t_01_4-members.html @@ -0,0 +1,115 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::is_vector< const T > Member List
+
+
+ +

This is the complete list of members for stan::is_vector< const T >, including all inherited members.

+ + + +
type typedefstan::is_vector< const T >
value enum valuestan::is_vector< const T >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__vector_3_01const_01_t_01_4.html b/doc/api/html/structstan_1_1is__vector_3_01const_01_t_01_4.html new file mode 100644 index 00000000000..ff1a5a367cb --- /dev/null +++ b/doc/api/html/structstan_1_1is__vector_3_01const_01_t_01_4.html @@ -0,0 +1,171 @@ + + + + + + +Stan Math Library: stan::is_vector< const T > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::is_vector< const T > Struct Template Reference
+
+
+ +

#include <is_vector.hpp>

+ + + + + + +

+Public Types

enum  { value = is_vector<T>::value + }
 
typedef T type
 
+

Detailed Description

+

template<typename T>
+struct stan::is_vector< const T >

+ + +

Definition at line 13 of file is_vector.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T >
+ + + + +
typedef T stan::is_vector< const T >::type
+
+ +

Definition at line 15 of file is_vector.hpp.

+ +
+
+

Member Enumeration Documentation

+ +
+
+
+template<typename T >
+ + + + +
anonymous enum
+
+ + +
Enumerator
value  +
+ +

Definition at line 14 of file is_vector.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__vector_3_01std_1_1vector_3_01_t_01_4_01_4-members.html b/doc/api/html/structstan_1_1is__vector_3_01std_1_1vector_3_01_t_01_4_01_4-members.html new file mode 100644 index 00000000000..99ab82f5d7b --- /dev/null +++ b/doc/api/html/structstan_1_1is__vector_3_01std_1_1vector_3_01_t_01_4_01_4-members.html @@ -0,0 +1,115 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::is_vector< std::vector< T > > Member List
+
+
+ +

This is the complete list of members for stan::is_vector< std::vector< T > >, including all inherited members.

+ + + +
type typedefstan::is_vector< std::vector< T > >
value enum valuestan::is_vector< std::vector< T > >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__vector_3_01std_1_1vector_3_01_t_01_4_01_4.html b/doc/api/html/structstan_1_1is__vector_3_01std_1_1vector_3_01_t_01_4_01_4.html new file mode 100644 index 00000000000..8ca9583b804 --- /dev/null +++ b/doc/api/html/structstan_1_1is__vector_3_01std_1_1vector_3_01_t_01_4_01_4.html @@ -0,0 +1,171 @@ + + + + + + +Stan Math Library: stan::is_vector< std::vector< T > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::is_vector< std::vector< T > > Struct Template Reference
+
+
+ +

#include <is_vector.hpp>

+ + + + + + +

+Public Types

enum  { value = 1 + }
 
typedef T type
 
+

Detailed Description

+

template<typename T>
+struct stan::is_vector< std::vector< T > >

+ + +

Definition at line 18 of file is_vector.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T >
+ + + + +
typedef T stan::is_vector< std::vector< T > >::type
+
+ +

Definition at line 20 of file is_vector.hpp.

+ +
+
+

Member Enumeration Documentation

+ +
+
+
+template<typename T >
+ + + + +
anonymous enum
+
+ + +
Enumerator
value  +
+ +

Definition at line 19 of file is_vector.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__vector__like-members.html b/doc/api/html/structstan_1_1is__vector__like-members.html new file mode 100644 index 00000000000..7cc201c7a91 --- /dev/null +++ b/doc/api/html/structstan_1_1is__vector__like-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::is_vector_like< T > Member List
+
+
+ +

This is the complete list of members for stan::is_vector_like< T >, including all inherited members.

+ + +
value enum valuestan::is_vector_like< T >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__vector__like.html b/doc/api/html/structstan_1_1is__vector__like.html new file mode 100644 index 00000000000..3fc99fd4749 --- /dev/null +++ b/doc/api/html/structstan_1_1is__vector__like.html @@ -0,0 +1,152 @@ + + + + + + +Stan Math Library: stan::is_vector_like< T > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::is_vector_like< T > Struct Template Reference
+
+
+ +

#include <is_vector_like.hpp>

+ + + + +

+Public Types

enum  { value = stan::is_vector<T>::value + }
 
+

Detailed Description

+

template<typename T>
+struct stan::is_vector_like< T >

+ + +

Definition at line 12 of file is_vector_like.hpp.

+

Member Enumeration Documentation

+ +
+
+
+template<typename T >
+ + + + +
anonymous enum
+
+ + +
Enumerator
value  +
+ +

Definition at line 13 of file is_vector_like.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__vector__like_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4-members.html b/doc/api/html/structstan_1_1is__vector__like_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4-members.html new file mode 100644 index 00000000000..c5a54d7157d --- /dev/null +++ b/doc/api/html/structstan_1_1is__vector__like_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::is_vector_like< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > > Member List
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__vector__like_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4.html b/doc/api/html/structstan_1_1is__vector__like_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4.html new file mode 100644 index 00000000000..17ff2f0f4eb --- /dev/null +++ b/doc/api/html/structstan_1_1is__vector__like_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4.html @@ -0,0 +1,152 @@ + + + + + + +Stan Math Library: stan::is_vector_like< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::is_vector_like< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > > Struct Template Reference
+
+
+ +

#include <is_vector_like.hpp>

+ + + + +

+Public Types

enum  { value = true + }
 
+

Detailed Description

+

template<typename T>
+struct stan::is_vector_like< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > >

+ + +

Definition at line 11 of file is_vector_like.hpp.

+

Member Enumeration Documentation

+ +
+
+
+template<typename T >
+ + + + +
anonymous enum
+
+ + +
Enumerator
value  +
+ +

Definition at line 12 of file is_vector_like.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__vector__like_3_01_t_01_5_01_4-members.html b/doc/api/html/structstan_1_1is__vector__like_3_01_t_01_5_01_4-members.html new file mode 100644 index 00000000000..8592ac8b4d2 --- /dev/null +++ b/doc/api/html/structstan_1_1is__vector__like_3_01_t_01_5_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::is_vector_like< T * > Member List
+
+
+ +

This is the complete list of members for stan::is_vector_like< T * >, including all inherited members.

+ + +
value enum valuestan::is_vector_like< T * >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__vector__like_3_01_t_01_5_01_4.html b/doc/api/html/structstan_1_1is__vector__like_3_01_t_01_5_01_4.html new file mode 100644 index 00000000000..ea7b24ccdf5 --- /dev/null +++ b/doc/api/html/structstan_1_1is__vector__like_3_01_t_01_5_01_4.html @@ -0,0 +1,152 @@ + + + + + + +Stan Math Library: stan::is_vector_like< T * > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::is_vector_like< T * > Struct Template Reference
+
+
+ +

#include <is_vector_like.hpp>

+ + + + +

+Public Types

enum  { value = true + }
 
+

Detailed Description

+

template<typename T>
+struct stan::is_vector_like< T * >

+ + +

Definition at line 16 of file is_vector_like.hpp.

+

Member Enumeration Documentation

+ +
+
+
+template<typename T >
+ + + + +
anonymous enum
+
+ + +
Enumerator
value  +
+ +

Definition at line 17 of file is_vector_like.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__vector__like_3_01const_01_t_01_4-members.html b/doc/api/html/structstan_1_1is__vector__like_3_01const_01_t_01_4-members.html new file mode 100644 index 00000000000..975897d19f6 --- /dev/null +++ b/doc/api/html/structstan_1_1is__vector__like_3_01const_01_t_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::is_vector_like< const T > Member List
+
+
+ +

This is the complete list of members for stan::is_vector_like< const T >, including all inherited members.

+ + +
value enum valuestan::is_vector_like< const T >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1is__vector__like_3_01const_01_t_01_4.html b/doc/api/html/structstan_1_1is__vector__like_3_01const_01_t_01_4.html new file mode 100644 index 00000000000..9a9bcd50a57 --- /dev/null +++ b/doc/api/html/structstan_1_1is__vector__like_3_01const_01_t_01_4.html @@ -0,0 +1,152 @@ + + + + + + +Stan Math Library: stan::is_vector_like< const T > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::is_vector_like< const T > Struct Template Reference
+
+
+ +

#include <is_vector_like.hpp>

+ + + + +

+Public Types

enum  { value = stan::is_vector_like<T>::value + }
 
+

Detailed Description

+

template<typename T>
+struct stan::is_vector_like< const T >

+ + +

Definition at line 21 of file is_vector_like.hpp.

+

Member Enumeration Documentation

+ +
+
+
+template<typename T >
+ + + + +
anonymous enum
+
+ + +
Enumerator
value  +
+ +

Definition at line 22 of file is_vector_like.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1_autodiff_stack_storage-members.html b/doc/api/html/structstan_1_1math_1_1_autodiff_stack_storage-members.html new file mode 100644 index 00000000000..b77bb017c53 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1_autodiff_stack_storage-members.html @@ -0,0 +1,120 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::AutodiffStackStorage< ChainableT, ChainableAllocT > Member List
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1_autodiff_stack_storage.html b/doc/api/html/structstan_1_1math_1_1_autodiff_stack_storage.html new file mode 100644 index 00000000000..a5a2d3fb173 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1_autodiff_stack_storage.html @@ -0,0 +1,312 @@ + + + + + + +Stan Math Library: stan::math::AutodiffStackStorage< ChainableT, ChainableAllocT > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::AutodiffStackStorage< ChainableT, ChainableAllocT > Struct Template Reference
+
+
+ +

#include <autodiffstackstorage.hpp>

+ + + + + + + + + + + + + + + + +

+Static Public Attributes

static std::vector< ChainableT * > var_stack_
 
static std::vector< ChainableT * > var_nochain_stack_
 
static std::vector
+< ChainableAllocT * > 
var_alloc_stack_
 
static stack_alloc memalloc_
 
static std::vector< size_t > nested_var_stack_sizes_
 
static std::vector< size_t > nested_var_nochain_stack_sizes_
 
static std::vector< size_t > nested_var_alloc_stack_starts_
 
+

Detailed Description

+

template<typename ChainableT, typename ChainableAllocT>
+struct stan::math::AutodiffStackStorage< ChainableT, ChainableAllocT >

+ + +

Definition at line 12 of file autodiffstackstorage.hpp.

+

Member Data Documentation

+ +
+
+
+template<typename ChainableT , typename ChainableAllocT >
+ + + + + +
+ + + + +
stack_alloc stan::math::AutodiffStackStorage< ChainableT, ChainableAllocT >::memalloc_
+
+static
+
+ +

Definition at line 16 of file autodiffstackstorage.hpp.

+ +
+
+ +
+
+
+template<typename ChainableT , typename ChainableAllocT >
+ + + + + +
+ + + + +
std::vector< size_t > stan::math::AutodiffStackStorage< ChainableT, ChainableAllocT >::nested_var_alloc_stack_starts_
+
+static
+
+ +

Definition at line 21 of file autodiffstackstorage.hpp.

+ +
+
+ +
+
+
+template<typename ChainableT , typename ChainableAllocT >
+ + + + + +
+ + + + +
std::vector< size_t > stan::math::AutodiffStackStorage< ChainableT, ChainableAllocT >::nested_var_nochain_stack_sizes_
+
+static
+
+ +

Definition at line 20 of file autodiffstackstorage.hpp.

+ +
+
+ +
+
+
+template<typename ChainableT , typename ChainableAllocT >
+ + + + + +
+ + + + +
std::vector< size_t > stan::math::AutodiffStackStorage< ChainableT, ChainableAllocT >::nested_var_stack_sizes_
+
+static
+
+ +

Definition at line 19 of file autodiffstackstorage.hpp.

+ +
+
+ +
+
+
+template<typename ChainableT , typename ChainableAllocT >
+ + + + + +
+ + + + +
std::vector< ChainableAllocT * > stan::math::AutodiffStackStorage< ChainableT, ChainableAllocT >::var_alloc_stack_
+
+static
+
+ +

Definition at line 15 of file autodiffstackstorage.hpp.

+ +
+
+ +
+
+
+template<typename ChainableT , typename ChainableAllocT >
+ + + + + +
+ + + + +
std::vector< ChainableT * > stan::math::AutodiffStackStorage< ChainableT, ChainableAllocT >::var_nochain_stack_
+
+static
+
+ +

Definition at line 14 of file autodiffstackstorage.hpp.

+ +
+
+ +
+
+
+template<typename ChainableT , typename ChainableAllocT >
+ + + + + +
+ + + + +
std::vector< ChainableT * > stan::math::AutodiffStackStorage< ChainableT, ChainableAllocT >::var_stack_
+
+static
+
+ +

Definition at line 13 of file autodiffstackstorage.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1_operands_and_partials-members.html b/doc/api/html/structstan_1_1math_1_1_operands_and_partials-members.html new file mode 100644 index 00000000000..91183d4bd23 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1_operands_and_partials-members.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6 > Member List
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1_operands_and_partials.html b/doc/api/html/structstan_1_1math_1_1_operands_and_partials.html new file mode 100644 index 00000000000..ec7d4771918 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1_operands_and_partials.html @@ -0,0 +1,527 @@ + + + + + + +Stan Math Library: stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6 > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6 > Struct Template Reference
+
+
+ +

A variable implementation that stores operands and derivatives with respect to the variable. + More...

+ +

#include <OperandsAndPartials.hpp>

+ + + + + + +

+Public Types

typedef
+stan::partials_return_type< T1,
+T2, T3, T4, T5, T6 >::type 
T_partials_return
 
typedef stan::return_type< T1,
+T2, T3, T4, T5, T6 >::type 
T_return_type
 
+ + + + + +

+Public Member Functions

 OperandsAndPartials (const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
 
T_return_type to_var (T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
 
+ + + + + + + + + + + + + + + + + + + +

+Public Attributes

size_t nvaris
 
vari ** all_varis
 
T_partials_returnall_partials
 
VectorView< T_partials_return,
+is_vector< T1 >::value,
+is_constant_struct< T1 >
+::value > 
d_x1
 
VectorView< T_partials_return,
+is_vector< T2 >::value,
+is_constant_struct< T2 >
+::value > 
d_x2
 
VectorView< T_partials_return,
+is_vector< T3 >::value,
+is_constant_struct< T3 >
+::value > 
d_x3
 
VectorView< T_partials_return,
+is_vector< T4 >::value,
+is_constant_struct< T4 >
+::value > 
d_x4
 
VectorView< T_partials_return,
+is_vector< T5 >::value,
+is_constant_struct< T5 >
+::value > 
d_x5
 
VectorView< T_partials_return,
+is_vector< T6 >::value,
+is_constant_struct< T6 >
+::value > 
d_x6
 
+ + + +

+Static Public Attributes

static const bool all_constant = is_constant<T_return_type>::value
 
+

Detailed Description

+

template<typename T1 = double, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double>
+struct stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6 >

+ +

A variable implementation that stores operands and derivatives with respect to the variable.

+ +

Definition at line 238 of file OperandsAndPartials.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T1 = double, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double>
+ + + + +
typedef stan::partials_return_type<T1, T2, T3, T4, T5, T6>::type stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6 >::T_partials_return
+
+ +

Definition at line 241 of file OperandsAndPartials.hpp.

+ +
+
+ +
+
+
+template<typename T1 = double, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double>
+ + + + +
typedef stan::return_type<T1, T2, T3, T4, T5, T6>::type stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6 >::T_return_type
+
+ +

Definition at line 244 of file OperandsAndPartials.hpp.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T1 = double, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double>
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6 >::OperandsAndPartials (const T1 & x1 = 0,
const T2 & x2 = 0,
const T3 & x3 = 0,
const T4 & x4 = 0,
const T5 & x5 = 0,
const T6 & x6 = 0 
)
+
+inline
+
+ +

Definition at line 270 of file OperandsAndPartials.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T1 = double, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double>
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
T_return_type stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6 >::to_var (T_partials_return logp,
const T1 & x1 = 0,
const T2 & x2 = 0,
const T3 & x3 = 0,
const T4 & x4 = 0,
const T5 & x5 = 0,
const T6 & x6 = 0 
)
+
+inline
+
+ +

Definition at line 322 of file OperandsAndPartials.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+
+template<typename T1 = double, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double>
+ + + + + +
+ + + + +
const bool stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6 >::all_constant = is_constant<T_return_type>::value
+
+static
+
+ +

Definition at line 246 of file OperandsAndPartials.hpp.

+ +
+
+ +
+
+
+template<typename T1 = double, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double>
+ + + + +
T_partials_return* stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6 >::all_partials
+
+ +

Definition at line 249 of file OperandsAndPartials.hpp.

+ +
+
+ +
+
+
+template<typename T1 = double, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double>
+ + + + +
vari** stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6 >::all_varis
+
+ +

Definition at line 248 of file OperandsAndPartials.hpp.

+ +
+
+ +
+
+
+template<typename T1 = double, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double>
+ + + + +
VectorView<T_partials_return, is_vector<T1>::value, is_constant_struct<T1>::value> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6 >::d_x1
+
+ +

Definition at line 253 of file OperandsAndPartials.hpp.

+ +
+
+ +
+
+
+template<typename T1 = double, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double>
+ + + + +
VectorView<T_partials_return, is_vector<T2>::value, is_constant_struct<T2>::value> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6 >::d_x2
+
+ +

Definition at line 256 of file OperandsAndPartials.hpp.

+ +
+
+ +
+
+
+template<typename T1 = double, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double>
+ + + + +
VectorView<T_partials_return, is_vector<T3>::value, is_constant_struct<T3>::value> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6 >::d_x3
+
+ +

Definition at line 259 of file OperandsAndPartials.hpp.

+ +
+
+ +
+
+
+template<typename T1 = double, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double>
+ + + + +
VectorView<T_partials_return, is_vector<T4>::value, is_constant_struct<T4>::value> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6 >::d_x4
+
+ +

Definition at line 262 of file OperandsAndPartials.hpp.

+ +
+
+ +
+
+
+template<typename T1 = double, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double>
+ + + + +
VectorView<T_partials_return, is_vector<T5>::value, is_constant_struct<T5>::value> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6 >::d_x5
+
+ +

Definition at line 265 of file OperandsAndPartials.hpp.

+ +
+
+ +
+
+
+template<typename T1 = double, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double>
+ + + + +
VectorView<T_partials_return, is_vector<T6>::value, is_constant_struct<T6>::value> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6 >::d_x6
+
+ +

Definition at line 268 of file OperandsAndPartials.hpp.

+ +
+
+ +
+
+
+template<typename T1 = double, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double>
+ + + + +
size_t stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6 >::nvaris
+
+ +

Definition at line 247 of file OperandsAndPartials.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1array__builder-members.html b/doc/api/html/structstan_1_1math_1_1array__builder-members.html new file mode 100644 index 00000000000..54928698ea6 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1array__builder-members.html @@ -0,0 +1,117 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::array_builder< T > Member List
+
+
+ +

This is the complete list of members for stan::math::array_builder< T >, including all inherited members.

+ + + + + +
add(const F &u)stan::math::array_builder< T >inline
array()stan::math::array_builder< T >inline
array_builder()stan::math::array_builder< T >inline
x_stan::math::array_builder< T >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1array__builder.html b/doc/api/html/structstan_1_1math_1_1array__builder.html new file mode 100644 index 00000000000..681e0ec9e79 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1array__builder.html @@ -0,0 +1,248 @@ + + + + + + +Stan Math Library: stan::math::array_builder< T > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::array_builder< T > Struct Template Reference
+
+
+ +

Structure for building up arrays in an expression (rather than in statements) using an argumentchaining add() method and a getter method array() to return the result. + More...

+ +

#include <array_builder.hpp>

+ + + + + + + + + +

+Public Member Functions

 array_builder ()
 
template<typename F >
array_builderadd (const F &u)
 
std::vector< T > array ()
 
+ + + +

+Public Attributes

std::vector< T > x_
 
+

Detailed Description

+

template<typename T>
+struct stan::math::array_builder< T >

+ +

Structure for building up arrays in an expression (rather than in statements) using an argumentchaining add() method and a getter method array() to return the result.

+ +

Definition at line 16 of file array_builder.hpp.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + +
stan::math::array_builder< T >::array_builder ()
+
+inline
+
+ +

Definition at line 18 of file array_builder.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T >
+
+template<typename F >
+ + + + + +
+ + + + + + + + +
array_builder& stan::math::array_builder< T >::add (const F & u)
+
+inline
+
+ +

Definition at line 20 of file array_builder.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + +
std::vector<T> stan::math::array_builder< T >::array ()
+
+inline
+
+ +

Definition at line 26 of file array_builder.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+
+template<typename T >
+ + + + +
std::vector<T> stan::math::array_builder< T >::x_
+
+ +

Definition at line 17 of file array_builder.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1child__type-members.html b/doc/api/html/structstan_1_1math_1_1child__type-members.html new file mode 100644 index 00000000000..073fd35ee93 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1child__type-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::child_type< T > Member List
+
+
+ +

This is the complete list of members for stan::math::child_type< T >, including all inherited members.

+ + +
type typedefstan::math::child_type< T >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1child__type.html b/doc/api/html/structstan_1_1math_1_1child__type.html new file mode 100644 index 00000000000..8ee15c1fa59 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1child__type.html @@ -0,0 +1,158 @@ + + + + + + +Stan Math Library: stan::math::child_type< T > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::child_type< T > Struct Template Reference
+
+
+ +

Primary template class for metaprogram to compute child type of T. + More...

+ +

#include <child_type.hpp>

+ + + + +

+Public Types

typedef double type
 
+

Detailed Description

+

template<typename T>
+struct stan::math::child_type< T >

+ +

Primary template class for metaprogram to compute child type of T.

+

See test/unit/math/meta/child_type_test.cpp for intended usage.

+
Template Parameters
+ + +
Ttype of container.
+
+
+ +

Definition at line 19 of file child_type.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T >
+ + + + +
typedef double stan::math::child_type< T >::type
+
+ +

Definition at line 20 of file child_type.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1child__type_3_01_t__struct_3_01_t__child_01_4_01_4-members.html b/doc/api/html/structstan_1_1math_1_1child__type_3_01_t__struct_3_01_t__child_01_4_01_4-members.html new file mode 100644 index 00000000000..5a197ffa38b --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1child__type_3_01_t__struct_3_01_t__child_01_4_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::child_type< T_struct< T_child > > Member List
+
+
+ +

This is the complete list of members for stan::math::child_type< T_struct< T_child > >, including all inherited members.

+ + +
type typedefstan::math::child_type< T_struct< T_child > >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1child__type_3_01_t__struct_3_01_t__child_01_4_01_4.html b/doc/api/html/structstan_1_1math_1_1child__type_3_01_t__struct_3_01_t__child_01_4_01_4.html new file mode 100644 index 00000000000..f6c3bb502c2 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1child__type_3_01_t__struct_3_01_t__child_01_4_01_4.html @@ -0,0 +1,159 @@ + + + + + + +Stan Math Library: stan::math::child_type< T_struct< T_child > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::child_type< T_struct< T_child > > Struct Template Reference
+
+
+ +

Specialization for template classes / structs. + More...

+ +

#include <child_type.hpp>

+ + + + +

+Public Types

typedef T_child type
 
+

Detailed Description

+

template<template< typename > class T_struct, typename T_child>
+struct stan::math::child_type< T_struct< T_child > >

+ +

Specialization for template classes / structs.

+

See test/unit/math/meta/child_type_test.cpp for intended usage.

+
Template Parameters
+ + + +
T_structtype of parent.
T_childtype of child type.
+
+
+ +

Definition at line 34 of file child_type.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<template< typename > class T_struct, typename T_child >
+ + + + +
typedef T_child stan::math::child_type< T_struct< T_child > >::type
+
+ +

Definition at line 35 of file child_type.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1common__type-members.html b/doc/api/html/structstan_1_1math_1_1common__type-members.html new file mode 100644 index 00000000000..309cb317c2a --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1common__type-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::common_type< T1, T2 > Member List
+
+
+ +

This is the complete list of members for stan::math::common_type< T1, T2 >, including all inherited members.

+ + +
type typedefstan::math::common_type< T1, T2 >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1common__type.html b/doc/api/html/structstan_1_1math_1_1common__type.html new file mode 100644 index 00000000000..ccb99d3bb6b --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1common__type.html @@ -0,0 +1,149 @@ + + + + + + +Stan Math Library: stan::math::common_type< T1, T2 > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::common_type< T1, T2 > Struct Template Reference
+
+
+ +

#include <common_type.hpp>

+ + + + +

+Public Types

typedef
+boost::math::tools::promote_args
+< T1, T2 >::type 
type
 
+

Detailed Description

+

template<typename T1, typename T2>
+struct stan::math::common_type< T1, T2 >

+ + +

Definition at line 13 of file common_type.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T1, typename T2>
+ + + + +
typedef boost::math::tools::promote_args<T1, T2>::type stan::math::common_type< T1, T2 >::type
+
+ +

Definition at line 14 of file common_type.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1common__type_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_eige106a86f1021708b40db478c4e2fef0a7.html b/doc/api/html/structstan_1_1math_1_1common__type_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_eige106a86f1021708b40db478c4e2fef0a7.html new file mode 100644 index 00000000000..ba0ddfd6c1b --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1common__type_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_eige106a86f1021708b40db478c4e2fef0a7.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::common_type< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > > Member List
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1common__type_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_eiged8accfa00e73f240c58ad02ac582ba93.html b/doc/api/html/structstan_1_1math_1_1common__type_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_eiged8accfa00e73f240c58ad02ac582ba93.html new file mode 100644 index 00000000000..12cb7225f20 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1common__type_3_01_eigen_1_1_matrix_3_01_t1_00_01_r_00_01_c_01_4_00_01_eiged8accfa00e73f240c58ad02ac582ba93.html @@ -0,0 +1,149 @@ + + + + + + +Stan Math Library: stan::math::common_type< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::common_type< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > > Struct Template Reference
+
+
+ +

#include <common_type.hpp>

+ + + + +

+Public Types

typedef Eigen::Matrix
+< typename common_type< T1, T2 >
+::type, R, C > 
type
 
+

Detailed Description

+

template<typename T1, typename T2, int R, int C>
+struct stan::math::common_type< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > >

+ + +

Definition at line 23 of file common_type.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T1 , typename T2 , int R, int C>
+ + + + +
typedef Eigen::Matrix<typename common_type<T1, T2>::type, R, C> stan::math::common_type< Eigen::Matrix< T1, R, C >, Eigen::Matrix< T2, R, C > >::type
+
+ +

Definition at line 24 of file common_type.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1common__type_3_01std_1_1vector_3_01_t1_01_4_00_01std_1_1vector_3_01_t2_01_4_01_4-members.html b/doc/api/html/structstan_1_1math_1_1common__type_3_01std_1_1vector_3_01_t1_01_4_00_01std_1_1vector_3_01_t2_01_4_01_4-members.html new file mode 100644 index 00000000000..bca6583486d --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1common__type_3_01std_1_1vector_3_01_t1_01_4_00_01std_1_1vector_3_01_t2_01_4_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::common_type< std::vector< T1 >, std::vector< T2 > > Member List
+
+
+ +

This is the complete list of members for stan::math::common_type< std::vector< T1 >, std::vector< T2 > >, including all inherited members.

+ + +
type typedefstan::math::common_type< std::vector< T1 >, std::vector< T2 > >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1common__type_3_01std_1_1vector_3_01_t1_01_4_00_01std_1_1vector_3_01_t2_01_4_01_4.html b/doc/api/html/structstan_1_1math_1_1common__type_3_01std_1_1vector_3_01_t1_01_4_00_01std_1_1vector_3_01_t2_01_4_01_4.html new file mode 100644 index 00000000000..ffbb3a54892 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1common__type_3_01std_1_1vector_3_01_t1_01_4_00_01std_1_1vector_3_01_t2_01_4_01_4.html @@ -0,0 +1,148 @@ + + + + + + +Stan Math Library: stan::math::common_type< std::vector< T1 >, std::vector< T2 > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::common_type< std::vector< T1 >, std::vector< T2 > > Struct Template Reference
+
+
+ +

#include <common_type.hpp>

+ + + + +

+Public Types

typedef std::vector< typename
+common_type< T1, T2 >::type
type
 
+

Detailed Description

+

template<typename T1, typename T2>
+struct stan::math::common_type< std::vector< T1 >, std::vector< T2 > >

+ + +

Definition at line 18 of file common_type.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T1 , typename T2 >
+ + + + +
typedef std::vector<typename common_type<T1, T2>::type> stan::math::common_type< std::vector< T1 >, std::vector< T2 > >::type
+
+ +

Definition at line 19 of file common_type.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1coupled__ode__observer-members.html b/doc/api/html/structstan_1_1math_1_1coupled__ode__observer-members.html new file mode 100644 index 00000000000..91367497808 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1coupled__ode__observer-members.html @@ -0,0 +1,117 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::coupled_ode_observer Member List
+
+
+ +

This is the complete list of members for stan::math::coupled_ode_observer, including all inherited members.

+ + + + + +
coupled_ode_observer(std::vector< std::vector< double > > &y_coupled)stan::math::coupled_ode_observerinlineexplicit
n_stan::math::coupled_ode_observer
operator()(const std::vector< double > &coupled_state, const double t)stan::math::coupled_ode_observerinline
y_coupled_stan::math::coupled_ode_observer
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1coupled__ode__observer.html b/doc/api/html/structstan_1_1math_1_1coupled__ode__observer.html new file mode 100644 index 00000000000..db16238358d --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1coupled__ode__observer.html @@ -0,0 +1,255 @@ + + + + + + +Stan Math Library: stan::math::coupled_ode_observer Struct Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::coupled_ode_observer Struct Reference
+
+
+ +

Observer for the coupled states. + More...

+ +

#include <coupled_ode_observer.hpp>

+ + + + + + + + +

+Public Member Functions

 coupled_ode_observer (std::vector< std::vector< double > > &y_coupled)
 Construct a coupled ODE observer from the specified coupled vector. More...
 
void operator() (const std::vector< double > &coupled_state, const double t)
 Callback function for Boost's ODE solver to record values. More...
 
+ + + + + +

+Public Attributes

std::vector< std::vector
+< double > > & 
y_coupled_
 
int n_
 
+

Detailed Description

+

Observer for the coupled states.

+

Holds a reference to an externally defined vector of vectors passed in at construction time.

+ +

Definition at line 15 of file coupled_ode_observer.hpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + +
stan::math::coupled_ode_observer::coupled_ode_observer (std::vector< std::vector< double > > & y_coupled)
+
+inlineexplicit
+
+ +

Construct a coupled ODE observer from the specified coupled vector.

+
Parameters
+ + +
y_coupledreference to a vector of vector of doubles.
+
+
+ +

Definition at line 25 of file coupled_ode_observer.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void stan::math::coupled_ode_observer::operator() (const std::vector< double > & coupled_state,
const double t 
)
+
+inline
+
+ +

Callback function for Boost's ODE solver to record values.

+
Parameters
+ + + +
coupled_statesolution at the specified time.
ttime of solution.
+
+
+ +

Definition at line 36 of file coupled_ode_observer.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
int stan::math::coupled_ode_observer::n_
+
+ +

Definition at line 17 of file coupled_ode_observer.hpp.

+ +
+
+ +
+
+ + + + +
std::vector<std::vector<double> >& stan::math::coupled_ode_observer::y_coupled_
+
+ +

Definition at line 16 of file coupled_ode_observer.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1coupled__ode__system.html b/doc/api/html/structstan_1_1math_1_1coupled__ode__system.html new file mode 100644 index 00000000000..24d3617793a --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1coupled__ode__system.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan::math::coupled_ode_system< F, T1, T2 > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::coupled_ode_system< F, T1, T2 > Struct Template Reference
+
+
+ +

Base template class for a coupled ordinary differential equation system, which adds sensitivities to the base system. + More...

+ +

#include <coupled_ode_system.hpp>

+

Detailed Description

+

template<typename F, typename T1, typename T2>
+struct stan::math::coupled_ode_system< F, T1, T2 >

+ +

Base template class for a coupled ordinary differential equation system, which adds sensitivities to the base system.

+

This template class declaration should not be instantiated directly — it is just here to serve as a base for its specializations, some of which are defined in namespace stan::aggrad.

+
Template Parameters
+ + + + +
Fthe functor for the base ode system
T1type of the initial state
T2type of the parameters
+
+
+ +

Definition at line 26 of file coupled_ode_system.hpp.

+

The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4-members.html b/doc/api/html/structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4-members.html new file mode 100644 index 00000000000..167d6278ec0 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4-members.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::coupled_ode_system< F, double, double > Member List
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html b/doc/api/html/structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html new file mode 100644 index 00000000000..afb3e535c94 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01double_01_4.html @@ -0,0 +1,559 @@ + + + + + + +Stan Math Library: stan::math::coupled_ode_system< F, double, double > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::coupled_ode_system< F, double, double > Struct Template Reference
+
+
+ +

The coupled ode system for known initial values and known parameters. + More...

+ +

#include <coupled_ode_system.hpp>

+ + + + + + + + + + + + + + + + + +

+Public Member Functions

 coupled_ode_system (const F &f, const std::vector< double > &y0, const std::vector< double > &theta, const std::vector< double > &x, const std::vector< int > &x_int, std::ostream *msgs)
 Construct the coupled ODE system from the base system function, initial state, parameters, data and a stream for messages. More...
 
void operator() (const std::vector< double > &y, std::vector< double > &dy_dt, double t)
 Calculates the derivative of the coupled ode system with respect to the specified state at the specified time using the system state function. More...
 
int size () const
 Returns the size of the coupled system. More...
 
std::vector< double > initial_state ()
 Returns the initial state of the coupled system, which is identical to the base ODE original state in this implementation because the initial state is known. More...
 
std::vector< std::vector
+< double > > 
decouple_states (const std::vector< std::vector< double > > &y)
 Returns the base portion of the coupled state. More...
 
+ + + + + + + + + + + + + + + + + + + +

+Public Attributes

const F & f_
 
const std::vector< double > & y0_dbl_
 
const std::vector< double > & theta_dbl_
 
const std::vector< double > & x_
 
const std::vector< int > & x_int_
 
const int N_
 
const int M_
 
const int size_
 
std::ostream * msgs_
 
+

Detailed Description

+

template<typename F>
+struct stan::math::coupled_ode_system< F, double, double >

+ +

The coupled ode system for known initial values and known parameters.

+

This coupled system does not add anything to the base system used to construct it, but is here for generality of the integration implementation.

+
Template Parameters
+ + +
Ftype of system function for the base ODE system.
+
+
+ +

Definition at line 41 of file coupled_ode_system.hpp.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename F >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
stan::math::coupled_ode_system< F, double, double >::coupled_ode_system (const F & f,
const std::vector< double > & y0,
const std::vector< double > & theta,
const std::vector< double > & x,
const std::vector< int > & x_int,
std::ostream * msgs 
)
+
+inline
+
+ +

Construct the coupled ODE system from the base system function, initial state, parameters, data and a stream for messages.

+
Parameters
+ + + + + + + +
[in]fbase ode system functor.
[in]y0initial state of the base ode.
[in]thetaparameters of the base ode.
[in]xreal data.
[in]x_intinteger data.
[in,out]msgsprint stream.
+
+
+ +

Definition at line 64 of file coupled_ode_system.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename F >
+ + + + + +
+ + + + + + + + +
std::vector<std::vector<double> > stan::math::coupled_ode_system< F, double, double >::decouple_states (const std::vector< std::vector< double > > & y)
+
+inline
+
+ +

Returns the base portion of the coupled state.

+

In this class's implementation, the coupled system is equivalent to the base system, so this function just returns its input.

+
Parameters
+ + +
ythe vector of the coupled states after solving the ode
+
+
+
Returns
the decoupled states
+ +

Definition at line 144 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + + +
+ + + + + + + +
std::vector<double> stan::math::coupled_ode_system< F, double, double >::initial_state ()
+
+inline
+
+ +

Returns the initial state of the coupled system, which is identical to the base ODE original state in this implementation because the initial state is known.

+

The return value is a vector of length size() where the first N (base ode system size) parameters are the initial conditions of the base ode system and the rest of the initial conditions is 0.

+
Returns
initial state of the coupled system
+ +

Definition at line 126 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::coupled_ode_system< F, double, double >::operator() (const std::vector< double > & y,
std::vector< double > & dy_dt,
double t 
)
+
+inline
+
+ +

Calculates the derivative of the coupled ode system with respect to the specified state at the specified time using the system state function.

+

The derivative vector created is the same length as the length as the state vector.

+
Parameters
+ + + + +
[in]ycurrent state of the coupled ode.
[out]dy_dtpopulated with derivatives of the coupled system evaluated at specified state and time.
[in]ttime.
+
+
+
Exceptions
+ + +
exceptionif the system function does not return a derivative vector of the same size as the state vector.
+
+
+ +

Definition at line 96 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + + +
+ + + + + + + +
int stan::math::coupled_ode_system< F, double, double >::size () const
+
+inline
+
+ +

Returns the size of the coupled system.

+
Returns
size of the coupled system.
+ +

Definition at line 110 of file coupled_ode_system.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+
+template<typename F >
+ + + + +
const F& stan::math::coupled_ode_system< F, double, double >::f_
+
+ +

Definition at line 42 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
const int stan::math::coupled_ode_system< F, double, double >::M_
+
+ +

Definition at line 48 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
std::ostream* stan::math::coupled_ode_system< F, double, double >::msgs_
+
+ +

Definition at line 50 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
const int stan::math::coupled_ode_system< F, double, double >::N_
+
+ +

Definition at line 47 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
const int stan::math::coupled_ode_system< F, double, double >::size_
+
+ +

Definition at line 49 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
const std::vector<double>& stan::math::coupled_ode_system< F, double, double >::theta_dbl_
+
+ +

Definition at line 44 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
const std::vector<double>& stan::math::coupled_ode_system< F, double, double >::x_
+
+ +

Definition at line 45 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
const std::vector<int>& stan::math::coupled_ode_system< F, double, double >::x_int_
+
+ +

Definition at line 46 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
const std::vector<double>& stan::math::coupled_ode_system< F, double, double >::y0_dbl_
+
+ +

Definition at line 43 of file coupled_ode_system.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4-members.html b/doc/api/html/structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4-members.html new file mode 100644 index 00000000000..cf458f3bada --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4-members.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::coupled_ode_system< F, double, stan::math::var > Member List
+
+
+ +

This is the complete list of members for stan::math::coupled_ode_system< F, double, stan::math::var >, including all inherited members.

+ + + + + + + + + + + + + + + + +
coupled_ode_system(const F &f, const std::vector< double > &y0, const std::vector< stan::math::var > &theta, const std::vector< double > &x, const std::vector< int > &x_int, std::ostream *msgs)stan::math::coupled_ode_system< F, double, stan::math::var >inline
decouple_states(const std::vector< std::vector< double > > &y)stan::math::coupled_ode_system< F, double, stan::math::var >inline
f_stan::math::coupled_ode_system< F, double, stan::math::var >
initial_state()stan::math::coupled_ode_system< F, double, stan::math::var >inline
M_stan::math::coupled_ode_system< F, double, stan::math::var >
msgs_stan::math::coupled_ode_system< F, double, stan::math::var >
N_stan::math::coupled_ode_system< F, double, stan::math::var >
operator()(const std::vector< double > &y, std::vector< double > &dy_dt, double t)stan::math::coupled_ode_system< F, double, stan::math::var >inline
size() const stan::math::coupled_ode_system< F, double, stan::math::var >inline
size_stan::math::coupled_ode_system< F, double, stan::math::var >
theta_stan::math::coupled_ode_system< F, double, stan::math::var >
theta_dbl_stan::math::coupled_ode_system< F, double, stan::math::var >
x_stan::math::coupled_ode_system< F, double, stan::math::var >
x_int_stan::math::coupled_ode_system< F, double, stan::math::var >
y0_dbl_stan::math::coupled_ode_system< F, double, stan::math::var >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html b/doc/api/html/structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html new file mode 100644 index 00000000000..fffde560b61 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01double_00_01stan_1_1math_1_1var_01_4.html @@ -0,0 +1,583 @@ + + + + + + +Stan Math Library: stan::math::coupled_ode_system< F, double, stan::math::var > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::coupled_ode_system< F, double, stan::math::var > Struct Template Reference
+
+
+ +

The coupled ODE system for known initial values and unknown parameters. + More...

+ +

#include <coupled_ode_system.hpp>

+ + + + + + + + + + + + + + + + + +

+Public Member Functions

 coupled_ode_system (const F &f, const std::vector< double > &y0, const std::vector< stan::math::var > &theta, const std::vector< double > &x, const std::vector< int > &x_int, std::ostream *msgs)
 Construct a coupled ODE system with the specified base ODE system, base initial state, parameters, data, and a message stream. More...
 
void operator() (const std::vector< double > &y, std::vector< double > &dy_dt, double t)
 Assign the derivative vector with the system derivatives at the specified state and time. More...
 
size_t size () const
 Returns the size of the coupled system. More...
 
std::vector< double > initial_state ()
 Returns the initial state of the coupled system. More...
 
std::vector< std::vector
+< stan::math::var > > 
decouple_states (const std::vector< std::vector< double > > &y)
 Returns the base ODE system state corresponding to the specified coupled system state. More...
 
+ + + + + + + + + + + + + + + + + + + + + +

+Public Attributes

const F & f_
 
const std::vector< double > & y0_dbl_
 
const std::vector
+< stan::math::var > & 
theta_
 
std::vector< double > theta_dbl_
 
const std::vector< double > & x_
 
const std::vector< int > & x_int_
 
const size_t N_
 
const size_t M_
 
const size_t size_
 
std::ostream * msgs_
 
+

Detailed Description

+

template<typename F>
+struct stan::math::coupled_ode_system< F, double, stan::math::var >

+ +

The coupled ODE system for known initial values and unknown parameters.

+

If the base ODE state is size N and there are M parameters, the coupled system has N + N * M states.

+

The first N states correspond to the base system's N states: $ \frac{d x_n}{dt} $

+

The next M states correspond to the sensitivities of the parameters with respect to the first base system equation:

+

+\[ \frac{d x_{N+m}}{dt} = \frac{d}{dt} \frac{\partial x_1}{\partial \theta_m} \] +

+

The final M states correspond to the sensitivities with respect to the second base system equation, etc.

+
Template Parameters
+ + +
Ftype of functor for the base ode system.
+
+
+ +

Definition at line 60 of file coupled_ode_system.hpp.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename F >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
stan::math::coupled_ode_system< F, double, stan::math::var >::coupled_ode_system (const F & f,
const std::vector< double > & y0,
const std::vector< stan::math::var > & theta,
const std::vector< double > & x,
const std::vector< int > & x_int,
std::ostream * msgs 
)
+
+inline
+
+ +

Construct a coupled ODE system with the specified base ODE system, base initial state, parameters, data, and a message stream.

+
Parameters
+ + + + + + + +
[in]fthe base ODE system functor.
[in]y0the initial state of the base ode.
[in]thetaparameters of the base ode.
[in]xreal data.
[in]x_intinteger data.
[in,out]msgsstream to which messages are printed.
+
+
+ +

Definition at line 84 of file coupled_ode_system.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename F >
+ + + + + +
+ + + + + + + + +
std::vector<std::vector<stan::math::var> > stan::math::coupled_ode_system< F, double, stan::math::var >::decouple_states (const std::vector< std::vector< double > > & y)
+
+inline
+
+ +

Returns the base ODE system state corresponding to the specified coupled system state.

+
Parameters
+ + +
ycoupled states after solving the ode
+
+
+ +

Definition at line 213 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + + +
+ + + + + + + +
std::vector<double> stan::math::coupled_ode_system< F, double, stan::math::var >::initial_state ()
+
+inline
+
+ +

Returns the initial state of the coupled system.

+

Because the initial values are known, the initial state of the coupled system is the same as the initial state of the base ODE system.

+

This initial state returned is of size size() where the first N (base ODE system size) parameters are the initial conditions of the base ode system and the rest of the initial condition elements are 0.

+
Returns
the initial condition of the coupled system.
+ +

Definition at line 198 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::coupled_ode_system< F, double, stan::math::var >::operator() (const std::vector< double > & y,
std::vector< double > & dy_dt,
double t 
)
+
+inline
+
+ +

Assign the derivative vector with the system derivatives at the specified state and time.

+

The input state must be of size size(), and the output produced will be of the same size.

+
Parameters
+ + + + +
[in]ystate of the coupled ode system.
[out]dy_dtpopulated with the derivatives of the coupled system at the specified state and time.
[in]ttime.
+
+
+
Exceptions
+ + +
exceptionif the system function does not return the same number of derivatives as the state vector size.
+
+
+ +

Definition at line 118 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + + +
+ + + + + + + +
size_t stan::math::coupled_ode_system< F, double, stan::math::var >::size () const
+
+inline
+
+ +

Returns the size of the coupled system.

+
Returns
size of the coupled system.
+ +

Definition at line 181 of file coupled_ode_system.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+
+template<typename F >
+ + + + +
const F& stan::math::coupled_ode_system< F, double, stan::math::var >::f_
+
+ +

Definition at line 61 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
const size_t stan::math::coupled_ode_system< F, double, stan::math::var >::M_
+
+ +

Definition at line 68 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
std::ostream* stan::math::coupled_ode_system< F, double, stan::math::var >::msgs_
+
+ +

Definition at line 70 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
const size_t stan::math::coupled_ode_system< F, double, stan::math::var >::N_
+
+ +

Definition at line 67 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
const size_t stan::math::coupled_ode_system< F, double, stan::math::var >::size_
+
+ +

Definition at line 69 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
const std::vector<stan::math::var>& stan::math::coupled_ode_system< F, double, stan::math::var >::theta_
+
+ +

Definition at line 63 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
std::vector<double> stan::math::coupled_ode_system< F, double, stan::math::var >::theta_dbl_
+
+ +

Definition at line 64 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
const std::vector<double>& stan::math::coupled_ode_system< F, double, stan::math::var >::x_
+
+ +

Definition at line 65 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
const std::vector<int>& stan::math::coupled_ode_system< F, double, stan::math::var >::x_int_
+
+ +

Definition at line 66 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
const std::vector<double>& stan::math::coupled_ode_system< F, double, stan::math::var >::y0_dbl_
+
+ +

Definition at line 62 of file coupled_ode_system.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4-members.html b/doc/api/html/structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4-members.html new file mode 100644 index 00000000000..9bedcac4d19 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4-members.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::coupled_ode_system< F, stan::math::var, double > Member List
+
+
+ +

This is the complete list of members for stan::math::coupled_ode_system< F, stan::math::var, double >, including all inherited members.

+ + + + + + + + + + + + + + + + +
coupled_ode_system(const F &f, const std::vector< stan::math::var > &y0, const std::vector< double > &theta, const std::vector< double > &x, const std::vector< int > &x_int, std::ostream *msgs)stan::math::coupled_ode_system< F, stan::math::var, double >inline
decouple_states(const std::vector< std::vector< double > > &y)stan::math::coupled_ode_system< F, stan::math::var, double >inline
f_stan::math::coupled_ode_system< F, stan::math::var, double >
initial_state()stan::math::coupled_ode_system< F, stan::math::var, double >inline
M_stan::math::coupled_ode_system< F, stan::math::var, double >
msgs_stan::math::coupled_ode_system< F, stan::math::var, double >
N_stan::math::coupled_ode_system< F, stan::math::var, double >
operator()(const std::vector< double > &y, std::vector< double > &dy_dt, double t)stan::math::coupled_ode_system< F, stan::math::var, double >inline
size() const stan::math::coupled_ode_system< F, stan::math::var, double >inline
size_stan::math::coupled_ode_system< F, stan::math::var, double >
theta_dbl_stan::math::coupled_ode_system< F, stan::math::var, double >
x_stan::math::coupled_ode_system< F, stan::math::var, double >
x_int_stan::math::coupled_ode_system< F, stan::math::var, double >
y0_stan::math::coupled_ode_system< F, stan::math::var, double >
y0_dbl_stan::math::coupled_ode_system< F, stan::math::var, double >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html b/doc/api/html/structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html new file mode 100644 index 00000000000..e305382c0ac --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01double_01_4.html @@ -0,0 +1,582 @@ + + + + + + +Stan Math Library: stan::math::coupled_ode_system< F, stan::math::var, double > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::coupled_ode_system< F, stan::math::var, double > Struct Template Reference
+
+
+ +

The coupled ODE system for unknown initial values and known parameters. + More...

+ +

#include <coupled_ode_system.hpp>

+ + + + + + + + + + + + + + + + + +

+Public Member Functions

 coupled_ode_system (const F &f, const std::vector< stan::math::var > &y0, const std::vector< double > &theta, const std::vector< double > &x, const std::vector< int > &x_int, std::ostream *msgs)
 Construct a coupled ODE system for an unknown initial state and known parameters givne the specified base system functor, base initial state, parameters, data, and an output stream for messages. More...
 
void operator() (const std::vector< double > &y, std::vector< double > &dy_dt, double t)
 Calculates the derivative of the coupled ode system with respect to the state y at time t. More...
 
size_t size () const
 Returns the size of the coupled system. More...
 
std::vector< double > initial_state ()
 Returns the initial state of the coupled system. More...
 
std::vector< std::vector
+< stan::math::var > > 
decouple_states (const std::vector< std::vector< double > > &y)
 Return the solutions to the basic ODE system, including appropriate autodiff partial derivatives, given the specified coupled system solution. More...
 
+ + + + + + + + + + + + + + + + + + + + + +

+Public Attributes

const F & f_
 
const std::vector
+< stan::math::var > & 
y0_
 
std::vector< double > y0_dbl_
 
const std::vector< double > & theta_dbl_
 
const std::vector< double > & x_
 
const std::vector< int > & x_int_
 
std::ostream * msgs_
 
const size_t N_
 
const size_t M_
 
const size_t size_
 
+

Detailed Description

+

template<typename F>
+struct stan::math::coupled_ode_system< F, stan::math::var, double >

+ +

The coupled ODE system for unknown initial values and known parameters.

+

If the original ODE has states of size N, the coupled system has N + N * N states. (derivatives of each state with respect to each initial value)

+

The coupled system has N + N * N states, where N is the size of the state vector in the base system.

+

The first N states correspond to the base system's N states: $ \frac{d x_n}{dt} $

+

The next N states correspond to the sensitivities of the initial conditions with respect to the to the first base system equation:

+

+\[ \frac{d x_{N+n}}{dt} = \frac{d}{dt} \frac{\partial x_1}{\partial y0_n} \] +

+

The next N states correspond to the sensitivities with respect to the second base system equation, etc.

+
Template Parameters
+ + +
Ftype of base ODE system functor
+
+
+ +

Definition at line 274 of file coupled_ode_system.hpp.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename F >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
stan::math::coupled_ode_system< F, stan::math::var, double >::coupled_ode_system (const F & f,
const std::vector< stan::math::var > & y0,
const std::vector< double > & theta,
const std::vector< double > & x,
const std::vector< int > & x_int,
std::ostream * msgs 
)
+
+inline
+
+ +

Construct a coupled ODE system for an unknown initial state and known parameters givne the specified base system functor, base initial state, parameters, data, and an output stream for messages.

+
Parameters
+ + + + + + + +
[in]fbase ODE system functor.
[in]y0initial state of the base ODE.
[in]thetasystem parameters.
[in]xreal data.
[in]x_intinteger data.
[in,out]msgsoutput stream for messages.
+
+
+ +

Definition at line 299 of file coupled_ode_system.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename F >
+ + + + + +
+ + + + + + + + +
std::vector<std::vector<stan::math::var> > stan::math::coupled_ode_system< F, stan::math::var, double >::decouple_states (const std::vector< std::vector< double > > & y)
+
+inline
+
+ +

Return the solutions to the basic ODE system, including appropriate autodiff partial derivatives, given the specified coupled system solution.

+
Parameters
+ + +
ythe vector of the coupled states after solving the ode
+
+
+ +

Definition at line 420 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + + +
+ + + + + + + +
std::vector<double> stan::math::coupled_ode_system< F, stan::math::var, double >::initial_state ()
+
+inline
+
+ +

Returns the initial state of the coupled system.

+

Because the starting state is unknown, the coupled system incorporates the initial conditions as parameters. The initial conditions for the coupled part of the system are set to zero along with the rest of the initial state, because the value of the initial state has been moved into the parameters.

+
Returns
the initial condition of the coupled system. This is a vector of length size() where all elements are 0.
+ +

Definition at line 408 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::coupled_ode_system< F, stan::math::var, double >::operator() (const std::vector< double > & y,
std::vector< double > & dy_dt,
double t 
)
+
+inline
+
+ +

Calculates the derivative of the coupled ode system with respect to the state y at time t.

+
Parameters
+ + + + +
[in]ythe current state of the coupled ode system. This is a a vector of double of length size().
[out]dy_dta vector of length size() with the derivatives of the coupled system evaluated with state y and time t.
[in]ttime.
+
+
+
Exceptions
+ + +
exceptionif the system functor does not return a derivative vector of the same size as the state vector.
+
+
+ +

Definition at line 332 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + + +
+ + + + + + + +
size_t stan::math::coupled_ode_system< F, stan::math::var, double >::size () const
+
+inline
+
+ +

Returns the size of the coupled system.

+
Returns
size of the coupled system.
+ +

Definition at line 390 of file coupled_ode_system.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+
+template<typename F >
+ + + + +
const F& stan::math::coupled_ode_system< F, stan::math::var, double >::f_
+
+ +

Definition at line 275 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
const size_t stan::math::coupled_ode_system< F, stan::math::var, double >::M_
+
+ +

Definition at line 283 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
std::ostream* stan::math::coupled_ode_system< F, stan::math::var, double >::msgs_
+
+ +

Definition at line 281 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
const size_t stan::math::coupled_ode_system< F, stan::math::var, double >::N_
+
+ +

Definition at line 282 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
const size_t stan::math::coupled_ode_system< F, stan::math::var, double >::size_
+
+ +

Definition at line 284 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
const std::vector<double>& stan::math::coupled_ode_system< F, stan::math::var, double >::theta_dbl_
+
+ +

Definition at line 278 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
const std::vector<double>& stan::math::coupled_ode_system< F, stan::math::var, double >::x_
+
+ +

Definition at line 279 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
const std::vector<int>& stan::math::coupled_ode_system< F, stan::math::var, double >::x_int_
+
+ +

Definition at line 280 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
const std::vector<stan::math::var>& stan::math::coupled_ode_system< F, stan::math::var, double >::y0_
+
+ +

Definition at line 276 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
std::vector<double> stan::math::coupled_ode_system< F, stan::math::var, double >::y0_dbl_
+
+ +

Definition at line 277 of file coupled_ode_system.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4-members.html b/doc/api/html/structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4-members.html new file mode 100644 index 00000000000..f1bbf7e2324 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4-members.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::coupled_ode_system< F, stan::math::var, stan::math::var > Member List
+
+
+ +

This is the complete list of members for stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >, including all inherited members.

+ + + + + + + + + + + + + + + + + +
coupled_ode_system(const F &f, const std::vector< stan::math::var > &y0, const std::vector< stan::math::var > &theta, const std::vector< double > &x, const std::vector< int > &x_int, std::ostream *msgs)stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >inline
decouple_states(const std::vector< std::vector< double > > &y)stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >inline
f_stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >
initial_state()stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >inline
M_stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >
msgs_stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >
N_stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >
operator()(const std::vector< double > &y, std::vector< double > &dy_dt, double t)stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >inline
size() const stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >inline
size_stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >
theta_stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >
theta_dbl_stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >
x_stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >
x_int_stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >
y0_stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >
y0_dbl_stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html b/doc/api/html/structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html new file mode 100644 index 00000000000..5e4c2ae1f37 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1coupled__ode__system_3_01_f_00_01stan_1_1math_1_1var_00_01stan_1_1math_1_1var_01_4.html @@ -0,0 +1,607 @@ + + + + + + +Stan Math Library: stan::math::coupled_ode_system< F, stan::math::var, stan::math::var > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::coupled_ode_system< F, stan::math::var, stan::math::var > Struct Template Reference
+
+
+ +

The coupled ode system for unknown intial values and unknown parameters. + More...

+ +

#include <coupled_ode_system.hpp>

+ + + + + + + + + + + + + + + + + +

+Public Member Functions

 coupled_ode_system (const F &f, const std::vector< stan::math::var > &y0, const std::vector< stan::math::var > &theta, const std::vector< double > &x, const std::vector< int > &x_int, std::ostream *msgs)
 Construct a coupled ODE system with unknown initial value and known parameters, given the base ODE system functor, the initial state of the base ODE, the parameters, data, and an output stream to which to write messages. More...
 
void operator() (const std::vector< double > &y, std::vector< double > &dy_dt, double t)
 Populates the derivative vector with derivatives of the coupled ODE system state with respect to time evaluated at the specified state and specified time. More...
 
size_t size () const
 Returns the size of the coupled system. More...
 
std::vector< double > initial_state ()
 Returns the initial state of the coupled system. More...
 
std::vector< std::vector
+< stan::math::var > > 
decouple_states (const std::vector< std::vector< double > > &y)
 Return the basic ODE solutions given the specified coupled system solutions, including the partials versus the parameters encoded in the autodiff results. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + +

+Public Attributes

const F & f_
 
const std::vector
+< stan::math::var > & 
y0_
 
std::vector< double > y0_dbl_
 
const std::vector
+< stan::math::var > & 
theta_
 
std::vector< double > theta_dbl_
 
const std::vector< double > & x_
 
const std::vector< int > & x_int_
 
const size_t N_
 
const size_t M_
 
const size_t size_
 
std::ostream * msgs_
 
+

Detailed Description

+

template<typename F>
+struct stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >

+ +

The coupled ode system for unknown intial values and unknown parameters.

+

The coupled system has N + N * (N + M) states, where N is size of the base ODE state vector and M is the number of parameters.

+

The first N states correspond to the base system's N states: $ \frac{d x_n}{dt} $

+

The next N+M states correspond to the sensitivities of the initial conditions, then to the parameters with respect to the to the first base system equation:

+

+\[ \frac{d x_{N + n}}{dt} = \frac{d}{dt} \frac{\partial x_1}{\partial y0_n} \] +

+

+\[ \frac{d x_{N+N+m}}{dt} = \frac{d}{dt} \frac{\partial x_1}{\partial \theta_m} \] +

+

The next N+M states correspond to the sensitivities with respect to the second base system equation, etc.

+

If the original ode has a state vector of size N states and a parameter vector of size M, the coupled system has N + N * (N

+
    +
  • M) states. (derivatives of each state with respect to each initial value and each theta)
  • +
+
Template Parameters
+ + +
Fthe functor for the base ode system
+
+
+ +

Definition at line 495 of file coupled_ode_system.hpp.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename F >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::coupled_ode_system (const F & f,
const std::vector< stan::math::var > & y0,
const std::vector< stan::math::var > & theta,
const std::vector< double > & x,
const std::vector< int > & x_int,
std::ostream * msgs 
)
+
+inline
+
+ +

Construct a coupled ODE system with unknown initial value and known parameters, given the base ODE system functor, the initial state of the base ODE, the parameters, data, and an output stream to which to write messages.

+
Parameters
+ + + + + + + +
[in]fthe base ode system functor.
[in]y0the initial state of the base ode.
[in]thetaparameters of the base ode.
[in]xreal data.
[in]x_intinteger data.
[in,out]msgsoutput stream to which to print messages.
+
+
+ +

Definition at line 521 of file coupled_ode_system.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename F >
+ + + + + +
+ + + + + + + + +
std::vector<std::vector<stan::math::var> > stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::decouple_states (const std::vector< std::vector< double > > & y)
+
+inline
+
+ +

Return the basic ODE solutions given the specified coupled system solutions, including the partials versus the parameters encoded in the autodiff results.

+
Parameters
+ + +
ythe vector of the coupled states after solving the ode
+
+
+ +

Definition at line 652 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + + +
+ + + + + + + +
std::vector<double> stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::initial_state ()
+
+inline
+
+ +

Returns the initial state of the coupled system.

+

Because the initial state is unknown, the coupled system incorporates the initial condition offset from zero as a parameter, and hence the return of this function is a vector of zeros.

+
Returns
the initial condition of the coupled system. This is a vector of length size() where all elements are 0.
+ +

Definition at line 640 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::operator() (const std::vector< double > & y,
std::vector< double > & dy_dt,
double t 
)
+
+inline
+
+ +

Populates the derivative vector with derivatives of the coupled ODE system state with respect to time evaluated at the specified state and specified time.

+
Parameters
+ + + + +
[in]ythe current state of the coupled ode system, of size size().
[in,out]dy_dtpopulate with the derivatives of the coupled system evaluated at the specified state and time.
[in]ttime.
+
+
+
Exceptions
+ + +
exceptionif the base system does not return a derivative vector of the same size as the state vector.
+
+
+ +

Definition at line 558 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + + +
+ + + + + + + +
size_t stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::size () const
+
+inline
+
+ +

Returns the size of the coupled system.

+
Returns
size of the coupled system.
+ +

Definition at line 625 of file coupled_ode_system.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+
+template<typename F >
+ + + + +
const F& stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::f_
+
+ +

Definition at line 496 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
const size_t stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::M_
+
+ +

Definition at line 504 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
std::ostream* stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::msgs_
+
+ +

Definition at line 506 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
const size_t stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::N_
+
+ +

Definition at line 503 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
const size_t stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::size_
+
+ +

Definition at line 505 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
const std::vector<stan::math::var>& stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::theta_
+
+ +

Definition at line 499 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
std::vector<double> stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::theta_dbl_
+
+ +

Definition at line 500 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
const std::vector<double>& stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::x_
+
+ +

Definition at line 501 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
const std::vector<int>& stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::x_int_
+
+ +

Definition at line 502 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
const std::vector<stan::math::var>& stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::y0_
+
+ +

Definition at line 497 of file coupled_ode_system.hpp.

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
std::vector<double> stan::math::coupled_ode_system< F, stan::math::var, stan::math::var >::y0_dbl_
+
+ +

Definition at line 498 of file coupled_ode_system.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1detail_1_1bounded-members.html b/doc/api/html/structstan_1_1math_1_1detail_1_1bounded-members.html new file mode 100644 index 00000000000..6da73075de5 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1detail_1_1bounded-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::detail::bounded< T_y, T_low, T_high, y_is_vec > Member List
+
+
+ +

This is the complete list of members for stan::math::detail::bounded< T_y, T_low, T_high, y_is_vec >, including all inherited members.

+ + +
check(const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)stan::math::detail::bounded< T_y, T_low, T_high, y_is_vec >inlinestatic
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1detail_1_1bounded.html b/doc/api/html/structstan_1_1math_1_1detail_1_1bounded.html new file mode 100644 index 00000000000..ef1efd674ee --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1detail_1_1bounded.html @@ -0,0 +1,187 @@ + + + + + + +Stan Math Library: stan::math::detail::bounded< T_y, T_low, T_high, y_is_vec > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::detail::bounded< T_y, T_low, T_high, y_is_vec > Struct Template Reference
+
+
+ +

#include <check_bounded.hpp>

+ + + + +

+Static Public Member Functions

static bool check (const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)
 
+

Detailed Description

+

template<typename T_y, typename T_low, typename T_high, bool y_is_vec>
+struct stan::math::detail::bounded< T_y, T_low, T_high, y_is_vec >

+ + +

Definition at line 24 of file check_bounded.hpp.

+

Member Function Documentation

+ +
+
+
+template<typename T_y , typename T_low , typename T_high , bool y_is_vec>
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static bool stan::math::detail::bounded< T_y, T_low, T_high, y_is_vec >::check (const char * function,
const char * name,
const T_y & y,
const T_low & low,
const T_high & high 
)
+
+inlinestatic
+
+ +

Definition at line 25 of file check_bounded.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1detail_1_1bounded_3_01_t__y_00_01_t__low_00_01_t__high_00_01true_01_4-members.html b/doc/api/html/structstan_1_1math_1_1detail_1_1bounded_3_01_t__y_00_01_t__low_00_01_t__high_00_01true_01_4-members.html new file mode 100644 index 00000000000..0239b3e885a --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1detail_1_1bounded_3_01_t__y_00_01_t__low_00_01_t__high_00_01true_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::detail::bounded< T_y, T_low, T_high, true > Member List
+
+
+ +

This is the complete list of members for stan::math::detail::bounded< T_y, T_low, T_high, true >, including all inherited members.

+ + +
check(const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)stan::math::detail::bounded< T_y, T_low, T_high, true >inlinestatic
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1detail_1_1bounded_3_01_t__y_00_01_t__low_00_01_t__high_00_01true_01_4.html b/doc/api/html/structstan_1_1math_1_1detail_1_1bounded_3_01_t__y_00_01_t__low_00_01_t__high_00_01true_01_4.html new file mode 100644 index 00000000000..e1c71d1cea0 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1detail_1_1bounded_3_01_t__y_00_01_t__low_00_01_t__high_00_01true_01_4.html @@ -0,0 +1,187 @@ + + + + + + +Stan Math Library: stan::math::detail::bounded< T_y, T_low, T_high, true > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::detail::bounded< T_y, T_low, T_high, true > Struct Template Reference
+
+
+ +

#include <check_bounded.hpp>

+ + + + +

+Static Public Member Functions

static bool check (const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)
 
+

Detailed Description

+

template<typename T_y, typename T_low, typename T_high>
+struct stan::math::detail::bounded< T_y, T_low, T_high, true >

+ + +

Definition at line 49 of file check_bounded.hpp.

+

Member Function Documentation

+ +
+
+
+template<typename T_y , typename T_low , typename T_high >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static bool stan::math::detail::bounded< T_y, T_low, T_high, true >::check (const char * function,
const char * name,
const T_y & y,
const T_low & low,
const T_high & high 
)
+
+inlinestatic
+
+ +

Definition at line 50 of file check_bounded.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1dummy.html b/doc/api/html/structstan_1_1math_1_1dummy.html new file mode 100644 index 00000000000..74e77bdc305 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1dummy.html @@ -0,0 +1,122 @@ + + + + + + +Stan Math Library: stan::math::dummy Struct Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::dummy Struct Reference
+
+
+ +

Empty struct for use in boost::condtional<is_constant_struct<T1>::value, T1, dummy>::type as false condtion for safe indexing. + More...

+ +

#include <container_view.hpp>

+

Detailed Description

+

Empty struct for use in boost::condtional<is_constant_struct<T1>::value, T1, dummy>::type as false condtion for safe indexing.

+ +

Definition at line 52 of file container_view.hpp.

+

The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1fvar-members.html b/doc/api/html/structstan_1_1math_1_1fvar-members.html new file mode 100644 index 00000000000..bbbe55cbf49 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1fvar-members.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::fvar< T > Member List
+
+
+ +

This is the complete list of members for stan::math::fvar< T >, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + +
d_stan::math::fvar< T >
fvar()stan::math::fvar< T >inline
fvar(const fvar< T > &x)stan::math::fvar< T >inline
fvar(const TV &val, const TD &deriv)stan::math::fvar< T >inline
fvar(const TV &val)stan::math::fvar< T >inline
operator*=(const fvar< T > &x2)stan::math::fvar< T >inline
operator*=(double x2)stan::math::fvar< T >inline
operator++()stan::math::fvar< T >inline
operator++(int)stan::math::fvar< T >inline
operator+=(const fvar< T > &x2)stan::math::fvar< T >inline
operator+=(double x2)stan::math::fvar< T >inline
operator--()stan::math::fvar< T >inline
operator--(int)stan::math::fvar< T >inline
operator-=(const fvar< T > &x2)stan::math::fvar< T >inline
operator-=(double x2)stan::math::fvar< T >inline
operator/=(const fvar< T > &x2)stan::math::fvar< T >inline
operator/=(double x2)stan::math::fvar< T >inline
operator<<(std::ostream &os, const fvar< T > &v)stan::math::fvar< T >friend
tangent() const stan::math::fvar< T >inline
val() const stan::math::fvar< T >inline
val_stan::math::fvar< T >
value_type typedefstan::math::fvar< T >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1fvar.html b/doc/api/html/structstan_1_1math_1_1fvar.html new file mode 100644 index 00000000000..d98070155d2 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1fvar.html @@ -0,0 +1,790 @@ + + + + + + +Stan Math Library: stan::math::fvar< T > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::fvar< T > Struct Template Reference
+
+
+ +

#include <fvar.hpp>

+ + + + +

+Public Types

typedef fvar value_type
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

val () const
 
tangent () const
 
 fvar ()
 
 fvar (const fvar< T > &x)
 
template<typename TV , typename TD >
 fvar (const TV &val, const TD &deriv)
 
template<typename TV >
 fvar (const TV &val)
 
fvar< T > & operator+= (const fvar< T > &x2)
 
fvar< T > & operator+= (double x2)
 
fvar< T > & operator-= (const fvar< T > &x2)
 
fvar< T > & operator-= (double x2)
 
fvar< T > & operator*= (const fvar< T > &x2)
 
fvar< T > & operator*= (double x2)
 
fvar< T > & operator/= (const fvar< T > &x2)
 
fvar< T > & operator/= (double x2)
 
fvar< T > & operator++ ()
 
fvar< T > operator++ (int)
 
fvar< T > & operator-- ()
 
fvar< T > operator-- (int)
 
+ + + + + +

+Public Attributes

val_
 
d_
 
+ + + +

+Friends

std::ostream & operator<< (std::ostream &os, const fvar< T > &v)
 
+

Detailed Description

+

template<typename T>
+struct stan::math::fvar< T >

+ + +

Definition at line 13 of file fvar.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T>
+ + + + +
typedef fvar stan::math::fvar< T >::value_type
+
+ +

Definition at line 20 of file fvar.hpp.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T>
+ + + + + +
+ + + + + + + +
stan::math::fvar< T >::fvar ()
+
+inline
+
+ +

Definition at line 22 of file fvar.hpp.

+ +
+
+ +
+
+
+template<typename T>
+ + + + + +
+ + + + + + + + +
stan::math::fvar< T >::fvar (const fvar< T > & x)
+
+inline
+
+ +

Definition at line 24 of file fvar.hpp.

+ +
+
+ +
+
+
+template<typename T>
+
+template<typename TV , typename TD >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
stan::math::fvar< T >::fvar (const TV & val,
const TD & deriv 
)
+
+inline
+
+ +

Definition at line 30 of file fvar.hpp.

+ +
+
+ +
+
+
+template<typename T>
+
+template<typename TV >
+ + + + + +
+ + + + + + + + +
stan::math::fvar< T >::fvar (const TV & val)
+
+inline
+
+ +

Definition at line 37 of file fvar.hpp.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T>
+ + + + + +
+ + + + + + + + +
fvar<T>& stan::math::fvar< T >::operator*= (const fvar< T > & x2)
+
+inline
+
+ +

Definition at line 76 of file fvar.hpp.

+ +
+
+ +
+
+
+template<typename T>
+ + + + + +
+ + + + + + + + +
fvar<T>& stan::math::fvar< T >::operator*= (double x2)
+
+inline
+
+ +

Definition at line 84 of file fvar.hpp.

+ +
+
+ +
+
+
+template<typename T>
+ + + + + +
+ + + + + + + +
fvar<T>& stan::math::fvar< T >::operator++ ()
+
+inline
+
+ +

Definition at line 110 of file fvar.hpp.

+ +
+
+ +
+
+
+template<typename T>
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::fvar< T >::operator++ (int )
+
+inline
+
+ +

Definition at line 117 of file fvar.hpp.

+ +
+
+ +
+
+
+template<typename T>
+ + + + + +
+ + + + + + + + +
fvar<T>& stan::math::fvar< T >::operator+= (const fvar< T > & x2)
+
+inline
+
+ +

Definition at line 46 of file fvar.hpp.

+ +
+
+ +
+
+
+template<typename T>
+ + + + + +
+ + + + + + + + +
fvar<T>& stan::math::fvar< T >::operator+= (double x2)
+
+inline
+
+ +

Definition at line 54 of file fvar.hpp.

+ +
+
+ +
+
+
+template<typename T>
+ + + + + +
+ + + + + + + +
fvar<T>& stan::math::fvar< T >::operator-- ()
+
+inline
+
+ +

Definition at line 125 of file fvar.hpp.

+ +
+
+ +
+
+
+template<typename T>
+ + + + + +
+ + + + + + + + +
fvar<T> stan::math::fvar< T >::operator-- (int )
+
+inline
+
+ +

Definition at line 131 of file fvar.hpp.

+ +
+
+ +
+
+
+template<typename T>
+ + + + + +
+ + + + + + + + +
fvar<T>& stan::math::fvar< T >::operator-= (const fvar< T > & x2)
+
+inline
+
+ +

Definition at line 61 of file fvar.hpp.

+ +
+
+ +
+
+
+template<typename T>
+ + + + + +
+ + + + + + + + +
fvar<T>& stan::math::fvar< T >::operator-= (double x2)
+
+inline
+
+ +

Definition at line 69 of file fvar.hpp.

+ +
+
+ +
+
+
+template<typename T>
+ + + + + +
+ + + + + + + + +
fvar<T>& stan::math::fvar< T >::operator/= (const fvar< T > & x2)
+
+inline
+
+ +

Definition at line 94 of file fvar.hpp.

+ +
+
+ +
+
+
+template<typename T>
+ + + + + +
+ + + + + + + + +
fvar<T>& stan::math::fvar< T >::operator/= (double x2)
+
+inline
+
+ +

Definition at line 102 of file fvar.hpp.

+ +
+
+ +
+
+
+template<typename T>
+ + + + + +
+ + + + + + + +
T stan::math::fvar< T >::tangent () const
+
+inline
+
+ +

Definition at line 18 of file fvar.hpp.

+ +
+
+ +
+
+
+template<typename T>
+ + + + + +
+ + + + + + + +
T stan::math::fvar< T >::val () const
+
+inline
+
+ +

Definition at line 17 of file fvar.hpp.

+ +
+
+

Friends And Related Function Documentation

+ +
+
+
+template<typename T>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::ostream& operator<< (std::ostream & os,
const fvar< T > & v 
)
+
+friend
+
+ +

Definition at line 139 of file fvar.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+
+template<typename T>
+ + + + +
T stan::math::fvar< T >::d_
+
+ +

Definition at line 15 of file fvar.hpp.

+ +
+
+ +
+
+
+template<typename T>
+ + + + +
T stan::math::fvar< T >::val_
+
+ +

Definition at line 14 of file fvar.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1include__summand-members.html b/doc/api/html/structstan_1_1math_1_1include__summand-members.html new file mode 100644 index 00000000000..28db8a1f8db --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1include__summand-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::include_summand< propto, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 > Member List
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1include__summand.html b/doc/api/html/structstan_1_1math_1_1include__summand.html new file mode 100644 index 00000000000..49671102a70 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1include__summand.html @@ -0,0 +1,168 @@ + + + + + + +Stan Math Library: stan::math::include_summand< propto, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::include_summand< propto, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 > Struct Template Reference
+
+
+ +

Template metaprogram to calculate whether a summand needs to be included in a proportional (log) probability calculation. + More...

+ +

#include <include_summand.hpp>

+ + + + + +

+Public Types

enum  { value + }
 true if a term with the specified propto value and subterm types should be included in a proportionality calculation. More...
 
+

Detailed Description

+

template<bool propto, typename T1 = double, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double, typename T7 = double, typename T8 = double, typename T9 = double, typename T10 = double>
+struct stan::math::include_summand< propto, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >

+ +

Template metaprogram to calculate whether a summand needs to be included in a proportional (log) probability calculation.

+

For usage, the first boolean parameter should be set to true if calculating a term up to proportionality. Other type parameters should be included for all of the types of variables in a term.

+

The value enum will be true if the propto parameter is false or if any of the other template arguments are not constants as defined by stan::is_constant<T>.

+
Template Parameters
+ + + +
proptotrue if calculating up to a proportionality constant.
T1First
+
+
+ +

Definition at line 36 of file include_summand.hpp.

+

Member Enumeration Documentation

+ +
+
+
+template<bool propto, typename T1 = double, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double, typename T7 = double, typename T8 = double, typename T9 = double, typename T10 = double>
+ + + + +
anonymous enum
+
+ +

true if a term with the specified propto value and subterm types should be included in a proportionality calculation.

+ + +
Enumerator
value  +
+ +

Definition at line 42 of file include_summand.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1index__type.html b/doc/api/html/structstan_1_1math_1_1index__type.html new file mode 100644 index 00000000000..9b969a2c1e2 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1index__type.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: stan::math::index_type< T > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::index_type< T > Struct Template Reference
+
+
+ +

Primary template class for the metaprogram to compute the index type of a container. + More...

+ +

#include <index_type.hpp>

+

Detailed Description

+

template<typename T>
+struct stan::math::index_type< T >

+ +

Primary template class for the metaprogram to compute the index type of a container.

+

Only the specializations have behavior that can be used, and all implement a typedef type for the type of the index given container T.

+

tparam T type of container.

+ +

Definition at line 19 of file index_type.hpp.

+

The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1index__type_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4-members.html b/doc/api/html/structstan_1_1math_1_1index__type_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4-members.html new file mode 100644 index 00000000000..4e4f81adfb1 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1index__type_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::index_type< Eigen::Matrix< T, R, C > > Member List
+
+
+ +

This is the complete list of members for stan::math::index_type< Eigen::Matrix< T, R, C > >, including all inherited members.

+ + +
type typedefstan::math::index_type< Eigen::Matrix< T, R, C > >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1index__type_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4.html b/doc/api/html/structstan_1_1math_1_1index__type_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4.html new file mode 100644 index 00000000000..7d35105bdfa --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1index__type_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4.html @@ -0,0 +1,160 @@ + + + + + + +Stan Math Library: stan::math::index_type< Eigen::Matrix< T, R, C > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::index_type< Eigen::Matrix< T, R, C > > Struct Template Reference
+
+
+ +

Template metaprogram defining typedef for the type of index for an Eigen matrix, vector, or row vector. + More...

+ +

#include <index_type.hpp>

+ + + + +

+Public Types

typedef Eigen::Matrix< T, R, C >
+::Index 
type
 
+

Detailed Description

+

template<typename T, int R, int C>
+struct stan::math::index_type< Eigen::Matrix< T, R, C > >

+ +

Template metaprogram defining typedef for the type of index for an Eigen matrix, vector, or row vector.

+
Template Parameters
+ + + + +
Ttype of matrix.
Rnumber of rows for matrix.
Cnumber of columns for matrix.
+
+
+ +

Definition at line 20 of file index_type.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T , int R, int C>
+ + + + +
typedef Eigen::Matrix<T, R, C>::Index stan::math::index_type< Eigen::Matrix< T, R, C > >::type
+
+ +

Definition at line 21 of file index_type.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1index__type_3_01const_01_t_01_4-members.html b/doc/api/html/structstan_1_1math_1_1index__type_3_01const_01_t_01_4-members.html new file mode 100644 index 00000000000..b095dfa1891 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1index__type_3_01const_01_t_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::index_type< const T > Member List
+
+
+ +

This is the complete list of members for stan::math::index_type< const T >, including all inherited members.

+ + +
type typedefstan::math::index_type< const T >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1index__type_3_01const_01_t_01_4.html b/doc/api/html/structstan_1_1math_1_1index__type_3_01const_01_t_01_4.html new file mode 100644 index 00000000000..f5b5f394de5 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1index__type_3_01const_01_t_01_4.html @@ -0,0 +1,157 @@ + + + + + + +Stan Math Library: stan::math::index_type< const T > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::index_type< const T > Struct Template Reference
+
+
+ +

Template class for metaprogram to compute the type of indexes used in a constant container type. + More...

+ +

#include <index_type.hpp>

+ + + + +

+Public Types

typedef index_type< T >::type type
 
+

Detailed Description

+

template<typename T>
+struct stan::math::index_type< const T >

+ +

Template class for metaprogram to compute the type of indexes used in a constant container type.

+
Template Parameters
+ + +
Ttype of container without const modifier.
+
+
+ +

Definition at line 30 of file index_type.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T >
+ + + + +
typedef index_type<T>::type stan::math::index_type< const T >::type
+
+ +

Definition at line 31 of file index_type.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1index__type_3_01std_1_1vector_3_01_t_01_4_01_4-members.html b/doc/api/html/structstan_1_1math_1_1index__type_3_01std_1_1vector_3_01_t_01_4_01_4-members.html new file mode 100644 index 00000000000..017a797a1dd --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1index__type_3_01std_1_1vector_3_01_t_01_4_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::index_type< std::vector< T > > Member List
+
+
+ +

This is the complete list of members for stan::math::index_type< std::vector< T > >, including all inherited members.

+ + +
type typedefstan::math::index_type< std::vector< T > >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1index__type_3_01std_1_1vector_3_01_t_01_4_01_4.html b/doc/api/html/structstan_1_1math_1_1index__type_3_01std_1_1vector_3_01_t_01_4_01_4.html new file mode 100644 index 00000000000..722e187f196 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1index__type_3_01std_1_1vector_3_01_t_01_4_01_4.html @@ -0,0 +1,160 @@ + + + + + + +Stan Math Library: stan::math::index_type< std::vector< T > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::index_type< std::vector< T > > Struct Template Reference
+
+
+ +

Template metaprogram class to compute the type of index for a standard vector. + More...

+ +

#include <index_type.hpp>

+ + + + + +

+Public Types

typedef std::vector< T >::size_type type
 Typedef for index of standard vectors. More...
 
+

Detailed Description

+

template<typename T>
+struct stan::math::index_type< std::vector< T > >

+ +

Template metaprogram class to compute the type of index for a standard vector.

+
Template Parameters
+ + +
Ttype of elements in standard vector.
+
+
+ +

Definition at line 18 of file index_type.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T >
+ + + + +
typedef std::vector<T>::size_type stan::math::index_type< std::vector< T > >::type
+
+ +

Typedef for index of standard vectors.

+ +

Definition at line 22 of file index_type.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1pass__type-members.html b/doc/api/html/structstan_1_1math_1_1pass__type-members.html new file mode 100644 index 00000000000..81c7e982f55 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1pass__type-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::pass_type< T > Member List
+
+
+ +

This is the complete list of members for stan::math::pass_type< T >, including all inherited members.

+ + +
type typedefstan::math::pass_type< T >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1pass__type.html b/doc/api/html/structstan_1_1math_1_1pass__type.html new file mode 100644 index 00000000000..4938e965c36 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1pass__type.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan::math::pass_type< T > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::pass_type< T > Struct Template Reference
+
+
+ +

#include <seq_view.hpp>

+ + + + +

+Public Types

typedef const T & type
 
+

Detailed Description

+

template<typename T>
+struct stan::math::pass_type< T >

+ + +

Definition at line 27 of file seq_view.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T>
+ + + + +
typedef const T& stan::math::pass_type< T >::type
+
+ +

Definition at line 28 of file seq_view.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1pass__type_3_01double_01_4-members.html b/doc/api/html/structstan_1_1math_1_1pass__type_3_01double_01_4-members.html new file mode 100644 index 00000000000..b5675ca8cc6 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1pass__type_3_01double_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::pass_type< double > Member List
+
+
+ +

This is the complete list of members for stan::math::pass_type< double >, including all inherited members.

+ + +
type typedefstan::math::pass_type< double >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1pass__type_3_01double_01_4.html b/doc/api/html/structstan_1_1math_1_1pass__type_3_01double_01_4.html new file mode 100644 index 00000000000..21675681e16 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1pass__type_3_01double_01_4.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan::math::pass_type< double > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::pass_type< double > Struct Template Reference
+
+
+ +

#include <seq_view.hpp>

+ + + + +

+Public Types

typedef double type
 
+

Detailed Description

+

template<>
+struct stan::math::pass_type< double >

+ + +

Definition at line 31 of file seq_view.hpp.

+

Member Typedef Documentation

+ +
+
+ + + + +
typedef double stan::math::pass_type< double >::type
+
+ +

Definition at line 32 of file seq_view.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1pass__type_3_01int_01_4-members.html b/doc/api/html/structstan_1_1math_1_1pass__type_3_01int_01_4-members.html new file mode 100644 index 00000000000..9e2c0c8ec58 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1pass__type_3_01int_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::pass_type< int > Member List
+
+
+ +

This is the complete list of members for stan::math::pass_type< int >, including all inherited members.

+ + +
type typedefstan::math::pass_type< int >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1pass__type_3_01int_01_4.html b/doc/api/html/structstan_1_1math_1_1pass__type_3_01int_01_4.html new file mode 100644 index 00000000000..2c6e807fab4 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1pass__type_3_01int_01_4.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan::math::pass_type< int > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::pass_type< int > Struct Template Reference
+
+
+ +

#include <seq_view.hpp>

+ + + + +

+Public Types

typedef int type
 
+

Detailed Description

+

template<>
+struct stan::math::pass_type< int >

+ + +

Definition at line 35 of file seq_view.hpp.

+

Member Typedef Documentation

+ +
+
+ + + + +
typedef int stan::math::pass_type< int >::type
+
+ +

Definition at line 36 of file seq_view.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promote__scalar__struct-members.html b/doc/api/html/structstan_1_1math_1_1promote__scalar__struct-members.html new file mode 100644 index 00000000000..b66a37b0b0a --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promote__scalar__struct-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::promote_scalar_struct< T, S > Member List
+
+
+ +

This is the complete list of members for stan::math::promote_scalar_struct< T, S >, including all inherited members.

+ + +
apply(S x)stan::math::promote_scalar_struct< T, S >inlinestatic
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promote__scalar__struct.html b/doc/api/html/structstan_1_1math_1_1promote__scalar__struct.html new file mode 100644 index 00000000000..690f7635c69 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promote__scalar__struct.html @@ -0,0 +1,181 @@ + + + + + + +Stan Math Library: stan::math::promote_scalar_struct< T, S > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::promote_scalar_struct< T, S > Struct Template Reference
+
+
+ +

General struct to hold static function for promoting underlying scalar types. + More...

+ +

#include <promote_scalar.hpp>

+ + + + + +

+Static Public Member Functions

static T apply (S x)
 Return the value of the input argument promoted to the type specified by the template parameter. More...
 
+

Detailed Description

+

template<typename T, typename S>
+struct stan::math::promote_scalar_struct< T, S >

+ +

General struct to hold static function for promoting underlying scalar types.

+
Template Parameters
+ + + +
Treturn type of nested static function.
Sinput type for nested static function, whose underlying scalar type must be assignable to T.
+
+
+ +

Definition at line 22 of file promote_scalar.hpp.

+

Member Function Documentation

+ +
+
+
+template<typename T , typename S >
+ + + + + +
+ + + + + + + + +
static T stan::math::promote_scalar_struct< T, S >::apply (x)
+
+inlinestatic
+
+ +

Return the value of the input argument promoted to the type specified by the template parameter.

+

This is the base case for mismatching template parameter types in which the underlying scalar type of template parameter S is assignable to type T.

+
Parameters
+ + +
xinput of type S.
+
+
+
Returns
input promoted to have scalars of type T.
+ +

Definition at line 34 of file promote_scalar.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00-1_00-1_01_4_01_4-members.html b/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00-1_00-1_01_4_01_4-members.html new file mode 100644 index 00000000000..c0535947903 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00-1_00-1_01_4_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::promote_scalar_struct< T, Eigen::Matrix< S,-1,-1 > > Member List
+
+
+ +

This is the complete list of members for stan::math::promote_scalar_struct< T, Eigen::Matrix< S,-1,-1 > >, including all inherited members.

+ + +
apply(const Eigen::Matrix< S,-1,-1 > &x)stan::math::promote_scalar_struct< T, Eigen::Matrix< S,-1,-1 > >inlinestatic
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00-1_00-1_01_4_01_4.html b/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00-1_00-1_01_4_01_4.html new file mode 100644 index 00000000000..478cc93d325 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00-1_00-1_01_4_01_4.html @@ -0,0 +1,183 @@ + + + + + + +Stan Math Library: stan::math::promote_scalar_struct< T, Eigen::Matrix< S,-1,-1 > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::promote_scalar_struct< T, Eigen::Matrix< S,-1,-1 > > Struct Template Reference
+
+
+ +

Struct to hold static function for promoting underlying scalar types. + More...

+ +

#include <promote_scalar.hpp>

+ + + + + +

+Static Public Member Functions

static Eigen::Matrix< typename
+promote_scalar_type< T, S >
+::type,-1,-1 > 
apply (const Eigen::Matrix< S,-1,-1 > &x)
 Return the matrix consisting of the recursive promotion of the elements of the input matrix to the scalar type specified by the return template parameter. More...
 
+

Detailed Description

+

template<typename T, typename S>
+struct stan::math::promote_scalar_struct< T, Eigen::Matrix< S,-1,-1 > >

+ +

Struct to hold static function for promoting underlying scalar types.

+

This specialization is for Eigen matrix inputs.

+
Template Parameters
+ + + +
Treturn scalar type
Sinput matrix scalar type for static nested function, which must have a scalar type assignable to T
+
+
+ +

Definition at line 21 of file promote_scalar.hpp.

+

Member Function Documentation

+ +
+
+
+template<typename T , typename S >
+ + + + + +
+ + + + + + + + +
static Eigen::Matrix<typename promote_scalar_type<T, S>::type, -1, -1> stan::math::promote_scalar_struct< T, Eigen::Matrix< S,-1,-1 > >::apply (const Eigen::Matrix< S,-1,-1 > & x)
+
+inlinestatic
+
+ +

Return the matrix consisting of the recursive promotion of the elements of the input matrix to the scalar type specified by the return template parameter.

+
Parameters
+ + +
xinput matrix.
+
+
+
Returns
matrix with values promoted from input vector.
+ +

Definition at line 31 of file promote_scalar.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00-1_00_011_01_4_01_4-members.html b/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00-1_00_011_01_4_01_4-members.html new file mode 100644 index 00000000000..eb9bd6c5aa2 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00-1_00_011_01_4_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::promote_scalar_struct< T, Eigen::Matrix< S,-1, 1 > > Member List
+
+
+ +

This is the complete list of members for stan::math::promote_scalar_struct< T, Eigen::Matrix< S,-1, 1 > >, including all inherited members.

+ + +
apply(const Eigen::Matrix< S,-1, 1 > &x)stan::math::promote_scalar_struct< T, Eigen::Matrix< S,-1, 1 > >inlinestatic
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00-1_00_011_01_4_01_4.html b/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00-1_00_011_01_4_01_4.html new file mode 100644 index 00000000000..a888677a7db --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00-1_00_011_01_4_01_4.html @@ -0,0 +1,183 @@ + + + + + + +Stan Math Library: stan::math::promote_scalar_struct< T, Eigen::Matrix< S,-1, 1 > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::promote_scalar_struct< T, Eigen::Matrix< S,-1, 1 > > Struct Template Reference
+
+
+ +

Struct to hold static function for promoting underlying scalar types. + More...

+ +

#include <promote_scalar.hpp>

+ + + + + +

+Static Public Member Functions

static Eigen::Matrix< typename
+promote_scalar_type< T, S >
+::type,-1, 1 > 
apply (const Eigen::Matrix< S,-1, 1 > &x)
 Return the row vector consisting of the recursive promotion of the elements of the input row vector to the scalar type specified by the return template parameter. More...
 
+

Detailed Description

+

template<typename T, typename S>
+struct stan::math::promote_scalar_struct< T, Eigen::Matrix< S,-1, 1 > >

+ +

Struct to hold static function for promoting underlying scalar types.

+

This specialization is for Eigen row vector inputs.

+
Template Parameters
+ + + +
Treturn scalar type
Sinput matrix scalar type for static nested function, which must have a scalar type assignable to T
+
+
+ +

Definition at line 79 of file promote_scalar.hpp.

+

Member Function Documentation

+ +
+
+
+template<typename T , typename S >
+ + + + + +
+ + + + + + + + +
static Eigen::Matrix<typename promote_scalar_type<T, S>::type, -1, 1> stan::math::promote_scalar_struct< T, Eigen::Matrix< S,-1, 1 > >::apply (const Eigen::Matrix< S,-1, 1 > & x)
+
+inlinestatic
+
+ +

Return the row vector consisting of the recursive promotion of the elements of the input row vector to the scalar type specified by the return template parameter.

+
Parameters
+ + +
xinput row vector.
+
+
+
Returns
row vector with values promoted from input vector.
+ +

Definition at line 89 of file promote_scalar.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00-1_01_4_01_4-members.html b/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00-1_01_4_01_4-members.html new file mode 100644 index 00000000000..9709a4672ef --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00-1_01_4_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::promote_scalar_struct< T, Eigen::Matrix< S, 1,-1 > > Member List
+
+
+ +

This is the complete list of members for stan::math::promote_scalar_struct< T, Eigen::Matrix< S, 1,-1 > >, including all inherited members.

+ + +
apply(const Eigen::Matrix< S, 1,-1 > &x)stan::math::promote_scalar_struct< T, Eigen::Matrix< S, 1,-1 > >inlinestatic
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00-1_01_4_01_4.html b/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00-1_01_4_01_4.html new file mode 100644 index 00000000000..fdd83f88f33 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00-1_01_4_01_4.html @@ -0,0 +1,183 @@ + + + + + + +Stan Math Library: stan::math::promote_scalar_struct< T, Eigen::Matrix< S, 1,-1 > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::promote_scalar_struct< T, Eigen::Matrix< S, 1,-1 > > Struct Template Reference
+
+
+ +

Struct to hold static function for promoting underlying scalar types. + More...

+ +

#include <promote_scalar.hpp>

+ + + + + +

+Static Public Member Functions

static Eigen::Matrix< typename
+promote_scalar_type< T, S >
+::type, 1,-1 > 
apply (const Eigen::Matrix< S, 1,-1 > &x)
 Return the column vector consisting of the recursive promotion of the elements of the input column vector to the scalar type specified by the return template parameter. More...
 
+

Detailed Description

+

template<typename T, typename S>
+struct stan::math::promote_scalar_struct< T, Eigen::Matrix< S, 1,-1 > >

+ +

Struct to hold static function for promoting underlying scalar types.

+

This specialization is for Eigen column vector inputs.

+
Template Parameters
+ + + +
Treturn scalar type
Sinput matrix scalar type for static nested function, which must have a scalar type assignable to T
+
+
+ +

Definition at line 50 of file promote_scalar.hpp.

+

Member Function Documentation

+ +
+
+
+template<typename T , typename S >
+ + + + + +
+ + + + + + + + +
static Eigen::Matrix<typename promote_scalar_type<T, S>::type, 1, -1> stan::math::promote_scalar_struct< T, Eigen::Matrix< S, 1,-1 > >::apply (const Eigen::Matrix< S, 1,-1 > & x)
+
+inlinestatic
+
+ +

Return the column vector consisting of the recursive promotion of the elements of the input column vector to the scalar type specified by the return template parameter.

+
Parameters
+ + +
xinput column vector.
+
+
+
Returns
column vector with values promoted from input vector.
+ +

Definition at line 60 of file promote_scalar.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_t_01_4-members.html b/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_t_01_4-members.html new file mode 100644 index 00000000000..c62c3878605 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_t_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::promote_scalar_struct< T, T > Member List
+
+
+ +

This is the complete list of members for stan::math::promote_scalar_struct< T, T >, including all inherited members.

+ + +
apply(const T &x)stan::math::promote_scalar_struct< T, T >inlinestatic
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_t_01_4.html b/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_t_01_4.html new file mode 100644 index 00000000000..46c86d47473 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01_t_01_4.html @@ -0,0 +1,180 @@ + + + + + + +Stan Math Library: stan::math::promote_scalar_struct< T, T > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::promote_scalar_struct< T, T > Struct Template Reference
+
+
+ +

Struct to hold static function for promoting underlying scalar types. + More...

+ +

#include <promote_scalar.hpp>

+ + + + + +

+Static Public Member Functions

static T apply (const T &x)
 Return the unmodified input. More...
 
+

Detailed Description

+

template<typename T>
+struct stan::math::promote_scalar_struct< T, T >

+ +

Struct to hold static function for promoting underlying scalar types.

+

This specialization is for equal input and output types of function types.

+
Template Parameters
+ + +
Tinput and return type of nested static function.
+
+
+ +

Definition at line 47 of file promote_scalar.hpp.

+

Member Function Documentation

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
static T stan::math::promote_scalar_struct< T, T >::apply (const T & x)
+
+inlinestatic
+
+ +

Return the unmodified input.

+
Parameters
+ + +
xinput of type T.
+
+
+
Returns
input unmodified.
+ +

Definition at line 54 of file promote_scalar.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4-members.html b/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4-members.html new file mode 100644 index 00000000000..f87e425fc5d --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::promote_scalar_struct< T, std::vector< S > > Member List
+
+
+ +

This is the complete list of members for stan::math::promote_scalar_struct< T, std::vector< S > >, including all inherited members.

+ + +
apply(const std::vector< S > &x)stan::math::promote_scalar_struct< T, std::vector< S > >inlinestatic
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4.html b/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4.html new file mode 100644 index 00000000000..68609890bc1 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promote__scalar__struct_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4.html @@ -0,0 +1,183 @@ + + + + + + +Stan Math Library: stan::math::promote_scalar_struct< T, std::vector< S > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::promote_scalar_struct< T, std::vector< S > > Struct Template Reference
+
+
+ +

Struct to hold static function for promoting underlying scalar types. + More...

+ +

#include <promote_scalar.hpp>

+ + + + + +

+Static Public Member Functions

static std::vector< typename
+promote_scalar_type< T, S >
+::type > 
apply (const std::vector< S > &x)
 Return the standard vector consisting of the recursive promotion of the elements of the input standard vector to the scalar type specified by the return template parameter. More...
 
+

Detailed Description

+

template<typename T, typename S>
+struct stan::math::promote_scalar_struct< T, std::vector< S > >

+ +

Struct to hold static function for promoting underlying scalar types.

+

This specialization is for standard vector inputs.

+
Template Parameters
+ + + +
Treturn scalar type
Sinput type for standard vector elements in static nested function, which must have an underlying scalar type assignable to T.
+
+
+ +

Definition at line 69 of file promote_scalar.hpp.

+

Member Function Documentation

+ +
+
+
+template<typename T , typename S >
+ + + + + +
+ + + + + + + + +
static std::vector<typename promote_scalar_type<T, S>::type> stan::math::promote_scalar_struct< T, std::vector< S > >::apply (const std::vector< S > & x)
+
+inlinestatic
+
+ +

Return the standard vector consisting of the recursive promotion of the elements of the input standard vector to the scalar type specified by the return template parameter.

+
Parameters
+ + +
xinput standard vector.
+
+
+
Returns
standard vector with values promoted from input vector.
+ +

Definition at line 79 of file promote_scalar.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promote__scalar__type-members.html b/doc/api/html/structstan_1_1math_1_1promote__scalar__type-members.html new file mode 100644 index 00000000000..e97511fb383 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promote__scalar__type-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::promote_scalar_type< T, S > Member List
+
+
+ +

This is the complete list of members for stan::math::promote_scalar_type< T, S >, including all inherited members.

+ + +
type typedefstan::math::promote_scalar_type< T, S >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promote__scalar__type.html b/doc/api/html/structstan_1_1math_1_1promote__scalar__type.html new file mode 100644 index 00000000000..9690ac812b1 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promote__scalar__type.html @@ -0,0 +1,162 @@ + + + + + + +Stan Math Library: stan::math::promote_scalar_type< T, S > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::promote_scalar_type< T, S > Struct Template Reference
+
+
+ +

Template metaprogram to calculate a type for converting a convertible type. + More...

+ +

#include <promote_scalar_type.hpp>

+ + + + + +

+Public Types

typedef T type
 The promoted type. More...
 
+

Detailed Description

+

template<typename T, typename S>
+struct stan::math::promote_scalar_type< T, S >

+ +

Template metaprogram to calculate a type for converting a convertible type.

+

This is the base case.

+
Template Parameters
+ + + +
Tresult scalar type.
Sinput type
+
+
+ +

Definition at line 19 of file promote_scalar_type.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T, typename S>
+ + + + +
typedef T stan::math::promote_scalar_type< T, S >::type
+
+ +

The promoted type.

+ +

Definition at line 23 of file promote_scalar_type.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00_01_eia6a45e8e9b504fc35f96b001b609d995.html b/doc/api/html/structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00_01_eia6a45e8e9b504fc35f96b001b609d995.html new file mode 100644 index 00000000000..ce81a5b4ce7 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00_01_eia6a45e8e9b504fc35f96b001b609d995.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::promote_scalar_type< T, Eigen::Matrix< S, 1, Eigen::Dynamic > > Member List
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00_01_eigen_1_1_dynamic_01_4_01_4.html b/doc/api/html/structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00_01_eigen_1_1_dynamic_01_4_01_4.html new file mode 100644 index 00000000000..6eb9c99584f --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_011_00_01_eigen_1_1_dynamic_01_4_01_4.html @@ -0,0 +1,164 @@ + + + + + + +Stan Math Library: stan::math::promote_scalar_type< T, Eigen::Matrix< S, 1, Eigen::Dynamic > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::promote_scalar_type< T, Eigen::Matrix< S, 1, Eigen::Dynamic > > Struct Template Reference
+
+
+ +

Template metaprogram to calculate a type for a row vector whose underlying scalar is converted from the second template parameter type to the first. + More...

+ +

#include <promote_scalar_type.hpp>

+ + + + + +

+Public Types

typedef Eigen::Matrix
+< typename promote_scalar_type
+< T, S >::type,
+1, Eigen::Dynamic > 
type
 The promoted type. More...
 
+

Detailed Description

+

template<typename T, typename S>
+struct stan::math::promote_scalar_type< T, Eigen::Matrix< S, 1, Eigen::Dynamic > >

+ +

Template metaprogram to calculate a type for a row vector whose underlying scalar is converted from the second template parameter type to the first.

+
Template Parameters
+ + + +
Tresult scalar type.
Sinput row vector scalar type
+
+
+ +

Definition at line 62 of file promote_scalar_type.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T , typename S >
+ + + + +
typedef Eigen::Matrix<typename promote_scalar_type<T, S>::type, 1, Eigen::Dynamic> stan::math::promote_scalar_type< T, Eigen::Matrix< S, 1, Eigen::Dynamic > >::type
+
+ +

The promoted type.

+ +

Definition at line 68 of file promote_scalar_type.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_18da53f05c7a1ffa21962d8ed9d876a8b.html b/doc/api/html/structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_18da53f05c7a1ffa21962d8ed9d876a8b.html new file mode 100644 index 00000000000..81c81869639 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_18da53f05c7a1ffa21962d8ed9d876a8b.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::promote_scalar_type< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > > Member List
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_011_01_4_01_4.html b/doc/api/html/structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_011_01_4_01_4.html new file mode 100644 index 00000000000..9a8e98be11d --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1_dynamic_00_011_01_4_01_4.html @@ -0,0 +1,163 @@ + + + + + + +Stan Math Library: stan::math::promote_scalar_type< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::promote_scalar_type< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > > Struct Template Reference
+
+
+ +

Template metaprogram to calculate a type for a vector whose underlying scalar is converted from the second template parameter type to the first. + More...

+ +

#include <promote_scalar_type.hpp>

+ + + + + +

+Public Types

typedef Eigen::Matrix
+< typename promote_scalar_type
+< T, S >::type, Eigen::Dynamic, 1 > 
type
 The promoted type. More...
 
+

Detailed Description

+

template<typename T, typename S>
+struct stan::math::promote_scalar_type< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > >

+ +

Template metaprogram to calculate a type for a vector whose underlying scalar is converted from the second template parameter type to the first.

+
Template Parameters
+ + + +
Tresult scalar type.
Sinput vector scalar type
+
+
+ +

Definition at line 43 of file promote_scalar_type.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T , typename S >
+ + + + +
typedef Eigen::Matrix<typename promote_scalar_type<T, S>::type, Eigen::Dynamic, 1> stan::math::promote_scalar_type< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > >::type
+
+ +

The promoted type.

+ +

Definition at line 49 of file promote_scalar_type.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1e79630b737e7a5c0c54662fc2130249d.html b/doc/api/html/structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1e79630b737e7a5c0c54662fc2130249d.html new file mode 100644 index 00000000000..6325283869b --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1e79630b737e7a5c0c54662fc2130249d.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::promote_scalar_type< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > > Member List
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1e90c042d64d8c3a6b9383f570932df58.html b/doc/api/html/structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1e90c042d64d8c3a6b9383f570932df58.html new file mode 100644 index 00000000000..5e32448f089 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01_eigen_1_1_matrix_3_01_s_00_01_eigen_1_1e90c042d64d8c3a6b9383f570932df58.html @@ -0,0 +1,165 @@ + + + + + + +Stan Math Library: stan::math::promote_scalar_type< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::promote_scalar_type< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > > Struct Template Reference
+
+
+ +

Template metaprogram to calculate a type for a matrix whose underlying scalar is converted from the second template parameter type to the first. + More...

+ +

#include <promote_scalar_type.hpp>

+ + + + + +

+Public Types

typedef Eigen::Matrix
+< typename promote_scalar_type
+< T, S >::type, Eigen::Dynamic,
+Eigen::Dynamic > 
type
 The promoted type. More...
 
+

Detailed Description

+

template<typename T, typename S>
+struct stan::math::promote_scalar_type< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >

+ +

Template metaprogram to calculate a type for a matrix whose underlying scalar is converted from the second template parameter type to the first.

+

This is the case for a vector container type.

+
Template Parameters
+ + + +
Tresult scalar type.
Sinput matrix scalar type
+
+
+ +

Definition at line 23 of file promote_scalar_type.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T , typename S >
+ + + + +
typedef Eigen::Matrix<typename promote_scalar_type<T, S>::type, Eigen::Dynamic, Eigen::Dynamic> stan::math::promote_scalar_type< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >::type
+
+ +

The promoted type.

+ +

Definition at line 30 of file promote_scalar_type.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4-members.html b/doc/api/html/structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4-members.html new file mode 100644 index 00000000000..d3067307736 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::promote_scalar_type< T, std::vector< S > > Member List
+
+
+ +

This is the complete list of members for stan::math::promote_scalar_type< T, std::vector< S > >, including all inherited members.

+ + +
type typedefstan::math::promote_scalar_type< T, std::vector< S > >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4.html b/doc/api/html/structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4.html new file mode 100644 index 00000000000..ab06811d068 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promote__scalar__type_3_01_t_00_01std_1_1vector_3_01_s_01_4_01_4.html @@ -0,0 +1,163 @@ + + + + + + +Stan Math Library: stan::math::promote_scalar_type< T, std::vector< S > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::promote_scalar_type< T, std::vector< S > > Struct Template Reference
+
+
+ +

Template metaprogram to calculate a type for a container whose underlying scalar is converted from the second template parameter type to the first. + More...

+ +

#include <promote_scalar_type.hpp>

+ + + + + +

+Public Types

typedef std::vector< typename
+promote_scalar_type< T, S >
+::type
type
 The promoted type. More...
 
+

Detailed Description

+

template<typename T, typename S>
+struct stan::math::promote_scalar_type< T, std::vector< S > >

+ +

Template metaprogram to calculate a type for a container whose underlying scalar is converted from the second template parameter type to the first.

+
Template Parameters
+ + + +
Tresult scalar type.
Sinput type
+
+
+ +

Definition at line 36 of file promote_scalar_type.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T , typename S >
+ + + + +
typedef std::vector<typename promote_scalar_type<T, S>::type> stan::math::promote_scalar_type< T, std::vector< S > >::type
+
+ +

The promoted type.

+ +

Definition at line 40 of file promote_scalar_type.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promoter-members.html b/doc/api/html/structstan_1_1math_1_1promoter-members.html new file mode 100644 index 00000000000..3645f27ad48 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promoter-members.html @@ -0,0 +1,115 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::promoter< F, T > Member List
+
+
+ +

This is the complete list of members for stan::math::promoter< F, T >, including all inherited members.

+ + + +
promote(const F &u, T &t)stan::math::promoter< F, T >inlinestatic
promote_to(const F &u)stan::math::promoter< F, T >inlinestatic
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promoter.html b/doc/api/html/structstan_1_1math_1_1promoter.html new file mode 100644 index 00000000000..bc5e6a24336 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promoter.html @@ -0,0 +1,199 @@ + + + + + + +Stan Math Library: stan::math::promoter< F, T > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::promoter< F, T > Struct Template Reference
+
+
+ +

#include <promoter.hpp>

+ + + + + + +

+Static Public Member Functions

static void promote (const F &u, T &t)
 
static T promote_to (const F &u)
 
+

Detailed Description

+

template<typename F, typename T>
+struct stan::math::promoter< F, T >

+ + +

Definition at line 14 of file promoter.hpp.

+

Member Function Documentation

+ +
+
+
+template<typename F, typename T>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static void stan::math::promoter< F, T >::promote (const F & u,
T & t 
)
+
+inlinestatic
+
+ +

Definition at line 15 of file promoter.hpp.

+ +
+
+ +
+
+
+template<typename F, typename T>
+ + + + + +
+ + + + + + + + +
static T stan::math::promoter< F, T >::promote_to (const F & u)
+
+inlinestatic
+
+ +

Definition at line 18 of file promoter.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promoter_3_01_eigen_1_1_matrix_3_01_f_00_01_r_00_01_c_01_4_00_01_eigen_1_142b48fda94601374e41a81325f3f7b84.html b/doc/api/html/structstan_1_1math_1_1promoter_3_01_eigen_1_1_matrix_3_01_f_00_01_r_00_01_c_01_4_00_01_eigen_1_142b48fda94601374e41a81325f3f7b84.html new file mode 100644 index 00000000000..58e70996863 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promoter_3_01_eigen_1_1_matrix_3_01_f_00_01_r_00_01_c_01_4_00_01_eigen_1_142b48fda94601374e41a81325f3f7b84.html @@ -0,0 +1,199 @@ + + + + + + +Stan Math Library: stan::math::promoter< Eigen::Matrix< F, R, C >, Eigen::Matrix< T, R, C > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::promoter< Eigen::Matrix< F, R, C >, Eigen::Matrix< T, R, C > > Struct Template Reference
+
+
+ +

#include <promoter.hpp>

+ + + + + + +

+Static Public Member Functions

static void promote (const Eigen::Matrix< F, R, C > &u, Eigen::Matrix< T, R, C > &t)
 
static Eigen::Matrix< T, R, C > promote_to (const Eigen::Matrix< F, R, C > &u)
 
+

Detailed Description

+

template<typename F, typename T, int R, int C>
+struct stan::math::promoter< Eigen::Matrix< F, R, C >, Eigen::Matrix< T, R, C > >

+ + +

Definition at line 63 of file promoter.hpp.

+

Member Function Documentation

+ +
+
+
+template<typename F , typename T , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static void stan::math::promoter< Eigen::Matrix< F, R, C >, Eigen::Matrix< T, R, C > >::promote (const Eigen::Matrix< F, R, C > & u,
Eigen::Matrix< T, R, C > & t 
)
+
+inlinestatic
+
+ +

Definition at line 64 of file promoter.hpp.

+ +
+
+ +
+
+
+template<typename F , typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
static Eigen::Matrix<T, R, C> stan::math::promoter< Eigen::Matrix< F, R, C >, Eigen::Matrix< T, R, C > >::promote_to (const Eigen::Matrix< F, R, C > & u)
+
+inlinestatic
+
+ +

Definition at line 71 of file promoter.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promoter_3_01_eigen_1_1_matrix_3_01_f_00_01_r_00_01_c_01_4_00_01_eigen_1_19fcbf4e7bc8e106173bfa338a15054ff.html b/doc/api/html/structstan_1_1math_1_1promoter_3_01_eigen_1_1_matrix_3_01_f_00_01_r_00_01_c_01_4_00_01_eigen_1_19fcbf4e7bc8e106173bfa338a15054ff.html new file mode 100644 index 00000000000..6e976b1b61a --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promoter_3_01_eigen_1_1_matrix_3_01_f_00_01_r_00_01_c_01_4_00_01_eigen_1_19fcbf4e7bc8e106173bfa338a15054ff.html @@ -0,0 +1,115 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::promoter< Eigen::Matrix< F, R, C >, Eigen::Matrix< T, R, C > > Member List
+
+
+ +

This is the complete list of members for stan::math::promoter< Eigen::Matrix< F, R, C >, Eigen::Matrix< T, R, C > >, including all inherited members.

+ + + +
promote(const Eigen::Matrix< F, R, C > &u, Eigen::Matrix< T, R, C > &t)stan::math::promoter< Eigen::Matrix< F, R, C >, Eigen::Matrix< T, R, C > >inlinestatic
promote_to(const Eigen::Matrix< F, R, C > &u)stan::math::promoter< Eigen::Matrix< F, R, C >, Eigen::Matrix< T, R, C > >inlinestatic
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promoter_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_00_01_eigen_1_12d7fadf0560f1f2f3abc5388b7666f9c.html b/doc/api/html/structstan_1_1math_1_1promoter_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_00_01_eigen_1_12d7fadf0560f1f2f3abc5388b7666f9c.html new file mode 100644 index 00000000000..1dc3c05a491 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promoter_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_00_01_eigen_1_12d7fadf0560f1f2f3abc5388b7666f9c.html @@ -0,0 +1,199 @@ + + + + + + +Stan Math Library: stan::math::promoter< Eigen::Matrix< T, R, C >, Eigen::Matrix< T, R, C > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::promoter< Eigen::Matrix< T, R, C >, Eigen::Matrix< T, R, C > > Struct Template Reference
+
+
+ +

#include <promoter.hpp>

+ + + + + + +

+Static Public Member Functions

static void promote (const Eigen::Matrix< T, R, C > &u, Eigen::Matrix< T, R, C > &t)
 
static Eigen::Matrix< T, R, C > promote_to (const Eigen::Matrix< T, R, C > &u)
 
+

Detailed Description

+

template<typename T, int R, int C>
+struct stan::math::promoter< Eigen::Matrix< T, R, C >, Eigen::Matrix< T, R, C > >

+ + +

Definition at line 80 of file promoter.hpp.

+

Member Function Documentation

+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static void stan::math::promoter< Eigen::Matrix< T, R, C >, Eigen::Matrix< T, R, C > >::promote (const Eigen::Matrix< T, R, C > & u,
Eigen::Matrix< T, R, C > & t 
)
+
+inlinestatic
+
+ +

Definition at line 81 of file promoter.hpp.

+ +
+
+ +
+
+
+template<typename T , int R, int C>
+ + + + + +
+ + + + + + + + +
static Eigen::Matrix<T, R, C> stan::math::promoter< Eigen::Matrix< T, R, C >, Eigen::Matrix< T, R, C > >::promote_to (const Eigen::Matrix< T, R, C > & u)
+
+inlinestatic
+
+ +

Definition at line 86 of file promoter.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promoter_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_00_01_eigen_1_1ab38afe2feaa91a91579e3639d1f03b0.html b/doc/api/html/structstan_1_1math_1_1promoter_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_00_01_eigen_1_1ab38afe2feaa91a91579e3639d1f03b0.html new file mode 100644 index 00000000000..da907f4d2e4 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promoter_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_00_01_eigen_1_1ab38afe2feaa91a91579e3639d1f03b0.html @@ -0,0 +1,115 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::promoter< Eigen::Matrix< T, R, C >, Eigen::Matrix< T, R, C > > Member List
+
+
+ +

This is the complete list of members for stan::math::promoter< Eigen::Matrix< T, R, C >, Eigen::Matrix< T, R, C > >, including all inherited members.

+ + + +
promote(const Eigen::Matrix< T, R, C > &u, Eigen::Matrix< T, R, C > &t)stan::math::promoter< Eigen::Matrix< T, R, C >, Eigen::Matrix< T, R, C > >inlinestatic
promote_to(const Eigen::Matrix< T, R, C > &u)stan::math::promoter< Eigen::Matrix< T, R, C >, Eigen::Matrix< T, R, C > >inlinestatic
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promoter_3_01_t_00_01_t_01_4-members.html b/doc/api/html/structstan_1_1math_1_1promoter_3_01_t_00_01_t_01_4-members.html new file mode 100644 index 00000000000..05dacbd3816 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promoter_3_01_t_00_01_t_01_4-members.html @@ -0,0 +1,115 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::promoter< T, T > Member List
+
+
+ +

This is the complete list of members for stan::math::promoter< T, T >, including all inherited members.

+ + + +
promote(const T &u, T &t)stan::math::promoter< T, T >inlinestatic
promote_to(const T &u)stan::math::promoter< T, T >inlinestatic
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promoter_3_01_t_00_01_t_01_4.html b/doc/api/html/structstan_1_1math_1_1promoter_3_01_t_00_01_t_01_4.html new file mode 100644 index 00000000000..22a57a07d8c --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promoter_3_01_t_00_01_t_01_4.html @@ -0,0 +1,199 @@ + + + + + + +Stan Math Library: stan::math::promoter< T, T > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::promoter< T, T > Struct Template Reference
+
+
+ +

#include <promoter.hpp>

+ + + + + + +

+Static Public Member Functions

static void promote (const T &u, T &t)
 
static T promote_to (const T &u)
 
+

Detailed Description

+

template<typename T>
+struct stan::math::promoter< T, T >

+ + +

Definition at line 24 of file promoter.hpp.

+

Member Function Documentation

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static void stan::math::promoter< T, T >::promote (const T & u,
T & t 
)
+
+inlinestatic
+
+ +

Definition at line 25 of file promoter.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
static T stan::math::promoter< T, T >::promote_to (const T & u)
+
+inlinestatic
+
+ +

Definition at line 28 of file promoter.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promoter_3_01std_1_1vector_3_01_f_01_4_00_01std_1_1vector_3_01_t_01_4_01_4-members.html b/doc/api/html/structstan_1_1math_1_1promoter_3_01std_1_1vector_3_01_f_01_4_00_01std_1_1vector_3_01_t_01_4_01_4-members.html new file mode 100644 index 00000000000..e575eeb0874 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promoter_3_01std_1_1vector_3_01_f_01_4_00_01std_1_1vector_3_01_t_01_4_01_4-members.html @@ -0,0 +1,115 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::promoter< std::vector< F >, std::vector< T > > Member List
+
+
+ +

This is the complete list of members for stan::math::promoter< std::vector< F >, std::vector< T > >, including all inherited members.

+ + + +
promote(const std::vector< F > &u, std::vector< T > &t)stan::math::promoter< std::vector< F >, std::vector< T > >inlinestatic
promote_to(const std::vector< F > &u)stan::math::promoter< std::vector< F >, std::vector< T > >inlinestatic
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promoter_3_01std_1_1vector_3_01_f_01_4_00_01std_1_1vector_3_01_t_01_4_01_4.html b/doc/api/html/structstan_1_1math_1_1promoter_3_01std_1_1vector_3_01_f_01_4_00_01std_1_1vector_3_01_t_01_4_01_4.html new file mode 100644 index 00000000000..202acb8643c --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promoter_3_01std_1_1vector_3_01_f_01_4_00_01std_1_1vector_3_01_t_01_4_01_4.html @@ -0,0 +1,199 @@ + + + + + + +Stan Math Library: stan::math::promoter< std::vector< F >, std::vector< T > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::promoter< std::vector< F >, std::vector< T > > Struct Template Reference
+
+
+ +

#include <promoter.hpp>

+ + + + + + +

+Static Public Member Functions

static void promote (const std::vector< F > &u, std::vector< T > &t)
 
static std::vector< T > promote_to (const std::vector< F > &u)
 
+

Detailed Description

+

template<typename F, typename T>
+struct stan::math::promoter< std::vector< F >, std::vector< T > >

+ + +

Definition at line 35 of file promoter.hpp.

+

Member Function Documentation

+ +
+
+
+template<typename F , typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static void stan::math::promoter< std::vector< F >, std::vector< T > >::promote (const std::vector< F > & u,
std::vector< T > & t 
)
+
+inlinestatic
+
+ +

Definition at line 36 of file promoter.hpp.

+ +
+
+ +
+
+
+template<typename F , typename T >
+ + + + + +
+ + + + + + + + +
static std::vector<T> stan::math::promoter< std::vector< F >, std::vector< T > >::promote_to (const std::vector< F > & u)
+
+inlinestatic
+
+ +

Definition at line 43 of file promoter.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promoter_3_01std_1_1vector_3_01_t_01_4_00_01std_1_1vector_3_01_t_01_4_01_4-members.html b/doc/api/html/structstan_1_1math_1_1promoter_3_01std_1_1vector_3_01_t_01_4_00_01std_1_1vector_3_01_t_01_4_01_4-members.html new file mode 100644 index 00000000000..932ad778fdd --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promoter_3_01std_1_1vector_3_01_t_01_4_00_01std_1_1vector_3_01_t_01_4_01_4-members.html @@ -0,0 +1,115 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::promoter< std::vector< T >, std::vector< T > > Member List
+
+
+ +

This is the complete list of members for stan::math::promoter< std::vector< T >, std::vector< T > >, including all inherited members.

+ + + +
promote(const std::vector< T > &u, std::vector< T > &t)stan::math::promoter< std::vector< T >, std::vector< T > >inlinestatic
promote_to(const std::vector< T > &u)stan::math::promoter< std::vector< T >, std::vector< T > >inlinestatic
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1promoter_3_01std_1_1vector_3_01_t_01_4_00_01std_1_1vector_3_01_t_01_4_01_4.html b/doc/api/html/structstan_1_1math_1_1promoter_3_01std_1_1vector_3_01_t_01_4_00_01std_1_1vector_3_01_t_01_4_01_4.html new file mode 100644 index 00000000000..ecf2bab14a3 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1promoter_3_01std_1_1vector_3_01_t_01_4_00_01std_1_1vector_3_01_t_01_4_01_4.html @@ -0,0 +1,199 @@ + + + + + + +Stan Math Library: stan::math::promoter< std::vector< T >, std::vector< T > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::promoter< std::vector< T >, std::vector< T > > Struct Template Reference
+
+
+ +

#include <promoter.hpp>

+ + + + + + +

+Static Public Member Functions

static void promote (const std::vector< T > &u, std::vector< T > &t)
 
static std::vector< T > promote_to (const std::vector< T > &u)
 
+

Detailed Description

+

template<typename T>
+struct stan::math::promoter< std::vector< T >, std::vector< T > >

+ + +

Definition at line 51 of file promoter.hpp.

+

Member Function Documentation

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static void stan::math::promoter< std::vector< T >, std::vector< T > >::promote (const std::vector< T > & u,
std::vector< T > & t 
)
+
+inlinestatic
+
+ +

Definition at line 52 of file promoter.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
static std::vector<T> stan::math::promoter< std::vector< T >, std::vector< T > >::promote_to (const std::vector< T > & u)
+
+inlinestatic
+
+ +

Definition at line 56 of file promoter.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1store__type-members.html b/doc/api/html/structstan_1_1math_1_1store__type-members.html new file mode 100644 index 00000000000..0a0aaf56762 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1store__type-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::store_type< T > Member List
+
+
+ +

This is the complete list of members for stan::math::store_type< T >, including all inherited members.

+ + +
type typedefstan::math::store_type< T >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1store__type.html b/doc/api/html/structstan_1_1math_1_1store__type.html new file mode 100644 index 00000000000..9356de6b6d7 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1store__type.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan::math::store_type< T > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::store_type< T > Struct Template Reference
+
+
+ +

#include <seq_view.hpp>

+ + + + +

+Public Types

typedef const T & type
 
+

Detailed Description

+

template<typename T>
+struct stan::math::store_type< T >

+ + +

Definition at line 13 of file seq_view.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T>
+ + + + +
typedef const T& stan::math::store_type< T >::type
+
+ +

Definition at line 14 of file seq_view.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1store__type_3_01double_01_4-members.html b/doc/api/html/structstan_1_1math_1_1store__type_3_01double_01_4-members.html new file mode 100644 index 00000000000..8847a6a61a8 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1store__type_3_01double_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::store_type< double > Member List
+
+
+ +

This is the complete list of members for stan::math::store_type< double >, including all inherited members.

+ + +
type typedefstan::math::store_type< double >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1store__type_3_01double_01_4.html b/doc/api/html/structstan_1_1math_1_1store__type_3_01double_01_4.html new file mode 100644 index 00000000000..7f5c516a0ce --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1store__type_3_01double_01_4.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan::math::store_type< double > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::store_type< double > Struct Template Reference
+
+
+ +

#include <seq_view.hpp>

+ + + + +

+Public Types

typedef const double type
 
+

Detailed Description

+

template<>
+struct stan::math::store_type< double >

+ + +

Definition at line 17 of file seq_view.hpp.

+

Member Typedef Documentation

+ +
+
+ + + + +
typedef const double stan::math::store_type< double >::type
+
+ +

Definition at line 18 of file seq_view.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1store__type_3_01int_01_4-members.html b/doc/api/html/structstan_1_1math_1_1store__type_3_01int_01_4-members.html new file mode 100644 index 00000000000..8645d07cfbf --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1store__type_3_01int_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::store_type< int > Member List
+
+
+ +

This is the complete list of members for stan::math::store_type< int >, including all inherited members.

+ + +
type typedefstan::math::store_type< int >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1store__type_3_01int_01_4.html b/doc/api/html/structstan_1_1math_1_1store__type_3_01int_01_4.html new file mode 100644 index 00000000000..7d02c22db26 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1store__type_3_01int_01_4.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan::math::store_type< int > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::store_type< int > Struct Template Reference
+
+
+ +

#include <seq_view.hpp>

+ + + + +

+Public Types

typedef const int type
 
+

Detailed Description

+

template<>
+struct stan::math::store_type< int >

+ + +

Definition at line 21 of file seq_view.hpp.

+

Member Typedef Documentation

+ +
+
+ + + + +
typedef const int stan::math::store_type< int >::type
+
+ +

Definition at line 22 of file seq_view.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1value__type.html b/doc/api/html/structstan_1_1math_1_1value__type.html new file mode 100644 index 00000000000..3a25cc7cae8 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1value__type.html @@ -0,0 +1,127 @@ + + + + + + +Stan Math Library: stan::math::value_type< T > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::value_type< T > Struct Template Reference
+
+
+ +

Primary template class for metaprogram to compute the type of values stored in a container. + More...

+ +

#include <value_type.hpp>

+

Detailed Description

+

template<typename T>
+struct stan::math::value_type< T >

+ +

Primary template class for metaprogram to compute the type of values stored in a container.

+

Only the specializations have behavior that can be used, and all implement a typedef type for the type of the values in the container.

+

tparam T type of container.

+ +

Definition at line 21 of file value_type.hpp.

+

The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1value__type_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4-members.html b/doc/api/html/structstan_1_1math_1_1value__type_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4-members.html new file mode 100644 index 00000000000..56af7d7fa8d --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1value__type_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::value_type< Eigen::Matrix< T, R, C > > Member List
+
+
+ +

This is the complete list of members for stan::math::value_type< Eigen::Matrix< T, R, C > >, including all inherited members.

+ + +
type typedefstan::math::value_type< Eigen::Matrix< T, R, C > >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1value__type_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4.html b/doc/api/html/structstan_1_1math_1_1value__type_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4.html new file mode 100644 index 00000000000..0fd91609caf --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1value__type_3_01_eigen_1_1_matrix_3_01_t_00_01_r_00_01_c_01_4_01_4.html @@ -0,0 +1,160 @@ + + + + + + +Stan Math Library: stan::math::value_type< Eigen::Matrix< T, R, C > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::value_type< Eigen::Matrix< T, R, C > > Struct Template Reference
+
+
+ +

Template metaprogram defining the type of values stored in an Eigen matrix, vector, or row vector. + More...

+ +

#include <value_type.hpp>

+ + + + +

+Public Types

typedef Eigen::Matrix< T, R, C >
+::Scalar 
type
 
+

Detailed Description

+

template<typename T, int R, int C>
+struct stan::math::value_type< Eigen::Matrix< T, R, C > >

+ +

Template metaprogram defining the type of values stored in an Eigen matrix, vector, or row vector.

+
Template Parameters
+ + + + +
Ttype of matrix.
Rnumber of rows for matrix.
Cnumber of columns for matrix.
+
+
+ +

Definition at line 20 of file value_type.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T , int R, int C>
+ + + + +
typedef Eigen::Matrix<T, R, C>::Scalar stan::math::value_type< Eigen::Matrix< T, R, C > >::type
+
+ +

Definition at line 21 of file value_type.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1value__type_3_01const_01_t_01_4-members.html b/doc/api/html/structstan_1_1math_1_1value__type_3_01const_01_t_01_4-members.html new file mode 100644 index 00000000000..126cfc6383b --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1value__type_3_01const_01_t_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::value_type< const T > Member List
+
+
+ +

This is the complete list of members for stan::math::value_type< const T >, including all inherited members.

+ + +
type typedefstan::math::value_type< const T >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1value__type_3_01const_01_t_01_4.html b/doc/api/html/structstan_1_1math_1_1value__type_3_01const_01_t_01_4.html new file mode 100644 index 00000000000..554a1588cdc --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1value__type_3_01const_01_t_01_4.html @@ -0,0 +1,157 @@ + + + + + + +Stan Math Library: stan::math::value_type< const T > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::value_type< const T > Struct Template Reference
+
+
+ +

Template class for metaprogram to compute the type of values stored in a constant container. + More...

+ +

#include <value_type.hpp>

+ + + + +

+Public Types

typedef value_type< T >::type type
 
+

Detailed Description

+

template<typename T>
+struct stan::math::value_type< const T >

+ +

Template class for metaprogram to compute the type of values stored in a constant container.

+
Template Parameters
+ + +
Ttype of container without const modifier.
+
+
+ +

Definition at line 32 of file value_type.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T >
+ + + + +
typedef value_type<T>::type stan::math::value_type< const T >::type
+
+ +

Definition at line 33 of file value_type.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1value__type_3_01std_1_1vector_3_01_t_01_4_01_4-members.html b/doc/api/html/structstan_1_1math_1_1value__type_3_01std_1_1vector_3_01_t_01_4_01_4-members.html new file mode 100644 index 00000000000..96d4d1b4eaf --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1value__type_3_01std_1_1vector_3_01_t_01_4_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::math::value_type< std::vector< T > > Member List
+
+
+ +

This is the complete list of members for stan::math::value_type< std::vector< T > >, including all inherited members.

+ + +
type typedefstan::math::value_type< std::vector< T > >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1math_1_1value__type_3_01std_1_1vector_3_01_t_01_4_01_4.html b/doc/api/html/structstan_1_1math_1_1value__type_3_01std_1_1vector_3_01_t_01_4_01_4.html new file mode 100644 index 00000000000..a1f9ce9de67 --- /dev/null +++ b/doc/api/html/structstan_1_1math_1_1value__type_3_01std_1_1vector_3_01_t_01_4_01_4.html @@ -0,0 +1,161 @@ + + + + + + +Stan Math Library: stan::math::value_type< std::vector< T > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::math::value_type< std::vector< T > > Struct Template Reference
+
+
+ +

Template metaprogram class to compute the type of values stored in a standard vector. + More...

+ +

#include <value_type.hpp>

+ + + + + +

+Public Types

typedef std::vector< T >
+::value_type 
type
 Type of value stored in a standard vector with type T entries. More...
 
+

Detailed Description

+

template<typename T>
+struct stan::math::value_type< std::vector< T > >

+ +

Template metaprogram class to compute the type of values stored in a standard vector.

+
Template Parameters
+ + +
Ttype of elements in standard vector.
+
+
+ +

Definition at line 44 of file value_type.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T >
+ + + + +
typedef std::vector<T>::value_type stan::math::value_type< std::vector< T > >::type
+
+ +

Type of value stored in a standard vector with type T entries.

+ +

Definition at line 49 of file value_type.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1partials__return__type-members.html b/doc/api/html/structstan_1_1partials__return__type-members.html new file mode 100644 index 00000000000..5c47674cb3b --- /dev/null +++ b/doc/api/html/structstan_1_1partials__return__type-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::partials_return_type< T1, T2, T3, T4, T5, T6 > Member List
+
+
+ +

This is the complete list of members for stan::partials_return_type< T1, T2, T3, T4, T5, T6 >, including all inherited members.

+ + +
type typedefstan::partials_return_type< T1, T2, T3, T4, T5, T6 >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1partials__return__type.html b/doc/api/html/structstan_1_1partials__return__type.html new file mode 100644 index 00000000000..e6c689f66b1 --- /dev/null +++ b/doc/api/html/structstan_1_1partials__return__type.html @@ -0,0 +1,164 @@ + + + + + + +Stan Math Library: stan::partials_return_type< T1, T2, T3, T4, T5, T6 > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::partials_return_type< T1, T2, T3, T4, T5, T6 > Struct Template Reference
+
+
+ +

#include <partials_return_type.hpp>

+ + + + +

+Public Types

typedef
+boost::math::tools::promote_args
+< typename partials_type
+< typename scalar_type< T1 >
+::type >::type, typename
+partials_type< typename
+scalar_type< T2 >::type >
+::type, typename partials_type
+< typename scalar_type< T3 >
+::type >::type, typename
+partials_type< typename
+scalar_type< T4 >::type >
+::type, typename partials_type
+< typename scalar_type< T5 >
+::type >::type, typename
+partials_type< typename
+scalar_type< T6 >::type >
+::type >::type 
type
 
+

Detailed Description

+

template<typename T1, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double>
+struct stan::partials_return_type< T1, T2, T3, T4, T5, T6 >

+ + +

Definition at line 16 of file partials_return_type.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T1, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double>
+ + + + +
typedef boost::math::tools::promote_args<typename partials_type<typename scalar_type<T1>::type>::type, typename partials_type<typename scalar_type<T2>::type>::type, typename partials_type<typename scalar_type<T3>::type>::type, typename partials_type<typename scalar_type<T4>::type>::type, typename partials_type<typename scalar_type<T5>::type>::type, typename partials_type<typename scalar_type<T6>::type>::type>::type stan::partials_return_type< T1, T2, T3, T4, T5, T6 >::type
+
+ +

Definition at line 26 of file partials_return_type.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1partials__type-members.html b/doc/api/html/structstan_1_1partials__type-members.html new file mode 100644 index 00000000000..68f833949f1 --- /dev/null +++ b/doc/api/html/structstan_1_1partials__type-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::partials_type< T > Member List
+
+
+ +

This is the complete list of members for stan::partials_type< T >, including all inherited members.

+ + +
type typedefstan::partials_type< T >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1partials__type.html b/doc/api/html/structstan_1_1partials__type.html new file mode 100644 index 00000000000..4140bc73a9d --- /dev/null +++ b/doc/api/html/structstan_1_1partials__type.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan::partials_type< T > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::partials_type< T > Struct Template Reference
+
+
+ +

#include <partials_type.hpp>

+ + + + +

+Public Types

typedef T type
 
+

Detailed Description

+

template<typename T>
+struct stan::partials_type< T >

+ + +

Definition at line 7 of file partials_type.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T >
+ + + + +
typedef T stan::partials_type< T >::type
+
+ +

Definition at line 8 of file partials_type.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1partials__type_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4-members.html b/doc/api/html/structstan_1_1partials__type_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4-members.html new file mode 100644 index 00000000000..9d239af88de --- /dev/null +++ b/doc/api/html/structstan_1_1partials__type_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::partials_type< stan::math::fvar< T > > Member List
+
+
+ +

This is the complete list of members for stan::partials_type< stan::math::fvar< T > >, including all inherited members.

+ + +
type typedefstan::partials_type< stan::math::fvar< T > >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1partials__type_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html b/doc/api/html/structstan_1_1partials__type_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html new file mode 100644 index 00000000000..58d14e314f6 --- /dev/null +++ b/doc/api/html/structstan_1_1partials__type_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan::partials_type< stan::math::fvar< T > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::partials_type< stan::math::fvar< T > > Struct Template Reference
+
+
+ +

#include <partials_type.hpp>

+ + + + +

+Public Types

typedef T type
 
+

Detailed Description

+

template<typename T>
+struct stan::partials_type< stan::math::fvar< T > >

+ + +

Definition at line 10 of file partials_type.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T >
+ + + + +
typedef T stan::partials_type< stan::math::fvar< T > >::type
+
+ +

Definition at line 11 of file partials_type.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1partials__type_3_01stan_1_1math_1_1var_01_4-members.html b/doc/api/html/structstan_1_1partials__type_3_01stan_1_1math_1_1var_01_4-members.html new file mode 100644 index 00000000000..285a42cb067 --- /dev/null +++ b/doc/api/html/structstan_1_1partials__type_3_01stan_1_1math_1_1var_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::partials_type< stan::math::var > Member List
+
+
+ +

This is the complete list of members for stan::partials_type< stan::math::var >, including all inherited members.

+ + +
type typedefstan::partials_type< stan::math::var >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1partials__type_3_01stan_1_1math_1_1var_01_4.html b/doc/api/html/structstan_1_1partials__type_3_01stan_1_1math_1_1var_01_4.html new file mode 100644 index 00000000000..8f00cf74ab9 --- /dev/null +++ b/doc/api/html/structstan_1_1partials__type_3_01stan_1_1math_1_1var_01_4.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan::partials_type< stan::math::var > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::partials_type< stan::math::var > Struct Template Reference
+
+
+ +

#include <partials_type.hpp>

+ + + + +

+Public Types

typedef double type
 
+

Detailed Description

+

template<>
+struct stan::partials_type< stan::math::var >

+ + +

Definition at line 10 of file partials_type.hpp.

+

Member Typedef Documentation

+ +
+
+ + + + +
typedef double stan::partials_type< stan::math::var >::type
+
+ +

Definition at line 11 of file partials_type.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1return__type-members.html b/doc/api/html/structstan_1_1return__type-members.html new file mode 100644 index 00000000000..4c330627cc1 --- /dev/null +++ b/doc/api/html/structstan_1_1return__type-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::return_type< T1, T2, T3, T4, T5, T6 > Member List
+
+
+ +

This is the complete list of members for stan::return_type< T1, T2, T3, T4, T5, T6 >, including all inherited members.

+ + +
type typedefstan::return_type< T1, T2, T3, T4, T5, T6 >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1return__type.html b/doc/api/html/structstan_1_1return__type.html new file mode 100644 index 00000000000..9ba1d445338 --- /dev/null +++ b/doc/api/html/structstan_1_1return__type.html @@ -0,0 +1,161 @@ + + + + + + +Stan Math Library: stan::return_type< T1, T2, T3, T4, T5, T6 > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::return_type< T1, T2, T3, T4, T5, T6 > Struct Template Reference
+
+
+ +

Metaprogram to calculate the base scalar return type resulting from promoting all the scalar types of the template parameters. + More...

+ +

#include <return_type.hpp>

+ + + + +

+Public Types

typedef
+boost::math::tools::promote_args
+< typename scalar_type< T1 >
+::type, typename scalar_type
+< T2 >::type, typename
+scalar_type< T3 >::type,
+typename scalar_type< T4 >
+::type, typename scalar_type
+< T5 >::type, typename
+scalar_type< T6 >::type >
+::type 
type
 
+

Detailed Description

+

template<typename T1, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double>
+struct stan::return_type< T1, T2, T3, T4, T5, T6 >

+ +

Metaprogram to calculate the base scalar return type resulting from promoting all the scalar types of the template parameters.

+ +

Definition at line 19 of file return_type.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T1, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double>
+ + + + +
typedef boost::math::tools::promote_args<typename scalar_type<T1>::type, typename scalar_type<T2>::type, typename scalar_type<T3>::type, typename scalar_type<T4>::type, typename scalar_type<T5>::type, typename scalar_type<T6>::type>::type stan::return_type< T1, T2, T3, T4, T5, T6 >::type
+
+ +

Definition at line 27 of file return_type.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1scalar__type-members.html b/doc/api/html/structstan_1_1scalar__type-members.html new file mode 100644 index 00000000000..fcb015639e2 --- /dev/null +++ b/doc/api/html/structstan_1_1scalar__type-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::scalar_type< T > Member List
+
+
+ +

This is the complete list of members for stan::scalar_type< T >, including all inherited members.

+ + +
type typedefstan::scalar_type< T >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1scalar__type.html b/doc/api/html/structstan_1_1scalar__type.html new file mode 100644 index 00000000000..5ca4ca39038 --- /dev/null +++ b/doc/api/html/structstan_1_1scalar__type.html @@ -0,0 +1,160 @@ + + + + + + +Stan Math Library: stan::scalar_type< T > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::scalar_type< T > Struct Template Reference
+
+
+ +

Metaprogram structure to determine the base scalar type of a template argument. + More...

+ +

#include <scalar_type.hpp>

+ + + + +

+Public Types

typedef scalar_type_helper
+< is_vector< T >::value, T >
+::type 
type
 
+

Detailed Description

+

template<typename T>
+struct stan::scalar_type< T >

+ +

Metaprogram structure to determine the base scalar type of a template argument.

+

This base class should be specialized for structured types.

+
Template Parameters
+ + +
TType of object.
+
+
+ +

Definition at line 37 of file scalar_type.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T>
+ + + + +
typedef scalar_type_helper<is_vector<T>::value, T>::type stan::scalar_type< T >::type
+
+ +

Definition at line 38 of file scalar_type.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1scalar__type_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4-members.html b/doc/api/html/structstan_1_1scalar__type_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4-members.html new file mode 100644 index 00000000000..e672903cd60 --- /dev/null +++ b/doc/api/html/structstan_1_1scalar__type_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::scalar_type< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > > Member List
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1scalar__type_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4.html b/doc/api/html/structstan_1_1scalar__type_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4.html new file mode 100644 index 00000000000..fc182acba36 --- /dev/null +++ b/doc/api/html/structstan_1_1scalar__type_3_01_eigen_1_1_matrix_3_01_t_00_01_eigen_1_1_dynamic_00_01_eigen_1_1_dynamic_01_4_01_4.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan::scalar_type< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::scalar_type< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > > Struct Template Reference
+
+
+ +

#include <scalar_type.hpp>

+ + + + +

+Public Types

typedef scalar_type< T >::type type
 
+

Detailed Description

+

template<typename T>
+struct stan::scalar_type< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > >

+ + +

Definition at line 43 of file scalar_type.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T >
+ + + + +
typedef scalar_type<T>::type stan::scalar_type< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > >::type
+
+ +

Definition at line 44 of file scalar_type.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1scalar__type_3_01_t_01_5_01_4-members.html b/doc/api/html/structstan_1_1scalar__type_3_01_t_01_5_01_4-members.html new file mode 100644 index 00000000000..17e55d3971a --- /dev/null +++ b/doc/api/html/structstan_1_1scalar__type_3_01_t_01_5_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::scalar_type< T * > Member List
+
+
+ +

This is the complete list of members for stan::scalar_type< T * >, including all inherited members.

+ + +
type typedefstan::scalar_type< T * >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1scalar__type_3_01_t_01_5_01_4.html b/doc/api/html/structstan_1_1scalar__type_3_01_t_01_5_01_4.html new file mode 100644 index 00000000000..e6edcc905e9 --- /dev/null +++ b/doc/api/html/structstan_1_1scalar__type_3_01_t_01_5_01_4.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan::scalar_type< T * > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::scalar_type< T * > Struct Template Reference
+
+
+ +

#include <scalar_type.hpp>

+ + + + +

+Public Types

typedef scalar_type< T >::type type
 
+

Detailed Description

+

template<typename T>
+struct stan::scalar_type< T * >

+ + +

Definition at line 48 of file scalar_type.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T >
+ + + + +
typedef scalar_type<T>::type stan::scalar_type< T * >::type
+
+ +

Definition at line 49 of file scalar_type.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1scalar__type__pre-members.html b/doc/api/html/structstan_1_1scalar__type__pre-members.html new file mode 100644 index 00000000000..60a75ffbb73 --- /dev/null +++ b/doc/api/html/structstan_1_1scalar__type__pre-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::scalar_type_pre< T > Member List
+
+
+ +

This is the complete list of members for stan::scalar_type_pre< T >, including all inherited members.

+ + +
type typedefstan::scalar_type_pre< T >
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1scalar__type__pre.html b/doc/api/html/structstan_1_1scalar__type__pre.html new file mode 100644 index 00000000000..379c43f2a6c --- /dev/null +++ b/doc/api/html/structstan_1_1scalar__type__pre.html @@ -0,0 +1,162 @@ + + + + + + +Stan Math Library: stan::scalar_type_pre< T > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::scalar_type_pre< T > Struct Template Reference
+
+
+ +

Metaprogram structure to determine the type of first container of the base scalar type of a template argument. + More...

+ +

#include <scalar_type_pre.hpp>

+ + + + +

+Public Types

typedef scalar_type_helper_pre
+< is_vector< typename
+stan::math::value_type< T >
+::type >::value, typename
+stan::math::value_type< T >
+::type, T >::type 
type
 
+

Detailed Description

+

template<typename T>
+struct stan::scalar_type_pre< T >

+ +

Metaprogram structure to determine the type of first container of the base scalar type of a template argument.

+
Template Parameters
+ + +
TType of object.
+
+
+ +

Definition at line 37 of file scalar_type_pre.hpp.

+

Member Typedef Documentation

+ +
+
+
+template<typename T>
+ + + + +
typedef scalar_type_helper_pre<is_vector <typename stan::math::value_type<T>::type>::value, typename stan::math::value_type<T>::type, T>::type stan::scalar_type_pre< T >::type
+
+ +

Definition at line 42 of file scalar_type_pre.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1size__of__helper-members.html b/doc/api/html/structstan_1_1size__of__helper-members.html new file mode 100644 index 00000000000..7a86085f4ac --- /dev/null +++ b/doc/api/html/structstan_1_1size__of__helper-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::size_of_helper< T, is_vec > Member List
+
+
+ +

This is the complete list of members for stan::size_of_helper< T, is_vec >, including all inherited members.

+ + +
size_of(const T &)stan::size_of_helper< T, is_vec >inlinestatic
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1size__of__helper.html b/doc/api/html/structstan_1_1size__of__helper.html new file mode 100644 index 00000000000..5b52c997225 --- /dev/null +++ b/doc/api/html/structstan_1_1size__of__helper.html @@ -0,0 +1,159 @@ + + + + + + +Stan Math Library: stan::size_of_helper< T, is_vec > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::size_of_helper< T, is_vec > Struct Template Reference
+
+
+ +

#include <size_of.hpp>

+ + + + +

+Static Public Member Functions

static size_t size_of (const T &)
 
+

Detailed Description

+

template<typename T, bool is_vec>
+struct stan::size_of_helper< T, is_vec >

+ + +

Definition at line 13 of file size_of.hpp.

+

Member Function Documentation

+ +
+
+
+template<typename T, bool is_vec>
+ + + + + +
+ + + + + + + + +
static size_t stan::size_of_helper< T, is_vec >::size_of (const T & )
+
+inlinestatic
+
+ +

Definition at line 14 of file size_of.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1size__of__helper_3_01_t_00_01true_01_4-members.html b/doc/api/html/structstan_1_1size__of__helper_3_01_t_00_01true_01_4-members.html new file mode 100644 index 00000000000..4405e49a633 --- /dev/null +++ b/doc/api/html/structstan_1_1size__of__helper_3_01_t_00_01true_01_4-members.html @@ -0,0 +1,114 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
stan::size_of_helper< T, true > Member List
+
+
+ +

This is the complete list of members for stan::size_of_helper< T, true >, including all inherited members.

+ + +
size_of(const T &x)stan::size_of_helper< T, true >inlinestatic
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstan_1_1size__of__helper_3_01_t_00_01true_01_4.html b/doc/api/html/structstan_1_1size__of__helper_3_01_t_00_01true_01_4.html new file mode 100644 index 00000000000..e7d711db641 --- /dev/null +++ b/doc/api/html/structstan_1_1size__of__helper_3_01_t_00_01true_01_4.html @@ -0,0 +1,159 @@ + + + + + + +Stan Math Library: stan::size_of_helper< T, true > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
stan::size_of_helper< T, true > Struct Template Reference
+
+
+ +

#include <size_of.hpp>

+ + + + +

+Static Public Member Functions

static size_t size_of (const T &x)
 
+

Detailed Description

+

template<typename T>
+struct stan::size_of_helper< T, true >

+ + +

Definition at line 20 of file size_of.hpp.

+

Member Function Documentation

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
static size_t stan::size_of_helper< T, true >::size_of (const T & x)
+
+inlinestatic
+
+ +

Definition at line 21 of file size_of.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4-members.html b/doc/api/html/structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4-members.html new file mode 100644 index 00000000000..166146097bd --- /dev/null +++ b/doc/api/html/structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4-members.html @@ -0,0 +1,143 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
std::numeric_limits< stan::math::fvar< T > > Member List
+
+
+ +

This is the complete list of members for std::numeric_limits< stan::math::fvar< T > >, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
denorm_min()std::numeric_limits< stan::math::fvar< T > >inlinestatic
digitsstd::numeric_limits< stan::math::fvar< T > >static
digits10std::numeric_limits< stan::math::fvar< T > >static
epsilon()std::numeric_limits< stan::math::fvar< T > >inlinestatic
has_denormstd::numeric_limits< stan::math::fvar< T > >static
has_denorm_lossstd::numeric_limits< stan::math::fvar< T > >static
has_infinitystd::numeric_limits< stan::math::fvar< T > >static
has_quiet_NaNstd::numeric_limits< stan::math::fvar< T > >static
has_signaling_NaNstd::numeric_limits< stan::math::fvar< T > >static
infinity()std::numeric_limits< stan::math::fvar< T > >inlinestatic
is_boundedstd::numeric_limits< stan::math::fvar< T > >static
is_exactstd::numeric_limits< stan::math::fvar< T > >static
is_iec559std::numeric_limits< stan::math::fvar< T > >static
is_integerstd::numeric_limits< stan::math::fvar< T > >static
is_modulostd::numeric_limits< stan::math::fvar< T > >static
is_signedstd::numeric_limits< stan::math::fvar< T > >static
is_specializedstd::numeric_limits< stan::math::fvar< T > >static
max()std::numeric_limits< stan::math::fvar< T > >inlinestatic
max_exponentstd::numeric_limits< stan::math::fvar< T > >static
max_exponent10std::numeric_limits< stan::math::fvar< T > >static
min()std::numeric_limits< stan::math::fvar< T > >inlinestatic
min_exponentstd::numeric_limits< stan::math::fvar< T > >static
min_exponent10std::numeric_limits< stan::math::fvar< T > >static
quiet_NaN()std::numeric_limits< stan::math::fvar< T > >inlinestatic
radixstd::numeric_limits< stan::math::fvar< T > >static
round_error()std::numeric_limits< stan::math::fvar< T > >inlinestatic
round_stylestd::numeric_limits< stan::math::fvar< T > >static
signaling_NaN()std::numeric_limits< stan::math::fvar< T > >inlinestatic
tinyness_beforestd::numeric_limits< stan::math::fvar< T > >static
trapsstd::numeric_limits< stan::math::fvar< T > >static
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html b/doc/api/html/structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html new file mode 100644 index 00000000000..2aabb466450 --- /dev/null +++ b/doc/api/html/structstd_1_1numeric__limits_3_01stan_1_1math_1_1fvar_3_01_t_01_4_01_4.html @@ -0,0 +1,944 @@ + + + + + + +Stan Math Library: std::numeric_limits< stan::math::fvar< T > > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
std::numeric_limits< stan::math::fvar< T > > Struct Template Reference
+
+
+ +

#include <std_numeric_limits.hpp>

+ + + + + + + + + + + + + + + + + + +

+Static Public Member Functions

static stan::math::fvar< T > min ()
 
static stan::math::fvar< T > max ()
 
static stan::math::fvar< T > epsilon ()
 
static stan::math::fvar< T > round_error ()
 
static stan::math::fvar< T > infinity ()
 
static stan::math::fvar< T > quiet_NaN ()
 
static stan::math::fvar< T > signaling_NaN ()
 
static stan::math::fvar< T > denorm_min ()
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Static Public Attributes

static const bool is_specialized = true
 
static const int digits = numeric_limits<double>::digits
 
static const int digits10 = numeric_limits<double>::digits10
 
static const bool is_signed = numeric_limits<double>::is_signed
 
static const bool is_integer = numeric_limits<double>::is_integer
 
static const bool is_exact = numeric_limits<double>::is_exact
 
static const int radix = numeric_limits<double>::radix
 
static const int min_exponent = numeric_limits<double>::min_exponent
 
static const int min_exponent10 = numeric_limits<double>::min_exponent10
 
static const int max_exponent = numeric_limits<double>::max_exponent
 
static const int max_exponent10 = numeric_limits<double>::max_exponent10
 
static const bool has_infinity = numeric_limits<double>::has_infinity
 
static const bool has_quiet_NaN = numeric_limits<double>::has_quiet_NaN
 
static const bool has_signaling_NaN
 
static const float_denorm_style has_denorm
 
static const bool has_denorm_loss = numeric_limits<double>::has_denorm_loss
 
static const bool is_iec559 = numeric_limits<double>::is_iec559
 
static const bool is_bounded = numeric_limits<double>::is_bounded
 
static const bool is_modulo = numeric_limits<double>::is_modulo
 
static const bool traps = numeric_limits<double>::traps
 
static const bool tinyness_before = numeric_limits<double>::tinyness_before
 
static const float_round_style round_style
 
+

Detailed Description

+

template<typename T>
+struct std::numeric_limits< stan::math::fvar< T > >

+ + +

Definition at line 11 of file std_numeric_limits.hpp.

+

Member Function Documentation

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + +
static stan::math::fvar<T> std::numeric_limits< stan::math::fvar< T > >::denorm_min ()
+
+inlinestatic
+
+ +

Definition at line 44 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + +
static stan::math::fvar<T> std::numeric_limits< stan::math::fvar< T > >::epsilon ()
+
+inlinestatic
+
+ +

Definition at line 21 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + +
static stan::math::fvar<T> std::numeric_limits< stan::math::fvar< T > >::infinity ()
+
+inlinestatic
+
+ +

Definition at line 38 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + +
static stan::math::fvar<T> std::numeric_limits< stan::math::fvar< T > >::max ()
+
+inlinestatic
+
+ +

Definition at line 14 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + +
static stan::math::fvar<T> std::numeric_limits< stan::math::fvar< T > >::min ()
+
+inlinestatic
+
+ +

Definition at line 13 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + +
static stan::math::fvar<T> std::numeric_limits< stan::math::fvar< T > >::quiet_NaN ()
+
+inlinestatic
+
+ +

Definition at line 40 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + +
static stan::math::fvar<T> std::numeric_limits< stan::math::fvar< T > >::round_error ()
+
+inlinestatic
+
+ +

Definition at line 23 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + +
static stan::math::fvar<T> std::numeric_limits< stan::math::fvar< T > >::signaling_NaN ()
+
+inlinestatic
+
+ +

Definition at line 42 of file std_numeric_limits.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + +
const int std::numeric_limits< stan::math::fvar< T > >::digits = numeric_limits<double>::digits
+
+static
+
+ +

Definition at line 15 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + +
const int std::numeric_limits< stan::math::fvar< T > >::digits10 = numeric_limits<double>::digits10
+
+static
+
+ +

Definition at line 16 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + +
const float_denorm_style std::numeric_limits< stan::math::fvar< T > >::has_denorm
+
+static
+
+Initial value:
=
+
numeric_limits<double>::has_denorm
+
+

Definition at line 35 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + +
const bool std::numeric_limits< stan::math::fvar< T > >::has_denorm_loss = numeric_limits<double>::has_denorm_loss
+
+static
+
+ +

Definition at line 37 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + +
const bool std::numeric_limits< stan::math::fvar< T > >::has_infinity = numeric_limits<double>::has_infinity
+
+static
+
+ +

Definition at line 31 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + +
const bool std::numeric_limits< stan::math::fvar< T > >::has_quiet_NaN = numeric_limits<double>::has_quiet_NaN
+
+static
+
+ +

Definition at line 32 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + +
const bool std::numeric_limits< stan::math::fvar< T > >::has_signaling_NaN
+
+static
+
+Initial value:
=
+
numeric_limits<double>::has_signaling_NaN
+
+

Definition at line 33 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + +
const bool std::numeric_limits< stan::math::fvar< T > >::is_bounded = numeric_limits<double>::is_bounded
+
+static
+
+ +

Definition at line 48 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + +
const bool std::numeric_limits< stan::math::fvar< T > >::is_exact = numeric_limits<double>::is_exact
+
+static
+
+ +

Definition at line 19 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + +
const bool std::numeric_limits< stan::math::fvar< T > >::is_iec559 = numeric_limits<double>::is_iec559
+
+static
+
+ +

Definition at line 47 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + +
const bool std::numeric_limits< stan::math::fvar< T > >::is_integer = numeric_limits<double>::is_integer
+
+static
+
+ +

Definition at line 18 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + +
const bool std::numeric_limits< stan::math::fvar< T > >::is_modulo = numeric_limits<double>::is_modulo
+
+static
+
+ +

Definition at line 49 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + +
const bool std::numeric_limits< stan::math::fvar< T > >::is_signed = numeric_limits<double>::is_signed
+
+static
+
+ +

Definition at line 17 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + +
const bool std::numeric_limits< stan::math::fvar< T > >::is_specialized = true
+
+static
+
+ +

Definition at line 12 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + +
const int std::numeric_limits< stan::math::fvar< T > >::max_exponent = numeric_limits<double>::max_exponent
+
+static
+
+ +

Definition at line 28 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + +
const int std::numeric_limits< stan::math::fvar< T > >::max_exponent10 = numeric_limits<double>::max_exponent10
+
+static
+
+ +

Definition at line 29 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + +
const int std::numeric_limits< stan::math::fvar< T > >::min_exponent = numeric_limits<double>::min_exponent
+
+static
+
+ +

Definition at line 26 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + +
const int std::numeric_limits< stan::math::fvar< T > >::min_exponent10 = numeric_limits<double>::min_exponent10
+
+static
+
+ +

Definition at line 27 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + +
const int std::numeric_limits< stan::math::fvar< T > >::radix = numeric_limits<double>::radix
+
+static
+
+ +

Definition at line 20 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + +
const float_round_style std::numeric_limits< stan::math::fvar< T > >::round_style
+
+static
+
+Initial value:
=
+
numeric_limits<double>::round_style
+
+

Definition at line 53 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + +
const bool std::numeric_limits< stan::math::fvar< T > >::tinyness_before = numeric_limits<double>::tinyness_before
+
+static
+
+ +

Definition at line 52 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + +
const bool std::numeric_limits< stan::math::fvar< T > >::traps = numeric_limits<double>::traps
+
+static
+
+ +

Definition at line 51 of file std_numeric_limits.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4-members.html b/doc/api/html/structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4-members.html new file mode 100644 index 00000000000..66cfb67b1fc --- /dev/null +++ b/doc/api/html/structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4-members.html @@ -0,0 +1,143 @@ + + + + + + +Stan Math Library: Member List + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
std::numeric_limits< stan::math::var > Member List
+
+
+ +

This is the complete list of members for std::numeric_limits< stan::math::var >, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
denorm_min()std::numeric_limits< stan::math::var >inlinestatic
digitsstd::numeric_limits< stan::math::var >static
digits10std::numeric_limits< stan::math::var >static
epsilon()std::numeric_limits< stan::math::var >inlinestatic
has_denormstd::numeric_limits< stan::math::var >static
has_denorm_lossstd::numeric_limits< stan::math::var >static
has_infinitystd::numeric_limits< stan::math::var >static
has_quiet_NaNstd::numeric_limits< stan::math::var >static
has_signaling_NaNstd::numeric_limits< stan::math::var >static
infinity()std::numeric_limits< stan::math::var >inlinestatic
is_boundedstd::numeric_limits< stan::math::var >static
is_exactstd::numeric_limits< stan::math::var >static
is_iec559std::numeric_limits< stan::math::var >static
is_integerstd::numeric_limits< stan::math::var >static
is_modulostd::numeric_limits< stan::math::var >static
is_signedstd::numeric_limits< stan::math::var >static
is_specializedstd::numeric_limits< stan::math::var >static
max()std::numeric_limits< stan::math::var >inlinestatic
max_exponentstd::numeric_limits< stan::math::var >static
max_exponent10std::numeric_limits< stan::math::var >static
min()std::numeric_limits< stan::math::var >inlinestatic
min_exponentstd::numeric_limits< stan::math::var >static
min_exponent10std::numeric_limits< stan::math::var >static
quiet_NaN()std::numeric_limits< stan::math::var >inlinestatic
radixstd::numeric_limits< stan::math::var >static
round_error()std::numeric_limits< stan::math::var >inlinestatic
round_stylestd::numeric_limits< stan::math::var >static
signaling_NaN()std::numeric_limits< stan::math::var >inlinestatic
tinyness_beforestd::numeric_limits< stan::math::var >static
trapsstd::numeric_limits< stan::math::var >static
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html b/doc/api/html/structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html new file mode 100644 index 00000000000..e73bece2e3a --- /dev/null +++ b/doc/api/html/structstd_1_1numeric__limits_3_01stan_1_1math_1_1var_01_4.html @@ -0,0 +1,883 @@ + + + + + + +Stan Math Library: std::numeric_limits< stan::math::var > Struct Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
std::numeric_limits< stan::math::var > Struct Template Reference
+
+
+ +

Specialization of numeric limits for var objects. + More...

+ +

#include <std_numeric_limits.hpp>

+ + + + + + + + + + + + + + + + + + +

+Static Public Member Functions

static stan::math::var min ()
 
static stan::math::var max ()
 
static stan::math::var epsilon ()
 
static stan::math::var round_error ()
 
static stan::math::var infinity ()
 
static stan::math::var quiet_NaN ()
 
static stan::math::var signaling_NaN ()
 
static stan::math::var denorm_min ()
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Static Public Attributes

static const bool is_specialized = true
 
static const int digits = numeric_limits<double>::digits
 
static const int digits10 = numeric_limits<double>::digits10
 
static const bool is_signed = numeric_limits<double>::is_signed
 
static const bool is_integer = numeric_limits<double>::is_integer
 
static const bool is_exact = numeric_limits<double>::is_exact
 
static const int radix = numeric_limits<double>::radix
 
static const int min_exponent = numeric_limits<double>::min_exponent
 
static const int min_exponent10 = numeric_limits<double>::min_exponent10
 
static const int max_exponent = numeric_limits<double>::max_exponent
 
static const int max_exponent10 = numeric_limits<double>::max_exponent10
 
static const bool has_infinity = numeric_limits<double>::has_infinity
 
static const bool has_quiet_NaN = numeric_limits<double>::has_quiet_NaN
 
static const bool has_signaling_NaN = numeric_limits<double>::has_signaling_NaN
 
static const float_denorm_style has_denorm = numeric_limits<double>::has_denorm
 
static const bool has_denorm_loss = numeric_limits<double>::has_denorm_loss
 
static const bool is_iec559 = numeric_limits<double>::is_iec559
 
static const bool is_bounded = numeric_limits<double>::is_bounded
 
static const bool is_modulo = numeric_limits<double>::is_modulo
 
static const bool traps = numeric_limits<double>::traps
 
static const bool tinyness_before = numeric_limits<double>::tinyness_before
 
static const float_round_style round_style = numeric_limits<double>::round_style
 
+

Detailed Description

+

template<>
+struct std::numeric_limits< stan::math::var >

+ +

Specialization of numeric limits for var objects.

+

This implementation of std::numeric_limits<stan::math::var> is used to treat var objects like doubles.

+ +

Definition at line 16 of file std_numeric_limits.hpp.

+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
static stan::math::var std::numeric_limits< stan::math::var >::denorm_min ()
+
+inlinestatic
+
+ +

Definition at line 54 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
static stan::math::var std::numeric_limits< stan::math::var >::epsilon ()
+
+inlinestatic
+
+ +

Definition at line 26 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
static stan::math::var std::numeric_limits< stan::math::var >::infinity ()
+
+inlinestatic
+
+ +

Definition at line 45 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
static stan::math::var std::numeric_limits< stan::math::var >::max ()
+
+inlinestatic
+
+ +

Definition at line 19 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
static stan::math::var std::numeric_limits< stan::math::var >::min ()
+
+inlinestatic
+
+ +

Definition at line 18 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
static stan::math::var std::numeric_limits< stan::math::var >::quiet_NaN ()
+
+inlinestatic
+
+ +

Definition at line 48 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
static stan::math::var std::numeric_limits< stan::math::var >::round_error ()
+
+inlinestatic
+
+ +

Definition at line 29 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
static stan::math::var std::numeric_limits< stan::math::var >::signaling_NaN ()
+
+inlinestatic
+
+ +

Definition at line 51 of file std_numeric_limits.hpp.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
const int std::numeric_limits< stan::math::var >::digits = numeric_limits<double>::digits
+
+static
+
+ +

Definition at line 20 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const int std::numeric_limits< stan::math::var >::digits10 = numeric_limits<double>::digits10
+
+static
+
+ +

Definition at line 21 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const float_denorm_style std::numeric_limits< stan::math::var >::has_denorm = numeric_limits<double>::has_denorm
+
+static
+
+ +

Definition at line 43 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const bool std::numeric_limits< stan::math::var >::has_denorm_loss = numeric_limits<double>::has_denorm_loss
+
+static
+
+ +

Definition at line 44 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const bool std::numeric_limits< stan::math::var >::has_infinity = numeric_limits<double>::has_infinity
+
+static
+
+ +

Definition at line 38 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const bool std::numeric_limits< stan::math::var >::has_quiet_NaN = numeric_limits<double>::has_quiet_NaN
+
+static
+
+ +

Definition at line 39 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const bool std::numeric_limits< stan::math::var >::has_signaling_NaN = numeric_limits<double>::has_signaling_NaN
+
+static
+
+ +

Definition at line 41 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const bool std::numeric_limits< stan::math::var >::is_bounded = numeric_limits<double>::is_bounded
+
+static
+
+ +

Definition at line 59 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const bool std::numeric_limits< stan::math::var >::is_exact = numeric_limits<double>::is_exact
+
+static
+
+ +

Definition at line 24 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const bool std::numeric_limits< stan::math::var >::is_iec559 = numeric_limits<double>::is_iec559
+
+static
+
+ +

Definition at line 58 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const bool std::numeric_limits< stan::math::var >::is_integer = numeric_limits<double>::is_integer
+
+static
+
+ +

Definition at line 23 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const bool std::numeric_limits< stan::math::var >::is_modulo = numeric_limits<double>::is_modulo
+
+static
+
+ +

Definition at line 60 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const bool std::numeric_limits< stan::math::var >::is_signed = numeric_limits<double>::is_signed
+
+static
+
+ +

Definition at line 22 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const bool std::numeric_limits< stan::math::var >::is_specialized = true
+
+static
+
+ +

Definition at line 17 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const int std::numeric_limits< stan::math::var >::max_exponent = numeric_limits<double>::max_exponent
+
+static
+
+ +

Definition at line 35 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const int std::numeric_limits< stan::math::var >::max_exponent10 = numeric_limits<double>::max_exponent10
+
+static
+
+ +

Definition at line 36 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const int std::numeric_limits< stan::math::var >::min_exponent = numeric_limits<double>::min_exponent
+
+static
+
+ +

Definition at line 33 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const int std::numeric_limits< stan::math::var >::min_exponent10 = numeric_limits<double>::min_exponent10
+
+static
+
+ +

Definition at line 34 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const int std::numeric_limits< stan::math::var >::radix = numeric_limits<double>::radix
+
+static
+
+ +

Definition at line 25 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const float_round_style std::numeric_limits< stan::math::var >::round_style = numeric_limits<double>::round_style
+
+static
+
+ +

Definition at line 65 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const bool std::numeric_limits< stan::math::var >::tinyness_before = numeric_limits<double>::tinyness_before
+
+static
+
+ +

Definition at line 63 of file std_numeric_limits.hpp.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const bool std::numeric_limits< stan::math::var >::traps = numeric_limits<double>::traps
+
+static
+
+ +

Definition at line 62 of file std_numeric_limits.hpp.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/student__t__ccdf__log_8hpp.html b/doc/api/html/student__t__ccdf__log_8hpp.html new file mode 100644 index 00000000000..0d00501e4bf --- /dev/null +++ b/doc/api/html/student__t__ccdf__log_8hpp.html @@ -0,0 +1,149 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/student_t_ccdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
student_t_ccdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_dof , typename T_loc , typename T_scale >
return_type< T_y, T_dof, T_loc,
+T_scale >::type 
stan::math::student_t_ccdf_log (const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/student__t__ccdf__log_8hpp_source.html b/doc/api/html/student__t__ccdf__log_8hpp_source.html new file mode 100644 index 00000000000..de2693cf70f --- /dev/null +++ b/doc/api/html/student__t__ccdf__log_8hpp_source.html @@ -0,0 +1,352 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/student_t_ccdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
student_t_ccdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_STUDENT_T_CCDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_STUDENT_T_CCDF_LOG_HPP
+
3 
+
4 #include <boost/random/student_t_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + +
22 #include <limits>
+
23 #include <cmath>
+
24 
+
25 namespace stan {
+
26 
+
27  namespace math {
+
28 
+
29  template <typename T_y, typename T_dof, typename T_loc, typename T_scale>
+
30  typename return_type<T_y, T_dof, T_loc, T_scale>::type
+
31  student_t_ccdf_log(const T_y& y, const T_dof& nu, const T_loc& mu,
+
32  const T_scale& sigma) {
+
33  typedef
+ +
35  T_partials_return;
+
36 
+
37  // Size checks
+
38  if (!(stan::length(y) && stan::length(nu) && stan::length(mu)
+
39  && stan::length(sigma)))
+
40  return 0.0;
+
41 
+
42  static const char* function("stan::math::student_t_ccdf_log");
+
43 
+ + + + + +
49  using std::exp;
+
50 
+
51  T_partials_return P(0.0);
+
52 
+
53  check_not_nan(function, "Random variable", y);
+
54  check_positive_finite(function, "Degrees of freedom parameter", nu);
+
55  check_finite(function, "Location parameter", mu);
+
56  check_positive_finite(function, "Scale parameter", sigma);
+
57 
+
58  // Wrap arguments in vectors
+
59  VectorView<const T_y> y_vec(y);
+
60  VectorView<const T_dof> nu_vec(nu);
+
61  VectorView<const T_loc> mu_vec(mu);
+
62  VectorView<const T_scale> sigma_vec(sigma);
+
63  size_t N = max_size(y, nu, mu, sigma);
+
64 
+ +
66  operands_and_partials(y, nu, mu, sigma);
+
67 
+
68  // Explicit return for extreme values
+
69  // The gradients are technically ill-defined, but treated as zero
+
70  for (size_t i = 0; i < stan::length(y); i++) {
+
71  if (value_of(y_vec[i]) == -std::numeric_limits<double>::infinity())
+
72  return operands_and_partials.to_var(0.0, y, nu, mu, sigma);
+
73  }
+
74 
+
75  using stan::math::digamma;
+
76  using stan::math::lbeta;
+ +
78  using std::pow;
+
79  using std::exp;
+
80  using std::log;
+
81 
+
82  // Cache a few expensive function calls if nu is a parameter
+
83  T_partials_return digammaHalf = 0;
+
84 
+ +
86  T_partials_return, T_dof>
+
87  digamma_vec(stan::length(nu));
+ +
89  T_partials_return, T_dof>
+
90  digammaNu_vec(stan::length(nu));
+ +
92  T_partials_return, T_dof>
+
93  digammaNuPlusHalf_vec(stan::length(nu));
+
94 
+ +
96  digammaHalf = digamma(0.5);
+
97 
+
98  for (size_t i = 0; i < stan::length(nu); i++) {
+
99  const T_partials_return nu_dbl = value_of(nu_vec[i]);
+
100 
+
101  digammaNu_vec[i] = digamma(0.5 * nu_dbl);
+
102  digammaNuPlusHalf_vec[i] = digamma(0.5 + 0.5 * nu_dbl);
+
103  }
+
104  }
+
105 
+
106  // Compute vectorized cdf_log and gradient
+
107  for (size_t n = 0; n < N; n++) {
+
108  // Explicit results for extreme values
+
109  // The gradients are technically ill-defined, but treated as zero
+
110  if (value_of(y_vec[n]) == std::numeric_limits<double>::infinity()) {
+
111  return operands_and_partials.to_var(stan::math::negative_infinity(),
+
112  y, nu, mu, sigma);
+
113  }
+
114 
+
115  const T_partials_return sigma_inv = 1.0 / value_of(sigma_vec[n]);
+
116  const T_partials_return t = (value_of(y_vec[n]) - value_of(mu_vec[n]))
+
117  * sigma_inv;
+
118  const T_partials_return nu_dbl = value_of(nu_vec[n]);
+
119  const T_partials_return q = nu_dbl / (t * t);
+
120  const T_partials_return r = 1.0 / (1.0 + q);
+
121  const T_partials_return J = 2 * r * r * q / t;
+
122  const T_partials_return betaNuHalf = exp(lbeta(0.5, 0.5 * nu_dbl));
+
123  T_partials_return zJacobian = t > 0 ? - 0.5 : 0.5;
+
124 
+
125  if (q < 2) {
+
126  T_partials_return z = inc_beta(0.5 * nu_dbl, (T_partials_return)0.5,
+
127  1.0 - r);
+
128  const T_partials_return Pn = t > 0 ? 0.5 * z : 1.0 - 0.5 * z;
+
129  const T_partials_return d_ibeta = pow(r, -0.5)
+
130  * pow(1.0 - r, 0.5*nu_dbl - 1) / betaNuHalf;
+
131 
+
132  P += log(Pn);
+
133 
+ +
135  operands_and_partials.d_x1[n]
+
136  += zJacobian * d_ibeta * J * sigma_inv / Pn;
+
137 
+ +
139  T_partials_return g1 = 0;
+
140  T_partials_return g2 = 0;
+
141 
+
142  stan::math::grad_reg_inc_beta(g1, g2, 0.5 * nu_dbl,
+
143  (T_partials_return)0.5, 1.0 - r,
+
144  digammaNu_vec[n], digammaHalf,
+
145  digammaNuPlusHalf_vec[n],
+
146  betaNuHalf);
+
147 
+
148  operands_and_partials.d_x2[n]
+
149  -= zJacobian * (d_ibeta * (r / t) * (r / t) + 0.5 * g1) / Pn;
+
150  }
+
151 
+ +
153  operands_and_partials.d_x3[n]
+
154  -= zJacobian * d_ibeta * J * sigma_inv / Pn;
+ +
156  operands_and_partials.d_x4[n]
+
157  -= zJacobian * d_ibeta * J * sigma_inv * t / Pn;
+
158 
+
159  } else {
+
160  T_partials_return z = 1.0 - inc_beta((T_partials_return)0.5,
+
161  0.5*nu_dbl, r);
+
162  zJacobian *= -1;
+
163 
+
164  const T_partials_return Pn = t > 0 ? 0.5 * z : 1.0 - 0.5 * z;
+
165 
+
166  T_partials_return d_ibeta = pow(1.0-r, 0.5*nu_dbl-1) * pow(r, -0.5)
+
167  / betaNuHalf;
+
168 
+
169  P += log(Pn);
+
170 
+ +
172  operands_and_partials.d_x1[n]
+
173  -= zJacobian * d_ibeta * J * sigma_inv / Pn;
+
174 
+ +
176  T_partials_return g1 = 0;
+
177  T_partials_return g2 = 0;
+
178 
+
179  stan::math::grad_reg_inc_beta(g1, g2, (T_partials_return)0.5,
+
180  0.5 * nu_dbl, r,
+
181  digammaHalf, digammaNu_vec[n],
+
182  digammaNuPlusHalf_vec[n],
+
183  betaNuHalf);
+
184 
+
185  operands_and_partials.d_x2[n]
+
186  -= zJacobian * (- d_ibeta * (r / t) * (r / t) + 0.5 * g2) / Pn;
+
187  }
+
188 
+ +
190  operands_and_partials.d_x3[n]
+
191  += zJacobian * d_ibeta * J * sigma_inv / Pn;
+ +
193  operands_and_partials.d_x4[n]
+
194  += zJacobian * d_ibeta * J * sigma_inv * t / Pn;
+
195  }
+
196  }
+
197 
+
198  return operands_and_partials.to_var(P, y, nu, mu, sigma);
+
199  }
+
200  }
+
201 }
+
202 #endif
+ + +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > lbeta(const fvar< T > &x1, const fvar< T > &x2)
Definition: lbeta.hpp:16
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
return_type< T_y, T_dof, T_loc, T_scale >::type student_t_ccdf_log(const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &sigma)
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > inc_beta(const fvar< T > &a, const fvar< T > &b, const fvar< T > &x)
Definition: inc_beta.hpp:20
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
VectorView< T_partials_return, is_vector< T4 >::value, is_constant_struct< T4 >::value > d_x4
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ + +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+
void grad_reg_inc_beta(T &g1, T &g2, T a, T b, T z, T digammaA, T digammaB, T digammaSum, T betaAB)
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/student__t__cdf_8hpp.html b/doc/api/html/student__t__cdf_8hpp.html new file mode 100644 index 00000000000..dc287e283f4 --- /dev/null +++ b/doc/api/html/student__t__cdf_8hpp.html @@ -0,0 +1,149 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/student_t_cdf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
student_t_cdf.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_dof , typename T_loc , typename T_scale >
return_type< T_y, T_dof, T_loc,
+T_scale >::type 
stan::math::student_t_cdf (const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/student__t__cdf_8hpp_source.html b/doc/api/html/student__t__cdf_8hpp_source.html new file mode 100644 index 00000000000..61e5efec9b1 --- /dev/null +++ b/doc/api/html/student__t__cdf_8hpp_source.html @@ -0,0 +1,363 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/student_t_cdf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
student_t_cdf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_STUDENT_T_CDF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_STUDENT_T_CDF_HPP
+
3 
+
4 #include <boost/random/student_t_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + +
22 #include <limits>
+
23 #include <cmath>
+
24 
+
25 namespace stan {
+
26 
+
27  namespace math {
+
28 
+
29  template <typename T_y, typename T_dof, typename T_loc, typename T_scale>
+
30  typename return_type<T_y, T_dof, T_loc, T_scale>::type
+
31  student_t_cdf(const T_y& y, const T_dof& nu, const T_loc& mu,
+
32  const T_scale& sigma) {
+
33  typedef typename stan::partials_return_type<T_y, T_dof, T_loc,
+
34  T_scale>::type
+
35  T_partials_return;
+
36 
+
37  // Size checks
+
38  if (!(stan::length(y) && stan::length(nu) && stan::length(mu)
+
39  && stan::length(sigma)))
+
40  return 1.0;
+
41 
+
42  static const char* function("stan::math::student_t_cdf");
+
43 
+ + + + + +
49  using std::exp;
+
50 
+
51  T_partials_return P(1.0);
+
52 
+
53  check_not_nan(function, "Random variable", y);
+
54  check_positive_finite(function, "Degrees of freedom parameter", nu);
+
55  check_finite(function, "Location parameter", mu);
+
56  check_positive_finite(function, "Scale parameter", sigma);
+
57 
+
58  // Wrap arguments in vectors
+
59  VectorView<const T_y> y_vec(y);
+
60  VectorView<const T_dof> nu_vec(nu);
+
61  VectorView<const T_loc> mu_vec(mu);
+
62  VectorView<const T_scale> sigma_vec(sigma);
+
63  size_t N = max_size(y, nu, mu, sigma);
+
64 
+ +
66  operands_and_partials(y, nu, mu, sigma);
+
67 
+
68  // Explicit return for extreme values
+
69  // The gradients are technically ill-defined, but treated as zero
+
70  for (size_t i = 0; i < stan::length(y); i++) {
+
71  if (value_of(y_vec[i]) == -std::numeric_limits<double>::infinity())
+
72  return operands_and_partials.to_var(0.0, y, nu, mu, sigma);
+
73  }
+
74 
+
75  using stan::math::digamma;
+
76  using stan::math::lbeta;
+ +
78  using std::pow;
+
79  using std::exp;
+
80 
+
81  // Cache a few expensive function calls if nu is a parameter
+
82  T_partials_return digammaHalf = 0;
+
83 
+ +
85  T_partials_return, T_dof>
+
86  digamma_vec(stan::length(nu));
+ +
88  T_partials_return, T_dof>
+
89  digammaNu_vec(stan::length(nu));
+ +
91  T_partials_return, T_dof>
+
92  digammaNuPlusHalf_vec(stan::length(nu));
+
93 
+ +
95  digammaHalf = digamma(0.5);
+
96 
+
97  for (size_t i = 0; i < stan::length(nu); i++) {
+
98  const T_partials_return nu_dbl = value_of(nu_vec[i]);
+
99 
+
100  digammaNu_vec[i] = digamma(0.5 * nu_dbl);
+
101  digammaNuPlusHalf_vec[i] = digamma(0.5 + 0.5 * nu_dbl);
+
102  }
+
103  }
+
104 
+
105  // Compute vectorized CDF and gradient
+
106  for (size_t n = 0; n < N; n++) {
+
107  // Explicit results for extreme values
+
108  // The gradients are technically ill-defined, but treated as zero
+
109  if (value_of(y_vec[n]) == std::numeric_limits<double>::infinity()) {
+
110  continue;
+
111  }
+
112 
+
113  const T_partials_return sigma_inv = 1.0 / value_of(sigma_vec[n]);
+
114  const T_partials_return t = (value_of(y_vec[n]) - value_of(mu_vec[n]))
+
115  * sigma_inv;
+
116  const T_partials_return nu_dbl = value_of(nu_vec[n]);
+
117  const T_partials_return q = nu_dbl / (t * t);
+
118  const T_partials_return r = 1.0 / (1.0 + q);
+
119  const T_partials_return J = 2 * r * r * q / t;
+
120  const T_partials_return betaNuHalf = exp(lbeta(0.5, 0.5*nu_dbl));
+
121  double zJacobian = t > 0 ? - 0.5 : 0.5;
+
122 
+
123  if (q < 2) {
+
124  T_partials_return z = inc_beta(0.5 * nu_dbl, (T_partials_return)0.5,
+
125  1.0 - r);
+
126  const T_partials_return Pn = t > 0 ? 1.0 - 0.5 * z : 0.5 * z;
+
127  const T_partials_return d_ibeta = pow(r, -0.5)
+
128  * pow(1.0 - r, 0.5*nu_dbl - 1) / betaNuHalf;
+
129 
+
130  P *= Pn;
+
131 
+ +
133  operands_and_partials.d_x1[n]
+
134  += - zJacobian * d_ibeta * J * sigma_inv / Pn;
+ +
136  T_partials_return g1 = 0;
+
137  T_partials_return g2 = 0;
+
138 
+
139  stan::math::grad_reg_inc_beta(g1, g2, 0.5 * nu_dbl,
+
140  (T_partials_return)0.5, 1.0 - r,
+
141  digammaNu_vec[n], digammaHalf,
+
142  digammaNuPlusHalf_vec[n],
+
143  betaNuHalf);
+
144 
+
145  operands_and_partials.d_x2[n]
+
146  += zJacobian * (d_ibeta * (r / t) * (r / t) + 0.5 * g1) / Pn;
+
147  }
+
148 
+ +
150  operands_and_partials.d_x3[n]
+
151  += zJacobian * d_ibeta * J * sigma_inv / Pn;
+ +
153  operands_and_partials.d_x4[n]
+
154  += zJacobian * d_ibeta * J * sigma_inv * t / Pn;
+
155 
+
156  } else {
+
157  T_partials_return z = 1.0 - inc_beta((T_partials_return)0.5,
+
158  0.5*nu_dbl, r);
+
159 
+
160  zJacobian *= -1;
+
161 
+
162  const T_partials_return Pn = t > 0 ? 1.0 - 0.5 * z : 0.5 * z;
+
163 
+
164  T_partials_return d_ibeta = pow(1.0-r, 0.5*nu_dbl-1) * pow(r, -0.5)
+
165  / betaNuHalf;
+
166 
+
167  P *= Pn;
+
168 
+ +
170  operands_and_partials.d_x1[n]
+
171  += zJacobian * d_ibeta * J * sigma_inv / Pn;
+ +
173  T_partials_return g1 = 0;
+
174  T_partials_return g2 = 0;
+
175 
+
176  stan::math::grad_reg_inc_beta(g1, g2, (T_partials_return)0.5,
+
177  0.5 * nu_dbl, r,
+
178  digammaHalf, digammaNu_vec[n],
+
179  digammaNuPlusHalf_vec[n],
+
180  betaNuHalf);
+
181 
+
182  operands_and_partials.d_x2[n]
+
183  += zJacobian * (- d_ibeta * (r / t) * (r / t) + 0.5 * g2) / Pn;
+
184  }
+ +
186  operands_and_partials.d_x3[n]
+
187  += - zJacobian * d_ibeta * J * sigma_inv / Pn;
+ +
189  operands_and_partials.d_x4[n]
+
190  += - zJacobian * d_ibeta * J * sigma_inv * t / Pn;
+
191  }
+
192  }
+
193 
+ +
195  for (size_t n = 0; n < stan::length(y); ++n)
+
196  operands_and_partials.d_x1[n] *= P;
+
197  }
+ +
199  for (size_t n = 0; n < stan::length(nu); ++n)
+
200  operands_and_partials.d_x2[n] *= P;
+
201  }
+ +
203  for (size_t n = 0; n < stan::length(mu); ++n)
+
204  operands_and_partials.d_x3[n] *= P;
+
205  }
+ +
207  for (size_t n = 0; n < stan::length(sigma); ++n)
+
208  operands_and_partials.d_x4[n] *= P;
+
209  }
+
210 
+
211  return operands_and_partials.to_var(P, y, nu, mu, sigma);
+
212  }
+
213  }
+
214 }
+
215 #endif
+ + +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > lbeta(const fvar< T > &x1, const fvar< T > &x2)
Definition: lbeta.hpp:16
+ + +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > inc_beta(const fvar< T > &a, const fvar< T > &b, const fvar< T > &x)
Definition: inc_beta.hpp:20
+
return_type< T_y, T_dof, T_loc, T_scale >::type student_t_cdf(const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &sigma)
+ +
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
VectorView< T_partials_return, is_vector< T4 >::value, is_constant_struct< T4 >::value > d_x4
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ + +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
void grad_reg_inc_beta(T &g1, T &g2, T a, T b, T z, T digammaA, T digammaB, T digammaSum, T betaAB)
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/student__t__cdf__log_8hpp.html b/doc/api/html/student__t__cdf__log_8hpp.html new file mode 100644 index 00000000000..16228de1ba8 --- /dev/null +++ b/doc/api/html/student__t__cdf__log_8hpp.html @@ -0,0 +1,149 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/student_t_cdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
student_t_cdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_dof , typename T_loc , typename T_scale >
return_type< T_y, T_dof, T_loc,
+T_scale >::type 
stan::math::student_t_cdf_log (const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/student__t__cdf__log_8hpp_source.html b/doc/api/html/student__t__cdf__log_8hpp_source.html new file mode 100644 index 00000000000..30291de98fc --- /dev/null +++ b/doc/api/html/student__t__cdf__log_8hpp_source.html @@ -0,0 +1,352 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/student_t_cdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
student_t_cdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_STUDENT_T_CDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_STUDENT_T_CDF_LOG_HPP
+
3 
+
4 #include <boost/random/student_t_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + +
22 #include <limits>
+
23 #include <cmath>
+
24 
+
25 namespace stan {
+
26 
+
27  namespace math {
+
28 
+
29  template <typename T_y, typename T_dof, typename T_loc, typename T_scale>
+
30  typename return_type<T_y, T_dof, T_loc, T_scale>::type
+
31  student_t_cdf_log(const T_y& y, const T_dof& nu, const T_loc& mu,
+
32  const T_scale& sigma) {
+
33  typedef typename
+ +
35  T_partials_return;
+
36 
+
37  // Size checks
+
38  if (!(stan::length(y) && stan::length(nu) && stan::length(mu)
+
39  && stan::length(sigma)))
+
40  return 0.0;
+
41 
+
42  static const char* function("stan::math::student_t_cdf_log");
+
43 
+ + + + + +
49  using std::exp;
+
50 
+
51  T_partials_return P(0.0);
+
52 
+
53  check_not_nan(function, "Random variable", y);
+
54  check_positive_finite(function, "Degrees of freedom parameter", nu);
+
55  check_finite(function, "Location parameter", mu);
+
56  check_positive_finite(function, "Scale parameter", sigma);
+
57 
+
58  // Wrap arguments in vectors
+
59  VectorView<const T_y> y_vec(y);
+
60  VectorView<const T_dof> nu_vec(nu);
+
61  VectorView<const T_loc> mu_vec(mu);
+
62  VectorView<const T_scale> sigma_vec(sigma);
+
63  size_t N = max_size(y, nu, mu, sigma);
+
64 
+ +
66  operands_and_partials(y, nu, mu, sigma);
+
67 
+
68  // Explicit return for extreme values
+
69  // The gradients are technically ill-defined, but treated as zero
+
70  for (size_t i = 0; i < stan::length(y); i++) {
+
71  if (value_of(y_vec[i]) == -std::numeric_limits<double>::infinity())
+
72  return operands_and_partials.to_var(stan::math::negative_infinity(),
+
73  y, nu, mu, sigma);
+
74  }
+
75 
+
76  using stan::math::digamma;
+
77  using stan::math::lbeta;
+ +
79  using std::pow;
+
80  using std::exp;
+
81  using std::log;
+
82 
+
83  // Cache a few expensive function calls if nu is a parameter
+
84  T_partials_return digammaHalf = 0;
+
85 
+ +
87  T_partials_return, T_dof>
+
88  digamma_vec(stan::length(nu));
+ +
90  T_partials_return, T_dof>
+
91  digammaNu_vec(stan::length(nu));
+ +
93  T_partials_return, T_dof>
+
94  digammaNuPlusHalf_vec(stan::length(nu));
+
95 
+ +
97  digammaHalf = digamma(0.5);
+
98 
+
99  for (size_t i = 0; i < stan::length(nu); i++) {
+
100  const T_partials_return nu_dbl = value_of(nu_vec[i]);
+
101 
+
102  digammaNu_vec[i] = digamma(0.5 * nu_dbl);
+
103  digammaNuPlusHalf_vec[i] = digamma(0.5 + 0.5 * nu_dbl);
+
104  }
+
105  }
+
106 
+
107  // Compute vectorized cdf_log and gradient
+
108  for (size_t n = 0; n < N; n++) {
+
109  // Explicit results for extreme values
+
110  // The gradients are technically ill-defined, but treated as zero
+
111  if (value_of(y_vec[n]) == std::numeric_limits<double>::infinity()) {
+
112  continue;
+
113  }
+
114 
+
115  const T_partials_return sigma_inv = 1.0 / value_of(sigma_vec[n]);
+
116  const T_partials_return t = (value_of(y_vec[n]) - value_of(mu_vec[n]))
+
117  * sigma_inv;
+
118  const T_partials_return nu_dbl = value_of(nu_vec[n]);
+
119  const T_partials_return q = nu_dbl / (t * t);
+
120  const T_partials_return r = 1.0 / (1.0 + q);
+
121  const T_partials_return J = 2 * r * r * q / t;
+
122  const T_partials_return betaNuHalf = exp(lbeta(0.5, 0.5 * nu_dbl));
+
123  T_partials_return zJacobian = t > 0 ? - 0.5 : 0.5;
+
124 
+
125  if (q < 2) {
+
126  T_partials_return z
+
127  = inc_beta(0.5 * nu_dbl, (T_partials_return)0.5, 1.0 - r);
+
128  const T_partials_return Pn = t > 0 ? 1.0 - 0.5 * z : 0.5 * z;
+
129  const T_partials_return d_ibeta = pow(r, -0.5)
+
130  * pow(1.0 - r, 0.5*nu_dbl - 1) / betaNuHalf;
+
131 
+
132  P += log(Pn);
+
133 
+ +
135  operands_and_partials.d_x1[n]
+
136  += - zJacobian * d_ibeta * J * sigma_inv / Pn;
+
137 
+ +
139  T_partials_return g1 = 0;
+
140  T_partials_return g2 = 0;
+
141 
+
142  stan::math::grad_reg_inc_beta(g1, g2, 0.5 * nu_dbl,
+
143  (T_partials_return)0.5, 1.0 - r,
+
144  digammaNu_vec[n], digammaHalf,
+
145  digammaNuPlusHalf_vec[n],
+
146  betaNuHalf);
+
147 
+
148  operands_and_partials.d_x2[n]
+
149  += zJacobian * (d_ibeta * (r / t) * (r / t) + 0.5 * g1) / Pn;
+
150  }
+
151 
+ +
153  operands_and_partials.d_x3[n]
+
154  += zJacobian * d_ibeta * J * sigma_inv / Pn;
+ +
156  operands_and_partials.d_x4[n]
+
157  += zJacobian * d_ibeta * J * sigma_inv * t / Pn;
+
158 
+
159  } else {
+
160  T_partials_return z = 1.0 - inc_beta((T_partials_return)0.5,
+
161  0.5*nu_dbl, r);
+
162  zJacobian *= -1;
+
163 
+
164  const T_partials_return Pn = t > 0 ? 1.0 - 0.5 * z : 0.5 * z;
+
165 
+
166  T_partials_return d_ibeta = pow(1.0-r, 0.5*nu_dbl-1) * pow(r, -0.5)
+
167  / betaNuHalf;
+
168 
+
169  P += log(Pn);
+
170 
+ +
172  operands_and_partials.d_x1[n]
+
173  += zJacobian * d_ibeta * J * sigma_inv / Pn;
+
174 
+ +
176  T_partials_return g1 = 0;
+
177  T_partials_return g2 = 0;
+
178 
+
179  stan::math::grad_reg_inc_beta(g1, g2, (T_partials_return)0.5,
+
180  0.5 * nu_dbl, r,
+
181  digammaHalf, digammaNu_vec[n],
+
182  digammaNuPlusHalf_vec[n],
+
183  betaNuHalf);
+
184 
+
185  operands_and_partials.d_x2[n]
+
186  += zJacobian * (- d_ibeta * (r / t) * (r / t) + 0.5 * g2) / Pn;
+
187  }
+
188 
+ +
190  operands_and_partials.d_x3[n]
+
191  += - zJacobian * d_ibeta * J * sigma_inv / Pn;
+ +
193  operands_and_partials.d_x4[n]
+
194  += - zJacobian * d_ibeta * J * sigma_inv * t / Pn;
+
195  }
+
196  }
+
197 
+
198  return operands_and_partials.to_var(P, y, nu, mu, sigma);
+
199  }
+
200  }
+
201 }
+
202 #endif
+ + +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > lbeta(const fvar< T > &x1, const fvar< T > &x2)
Definition: lbeta.hpp:16
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
return_type< T_y, T_dof, T_loc, T_scale >::type student_t_cdf_log(const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &sigma)
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > inc_beta(const fvar< T > &a, const fvar< T > &b, const fvar< T > &x)
Definition: inc_beta.hpp:20
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
VectorView< T_partials_return, is_vector< T4 >::value, is_constant_struct< T4 >::value > d_x4
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ + +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+
void grad_reg_inc_beta(T &g1, T &g2, T a, T b, T z, T digammaA, T digammaB, T digammaSum, T betaAB)
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/student__t__log_8hpp.html b/doc/api/html/student__t__log_8hpp.html new file mode 100644 index 00000000000..269cf32f420 --- /dev/null +++ b/doc/api/html/student__t__log_8hpp.html @@ -0,0 +1,153 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/student_t_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
student_t_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_dof , typename T_loc , typename T_scale >
return_type< T_y, T_dof, T_loc,
+T_scale >::type 
stan::math::student_t_log (const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &sigma)
 The log of the Student-t density for the given y, nu, mean, and scale parameter. More...
 
template<typename T_y , typename T_dof , typename T_loc , typename T_scale >
return_type< T_y, T_dof, T_loc,
+T_scale >::type 
stan::math::student_t_log (const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/student__t__log_8hpp_source.html b/doc/api/html/student__t__log_8hpp_source.html new file mode 100644 index 00000000000..e11607a0ab9 --- /dev/null +++ b/doc/api/html/student__t__log_8hpp_source.html @@ -0,0 +1,352 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/student_t_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
student_t_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_STUDENT_T_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_STUDENT_T_LOG_HPP
+
3 
+
4 #include <boost/random/student_t_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + +
22 #include <cmath>
+
23 
+
24 namespace stan {
+
25 
+
26  namespace math {
+
27 
+
53  template <bool propto, typename T_y, typename T_dof,
+
54  typename T_loc, typename T_scale>
+
55  typename return_type<T_y, T_dof, T_loc, T_scale>::type
+
56  student_t_log(const T_y& y, const T_dof& nu, const T_loc& mu,
+
57  const T_scale& sigma) {
+
58  static const char* function("stan::math::student_t_log");
+
59  typedef typename stan::partials_return_type<T_y, T_dof, T_loc,
+
60  T_scale>::type
+
61  T_partials_return;
+
62 
+ + + + +
67 
+
68  // check if any vectors are zero length
+
69  if (!(stan::length(y)
+
70  && stan::length(nu)
+
71  && stan::length(mu)
+
72  && stan::length(sigma)))
+
73  return 0.0;
+
74 
+
75  T_partials_return logp(0.0);
+
76 
+
77  // validate args (here done over var, which should be OK)
+
78  check_not_nan(function, "Random variable", y);
+
79  check_positive_finite(function, "Degrees of freedom parameter", nu);
+
80  check_finite(function, "Location parameter", mu);
+
81  check_positive_finite(function, "Scale parameter", sigma);
+
82  check_consistent_sizes(function,
+
83  "Random variable", y,
+
84  "Degrees of freedom parameter", nu,
+
85  "Location parameter", mu,
+
86  "Scale parameter", sigma);
+
87 
+
88  // check if no variables are involved and prop-to
+ +
90  return 0.0;
+
91 
+
92  VectorView<const T_y> y_vec(y);
+
93  VectorView<const T_dof> nu_vec(nu);
+
94  VectorView<const T_loc> mu_vec(mu);
+
95  VectorView<const T_scale> sigma_vec(sigma);
+
96  size_t N = max_size(y, nu, mu, sigma);
+
97 
+
98  using std::log;
+
99  using stan::math::digamma;
+
100  using stan::math::lgamma;
+
101  using stan::math::square;
+
102  using stan::math::value_of;
+
103  using std::log;
+
104 
+ +
106  T_partials_return, T_dof> half_nu(length(nu));
+
107  for (size_t i = 0; i < length(nu); i++)
+ +
109  half_nu[i] = 0.5 * value_of(nu_vec[i]);
+
110 
+ +
112  T_partials_return, T_dof> lgamma_half_nu(length(nu));
+ +
114  T_partials_return, T_dof>
+
115  lgamma_half_nu_plus_half(length(nu));
+ +
117  for (size_t i = 0; i < length(nu); i++) {
+
118  lgamma_half_nu[i] = lgamma(half_nu[i]);
+
119  lgamma_half_nu_plus_half[i] = lgamma(half_nu[i] + 0.5);
+
120  }
+
121  }
+
122 
+ +
124  T_partials_return, T_dof> digamma_half_nu(length(nu));
+ +
126  T_partials_return, T_dof>
+
127  digamma_half_nu_plus_half(length(nu));
+ +
129  for (size_t i = 0; i < length(nu); i++) {
+
130  digamma_half_nu[i] = digamma(half_nu[i]);
+
131  digamma_half_nu_plus_half[i] = digamma(half_nu[i] + 0.5);
+
132  }
+
133  }
+
134 
+ +
136  T_partials_return, T_dof> log_nu(length(nu));
+
137  for (size_t i = 0; i < length(nu); i++)
+ +
139  log_nu[i] = log(value_of(nu_vec[i]));
+
140 
+ +
142  T_partials_return, T_scale> log_sigma(length(sigma));
+
143  for (size_t i = 0; i < length(sigma); i++)
+ +
145  log_sigma[i] = log(value_of(sigma_vec[i]));
+
146 
+ +
148  T_partials_return, T_y, T_dof, T_loc, T_scale>
+
149  square_y_minus_mu_over_sigma__over_nu(N);
+
150 
+ +
152  T_partials_return, T_y, T_dof, T_loc, T_scale>
+
153  log1p_exp(N);
+
154 
+
155  for (size_t i = 0; i < N; i++)
+ +
157  const T_partials_return y_dbl = value_of(y_vec[i]);
+
158  const T_partials_return mu_dbl = value_of(mu_vec[i]);
+
159  const T_partials_return sigma_dbl = value_of(sigma_vec[i]);
+
160  const T_partials_return nu_dbl = value_of(nu_vec[i]);
+
161  square_y_minus_mu_over_sigma__over_nu[i]
+
162  = square((y_dbl - mu_dbl) / sigma_dbl) / nu_dbl;
+
163  log1p_exp[i] = log1p(square_y_minus_mu_over_sigma__over_nu[i]);
+
164  }
+
165 
+ +
167  operands_and_partials(y, nu, mu, sigma);
+
168  for (size_t n = 0; n < N; n++) {
+
169  const T_partials_return y_dbl = value_of(y_vec[n]);
+
170  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
171  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
172  const T_partials_return nu_dbl = value_of(nu_vec[n]);
+ +
174  logp += NEG_LOG_SQRT_PI;
+ +
176  logp += lgamma_half_nu_plus_half[n] - lgamma_half_nu[n]
+
177  - 0.5 * log_nu[n];
+ +
179  logp -= log_sigma[n];
+ +
181  logp -= (half_nu[n] + 0.5)
+
182  * log1p_exp[n];
+
183 
+ +
185  operands_and_partials.d_x1[n]
+
186  += -(half_nu[n]+0.5)
+
187  * 1.0 / (1.0 + square_y_minus_mu_over_sigma__over_nu[n])
+
188  * (2.0 * (y_dbl - mu_dbl) / square(sigma_dbl) / nu_dbl);
+
189  }
+ +
191  const T_partials_return inv_nu = 1.0 / nu_dbl;
+
192  operands_and_partials.d_x2[n]
+
193  += 0.5*digamma_half_nu_plus_half[n] - 0.5*digamma_half_nu[n]
+
194  - 0.5 * inv_nu
+
195  - 0.5*log1p_exp[n]
+
196  + (half_nu[n] + 0.5)
+
197  * (1.0/(1.0 + square_y_minus_mu_over_sigma__over_nu[n])
+
198  * square_y_minus_mu_over_sigma__over_nu[n] * inv_nu);
+
199  }
+ +
201  operands_and_partials.d_x3[n]
+
202  -= (half_nu[n] + 0.5)
+
203  / (1.0 + square_y_minus_mu_over_sigma__over_nu[n])
+
204  * (2.0 * (mu_dbl - y_dbl) / (sigma_dbl*sigma_dbl*nu_dbl));
+
205  }
+ +
207  const T_partials_return inv_sigma = 1.0 / sigma_dbl;
+
208  operands_and_partials.d_x4[n]
+
209  += -inv_sigma
+
210  + (nu_dbl + 1.0) / (1.0 + square_y_minus_mu_over_sigma__over_nu[n])
+
211  * (square_y_minus_mu_over_sigma__over_nu[n] * inv_sigma);
+
212  }
+
213  }
+
214  return operands_and_partials.to_var(logp, y, nu, mu, sigma);
+
215  }
+
216 
+
217  template <typename T_y, typename T_dof, typename T_loc, typename T_scale>
+
218  inline
+ +
220  student_t_log(const T_y& y, const T_dof& nu, const T_loc& mu,
+
221  const T_scale& sigma) {
+
222  return student_t_log<false>(y, nu, mu, sigma);
+
223  }
+
224  }
+
225 }
+
226 #endif
+ + +
fvar< T > lgamma(const fvar< T > &x)
Definition: lgamma.hpp:15
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+ +
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
const double NEG_LOG_SQRT_PI
Definition: constants.hpp:189
+ +
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+ +
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
VectorView< T_partials_return, is_vector< T4 >::value, is_constant_struct< T4 >::value > d_x4
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + +
fvar< T > log1p_exp(const fvar< T > &x)
Definition: log1p_exp.hpp:13
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ + +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
fvar< T > log1p(const fvar< T > &x)
Definition: log1p.hpp:16
+
return_type< T_y, T_dof, T_loc, T_scale >::type student_t_log(const T_y &y, const T_dof &nu, const T_loc &mu, const T_scale &sigma)
The log of the Student-t density for the given y, nu, mean, and scale parameter.
+ + +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
fvar< T > digamma(const fvar< T > &x)
Definition: digamma.hpp:16
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/student__t__rng_8hpp.html b/doc/api/html/student__t__rng_8hpp.html new file mode 100644 index 00000000000..118e194ec9c --- /dev/null +++ b/doc/api/html/student__t__rng_8hpp.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/student_t_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
student_t_rng.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
double stan::math::student_t_rng (const double nu, const double mu, const double sigma, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/student__t__rng_8hpp_source.html b/doc/api/html/student__t__rng_8hpp_source.html new file mode 100644 index 00000000000..80085785730 --- /dev/null +++ b/doc/api/html/student__t__rng_8hpp_source.html @@ -0,0 +1,178 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/student_t_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
student_t_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_STUDENT_T_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_STUDENT_T_RNG_HPP
+
3 
+
4 #include <boost/random/student_t_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + + + + +
22 
+
23 namespace stan {
+
24 
+
25  namespace math {
+
26 
+
27  template <class RNG>
+
28  inline double
+
29  student_t_rng(const double nu,
+
30  const double mu,
+
31  const double sigma,
+
32  RNG& rng) {
+
33  using boost::variate_generator;
+
34  using boost::random::student_t_distribution;
+
35 
+
36  static const char* function("stan::math::student_t_rng");
+
37 
+ + +
40 
+
41  check_positive_finite(function, "Degrees of freedom parameter", nu);
+
42  check_finite(function, "Location parameter", mu);
+
43  check_positive_finite(function, "Scale parameter", sigma);
+
44 
+
45  variate_generator<RNG&, student_t_distribution<> >
+
46  rng_unit_student_t(rng, student_t_distribution<>(nu));
+
47  return mu + sigma * rng_unit_student_t();
+
48  }
+
49  }
+
50 }
+
51 #endif
+ + + + + + +
double student_t_rng(const double nu, const double mu, const double sigma, RNG &rng)
+ + + + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + + + + + +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/sub_8hpp.html b/doc/api/html/sub_8hpp.html new file mode 100644 index 00000000000..9f0c49f7c0a --- /dev/null +++ b/doc/api/html/sub_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/fun/sub.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
sub.hpp File Reference
+
+
+
#include <vector>
+#include <cstddef>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + +

+Functions

void stan::math::sub (std::vector< double > &x, std::vector< double > &y, std::vector< double > &result)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/sub_8hpp_source.html b/doc/api/html/sub_8hpp_source.html new file mode 100644 index 00000000000..e8e182b5a03 --- /dev/null +++ b/doc/api/html/sub_8hpp_source.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/arr/fun/sub.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
sub.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_ARR_FUN_SUB_HPP
+
2 #define STAN_MATH_PRIM_ARR_FUN_SUB_HPP
+
3 
+
4 #include <vector>
+
5 #include <cstddef>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  inline void sub(std::vector<double>& x, std::vector<double>& y,
+
11  std::vector<double>& result) {
+
12  result.resize(x.size());
+
13  for (size_t i = 0; i < x.size(); ++i)
+
14  result[i] = x[i] - y[i];
+
15  }
+
16 
+
17  }
+
18 }
+
19 
+
20 #endif
+
void sub(std::vector< double > &x, std::vector< double > &y, std::vector< double > &result)
Definition: sub.hpp:10
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/sub__col_8hpp.html b/doc/api/html/sub__col_8hpp.html new file mode 100644 index 00000000000..fcb75ce2ae5 --- /dev/null +++ b/doc/api/html/sub__col_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/sub_col.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
sub_col.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::sub_col (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m, size_t i, size_t j, size_t nrows)
 Return a nrows x 1 subcolumn starting at (i-1, j-1). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/sub__col_8hpp_source.html b/doc/api/html/sub__col_8hpp_source.html new file mode 100644 index 00000000000..4961df987a5 --- /dev/null +++ b/doc/api/html/sub__col_8hpp_source.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/sub_col.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
sub_col.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_SUB_COL_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_SUB_COL_HPP
+
3 
+ + + +
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
19  template <typename T>
+
20  inline
+
21  Eigen::Matrix<T, Eigen::Dynamic, 1>
+
22  sub_col(const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>& m,
+
23  size_t i, size_t j, size_t nrows) {
+
24  stan::math::check_row_index("sub_col", "i", m, i);
+
25  if (nrows > 0)
+
26  stan::math::check_row_index("sub_col", "i+nrows-1", m, i+nrows-1);
+
27  stan::math::check_column_index("sub_col", "j", m, j);
+
28  return m.block(i - 1, j - 1, nrows, 1);
+
29  }
+
30 
+
31 
+
32  }
+
33 }
+
34 
+
35 #endif
+
Eigen::Matrix< T, Eigen::Dynamic, 1 > sub_col(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m, size_t i, size_t j, size_t nrows)
Return a nrows x 1 subcolumn starting at (i-1, j-1).
Definition: sub_col.hpp:22
+ +
bool check_row_index(const char *function, const char *name, const Eigen::Matrix< T_y, R, C > &y, size_t i)
Return true if the specified index is a valid row of the matrix.
+ + +
bool check_column_index(const char *function, const char *name, const Eigen::Matrix< T_y, R, C > &y, const size_t i)
Return true if the specified index is a valid column of the matrix.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/sub__row_8hpp.html b/doc/api/html/sub__row_8hpp.html new file mode 100644 index 00000000000..64517a4eb32 --- /dev/null +++ b/doc/api/html/sub__row_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/sub_row.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
sub_row.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+1, Eigen::Dynamic > 
stan::math::sub_row (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m, size_t i, size_t j, size_t ncols)
 Return a 1 x nrows subrow starting at (i-1, j-1). More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/sub__row_8hpp_source.html b/doc/api/html/sub__row_8hpp_source.html new file mode 100644 index 00000000000..fe4b8db6b41 --- /dev/null +++ b/doc/api/html/sub__row_8hpp_source.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/sub_row.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
sub_row.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_SUB_ROW_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_SUB_ROW_HPP
+
3 
+ + + +
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
20  template <typename T>
+
21  inline
+
22  Eigen::Matrix<T, 1, Eigen::Dynamic>
+
23  sub_row(const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>& m,
+
24  size_t i, size_t j, size_t ncols) {
+
25  stan::math::check_row_index("sub_row", "i", m, i);
+
26  stan::math::check_column_index("sub_row", "j", m, j);
+
27  if (ncols > 0)
+
28  stan::math::check_column_index("sub_col", "j+ncols-1", m, j+ncols-1);
+
29  return m.block(i - 1, j - 1, 1, ncols);
+
30  }
+
31 
+
32  }
+
33 }
+
34 
+
35 #endif
+
Eigen::Matrix< T, 1, Eigen::Dynamic > sub_row(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m, size_t i, size_t j, size_t ncols)
Return a 1 x nrows subrow starting at (i-1, j-1).
Definition: sub_row.hpp:23
+ +
bool check_row_index(const char *function, const char *name, const Eigen::Matrix< T_y, R, C > &y, size_t i)
Return true if the specified index is a valid row of the matrix.
+ + +
bool check_column_index(const char *function, const char *name, const Eigen::Matrix< T_y, R, C > &y, const size_t i)
Return true if the specified index is a valid column of the matrix.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/subtract_8hpp.html b/doc/api/html/subtract_8hpp.html new file mode 100644 index 00000000000..a44b1ce4a94 --- /dev/null +++ b/doc/api/html/subtract_8hpp.html @@ -0,0 +1,144 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/subtract.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
subtract.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <stan/math/prim/mat/err/check_matching_dims.hpp>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + +

+Functions

template<typename T1 , typename T2 , int R, int C>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R, C > 
stan::math::subtract (const Eigen::Matrix< T1, R, C > &m1, const Eigen::Matrix< T2, R, C > &m2)
 Return the result of subtracting the second specified matrix from the first specified matrix. More...
 
template<typename T1 , typename T2 , int R, int C>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R, C > 
stan::math::subtract (const T1 &c, const Eigen::Matrix< T2, R, C > &m)
 
template<typename T1 , typename T2 , int R, int C>
Eigen::Matrix< typename
+boost::math::tools::promote_args
+< T1, T2 >::type, R, C > 
stan::math::subtract (const Eigen::Matrix< T1, R, C > &m, const T2 &c)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/subtract_8hpp_source.html b/doc/api/html/subtract_8hpp_source.html new file mode 100644 index 00000000000..c3154c91bc1 --- /dev/null +++ b/doc/api/html/subtract_8hpp_source.html @@ -0,0 +1,167 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/subtract.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
subtract.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_SUBTRACT_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_SUBTRACT_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+ + +
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
24  template <typename T1, typename T2, int R, int C>
+
25  inline
+
26  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R, C>
+
27  subtract(const Eigen::Matrix<T1, R, C>& m1,
+
28  const Eigen::Matrix<T2, R, C>& m2) {
+ +
30  "m1", m1,
+
31  "m2", m2);
+
32  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type,
+
33  R, C>
+
34  result(m1.rows(), m1.cols());
+
35  for (int i = 0; i < result.size(); ++i)
+
36  result(i) = m1(i) - m2(i);
+
37  return result;
+
38  }
+
39 
+
40  template <typename T1, typename T2, int R, int C>
+
41  inline
+
42  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R, C>
+
43  subtract(const T1& c,
+
44  const Eigen::Matrix<T2, R, C>& m) {
+
45  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type,
+
46  R, C>
+
47  result(m.rows(), m.cols());
+
48  for (int i = 0; i < m.size(); ++i)
+
49  result(i) = c - m(i);
+
50  return result;
+
51  }
+
52 
+
53  template <typename T1, typename T2, int R, int C>
+
54  inline
+
55  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R, C>
+
56  subtract(const Eigen::Matrix<T1, R, C>& m,
+
57  const T2& c) {
+
58  Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type,
+
59  R, C>
+
60  result(m.rows(), m.cols());
+
61  for (int i = 0; i < m.size(); ++i)
+
62  result(i) = m(i) - c;
+
63  return result;
+
64  }
+
65 
+
66  }
+
67 }
+
68 #endif
+ +
Eigen::Matrix< typename boost::math::tools::promote_args< T1, T2 >::type, R, C > subtract(const Eigen::Matrix< T1, R, C > &m1, const Eigen::Matrix< T2, R, C > &m2)
Return the result of subtracting the second specified matrix from the first specified matrix...
Definition: subtract.hpp:27
+
bool check_matching_dims(const char *function, const char *name1, const Eigen::Matrix< T1, R1, C1 > &y1, const char *name2, const Eigen::Matrix< T2, R2, C2 > &y2)
Return true if the two matrices are of the same size.
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/sync_off.png b/doc/api/html/sync_off.png new file mode 100644 index 00000000000..3b443fc6289 Binary files /dev/null and b/doc/api/html/sync_off.png differ diff --git a/doc/api/html/sync_on.png b/doc/api/html/sync_on.png new file mode 100644 index 00000000000..e08320fb64e Binary files /dev/null and b/doc/api/html/sync_on.png differ diff --git a/doc/api/html/tab_a.png b/doc/api/html/tab_a.png new file mode 100644 index 00000000000..3b725c41c5a Binary files /dev/null and b/doc/api/html/tab_a.png differ diff --git a/doc/api/html/tab_b.png b/doc/api/html/tab_b.png new file mode 100644 index 00000000000..e2b4a8638cb Binary files /dev/null and b/doc/api/html/tab_b.png differ diff --git a/doc/api/html/tab_h.png b/doc/api/html/tab_h.png new file mode 100644 index 00000000000..fd5cb705488 Binary files /dev/null and b/doc/api/html/tab_h.png differ diff --git a/doc/api/html/tab_s.png b/doc/api/html/tab_s.png new file mode 100644 index 00000000000..ab478c95b67 Binary files /dev/null and b/doc/api/html/tab_s.png differ diff --git a/doc/api/html/tabs.css b/doc/api/html/tabs.css new file mode 100644 index 00000000000..9cf578f23a1 --- /dev/null +++ b/doc/api/html/tabs.css @@ -0,0 +1,60 @@ +.tabs, .tabs2, .tabs3 { + background-image: url('tab_b.png'); + width: 100%; + z-index: 101; + font-size: 13px; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +} + +.tabs2 { + font-size: 10px; +} +.tabs3 { + font-size: 9px; +} + +.tablist { + margin: 0; + padding: 0; + display: table; +} + +.tablist li { + float: left; + display: table-cell; + background-image: url('tab_b.png'); + line-height: 36px; + list-style: none; +} + +.tablist a { + display: block; + padding: 0 20px; + font-weight: bold; + background-image:url('tab_s.png'); + background-repeat:no-repeat; + background-position:right; + color: #283A5D; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; + outline: none; +} + +.tabs3 .tablist a { + padding: 0 10px; +} + +.tablist a:hover { + background-image: url('tab_h.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); + text-decoration: none; +} + +.tablist li.current a { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} diff --git a/doc/api/html/tail_8hpp.html b/doc/api/html/tail_8hpp.html new file mode 100644 index 00000000000..fd72f29d7fd --- /dev/null +++ b/doc/api/html/tail_8hpp.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/tail.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
tail.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::tail (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v, size_t n)
 Return the specified number of elements as a vector from the back of the specified vector. More...
 
template<typename T >
Eigen::Matrix< T,
+1, Eigen::Dynamic > 
stan::math::tail (const Eigen::Matrix< T, 1, Eigen::Dynamic > &rv, size_t n)
 Return the specified number of elements as a row vector from the back of the specified row vector. More...
 
template<typename T >
std::vector< T > stan::math::tail (const std::vector< T > &sv, size_t n)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/tail_8hpp_source.html b/doc/api/html/tail_8hpp_source.html new file mode 100644 index 00000000000..0675fc27f17 --- /dev/null +++ b/doc/api/html/tail_8hpp_source.html @@ -0,0 +1,172 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/tail.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
tail.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_TAIL_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_TAIL_HPP
+
3 
+ + + + + + +
10 #include <vector>
+
11 
+
12 namespace stan {
+
13 
+
14  namespace math {
+
15 
+
20  template <typename T>
+
21  inline
+
22  Eigen::Matrix<T, Eigen::Dynamic, 1>
+
23  tail(const Eigen::Matrix<T, Eigen::Dynamic, 1>& v,
+
24  size_t n) {
+
25  if (n != 0)
+
26  stan::math::check_row_index("tail", "n", v, n);
+
27  return v.tail(n);
+
28  }
+
29 
+
30 
+
35  template <typename T>
+
36  inline
+
37  Eigen::Matrix<T, 1, Eigen::Dynamic>
+
38  tail(const Eigen::Matrix<T, 1, Eigen::Dynamic>& rv,
+
39  size_t n) {
+
40  if (n != 0)
+
41  stan::math::check_column_index("tail", "n", rv, n);
+
42  return rv.tail(n);
+
43  }
+
44 
+
45  template <typename T>
+
46  std::vector<T> tail(const std::vector<T>& sv,
+
47  size_t n) {
+
48  typedef typename index_type<std::vector<T> >::type idx_t;
+
49  if (n != 0)
+
50  stan::math::check_std_vector_index("tail", "n", sv, n);
+
51  std::vector<T> s;
+
52  for (idx_t i = sv.size() - n; i < sv.size(); ++i)
+
53  s.push_back(sv[i]);
+
54  return s;
+
55  }
+
56 
+
57 
+
58  }
+
59 }
+
60 
+
61 #endif
+ + +
Eigen::Matrix< T, Eigen::Dynamic, 1 > tail(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v, size_t n)
Return the specified number of elements as a vector from the back of the specified vector...
Definition: tail.hpp:23
+ +
bool check_row_index(const char *function, const char *name, const Eigen::Matrix< T_y, R, C > &y, size_t i)
Return true if the specified index is a valid row of the matrix.
+ +
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:19
+
bool check_std_vector_index(const char *function, const char *name, const std::vector< T > &y, int i)
Return true if the specified index is valid in std vector.
+ + +
bool check_column_index(const char *function, const char *name, const Eigen::Matrix< T_y, R, C > &y, const size_t i)
Return true if the specified index is a valid column of the matrix.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/to__array__1d_8hpp.html b/doc/api/html/to__array__1d_8hpp.html new file mode 100644 index 00000000000..f1cb38c7b2d --- /dev/null +++ b/doc/api/html/to__array__1d_8hpp.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/to_array_1d.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
to_array_1d.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + +

+Functions

template<typename T , int R, int C>
vector< T > stan::math::to_array_1d (const Matrix< T, R, C > &matrix)
 
template<typename T >
vector< T > stan::math::to_array_1d (const vector< T > &x)
 
template<typename T >
vector< typename scalar_type
+< T >::type > 
stan::math::to_array_1d (const vector< vector< T > > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/to__array__1d_8hpp_source.html b/doc/api/html/to__array__1d_8hpp_source.html new file mode 100644 index 00000000000..efdac54dd66 --- /dev/null +++ b/doc/api/html/to__array__1d_8hpp_source.html @@ -0,0 +1,164 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/to_array_1d.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
to_array_1d.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_TO_ARRAY_1D_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_TO_ARRAY_1D_HPP
+
3 
+ + +
6 #include <vector>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  using Eigen::Dynamic;
+
12  using Eigen::Matrix;
+
13  using std::vector;
+
14 
+
15  // real[] to_array_1d(matrix)
+
16  // real[] to_array_1d(row_vector)
+
17  // real[] to_array_1d(vector)
+
18  template <typename T, int R, int C>
+
19  inline vector<T> to_array_1d(const Matrix<T, R, C> & matrix) {
+
20  const T* datap = matrix.data();
+
21  int size = matrix.size();
+
22  vector<T> result(size);
+
23  for (int i=0; i < size; i++)
+
24  result[i] = datap[i];
+
25  return result;
+
26  }
+
27 
+
28  // real[] to_array_1d(...)
+
29  template <typename T>
+
30  inline vector<T>
+
31  to_array_1d(const vector<T> & x) {
+
32  return x;
+
33  }
+
34 
+
35  // real[] to_array_1d(...)
+
36  template <typename T>
+
37  inline vector<typename scalar_type<T>::type>
+
38  to_array_1d(const vector< vector<T> > & x) {
+
39  size_t size1 = x.size();
+
40  size_t size2 = 0;
+
41  if (size1 != 0)
+
42  size2 = x[0].size();
+
43  vector<T> y(size1*size2);
+
44  for (size_t i = 0, ij = 0; i < size1; i++)
+
45  for (size_t j = 0; j < size2; j++, ij++)
+
46  y[ij] = x[i][j];
+
47  return to_array_1d(y);
+
48  }
+
49 
+
50  }
+
51 }
+
52 #endif
+ + +
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17
+
vector< T > to_array_1d(const Matrix< T, R, C > &matrix)
Definition: to_array_1d.hpp:19
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/to__array__2d_8hpp.html b/doc/api/html/to__array__2d_8hpp.html new file mode 100644 index 00000000000..6ebf36fd7a1 --- /dev/null +++ b/doc/api/html/to__array__2d_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/to_array_2d.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
to_array_2d.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
vector< vector< T > > stan::math::to_array_2d (const Matrix< T, Dynamic, Dynamic > &matrix)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/to__array__2d_8hpp_source.html b/doc/api/html/to__array__2d_8hpp_source.html new file mode 100644 index 00000000000..f3a7fa8d97c --- /dev/null +++ b/doc/api/html/to__array__2d_8hpp_source.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/to_array_2d.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
to_array_2d.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_TO_ARRAY_2D_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_TO_ARRAY_2D_HPP
+
3 
+ +
5 #include <vector>
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
10  using Eigen::Dynamic;
+
11  using Eigen::Matrix;
+
12  using std::vector;
+
13 
+
14  // real[, ] to_array_2d(matrix)
+
15  template <typename T>
+
16  inline vector< vector<T> >
+
17  to_array_2d(const Matrix<T, Dynamic, Dynamic> & matrix) {
+
18  const T* datap = matrix.data();
+
19  int C = matrix.cols();
+
20  int R = matrix.rows();
+
21  vector< vector<T> > result(R, vector<T>(C));
+
22  for (int i=0, ij=0; i < C; i++)
+
23  for (int j=0; j < R; j++, ij++)
+
24  result[j][i] = datap[ij];
+
25  return result;
+
26  }
+
27 
+
28  }
+
29 }
+
30 #endif
+
vector< vector< T > > to_array_2d(const Matrix< T, Dynamic, Dynamic > &matrix)
Definition: to_array_2d.hpp:17
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/to__fvar_8hpp.html b/doc/api/html/to__fvar_8hpp.html new file mode 100644 index 00000000000..0ec1cb8d124 --- /dev/null +++ b/doc/api/html/to__fvar_8hpp.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/to_fvar.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
to_fvar.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + + + + +

+Functions

template<typename T >
fvar< T > stan::math::to_fvar (const T &x)
 
template<typename T >
fvar< T > stan::math::to_fvar (const fvar< T > &x)
 
template<int R, int C, typename T >
Eigen::Matrix< T, R, C > stan::math::to_fvar (const Eigen::Matrix< T, R, C > &m)
 
template<int R, int C>
Eigen::Matrix< fvar< double >
+, R, C > 
stan::math::to_fvar (const Eigen::Matrix< double, R, C > &m)
 
template<typename T , int R, int C>
Eigen::Matrix< fvar< T >, R, C > stan::math::to_fvar (const Eigen::Matrix< T, R, C > &val, const Eigen::Matrix< T, R, C > &deriv)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/to__fvar_8hpp_source.html b/doc/api/html/to__fvar_8hpp_source.html new file mode 100644 index 00000000000..22f8269b7ce --- /dev/null +++ b/doc/api/html/to__fvar_8hpp_source.html @@ -0,0 +1,179 @@ + + + + + + +Stan Math Library: stan/math/fwd/mat/fun/to_fvar.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
to_fvar.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_TO_FVAR_HPP
+
2 #define STAN_MATH_FWD_MAT_FUN_TO_FVAR_HPP
+
3 
+ +
5 #include <stan/math/fwd/core.hpp>
+ + +
8 #include <boost/utility/enable_if.hpp>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
13  template<typename T>
+
14  inline
+
15  fvar<T>
+
16  to_fvar(const T& x) {
+
17  return fvar<T>(x);
+
18  }
+
19 
+
20  template<typename T>
+
21  inline
+
22  fvar<T>
+
23  to_fvar(const fvar<T>& x) {
+
24  return x;
+
25  }
+
26 
+
27 
+
28  template<int R, int C, typename T>
+
29  inline
+
30  Eigen::Matrix<T, R, C>
+
31  to_fvar(const Eigen::Matrix<T, R, C>& m) {
+
32  return m;
+
33  }
+
34 
+
35  template<int R, int C>
+
36  inline
+
37  Eigen::Matrix<fvar<double>, R, C>
+
38  to_fvar(const Eigen::Matrix<double, R, C>& m) {
+
39  Eigen::Matrix<fvar<double>, R, C> m_fd(m.rows(), m.cols());
+
40  for (int i = 0; i < m.size(); ++i)
+
41  m_fd(i) = m(i);
+
42  return m_fd;
+
43  }
+
44 
+
45  template<typename T, int R, int C>
+
46  inline
+
47  Eigen::Matrix<fvar<T>, R, C>
+
48  to_fvar(const Eigen::Matrix<T, R, C>& val,
+
49  const Eigen::Matrix<T, R, C>& deriv) {
+ +
51  "value", val,
+
52  "deriv", deriv);
+
53  Eigen::Matrix<fvar<T>, R, C> ret(val.rows(), val.cols());
+
54  for (int i = 0; i < val.rows(); i++) {
+
55  for (int j = 0; j < val.cols(); j++) {
+
56  ret(i, j).val_ = val(i, j);
+
57  ret(i, j).d_ = deriv(i, j);
+
58  }
+
59  }
+
60  return ret;
+
61  }
+
62  }
+
63 }
+
64 #endif
+ + +
fvar< T > to_fvar(const T &x)
Definition: to_fvar.hpp:16
+
bool check_matching_dims(const char *function, const char *name1, const Eigen::Matrix< T1, R1, C1 > &y1, const char *name2, const Eigen::Matrix< T2, R2, C2 > &y2)
Return true if the two matrices are of the same size.
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/to__matrix_8hpp.html b/doc/api/html/to__matrix_8hpp.html new file mode 100644 index 00000000000..d7e80235182 --- /dev/null +++ b/doc/api/html/to__matrix_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/to_matrix.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
to_matrix.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T , int R, int C>
Matrix< T, Dynamic, Dynamic > stan::math::to_matrix (Matrix< T, R, C > matrix)
 
template<typename T >
Matrix< T, Dynamic, Dynamic > stan::math::to_matrix (const vector< vector< T > > &vec)
 
Matrix< double, Dynamic, Dynamic > stan::math::to_matrix (const vector< vector< int > > &vec)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/to__matrix_8hpp_source.html b/doc/api/html/to__matrix_8hpp_source.html new file mode 100644 index 00000000000..cc85c127656 --- /dev/null +++ b/doc/api/html/to__matrix_8hpp_source.html @@ -0,0 +1,171 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/to_matrix.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
to_matrix.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_TO_MATRIX_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_TO_MATRIX_HPP
+
3 
+ +
5  // stan::scalar_type
+
6 #include <vector>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  using Eigen::Dynamic;
+
12  using Eigen::Matrix;
+
13  using std::vector;
+
14 
+
15  // matrix to_matrix(matrix)
+
16  // matrix to_matrix(vector)
+
17  // matrix to_matrix(row_vector)
+
18  template <typename T, int R, int C>
+
19  inline Matrix<T, Dynamic, Dynamic>
+
20  to_matrix(Matrix<T, R, C> matrix) {
+
21  return matrix;
+
22  }
+
23 
+
24  // matrix to_matrix(real[, ])
+
25  template <typename T>
+
26  inline Matrix<T, Dynamic, Dynamic>
+
27  to_matrix(const vector< vector<T> > & vec) {
+
28  size_t R = vec.size();
+
29  if (R != 0) {
+
30  size_t C = vec[0].size();
+
31  Matrix<T, Dynamic, Dynamic> result(R, C);
+
32  T* datap = result.data();
+
33  for (size_t i=0, ij=0; i < C; i++)
+
34  for (size_t j=0; j < R; j++, ij++)
+
35  datap[ij] = vec[j][i];
+
36  return result;
+
37  } else {
+
38  return Matrix<T, Dynamic, Dynamic> (0, 0);
+
39  }
+
40  }
+
41 
+
42  // matrix to_matrix(int[, ])
+
43  inline Matrix<double, Dynamic, Dynamic>
+
44  to_matrix(const vector< vector<int> > & vec) {
+
45  size_t R = vec.size();
+
46  if (R != 0) {
+
47  size_t C = vec[0].size();
+
48  Matrix<double, Dynamic, Dynamic> result(R, C);
+
49  double* datap = result.data();
+
50  for (size_t i=0, ij=0; i < C; i++)
+
51  for (size_t j=0; j < R; j++, ij++)
+
52  datap[ij] = vec[j][i];
+
53  return result;
+
54  } else {
+
55  return Matrix<double, Dynamic, Dynamic> (0, 0);
+
56  }
+
57  }
+
58 
+
59  }
+
60 }
+
61 #endif
+
Matrix< T, Dynamic, Dynamic > to_matrix(Matrix< T, R, C > matrix)
Definition: to_matrix.hpp:20
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/to__row__vector_8hpp.html b/doc/api/html/to__row__vector_8hpp.html new file mode 100644 index 00000000000..6d62e5ad75d --- /dev/null +++ b/doc/api/html/to__row__vector_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/to_row_vector.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
to_row_vector.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T , int R, int C>
Matrix< T, 1, Dynamic > stan::math::to_row_vector (const Matrix< T, R, C > &matrix)
 
template<typename T >
Matrix< T, 1, Dynamic > stan::math::to_row_vector (const vector< T > &vec)
 
Matrix< double, 1, Dynamic > stan::math::to_row_vector (const vector< int > &vec)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/to__row__vector_8hpp_source.html b/doc/api/html/to__row__vector_8hpp_source.html new file mode 100644 index 00000000000..b9ddd5ef0e7 --- /dev/null +++ b/doc/api/html/to__row__vector_8hpp_source.html @@ -0,0 +1,155 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/to_row_vector.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
to_row_vector.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_TO_ROW_VECTOR_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_TO_ROW_VECTOR_HPP
+
3 
+ +
5  // stan::scalar_type
+
6 #include <vector>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  using Eigen::Dynamic;
+
12  using Eigen::Matrix;
+
13  using std::vector;
+
14 
+
15  // row_vector to_row_vector(matrix)
+
16  // row_vector to_row_vector(vector)
+
17  // row_vector to_row_vector(row_vector)
+
18  template <typename T, int R, int C>
+
19  inline Matrix<T, 1, Dynamic>
+
20  to_row_vector(const Matrix<T, R, C>& matrix) {
+
21  return Matrix<T, 1, Dynamic>::Map(matrix.data(),
+
22  matrix.rows()*matrix.cols());
+
23  }
+
24 
+
25  // row_vector to_row_vector(real[])
+
26  template <typename T>
+
27  inline Matrix<T, 1, Dynamic>
+
28  to_row_vector(const vector<T> & vec) {
+
29  return Matrix<T, 1, Dynamic>::Map(vec.data(), vec.size());
+
30  }
+
31 
+
32  // row_vector to_row_vector(int[])
+
33  inline Matrix<double, 1, Dynamic>
+
34  to_row_vector(const vector<int> & vec) {
+
35  int C = vec.size();
+
36  Matrix<double, 1, Dynamic> result(C);
+
37  double* datap = result.data();
+
38  for (int i=0; i < C; i++)
+
39  datap[i] = vec[i];
+
40  return result;
+
41  }
+
42 
+
43  }
+
44 }
+
45 #endif
+
Matrix< T, 1, Dynamic > to_row_vector(const Matrix< T, R, C > &matrix)
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/to__var_8hpp.html b/doc/api/html/to__var_8hpp.html new file mode 100644 index 00000000000..af7a821470c --- /dev/null +++ b/doc/api/html/to__var_8hpp.html @@ -0,0 +1,154 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/to_var.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
to_var.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

var stan::math::to_var (const double &x)
 Converts argument to an automatic differentiation variable. More...
 
var stan::math::to_var (const var &x)
 Converts argument to an automatic differentiation variable. More...
 
matrix_v stan::math::to_var (const stan::math::matrix_d &m)
 Converts argument to an automatic differentiation variable. More...
 
matrix_v stan::math::to_var (const matrix_v &m)
 Converts argument to an automatic differentiation variable. More...
 
vector_v stan::math::to_var (const stan::math::vector_d &v)
 Converts argument to an automatic differentiation variable. More...
 
vector_v stan::math::to_var (const vector_v &v)
 Converts argument to an automatic differentiation variable. More...
 
row_vector_v stan::math::to_var (const stan::math::row_vector_d &rv)
 Converts argument to an automatic differentiation variable. More...
 
row_vector_v stan::math::to_var (const row_vector_v &rv)
 Converts argument to an automatic differentiation variable. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/to__var_8hpp_source.html b/doc/api/html/to__var_8hpp_source.html new file mode 100644 index 00000000000..8d30a94b9ed --- /dev/null +++ b/doc/api/html/to__var_8hpp_source.html @@ -0,0 +1,170 @@ + + + + + + +Stan Math Library: stan/math/rev/mat/fun/to_var.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
to_var.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_MAT_FUN_TO_VAR_HPP
+
2 #define STAN_MATH_REV_MAT_FUN_TO_VAR_HPP
+
3 
+ + +
6 #include <stan/math/rev/core.hpp>
+ +
8 #include <vector>
+
9 
+
10 namespace stan {
+
11  namespace math {
+
12 
+
21  inline var to_var(const double& x) {
+
22  return var(x);
+
23  }
+
32  inline var to_var(const var& x) {
+
33  return x;
+
34  }
+ +
44  matrix_v m_v(m.rows(), m.cols());
+
45  for (int j = 0; j < m.cols(); ++j)
+
46  for (int i = 0; i < m.rows(); ++i)
+
47  m_v(i, j) = m(i, j);
+
48  return m_v;
+
49  }
+
58  inline matrix_v to_var(const matrix_v& m) {
+
59  return m;
+
60  }
+ +
71  vector_v v_v(v.size());
+
72  for (int i = 0; i < v.size(); ++i)
+
73  v_v[i] = v[i];
+
74  return v_v;
+
75  }
+
85  inline vector_v to_var(const vector_v& v) {
+
86  return v;
+
87  }
+ +
98  row_vector_v rv_v(rv.size());
+
99  for (int i = 0; i < rv.size(); ++i)
+
100  rv_v[i] = rv[i];
+
101  return rv_v;
+
102  }
+
112  inline row_vector_v to_var(const row_vector_v& rv) {
+
113  return rv;
+
114  }
+
115 
+
116  }
+
117 }
+
118 #endif
+ +
Eigen::Matrix< var, Eigen::Dynamic, 1 > vector_v
The type of a (column) vector holding stan::math::var values.
Definition: typedefs.hpp:29
+
Eigen::Matrix< double, Eigen::Dynamic, 1 > vector_d
Type for (column) vector of double values.
Definition: typedefs.hpp:30
+
Eigen::Matrix< double, 1, Eigen::Dynamic > row_vector_d
Type for (row) vector of double values.
Definition: typedefs.hpp:37
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
Eigen::Matrix< var, Eigen::Dynamic, Eigen::Dynamic > matrix_v
The type of a matrix holding stan::math::var values.
Definition: typedefs.hpp:21
+
var to_var(const double &x)
Converts argument to an automatic differentiation variable.
Definition: to_var.hpp:21
+ + +
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > matrix_d
Type for matrix of double values.
Definition: typedefs.hpp:23
+
Eigen::Matrix< var, 1, Eigen::Dynamic > row_vector_v
The type of a row vector holding stan::math::var values.
Definition: typedefs.hpp:37
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/to__vector_8hpp.html b/doc/api/html/to__vector_8hpp.html new file mode 100644 index 00000000000..813ddadb5dc --- /dev/null +++ b/doc/api/html/to__vector_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/to_vector.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
to_vector.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T , int R, int C>
Matrix< T, Dynamic, 1 > stan::math::to_vector (const Matrix< T, R, C > &matrix)
 
template<typename T >
Matrix< T, Dynamic, 1 > stan::math::to_vector (const vector< T > &vec)
 
Matrix< double, Dynamic, 1 > stan::math::to_vector (const vector< int > &vec)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/to__vector_8hpp_source.html b/doc/api/html/to__vector_8hpp_source.html new file mode 100644 index 00000000000..dc92a99cbd3 --- /dev/null +++ b/doc/api/html/to__vector_8hpp_source.html @@ -0,0 +1,156 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/to_vector.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
to_vector.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_TO_VECTOR_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_TO_VECTOR_HPP
+
3 
+ +
5  // stan::scalar_type
+
6 #include <vector>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  using Eigen::Dynamic;
+
12  using Eigen::Matrix;
+
13  using std::vector;
+
14 
+
15  // vector to_vector(matrix)
+
16  // vector to_vector(row_vector)
+
17  // vector to_vector(vector)
+
18  template <typename T, int R, int C>
+
19  inline Matrix<T, Dynamic, 1>
+
20  to_vector(const Matrix<T, R, C>& matrix) {
+
21  return Matrix<T, Dynamic, 1>::Map(matrix.data(),
+
22  matrix.rows()*matrix.cols());
+
23  }
+
24 
+
25  // vector to_vector(real[])
+
26  template <typename T>
+
27  inline Matrix<T, Dynamic, 1>
+
28  to_vector(const vector<T> & vec) {
+
29  return Matrix<T, Dynamic, 1>::Map(vec.data(), vec.size());
+
30  }
+
31 
+
32  // vector to_vector(int[])
+
33  inline Matrix<double, Dynamic, 1>
+
34  to_vector(const vector<int> & vec) {
+
35  int R = vec.size();
+
36  Matrix<double, Dynamic, 1> result(R);
+
37  double* datap = result.data();
+
38  for (int i=0; i < R; i++)
+
39  datap[i] = vec[i];
+
40  return result;
+
41  }
+
42 
+
43 
+
44  }
+
45 }
+
46 #endif
+
Matrix< T, Dynamic, 1 > to_vector(const Matrix< T, R, C > &matrix)
Definition: to_vector.hpp:20
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/trace_8hpp.html b/doc/api/html/trace_8hpp.html new file mode 100644 index 00000000000..dc307a10cd4 --- /dev/null +++ b/doc/api/html/trace_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/trace.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
trace.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

template<typename T >
stan::math::trace (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
 Returns the trace of the specified matrix. More...
 
template<typename T >
stan::math::trace (const T &m)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/trace_8hpp_source.html b/doc/api/html/trace_8hpp_source.html new file mode 100644 index 00000000000..939e9db20db --- /dev/null +++ b/doc/api/html/trace_8hpp_source.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/trace.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
trace.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_TRACE_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_TRACE_HPP
+
3 
+ +
5 
+
6 
+
7 namespace stan {
+
8  namespace math {
+
9 
+
19  template <typename T>
+
20  inline T trace(const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>& m) {
+
21  return m.trace();
+
22  }
+
23 
+
24  template <typename T>
+
25  inline T
+
26  trace(const T& m) {
+
27  return m;
+
28  }
+
29  }
+
30 }
+
31 #endif
+ +
T trace(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
Returns the trace of the specified matrix.
Definition: trace.hpp:20
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/transpose_8hpp.html b/doc/api/html/transpose_8hpp.html new file mode 100644 index 00000000000..37a08f9f94d --- /dev/null +++ b/doc/api/html/transpose_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/transpose.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
transpose.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T , int R, int C>
Eigen::Matrix< T, C, R > stan::math::transpose (const Eigen::Matrix< T, R, C > &m)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/transpose_8hpp_source.html b/doc/api/html/transpose_8hpp_source.html new file mode 100644 index 00000000000..dad0198c415 --- /dev/null +++ b/doc/api/html/transpose_8hpp_source.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/transpose.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
transpose.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_TRANSPOSE_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_TRANSPOSE_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
9  template <typename T, int R, int C>
+
10  Eigen::Matrix<T, C, R>
+
11  inline
+
12  transpose(const Eigen::Matrix<T, R, C>& m) {
+
13  return m.transpose();
+
14  }
+
15 
+
16  }
+
17 }
+
18 #endif
+ +
Eigen::Matrix< T, C, R > transpose(const Eigen::Matrix< T, R, C > &m)
Definition: transpose.hpp:12
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/trigamma_8hpp.html b/doc/api/html/trigamma_8hpp.html new file mode 100644 index 00000000000..c19bf30db27 --- /dev/null +++ b/doc/api/html/trigamma_8hpp.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/trigamma.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
trigamma.hpp File Reference
+
+
+
#include <stan/math/prim/scal/fun/constants.hpp>
+#include <cmath>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T >
stan::math::trigamma (T x)
 

+\[ \mbox{trigamma}(x) = \begin{cases} \textrm{error} & \mbox{if } x\in \{\dots, -3, -2, -1, 0\}\\ \Psi_1(x) & \mbox{if } x\not\in \{\dots, -3, -2, -1, 0\}\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \] +

+ More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/trigamma_8hpp_source.html b/doc/api/html/trigamma_8hpp_source.html new file mode 100644 index 00000000000..7d2c1272e45 --- /dev/null +++ b/doc/api/html/trigamma_8hpp_source.html @@ -0,0 +1,189 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/trigamma.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
trigamma.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_TRIGAMMA_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_TRIGAMMA_HPP
+
3 
+
4  // Reference:
+
5  // BE Schneider,
+
6  // Algorithm AS 121:
+
7  // Trigamma Function,
+
8  // Applied Statistics,
+
9  // Volume 27, Number 1, pages 97-99, 1978.
+
10 
+ +
12 #include <cmath>
+
13 
+
14 namespace stan {
+
15 
+
16  namespace math {
+
17 
+
47  template <typename T>
+
48  inline
+
49  T
+
50  trigamma(T x) {
+
51  using std::floor;
+
52  using std::sin;
+
53 
+
54  double small = 0.0001;
+
55  double large = 5.0;
+
56  T value;
+
57  T y;
+
58  T z;
+
59 
+
60  // bernoulli numbers
+
61  double b2 = 1.0 / 6.0;
+
62  double b4 = -1.0 / 30.0;
+
63  double b6 = 1.0 / 42.0;
+
64  double b8 = -1.0 / 30.0;
+
65 
+
66  // negative integers and zero return postiive infinity
+
67  // see http:// mathworld.wolfram.com/PolygammaFunction.html
+
68  if ((x <= 0.0) && (floor(x) == x)) {
+
69  value = positive_infinity();
+
70  return value;
+
71  }
+
72 
+
73  // negative non-integers: use the reflection formula
+
74  // see http:// mathworld.wolfram.com/PolygammaFunction.html
+
75  if ((x <= 0) && (floor(x) != x)) {
+
76  value = -trigamma(-x + 1.0) + (pi() / sin(-pi() * x))
+
77  * (pi() / sin(-pi() * x));
+
78  return value;
+
79  }
+
80 
+
81  // small value approximation if x <= small.
+
82  if (x <= small)
+
83  return 1.0 / (x * x);
+
84 
+
85  // use recurrence relation until x >= large
+
86  // see http:// mathworld.wolfram.com/PolygammaFunction.html
+
87  z = x;
+
88  value = 0.0;
+
89  while (z < large) {
+
90  value += 1.0 / (z * z);
+
91  z += 1.0;
+
92  }
+
93 
+
94  // asymptotic expansion as a Laurent series if x >= large
+
95  // see http:// en.wikipedia.org/wiki/Trigamma_function
+
96  y = 1.0 / (z * z);
+
97  value += 0.5 * y + (1.0 + y * (b2 + y * (b4 + y * (b6 + y * b8)))) / z;
+
98 
+
99  return value;
+
100  }
+
101  }
+
102 }
+
103 
+
104 #endif
+
T trigamma(T x)
Definition: trigamma.hpp:50
+
fvar< T > sin(const fvar< T > &x)
Definition: sin.hpp:14
+
double positive_infinity()
Return positive infinity.
Definition: constants.hpp:123
+ +
fvar< T > floor(const fvar< T > &x)
Definition: floor.hpp:11
+
double pi()
Return the value of pi.
Definition: constants.hpp:86
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/ub__constrain_8hpp.html b/doc/api/html/ub__constrain_8hpp.html new file mode 100644 index 00000000000..372f40708d9 --- /dev/null +++ b/doc/api/html/ub__constrain_8hpp.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/ub_constrain.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
ub_constrain.hpp File Reference
+
+
+
#include <boost/math/tools/promotion.hpp>
+#include <stan/math/prim/scal/fun/identity_constrain.hpp>
+#include <cmath>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T , typename TU >
boost::math::tools::promote_args
+< T, TU >::type 
stan::math::ub_constrain (const T x, const TU ub)
 Return the upper-bounded value for the specified unconstrained scalar and upper bound. More...
 
template<typename T , typename TU >
boost::math::tools::promote_args
+< T, TU >::type 
stan::math::ub_constrain (const T x, const TU ub, T &lp)
 Return the upper-bounded value for the specified unconstrained scalar and upper bound and increment the specified log probability reference with the log absolute Jacobian determinant of the transform. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/ub__constrain_8hpp_source.html b/doc/api/html/ub__constrain_8hpp_source.html new file mode 100644 index 00000000000..c0bc2980d70 --- /dev/null +++ b/doc/api/html/ub__constrain_8hpp_source.html @@ -0,0 +1,152 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/ub_constrain.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
ub_constrain.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_UB_CONSTRAIN_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_UB_CONSTRAIN_HPP
+
3 
+
4 #include <boost/math/tools/promotion.hpp>
+ +
6 #include <cmath>
+
7 #include <limits>
+
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
13  // UPPER BOUND
+
14 
+
34  template <typename T, typename TU>
+
35  inline
+
36  typename boost::math::tools::promote_args<T, TU>::type
+
37  ub_constrain(const T x, const TU ub) {
+
38  using std::exp;
+
39  if (ub == std::numeric_limits<double>::infinity())
+
40  return identity_constrain(x);
+
41  return ub - exp(x);
+
42  }
+
43 
+
67  template <typename T, typename TU>
+
68  inline
+
69  typename boost::math::tools::promote_args<T, TU>::type
+
70  ub_constrain(const T x, const TU ub, T& lp) {
+
71  using std::exp;
+
72  if (ub == std::numeric_limits<double>::infinity())
+
73  return identity_constrain(x, lp);
+
74  lp += x;
+
75  return ub - exp(x);
+
76  }
+
77 
+
78  }
+
79 
+
80 }
+
81 
+
82 #endif
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+ +
boost::math::tools::promote_args< T, TU >::type ub_constrain(const T x, const TU ub)
Return the upper-bounded value for the specified unconstrained scalar and upper bound.
+
T identity_constrain(T x)
Returns the result of applying the identity constraint transform to the input.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/ub__free_8hpp.html b/doc/api/html/ub__free_8hpp.html new file mode 100644 index 00000000000..a1fb9c31c71 --- /dev/null +++ b/doc/api/html/ub__free_8hpp.html @@ -0,0 +1,135 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/ub_free.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
ub_free.hpp File Reference
+
+
+
#include <stan/math/prim/scal/fun/identity_free.hpp>
+#include <stan/math/prim/scal/err/check_less_or_equal.hpp>
+#include <boost/math/tools/promotion.hpp>
+#include <cmath>
+#include <limits>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + +

+Functions

template<typename T , typename TU >
boost::math::tools::promote_args
+< T, TU >::type 
stan::math::ub_free (const T y, const TU ub)
 Return the free scalar that corresponds to the specified upper-bounded value with respect to the specified upper bound. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/ub__free_8hpp_source.html b/doc/api/html/ub__free_8hpp_source.html new file mode 100644 index 00000000000..42a5d289e2f --- /dev/null +++ b/doc/api/html/ub__free_8hpp_source.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/fun/ub_free.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
ub_free.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_UB_FREE_HPP
+
2 #define STAN_MATH_PRIM_SCAL_FUN_UB_FREE_HPP
+
3 
+ + +
6 #include <boost/math/tools/promotion.hpp>
+
7 #include <cmath>
+
8 #include <limits>
+
9 
+
10 namespace stan {
+
11 
+
12  namespace math {
+
13 
+
36  template <typename T, typename TU>
+
37  inline
+
38  typename boost::math::tools::promote_args<T, TU>::type
+
39  ub_free(const T y, const TU ub) {
+
40  using std::log;
+
41  if (ub == std::numeric_limits<double>::infinity())
+
42  return identity_free(y);
+
43  stan::math::check_less_or_equal("stan::math::ub_free",
+
44  "Upper bounded variable", y, ub);
+
45  return log(ub - y);
+
46  }
+
47 
+
48 
+
49  }
+
50 
+
51 }
+
52 
+
53 #endif
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
boost::math::tools::promote_args< T, TU >::type ub_free(const T y, const TU ub)
Return the free scalar that corresponds to the specified upper-bounded value with respect to the spec...
Definition: ub_free.hpp:39
+ +
T identity_free(const T y)
Returns the result of applying the inverse of the identity constraint transform to the input...
+
bool check_less_or_equal(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is less or equal to high.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/uniform__ccdf__log_8hpp.html b/doc/api/html/uniform__ccdf__log_8hpp.html new file mode 100644 index 00000000000..78b049c4d9b --- /dev/null +++ b/doc/api/html/uniform__ccdf__log_8hpp.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/uniform_ccdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
uniform_ccdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_low , typename T_high >
return_type< T_y, T_low,
+T_high >::type 
stan::math::uniform_ccdf_log (const T_y &y, const T_low &alpha, const T_high &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/uniform__ccdf__log_8hpp_source.html b/doc/api/html/uniform__ccdf__log_8hpp_source.html new file mode 100644 index 00000000000..715942c04c1 --- /dev/null +++ b/doc/api/html/uniform__ccdf__log_8hpp_source.html @@ -0,0 +1,228 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/uniform_ccdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
uniform_ccdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_UNIFORM_CCDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_UNIFORM_CCDF_LOG_HPP
+
3 
+
4 #include <boost/random/uniform_real_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + +
15 #include <cmath>
+
16 
+
17 namespace stan {
+
18 
+
19  namespace math {
+
20 
+
21  template <typename T_y, typename T_low, typename T_high>
+
22  typename return_type<T_y, T_low, T_high>::type
+
23  uniform_ccdf_log(const T_y& y, const T_low& alpha, const T_high& beta) {
+
24  static const char* function("stan::math::uniform_ccdf_log");
+ +
26  T_partials_return;
+
27 
+ + + + + +
33  using std::log;
+
34 
+
35  // check if any vectors are zero length
+
36  if (!(stan::length(y)
+
37  && stan::length(alpha)
+
38  && stan::length(beta)))
+
39  return 0.0;
+
40 
+
41  // set up return value accumulator
+
42  T_partials_return ccdf_log(0.0);
+
43  check_not_nan(function, "Random variable", y);
+
44  check_finite(function, "Lower bound parameter", alpha);
+
45  check_finite(function, "Upper bound parameter", beta);
+
46  check_greater(function, "Upper bound parameter", beta, alpha);
+
47  check_consistent_sizes(function,
+
48  "Random variable", y,
+
49  "Lower bound parameter", alpha,
+
50  "Upper bound parameter", beta);
+
51 
+
52  VectorView<const T_y> y_vec(y);
+
53  VectorView<const T_low> alpha_vec(alpha);
+
54  VectorView<const T_high> beta_vec(beta);
+
55  size_t N = max_size(y, alpha, beta);
+
56 
+
57  for (size_t n = 0; n < N; n++) {
+
58  const T_partials_return y_dbl = value_of(y_vec[n]);
+
59  if (y_dbl < value_of(alpha_vec[n])
+
60  || y_dbl > value_of(beta_vec[n]))
+
61  return 0.0;
+
62  if (y_dbl == value_of(beta_vec[n]))
+
63  return LOG_ZERO;
+
64  }
+
65 
+ +
67  operands_and_partials(y, alpha, beta);
+
68  for (size_t n = 0; n < N; n++) {
+
69  const T_partials_return y_dbl = value_of(y_vec[n]);
+
70  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
71  const T_partials_return beta_dbl = value_of(beta_vec[n]);
+
72  const T_partials_return b_min_a = beta_dbl - alpha_dbl;
+
73  const T_partials_return ccdf_log_ = 1.0 - (y_dbl - alpha_dbl) / b_min_a;
+
74 
+
75  // ccdf_log
+
76  ccdf_log += log(ccdf_log_);
+
77 
+
78  // gradients
+ +
80  operands_and_partials.d_x1[n] -= 1.0 / b_min_a / ccdf_log_;
+ +
82  operands_and_partials.d_x2[n] -= (y_dbl - beta_dbl) / b_min_a
+
83  / b_min_a / ccdf_log_;
+ +
85  operands_and_partials.d_x3[n] += (y_dbl - alpha_dbl) / b_min_a
+
86  / b_min_a / ccdf_log_;
+
87  }
+
88 
+
89  return operands_and_partials.to_var(ccdf_log, y, alpha, beta);
+
90  }
+
91  }
+
92 }
+
93 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
const double LOG_ZERO
Definition: constants.hpp:175
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
return_type< T_y, T_low, T_high >::type uniform_ccdf_log(const T_y &y, const T_low &alpha, const T_high &beta)
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_greater(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is strictly greater than low.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/uniform__cdf_8hpp.html b/doc/api/html/uniform__cdf_8hpp.html new file mode 100644 index 00000000000..47d1ee2fe2f --- /dev/null +++ b/doc/api/html/uniform__cdf_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/uniform_cdf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
uniform_cdf.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_low , typename T_high >
return_type< T_y, T_low,
+T_high >::type 
stan::math::uniform_cdf (const T_y &y, const T_low &alpha, const T_high &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/uniform__cdf_8hpp_source.html b/doc/api/html/uniform__cdf_8hpp_source.html new file mode 100644 index 00000000000..e22877aedfe --- /dev/null +++ b/doc/api/html/uniform__cdf_8hpp_source.html @@ -0,0 +1,234 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/uniform_cdf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
uniform_cdf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_UNIFORM_CDF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_UNIFORM_CDF_HPP
+
3 
+
4 #include <boost/random/uniform_real_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + +
15 
+
16 namespace stan {
+
17 
+
18  namespace math {
+
19 
+
20  template <typename T_y, typename T_low, typename T_high>
+
21  typename return_type<T_y, T_low, T_high>::type
+
22  uniform_cdf(const T_y& y, const T_low& alpha, const T_high& beta) {
+
23  static const char* function("stan::math::uniform_cdf");
+ +
25  T_partials_return;
+
26 
+ + + + + +
32 
+
33  // check if any vectors are zero length
+
34  if (!(stan::length(y)
+
35  && stan::length(alpha)
+
36  && stan::length(beta)))
+
37  return 1.0;
+
38 
+
39  // set up return value accumulator
+
40  T_partials_return cdf(1.0);
+
41  check_not_nan(function, "Random variable", y);
+
42  check_finite(function, "Lower bound parameter", alpha);
+
43  check_finite(function, "Upper bound parameter", beta);
+
44  check_greater(function, "Upper bound parameter", beta, alpha);
+
45  check_consistent_sizes(function,
+
46  "Random variable", y,
+
47  "Lower bound parameter", alpha,
+
48  "Upper bound parameter", beta);
+
49 
+
50  VectorView<const T_y> y_vec(y);
+
51  VectorView<const T_low> alpha_vec(alpha);
+
52  VectorView<const T_high> beta_vec(beta);
+
53  size_t N = max_size(y, alpha, beta);
+
54 
+
55  for (size_t n = 0; n < N; n++) {
+
56  const T_partials_return y_dbl = value_of(y_vec[n]);
+
57  if (y_dbl < value_of(alpha_vec[n])
+
58  || y_dbl > value_of(beta_vec[n]))
+
59  return 0.0;
+
60  }
+
61 
+ +
63  operands_and_partials(y, alpha, beta);
+
64  for (size_t n = 0; n < N; n++) {
+
65  const T_partials_return y_dbl = value_of(y_vec[n]);
+
66  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
67  const T_partials_return beta_dbl = value_of(beta_vec[n]);
+
68  const T_partials_return b_min_a = beta_dbl - alpha_dbl;
+
69  const T_partials_return cdf_ = (y_dbl - alpha_dbl) / b_min_a;
+
70 
+
71  // cdf
+
72  cdf *= cdf_;
+
73 
+
74  // gradients
+ +
76  operands_and_partials.d_x1[n] += 1.0 / b_min_a / cdf_;
+ +
78  operands_and_partials.d_x2[n] += (y_dbl - beta_dbl) / b_min_a
+
79  / b_min_a / cdf_;
+ +
81  operands_and_partials.d_x3[n] -= 1.0 / b_min_a;
+
82  }
+
83 
+ +
85  for (size_t n = 0; n < stan::length(y); ++n)
+
86  operands_and_partials.d_x1[n] *= cdf;
+
87  }
+ +
89  for (size_t n = 0; n < stan::length(alpha); ++n)
+
90  operands_and_partials.d_x2[n] *= cdf;
+
91  }
+ +
93  for (size_t n = 0; n < stan::length(beta); ++n)
+
94  operands_and_partials.d_x3[n] *= cdf;
+
95  }
+
96 
+
97  return operands_and_partials.to_var(cdf, y, alpha, beta);
+
98  }
+
99  }
+
100 }
+
101 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
return_type< T_y, T_low, T_high >::type uniform_cdf(const T_y &y, const T_low &alpha, const T_high &beta)
Definition: uniform_cdf.hpp:22
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_greater(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is strictly greater than low.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/uniform__cdf__log_8hpp.html b/doc/api/html/uniform__cdf__log_8hpp.html new file mode 100644 index 00000000000..544b8125ab8 --- /dev/null +++ b/doc/api/html/uniform__cdf__log_8hpp.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/uniform_cdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
uniform_cdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_low , typename T_high >
return_type< T_y, T_low,
+T_high >::type 
stan::math::uniform_cdf_log (const T_y &y, const T_low &alpha, const T_high &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/uniform__cdf__log_8hpp_source.html b/doc/api/html/uniform__cdf__log_8hpp_source.html new file mode 100644 index 00000000000..7ac04ba3948 --- /dev/null +++ b/doc/api/html/uniform__cdf__log_8hpp_source.html @@ -0,0 +1,228 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/uniform_cdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
uniform_cdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_UNIFORM_CDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_UNIFORM_CDF_LOG_HPP
+
3 
+
4 #include <boost/random/uniform_real_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + +
15 #include <cmath>
+
16 
+
17 namespace stan {
+
18 
+
19  namespace math {
+
20 
+
21  template <typename T_y, typename T_low, typename T_high>
+
22  typename return_type<T_y, T_low, T_high>::type
+
23  uniform_cdf_log(const T_y& y, const T_low& alpha, const T_high& beta) {
+
24  static const char* function("stan::math::uniform_cdf_log");
+ +
26  T_partials_return;
+
27 
+ + + + + +
33  using std::log;
+
34 
+
35  // check if any vectors are zero length
+
36  if (!(stan::length(y)
+
37  && stan::length(alpha)
+
38  && stan::length(beta)))
+
39  return 0.0;
+
40 
+
41  // set up return value accumulator
+
42  T_partials_return cdf_log(0.0);
+
43  check_not_nan(function, "Random variable", y);
+
44  check_finite(function, "Lower bound parameter", alpha);
+
45  check_finite(function, "Upper bound parameter", beta);
+
46  check_greater(function, "Upper bound parameter", beta, alpha);
+
47  check_consistent_sizes(function,
+
48  "Random variable", y,
+
49  "Lower bound parameter", alpha,
+
50  "Upper bound parameter", beta);
+
51 
+
52  VectorView<const T_y> y_vec(y);
+
53  VectorView<const T_low> alpha_vec(alpha);
+
54  VectorView<const T_high> beta_vec(beta);
+
55  size_t N = max_size(y, alpha, beta);
+
56 
+ +
58  operands_and_partials(y, alpha, beta);
+
59 
+
60  for (size_t n = 0; n < N; n++) {
+
61  const T_partials_return y_dbl = value_of(y_vec[n]);
+
62  if (y_dbl < value_of(alpha_vec[n])
+
63  || y_dbl > value_of(beta_vec[n]))
+ +
65  if (y_dbl == value_of(beta_vec[n]))
+
66  return operands_and_partials.to_var(0.0, y, alpha, beta);
+
67  }
+
68 
+
69  for (size_t n = 0; n < N; n++) {
+
70  const T_partials_return y_dbl = value_of(y_vec[n]);
+
71  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
72  const T_partials_return beta_dbl = value_of(beta_vec[n]);
+
73  const T_partials_return b_min_a = beta_dbl - alpha_dbl;
+
74  const T_partials_return cdf_log_ = (y_dbl - alpha_dbl) / b_min_a;
+
75 
+
76  // cdf_log
+
77  cdf_log += log(cdf_log_);
+
78 
+
79  // gradients
+ +
81  operands_and_partials.d_x1[n] += 1.0 / b_min_a / cdf_log_;
+ +
83  operands_and_partials.d_x2[n] += (y_dbl - beta_dbl) / b_min_a
+
84  / b_min_a / cdf_log_;
+ +
86  operands_and_partials.d_x3[n] -= 1.0 / b_min_a;
+
87  }
+
88 
+
89  return operands_and_partials.to_var(cdf_log, y, alpha, beta);
+
90  }
+
91  }
+
92 }
+
93 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
return_type< T_y, T_low, T_high >::type uniform_cdf_log(const T_y &y, const T_low &alpha, const T_high &beta)
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_greater(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is strictly greater than low.
+
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/uniform__log_8hpp.html b/doc/api/html/uniform__log_8hpp.html new file mode 100644 index 00000000000..49033c2af5c --- /dev/null +++ b/doc/api/html/uniform__log_8hpp.html @@ -0,0 +1,146 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/uniform_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
uniform_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_low , typename T_high >
return_type< T_y, T_low,
+T_high >::type 
stan::math::uniform_log (const T_y &y, const T_low &alpha, const T_high &beta)
 The log of a uniform density for the given y, lower, and upper bound. More...
 
template<typename T_y , typename T_low , typename T_high >
return_type< T_y, T_low,
+T_high >::type 
stan::math::uniform_log (const T_y &y, const T_low &alpha, const T_high &beta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/uniform__log_8hpp_source.html b/doc/api/html/uniform__log_8hpp_source.html new file mode 100644 index 00000000000..6cd445822cd --- /dev/null +++ b/doc/api/html/uniform__log_8hpp_source.html @@ -0,0 +1,245 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/uniform_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
uniform_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_UNIFORM_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_UNIFORM_LOG_HPP
+
3 
+
4 #include <boost/random/uniform_real_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + +
15 #include <cmath>
+
16 
+
17 namespace stan {
+
18 
+
19  namespace math {
+
20 
+
21  // CONTINUOUS, UNIVARIATE DENSITIES
+
43  template <bool propto,
+
44  typename T_y, typename T_low, typename T_high>
+
45  typename return_type<T_y, T_low, T_high>::type
+
46  uniform_log(const T_y& y, const T_low& alpha, const T_high& beta) {
+
47  static const char* function("stan::math::uniform_log");
+ +
49  T_partials_return;
+
50 
+ + + + + +
56  using std::log;
+
57 
+
58  // check if any vectors are zero length
+
59  if (!(stan::length(y)
+
60  && stan::length(alpha)
+
61  && stan::length(beta)))
+
62  return 0.0;
+
63 
+
64  // set up return value accumulator
+
65  T_partials_return logp(0.0);
+
66  check_not_nan(function, "Random variable", y);
+
67  check_finite(function, "Lower bound parameter", alpha);
+
68  check_finite(function, "Upper bound parameter", beta);
+
69  check_greater(function, "Upper bound parameter", beta, alpha);
+
70  check_consistent_sizes(function,
+
71  "Random variable", y,
+
72  "Lower bound parameter", alpha,
+
73  "Upper bound parameter", beta);
+
74 
+
75  // check if no variables are involved and prop-to
+ +
77  return 0.0;
+
78 
+
79  VectorView<const T_y> y_vec(y);
+
80  VectorView<const T_low> alpha_vec(alpha);
+
81  VectorView<const T_high> beta_vec(beta);
+
82  size_t N = max_size(y, alpha, beta);
+
83 
+
84  for (size_t n = 0; n < N; n++) {
+
85  const T_partials_return y_dbl = value_of(y_vec[n]);
+
86  if (y_dbl < value_of(alpha_vec[n])
+
87  || y_dbl > value_of(beta_vec[n]))
+
88  return LOG_ZERO;
+
89  }
+
90 
+ +
92  T_partials_return, T_low, T_high>
+
93  inv_beta_minus_alpha(max_size(alpha, beta));
+
94  for (size_t i = 0; i < max_size(alpha, beta); i++)
+ +
96  inv_beta_minus_alpha[i]
+
97  = 1.0 / (value_of(beta_vec[i]) - value_of(alpha_vec[i]));
+
98 
+ +
100  T_partials_return, T_low, T_high>
+
101  log_beta_minus_alpha(max_size(alpha, beta));
+
102  for (size_t i = 0; i < max_size(alpha, beta); i++)
+ +
104  log_beta_minus_alpha[i]
+
105  = log(value_of(beta_vec[i]) - value_of(alpha_vec[i]));
+
106 
+ +
108  operands_and_partials(y, alpha, beta);
+
109  for (size_t n = 0; n < N; n++) {
+ +
111  logp -= log_beta_minus_alpha[n];
+
112 
+ +
114  operands_and_partials.d_x2[n] += inv_beta_minus_alpha[n];
+ +
116  operands_and_partials.d_x3[n] -= inv_beta_minus_alpha[n];
+
117  }
+
118  return operands_and_partials.to_var(logp, y, alpha, beta);
+
119  }
+
120 
+
121  template <typename T_y, typename T_low, typename T_high>
+
122  inline
+ +
124  uniform_log(const T_y& y, const T_low& alpha, const T_high& beta) {
+
125  return uniform_log<false>(y, alpha, beta);
+
126  }
+
127  }
+
128 }
+
129 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
const double LOG_ZERO
Definition: constants.hpp:175
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ + +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
return_type< T_y, T_low, T_high >::type uniform_log(const T_y &y, const T_low &alpha, const T_high &beta)
The log of a uniform density for the given y, lower, and upper bound.
Definition: uniform_log.hpp:46
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_greater(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is strictly greater than low.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/uniform__rng_8hpp.html b/doc/api/html/uniform__rng_8hpp.html new file mode 100644 index 00000000000..a3891f13e83 --- /dev/null +++ b/doc/api/html/uniform__rng_8hpp.html @@ -0,0 +1,139 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/uniform_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
uniform_rng.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
double stan::math::uniform_rng (const double alpha, const double beta, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/uniform__rng_8hpp_source.html b/doc/api/html/uniform__rng_8hpp_source.html new file mode 100644 index 00000000000..56e3ebb77b1 --- /dev/null +++ b/doc/api/html/uniform__rng_8hpp_source.html @@ -0,0 +1,163 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/uniform_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
uniform_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_UNIFORM_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_UNIFORM_RNG_HPP
+
3 
+
4 #include <boost/random/uniform_real_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + +
15 
+
16 namespace stan {
+
17 
+
18  namespace math {
+
19 
+
20  template <class RNG>
+
21  inline double
+
22  uniform_rng(const double alpha,
+
23  const double beta,
+
24  RNG& rng) {
+
25  using boost::variate_generator;
+
26  using boost::random::uniform_real_distribution;
+
27 
+
28  static const char* function("stan::math::uniform_rng");
+
29 
+ + +
32 
+
33  check_finite(function, "Lower bound parameter", alpha);
+
34  check_finite(function, "Upper bound parameter", beta);
+
35  check_greater(function, "Upper bound parameter", beta, alpha);
+
36 
+
37  variate_generator<RNG&, uniform_real_distribution<> >
+
38  uniform_rng(rng, uniform_real_distribution<>(alpha, beta));
+
39  return uniform_rng();
+
40  }
+
41  }
+
42 }
+
43 #endif
+ + + + +
double uniform_rng(const double alpha, const double beta, RNG &rng)
Definition: uniform_rng.hpp:22
+ +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + + + +
bool check_greater(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is strictly greater than low.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/unit__vector__constrain_8hpp.html b/doc/api/html/unit__vector__constrain_8hpp.html new file mode 100644 index 00000000000..361f7b2e6cf --- /dev/null +++ b/doc/api/html/unit__vector__constrain_8hpp.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/unit_vector_constrain.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
unit_vector_constrain.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::unit_vector_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y)
 Return the unit length vector corresponding to the free vector y. More...
 
template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::unit_vector_constrain (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y, T &lp)
 Return the unit length vector corresponding to the free vector y. More...
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/unit__vector__constrain_8hpp_source.html b/doc/api/html/unit__vector__constrain_8hpp_source.html new file mode 100644 index 00000000000..4537f3f9956 --- /dev/null +++ b/doc/api/html/unit__vector__constrain_8hpp_source.html @@ -0,0 +1,178 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/unit_vector_constrain.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
unit_vector_constrain.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_UNIT_VECTOR_CONSTRAIN_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_UNIT_VECTOR_CONSTRAIN_HPP
+
3 
+ + +
6 #include <cmath>
+
7 
+
8 namespace stan {
+
9 
+
10  namespace math {
+
11 
+
12  // Unit vector
+
13 
+
22  template <typename T>
+
23  Eigen::Matrix<T, Eigen::Dynamic, 1>
+
24  unit_vector_constrain(const Eigen::Matrix<T, Eigen::Dynamic, 1>& y) {
+
25  using Eigen::Matrix;
+
26  using Eigen::Dynamic;
+ +
28  typedef typename index_type<Matrix<T, Dynamic, 1> >::type size_type;
+
29  int Km1 = y.size();
+
30  Matrix<T, Dynamic, 1> x(Km1 + 1);
+
31  x(0) = 1.0;
+
32  const T half_pi = T(M_PI/2.0);
+
33  for (size_type k = 1; k <= Km1; ++k) {
+
34  T yk_1 = y(k-1) + half_pi;
+
35  T sin_yk_1 = sin(yk_1);
+
36  x(k) = x(k-1)*sin_yk_1;
+
37  x(k-1) *= cos(yk_1);
+
38  }
+
39  return x;
+
40  }
+
41 
+
51  template <typename T>
+
52  Eigen::Matrix<T, Eigen::Dynamic, 1>
+
53  unit_vector_constrain(const Eigen::Matrix<T, Eigen::Dynamic, 1>& y, T &lp) {
+
54  using Eigen::Matrix;
+
55  using Eigen::Dynamic;
+ +
57  typedef typename index_type<Matrix<T, Dynamic, 1> >::type size_type;
+
58 
+
59  int Km1 = y.size();
+
60  Matrix<T, Dynamic, 1> x(Km1 + 1);
+
61  x(0) = 1.0;
+
62  const T half_pi = T(0.5 * M_PI);
+
63  for (size_type k = 1; k <= Km1; ++k) {
+
64  T yk_1 = y(k-1) + half_pi;
+
65  T sin_yk_1 = sin(yk_1);
+
66  x(k) = x(k-1) * sin_yk_1;
+
67  x(k-1) *= cos(yk_1);
+
68  if (k < Km1)
+
69  lp += (Km1 - k) * log(fabs(sin_yk_1));
+
70  }
+
71  return x;
+
72  }
+
73 
+
74  }
+
75 
+
76 }
+
77 
+
78 #endif
+
fvar< T > cos(const fvar< T > &x)
Definition: cos.hpp:13
+
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:14
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
Eigen::Matrix< T, Eigen::Dynamic, 1 > unit_vector_constrain(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y)
Return the unit length vector corresponding to the free vector y.
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Definition: typedefs.hpp:13
+
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:19
+ +
fvar< T > sin(const fvar< T > &x)
Definition: sin.hpp:14
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/unit__vector__free_8hpp.html b/doc/api/html/unit__vector__free_8hpp.html new file mode 100644 index 00000000000..3c862141271 --- /dev/null +++ b/doc/api/html/unit__vector__free_8hpp.html @@ -0,0 +1,133 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/unit_vector_free.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
unit_vector_free.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T >
Eigen::Matrix< T,
+Eigen::Dynamic, 1 > 
stan::math::unit_vector_free (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/unit__vector__free_8hpp_source.html b/doc/api/html/unit__vector__free_8hpp_source.html new file mode 100644 index 00000000000..dec04e36e3a --- /dev/null +++ b/doc/api/html/unit__vector__free_8hpp_source.html @@ -0,0 +1,152 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/unit_vector_free.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
unit_vector_free.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_UNIT_VECTOR_FREE_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_UNIT_VECTOR_FREE_HPP
+
3 
+ + + +
7 #include <cmath>
+
8 
+
9 namespace stan {
+
10 
+
11  namespace math {
+
12 
+
13 
+
14  template <typename T>
+
15  Eigen::Matrix<T, Eigen::Dynamic, 1>
+
16  unit_vector_free(const Eigen::Matrix<T, Eigen::Dynamic, 1>& x) {
+
17  using Eigen::Matrix;
+
18  using Eigen::Dynamic;
+
19 
+
20  stan::math::check_unit_vector("stan::math::unit_vector_free",
+
21  "Unit vector variable", x);
+
22  int Km1 = x.size() - 1;
+
23  Matrix<T, Dynamic, 1> y(Km1);
+
24  T sumSq = x(Km1)*x(Km1);
+
25  const T half_pi = T(M_PI/2.0);
+
26  for (int k = Km1; --k >= 0; ) {
+
27  y(k) = atan2(sqrt(sumSq), x(k)) - half_pi;
+
28  sumSq += x(k)*x(k);
+
29  }
+
30  return y;
+
31  }
+
32 
+
33  }
+
34 
+
35 }
+
36 
+
37 #endif
+
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
fvar< T > atan2(const fvar< T > &x1, const fvar< T > &x2)
Definition: atan2.hpp:12
+
bool check_unit_vector(const char *function, const char *name, const Eigen::Matrix< T_prob, Dynamic, 1 > &theta)
Return true if the specified vector is unit vector.
+ + +
Eigen::Matrix< T, Eigen::Dynamic, 1 > unit_vector_free(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x)
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/v__vari_8hpp.html b/doc/api/html/v__vari_8hpp.html new file mode 100644 index 00000000000..e7bc37aa838 --- /dev/null +++ b/doc/api/html/v__vari_8hpp.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/rev/core/v_vari.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
v_vari.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

class  stan::math::op_v_vari
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/v__vari_8hpp_source.html b/doc/api/html/v__vari_8hpp_source.html new file mode 100644 index 00000000000..d9293df8709 --- /dev/null +++ b/doc/api/html/v__vari_8hpp_source.html @@ -0,0 +1,134 @@ + + + + + + +Stan Math Library: stan/math/rev/core/v_vari.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
v_vari.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_V_VARI_HPP
+
2 #define STAN_MATH_REV_CORE_V_VARI_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
9  class op_v_vari : public vari {
+
10  protected:
+ +
12  public:
+
13  op_v_vari(double f, vari* avi) :
+
14  vari(f),
+
15  avi_(avi) {
+
16  }
+
17  };
+
18 
+
19  }
+
20 }
+
21 #endif
+ +
The variable implementation base class.
Definition: vari.hpp:28
+ + +
op_v_vari(double f, vari *avi)
Definition: v_vari.hpp:13
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/validate__non__negative__index_8hpp.html b/doc/api/html/validate__non__negative__index_8hpp.html new file mode 100644 index 00000000000..dfea9ae20c3 --- /dev/null +++ b/doc/api/html/validate__non__negative__index_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/validate_non_negative_index.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
validate_non_negative_index.hpp File Reference
+
+
+
#include <sstream>
+#include <stdexcept>
+#include <string>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + +

+Functions

void stan::math::validate_non_negative_index (const char *var_name, const char *expr, int val)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/validate__non__negative__index_8hpp_source.html b/doc/api/html/validate__non__negative__index_8hpp_source.html new file mode 100644 index 00000000000..e23a827f440 --- /dev/null +++ b/doc/api/html/validate__non__negative__index_8hpp_source.html @@ -0,0 +1,138 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/err/validate_non_negative_index.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
validate_non_negative_index.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_VALIDATE_NON_NEGATIVE_INDEX_HPP
+
2 #define STAN_MATH_PRIM_MAT_ERR_VALIDATE_NON_NEGATIVE_INDEX_HPP
+
3 
+
4 #include <sstream>
+
5 #include <stdexcept>
+
6 #include <string>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  inline void
+
12  validate_non_negative_index(const char* var_name,
+
13  const char* expr,
+
14  int val) {
+
15  if (val < 0) {
+
16  std::stringstream msg;
+
17  msg << "Found negative dimension size in variable declaration"
+
18  << "; variable=" << var_name
+
19  << "; dimension size expression=" << expr
+
20  << "; expression value=" << val;
+
21  std::string msg_str(msg.str());
+
22  throw std::invalid_argument(msg_str.c_str());
+
23  }
+
24  }
+
25 
+
26  }
+
27 }
+
28 #endif
+
void validate_non_negative_index(const char *var_name, const char *expr, int val)
+
void invalid_argument(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw an invalid_argument exception with a consistently formatted message.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/var_8hpp.html b/doc/api/html/var_8hpp.html new file mode 100644 index 00000000000..caef0a39813 --- /dev/null +++ b/doc/api/html/var_8hpp.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/rev/core/var.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
var.hpp File Reference
+
+
+
#include <stan/math/rev/core/vari.hpp>
+#include <stan/math/rev/core/grad.hpp>
+#include <stan/math/rev/core/chainable.hpp>
+#include <stan/math/rev/core/chainable_alloc.hpp>
+#include <boost/math/tools/config.hpp>
+#include <ostream>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  stan::math::var
 Independent (input) and dependent (output) variables for gradients. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + +

+Functions

static void stan::math::grad (chainable *vi)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/var_8hpp_source.html b/doc/api/html/var_8hpp_source.html new file mode 100644 index 00000000000..b5c1b2b13e2 --- /dev/null +++ b/doc/api/html/var_8hpp_source.html @@ -0,0 +1,285 @@ + + + + + + +Stan Math Library: stan/math/rev/core/var.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
var.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_VAR_HPP
+
2 #define STAN_MATH_REV_CORE_VAR_HPP
+
3 
+ + + + +
8 #include <boost/math/tools/config.hpp>
+
9 #include <ostream>
+
10 #include <vector>
+
11 
+
12 namespace stan {
+
13 
+
14  namespace math {
+
15 
+
16  // forward declare
+
17  static void grad(chainable* vi);
+
18 
+
32  class var {
+
33  public:
+
34  // FIXME: doc what this is for
+
35  typedef double Scalar;
+
36 
+
44  vari * vi_;
+
45 
+ +
56  return (vi_ == static_cast<vari*>(0U));
+
57  }
+
58 
+
66  var() : vi_(static_cast<vari*>(0U)) { }
+
67 
+
68 
+
74  var(vari* vi) : vi_(vi) { } // NOLINT
+
75 
+
83  var(float x) : vi_(new vari(static_cast<double>(x))) { } // NOLINT
+
84 
+
92  var(double x) : vi_(new vari(x)) { } // NOLINT
+
93 
+
101  var(long double x) : vi_(new vari(x)) { } // NOLINT
+
102 
+
110  var(bool x) : vi_(new vari(static_cast<double>(x))) { } // NOLINT
+
111 
+
119  var(char x) : vi_(new vari(static_cast<double>(x))) { } // NOLINT
+
120 
+
128  var(short x) : vi_(new vari(static_cast<double>(x))) { } // NOLINT
+
129 
+
137  var(int x) : vi_(new vari(static_cast<double>(x))) { } // NOLINT
+
138 
+
146  var(long x) : vi_(new vari(static_cast<double>(x))) { } // NOLINT
+
147 
+
155  var(unsigned char x) : vi_(new vari(static_cast<double>(x))) { } // NOLINT
+
156 
+
164  // NOLINTNEXTLINE
+
165  var(unsigned short x) : vi_(new vari(static_cast<double>(x))) { }
+
166 
+
174  var(unsigned int x) : vi_(new vari(static_cast<double>(x))) { } // NOLINT
+
175 
+
183  // NOLINTNEXTLINE
+
184  var(unsigned long x) : vi_(new vari(static_cast<double>(x))) { } // NOLINT
+
185 
+
186 #ifdef _WIN64
+
187 
+
188  // these two ctors are for Win64 to enable 64-bit signed
+
189  // and unsigned integers, because long and unsigned long
+
190  // are still 32-bit
+
191 
+
199  var(size_t x) : vi_(new vari(static_cast<double>(x))) { } // NOLINT
+
200 
+
201 
+
209  var(ptrdiff_t x) : vi_(new vari(static_cast<double>(x))) { } // NOLINT
+
210 #endif
+
211 
+
212 
+
213 #ifdef BOOST_MATH_USE_FLOAT128
+
214 
+
215  // this ctor is for later GCCs that have the __float128
+
216  // type enabled, because it gets enabled by boost
+
217 
+
225  var(__float128 x) : vi_(new vari(static_cast<double>(x))) { } // NOLINT
+
226 
+
227 #endif
+
228 
+
234  inline double val() const {
+
235  return vi_->val_;
+
236  }
+
237 
+
246  inline double adj() const {
+
247  return vi_->adj_;
+
248  }
+
249 
+
262  void grad(std::vector<var>& x,
+
263  std::vector<double>& g) {
+
264  stan::math::grad(vi_); // defined in chainable.hpp
+
265  g.resize(x.size());
+
266  for (size_t i = 0; i < x.size(); ++i)
+
267  g[i] = x[i].vi_->adj_;
+
268  }
+
269 
+
276  void grad() {
+
277  stan::math::grad(vi_); // defined in chainable.hpp
+
278  }
+
279 
+
280  // POINTER OVERRIDES
+
281 
+
294  inline vari& operator*() {
+
295  return *vi_;
+
296  }
+
297 
+
308  inline vari* operator->() {
+
309  return vi_;
+
310  }
+
311 
+
312  // COMPOUND ASSIGNMENT OPERATORS
+
313 
+
324  inline var& operator+=(const var& b);
+
325 
+
336  inline var& operator+=(const double b);
+
337 
+
349  inline var& operator-=(const var& b);
+
350 
+
362  inline var& operator-=(const double b);
+
363 
+
375  inline var& operator*=(const var& b);
+
376 
+
388  inline var& operator*=(const double b);
+
389 
+
400  inline var& operator/=(const var& b);
+
401 
+
413  inline var& operator/=(const double b);
+
414 
+
423  friend std::ostream& operator<<(std::ostream& os, const var& v) {
+
424  if (v.vi_ == 0)
+
425  return os << "uninitialized";
+
426  return os << v.val();
+
427  }
+
428  };
+
429 
+
430  }
+
431 }
+
432 #endif
+
var & operator+=(const var &b)
The compound add/assignment operator for variables (C++).
+
var & operator*=(const var &b)
The compound multiply/assignment operator for variables (C++).
+
var(unsigned char x)
Construct a variable from the specified arithmetic argument by constructing a new vari with the argum...
Definition: var.hpp:155
+ +
var(long x)
Construct a variable from the specified arithmetic argument by constructing a new vari with the argum...
Definition: var.hpp:146
+
var & operator/=(const var &b)
The compound divide/assignment operator for variables (C++).
+
var(unsigned long x)
Construct a variable from the specified arithmetic argument by constructing a new vari with the argum...
Definition: var.hpp:184
+
The variable implementation base class.
Definition: vari.hpp:28
+ +
static void grad(chainable *vi)
Compute the gradient for all variables starting from the specified root variable implementation.
Definition: grad.hpp:30
+ +
var(vari *vi)
Construct a variable from a pointer to a variable implementation.
Definition: var.hpp:74
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
vari & operator*()
Return a reference to underlying implementation of this variable.
Definition: var.hpp:294
+
var & operator-=(const var &b)
The compound subtract/assignment operator for variables (C++).
+
const double val_
The value of this variable.
Definition: vari.hpp:36
+
var(double x)
Construct a variable from the specified arithmetic argument by constructing a new vari with the argum...
Definition: var.hpp:92
+
var(bool x)
Construct a variable from the specified arithmetic argument by constructing a new vari with the argum...
Definition: var.hpp:110
+
var(char x)
Construct a variable from the specified arithmetic argument by constructing a new vari with the argum...
Definition: var.hpp:119
+
bool is_uninitialized()
Return true if this variable has been declared, but not been defined.
Definition: var.hpp:55
+
var(unsigned int x)
Construct a variable from the specified arithmetic argument by constructing a new vari with the argum...
Definition: var.hpp:174
+
var()
Construct a variable for later assignment.
Definition: var.hpp:66
+
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
+ +
var(float x)
Construct a variable from the specified arithmetic argument by constructing a new vari with the argum...
Definition: var.hpp:83
+
void grad(std::vector< var > &x, std::vector< double > &g)
Compute the gradient of this (dependent) variable with respect to the specified vector of (independen...
Definition: var.hpp:262
+
vari * operator->()
Return a pointer to the underlying implementation of this variable.
Definition: var.hpp:308
+
void grad()
Compute the gradient of this (dependent) variable with respect to all (independent) variables...
Definition: var.hpp:276
+
var(long double x)
Construct a variable from the specified arithmetic argument by constructing a new vari with the argum...
Definition: var.hpp:101
+
var(int x)
Construct a variable from the specified arithmetic argument by constructing a new vari with the argum...
Definition: var.hpp:137
+
double Scalar
Definition: var.hpp:35
+
double adj_
The adjoint of this variable, which is the partial derivative of this variable with respect to the ro...
Definition: vari.hpp:42
+
double val() const
Return the value of this variable.
Definition: var.hpp:234
+
friend std::ostream & operator<<(std::ostream &os, const var &v)
Write the value of this auto-dif variable and its adjoint to the specified output stream...
Definition: var.hpp:423
+
double adj() const
Return the derivative of the root expression with respect to this expression.
Definition: var.hpp:246
+
var(unsigned short x)
Construct a variable from the specified arithmetic argument by constructing a new vari with the argum...
Definition: var.hpp:165
+
var(short x)
Construct a variable from the specified arithmetic argument by constructing a new vari with the argum...
Definition: var.hpp:128
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/vari_8hpp.html b/doc/api/html/vari_8hpp.html new file mode 100644 index 00000000000..32f78e1f54f --- /dev/null +++ b/doc/api/html/vari_8hpp.html @@ -0,0 +1,132 @@ + + + + + + +Stan Math Library: stan/math/rev/core/vari.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
vari.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + +

+Classes

class  stan::math::vari
 The variable implementation base class. More...
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/vari_8hpp_source.html b/doc/api/html/vari_8hpp_source.html new file mode 100644 index 00000000000..45f54f9e56c --- /dev/null +++ b/doc/api/html/vari_8hpp_source.html @@ -0,0 +1,182 @@ + + + + + + +Stan Math Library: stan/math/rev/core/vari.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
vari.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_VARI_HPP
+
2 #define STAN_MATH_REV_CORE_VARI_HPP
+
3 
+ + + +
7 #include <ostream>
+
8 
+
9 namespace stan {
+
10  namespace math {
+
11 
+
12  // forward declaration of var
+
13  class var;
+
14 
+
28  class vari : public chainable {
+
29  private:
+
30  friend class var;
+
31 
+
32  public:
+
36  const double val_;
+
37 
+
42  double adj_;
+
43 
+
56  explicit vari(const double x):
+
57  val_(x),
+
58  adj_(0.0) {
+
59  ChainableStack::var_stack_.push_back(this);
+
60  }
+
61 
+
62  vari(const double x, bool stacked):
+
63  val_(x),
+
64  adj_(0.0) {
+
65  if (stacked)
+
66  ChainableStack::var_stack_.push_back(this);
+
67  else
+
68  ChainableStack::var_nochain_stack_.push_back(this);
+
69  }
+
70 
+
78  virtual ~vari() {
+
79  // throw std::logic_error("vari destruction handled automatically");
+
80  }
+
81 
+
87  virtual void init_dependent() {
+
88  adj_ = 1.0; // droot/droot = 1
+
89  }
+
90 
+
94  virtual void set_zero_adjoint() {
+
95  adj_ = 0.0;
+
96  }
+
97 
+
107  friend std::ostream& operator<<(std::ostream& os, const vari* v) {
+
108  return os << v->val_ << ":" << v->adj_;
+
109  }
+
110  };
+
111 
+
112  }
+
113 }
+
114 #endif
+
vari(const double x)
Construct a variable implementation from a value.
Definition: vari.hpp:56
+
friend std::ostream & operator<<(std::ostream &os, const vari *v)
Insertion operator for vari.
Definition: vari.hpp:107
+
Abstract base class for variable implementations that handles memory management and applying the chai...
Definition: chainable.hpp:14
+
The variable implementation base class.
Definition: vari.hpp:28
+ +
virtual void init_dependent()
Initialize the adjoint for this (dependent) variable to 1.
Definition: vari.hpp:87
+
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
virtual ~vari()
Throw an illegal argument exception.
Definition: vari.hpp:78
+
const double val_
The value of this variable.
Definition: vari.hpp:36
+
vari(const double x, bool stacked)
Definition: vari.hpp:62
+
static std::vector< ChainableT * > var_nochain_stack_
+ +
virtual void set_zero_adjoint()
Set the adjoint value of this variable to 0.
Definition: vari.hpp:94
+
double adj_
The adjoint of this variable, which is the partial derivative of this variable with respect to the ro...
Definition: vari.hpp:42
+ +
static std::vector< ChainableT * > var_stack_
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/vd__vari_8hpp.html b/doc/api/html/vd__vari_8hpp.html new file mode 100644 index 00000000000..6751ff2d558 --- /dev/null +++ b/doc/api/html/vd__vari_8hpp.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/rev/core/vd_vari.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
vd_vari.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

class  stan::math::op_vd_vari
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/vd__vari_8hpp_source.html b/doc/api/html/vd__vari_8hpp_source.html new file mode 100644 index 00000000000..bffec02be8a --- /dev/null +++ b/doc/api/html/vd__vari_8hpp_source.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/rev/core/vd_vari.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
vd_vari.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_VD_VARI_HPP
+
2 #define STAN_MATH_REV_CORE_VD_VARI_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
9  class op_vd_vari : public vari {
+
10  protected:
+ +
12  double bd_;
+
13  public:
+
14  op_vd_vari(double f, vari* avi, double b) :
+
15  vari(f),
+
16  avi_(avi),
+
17  bd_(b) {
+
18  }
+
19  };
+
20 
+
21  }
+
22 }
+
23 #endif
+
op_vd_vari(double f, vari *avi, double b)
Definition: vd_vari.hpp:14
+ + +
The variable implementation base class.
Definition: vari.hpp:28
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/vdd__vari_8hpp.html b/doc/api/html/vdd__vari_8hpp.html new file mode 100644 index 00000000000..0f85ab66889 --- /dev/null +++ b/doc/api/html/vdd__vari_8hpp.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/rev/core/vdd_vari.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
vdd_vari.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

class  stan::math::op_vdd_vari
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/vdd__vari_8hpp_source.html b/doc/api/html/vdd__vari_8hpp_source.html new file mode 100644 index 00000000000..1c6f42d9f97 --- /dev/null +++ b/doc/api/html/vdd__vari_8hpp_source.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/rev/core/vdd_vari.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
vdd_vari.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_VDD_VARI_HPP
+
2 #define STAN_MATH_REV_CORE_VDD_VARI_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
9  class op_vdd_vari : public vari {
+
10  protected:
+ +
12  double bd_;
+
13  double cd_;
+
14  public:
+
15  op_vdd_vari(double f, vari* avi, double b, double c) :
+
16  vari(f),
+
17  avi_(avi),
+
18  bd_(b),
+
19  cd_(c) {
+
20  }
+
21  };
+
22 
+
23  }
+
24 }
+
25 #endif
+ + +
The variable implementation base class.
Definition: vari.hpp:28
+ + + +
op_vdd_vari(double f, vari *avi, double b, double c)
Definition: vdd_vari.hpp:15
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/vdv__vari_8hpp.html b/doc/api/html/vdv__vari_8hpp.html new file mode 100644 index 00000000000..5ccfe5365cc --- /dev/null +++ b/doc/api/html/vdv__vari_8hpp.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/rev/core/vdv_vari.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
vdv_vari.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

class  stan::math::op_vdv_vari
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/vdv__vari_8hpp_source.html b/doc/api/html/vdv__vari_8hpp_source.html new file mode 100644 index 00000000000..4e4086dfea2 --- /dev/null +++ b/doc/api/html/vdv__vari_8hpp_source.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/rev/core/vdv_vari.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
vdv_vari.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_VDV_VARI_HPP
+
2 #define STAN_MATH_REV_CORE_VDV_VARI_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
9  class op_vdv_vari : public vari {
+
10  protected:
+ +
12  double bd_;
+ +
14  public:
+
15  op_vdv_vari(double f, vari* avi, double b, vari* cvi) :
+
16  vari(f),
+
17  avi_(avi),
+
18  bd_(b),
+
19  cvi_(cvi) {
+
20  }
+
21  };
+
22 
+
23  }
+
24 }
+
25 #endif
+ +
The variable implementation base class.
Definition: vari.hpp:28
+ + +
op_vdv_vari(double f, vari *avi, double b, vari *cvi)
Definition: vdv_vari.hpp:15
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/vector__vari_8hpp.html b/doc/api/html/vector__vari_8hpp.html new file mode 100644 index 00000000000..78e646299ea --- /dev/null +++ b/doc/api/html/vector__vari_8hpp.html @@ -0,0 +1,130 @@ + + + + + + +Stan Math Library: stan/math/rev/core/vector_vari.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
vector_vari.hpp File Reference
+
+
+
#include <stan/math/rev/core/var.hpp>
+#include <stan/math/rev/core/vari.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + +

+Classes

class  stan::math::op_vector_vari
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/vector__vari_8hpp_source.html b/doc/api/html/vector__vari_8hpp_source.html new file mode 100644 index 00000000000..b8ff4017b0e --- /dev/null +++ b/doc/api/html/vector__vari_8hpp_source.html @@ -0,0 +1,151 @@ + + + + + + +Stan Math Library: stan/math/rev/core/vector_vari.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
vector_vari.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_VECTOR_VARI_HPP
+
2 #define STAN_MATH_REV_CORE_VECTOR_VARI_HPP
+
3 
+ + +
6 #include <vector>
+
7 
+
8 namespace stan {
+
9  namespace math {
+
10 
+
11  class op_vector_vari : public vari {
+
12  protected:
+
13  const size_t size_;
+ +
15  public:
+
16  op_vector_vari(double f, const std::vector<stan::math::var>& vs) :
+
17  vari(f),
+
18  size_(vs.size()) {
+
19  vis_ = reinterpret_cast<vari**>
+
20  (operator new(sizeof(vari*) * vs.size()));
+
21  for (size_t i = 0; i < vs.size(); ++i)
+
22  vis_[i] = vs[i].vi_;
+
23  }
+
24  vari* operator[](size_t n) const {
+
25  return vis_[n];
+
26  }
+
27  size_t size() {
+
28  return size_;
+
29  }
+
30  };
+
31 
+
32  }
+
33 }
+
34 #endif
+ + +
The variable implementation base class.
Definition: vari.hpp:28
+
vari * operator[](size_t n) const
Definition: vector_vari.hpp:24
+ + + +
op_vector_vari(double f, const std::vector< stan::math::var > &vs)
Definition: vector_vari.hpp:16
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/version_8hpp.html b/doc/api/html/version_8hpp.html new file mode 100644 index 00000000000..4edcff56e25 --- /dev/null +++ b/doc/api/html/version_8hpp.html @@ -0,0 +1,228 @@ + + + + + + +Stan Math Library: stan/math/version.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
version.hpp File Reference
+
+
+
#include <string>
+
+

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + + + + +

+Macros

#define STAN_STRING_EXPAND(s)   #s
 
#define STAN_STRING(s)   STAN_STRING_EXPAND(s)
 
#define STAN_MATH_MAJOR   2
 
#define STAN_MATH_MINOR   8
 
#define STAN_MATH_PATCH   0
 
+ + + + + + + + + + +

+Variables

const std::string stan::math::MAJOR_VERSION = STAN_STRING(STAN_MATH_MAJOR)
 Major version number for Stan math library. More...
 
const std::string stan::math::MINOR_VERSION = STAN_STRING(STAN_MATH_MINOR)
 Minor version number for Stan math library. More...
 
const std::string stan::math::PATCH_VERSION = STAN_STRING(STAN_MATH_PATCH)
 Patch version for Stan math library. More...
 
+

Macro Definition Documentation

+ +
+
+ + + + +
#define STAN_MATH_MAJOR   2
+
+ +

Definition at line 14 of file version.hpp.

+ +
+
+ +
+
+ + + + +
#define STAN_MATH_MINOR   8
+
+ +

Definition at line 15 of file version.hpp.

+ +
+
+ +
+
+ + + + +
#define STAN_MATH_PATCH   0
+
+ +

Definition at line 16 of file version.hpp.

+ +
+
+ +
+
+ + + + + + + + +
#define STAN_STRING( s)   STAN_STRING_EXPAND(s)
+
+ +

Definition at line 11 of file version.hpp.

+ +
+
+ +
+
+ + + + + + + + +
#define STAN_STRING_EXPAND( s)   #s
+
+ +

Definition at line 7 of file version.hpp.

+ +
+
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/version_8hpp_source.html b/doc/api/html/version_8hpp_source.html new file mode 100644 index 00000000000..2f0d63333ee --- /dev/null +++ b/doc/api/html/version_8hpp_source.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/version.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
version.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_VERSION_HPP
+
2 #define STAN_MATH_VERSION_HPP
+
3 
+
4 #include <string>
+
5 
+
6 #ifndef STAN_STRING_EXPAND
+
7 #define STAN_STRING_EXPAND(s) #s
+
8 #endif
+
9 
+
10 #ifndef STAN_STRING
+
11 #define STAN_STRING(s) STAN_STRING_EXPAND(s)
+
12 #endif
+
13 
+
14 #define STAN_MATH_MAJOR 2
+
15 #define STAN_MATH_MINOR 8
+
16 #define STAN_MATH_PATCH 0
+
17 
+
18 namespace stan {
+
19  namespace math {
+
20 
+ +
23 
+ +
26 
+ +
29 
+
30  }
+
31 }
+
32 
+
33 #endif
+
#define STAN_MATH_PATCH
Definition: version.hpp:16
+
#define STAN_MATH_MAJOR
Definition: version.hpp:14
+
#define STAN_MATH_MINOR
Definition: version.hpp:15
+
const std::string MINOR_VERSION
Minor version number for Stan math library.
Definition: version.hpp:25
+
const std::string PATCH_VERSION
Patch version for Stan math library.
Definition: version.hpp:28
+
const std::string MAJOR_VERSION
Major version number for Stan math library.
Definition: version.hpp:22
+
#define STAN_STRING(s)
Definition: version.hpp:11
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/von__mises__log_8hpp.html b/doc/api/html/von__mises__log_8hpp.html new file mode 100644 index 00000000000..7de377332d8 --- /dev/null +++ b/doc/api/html/von__mises__log_8hpp.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/von_mises_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
von_mises_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::von_mises_log (T_y const &y, T_loc const &mu, T_scale const &kappa)
 
template<typename T_y , typename T_loc , typename T_scale >
return_type< T_y, T_loc,
+T_scale >::type 
stan::math::von_mises_log (T_y const &y, T_loc const &mu, T_scale const &kappa)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/von__mises__log_8hpp_source.html b/doc/api/html/von__mises__log_8hpp_source.html new file mode 100644 index 00000000000..d978af83a05 --- /dev/null +++ b/doc/api/html/von__mises__log_8hpp_source.html @@ -0,0 +1,285 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/von_mises_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
von_mises_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_VON_MISES_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_VON_MISES_LOG_HPP
+
3 
+ + + + + + + + + + + + + +
17 #include <cmath>
+
18 
+
19 namespace stan {
+
20 
+
21  namespace math {
+
22 
+
23  template<bool propto,
+
24  typename T_y, typename T_loc, typename T_scale>
+
25  typename return_type<T_y, T_loc, T_scale>::type
+
26  von_mises_log(T_y const& y, T_loc const& mu, T_scale const& kappa) {
+
27  static char const* const function = "stan::math::von_mises_log";
+ +
29  T_partials_return;
+
30 
+
31  // check if any vectors are zero length
+
32  if (!(stan::length(y)
+
33  && stan::length(mu)
+
34  && stan::length(kappa)))
+
35  return 0.0;
+
36 
+ + + + + + + +
44 
+ +
46  using std::log;
+
47 
+
48  // Result accumulator.
+
49  T_partials_return logp = 0.0;
+
50 
+
51  // Validate arguments.
+
52  check_finite(function, "Random variable", y);
+
53  check_finite(function, "Location paramter", mu);
+
54  check_positive_finite(function, "Scale parameter", kappa);
+
55  check_consistent_sizes(function,
+
56  "Random variable", y,
+
57  "Location parameter", mu,
+
58  "Scale parameter", kappa);
+
59 
+
60 
+
61  // check if no variables are involved and prop-to
+ +
63  return logp;
+
64 
+
65  // Determine constants.
+
66  const bool y_const = is_constant_struct<T_y>::value;
+
67  const bool mu_const = is_constant_struct<T_loc>::value;
+
68  const bool kappa_const = is_constant_struct<T_scale>::value;
+
69 
+
70  // Determine which expensive computations to perform.
+
71  const bool compute_bessel0 = include_summand<propto, T_scale>::value;
+
72  const bool compute_bessel1 = !kappa_const;
+
73  const double TWO_PI = 2.0 * stan::math::pi();
+
74 
+
75  // Wrap scalars into vector views.
+
76  VectorView<const T_y> y_vec(y);
+
77  VectorView<const T_loc> mu_vec(mu);
+
78  VectorView<const T_scale> kappa_vec(kappa);
+
79 
+ + +
82  T_partials_return, T_scale> log_bessel0(length(kappa));
+
83  for (size_t i = 0; i < length(kappa); i++) {
+
84  kappa_dbl[i] = value_of(kappa_vec[i]);
+ +
86  log_bessel0[i]
+
87  = log(modified_bessel_first_kind(0, value_of(kappa_vec[i])));
+
88  }
+
89 
+ +
91 
+
92  size_t N = max_size(y, mu, kappa);
+
93 
+
94  for (size_t n = 0; n < N; n++) {
+
95  // Extract argument values.
+
96  const T_partials_return y_ = value_of(y_vec[n]);
+
97  const T_partials_return y_dbl = y_ - floor(y_ / TWO_PI) * TWO_PI;
+
98  const T_partials_return mu_dbl = value_of(mu_vec[n]);
+
99 
+
100  // Reusable values.
+
101  T_partials_return bessel0 = 0;
+
102  if (compute_bessel0)
+
103  bessel0 = modified_bessel_first_kind(0, kappa_dbl[n]);
+
104  T_partials_return bessel1 = 0;
+
105  if (compute_bessel1)
+
106  bessel1 = modified_bessel_first_kind(-1, kappa_dbl[n]);
+
107  const T_partials_return kappa_sin = kappa_dbl[n] * sin(mu_dbl - y_dbl);
+
108  const T_partials_return kappa_cos = kappa_dbl[n] * cos(mu_dbl - y_dbl);
+
109 
+
110  // Log probability.
+ +
112  logp -= LOG_TWO_PI;
+ +
114  logp -= log_bessel0[n];
+ +
116  logp += kappa_cos;
+
117 
+
118  // Gradient.
+
119  if (!y_const)
+
120  oap.d_x1[n] += kappa_sin;
+
121  if (!mu_const)
+
122  oap.d_x2[n] -= kappa_sin;
+
123  if (!kappa_const)
+
124  oap.d_x3[n] += kappa_cos / kappa_dbl[n] - bessel1 / bessel0;
+
125  }
+
126 
+
127  return oap.to_var(logp, y, mu, kappa);
+
128  }
+
129 
+
130  template<typename T_y, typename T_loc, typename T_scale>
+ +
132  von_mises_log(T_y const& y, T_loc const& mu, T_scale const& kappa) {
+
133  return von_mises_log<false>(y, mu, kappa);
+
134  }
+
135  }
+
136 }
+
137 #endif
+
fvar< T > cos(const fvar< T > &x)
Definition: cos.hpp:13
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+ +
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ + +
const double LOG_TWO_PI
Definition: constants.hpp:193
+ +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > modified_bessel_first_kind(int v, const fvar< T > &z)
+
fvar< T > sin(const fvar< T > &x)
Definition: sin.hpp:14
+
return_type< T_y, T_loc, T_scale >::type von_mises_log(T_y const &y, T_loc const &mu, T_scale const &kappa)
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + +
fvar< T > floor(const fvar< T > &x)
Definition: floor.hpp:11
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+ +
double pi()
Return the value of pi.
Definition: constants.hpp:86
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
bool check_greater(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is strictly greater than low.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/von__mises__rng_8hpp.html b/doc/api/html/von__mises__rng_8hpp.html new file mode 100644 index 00000000000..8ed3cc47220 --- /dev/null +++ b/doc/api/html/von__mises__rng_8hpp.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/von_mises_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
von_mises_rng.hpp File Reference
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/von__mises__rng_8hpp_source.html b/doc/api/html/von__mises__rng_8hpp_source.html new file mode 100644 index 00000000000..8657808df60 --- /dev/null +++ b/doc/api/html/von__mises__rng_8hpp_source.html @@ -0,0 +1,205 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/von_mises_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
von_mises_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_VON_MISES_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_VON_MISES_RNG_HPP
+
3 
+ + + + + + + + + + + +
15 #include <cmath>
+
16 
+
17 namespace stan {
+
18 
+
19  namespace math {
+
20 
+
21  // The algorithm used in von_mises_rng is a modified version of the
+
22  // algorithm in:
+
23  //
+
24  // Efficient Simulation of the von Mises Distribution
+
25  // D. J. Best and N. I. Fisher
+
26  // Journal of the Royal Statistical Society. Series C (Applied Statistics),
+
27  // Vol. 28, No. 2 (1979), pp. 152-157
+
28  //
+
29  // See licenses/stan-license.txt for Stan license.
+
30 
+
31  template <class RNG>
+
32  inline double
+
33  von_mises_rng(const double mu,
+
34  const double kappa,
+
35  RNG& rng) {
+
36  using boost::variate_generator;
+ +
38  using std::fmod;
+
39  using std::log;
+
40  using std::pow;
+
41 
+
42  static const char* function("stan::math::von_mises_rng");
+
43 
+
44  stan::math::check_finite(function, "mean", mu);
+
45  stan::math::check_positive_finite(function, "inverse of variance", kappa);
+
46 
+
47  double r = 1 + pow((1 + 4 * kappa * kappa), 0.5);
+
48  double rho = 0.5 * (r - pow(2 * r, 0.5)) / kappa;
+
49  double s = 0.5 * (1 + rho * rho) / rho;
+
50 
+
51  bool done = 0;
+
52  double W;
+
53  while (!done) {
+
54  double Z = std::cos(stan::math::pi() * uniform_rng(0.0, 1.0, rng));
+
55  W = (1 + s * Z) / (s + Z);
+
56  double Y = kappa * (s - W);
+
57  double U2 = uniform_rng(0.0, 1.0, rng);
+
58  done = Y * (2 - Y) - U2 > 0;
+
59 
+
60  if (!done)
+
61  done = log(Y / U2) + 1 - Y >= 0;
+
62  }
+
63 
+
64  double U3 = uniform_rng(0.0, 1.0, rng) - 0.5;
+
65  double sign = ((U3 >= 0) - (U3 <= 0));
+
66 
+
67  // it's really an fmod() with a positivity constraint
+
68  return sign * std::acos(W)
+
69  + fmod(fmod(mu, 2*stan::math::pi())+2*stan::math::pi(),
+
70  2*stan::math::pi());
+
71  }
+
72 
+
73  }
+
74 }
+
75 #endif
+
fvar< T > cos(const fvar< T > &x)
Definition: cos.hpp:13
+ +
int sign(const T &z)
Definition: sign.hpp:9
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
fvar< T > fmod(const fvar< T > &x1, const fvar< T > &x2)
Definition: fmod.hpp:16
+ + + + +
double von_mises_rng(const double mu, const double kappa, RNG &rng)
+ +
double uniform_rng(const double alpha, const double beta, RNG &rng)
Definition: uniform_rng.hpp:22
+
fvar< T > acos(const fvar< T > &x)
Definition: acos.hpp:14
+
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ + + +
double pi()
Return the value of pi.
Definition: constants.hpp:86
+
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/vv__vari_8hpp.html b/doc/api/html/vv__vari_8hpp.html new file mode 100644 index 00000000000..bdd41d92e6a --- /dev/null +++ b/doc/api/html/vv__vari_8hpp.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/rev/core/vv_vari.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
vv_vari.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

class  stan::math::op_vv_vari
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/vv__vari_8hpp_source.html b/doc/api/html/vv__vari_8hpp_source.html new file mode 100644 index 00000000000..3cc6b290ee8 --- /dev/null +++ b/doc/api/html/vv__vari_8hpp_source.html @@ -0,0 +1,137 @@ + + + + + + +Stan Math Library: stan/math/rev/core/vv_vari.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
vv_vari.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_VV_VARI_HPP
+
2 #define STAN_MATH_REV_CORE_VV_VARI_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
9  class op_vv_vari : public vari {
+
10  protected:
+ + +
13  public:
+
14  op_vv_vari(double f, vari* avi, vari* bvi):
+
15  vari(f),
+
16  avi_(avi),
+
17  bvi_(bvi) {
+
18  }
+
19  };
+
20 
+
21  }
+
22 }
+
23 #endif
+ +
op_vv_vari(double f, vari *avi, vari *bvi)
Definition: vv_vari.hpp:14
+
The variable implementation base class.
Definition: vari.hpp:28
+ + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/vvd__vari_8hpp.html b/doc/api/html/vvd__vari_8hpp.html new file mode 100644 index 00000000000..874e9231ba3 --- /dev/null +++ b/doc/api/html/vvd__vari_8hpp.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/rev/core/vvd_vari.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
vvd_vari.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

class  stan::math::op_vvd_vari
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/vvd__vari_8hpp_source.html b/doc/api/html/vvd__vari_8hpp_source.html new file mode 100644 index 00000000000..6c3cf440b65 --- /dev/null +++ b/doc/api/html/vvd__vari_8hpp_source.html @@ -0,0 +1,140 @@ + + + + + + +Stan Math Library: stan/math/rev/core/vvd_vari.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
vvd_vari.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_VVD_VARI_HPP
+
2 #define STAN_MATH_REV_CORE_VVD_VARI_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7  namespace math {
+
8 
+
9  class op_vvd_vari : public vari {
+
10  protected:
+ + +
13  double cd_;
+
14  public:
+
15  op_vvd_vari(double f, vari* avi, vari* bvi, double c) :
+
16  vari(f),
+
17  avi_(avi),
+
18  bvi_(bvi),
+
19  cd_(c) {
+
20  }
+
21  };
+
22 
+
23  }
+
24 }
+
25 #endif
+ + +
The variable implementation base class.
Definition: vari.hpp:28
+ +
op_vvd_vari(double f, vari *avi, vari *bvi, double c)
Definition: vvd_vari.hpp:15
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/vvv__vari_8hpp.html b/doc/api/html/vvv__vari_8hpp.html new file mode 100644 index 00000000000..e2a080ba207 --- /dev/null +++ b/doc/api/html/vvv__vari_8hpp.html @@ -0,0 +1,128 @@ + + + + + + +Stan Math Library: stan/math/rev/core/vvv_vari.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
vvv_vari.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

class  stan::math::op_vvv_vari
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/vvv__vari_8hpp_source.html b/doc/api/html/vvv__vari_8hpp_source.html new file mode 100644 index 00000000000..9d07cb05225 --- /dev/null +++ b/doc/api/html/vvv__vari_8hpp_source.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/rev/core/vvv_vari.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
vvv_vari.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_VVV_VARI_HPP
+
2 #define STAN_MATH_REV_CORE_VVV_VARI_HPP
+
3 
+ +
5 
+
6 namespace stan {
+
7 
+
8  namespace math {
+
9 
+
10  class op_vvv_vari : public vari {
+
11  protected:
+ + + +
15  public:
+
16  op_vvv_vari(double f, vari* avi, vari* bvi, vari* cvi) :
+
17  vari(f),
+
18  avi_(avi),
+
19  bvi_(bvi),
+
20  cvi_(cvi) {
+
21  }
+
22  };
+
23 
+
24  }
+
25 }
+
26 #endif
+ + + + +
The variable implementation base class.
Definition: vari.hpp:28
+
op_vvv_vari(double f, vari *avi, vari *bvi, vari *cvi)
Definition: vvv_vari.hpp:16
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/weibull__ccdf__log_8hpp.html b/doc/api/html/weibull__ccdf__log_8hpp.html new file mode 100644 index 00000000000..4558d489286 --- /dev/null +++ b/doc/api/html/weibull__ccdf__log_8hpp.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/weibull_ccdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
weibull_ccdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
stan::math::weibull_ccdf_log (const T_y &y, const T_shape &alpha, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/weibull__ccdf__log_8hpp_source.html b/doc/api/html/weibull__ccdf__log_8hpp_source.html new file mode 100644 index 00000000000..ac34f1a95bc --- /dev/null +++ b/doc/api/html/weibull__ccdf__log_8hpp_source.html @@ -0,0 +1,216 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/weibull_ccdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
weibull_ccdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_WEIBULL_CCDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_WEIBULL_CCDF_LOG_HPP
+
3 
+
4 #include <boost/random/weibull_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + +
19 #include <cmath>
+
20 
+
21 namespace stan {
+
22 
+
23  namespace math {
+
24 
+
25  template <typename T_y, typename T_shape, typename T_scale>
+
26  typename return_type<T_y, T_shape, T_scale>::type
+
27  weibull_ccdf_log(const T_y& y, const T_shape& alpha, const T_scale& sigma) {
+ +
29  T_partials_return;
+
30 
+
31  static const char* function("stan::math::weibull_ccdf_log");
+
32 
+ + +
35  using boost::math::tools::promote_args;
+ +
37  using std::log;
+
38 
+
39  // check if any vectors are zero length
+
40  if (!(stan::length(y)
+
41  && stan::length(alpha)
+
42  && stan::length(sigma)))
+
43  return 0.0;
+
44 
+
45  T_partials_return ccdf_log(0.0);
+
46  check_nonnegative(function, "Random variable", y);
+
47  check_positive_finite(function, "Shape parameter", alpha);
+
48  check_positive_finite(function, "Scale parameter", sigma);
+
49 
+ +
51  operands_and_partials(y, alpha, sigma);
+
52 
+
53  VectorView<const T_y> y_vec(y);
+
54  VectorView<const T_scale> sigma_vec(sigma);
+
55  VectorView<const T_shape> alpha_vec(alpha);
+
56  size_t N = max_size(y, sigma, alpha);
+
57  for (size_t n = 0; n < N; n++) {
+
58  const T_partials_return y_dbl = value_of(y_vec[n]);
+
59  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
60  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
61  const T_partials_return pow_ = pow(y_dbl / sigma_dbl, alpha_dbl);
+
62 
+
63  // ccdf_log
+
64  ccdf_log -= pow_;
+
65 
+
66  // gradients
+ +
68  operands_and_partials.d_x1[n] -= alpha_dbl / y_dbl * pow_;
+ +
70  operands_and_partials.d_x2[n] -= log(y_dbl / sigma_dbl) * pow_;
+ +
72  operands_and_partials.d_x3[n] += alpha_dbl / sigma_dbl * pow_;
+
73  }
+
74 
+
75  return operands_and_partials.to_var(ccdf_log, y, alpha, sigma);
+
76  }
+
77  }
+
78 }
+
79 #endif
+ + +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + + +
return_type< T_y, T_shape, T_scale >::type weibull_ccdf_log(const T_y &y, const T_shape &alpha, const T_scale &sigma)
+
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/weibull__cdf_8hpp.html b/doc/api/html/weibull__cdf_8hpp.html new file mode 100644 index 00000000000..0a2f74bae59 --- /dev/null +++ b/doc/api/html/weibull__cdf_8hpp.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/weibull_cdf.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
weibull_cdf.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
stan::math::weibull_cdf (const T_y &y, const T_shape &alpha, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/weibull__cdf_8hpp_source.html b/doc/api/html/weibull__cdf_8hpp_source.html new file mode 100644 index 00000000000..0318b577a08 --- /dev/null +++ b/doc/api/html/weibull__cdf_8hpp_source.html @@ -0,0 +1,234 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/weibull_cdf.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
weibull_cdf.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_WEIBULL_CDF_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_WEIBULL_CDF_HPP
+
3 
+
4 #include <boost/random/weibull_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + +
19 #include <cmath>
+
20 
+
21 namespace stan {
+
22 
+
23  namespace math {
+
24 
+
25  template <typename T_y, typename T_shape, typename T_scale>
+
26  typename return_type<T_y, T_shape, T_scale>::type
+
27  weibull_cdf(const T_y& y, const T_shape& alpha, const T_scale& sigma) {
+ +
29  T_partials_return;
+
30 
+
31  static const char* function("stan::math::weibull_cdf");
+
32 
+ + +
35  using boost::math::tools::promote_args;
+ +
37  using std::log;
+
38  using std::exp;
+
39 
+
40  // check if any vectors are zero length
+
41  if (!(stan::length(y)
+
42  && stan::length(alpha)
+
43  && stan::length(sigma)))
+
44  return 1.0;
+
45 
+
46  T_partials_return cdf(1.0);
+
47  check_nonnegative(function, "Random variable", y);
+
48  check_positive_finite(function, "Shape parameter", alpha);
+
49  check_positive_finite(function, "Scale parameter", sigma);
+
50 
+ +
52  operands_and_partials(y, alpha, sigma);
+
53 
+
54  VectorView<const T_y> y_vec(y);
+
55  VectorView<const T_scale> sigma_vec(sigma);
+
56  VectorView<const T_shape> alpha_vec(alpha);
+
57  size_t N = max_size(y, sigma, alpha);
+
58  for (size_t n = 0; n < N; n++) {
+
59  const T_partials_return y_dbl = value_of(y_vec[n]);
+
60  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
61  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
62  const T_partials_return pow_ = pow(y_dbl / sigma_dbl, alpha_dbl);
+
63  const T_partials_return exp_ = exp(-pow_);
+
64  const T_partials_return cdf_ = 1.0 - exp_;
+
65 
+
66  // cdf
+
67  cdf *= cdf_;
+
68 
+
69  // gradients
+
70  const T_partials_return rep_deriv = exp_ * pow_ / cdf_;
+ +
72  operands_and_partials.d_x1[n] += rep_deriv * alpha_dbl / y_dbl;
+ +
74  operands_and_partials.d_x2[n] += rep_deriv * log(y_dbl / sigma_dbl);
+ +
76  operands_and_partials.d_x3[n] -= rep_deriv * alpha_dbl / sigma_dbl;
+
77  }
+
78 
+ +
80  for (size_t n = 0; n < stan::length(y); ++n)
+
81  operands_and_partials.d_x1[n] *= cdf;
+
82  }
+ +
84  for (size_t n = 0; n < stan::length(alpha); ++n)
+
85  operands_and_partials.d_x2[n] *= cdf;
+
86  }
+ +
88  for (size_t n = 0; n < stan::length(sigma); ++n)
+
89  operands_and_partials.d_x3[n] *= cdf;
+
90  }
+
91 
+
92  return operands_and_partials.to_var(cdf, y, alpha, sigma);
+
93  }
+
94  }
+
95 }
+
96 #endif
+ + +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
return_type< T_y, T_shape, T_scale >::type weibull_cdf(const T_y &y, const T_shape &alpha, const T_scale &sigma)
Definition: weibull_cdf.hpp:27
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + + +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/weibull__cdf__log_8hpp.html b/doc/api/html/weibull__cdf__log_8hpp.html new file mode 100644 index 00000000000..c647455eff8 --- /dev/null +++ b/doc/api/html/weibull__cdf__log_8hpp.html @@ -0,0 +1,145 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/weibull_cdf_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
weibull_cdf_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
stan::math::weibull_cdf_log (const T_y &y, const T_shape &alpha, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/weibull__cdf__log_8hpp_source.html b/doc/api/html/weibull__cdf__log_8hpp_source.html new file mode 100644 index 00000000000..8862c58a93d --- /dev/null +++ b/doc/api/html/weibull__cdf__log_8hpp_source.html @@ -0,0 +1,221 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/weibull_cdf_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
weibull_cdf_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_WEIBULL_CDF_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_WEIBULL_CDF_LOG_HPP
+
3 
+
4 #include <boost/random/weibull_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + +
19 #include <cmath>
+
20 
+
21 namespace stan {
+
22 
+
23  namespace math {
+
24 
+
25  template <typename T_y, typename T_shape, typename T_scale>
+
26  typename return_type<T_y, T_shape, T_scale>::type
+
27  weibull_cdf_log(const T_y& y, const T_shape& alpha, const T_scale& sigma) {
+ +
29  T_partials_return;
+
30 
+
31  static const char* function("stan::math::weibull_cdf_log");
+
32 
+ + +
35  using boost::math::tools::promote_args;
+ +
37  using std::log;
+
38  using std::exp;
+
39 
+
40  // check if any vectors are zero length
+
41  if (!(stan::length(y)
+
42  && stan::length(alpha)
+
43  && stan::length(sigma)))
+
44  return 0.0;
+
45 
+
46  T_partials_return cdf_log(0.0);
+
47  check_nonnegative(function, "Random variable", y);
+
48  check_positive_finite(function, "Shape parameter", alpha);
+
49  check_positive_finite(function, "Scale parameter", sigma);
+
50 
+ +
52  operands_and_partials(y, alpha, sigma);
+
53 
+
54  VectorView<const T_y> y_vec(y);
+
55  VectorView<const T_scale> sigma_vec(sigma);
+
56  VectorView<const T_shape> alpha_vec(alpha);
+
57  size_t N = max_size(y, sigma, alpha);
+
58  for (size_t n = 0; n < N; n++) {
+
59  const T_partials_return y_dbl = value_of(y_vec[n]);
+
60  const T_partials_return sigma_dbl = value_of(sigma_vec[n]);
+
61  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+
62  const T_partials_return pow_ = pow(y_dbl / sigma_dbl, alpha_dbl);
+
63  const T_partials_return exp_ = exp(-pow_);
+
64  const T_partials_return cdf_ = 1.0 - exp_;
+
65 
+
66  // cdf_log
+
67  cdf_log += log(cdf_);
+
68 
+
69  // gradients
+
70  const T_partials_return rep_deriv = pow_ / (1.0 / exp_ - 1.0);
+ +
72  operands_and_partials.d_x1[n] += rep_deriv * alpha_dbl / y_dbl;
+ +
74  operands_and_partials.d_x2[n] += rep_deriv * log(y_dbl / sigma_dbl);
+ +
76  operands_and_partials.d_x3[n] -= rep_deriv * alpha_dbl / sigma_dbl;
+
77  }
+
78 
+
79  return operands_and_partials.to_var(cdf_log, y, alpha, sigma);
+
80  }
+
81  }
+
82 }
+
83 #endif
+ + +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+ + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
return_type< T_y, T_shape, T_scale >::type weibull_cdf_log(const T_y &y, const T_shape &alpha, const T_scale &sigma)
+
A variable implementation that stores operands and derivatives with respect to the variable...
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + + + +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/weibull__log_8hpp.html b/doc/api/html/weibull__log_8hpp.html new file mode 100644 index 00000000000..3968ae9a31c --- /dev/null +++ b/doc/api/html/weibull__log_8hpp.html @@ -0,0 +1,149 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/weibull_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
weibull_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
stan::math::weibull_log (const T_y &y, const T_shape &alpha, const T_scale &sigma)
 
template<typename T_y , typename T_shape , typename T_scale >
return_type< T_y, T_shape,
+T_scale >::type 
stan::math::weibull_log (const T_y &y, const T_shape &alpha, const T_scale &sigma)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/weibull__log_8hpp_source.html b/doc/api/html/weibull__log_8hpp_source.html new file mode 100644 index 00000000000..aed829b187d --- /dev/null +++ b/doc/api/html/weibull__log_8hpp_source.html @@ -0,0 +1,290 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/weibull_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
weibull_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_WEIBULL_LOG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_WEIBULL_LOG_HPP
+
3 
+
4 #include <boost/random/weibull_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + + + +
19 #include <cmath>
+
20 
+
21 namespace stan {
+
22 
+
23  namespace math {
+
24 
+
25  // Weibull(y|alpha, sigma) [y >= 0; alpha > 0; sigma > 0]
+
26  // FIXME: document
+
27  template <bool propto,
+
28  typename T_y, typename T_shape, typename T_scale>
+
29  typename return_type<T_y, T_shape, T_scale>::type
+
30  weibull_log(const T_y& y, const T_shape& alpha, const T_scale& sigma) {
+
31  static const char* function("stan::math::weibull_log");
+ +
33  T_partials_return;
+
34 
+ + + + + + +
41  using std::log;
+
42 
+
43  // check if any vectors are zero length
+
44  if (!(stan::length(y)
+
45  && stan::length(alpha)
+
46  && stan::length(sigma)))
+
47  return 0.0;
+
48 
+
49  // set up return value accumulator
+
50  T_partials_return logp(0.0);
+
51  check_finite(function, "Random variable", y);
+
52  check_positive_finite(function, "Shape parameter", alpha);
+
53  check_positive_finite(function, "Scale parameter", sigma);
+
54  check_consistent_sizes(function,
+
55  "Random variable", y,
+
56  "Shape parameter", alpha,
+
57  "Scale parameter", sigma);
+
58 
+
59  // check if no variables are involved and prop-to
+ +
61  return 0.0;
+
62 
+
63  VectorView<const T_y> y_vec(y);
+
64  VectorView<const T_shape> alpha_vec(alpha);
+
65  VectorView<const T_scale> sigma_vec(sigma);
+
66  size_t N = max_size(y, alpha, sigma);
+
67 
+
68  for (size_t n = 0; n < N; n++) {
+
69  const T_partials_return y_dbl = value_of(y_vec[n]);
+
70  if (y_dbl < 0)
+
71  return LOG_ZERO;
+
72  }
+
73 
+ +
75  T_partials_return, T_shape> log_alpha(length(alpha));
+
76  for (size_t i = 0; i < length(alpha); i++)
+ +
78  log_alpha[i] = log(value_of(alpha_vec[i]));
+
79 
+ +
81  T_partials_return, T_y> log_y(length(y));
+
82  for (size_t i = 0; i < length(y); i++)
+ +
84  log_y[i] = log(value_of(y_vec[i]));
+
85 
+ +
87  T_partials_return, T_scale> log_sigma(length(sigma));
+
88  for (size_t i = 0; i < length(sigma); i++)
+ +
90  log_sigma[i] = log(value_of(sigma_vec[i]));
+
91 
+ +
93  T_partials_return, T_scale> inv_sigma(length(sigma));
+
94  for (size_t i = 0; i < length(sigma); i++)
+ +
96  inv_sigma[i] = 1.0 / value_of(sigma_vec[i]);
+
97 
+ +
99  T_partials_return, T_y, T_shape, T_scale>
+
100  y_div_sigma_pow_alpha(N);
+
101  for (size_t i = 0; i < N; i++)
+ +
103  const T_partials_return y_dbl = value_of(y_vec[i]);
+
104  const T_partials_return alpha_dbl = value_of(alpha_vec[i]);
+
105  y_div_sigma_pow_alpha[i] = pow(y_dbl * inv_sigma[i], alpha_dbl);
+
106  }
+
107 
+ +
109  operands_and_partials(y, alpha, sigma);
+
110  for (size_t n = 0; n < N; n++) {
+
111  const T_partials_return alpha_dbl = value_of(alpha_vec[n]);
+ +
113  logp += log_alpha[n];
+ +
115  logp += (alpha_dbl-1.0)*log_y[n];
+ +
117  logp -= alpha_dbl*log_sigma[n];
+ +
119  logp -= y_div_sigma_pow_alpha[n];
+
120 
+ +
122  const T_partials_return inv_y = 1.0 / value_of(y_vec[n]);
+
123  operands_and_partials.d_x1[n]
+
124  += (alpha_dbl-1.0) * inv_y
+
125  - alpha_dbl * y_div_sigma_pow_alpha[n] * inv_y;
+
126  }
+ +
128  operands_and_partials.d_x2[n]
+
129  += 1.0/alpha_dbl
+
130  + (1.0 - y_div_sigma_pow_alpha[n]) * (log_y[n] - log_sigma[n]);
+ +
132  operands_and_partials.d_x3[n]
+
133  += alpha_dbl * inv_sigma[n] * (y_div_sigma_pow_alpha[n] - 1.0);
+
134  }
+
135  return operands_and_partials.to_var(logp, y, alpha, sigma);
+
136  }
+
137 
+
138  template <typename T_y, typename T_shape, typename T_scale>
+
139  inline
+ +
141  weibull_log(const T_y& y, const T_shape& alpha, const T_scale& sigma) {
+
142  return weibull_log<false>(y, alpha, sigma);
+
143  }
+
144  }
+
145 }
+
146 #endif
+ +
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
T_return_type to_var(T_partials_return logp, const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0)
+
const double LOG_ZERO
Definition: constants.hpp:175
+
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+ + + +
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > d_x1
+ +
Metaprogram to determine if a type has a base scalar type that can be assigned to type double...
+
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > d_x3
+
A variable implementation that stores operands and derivatives with respect to the variable...
+
return_type< T_y, T_shape, T_scale >::type weibull_log(const T_y &y, const T_shape &alpha, const T_scale &sigma)
Definition: weibull_log.hpp:30
+ +
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+ + +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+
fvar< T > multiply_log(const fvar< T > &x1, const fvar< T > &x2)
+ + +
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > d_x2
+
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+
boost::math::tools::promote_args< typename partials_type< typename scalar_type< T1 >::type >::type, typename partials_type< typename scalar_type< T2 >::type >::type, typename partials_type< typename scalar_type< T3 >::type >::type, typename partials_type< typename scalar_type< T4 >::type >::type, typename partials_type< typename scalar_type< T5 >::type >::type, typename partials_type< typename scalar_type< T6 >::type >::type >::type type
+ +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/weibull__rng_8hpp.html b/doc/api/html/weibull__rng_8hpp.html new file mode 100644 index 00000000000..5fb33ac7cae --- /dev/null +++ b/doc/api/html/weibull__rng_8hpp.html @@ -0,0 +1,141 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/weibull_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
weibull_rng.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + +

+Functions

template<class RNG >
double stan::math::weibull_rng (const double alpha, const double sigma, RNG &rng)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/weibull__rng_8hpp_source.html b/doc/api/html/weibull__rng_8hpp_source.html new file mode 100644 index 00000000000..11168caa91d --- /dev/null +++ b/doc/api/html/weibull__rng_8hpp_source.html @@ -0,0 +1,164 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/weibull_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
weibull_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_PROB_WEIBULL_RNG_HPP
+
2 #define STAN_MATH_PRIM_SCAL_PROB_WEIBULL_RNG_HPP
+
3 
+
4 #include <boost/random/weibull_distribution.hpp>
+
5 #include <boost/random/variate_generator.hpp>
+ + + + + + + + + + + +
17 
+
18 namespace stan {
+
19 
+
20  namespace math {
+
21 
+
22  template <class RNG>
+
23  inline double
+
24  weibull_rng(const double alpha,
+
25  const double sigma,
+
26  RNG& rng) {
+
27  using boost::variate_generator;
+
28  using boost::random::weibull_distribution;
+
29 
+
30  static const char* function("stan::math::weibull_rng");
+
31 
+ +
33 
+
34  check_positive_finite(function, "Shape parameter", alpha);
+
35  check_positive_finite(function, "Scale parameter", sigma);
+
36 
+
37  variate_generator<RNG&, weibull_distribution<> >
+
38  weibull_rng(rng, weibull_distribution<>(alpha, sigma));
+
39  return weibull_rng();
+
40  }
+
41  }
+
42 }
+
43 #endif
+ + + + + + +
double weibull_rng(const double alpha, const double sigma, RNG &rng)
Definition: weibull_rng.hpp:24
+ + + + + +
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/welford__covar__estimator_8hpp.html b/doc/api/html/welford__covar__estimator_8hpp.html new file mode 100644 index 00000000000..9269877fd7d --- /dev/null +++ b/doc/api/html/welford__covar__estimator_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/welford_covar_estimator.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
welford_covar_estimator.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + +

+Classes

class  stan::math::welford_covar_estimator
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/welford__covar__estimator_8hpp_source.html b/doc/api/html/welford__covar__estimator_8hpp_source.html new file mode 100644 index 00000000000..6ada3af2025 --- /dev/null +++ b/doc/api/html/welford__covar__estimator_8hpp_source.html @@ -0,0 +1,174 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/welford_covar_estimator.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
welford_covar_estimator.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_WELFORD_COVAR_ESTIMATOR_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_WELFORD_COVAR_ESTIMATOR_HPP
+
3 
+ +
5 #include <vector>
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+ +
12  public:
+
13  explicit welford_covar_estimator(int n)
+
14  : _m(Eigen::VectorXd::Zero(n)),
+
15  _m2(Eigen::MatrixXd::Zero(n, n)) {
+
16  restart();
+
17  }
+
18 
+
19  void restart() {
+
20  _num_samples = 0;
+
21  _m.setZero();
+
22  _m2.setZero();
+
23  }
+
24 
+
25  void add_sample(const Eigen::VectorXd& q) {
+
26  ++_num_samples;
+
27 
+
28  Eigen::VectorXd delta(q - _m);
+
29  _m += delta / _num_samples;
+
30  _m2 += (q - _m) * delta.transpose();
+
31  }
+
32 
+
33  int num_samples() { return _num_samples; }
+
34 
+
35  void sample_mean(Eigen::VectorXd& mean) { mean = _m; }
+
36 
+
37  void sample_covariance(Eigen::MatrixXd& covar) {
+
38  if (_num_samples > 1)
+
39  covar = _m2 / (_num_samples - 1.0);
+
40  }
+
41 
+
42  protected:
+
43  double _num_samples;
+
44 
+
45  Eigen::VectorXd _m;
+
46  Eigen::MatrixXd _m2;
+
47  };
+
48 
+
49  } // prob
+
50 
+
51 } // stan
+
52 
+
53 
+
54 #endif
+ + + +
void add_sample(const Eigen::VectorXd &q)
+ + +
void sample_covariance(Eigen::MatrixXd &covar)
+
boost::math::tools::promote_args< T >::type mean(const std::vector< T > &v)
Returns the sample mean (i.e., average) of the coefficients in the specified standard vector...
Definition: mean.hpp:23
+ + + + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/welford__var__estimator_8hpp.html b/doc/api/html/welford__var__estimator_8hpp.html new file mode 100644 index 00000000000..663e5cc8d15 --- /dev/null +++ b/doc/api/html/welford__var__estimator_8hpp.html @@ -0,0 +1,129 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/welford_var_estimator.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
welford_var_estimator.hpp File Reference
+
+
+
#include <stan/math/prim/mat/fun/Eigen.hpp>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + +

+Classes

class  stan::math::welford_var_estimator
 
+ + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/welford__var__estimator_8hpp_source.html b/doc/api/html/welford__var__estimator_8hpp_source.html new file mode 100644 index 00000000000..53098b5715d --- /dev/null +++ b/doc/api/html/welford__var__estimator_8hpp_source.html @@ -0,0 +1,175 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/fun/welford_var_estimator.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
welford_var_estimator.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_WELFORD_VAR_ESTIMATOR_HPP
+
2 #define STAN_MATH_PRIM_MAT_FUN_WELFORD_VAR_ESTIMATOR_HPP
+
3 
+ +
5 #include <vector>
+
6 
+
7 namespace stan {
+
8 
+
9  namespace math {
+
10 
+ +
12  public:
+
13  explicit welford_var_estimator(int n)
+
14  : _m(Eigen::VectorXd::Zero(n)),
+
15  _m2(Eigen::VectorXd::Zero(n)) {
+
16  restart();
+
17  }
+
18 
+
19  void restart() {
+
20  _num_samples = 0;
+
21  _m.setZero();
+
22  _m2.setZero();
+
23  }
+
24 
+
25  void add_sample(const Eigen::VectorXd& q) {
+
26  ++_num_samples;
+
27 
+
28  Eigen::VectorXd delta(q - _m);
+
29  _m += delta / _num_samples;
+
30  _m2 += delta.cwiseProduct(q - _m);
+
31  }
+
32 
+
33  int num_samples() { return _num_samples; }
+
34 
+
35  void sample_mean(Eigen::VectorXd& mean) { mean = _m; }
+
36 
+
37  void sample_variance(Eigen::VectorXd& var) {
+
38  if (_num_samples > 1)
+
39  var = _m2 / (_num_samples - 1.0);
+
40  }
+
41 
+
42  protected:
+
43  double _num_samples;
+
44 
+
45  Eigen::VectorXd _m;
+
46  Eigen::VectorXd _m2;
+
47  };
+
48 
+
49  } // prob
+
50 
+
51 } // stan
+
52 
+
53 
+
54 #endif
+ + + + +
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
+
void sample_mean(Eigen::VectorXd &mean)
+
boost::math::tools::promote_args< T >::type mean(const std::vector< T > &v)
Returns the sample mean (i.e., average) of the coefficients in the specified standard vector...
Definition: mean.hpp:23
+ +
void add_sample(const Eigen::VectorXd &q)
+ + +
void sample_variance(Eigen::VectorXd &var)
+ +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/wiener__log_8hpp.html b/doc/api/html/wiener__log_8hpp.html new file mode 100644 index 00000000000..d035dd102b2 --- /dev/null +++ b/doc/api/html/wiener__log_8hpp.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/wiener_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
wiener_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_alpha , typename T_tau , typename T_beta , typename T_delta >
return_type< T_y, T_alpha,
+T_tau, T_beta, T_delta >::type 
stan::math::wiener_log (const T_y &y, const T_alpha &alpha, const T_tau &tau, const T_beta &beta, const T_delta &delta)
 The log of the first passage time density function for a (Wiener) drift diffusion model for the given $y$, boundary separation $\alpha$, nondecision time $\tau$, relative bias $\beta$, and drift rate $\delta$. More...
 
template<typename T_y , typename T_alpha , typename T_tau , typename T_beta , typename T_delta >
return_type< T_y, T_alpha,
+T_tau, T_beta, T_delta >::type 
stan::math::wiener_log (const T_y &y, const T_alpha &alpha, const T_tau &tau, const T_beta &beta, const T_delta &delta)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/wiener__log_8hpp_source.html b/doc/api/html/wiener__log_8hpp_source.html new file mode 100644 index 00000000000..e81ebde15ea --- /dev/null +++ b/doc/api/html/wiener__log_8hpp_source.html @@ -0,0 +1,362 @@ + + + + + + +Stan Math Library: stan/math/prim/scal/prob/wiener_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
wiener_log.hpp
+
+
+Go to the documentation of this file.
1 // Copyright (c) 2013, Joachim Vandekerckhove.
+
2 // All rights reserved.
+
3 //
+
4 // Redistribution and use in source and binary forms, with or without
+
5 // modification, are permitted
+
6 // provided that the following conditions are met:
+
7 //
+
8 // * Redistributions of source code must retain the above copyright notice,
+
9 // * this list of conditions and the following disclaimer.
+
10 // * Redistributions in binary form must reproduce the above copyright notice,
+
11 // * this list of conditions and the following disclaimer in the
+
12 // * documentation and/or other materials provided with the distribution.
+
13 // * Neither the name of the University of California, Irvine nor the names
+
14 // * of its contributors may be used to endorse or promote products derived
+
15 // * from this software without specific prior written permission.
+
16 //
+
17 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+
18 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+
19 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+
20 // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+
21 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+
22 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+
23 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+
24 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+
25 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+
26 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+
27 // THE POSSIBILITY OF SUCH DAMAGE.
+
28 
+
29 #ifndef STAN_MATH_PRIM_MAT_PROB_WIENER_LOG_HPP
+
30 #define STAN_MATH_PRIM_MAT_PROB_WIENER_LOG_HPP
+
31 
+ + + + + + + + + + +
42 #include <boost/math/distributions.hpp>
+
43 #include <cmath>
+
44 #include <algorithm> // for max
+
45 
+
46 namespace stan {
+
47 
+
48  namespace math {
+
49 
+
68  template <bool propto,
+
69  typename T_y, typename T_alpha, typename T_tau,
+
70  typename T_beta, typename T_delta>
+
71  typename return_type<T_y, T_alpha, T_tau, T_beta, T_delta>::type
+
72  wiener_log(const T_y& y, const T_alpha& alpha, const T_tau& tau,
+
73  const T_beta& beta, const T_delta& delta) {
+
74  static const char* function("stan::math::wiener_log(%1%)");
+
75 
+
76  using boost::math::tools::promote_args;
+
77  using boost::math::isinf;
+ +
79  using std::log;
+
80  using std::exp;
+
81  using std::pow;
+
82 
+
83  static const double WIENER_ERR = 0.000001;
+
84  static const double PI_TIMES_WIENER_ERR = pi() * WIENER_ERR;
+
85  static const double LOG_PI_LOG_WIENER_ERR =
+
86  LOG_PI + log(WIENER_ERR);
+
87  static const double
+
88  TWO_TIMES_SQRT_2_TIMES_SQRT_PI_TIMES_WIENER_ERR =
+
89  2.0 * SQRT_2_TIMES_SQRT_PI * WIENER_ERR;
+
90  static const double LOG_TWO_OVER_TWO_PLUS_LOG_SQRT_PI =
+
91  LOG_TWO / 2 + LOG_SQRT_PI;
+
92  static const double SQUARE_PI_OVER_TWO = square(pi()) * 0.5;
+
93  static const double TWO_TIMES_LOG_SQRT_PI = 2.0 * LOG_SQRT_PI;
+
94 
+
95  if (!(stan::length(y)
+
96  && stan::length(alpha)
+
97  && stan::length(beta)
+
98  && stan::length(tau)
+
99  && stan::length(delta)))
+
100  return 0.0;
+
101 
+
102  typedef typename return_type<T_y, T_alpha, T_tau,
+
103  T_beta, T_delta>::type T_return_type;
+
104  T_return_type lp(0.0);
+
105 
+
106  check_not_nan(function, "Random variable", y);
+
107  check_not_nan(function, "Boundary separation", alpha);
+
108  check_not_nan(function, "A-priori bias", beta);
+
109  check_not_nan(function, "Nondecision time", tau);
+
110  check_not_nan(function, "Drift rate", delta);
+
111  check_finite(function, "Boundary separation", alpha);
+
112  check_finite(function, "A-priori bias", beta);
+
113  check_finite(function, "Nondecision time", tau);
+
114  check_finite(function, "Drift rate", delta);
+
115  check_positive(function, "Random variable", y);
+
116  check_positive(function, "Boundary separation", alpha);
+
117  check_positive(function, "Nondecision time", tau);
+
118  check_bounded(function, "A-priori bias", beta , 0, 1);
+
119  check_consistent_sizes(function,
+
120  "Random variable", y,
+
121  "Boundary separation", alpha,
+
122  "A-priori bias", beta,
+
123  "Nondecision time", tau,
+
124  "Drift rate", delta);
+
125 
+
126  size_t N =
+
127  std::max(max_size(y, alpha, beta), max_size(tau, delta));
+
128  if (!N)
+
129  return 0.0;
+
130  VectorView<const T_y> y_vec(y);
+
131  VectorView<const T_alpha> alpha_vec(alpha);
+
132  VectorView<const T_beta> beta_vec(beta);
+
133  VectorView<const T_tau> tau_vec(tau);
+
134  VectorView<const T_delta> delta_vec(delta);
+
135 
+
136  if (!include_summand<propto, T_y, T_alpha, T_tau,
+
137  T_beta, T_delta>::value) {
+
138  return 0;
+
139  }
+
140 
+
141  for (size_t i = 0; i < N; i++)
+
142  if (y_vec[i] < tau_vec[i]) {
+ +
144  return lp;
+
145  }
+
146 
+
147  for (size_t i = 0; i < N; i++) {
+
148  typename scalar_type<T_beta>::type one_minus_beta
+
149  = 1.0 - beta_vec[i];
+
150  typename scalar_type<T_alpha>::type alpha2
+
151  = square(alpha_vec[i]);
+
152  T_return_type x = y_vec[i];
+
153  T_return_type kl, ks, tmp = 0;
+
154  T_return_type k, K;
+
155 
+
156 
+
157  x = x - tau_vec[i]; // remove non-decision time from x
+
158  x = x / alpha2; // convert t to normalized time tt
+
159  T_return_type sqrt_x = sqrt(x);
+
160  T_return_type log_x = log(x);
+
161  T_return_type one_over_pi_times_sqrt_x = 1.0 / pi() * sqrt_x;
+
162 
+
163  // calculate number of terms needed for large t:
+
164  // if error threshold is set low enough
+
165  if (PI_TIMES_WIENER_ERR * x < 1) {
+
166  // compute bound
+
167  kl = sqrt(-2.0 * SQRT_PI *
+
168  (LOG_PI_LOG_WIENER_ERR + log_x)) /
+
169  sqrt_x;
+
170  // ensure boundary conditions met
+
171  kl = (kl > one_over_pi_times_sqrt_x) ?
+
172  kl : one_over_pi_times_sqrt_x;
+
173  } else { // if error threshold set too high
+
174  kl = one_over_pi_times_sqrt_x; // set to boundary condition
+
175  }
+
176  // calculate number of terms needed for small t:
+
177  // if error threshold is set low enough
+
178  T_return_type tmp_expr0
+
179  = TWO_TIMES_SQRT_2_TIMES_SQRT_PI_TIMES_WIENER_ERR * sqrt_x;
+
180  if (tmp_expr0 < 1) {
+
181  // compute bound
+
182  ks = 2.0 + sqrt_x * sqrt(-2 * log(tmp_expr0));
+
183  // ensure boundary conditions are met
+
184  T_return_type sqrt_x_plus_one = sqrt_x + 1.0;
+
185  ks = (ks > sqrt_x_plus_one) ? ks : sqrt_x_plus_one;
+
186  } else { // if error threshold was set too high
+
187  ks = 2.0; // minimal kappa for that case
+
188  }
+
189  // compute density: f(tt|0,1,w)
+
190  if (ks < kl) { // if small t is better (i.e., lambda<0)
+
191  K = ceil(ks); // round to smallest integer meeting error
+
192  T_return_type tmp_expr1 = (K - 1.0) / 2.0;
+
193  T_return_type tmp_expr2 = ceil(tmp_expr1);
+
194  for (k = -floor(tmp_expr1); k <= tmp_expr2; k++)
+
195  // increment sum
+
196  tmp += (one_minus_beta + 2.0 * k) *
+
197  exp(-(square(one_minus_beta + 2.0 * k)) * 0.5 / x);
+
198  // add constant term
+
199  tmp = log(tmp) -
+
200  LOG_TWO_OVER_TWO_PLUS_LOG_SQRT_PI - 1.5 * log_x;
+
201  } else { // if large t is better...
+
202  K = ceil(kl); // round to smallest integer meeting error
+
203  for (k = 1; k <= K; k++)
+
204  // increment sum
+
205  tmp += k * exp(-(square(k)) *
+
206  (SQUARE_PI_OVER_TWO * x)) *
+
207  sin(k * pi() * one_minus_beta);
+
208  tmp = log(tmp) +
+
209  TWO_TIMES_LOG_SQRT_PI; // add constant term
+
210  }
+
211 
+
212  // convert to f(t|v,a,w) and return result
+
213  lp += delta_vec[i] * alpha_vec[i] * one_minus_beta -
+
214  square(delta_vec[i]) * x * alpha2 / 2.0 -
+
215  log(alpha2) + tmp;
+
216  }
+
217 
+
218  return lp;
+
219  }
+
220 
+
221  template <typename T_y, typename T_alpha, typename T_tau,
+
222  typename T_beta, typename T_delta>
+
223  inline
+ +
225  wiener_log(const T_y& y, const T_alpha& alpha, const T_tau& tau,
+
226  const T_beta& beta, const T_delta& delta) {
+
227  return wiener_log<false>(y, alpha, tau, beta, delta);
+
228  }
+
229  }
+
230 }
+
231 #endif
+ +
return_type< T_y, T_alpha, T_tau, T_beta, T_delta >::type wiener_log(const T_y &y, const T_alpha &alpha, const T_tau &tau, const T_beta &beta, const T_delta &delta)
The log of the first passage time density function for a (Wiener) drift diffusion model for the given...
Definition: wiener_log.hpp:72
+
bool isfinite(const stan::math::var &v)
Checks if the given number has finite value.
+
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
+ +
const double LOG_PI
Definition: constants.hpp:170
+
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
+ +
const double LOG_SQRT_PI
Definition: constants.hpp:173
+
size_t length(const std::vector< T > &x)
Definition: length.hpp:10
+
bool check_bounded(const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)
Return true if the value is between the low and high values, inclusively.
+
Metaprogram to calculate the base scalar return type resulting from promoting all the scalar types of...
Definition: return_type.hpp:19
+
scalar_type_helper< is_vector< T >::value, T >::type type
Definition: scalar_type.hpp:38
+ +
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
+
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
+
const double LOG_TWO
Definition: constants.hpp:177
+ +
const double SQRT_2_TIMES_SQRT_PI
Definition: constants.hpp:158
+
bool isinf(const stan::math::var &v)
Checks if the given number is infinite.
Definition: boost_isinf.hpp:22
+
fvar< T > sin(const fvar< T > &x)
Definition: sin.hpp:14
+
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
+
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+
size_t max_size(const T1 &x1, const T2 &x2)
Definition: max_size.hpp:9
+
int max(const std::vector< int > &x)
Returns the maximum coefficient in the specified column vector.
Definition: max.hpp:21
+ +
bool check_finite(const char *function, const char *name, const T_y &y)
Return true if y is finite.
+ +
fvar< T > floor(const fvar< T > &x)
Definition: floor.hpp:11
+
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
+ +
double pi()
Return the value of pi.
Definition: constants.hpp:86
+
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:18
+ +
VectorView is a template metaprogram that takes its argument and allows it to be used like a vector...
Definition: VectorView.hpp:41
+ +
const double SQRT_PI
Definition: constants.hpp:156
+
fvar< T > ceil(const fvar< T > &x)
Definition: ceil.hpp:11
+
double negative_infinity()
Return negative infinity.
Definition: constants.hpp:132
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/wishart__log_8hpp.html b/doc/api/html/wishart__log_8hpp.html new file mode 100644 index 00000000000..02e0490e140 --- /dev/null +++ b/doc/api/html/wishart__log_8hpp.html @@ -0,0 +1,150 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/wishart_log.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
wishart_log.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Namespaces

 stan
 
 stan::math
 Matrices and templated mathematical functions.
 
+ + + + + + + + +

+Functions

template<bool propto, typename T_y , typename T_dof , typename T_scale >
boost::math::tools::promote_args
+< T_y, T_dof, T_scale >::type 
stan::math::wishart_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &W, const T_dof &nu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &S)
 The log of the Wishart density for the given W, degrees of freedom, and scale matrix. More...
 
template<typename T_y , typename T_dof , typename T_scale >
boost::math::tools::promote_args
+< T_y, T_dof, T_scale >::type 
stan::math::wishart_log (const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &W, const T_dof &nu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &S)
 
+
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/wishart__log_8hpp_source.html b/doc/api/html/wishart__log_8hpp_source.html new file mode 100644 index 00000000000..cd3c11ae658 --- /dev/null +++ b/doc/api/html/wishart__log_8hpp_source.html @@ -0,0 +1,247 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/wishart_log.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
wishart_log.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_WISHART_LOG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_WISHART_LOG_HPP
+
3 
+ + + + + + + + + + + + + + + + +
20 
+
21 namespace stan {
+
22 
+
23  namespace math {
+
24 
+
25  // Wishart(Sigma|n, Omega) [Sigma, Omega symmetric, non-neg, definite;
+
26  // Sigma.dims() = Omega.dims();
+
27  // n > Sigma.rows() - 1]
+
55  template <bool propto,
+
56  typename T_y, typename T_dof, typename T_scale>
+
57  typename boost::math::tools::promote_args<T_y, T_dof, T_scale>::type
+
58  wishart_log(const Eigen::Matrix<T_y, Eigen::Dynamic, Eigen::Dynamic>& W,
+
59  const T_dof& nu,
+
60  const Eigen::Matrix<T_scale, Eigen::Dynamic, Eigen::Dynamic>&
+
61  S) {
+
62  static const char* function("stan::math::wishart_log");
+
63 
+
64  using boost::math::tools::promote_args;
+
65  using Eigen::Dynamic;
+
66  using Eigen::Lower;
+
67  using Eigen::Matrix;
+ + + + + + + + +
76 
+
77 
+ +
79  = W.rows();
+
80  typename promote_args<T_y, T_dof, T_scale>::type lp(0.0);
+
81  check_greater(function, "Degrees of freedom parameter", nu, k-1);
+
82  check_square(function, "random variable", W);
+
83  check_square(function, "scale parameter", S);
+
84  check_size_match(function,
+
85  "Rows of random variable", W.rows(),
+
86  "columns of scale parameter", S.rows());
+
87  // FIXME: domain checks
+
88 
+ +
90  if (!check_ldlt_factor(function, "LDLT_Factor of random variable",
+
91  ldlt_W))
+
92  return lp;
+
93 
+ +
95  if (!check_ldlt_factor(function, "LDLT_Factor of scale parameter",
+
96  ldlt_S))
+
97  return lp;
+
98 
+
99  using stan::math::trace;
+
100  using stan::math::lmgamma;
+ +
102  lp += nu * k * NEG_LOG_TWO_OVER_TWO;
+
103 
+ +
105  lp -= lmgamma(k, 0.5 * nu);
+
106 
+ +
108  lp -= 0.5 * nu * log_determinant_ldlt(ldlt_S);
+
109 
+ +
111  Matrix<typename promote_args<T_y, T_scale>::type, Dynamic, Dynamic>
+
112  Sinv_W(mdivide_left_ldlt
+
113  (ldlt_S,
+
114  static_cast<Matrix<T_y, Dynamic, Dynamic> >
+
115  (W.template selfadjointView<Lower>())));
+
116  lp -= 0.5 * trace(Sinv_W);
+
117  }
+
118 
+
119  if (include_summand<propto, T_y, T_dof>::value && nu != (k + 1))
+
120  lp += 0.5 * (nu - k - 1.0) * log_determinant_ldlt(ldlt_W);
+
121  return lp;
+
122  }
+
123 
+
124  template <typename T_y, typename T_dof, typename T_scale>
+
125  inline
+
126  typename boost::math::tools::promote_args<T_y, T_dof, T_scale>::type
+
127  wishart_log(const Eigen::Matrix<T_y, Eigen::Dynamic, Eigen::Dynamic>& W,
+
128  const T_dof& nu,
+
129  const Eigen::Matrix
+
130  <T_scale, Eigen::Dynamic, Eigen::Dynamic>& S) {
+
131  return wishart_log<false>(W, nu, S);
+
132  }
+
133 
+
134  }
+
135 
+
136 }
+
137 #endif
+ + + +
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
+
boost::math::tools::promote_args< T_y, T_dof, T_scale >::type wishart_log(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &W, const T_dof &nu, const Eigen::Matrix< T_scale, Eigen::Dynamic, Eigen::Dynamic > &S)
The log of the Wishart density for the given W, degrees of freedom, and scale matrix.
Definition: wishart_log.hpp:58
+ + + + + +
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:19
+ + +
Eigen::Matrix< fvar< T2 >, R1, C2 > mdivide_left_ldlt(const stan::math::LDLT_factor< double, R1, C1 > &A, const Eigen::Matrix< fvar< T2 >, R2, C2 > &b)
Returns the solution of the system Ax=b given an LDLT_factor of A.
+
bool check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Return true if the provided sizes match.
+ + + +
T trace(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
Returns the trace of the specified matrix.
Definition: trace.hpp:20
+
const double NEG_LOG_TWO_OVER_TWO
Definition: constants.hpp:191
+ +
T log_determinant_ldlt(stan::math::LDLT_factor< T, R, C > &A)
+
fvar< typename stan::return_type< T, int >::type > lmgamma(int x1, const fvar< T > &x2)
Definition: lmgamma.hpp:16
+
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ +
bool check_greater(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is strictly greater than low.
+
bool check_ldlt_factor(const char *function, const char *name, stan::math::LDLT_factor< T, R, C > &A)
Return true if the argument is a valid stan::math::LDLT_factor.
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/wishart__rng_8hpp.html b/doc/api/html/wishart__rng_8hpp.html new file mode 100644 index 00000000000..74f1b7d8a69 --- /dev/null +++ b/doc/api/html/wishart__rng_8hpp.html @@ -0,0 +1,147 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/wishart_rng.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
wishart_rng.hpp File Reference
+
+ +
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doc/api/html/wishart__rng_8hpp_source.html b/doc/api/html/wishart__rng_8hpp_source.html new file mode 100644 index 00000000000..323513f9fc6 --- /dev/null +++ b/doc/api/html/wishart__rng_8hpp_source.html @@ -0,0 +1,195 @@ + + + + + + +Stan Math Library: stan/math/prim/mat/prob/wishart_rng.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
Stan Math Library +  2.8.0 +
+
reverse mode automatic differentiation
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
wishart_rng.hpp
+
+
+Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_WISHART_RNG_HPP
+
2 #define STAN_MATH_PRIM_MAT_PROB_WISHART_RNG_HPP
+
3 
+ + + + + + + + + + + + + + + + + + +
22 
+
23 namespace stan {
+
24 
+
25  namespace math {
+
26 
+
27  template <class RNG>
+
28  inline Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>
+
29  wishart_rng(const double nu,
+
30  const Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>& S,
+
31  RNG& rng) {
+
32  using Eigen::MatrixXd;
+ + + + +
37 
+
38  static const char* function("stan::math::wishart_rng");
+
39 
+
40  typename index_type<MatrixXd>::type k = S.rows();
+
41 
+
42  check_positive(function, "degrees of freedom", nu);
+
43  check_square(function, "scale parameter", S);
+
44 
+
45  MatrixXd B = MatrixXd::Zero(k, k);
+
46 
+
47  for (int j = 0; j < k; ++j) {
+
48  for (int i = 0; i < j; ++i)
+
49  B(i, j) = normal_rng(0, 1, rng);
+
50  B(j, j) = std::sqrt(chi_square_rng(nu - j, rng));
+
51  }
+
52 
+
53  return stan::math::crossprod(B * S.llt().matrixU());
+
54  }
+
55 
+
56 
+
57  }
+
58 
+
59 }
+
60 #endif
+
double chi_square_rng(const double nu, RNG &rng)
+ +
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
+ + + + + + + + +
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:19
+
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > wishart_rng(const double nu, const Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > &S, RNG &rng)
Definition: wishart_rng.hpp:29
+ +
Eigen::Matrix< fvar< T >, C, C > crossprod(const Eigen::Matrix< fvar< T >, R, C > &m)
Definition: crossprod.hpp:17
+
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
+
bool check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Return true if the provided sizes match.
+ + + + + +
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
+ +
double normal_rng(const double mu, const double sigma, RNG &rng)
Definition: normal_rng.hpp:20
+ + +
+
+
+ +      + [ Stan Home Page ] + + + © 2011–2015, + Stan Development Team. +      + + +
diff --git a/doxygen/doxygen.cfg b/doxygen/doxygen.cfg index a06c884db83..7f093fa3e8b 100644 --- a/doxygen/doxygen.cfg +++ b/doxygen/doxygen.cfg @@ -38,7 +38,7 @@ PROJECT_NAME = "Stan Math Library" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 2.7.0 +PROJECT_NUMBER = 2.8.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/stan/math/version.hpp b/stan/math/version.hpp index 8e21a4da4c8..d8f16de6d0f 100644 --- a/stan/math/version.hpp +++ b/stan/math/version.hpp @@ -12,7 +12,7 @@ #endif #define STAN_MATH_MAJOR 2 -#define STAN_MATH_MINOR 7 +#define STAN_MATH_MINOR 8 #define STAN_MATH_PATCH 0 namespace stan {