U
    tds                     @   s   d Z ddlmZmZmZ ddlmZ ddlmZ ddl	m
Z
 dZG dd dZd)d
dZdd Zd*ddZdd Zdd Zddddddddddddddd d d d!d"d#d#d#d$d$d%d%d&d'd(Zd	S )+zo
Layout-related code in the igraph library.

This package contains the implementation of the L{Layout} object.
    )sincospi)	GraphBase)BoundingBoxRunningMean)Layout_layout_layout_auto_layout_sugiyama_layout_method_wrapper_3d_version_for_layout_mappingc                   @   s   e Zd ZdZd6ddZdd Zdd Zd	d
 Zdd Zdd Z	dd Z
edd Zedd Zdd Zdd Zd7ddZdd Zdd  Zd8d%d&Zd'd( Zd)d* Zd9d+d,Zd:d-d.Zd/d0 Zd1d2 Zd;d4d5ZdS )<r	   a  Represents the layout of a graph.

    A layout is practically a list of coordinates in an n-dimensional
    space. This class is generic in the sense that it can store coordinates
    in any n-dimensional space.

    Layout objects are not associated directly with a graph. This is deliberate:
    there were times when I worked with almost identical copies of the same
    graph, the only difference was that they had different colors assigned to
    the vertices. It was particularly convenient for me to use the same layout
    for all of them, especially when I made figures for a paper. However,
    C{igraph} will of course refuse to draw a graph with a layout that has
    less coordinates than the node count of the graph.

    Layouts behave exactly like lists when they are accessed using the item
    index operator (C{[...]}). They can even be iterated through. Items
    returned by the index operator are only copies of the coordinates,
    but the stored coordinates can be modified by directly assigning to
    an index.

        >>> layout = Layout([(0, 1), (0, 2)])
        >>> coords = layout[1]
        >>> print(coords)
        [0, 2]
        >>> coords = (0, 3)
        >>> print(layout[1])
        [0, 2]
        >>> layout[1] = coords
        >>> print(layout[1])
        [0, 3]
    Nc                 C   s   |dk	rdd |D | _ ng | _ |dkrPt| j dkr>d| _qt| j d | _n6t|| _| j D ]$}t|| jkr`tdd| j  q`dS )a  Constructor.

        @param coords: the coordinates to be stored in the layout.
        @param dim: the number of dimensions. If C{None}, the number of
        dimensions is determined automatically from the length of the first
        item of the coordinate list. If there are no entries in the coordinate
        list, the default will be 2.  Generally, this should be given if the
        length of the coordinate list is zero, otherwise it should be left as
        is.
        Nc                 S   s   g | ]}t |qS  )list.0Zcoordr   r   F/home/sam/Atlas/atlas_env/lib/python3.8/site-packages/igraph/layout.py
<listcomp>I   s     z#Layout.__init__.<locals>.<listcomp>r      z!all items in the coordinate list zmust have a length of %d)_coordslen_dimint
ValueError)selfcoordsdimrowr   r   r   __init__=   s    

zLayout.__init__c                 C   s
   t | jS N)r   r   r   r   r   r   __len__[   s    zLayout.__len__c                 C   s
   | j | S r!   r   r   idxr   r   r   __getitem__^   s    zLayout.__getitem__c                 C   s.   t || jkrtd| j t|| j|< d S )Nz#assigned item must have %d elements)r   r   r   r   r   )r   r&   valuer   r   r   __setitem__a   s    zLayout.__setitem__c                 C   s   | j |= d S r!   r$   r%   r   r   r   __delitem__f   s    zLayout.__delitem__c                 C   s   |  | j| jS r!   )	__class__r   r   r"   r   r   r   __copy__i   s    zLayout.__copy__c                 C   sZ   | j sd}n"t| j dkr d}ndt| j  }| jdkr>d}n
d| j }d| jj||f S )Nzno vertices   z1 vertexz%d verticesz1 dimensionz%d dimensionsz<%s with %s and %s>)r   r   r   r+   __name__)r   Zvertex_countZ	dim_countr   r   r   __repr__l   s    

zLayout.__repr__c                 C   s   | j S )z Returns the number of dimensions)r   r"   r   r   r   r   }   s    z
Layout.dimc                 C   s   dd | j D S )z"The coordinates as a list of listsc                 S   s   g | ]}|d d  qS r!   r   r   r   r   r   r   r      s     z!Layout.coords.<locals>.<listcomp>r$   r"   r   r   r   r      s    zLayout.coordsc                 C   s@   t || jk rtd| j | jdd |d| j D  dS )z!Appends a new point to the layoutz#appended item must have %d elementsc                 S   s   g | ]}t |qS r   floatr   r   r   r   r      s     z!Layout.append.<locals>.<listcomp>r   N)r   r   r   r   append)r   r(   r   r   r   r3      s    zLayout.appendc                 C   sJ   t |tr|g}ndd |D }|D ] }| jD ]}||  d9  < q.q$dS )zzMirrors the layout along the given dimension(s)

        @param dim: the list of dimensions or a single dimension
        c                 S   s   g | ]}t |qS r   )r   )r   xr   r   r   r      s     z!Layout.mirror.<locals>.<listcomp>N)
isinstancer   r   )r   r   Zcurrent_dimr   r   r   r   mirror   s    

zLayout.mirrorr   r-   c                 K   s   t |ddg| j }t|| jkr4td| j |t d }t|t| }}t| j	D ]b\}	}
|
| ||  |
| ||   }}|| ||  ||  |
|< || ||  ||  |
|< q\dS )a  Rotates the layout by the given degrees on the plane defined by
        the given two dimensions.

        @param angle: the angle of the rotation, specified in degrees.
        @param dim1: the first axis of the plane of the rotation.
        @param dim2: the second axis of the plane of the rotation.
        @keyword origin: the origin of the rotation. If not specified, the
          origin will be the origin of the coordinate system.
        origin        origin must have %d dimensions     f@N)
r   getr   r   r   r   r   r   	enumerater   )r   ZangleZdim1Zdim2kwdsr8   ZradianZ	cos_alphaZ	sin_alphar&   r   r4   yr   r   r   rotate   s    "zLayout.rotatec                    s  t |ddg| j  t | jkr4td| j |dp@|tttfrVgtdkrltdn@tdkrtd tkstd tkr| j9 nd t| jkrtd| j t	| j
D ]*\} fd	d
t| jD | j
|< qdS )a  Scales the layout.

        Scaling parameters can be provided either through the C{scale} keyword
        argument or through plain unnamed arguments. If a single integer or
        float is given, it is interpreted as a uniform multiplier to be applied
        on all dimensions. If it is a list or tuple, its length must be equal to
        the number of dimensions in the layout, and each element must be an
        integer or float describing the scaling coefficient in one of the
        dimensions.

        @keyword scale: scaling coefficients (integer, float, list or tuple)
        @keyword origin: the origin of scaling (this point will stay in place).
          Optional, defaults to the origin of the coordinate system being used.
        r8   r9   r:   scaler   zscaling factor must be givenr-   z)scaling factor list must have %d elementsc                    s,   g | ]$}|  |  |   |  qS r   r   r   dr8   r   Zscalingr   r   r      s    z Layout.scale.<locals>.<listcomp>N)r   r<   r   r   r   r6   r   r2   typer=   r   ranger   argsr>   r&   r   rD   r   rA      s$    
 zLayout.scalec                    s   | dp|tdkr$tdn4tdkrXtd tkrXtd tkrXd t| jkrttd| j t| jD ](\}  fddt	| jD | j|< q~dS )	a  Translates the layout.

        The translation vector can be provided either through the C{v} keyword
        argument or through plain unnamed arguments. If unnamed arguments are
        used, the vector can be supplied as a single list (or tuple) or just as
        a series of arguments. In all cases, the translation vector must have
        the same number of dimensions as the layout.

        @keyword v: the translation vector
        vr   z translation vector must be givenr-   z*translation vector must have %d dimensionsc                    s   g | ]} | |  qS r   r   rB   r   rI   r   r   r      s     z$Layout.translate.<locals>.<listcomp>N)
r<   r   r   rE   r   r2   r   r=   r   rF   rG   r   rJ   r   	translate   s    
,zLayout.translated   P   r9         ?c                 C   s   | j dkrtd|  }||kr,|d7 }q|dkrF|d8 }|d8 }q,|dk r`|d7 }|d7 }qF|| |j }|td 9 }|td 9 }|| |j }t| jD ]P\}\}	}
|	|j | | }|
|j	 | | }t
|| t| | g| j|< qdS )am  Converts a planar layout to a radial one

        This method applies only to 2D layouts. The X coordinate of the
        layout is transformed to an angle, with min(x) corresponding to
        the parameter called I{min_angle} and max(y) corresponding to
        I{max_angle}. Angles are given in degrees, zero degree corresponds
        to the direction pointing upwards. The Y coordinate is
        interpreted as a radius, with min(y) belonging to the minimum and
        max(y) to the maximum radius given in the arguments.

        This is not a fully generic polar coordinate transformation, but
        it is fairly useful in creating radial tree layouts from ordinary
        top-down ones (that's why the Y coordinate belongs to the radius).
        It can also be used in conjunction with the Fruchterman-Reingold
        layout algorithm via its I{miny} and I{maxy} parameters (see
        L{Graph.layout_fruchterman_reingold()<GraphBase.layout_fruchterman_reingold()>})
        to produce radial layouts where the radius belongs to some property of
        the vertices.

        @param min_angle: the angle corresponding to the minimum X value
        @param max_angle: the angle corresponding to the maximum X value
        @param min_radius: the radius corresponding to the minimum Y value
        @param max_radius: the radius corresponding to the maximum Y value
        r   zimplemented only for 2D layoutsih  r   r;   N)r   	TypeErrorbounding_boxwidthr   heightr=   r   lefttopr   r   )r   Z	min_angleZ	max_angleZ
min_radiusZ
max_radiusbboxZratio_xZratio_yr&   r4   r?   alphaZradiusr   r   r   	to_radial   s&    



zLayout.to_radialc                    s    fdd| j D | _ dS )a  Performs an arbitrary transformation on the layout

        Additional positional and keyword arguments are passed intact to
        the given function.

        @param function: a function which receives the coordinates as a
          tuple and returns the transformed tuple.
        c                    s$   g | ]}t t|f qS r   )r   tupler0   rH   functionr>   r   r   r   %  s    z$Layout.transform.<locals>.<listcomp>Nr$   )r   rZ   rH   r>   r   rY   r   	transform  s    	zLayout.transformc                 C   sP   dd t | jD }| jD ]&}t | jD ]}|| ||  q(qdd |D S )zReturns the centroid of the layout.

        The centroid of the layout is the arithmetic mean of the points in
        the layout.

        @return: the centroid as a list of floatsc                 S   s   g | ]
}t  qS r   r   )r   _r   r   r   r   0  s     z#Layout.centroid.<locals>.<listcomp>c                 S   s   g | ]
}|j qS r   )Zmean)r   Zrmr   r   r   r   4  s     )rF   r   r   add)r   centroidr   r   r   r   r   r^   )  s
    
zLayout.centroidc                    sh   | j stdg g  }}t| jD ]<  fdd| j D }|t||  |t||  q"||fS )aR  Returns the boundaries of the layout.

        The boundaries are the minimum and maximum coordinates along all
        dimensions.

        @param border: this value gets subtracted from the minimum bounds
          and gets added to the maximum bounds before returning the coordinates
          of the box. Defaults to zero.
        @return: the minimum and maximum coordinates along all dimensions,
          in a tuple containing two lists, one for the minimum coordinates,
          the other one for the maximum.
        @raises ValueError: if the layout contains no layout items
        zlayout contains no layout itemsc                    s   g | ]}|  qS r   r   r0   r   r   r   r   I  s     z%Layout.boundaries.<locals>.<listcomp>)r   r   rF   r   r3   minmax)r   borderminsmaxscolr   r_   r   
boundaries6  s    
zLayout.boundariesc                 C   s`   | j dkrtdz&| |\\}}\}}t||||W S  tk
rZ   tdddd Y S X dS )aP  Returns the bounding box of the layout.

        The bounding box of the layout is the smallest box enclosing all the
        points in the layout.

        @param border: this value gets subtracted from the minimum bounds
          and gets added to the maximum bounds before returning the coordinates
          of the box. Defaults to zero.
        @return: the coordinates of the lower left and the upper right corner
          of the box. "Lower left" means the minimum coordinates and "upper right"
          means the maximum. These are encapsulated in a L{BoundingBox} object.
        r   z.Layout.boundary_box() supports 2D layouts onlyr   N)r   r   rf   r   )r   rb   Zx0Zy0x1y1r   r   r   rP   N  s    
zLayout.bounding_boxc                    s   | dp| t dkr(dg| j  n4t dkr\t d tkr\t d tkr\ d  t | jkrxtd| j |   fddt| jD }| 	| dS )	a  Centers the layout around the given point.

        The point itself can be supplied as multiple unnamed arguments, as a
        simple unnamed list or as a keyword argument. This operation moves
        the centroid of the layout to the given point. If no point is supplied,
        defaults to the origin of the coordinate system.

        @keyword p: the point where the centroid of the layout will be after
          the operation.pr   r9   r-   z'the given point must have %d dimensionsc                    s   g | ]} | |  qS r   r   rB   centerr^   r   r   r   v  s     z!Layout.center.<locals>.<listcomp>N)
r<   r   r   rE   r   r2   r   r^   rF   rK   )r   rH   r>   Zvecr   rj   r   rk   d  s    
,zLayout.centerc                 C   s   |   S )z$Creates an exact copy of the layout.)r,   r"   r   r   r   copyy  s    zLayout.copyTc                 C   s  t |tr8| jdkrtd|j|jg|j|jg }}nt|| jkr^dg| j t	| }}nt|d| j krt	|d| j t	|| jd  }}t
| jD ].}|| || kr|| ||  ||< ||< qdd t||D }z|  \}}W n0 tk
r$   dg| j dg| j  }}Y nX dd t||D }	t|	D ]<\}}
|
dkrBd|	|< ||  d	8  < ||  d	7  < qBd
d t|	|D }|rt|}|g| j }g }t
| jD ]H}|| || |	|   d }||| ||  ||  8 }|| q| j|  | j|  dS )a  Fits the layout into the given bounding box.

        The layout will be modified in-place.

        @param bbox: the bounding box in which to fit the layout. If the
          dimension of the layout is d, it can either be a d-tuple (defining
          the sizes of the box), a 2d-tuple (defining the coordinates of the
          top left and the bottom right point of the box), or a L{BoundingBox}
          object (for 2D layouts only).
        @param keep_aspect_ratio: whether to keep the aspect ratio of the current
          layout. If C{False}, the layout will be rescaled to fit exactly into
          the bounding box. If C{True}, the original aspect ratio of the layout
          will be kept and it will be centered within the bounding box.
        r   z'bounding boxes work for 2D layouts onlyr9   r   Nc                 S   s   g | ]\}}|| qS r   r   r   Zmin_valZmax_valr   r   r   r     s    z#Layout.fit_into.<locals>.<listcomp>c                 S   s   g | ]\}}|| qS r   r   rm   r   r   r   r     s     r-   c                 S   s   g | ]\}}t || qS r   r1   )r   Zcurrent_sizeZtarget_sizer   r   r   r     s   g       @)r6   r   r   rO   rS   rT   rQ   rR   r   r   rF   ziprf   r   r=   r`   r3   rA   rK   )r   rU   Zkeep_aspect_ratioZcornerZtarget_sizesZopposite_cornerirc   rd   sizessizeratiosZ	min_ratioZtranslationsZtransr   r   r   fit_into}  sJ    

& 

zLayout.fit_into)NN)r   r-   )rL   rM   r9   rN   )r   )r   )T)r.   
__module____qualname____doc__r    r#   r'   r)   r*   r,   r/   propertyr   r   r3   r7   r@   rA   rK   rW   r[   r^   rf   rP   rk   rl   rs   r   r   r   r   r	      s2    



%
/

r	   Nc                 O   s   ddl m} |dkr|d }t|dr,|}nd| }|dd dkrZd|d	< |dd }n$|d
d dkr~d|d	< |dd
 }t| j| j| }t|dstd|| f||}t|t	st	|}|S )a
  Returns the layout of the graph according to a layout algorithm.

    Parameters and keyword arguments not specified here are passed to the
    layout algorithm directly. See the documentation of the layout
    algorithms for the explanation of these parameters.

    Registered layout names understood by this method are:

      - C{auto}, C{automatic}: automatic layout
        (see L{Graph.layout_auto})

      - C{bipartite}: bipartite layout (see L{GraphBase.layout_bipartite})

      - C{circle}, C{circular}: circular layout
        (see L{GraphBase.layout_circle})

      - C{dh}, C{davidson_harel}: Davidson-Harel layout (see
        L{GraphBase.layout_davidson_harel})

      - C{drl}: DrL layout for large graphs (see L{GraphBase.layout_drl})

      - C{drl_3d}: 3D DrL layout for large graphs
        (see L{GraphBase.layout_drl})

      - C{fr}, C{fruchterman_reingold}: Fruchterman-Reingold layout
        (see L{GraphBase.layout_fruchterman_reingold}).

      - C{fr_3d}, C{fr3d}, C{fruchterman_reingold_3d}: 3D Fruchterman-
        Reingold layout (see L{GraphBase.layout_fruchterman_reingold}).

      - C{grid}: regular grid layout in 2D (see L{GraphBase.layout_grid})

      - C{grid_3d}: regular grid layout in 3D (see L{GraphBase.layout_grid})

      - C{graphopt}: the graphopt algorithm (see L{GraphBase.layout_graphopt})

      - C{kk}, C{kamada_kawai}: Kamada-Kawai layout
        (see L{GraphBase.layout_kamada_kawai})

      - C{kk_3d}, C{kk3d}, C{kamada_kawai_3d}: 3D Kamada-Kawai layout
        (see L{GraphBase.layout_kamada_kawai})

      - C{lgl}, C{large}, C{large_graph}: Large Graph Layout
        (see L{GraphBase.layout_lgl})

      - C{mds}: multidimensional scaling layout (see L{GraphBase.layout_mds})

      - C{random}: random layout (see L{GraphBase.layout_random})

      - C{random_3d}: random 3D layout (see L{GraphBase.layout_random})

      - C{rt}, C{tree}, C{reingold_tilford}: Reingold-Tilford tree
        layout (see L{GraphBase.layout_reingold_tilford})

      - C{rt_circular}, C{reingold_tilford_circular}: circular
        Reingold-Tilford tree layout
        (see L{GraphBase.layout_reingold_tilford_circular})

      - C{sphere}, C{spherical}, C{circle_3d}, C{circular_3d}: spherical
        layout (see L{GraphBase.layout_circle})

      - C{star}: star layout (see L{GraphBase.layout_star})

      - C{sugiyama}: Sugiyama layout (see L{Graph.layout_sugiyama})

    @param layout: the layout to use. This can be one of the registered
      layout names or a callable which returns either a L{Layout} object or
      a list of lists containing the coordinates. If C{None}, uses the
      value of the C{plotting.layout} configuration key.
    @return: a L{Layout} object.
    r   )configNzplotting.layout__call__Z_3d   r   Z3dzlayout method must be callable)
Zigraphrx   hasattrlowergetattrr+   r   r   r6   r	   )graphlayoutrH   r>   rx   methodr   r   r   r
     s&    I


r
   c                 O   s  d|   krb| d }t|tr"|S t|ttfr8t|S t|drPt|||S | j|f||S |dd}|  }d|krd|kr|dkrd|krttt	| j
d | j
d | j
d S ttt	| j
d | j
d S |  d	kr|  rd
}n|  dkrd}nd}| j|f||S )a  Chooses and runs a suitable layout function based on simple
    topological properties of the graph.

    This function tries to choose an appropriate layout function for
    the graph using the following rules:

      1. If the graph has an attribute called C{layout}, it will be
         used. It may either be a L{Layout} instance, a list of
         coordinate pairs, the name of a layout function, or a
         callable function which generates the layout when called
         with the graph as a parameter.

      2. Otherwise, if the graph has vertex attributes called C{x}
         and C{y}, these will be used as coordinates in the layout.
         When a 3D layout is requested (by setting C{dim} to 3),
         a vertex attribute named C{z} will also be needed.

      3. Otherwise, if the graph is connected and has at most 100
         vertices, the Kamada-Kawai layout will be used (see
         L{GraphBase.layout_kamada_kawai()}).

      4. Otherwise, if the graph has at most 1000 vertices, the
         Fruchterman-Reingold layout will be used (see
         L{GraphBase.layout_fruchterman_reingold()}).

      5. If everything else above failed, the DrL layout algorithm
         will be used (see L{GraphBase.layout_drl()}).

    All the arguments of this function except C{dim} are passed on
    to the chosen layout function (in case we have to call some layout
    function).

    @keyword dim: specifies whether we would like to obtain a 2D or a
      3D layout.
    @return: a L{Layout} object.
    r   ry   r   r   r4   r?   r{   zrL   kki  frdrl)
attributesr6   r	   r   rX   r}   r   r<   Zvertex_attributesrn   vsZvcountZis_connected)r   rH   r>   r   r   Zvattrsalgor   r   r   r     s*    %

&r   r-   rL   Fc           
   
   C   sP   |st t| ||||||S t| ||||||\}}}	|	|jd< t ||fS )a  Places the vertices using a layered Sugiyama layout.

    This is a layered layout that is most suitable for directed acyclic graphs,
    although it works on undirected or cyclic graphs as well.

    Each vertex is assigned to a layer and each layer is placed on a horizontal
    line. Vertices within the same layer are then permuted using the barycenter
    heuristic that tries to minimize edge crossings.

    Dummy vertices will be added on edges that span more than one layer. The
    returned layout therefore contains more rows than the number of nodes in
    the original graph; the extra rows correspond to the dummy vertices.

    @param layers: a vector specifying a non-negative integer layer index for
      each vertex, or the name of a numeric vertex attribute that contains
      the layer indices. If C{None}, a layering will be determined
      automatically. For undirected graphs, a spanning tree will be extracted
      and vertices will be assigned to layers using a breadth first search from
      the node with the largest degree. For directed graphs, cycles are broken
      by reversing the direction of edges in an approximate feedback arc set
      using the heuristic of Eades, Lin and Smyth, and then using longest path
      layering to place the vertices in layers.
    @param weights: edge weights to be used. Can be a sequence or iterable or
      even an edge attribute name.
    @param hgap: minimum horizontal gap between vertices in the same layer.
    @param vgap: vertical gap between layers. The layer index will be
      multiplied by I{vgap} to obtain the Y coordinate.
    @param maxiter: maximum number of iterations to take in the crossing
      reduction step. Increase this if you feel that you are getting too many
      edge crossings.
    @param return_extended_graph: specifies that the extended graph with the
      added dummy vertices should also be returned. When this is C{True}, the
      result will be a tuple containing the layout and the extended graph. The
      first |V| nodes of the extended graph will correspond to the nodes of the
      original graph, the remaining ones are dummy nodes. Plotting the extended
      graph with the returned layout and hidden dummy nodes will produce a layout
      that is similar to the original graph, but with the added edge bends.
      The extended graph also contains an edge attribute called C{_original_eid}
      which specifies the ID of the edge in the original graph from which the
      edge of the extended graph was created.
    @return: the calculated layout, which may (and usually will) have more rows
      than the number of vertices; the remaining rows correspond to the dummy
      nodes introduced in the layering step. When C{return_extended_graph} is
      C{True}, it will also contain the extended graph.

    @newfield ref: Reference
    @ref: K Sugiyama, S Tagawa, M Toda: Methods for visual understanding of
      hierarchical system structures. IEEE Systems, Man and Cybernetics      11(2):109-125, 1981.
    @ref: P Eades, X Lin and WF Smyth: A fast effective heuristic for the
      feedback arc set problem. Information Processing Letters 47:319-323, 1993.
    Z_original_eid)r	   r   r   es)
r   ZlayersweightsZhgapZvgapmaxiterZreturn_extended_graphr   Z
extd_graphZextd_to_orig_eidsr   r   r   r   ]  s.    =            

r   c                    s     fdd} j |_  j|_|S )zWraps an existing layout method to ensure that it returns a Layout
    instead of a list of lists.

    @param func: the method to wrap. Must be a method of the Graph object.
    @return: a new method
    c                     s     | |}t |tst|}|S r!   )r6   r	   )rH   r>   r   funcr   r   result  s    

z&_layout_method_wrapper.<locals>.resultr.   rv   r   r   r   r   r   r     s    r   c                    s.    fdd}d j  |_ d j  j f |_|S )a#  Creates an alias for the 3D version of the given layout algoritm.

    This function is a decorator that creates a method which calls I{func} after
    attaching C{dim=3} to the list of keyword arguments.

    @param func: must be a method of the Graph object.
    @return: a new method
    c                     s   d|d<  | |S )Nr{   r   r   )rH   r>   r   r   r   r     s    z_3d_version_for.<locals>.resultz%s_3dz/Alias for L{%s()} with dim=3.

@see: Graph.%s()r   r   r   r   r   r     s    
r   Zlayout_autoZlayout_bipartiteZlayout_circleZlayout_davidson_harelZ
layout_drlZlayout_fruchterman_reingoldZlayout_graphoptZlayout_gridZlayout_kamada_kawaiZ
layout_lglZ
layout_mdsZlayout_randomZlayout_reingold_tilfordZ layout_reingold_tilford_circularZlayout_sphereZlayout_starZlayout_sugiyama)autoZ	automaticZ	bipartitecircleZcircularZdavidson_harelZdhr   r   Zfruchterman_reingoldZgraphoptgridr   Zkamada_kawaiZlglZlargeZlarge_graphZmdsrandomrttreeZreingold_tilfordZrt_circularZreingold_tilford_circularZsphereZ	sphericalstarZsugiyama)N)NNr-   r-   rL   F)rv   mathr   r   r   Zigraph._igraphr   Zigraph.drawing.utilsr   Zigraph.statisticsr   __all__r	   r
   r   r   r   r   r   r   r   r   r   <module>   sb       
`F      
K