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


C# BasicAdjList.GetEdgeCount方法代码示例

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


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

示例1: GetEdgeCount_With_Ignore_Direction_Param_Throws_When_Invalid_Type_Passed_In_For_Dest_Node

 public void GetEdgeCount_With_Ignore_Direction_Param_Throws_When_Invalid_Type_Passed_In_For_Dest_Node()
 {
     var net = new BasicAdjList(Guid.NewGuid());
     INode nodeA = net.CreateNode();
     INode nodeB = new DummyBasicNode();
     var ex = Assert.Throws<ArgumentException>(() => net.GetEdgeCount(nodeA, nodeB, true));
 }
开发者ID:BgRva,项目名称:Blob1,代码行数:7,代码来源:BasicAdjListFixture.cs

示例2: GetEdgeCount_With_Ignore_Direction_Param_Throws_When_NullPassed_In_For_Source_Node

 public void GetEdgeCount_With_Ignore_Direction_Param_Throws_When_NullPassed_In_For_Source_Node()
 {
     var net = new BasicAdjList(Guid.NewGuid());
     INode nodeA = null;
     INode nodeB = net.CreateNode();
     var ex = Assert.Throws<ArgumentNullException>(() => net.GetEdgeCount(nodeA, nodeB, true));
 }
开发者ID:BgRva,项目名称:Blob1,代码行数:7,代码来源:BasicAdjListFixture.cs

示例3: GetEdgeCount_For_NodeB_to_NodeB

        public void GetEdgeCount_For_NodeB_to_NodeB(int AtoBEdges, int BtoAEdges, int AtoAEdges, int BtoBEdges, bool ignoreDirection, int expectedCount)
        {
            //Arrange
            var net = new BasicAdjList(Guid.NewGuid());
            INode nodeA = net.CreateNode();
            INode nodeB = net.CreateNode();

            for (int i = 0; i < AtoBEdges; i++)
            {
                net.CreateEdge(nodeA, nodeB);
            }
            for (int i = 0; i < BtoAEdges; i++)
            {
                net.CreateEdge(nodeB, nodeA);
            }
            for (int i = 0; i < AtoAEdges; i++)
            {
                net.CreateEdge(nodeA, nodeA);
            }
            for (int i = 0; i < BtoBEdges; i++)
            {
                net.CreateEdge(nodeB, nodeB);
            }

            int result = net.GetEdgeCount(nodeB, nodeB, ignoreDirection);

            Assert.Equal(expectedCount, result);
        }
开发者ID:BgRva,项目名称:Blob1,代码行数:28,代码来源:BasicAdjListFixture.cs


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