aboutsummaryrefslogtreecommitdiff
path: root/src/parse.h
diff options
context:
space:
mode:
authorjvech <jmvalenciae@unal.edu.co>2024-09-08 20:00:15 -0500
committerjvech <jmvalenciae@unal.edu.co>2024-09-08 20:00:15 -0500
commit97ac0db6b070b11652c3c8b181ff9d2ddfe53f17 (patch)
tree49fc9d91e860d9d143de7c433edc4da9671f0571 /src/parse.h
parentf451cc936991e5095b1cb02262b5b0a9f12693f1 (diff)
fix: file_read() and file_write() refactor
Functions Parameters were replaced by Configs struct to allow scalability, in the future I might merge parse.c source code into util.c
Diffstat (limited to 'src/parse.h')
-rw-r--r--src/parse.h22
1 files changed, 4 insertions, 18 deletions
diff --git a/src/parse.h b/src/parse.h
index 18130c7..07f740b 100644
--- a/src/parse.h
+++ b/src/parse.h
@@ -4,29 +4,15 @@
#include <stdio.h>
#include <stdbool.h>
+#include "util.h"
+
typedef struct Array {
double *data;
size_t shape[2];
} Array;
-void file_read(
- char *filepath,
- Array *input, Array *out,
- char *in_keys[], size_t n_in_keys,
- char *out_keys[], size_t n_out_keys,
- bool read_output,
- char *file_format
- );
-
-void file_write(
- char *filepath,
- Array input, Array out,
- char *in_keys[], size_t n_in_keys,
- char *out_keys[], size_t n_out_keys,
- bool write_input,
- char *file_format,
- int decimal_precision);
-
+void file_read(char *filepath, Array *input, Array *out, struct Configs configs, bool read_output);
+void file_write(Array input, Array out, struct Configs ml_configs);
char * file_format_infer(char *filename);
#endif
Feel free to download, copy and edit any repo