Class HierarchicalGraph<TVertex, TEdge>
Hierarchical graph.
Inheritance
Implements
Inherited Members
Namespace: GraphShape
Assembly: GraphShape.dll
Syntax
[Serializable]
public class HierarchicalGraph<TVertex, TEdge> : BidirectionalGraph<TVertex, TEdge>, IEdgeListAndIncidenceGraph<TVertex, TEdge>, IMutableBidirectionalGraph<TVertex, TEdge>, IMutableVertexAndEdgeListGraph<TVertex, TEdge>, IMutableVertexListGraph<TVertex, TEdge>, IMutableIncidenceGraph<TVertex, TEdge>, IMutableVertexAndEdgeSet<TVertex, TEdge>, IMutableVertexSet<TVertex>, IMutableEdgeListGraph<TVertex, TEdge>, IMutableGraph<TVertex, TEdge>, ICloneable, IHierarchicalBidirectionalGraph<TVertex, TEdge>, IBidirectionalGraph<TVertex, TEdge>, IVertexAndEdgeListGraph<TVertex, TEdge>, IVertexListGraph<TVertex, TEdge>, IEdgeListGraph<TVertex, TEdge>, IVertexSet<TVertex>, IEdgeSet<TVertex, TEdge>, IBidirectionalIncidenceGraph<TVertex, TEdge>, IIncidenceGraph<TVertex, TEdge>, IImplicitGraph<TVertex, TEdge>, IGraph<TVertex, TEdge>, IImplicitVertexSet<TVertex> where TEdge : TypedEdge<TVertex>
Type Parameters
Name | Description |
---|---|
TVertex | Vertex type. |
TEdge | Edge type. |
Constructors
| Improve this Doc View SourceHierarchicalGraph()
Initializes a new instance of the HierarchicalGraph<TVertex, TEdge> class.
Declaration
public HierarchicalGraph()
HierarchicalGraph(Boolean)
Initializes a new instance of the HierarchicalGraph<TVertex, TEdge> class.
Declaration
public HierarchicalGraph(bool allowParallelEdges)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | allowParallelEdges | Indicates if parallel edges are allowed. |
HierarchicalGraph(Boolean, Int32)
Initializes a new instance of the HierarchicalGraph<TVertex, TEdge> class.
Declaration
public HierarchicalGraph(bool allowParallelEdges, int capacity)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | allowParallelEdges | Indicates if parallel edges are allowed. |
System.Int32 | capacity | Vertex capacity. |
Properties
| Improve this Doc View SourceGeneralEdgeCount
Gets the number of general edges.
Declaration
public int GeneralEdgeCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
GeneralEdges
Gets the set of general edges.
Declaration
public IEnumerable<TEdge> GeneralEdges { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TEdge> |
HierarchicalEdgeCount
Gets the number of hierarchical edges.
Declaration
public int HierarchicalEdgeCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
HierarchicalEdges
Gets the set of hierarchical edges.
Declaration
public IEnumerable<TEdge> HierarchicalEdges { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TEdge> |
Methods
| Improve this Doc View SourceAddEdge(TEdge)
Declaration
public override bool AddEdge(TEdge edge)
Parameters
Type | Name | Description |
---|---|---|
TEdge | edge |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
AddVertex(TVertex)
Declaration
public override bool AddVertex(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
GeneralEdgeCountFor(TVertex)
Gets the number of general edges for the given vertex
.
Declaration
public int GeneralEdgeCountFor(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to get general edges. |
Returns
Type | Description |
---|---|
System.Int32 | General edges count. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
QuikGraph.VertexNotFoundException |
|
GeneralEdgesFor(TVertex)
Gets the set of general edges for the given vertex
.
Declaration
public IEnumerable<TEdge> GeneralEdgesFor(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to get general edges. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TEdge> | General edges. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
QuikGraph.VertexNotFoundException |
|
HierarchicalEdgeCountFor(TVertex)
Gets the number of hierarchical edges for the given vertex
.
Declaration
public int HierarchicalEdgeCountFor(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to get hierarchical edges. |
Returns
Type | Description |
---|---|
System.Int32 | Hierarchical edges count. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
QuikGraph.VertexNotFoundException |
|
HierarchicalEdgesFor(TVertex)
Gets the set of hierarchical edges for the given vertex
.
Declaration
public IEnumerable<TEdge> HierarchicalEdgesFor(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to get hierarchical edges. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TEdge> | Hierarchical edges. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
QuikGraph.VertexNotFoundException |
|
InGeneralEdgeCount(TVertex)
Gets the number of general in-edges for the given vertex
.
Declaration
public int InGeneralEdgeCount(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to get general in-edges. |
Returns
Type | Description |
---|---|
System.Int32 | General in-edges count. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
QuikGraph.VertexNotFoundException |
|
InGeneralEdges(TVertex)
Gets the set of general in-edges for the given vertex
.
Declaration
public IEnumerable<TEdge> InGeneralEdges(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to get general in-edges. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TEdge> | General in-edges. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
QuikGraph.VertexNotFoundException |
|
InHierarchicalEdgeCount(TVertex)
Gets the number of hierarchical in-edges for the given vertex
.
Declaration
public int InHierarchicalEdgeCount(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to get hierarchical in-edges. |
Returns
Type | Description |
---|---|
System.Int32 | Hierarchical in-edges count. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
QuikGraph.VertexNotFoundException |
|
InHierarchicalEdges(TVertex)
Gets the set of hierarchical in-edges for the given vertex
.
Declaration
public IEnumerable<TEdge> InHierarchicalEdges(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to get hierarchical in-edges. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TEdge> | Hierarchical in-edges. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
QuikGraph.VertexNotFoundException |
|
OutGeneralEdgeCount(TVertex)
Gets the number of general out-edges for the given vertex
.
Declaration
public int OutGeneralEdgeCount(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to get general out-edges. |
Returns
Type | Description |
---|---|
System.Int32 | General out-edges count. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
QuikGraph.VertexNotFoundException |
|
OutGeneralEdges(TVertex)
Gets the set of general out-edges for the given vertex
.
Declaration
public IEnumerable<TEdge> OutGeneralEdges(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to get general out-edges. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TEdge> | General out-edges. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
QuikGraph.VertexNotFoundException |
|
OutHierarchicalEdgeCount(TVertex)
Gets the number of hierarchical out-edges for the given vertex
.
Declaration
public int OutHierarchicalEdgeCount(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to get hierarchical out-edges. |
Returns
Type | Description |
---|---|
System.Int32 | Hierarchical out-edges count. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
QuikGraph.VertexNotFoundException |
|
OutHierarchicalEdges(TVertex)
Gets the set of hierarchical out-edges for the given vertex
.
Declaration
public IEnumerable<TEdge> OutHierarchicalEdges(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to get hierarchical out-edges. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TEdge> | Hierarchical out-edges. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
QuikGraph.VertexNotFoundException |
|
RemoveEdge(TEdge)
Declaration
public override bool RemoveEdge(TEdge edge)
Parameters
Type | Name | Description |
---|---|---|
TEdge | edge |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
RemoveVertex(TVertex)
Declaration
public override bool RemoveVertex(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex |
Returns
Type | Description |
---|---|
System.Boolean |