| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=ip), | intent(in) | :: | istart |
indices for start and end nodes |
||
| integer(kind=ip), | intent(in), | dimension(:) | :: | iend |
pure function moves_any_z(istart, iend) result(imoves) integer(ip),intent(in) :: istart !! indices for start and end nodes integer(ip),dimension(:),intent(in) :: iend integer(ip) :: imoves integer :: i integer(ip) :: idx i = 0 imoves = 0 idx = istart do !write(*,*) nodes(idx)%name if (any(idx == iend)) exit ! if (idx == istart) write(*,*) 'back to start' imoves = imoves + 1 ! another move i = i + 1 if (i>len(instructions)) i = 1 idx = nodes(idx)%lr_idx(instructions_ints(i)) end do end function moves_any_z