Inhull

Efficient test for points inside a convex hull in n dimensions
11,7K Descargas
Actualizado 6 sep 2012

Ver licencia

Testing if a point is inside a convex hull can be done in a variety of ways. Inhull converts the problem into a dot product. If not supplied, it also computes the convex hull too. Inhull also attempts to avoid memory problems, doing the computation in smaller blocks when appropriate.

Here is a comparison of inhull to tsearchn:
n = 500;
m = 100;
p = 5;
xyz = rand(m,p);
testpts = rand(n,p)-.1;

tic
tess = delaunayn(xyz);
in0 = ~isnan(tsearchn(xyz,tess,testpts));
toc
tic
in1 = inhull(testpts,xyz);
toc

tsearchn: Elapsed time is 0.813646 seconds.
inhull: Elapsed time is 0.242993 seconds.

Citar como

John D'Errico (2026). Inhull (https://es.mathworks.com/matlabcentral/fileexchange/10226-inhull), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R14SP1
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Bounding Regions en Help Center y MATLAB Answers.
Versión Publicado Notas de la versión
1.2.0.0

minor changes for a tiny speed boost

1.1.0.0

Repaired example in the help