-
Notifications
You must be signed in to change notification settings - Fork 1
/
dictionary.h
37 lines (24 loc) · 906 Bytes
/
dictionary.h
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
29
30
31
32
33
34
35
36
37
#include "record_struct.h"
#include <stdio.h>
#include "quadtree.h"
#define REGIONQUERY 3
#define PROXIMITYSTAGE 2
/* Result of a query. */
struct queryResult;
/* Dictionary. */
struct dictionary;
/* Returns an empty dictionary. */
struct dictionary *newDict();
/* Insert a given record into the dictionary. */
void insertRecord(struct dictionary *dict, struct csvRecord *record, QuadTree *qt);
/* Search for a given key in the dictionary. */
struct queryResult *lookupRecord(struct dictionary *dict, char *query);
/* Output the given query result */
void printQueryResult(struct queryResult *r, FILE *summaryFile,
FILE *outputFile, int stage,QuadTree *qt);
/* Free the given query result. */
void freeQueryResult(struct queryResult *r);
/* Free a given dictionary. */
void freeDict(struct dictionary *dict);
/* Print the coordinates of a given point */
void Point_print(point2D *point);