Modules | |
Leaky | |
Data Structures | |
struct | aspi_neuron_t |
neuron structure More... | |
struct | aspi_neuron_class_t |
Neuron class structure. More... | |
Defines | |
#define | ASPI_NEURON(x) (aspi_object_check (x, aspi_neuron ()), ((aspi_neuron_t *) x)) |
#define | ASPI_NEURON_CLASS(x) (aspi_class_check (x, aspi_neuron ()), ((aspi_neuron_class_t * ) x)) |
Functions | |
aspi_class_t * | aspi_neuron (void) |
void | aspi_neuron_dtor (aspi_object_t *self) |
aspi_object_t * | aspi_neuron_init (aspi_object_t *self) |
void | aspi_neuron_set_v (aspi_object_t *self, double v) |
void | aspi_neuron_add_to_v (aspi_object_t *self, double x) |
double | aspi_neuron_get_v (aspi_object_t *self) |
void | aspi_neuron_class_act (aspi_class_t *self, aspi_object_t *network) |
void | aspi_neuron_class_reinit (aspi_class_t *klass, aspi_object_t *network) |
Note that this class is abstract, it only defines the interface used by the network, and it must be implemented by other classes (
#define ASPI_NEURON | ( | x | ) | (aspi_object_check (x, aspi_neuron ()), ((aspi_neuron_t *) x)) |
Referenced by aspi_leaky_update_voltage(), aspi_neuron_add_to_v(), aspi_neuron_get_v(), and aspi_neuron_set_v().
#define ASPI_NEURON_CLASS | ( | x | ) | (aspi_class_check (x, aspi_neuron ()), ((aspi_neuron_class_t * ) x)) |
Referenced by aspi_leaky(), aspi_neuron_class_act(), and aspi_neuron_class_reinit().
aspi_class_t * aspi_neuron | ( | void | ) |
Get neuron class
References aspi_neuron_class_t::act, aspi_class_register(), aspi_neuron_dtor(), aspi_object(), _aspi_class::id, and aspi_neuron_class_t::reinit.
Referenced by aspi_leaky(), and aspi_neuron_init().
void aspi_neuron_add_to_v | ( | aspi_object_t * | self, | |
double | x | |||
) |
Add x to neuron's v
References ASPI_NEURON, and aspi_neuron_t::v.
Referenced by aspi_leaky_update_voltage().
void aspi_neuron_class_act | ( | aspi_class_t * | self, | |
aspi_object_t * | network | |||
) |
Calls the class' act method
This method must
But only for neuron between first and last (so it can be parallelized)
References aspi_neuron_class_t::act, and ASPI_NEURON_CLASS.
Referenced by aspi_network_act().
void aspi_neuron_class_reinit | ( | aspi_class_t * | klass, | |
aspi_object_t * | network | |||
) |
Call the reinit class method
This method calculates the room needed to store delays informations in the neurons
This method must be implemented by classes that neuron models (like the act method)
This method must be called :
References ASPI_NEURON_CLASS, and aspi_neuron_class_t::reinit.
Referenced by aspi_network_calc_max_delays(), aspi_network_dup(), and aspi_network_init_full().
void aspi_neuron_dtor | ( | aspi_object_t * | self | ) |
Neuron destructor
References aspi_object_dtor().
Referenced by aspi_leaky_dtor(), and aspi_neuron().
double aspi_neuron_get_v | ( | aspi_object_t * | self | ) |
Return v
V can be voltage or freq, depends of neuron's model
References ASPI_NEURON, and aspi_neuron_t::v.
Referenced by aspi_leaky_get_voltage(), aspi_leaky_update_voltage(), and aspi_network_get_avg_v().
aspi_object_t * aspi_neuron_init | ( | aspi_object_t * | self | ) |
Neuron constructor
References aspi_class_instantiate(), aspi_neuron(), and aspi_object_init().
void aspi_neuron_set_v | ( | aspi_object_t * | self, | |
double | v | |||
) |
Set v
V can be voltage or freq, depends of neuron's model
References ASPI_NEURON, and aspi_neuron_t::v.
Referenced by aspi_leaky_fire(), and aspi_leaky_update_voltage().