addCoordinates: Add node coordinates to graph.

Description Usage Arguments Value See Also

View source: R/graph.R

Description

Places node coordinates in the two-dimensional euclidean plane.

Usage

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

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.

Value

[mcGP] Multi-objective graph problem.

See Also

Other graph generators: addCenters, addWeights, mcGP


mcMST documentation built on May 1, 2019, 10:29 p.m.