12 namespace alps {
namespace alea {
namespace internal {
87 namespace alps {
namespace alea {
101 std::complex<double> value) {
105 template <
typename Derived>
107 const Eigen::MatrixBase<Derived> &value)
109 typedef Eigen::internal::traits<Derived>
traits;
110 typedef typename traits::Scalar scalar_type;
111 typedef Eigen::Matrix<scalar_type, Derived::RowsAtCompileTime,
112 Derived::ColsAtCompileTime> plain_matrix_type;
115 if ((Derived::MaxRowsAtCompileTime != Eigen::Dynamic
116 && Derived::MaxRowsAtCompileTime != value.rows())
117 || (Derived::MaxColsAtCompileTime != Eigen::Dynamic
118 && Derived::MaxColsAtCompileTime != value.cols())
119 || ((Derived::Options & Eigen::RowMajor)
120 && value.rows() != 1 && value.cols() != 1))
121 serialize(ser, key, plain_matrix_type(value));
124 auto temp = value.eval();
126 if (Derived::ColsAtCompileTime == 1 || Derived::RowsAtCompileTime == 1) {
128 std::array<size_t, 1> dims = {{(size_t)temp.size()}};
132 std::array<size_t, 2> dims = {{(size_t)temp.cols(), (size_t)temp.rows()}};
150 std::complex<double> &value) {
154 template <
typename T>
156 Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> &value)
158 std::array<size_t, 2> shape = {{(size_t)value.cols(), (size_t)value.rows()}};
159 ser.
read(key,
ndview<T>(value.data(), shape.data(), shape.size()));
162 template <
typename T>
164 Eigen::Matrix<T, Eigen::Dynamic, 1> &value)
166 std::array<size_t, 1> shape = {{(size_t)value.rows()}};
167 ser.
read(key,
ndview<T>(value.data(), shape.data(), shape.size()));
170 template <
typename T>
172 Eigen::Matrix<T, 1, Eigen::Dynamic> &value)
174 std::array<size_t, 1> shape = {{(size_t)value.cols()}};
175 ser.
read(key,
ndview<T>(value.data(), shape.data(), shape.size()));
deserializer_sentry(deserializer &ser, const std::string &group)
void deserialize(deserializer &, const std::string &, autocorr_result< T > &)
serializer_sentry(serializer &ser, const std::string &group)
void serialize(serializer &, const std::string &, const autocorr_result< T > &)
virtual void read(const std::string &key, ndview< double >)=0
T scalar_deserialize(deserializer &ser, const std::string &key)
void scalar_serialize(serializer &ser, const std::string &key, T value)
virtual void write(const std::string &key, ndview< const double >)=0
virtual void enter(const std::string &group)=0