コード例 #1
0
 /// <summary>
 /// Builds a new empty directed graph with default vertex and edge
 /// provider.
 /// </summary>
 /// <param name="allowParallelEdges">true if parallel edges are allowed</param>
 public PetriGraph(bool allowParallelEdges)
 {
     this.vertexProvider = new QuickGraph.Providers.VertexProvider();
     this.edgeProvider = new QuickGraph.Providers.EdgeProvider();
     this.allowParallelEdges = allowParallelEdges;
     this.vertexOutEdges = new VertexEdgesDictionary();
 }
コード例 #2
0
ファイル: AdjacencyGraph.cs プロジェクト: timonela/mb-unit
		/// <summary>
		/// Builds a new empty directed graph with default vertex and edge
		/// provider.
		/// </summary>
		/// <remarks>
		/// </remarks>
		public AdjacencyGraph()
		{
			this.vertexProvider = new QuickGraph.Providers.VertexProvider();
			this.edgeProvider = new QuickGraph.Providers.EdgeProvider();
			this.allowParallelEdges = true;
			this.vertexOutEdges = new VertexEdgesDictionary();
		}
コード例 #3
0
 /// <summary>
 /// Construct an enumerator over the out-edges
 /// </summary>
 /// <param name="vertexOutEdges">Out edge dictionary to iterate</param>
 /// <exception cref="ArgumentNullException">vertexOutEdges is null</exception>
 public VertexEdgesEnumerator(VertexEdgesDictionary vertexOutEdges)
 {
     if (vertexOutEdges == null)
         throw new ArgumentNullException("vertexOutEdges");
     VertexOutEdgeEnumerator = vertexOutEdges.GetEnumerator();
     OutEdgeEnumerator = null;
 }
コード例 #4
0
 /// <summary>
 /// Construct an enumerable collection of edges
 /// </summary>
 /// <param name="vertexOutEdges">vertex out edges dictionary</param>
 /// <exception cref="ArgumentNullException">vertexOutEdges is null</exception>
 public VertexEdgesEnumerable(VertexEdgesDictionary vertexOutEdges)
 {
     if (vertexOutEdges == null)
     {
         throw new ArgumentNullException("vertexOutEdges");
     }
     this.vertexOutEdges = vertexOutEdges;
 }
コード例 #5
0
 /// <summary>
 /// Builds a new empty graph
 /// </summary>
 public BidirectionalGraph(
     IVertexAndEdgeProvider provider,
     bool allowParallelEdges
     )
     : base(provider,allowParallelEdges)
 {
     m_VertexInEdges = new VertexEdgesDictionary();
 }
コード例 #6
0
 /// <summary>
 /// Builds a new empty graph
 /// </summary>
 public BidirectionalGraph(
     IVertexProvider vertexProvider,
     IEdgeProvider edgeProvider,
     bool allowParallelEdges
     )
     : base(vertexProvider,edgeProvider,allowParallelEdges)
 {
     m_VertexInEdges = new VertexEdgesDictionary();
 }
コード例 #7
0
 /// <summary>
 /// Construct an enumerator over the out-edges
 /// </summary>
 /// <param name="vertexOutEdges">Out edge dictionary to iterate</param>
 /// <exception cref="ArgumentNullException">vertexOutEdges is null</exception>
 public VertexEdgesEnumerator(VertexEdgesDictionary vertexOutEdges)
 {
     if (vertexOutEdges == null)
     {
         throw new ArgumentNullException("vertexOutEdges");
     }
     VertexOutEdgeEnumerator = vertexOutEdges.GetEnumerator();
     OutEdgeEnumerator       = null;
 }
コード例 #8
0
ファイル: AdjacencyGraph.cs プロジェクト: taoxiease/asegrp
        /// <summary>
        /// Builds a new empty directed graph
        /// </summary>
        public AdjacencyGraph(
            IVertexAndEdgeProvider provider,
            bool allowParallelEdges
            )
        {
            if (provider == null)
                throw new ArgumentNullException("provider");

            m_Provider = provider;
            m_AllowParallelEdges = allowParallelEdges;
            m_VertexOutEdges = new VertexEdgesDictionary();
            m_Edges = new EdgeCollection();
        }
コード例 #9
0
 public AdjacencyGraph(IVertexProvider vertexProvider, IEdgeProvider edgeProvider, bool allowParallelEdges)
 {
     if (vertexProvider == null)
     {
         throw new ArgumentNullException("vertex provider");
     }
     if (edgeProvider == null)
     {
         throw new ArgumentNullException("edge provider");
     }
     this.vertexProvider = vertexProvider;
     this.edgeProvider = edgeProvider;
     this.allowParallelEdges = allowParallelEdges;
     this.vertexOutEdges = new VertexEdgesDictionary();
 }
コード例 #10
0
 /// <summary>
 /// Builds a new empty graph with default vertex and edge providers
 /// </summary>
 public BidirectionalGraph(bool allowParallelEdges)
     : base(allowParallelEdges)
 {
     m_VertexInEdges = new VertexEdgesDictionary();
 }