Show / Hide Table of Contents

Class StandardHighlightAlgorithmFactory<TVertex, TEdge, TGraph>

Simple implementation of an highlight algorithm factory.

Inheritance
System.Object
StandardHighlightAlgorithmFactory<TVertex, TEdge, TGraph>
Implements
IHighlightAlgorithmFactory<TVertex, TEdge, TGraph>
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 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 Source

HighlightModes

Highlight modes.

Declaration
public IEnumerable<string> HighlightModes { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<System.String>

Methods

| Improve this Doc View Source

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

highlightMode is null.

System.ArgumentNullException

context is null.

System.ArgumentNullException

controller is null.

| Improve this Doc View Source

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

highlightMode is null.

| Improve this Doc View Source

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

algorithm is null.

| Improve this Doc View Source

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.

Implements

IHighlightAlgorithmFactory<TVertex, TEdge, TGraph>

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