Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2003-02-01 09:21:24


Erik Arner <yg-boost-users_at_[hidden]> writes:

> My first thought is that it should be fairly straightforward: simply
> construct classes that model Sequence or RandomAccessContainer for the
> VertexList parameter etc. The classes store part of the data in memory
> and read/write data to disc when necessary.
>
> Any pitfalls, gotchas or other stuff I should be aware of before
> embarking on this?

Modelling Sequence or RandomAccessContainer correctly for data that is
not always in-memory is notoriously difficult. Typically it requires
iterators which store their value_type internally, so dereferencing
returns an internal reference to the iterator itself. The Boost
Iterator Adaptors library can be a help with constructing conforming
iterators (also notoriously difficult). Of course, the BGL's use of
descriptors instead of heavy data may help get you around this problem.

You might consider whether the problem gets any easier if you don't
try to use adjacency_list, but instead model the Graph concept
yourself. I've done that several times; it's not as hard as it might
seem.

HTH,

-- 
                       David Abrahams
   dave_at_[hidden] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution

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