Automatic Differentiation
 
Loading...
Searching...
No Matches
stan::StdVectorBuilder< used, T1, T2, T3, T4, T5, T6, T7 > Class Template Reference

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::StdVectorBuilder< used, T1, T2, T3, T4, T5, T6, T7 >

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.

Template Parameters
usedboolean variable indicating whether this instance is used. If this is false, there is no storage allocated and operator[] throws a std::logic_error.
T1Type 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 >
 

The documentation for this class was generated from the following file: