poly_xf.h
上传用户:jtjnyq9001
上传日期:2014-11-21
资源大小:3974k
文件大小:2k
源码类别:

3G开发

开发平台:

Visual C++

  1. //
  2. //  File = poly_xf.h
  3. //
  4. #ifndef _POLY_XF_H_
  5. #define _POLY_XF_H_
  6. #include "xfelem.h"
  7. #include "poly_int.h"
  8. //#include "vector_pf.h"
  9. //#include "rowvec_pf.h"
  10. class PolyOvrExtenField
  11. {
  12. public:
  13.   PolyOvrExtenField(void);
  14.   PolyOvrExtenField(GaloisField *ext_field);
  15.   PolyOvrExtenField(GaloisField *ext_field, int degree);
  16.   PolyOvrExtenField(GaloisField *ext_field, int degree, ExtenFieldElem coeff);
  17.   PolyOvrExtenField(GaloisField *ext_field, ExtenFieldElem coeff);
  18.   //PolyOvrExtenField( int prime_base, PolyOvrIntegers *poly);
  19.   //PolyOvrExtenField( int prime_base,
  20.   //                   int degree,
  21.   //                   rowvec_pf *coeff);
  22.   //PolyOvrExtenField( int prime_base,
  23.  //                    rowvec_pf *coeff);
  24.   int MaxDegree(void);
  25.   //int PrimeBase(void);
  26.   int NumberOfTerms(void);
  27.   int PenultimateDegree(void);
  28.   ExtenFieldElem Coefficient(int degree);
  29.   void GetCoeffs( ExtenFieldElem *coeff_vec);
  30.   //void SetRemainder( PolyOvrPrimeField* poly );
  31.   //void SetRemainder( int degree, PrimeFieldElem* coeff );
  32.   //PolyOvrPrimeField& operator= (const PolyOvrPrimeField &right);
  33.   void operator= (const PolyOvrExtenField &right);
  34.   PolyOvrExtenField& operator* (const PolyOvrExtenField &right);
  35.   PolyOvrExtenField& operator*= (const PolyOvrExtenField &right);
  36.   PolyOvrExtenField& operator/ (const PolyOvrExtenField &divisor);
  37.   PolyOvrExtenField& operator% (const PolyOvrExtenField &divisor);
  38.   PolyOvrExtenField& operator/= (const PolyOvrExtenField &divisor);
  39.   PolyOvrExtenField& operator%= (const PolyOvrExtenField &divisor);
  40.   PolyOvrExtenField& operator-= (const ExtenFieldElem &const_term);
  41.   void DumpToStream( ostream* output_stream);
  42.   friend class MinimalPolynomial;
  43.   friend PolyOvrExtenField* Derivative(const PolyOvrExtenField *right);
  44.   friend PolyOvrExtenField& EuclideanAlgorithm( 
  45.                                   const PolyOvrExtenField *poly1,
  46.                                   const PolyOvrExtenField *poly2);
  47. private:
  48.   GaloisField* Exten_Field;
  49.   int Degree;
  50.   ExtenFieldElem* Coeff_Xf;
  51.   //int Rem_Degree;
  52.  // PrimeFieldElem* Rem_Coeff;
  53. };
  54. #endif