setAll for iterable bool maps
authordeba
Wed, 17 Oct 2007 12:46:14 +0000
changeset 249672c3c25d5b8f
parent 2495 e4f8367beb41
child 2497 ea96c0acefc4
setAll for iterable bool maps
lemon/iterable_maps.h
     1.1 --- a/lemon/iterable_maps.h	Sat Oct 13 08:48:07 2007 +0000
     1.2 +++ b/lemon/iterable_maps.h	Wed Oct 17 12:46:14 2007 +0000
     1.3 @@ -176,6 +176,14 @@
     1.4        }
     1.5      }
     1.6  
     1.7 +    /// \brief Set all items.
     1.8 +    ///
     1.9 +    /// Set all items in the map.
    1.10 +    /// \note Constant time operation.
    1.11 +    void setAll(bool value) {
    1.12 +      sep = (value ? array.size() : 0);      
    1.13 +    }
    1.14 +
    1.15      /// \brief Returns the number of the keys mapped to true.
    1.16      ///
    1.17      /// Returns the number of the keys mapped to true.