neighbours: Finds all direct neighbours

Description Usage Arguments Details Value Author(s) Examples

View source: R/functions.r

Description

Finds all direct neighbours of a given vertex in a given graph.

Usage

1
neighbours(model=NULL,edges=NULL,v)

Arguments

model

gRapHD object.

edges

matrix with 2 columns, each row representing one edge, and each column one of the vertices in the edge.

v

reference vertex.

Details

Returns all vertices with a direct connection with vertex v in edges.

Value

Vector with all neighbours of vertex v.

Author(s)

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

Examples

1
2
3
4
5
data(dsCont)
m1 <- minForest(dsCont,homog=TRUE,forbEdges=NULL,stat="LR")
neigh <- neighbours(edges=m1@edges, v=22)
#    > neigh
#    [1]  3  9 24 25

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

Related to neighbours in gRapHD...