26 #ifndef MLN_GRAPH_ATTRIBUTE_REPRESENTATIVE_HH
27 # define MLN_GRAPH_ATTRIBUTE_REPRESENTATIVE_HH
37 # include <mln/core/concept/graph.hh>
38 # include <mln/util/array.hh>
52 struct representative_t;
57 # ifndef MLN_INCLUDE_ONLY
63 struct representative_t
66 typedef util::array<unsigned> result;
69 void init(
const Graph<G>& g)
72 deja_vu_.resize(
exact(g).v_nmax());
76 bool to_be_treated(
unsigned id)
77 {
return !deja_vu_[
id]; }
79 void new_component_from_vertex(
unsigned id)
85 void process_vertex(
unsigned)
88 bool to_be_queued(
unsigned id)
89 {
return !deja_vu_[
id]; }
91 void added_to_queue(
unsigned id)
102 util::array<bool> deja_vu_;
103 util::array<unsigned>
data;
109 # endif // ! MLN_INCLUDE_ONLY
119 #endif // ! MLN_GRAPH_ATTRIBUTE_REPRESENTATIVE_HH