diff options
Diffstat (limited to 'extern/bullet/BulletDynamics/CollisionDispatch/UnionFind.h')
-rw-r--r-- | extern/bullet/BulletDynamics/CollisionDispatch/UnionFind.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/extern/bullet/BulletDynamics/CollisionDispatch/UnionFind.h b/extern/bullet/BulletDynamics/CollisionDispatch/UnionFind.h new file mode 100644 index 00000000000..0dc57783283 --- /dev/null +++ b/extern/bullet/BulletDynamics/CollisionDispatch/UnionFind.h @@ -0,0 +1,21 @@ +#ifndef UNION_FIND_H +#define UNION_FIND_H + +///UnionFind calculates connected subsets +class UnionFind + { + private: + int *id, *sz; + int m_N; + + public: + int find(int x); + UnionFind(int N); + void reset(); + + int find(int p, int q); + void unite(int p, int q); + }; + + +#endif //UNION_FIND_H |