绘制UML就像图表来表示数学算法

时间:2012-11-12 09:21:48

标签: uml

假设我有数学算法,例如

A = B + C
C = D + E
F = B + D

我想绘制一个图表来表示它和算法的流程,即人们知道A的值是如何计算的。我可以看一下工具或UML图的名称吗?

3 个答案:

答案 0 :(得分:1)

UML图是关于静态结构(类/组件/包)或实体之间的交互(活动/序列图/状态机)。

UML不包含算法或算法设计(非常类似于任何其他类型的具体方法规范)。

答案 1 :(得分:1)

也许是Dataflow Diagram

这样的事情:

dataflow diagram example

它不是UML的一部分,但可以是一种非常有用的显示计算方式。

第h

答案 2 :(得分:1)

There is an proposal to supplement UML diagrams by the diagrams called KOPENOGRAM. Which rather on data flow focus on algorithmical structure, conditions, loops, etc. As this is an proposal, limited specific tools exist to generate or draw kopenograms from source code (AFAIK there are Java plugins for BlueJ or NetBeans). However, Excel or any spreadsheet app might be used to make table and borders.

Your example will look like:

enter image description here

No dependency is shown on operations as in previous example, as this is task rather for compiler.