Show / Hide Table of Contents

Interface ICompoundGraph<TVertex, TEdge>

Represents a graph with parent/children relationships between vertices.

Inherited Members
QuikGraph.IVertexSet<TVertex>.IsVerticesEmpty
QuikGraph.IVertexSet<TVertex>.VertexCount
QuikGraph.IVertexSet<TVertex>.Vertices
QuikGraph.IEdgeSet<TVertex, TEdge>.ContainsEdge(TEdge)
QuikGraph.IEdgeSet<TVertex, TEdge>.IsEdgesEmpty
QuikGraph.IEdgeSet<TVertex, TEdge>.EdgeCount
QuikGraph.IEdgeSet<TVertex, TEdge>.Edges
QuikGraph.IBidirectionalIncidenceGraph<TVertex, TEdge>.IsInEdgesEmpty(TVertex)
QuikGraph.IBidirectionalIncidenceGraph<TVertex, TEdge>.InDegree(TVertex)
QuikGraph.IBidirectionalIncidenceGraph<TVertex, TEdge>.InEdges(TVertex)
QuikGraph.IBidirectionalIncidenceGraph<TVertex, TEdge>.TryGetInEdges(TVertex, System.Collections.Generic.IEnumerable<TEdge>)
QuikGraph.IBidirectionalIncidenceGraph<TVertex, TEdge>.InEdge(TVertex, System.Int32)
QuikGraph.IBidirectionalIncidenceGraph<TVertex, TEdge>.Degree(TVertex)
QuikGraph.IIncidenceGraph<TVertex, TEdge>.ContainsEdge(TVertex, TVertex)
QuikGraph.IIncidenceGraph<TVertex, TEdge>.TryGetEdge(TVertex, TVertex, TEdge)
QuikGraph.IIncidenceGraph<TVertex, TEdge>.TryGetEdges(TVertex, TVertex, System.Collections.Generic.IEnumerable<TEdge>)
QuikGraph.IImplicitGraph<TVertex, TEdge>.IsOutEdgesEmpty(TVertex)
QuikGraph.IImplicitGraph<TVertex, TEdge>.OutDegree(TVertex)
QuikGraph.IImplicitGraph<TVertex, TEdge>.OutEdges(TVertex)
QuikGraph.IImplicitGraph<TVertex, TEdge>.TryGetOutEdges(TVertex, System.Collections.Generic.IEnumerable<TEdge>)
QuikGraph.IImplicitGraph<TVertex, TEdge>.OutEdge(TVertex, System.Int32)
QuikGraph.IGraph<TVertex, TEdge>.IsDirected
QuikGraph.IGraph<TVertex, TEdge>.AllowParallelEdges
QuikGraph.IImplicitVertexSet<TVertex>.ContainsVertex(TVertex)
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 Source

CompoundVertices

Gets the set of compound vertices.

Declaration
IEnumerable<TVertex> CompoundVertices { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<TVertex>
| Improve this Doc View Source

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 Source

AddChildVertex(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

parent is null.

System.ArgumentNullException

child is null.

System.InvalidOperationException

child already has a parent vertex.

QuikGraph.VertexNotFoundException

parent is not part of the graph.

| Improve this Doc View Source

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

parent is null.

System.ArgumentNullException

children is null or at least one of them is null.

System.InvalidOperationException

At least on of children already has a parent vertex.

QuikGraph.VertexNotFoundException

parent is not part of the graph.

| Improve this Doc View Source

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

vertex is null.

QuikGraph.VertexNotFoundException

vertex is not part of the graph.

| Improve this Doc View Source

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

vertex is null.

QuikGraph.VertexNotFoundException

vertex is not part of the graph.

| Improve this Doc View Source

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

vertex is null.

QuikGraph.VertexNotFoundException

vertex is not part of the graph.

| Improve this Doc View Source

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

vertex is null.

QuikGraph.VertexNotFoundException

vertex is not part of the graph.

| Improve this Doc View Source

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

vertex is null.

QuikGraph.VertexNotFoundException

vertex is not part of the graph.

Extension Methods

GraphHelpers.GetNeighbors<TVertex, TEdge>(IBidirectionalGraph<TVertex, TEdge>, TVertex)
GraphHelpers.GetOutNeighbors<TVertex, TEdge>(IVertexAndEdgeListGraph<TVertex, TEdge>, TVertex)
GraphHelpers.GetEdgesBetween<TVertex, TEdge>(IVertexAndEdgeListGraph<TVertex, TEdge>, TVertex[], TVertex[])
GraphHelpers.GetDistances<TVertex, TEdge, TGraph>(TGraph)
GraphHelpers.GetDiameter<TVertex, TEdge, TGraph>(TGraph)
GraphHelpers.GetDiameter<TVertex, TEdge, TGraph>(TGraph, out Double[,])
GraphHelpers.Convert<TOldVertex, TOldEdge, TNewVertex, TNewEdge, TNewGraph>(IVertexAndEdgeListGraph<TOldVertex, TOldEdge>, TNewGraph, Func<TOldVertex, TNewVertex>, Func<TOldEdge, TNewEdge>)
GraphHelpers.Convert<TVertex, TOldEdge, TNewEdge, TNewGraph>(IVertexAndEdgeListGraph<TVertex, TOldEdge>, TNewGraph, Func<TOldEdge, TNewEdge>)
GraphHelpers.Convert<TVertex, TEdge, TNewGraph>(IVertexAndEdgeListGraph<TVertex, TEdge>, TNewGraph)
GraphHelpers.Convert<TOldVertex, TOldEdge, TNewVertex, TNewEdge>(IVertexAndEdgeListGraph<TOldVertex, TOldEdge>, Func<TOldVertex, TNewVertex>, Func<TOldEdge, TNewEdge>)
GraphHelpers.Convert<TVertex, TOldEdge, TNewEdge>(IVertexAndEdgeListGraph<TVertex, TOldEdge>, Func<TOldEdge, TNewEdge>)
GraphHelpers.CopyToBidirectionalGraph<TVertex, TEdge>(IVertexAndEdgeListGraph<TVertex, TEdge>)
  • Improve this Doc
  • View Source
In This Article
Back to top GraphShape