-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_tree_mod.cc
38 lines (31 loc) · 1019 Bytes
/
test_tree_mod.cc
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
38
// <Your name>
// Main file for Part 2.3 of Homework 3.
#include "avl_tree_mod.h"
#include "sequence_map.h"
#include <iostream>
#include <string>
using namespace std;
namespace {
// @dbx_filename: an input database filename.
// @seq_filename: an input sequences filename.
// @a_tree: an input tree of the type TreeType. It is assumed to be
// empty.
template <typename TreeType>
void TestTree(const string &dbx_filename, const string &seq_filename, TreeType &a_tree) {
// Code for running Part 2.2
}
} // namespace
int
main(int argc, char **argv) {
if (argc != 3) {
cout << "Usage: " << argv[0] << " <databasefilename> <queryfilename>" << endl;
return 0;
}
const string dbx_filename(argv[1]);
const string seq_filename(argv[2]);
cout << "Input file is " << dbx_filename << ", and sequences file is " << seq_filename << endl;
// Note that you will replace the type AvlTree<int> with AvlTree<SequenceMap>
AvlTree<int> a_tree;
TestTree(dbx_filename, seq_filename, a_tree);
return 0;
}