Returns the first heap element without removing it.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_heap_type), | intent(inout) | :: | heap | |||
integer(kind=keyt), | intent(out) | :: | key | |||
integer(kind=valt), | intent(out) | :: | value | |||
logical, | intent(out) | :: | found |
SUBROUTINE dbcsr_heap_get_first(heap, key, value, found) !! Returns the first heap element without removing it. TYPE(dbcsr_heap_type), INTENT(INOUT) :: heap INTEGER(KIND=keyt), INTENT(OUT) :: key INTEGER(KIND=valt), INTENT(OUT) :: value LOGICAL, INTENT(OUT) :: found IF (heap%n .LT. 1) THEN found = .FALSE. ELSE found = .TRUE. key = heap%nodes(1)%node%key value = heap%nodes(1)%node%value END IF END SUBROUTINE dbcsr_heap_get_first