IndexAllocator class

Back to Deprecated

IndexAllocator manages integer identifiers in a conservative manner. The identifiers are resources which can be allocated and deallocated, and, if on allocation there are two free identifiers, then the smaller of them is returned. With a proper data structure, this can be done quite efficiently: allocations work in amortized logarithmic time, while deallocations work in logarithmic time.

Files

Index allocator module

IndexAllocator class

Allocates integer identifiers conservatively

Testing for IndexAllocator