69 std::string
name()
const override;
163 const std::string &
name,
const std::vector<Real> ¶meters);
219 template <
typename T>
238 for (
size_t i = 0; i < mat.
rows(); i++) {
239 std::vector<Real> rows(mat.
cols());
240 for (
size_t k = 0; k < mat.
cols(); k++) {
251 template <
typename T>
262 size_t rows = j.size();
266 size_t cols = j[0].size();
268 for (
size_t i = 0; i < rows; i++) {
269 for (
size_t k = 0; k < cols; k++) {
270 mat(i, k) = T(j[i][k]);
static void hom_rec_to_json(const PopulationBase &pop, Json &json)
Takes a Json object created by pop_to_json and adds information about record flags, assumes record flags are homogeneous.
void to_json(Json &j, const Network &netw)
Automatic conversion of a Network object to JSON. Now you can uses Json(network) as you would do with...
Definition: backend.hpp:50
static Json connector_to_json(const ConnectionDescriptor &conn)
Converts the information of a ConnectionDescriptor to a JSON object. List connectors and dynamic conn...
static Json pop_to_json(const PopulationBase &pop)
Creates a Json containing information about a population.
void from_json(const Json &j, Network &netw)
With the method you can just use Network netw = json.get<Network>() as you can do with STL containers...
double Real
Definition: types.hpp:56
std::string m_path
Definition: to_json.hpp:41
static void create_conn_from_json(const Json &con_json, Network &netw)
Uses the information in JSON to create a single Connection.
static void read_recordings_from_json(const Json &pop_data, NetworkBase &netw)
Reads recorded signal from a json object, puts data into network object.
nlohmann::json Json
Definition: json.hpp:27
static std::vector< bool > inhom_rec_single(const PopulationBase &pop, size_t index)
returns a vector encoding recording flags for a single recording signal and inhomogeneous record flag...
Definition: network_base.hpp:75
ToJson(const std::string &simulator, const Json &setup=Json())
Definition: matrix.hpp:51
size_t rows() const
Definition: matrix.hpp:339
size_t cols() const
Definition: matrix.hpp:344
Json output_json(NetworkBase &network, Real duration) const
Definition: network_base.hpp:116
std::string m_simulator
Definition: to_json.hpp:36
void read_json(Json &result, NetworkBase &network) const
Definition: network_base_objects.hpp:53
static Json pop_vec_to_json(const std::vector< PopulationBase > &pops)
Creates an array of populations in return json, which contains all information of all populations...
std::string m_json_path
Definition: to_json.hpp:41
static std::shared_ptr< SynapseBase > get_synapse(const std::string &name, const std::vector< Real > ¶meters)
Create the synapse for a connection dependent on the name.
Definition: to_json.hpp:34
Definition: network.hpp:349
Definition: brainscales_lib.hpp:39
Json m_setup
Definition: to_json.hpp:37
static NetworkBase network_from_json(std::string path)
Uses the data in a JSON object to create a full network.
void do_run(NetworkBase &network, Real duration) const override
static void create_pop_from_json(const Json &pop_json, Network &netw)
Uses data in JSon to create populations and set record flags.
std::unordered_set< const NeuronType * > supported_neuron_types() const override
static void learned_weights_from_json(const Json &json, NetworkBase netw)
static Json recs_to_json(const PopulationBase &pop)
Converts all recorded data of a population to json.
Definition: connector.hpp:705
bool m_no_output
Definition: to_json.hpp:39
std::string name() const override
static Json inhom_rec_to_json(const PopulationBase &pop)
returns a json encoding all records for a single population. Json[<signal>] will return a vector of b...
bool m_save_json
Definition: to_json.hpp:38