VLmostdistanceNeighborN

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Analytical Geometry
Introduced first in SolidGeometry 5.4, Creation date: 2024-06-21, Last change: 2025-09-15

return a list of n points ou of a points list that have the maximum distance sum

Description

BE CAREFUL WITH THE LONG LIST become slow easily
Think about using CVLremstraightAmin first
MUST BE ONE CONTOUR, NOT A POINT CLOUD. BUGGY FOR POINTS CLOUDS SINCE ORDER IS UNKNOWN


See Also: VLnearestNeighbor , VLnearestNeighborN , CVLremstraightAmin

Example Illustration

 missing image of VLmostdistanceNeighborN(VL,dim)

Syntax

[nn,ll]=VLmostdistanceNeighborN(VL,[dim])

Input Parameter

VL: Vertex list
dim: number of points required

Output Parameter

nn: full list of combiations
ll: full list of distances

Examples


VLmostdistanceNeighborN(CPLsample(3),4)
VLmostdistanceNeighborN(CPLsample(23),3);
VLmostdistanceNeighborN(CPLsample(41),3); %BUGGY FOR POINTS CLOUDS SINCE ORDER IS UNKNOWN
VLmostdistanceNeighborN(CPLsample(17),3);
VLmostdistanceNeighborN(CPLsample(17),4);
VLmostdistanceNeighborN(CPLsample(17),5);




Copyright 2024-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Last html export of this page out of FM database by TL: 2025-09-21