Skip to content

Commit

Permalink
Merge pull request libfann#48 from joelself/Clean
Browse files Browse the repository at this point in the history
Added more #ifndef FIXEDFAN directives around code that should be excluded from FIXEDFANN
  • Loading branch information
steffennissen committed Nov 8, 2015
2 parents cdeee86 + 46a04e2 commit 95285d5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/fann.c
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,8 @@ FANN_EXTERNAL struct fann* FANN_API fann_copy(struct fann* orig)
copy->train_stop_function = orig->train_stop_function;
copy->training_algorithm = orig->training_algorithm;
copy->callback = orig->callback;
copy->user_data = orig->user_data;
#ifndef FIXEDFANN
copy->cascade_output_change_fraction = orig->cascade_output_change_fraction;
copy->cascade_output_stagnation_epochs = orig->cascade_output_stagnation_epochs;
copy->cascade_candidate_change_fraction = orig->cascade_candidate_change_fraction;
Expand All @@ -913,7 +915,6 @@ FANN_EXTERNAL struct fann* FANN_API fann_copy(struct fann* orig)
copy->cascade_weight_multiplier = orig->cascade_weight_multiplier;
copy->cascade_max_out_epochs = orig->cascade_max_out_epochs;
copy->cascade_max_cand_epochs = orig->cascade_max_cand_epochs;
copy->user_data = orig->user_data;

/* copy cascade activation functions */
copy->cascade_activation_functions_count = orig->cascade_activation_functions_count;
Expand Down Expand Up @@ -958,6 +959,7 @@ FANN_EXTERNAL struct fann* FANN_API fann_copy(struct fann* orig)
}
memcpy(copy->cascade_candidate_scores,orig->cascade_candidate_scores,fann_get_cascade_num_candidates(copy) * sizeof(fann_type));
}
#endif /* FIXEDFANN */

copy->quickprop_decay = orig->quickprop_decay;
copy->quickprop_mu = orig->quickprop_mu;
Expand Down
2 changes: 2 additions & 0 deletions src/include/fann_cascade.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

/* Group: Cascade Training */

#ifndef FIXEDFANN
/* Function: fann_cascadetrain_on_data
Trains on an entire dataset, for a period of time using the Cascade2 training algorithm.
Expand Down Expand Up @@ -555,5 +556,6 @@ FANN_EXTERNAL unsigned int FANN_API fann_get_cascade_num_candidate_groups(struct
FANN_EXTERNAL void FANN_API fann_set_cascade_num_candidate_groups(struct fann *ann,
unsigned int cascade_num_candidate_groups);

#endif /* FIXEDFANN */

#endif
2 changes: 1 addition & 1 deletion src/include/fann_cpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1860,6 +1860,7 @@ namespace FANN {
return bit_fail;
}

#ifndef FIXEDFANN
/*********************************************************************/

/* Method: cascadetrain_on_data
Expand Down Expand Up @@ -2435,7 +2436,6 @@ namespace FANN {

/*********************************************************************/

#ifndef FIXEDFANN

/* Method: scale_train
Expand Down
2 changes: 2 additions & 0 deletions src/include/fann_training_data_cpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ namespace FANN {
train_data = fann_create_train_from_callback(num_data, num_input, num_output, user_function);
}

#ifndef FIXEDFANN
/* Function: get_min_input
Get the minimum value of all in the input data
Expand Down Expand Up @@ -448,6 +449,7 @@ namespace FANN {
fann_type get_max_output() {
return fann_get_max_train_output(train_data);
}
#endif /* FIXEDFANN */

/* Method: scale_input_train_data
Expand Down

0 comments on commit 95285d5

Please sign in to comment.