Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

gfx.h

Go to the documentation of this file.
00001 #ifndef __galoisfx_h
00002 #define __galoisfx_h
00003 
00004 #include "gf.h"
00005 namespace SPUC {
00007 
00009 class gfx {
00010 public:
00012     gfx();
00014     gfx(int qvalue);
00016     gfx(int qvalue, int indegree);
00018     gfx(int qvalue, const ivec &invalues);
00020     gfx(int qvalue, char *invalues);
00022     gfx(int qvalue, string invalues);
00024     gfx(const gfx &ingfx);
00026     int get_size() const;
00028     int get_degree() const;
00032     void set_degree(int indegree);
00034     int get_true_degree() const;
00036     void set(int qvalue, const char *invalues);
00038     void set(int qvalue, const string invalues);
00040     void set(int qvalue, const ivec &invalues);
00042     void clear();
00044     gf operator[](int index) const {
00045                 // it_assert0(index<=degree, "gfx::op[], out of range"); 
00046                 return coeffs[index]; }
00048     gf &operator[](int index) {
00049                 // it_assert0(index<=degree, "gfx::op[], out of range"); 
00050                 return coeffs[index]; }
00052     void operator=(const gfx &ingfx);
00054     void operator+=(const gfx &ingfx);
00056     gfx operator+(const gfx &ingfx) const;
00058     void operator-=(const gfx &ingfx);
00060     gfx operator-(const gfx &ingfx) const;
00062     void operator*=(const gfx &ingfx);
00064     gfx operator*(const gfx &ingfx) const;
00066     gf operator()(const gf &ingf);
00068     friend gfx  operator*(const gf &ingf, const gfx &ingfx);
00070     friend gfx  operator*( const gfx &ingfx, const gf &ingf);
00072     friend gfx  operator/(const gfx &ingfx, const gf &ingf);
00073 
00074 
00075 
00077     friend ostream &operator<<(ostream &os, const gfx &ingfx);
00078 
00079     Array1D<gf> coeffs;
00080  
00081  protected:
00082  private:
00083     
00084         int degree, q;
00085 };
00086 gfx divgfx(const gfx &c, const gfx &g);
00087 
00088 } // namespace SPUC
00089 #endif // __galois_h

Generated on Fri Sep 16 11:02:20 2005 for spuc by  doxygen 1.4.4