Gustavo Gutierrez wrote:
Would it be possible to add a size method to DynamicArray class?. I have one as class attribute and i had to subclass DynamicArray just for the size.
I'm not sure that would make so much sense. From the outside, a DynamicArray looks as if it's unbounded in size. As soon as you access element i, the array has size at least i, but normally > i. So the size wouldn't tell you anything about how many elements you inserted, or how many are actually intialized, for that matter. We typically use DynamicArray in situations where we either know the size outside the array, or where we have to subclass anyway in order to remember how many elements are used.
GuidoP.S.: I forwarded this to the users list as it might be interesting for others, too.
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Gecode users mailing list [EMAIL PROTECTED] https://www.gecode.org/mailman/listinfo/gecode-users
