Thank you,  Jeremiah Willcock.

"use std::distance on vertices(g) to count them"
I can use this method for it. If there was no better method.

Thank you very much.

On Wed, Jul 4, 2012 at 4:16 AM, Jeremiah Willcock <jewillco@osl.iu.edu> wrote:
On Wed, 4 Jul 2012, mingliang zou wrote:

Hello, Jeremiah Willcock, I have been looked the filtered_graph.

It said that "The num_vertices and num_edges functions do not filter before returning results, so they return the number of vertices or edges in the
underlying graph, unfiltered".

Some times I need make new vertices from return value of num_vertices of filtered graph, not underlying graph.

Remember that any vertices filtered out in the filtered_graph still exist in the original graph, and are still using slots for their properties and such.  Thus, you might actually want to use the vertex counts from the original graph when you allocate things.  If you truly need the number of vertices in the filtered graph, use std::distance on vertices(g) to count them individually (which might be slow if your graph is large).

-- Jeremiah Willcock



On Wed, Jul 4, 2012 at 2:29 AM, mingliang zou <2236zml@gmail.com> wrote:
      Thank you, I will try use filtered_graph I want to make a auto-analyze data package tool.
So, Need try to connect every byte data. It can make many new temporarily edges.
But I dont want that loss some original relationship in this graph.
Because to make new temporarily edges need  original relationship.
and newer temporarily edges maybe need older temporarily edges.
And finally, I hope It can find a relationship graph of data package. 


On Wed, Jul 4, 2012 at 1:44 AM, Jeremiah Willcock <jewillco@osl.iu.edu> wrote:
      On Wed, 4 Jul 2012, mingliang zou wrote:

            I created a graph.
            And use add_edge to add some edges,

            I wanna disable some edges, and add some edges. and use boost graph algorithm for enable edges

            How can I do this? not create new graph.


What exactly do you want to do?  There are add_edge and remove_edge functions.  If you want to disable edges temporarily based on a mask, look
at filtered_graph.

-- Jeremiah Willcock
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users





_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users