pub struct UPoly(/* private fields */);Expand description
A polynomial in one variable with real algebraic coefficients, lowest power first, with no
trailing zero: a coordinate of a flight in the time since it began, an atom along a flight, a
value along a tail in z.
Implementations§
Source§impl UPoly
impl UPoly
pub fn zero() -> UPoly
pub fn from_coeffs(c: Vec<Algebraic>) -> UPoly
pub fn constant(a: Algebraic) -> UPoly
pub fn coeffs(&self) -> &[Algebraic]
pub fn coeff(&self, k: usize) -> Algebraic
pub fn is_zero(&self) -> bool
pub fn degree(&self) -> Option<usize>
Sourcepub fn as_constant(&self) -> Option<Algebraic>
pub fn as_constant(&self) -> Option<Algebraic>
The constant this polynomial is, when it is one.
pub fn add(&self, o: &UPoly) -> UPoly
pub fn neg(&self) -> UPoly
pub fn sub(&self, o: &UPoly) -> UPoly
pub fn mul(&self, o: &UPoly) -> UPoly
pub fn scale(&self, k: &Algebraic) -> UPoly
pub fn eval(&self, x: &Algebraic) -> Algebraic
Trait Implementations§
impl Eq for UPoly
impl StructuralPartialEq for UPoly
Auto Trait Implementations§
impl Freeze for UPoly
impl RefUnwindSafe for UPoly
impl Send for UPoly
impl Sync for UPoly
impl Unpin for UPoly
impl UnsafeUnpin for UPoly
impl UnwindSafe for UPoly
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