[Graph] What can I do with null_vertex?
There are no semantics for null_vertex. I assume I can copy it, but can I compare it against other vertex descriptors via == and !=? Is it always different from "real" vertex descriptors? Doug
Hi Doug, On Feb 20, 2004, at 11:06 AM, Douglas Gregor wrote:
There are no semantics for null_vertex. I assume I can copy it, but can I compare it against other vertex descriptors via == and !=? Is it always different from "real" vertex descriptors?
By "null_vertex", do you mean the graph_traits<G>::null_vertex()
function?
I believe http://www.boost.org/libs/graph/doc/Graph.html does give the
semantics.
It says:
Returns a special <tt>vertex_descriptor</tt> object which does not
refer to
any vertex of graph object which type is <tt>G</tt>.
Also, in the section describing the associated types:
<td><pre>boost::graph_traits<G>::vertex_descriptor</pre>
A vertex descriptor corresponds to a unique vertex in an abstract
graph instance. A vertex descriptor must be
<a
href="http://www.sgi.com/tech/stl/DefaultConstructible.html">Default
Constructible</a>,
<a href="http://www.sgi.com/tech/stl/Assignable.html">Assignable</a>,
and
<a href="http://www.sgi.com/tech/stl/EqualityComparable.html">Equality
Comparable</a>.
</td>
</tr>
Cheers,
Jeremy
_______________________________________________
Jeremy Siek
participants (2)
-
Douglas Gregor
-
Jeremy Siek