neighbourhood: Neighbourhood of a vertex

Description Usage Arguments Details Value Author(s) Examples

View source: R/functions.r

Description

Finds the set of vertices with up to a given distance from a given vertex.

Usage

1
neighbourhood(model=NULL,edges=NULL,orig=NULL,rad=1)

Arguments

model

gRapHD object.

edges

matrix with 2 columns, each row representing one edge, and each column one of the vertices in the edge. Column 1 contains the vertex with lower index.

orig

central vertex.

rad

distance.

Details

Finds the set of vertices with up to a given distance from a given vertex.

Value

Returns a list with:

subEdges

matrix with 2 columns, each row representing one edge, and each column one of the vertices in the edge. Column 1 contains the vertex with lower index.

v

matrix with 2 columns, the first indicating the vertex index, and the second the distance to the orig.

Author(s)

Gabriel Coelho Goncalves de Abreu (abreu_ga@yahoo.com.br)

Examples

1
2
3
4
data(dsCont)
m1 <- minForest(dsCont,homog=TRUE,forbEdges=NULL,stat="LR")
aux <- neighbourhood(model=m1,orig=27,rad=2)
plot(new("gRapHD",edges=aux$edges,p=m1@p),vert=aux$v[,1])

gRapHD documentation built on Feb. 9, 2018, 6:05 a.m.

Related to neighbourhood in gRapHD...