Show / Hide Table of Contents

Class LayoutContext<TVertex, TEdge, TGraph>

Graph layout context.

Inheritance
System.Object
LayoutContext<TVertex, TEdge, TGraph>
CompoundLayoutContext<TVertex, TEdge, TGraph>
ContextualLayoutContext<TVertex, TEdge, TGraph>
Implements
ILayoutContext<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.Layout
Assembly: GraphShape.dll
Syntax
public class LayoutContext<TVertex, TEdge, TGraph> : ILayoutContext<TVertex, TEdge, TGraph> where TEdge : IEdge<TVertex> where TGraph : IVertexAndEdgeListGraph<TVertex, TEdge>
Type Parameters
Name Description
TVertex

Vertex type.

TEdge

Edge type.

TGraph

Graph type.

Constructors

| Improve this Doc View Source

LayoutContext(TGraph, IDictionary<TVertex, Point>, IDictionary<TVertex, Size>, LayoutMode)

Initializes a new instance of the LayoutContext<TVertex, TEdge, TGraph> class.

Declaration
public LayoutContext(TGraph graph, IDictionary<TVertex, Point> positions, IDictionary<TVertex, Size> sizes, LayoutMode mode)
Parameters
Type Name Description
TGraph graph

Graph to layout.

System.Collections.Generic.IDictionary<TVertex, Point> positions

Vertices positions.

System.Collections.Generic.IDictionary<TVertex, Size> sizes

Vertices sizes.

LayoutMode mode

Layout mode.

Exceptions
Type Condition
System.ArgumentNullException

sizes is null.

Properties

| Improve this Doc View Source

Graph

Graph concerned by the layout.

Declaration
public TGraph Graph { get; }
Property Value
Type Description
TGraph
| Improve this Doc View Source

Mode

Layout mode.

Declaration
public LayoutMode Mode { get; }
Property Value
Type Description
LayoutMode
| Improve this Doc View Source

Positions

Vertices positions.

Declaration
public IDictionary<TVertex, Point> Positions { get; }
Property Value
Type Description
System.Collections.Generic.IDictionary<TVertex, Point>
| Improve this Doc View Source

Sizes

Vertices sizes.

Declaration
public IDictionary<TVertex, Size> Sizes { get; }
Property Value
Type Description
System.Collections.Generic.IDictionary<TVertex, Size>

Implements

ILayoutContext<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