Macaulay2 » Documentation
Packages » Nauty :: neighborhoodComplements
next | previous | forward | backward | up | index | toc

neighborhoodComplements -- complements the neighborhood for each vertex, individually

Synopsis

Description

The method creates a list of graphs, one for each vertex of the original graph $G$. The graph associated to a vertex $v$ of $G$ has the neighborhood of $v$ complemented.

The method does not remove isomorphs.

i1 : R = QQ[a..e];
i2 : neighborhoodComplements graph {a*b, a*c, b*c, c*d, d*e}

o2 = {Graph{"edges" => {{a, b}, {a, c}, {b, c}, {b, d}, {b, e}, {c, e}, {d,
            "ring" => R                                                    
            "vertices" => {a, b, c, d, e}                                  
     ------------------------------------------------------------------------
     e}}}, Graph{"edges" => {{a, b}, {a, c}, {b, c}, {a, d}, {a, e}, {c, e},
                 "ring" => R                                                
                 "vertices" => {a, b, c, d, e}                              
     ------------------------------------------------------------------------
     {d, e}}}, Graph{"edges" => {{a, b}, {a, c}, {b, c}, {c, d}, {a, e}, {b,
                     "ring" => R                                            
                     "vertices" => {a, b, c, d, e}                          
     ------------------------------------------------------------------------
     e}}}, Graph{"edges" => {{a, b}, {c, d}, {a, e}, {b, e}, {d, e}}},
                 "ring" => R                                          
                 "vertices" => {a, b, c, d, e}                        
     ------------------------------------------------------------------------
     Graph{"edges" => {{a, b}, {a, c}, {b, c}, {a, d}, {b, d}, {d, e}}}}
           "ring" => R
           "vertices" => {a, b, c, d, e}

o2 : List

See also

Ways to use neighborhoodComplements :

For the programmer

The object neighborhoodComplements is a method function.