8 if (
f_init == NULL)
return NULL;
10 if (n == NULL)
return NULL;
43 if (n == NULL ||
inputs <= 0)
return;
50 if (n == NULL)
return;
55 for (
size_t i = 0; i < n->
size; ++i)
62 if (n == NULL)
return 0;
64 if (n->
weights != NULL) usage +=
sizeof(double) * n->
size;
72 if (n == NULL)
return NULL;
80 if (b == NULL)
return NULL;
84 for(
size_t i = 0; i < b->
size; ++i)
99 if (n == NULL)
return;
105 if (n == NULL || param == NULL)
return;
107 param[0] += n->
size + 1;
109 param[1] += n->
size + 1;
struct PCFNN_NEURON * PCFNN_NEURON_new(size_t size, double(*f_init)(), double(*f_act)(double), double(*f_act_de)(double))
Initialize a PCFNN_NEURON.
void PCFNN_NEURON_summary(struct PCFNN_NEURON *n, size_t param[2])
Write on param the number of unlocked parameters and locked parameters.
void PCFNN_NEURON_addinputs(struct PCFNN_NEURON *n, size_t inputs)
Increase the input size of the PCFNN_NEURON.
void PCFNN_NEURON_build(struct PCFNN_NEURON *n)
Initialize all internal data of a PCFNN_NEURON.
void PCFNN_NEURON_free(struct PCFNN_NEURON *n)
Free all memory allocation of an PCFNN_NEURON.
void PCFNN_NEURON_clear(struct PCFNN_NEURON *n)
Clear a PCFNN_NEURON.
struct PCFNN_NEURON ** inputs
double(* f_act_de)(double)
void PCFNN_NEURON_set_state_lock(struct PCFNN_NEURON *n, enum PCFNN_NEURON_LOCK_STATE state)
Set lock state of the neuron n.
struct PCFNN_NEURON * PCFNN_NEURON_clone(struct PCFNN_NEURON *n)
Copy the input size, initialisation function and activation function from n and create a new PCFNN_NE...
size_t PCFNN_NEURON_get_ram_usage(struct PCFNN_NEURON *n)
Give the number of bytes used by the PCFNN_NEURON n.
struct PCFNN_NEURON * PCFNN_NEURON_clone_all(struct PCFNN_NEURON *n)
Copy all data from n and create a new PCFNN_NEURON.
enum PCFNN_NEURON_LOCK_STATE state
PCFNN_NEURON_LOCK_STATE
Lock state of a neuron.