Skip to content
ForCADDocumentation

disjoint_set_map Subroutine

public pure subroutine disjoint_set_map(parent, map, active, include_aliases)

Compress a disjoint-set forest and return compact component identifiers.

Identifiers are one-based and assigned in first-member order.

Arguments

Type IntentOptional Attributes Name
integer, intent(inout), contiguous :: parent(:)

Parent forest; paths are shortened in place.

integer, intent(out), allocatable :: map(:)

Component identifier for every input member.

logical, intent(in), optional :: active(:)

Number components in first active-member order. Entirely inactive components receive zero.

logical, intent(in), optional :: include_aliases

Also label inactive occurrences of participating components; used for geometry design variables.