Interface IEdgeRoutingAlgorithmFactory<TVertex, TEdge, TGraph>
Represents a factory of edge routing algorithms.
Namespace: GraphShape.Algorithms.EdgeRouting
Assembly: GraphShape.dll
Syntax
public interface IEdgeRoutingAlgorithmFactory<TVertex, TEdge, TGraph>
where TEdge : IEdge<TVertex> where TGraph : class, IBidirectionalGraph<TVertex, TEdge>
Type Parameters
Name | Description |
---|---|
TVertex | Vertex type. |
TEdge | Edge type. |
TGraph | Graph type. |
Properties
| Improve this Doc View SourceAlgorithmTypes
The set of available algorithms.
Declaration
IEnumerable<string> AlgorithmTypes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |
Methods
| Improve this Doc View SourceCreateAlgorithm(String, ILayoutContext<TVertex, TEdge, TGraph>, IEdgeRoutingParameters)
Creates an algorithm corresponding to given algorithmType
,
context
and parameters
.
Declaration
IEdgeRoutingAlgorithm<TVertex, TEdge, TGraph> CreateAlgorithm(string algorithmType, ILayoutContext<TVertex, TEdge, TGraph> context, IEdgeRoutingParameters parameters)
Parameters
Type | Name | Description |
---|---|---|
System.String | algorithmType | Algorithm type. |
ILayoutContext<TVertex, TEdge, TGraph> | context | Creation context. |
IEdgeRoutingParameters | parameters | Algorithm parameters. |
Returns
Type | Description |
---|---|
IEdgeRoutingAlgorithm<TVertex, TEdge, TGraph> | Created algorithm. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentNullException |
|
CreateParameters(String, IEdgeRoutingParameters)
Creates algorithm parameters for an algorithm of given algorithmType
and parameters
.
Declaration
IEdgeRoutingParameters CreateParameters(string algorithmType, IEdgeRoutingParameters parameters)
Parameters
Type | Name | Description |
---|---|---|
System.String | algorithmType | Algorithm type. |
IEdgeRoutingParameters | parameters | Algorithm parameters. |
Returns
Type | Description |
---|---|
IEdgeRoutingParameters | Parameters for the algorithm. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
GetAlgorithmType(IEdgeRoutingAlgorithm<TVertex, TEdge, TGraph>)
Gets the algorithm type from a given algorithm
.
Declaration
string GetAlgorithmType(IEdgeRoutingAlgorithm<TVertex, TEdge, TGraph> algorithm)
Parameters
Type | Name | Description |
---|---|---|
IEdgeRoutingAlgorithm<TVertex, TEdge, TGraph> | algorithm | Algorithm to get its type. |
Returns
Type | Description |
---|---|
System.String | Algorithm type. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
IsValidAlgorithm(String)
Checks if the given algorithmType
is a valid one.
Declaration
bool IsValidAlgorithm(string algorithmType)
Parameters
Type | Name | Description |
---|---|---|
System.String | algorithmType | Algorithm type. |
Returns
Type | Description |
---|---|
System.Boolean | True if the algorithm type is valid, false otherwise. |