RTXI  2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
poly.h
Go to the documentation of this file.
1 //
2 // File = poly.h
3 //
4 #ifndef _POLY_H_
5 #define _POLY_H_
6 
7 #include "cmpxpoly.h"
8 #include <fstream>
9 
11 {
12 public:
13  // default constructor
14  Polynomial();
15 
16  // copy constructor
17  Polynomial(const Polynomial& original);
18 
19  // conversion constructor
20  Polynomial(const CmplxPolynomial& original);
21 
22  // constructor for initializing a binomial
23  Polynomial(const double coeff_1, const double coeff_0);
24 
25  // assignment operator
26  Polynomial& operator=(const Polynomial& right);
27 
28  // multiply assign operator
29  Polynomial& operator*=(const Polynomial& right);
30 
31  // divide assign operator
32  Polynomial& operator/=(const Polynomial& right);
33 
34  // dump polynomial to an output stream
35  void DumpToStream(std::ofstream* output_stream);
36 
37  // get degree of polynomial
38  int GetDegree(void);
39 
40  // return specified coefficient
41  double GetCoefficient(int k);
42 
43 private:
44  int Degree;
45  double* Coefficient;
46 };
47 #endif
void DumpToStream(std::ofstream *output_stream)
Definition: poly.cpp:162
Polynomial & operator/=(const Polynomial &right)
Definition: poly.cpp:127
Polynomial()
Definition: poly.cpp:15
double * Coefficient
Definition: poly.h:45
double GetCoefficient(int k)
Definition: poly.cpp:185
Polynomial & operator*=(const Polynomial &right)
Definition: poly.cpp:92
int GetDegree(void)
Definition: poly.cpp:176
int Degree
Definition: poly.h:44
Polynomial & operator=(const Polynomial &right)
Definition: poly.cpp:69