-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathComplexNum.H
30 lines (28 loc) · 867 Bytes
/
ComplexNum.H
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/***********************************************************************
ComplexNum.H
BOOM : Bioinformatics Object Oriented Modules
Copyright (C)2012 William H. Majoros ([email protected]).
This is OPEN SOURCE SOFTWARE governed by the Gnu General Public
License (GPL) version 3, as described at www.opensource.org.
***********************************************************************/
#ifndef INCL_BOOM_ComplexNum_H
#define INCL_BOOM_ComplexNum_H
using namespace std;
namespace BOOM {
class ComplexNum
{
public:
ComplexNum(double real=0.0,double imag=0.0);
ComplexNum operator+(const BOOM::ComplexNum &);
ComplexNum operator*(const BOOM::ComplexNum &);
ComplexNum getConjugate();
double &getImag();
double &getReal();
double getImag() const;
double getModulus() const;
double getReal() const;
private:
double real, imag;
};
}
#endif