Show / Hide Table of Contents

Interface ILayoutAlgorithmFactory<TVertex, TEdge, TGraph>

Represents a factory of layout algorithms.

Namespace: GraphShape.Algorithms.Layout
Assembly: GraphShape.dll
Syntax
public interface ILayoutAlgorithmFactory<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

AlgorithmTypes

The set of available algorithms.

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

Methods

| Improve this Doc View Source

CreateAlgorithm(String, ILayoutContext<TVertex, TEdge, TGraph>, ILayoutParameters)

Creates an algorithm corresponding to given algorithmType, context and parameters.

Declaration
ILayoutAlgorithm<TVertex, TEdge, TGraph> CreateAlgorithm(string algorithmType, ILayoutContext<TVertex, TEdge, TGraph> context, ILayoutParameters parameters)
Parameters
Type Name Description
System.String algorithmType

Algorithm type.

ILayoutContext<TVertex, TEdge, TGraph> context

Creation context.

ILayoutParameters parameters

Algorithm parameters.

Returns
Type Description
ILayoutAlgorithm<TVertex, TEdge, TGraph>

Created algorithm.

Exceptions
Type Condition
System.ArgumentNullException

algorithmType is null.

System.ArgumentNullException

context is null.

| Improve this Doc View Source

CreateParameters(String, ILayoutParameters)

Creates algorithm parameters for an algorithm of given algorithmType and parameters.

Declaration
ILayoutParameters CreateParameters(string algorithmType, ILayoutParameters parameters)
Parameters
Type Name Description
System.String algorithmType

Algorithm type.

ILayoutParameters parameters

Algorithm parameters.

Returns
Type Description
ILayoutParameters

Parameters for the algorithm.

Exceptions
Type Condition
System.ArgumentNullException

algorithmType is null.

| Improve this Doc View Source

GetAlgorithmType(ILayoutAlgorithm<TVertex, TEdge, TGraph>)

Gets the algorithm type from a given algorithm.

Declaration
string GetAlgorithmType(ILayoutAlgorithm<TVertex, TEdge, TGraph> algorithm)
Parameters
Type Name Description
ILayoutAlgorithm<TVertex, TEdge, TGraph> algorithm

Algorithm to get its type.

Returns
Type Description
System.String

Algorithm type.

Exceptions
Type Condition
System.ArgumentNullException

algorithm is null.

| Improve this Doc View Source

IsValidAlgorithm(String)

Checks if the given algorithmType is a valid one.

Declaration
bool IsValidAlgorithm(string algorithmType)
Parameters
Type Name Description
System.String algorithmType

Algorithm type.

Returns
Type Description
System.Boolean

True if the algorithm type is valid, false otherwise.

| Improve this Doc View Source

NeedEdgeRouting(String)

Indicates if the given algorithmType require edge routing.

Declaration
bool NeedEdgeRouting(string algorithmType)
Parameters
Type Name Description
System.String algorithmType

Algorithm type.

Returns
Type Description
System.Boolean

True if the algorithm require edge routing, false otherwise.

Exceptions
Type Condition
System.ArgumentNullException

algorithmType is null.

| Improve this Doc View Source

NeedOverlapRemoval(String)

Indicates if the given algorithmType require overlap removal.

Declaration
bool NeedOverlapRemoval(string algorithmType)
Parameters
Type Name Description
System.String algorithmType

Algorithm type.

Returns
Type Description
System.Boolean

True if the algorithm require overlap removal, false otherwise.

Exceptions
Type Condition
System.ArgumentNullException

algorithmType is null.

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