
26 Mar
2008
26 Mar
'08
12:53 p.m.
On Wed, Mar 26, 2008 at 6:16 AM, Hardik Kheskani
I am using adjacent lists and using vertex_descriptors. Is there a way to check if the vertex_descriptor is NULL or 'not assigned' yet?
graph_traits < adjacent_list_graph >::vertex_descriptor vd ;
can I assign this to NULL ? and can I use vd == NULL or vd != NULL ?
Hi Hardik, graph_traits< adjacent_list_graph >::null_vertex() exists for just this purpose - to represent a vertex descriptor that should never be used as a valid vertex descriptor by the underlying graph. Regards, Aaron