示例#1
0
 /// <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);
     }
 }
示例#2
0
 /// <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);
 }
示例#3
0
 /// <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);
 }
示例#4
0
 /// <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();
 }
示例#5
0
 /// <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>
 /// 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;
 }
示例#8
0
 public AdjacencyGraphOrig()
 {
     m_VertexOutEdges = new VertexEdgesDictionary();
     m_Edges          = new EdgeCollection();
 }
示例#9
0
 /// <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);
 }
示例#10
0
 /// <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);
 }
示例#11
0
 /// <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();
 }
 public AdjacencyGraphOrig()
 {
     m_VertexOutEdges = new VertexEdgesDictionary();
     m_Edges = new EdgeCollection();
 }