Skip to contentSkip to Content

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;
ValueIntegerDescription
SPIRES_CONN_RANDOM0Erdos-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_WORLD1Watts-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_FREE2Barabasi-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;
ValueIntegerDescription
SPIRES_NEURON_LIF_DISCRETE0Discrete-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_BIO1Biophysical 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_CAPUTO2Fractional-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_GL3Fractional-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_DIFFUSIVE4Fractional-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_RANDOM and SPIRES_NEURON_LIF_DISCRETE by default.
  • Passing an out-of-range enum value to spires_reservoir_create returns SPIRES_ERR_INVALID_ARG.
  • The fractional neuron models (FLIF_CAPUTO, FLIF_GL, FLIF_DIFFUSIVE) all require neuron_params to be non-NULL and to contain at least the fractional order alpha. When alpha = 1.0, they reduce to standard integer-order LIF dynamics.

See Also

Last updated on