Sie verfolgen jetzt diese Einreichung
- Aktualisierungen können Sie in Ihrem Feed verfolgter Inhalte sehen.
- Je nach Ihren Kommunikationseinstellungen können Sie auch E-Mails erhalten.
This is a C implementation of the great Matlab code provided by Darren Engwirda. You can find his code in:
http://www.mathworks.com/matlabcentral/fileexchange/10391-fast-points-in-polygon-test
According to my estimates, it works more than 2x as fast. So far, this is one of the fastest implementation that I know of. Sorting is big step of this algorithm. To make it an exact replica, I use stable_sort of std library.
Here is a sample call:
tic(); [In2 On2]=inpolygon_fast(x, y, xv, yv); toc();
The call interface is similiar to inpolygon and not to inpoly. Here x and y are the points to check, where xv and yv define the polygon.
The attachment includes the cpp file, a sample function for comparison and Darren's code.
Zitieren als
Tolga Birdal (2026). Fast Inpolygon in MEX (https://de.mathworks.com/matlabcentral/fileexchange/30819-fast-inpolygon-in-mex), MATLAB Central File Exchange. Abgerufen .
Quellenangaben
Inspiriert von: INPOLY: A fast points-in-polygon test
Allgemeine Informationen
- Version 1.2.0.0 (5,86 KB)
Kompatibilität der MATLAB-Version
- Kompatibel mit allen Versionen
Plattform-Kompatibilität
- Windows
- macOS
- Linux
| Version | Veröffentlicht | Versionshinweise | Action |
|---|---|---|---|
| 1.3.0.0 | n/a |
||
| 1.2.0.0 | Small updates in description. |
||
| 1.0.0.0 |
