public static EdgeGenerics <V, W> CreateEdgeGenerics <V, W>( string edgeId, V startVertex, V endVertex, W weight ) where V : Vertex where W : Weight { EdgeGenerics <V, W> e = new EdgeGenericsImpl <V, W>( edgeId, startVertex, endVertex, weight ); return(e); }
private string GetIdForMapping(string startVertexId, string endVertexId) { return(EdgeGenericsImpl <V, W> .CreateEdgeIdValue(startVertexId, endVertexId)); }
public override bool Equals(object obj) { if (this == obj) { return(true); } if (obj == null) { return(false); } if (!(obj is EdgeGenericsImpl <V, W>)) { return(false); } EdgeGenericsImpl <V, W> other = (EdgeGenericsImpl <V, W>)obj; if (endVertex == null) { if (other.endVertex != null) { return(false); } } else if (!endVertex.Equals(other.endVertex)) { return(false); } if (id == null) { if (other.id != null) { return(false); } } else if (!id.Equals(other.id)) { return(false); } if (startVertex == null) { if (other.startVertex != null) { return(false); } } else if (!startVertex.Equals(other.startVertex)) { return(false); } if (weight == null) { if (other.weight != null) { return(false); } } else if (!weight.Equals(other.weight)) { return(false); } return(true); }