Linked List?
-
Is there a linked list class anywhere in the Framework? So far, the closest classes I've seen are the ArrayList and the DataTable. Also, is the DataTable like the ArrayList in its need to shift its elements over when inserting a row at a certain position? What? Were you expecting something witty or funny here?
AFAIK there isn't a straight up implementation of a linked list. There are a few classes that use it internally but I think you are much better off creating your own implementation. If you don't know the code for it, there are lots of C++ implementations out there that you can use as a guide. James "Java is free - and worth every penny." - Christian Graus
-
AFAIK there isn't a straight up implementation of a linked list. There are a few classes that use it internally but I think you are much better off creating your own implementation. If you don't know the code for it, there are lots of C++ implementations out there that you can use as a guide. James "Java is free - and worth every penny." - Christian Graus
Jambo takklesoft.com mail server seems to be down :-( Nish :-(
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
-
Jambo takklesoft.com mail server seems to be down :-( Nish :-(
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
yeah; the server was being flown cross country early this morning. It was only supposed to have been down for 5-6 hours but its been down since about midnight last night. It arrived at its destination about 9 hours ago; and I think we're just waiting for the new IPs to propagate out to DNS servers. Maybe it'll be up in the next hour or so *James crosses his fingers* James "Java is free - and worth every penny." - Christian Graus
-
Jambo takklesoft.com mail server seems to be down :-( Nish :-(
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
Update: The administrator for the host is suggesting that everyone on that server open a trouble ticket and request to be moved to the new server. Apparently when the company started up they used someone's colo, now they run their own so getting put on a new server would mean that the person I bitch at is the person that gets the work done :-D Actually I wouldn't say I'd ever bitch at them, for $3.95 a month they give damn good service :) James "Java is free - and worth every penny." - Christian Graus
-
Is there a linked list class anywhere in the Framework? So far, the closest classes I've seen are the ArrayList and the DataTable. Also, is the DataTable like the ArrayList in its need to shift its elements over when inserting a row at a certain position? What? Were you expecting something witty or funny here?
ArrayList is a pure (yet rather complicated) linked list. Inserting is just as fast. Take a look at the local vars for it in VS. each item in the list is linked to the next item in the list.
-
ArrayList is a pure (yet rather complicated) linked list. Inserting is just as fast. Take a look at the local vars for it in VS. each item in the list is linked to the next item in the list.
I heavily disagree that ArrayList is a "pure" linked list. ArrayList is more like a Vector than anything else. Internally ArrayList uses an array for storage. A LinkedList does not use a static data structure like an array for storage Jared jparsons@jparsons.org
-
Is there a linked list class anywhere in the Framework? So far, the closest classes I've seen are the ArrayList and the DataTable. Also, is the DataTable like the ArrayList in its need to shift its elements over when inserting a row at a certain position? What? Were you expecting something witty or funny here?
If your code will be using Managed C++, I strongly suggest STL's
list
. Best regards, Alexandru Savescu -
I heavily disagree that ArrayList is a "pure" linked list. ArrayList is more like a Vector than anything else. Internally ArrayList uses an array for storage. A LinkedList does not use a static data structure like an array for storage Jared jparsons@jparsons.org
I'll have to check into it... I've simply read an article that went over the various Collection classes in System.Collections. I'm fairly sure one was a linked list according to the article, but if I'm wrong I highly thank you.
-
If your code will be using Managed C++, I strongly suggest STL's
list
. Best regards, Alexandru SavescuNope. Using STL lists on managed objects is never a good idea. Step back, rub your eyes, take a deep breath, stretch a bit, and reflect on the relative importance of CP, CG, the age / travel time sustained by supposedly 'fresh' cheese curds, and Life in General. - Shog9
-
If your code will be using Managed C++, I strongly suggest STL's
list
. Best regards, Alexandru SavescuAs I learnt while writing an article on an MC++ linked list, that is very, very slow. The only way to put a managed pointer into an unmanaged class is using the gcroot template, which is extremely, extremely slow. By the way, I created a linked list in C# that I'll post as an article in a few weeks. It is faster than ArrayList on some accounta and vice-versa.