Alternative interface to the Hoshen-Kopelman algorithm from the hk module, which uses a binary matrix created by create_binary_matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in), | dimension(:,:) | :: | matrix | Binary matrix where clusters will be identified. |
|
integer, | intent(out), | dimension(:,:), allocatable | :: | labelled_matrix | Integer matrix which will store the labels of each cluster. Reallocated if necessary. |
|
integer, | intent(out) | :: | num_labels | Overwritten with the total number of disjoint clusters. |