Learn R Programming

mcMST (version 1.0.1)

addCoordinates: Add node coordinates to graph.

Description

Places node coordinates in the two-dimensional euclidean plane.

Usage

addCoordinates(graph, n, generator, by.centers = FALSE, par.fun = NULL, ...)

Value

[mcGP] Multi-objective graph problem.

Arguments

graph

[mcGP]
Multi-objective graph problem.

n

[integer]
Number of coordinates to place. If by.centers is FALSE a single integer value is expected. Otherwise, a vector v may be passed. In this case v[i] coordinates are generated for each cluster. However, if a single value is passed and by.center == TRUE, each cluster is assigned the same number of coordinates.

generator

[function(n, ...)]
Function used to generate coordinates. The generator needs to expect the number of points to generate as the first argument n. Additional control argument are possible.

by.centers

[logical(1)]
Should coordinates be placed for each cluster center seperately? This enables geneation of clustered coordinates. Default is FALSE.

par.fun

[function(cc) | NULL]
Optional function which is applied to each cluster center cc before the generation of coordinates in case by.centers is TRUE. This enables to specifically determine additional parameters for the generator for each cluster.

...

[any]
Furhter arguments passed down to generator.

See Also

Other graph generators: addCenters, addWeights, mcGP