Skip to content

pmc4/AdaptiveStepSize.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AdaptiveStepSize

Stable Dev Build Status

AdaptiveStepSize is a Julia package used to obtain the minimum amount of points needed for the interpolation of a function in the given interval within the desired tolerance.

Given a function $f(x)$, defined on the interval $[a, b]$, and an interpolation method, it subdivides the interval with the maximum spacing between points such that the interpolation has an error smaller than the given tolerance.

Aim of this package

This package is useful if you have a function that takes a bit of time to execute (less than a second per call, for example) and you need to interpolate it to reduce the execution time. This is a possible use case when such function must be called hundreds or thousands of times.

If your function takes a lot of time to execute, it may not be worth to use the package, since it computes the value of the function a lot of times in the given interval.

Installation and usage

Open Julia in a terminal and enter into Pkg mode by pressing [ and then write

add AdaptiveStepSize

Read the docs to know how to use it.

Showcase

For the moment, only linear interpolation is implemented. Any contribution is welcomed to further implement other methods.

An example of the points generated for a piecewise function with a tolerance of 5e-3 using linear interpolation is: Piecewise function with linear interpolation

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages