-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgpcrate.cpp
More file actions
25 lines (23 loc) · 749 Bytes
/
Copy pathgpcrate.cpp
File metadata and controls
25 lines (23 loc) · 749 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
#include "ebc.h"
#include <iostream>
using namespace std;
int main(void) {
EBC code(1, 1, 8, 8);
//EBC code(4, 4, 4, 4);
code.graph.makeStaircase(1);
//code.setRegularMD(5,5);
code.setUniformRandomMD();
code.printMD();
//code.graph.writeGraphml("code.graphml");
//code.graph.printAdjacencyLists();
//cout << "Wrong design rate = " << code.designRate() << endl;
cout << "Upperbound on the design rate = " << code.rateUpperBound() << endl;
code.printSystematic();
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;
}