public override double getEdgeWeight(E e) { IntrusiveWeightedEdge ie = getIntrusiveEdge(e); if (ie == null) { throw new ArgumentException("no such edge in graph: " + e.ToString()); } return(ie.weight); }
public override void setEdgeWeight(E e, double weight) { IntrusiveWeightedEdge ie = getIntrusiveEdge(e); if (ie == null) { throw new ArgumentException("no such edge in graph: " + e.ToString()); } ie.weight = weight; }
public override void add(E e, V sourceVertex, V targetVertex) { IntrusiveWeightedEdge intrusiveEdge; if (e is IntrusiveWeightedEdge) { intrusiveEdge = e as IntrusiveWeightedEdge; } else { intrusiveEdge = new IntrusiveWeightedEdge(); } intrusiveEdge.source = sourceVertex; intrusiveEdge.target = targetVertex; edgeMap[e] = intrusiveEdge; }