Skip to contentSkip to Content

spires_num_outputs

Return the number of output channels for the reservoir.


Signature

size_t spires_num_outputs(const spires_reservoir *r);

Parameters

ParameterTypeDescription
rconst spires_reservoir *Handle to the reservoir. Must not be NULL.

Returns

size_t — The number of output channels, equal to the num_outputs field of the spires_reservoir_config used at creation time. This is the required buffer size for spires_compute_output and the width of the target matrix passed to spires_train_ridge.


Example

size_t no = spires_num_outputs(r); double *y = malloc(no * sizeof(double)); spires_compute_output(r, y); for (size_t k = 0; k < no; k++) { printf("y[%zu] = %.6f\n", k, y[k]); } free(y);

Notes

  • Const-qualified. This function takes a const pointer and does not modify the reservoir. It is safe to call concurrently with other read-only functions.
  • Immutable. The return value is fixed at creation time and never changes for the lifetime of the reservoir.

See Also

Last updated on