/// <summary> /// Adds the elements of another EdgeCollection to the end of this EdgeCollection. /// </summary> /// <param name="items"> /// The EdgeCollection whose elements are to be added to the end of this EdgeCollection. /// </param> public virtual void AddRange(EdgeCollection items) { foreach (Edge item in items) { this.List.Add(item); } }
/// <summary> /// Determines whether this VertexEdgesDictionary contains a specific value. /// </summary> /// <param name="value"> /// The EdgeCollection value to locate in this VertexEdgesDictionary. /// </param> /// <returns> /// true if this VertexEdgesDictionary contains an element with the specified value; /// otherwise, false. /// </returns> public virtual bool ContainsValue(EdgeCollection value) { foreach (EdgeCollection item in this.Dictionary.Values) { if (item == value) { return(true); } } return(false); }
/// <summary> /// Initializes a new instance of the EdgeCollection class, containing elements /// copied from another instance of EdgeCollection /// </summary> /// <param name="items"> /// The EdgeCollection whose elements are to be added to the new EdgeCollection. /// </param> public EdgeCollection(EdgeCollection items) { this.AddRange(items); }
/// <summary> /// Create a new enumerator on the collection /// </summary> /// <param name="collection">collection to enumerate</param> public Enumerator(EdgeCollection collection) { this.wrapped = ((System.Collections.CollectionBase)collection).GetEnumerator(); }
/// <summary> /// Adds an element with the specified key and value to this VertexEdgesDictionary. /// </summary> /// <param name="key"> /// The Vertex key of the element to add. /// </param> /// <param name="value"> /// The EdgeCollection value of the element to add. /// </param> public virtual void Add(Vertex key, EdgeCollection value) { this.Dictionary.Add(key, value); }
/// <summary> /// Determines whether this VertexEdgesDictionary contains a specific value. /// </summary> /// <param name="value"> /// The EdgeCollection value to locate in this VertexEdgesDictionary. /// </param> /// <returns> /// true if this VertexEdgesDictionary contains an element with the specified value; /// otherwise, false. /// </returns> public virtual bool ContainsValue(EdgeCollection value) { foreach (EdgeCollection item in this.Dictionary.Values) { if (item == value) return true; } return false; }
public AdjacencyGraphOrig() { m_VertexOutEdges = new VertexEdgesDictionary(); m_Edges = new EdgeCollection(); }