#include <sparse_union_find.hpp>
|
| SparseUnionFind (bool include_children, vector< size_t > node_ids) |
|
| ~SparseUnionFind () |
| Destructor.
|
|
size_t | size () |
| Returns the number of indices in the UnionFind.
|
|
size_t | find_group (size_t i) |
| Returns the group ID that index i belongs to (can change after calling union)
|
|
void | union_groups (size_t i, size_t j) |
| Merges the group containing index i with the group containing index j.
|
|
size_t | group_size (size_t i) |
| Returns the size of the group containing index i.
|
|
vector< size_t > | group (size_t i) |
| Returns a vector of the indices in the same group as index i.
|
|
vector< vector< size_t > > | all_groups () |
| Returns all of the groups, each in a separate vector.
|
|
◆ SparseUnionFind()
vg::SparseUnionFind::SparseUnionFind |
( |
bool |
include_children, |
|
|
vector< size_t > |
node_ids |
|
) |
| |
◆ ~SparseUnionFind()
vg::SparseUnionFind::~SparseUnionFind |
( |
| ) |
|
◆ all_groups()
vector< vector< size_t > > vg::SparseUnionFind::all_groups |
( |
| ) |
|
Returns all of the groups, each in a separate vector.
◆ find_group()
size_t vg::SparseUnionFind::find_group |
( |
size_t |
i | ) |
|
Returns the group ID that index i belongs to (can change after calling union)
◆ group()
vector< size_t > vg::SparseUnionFind::group |
( |
size_t |
i | ) |
|
Returns a vector of the indices in the same group as index i.
◆ group_size()
size_t vg::SparseUnionFind::group_size |
( |
size_t |
i | ) |
|
Returns the size of the group containing index i.
◆ size()
size_t vg::SparseUnionFind::size |
( |
| ) |
|
Returns the number of indices in the UnionFind.
◆ union_groups()
void vg::SparseUnionFind::union_groups |
( |
size_t |
i, |
|
|
size_t |
j |
|
) |
| |
Merges the group containing index i with the group containing index j.
◆ dense_to_sparse
unordered_map<size_t, size_t> vg::SparseUnionFind::dense_to_sparse |
◆ include_children
bool vg::SparseUnionFind::include_children |
|
private |
◆ node_ids
vector<size_t> vg::SparseUnionFind::node_ids |
◆ sparse_to_dense
unordered_map<size_t, size_t> vg::SparseUnionFind::sparse_to_dense |
The documentation for this class was generated from the following files: