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

 

Function index Version 3.0.0

apaGraph.Layout.YifanHu.AllParams(Edges, UseWeightsOtherwiseUnitWeights, OptimalDistance, RelativeStrength, InitialStep, StepRatio, Iterations, AdaptiveCooling, ConvergenceTolerance, CoarsenMinSize, RefinementIterationsPerLevel, MaxLevels)

Excel=apaGraph.Layout.YifanHu.AllParams(Edges, UseWeightsOtherwiseUnitWeights, OptimalDistance, RelativeStrength, InitialStep, StepRatio, Iterations, AdaptiveCooling, ConvergenceTolerance, CoarsenMinSize, RefinementIterationsPerLevel, MaxLevels)

Result

Yifan Hu multilevel layout of an edge list with an extended parameter set. 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

OptimalDistance: preferred distance between nodes. Default value: 100

RelativeStrength: repulsion strength relative to attraction. Default value: 0.2

InitialStep: initial step size. Default value: 20

StepRatio: ratio used to update the step size. Default value: 0.95

Iterations: maximum number of iterations on the finest level. Default value: 500 times the number of nodes

AdaptiveCooling: TRUE to use adaptive cooling, FALSE otherwise. Default value: TRUE

ConvergenceTolerance: convergence tolerance. Default value: 1

CoarsenMinSize: minimum graph size, i.e. coarsening stops when the graph has this many nodes or fewer. Default value: 20

RefinementIterationsPerLevel: number of refinement iterations after prolongation at each intermediate level. Default value: 50

MaxLevels: maximum number of levels of the multilevel hierarchy. Default value: 10

Algorithm

The graph is coarsened repeatedly by merging nodes, until it has CoarsenMinSize nodes or fewer or MaxLevels levels are reached.

In weighted mode, the distances are divided by their median and clipped to [0.05, 20]; the attraction along an edge is proportional to 1/distance. Duplicate edges keep the shortest distance; when nodes are merged, the attraction strengths of the merged edges are added.

Remarks

A non-positive value of Iterations is replaced by its default value.

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