/// <summary> /// Add an edge from this Vertex to inVertex of edge type looked up from label, if edge type does not yet exist it is created. /// </summary> /// <param name="edgeId">If not null, this must be a UInt32 to be used as edge id - NOTE: not yet implemented usage</param> /// <param name="label">The type of edge to create</param> /// <param name="inVertex">The head of the new edge</param> /// <returns>the new edge</returns> public IEdge AddEdge(object edgeId, string label, IVertex inVertex) { // TODO, use edgeId if (edgeId != null) { throw new NotImplementedException("Custom edge id is not implemented"); } EdgeType edgeType = Graph.FindEdgeType(label); if (edgeType == null) { edgeType = Graph.NewEdgeType(label, true); } return(edgeType.NewEdge(this, inVertex as Vertex)); }
/// <summary> /// Add an edge from this Vertex to inVertex of edge type. /// </summary> /// <param name="edgeType">The type of edge to add</param> /// <param name="head">The head of the new edge</param> /// <returns>the new edge</returns> public Edge AddEdge(EdgeType edgeType, Vertex head) { return(edgeType.NewEdge(this, head)); }
/// <summary> /// Creates a new edge instance. /// </summary> /// <param name="type">Edge type identifier.</param> /// <param name="tail">Source OID.</param> /// <param name="head">Target OID. </param> /// <returns>Unique OID of the new edge instance.</returns> public Edge NewEdge(EdgeType edgeType, Vertex tail, Vertex head) { return(edgeType.NewEdge(tail, head)); }