rssoft  0.0.0
Reed-Solomon codes library with soft decision decoding
rssoft::ProbabilityCodeword Class Reference

Probability score weighted codeword. More...

#include <FinalEvaluation.h>

List of all members.

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

Detailed Description

Probability score weighted codeword.


Constructor & Destructor Documentation

Constructs an empty object. Probability score is given later and codeword is constructed later

Parameters:
probabilityProbability 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

{}

Member Function Documentation

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;
    }

Get the codeword R/W

    {
        return second;
    }

Get probability score R/O

    {
        return first;
    }

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 << "]";
}

The documentation for this class was generated from the following files:
All Classes Namespaces Files Functions Variables Typedefs Friends Defines