Update of /cvsroot/pure-data/externals/ann/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30212
Modified Files:
ann_mlp.c ann_td.c
Log Message:
made all local functions static (in order to not interfere with each other)
Index: ann_mlp.c
===================================================================
RCS file: /cvsroot/pure-data/externals/ann/src/ann_mlp.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ann_mlp.c 19 May 2005 14:07:23 -0000 1.2
--- ann_mlp.c 19 May 2005 14:14:53 -0000 1.3
***************
*** 37,41 ****
} t_ann_mlp;
! void help(t_ann_mlp *x)
{
post("");
--- 37,41 ----
} t_ann_mlp;
! static void help(t_ann_mlp *x)
{
post("");
***************
*** 49,53 ****
}
! void createFann(t_ann_mlp *x, t_symbol *sl, int argc, t_atom *argv)
{
unsigned int num_input = 2;
--- 49,53 ----
}
! static void createFann(t_ann_mlp *x, t_symbol *sl, int argc, t_atom *argv)
{
unsigned int num_input = 2;
***************
*** 109,113 ****
}
! void print_status(t_ann_mlp *x)
{
if (x->mode == TRAIN)
--- 109,113 ----
}
! static void print_status(t_ann_mlp *x)
{
if (x->mode == TRAIN)
***************
*** 117,121 ****
}
! void train(t_ann_mlp *x)
{
x->mode=TRAIN;
--- 117,121 ----
}
! static void train(t_ann_mlp *x)
{
x->mode=TRAIN;
***************
*** 129,133 ****
}
! void run(t_ann_mlp *x)
{
x->mode=RUN;
--- 129,133 ----
}
! static void run(t_ann_mlp *x)
{
x->mode=RUN;
***************
*** 135,139 ****
}
! void set_mode(t_ann_mlp *x, t_symbol *sl, int argc, t_atom *argv)
{
if (argc<1)
--- 135,139 ----
}
! static void set_mode(t_ann_mlp *x, t_symbol *sl, int argc, t_atom *argv)
{
if (argc<1)
***************
*** 150,154 ****
! void train_on_file(t_ann_mlp *x, t_symbol *sl, int argc, t_atom *argv)
{
if (x->ann == 0)
--- 150,154 ----
! static void train_on_file(t_ann_mlp *x, t_symbol *sl, int argc, t_atom *argv)
{
if (x->ann == 0)
***************
*** 175,179 ****
}
! void set_desired_error(t_ann_mlp *x, t_symbol *sl, int argc, t_atom *argv)
{
float desired_error = (float)0.001;
--- 175,179 ----
}
! static void set_desired_error(t_ann_mlp *x, t_symbol *sl, int argc, t_atom *argv)
{
float desired_error = (float)0.001;
***************
*** 189,193 ****
}
! void set_max_iterations(t_ann_mlp *x, t_symbol *sl, int argc, t_atom *argv)
{
unsigned int max_iterations = 500000;
--- 189,193 ----
}
! static void set_max_iterations(t_ann_mlp *x, t_symbol *sl, int argc, t_atom *argv)
{
unsigned int max_iterations = 500000;
***************
*** 203,207 ****
}
! void set_iterations_between_reports(t_ann_mlp *x, t_symbol *sl, int argc, t_atom *argv)
{
--- 203,207 ----
}
! static void set_iterations_between_reports(t_ann_mlp *x, t_symbol *sl, int argc, t_atom *argv)
{
***************
*** 222,226 ****
// run the ann using floats in list passed to the inlet as input values
// and send result to outlet as list of float
! void run_the_net(t_ann_mlp *x, t_symbol *sl, int argc, t_atom *argv)
{
int i=0;
--- 222,226 ----
// run the ann using floats in list passed to the inlet as input values
// and send result to outlet as list of float
! static void run_the_net(t_ann_mlp *x, t_symbol *sl, int argc, t_atom *argv)
{
int i=0;
***************
*** 276,280 ****
}
! void train_on_the_fly(t_ann_mlp *x, t_symbol *sl, int argc, t_atom *argv)
{
int i=0;
--- 276,280 ----
}
! static void train_on_the_fly(t_ann_mlp *x, t_symbol *sl, int argc, t_atom *argv)
{
int i=0;
***************
*** 335,339 ****
}
! void manage_list(t_ann_mlp *x, t_symbol *sl, int argc, t_atom *argv)
{
if (x->mode)
--- 335,339 ----
}
! static void manage_list(t_ann_mlp *x, t_symbol *sl, int argc, t_atom *argv)
{
if (x->mode)
***************
*** 345,349 ****
}
! void set_filename(t_ann_mlp *x, t_symbol *sl, int argc, t_atom *argv)
{
if (argc>0) {
--- 345,349 ----
}
! static void set_filename(t_ann_mlp *x, t_symbol *sl, int argc, t_atom *argv)
{
if (argc>0) {
***************
*** 356,360 ****
}
! void load_ann_from_file(t_ann_mlp *x, t_symbol *sl, int argc, t_atom *argv)
{
if (argc>0) {
--- 356,360 ----
}
! static void load_ann_from_file(t_ann_mlp *x, t_symbol *sl, int argc, t_atom *argv)
{
if (argc>0) {
***************
*** 368,372 ****
}
! void save_ann_to_file(t_ann_mlp *x, t_symbol *sl, int argc, t_atom *argv)
{
if (argc>0) {
--- 368,372 ----
}
! static void save_ann_to_file(t_ann_mlp *x, t_symbol *sl, int argc, t_atom *argv)
{
if (argc>0) {
***************
*** 384,388 ****
// functions for training algo:
! void set_FANN_TRAIN_INCREMENTAL(t_ann_mlp *x)
{
if (x->ann == 0)
--- 384,388 ----
// functions for training algo:
! static void set_FANN_TRAIN_INCREMENTAL(t_ann_mlp *x)
{
if (x->ann == 0)
***************
*** 395,399 ****
}
}
! void set_FANN_TRAIN_BATCH(t_ann_mlp *x)
{
if (x->ann == 0)
--- 395,399 ----
}
}
! static void set_FANN_TRAIN_BATCH(t_ann_mlp *x)
{
if (x->ann == 0)
***************
*** 406,410 ****
}
}
! void set_FANN_TRAIN_RPROP(t_ann_mlp *x)
{
if (x->ann == 0)
--- 406,410 ----
}
}
! static void set_FANN_TRAIN_RPROP(t_ann_mlp *x)
{
if (x->ann == 0)
***************
*** 417,421 ****
}
}
! void set_FANN_TRAIN_QUICKPROP(t_ann_mlp *x)
{
if (x->ann == 0)
--- 417,421 ----
}
}
! static void set_FANN_TRAIN_QUICKPROP(t_ann_mlp *x)
{
if (x->ann == 0)
***************
*** 429,433 ****
}
! void set_activation_function_output(t_ann_mlp *x, t_symbol *sl, int argc, t_atom *argv)
{
t_symbol *parametro = 0;
--- 429,433 ----
}
! static void set_activation_function_output(t_ann_mlp *x, t_symbol *sl, int argc, t_atom *argv)
{
t_symbol *parametro = 0;
***************
*** 465,469 ****
}
! void print_ann_details(t_ann_mlp *x)
{
if (x->ann == 0)
--- 465,469 ----
}
! static void print_ann_details(t_ann_mlp *x)
{
if (x->ann == 0)
***************
*** 491,495 ****
! void *nn_new(t_symbol *s, int argc, t_atom *argv)
{
t_ann_mlp *x = (t_ann_mlp *)pd_new(ann_mlp_class);
--- 491,495 ----
! static void *nn_new(t_symbol *s, int argc, t_atom *argv)
{
t_ann_mlp *x = (t_ann_mlp *)pd_new(ann_mlp_class);
Index: ann_td.c
===================================================================
RCS file: /cvsroot/pure-data/externals/ann/src/ann_td.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ann_td.c 19 May 2005 14:07:23 -0000 1.2
--- ann_td.c 19 May 2005 14:14:53 -0000 1.3
***************
*** 41,45 ****
} t_ann_td;
! void help(t_ann_td *x)
{
post("");
--- 41,45 ----
} t_ann_td;
! static void help(t_ann_td *x)
{
post("");
***************
*** 53,57 ****
}
! void deallocate_inputs(t_ann_td *x)
{
if (x->inputs != 0)
--- 53,57 ----
}
! static void deallocate_inputs(t_ann_td *x)
{
if (x->inputs != 0)
***************
*** 62,66 ****
}
! void allocate_inputs(t_ann_td *x)
{
unsigned int i;
--- 62,66 ----
}
! static void allocate_inputs(t_ann_td *x)
{
unsigned int i;
***************
*** 71,75 ****
}
! void createFann(t_ann_td *x, t_symbol *sl, int argc, t_atom *argv)
{
unsigned int num_input = 2;
--- 71,75 ----
}
! static void createFann(t_ann_td *x, t_symbol *sl, int argc, t_atom *argv)
{
unsigned int num_input = 2;
***************
*** 145,149 ****
}
! void print_status(t_ann_td *x)
{
if (x->mode == TRAIN)
--- 145,149 ----
}
! static void print_status(t_ann_td *x)
{
if (x->mode == TRAIN)
***************
*** 153,157 ****
}
! void train(t_ann_td *x)
{
x->mode=TRAIN;
--- 153,157 ----
}
! static void train(t_ann_td *x)
{
x->mode=TRAIN;
***************
*** 165,169 ****
}
! void run(t_ann_td *x)
{
x->mode=RUN;
--- 165,169 ----
}
! static void run(t_ann_td *x)
{
x->mode=RUN;
***************
*** 171,175 ****
}
! void set_mode(t_ann_td *x, t_symbol *sl, int argc, t_atom *argv)
{
if (argc<1)
--- 171,175 ----
}
! static void set_mode(t_ann_td *x, t_symbol *sl, int argc, t_atom *argv)
{
if (argc<1)
***************
*** 186,190 ****
! void train_on_file(t_ann_td *x, t_symbol *sl, int argc, t_atom *argv)
{
if (x->ann == 0)
--- 186,190 ----
! static void train_on_file(t_ann_td *x, t_symbol *sl, int argc, t_atom *argv)
{
if (x->ann == 0)
***************
*** 211,215 ****
}
! void set_desired_error(t_ann_td *x, t_symbol *sl, int argc, t_atom *argv)
{
float desired_error = (float)0.001;
--- 211,215 ----
}
! static void set_desired_error(t_ann_td *x, t_symbol *sl, int argc, t_atom *argv)
{
float desired_error = (float)0.001;
***************
*** 225,229 ****
}
! void set_max_iterations(t_ann_td *x, t_symbol *sl, int argc, t_atom *argv)
{
unsigned int max_iterations = 500000;
--- 225,229 ----
}
! static void set_max_iterations(t_ann_td *x, t_symbol *sl, int argc, t_atom *argv)
{
unsigned int max_iterations = 500000;
***************
*** 239,243 ****
}
! void set_iterations_between_reports(t_ann_td *x, t_symbol *sl, int argc, t_atom *argv)
{
--- 239,243 ----
}
! static void set_iterations_between_reports(t_ann_td *x, t_symbol *sl, int argc, t_atom *argv)
{
***************
*** 256,260 ****
! void scale_inputs(t_ann_td *x)
{
unsigned int j;
--- 256,260 ----
! static void scale_inputs(t_ann_td *x)
{
unsigned int j;
***************
*** 274,278 ****
// run the ann using floats in list passed to the inlet as input values
// and send result to outlet as list of float
! void run_the_net(t_ann_td *x, t_symbol *sl, int argc, t_atom *argv)
{
int i=0;
--- 274,278 ----
// run the ann using floats in list passed to the inlet as input values
// and send result to outlet as list of float
! static void run_the_net(t_ann_td *x, t_symbol *sl, int argc, t_atom *argv)
{
int i=0;
***************
*** 338,342 ****
}
! void train_on_the_fly(t_ann_td *x, t_symbol *sl, int argc, t_atom *argv)
{
int i=0;
--- 338,342 ----
}
! static void train_on_the_fly(t_ann_td *x, t_symbol *sl, int argc, t_atom *argv)
{
int i=0;
***************
*** 399,403 ****
}
! void manage_list(t_ann_td *x, t_symbol *sl, int argc, t_atom *argv)
{
if (x->mode)
--- 399,403 ----
}
! static void manage_list(t_ann_td *x, t_symbol *sl, int argc, t_atom *argv)
{
if (x->mode)
***************
*** 409,413 ****
}
! void set_filename(t_ann_td *x, t_symbol *sl, int argc, t_atom *argv)
{
if (argc>0) {
--- 409,413 ----
}
! static void set_filename(t_ann_td *x, t_symbol *sl, int argc, t_atom *argv)
{
if (argc>0) {
***************
*** 420,424 ****
}
! void load_ann_from_file(t_ann_td *x, t_symbol *sl, int argc, t_atom *argv)
{
if (x->ins_frames_set==0)
--- 420,424 ----
}
! static void load_ann_from_file(t_ann_td *x, t_symbol *sl, int argc, t_atom *argv)
{
if (x->ins_frames_set==0)
***************
*** 440,444 ****
}
! void save_ann_to_file(t_ann_td *x, t_symbol *sl, int argc, t_atom *argv)
{
if (argc>0) {
--- 440,444 ----
}
! static void save_ann_to_file(t_ann_td *x, t_symbol *sl, int argc, t_atom *argv)
{
if (argc>0) {
***************
*** 456,460 ****
// functions for training algo:
! void set_FANN_TRAIN_INCREMENTAL(t_ann_td *x)
{
if (x->ann == 0)
--- 456,460 ----
// functions for training algo:
! static void set_FANN_TRAIN_INCREMENTAL(t_ann_td *x)
{
if (x->ann == 0)
***************
*** 467,471 ****
}
}
! void set_FANN_TRAIN_BATCH(t_ann_td *x)
{
if (x->ann == 0)
--- 467,471 ----
}
}
! static void set_FANN_TRAIN_BATCH(t_ann_td *x)
{
if (x->ann == 0)
***************
*** 478,482 ****
}
}
! void set_FANN_TRAIN_RPROP(t_ann_td *x)
{
if (x->ann == 0)
--- 478,482 ----
}
}
! static void set_FANN_TRAIN_RPROP(t_ann_td *x)
{
if (x->ann == 0)
***************
*** 489,493 ****
}
}
! void set_FANN_TRAIN_QUICKPROP(t_ann_td *x)
{
if (x->ann == 0)
--- 489,493 ----
}
}
! static void set_FANN_TRAIN_QUICKPROP(t_ann_td *x)
{
if (x->ann == 0)
***************
*** 501,505 ****
}
! void set_activation_function_output(t_ann_td *x, t_symbol *sl, int argc, t_atom *argv)
{
t_symbol *parametro = 0;
--- 501,505 ----
}
! static void set_activation_function_output(t_ann_td *x, t_symbol *sl, int argc, t_atom *argv)
{
t_symbol *parametro = 0;
***************
*** 537,541 ****
}
! void print_ann_details(t_ann_td *x)
{
if (x->ann == 0)
--- 537,541 ----
}
! static void print_ann_details(t_ann_td *x)
{
if (x->ann == 0)
***************
*** 562,566 ****
}
! void set_num_input_frames(t_ann_td *x, t_floatarg ins, t_floatarg frames)
{
x->num_input = ins;
--- 562,566 ----
}
! static void set_num_input_frames(t_ann_td *x, t_floatarg ins, t_floatarg frames)
{
x->num_input = ins;
***************
*** 569,573 ****
}
! void *nn_new(t_symbol *s, int argc, t_atom *argv)
{
t_ann_td *x = (t_ann_td *)pd_new(ann_td_class);
--- 569,573 ----
}
! static void *nn_new(t_symbol *s, int argc, t_atom *argv)
{
t_ann_td *x = (t_ann_td *)pd_new(ann_td_class);