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


C# EdgeId类代码示例

本文整理汇总了C#中EdgeId的典型用法代码示例。如果您正苦于以下问题:C# EdgeId类的具体用法?C# EdgeId怎么用?C# EdgeId使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: HaymanEdge

 public HaymanEdge(IHaymanVertex outVertex,
                   IHaymanVertex inVertex,
                   EdgeId id)
 {
     _outVertex = outVertex;
     _inVertex = inVertex;
     _id = id;
 }
开发者ID:Stephanvs,项目名称:MetaStudio,代码行数:8,代码来源:HaymanEdge.cs

示例2: EdgeIdEmptyConstructorTest

 public void EdgeIdEmptyConstructorTest()
 {
     var _EdgeId1 = new EdgeId();
     var _EdgeId2 = new EdgeId();
     Assert.IsTrue(_EdgeId1.Length > 0);
     Assert.IsTrue(_EdgeId2.Length > 0);
     Assert.AreNotEqual(_EdgeId1, _EdgeId2);
 }
开发者ID:codeinpeace,项目名称:Blueprints.NET,代码行数:8,代码来源:EdgeIdTests.cs

示例3: AddEdge

        /// <summary>
        /// Add an edge to the graph. The added edges requires a recommended identifier, a tail vertex, an head vertex, and a label.
        /// Like adding a vertex, the provided object identifier is can be ignored by the implementation.
        /// </summary>
        /// <param name="outVertex">The vertex on the tail of the edge.</param>
        /// <param name="inVertex">The vertex on the head of the edge.</param>
        /// <param name="id">The recommended object identifier.</param>
        /// <param name="label">The label associated with the edge.</param>
        /// <param name="edgeInitializer">A delegate to initialize the new edge.</param>
        /// <returns>
        /// The newly created edge
        /// </returns>
        public IHaymanEdge AddEdge(IHaymanVertex outVertex, IHaymanVertex inVertex, EdgeId id, string label, Action<HaymanEdgeData> edgeInitializer)
        {
            var data = new HaymanEdgeData();

            if (edgeInitializer != null)
            {

                edgeInitializer(data);
            }

            var edge = new HaymanEdge(outVertex, inVertex, id) { EdgeData = data };
            outVertex.AddInEdge(edge);
            inVertex.AddOutEdge(edge);
            _edges.Add(id, edge);
            return edge;
        }
开发者ID:Stephanvs,项目名称:MetaStudio,代码行数:28,代码来源:HaymanGraph.cs

示例4: op_SmallerOrEqual_SmallerThan2_Test

 public void op_SmallerOrEqual_SmallerThan2_Test()
 {
     var _EdgeId1 = new EdgeId(5);
     var _EdgeId2 = new EdgeId(23);
     Assert.IsTrue(_EdgeId1 <= _EdgeId2);
 }
开发者ID:codeinpeace,项目名称:Blueprints.NET,代码行数:6,代码来源:EdgeIdTests.cs

示例5: op_SmallerOrEqual_Bigger1_Test

 public void op_SmallerOrEqual_Bigger1_Test()
 {
     var _EdgeId1 = new EdgeId(2);
     var _EdgeId2 = new EdgeId(1);
     Assert.IsFalse(_EdgeId1 <= _EdgeId2);
 }
开发者ID:codeinpeace,项目名称:Blueprints.NET,代码行数:6,代码来源:EdgeIdTests.cs

示例6: op_BiggerOrEqual_Bigger2_Test

 public void op_BiggerOrEqual_Bigger2_Test()
 {
     var _EdgeId1 = new EdgeId(23);
     var _EdgeId2 = new EdgeId(5);
     Assert.IsTrue(_EdgeId1 >= _EdgeId2);
 }
开发者ID:codeinpeace,项目名称:Blueprints.NET,代码行数:6,代码来源:EdgeIdTests.cs

示例7: EdgeIdUriConstructorTest

 public void EdgeIdUriConstructorTest()
 {
     var _EdgeId = new EdgeId(new Uri("http://example.org"));
     Assert.AreEqual("http://example.org/", _EdgeId.ToString());
     Assert.AreEqual(19,                    _EdgeId.Length);
 }
开发者ID:codeinpeace,项目名称:Blueprints.NET,代码行数:6,代码来源:EdgeIdTests.cs

示例8: op_BiggerOrEqual_Null_Test2

 public void op_BiggerOrEqual_Null_Test2()
 {
     EdgeId _EdgeId1 = null;
     var      _EdgeId2 = new EdgeId();
     Assert.IsTrue(_EdgeId1 >= _EdgeId2);
 }
开发者ID:codeinpeace,项目名称:Blueprints.NET,代码行数:6,代码来源:EdgeIdTests.cs

示例9: EdgeIdUInt32ConstructorTest

 public void EdgeIdUInt32ConstructorTest()
 {
     var _EdgeId = new EdgeId(23U);
     Assert.AreEqual("23", _EdgeId.ToString());
     Assert.AreEqual(2,    _EdgeId.Length);
 }
开发者ID:codeinpeace,项目名称:Blueprints.NET,代码行数:6,代码来源:EdgeIdTests.cs

示例10: op_Bigger_Equals_Test

 public void op_Bigger_Equals_Test()
 {
     var _EdgeId1 = new EdgeId(1);
     var _EdgeId2 = new EdgeId(1);
     Assert.IsFalse(_EdgeId1 > _EdgeId2);
 }
开发者ID:codeinpeace,项目名称:Blueprints.NET,代码行数:6,代码来源:EdgeIdTests.cs

示例11: op_Equality_NotEquals_Test

 public void op_Equality_NotEquals_Test()
 {
     var _EdgeId1 = new EdgeId(1);
     var _EdgeId2 = new EdgeId(2);
     Assert.IsFalse(_EdgeId1 == _EdgeId2);
 }
开发者ID:codeinpeace,项目名称:Blueprints.NET,代码行数:6,代码来源:EdgeIdTests.cs

示例12: op_Inequality_NotEquals2_Test

 public void op_Inequality_NotEquals2_Test()
 {
     var _EdgeId1 = new EdgeId(5);
     var _EdgeId2 = new EdgeId(23);
     Assert.IsTrue(_EdgeId1 != _EdgeId2);
 }
开发者ID:codeinpeace,项目名称:Blueprints.NET,代码行数:6,代码来源:EdgeIdTests.cs

示例13: op_Smaller_Null_Test2

 public void op_Smaller_Null_Test2()
 {
     EdgeId _EdgeId1 = null;
     var      _EdgeId2 = new EdgeId();
     Assert.IsTrue(_EdgeId1 < _EdgeId2);
 }
开发者ID:codeinpeace,项目名称:Blueprints.NET,代码行数:6,代码来源:EdgeIdTests.cs

示例14: op_Inequality_Equals_Test

 public void op_Inequality_Equals_Test()
 {
     var _EdgeId1 = new EdgeId(1);
     var _EdgeId2 = new EdgeId(1);
     Assert.IsFalse(_EdgeId1 != _EdgeId2);
 }
开发者ID:codeinpeace,项目名称:Blueprints.NET,代码行数:6,代码来源:EdgeIdTests.cs

示例15: op_Inequality_SameReference_Test

 public void op_Inequality_SameReference_Test()
 {
     var _EdgeId1 = new EdgeId();
     #pragma warning disable
     Assert.IsFalse(_EdgeId1 != _EdgeId1);
     #pragma warning restore
 }
开发者ID:codeinpeace,项目名称:Blueprints.NET,代码行数:7,代码来源:EdgeIdTests.cs


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