| Stan Math Library 2.12.0 reverse mode automatic differentiation

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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
4 #include <stan/math/prim/scal/meta/VectorBuilderHelper.hpp>
5 #include <stan/math/prim/scal/meta/contains_vector.hpp>
6
7 namespace stan {
8
25 template<bool used, typename T1, typename T2, typename T3 = double,
26 typename T4 = double, typename T5 = double, typename T6 = double,
27 typename T7 = double>
28 class VectorBuilder {
29 public:
30 VectorBuilderHelper<T1, used,
31 contains_vector<T2, T3, T4, T5, T6, T7>::value> a;
32
33 explicit VectorBuilder(size_t n) : a(n) { }
34
35 T1& operator[](size_t i) {
36 return a[i];
37 }
38
39 inline typename
40 VectorBuilderHelper<T1, used,
41 contains_vector<T2, T3, T4, T5, T6, T7>::value>::type
42 data() {
43 return a.data();
44 }
45 };
46
47 }
48 #endif
stan::VectorBuilder::a
VectorBuilderHelper< T1, used, contains_vector< T2, T3, T4, T5, T6, T7 >::value > a
Definition: VectorBuilder.hpp:31
stan
Definition: log_sum_exp.hpp:8
VectorBuilderHelper.hpp
stan::VectorBuilderHelper
VectorBuilder allocates type T1 values to be used as intermediate values.
Definition: VectorBuilderHelper.hpp:25
contains_vector.hpp
stan::VectorBuilder::operator[]
T1 & operator[](size_t i)
Definition: VectorBuilder.hpp:35
stan::VectorBuilder
VectorBuilder allocates type T1 values to be used as intermediate values.
Definition: VectorBuilder.hpp:28
stan::contains_vector
Definition: contains_vector.hpp:14
stan::VectorBuilder::VectorBuilder
VectorBuilder(size_t n)
Definition: VectorBuilder.hpp:33
stan::VectorBuilder::data
VectorBuilderHelper< T1, used, contains_vector< T2, T3, T4, T5, T6, T7 >::value >::type data()
Definition: VectorBuilder.hpp:42

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