Skip to main content
. Author manuscript; available in PMC: 2022 Jul 1.
Published in final edited form as: Microcirculation. 2021 Apr 8;28(5):e12687. doi: 10.1111/micc.12687

Table H 1.

Pseudocode for microvascular closure algorithm

1. FOR i = 1 TO nTerminals DO
2.  terminal aT = venTerminalSampleGeneratorList.getSample //arterial terminal
3.  segments vS = choose closest two ∈ close_segment_list(venous_tree, constraintList)
4.  add_fork (venous_tree, aT, vS[0]) // with or without optimizing
5.  add_fork (venous_tree, aT, vS[1]) // with or without optimizing
6.  remove(venTerminalSampleGeneratorList, aT)
7.  balanceTree(venous_tree, d0) // update venous_tree diameter ratios
8.  terminal vT = artTerminalSampleGeneratorList.getSample //venous terminal
9.  segment aS = choose closest two ∈ close_segment_list(arterial_tree, constraintList)
10.  add_fork (arterial_tree, vT, aS[0]) // with or without optimizing
11.  add_fork (arterial_tree, vT, aS[1]) // with or without optimizing
12.  remove(artTerminalSampleGeneratorList, vT)
13.  balanceTree(artery_tree, d0) // update arterial_tree diameter ratios
14. ENDFOR