ó
 ,µ[c           @   s2  d  Z  d d l m Z d g Z i g  d 6d g d 6d d g d 6d d	 g d
 6d d g d 6d d	 g d 6d d d	 g d 6d d d g d 6d d d g d 6d d d g d 6d d d d g d 6d	 d d d g d 6d d d d g d 6d d	 d d g d 6d d	 d d d g d 6d d d	 d d d g d 6Z d „  Z d S(   sZ   Functions that generate the triad graphs, that is, the possible
digraphs on three nodes.

iÿÿÿÿ(   t   DiGrapht   triad_grapht   003t   abt   012t   bat   102t   bct   021Dt   cbt   021Ut   021Ct   act   cat   111Dt   111Ut   030Tt   030Ct   201t   120Dt   120Ut   120Ct   210t   300c         C   sO   |  t  k r$ t d j |  ƒ ƒ ‚ n  t ƒ  } | j d ƒ | j t  |  ƒ | S(   s  Returns the triad graph with the given name.

    Each string in the following tuple is a valid triad name::

        ('003', '012', '102', '021D', '021U', '021C', '111D', '111U',
         '030T', '030C', '201', '120D', '120U', '120C', '210', '300')

    Each triad name corresponds to one of the possible valid digraph on
    three nodes.

    Parameters
    ----------
    triad_name : string
        The name of a triad, as described above.

    Returns
    -------
    :class:`~networkx.DiGraph`
        The digraph on three nodes with the given name. The nodes of the
        graph are the single-character strings 'a', 'b', and 'c'.

    Raises
    ------
    :exc:`ValueError`
        If `triad_name` is not the name of a triad.

    See also
    --------
    triadic_census

    sO   unknown triad name "{}"; use one of the triad names in the TRIAD_NAMES constantt   abc(   t   TRIAD_EDGESt
   ValueErrort   formatR    t   add_nodes_fromt   add_edges_from(   t
   triad_namet   G(    (    s9   lib/python2.7/site-packages/networkx/generators/triads.pyR   )   s     		N(   t   __doc__t   networkx.classesR    t   __all__R   R   (    (    (    s9   lib/python2.7/site-packages/networkx/generators/triads.pyt   <module>   s&   	

