Interface IHierarchy<TVertex, TEdge>
Represents a hierarchy of graphs.
Inherited Members
Namespace: QuikGraph
Assembly: QuikGraph.dll
Syntax
public interface IHierarchy<TVertex, TEdge> : IMutableVertexAndEdgeListGraph<TVertex, TEdge>, IMutableVertexListGraph<TVertex, TEdge>, IMutableIncidenceGraph<TVertex, TEdge>, IMutableVertexAndEdgeSet<TVertex, TEdge>, IMutableVertexSet<TVertex>, IMutableEdgeListGraph<TVertex, TEdge>, IMutableGraph<TVertex, TEdge>, IVertexAndEdgeListGraph<TVertex, TEdge>, IVertexListGraph<TVertex, TEdge>, IIncidenceGraph<TVertex, TEdge>, IImplicitGraph<TVertex, TEdge>, IEdgeListGraph<TVertex, TEdge>, IGraph<TVertex, TEdge>, IEdgeSet<TVertex, TEdge>, IVertexSet<TVertex>, IImplicitVertexSet<TVertex> where TEdge : IEdge<TVertex>
Type Parameters
Name | Description |
---|---|
TVertex | Vertex type. |
TEdge | Edge type. |
Properties
| Improve this Doc View SourceRoot
Gets the root of the hierarchy.
Declaration
TVertex Root { get; }
Property Value
Type | Description |
---|---|
TVertex |
Methods
| Improve this Doc View SourceChildrenEdges(TVertex)
Gets the collection of children edges from the vertex
.
Declaration
IEnumerable<TEdge> ChildrenEdges(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | The vertex. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TEdge> | Children edges. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
ChildrenVertices(TVertex)
Gets the collection of children vertices from the vertex
.
Declaration
IEnumerable<TVertex> ChildrenVertices(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | The vertex. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TVertex> | Children vertices. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
GetParent(TVertex)
Gets the parent vertex of the given vertex
.
Declaration
TVertex GetParent(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | The vertex. |
Returns
Type | Description |
---|---|
TVertex | The parent vertex if there is one, otherwise null. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentException | The given |
GetParentEdge(TVertex)
Gets the parent edge of the vertex
.
Declaration
TEdge GetParentEdge(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | The vertex. |
Returns
Type | Description |
---|---|
TEdge | The parent vertex edge. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentException | The given |
InducedEdgeCount(TVertex, TVertex)
Gets the number of edges between the source
and target
vertex.
Declaration
int InducedEdgeCount(TVertex source, TVertex target)
Parameters
Type | Name | Description |
---|---|---|
TVertex | source | Source vertex. |
TVertex | target | Target vertex. |
Returns
Type | Description |
---|---|
System.Int32 | The number of edge between |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentNullException |
|
System.ArgumentException | The |
IsCrossEdge(TEdge)
Gets a value indicating if edge
is a cross edge.
Declaration
bool IsCrossEdge(TEdge edge)
Parameters
Type | Name | Description |
---|---|---|
TEdge | edge | The edge. |
Returns
Type | Description |
---|---|
System.Boolean | True if the edge is a cross edge, false otherwise. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
IsInnerNode(TVertex)
Gets a value indicating if the vertex
is an inner node or a leaf.
Declaration
bool IsInnerNode(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | The vertex. |
Returns
Type | Description |
---|---|
System.Boolean | True if the |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
IsPredecessorOf(TVertex, TVertex)
Gets a value indicating if source
is a predecessor of target
.
Declaration
bool IsPredecessorOf(TVertex source, TVertex target)
Parameters
Type | Name | Description |
---|---|---|
TVertex | source | Source vertex. |
TVertex | target | Target vertex. |
Returns
Type | Description |
---|---|
System.Boolean | True if the |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentNullException |
|
IsRealEdge(TEdge)
Gets a value indicating whether the edge
exists really or is just an induced edge.
Declaration
bool IsRealEdge(TEdge edge)
Parameters
Type | Name | Description |
---|---|---|
TEdge | edge | The edge. |
Returns
Type | Description |
---|---|
System.Boolean | True if it's a real edge, false otherwise. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|