Enums
SPIRES defines two enums used as fields in spires_reservoir_config to select the network topology and neuron dynamics model.
spires_connectivity_type
Selects the algorithm used to generate the reservoir’s internal weight matrix.
typedef enum {
SPIRES_CONN_RANDOM = 0,
SPIRES_CONN_SMALL_WORLD,
SPIRES_CONN_SCALE_FREE
} spires_connectivity_type;| Value | Integer | Description |
|---|---|---|
SPIRES_CONN_RANDOM | 0 | Erdos-Renyi random graph. Each pair of neurons is connected independently with probability equal to the connectivity field. This is the default and the most common choice in reservoir computing literature. |
SPIRES_CONN_SMALL_WORLD | 1 | Watts-Strogatz small-world network. Starts from a ring lattice and rewires edges with probability derived from connectivity. Produces graphs with high clustering and short average path length. |
SPIRES_CONN_SCALE_FREE | 2 | Barabasi-Albert scale-free network. Grown via preferential attachment, producing a power-law degree distribution. The connectivity field controls the number of edges added per new node. |
spires_neuron_type
Selects the spiking neuron model used inside the reservoir.
typedef enum {
SPIRES_NEURON_LIF_DISCRETE = 0,
SPIRES_NEURON_LIF_BIO,
SPIRES_NEURON_FLIF_CAPUTO,
SPIRES_NEURON_FLIF_GL,
SPIRES_NEURON_FLIF_DIFFUSIVE
} spires_neuron_type;| Value | Integer | Description |
|---|---|---|
SPIRES_NEURON_LIF_DISCRETE | 0 | Discrete-time leaky integrate-and-fire. A simple, fast model where membrane potential decays by a fixed leak factor each timestep. Requires no neuron_params. |
SPIRES_NEURON_LIF_BIO | 1 | Biophysical leaky integrate-and-fire. Continuous-time LIF integrated with timestep dt. Uses biologically motivated parameters for membrane time constant, resting potential, threshold, and reset potential. See neuron_params in spires_reservoir_config for the expected parameter layout. |
SPIRES_NEURON_FLIF_CAPUTO | 2 | Fractional-order LIF using the Caputo derivative. Introduces memory via a fractional exponent alpha in (0, 1]. The neuron_params array must include the fractional order as its first element. |
SPIRES_NEURON_FLIF_GL | 3 | Fractional-order LIF using the Grunwald-Letnikov discrete approximation. Numerically efficient for long time series. The neuron_params array must include the fractional order as its first element. |
SPIRES_NEURON_FLIF_DIFFUSIVE | 4 | Fractional-order LIF using the diffusive (kernel) representation. Approximates the fractional derivative with a sum of exponentials, offering tunable accuracy-speed tradeoffs. The neuron_params array must include the fractional order as its first element. |
Notes
- Both enums start at 0, so zero-initialized config structs select
SPIRES_CONN_RANDOMandSPIRES_NEURON_LIF_DISCRETEby default. - Passing an out-of-range enum value to
spires_reservoir_createreturnsSPIRES_ERR_INVALID_ARG. - The fractional neuron models (
FLIF_CAPUTO,FLIF_GL,FLIF_DIFFUSIVE) all requireneuron_paramsto be non-NULLand to contain at least the fractional order alpha. When alpha = 1.0, they reduce to standard integer-order LIF dynamics.
See Also
- Configuration — struct that uses these enums.
- Neuron Models — detailed discussion of each neuron model.
- Network Topologies — detailed discussion of each connectivity type.
Last updated on