ersatz = limited (cheap)

You might use partition or stable_partition on the container of indices. The predicate would dereference and return valid/invalid. Partition or stable_partition would separate your container of indices into two groups. Iterators in [begin, middle) would mark valid indices, and iterators in [middle, end) would mark invalid indices. You'd plot the dereferenced set of valid indices in [begin, middle).

Vince


On Tue, Nov 5, 2013 at 1:45 PM, MM <finjulhich@gmail.com> wrote:



On 5 November 2013 18:34, Vincent N. Virgilio <virgilio@ieee.org> wrote:
Yes, stable_partition (and probably partition) involve swaps, according to SGI's doc.

Instead, you might apply one of the above partition functions to a parallel container of indices, and dereference with the predicate?

Seems like this is steering back to an ersatz version of a boost adaptor.

Vince

Could you elaborate?  what do you mean an "ersatz version of a boost adaptor"

I can store a container of indices that are invalid, and get max and min,and access via a [] with the help of that container.
I just was looking to reuse some component for this rather than implement it myself.


>Or modify your algorithm to not require random access. ;-)
>What are you wanting to do with the sequence(s)?
I need to plot only the elements that are valid.
Unfortunately, the plotting library requires a sort of indexed element,

Thanks,
MM


_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users