From CoCoAWiki
Jump to: navigation, search


   <short_description>A representative subset of points</short_description>

This function is implemented in CoCoALib (requires an active <ref>CoCoAServer</ref>). <par/> This function returns a list of well-separated points. The first argument is a list of points in k-dimensional space, and the second argument is list of k tolerances (one for each dimension). The function detects groups of close points (all lying within the given tolerance of each other) and chooses a representative for the whole group; the result is the list of these representatives. <par/> There is a third, optional argument: it should be one of the strings Grid, Subdiv, Aggr and specifies which specific algorithm to use. If there are just two arguments, an automatic choice is made between Subdiv and Aggr; the Subdiv method works well when the original points are densely packed (so the result will be a small list), while the Aggr method is better suited to situations where the original points are less densely packed. The Aggr method regards the tolerances as being slightly flexible. <par/> For a full description of the algorithms we refer to the paper J.Abbott, C.Fassino, L.Torrente Thinning Out Redundant Empirical Data (arXiv:0702327). <par/> Note: values are represented internally in floating point, so the results are only approximate, and may vary from one type of computer to another.


 Pts := [[-1,0],[0,0],[1,0],[99,1],[99,0],[99,-1]];
 Toler := [3,3];
 PreprocessPts5(Pts, Toler);

[[99, 0], [0, 0]]

 PreprocessPts5(Pts, [0.8,0.8]);

[[-1/2, 0], [1, 0], [99, 1/2], [99, -1]]

 PreprocessPts5(Pts, [0.9,0.9], <quotes>Aggr</quotes>); -- exhibits tolerance flex

[[0, 0], [99, 0]]

</example> </description>


PreprocessPts5(Pts: LIST, Toler: LIST): LIST PreprocessPts5(Pts: LIST, Toler: LIST, <quotes>Grid</quotes>): LIST PreprocessPts5(Pts: LIST, Toler: LIST, <quotes>Subdiv</quotes>): LIST PreprocessPts5(Pts: LIST, Toler: LIST, <quotes>Aggr</quotes>): LIST </syntax>

   <see>Introduction to CoCoAServer</see>
   <key>abbott fassino torrente</key>
   <key>preprocessing points</key>