1#ifndef ZONOOPT_ZONO_JSON_HPP__
2#define ZONOOPT_ZONO_JSON_HPP__
18#include "nlohmann/json.hpp"
31 void to_json(
const HybZono& Z,
const std::string& filename);
42 std::unique_ptr<HybZono>
from_json(
const std::string& filename);
46 void sparse_to_json(
const Eigen::SparseMatrix<zono_float>& mat, nlohmann::json& j);
47 Eigen::SparseMatrix<zono_float> json_to_sparse(
const nlohmann::json& j);
48 Eigen::Vector<
zono_float, -1> std_2_eigen(
const std::vector<zono_float>& vec);
49 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 ZonoOpt.hpp:45
std::unique_ptr< HybZono > from_json(const std::string &filename)
Read a HybZono object from a JSON file.
Definition ZonoJson.cpp:56
void to_json(const HybZono &Z, const std::string &filename)
Write a HybZono object to a JSON file.
Definition ZonoJson.cpp:8
Definition ZonoOpt.hpp:58