Kindfield
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Properties
Friends
Pages
src
math
boysfunctionintermediate.h
Go to the documentation of this file.
1
#ifndef BOYSFUNCTIONINTERMEDIATE_H
2
#define BOYSFUNCTIONINTERMEDIATE_H
3
4
#include <armadillo>
5
6
using namespace
arma;
7
8
class
BoysFunctionIntermediate
9
{
10
public
:
11
BoysFunctionIntermediate
(
int
levelMax = 20,
int
nValues = 1000,
double
limitMin = 0.0,
double
limitMax = 50.0,
int
nIntegralValues=1e7);
12
13
double
result(
double
arg,
int
n)
const
;
14
void
updateResults();
15
16
// TODO: Ensure we are using the correct levelMax
17
static
BoysFunctionIntermediate
&
getInstance
() {
18
static
BoysFunctionIntermediate
instance;
19
return
instance;
20
}
21
22
protected
:
23
const
int
m_taylorExpansionOrder = 6;
24
double
m_dx
;
25
double
m_dxInverse
;
26
27
uint
m_nValues
;
28
int
m_levelMax
;
29
int
m_neededLevelMax
;
30
double
m_limitMin
;
31
double
m_limitMax
;
32
uint
m_nIntegralValues
;
33
34
mat
m_results
;
35
vec
m_args
;
36
double
integrand(
double
x,
double
t,
double
n)
const
;
37
double
directIntegral(
double
x,
double
n)
const
;
38
double
fastPow(
double
x,
int
a)
const
;
39
40
private
:
41
// Added to protect from copying
42
BoysFunctionIntermediate
(
const
BoysFunctionIntermediate
&);
43
void
operator=(
const
BoysFunctionIntermediate
&);
44
45
double
factorialInverseTable[40];
46
};
47
48
#endif // BOYSFUNCTIONINTERMEDIATE_H
Generated on Sun Jun 22 2014 14:02:46 for Kindfield by
1.8.4