"SpringElectricalEmbedding" (Graph Layout Method)

Details & Options

  • The spring electrical embedding is a graph-drawing technique to position vertices of a graph so that they minimize mechanical and electrical energy when each vertex has a charge and each edge corresponds to a spring.
  • The spring electrical embedding is typically used to lay out complex large graphs.
  • The layout xi of the vertices vi of the graph is calculated by minimizing the energy function with
  • f_(i)= -C sum_(j!=i)(K^2)/(||x_i-x_j||^2)(x_(j)-x_(i)) +sum_( i j)(||x_i-x_j||)/K(x_(j)-x_(i)).
  • is a constant that regulates the relative strength of the repulsive force and is the relative spring length.
  • Vertices can be embedded in .
  • The following model parameters can be given:
  • "RepulsiveForcePower" repulsive force constant
    "SpringConstant" spring constant
  • The following graph parameters can be given:
  • "EdgeWeighted"whether to use edge weights
    "VertexWeighted"whether to use vertex weights
  • Possible settings to control the energy minimization process include:
  • "EnergyControl"how the energy function is controlled during minimization
    "InferentialDistance"cutoff distance for inference from faraway vertices
    "MaxIterations"maximum number of iterations
    "RandomSeed"seed for the random generator for initial vertex placement
    "StepControl"how step lengths are modified during energy minimization
    "StepLength"initial step length used in moving the vertices
    "Tolerance"tolerance used in terminating the process

Examples

open allclose all

Basic Examples  (2)

Lay out a graph:

"SpringElectricalEmbedding" works best for most graphs:

Options  (10)

"EdgeWeighted"  (1)

With the setting "EdgeWeighted"True, edge weights are used:

"EnergyControl"  (1)

Use the option "EnergyControl"e to specify limitations on the total energy of the system during minimization:

"InferentialDistance"  (1)

Use "InferentialDistance"d to specify a cutoff distance beyond which the interaction between vertices is assumed to be nonexistent:

"MaxIteration"  (1)

Use "MaxIteration"it to specify a maximum number of iterations to be used in attempting to minimize the energy:

"RandomSeed"  (1)

Use "RandomSeed"int to specify a seed for the random number generator that computes the initial vertex placement:

"RepulsiveForcePower"  (1)

Use "RepulsiveForcePower"r to control how fast the repulsive force decays over distance:

"SpringConstant"  (1)

Use "SpringConstant"r to control the constant in the attractive force:

"StepControl"  (1)

Use "StepControl"method to define how step length is modified during energy minimization:

"StepLength"  (1)

Use "StepLength"r to specify the initial step length used in moving the vertices around:

"Tolerance"  (1)

Use "Tolerance"r to specify the tolerance used in terminating the energy minimization process: