[BIOSAL] vector.c (core_vector)
George K. Thiruvathukal
gkt at cs.luc.edu
Thu Nov 20 12:46:28 CST 2014
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 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.
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). 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.
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.
George
George K. Thiruvathukal, PhD
*Professor of Computer Science*, Loyola University Chicago
*Director*, Center for Textual Studies and Digital Humanities
*Guest Faculty*, Argonne National Laboratory, Math and Computer Science
Division
Editor in Chief, Computing in Science and Engineering
<http://www.computer.org/portal/web/computingnow/cise> (IEEE CS/AIP)
(w) gkt.tv (v) 773.829.4872
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cels.anl.gov/pipermail/biosal/attachments/20141120/3a41e4de/attachment.html>
More information about the BIOSAL
mailing list