Automatic Differentiation
 
Loading...
Searching...
No Matches
stan::math::serializer< T > Struct Template Reference

Detailed Description

template<typename T>
struct stan::math::serializer< T >

A structure to serialize structures to an internal stored sequence of scalars.

Template Parameters
Tunderlying 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.
 

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