Skip to content

implement ChangeableOrderedSet #64

@luithefirst

Description

@luithefirst

A changeable data structure like there is Aardvark.Base.Increment with ChangeableOrderedSet (ChangeableIndexSet?) allows precise expression on what an application state can be, can directly provide IAdaptiveHashSet and IAdaptiveIndexList views and has ideal runtime complexity when operating on item values.

Assuming the internal state contains a HashMap<'a, Index> and IndexList<'a> the data structure could provide the following runtime complexity compared to a ChangeableIndexList:

Add(item: 'a) // O(log N) vs O(log N)
AddBefore(before : 'a, item :'a) // O(log N) vs O(N)
AddAfter(after : 'a, item : 'a) // O(log N) vs O(N)
Remove(item: 'a) // O(log n) vs O(n)
Contains(item: 'a) // O(log n) vs O(n)

It would be nice to consider this as an extension to this library.

Metadata

Metadata

Assignees

Labels

featurea feature to be implemented

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions