Adam Piątyszek - 2008-03-06

Logged In: YES
user_id=1004597
Originator: NO

Hi Yann,

Thanks for reporting this issue and especially for providing the testing code, even though you have ignored our policy to report problems first on the Help forum.
The following fix should solve this bug:

diff --git a/itpp/comm/modulator.h b/itpp/comm/modulator.h
index 6e8d300..99186ad 100644
--- a/itpp/comm/modulator.h
+++ b/itpp/comm/modulator.h
@@ -291,7 +291,7 @@ namespace itpp {
k = levels2bits(M);
bitmap.set_size(M, k);
for (int m = 0; m < M; m++) {
- bitmap.set_row(m, dec2bin(k, bits2symbols(m)));
+ bitmap.set_row(bits2symbols(m), dec2bin(k, m));
}
calculate_softbit_matrices(bits2symbols);
setup_done = true;

I will commit this change to our SVN repository and update the test program to catch such errors in future.

Thanks!
/Adam