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

📄 poly.h

📁 《无线通信系统仿真——c++使用模型》这本书的源代码
💻 H
字号:
//
// File = poly.h
//
#ifndef _POLY_H_
#define _POLY_H_  

#include <fstream.h>
#include "cmpxpoly.h"


class Polynomial
{
public: 

  //  default constructor
  Polynomial( );
  
  //  copy constructor
  Polynomial( const Polynomial &original);
  
  //  conversion constructor
  Polynomial( const CmplxPolynomial<double> &original);
  
  // constructor for initializing a monomial
  Polynomial( const double coeff_0);
                   
  // constructor for initializing a binomial
  Polynomial( const double coeff_1,
              const double coeff_0);
                   
  // constructor for initializing a quadratic
  Polynomial( const double coeff_2,
              const double coeff_1,
              const double coeff_0);
                   
  // assignment operator
  Polynomial& operator= (const Polynomial &right);
  
  //  multiply assign operator
  Polynomial& operator*= (const Polynomial &right);
  
  //  divide assign operator
  Polynomial& operator/= (const Polynomial &right);
  
  // dump polynomial to an output stream
  void DumpToStream( ofstream* output_stream);

  // get degree of polynomial
  int Polynomial::GetDegree(void); 
  
  // return specified coefficient
  double Polynomial::GetCoefficient(int k);

private:
   
  int Degree;
  double* Coefficient; 
}; 
#endif 

⌨️ 快捷键说明

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