Class StandardHighlightAlgorithmFactory<TVertex, TEdge, TGraph>
Simple implementation of an highlight algorithm factory.
Inheritance
Implements
Inherited Members
Namespace: GraphShape.Algorithms.Highlight
Assembly: GraphShape.dll
Syntax
public class StandardHighlightAlgorithmFactory<TVertex, TEdge, TGraph> : IHighlightAlgorithmFactory<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 SourceHighlightModes
Highlight modes.
Declaration
public 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
public 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
public 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
public 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
public 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. |