| Stan Math Library 2.11.0 reverse mode automatic differentiation

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

VectorBuilderHelper.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_ARR_META_VECTORBUILDER_HELPER_HPP
2 #define STAN_MATH_PRIM_ARR_META_VECTORBUILDER_HELPER_HPP
3
4 #include <stan/math/prim/scal/meta/VectorBuilderHelper.hpp>
5 #include <stdexcept>
6 #include <vector>
7
8 namespace stan {
9
13 template<typename T1>
14 class VectorBuilderHelper<T1, true, true> {
15 private:
16 std::vector<T1> x_;
17 public:
18 explicit VectorBuilderHelper(size_t n) : x_(n) { }
19
20 typedef std::vector<T1> type;
21
22 T1& operator[](size_t i) {
23 return x_[i];
24 }
25
26 inline type& data() {
27 return x_;
28 }
29 };
30 }
31 #endif
stan::VectorBuilderHelper< T1, true, true >::operator[]
T1 & operator[](size_t i)
Definition: VectorBuilderHelper.hpp:22
stan
Definition: log_sum_exp.hpp:8
stan::VectorBuilderHelper< T1, true, true >::type
std::vector< T1 > type
Definition: VectorBuilderHelper.hpp:20
VectorBuilderHelper.hpp
stan::VectorBuilderHelper
VectorBuilder allocates type T1 values to be used as intermediate values.
Definition: VectorBuilderHelper.hpp:25
stan::VectorBuilderHelper< T1, true, true >::VectorBuilderHelper
VectorBuilderHelper(size_t n)
Definition: VectorBuilderHelper.hpp:18
stan::VectorBuilderHelper< T1, true, true >::data
type & data()
Definition: VectorBuilderHelper.hpp:26

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