Graphs with Euclidean Metric

75 views
Skip to first unread message

Srinivas

unread,
Oct 4, 2009, 8:44:18 PM10/4/09
to networkx-discuss
Hi,
Is there a function to generate graphs whose edges exhibit
triangle inequality? I looked at http://networkx.lanl.gov/reference/generators.html,
but could not find one.

Thanks,
Sri.

Srinivas

unread,
Oct 4, 2009, 9:08:34 PM10/4/09
to networkx-discuss
please ignore the grid-graphs. They inherently have this property. I
am looking to generate a uniform random graph (or any graph for that
matter) with the "length" of edges satisfying the triangle-inequality.
I have a crude way to do it (I am a newbie to Python and learning it
as I solve other algorithmic issues), but, wondering if such a
function is available (either in CVS or in development...).

-Sri.




On Oct 4, 7:44 pm, Srinivas <srivathsan.srini...@gmail.com> wrote:
> Hi,
>       Is there a function to generate graphs whose edges exhibit
> triangle inequality?  I looked athttp://networkx.lanl.gov/reference/generators.html,

Sudarshan Iyengar

unread,
Oct 4, 2009, 10:55:52 PM10/4/09
to networkx...@googlegroups.com
I don't quite get you... are you talking about planar graphs?

What do you mean by edge must exhibit trian inequal

Sudarshan

Aric Hagberg

unread,
Oct 5, 2009, 3:29:42 PM10/5/09
to networkx...@googlegroups.com

Maybe you are thinking of a random geometric graph?

http://networkx.lanl.gov/examples/drawing/random_geometric_graph.html

Aric

Muhammad Bo

unread,
Jul 31, 2021, 8:38:59 AM7/31/21
to networkx-discuss
Dear All,

Is there any update on this discussion after all these years?

I would like every triangle in the graph (constructed by the nodes) to satisfy the triangle inequality on its (random) edge lengths/weights. I need something akin to the Erdős/Rényi mode. By Triangle Equality I mean:

Do we have any option to generate such a graph using Networkx?

Sincerely,
Mohammad
Reply all
Reply to author
Forward
0 new messages