partition_section: Recursion for the Kernigham-Lin equations

Description Usage Arguments Value Author(s) Examples

View source: R/geometryfns.R

Description

The Kernigham-Lin equations split a graph into two equal parts depending on a weighting matrix. The weighting matrix here is constrained to be the Eucledian distance between the points.

Usage

1

Arguments

points

a data frame with fields x, y and id, where id typically ranges from 1 to the number of points in the graph

nrep

the number of times to split the graph

Value

a list of vectors, where each vector contains the ids of the nodes in a particular group

Author(s)

C. Ladroue, A. Zammit Mangion

Examples

1
2
3
4
5
require(ggplot2)
N = 99
points <- data.frame(x = runif(n=N), y = runif(n=N),id=1:N)
points <- partition_section(points,nrep=4)
ggplot() + geom_point(data=points,aes(x,y,colour=class,size=4))

shazhe/mvst0 documentation built on May 29, 2019, 9:20 p.m.