neighbours {gRapHD} | R Documentation |
Find all direct neighbours of a given vertex in a given graph.
neighbours(model=NULL,edges=NULL,v)
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. |
Returns all vertices with a direct connection with vertex v
in
edges
.
Vector with all neighbours of v
.
Gabriel Coelho Goncalves de Abreu (Gabriel.Abreu@agrsci.dk)
Rodrigo Labouriau (Rodrigo.Labouriau@agrsci.dk)
David Edwards (David.Edwards@agrsci.dk)
data(dsCont) m1 <- minForest(dsCont,homog=TRUE,forbEdges=NULL,stat="LR") neigh <- neighbours(edges=m1$edges, v=22) # > neigh # [1] 3 9 24 25