mirror of
https://github.com/aicodix/code.git
synced 2026-04-27 14:30:36 +00:00
renamed PolarCodeConst0 to BhattacharyyaFreezer
This commit is contained in:
parent
1b7383a541
commit
72e5b2240a
3 changed files with 4 additions and 4 deletions
|
|
@ -89,7 +89,7 @@ Encoder for [augmented Hadamard codes](https://en.wikipedia.org/wiki/Hadamard_co
|
||||||
Bit freezers for the construction of [polar codes](https://en.wikipedia.org/wiki/Polar_code_(coding_theory)).
|
Bit freezers for the construction of [polar codes](https://en.wikipedia.org/wiki/Polar_code_(coding_theory)).
|
||||||
|
|
||||||
* PolarFreezer: Constructs code for a given erasure probability without the need for storing nor sorting of erasure probabilities for the virtual channels.
|
* PolarFreezer: Constructs code for a given erasure probability without the need for storing nor sorting of erasure probabilities for the virtual channels.
|
||||||
* PolarCodeConst0: Constructs code by choosing the K best virtual channels computed from a given erasure probability.
|
* BhattacharyyaFreezer: Constructs code by choosing the K best virtual channels computed from a given erasure probability.
|
||||||
|
|
||||||
### [polar_sequence.hh](polar_sequence.hh)
|
### [polar_sequence.hh](polar_sequence.hh)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
template <int MAX_M>
|
template <int MAX_M>
|
||||||
class PolarCodeConst0
|
class BhattacharyyaFreezer
|
||||||
{
|
{
|
||||||
static void inform_bit(uint32_t *bits, int idx)
|
static void inform_bit(uint32_t *bits, int idx)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -50,8 +50,8 @@ int main()
|
||||||
std::cerr << "better SNR: " << better_SNR << std::endl;
|
std::cerr << "better SNR: " << better_SNR << std::endl;
|
||||||
double probability = std::exp(-pow(10.0, better_SNR / 10));
|
double probability = std::exp(-pow(10.0, better_SNR / 10));
|
||||||
if (1) {
|
if (1) {
|
||||||
auto freeze = new CODE::PolarCodeConst0<M>;
|
auto freeze = new CODE::BhattacharyyaFreezer<M>;
|
||||||
std::cerr << "sizeof(PolarCodeConst0<M>) = " << sizeof(CODE::PolarCodeConst0<M>) << std::endl;
|
std::cerr << "sizeof(BhattacharyyaFreezer<M>) = " << sizeof(CODE::BhattacharyyaFreezer<M>) << std::endl;
|
||||||
(*freeze)(frozen, M, K, probability);
|
(*freeze)(frozen, M, K, probability);
|
||||||
delete freeze;
|
delete freeze;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue