fn avg_vertex_map(&self) -> ElementMap<Point<f64>> {
        // Maps every element of the polytope to one of its vertices.
        let mut map = ElementMap::new();
        map.push(Vec::new());

        // Vertices map to themselves.
        if self.rank() != 0 {
            map.push(self.vertices().clone());
        }

        // Every other element maps to the average of the locations of their
        // subelements.
        for (r, elements) in self.ranks().iter().enumerate().skip(2) {
            map.push(
                elements
                    .iter()
                    .map(|el| {
                        el.subs
                            .iter()
                            .map(|&idx| &map[(r - 1, idx)])
                            .sum::<Point<f64>>()
                            / f64::usize(el.subs.len())
                    })
                    .collect(),
            );
        }

        map
    }
/// Returns a map from the elements in a polytope to a crude average of
/// their vertices. Specifically, every vertex is mapped to itself, and
/// every other element is mapped to the average of the images of its
/// subelements.
Returns a map from the elements in a polytope to a crude average of
their vertices. Specifically, every vertex is mapped to itself, and
every other element is mapped to the average of the images of its
subelements.
Returns a map from the elements in a polytope to a crude average of their vertices . Specifically every vertex is mapped to itself and every other element is mapped to the average of the images of its subelements .
fn avg_vertex_map(&self) -> ElementMap<Point<f64>> {
        // Maps every element of the polytope to one of its vertices.
        let mut map = ElementMap::new();
        map.push(Vec::new());
        // Vertices map to themselves.
        if self.rank() != 0 {
            map.push(self.vertices().clone());
        }
        // Every other element maps to the average of the locations of their
        // subelements.
        for (r, elements) in self.ranks().iter().enumerate().skip(2) {
            map.push(
                elements
                    .iter()
                    .map(|el| {
                        el.subs
                            .iter()
                            .map(|&idx| &map[(r - 1, idx)])
                            .sum::<Point<f64>>()
                            / f64::usize(el.subs.len())
                    })
                    .collect(),
            );
        }
        map
    }
fn avg_vertex_map ( & self ) -> ElementMap < Point < f64 > > { // Maps every element of the polytope to one of its vertices. let mut map = ElementMap :: new ( ) ; map . push ( Vec :: new ( ) ) ; // Vertices map to themselves. if self . rank ( ) != 0 { map . push ( self . vertices ( ) . clone ( ) ) ; } // Every other element maps to the average of the locations of their // subelements. for ( r , elements ) in self . ranks ( ) . iter ( ) . enumerate ( ) . skip ( 2 ) { map . push ( elements . iter ( ) . map ( | el | { el . subs . iter ( ) . map ( | & idx | & map [ ( r - 1 , idx ) ] ) . sum :: < Point < f64 > > ( ) / f64 :: usize ( el . subs . len ( ) ) } ) . collect ( ) , ) ; } map }
Returns a map from the elements in a polytope to a crude average of
their vertices.
Returns a map from the elements in a polytope to a crude average of their vertices .
&self