pub enum InterpolationMode<'a> {
UniformTimeGrid(f64, f64, bool),
NonUniformTimeGrid(&'a [f64]),
}Expand description
Time-grid interpolation policy used when converting trajectory profiles to time-domain samples.
Import via use copp::InterpolationMode;; this is the single canonical path.
All solver submodules (solver::topp2_ra, solver::topp3_lp, etc.) accept this type
in their interpolation helpers (t_to_s_topp2,
t_to_s_topp3, etc.).
Time-grid policy used when interpolating path-parameterization outputs.
This enum describes how target sample times are provided to interpolation routines after a trajectory has been parameterized.
§Output behavior
Interpolation helpers such as
t_to_s_topp2 and
t_to_s_topp3 preserve the
requested sampling policy:
UniformTimeGridemits samplest0 + i * dtup to the final time, and may append the exact final sample wheninclude_finalistrue.NonUniformTimeGridreturns one output value per caller-provided time stamp.- Samples outside the computed trajectory time range are reported as
NaNby the interpolation helpers.
Variants§
UniformTimeGrid(f64, f64, bool)
Uniform sampling grid.
§Tuple fields
t0: time stamp of the first path station (s[0]).dt: constant sampling period (dt > 0expected by callers).include_final: handling of non-integer final step.
§Final-sample policy
If final time t_final is not an integer multiple of dt from t0:
include_final = true: append one final sample exactly att_final.include_final = false: stop att0 + n\,dt, wherenis the largest integer satisfyingt0 + n\,dt \le t_final.
NonUniformTimeGrid(&'a [f64])
Auto Trait Implementations§
impl<'a> Freeze for InterpolationMode<'a>
impl<'a> RefUnwindSafe for InterpolationMode<'a>
impl<'a> Send for InterpolationMode<'a>
impl<'a> Sync for InterpolationMode<'a>
impl<'a> Unpin for InterpolationMode<'a>
impl<'a> UnwindSafe for InterpolationMode<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.