fpmas 1.5
Static Public Member Functions | List of all members
nlohmann::adl_serializer< fpmas::api::model::Model > Struct Reference

#include <model.h>

Static Public Member Functions

static void to_json (json &j, const fpmas::api::model::Model &model)
 
static void from_json (const json &j, fpmas::api::model::Model &model)
 

Detailed Description

Model JSON serialization rules.

Member Function Documentation

◆ to_json()

void nlohmann::adl_serializer< fpmas::api::model::Model >::to_json ( json &  j,
const fpmas::api::model::Model model 
)
static

Serializes the specified model to the json j.

The complete underlying DistributedGraph is dumped in the json, as long as the current Runtime status.

Parameters
jjson output
modelModel to serialize
See also
nlohmann::adl_serializer<fpmas::api::graph::DistributedGraph<T>>::to_json()

◆ from_json()

void nlohmann::adl_serializer< fpmas::api::model::Model >::from_json ( const json &  j,
fpmas::api::model::Model model 
)
static

Loads data from the input json to the specified model.

The DistributedGraph contained in j is loaded into model.graph(), and the model.runtime() current date is set to the value saved in the json.

Parameters
jinput json
modelModel in which data from j will be loaded
See also
nlohmann::adl_serializer<fpmas::api::graph::DistributedGraph<T>>::from_json()

The documentation for this struct was generated from the following files: