PI Compute
v0.2.1
Loading...
Searching...
No Matches
integral_calculator.hpp
1
9
10
#ifndef INTEGRAL_CALCULATOR_HPP
11
#define INTEGRAL_CALCULATOR_HPP
12
13
#include <vector>
14
#include <chrono>
15
16
class
IntegralCalculator
{
17
18
private
:
19
long
long
numIntervals;
20
int
numThreads;
21
double
result;
22
double
computationTime;
23
24
double
calculatePartial(
long
long
start,
long
long
end);
25
26
public
:
27
IntegralCalculator
(
long
long
intervals,
int
threads);
28
29
void
calculate();
30
31
double
getResult();
32
33
double
getComputationTime();
34
};
35
36
#endif
/* INTEGRAL_CALCULATOR_HPP */
IntegralCalculator::IntegralCalculator
IntegralCalculator(long long intervals, int threads)
Definition
integral_calculator.cpp:16
src
integral_calculator
integral_calculator.hpp
Generated by
1.13.1