Interface ICompoundGraph<TVertex, TEdge>
Represents a graph with parent/children relationships between vertices.
Inherited Members
Namespace: GraphShape
Assembly: GraphShape.dll
Syntax
public interface ICompoundGraph<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 : IEdge<TVertex>
Type Parameters
Name | Description |
---|---|
TVertex | Vertex type. |
TEdge | Edge type. |
Properties
| Improve this Doc View SourceCompoundVertices
Gets the set of compound vertices.
Declaration
IEnumerable<TVertex> CompoundVertices { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TVertex> |
SimpleVertices
Gets the set of simple vertices.
Declaration
IEnumerable<TVertex> SimpleVertices { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TVertex> |
Methods
| Improve this Doc View SourceAddChildVertex(TVertex, TVertex)
Adds the child
vertex to the graph if not already inside and sets
it as child vertex of parent
vertex.
Declaration
bool AddChildVertex(TVertex parent, TVertex child)
Parameters
Type | Name | Description |
---|---|---|
TVertex | parent | Parent vertex. |
TVertex | child | Vertex to add as child. |
Returns
Type | Description |
---|---|
System.Boolean | True if vertex is added as child with success, false otherwise. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentNullException |
|
System.InvalidOperationException |
|
QuikGraph.VertexNotFoundException |
|
AddChildVertexRange(TVertex, IEnumerable<TVertex>)
Adds the set of children
vertices to the graph if not already inside and sets
them as children vertices of parent
vertex.
Declaration
int AddChildVertexRange(TVertex parent, IEnumerable<TVertex> children)
Parameters
Type | Name | Description |
---|---|---|
TVertex | parent | Parent vertex. |
System.Collections.Generic.IEnumerable<TVertex> | children | Vertices to add as children. |
Returns
Type | Description |
---|---|
System.Int32 | The number of vertices added to the graph. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentNullException |
|
System.InvalidOperationException | At least on of |
QuikGraph.VertexNotFoundException |
|
GetChildrenCount(TVertex)
Gets the number of children vertices of the given vertex
.
Declaration
int GetChildrenCount(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to get its children count. |
Returns
Type | Description |
---|---|
System.Int32 | Number of children vertices. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
QuikGraph.VertexNotFoundException |
|
GetChildrenVertices(TVertex)
Gets the children vertices of the given vertex
.
Declaration
IEnumerable<TVertex> GetChildrenVertices(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to get its children. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TVertex> | Children vertices. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
QuikGraph.VertexNotFoundException |
|
GetParent(TVertex)
Gets the parent vertex of the given vertex
.
Declaration
TVertex GetParent(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to get the parent. |
Returns
Type | Description |
---|---|
TVertex | Parent vertex if there is one, null otherwise. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
QuikGraph.VertexNotFoundException |
|
IsChildVertex(TVertex)
Checks if the given vertex
is a child vertex of another one.
Declaration
bool IsChildVertex(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to check. |
Returns
Type | Description |
---|---|
System.Boolean | True if the vertex is a child one, false otherwise. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
QuikGraph.VertexNotFoundException |
|
IsCompoundVertex(TVertex)
Checks if the given vertex
is a compound vertex (child vertex).
Declaration
bool IsCompoundVertex(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to check. |
Returns
Type | Description |
---|---|
System.Boolean | True if the vertex is a compound one, false otherwise. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
QuikGraph.VertexNotFoundException |
|