Abstract

A non-empty set is algorithmically nice, if there exists an algorithm of the constant time complexity, with respect to the cardinality of the set, converting each element to a unique integer number in the chain 0, 1, ..., n - 1 for sets with n elements or infinite sequence 0, 1, ... for infinite sets. Given two finite sets, a C++ class template generating bijective and inverse functions optimally reusing complexities of searching elements is proposed. The Standard C++ support for the nice sets and enumerations is discussed.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call