Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sminterp-2021.8.26.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

sminterp-2021.8.26-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file sminterp-2021.8.26.tar.gz.

File metadata

  • Download URL: sminterp-2021.8.26.tar.gz
  • Upload date:
  • Size: 8.4 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

Hashes for sminterp-2021.8.26.tar.gz
Algorithm Hash digest
SHA256 5d0d69ff88dd2fcba923eb497ddbd5f4be75180534cb2c3bada7aa13a913620c
MD5 fad06bcf7dc4efefac867318e092874f
BLAKE2b-256 01cf0b96b266cf8f730fdaef0db1bea32ac1e0ddebf7996ca5e39a9e741100ae

See more details on using hashes here.

File details

Details for the file sminterp-2021.8.26-py3-none-any.whl.

File metadata

  • Download URL: sminterp-2021.8.26-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

Hashes for sminterp-2021.8.26-py3-none-any.whl
Algorithm Hash digest
SHA256 610b046650b7c3520eb24783a3da4f8b5dded3593721c0672a0d9a7a7de2983f
MD5 95cfee5e6fe165d154b73ec324f1fa28
BLAKE2b-256 f6c4bc05dd14e5451948d03cd1dce4d2876c7e67d40d9c5178fad600e78fb9ec

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page