The package is the Base package of SpikingNeuralNetworks.jl. It contains model types and core functionalities for the SpikingNeuralNetworks.jl ecosystem.
The package defines models and parameters for Population, Connection, and Stimulus:
Population <: AbstractPopulationConnection <: AbstractConnectionStimulus <: AbstractStimulusPopulationParameter <: AbstractPopulationParameterConnectionParameter <: AbstractConnectionParameterStimulusParameter <: AbstractStimulusParameterSpikeTimes = Vector{Vector{Float32}}.
Populations, connections, and stimuli are defined under the respective folders in src
Under src/utils, the package defines macros and functions that support the functionalities of the SpikingNeuralNetwork.jl ecosystem:
struct.jldefines the abstract model types.main.jldefines thesim!andtrain!functions that run the network simulations.io.jldefines functions to save and load models using.jld2format.record.jlimplements the recording ofthe model's variables during simulation time.macros.jlimplements useful macros to define model types and update parameter structs.spatial.jldefines functions to create spatial network arrangements.unit.jldefines convenient shortcut for cgm unit system.util.jladd functions to manipulate sparse matrix representations.
The library leverages Julia multidispatching to run models of types <: AbstractPopulation,
<: AbstractConnection, and AbstractStimulus.
function sim!(p::Vector{AbstractPopulation}, c::Vector{AbstractConnection}, duration<:Real) end
function train!(p::Vector{AbstractConnection}, c:Vector{AbstractConnection}, duration<:Real) endThe functions support simulation with and without neural plasticity; the model is defined within the arguments passed to the functions. Models are composed of 'AbstractPopulation' and 'AbstractConnection' arrays.
Any elements of AbstractPopulation must implement the methods:
function integrate!(p, p.param, dt) end
function plasticity!(p, p.param, dt, T) end
AbstractConnection must implement the methods:
function forward!(p, p.param) end
function plasticity!(c, c.param, dt) endAbstractStimulus must implement the methods:
function stimulate!(p, p.param) end