ó
    {ñ:i8&  ã                   ó4   • S SK r S SKrS SKJr   " S S5      rg)é    N)Ú_apic                   ó€   • \ rS rSrSrSS jrS r\S 5       rS r	S r
\S	 5       r\S
 5       rS r\S 5       rS rSrg)ÚTriangulationé   a¶  
An unstructured triangular grid consisting of npoints points and
ntri triangles.  The triangles can either be specified by the user
or automatically generated using a Delaunay triangulation.

Parameters
----------
x, y : (npoints,) array-like
    Coordinates of grid points.
triangles : (ntri, 3) array-like of int, optional
    For each triangle, the indices of the three points that make
    up the triangle, ordered in an anticlockwise manner.  If not
    specified, the Delaunay triangulation is calculated.
mask : (ntri,) array-like of bool, optional
    Which triangles are masked out.

Attributes
----------
triangles : (ntri, 3) array of int
    For each triangle, the indices of the three points that make
    up the triangle, ordered in an anticlockwise manner. If you want to
    take the *mask* into account, use `get_masked_triangles` instead.
mask : (ntri, 3) array of bool or None
    Masked out triangles.
is_delaunay : bool
    Whether the Triangulation is a calculated Delaunay
    triangulation (where *triangles* was not specified) or not.

Notes
-----
For a Triangulation to be valid it must not have duplicate points,
triangles formed from colinear points, or overlapping triangles.
Nc                 óŒ  • SSK Jn  [        R                  " U[        R                  S9U l        [        R                  " U[        R                  S9U l        U R
                  R                  U R                  R                  :w  d  U R
                  R                  S:w  a;  [        SU R
                  R                  < SU R                  R                  < 35      eS U l
        S U l        S U l        SU l        Uc@  UR                  X[        R                   R"                  5      u  U l        U l        SU l        GOK [        R&                  " U[        R(                  S	S
9U l        U R$                  R                  S:w  d  U R$                  R                  S   S:w  a#  [        SU R$                  R                  < 35      eU R$                  R+                  5       [-        U R
                  5      :¼  a<  [        S[-        U R
                  5       SU R$                  R+                  5        35      eU R$                  R/                  5       S:  a<  [        S[-        U R
                  5       SU R$                  R/                  5        35      eS U l        S U l        U R5                  U5        g ! [         a  n[        SU< 35      UeS nAff = f)Nr   )Ú_qhull©Údtypeé   z9x and y must be equal-length 1D arrays, but found shapes z and FTÚC)r
   Úorderz*triangles must be a (N, 3) int array, not é   é   z6triangles must be a (N, 3) int array, but found shape zHtriangles are indices into the points and must be in the range 0 <= i < z but found value )Ú
matplotlibr   ÚnpÚasarrayÚfloat64ÚxÚyÚshapeÚndimÚ
ValueErrorÚmaskÚ_edgesÚ
_neighborsÚis_delaunayÚdelaunayÚsysÚflagsÚverboseÚ	trianglesÚarrayÚint32ÚmaxÚlenÚminÚ_cpp_triangulationÚ
_trifinderÚset_mask)Úselfr   r   r!   r   r   Úes          Ú`/srv/projetos/modelo_ml_acdoc/venv/lib/python3.13/site-packages/matplotlib/tri/_triangulation.pyÚ__init__ÚTriangulation.__init__*   sC  € Ý%ä—’˜A¤R§Z¡ZÑ0ˆŒÜ—’˜A¤R§Z¡ZÑ0ˆŒØ�6‰6�<‰<˜4Ÿ6™6Ÿ<™<Ó'¨4¯6©6¯;©;¸!Ó+;Üð -Ø-1¯V©V¯\©\Ñ,<¸EØ $§¡§¡Ñ/ð1ó 2ð 2ð ˆŒ	ØˆŒØˆŒØ ˆÔàÑð /5¯o©o¸aÄCÇIÁI×DUÑDUÓ.VÑ+ˆDŒN˜DœOØ#ˆDÖð:Ü!#§¢¨)¼2¿8¹8È3Ñ!O�”ð �~‰~×"Ñ" aÓ'¨4¯>©>×+?Ñ+?ÀÑ+BÀaÓ+GÜ ØLØ—~‘~×+Ñ+Ñ.ð0ó1ð 1ð �~‰~×!Ñ!Ó#¤s¨4¯6©6£{Ó2Ü ð&Ü&)¨$¯&©&£k ]Ð2CØ—~‘~×)Ñ)Ó+Ð,ð.ó/ð /ð �~‰~×!Ñ!Ó# aÓ'Ü ð&Ü&)¨$¯&©&£k ]Ð2CØ—~‘~×)Ñ)Ó+Ð,ð.ó/ð /ð #'ˆÔð ˆŒà�‰�dÕøô1 ó :Ü Ð!MØ$-¡=ð"2ó 3Ø89ð:ûð:ús   Ä:)J$ Ê$
KÊ.J>Ê>Kc                 ó@   • U R                  5       R                  U5      $ )aE  
Calculate plane equation coefficients for all unmasked triangles from
the point (x, y) coordinates and specified z-array of shape (npoints).
The returned array has shape (npoints, 3) and allows z-value at (x, y)
position in triangle tri to be calculated using
``z = array[tri, 0] * x  + array[tri, 1] * y + array[tri, 2]``.
)Úget_cpp_triangulationÚcalculate_plane_coefficients)r*   Úzs     r,   r1   Ú*Triangulation.calculate_plane_coefficients]   s   € ð ×)Ñ)Ó+×HÑHÈÓKÐKó    c                 óz   • U R                   c#  U R                  5       R                  5       U l         U R                   $ )a  
Return integer array of shape (nedges, 2) containing all edges of
non-masked triangles.

Each row defines an edge by its start point index and end point
index.  Each edge appears only once, i.e. for an edge between points
*i*  and *j*, there will only be either *(i, j)* or *(j, i)*.
)r   r0   Ú	get_edges©r*   s    r,   ÚedgesÚTriangulation.edgesg   s1   € ð �;‰;ÑØ×4Ñ4Ó6×@Ñ@ÓBˆDŒKØ�{‰{Ðr4   c           	      óh  • SSK Jn  U R                  c”  UR                  U R                  U R
                  U R                  U R                  b  U R                  OSU R                  b  U R                  OSU R                  b  U R                  OSU R                  (       + 5      U l        U R                  $ )zK
Return the underlying C++ Triangulation object, creating it
if necessary.
r   )Ú_tri© )r   r;   r'   r   r   r   r!   r   r   r   r   )r*   r;   s     r,   r0   Ú#Triangulation.get_cpp_triangulationu   s‰   € õ
 	$Ø×"Ñ"Ñ*Ø&*×&8Ñ&8à—‘˜Ÿ™ §¡Ø!ŸY™YÑ2�—	’	¸Ø#Ÿ{™{Ñ6�—’¸BØ#'§?¡?Ñ#>�—’ÀBØ×$Ñ$Ô$ó'&ˆDÔ#ð ×&Ñ&Ð&r4   c                 óh   • U R                   b  U R                  U R                   )    $ U R                  $ )z<
Return an array of triangles taking the mask into account.
)r   r!   r7   s    r,   Úget_masked_trianglesÚ"Triangulation.get_masked_triangles…   s-   € ð �9‰9Ñ Ø—>‘> 4§9¡9 *Ñ-Ð-à—>‘>Ð!r4   c                  óü   • [        U S   [        5      (       a<  U tp SU;   a  [        R                  " S5        SU;   a  [        R                  " S5        O%[        R	                  X5      u  p4pVp[        X4XV5      nX U4$ )aŽ  
Return a Triangulation object from the args and kwargs, and
the remaining args and kwargs with the consumed values removed.

There are two alternatives: either the first argument is a
Triangulation object, in which case it is returned, or the args
and kwargs are sufficient to create a new Triangulation to
return.  In the latter case, see Triangulation.__init__ for
the possible args and kwargs.
r   r!   zOPassing the keyword 'triangles' has no effect when also passing a Triangulationr   zJPassing the keyword 'mask' has no effect when also passing a Triangulation)Ú
isinstancer   r   Úwarn_externalÚ_extract_triangulation_params)ÚargsÚkwargsÚtriangulationr   r   r!   r   s          r,   Úget_from_args_and_kwargsÚ&Triangulation.get_from_args_and_kwargsŽ   sˆ   € ô �d˜1‘gœ}×-Ñ-Ø#'Ð ˆMØ˜fÓ$Ü×"Ò"ð.ô/ð ˜ÓÜ×"Ò"ð.ô/øô
 ×;Ñ;¸DÓIñ 0ˆA�) 4ä)¨!°	Ó@ˆMØ FÐ*Ð*r4   c                 ób  • U tp#n UR                  SS 5      nSnUc  U (       a  U S   nSnUb$   [        R                  " U[        R                  S9nUb%  UR
                  S:w  d  UR                  S   S:w  a  S nUb  U(       a  U SS  n UR                  S	S 5      nX#XFX4$ ! [         a    S n N\f = f)
Nr!   Fr   Tr	   r   r   r   r   )Úpopr   r   r#   r   r   r   )rE   rF   r   r   r!   Ú	from_argsr   s          r,   rD   Ú+Triangulation._extract_triangulation_paramsª   sÄ   € àˆˆˆtà—J‘J˜{¨DÓ1ˆ	Øˆ	ØÑ¦Ø˜Q™ˆIØˆIØÑ ð!ÜŸJšJ y¼¿¹ÑA�	ð Ñ  i§n¡n¸Ó&9Ø&/§o¡o°aÑ&8¸AÓ&=ØˆIØÑ ¦YØ˜˜�8ˆDà�z‰z˜& $Ó'ˆØ�Y dÐ2Ð2øô ó !Ø ’	ð!ús   ®#B ÂB.Â-B.c                 óZ   • U R                   c  SSKJn  U" U 5      U l         U R                   $ )zœ
Return the default `matplotlib.tri.TriFinder` of this
triangulation, creating it if necessary.  This allows the same
TriFinder object to be easily shared.
r   )ÚTrapezoidMapTriFinder)r(   Úmatplotlib.tri._trifinderrO   )r*   rO   s     r,   Úget_trifinderÚTriangulation.get_trifinderÁ   s'   € ð �?‰?Ñ"åGÙ3°DÓ9ˆDŒOØ�‰Ðr4   c                 óz   • U R                   c#  U R                  5       R                  5       U l         U R                   $ )a_  
Return integer array of shape (ntri, 3) containing neighbor triangles.

For each triangle, the indices of the three triangles that
share the same edges, or -1 if there is no such neighboring
triangle.  ``neighbors[i, j]`` is the triangle that is the neighbor
to the edge from point index ``triangles[i, j]`` to point index
``triangles[i, (j+1)%3]``.
)r   r0   Úget_neighborsr7   s    r,   Ú	neighborsÚTriangulation.neighborsÍ   s1   € ð �?‰?Ñ"Ø"×8Ñ8Ó:×HÑHÓJˆDŒOØ�‰Ðr4   c                 ó¾  • Uc  SU l         O[[        R                  " U[        S9U l         U R                   R                  U R
                  R                  S   4:w  a  [        S5      eU R                  b4  U R                  R                  U R                   b  U R                   OS5        SU l	        SU l
        U R                  b  U R                  R                  5         gg)z^
Set or clear the mask array.

Parameters
----------
mask : None or bool array of length ntri
Nr	   r   z3mask array must have same length as triangles arrayr<   )r   r   r   Úboolr   r!   r   r'   r)   r   r   r(   Ú_initialize)r*   r   s     r,   r)   ÚTriangulation.set_maskÜ   s»   € ð ‰<ØˆD�IäŸ
š
 4¬tÑ4ˆDŒIØ�y‰y�‰ 4§>¡>×#7Ñ#7¸Ñ#:Ð"<Ó<Ü ð "3ó 4ð 4ð ×"Ñ"Ñ.Ø×#Ñ#×,Ñ,Ø!ŸY™YÑ2�—	’	¸ô<ð ˆŒØˆŒð �?‰?Ñ&Ø�O‰O×'Ñ'Õ)ð 'r4   )	r'   r   r   r(   r   r   r!   r   r   )NN)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r-   r1   Úpropertyr8   r0   r?   ÚstaticmethodrH   rD   rQ   rU   r)   Ú__static_attributes__r<   r4   r,   r   r      sx   † ñ ôB1òfLð ñó ðò'ò "ð ñ+ó ð+ð6 ñ3ó ð3ò,
ð ñó ðõ*r4   r   )r   Únumpyr   r   r   r   r<   r4   r,   Ú<module>rd      s   ðÛ 
ã å ÷o*ò o*r4   