Skip to content
Snippets Groups Projects
Unverified Commit 07e0bb62 authored by Thorsten Hater's avatar Thorsten Hater Committed by GitHub
Browse files

Mutable connection table (#1919)

Add functionality, docs, and examples on editing the connection table.  This is a first, small PR
on the topic, further functionality will come as requested.

Teaser example
```cxx
    // This recipe -- omitted -- implements a mutable connection table 
    // and returns it via the `connections_on` callback. New entries are
    // added using `add_connection` which makes one link from a central 
    // `spike_source_cell` to the given `gid`
    auto rec = recipe();
    rec.add_connection(1);

    auto sim = arb::simulation(rec, ctx);

    // Record spikes
    std::vector<arb::spike> spikes;
    sim.set_local_spike_callback([&spikes](const auto& s) { spikes.insert(spikes.end(), s.begin(), s.end()); });

    // Run and print all spikes per gid
    sim.run(0.25, 0.025);
    show_spikes(spikes);

    // Add a new connection
    rec.add_connection(2);
    sim.update_connections(rec);

    // Run and print all spikes per gid
    sim.run(0.5, 0.025);
    show_spikes(spikes);
```

# Update July '22

- added re-wiring of Event Generators
- implemented a split between a recipe and a recipe-update (cheekily dubbed `topping` until further notice)
- `recipes` are `toppings` via inheritance
parent 0644cf87
No related branches found
No related tags found
Showing
with 329 additions and 208 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment