Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ThreadSafeUnionFind ¶
func NewThreadSafeUnionFind ¶
func NewThreadSafeUnionFind(size int) ThreadSafeUnionFind
func (*ThreadSafeUnionFind) Connected ¶
func (suf *ThreadSafeUnionFind) Connected(p int, q int) bool
Unfortunately all the calls are coerced to writes thats why we use a Writer lock
func (*ThreadSafeUnionFind) Root ¶
func (suf *ThreadSafeUnionFind) Root(p int) int
func (*ThreadSafeUnionFind) Union ¶
func (suf *ThreadSafeUnionFind) Union(p int, q int)
type UnionFind ¶
type UnionFind struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.