本文整理汇总了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;
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例8: op_BiggerOrEqual_Null_Test2
public void op_BiggerOrEqual_Null_Test2()
{
EdgeId _EdgeId1 = null;
var _EdgeId2 = new EdgeId();
Assert.IsTrue(_EdgeId1 >= _EdgeId2);
}
示例9: EdgeIdUInt32ConstructorTest
public void EdgeIdUInt32ConstructorTest()
{
var _EdgeId = new EdgeId(23U);
Assert.AreEqual("23", _EdgeId.ToString());
Assert.AreEqual(2, _EdgeId.Length);
}
示例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);
}
示例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);
}
示例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);
}
示例13: op_Smaller_Null_Test2
public void op_Smaller_Null_Test2()
{
EdgeId _EdgeId1 = null;
var _EdgeId2 = new EdgeId();
Assert.IsTrue(_EdgeId1 < _EdgeId2);
}
示例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);
}
示例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
}