From 6553b3f0e3e55fc30a99c7d4b5798aa86d18a114 Mon Sep 17 00:00:00 2001 From: Joseph Redmon <pjreddie@gmail.com> Date: Mon, 30 Mar 2015 02:31:47 +0000 Subject: [PATCH] no comment --- src/utils.h | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/utils.h b/src/utils.h index 5ddc538..578abc3 100644 --- a/src/utils.h +++ b/src/utils.h @@ -4,8 +4,13 @@ #include <time.h> #include "list.h" +char *basecfg(char *cfgfile); +int alphanum_to_int(char c); +char int_to_alphanum(int i); +void read_all(int fd, char *buffer, size_t bytes); +void write_all(int fd, char *buffer, size_t bytes); char *find_replace(char *str, char *orig, char *rep); -void error(char *s); +void error(const char *s); void malloc_error(); void file_error(char *s); void strip(char *s); @@ -21,12 +26,14 @@ void scale_array(float *a, int n, float s); void translate_array(float *a, int n, float s); int max_index(float *a, int n); -float constrain(float a, float max); +float constrain(float min, float max, float a); +float mse_array(float *a, int n); float rand_normal(); float rand_uniform(); float sum_array(float *a, int n); float mean_array(float *a, int n); float variance_array(float *a, int n); +float mag_array(float *a, int n); float **one_hot_encode(float *a, int n, int k); float sec(clock_t clocks); #endif -- Gitblit v1.10.0