#include "pair.h" /* pair */
#include "journal.h" /* size_t, date32, line64 */
struct score { struct pair key, name; union date32 date; unsigned edges; };

#define ARRAY_NAME scorelist
#define ARRAY_TYPE struct score
#define ARRAY_HEAD
#include "../src/array.h"

#define TREE_NAME score
#define TREE_KEY union line64
#define TREE_VALUE size_t
#define TREE_HEAD
#include "../src/tree.h"

struct scores {
	struct scorelist_array list;
	struct pairmap_table map;
	struct score_tree dates;
};

void scores_(struct scores *);
struct scores scores(struct journal *);
int scores_is_empty(const struct scores *);
