algorithm - What abstract data type is this? -


is following common data type (i.e. have name)?

its unique characteristic is, unlike regular set, contains "universe" on initialisation o(c) memory overhead, , max memory overhead of o(n/2) (which occurs when remove every-other element):

> s = new structure(701) s = structure(0-700)  > s.remove(100) s = structure(0-99, 101-700)  > s.add(100) s = structure(0-700)  > s.remove(200) s = structure(0-199, 201-700)  > s.remove(202) s = structure(0-199, 201, 203-700)  > s.removeall() s = structure() 

does have standard name?

i've used many times in past , seen used in things plane-sweep algorithms polygon clipping.

sometimes abstract data type represents set, , data structure optimization. use representing set of matching characters given regex expression [^a-za-z0-9.-], example, , perform intersection, union, , other operations on sets.

this sort of data structure implemented on top of other ordered set or map structure, storing keys membership in set changes instead of keys in set itself. in other cases i've seen sort of thing done, authors refer underlying structure instead of giving name concept itself.

i idea of having name it, though, since said i've used myself many times. maybe call "in & out set" in honor of hamburger chain liked best when ate hamburgers.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -