Joseph Redmon
2014-11-18 d407bffde934ea4c1ee392f24cdf26d9a987199b
src/utils.h
@@ -1,13 +1,16 @@
#ifndef UTILS_H
#define UTILS_H
#include <stdio.h>
#include <time.h>
#include "list.h"
char *find_replace(char *str, char *orig, char *rep);
void error(char *s);
void malloc_error();
void file_error(char *s);
void strip(char *s);
void strip_char(char *s, char bad);
void top_k(float *a, int n, int k, int *index);
list *split_str(char *s, char delim);
char *fgetl(FILE *fp);
list *parse_csv_line(char *line);
@@ -20,8 +23,11 @@
int max_index(float *a, int n);
float constrain(float a, float max);
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 **one_hot_encode(float *a, int n, int k);
float sec(clock_t clocks);
#endif