Interface IHighlightAlgorithmFactory<TVertex, TEdge, TGraph>
Represents a factory of highlight algorithms.
Namespace: GraphShape.Algorithms.Highlight
Assembly: GraphShape.dll
Syntax
public interface IHighlightAlgorithmFactory<TVertex, TEdge, in 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 SourceHighlightModes
Highlight modes.
Declaration
IEnumerable<string> HighlightModes { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<System.String> |
Methods
| Improve this Doc View SourceCreateAlgorithm(String, IHighlightContext<TVertex, TEdge, TGraph>, IHighlightController<TVertex, TEdge, TGraph>, IHighlightParameters)
Creates an algorithm corresponding using given highlightMode,
context, controller and parameters.
Declaration
IHighlightAlgorithm<TVertex, TEdge> CreateAlgorithm(string highlightMode, IHighlightContext<TVertex, TEdge, TGraph> context, IHighlightController<TVertex, TEdge, TGraph> controller, IHighlightParameters parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | highlightMode | Highlight mode. |
| IHighlightContext<TVertex, TEdge, TGraph> | context | Creation context. |
| IHighlightController<TVertex, TEdge, TGraph> | controller | Highlight controller. |
| IHighlightParameters | parameters | Algorithm parameters. |
Returns
| Type | Description |
|---|---|
| IHighlightAlgorithm<TVertex, TEdge> | Created algorithm. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException |
|
| System.ArgumentNullException |
|
| System.ArgumentNullException |
|
CreateParameters(String, IHighlightParameters)
Creates algorithm parameters for an algorithm using given highlightMode
and parameters.
Declaration
IHighlightParameters CreateParameters(string highlightMode, IHighlightParameters parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | highlightMode | Highlight mode. |
| IHighlightParameters | parameters | Algorithm parameters. |
Returns
| Type | Description |
|---|---|
| IHighlightParameters | Parameters for the algorithm. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException |
|
GetHighlightMode(IHighlightAlgorithm<TVertex, TEdge>)
Gets the algorithm highlight mode from a given algorithm.
Declaration
string GetHighlightMode(IHighlightAlgorithm<TVertex, TEdge> algorithm)
Parameters
| Type | Name | Description |
|---|---|---|
| IHighlightAlgorithm<TVertex, TEdge> | algorithm | Algorithm from which getting highlight mode. |
Returns
| Type | Description |
|---|---|
| System.String | Highlight mode. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException |
|
IsValidMode(String)
Checks if the given mode is a valid one.
Declaration
bool IsValidMode(string mode)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | mode | Highlight mode. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the highlight mode is valid, false otherwise. |