Reconstruct ComputeData type from double vector and structure info.
256 {
257 if constexpr (std::is_same_v<T, std::vector<std::vector<double>>>) {
258 return double_data;
259 } else if constexpr (std::is_same_v<T, Eigen::MatrixXd>) {
261 } else if constexpr (std::is_same_v<T, std::vector<Kakshya::DataVariant>>) {
262 std::vector<Kakshya::DataVariant> variants;
263 variants.reserve(double_data.size());
264 for (const auto& vec : double_data) {
265 variants.emplace_back(vec);
266 }
267 return variants;
268 } else if constexpr (std::is_same_v<T, Kakshya::DataVariant>) {
269 auto data = Kakshya::interleave_channels<double>(double_data);
271 } else {
272 throw std::runtime_error("Reconstruction not implemented for target type");
273 }
274 }
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.