-
Notifications
You must be signed in to change notification settings - Fork 0
/
GaussIntegralTableGenerator.h
34 lines (31 loc) · 1.23 KB
/
GaussIntegralTableGenerator.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
31
32
33
34
#ifndef __GAUSSIANINTERGRALTABLEGENERATOR__
#define __GAUSSIANINTERGRALTABLEGENERATOR__
#include "GaussianPoint.h"
#include "OrthogonalPolynomials.h"
#include <memory>
class GaussIntegralTableGenerator
{
private:
mpz_class highest_prec;
unique_ptr<OrthogonalPolynomials> ortho_polys;
vector<GaussianPoint1D> table;
mpz_class taylor_items = 120;
mpz_class newton_eps = 80;
public:
GaussIntegralTableGenerator();
GaussIntegralTableGenerator(mpz_class _hightest_prec, OrthogonalPolynomials* _ortho_polys);
const vector<GaussianPoint1D>& compute_gaussian_table();
GaussianPoint1D compute_gaussian_table(mpz_class spec_prec);
void set_taylor_items(mpz_class _taylor_items);
void set_newton_eps(mpz_class _newton_eps);
private:
mpf_class compute_first_root_symmetric(mpz_class poly_order);
mpf_class compute_first_root_unsymmetric(mpz_class poly_order);
mpf_class compute_subsequent_root(mpz_class poly_order,mpf_class current_x);
mpf_class compute_subsequent_root_unsymmetric(mpz_class poly_order,mpf_class current_x);
GaussianPoint1D compute_gaussian_symmetric(mpz_class spec_order);
GaussianPoint1D compute_gaussian_unsymmetric(mpz_class spec_order);
};
#else
//do nothing
#endif