Stan Math Library
5.0.0
Automatic Differentiation
|
StdVectorBuilder allocates type T1 values to be used as intermediate values.
If any of T2 to T7 have the type std::vector<T>, the data function will return a std::vector<T1> as output.
If none of T2 to T7 have type std::vector<T>, the data function will return a T1 as output.
Whichever case is true, StdVectorBuilder presents a consistent vector-like interface (through stan::math::size() and operator[](int i)) for constructing the output
The difference between this and VectorBuilder is that VectorBuilder counts Eigen::Matrix<T, Dynamic, 1> and Eigen::Matrix<T, 1, Dynamic> types as vectors.
used | boolean variable indicating whether this instance is used. If this is false, there is no storage allocated and operator[] throws a std::logic_error. |
T1 | Type of vector to build |
Definition at line 35 of file StdVectorBuilder.hpp.
#include <StdVectorBuilder.hpp>
Public Types | |
using | type = typename helper::type |
Public Member Functions | |
StdVectorBuilder (size_t n) | |
T1 & | operator[] (size_t i) |
type | data () |
Public Attributes | |
helper | a |
Private Types | |
using | helper = VectorBuilderHelper< T1, used, contains_std_vector< T2, T3, T4, T5, T6, T7 >::value > |