Show / Hide Table of Contents

Class HighlightAlgorithmBase<TVertex, TEdge, TGraph, TParameters>

Base class for all highlight algorithms.

Inheritance
System.Object
HighlightAlgorithmBase<TVertex, TEdge, TGraph, TParameters>
SimpleHighlightAlgorithm<TVertex, TEdge, TGraph>
Implements
IHighlightAlgorithm<TVertex, TEdge>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
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 Source

HighlightAlgorithmBase(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

controller is null.

Properties

| Improve this Doc View Source

Controller

Highlight controller.

Declaration
public IHighlightController<TVertex, TEdge, TGraph> Controller { get; }
Property Value
Type Description
IHighlightController<TVertex, TEdge, TGraph>
| Improve this Doc View Source

Parameters

Highlight parameters.

Declaration
public TParameters Parameters { get; }
Property Value
Type Description
TParameters

Methods

| Improve this Doc View Source

IsParametersSettable(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.

| Improve this Doc View Source

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 edge was highlighted, false otherwise.

Exceptions
Type Condition
System.ArgumentNullException

edge is null.

| Improve this Doc View Source

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 edge highlight was removed, false otherwise.

Exceptions
Type Condition
System.ArgumentNullException

edge is null.

| Improve this Doc View Source

OnParametersChanged()

Called each time a parameter property changed. Resets highlight.

Declaration
protected virtual void OnParametersChanged()
| Improve this Doc View Source

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 vertex was highlighted, false otherwise.

Exceptions
Type Condition
System.ArgumentNullException

vertex is null.

| Improve this Doc View Source

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 vertex highlight was removed, false otherwise.

Exceptions
Type Condition
System.ArgumentNullException

vertex is null.

| Improve this Doc View Source

ResetHighlight()

Resets the whole highlight.

Declaration
public abstract void ResetHighlight()
| Improve this Doc View Source

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 Source

IHighlightAlgorithm<TVertex, TEdge>.Parameters

Highlight parameters.

Declaration
IHighlightParameters IHighlightAlgorithm<TVertex, TEdge>.Parameters { get; }
Returns
Type Description
IHighlightParameters

Implements

IHighlightAlgorithm<TVertex, TEdge>

Extension Methods

GraphHelpers.GetDistances<TVertex, TEdge, TGraph>(TGraph)
GraphHelpers.GetDiameter<TVertex, TEdge, TGraph>(TGraph)
GraphHelpers.GetDiameter<TVertex, TEdge, TGraph>(TGraph, out Double[,])
  • Improve this Doc
  • View Source
In This Article
Back to top GraphShape