Michael D
Michael D

Reputation: 1479

draw UML like diagram to represent math algorithm

Suppose I have math algorithm e.g.

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

I would like to draw a diagram to represent it and the flow of the algorithm i.e. people know how the value of A calculate. Is there tool or the name of UML diagram that I can take a look?

Upvotes: 3

Views: 2882

Answers (3)

Tomas Kulhanek
Tomas Kulhanek

Reputation: 897

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.

Upvotes: 2

sfinnie
sfinnie

Reputation: 9952

Maybe a Dataflow Diagram?

Something like this:

dataflow diagram example

It's not part of UML, but can be a very useful way to show computation.

hth.

Upvotes: 2

Volker Stolz
Volker Stolz

Reputation: 7402

UML diagrams are either about static structure (classes/components/packages) or interaction between entities (activity/sequence diagrams/state machines).

Algorithms or algorithm design are not covered by UML (very much like any other type of concrete method specification).

Upvotes: 1

Related Questions