-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
26 lines (23 loc) · 688 Bytes
/
Copy pathmain.cpp
File metadata and controls
26 lines (23 loc) · 688 Bytes
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
#include "ebc.h"
#include <iostream>
using namespace std;
int main(void) {
EBC code(14, 14, 256, 256);
//EBC code(4, 4, 4, 4);
if (!code.graph.makeRandomSimpleRegular(4, 4)) {
cerr << "Couldn't simplify" << endl;
return 1;
}
//code.graph.makeStaircase(2);
code.setRegularMD(11,15);
code.graph.writeGraphml("code.graphml");
code.graph.printAdjacencyLists();
cout << "Design rate = " << code.designRate() << endl;
ErasurePattern ep(code, 0.017);
//ep.pattern.printAdjacencyLists();
cout << "#Erasures = " << ep.pattern.nEdges() << endl;
ep.decode(code);
cout << "#Remaining erasures = " << ep.pattern.nEdges() << endl;
//ep.pattern.printAdjacencyLists();
return 0;
}