Class SimpleHighlightAlgorithm<TVertex, TEdge, TGraph>
Simple highlight algorithm.
Inheritance
Implements
Inherited Members
Namespace: GraphShape.Algorithms.Highlight
Assembly: GraphShape.dll
Syntax
public class SimpleHighlightAlgorithm<TVertex, TEdge, TGraph> : HighlightAlgorithmBase<TVertex, TEdge, TGraph, IHighlightParameters>, IHighlightAlgorithm<TVertex, TEdge> where TEdge : IEdge<TVertex> where TGraph : class, IBidirectionalGraph<TVertex, TEdge>
Type Parameters
Name | Description |
---|---|
TVertex | Vertex type. |
TEdge | Edge type. |
TGraph | Graph type. |
Constructors
| Improve this Doc View SourceSimpleHighlightAlgorithm(IHighlightController<TVertex, TEdge, TGraph>, IHighlightParameters)
Initializes a new instance of the SimpleHighlightAlgorithm<TVertex, TEdge, TGraph> class.
Declaration
public SimpleHighlightAlgorithm(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 |
|
Methods
| Improve this Doc View SourceOnEdgeHighlighting(TEdge)
Asks to highlight the given edge
.
Declaration
public override bool OnEdgeHighlighting(TEdge edge)
Parameters
Type | Name | Description |
---|---|---|
TEdge | edge | Edge to highlight. |
Returns
Type | Description |
---|---|
System.Boolean | True if the |
Overrides
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
OnEdgeHighlightRemoving(TEdge)
Asks to remove the highlighting of the given edge
.
Declaration
public override bool OnEdgeHighlightRemoving(TEdge edge)
Parameters
Type | Name | Description |
---|---|---|
TEdge | edge | Edge to remove its highlighting. |
Returns
Type | Description |
---|---|
System.Boolean | True if the |
Overrides
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
OnVertexHighlighting(TVertex)
Asks to highlight the given vertex
.
Declaration
public override bool OnVertexHighlighting(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to highlight. |
Returns
Type | Description |
---|---|
System.Boolean | True if the |
Overrides
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
OnVertexHighlightRemoving(TVertex)
Asks to remove the highlighting of the given vertex
.
Declaration
public override bool OnVertexHighlightRemoving(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to remove its highlighting. |
Returns
Type | Description |
---|---|
System.Boolean | True if the |
Overrides
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
ResetHighlight()
Resets the semi-highlights according to the actually highlighted vertices/edges.
This method should be called if the graph changed, or the highlights should be reset.
Declaration
public override void ResetHighlight()