Skip to content

Commit 8f91881

Browse files
committed
README
1 parent 6e91f7f commit 8f91881

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,31 @@
55
[![Coverage Status](https://coveralls.io/repos/deXtoRious/NumericalIntegration.jl/badge.svg?branch=master&service=github)](https://coveralls.io/github/deXtoRious/NumericalIntegration.jl?branch=master)
66

77
[![codecov.io](http://codecov.io/github/deXtoRious/NumericalIntegration.jl/coverage.svg?branch=master)](http://codecov.io/github/deXtoRious/NumericalIntegration.jl?branch=master)
8+
9+
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

Comments
 (0)