improved structure, doc and naming
This commit is contained in:
@@ -25,23 +25,27 @@ group if g.Links size > 0
|
||||
end
|
||||
|
||||
|
||||
graph -> graph : get list branches (end_lists, unvisited_links, current_branch)
|
||||
note left: unvisited links and current branch\n are nilfor the first entry
|
||||
|
||||
loop link in endLinks
|
||||
|
||||
|
||||
graph -> graph : create a new list representing the current branch
|
||||
|
||||
graph -> graph : copy Links id on a list
|
||||
|
||||
loop while hasParent
|
||||
graph -> graph : currentLink = idList[i]
|
||||
graph -> graph : get list previous links
|
||||
|
||||
group if link.dst == currentLink.Src
|
||||
graph -> graph : do something
|
||||
note right : TEST ALGO : edit a\n string that shows every branch
|
||||
graph -> graph : change currentSrc with link.Src
|
||||
graph -> graph : remove currentLink from idList
|
||||
end
|
||||
group else
|
||||
graph -> graph : hasParent = false
|
||||
end
|
||||
group if len(previous_links) == 0
|
||||
graph -> graph : add current list
|
||||
end
|
||||
|
||||
loop for link in previous_links
|
||||
graph -> graph : add the link to the current branch
|
||||
graph -> graph : remove current link from unvisited links list
|
||||
graph -> graph : get list branches (end_lists, unvisited_links, current_branch)
|
||||
note right: for each link we retrieve the branch that\nprecedes it recursively,\n so once we hit the end of a branch\n the entire branch is returned\n to the node where a split happened\nor that is its source
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user