Example #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();
 }
Example #2
0
 /// <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();
 }
 /// <summary>
 /// Builds a new empty graph
 /// </summary>
 public BidirectionalGraph(
     IVertexAndEdgeProvider provider,
     bool allowParallelEdges
     )
     : base(provider, allowParallelEdges)
 {
     m_VertexInEdges = new VertexEdgesDictionary();
 }
Example #4
0
 /// <summary>
 /// Builds a new empty graph
 /// </summary>
 public BidirectionalGraph(
     IVertexProvider vertexProvider,
     IEdgeProvider edgeProvider,
     bool allowParallelEdges
     )
     : base(vertexProvider, edgeProvider, allowParallelEdges)
 {
     m_VertexInEdges = new VertexEdgesDictionary();
 }
Example #5
0
        /// <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();
        }
Example #6
0
        /// <summary>
        /// Builds a new empty directed graph with custom providers
        /// </summary>
        /// <param name="allowParallelEdges">true if the graph allows
        /// multiple edges</param>
        /// <param name="edgeProvider">custom edge provider</param>
        /// <param name="vertexProvider">custom vertex provider</param>
        /// <exception cref="ArgumentNullException">
        /// vertexProvider or edgeProvider is a null reference
        /// </exception>
        public PetriGraph(
            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();
        }
Example #7
0
 /// <summary>
 /// Builds a new empty graph with default vertex and edge providers
 /// </summary>
 public BidirectionalGraph(bool allowParallelEdges)
     : base(allowParallelEdges)
 {
     m_VertexInEdges = new VertexEdgesDictionary();
 }