| 192 | } |
| 193 | |
| 194 | std::vector<NodeIndex> |
| 195 | NodeIndex::copath(LeafCount n) |
| 196 | { |
| 197 | auto d = dirpath(n); |
| 198 | if (d.empty()) { |
| 199 | return {}; |
| 200 | } |
| 201 | |
| 202 | // Prepend leaf; omit root |
| 203 | d.insert(d.begin(), *this); |
| 204 | d.pop_back(); |
| 205 | |
| 206 | return stdx::transform<NodeIndex>(d, [](auto x) { return x.sibling(); }); |
| 207 | } |
| 208 | |
| 209 | uint32_t |
| 210 | NodeIndex::level() const |
no test coverage detected