-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cc
37 lines (30 loc) · 780 Bytes
/
main.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
//
// main.cc
// Viterbi
//
// Created by Shubham Chaudhary on 19/03/17.
// Copyright © 2017 Shubham Chaudhary. All rights reserved.
//
#include <iostream>
#include <chrono>
#include "viterbi.hh"
int main(int argc, const char * argv[]) {
std::string arg1 = std::string(argc > 1 ? argv[1] : "32");
std::string arg2 = std::string(argc > 2 ? argv[2] : "64");
#ifdef DEBUG
std::cout << "Running with hidden states "
+ arg1
+ " and sequence length "
+ arg2
+ "." << std::endl;
#endif
// Initialize the algorithm
viterbi instance(arg1, arg2);
// Run the algorithm
instance.decode();
#ifdef DEBUG
// Print the predicted sequence
instance.show_predicted();
#endif
return 0;
}