/// Checks that no two edges coincide.
///
/// This should only be called for polytopes with rank at least 3.
Checks that no two edges coincide.
This should only be called for polytopes with rank at least 3.
Checks that no two edges coincide . This should only be called for polytopes with rank at least 3 .
fn check_edges(&self) -> OffWriteResult<()> {
        use std::collections::hash_map::Entry::*;
        let mut hash_edges = HashMap::new();
        for (idx0, edge) in self.poly[2].iter().enumerate() {
            let subs = &edge.subs;
            let mut edge = (subs[0], subs[1]);
            // We sort each edge.
            if edge.0 > edge.1 {
                std::mem::swap(&mut edge.0, &mut edge.1);
            }
            // We verify no other edge has the same vertices.
            match hash_edges.entry(edge) {
                Occupied(entry) => return Err(OffWriteError::coincident_edges(idx0, *entry.get())),
                Vacant(entry) => {
                    entry.insert(idx0);
                }
            }
        }
        Ok(())
    }
fn check_edges ( & self ) -> OffWriteResult < ( ) > { use std :: collections :: hash_map :: Entry :: * ; let mut hash_edges = HashMap :: new ( ) ; for ( idx0 , edge ) in self . poly [ 2 ] . iter ( ) . enumerate ( ) { let subs = & edge . subs ; let mut edge = ( subs [ 0 ] , subs [ 1 ] ) ; // We sort each edge. if edge . 0 > edge . 1 { std :: mem :: swap ( & mut edge . 0 , & mut edge . 1 ) ; } // We verify no other edge has the same vertices. match hash_edges . entry ( edge ) { Occupied ( entry ) => return Err ( OffWriteError :: coincident_edges ( idx0 , * entry . get ( ) ) ) , Vacant ( entry ) => { entry . insert ( idx0 ) ; } } } Ok ( ( ) ) }
Checks that no two edges coincide.
Checks that no two edges coincide .
&self