Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2008-07-09 04:46:31


on Wed Jul 09 2008, Mojmir Svoboda <mojmir.svoboda-AT-illusionsoftworks.com> wrote:

> * Zeljko Vrba <zvrba_at_[hidden]> [2008-07-08 10:02:27 +0200]:
>
>> std::vector<EdgeIndex> m_rowstart;
>> std::vector<Vertex> m_column;
>>
>> I already have a graph stored as a BGL adjacency_list and now I want to use
>> a 3rd-party library (SCOTCH) which takes its input also in the CSR format.
>> As I can see from the docs, there is no standardized interface to retrieve
>> the raw CSR representation.
>
> i second that! :) moreover i'd like to customize the underlying
> containers (std::vector) at least with my own allocator.

If you have to deal with a non-generic 3rd party library, the solution
is to build a CSR representation that's compatible with SCOTCH and then
adapt it for use by BGL by defining the necessary things to make it
conform to the necessary graph concepts. You could take a look at
http://www.stanford.edu/~dgleich/programs/matlab_bgl/ for an example of
exactly that approach.

HTH,

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

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