pub struct BezierParameterPolynomial { /* private fields */ }Expand description
Power-basis polynomial used to define an algebraic Bezier parameter.
Coefficients are stored from low to high degree, so coefficients()[0] is
the constant term. Constructors trim certified trailing zero coefficients
and reject the structurally zero polynomial. Unknown leading-zero status is
reported as Classification::Uncertain so a topology caller cannot
silently choose the wrong degree.
Implementations§
Source§impl BezierParameterPolynomial
impl BezierParameterPolynomial
Sourcepub fn try_new_power_basis(
coefficients: Vec<Real>,
policy: &CurvePolicy,
) -> CurveResult<Classification<Self>>
pub fn try_new_power_basis( coefficients: Vec<Real>, policy: &CurvePolicy, ) -> CurveResult<Classification<Self>>
Constructs a nonzero power-basis polynomial.
Sourcepub fn coefficients(&self) -> &[Real]
pub fn coefficients(&self) -> &[Real]
Returns coefficients in low-to-high power-basis order.
Sourcepub fn evaluate(&self, parameter: &Real) -> Real
pub fn evaluate(&self, parameter: &Real) -> Real
Evaluates the polynomial at parameter using Horner’s rule.
Sourcepub fn root_count_in_interval(
&self,
interval: &BezierParameterInterval,
policy: &CurvePolicy,
) -> CurveResult<Classification<usize>>
pub fn root_count_in_interval( &self, interval: &BezierParameterInterval, policy: &CurvePolicy, ) -> CurveResult<Classification<usize>>
Counts distinct roots in interval using a Sturm sequence.
The interval endpoints must not themselves be roots. Endpoint roots are
legitimate split parameters, but they should be represented with
BezierParameter2::Exact or isolated by a narrower interval. This
avoids half-open endpoint conventions leaking into arrangement code.
Trait Implementations§
Source§impl Clone for BezierParameterPolynomial
impl Clone for BezierParameterPolynomial
Source§fn clone(&self) -> BezierParameterPolynomial
fn clone(&self) -> BezierParameterPolynomial
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BezierParameterPolynomial
impl Debug for BezierParameterPolynomial
Source§impl PartialEq for BezierParameterPolynomial
impl PartialEq for BezierParameterPolynomial
Source§fn eq(&self, other: &BezierParameterPolynomial) -> bool
fn eq(&self, other: &BezierParameterPolynomial) -> bool
self and other values to be equal, and is used by ==.