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

#include <GFq_Element.h>

Collaboration diagram for rssoft::gf::GFq_Element:

List of all members.

Public Member Functions

 GFq_Element (const GFq &_gf, GFq_Symbol v=0)
 GFq_Element (const GFq_Element &gfe)
 ~GFq_Element ()
GFq_Elementoperator= (const GFq_Element &gfe)
GFq_Elementoperator= (const GFq_Symbol &v)
GFq_Elementoperator+= (const GFq_Element &gfe)
GFq_Elementoperator+= (const GFq_Symbol &v)
GFq_Elementoperator-= (const GFq_Element &gfe)
GFq_Elementoperator-= (const GFq_Symbol &v)
GFq_Elementoperator*= (const GFq_Element &gfe)
GFq_Elementoperator*= (const GFq_Symbol &v)
GFq_Elementoperator/= (const GFq_Element &gfe)
GFq_Elementoperator/= (const GFq_Symbol &v)
GFq_Elementoperator^= (const int &n)
bool operator== (const GFq_Element &gfe) const
bool operator== (const GFq_Symbol &v) const
bool operator!= (const GFq_Element &gfe) const
bool operator!= (const GFq_Symbol &v) const
bool operator< (const GFq_Element &gfe) const
bool operator< (const GFq_Symbol &v) const
bool operator> (const GFq_Element &gfe) const
bool operator> (const GFq_Symbol &v) const
GFq_Symbol index () const
GFq_Symbol poly () const
const GFqfield () const
GFq_Symbol inverse () const
bool is_zero () const
bool is_one () const

Private Attributes

const GFqgf
GFq_Symbol poly_value

Friends

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

Constructor & Destructor Documentation

rssoft::gf::GFq_Element::GFq_Element ( const GFq _gf,
GFq_Symbol  v = 0 
)
                                                             :
        gf(_gf)
        {
                poly_value = v;
        }
                                                       :
        gf(gfe.gf)
        {
                poly_value = gfe.poly_value;
        }

Member Function Documentation

const GFq& rssoft::gf::GFq_Element::field ( ) const [inline]
        {
                return gf;
        }
        {
                return gf.index(poly_value);
        }

Here is the call graph for this function:

        {
                return gf.inverse(poly_value);
        }

Here is the call graph for this function:

bool rssoft::gf::GFq_Element::is_one ( ) const [inline]
        {
                return poly_value == 1;
        }
bool rssoft::gf::GFq_Element::is_zero ( ) const [inline]
        {
                return poly_value == 0;
        }
bool rssoft::gf::GFq_Element::operator!= ( const GFq_Element gfe) const [inline]
        {
                return ((gf != gfe.gf) || (poly_value != gfe.poly_value));
        }
bool rssoft::gf::GFq_Element::operator!= ( const GFq_Symbol v) const [inline]
        {
                return (poly_value != v);
        }
GFq_Element& rssoft::gf::GFq_Element::operator*= ( const GFq_Element gfe) [inline]
        {
                poly_value = gf.mul(poly_value, gfe.poly_value);
                return *this;
        }

Here is the call graph for this function:

GFq_Element& rssoft::gf::GFq_Element::operator*= ( const GFq_Symbol v) [inline]
        {
                poly_value = gf.mul(poly_value, v);
                return *this;
        }

Here is the call graph for this function:

GFq_Element& rssoft::gf::GFq_Element::operator+= ( const GFq_Element gfe) [inline]
        {
                poly_value ^= gfe.poly_value;
                return *this;
        }
GFq_Element& rssoft::gf::GFq_Element::operator+= ( const GFq_Symbol v) [inline]
        {
                poly_value ^= v;
                return *this;
        }
GFq_Element& rssoft::gf::GFq_Element::operator-= ( const GFq_Element gfe) [inline]
        {
                *this += gfe;
                return *this;
        }
GFq_Element& rssoft::gf::GFq_Element::operator-= ( const GFq_Symbol v) [inline]
        {
                *this += v;
                return *this;
        }
GFq_Element& rssoft::gf::GFq_Element::operator/= ( const GFq_Element gfe) [inline]
        {
                poly_value = gf.div(poly_value, gfe.poly_value);
                return *this;
        }

Here is the call graph for this function:

GFq_Element& rssoft::gf::GFq_Element::operator/= ( const GFq_Symbol v) [inline]
        {
                poly_value = gf.div(poly_value, v);
                return *this;
        }

Here is the call graph for this function:

bool rssoft::gf::GFq_Element::operator< ( const GFq_Element gfe) const [inline]
        {
                return (poly_value < gfe.poly_value);
        }
bool rssoft::gf::GFq_Element::operator< ( const GFq_Symbol v) const [inline]
        {
                return (poly_value < v);
        }
GFq_Element& rssoft::gf::GFq_Element::operator= ( const GFq_Element gfe) [inline]
        {
                if (this == &gfe)
                        return *this;

                const_cast<GFq&>(gf) = gfe.gf;
                poly_value = gfe.poly_value;

                return *this;
        }
GFq_Element& rssoft::gf::GFq_Element::operator= ( const GFq_Symbol v) [inline]
        {
                poly_value = v & gf.size();
                return *this;
        }

Here is the call graph for this function:

bool rssoft::gf::GFq_Element::operator== ( const GFq_Element gfe) const [inline]
        {
                return ((gf == gfe.gf) && (poly_value == gfe.poly_value));
        }
bool rssoft::gf::GFq_Element::operator== ( const GFq_Symbol v) const [inline]
        {
                return (poly_value == v);
        }
bool rssoft::gf::GFq_Element::operator> ( const GFq_Element gfe) const [inline]
        {
                return (poly_value > gfe.poly_value);
        }
bool rssoft::gf::GFq_Element::operator> ( const GFq_Symbol v) const [inline]
        {
                return (poly_value > v);
        }
GFq_Element& rssoft::gf::GFq_Element::operator^= ( const int &  n) [inline]
        {
                poly_value = gf.exp(poly_value, n);
                return *this;
        }

Here is the call graph for this function:

        {
                return poly_value;
        }

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const GFq_Element gfe 
) [friend]
        {
                //os << gfe.poly_value;
                if (gfe.poly_value == 0)
                {
                        os << "0";
                }
                else if (gfe.poly_value == 1)
                {
                        os << "1";
                }
                else
                {
                        os << "a^" << gfe.field().index(gfe.poly_value);
                }
                return os;
        }

Member Data Documentation

const GFq& rssoft::gf::GFq_Element::gf [private]

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