pub fn clone_with_extraspace(&self, n: usize) -> Graph {
        use itertools::Itertools;

        let mut g = Graph::with_size(self.atoms.len() + n);
        for i in 0..self.size() {
            g.atoms_mut()[i] = self.atoms()[i];
        }

        for (i, j) in (0..self.size()).tuple_combinations() {
            let v = *self.bonds.get(i, j);
            let w = *self.edge_possible.get(i, j);

            *g.bonds.get_mut(i, j) = v;
            *g.bonds.get_mut(j, i) = v;

            *g.edge_possible.get_mut(i, j) = w;
            *g.edge_possible.get_mut(j, i) = w;
        }

        g
    }
/// Clones this graph while adding `n` new nodes/atoms with element number 0.
Clones this graph while adding `n` new nodes/atoms with element number 0.
Clones this graph while adding ` n ` new nodes / atoms with element number 0 .
pub fn clone_with_extraspace(&self, n: usize) -> Graph {
        use itertools::Itertools;
        let mut g = Graph::with_size(self.atoms.len() + n);
        for i in 0..self.size() {
            g.atoms_mut()[i] = self.atoms()[i];
        }
        for (i, j) in (0..self.size()).tuple_combinations() {
            let v = *self.bonds.get(i, j);
            let w = *self.edge_possible.get(i, j);
            *g.bonds.get_mut(i, j) = v;
            *g.bonds.get_mut(j, i) = v;
            *g.edge_possible.get_mut(i, j) = w;
            *g.edge_possible.get_mut(j, i) = w;
        }
        g
    }
pub fn clone_with_extraspace ( & self , n : usize ) -> Graph { use itertools :: Itertools ; let mut g = Graph :: with_size ( self . atoms . len ( ) + n ) ; for i in 0 .. self . size ( ) { g . atoms_mut ( ) [ i ] = self . atoms ( ) [ i ] ; } for ( i , j ) in ( 0 .. self . size ( ) ) . tuple_combinations ( ) { let v = * self . bonds . get ( i , j ) ; let w = * self . edge_possible . get ( i , j ) ; * g . bonds . get_mut ( i , j ) = v ; * g . bonds . get_mut ( j , i ) = v ; * g . edge_possible . get_mut ( i , j ) = w ; * g . edge_possible . get_mut ( j , i ) = w ; } g }
Clones this graph while adding `n` new nodes/atoms with element number 0.
Clones this graph while adding ` n ` new nodes / atoms with element number 0 .
&self
n
usize