ó
úŁŐ\c           @   sS   d  Z  d d l Z d d l m Z d j d d d g  Z d g Z d d	  Z	 d S(
   s   Unary operations on graphsi˙˙˙˙N(   t   is_string_likes   
s   Aric Hagberg (hagberg@lanl.gov)s   Pieter Swart (swart@lanl.gov)s   Dan Schult(dschult@colgate.edu)t
   complementc            se   | d k r d   j } n    j   } | | _ | j    | j   f d     j   D  | S(   s  Return the graph complement of G.

    Parameters
    ----------
    G : graph
       A NetworkX graph

    name : string
       Specify name for new graph

    Returns
    -------
    GC : A new graph.

    Notes
    ------
    Note that complement() does not create self-loops and also
    does not produce parallel edges for MultiGraphs.

    Graph, node, and edge data are not propagated to the new graph.
    s   complement(%s)c         3   sF   |  ]< \ } }   D]) } | | k r | | k r | | f Vq q d  S(   N(    (   t   .0t   nt   nbrst   n2(   t   G(    s[   /Users/dxp/prism/prism-games/prism-examples/smgs/car/networkx/algorithms/operators/unary.pys	   <genexpr>*   s   	N(   t   Nonet   namet	   __class__t   add_nodes_fromt   add_edges_fromt   adjacency_iter(   R   R   t   R(    (   R   s[   /Users/dxp/prism/prism-games/prism-examples/smgs/car/networkx/algorithms/operators/unary.pyR      s    	(
   t   __doc__t   networkxt   nxt   networkx.utilsR    t   joint
   __author__t   __all__R   R   (    (    (    s[   /Users/dxp/prism/prism-games/prism-examples/smgs/car/networkx/algorithms/operators/unary.pyt   <module>   s   		