§
    )ÁôgG  ã                   ó"   — d dl ZddlmZ dd„ZdS )é    Né   )Ú_spathéÿÿÿÿFc           	      óä  — |dk     r
|| j         z  }d|z  dz   f| j         dz
  z  }t          j        |¦  «        |z
  }t          j        ||t          j        |¦  «        d¬¦  «        }t          j                             |¦  «        }t          j        || j         |fd¬¦  «        j        }| j	        d|…         | j	        |dz   d…         z   }t          j        |¦  «        }	t          j                             |¦  «        }
t          j        |	|t          j
        |¦  «        d¬¦  «        }t          j        || j         |
fd¬¦  «        j        }t          j        |	|t          j        |d|	j        ¬	¦  «        d¬¦  «        }t          j        || j         |
fd¬¦  «        j        }t          j        | |¬
¦  «        }|                     ||d¬¦  «        \  }}|D ])}|t!          |¦  «                 }|t          j        k    r nŒ*|                     |¦  «        }|s[t          j        |¦  «        }t          j        |dd…d|…f         |dd…|dz   d…f         gd¬¦  «        }t          j        |¦  «        }||fS )aB  Find the shortest path through an n-d array from one side to another.

    Parameters
    ----------
    arr : ndarray of float64
    reach : int, optional
        By default (``reach = 1``), the shortest path can only move
        one row up or down for every step it moves forward (i.e.,
        the path gradient is limited to 1). `reach` defines the
        number of elements that can be skipped along each non-axis
        dimension at each step.
    axis : int, optional
        The axis along which the path must always move forward (default -1)
    output_indexlist : bool, optional
        See return value `p` for explanation.

    Returns
    -------
    p : iterable of int
        For each step along `axis`, the coordinate of the shortest path.
        If `output_indexlist` is True, then the path is returned as a list of
        n-d tuples that index into `arr`. If False, then the path is returned
        as an array listing the coordinates of the path along the non-axis
        dimensions for each step along the axis dimension. That is,
        `p.shape == (arr.shape[axis], arr.ndim-1)` except that p is squeezed
        before returning so if `arr.ndim == 2`, then
        `p.shape == (arr.shape[axis],)`
    cost : float
        Cost of path.  This is the absolute sum of all the
        differences along the path.

    r   é   r   )ÚaxisÚF)ÚorderNr   )Údtype)ÚoffsetsF)Úfind_all_ends)ÚndimÚnpÚindicesÚinsertÚonesÚmultiplyÚreduceÚreshapeÚTÚshapeÚzerosÚfullr   r   ÚMCP_DiffÚ
find_costsÚtupleÚinfÚ	tracebackÚarrayÚconcatenateÚsqueeze)ÚarrÚreachr   Úoutput_indexlistÚoffset_ind_shapeÚoffset_indicesÚoffset_sizer   Únon_axis_shapeÚnon_axis_indicesÚnon_axis_sizeÚstart_indicesÚstartsÚend_indicesÚendsÚmÚcostsr   ÚendÚcosts                       ú\/var/www/html/bac/bac_backend/python/env/lib/python3.11/site-packages/skimage/graph/spath.pyÚshortest_pathr4      s~  € ðH ˆa‚x€xØ�”ÑˆØ˜E™	 A™Ð'¨3¬8°a©<Ñ8ÐÝ”ZÐ 0Ñ1Ô1°EÑ9€NÝ”Y˜~¨tµR´WÐ=MÑ5NÔ5NÐUVÐWÑWÔW€NÝ”+×$Ò$Ð%5Ñ6Ô6€KÝŒj˜¨#¬(°KÐ)@ÈÐLÑLÔLÔN€Gð
 ”Y˜u ˜uÔ%¨¬	°$¸±(°*°*Ô(=Ñ=€NÝ”z .Ñ1Ô1ÐÝ”K×&Ò& ~Ñ6Ô6€MÝ”IÐ.°µb´h¸~Ñ6NÔ6NÐUVÐWÑWÔW€MÝŒZ˜¨¬°-Ð'@ÈÐLÑLÔLÔN€FÝ”)ØØÝ
Œ� Ð*:Ô*@ÐAÑAÔAØð	ñ ô €Kõ Œ:�k C¤H¨mÐ#<ÀCÐHÑHÔHÔJ€Dõ 	Œ˜ WÐ-Ñ-Ô-€AØ—|’| F¨DÀ�|ÑFÔFÑ€Eˆ9ð ð ð ˆØ•U˜3‘Z”ZÔ ˆØ•2”6Š>ˆ>ØˆEð à—’˜CÑ Ô €Iàð *Ý”H˜YÑ'Ô'ˆ	Ý”NØ�q�q�q˜%˜4˜%�xÔ  )¨A¨A¨A¨t°a©x¨z¨z¨MÔ":Ð;À!ð
ñ 
ô 
ˆ	õ ”J˜yÑ)Ô)ˆ	à�dˆ?Ðó    )r   r   F)Únumpyr   Ú r   r4   © r5   r3   ú<module>r9      sG   ðØ Ð Ð Ð Ø Ð Ð Ð Ð Ð ðNð Nð Nð Nð Nð Nr5   