move to cmake

This commit is contained in:
2024-06-03 09:59:35 -05:00
parent d1c056e734
commit 087f132a32
41 changed files with 558 additions and 367 deletions

View File

@@ -1,23 +1,16 @@
#include "common.hpp"
#include <dtl/dtl.hpp>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
using dtl::Diff;
int main(int argc, char *argv[]) {
if (isFewArgs(argc)) {
cerr << "Too few arguments." << endl;
std::cerr << "Too few arguments." << std::endl;
return -1;
}
typedef char elem;
typedef string sequence;
typedef std::string sequence;
sequence A(argv[1]);
sequence B(argv[2]);
@@ -27,15 +20,15 @@ int main(int argc, char *argv[]) {
d.compose();
// editDistance
cout << "editDistance:" << d.getEditDistance() << endl;
std::cout << "editDistance:" << d.getEditDistance() << std::endl;
// Longest Common Subsequence
vector<elem> lcs_v = d.getLcsVec();
std::vector<elem> lcs_v = d.getLcsVec();
sequence lcs_s(lcs_v.begin(), lcs_v.end());
cout << "LCS:" << lcs_s << endl;
std::cout << "LCS:" << lcs_s << std::endl;
// Shortest Edit Script
cout << "SES" << endl;
std::cout << "SES" << std::endl;
d.printSES();
return 0;