Definition
An instance S of the data type int_set is a subset of a fixed interval [a..b] of the integers, called the range of S.
#include < LEDA/int_set.h >
Creation
| int_set | S(int a, int b) | creates an instance S of type int_set for elements from [a..b] and initializes it to the empty set. |
| int_set | S(int n) | creates an instance S of type int_set for elements from [0..n - 1] and initializes it to the empty set. |
Operations
Implementation
Integer sets are implemented by bit vectors. Operations insert, delete, member, empty, and size take constant time. clear, intersection, union and complement take time O(b - a + 1).
© Copyright 1995-2002, Algorithmic Solutions Software GmbH. All rights reserved.
2002-10-16