-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPoly.h
More file actions
34 lines (31 loc) · 852 Bytes
/
Poly.h
File metadata and controls
34 lines (31 loc) · 852 Bytes
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
31
32
33
34
#ifndef POLY_H_
#define POLY_H_
/*
* Poly.h - polynomials
*
* Copyright (C) 2022
* Mark Broihier
*
*/
/* ---------------------------------------------------------------------- */
/* ---------------------------------------------------------------------- */
class Poly {
private:
static const bool debug = false;
double * coefficients;
float * externalCoefficients;
int N;
double * getInternalCoefficients();
Poly(double * coefficients, int size);
public:
static Poly * multiply(Poly * a, Poly * b);
static Poly * add(Poly * a, Poly * b);
static Poly * power(Poly * a, int n);
static Poly * integrate(Poly * a, float value, float x);
static float evaluate(Poly * a, float x);
float * getCoefficients();
int getSize();
Poly(float * coefficients, int size);
~Poly(void);
};
#endif // POLY_H_