gravatar
kpeter (Peter Kovacs)
kpeter@inf.elte.hu
Bug fix in maps.h.
0 1 0
default
1 file changed with 2 insertions and 2 deletions:
↑ Collapse diff ↑
Show white space 24 line context
... ...
@@ -1299,25 +1299,25 @@
1299 1299
  /// BackInserterBoolMap<vector<Edge> > inserter_map(span_tree_edges);
1300 1300
  /// prim(graph, cost, inserter_map);
1301 1301
  ///\endcode
1302 1302
  ///
1303 1303
  ///\sa StoreBoolMap
1304 1304
  ///\sa FrontInserterBoolMap
1305 1305
  ///\sa InserterBoolMap
1306 1306
  template <typename Container,
1307 1307
            typename Functor =
1308 1308
            _maps_bits::Identity<typename Container::value_type> >
1309 1309
  class BackInserterBoolMap {
1310 1310
  public:
1311
    typedef typename Container::value_type Key;
1311
    typedef typename Functor::argument_type Key;
1312 1312
    typedef bool Value;
1313 1313

	
1314 1314
    /// Constructor
1315 1315
    BackInserterBoolMap(Container& _container, 
1316 1316
                        const Functor& _functor = Functor()) 
1317 1317
      : container(_container), functor(_functor) {}
1318 1318

	
1319 1319
    /// The \c set function of the map
1320 1320
    void set(const Key& key, Value value) {
1321 1321
      if (value) {
1322 1322
	container.push_back(functor(key));
1323 1323
      }
... ...
@@ -1334,25 +1334,25 @@
1334 1334
  /// Writable bool map for logging each \c true assigned element by pushing
1335 1335
  /// them into a front insertable container.
1336 1336
  /// It can be used to retrieve the items into a standard
1337 1337
  /// container. For example see \ref BackInserterBoolMap.
1338 1338
  ///
1339 1339
  ///\sa BackInserterBoolMap
1340 1340
  ///\sa InserterBoolMap
1341 1341
  template <typename Container,
1342 1342
            typename Functor =
1343 1343
            _maps_bits::Identity<typename Container::value_type> >
1344 1344
  class FrontInserterBoolMap {
1345 1345
  public:
1346
    typedef typename Container::value_type Key;
1346
    typedef typename Functor::argument_type Key;
1347 1347
    typedef bool Value;
1348 1348

	
1349 1349
    /// Constructor
1350 1350
    FrontInserterBoolMap(Container& _container,
1351 1351
                         const Functor& _functor = Functor()) 
1352 1352
      : container(_container), functor(_functor) {}
1353 1353

	
1354 1354
    /// The \c set function of the map
1355 1355
    void set(const Key& key, Value value) {
1356 1356
      if (value) {
1357 1357
	container.push_front(functor(key));
1358 1358
      }
0 comments (0 inline)