Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Variables
Type
Visibility
Attributes
Name
Initial
character(len=MAX_SUGGEST_LEN),
private
::
aa
character(len=MAX_SUGGEST_LEN),
private
::
bb
integer,
private,
allocatable
::
cur(:)
integer,
private
::
i
integer,
private
::
j
integer,
private
::
la
integer,
private
::
lb
integer,
private,
allocatable
::
prev(:)
Source Code
pure function levenshtein(a,b)result(dist)!! Levenshtein edit distance between two (capped) strings.character(len=*),intent(in)::a,binteger::distinteger::la,lb,i,jinteger,allocatable::prev(:),cur(:)character(len=MAX_SUGGEST_LEN)::aa,bbaa=abb=bla=min(len_trim(a),MAX_SUGGEST_LEN)lb=min(len_trim(b),MAX_SUGGEST_LEN)allocate(prev(0:lb),cur(0:lb))do j=0,lbprev(j)=jend do do i=1,lacur(0)=ido j=1,lbif(aa(i:i)==bb(j:j))thencur(j)=prev(j-1)elsecur(j)=1+min(prev(j),cur(j-1),prev(j-1))end if end doprev=curend dodist=prev(lb)end function levenshtein