U
    Ñtœd$  ã                   @   s\   d dl mZmZmZ d dlmZ d dlmZ dd„ Z	dd„ Z
dd	d
„Zddd„Zdd„ ZdS )é    )ÚINÚOUTÚarpack_options)Ú	Histogram)Ú
deprecatedc                 O   s   t |d< | j||ŽS )z[Returns the in-degrees in a list.

    See L{GraphBase.degree} for possible arguments.
    Úmode)r   Údegree©ÚgraphÚargsÚkwds© r   úJ/home/sam/Atlas/atlas_env/lib/python3.8/site-packages/igraph/structural.pyÚ	_indegree
   s    r   c                 O   s   t |d< | j||ŽS )z\Returns the out-degrees in a list.

    See L{GraphBase.degree} for possible arguments.
    r   )r   r   r	   r   r   r   Ú
_outdegree   s    r   é   c                 O   s   t || j||Žƒ}|S )a  Calculates the degree distribution of the graph.

    Unknown keyword arguments are directly passed to L{GraphBase.degree}.

    @param bin_width: the bin width of the histogram
    @return: a histogram representing the degree distribution of the
      graph.
    )r   r   )r
   Z	bin_widthr   r   Úresultr   r   r   Ú_degree_distribution   s    	r   NTç333333ë?Úprpackc              
   C   s$   |dkrt }|  |||dd|||¡S )a¦  Calculates the PageRank values of a graph.

    @param vertices: the indices of the vertices being queried.
      C{None} means all of the vertices.
    @param directed: whether to consider directed paths.
    @param damping: the damping factor. M{1-damping} is the probability of
      resetting the random walk to a uniform distribution in each step.
    @param weights: edge weights to be used. Can be a sequence or iterable
      or even an edge attribute name.
    @param arpack_options: an L{ARPACKOptions} object used to fine-tune
      the ARPACK eigenvector calculation. If omitted, the module-level
      variable called C{arpack_options} is used. This argument is
      ignored if not the ARPACK implementation is used, see the
      I{implementation} argument.
    @param implementation: which implementation to use to solve the
      PageRank eigenproblem. Possible values are:
        - C{"prpack"}: use the PRPACK library. This is a new
          implementation in igraph 0.7
        - C{"arpack"}: use the ARPACK library. This implementation
          was used from version 0.5, until version 0.7.
    @return: a list with the PageRank values of the specified vertices.
    N)Údefault_arpack_optionsZpersonalized_pagerank)r
   ZverticesZdirectedZdampingÚweightsr   Úimplementationr   r   r   Ú	_pagerank)   s    ør   c                 O   s   t dƒ | j||ŽS )z)Deprecated alias to L{Graph.distances()}.zCGraph.shortest_paths() is deprecated; use Graph.distances() instead)r   Z	distancesr	   r   r   r   Ú_shortest_pathsV   s    r   )r   )NTr   NNr   )Zigraph._igraphr   r   r   r   Zigraph.statisticsr   Zigraph.utilsr   r   r   r   r   r   r   r   r   r   Ú<module>   s   		
      ù
-