-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerator-matrix-creation.h
More file actions
36 lines (27 loc) · 946 Bytes
/
Copy pathgenerator-matrix-creation.h
File metadata and controls
36 lines (27 loc) · 946 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
27
28
29
30
31
32
33
34
35
36
/* Based on Code by Radford M. Neal, see LICENSE_LDPC.
This file is an adaption of make-gen.c
For the description of the original code see http://radfordneal.github.io/LDPC-codes/encoding.html.
Note that while computing the generator matrix is still in order of O(N^3), if the sparse method
is chosen, it makes the computation much faster. */
#ifndef GENERATOR_MATRIX_CREATION_H
#define GENERATOR_MATRIX_CREATION_H
#include <stdlib.h>
#include <math.h>
#ifndef RELEASE
#include <stdio.h>
#endif
#include "alloc.h"
#include "mod2sparse.h"
#include "globals.h"
// see http://radfordneal.github.io/LDPC-codes/sparse-LU.html
#define GENERATOR_MATRIX_CREATION_LU_STRATEGY_FIRST 0
#define GENERATOR_MATRIX_CREATION_LU_STRATEGY_MINCOL 1
#define GENERATOR_MATRIX_CREATION_LU_STRATEGY_MINPROD 2
void create_generator_matrix(
int lu_strategy
);
void make_sparse (mod2sparse_strategy);
#ifndef RELEASE
void print_generator_matrix();
#endif
#endif