当前位置: 首页>>代码示例>>C#>>正文


C# IGraph.GetVertices方法代码示例

本文整理汇总了C#中IGraph.GetVertices方法的典型用法代码示例。如果您正苦于以下问题:C# IGraph.GetVertices方法的具体用法?C# IGraph.GetVertices怎么用?C# IGraph.GetVertices使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IGraph的用法示例。


在下文中一共展示了IGraph.GetVertices方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GraphMerge

 public override void GraphMerge(IGraph graph)
 {
     graph.GetVertices().ForEach(v =>
         this.AddMarking(
             (v as MarkingTreeNode).Marking,
             (v as TreeGraphNode).Parent != null ? ((v as TreeGraphNode).Parent as TreeGraphNode).Value.ToString() : null,
             v.Value.ToString()
         )
     );
 }
开发者ID:THROYAN,项目名称:MagicLibrary,代码行数:10,代码来源:MarkingTree.cs

示例2: GraphMerge

 public virtual void GraphMerge(IGraph graph)
 {
     graph.GetVertices().ForEach(v => this.AddVertex(v.Value));
     graph.GetEdges().ForEach(e => this.AddEdge(e.Vertices[0].Value, e.Vertices[1].Value));
 }
开发者ID:THROYAN,项目名称:MagicLibrary,代码行数:5,代码来源:UndirectedGraph.cs

示例3: GraphMerge

 public override void GraphMerge(IGraph graph)
 {
     graph.GetVertices().ForEach(v =>
         this.AddTreeNode(
             v.Value,
             (v as TreeGraphNode).Parent != null ? ((v as TreeGraphNode).Parent as TreeGraphNode).Value : null
         )
     );
 }
开发者ID:THROYAN,项目名称:MagicLibrary,代码行数:9,代码来源:TreeGraph.cs

示例4: CopyTo

        public virtual void CopyTo(IGraph graph)
        {
            var g = graph as UndirectedGraph;
            g.edges = new List<IEdge>();
            g.vertices = new List<IVertex>();

            this.GetVertices().ForEach(v => g.vertices.Add(v.Clone() as IVertex));
            this.GetEdges().ForEach(e => g.edges.Add(e.Clone() as IEdge));

            graph.GetVertices().ForEach(v => v.Graph = graph);
            graph.GetEdges().ForEach(delegate(IEdge e)
            {
                e.Vertices[0] = graph[e.Vertices[0].Value];
                e.Vertices[1] = graph[e.Vertices[1].Value];
                e.Graph = graph;
            });
            //graph.GraphMerge(this);
        }
开发者ID:THROYAN,项目名称:MagicLibrary,代码行数:18,代码来源:UndirectedGraph.cs


注:本文中的IGraph.GetVertices方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。