Eliminate data duplication between inputs and connections arrays.
The connection information is currently duplicated between the neuron's inputs array and the global connections array, which could lead to data inconsistency and maintenance issues. Consider keeping connection information in only one place.
Consider one of these approaches:
Remove the inputs arrays and compute them dynamically from the connections array when loading the network
Remove the connections array and derive it from the neurons' inputs arrays
Use references/IDs in the inputs array that point to the corresponding connection in the connections array
Eliminate data duplication between inputs and connections arrays.
The connection information is currently duplicated between the neuron's
inputs
array and the globalconnections
array, which could lead to data inconsistency and maintenance issues. Consider keeping connection information in only one place.Consider one of these approaches:
inputs
arrays and compute them dynamically from theconnections
array when loading the networkconnections
array and derive it from the neurons'inputs
arraysinputs
array that point to the corresponding connection in theconnections
arrayAlso applies to: 26-33, 37-48
_Originally posted by @coderabbitai[bot] in https://github.com/haguettaz/rusty-snn/pull/11#discussion_r1836183145_