vertex_descriptor NULL check

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 ? Any help/info is greatly appreciated. Hardik True religion is real living; living with all one's soul, with all one's goodness and righteousness. -Albert Einstein I got a simple rule about everybody. If you don't treat me right shame on you! -Louis Armstrong ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

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
participants (2)
-
Aaron Windsor
-
Hardik Kheskani