-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathencode.h
33 lines (27 loc) · 807 Bytes
/
encode.h
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
/* Based on Code by Radford M. Neal, see LICENSE_LDPC.
This file is an adaption of encode.c */
#ifndef ENCODE_H
#define ENCODE_H
#ifndef RELEASE
#include <stdio.h>
#endif
#include "alloc.h"
#include "mod2sparse.h"
#include "enc.h"
#include "globals.h"
#include "parity-matrix-creation.h"
#include "generator-matrix-creation.h"
void encode(
char* message, // each char represents one bit
int message_length, // number of message bits (K)
int parity_length, // number of parity bits (M = N-K)
// parameters for parity matrix creation:
int parity_matrix_creation_method,
int checks_per_col,
int seed,
int avoid4cycle,
// parameters for generator matrix creation:
int generator_matrix_sparse_lu_strategy,
char* out_encoded_message // each char represents one bit. Length N.
);
#endif