Boost logo

Boost :

Subject: Re: [boost] Requesting permission to merge r61326 into release branch
From: Dan Jiang (danjiang_at_[hidden])
Date: 2010-04-16 23:03:40


> Date: Fri, 16 Apr 2010 21:40:42 -0400> From: jewillco_at_[hidden]> To: boost_at_[hidden]> Subject: Re: [boost] Requesting permission to merge r61326 into release branch> > On Fri, 16 Apr 2010, Dan Jiang wrote:> > > Then does unsorted_multi_pass use extra memory than sorted? If yes, how > > much? If I sort myself, I guess I have to sort the bundled property map > > of the edges along with the edges array.> > Only for the input data -- unsorted_multi_pass copies from an input buffer > into the internal graph data structures while sorting, while unsorted does > the copy first and then sorts in place (which is slower). Starting with > sorted data means that the CSR graph needs to copy in the edge targets and > properties (and accumulate counts from the sources).Ok. Then I'll try edges_are_unsorted_multi_pass_t first. But I have hard time to find which data structure's start() and end() returns a MultiPassInputIterator which is required if multi-pass unsorted edges are used. MultiPassInputIterator seems to be BOOST specific and I could not find an example online.> If you are really > crunched for memory while building the graph, you may also want to > consider starting with separate vectors of sources, targets, and > properties; this is slower but can recycle the input buffers you give with > targets and properties directly into the graph data structure. Do you meant to use this constructor? template <typename Source> compressed_sparse_row_graph(distributed_construct_inplace_from_sources_and_targets_t, std::vector<Source>& sources, std::vector<vertex_descriptor>& targets, std::vector<edge_bundled>& edge_props, vertices_size_type numverts, const ProcessGroup& pg = ProcessGroup(), const GraphProperty& prop = GraphProperty());> In regards > to your last point, yes, it is easier to not need to sort properties > yourself; std::sort can't do that and so you would need to write that code > manually.Using qsort can do this easily. But I'd prefer unsorted_multi_pass work if I can figure out how to get MultiPassInputIterators.
Dan

                                               
_________________________________________________________________
Live connected. Get Hotmail & Messenger on your phone.
http://go.microsoft.com/?linkid=9724462


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk