WSJT-X/lib/ldpc/peg/BigGirth.h
Steven Franke acd269fc97 Add peg code for generating ldpc codes.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6561 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2016-03-26 02:47:07 +00:00

55 lines
1.1 KiB
C++

#ifndef BIGGIRTH
#define BIGGIRTH 1
#include <cstdlib>
#include <iostream> // C++ I/O library header
#include "Random.h"
class NodesInGraph{
public:
int numOfConnectionParityBit;
int *connectionParityBit;
int numOfConnectionSymbolBit;
int *connectionSymbolBit;
int maxDegParity;
NodesInGraph(void);
~NodesInGraph(void);
void setNumOfConnectionSymbolBit(int deg);
void initConnectionParityBit(void);
void initConnectionParityBit(int deg);
};
class BigGirth {
public:
int M, N;
int K;
int EXPAND_DEPTH;
const char *filename;
int *(*H);
int *localGirth;
NodesInGraph *nodesInGraph;
Random *myrandom;
BigGirth(int m, int n, int *symbolDegSequence, const char *filename, int sglConcent, int tgtGirth, bool verbose_ = true);
BigGirth(void);
void writeToFile_Hcompressed(void);
void writeToFile_Hmatrix(void);
void writeToFile(void);
void loadH(void);
~BigGirth(void);
private:
int selectParityConnect(int kthSymbol, int mthConnection, int & cycle);
void updateConnection(int kthSymbol);
bool verbose;
};
#endif