countingnumberofsegmentneighbors
2017-03-10 00:27:57 0 举报
`countingnumberofsegmentneighbors` 是一个用于计算给定线段上相邻线段数量的函数。该函数接收一个线段列表作为输入,每个线段由两个点表示。它遍历整个线段列表,对于每个线段,它会检查其相邻的线段并统计数量。最后,它返回一个字典,其中键是线段的端点,值是与该端点相邻的线段数量。这个函数可以用于图形分析和几何计算中,帮助确定线段之间的拓扑关系。
作者其他创作
大纲/内容
set NUM=1
Yes
No
start
is myself a coordinator
return NUM
is Pre-junction.y (*it).y Next-junction.y
*it = my first neighbor
send the packet to nextHop
is *it=my last neighbor
NUM:number of northern neighbors Pre-junction:the sourthern junctionNext-junction:the northern junction
NUM++
0 条评论
下一页
为你推荐
查看更多