Hacked By AnonymousFox
�
)�f� � � � d dl mZ dgZd� ZdS )� )�division�ramerdouglasc � � t | � � dk r| S | d | d k r| d | d fn| d | d f\ }}|d |d z
}|d |d z
}g }|j }| dd� D ]G}|d |d z
} |d |d z
}
||
|z | |z z
dz |dz |dz z z � � �Ht |� � }||dz k r||gS t |� � dk rt |� � dz }n|� |� � }t | d|dz � |� � t | |dz d� |� � dd� z S ) a Does Ramer-Douglas-Peucker simplification of a curve with `dist`
threshold.
`line` is a list-of-tuples, where each tuple is a 2D coordinate
Usage is like so:
>>> myline = [(0.0, 0.0), (1.0, 2.0), (2.0, 1.0)]
>>> simplified = ramerdouglas(myline, dist = 1.0)
� r ������� � i� N)�len�append�max�indexr )
�line�dist�begin�end�begin_end_x�begin_end_y�distSq�dist_append�curr�begin_curr_x�begin_curr_y�maxdist�poss
��/builddir/build/BUILDROOT/lve-stats-4.2.8-1.el8.x86_64/opt/cloudlinux/venv/lib/python3.11/site-packages/lvestats/lib/chart/rdp.pyr r s� � � �4�y�y�1�}�}���*.�q�'�T�"�X�*=�*=�D��G�T�"�X�&�&�D��G�T�RT�X�CV�L�U�C��a�&�5��8�#�K��a�&�5��8�#�K�
�F��-�K��Q�r�T�
� 7� 7���A�w��q��)���A�w��q��)����\�K�/�,��2L�L�q�P� �!�^�k�1�n�4�6� 7� 7� 7� 7� �&�k�k�G��������s�|��
�6�{�{�S����&�k�k�Q�����l�l�7�#�#����h�s�Q�w�h���.�.���c�A�g�h�h���.�.�q�r�r�2�
3� 4� N)�
__future__r �__all__r � r r �<module>r! s: �� � � � � � ��
��&4� &4� &4� &4� &4r
Hacked By AnonymousFox1.0, Coded By AnonymousFox