CoCoA:PreprocessPts5
PreprocessPts5
A representative subset of points
Description
This function is implemented in CoCoALib (requires an active CoCoAServer).
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.
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.
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).
Note: values are represented internally in floating point, so the results
are only approximate, and may vary from one type of computer to
another.
Example
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]] -------------------------------
Syntax
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
<type>list</type> <type>cocoaserver</type>