tomlf_utils_sort Module

Sorting algorithms to work with hash maps



Interfaces

public interface sort

Create overloaded interface for export

  • private pure subroutine sort_keys(list, idx, compare)

    Entry point for sorting algorithm

    Arguments

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

    List of TOML keys to be sorted

    integer, intent(out), optional :: idx(:)

    Optionally, mapping from unsorted list to sorted list

    procedure(compare_less), optional :: compare

    Function implementing the order relation between two TOML keys


Abstract Interfaces

abstract interface

  • public pure function compare_less(lhs, rhs) result(less)

    Define order relation between two TOML keys

    Arguments

    Type IntentOptional Attributes Name
    type(toml_key), intent(in) :: lhs

    Left hand side TOML key in comparison

    type(toml_key), intent(in) :: rhs

    Right hand side TOML key in comparison

    Return Value logical

    Comparison result