/// <summary> Creates a new weighted pseudograph with the specified edge factory. /// /// </summary> /// <param name="ef">the edge factory of the new graph. /// </param> public WeightedPseudograph(EdgeFactory ef):base(ef) { }
/// <summary> Creates a new pseudograph with the specified edge factory. /// /// </summary> /// <param name="ef">the edge factory of the new graph. /// </param> public Pseudograph(EdgeFactory ef):base(ef, true, true) { }
/// <summary> Creates a new directed weighted multigraph with the specified edge /// factory. /// /// </summary> /// <param name="ef">the edge factory of the new graph. /// </param> public DirectedWeightedMultigraph(EdgeFactory ef):base(ef) { }
/// <summary> Construct a new pseudograph. The pseudograph can either be directed or /// undirected, depending on the specified edge factory. A sample edge is /// created using the edge factory to see if the factory is compatible with /// this class of graph. For example, if this graph is a /// <code>DirectedGraph</code> the edge factory must produce /// <code>DirectedEdge</code>s. If this is not the case, an /// <code>IllegalArgumentException</code> is thrown. /// /// </summary> /// <param name="ef">the edge factory of the new graph. /// </param> /// <param name="allowMultipleEdges">whether to allow multiple edges or not. /// </param> /// <param name="allowLoops">whether to allow edges that are self-loops or not. /// /// </param> /// <throws> NullPointerException if the specified edge factory is </throws> /// <summary> <code>null</code>. /// </summary> public AbstractBaseGraph(EdgeFactory ef, bool allowMultipleEdges, bool allowLoops) { if (ef == null) { throw new System.NullReferenceException(); } m_vertexMap = new SupportClass.HashSetSupport(); m_edgeSet = new SupportClass.HashSetSupport(); m_edgeFactory = ef; m_allowingLoops = allowLoops; m_allowingMultipleEdges = allowMultipleEdges; m_specifics = createSpecifics(); Edge e = ef.createEdge(new System.Object(), new System.Object()); m_factoryEdgeClass = e.GetType(); m_edgeListFactory = new ArrayListFactory(); m_unmodifiableEdgeSet = null; m_unmodifiableVertexSet = null; }
/// <summary> Creates a new simple directed weighted graph with the specified edge /// factory. /// /// </summary> /// <param name="ef">the edge factory of the new graph. /// </param> public SimpleDirectedWeightedGraph(EdgeFactory ef):base(ef) { }
/// <summary> Creates a new multigraph with the specified edge factory. /// /// </summary> /// <param name="ef">the edge factory of the new graph. /// </param> public Multigraph(EdgeFactory ef) : base(ef, true, false) { }
/// <summary> Creates a new directed weighted graph with the specified edge factory. /// /// </summary> /// <param name="ef">the edge factory of the new graph. /// </param> public DefaultDirectedWeightedGraph(EdgeFactory ef):base(ef) { }
/// <summary> Creates a new simple graph with the specified edge factory. /// /// </summary> /// <param name="ef">the edge factory of the new graph. /// </param> public SimpleGraph(EdgeFactory ef):base(ef, false, false) { }
/// <summary> Creates a new multigraph with the specified edge factory. /// /// </summary> /// <param name="ef">the edge factory of the new graph. /// </param> public Multigraph(EdgeFactory ef):base(ef, true, false) { }
/// <summary> Creates a new directed multigraph with the specified edge factory. /// /// </summary> /// <param name="ef">the edge factory of the new graph. /// </param> public DirectedMultigraph(EdgeFactory ef):base(ef, true, true) { }
/// <summary> Creates a new pseudograph with the specified edge factory. /// /// </summary> /// <param name="ef">the edge factory of the new graph. /// </param> public Pseudograph(EdgeFactory ef) : base(ef, true, true) { }
/// <summary> Creates a new directed weighted multigraph with the specified edge /// factory. /// /// </summary> /// <param name="ef">the edge factory of the new graph. /// </param> public DirectedWeightedMultigraph(EdgeFactory ef) : base(ef) { }