Boost logo

Boost Users :

Subject: Re: [Boost-users] [Graph] CSR from list of tuples
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2014-05-20 12:10:52


Is there any that you could build three separate vectors for the different components?  That would allow the storage from two of the vectors to be reused as-is in the CSR graph.  Otherwise, the best you can do is probably to accept an extra copy (but you should be able to get it to that using multi-pass iteration over the input vector).

-- Jeremiah Willcock

<div>-------- Original message --------</div><div>From: Sensei <senseiwa_at_[hidden]> </div><div>Date:05/20/2014 9:52 AM (GMT-07:00) </div><div>To: boost-users_at_[hidden] </div><div>Subject: [Boost-users] [Graph] CSR from list of tuples </div><div>
</div>Dear all,

I need to construct (and use) a graph that can handle millions of nodes,
with minimal overhead, and as suggested I am using a CSR graph. As I
understand from the documentation, it is unmodifiable.

Arcs are created at runtime in a parallel fashion, and my choice was to
use a vector of std::tuple<std::size_t, std::size_t, int> (that is,
node, node, weight) with Intel's TBB.

This is the problem: can I avoid temporary vectors to construct my graph?

Right now the only way I see is to create the vector of arcs (as
std::pair) and the vector of weights, but this is a waste of time and
memory.

Do you have any helpful suggestions?

Cheers & Thanks!
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users



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