You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a simple package to provide functionality for numerically integrating presampled data (meaning you can't choose arbitrary nodes). If you have the ability to evaluate your integrand at arbitrary points, please consider using better tools for the job (such as the excellent [FastGaussQuadrature.jl](https://github.com/ajt60gaibb/FastGaussQuadrature.jl)).
10
+
11
+
Do note that while the code is trivial, it has not been extensively tested and does not focus on numerical precision. Issues, suggestions and pull requests are welcome.
12
+
13
+
14
+
## Example usage
15
+
16
+
```julia
17
+
# setup some data
18
+
x =collect(-π : π/1000: π)
19
+
y =sin(x)
20
+
21
+
# integrate using the default Trapezoidal method
22
+
integrate(x, y)
23
+
24
+
# integrate using a specific method
25
+
integrate(x, y, SimpsonEven())
26
+
```
27
+
28
+
The currently available methods are:
29
+
- Trapezoidal
30
+
- TrapezoidalEven
31
+
- TrapezoidalFast
32
+
- TrapezoidalEvenFast
33
+
- SimpsonEven
34
+
35
+
All methods containing "Even" in the name assume evenly spaced data. All methods containing "Fast" omit basic correctness checks and focus on performance. The fast methods will crash horribly if you supply invalid data.
0 commit comments