powered by
Finds all direct neighbours of a given vertex in a given graph.
neighbours(model=NULL,edges=NULL,v)
gRapHD object.
gRapHD
matrix with 2 columns, each row representing one edge, and each column one of the vertices in the edge.
reference vertex.
Vector with all neighbours of vertex v.
v
Returns all vertices with a direct connection with vertex v in edges.
edges
# NOT RUN { data(dsCont) m1 <- minForest(dsCont,homog=TRUE,forbEdges=NULL,stat="LR") neigh <- neighbours(edges=m1@edges, v=22) # > neigh # [1] 3 9 24 25 # }
Run the code above in your browser using DataLab