관리-도구
편집 파일: rdp.cpython-311.pyc
� �Cg� � � � d gZ d� ZdS )�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) � � ������� � i� N)�len�append�max�indexr ) �line�dist�begin�end�begin_end_x�begin_end_y�dist_sq�dist_append�curr�begin_curr_x�begin_curr_y�maxdist�poss ��/builddir/build/BUILDROOT/lve-stats-4.2.10-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��G��.�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� �'�l�l�G��������s�|�� �7�|�|�c����'�l�l�a�����m�m�G�$�$����h�s�Q�w�h���.�.���c�A�g�h�h���.�.�q�r�r�2� 3� 4� N)�__all__r � r r �<module>r s( �� � ��&4� &4� &4� &4� &4r