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

3G开发

开发平台:

Visual C++

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