ó
 ,µ[c           @   s  d  Z  d d l Z d d l m Z d d l Z e j d d ƒ Z e	 e e ƒ ƒ Z
 d e
 f GHd GHe j e ƒ Z e j e ƒ \ Z Z d e e j ƒ  e e j ƒ  d GHe GHe j e d	 e
 ƒZ d
 GHe j e ƒ \ Z Z d e e j ƒ  e e j ƒ  d GHe GHd S(   s˜   
===
Rcm
===

Cuthill-McKee ordering of matrices

The reverse Cuthill-McKee algorithm gives a sparse matrix ordering that
reduces the matrix bandwidth.
iÿÿÿÿN(   t   reverse_cuthill_mckee_orderingi   t   orderings   unordered Laplacian matrixs   bandwidth: %di   t   nodelists   low-bandwidth Laplacian matrix(   t   __doc__t   networkxt   nxt   networkx.utilsR    t   numpyt   npt   grid_2d_grapht   Gt   listt   rcmt   laplacian_matrixt   At   nonzerot   xt   yt   maxt   B(    (    (    s1   share/doc/networkx-2.2/examples/algorithms/rcm.pyt   <module>
   s    %%