lemon/unionfind.h
branch1.1
changeset 730 4f8b22521b4a
parent 710 268a052c3043
parent 722 5b926cc36a4b
child 761 f1398882a928
equal deleted inserted replaced
8:7337e7d23d6e 10:50b6351db848
  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.