/// <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(); }
/// <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> /// 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; }
/// <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; }
/// <summary> /// Builds a new empty graph /// </summary> public BidirectionalGraph( IVertexAndEdgeProvider provider, bool allowParallelEdges ) : base(provider,allowParallelEdges) { m_VertexInEdges = new VertexEdgesDictionary(); }
/// <summary> /// Builds a new empty graph /// </summary> public BidirectionalGraph( IVertexProvider vertexProvider, IEdgeProvider edgeProvider, bool allowParallelEdges ) : base(vertexProvider,edgeProvider,allowParallelEdges) { m_VertexInEdges = new VertexEdgesDictionary(); }
/// <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; }
/// <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(); }
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(); }
/// <summary> /// Builds a new empty graph with default vertex and edge providers /// </summary> public BidirectionalGraph(bool allowParallelEdges) : base(allowParallelEdges) { m_VertexInEdges = new VertexEdgesDictionary(); }