Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Is there linked list in u++?
Is there linked list in u++? [message #28674] Sat, 11 September 2010 11:51 Go to next message
aftershock is currently offline  aftershock
Messages: 143
Registered: May 2008
Experienced Member
Hi,

Is there a link list in U++?

aftershock
Re: Is there linked list in u++? [message #28682 is a reply to message #28674] Sat, 11 September 2010 19:57 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
There is a Link utility class.

In my opinion, linked list _container_ does not make any sense.
Re: Is there linked list in u++? [message #28707 is a reply to message #28682] Mon, 13 September 2010 12:09 Go to previous messageGo to next message
aftershock is currently offline  aftershock
Messages: 143
Registered: May 2008
Experienced Member
Why not?

It has special properlties, fastest insertion before and after an item.
Fastest deletion of an item.

If one needs that, it is the best...
Re: Is there linked list in u++? [message #28712 is a reply to message #28707] Mon, 13 September 2010 17:40 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
aftershock wrote on Mon, 13 September 2010 06:09

Why not?

It has special properlties, fastest insertion before and after an item.
Fastest deletion of an item.

If one needs that, it is the best...



The key question is:

Which element?

Going through the list to find the element you want to insert/remove will cost you much more time than insert/remove in Vector. (If you want to argue why, it is all about cache lines....)

The excelent usage for list, however, is in situation where objects are part of some list and insert/remove themselves (thus, no going through the list is required) or similar. However, list _container_ is absolutely unsuitable for such task.

That is why we have Link, but no List.
Re: Is there linked list in u++? [message #28718 is a reply to message #28712] Mon, 13 September 2010 20:08 Go to previous messageGo to next message
aftershock is currently offline  aftershock
Messages: 143
Registered: May 2008
Experienced Member
What list container?

In my case, there is no need for search for elements or only sequentially.

Is there a list container in Ultimate++ framework?

Re: Is there linked list in u++? [message #28791 is a reply to message #28718] Thu, 16 September 2010 23:53 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
aftershock wrote on Mon, 13 September 2010 14:08

What list container?

In my case, there is no need for search for elements or only sequentially.

Is there a list container in Ultimate++ framework?




As I said before: No list container. But there is a Link template that makes lists (even multilists, where single element might be in several lists) quite easy.
Previous Topic: Problem with gcc compilers and -Wall
Next Topic: [Fixed!] ScanUuid returns wrong value
Goto Forum:
  


Current Time: Sun Apr 28 09:12:12 CEST 2024

Total time taken to generate the page: 0.05207 seconds