powered by
Finds the set of vertices with up to a given distance from a given vertex.
neighbourhood(model=NULL,edges=NULL,orig=NULL,rad=1)
gRapHD object.
gRapHD
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.
central vertex.
distance.
Returns a list with:
matrix with 2 columns, the first indicating the vertex index, and the second the distance to the orig.
orig
# NOT RUN { 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]) # }
Run the code above in your browser using DataLab