Reconstruct ComputeData type from double vector and structure info.
257 {
258 if constexpr (std::is_same_v<T, std::vector<std::vector<double>>>) {
259 return double_data;
260 } else if constexpr (std::is_same_v<T, Eigen::MatrixXd>) {
262 } else if constexpr (std::is_same_v<T, std::vector<Kakshya::DataVariant>>) {
263 std::vector<Kakshya::DataVariant> variants;
264 variants.reserve(double_data.size());
265 for (const auto& vec : double_data) {
266 variants.emplace_back(vec);
267 }
268 return variants;
269 } else if constexpr (std::is_same_v<T, Kakshya::DataVariant>) {
270 auto data = Kakshya::interleave_channels<double>(double_data);
272 } else {
273 throw std::runtime_error("Reconstruction not implemented for target type");
274 }
275 }
static Kakshya::DataVariant reconstruct_data_variant_from_double(const std::vector< double > &double_data, const DataStructureInfo &structure_info)
Reconstruct DataVariant from double data and structure info.
static Eigen::MatrixXd recreate_eigen_matrix(const std::vector< std::vector< double > > &columns, const DataStructureInfo &structure_info)
Infer data structure from ComputeData type.