SpringEmbedder
01 Syntax
Microsoft.VisualBasic.Data.visualize.Network.Layouts.SpringEmbedder
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| .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
| Name | Overloads | Summary |
|---|---|---|
| forceX | 1 | 合力累加器(双精度)。原先累加到 NodeData.force(System.Drawing.Point,X/Y 为整型), 每次赋值都会被截断为整数,导致力被严重量化、布局质量差。这里改用双精度字典绕开该限制。 |
04 Members
#ctor(
NetworkGraph, Size, Double, Double)Parameters
| Name | Type | Description |
|---|---|---|
g | NetworkGraph | - |
size | Size | - |
maxRepulsiveForceDistance | Double | Repulsive forces between nodes that are further apart than this are ignored. 若未指定(传入 NaN),则依据画布尺度给出合理默认值,避免仅在 10px 内生效导致网络无法铺开。 |
doLayout(
Int32)Applies the spring embedder.
Parameters
| Name | Type | Description |
|---|---|---|
iterations | Int32 | - |
repulsions
Calculate forces acting on nodes due to node-node repulsions...
edgeAttractions
Calculate forces acting on nodes due to edge attractions.
setLocation(
Double)Now move each node to its new location...
ForceDirectedLayout(
NetworkGraph, Size, Int32)Parameters
| Name | Type | Description |
|---|---|---|
network | NetworkGraph | - |
forceX
合力累加器(双精度)。原先累加到 NodeData.force(System.Drawing.Point,X/Y 为整型), 每次赋值都会被截断为整数,导致力被严重量化、布局质量差。这里改用双精度字典绕开该限制。
Collide(
Double)