![]() |
Stan Math Library
5.1.0
Automatic Differentiation
|
A structure to serialize structures to an internal stored sequence of scalars.
| T | underlying scalar type |
Definition at line 181 of file serializer.hpp.
#include <serializer.hpp>
Public Types | |
| typedef T | scalar_t |
| Scalar type of serializer. | |
Public Member Functions | |
| serializer () | |
| Construct a serializer. | |
| template<typename U , require_stan_scalar_t< U > * = nullptr> | |
| void | write (const U &x) |
| Serialize the specified scalar. | |
| template<typename U > | |
| void | write (const std::complex< U > &x) |
| Serialize the specified complex number. | |
| template<typename U > | |
| void | write (const std::vector< U > &x) |
| Serialize the specified standard vector. | |
| template<typename U , require_eigen_t< U > * = nullptr> | |
| void | write (const U &x) |
| Serialize the specified Eigen container. | |
| const std::vector< T > & | array_vals () |
| Return the serialized values as a standard vector. | |
| const Eigen::Matrix< T, -1, 1 > & | vector_vals () |
| Return the serialized values as an Eigen vector. | |
Public Attributes | |
| std::vector< T > | vals_ |
| Container for serialized values. | |