![]() |
Stan Math Library
2.12.0
reverse mode automatic differentiation
|
VectorViewMvt is a template expression that wraps either an Eigen::Matrix or a std::vector<Eigen::Matrix> and allows the template expression to be used as an array using operator[]
.
More...
#include <VectorViewMvt.hpp>
Public Types | |
typedef scalar_type_pre< T >::type | matrix_t |
Public Member Functions | |
VectorViewMvt (matrix_t &m) | |
Constructor. More... | |
VectorViewMvt (std::vector< matrix_t > &vm) | |
Constructor. More... | |
matrix_t & | operator[] (int i) |
Allows the structure to be accessed like an array. More... | |
VectorViewMvt is a template expression that wraps either an Eigen::Matrix or a std::vector<Eigen::Matrix> and allows the template expression to be used as an array using operator[]
.
T | Type of scalar of the matrix being wrapped. |
is_array | True if underlying type T can be indexed with operator[]. |
throw_if_accessed | True if the behavior is to throw an exception whenever operator[] is called. |
Definition at line 29 of file VectorViewMvt.hpp.
typedef scalar_type_pre<T>::type stan::VectorViewMvt< T, is_array, throw_if_accessed >::matrix_t |
Definition at line 31 of file VectorViewMvt.hpp.
|
inlineexplicit |
Constructor.
Definition at line 36 of file VectorViewMvt.hpp.
|
inlineexplicit |
Constructor.
Definition at line 41 of file VectorViewMvt.hpp.
|
inline |
Allows the structure to be accessed like an array.
If is_array is false, this will return the matrix it was constructed with. If is_array is true, This does not check bounds and will likely segfault if the index is out of range.
i | index. Only used if access is true. |
std::out_of_range | if the template parameter, throw_if_accessed, is true. |
Definition at line 54 of file VectorViewMvt.hpp.