Skip to contentSkip to Content
DocsAPI ReferenceOverview

API Reference

Complete reference for the SPIRES C API defined in spires.h. All public symbols are listed below, grouped by category.


Status Codes

SymbolDescription
spires_statusReturn code enum used by most API functions.

Enums

SymbolDescription
spires_connectivity_typeNetwork topology selector (random, small-world, scale-free).
spires_neuron_typeNeuron model selector (LIF variants and fractional-order models).

Configuration

SymbolDescription
spires_reservoir_configStruct that fully specifies a reservoir before creation.

Lifecycle

SymbolDescription
spires_reservoir_createAllocate and initialize a reservoir from a configuration struct.
spires_reservoir_destroyFree all memory associated with a reservoir.
spires_reservoir_resetReset neuron states to zero without reallocating.

Stepping

SymbolDescription
spires_stepAdvance the reservoir by one timestep given an input vector.
spires_runDrive the reservoir with an entire input time series.

Training

SymbolDescription
spires_train_ridgeBatch-train output weights via ridge regression.
spires_train_onlineUpdate output weights with one online learning step.

State Access

SymbolDescription
spires_copy_reservoir_stateReturn a heap-allocated copy of the current neuron state vector.
spires_read_reservoir_stateCopy the current neuron state into a caller-provided buffer.
spires_compute_outputCompute the readout output from the current reservoir state.

Introspection

SymbolDescription
spires_num_neuronsReturn the number of neurons in the reservoir.
spires_num_inputsReturn the number of input channels.
spires_num_outputsReturn the number of output channels.

Optimizer

SymbolDescription
spires_optimizeRun the AGILE hyperparameter optimizer over a data set.
spires_opt_budgetStruct defining a single budget stage for the optimizer.
spires_opt_scoreStruct controlling the scoring metric and regularization.
spires_opt_resultStruct returned by the optimizer containing the best configuration found.
Last updated on