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
File details
Details for the file sminterp-2021.8.20.tar.gz
.
File metadata
- Download URL: sminterp-2021.8.20.tar.gz
- Upload date:
- Size: 8.0 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 | 4e4df5a7372564dfa8c8f856927cc2825d90d4015c5e1e75c5d8d5677b0aed5d |
|
MD5 | 1f5aa3e28670086b2f40b9ffb1a7fe0f |
|
BLAKE2b-256 | 1f033caa7f23c9402fa0294005c3510fbe908337f1f02b86266fd1c4a97989d2 |
File details
Details for the file sminterp-2021.8.20-py3-none-any.whl
.
File metadata
- Download URL: sminterp-2021.8.20-py3-none-any.whl
- Upload date:
- Size: 8.1 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 | e5731747293f16f83c4ceefb11d7c403f208814121b213bd50a94a4fecdf342b |
|
MD5 | 547f63bd8fad97249c10fdf3d3e6fe96 |
|
BLAKE2b-256 | 8d6267cce6e2553eb80fa3bfe9357ddbc114eee8e08bbaaf77c65dc27ddd4c66 |