lemon/iterable_maps.h
changeset 2147 63d293ff1bef
parent 2031 080d51024ac5
child 2210 25aab9493dd2
equal deleted inserted replaced
14:7ce6017d9eb2 15:457dc6a99eba
   124     };
   124     };
   125     
   125     
   126     /// \brief Constructor of the Map with a default value.
   126     /// \brief Constructor of the Map with a default value.
   127     ///
   127     ///
   128     /// Constructor of the Map with a default value.
   128     /// Constructor of the Map with a default value.
   129     IterableBoolMap(const Graph& _graph, bool def = false) 
   129     explicit IterableBoolMap(const Graph& _graph, bool def = false) 
   130       : Parent(_graph), graph(_graph) {
   130       : Parent(_graph), graph(_graph) {
   131       for (KeyIt it(graph); it != INVALID; ++it) {
   131       for (KeyIt it(graph); it != INVALID; ++it) {
   132         Parent::set(it, array.size());
   132         Parent::set(it, array.size());
   133         array.push_back(it);
   133         array.push_back(it);
   134       }
   134       }
   201       /// \brief Creates an iterator.
   201       /// \brief Creates an iterator.
   202       ///
   202       ///
   203       /// Creates an iterator. It iterates on the 
   203       /// Creates an iterator. It iterates on the 
   204       /// keys which mapped to true.
   204       /// keys which mapped to true.
   205       /// \param _map The IterableIntMap
   205       /// \param _map The IterableIntMap
   206       TrueIt(const IterableBoolMap& _map) 
   206       explicit TrueIt(const IterableBoolMap& _map) 
   207         : Parent(_map.sep > 0 ? _map.array[_map.sep - 1] : INVALID), 
   207         : Parent(_map.sep > 0 ? _map.array[_map.sep - 1] : INVALID), 
   208           map(&_map) {}
   208           map(&_map) {}
   209 
   209 
   210       /// \brief Invalid constructor \& conversion.
   210       /// \brief Invalid constructor \& conversion.
   211       ///
   211       ///
   241       /// \brief Creates an iterator.
   241       /// \brief Creates an iterator.
   242       ///
   242       ///
   243       /// Creates an iterator. It iterates on the 
   243       /// Creates an iterator. It iterates on the 
   244       /// keys which mapped to false.
   244       /// keys which mapped to false.
   245       /// \param _map The IterableIntMap
   245       /// \param _map The IterableIntMap
   246       FalseIt(const IterableBoolMap& _map) 
   246       explicit FalseIt(const IterableBoolMap& _map) 
   247         : Parent(_map.sep < (int)_map.array.size() ? 
   247         : Parent(_map.sep < (int)_map.array.size() ? 
   248                  _map.array.back() : INVALID), map(&_map) {}
   248                  _map.array.back() : INVALID), map(&_map) {}
   249 
   249 
   250       /// \brief Invalid constructor \& conversion.
   250       /// \brief Invalid constructor \& conversion.
   251       ///
   251       ///