pub struct Param<F> { /* private fields */ }
Expand description
Options for sampling the image of functions ℝ → ℝ².
See Sampling::param
.
Implementations§
Source§impl<F> Param<F>
impl<F> Param<F>
Sourcepub fn n(self, n: usize) -> Self
pub fn n(self, n: usize) -> Self
Set the maximum number of evaluations of the function
to build the sampling. Panic if n < 2
.
Sourcepub fn viewport(self, vp: BoundingBox) -> Self
pub fn viewport(self, vp: BoundingBox) -> Self
Set the zone of interest for the sampling. Segments that end up outside this box will not be refined.
Sourcepub fn init<'a, I>(self, ts: I) -> Selfwhere
I: IntoIterator<Item = &'a f64>,
pub fn init<'a, I>(self, ts: I) -> Selfwhere
I: IntoIterator<Item = &'a f64>,
Add initial values of t
such that f(t)
(see [Sampling :: param
]) must be included into the sampling in addition to
the n
evaluations. Only the values between a
and
b
are taken into account (other values are ignored).
Sourcepub fn init_pt<'a, I>(self, pts: I) -> Self
pub fn init_pt<'a, I>(self, pts: I) -> Self
Add initial points (t, f(t))
to include into the
sampling in addition to the n
evaluations. This
allows you to use previous evaluations of f
. Only
the couples with first coordinate t
between a
and
b
(see [Sampling :: param
]) are considered (other values are ignored).