Home   >   User Resources   >   Online Help   >   apaGraph.Layout.YifanHu
 

 

Function index Version 3.0.0

apaGraph.Layout.YifanHu(Edges, UseWeightsOtherwiseUnitWeights)

Excel=apaGraph.Layout.YifanHu(Edges, UseWeightsOtherwiseUnitWeights)

Result

Yifan Hu layout of an edge list. Returns a layout matrix with the node index in the first column and the X/Y coordinates in the next two columns.

Syntax

Edges: n x 3 edge list, the first two columns containing the node indices, the third column the distance between the two nodes (smaller = closer, e.g. sqrt(2(1-ρ)) for correlations ρ)

UseWeightsOtherwiseUnitWeights: TRUE to use the third column as edge distances, so that more similar nodes are placed closer together; FALSE to use unit distances

Algorithm

The layout is calculated with the default parameters of apaGraph.Layout.YifanHu.AllParams, except for the maximum number of iterations, which is set to the larger of 100 and 20 times the number of edges.

Remarks

The Yifan Hu algorithm is a multilevel force-directed layout algorithm, suitable for large graphs.

Pressing Esc aborts the calculation; the function then returns "Calculation aborted by user."