yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #02124
Looping interactions and bodies
Hi all,
I see generally 2 methods of iterating bodies and interactions.
1st method:
Interaction::Container::iterator ii = ncb->transientInteractions->begin();
Interaction::Container::iterator iiEnd = ncb -> transientInteraction -> end();
for( ; ii!=iiEnd; ++i){ }
2nd method:
FOREACH(const shared_ptr<Interaction>& I, *ncb->interaction){ }
What are the differences between the two methods [i.e. (*ii) from the first method or (I) in the second method] ?? In what circumstances do I choose one over the other?
Yours,
CWBoon
_________________________________________________________________
New Windows 7: Simplify what you do everyday. Find the right PC for you.
http://windows.microsoft.com/shop
Follow ups