nuget server logo nuget api documents
↑

API Docs / Microsoft.VisualBasic.Data.visualize.Network.Layouts / SpringEmbedder

SpringEmbedder

Full name Microsoft.VisualBasic.Data.visualize.Network.Layouts.SpringEmbedder Assembly Microsoft.VisualBasic.Data.visualize.Network.Layouts Members 8

01 Syntax

Microsoft.VisualBasic.Data.visualize.Network.Layouts.SpringEmbedder

02 Methods

NameOverloadsSummary
.ctor 1
doLayout 1 Applies the spring embedder.
repulsions 1 Calculate forces acting on nodes due to node-node repulsions...
edgeAttractions 1 Calculate forces acting on nodes due to edge attractions.
setLocation 1 Now move each node to its new location...
ForceDirectedLayout 1
Collide 1

03 Fields

NameOverloadsSummary
forceX 1 合力累加器(双精度)。原先累加到 NodeData.force(System.Drawing.Point,X/Y 为整型), 每次赋值都会被截断为整数,导致力被严重量化、布局质量差。这里改用双精度字典绕开该限制。

04 Members

method .ctor #
#ctor(NetworkGraph, Size, Double, Double)
Parameters
NameTypeDescription
gNetworkGraph

-

sizeSize

-

maxRepulsiveForceDistanceDouble

Repulsive forces between nodes that are further apart than this are ignored. 若未指定(传入 NaN),则依据画布尺度给出合理默认值,避免仅在 10px 内生效导致网络无法铺开。

method doLayout #
doLayout(Int32)

Applies the spring embedder.

Parameters
NameTypeDescription
iterationsInt32

-

method repulsions #
repulsions

Calculate forces acting on nodes due to node-node repulsions...

method edgeAttractions #
edgeAttractions

Calculate forces acting on nodes due to edge attractions.

method setLocation #
setLocation(Double)

Now move each node to its new location...

method ForceDirectedLayout #
ForceDirectedLayout(NetworkGraph, Size, Int32)
Parameters
NameTypeDescription
networkNetworkGraph

-

field forceX #
forceX

合力累加器(双精度)。原先累加到 NodeData.force(System.Drawing.Point,X/Y 为整型), 每次赋值都会被截断为整数,导致力被严重量化、布局质量差。这里改用双精度字典绕开该限制。

method Collide #
Collide(Double)