Class HighlightAlgorithmBase<TVertex, TEdge, TGraph, TParameters>
Base class for all highlight algorithms.
Inheritance
Implements
Inherited Members
Namespace: GraphShape.Algorithms.Highlight
Assembly: GraphShape.dll
Syntax
public abstract class HighlightAlgorithmBase<TVertex, TEdge, TGraph, TParameters> : IHighlightAlgorithm<TVertex, TEdge> where TEdge : IEdge<TVertex> where TGraph : class, IBidirectionalGraph<TVertex, TEdge> where TParameters : class, IHighlightParameters
Type Parameters
Name | Description |
---|---|
TVertex | Vertex type. |
TEdge | Edge type. |
TGraph | Graph type. |
TParameters | Algorithm parameters type. |
Constructors
| Improve this Doc View SourceHighlightAlgorithmBase(IHighlightController<TVertex, TEdge, TGraph>, IHighlightParameters)
Initializes a new instance of the HighlightAlgorithmBase<TVertex, TEdge, TGraph, TParameters> class.
Declaration
protected HighlightAlgorithmBase(IHighlightController<TVertex, TEdge, TGraph> controller, IHighlightParameters parameters)
Parameters
Type | Name | Description |
---|---|---|
IHighlightController<TVertex, TEdge, TGraph> | controller | Highlight controller. |
IHighlightParameters | parameters | Highlight algorithm parameters. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
Properties
| Improve this Doc View SourceController
Highlight controller.
Declaration
public IHighlightController<TVertex, TEdge, TGraph> Controller { get; }
Property Value
Type | Description |
---|---|
IHighlightController<TVertex, TEdge, TGraph> |
Parameters
Highlight parameters.
Declaration
public TParameters Parameters { get; }
Property Value
Type | Description |
---|---|
TParameters |
Methods
| Improve this Doc View SourceIsParametersSettable(IHighlightParameters)
Checks if given highlight algorithm parameters
can be set to this highlight algorithm.
Declaration
public bool IsParametersSettable(IHighlightParameters parameters)
Parameters
Type | Name | Description |
---|---|---|
IHighlightParameters | parameters | Highlight parameters to check. |
Returns
Type | Description |
---|---|
System.Boolean | True if parameters can be set, false otherwise. |
OnEdgeHighlighting(TEdge)
Asks to highlight the given edge
.
Declaration
public abstract bool OnEdgeHighlighting(TEdge edge)
Parameters
Type | Name | Description |
---|---|---|
TEdge | edge | Edge to highlight. |
Returns
Type | Description |
---|---|
System.Boolean | True if the |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
OnEdgeHighlightRemoving(TEdge)
Asks to remove the highlighting of the given edge
.
Declaration
public abstract bool OnEdgeHighlightRemoving(TEdge edge)
Parameters
Type | Name | Description |
---|---|---|
TEdge | edge | Edge to remove its highlighting. |
Returns
Type | Description |
---|---|
System.Boolean | True if the |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
OnParametersChanged()
Called each time a parameter property changed. Resets highlight.
Declaration
protected virtual void OnParametersChanged()
OnVertexHighlighting(TVertex)
Asks to highlight the given vertex
.
Declaration
public abstract bool OnVertexHighlighting(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to highlight. |
Returns
Type | Description |
---|---|
System.Boolean | True if the |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
OnVertexHighlightRemoving(TVertex)
Asks to remove the highlighting of the given vertex
.
Declaration
public abstract bool OnVertexHighlightRemoving(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to remove its highlighting. |
Returns
Type | Description |
---|---|
System.Boolean | True if the |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
ResetHighlight()
Resets the whole highlight.
Declaration
public abstract void ResetHighlight()
TrySetParameters(IHighlightParameters)
Tries to set the given highlight algorithm parameters
.
Declaration
public bool TrySetParameters(IHighlightParameters parameters)
Parameters
Type | Name | Description |
---|---|---|
IHighlightParameters | parameters | Highlight parameters to set. |
Returns
Type | Description |
---|---|
System.Boolean | True if parameters were set, false otherwise. |
Explicit Interface Implementations
| Improve this Doc View SourceIHighlightAlgorithm<TVertex, TEdge>.Parameters
Highlight parameters.
Declaration
IHighlightParameters IHighlightAlgorithm<TVertex, TEdge>.Parameters { get; }
Returns
Type | Description |
---|---|
IHighlightParameters |