nodeGenerators: Node generators.

Description Usage Arguments Value Note

Description

Functions for the placement of nodes / node coordinates in the Euclidean plane. Function addNodesLHS generates a space-filling Latin-Hypercube-Sample (LHS), function addNodesUniform samples points from a bivariate uniform distribution, addNodesGrid generates a regular grid/lattice of points, addNodesTriangular generates a regular triangular grid/lattice and addNodesNormal generates nodes on basis of a normal distribution.

Usage

1
2
3
4
5
6
7
8
9
addNodesLHS(n, lower = 0, upper = 1, method = NULL)

addNodesUniform(n, lower, upper)

addNodesTriangular(n, lower, upper)

addNodesGrid(n, lower, upper)

addNodesNormal(n, lower, upper, x.mean, x.sd, y.mean, y.sd)

Arguments

n

[integer(1)]
Number of nodes to generate.

lower

[numeric(2)]
Minimal values for the first and second node coordinates respectively. Default is 0 for both dimensions.

upper

[numeric(2)]
Maximal values for the first and second node coordinates respectively. Default is 1 for both dimensions.

method

[function]
Function from package lhs. Default is maximinLHS. Only relevant for addNodesLHS.

x.mean

[numeric]
Mean value of normal distribution for x-value generation. Only relevant for addNodesNormal.

x.sd

[numeric]
Standard deviation of normal distribution for x-value generation. Only relevant for addNodesNormal.

y.mean

[numeric]
Mean value of normal distribution for y-value generation. Only relevant for addNodesNormal.

y.sd

[numeric]
Standard deviation of normal distribution for y-value generation. Only relevant for addNodesNormal.

Value

[list] List with components:

coords [matrix(n, 2)]

Matrix of node coordinates.

generator [character(1)]

String description of the generator used.

Note

These functions are not meant to be called directly. Instead, they need to be assigned to the generator argument of addNodes.


jakobbossek/grapherator documentation built on Oct. 4, 2021, 11:03 a.m.