1
나는 boost::disjoint_sets_with_storage을 이해하려고 노력하지만 가능한 가장 단순한 예제조차도 작동하지 않으며 그 이유를 이해할 수 없습니다.이해 boost :: disjoint_sets_with_storage
#include <boost/pending/disjoint_sets.hpp>
int main(){
boost::disjoint_sets_with_storage<> union_find;
union_find.make_set(1);
//..
}
위의 코드는 컴파일되지만 segfault가 생성됩니다. 정수를 요소로 사용하고 싶지만 boost documentation에는 "요소"템플릿 매개 변수가 없으므로 형식을 유추한다고 가정합니다. 그러나 문제는 무엇입니까? 감사합니다.
당신은 [여기 찾고있는 것을 찾을 수 있습니다 http://stackoverflow.com/questions/4134703/understanding-boostdisjoint-sets](http://stackoverflow.com/questions/4134703/understanding-boostdisjoint -sets) – Greg
나는이 구현을 결코 좋아하지 않았다. 내 모든 필요에 따라 목록 및 정렬되지 않은 맵을 사용하여 자체 구현을 사용합니다. – Arunmu
@ 그렉 감사하지만 아니, 아니 같은 인터페이스 –