Class TransitionFactoryImplicitGraph<TVertex, TEdge>
Implementation for a graph data structure that support growth by transitions made by out edges of its vertices.
Inheritance
Inherited Members
Namespace: QuikGraph.Algorithms.Exploration
Assembly: QuikGraph.dll
Syntax
[Serializable]
public sealed class TransitionFactoryImplicitGraph<TVertex, TEdge> : IImplicitGraph<TVertex, TEdge>, IGraph<TVertex, TEdge>, IImplicitVertexSet<TVertex> where TVertex : ICloneable where TEdge : IEdge<TVertex>
Type Parameters
Name | Description |
---|---|
TVertex | Vertex type. |
TEdge | Edge type |
Properties
| Improve this Doc View SourceAllowParallelEdges
Gets a value indicating if the graph allows parallel edges
Declaration
public bool AllowParallelEdges { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsDirected
Gets a value indicating if the graph is directed
Declaration
public bool IsDirected { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
SuccessorEdgePredicate
Predicate that an edge must match to be the successor of a source vertex.
Declaration
public EdgePredicate<TVertex, TEdge> SuccessorEdgePredicate { get; set; }
Property Value
Type | Description |
---|---|
EdgePredicate<TVertex, TEdge> |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Set value is null. |
SuccessorVertexPredicate
Predicate that a vertex must match to be the successor (target) of an edge.
Declaration
public VertexPredicate<TVertex> SuccessorVertexPredicate { get; set; }
Property Value
Type | Description |
---|---|
VertexPredicate<TVertex> |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Set value is null. |
Methods
| Improve this Doc View SourceAddTransitionFactories(IEnumerable<ITransitionFactory<TVertex, TEdge>>)
Adds new ITransitionFactory<TVertex, TEdge>s to this graph.
Declaration
public void AddTransitionFactories(IEnumerable<ITransitionFactory<TVertex, TEdge>> transitionFactories)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<ITransitionFactory<TVertex, TEdge>> | transitionFactories | Transition factories to add. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
AddTransitionFactory(ITransitionFactory<TVertex, TEdge>)
Adds a new ITransitionFactory<TVertex, TEdge> to this graph.
Declaration
public void AddTransitionFactory(ITransitionFactory<TVertex, TEdge> transitionFactory)
Parameters
Type | Name | Description |
---|---|---|
ITransitionFactory<TVertex, TEdge> | transitionFactory | Transition factory to add. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
ClearTransitionFactories()
Clears all ITransitionFactory<TVertex, TEdge> from this graph.
Declaration
public void ClearTransitionFactories()
ContainsTransitionFactory(ITransitionFactory<TVertex, TEdge>)
Checks if this graph contains the given transitionFactory
.
Declaration
public bool ContainsTransitionFactory(ITransitionFactory<TVertex, TEdge> transitionFactory)
Parameters
Type | Name | Description |
---|---|---|
ITransitionFactory<TVertex, TEdge> | transitionFactory | Transition factory to check. |
Returns
Type | Description |
---|---|
System.Boolean |
ContainsVertex(TVertex)
Determines whether this set contains the specified vertex
.
Declaration
public bool ContainsVertex(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to check. |
Returns
Type | Description |
---|---|
System.Boolean | True if the specified |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
IsOutEdgesEmpty(TVertex)
Determines whether there are out-edges associated to vertex
.
Declaration
public bool IsOutEdgesEmpty(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | The vertex. |
Returns
Type | Description |
---|---|
System.Boolean | True if |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
VertexNotFoundException |
|
OutDegree(TVertex)
Gets the count of out-edges of vertex
.
Declaration
public int OutDegree(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | The vertex. |
Returns
Type | Description |
---|---|
System.Int32 | The count of out-edges of |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
VertexNotFoundException |
|
OutEdge(TVertex, Int32)
Gets the out-edge of vertex
at position index
.
Declaration
public TEdge OutEdge(TVertex vertex, int index)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | The vertex. |
System.Int32 | index | The index. |
Returns
Type | Description |
---|---|
TEdge | The out-edge at position |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentOutOfRangeException | No vertex at |
VertexNotFoundException |
|
OutEdges(TVertex)
Gets the out-edges of vertex
.
Declaration
public IEnumerable<TEdge> OutEdges(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | The vertex. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TEdge> | An enumeration of the out-edges of |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
VertexNotFoundException |
|
RemoveTransitionFactory(ITransitionFactory<TVertex, TEdge>)
Removes the given transitionFactory
from this graph.
Declaration
public bool RemoveTransitionFactory(ITransitionFactory<TVertex, TEdge> transitionFactory)
Parameters
Type | Name | Description |
---|---|---|
ITransitionFactory<TVertex, TEdge> | transitionFactory | Transition factory to remove. |
Returns
Type | Description |
---|---|
System.Boolean |
TryGetOutEdges(TVertex, out IEnumerable<TEdge>)
Tries to get the out-edges of vertex
.
Declaration
public bool TryGetOutEdges(TVertex vertex, out IEnumerable<TEdge> edges)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | The vertex. |
System.Collections.Generic.IEnumerable<TEdge> | edges | Out-edges. |
Returns
Type | Description |
---|---|
System.Boolean | True if |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|