Enum roots::Roots [] [src]

pub enum Roots<F: FloatType> {
    No([F; 0]),
    One([F; 1]),
    Two([F; 2]),
    Three([F; 3]),
    Four([F; 4]),
}

Sorted and unique list of roots of an equation.

Variants

No([F; 0])

Equation has no roots

One([F; 1])

Equation has one root (or all roots of the equation are the same)

Two([F; 2])

Equation has two roots

Three([F; 3])

Equation has three roots

Four([F; 4])

Equation has four roots

Methods

impl<F: FloatType> Roots<F>
[src]

fn add_new_root(self, new_root: F) -> Self

Add a new root to existing ones keeping the list of roots ordered and unique.

Trait Implementations

impl<F: PartialEq + FloatType> PartialEq for Roots<F>
[src]

fn eq(&self, __arg_0: &Roots<F>) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Roots<F>) -> bool

This method tests for !=.

impl<F: Debug + FloatType> Debug for Roots<F>
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<F: FloatType> AsRef<[F]> for Roots<F>
[src]

fn as_ref(&self) -> &[F]

Performs the conversion.