Smooth interpolators package
Project description
Smooth Interpolator Package
The objective of this package is to provide an implementation of the smooth interpolator class.
##Base class: Local smooth interpolator The objets of the base class are both smooth but their constructor requires the knowledge of the sampled positions together with the sampled of velocities and accelerations.
Example of usage:
interpolator = LocalSmoothInterpolator.LocalSmoothInterp()
t_s = np.array([0.0, 1.0, 3.0])
x_s = t_s ** 2
dx_s = 2.0 * t_s
d2x_s = 2.0 * np.ones_like(t_s)
t_i = np.linspace(0.0, 3.0)
diff_nodes = LocalSmoothInterpolator.LocalSmoothInterp.SamplingDifferentialNodes(
times=t_s, positions=x_s, velocities=dx_s, accelerations=d2x_s
)
y_i = interpolator.layered_interp(
differential_node=diff_nodes, interpolated_times=t_i
)
##Derived class: Convex smooth interpolator The objects of that class are smooth and they preserve locally the convexity property of the sampled positions. Their constructor only requires the knowledge of those sample positions, not of that of their derivatives.
Example of usage:
interpolator = ConvexSmooth.SmoothConvexInterpolator()
t_s = np.array([0.0, 1.0, 3.0, 5.0, 5.3])
x_s = t_s ** 2
t_i = np.linspace(0.0, 5.3)
samples = LocalSmoothInterpolator.LocalSmoothInterp.SamplingNodes(
times=t_s, positions=x_s
)
y_i = interpolator.convex_interp_opt(samples=samples, interpolated_times=t_i)
is_parabola = are_almost_equal(y_i, t_i ** 2)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sminterp-2021.9.9.tar.gz.
File metadata
- Download URL: sminterp-2021.9.9.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f54751893ace0853ae56078c4356bd1048207feafee99801238548569806196
|
|
| MD5 |
cb1f37936727f62a89b1f18d99027a55
|
|
| BLAKE2b-256 |
485e14c7bc091da7cb4bc03427acd54e1edc22420a3e35962e031ee66bf88c93
|
File details
Details for the file sminterp-2021.9.9-py3-none-any.whl.
File metadata
- Download URL: sminterp-2021.9.9-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2020d3dae04f87edc59d3690e025a36bd187d0b05c1f648558f491a95b9a0cf7
|
|
| MD5 |
88645e0a639110ec3a408fc8e0aface8
|
|
| BLAKE2b-256 |
667654cb334cc7ce30d636e4f0e120f04aa987fe7fed11abcee390b7025d8c9c
|