The reason for pointList to exist is to allow in O(1) to find out
information that with std::list<lti::point> would take too long (as O(n)).
That is the reason why we do store the size of the pointList. Other
applications can use the standard version. That is my opinion...
Pablo
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hum, this is not what we are doing now, and not in the
current version of ltilib-1 pointList. There is only a list
and a rectangle for the boundary which is kept up to date.
In fact in ltilib-2 pointList inherits from lti::list
because I was annoyed with wrapping list member functions
all the time. Now I'm not so sure whether that was a good idea.
Anyway, pointList doesn't store it's size. It only stores it
when writing to a file and that doesn't make sense IMHO.
I think we should carefully analyze our use cases before we
decide that pointList updates its size. splice() will be a
performance nightmare!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=430480
The reason for pointList to exist is to allow in O(1) to find out
information that with std::list<lti::point> would take too long (as O(n)).
That is the reason why we do store the size of the pointList. Other
applications can use the standard version. That is my opinion...
Pablo
Logged In: YES
user_id=728643
Hum, this is not what we are doing now, and not in the
current version of ltilib-1 pointList. There is only a list
and a rectangle for the boundary which is kept up to date.
In fact in ltilib-2 pointList inherits from lti::list
because I was annoyed with wrapping list member functions
all the time. Now I'm not so sure whether that was a good idea.
Anyway, pointList doesn't store it's size. It only stores it
when writing to a file and that doesn't make sense IMHO.
I think we should carefully analyze our use cases before we
decide that pointList updates its size. splice() will be a
performance nightmare!