C5 icon indicating copy to clipboard operation
C5 copied to clipboard

TreeList<T>?

Open Shadowblitz16 opened this issue 3 years ago • 6 comments

I just installed C5 2.5.3 and there doesn't seem to be a TreeList<T> type.

I need a ordered, reorderable, generic tree collection that allows duplicates

Shadowblitz16 avatar May 13 '21 18:05 Shadowblitz16

On 13 May 2021, at 20.55, Shadowblitz16 @.@.>> wrote:

I just installed C5 2.5.3 and there doesn't seem to be a TreeList type.

I need a ordered, generic tree collection that allows duplicates

What is the usage scenario?

Would a MultiDictionary be sufficient, see the C5 handbook section 11.12, eg here: https://www.itu.dk/research/c5/latest/ITU-TR-2006-76.pdf

Peter

sestoft avatar May 16 '21 18:05 sestoft

I wanted to use it for a entity component system. I need the items to be reorderable and allow multiple instances of the same object

Shadowblitz16 avatar May 17 '21 21:05 Shadowblitz16

On 17 May 2021, at 23.50, Shadowblitz16 @.@.>> wrote:

I wanted to use it for a entity component system.

I need the items to be reorderable and allow multiple instances of the same object

So the items are not ordered by a comparer?

Peter

sestoft avatar May 18 '21 06:05 sestoft

no by a index

Shadowblitz16 avatar May 20 '21 23:05 Shadowblitz16

Would a HashedLinkedList<T> where the hashing is on that index serve this purpose? Constant-time access to items by index, reorderable, duplicate objects (but not indices) allowed, sequential traversal, insertion etc

On 21 May 2021, at 01.23, Shadowblitz16 @.@.>> wrote:

no by a index

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/sestoft/C5/issues/97#issuecomment-845546129, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAFSQEH5CQ3CX2UQDPSJUSTTOWKVRANCNFSM443B735Q.

sestoft avatar May 21 '21 05:05 sestoft

Is a HashedLinkedList<T> a tree collection? a simple list won't do

Shadowblitz16 avatar May 22 '21 20:05 Shadowblitz16