fn minmax(&self, direction: Vector<f64>) -> Option<(f64, f64)> {
        use itertools::{Itertools, MinMaxResult::*};

        let hyperplane = Hyperplane::new(direction, 0.0);

        match self
            .vertices()
            .iter()
            .map(|v| ordered_float::OrderedFloat(hyperplane.distance(v)))
            .minmax()
        {
            // The vertex vector is empty.
            NoElements => None,

            // The single vertex gives both the minimum and maximum distance.
            OneElement(x) => Some((x.0, x.0)),

            // The minimum and maximum distances.
            MinMax(x, y) => Some((x.0, y.0)),
        }
    }
/// Gets the least and greatest distance of a vertex of the polytope,
/// measuring from a specified direction, or returns `None` in the case of
/// the nullitope.
Gets the least and greatest distance of a vertex of the polytope,
measuring from a specified direction, or returns `None` in the case of
the nullitope.
Gets the least and greatest distance of a vertex of the polytope measuring from a specified direction or returns ` None ` in the case of the nullitope .
fn minmax(&self, direction: Vector<f64>) -> Option<(f64, f64)> {
        use itertools::{Itertools, MinMaxResult::*};
        let hyperplane = Hyperplane::new(direction, 0.0);
        match self
            .vertices()
            .iter()
            .map(|v| ordered_float::OrderedFloat(hyperplane.distance(v)))
            .minmax()
        {
            // The vertex vector is empty.
            NoElements => None,
            // The single vertex gives both the minimum and maximum distance.
            OneElement(x) => Some((x.0, x.0)),
            // The minimum and maximum distances.
            MinMax(x, y) => Some((x.0, y.0)),
        }
    }
fn minmax ( & self , direction : Vector < f64 > ) -> Option < ( f64 , f64 ) > { use itertools :: { Itertools , MinMaxResult :: * } ; let hyperplane = Hyperplane :: new ( direction , 0.0 ) ; match self . vertices ( ) . iter ( ) . map ( | v | ordered_float :: OrderedFloat ( hyperplane . distance ( v ) ) ) . minmax ( ) { // The vertex vector is empty. NoElements => None , // The single vertex gives both the minimum and maximum distance. OneElement ( x ) => Some ( ( x . 0 , x . 0 ) ) , // The minimum and maximum distances. MinMax ( x , y ) => Some ( ( x . 0 , y . 0 ) ) , } }
Gets the least and greatest distance of a vertex of the polytope,
measuring from a specified direction, or returns `None` in the case of
the nullitope.
Gets the least and greatest distance of a vertex of the polytope measuring from a specified direction or returns ` None ` in the case of the nullitope .
&self
direction
Vector<f64>