#include <brip_label_equivalence.h>
Public Member Functions | |
brip_label_equivalence () | |
~brip_label_equivalence () | |
void | add_label_pair (unsigned la, unsigned lb) |
add a label pair equivalence. | |
void | transitive_closure () |
carry out full propagation of label equivalence. | |
vcl_set< unsigned > | labels () const |
the full set of labels. | |
vcl_map< unsigned, vcl_set < unsigned > > & | equivalence_sets () |
the set of labels equivalent to a given label. | |
Protected Member Functions | |
bool | get_next_label (vcl_set< unsigned > const &labels, unsigned int &label) |
Find the next label not accounted for in the current equivalence set. | |
bool | merge_equivalence (vcl_map< unsigned int, vcl_set< unsigned int > > &tab, unsigned int cur_label, unsigned int label) |
Protected Attributes | |
unsigned | max_label_ |
vcl_map< unsigned, vcl_set < unsigned > > | forward_pairs_ |
vcl_map< unsigned, vcl_set < unsigned > > | reverse_pairs_ |
vcl_map< unsigned, vcl_set < unsigned > > | equivalence_sets_ |
Definition at line 18 of file brip_label_equivalence.h.
brip_label_equivalence::brip_label_equivalence | ( | ) | [inline] |
Definition at line 21 of file brip_label_equivalence.h.
brip_label_equivalence::~brip_label_equivalence | ( | ) | [inline] |
Definition at line 22 of file brip_label_equivalence.h.
void brip_label_equivalence::add_label_pair | ( | unsigned | la, |
unsigned | lb | ||
) |
add a label pair equivalence.
Definition at line 9 of file brip_label_equivalence.cxx.
vcl_map<unsigned, vcl_set<unsigned> >& brip_label_equivalence::equivalence_sets | ( | ) | [inline] |
the set of labels equivalent to a given label.
Definition at line 34 of file brip_label_equivalence.h.
bool brip_label_equivalence::get_next_label | ( | vcl_set< unsigned > const & | labels, |
unsigned int & | label | ||
) | [protected] |
Find the next label not accounted for in the current equivalence set.
The set of labels is searched to find a label larger than label, but not in the set, labels.
Definition at line 74 of file brip_label_equivalence.cxx.
vcl_set< unsigned > brip_label_equivalence::labels | ( | ) | const |
the full set of labels.
find all the individual labels and determine the largest label.
Definition at line 22 of file brip_label_equivalence.cxx.
bool brip_label_equivalence::merge_equivalence | ( | vcl_map< unsigned int, vcl_set< unsigned int > > & | tab, |
unsigned int | cur_label, | ||
unsigned int | label | ||
) | [protected] |
Definition at line 38 of file brip_label_equivalence.cxx.
void brip_label_equivalence::transitive_closure | ( | ) |
carry out full propagation of label equivalence.
Definition at line 101 of file brip_label_equivalence.cxx.
vcl_map<unsigned, vcl_set<unsigned> > brip_label_equivalence::equivalence_sets_ [protected] |
Definition at line 46 of file brip_label_equivalence.h.
vcl_map<unsigned, vcl_set<unsigned> > brip_label_equivalence::forward_pairs_ [protected] |
Definition at line 44 of file brip_label_equivalence.h.
unsigned brip_label_equivalence::max_label_ [protected] |
Definition at line 38 of file brip_label_equivalence.h.
vcl_map<unsigned, vcl_set<unsigned> > brip_label_equivalence::reverse_pairs_ [protected] |
Definition at line 45 of file brip_label_equivalence.h.