绘制,其中顶点之间的距离对应的边权重的曲线图 [英] draw a graph where the distance between vertices correspond to the edge weights

查看:161
本文介绍了绘制,其中顶点之间的距离对应的边权重的曲线图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个算法,给了我在图中坐标的顶点,当我给他一个加权图和顶点点之间的边的权距离顶点之间

是这样的:

 公共_ArrayOfCoordinatesForVertices_ ** super_hyper_algorithm **(weighted_graph){
     返回_foo_;
}
 

解决方案

这是一般不可能的:想象一下,有3个节点N1,N2和N3图

现在考虑下面的距离:

  N1-N2:4
N1-N3:1
N2-N3:1
 

(这违反了三角不等式的推广)。

Is there an algorithm that gives me coordinates of vertices in a graph, when I give him a weighted graph and the edge weights between vertices points to the distance between vertices?

Something like:

public _ArrayOfCoordinatesForVertices_ **super_hyper_algorithm**(weighted_graph){  
     return _foo_;  
}

解决方案

This is in general not possible: Imagine a graph with 3 nodes n1, n2, and n3.

now consider the following distances:

n1-n2: 4
n1-n3: 1
n2-n3: 1

(This violates the triangle inquality).

这篇关于绘制,其中顶点之间的距离对应的边权重的曲线图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆