diff options
author | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2017-03-15 21:26:06 +0300 |
---|---|---|
committer | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2017-03-22 18:31:12 +0000 |
commit | ae09b04e26068182b870d7e136e25eeb3767396a (patch) | |
tree | 7581204f39ab5171f4e569582e89259837843637 /CommonLibs | |
parent | b61c610cd964107aea2ccdf261575237d07ea994 (diff) |
CommonLibs: Print soft bits with less confidence to console when printing a soft vector.
We use other symbols to show that these bits has less confidence:
o and . for 0 with less confidence
| and ' for 1 with less confidence
Change-Id: I747a17568ee48f1f3163e8dfab2e450af85e6435
Diffstat (limited to 'CommonLibs')
-rw-r--r-- | CommonLibs/BitVector.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CommonLibs/BitVector.cpp b/CommonLibs/BitVector.cpp index 7487834..8389237 100644 --- a/CommonLibs/BitVector.cpp +++ b/CommonLibs/BitVector.cpp @@ -546,7 +546,11 @@ ostream& operator<<(ostream& os, const SoftVector& sv) { for (size_t i=0; i<sv.size(); i++) { if (sv[i]<0.25) os << "0"; + else if (sv[i]<0.4) os << "o"; + else if (sv[i]<0.5) os << "."; else if (sv[i]>0.75) os << "1"; + else if (sv[i]>0.6) os << "|"; + else if (sv[i]>0.5) os << "'"; else os << "-"; } return os; |