hoshen_kopelman Function

public function hoshen_kopelman(matrix) result(num_clusters)

Hoshen-Kopelman algorithm for labelling clusters on a binary matrix.

The function takes in a binary matrix (zeros and positive numbers), labels the clusters of positive numbers and returns the total number of clusters found. The argument matrix is overwritten with the labels.

Arguments

Type IntentOptional AttributesName
integer, intent(inout), dimension(:,:):: matrix

The matrix to be labelled.

Return Value integer

The total number of disjoint clusters labelled.


Calls

proc~~hoshen_kopelman~~CallsGraph proc~hoshen_kopelman hoshen_kopelman proc~uf_find uf_find proc~hoshen_kopelman->proc~uf_find proc~uf_union uf_union proc~hoshen_kopelman->proc~uf_union proc~uf_union->proc~uf_find

Called by

proc~~hoshen_kopelman~~CalledByGraph proc~hoshen_kopelman hoshen_kopelman proc~label label proc~label->proc~hoshen_kopelman proc~probability_distribution probability_distribution proc~probability_distribution->proc~label proc~random_walkers random_walkers proc~random_walkers->proc~label proc~cluster_number_density cluster_number_density proc~cluster_number_density->proc~label

Contents

None