📄 polyno.hxx
字号:
// ************************
// *** CLASS POLYNOMIAL ***
// ************************
#ifndef polyno_hxx
#include "flotarry.hxx"
#include <stdio.h>
class Polynomial
/*
This abstract class is the superclass of the classes that implement
polynomials : polynomials with one variable (X), with two variables
(X,Y), etc.
DESCRIPTION :
The degree of a polynomial is stored in attribute 'degree ; for example,
P(X,Y) = 2 + 4 X + 5 XY has degree 2.
The coefficients of the polynomial are stored in 'coefficients' ; their
sequence depends on the the polynomial's type (PolynomialXY, etc).
TASKS :
The task of a polynomial is to return its value at a given point (method
'evaluatedAt').
*/
{
protected :
int degree ;
FloatArray* coefficients ;
public :
Polynomial () { }
virtual ~Polynomial () { delete coefficients;}
double& at (int i) { return coefficients -> at(i) ;}
virtual double evaluatedAt (FloatArray*) = NULL ;
virtual void printYourself () = NULL ;
} ;
#define polyno_hxx
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -