yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #03716
Re: [yade dev] create an instance (vector?) without a predefined size
Hi Luc,
vector<int> v;//size=0
v.push_back(3);//size=1
stdlib vectors are registerable in Yade, you register this vector like a
single int or any other attribute.
Bruno
Hi Folks,
After an unsuccessful search on the web, I beg your skills about a
problem I face. I would like to store some additional infos on bodies
by adding a parameter to body.state (as Vaclav does in CpmState). More
precisely I would like to store ids of the bodies that have interacted
with the subscribed one. I though about a vector to store these data,
but the problem is that I don't know the size of this vector: I need a
vector with a non predefined size that can be incremented automatically.
If you have any advice on this kind of tool and how to use it
(declaration, use), I would be grateful.
Thanks a lot for your help
Luc
------------------------------------------------------------------------
_______________________________________________
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~yade-dev
More help : https://help.launchpad.net/ListHelp
--
_______________
Bruno Chareyre
Associate Professor
Grenoble INP
Lab. 3SR
BP 53 - 38041, Grenoble cedex 9 - France
Tél : 33 4 56 52 86 21
Fax : 33 4 76 82 70 43
________________
Follow ups
References