Menu

#82 pointList should not save the size of the list.

2.x
open
nobody
Enhancement (5)
2
2006-09-14
2006-09-14
No

pointList should not save the size of the list
explicitly. It should use the appropriate STL function
instead.

Discussion

  • Pablo Alvarado

    Pablo Alvarado - 2006-09-14

    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

     
  • Peter Doerfler

    Peter Doerfler - 2006-09-14

    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!

     

Log in to post a comment.

MongoDB Logo MongoDB