Question: weighted graph, floating point numbers

Hello, all.

I would like to plot a weighted graph.

Edge weights are floating point numbers (for example, 1,0; 2,0, 3,0, ...).

I tried:

>M := MATRIX([[0., 2.0, 1.0], [2.0, 0., 3.0], [1.0, 3.0, 0.]]);

> with(GraphTheory):
> G := Graph(undirected,weighted,M);

But it doesn't work.

Of course, I can take the edge weight and multiply it by 10 or 100.
May be somebody could provide a more simple solution.

Please Wait...