complex.h

来自「该程序是一个含直流输电系统的潮流计算程序 程序运行需要包含Boost库文件,需」· C头文件 代码 · 共 34 行

H
34
字号
#ifndef COMPLEX_H
#define COMPLEX_H

#include <iostream>

using std::ostream;

class Complex {
public:
	Complex();
	Complex(double X);
	Complex(double X, double Y);
  Complex(Complex const& c);

	Complex operator + (Complex const& X);
	Complex operator - (Complex const& X);
  Complex operator * (Complex const& X);
  Complex operator / (Complex const& X);
  Complex operator / (double d);
	
  double absCplx() const;
	
  Complex Conj() const;
	
	void Display() const;
  void Display(ostream& out) const;

public:
	double Real,Imag;
};

ostream& operator << (ostream& out, Complex& c);

#endif

⌨️ 快捷键说明

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