summaryrefslogtreecommitdiff
path: root/gr-fec
diff options
context:
space:
mode:
authorTom Rondeau <tom@trondeau.com>2015-11-02 10:40:07 -0500
committerTom Rondeau <tom@trondeau.com>2015-11-02 10:40:07 -0500
commit8737d63030ecaac05793900e71c6a14a05ff0e7a (patch)
tree5734f10b2464777e2fd7998d809055eca1134cf8 /gr-fec
parent5dc5a09fcfd6a95a369093b472599561d6aff4bf (diff)
parentc93470b71a44b3bbdc32c0fc30bb7122dc3f4d5a (diff)
Merge branch 'issue847'
Diffstat (limited to 'gr-fec')
-rw-r--r--gr-fec/lib/fec_mtrx_impl.cc6
-rw-r--r--gr-fec/lib/ldpc_G_matrix_impl.cc7
2 files changed, 9 insertions, 4 deletions
diff --git a/gr-fec/lib/fec_mtrx_impl.cc b/gr-fec/lib/fec_mtrx_impl.cc
index 7c4dd34f2d..88027ff79e 100644
--- a/gr-fec/lib/fec_mtrx_impl.cc
+++ b/gr-fec/lib/fec_mtrx_impl.cc
@@ -479,9 +479,11 @@ namespace gr {
gsl_matrix *identity = gsl_matrix_alloc(n,n);
gsl_matrix_set_identity(identity);
- int test_if_equal = gsl_matrix_equal(identity,test);
+ //int test_if_equal = gsl_matrix_equal(identity,test);
+ gsl_matrix_sub(identity, test); // should be null set if equal
+ double test_if_not_equal = gsl_matrix_max(identity);
- if (!test_if_equal) {
+ if(test_if_not_equal > 0) {
throw "Error in calc_inverse_mod2(): The matrix inverse found is not valid.\n";
}
diff --git a/gr-fec/lib/ldpc_G_matrix_impl.cc b/gr-fec/lib/ldpc_G_matrix_impl.cc
index d0a6df1dee..2c9469521d 100644
--- a/gr-fec/lib/ldpc_G_matrix_impl.cc
+++ b/gr-fec/lib/ldpc_G_matrix_impl.cc
@@ -77,13 +77,16 @@ namespace gr {
}
// Check if the identity matrix exists in the right spot.
- int test_if_equal = gsl_matrix_equal(identity, I_test);
+ //int test_if_equal = gsl_matrix_equal(identity, I_test);
+ gsl_matrix_sub(identity, I_test); // should be null set if equal
+ double test_if_not_equal = gsl_matrix_max(identity);
// Free memory
gsl_matrix_free(identity);
gsl_matrix_free(I_test);
- if(!test_if_equal) {
+ //if(!test_if_equal) {
+ if(test_if_not_equal > 0) {
GR_LOG_ERROR(d_logger,
"Error in ldpc_G_matrix_impl constructor. It appears "
"that the given alist file did not contain either a "