Automatic Differentiation
 
Loading...
Searching...
No Matches
array_builder.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_FUN_ARRAY_BUILDER_HPP
2#define STAN_MATH_PRIM_FUN_ARRAY_BUILDER_HPP
3
6#include <vector>
7
8namespace stan {
9namespace math {
10
19template <typename T>
21 private:
22 std::vector<T> x_;
23
24 public:
29
36 template <typename S>
37 array_builder& add(const S& u) {
39 return *this;
40 }
41
47 std::vector<T> array() { return x_; }
48};
49
50} // namespace math
51} // namespace stan
52#endif
std::vector< T > array()
Getter method to return array itself.
array_builder()
Construct an array_builder.
array_builder & add(const S &u)
Add one element of type S to array, promoting to type T.
Structure for building up arrays in an expression (rather than in statements) using an argument-chain...
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Struct with static function for elementwise type promotion.