mirror of
https://github.com/aicodix/code.git
synced 2026-04-27 14:30:36 +00:00
these codes are short ..
This commit is contained in:
parent
5d944ca7a9
commit
130af67e08
1 changed files with 3 additions and 10 deletions
|
|
@ -62,11 +62,6 @@ int main()
|
|||
typedef std::uniform_int_distribution<int> uniform;
|
||||
typedef std::normal_distribution<float> normal;
|
||||
|
||||
int8_t *code = new int8_t[CODE_LEN];
|
||||
int8_t *orig = new int8_t[CODE_LEN];
|
||||
int8_t *noisy = new int8_t[CODE_LEN];
|
||||
float *symb = new float[CODE_LEN];
|
||||
|
||||
float min_SNR = 20;
|
||||
|
||||
for (float SNR = -10; SNR <= 10; SNR += 0.1) {
|
||||
|
|
@ -83,6 +78,9 @@ int main()
|
|||
int uncorrected_errors = 0;
|
||||
int decoder_errors = 0;
|
||||
for (int loop = 0; loop < LOOPS; ++loop) {
|
||||
int8_t code[CODE_LEN], orig[CODE_LEN], noisy[CODE_LEN];
|
||||
float symb[CODE_LEN];
|
||||
|
||||
int dat = data();
|
||||
encode(code, dat);
|
||||
|
||||
|
|
@ -131,11 +129,6 @@ int main()
|
|||
}
|
||||
}
|
||||
|
||||
delete[] code;
|
||||
delete[] orig;
|
||||
delete[] noisy;
|
||||
delete[] symb;
|
||||
|
||||
std::cerr << "QEF at: " << min_SNR << " SNR" << std::endl;
|
||||
assert(min_SNR < QEF_SNR);
|
||||
std::cerr << "Simplex code regression test passed!" << std::endl;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue