<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Thanks for confirming my understanding. :) This does help.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">George</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>George K. Thiruvathukal, PhD<br></div><div style="font-size:12.7272720336914px"><div style="font-size:12.7272720336914px"><i style="font-size:12.7272720336914px">Professor of Computer Science</i><span style="font-size:12.7272720336914px">, Loyola University Chicago</span><br></div><div style="font-size:12.7272720336914px"><span style="font-size:12.7272720336914px"><i>Director</i>, Center for Textual Studies and Digital Humanities</span></div><div style="font-size:12.7272720336914px"><span style="font-size:12.7272720336914px"><i>Guest Faculty</i>, Argonne National Laboratory, Math and Computer Science Division</span></div><div style="font-size:12.7272720336914px"><div style="font-size:12.7272720336914px">Editor in Chief, <a href="http://www.computer.org/portal/web/computingnow/cise" target="_blank">Computing in Science and Engineering</a> (IEEE CS/AIP)<br></div><div><span style="font-size:12.7272720336914px">(w) <a href="http://gkt.tv/" target="_blank">gkt.tv</a> </span><span style="font-size:12.7272720336914px">(v) 773.829.4872</span><br></div><div><span style="font-size:12.7272720336914px"><br></span></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Thu, Nov 20, 2014 at 1:05 PM, Boisvert, Sebastien <span dir="ltr"><<a href="mailto:boisvert@anl.gov" target="_blank">boisvert@anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> From: George K. Thiruvathukal [<a href="mailto:gkt@cs.luc.edu">gkt@cs.luc.edu</a>]<br>
> Sent: Thursday, November 20, 2014 12:46 PM<br>
> To: Boisvert, Sebastien<br>
> Cc: <a href="mailto:biosal@lists.cels.anl.gov">biosal@lists.cels.anl.gov</a><br>
> Subject: vector.c (core_vector)<br>
<span class="">><br>
><br>
><br>
><br>
> So I'm doing a bit of Thorium programming on the plane flight back and I have run into a bit of an obstacle with respect to core structures. I know that the purpose of vector.c is probably similar to the equivalents in STL and Java.  I basically need to send<br>
>  a vector (list) of integers. But then I need to remove items from the list (one at a time) and send the rest of the integers onto another actor.<br>
<br>
<br>
<br>
><br>
><br>
> I am wondering whether it is better to use vector than queue, especially when you want to remove items. There don't seem to be convenience methods for removing an item from a vector (although there is a way to get an item, after which I could do a resize).<br>
<br>
</span>If you are removing at the end, you can use:<br>
<br>
core_vector_resize(vector, core_vector_size(vector) - 1)<br>
<span class=""><br>
<br>
>  I'm willing to do some work to extend the vector interfaces, but I am also wondering whether I should just use a queue, since there are appropriate methods of enqueueing an dequeueing items.<br>
<br>
</span>The queue structure does not have pack/unpack functions right now.<br>
<span class=""><br>
><br>
><br>
> I prefer to use vector, primarily because it is convenient to use it when doing a Thorium send. But I'm willing to use queue as well if that is the recommended way.<br>
<br>
</span>I think the resize thing would probably do it.<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
><br>
> George<br>
><br>
><br>
><br>
><br>
><br>
><br>
> George K. Thiruvathukal, PhD<br>
><br>
> Professor of Computer Science, Loyola University Chicago<br>
><br>
> Director, Center for Textual Studies and Digital Humanities<br>
> Guest Faculty, Argonne National Laboratory, Math and Computer Science Division<br>
> Editor in Chief, Computing in<br>
>  Science and Engineering (IEEE CS/AIP)<br>
><br>
> (w) <a href="http://gkt.tv" target="_blank">gkt.tv</a> (v)<br>
>  773.829.4872<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
</div></div></blockquote></div><br></div>