4 #include <boost/pending/disjoint_sets.hpp> 9 namespace frechet {
namespace fs {
119 #endif // COMPONENTS_H DisjointSet disjointSet
disjoint set of component IDs.
an iterator over a BitSet
data::BitSet::iterator first() const
global definitions for all algorithms.
boost::disjoint_sets_with_storage DisjointSet
union-find structure, or disjoint set
component_id_t count() const
int m
number of vertexes in Q. Number of grid rows is m-1.
int n
number of vertexes in P. Number of grid columns is n-1.
data::BitSet::iterator end() const
const IntervalArray & intervals() const
component_id_t componentID(int i, int j)
get the component for a cell
Components(int n, int m)
default constrcutor
void calculateComponents(FreeSpace &fs)
calculate connected components
Free-Space connected components and their projections to the domain axes.
data::BitSet::iterator last() const
data::Array2D< data::IntervalPair > IntervalArray
data::BitSet::iterator begin() const
A simple bit vector of fixed size.
data::BitSet intervalSet
contains the valid representatives (a subset of all cells)
The FreeSpace class models the Free-Space Diagram calculated from two curves.
component_id_t representative(int i, int j)
find the component ID of a cell
void normalize()
normalize union-find structure. for each component, find the smallest representative.
int count() const
This methods is expensive, as it scans the whole array.
component_id_t assignComponent(const FreeSpace &fs, int i, int j)
compute component ID for a cell
void clear()
clear the component set
unsigned int component_id_t
used as identifier for free-space components
static const component_id_t NO_COMPONENT
empty cells have an invalid component ID
IntervalArray intervalArray
has an entry for every cell (nxm)