![]() |
rssoft
0.0.0
Reed-Solomon codes library with soft decision decoding
|
Probability score weighted codeword. More...
#include <FinalEvaluation.h>
Public Member Functions | |
ProbabilityCodeword () | |
ProbabilityCodeword (float probability, const std::vector< gf::GFq_Symbol > &codeword) | |
~ProbabilityCodeword () | |
void | add_symbol (const gf::GFq_Symbol &symbol) |
float | get_probability_score () const |
float & | get_probability_score () |
const std::vector < gf::GFq_Symbol > & | get_codeword () const |
std::vector< gf::GFq_Symbol > & | get_codeword () |
bool | operator< (const ProbabilityCodeword &other) const |
bool | operator> (const ProbabilityCodeword &other) const |
void | print_codeword (std::ostream &os) const |
Probability score weighted codeword.
Constructs an empty object. Probability score is given later and codeword is constructed later
probability | Probability score of this codeword |
{}
rssoft::ProbabilityCodeword::ProbabilityCodeword | ( | float | probability, |
const std::vector< gf::GFq_Symbol > & | codeword | ||
) |
Constructs with the codeword as the copy of the given codeword
: std::pair<float, std::vector<gf::GFq_Symbol> >(probability, codeword) {}
Destructor. Nothing special
{}
void rssoft::ProbabilityCodeword::add_symbol | ( | const gf::GFq_Symbol & | symbol | ) | [inline] |
Add a new symbol to the codeword
{ second.push_back(symbol); }
const std::vector<gf::GFq_Symbol>& rssoft::ProbabilityCodeword::get_codeword | ( | ) | const [inline] |
Get the codeword
{
return second;
}
std::vector<gf::GFq_Symbol>& rssoft::ProbabilityCodeword::get_codeword | ( | ) | [inline] |
Get the codeword R/W
{
return second;
}
float rssoft::ProbabilityCodeword::get_probability_score | ( | ) | const [inline] |
Get probability score R/O
{
return first;
}
float& rssoft::ProbabilityCodeword::get_probability_score | ( | ) | [inline] |
Get probability score R/W
{
return first;
}
bool rssoft::ProbabilityCodeword::operator< | ( | const ProbabilityCodeword & | other | ) | const [inline] |
Order codewords according to their increasing probability score
{
return first < other.first;
}
bool rssoft::ProbabilityCodeword::operator> | ( | const ProbabilityCodeword & | other | ) | const [inline] |
Order codewords according to their decreasing probability score
{
return first > other.first;
}
void rssoft::ProbabilityCodeword::print_codeword | ( | std::ostream & | os | ) | const |
Print codeword to an output stream
{ std::vector<rssoft::gf::GFq_Symbol>::const_iterator c_it = second.begin(); os << "["; for (; c_it != second.end(); ++c_it) { if (c_it != second.begin()) { os << ", "; } os << *c_it; } os << "]"; }