From a4dfdecd380a1e0df9c83c1cff285a0903cfa50e Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Fri, 24 Jan 2014 14:05:37 +0100 Subject: moved input/output functions to seperate file --- include/msvmmaj_init.h | 4 ++++ include/msvmmaj_io.h | 30 ++++++++++++++++++++++++++++++ include/util.h | 12 ------------ 3 files changed, 34 insertions(+), 12 deletions(-) create mode 100644 include/msvmmaj_io.h (limited to 'include') diff --git a/include/msvmmaj_init.h b/include/msvmmaj_init.h index 6e2e36f..febfb4a 100644 --- a/include/msvmmaj_init.h +++ b/include/msvmmaj_init.h @@ -20,4 +20,8 @@ struct MajModel *msvmmaj_init_model(); struct MajData *msvmmaj_init_data(); +void msvmmaj_allocate_model(struct MajModel *model); +void msvmmaj_free_model(struct MajModel *model); +void msvmmaj_free_data(struct MajData *data); + #endif diff --git a/include/msvmmaj_io.h b/include/msvmmaj_io.h new file mode 100644 index 0000000..99fb4dc --- /dev/null +++ b/include/msvmmaj_io.h @@ -0,0 +1,30 @@ +/** + * @file msvmmaj_io.h + * @author Gertjan van den Burg + * @date January, 2014 + * @brief Header files for msvmmaj_io.c + * + * @details + * Function declarations for input/output functions. + * + */ + +#ifndef MSVMMAJ_IO_H +#define MSVMMAJ_IO_H + +#include "globals.h" + +// forward declarations +struct MajData; +struct MajModel; + +// function declarations +void msvmmaj_read_data(struct MajData *dataset, char *data_file); + +void msvmmaj_read_model(struct MajModel *model, char *model_filename); +void msvmmaj_write_model(struct MajModel *model, char *output_filename); + +void msvmmaj_write_predictions(struct MajData *data, long *predy, + char *output_filename); + +#endif diff --git a/include/util.h b/include/util.h index 995a927..375a9c2 100644 --- a/include/util.h +++ b/include/util.h @@ -19,21 +19,9 @@ struct MajData; struct MajModel; // function declarations -void msvmmaj_read_data(struct MajData *dataset, char *data_file); - -void msvmmaj_read_model(struct MajModel *model, char *model_filename); -void msvmmaj_write_model(struct MajModel *model, char *output_filename); - -void msvmmaj_write_predictions(struct MajData *data, long *predy, - char *output_filename); - int msvmmaj_check_argv(int argc, char **argv, char *str); int msvmmaj_check_argv_eq(int argc, char **argv, char *str); void note(const char *fmt,...); -void msvmmaj_allocate_model(struct MajModel *model); -void msvmmaj_free_model(struct MajModel *model); -void msvmmaj_free_data(struct MajData *data); - #endif -- cgit v1.2.3