uva Live 6467 Strahler Order(拓扑排序)

本文介绍了地质学中河流系统的Strahler order计算方法,通过拓扑排序确定河流节点的顺序。算法规定源节点订单为1,其他节点根据上游节点订单确定自身订单。给出的代码实现解决了给定河流系统订单计算问题。
摘要由CSDN通过智能技术生成

6467 Strahler Order
In geology, a river system can be represented as a directed graph. Each river segment is an edge; with
the edge pointing the same way the water flows. Nodes are either the source of a river segment (for
example, a lake or spring), where river segments merge or diverge, or the mouth of the river.
在这里插入图片描述
Note: The number in a box is the order. The number in a circle is the node number.
The Strahler order of a river system is computed as follows.
• The order of each source node is 1.
• For every other node, let i be the highest order of all its upstream nodes. If just one upstream
node has order i, then this node also has order i. If two or more upstream nodes have order i,
then this node has order i + 1.
The order of the entire river system is the order of the mouth node. In this prob

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值