Lines Matching refs:parent_
41 : parent_(max, fail), rank_(max), fail_(fail) { } in UnionFind()
46 if (item >= parent_.size() in FindSet()
48 || parent_[item] == fail_) return fail_; in FindSet()
50 T *p = &parent_[item]; in FindSet()
51 for (; *p != item; item = *p, p = &parent_[item]) { in FindSet()
68 if (item >= parent_.size()) { in MakeSet()
71 parent_.resize(nitem, fail_); in MakeSet()
74 parent_[item] = item; in MakeSet()
80 parent_.resize(max); in MakeAllSet()
82 parent_[item] = item; in MakeAllSet()
87 vector<T> parent_; // Parent nodes.
97 parent_[y] = x; in Link()
99 parent_[x] = y; in Link()