IndexSet

class dolfin.cpp.common.IndexSet(*args)

Bases: object

This class provides an efficient data structure for index sets. The cost of checking whether a given index is in the set is O(1) and very very fast (optimal) at the cost of extra storage.

Create index set of given size

clear()

Clear set

empty()

Return true if set is empty

fill()

Fill index set with indices 0, 1, 2, ..., size - 1

find()

Return position (if any) for given index

has_index()

Check whether index is in set

insert()

Insert index into set

size()

Return size of set

thisown

The membership flag