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

#include <GF2_Element.h>

List of all members.

Public Member Functions

 GF2_Element (GF2_Symbol v=0)
 GF2_Element (const GF2_Element &gfe)
 ~GF2_Element ()
unsigned int uint_value () const
GF2_Elementoperator= (const GF2_Element &gfe)
GF2_Elementoperator= (const GF2_Symbol &v)
GF2_Elementoperator+= (const GF2_Element &gfe)
GF2_Elementoperator+= (const GF2_Symbol &v)
GF2_Elementoperator-= (const GF2_Element &gfe)
GF2_Elementoperator-= (const GF2_Symbol &v)
GF2_Elementoperator*= (const GF2_Element &gfe)
GF2_Elementoperator*= (const GF2_Symbol &v)
GF2_Elementoperator/= (const GF2_Element &gfe)
GF2_Elementoperator/= (const GF2_Symbol &v)
GF2_Elementoperator^= (const int &n)
bool operator== (const GF2_Element &gfe) const
bool operator== (const GF2_Symbol &v) const
bool operator!= (const GF2_Element &gfe) const
bool operator!= (const GF2_Symbol &v) const
bool operator< (const GF2_Element &gfe)
bool operator< (const GF2_Symbol &v)
bool operator> (const GF2_Element &gfe)
bool operator> (const GF2_Symbol &v)

Private Attributes

unsigned char bin_value
 internal representation of the symbol

Friends

std::ostream & operator<< (std::ostream &os, const GF2_Element &gfe)

Constructor & Destructor Documentation

{
        bin_value = gfe.bin_value;
}

Member Function Documentation

bool rssoft::gf::GF2_Element::operator!= ( const GF2_Element gfe) const [inline]
        {
                return (bin_value != gfe.bin_value);
        }
bool rssoft::gf::GF2_Element::operator!= ( const GF2_Symbol v) const [inline]
        {
                return (bin_value != (v ? 1 : 0));
        }
GF2_Element& rssoft::gf::GF2_Element::operator*= ( const GF2_Element gfe) [inline]
        {
                bin_value *= gfe.bin_value;
                return *this;
        }
GF2_Element& rssoft::gf::GF2_Element::operator*= ( const GF2_Symbol v) [inline]
        {
                bin_value *= (v ? 1 : 0);
                return *this;
        }
GF2_Element& rssoft::gf::GF2_Element::operator+= ( const GF2_Element gfe) [inline]
        {
                bin_value ^= gfe.bin_value;
                return *this;
        }
GF2_Element& rssoft::gf::GF2_Element::operator+= ( const GF2_Symbol v) [inline]
        {
                bin_value ^= (v ? 1 : 0);
                return *this;
        }
GF2_Element& rssoft::gf::GF2_Element::operator-= ( const GF2_Element gfe) [inline]
        {
                *this += gfe;
                return *this;
        }
GF2_Element& rssoft::gf::GF2_Element::operator-= ( const GF2_Symbol v) [inline]
        {
                *this += (v ? 1 : 0);
                return *this;
        }
GF2_Element& rssoft::gf::GF2_Element::operator/= ( const GF2_Element gfe) [inline]
        {
                if (gfe.bin_value == 0)
                {
                        throw GF_Exception("Division by zero");
                }

                return *this;
        }
GF2_Element& rssoft::gf::GF2_Element::operator/= ( const GF2_Symbol v) [inline]
        {
                if (!v)
                {
                        throw GF_Exception("Division by zero");
                }

                return *this;
        }
bool rssoft::gf::GF2_Element::operator< ( const GF2_Element gfe) [inline]
        {
                return (bin_value < gfe.bin_value);
        }
bool rssoft::gf::GF2_Element::operator< ( const GF2_Symbol v) [inline]
        {
                return (bin_value < (v ? 1 : 0));
        }
GF2_Element& rssoft::gf::GF2_Element::operator= ( const GF2_Element gfe) [inline]
        {
                if (this != &gfe)
                {
                        bin_value = gfe.bin_value;
                }

                return *this;
        }
GF2_Element& rssoft::gf::GF2_Element::operator= ( const GF2_Symbol v) [inline]
        {
                bin_value = (v ? 1 : 0);
                return *this;
        }
bool rssoft::gf::GF2_Element::operator== ( const GF2_Element gfe) const [inline]
        {
                return (bin_value == gfe.bin_value);
        }
bool rssoft::gf::GF2_Element::operator== ( const GF2_Symbol v) const [inline]
        {
                return (bin_value == (v ? 1 : 0));
        }
bool rssoft::gf::GF2_Element::operator> ( const GF2_Element gfe) [inline]
        {
                return (bin_value > gfe.bin_value);
        }
bool rssoft::gf::GF2_Element::operator> ( const GF2_Symbol v) [inline]
        {
                return (bin_value > (v ? 1 : 0));
        }
GF2_Element& rssoft::gf::GF2_Element::operator^= ( const int &  n) [inline]
        {
                return *this;
        }
unsigned int rssoft::gf::GF2_Element::uint_value ( ) const [inline]
        {
                return (unsigned int) bin_value;
        }

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const GF2_Element gfe 
) [friend]
{
        os << (gfe.bin_value ? 1 : 0);
        return os;
}

Member Data Documentation

unsigned char rssoft::gf::GF2_Element::bin_value [private]

internal representation of the symbol


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