# HG changeset patch # User deba # Date 1192625174 0 # Node ID 72c3c25d5b8f842fe0274c7850d0c4b5a06d269d # Parent e4f8367beb41f803df5353494f98066f1bb125a0 setAll for iterable bool maps diff -r e4f8367beb41 -r 72c3c25d5b8f lemon/iterable_maps.h --- a/lemon/iterable_maps.h Sat Oct 13 08:48:07 2007 +0000 +++ b/lemon/iterable_maps.h Wed Oct 17 12:46:14 2007 +0000 @@ -176,6 +176,14 @@ } } + /// \brief Set all items. + /// + /// Set all items in the map. + /// \note Constant time operation. + void setAll(bool value) { + sep = (value ? array.size() : 0); + } + /// \brief Returns the number of the keys mapped to true. /// /// Returns the number of the keys mapped to true.