U
    ?h  ã                   @   s  d Z ddlZddlmZ ddlZddlZ	e	 
dd¡Zee	j e¡ƒZedeƒ edƒ e	 e¡Ze e¡\ZZedee  ¡ ee  ¡  d › ƒ eeƒ e	jeedZed	ƒ e e¡\ZZedee  ¡ ee  ¡  d › ƒ eeƒ eje ¡ d
dddd e ¡  dS )zÒ
======================
Reverse Cuthill--McKee
======================

Cuthill-McKee ordering of matrices

The reverse Cuthill--McKee algorithm gives a sparse matrix ordering that
reduces the matrix bandwidth.
é    Né   Zorderingzunordered Laplacian matrixzbandwidth: é   )Znodelistzlow-bandwidth Laplacian matrixFTg      à?)ZcbarZsquareZ
linewidthsZannot)Ú__doc__ÚnumpyÚnpZmatplotlib.pyplotZpyplotZpltZseabornZsnsZnetworkxÚnxZgrid_2d_graphÚGÚlistÚutilsZreverse_cuthill_mckee_orderingZrcmÚprintZlaplacian_matrixÚAZnonzeroÚxÚyÚmaxÚBZheatmapZtodenseÚshow© r   r   ún/var/www/html/venv/lib/python3.8/site-packages/../../../share/doc/networkx-3.1/examples/algorithms/plot_rcm.pyÚ<module>   s&   

&&