thomasmoelhave / tpie

Templated Portable I/O Environment
Other
112 stars 24 forks source link

bug in disjoint_sets? #188

Closed yjwoo14 closed 9 years ago

yjwoo14 commented 9 years ago

clear() method only initializes m_size. https://github.com/thomasmoelhave/tpie/blob/master/tpie/disjoint_sets.h#L156

is_set(element) method uses the following condition m_elements[element] != m_unused. So, I think m_elements array should be initialized too.

yjwoo14 commented 9 years ago

Also resize() has the same problem.

svendcs commented 9 years ago

Fixed in eb9c7b952d0644af697004134e9c4fb236f52548