You are here: Start » FIL.NET » Function Reference » Data Classification » Clustering » FIL.ClusterPoints2D_SingleLink
Clusters data using hierarchical single-link algorithm.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
C++
C#
public static void ClusterPoints2D_SingleLink ( IList<FilNet.Point2D> inPoints, int? inClusters, float? inMaxDistance, IList<List<FilNet.Point2D>> outClusters )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inPoints | System.Collections.Generic.IList<FilNet.Point2D> | Array of points to cluster. | ||
![]() | inClusters | int? | <2, +INF> | Number of clusters to extract. Default value: ftl::NIL. | |
![]() | inMaxDistance | float? | <0.0f, INF> | Maximum distance between two closest points in a cluster. Default value: ftl::NIL. | |
![]() | outClusters | System.Collections.Generic.IList<System.Collections.Generic.List<FilNet.Point2D>> | Resulting Point2D clusters. |
Remarks
If input parameter inClusters is not set, number of clusters is determined in the following way:
- if inMaxDistance is set then every two points of mutual distance smaller or equal to inMaxDistance belong to one cluster;
- if inMaxDistance is not set then an array of sorted edges' lengths of minimum spanning tree of inPoints is determined and
a pair of two subsequent elements which makes a maximum difference is found.
Maximum distance is defined as the smaller element of such a pair.
In other words number of clusters is the number of vertical lines in the dendrogram cut by a horizontal line that can transverse the maximum distance vertically without intersecting a cluster.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Desired number of clusters is greater than inPoints size in ClusterPoints2D_SingleLink. |
DomainError | Filter input inPoints is empty in ClusterPoints2D_SingleLink. |
DomainError | Too big inPoints array in ClusterPoints2D_SingleLink. |