⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cmpxpoly.h

📁 终于找到了bpsk信号的调制
💻 H
字号:
//
// File = cmpxpoly.h
//
#ifndef _CMPXPOLY_H_
#define _CMPXPOLY_H_  

#include <fstream>
#include <complex>
using namespace std;

class CmplxPolynomial
{
public: 

  //  default constructor
  CmplxPolynomial( );
  
  //  copy constructor
  CmplxPolynomial( const CmplxPolynomial &original);
  
  // constructor for initializing a binomial
  CmplxPolynomial( const complex<double> coeff_1,
                   const complex<double> coeff_0);
                   
  //  initializing constructor
  CmplxPolynomial( const int degree,
                   const complex<double> *coeff);
                   
  //  initializing constructor
  CmplxPolynomial( const double *coeff,
                   const int degree);
                   
  // assignment operator
  CmplxPolynomial& operator= (const CmplxPolynomial &right);
  
  //  multiply assign operator
  CmplxPolynomial& operator*= (const CmplxPolynomial &right);
  
  //  divide assign operator
  CmplxPolynomial& operator/= (const CmplxPolynomial &divisor);
  
  // return array of polynomial root values
  complex<double>* GetRoots( void );

  // reflect root across the unit circle
  void ReflectRoot( int root_idx );

  // dump polynomial to an output stream
  void DumpToStream( ostream* output_stream);
  
  // get degree of polynomial
  int GetDegree(void); 
  
  // return specified coefficient
  complex<double> GetCoeff(int k);

  // return pointer to copy of coefficients
  void CopyCoeffs(complex<double>*);

  friend class RealPolynomial;

private:

  // find roots of the polynomial
  void FindRoots( void );

  // build sum of powers coefficients from roots
  //void BuildFromRoots( void );
   
  int Poly_Degree;
  complex<double>* Poly_Coeff; 
  complex<double>* RemCoeff;
  complex<double>* Root;
}; 
#endif 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -