Interface ILayoutAlgorithmFactory<TVertex, TEdge, TGraph>
Represents a factory of layout algorithms.
Namespace: GraphShape.Algorithms.Layout
Assembly: GraphShape.dll
Syntax
public interface ILayoutAlgorithmFactory<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>, ILayoutParameters)
Creates an algorithm corresponding to given algorithmType
,
context
and parameters
.
Declaration
ILayoutAlgorithm<TVertex, TEdge, TGraph> CreateAlgorithm(string algorithmType, ILayoutContext<TVertex, TEdge, TGraph> context, ILayoutParameters parameters)
Parameters
Type | Name | Description |
---|---|---|
System.String | algorithmType | Algorithm type. |
ILayoutContext<TVertex, TEdge, TGraph> | context | Creation context. |
ILayoutParameters | parameters | Algorithm parameters. |
Returns
Type | Description |
---|---|
ILayoutAlgorithm<TVertex, TEdge, TGraph> | Created algorithm. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentNullException |
|
CreateParameters(String, ILayoutParameters)
Creates algorithm parameters for an algorithm of given algorithmType
and parameters
.
Declaration
ILayoutParameters CreateParameters(string algorithmType, ILayoutParameters parameters)
Parameters
Type | Name | Description |
---|---|---|
System.String | algorithmType | Algorithm type. |
ILayoutParameters | parameters | Algorithm parameters. |
Returns
Type | Description |
---|---|
ILayoutParameters | Parameters for the algorithm. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
GetAlgorithmType(ILayoutAlgorithm<TVertex, TEdge, TGraph>)
Gets the algorithm type from a given algorithm
.
Declaration
string GetAlgorithmType(ILayoutAlgorithm<TVertex, TEdge, TGraph> algorithm)
Parameters
Type | Name | Description |
---|---|---|
ILayoutAlgorithm<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. |
NeedEdgeRouting(String)
Indicates if the given algorithmType
require edge routing.
Declaration
bool NeedEdgeRouting(string algorithmType)
Parameters
Type | Name | Description |
---|---|---|
System.String | algorithmType | Algorithm type. |
Returns
Type | Description |
---|---|
System.Boolean | True if the algorithm require edge routing, false otherwise. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
NeedOverlapRemoval(String)
Indicates if the given algorithmType
require overlap removal.
Declaration
bool NeedOverlapRemoval(string algorithmType)
Parameters
Type | Name | Description |
---|---|---|
System.String | algorithmType | Algorithm type. |
Returns
Type | Description |
---|---|
System.Boolean | True if the algorithm require overlap removal, false otherwise. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|