
Jeffrey Holle ha escrito:
JOAQUIN LOPEZ MU?Z wrote:
----- Mensaje original ----- De: Jeffrey Holle
Fecha: Martes, Octubre 2, 2007 11:08 pm Asunto: Re: [Boost-users] [multi_key] problems using modify_key with a composite_key index Para: Boost Users mailing list While my swap method is now working correctly, I have found the the use of modify on a composite_key in order to preform a swap has corrupted the index.
[...]
The situation that I described above is considerable more complicated. By the time my app hangs up in the iteration loop through the elements in row 2, my sort function has executed 4 times, producing a sum of 2 swaps. The arrant behavior of the composite_key index starts appearing at the end of the 3rd sort operation. Then I see that a vertex order of "7,10,9,11" get changed to "11,7". This makes no sense to me, swapping elements shouldn't reduce the number of elements in a row.
There is a situation in which you can see such reduction of elements: modify() will *erase* the element if the modification has resulted in a collision for some index with unique keys. In your particular case, index #0 is unique on entry::m_vertex, so you might want to check whether your procedure somehow can change this member so that it becomes a duplicate of a preexisting value. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo