Boost logo

Boost Users :

Subject: Re: [Boost-users] Iterating over vertices in a specific region in a graph
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2012-01-22 15:43:04


On Sun, 22 Jan 2012, David Doria wrote:

> If I manually create a grid graph in BGL (using adjacency_list, not
> grid_graph), is there a way to iterate over vertices in a specified
> rectangular region? Say I make a 100x100 grid graph, how would I
> iterate over the the center 5x5 vertices?

You would need to do that by hand; note that there is a function to
convert from coordinates to graph vertices.

-- Jeremiah Willcock


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net