ConnectionList

ConnectionList[distmatrix,(options)]gives a list of connected point pairs according to the obtuse-angle-shadowing rule in a discrete point set, if distmatrix is the squared-distance matrix for the distinct points. This
matrix should contain real elements, but it does not necessarily need
to be symmetric.

The output is compatible with the graph objects in the Graph Utilities Package .
If the option Type is set to Directed: The point A in the point set is NOT connected to the point B if there exist one other points C in the point set,such that C is connected to B and the angles ACB is obtuse. Further,two points in the network are NOT connected if the distance between them is smaller or equal to SmoothenDistance or larger or equal to twice the CutoffRadius.
If the option Type is set to Undirected: Two points A and B in the point set are NOT connected if there exist two other points C and D (maybe identical) in the point set,such that C is connected to A and D is connected to B and both the angles ACB and ADB are obtuse. Further,two points in the network are NOT connected if the distance between them is is smaller or equal to SmoothenDistanceor larger or equal to twice the CutoffRadius. Each connected point pair occurs only once in the returned list,with the lowest point number coming first.
The resulting list is sorted according to the length of the connections.
  • The following options can be given:
ConnectionsToExclude{}connections to exclude in the evaluation
CutoffRadiusInfinitypoints separated by twice the CutoffRadius or more are not connected
NeighborLevel1all connected points for lower values of NeighborLevel are excluded in the evaluation
SmoothenDistance0.points separated by SmoothenDistance or less are not connected
TypeDirectedthe connection graph can be Directed or Undirected
In[1]:=
Click for copyable input
Some 2D-points:
In[2]:=
Click for copyable input
We can calculate the squared distance matrix, using the DirectedDistanceMatrix function. The DirectedDistanceMatrix function can be given a DistanceFunction option to define the distance measure. With the default setting DistanceFunction->Automatic, DirectedDistanceMatrix uses the square of EuclideanDistance for numeric data, JaccardDissimilarity for Boolean data, and EditDistance for string data. If you use some other setting for this option, you should consider using the square of that distance measure.
In[3]:=
Click for copyable input
Out[3]=
When the squared distance matrix has been calculated, this determines completely how the points should be connected. The ConnectionList routine does not need or use information about the dimensionality of the control points.
In[4]:=
Click for copyable input
Out[4]=
For these 2D-points we can make a map over both their positions and their connections.
In[5]:=
Click for copyable input
Out[5]=
For point sets of higher dimensionality we might use the Graph Utilities Package to display the connections.
In[6]:=
Click for copyable input
Out[6]=
In[7]:=
Click for copyable input
Out[7]=
There are also other functions Graph Utilities Package that might use the connection list as input. E.g. ToCombinatoricaGraph converts the list to the Combinatorica representation of the graph.