![]() |
rssoft
0.0.0
Reed-Solomon codes library with soft decision decoding
|
#include <GFq_Element.h>

| rssoft::gf::GFq_Element::GFq_Element | ( | const GFq & | _gf, |
| GFq_Symbol | v = 0 |
||
| ) |
:
gf(_gf)
{
poly_value = v;
}
| rssoft::gf::GFq_Element::GFq_Element | ( | const GFq_Element & | gfe | ) |
:
gf(gfe.gf)
{
poly_value = gfe.poly_value;
}
| rssoft::gf::GFq_Element::~GFq_Element | ( | ) | [inline] |
{
}
| const GFq& rssoft::gf::GFq_Element::field | ( | ) | const [inline] |
{
return gf;
}
| GFq_Symbol rssoft::gf::GFq_Element::index | ( | ) | const [inline] |
| GFq_Symbol rssoft::gf::GFq_Element::inverse | ( | ) | const [inline] |
| 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;
}

| GFq_Element& rssoft::gf::GFq_Element::operator*= | ( | const GFq_Symbol & | v | ) | [inline] |
| 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;
}

| GFq_Element& rssoft::gf::GFq_Element::operator/= | ( | const GFq_Symbol & | v | ) | [inline] |
| 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] |
| 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] |
| GFq_Symbol rssoft::gf::GFq_Element::poly | ( | ) | const [inline] |
{
return poly_value;
}
| 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;
}
const GFq& rssoft::gf::GFq_Element::gf [private] |