pub fn number_of_edges(&self) -> usize {
        use itertools::Itertools;
        (0..self.size())
            .tuple_combinations::<(_, _)>()
            .filter(|(i, j)| i < j)
            .map(|(i, j)| self.bonds().get(i, j))
            .fold(0usize, |a, b| a + *b as usize)
    }
/// Returns the number of edges this graph has.
Returns the number of edges this graph has.
Returns the number of edges this graph has .
pub fn number_of_edges(&self) -> usize {
        use itertools::Itertools;
        (0..self.size())
            .tuple_combinations::<(_, _)>()
            .filter(|(i, j)| i < j)
            .map(|(i, j)| self.bonds().get(i, j))
            .fold(0usize, |a, b| a + *b as usize)
    }
pub fn number_of_edges ( & self ) -> usize { use itertools :: Itertools ; ( 0 .. self . size ( ) ) . tuple_combinations :: < ( _ , _ ) > ( ) . filter ( | ( i , j ) | i < j ) . map ( | ( i , j ) | self . bonds ( ) . get ( i , j ) ) . fold ( 0usize , | a , b | a + * b as usize ) }
Returns the number of edges this graph has.
Returns the number of edges this graph has .
&self