使用Graphsharp框架构建无向图

时间:2018-11-03 22:27:09

标签: c# wpf frameworks graph-theory graph-sharp

是否可以在WPF中使用Graphsharp框架生成无向图?

我只能设法生成有向图,我尝试自己搜索它,但是并没有弄清楚是否有内置的合适类来创建此类无向图。

由于缺少有关此框架的文档,请寻求您的帮助。也许有人遇到类似的问题。

1 个答案:

答案 0 :(得分:0)

您可能要转换图形:

具体参见 GraphLayout.cs

  • TGraph:类, IBidirectionalGraph
/// <summary>
/// THE layout control. Support layout, edge routing and overlap removal algorithms, with multiple layout states.
/// </summary>
/// <typeparam name="TVertex">Type of the vertices.</typeparam>
/// <typeparam name="TEdge">Type of the edges.</typeparam>
/// <typeparam name="TGraph">Type of the graph.</typeparam>
public partial class GraphLayout<TVertex, TEdge, TGraph>
    where TVertex : class
    where TEdge : IEdge<TVertex>
    where TGraph : class, IBidirectionalGraph<TVertex, TEdge>
{