next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
NautyGraphs :: neighborhoodComplements

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 : neighborhoodComplements graph {{1,2},{1,3},{2,3},{3,4},{4,5}}

o1 = {Graph{0 => set {1, 2}      }, Graph{0 => set {1, 2, 3, 4}}, Graph{0 =>
            1 => set {0, 2, 3, 4}         1 => set {0, 2}               1 =>
            2 => set {0, 1, 4}            2 => set {0, 1, 4}            2 =>
            3 => set {1, 4}               3 => set {0, 4}               3 =>
            4 => set {1, 2, 3}            4 => set {0, 2, 3}            4 =>
     ------------------------------------------------------------------------
     set {1, 2, 4}}, Graph{0 => set {1, 4}   }, Graph{0 => set {1, 2, 3}}}
     set {0, 2, 4}         1 => set {0, 4}            1 => set {0, 2, 3}
     set {0, 1, 3}         2 => set {3}               2 => set {0, 1}
     set {2}               3 => set {2, 4}            3 => set {0, 1, 4}
     set {0, 1}            4 => set {0, 1, 3}         4 => set {3}

o1 : List

See also

Ways to use neighborhoodComplements :