aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGertjan van den Burg <burg@ese.eur.nl>2016-12-07 21:05:57 +0100
committerGertjan van den Burg <burg@ese.eur.nl>2016-12-07 21:05:57 +0100
commitab119782aca1a2eb9216cd721bca3ab9a0235911 (patch)
tree6701667265066758f8150dc5ba29ceee0c28ca83 /include
parentmoved check for class labels to seperate module (diff)
downloadgensvm-ab119782aca1a2eb9216cd721bca3ab9a0235911.tar.gz
gensvm-ab119782aca1a2eb9216cd721bca3ab9a0235911.zip
allow datasets to be stored in libsvm/svmlight format
Diffstat (limited to 'include')
-rw-r--r--include/gensvm_globals.h10
-rw-r--r--include/gensvm_io.h1
-rw-r--r--include/gensvm_sparse.h1
-rw-r--r--include/gensvm_strutil.h2
4 files changed, 10 insertions, 4 deletions
diff --git a/include/gensvm_globals.h b/include/gensvm_globals.h
index 1151069..1aca458 100644
--- a/include/gensvm_globals.h
+++ b/include/gensvm_globals.h
@@ -39,15 +39,17 @@
#include "gensvm_memory.h"
// all system libraries are included here
+#include <cblas.h>
+#include <ctype.h>
+#include <errno.h>
+#include <limits.h>
+#include <math.h>
#include <stdarg.h>
+#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
-#include <stdbool.h>
#include <string.h>
-#include <math.h>
#include <time.h>
-#include <cblas.h>
-#include <limits.h>
// ########################### Type definitions ########################### //
diff --git a/include/gensvm_io.h b/include/gensvm_io.h
index afcf4a3..c18e9a2 100644
--- a/include/gensvm_io.h
+++ b/include/gensvm_io.h
@@ -37,6 +37,7 @@
// function declarations
void gensvm_read_data(struct GenData *dataset, char *data_file);
+void gensvm_read_data_libsvm(struct GenData *dataset, char *data_file);
void gensvm_read_model(struct GenModel *model, char *model_filename);
void gensvm_write_model(struct GenModel *model, char *output_filename);
diff --git a/include/gensvm_sparse.h b/include/gensvm_sparse.h
index 570e19a..f897889 100644
--- a/include/gensvm_sparse.h
+++ b/include/gensvm_sparse.h
@@ -71,6 +71,7 @@ struct GenSparse {
struct GenSparse *gensvm_init_sparse();
void gensvm_free_sparse(struct GenSparse *sp);
long gensvm_count_nnz(double *A, long rows, long cols);
+bool gensvm_nnz_comparison(long nnz, long rows, long cols);
bool gensvm_could_sparse(double *A, long rows, long cols);
struct GenSparse *gensvm_dense_to_sparse(double *A, long rows, long cols);
double *gensvm_sparse_to_dense(struct GenSparse *A);
diff --git a/include/gensvm_strutil.h b/include/gensvm_strutil.h
index 4e86944..1a2dccc 100644
--- a/include/gensvm_strutil.h
+++ b/include/gensvm_strutil.h
@@ -35,6 +35,8 @@
bool str_startswith(const char *str, const char *pre);
bool str_endswith(const char *str, const char *suf);
+bool str_contains_char(const char *str, const char c);
+char **str_split(char *original, const char *delims, int *len_ret);
void next_line(FILE *fid, char *filename);
char *get_line(FILE *fid, char *filename, char *buffer);