-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjsd.h
More file actions
28 lines (21 loc) · 798 Bytes
/
jsd.h
File metadata and controls
28 lines (21 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef JSD_H
#define JSD_H
#include "wf_table.h"
/** struct to hold the jsd data */
typedef struct jsd_entry {
char *file_1;
char *file_2;
int total_words;
double jsd;
}jsd_entry;
/** creates an "empty" jsd_entry */
jsd_entry *jsd_create();
/** creates a list of jsd_entry of specified length, all indices holding pointers to a jsd_entry */
jsd_entry **jsd_create_list(int);
/** passes every pointer in the list to jsd_destroy_entry before destroying the list itself. Will not free the strings, which is a task done by the hash_destroy method */
int jsd_destroy_list(jsd_entry **, int);
int jsd_destroy_entry(jsd_entry *);
int jsd_comparator(const void *, const void *);
double jsd_comp(wf_table *, wf_table *);
int jsd_print_list(jsd_entry **, int);
#endif