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 » Developing U++ » U++ Developers corner » New containers - naming
New containers - naming [message #38981] Sun, 03 February 2013 19:46 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Hi,

in past weeks, I was working on a new container that will become a basis of couple of other containers.

The new container, which I have named 'InVector', excels at inserting or removing elements at arbitrary locations (trading this feature for somewhat slower operator[]).

It is so fast that it is possible to create 'std::set' equivalent (means, elements are added at UpperBound index, so that InVector stays sorted at all times and it has log(n) search of elements), which is quite superior to set (which is implemented with using binary trees). It is moderately faster and it consumes significantly less memory.

InVector thus makes possible to create a new set of containers, alike to 'Array, Index, VectorMap, ArrayMap', where instead of hashing binary search is used. Of course, hashing is still much faster, but the advantage of binary search is the ability to perform range searches. Also, it consumes less memory than hashing.

Now one small funny problem is how to name these new containers. My current state of mind is somehing like

InArray (Array counterpart)
Order (Index counterpart)
OrderVector (VectorMap counterpart)
OrderArray (ArrayMap counterpart)

Any better ideas?

Mirek

P.S.: InVector can be seen in sandbox/InVector, with tests and benchmarks...

[Updated on: Sun, 03 February 2013 19:47]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message icon14.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Is Skylark already working with Mingw?
Next Topic: Details when compiling in 64 bits
Goto Forum:
  


Current Time: Fri Apr 19 20:17:53 CEST 2024

Total time taken to generate the page: 0.03501 seconds