lemon/unionfind.h
changeset 904 16d466589b54
parent 559 c5fd2d996909
child 875 07ec2b52e53d
equal deleted inserted replaced
7:22bce061f57c 10:795a3ed515af
   737     /// \brief Clears the union-find data structure
   737     /// \brief Clears the union-find data structure
   738     ///
   738     ///
   739     /// Erase each item from the data structure.
   739     /// Erase each item from the data structure.
   740     void clear() {
   740     void clear() {
   741       items.clear();
   741       items.clear();
   742       classes.clear;
   742       classes.clear();
   743       firstClass = firstFreeClass = firstFreeItem = -1;
   743       firstClass = firstFreeClass = firstFreeItem = -1;
   744     }
   744     }
   745 
   745 
   746     /// \brief Gives back the class of the \e item.
   746     /// \brief Gives back the class of the \e item.
   747     ///
   747     ///
  1286     /// structure uses internally for store references.
  1286     /// structure uses internally for store references.
  1287     HeapUnionFind(ItemIntMap& _index)
  1287     HeapUnionFind(ItemIntMap& _index)
  1288       : index(_index), first_class(-1),
  1288       : index(_index), first_class(-1),
  1289         first_free_class(-1), first_free_node(-1) {}
  1289         first_free_class(-1), first_free_node(-1) {}
  1290 
  1290 
       
  1291     /// \brief Clears the union-find data structure
       
  1292     ///
       
  1293     /// Erase each item from the data structure.
       
  1294     void clear() {
       
  1295       nodes.clear();
       
  1296       classes.clear();
       
  1297       first_free_node = first_free_class = first_class = -1;
       
  1298     }
       
  1299 
  1291     /// \brief Insert a new node into a new component.
  1300     /// \brief Insert a new node into a new component.
  1292     ///
  1301     ///
  1293     /// Insert a new node into a new component.
  1302     /// Insert a new node into a new component.
  1294     /// \param item The item of the new node.
  1303     /// \param item The item of the new node.
  1295     /// \param prio The priority of the new node.
  1304     /// \param prio The priority of the new node.