| 74 | int num_descendants() const { return forest->descendant_counts_->at(i); } |
| 75 | |
| 76 | bool IsAncestorOf(const Ref& ref) const { |
| 77 | return i < ref.i && i + 1 + num_descendants() > ref.i; |
| 78 | } |
| 79 | |
| 80 | explicit operator bool() const { return forest != NULLPTR; } |
| 81 |