-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.cpp
40 lines (35 loc) · 1.04 KB
/
main.cpp
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
39
40
#include "Skew.h"
#include "SAIS.h"
#include "Naive.h"
int main()
{
std::string testString1("cabbage");
std::string testString2("baggage");
std::cout << "Test String: " << testString1 << std::endl;
Skew s;
std::cout << typeid(s).name() << std::endl;
s.addString(testString1);
s.makeSuffixArray();
s.printSuffixArray();
std::cout << std::endl;
SAIS s2;
std::cout << typeid(s2).name() << std::endl;
s2.addString(testString1);
s2.makeSuffixArray();
s2.printSuffixArray();
std::cout << std::endl;
Naive s3;
std::cout << typeid(s3).name() << std::endl;
s3.addString(testString1);
s3.makeSuffixArray();
s3.printSuffixArray();
std::cout << std::endl;
Skew testLCS;
std::cout << "LCS for: " << testString1 << " " << testString2 << std::endl;
std::cout << typeid(testLCS).name() << std::endl;
testLCS.addString(testString1);
testLCS.addString(testString2);
testLCS.makeSuffixArray();
testLCS.printSuffixArray();
testLCS.findLongestCommonStrand(2);
}