Skip to main content
. 2018 Aug 21;20(9):625. doi: 10.3390/e20090625
Algorithm 4Depth-firstSearch(P:(GLOBAL)input_path_number; K:input_clusters; Rc:input_current_region; Rt:input_target_region), VISITED[]:input_source_flag.
1: P // The number of path between Rs and Rt
2: VISITED[Rc] ← True
3: ifRc = Rt then
4:   PP + 1
5: else
6:   for each adjacent region Rn of Rc do
7:     if VISITED[Rn] = False then Depth-firstSearch(P, K, Rn, Rt, VISITED[Rn])
8:     end if
9:   end for
10: end if
11: VISITED[Rc] ← False