Class LayoutAlgorithmBase<TVertex, TEdge, TGraph>
Base class for all ILayoutAlgorithm<TVertex, TEdge, TGraph> implementations.
Inheritance
Implements
Inherited Members
Namespace: GraphShape.Algorithms.Layout
Assembly: GraphShape.dll
Syntax
public abstract class LayoutAlgorithmBase<TVertex, TEdge, TGraph> : AlgorithmBase, IAlgorithm, ILayoutAlgorithm<TVertex, TEdge, TGraph>, IAlgorithm<TGraph>, IComputation 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 SourceLayoutAlgorithmBase(TGraph)
Initializes a new instance of the LayoutAlgorithmBase<TVertex, TEdge, TGraph> class.
Declaration
protected LayoutAlgorithmBase(TGraph visitedGraph)
Parameters
Type | Name | Description |
---|---|---|
TGraph | visitedGraph | Graph to layout. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
LayoutAlgorithmBase(TGraph, IDictionary<TVertex, Point>)
Initializes a new instance of the LayoutAlgorithmBase<TVertex, TEdge, TGraph> class.
Declaration
protected LayoutAlgorithmBase(TGraph visitedGraph, IDictionary<TVertex, Point> verticesPositions)
Parameters
Type | Name | Description |
---|---|---|
TGraph | visitedGraph | Graph to layout. |
System.Collections.Generic.IDictionary<TVertex, Point> | verticesPositions | Vertices positions. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
Properties
| Improve this Doc View SourceReportOnIterationEndNeeded
Indicates if there is any watcher on iterations ends.
Declaration
public virtual bool ReportOnIterationEndNeeded { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
ReportOnProgressChangedNeeded
Indicates if there is any watcher on algorithm progress.
Declaration
public bool ReportOnProgressChangedNeeded { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
VerticesPositions
Vertices positions associations.
Declaration
public IDictionary<TVertex, Point> VerticesPositions { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<TVertex, Point> |
VisitedGraph
Declaration
public TGraph VisitedGraph { get; }
Property Value
Type | Description |
---|---|
TGraph |
Methods
| Improve this Doc View SourceGetEdgeInfo(TEdge)
Returns the extra layout information of the edge
(or null).
Declaration
public virtual object GetEdgeInfo(TEdge edge)
Parameters
Type | Name | Description |
---|---|---|
TEdge | edge |
Returns
Type | Description |
---|---|
System.Object |
GetVertexInfo(TVertex)
Returns the extra layout information of the vertex
(or null).
Declaration
public virtual object GetVertexInfo(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex |
Returns
Type | Description |
---|---|
System.Object |
OnIterationEnded(ILayoutIterationEventArgs<TVertex>)
Called when a layout iteration has ended.
Declaration
protected virtual void OnIterationEnded(ILayoutIterationEventArgs<TVertex> args)
Parameters
Type | Name | Description |
---|---|---|
ILayoutIterationEventArgs<TVertex> | args | Event arguments. |
OnProgressChanged(Double)
Called when some progress was made in layout algorithm.
Declaration
protected virtual void OnProgressChanged(double percent)
Parameters
Type | Name | Description |
---|---|---|
System.Double | percent | New progress percentage. |
Events
| Improve this Doc View SourceIterationEnded
Fired when a layout iteration has been done.
Declaration
public event LayoutIterationEndedEventHandler<TVertex> IterationEnded
Event Type
Type | Description |
---|---|
LayoutIterationEndedEventHandler<TVertex> |
ProgressChanged
Fired when layout algorithm progress changed.
Declaration
public event ProgressChangedEventHandler ProgressChanged
Event Type
Type | Description |
---|---|
ProgressChangedEventHandler |