IT++ Logo Newcom Logo

itpp::GFX Class Reference

Polynomials over GF(q)[x], where q=2^m, m=1,...,16. More...

#include <itpp/comm/galois.h>

List of all members.

Public Member Functions

 GFX ()
 Constructor.
 GFX (int qvalue)
 Constructor.
 GFX (int qvalue, int indegree)
 Constructor.
 GFX (int qvalue, const ivec &invalues)
 Constructor.
 GFX (int qvalue, char *invalues)
 Constructor.
 GFX (int qvalue, std::string invalues)
 Constructor.
 GFX (const GFX &ingfx)
 Copy constructor.
int get_size () const
 Return q.
int get_degree () const
 Return degree of GF(q)[x].
void set_degree (int indegree)
 Resize the polynomial to the given indegree. If the new polynomial is bigger, then the new coefficients are set to zero.
int get_true_degree () const
 Return true degree of GF(q)[x].
void set (int qvalue, const char *invalues)
 Set the GF(q)[x] polynomial.
void set (int qvalue, const std::string invalues)
 Set the GF(q)[x] polynomial.
void set (int qvalue, const ivec &invalues)
 Set the GF(q)[x] polynomial.
void clear ()
 Set all coefficients to zero.
GF operator[] (int index) const
 Acces to individual element in the GF(q)[x] polynomial.
GFoperator[] (int index)
 Acces to individual element in the GF(q)[x] polynomial.
void operator= (const GFX &ingfx)
 Copy.
void operator+= (const GFX &ingfx)
 sum of two GF(q)[x]
GFX operator+ (const GFX &ingfx) const
 sum of two GF(q)[x]
void operator-= (const GFX &ingfx)
 Difference of two GF(q), same as sum for q=2^m.
GFX operator- (const GFX &ingfx) const
 Difference of two GF(q), same as sum for q=2^m.
void operator *= (const GFX &ingfx)
 product of two GF(q)[x]
GFX operator * (const GFX &ingfx) const
 product of two GF(q)[x]
GF operator() (const GF &ingf)
 Evaluate polynom at alpha^inexp.

Friends

GFX operator * (const GF &ingf, const GFX &ingfx)
 Multiply a GF element with a GF(q)[x].
GFX operator * (const GFX &ingfx, const GF &ingf)
 Multiply a GF(q)[x] with a GF element.
GFX operator/ (const GFX &ingfx, const GF &ingf)
 Divide a GF(q)[x] with a GF element.
std::ostream & operator<< (std::ostream &os, const GFX &ingfx)
 Output stream.

Related Functions

(Note that these are not member functions.)

GFX divgfx (const GFX &c, const GFX &g)
 Int division of GF[q](x) polynomials: m(x) = c(x)/g(x).
GFX modgfx (const GFX &a, const GFX &b)
 Function that performs int division of gf[q](x) polynomials (a(x)/g(x)) and returns the reminder.


Detailed Description

Polynomials over GF(q)[x], where q=2^m, m=1,...,16.

Definition at line 156 of file galois.h.


Constructor & Destructor Documentation

itpp::GFX::GFX  )  [inline]
 

Constructor.

Definition at line 363 of file galois.h.

itpp::GFX::GFX int  qvalue  )  [inline]
 

Constructor.

Definition at line 369 of file galois.h.

References it_assert0.

itpp::GFX::GFX int  qvalue,
int  indegree
[inline]
 

Constructor.

Definition at line 395 of file galois.h.

References it_assert0, set(), and itpp::Array< T >::set_size().

itpp::GFX::GFX int  qvalue,
const ivec invalues
[inline]
 

Constructor.

Definition at line 404 of file galois.h.

References set().

itpp::GFX::GFX int  qvalue,
char *  invalues
[inline]
 

Constructor.

Definition at line 409 of file galois.h.

References set().

itpp::GFX::GFX int  qvalue,
std::string  invalues
[inline]
 

Constructor.

Definition at line 414 of file galois.h.

References set().

itpp::GFX::GFX const GFX ingfx  )  [inline]
 

Copy constructor.

Definition at line 419 of file galois.h.

References coeffs, degree, and q.


Member Function Documentation

int itpp::GFX::get_size  )  const [inline]
 

Return q.

Definition at line 426 of file galois.h.

Referenced by itpp::divgfx(), itpp::formal_derivate(), and itpp::modgfx().

int itpp::GFX::get_degree  )  const [inline]
 

Return degree of GF(q)[x].

Definition at line 431 of file galois.h.

Referenced by itpp::divgfx(), and itpp::modgfx().

void itpp::GFX::set_degree int  indegree  )  [inline]
 

Resize the polynomial to the given indegree. If the new polynomial is bigger, then the new coefficients are set to zero.

Definition at line 436 of file galois.h.

References it_assert0, and itpp::Array< T >::set_size().

Referenced by itpp::divgfx(), and itpp::modgfx().

int itpp::GFX::get_true_degree  )  const [inline]
 

Return true degree of GF(q)[x].

Definition at line 443 of file galois.h.

Referenced by itpp::divgfx(), itpp::formal_derivate(), and itpp::modgfx().

void itpp::GFX::set int  qvalue,
const char *  invalues
[inline]
 

Set the GF(q)[x] polynomial.

Definition at line 385 of file galois.h.

Referenced by clear(), GFX(), itpp::Reed_Solomon::Reed_Solomon(), and set().

void itpp::GFX::set int  qvalue,
const std::string  invalues
[inline]
 

Set the GF(q)[x] polynomial.

Definition at line 390 of file galois.h.

References set().

void itpp::GFX::set int  qvalue,
const ivec invalues
[inline]
 

Set the GF(q)[x] polynomial.

Definition at line 375 of file galois.h.

References it_assert0, set(), and itpp::Array< T >::set_size().

void itpp::GFX::clear  )  [inline]
 

Set all coefficients to zero.

Definition at line 454 of file galois.h.

References it_assert0, and set().

Referenced by itpp::divgfx(), and itpp::modgfx().

GF itpp::GFX::operator[] int  index  )  const [inline]
 

Acces to individual element in the GF(q)[x] polynomial.

Definition at line 191 of file galois.h.

References it_assert0.

GF& itpp::GFX::operator[] int  index  )  [inline]
 

Acces to individual element in the GF(q)[x] polynomial.

Definition at line 194 of file galois.h.

References it_assert0.

void itpp::GFX::operator= const GFX ingfx  )  [inline]
 

Copy.

Definition at line 461 of file galois.h.

References coeffs, degree, and q.

void itpp::GFX::operator+= const GFX ingfx  )  [inline]
 

sum of two GF(q)[x]

Definition at line 468 of file galois.h.

References degree, it_assert0, q, itpp::Array< T >::set_size(), and itpp::Array< T >::size().

GFX itpp::GFX::operator+ const GFX ingfx  )  const [inline]
 

sum of two GF(q)[x]

Definition at line 480 of file galois.h.

void itpp::GFX::operator-= const GFX ingfx  )  [inline]
 

Difference of two GF(q), same as sum for q=2^m.

Definition at line 487 of file galois.h.

GFX itpp::GFX::operator- const GFX ingfx  )  const [inline]
 

Difference of two GF(q), same as sum for q=2^m.

Definition at line 492 of file galois.h.

void itpp::GFX::operator *= const GFX ingfx  )  [inline]
 

product of two GF(q)[x]

Definition at line 499 of file galois.h.

References coeffs, degree, it_assert0, q, itpp::Array< T >::set_size(), and itpp::Array< T >::size().

GFX itpp::GFX::operator * const GFX ingfx  )  const [inline]
 

product of two GF(q)[x]

Definition at line 513 of file galois.h.

GF itpp::GFX::operator() const GF ingf  )  [inline]
 

Evaluate polynom at alpha^inexp.

Definition at line 543 of file galois.h.

References itpp::GF::get_size(), and it_assert0.


Friends And Related Function Documentation

GFX operator * const GF ingf,
const GFX ingfx
[friend]
 

Multiply a GF element with a GF(q)[x].

GFX operator * const GFX ingfx,
const GF ingf
[friend]
 

Multiply a GF(q)[x] with a GF element.

GFX operator/ const GFX ingfx,
const GF ingf
[friend]
 

Divide a GF(q)[x] with a GF element.

std::ostream& operator<< std::ostream &  os,
const GFX ingfx
[friend]
 

Output stream.

Definition at line 104 of file galois.cpp.

GFX divgfx const GFX c,
const GFX g
[related]
 

Int division of GF[q](x) polynomials: m(x) = c(x)/g(x).

The reminder r(x) is not returned by this function.

Definition at line 125 of file galois.cpp.

GFX modgfx const GFX a,
const GFX b
[related]
 

Function that performs int division of gf[q](x) polynomials (a(x)/g(x)) and returns the reminder.

Definition at line 150 of file galois.cpp.


The documentation for this class was generated from the following file:
SourceForge Logo

Generated on Thu Apr 19 14:20:42 2007 for IT++ by Doxygen 1.4.6