lemon/iterable_maps.h
changeset 2496 72c3c25d5b8f
parent 2391 14a343be7a5a
child 2553 bfced05fa852
     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.