19#include "Eigen/Sparse"
20#include "nlohmann/json.hpp"
34 void to_json(
const HybZono& Z,
const std::string& filename);
45 std::unique_ptr<HybZono>
from_json(
const std::string& filename);
49 void sparse_to_json(
const Eigen::SparseMatrix<zono_float>& mat, nlohmann::json& j);
50 Eigen::SparseMatrix<zono_float> json_to_sparse(
const nlohmann::json& j);
51 Eigen::Vector<
zono_float, -1> std_2_eigen(
const std::vector<zono_float>& vec);
52 std::vector<zono_float> eigen_2_std(
const Eigen::Vector<zono_float, -1>& vec);
Hybrid zonotope class for ZonoOpt library.
#define zono_float
Defines the floating-point type used in ZonoOpt.
Definition Defines.hpp:22
std::unique_ptr< HybZono > from_json(const std::string &filename)
Read a HybZono object from a JSON file.
Definition ZonoJson.cpp:71
void to_json(const HybZono &Z, const std::string &filename)
Write a HybZono object to a JSON file.
Definition ZonoJson.cpp:23
Definition ZonoOpt.hpp:51