Class StandardEdgeRoutingAlgorithmFactory<TVertex, TEdge, TGraph>
Dummy implementation of edge routing algorithm factory.
Inheritance
System.Object
StandardEdgeRoutingAlgorithmFactory<TVertex, TEdge, TGraph>
Implements
IEdgeRoutingAlgorithmFactory<TVertex, TEdge, TGraph>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: GraphShape.Algorithms.EdgeRouting
Assembly: GraphShape.dll
Syntax
public class StandardEdgeRoutingAlgorithmFactory<TVertex, TEdge, TGraph> : 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
public 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
public 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
public 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
public 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
public 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. |