forgex_segment_disjoin_m Module



Interfaces

public interface disjoin

Interface for the procedure disjoin_kernel.

  • private pure subroutine disjoin_kernel(list)

    Disjoins overlapping segments and creates a new list of non-overlapping segments.

    This subroutine takes a list of segments, disjoins any overlapping segments, and creates a new list of non-overlapping segments. It uses a priority queue to sort the segments and processes them to ensure they are disjoined.

    Arguments

    Type IntentOptional Attributes Name
    type(segment_t), intent(inout), allocatable :: list(:)

Functions

public pure function is_overlap_to_seg_list(seg, list, len) result(res)

Checks if a segment overlaps with any segments in a list.

Read more…

Arguments

Type IntentOptional Attributes Name
type(segment_t), intent(in) :: seg
type(segment_t), intent(in) :: list(:)
integer(kind=int32), intent(in) :: len

Return Value logical, (len)

public pure function is_prime_semgment(seg, disjoined_list) result(res)

Checks if a segment is a prime segment within a disjoined list.

Read more…

Arguments

Type IntentOptional Attributes Name
type(segment_t), intent(in) :: seg
type(segment_t), intent(in) :: disjoined_list(:)

Return Value logical


Subroutines

private pure subroutine disjoin_kernel(list)

Disjoins overlapping segments and creates a new list of non-overlapping segments.

Read more…

Arguments

Type IntentOptional Attributes Name
type(segment_t), intent(inout), allocatable :: list(:)

private pure subroutine index_list_from_segment_list(index_list, seg_list)

Extracts a sorted list of unique indices from a list of segments.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(out), allocatable :: index_list(:)
type(segment_t), intent(in) :: seg_list(:)

private pure subroutine register_seg_list(new, list, k)

Registers a new segment into a list if it is valid.

Read more…

Arguments

Type IntentOptional Attributes Name
type(segment_t), intent(inout) :: new
type(segment_t), intent(inout) :: list(:)
integer(kind=int32), intent(inout) :: k

This implementation is badly behaved and should be fixed as soon as possible.

Read more…