Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost-users][graph] There is graph::null_vertex, but no "null_edge"!
From: al.zatv (al.zatv_at_[hidden])
Date: 2011-02-17 18:15:28


Jeremiah Willcock <jewillco_at_[hidden]> писал(а) в своём письме Fri, 18
Feb 2011 02:04:35 +0300:

> On Fri, 18 Feb 2011, al.zatv wrote:
>
>> Jeremiah Willcock <jewillco_at_[hidden]> писал(а) в своём письме Fri, 18
>> Feb
>> 2011 01:47:39 +0300:
>>>> There is graph::null_vertex, but no "null_edge".

>> But, I think, it will be much better if null_edge will be added to the
>> library. It can be -1 for vector containers and null for pointer-based
>> descriptors, etc.

> It would be, but that would be a change to base concepts that may cause
> old graph types to fail with new algorithms that use null_edge(). What
> does your code that may return a null edge descriptor do? Would it be
> possible to return an iterator instead?

My code just search one specific edge in graph. Actually, I think I can
return an iterator. I just don't think about it. "Null edge-descriptor"
was more natural idea for me:).
So, looks like absence of null-edge is small "error-in-design" of library,
or it was caused by some reason?


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