Boost GIL


color_base_algorithm.hpp
1 //
2 // Copyright 2005-2007 Adobe Systems Incorporated
3 // Copyright 2019 Mateusz Loskot <mateusz at loskot dot net>
4 //
5 // Distributed under the Boost Software License, Version 1.0
6 // See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt
8 //
9 #ifndef BOOST_GIL_COLOR_BASE_ALGORITHM_HPP
10 #define BOOST_GIL_COLOR_BASE_ALGORITHM_HPP
11 
12 #include <boost/gil/concepts.hpp>
13 #include <boost/gil/utilities.hpp>
14 #include <boost/gil/detail/mp11.hpp>
15 
16 #include <boost/config.hpp>
17 
18 #include <algorithm>
19 #include <type_traits>
20 
21 namespace boost { namespace gil {
22 
26 
39 template <typename ColorBase>
42 struct size : public mp11::mp_size<typename ColorBase::layout_t::color_space_t> {};
43 
47 
74 template <typename ColorBase, int K>
78 {
79  using channel_mapping_t = typename ColorBase::layout_t::channel_mapping_t;
80  static_assert(K < mp11::mp_size<channel_mapping_t>::value,
81  "K index should be less than size of channel_mapping_t sequence");
82 
83  static constexpr int semantic_index = mp11::mp_at_c<channel_mapping_t, K>::type::value;
84  using type = typename kth_element_type<ColorBase, semantic_index>::type;
85 };
86 
89 template <typename ColorBase, int K>
91 {
92  using channel_mapping_t = typename ColorBase::layout_t::channel_mapping_t;
93  static_assert(K < mp11::mp_size<channel_mapping_t>::value,
94  "K index should be less than size of channel_mapping_t sequence");
95 
96  static constexpr int semantic_index = mp11::mp_at_c<channel_mapping_t, K>::type::value;
97  using type = typename kth_element_reference_type<ColorBase, semantic_index>::type;
98  static type get(ColorBase& cb) { return gil::at_c<semantic_index>(cb); }
99 };
100 
103 template <typename ColorBase, int K>
105 {
106  using channel_mapping_t = typename ColorBase::layout_t::channel_mapping_t;
107  static_assert(K < mp11::mp_size<channel_mapping_t>::value,
108  "K index should be less than size of channel_mapping_t sequence");
109 
110  static constexpr int semantic_index = mp11::mp_at_c<channel_mapping_t, K>::type::value;
111  using type = typename kth_element_const_reference_type<ColorBase,semantic_index>::type;
112  static type get(const ColorBase& cb) { return gil::at_c<semantic_index>(cb); }
113 };
114 
117 template <int K, typename ColorBase>
118 inline
119 auto semantic_at_c(ColorBase& p)
120  -> typename std::enable_if
121  <
122  !std::is_const<ColorBase>::value,
123  typename kth_semantic_element_reference_type<ColorBase, K>::type
124  >::type
125 {
127 }
128 
131 template <int K, typename ColorBase>
132 inline
133 auto semantic_at_c(ColorBase const& p)
134  -> typename kth_semantic_element_const_reference_type<ColorBase, K>::type
135 {
137 }
138 
142 
162 template <typename ColorBase, typename Color>
166  : mp11::mp_contains<typename ColorBase::layout_t::color_space_t, Color>
167 {};
168 
169 template <typename ColorBase, typename Color>
170 struct color_index_type : public detail::type_to_index<typename ColorBase::layout_t::color_space_t,Color> {};
171 
174 template <typename ColorBase, typename Color>
175 struct color_element_type : public kth_semantic_element_type<ColorBase,color_index_type<ColorBase,Color>::value> {};
176 
179 template <typename ColorBase, typename Color>
180 struct color_element_reference_type : public kth_semantic_element_reference_type<ColorBase,color_index_type<ColorBase,Color>::value> {};
181 
184 template <typename ColorBase, typename Color>
185 struct color_element_const_reference_type : public kth_semantic_element_const_reference_type<ColorBase,color_index_type<ColorBase,Color>::value> {};
186 
189 template <typename ColorBase, typename Color>
190 typename color_element_reference_type<ColorBase,Color>::type get_color(ColorBase& cb, Color=Color()) {
192 }
193 
196 template <typename ColorBase, typename Color>
197 typename color_element_const_reference_type<ColorBase,Color>::type get_color(const ColorBase& cb, Color=Color()) {
199 }
200 
206 
218 template <typename ColorBase>
221 struct element_type : public kth_element_type<ColorBase, 0> {};
222 
225 template <typename ColorBase>
226 struct element_reference_type : public kth_element_reference_type<ColorBase, 0> {};
227 
230 template <typename ColorBase>
231 struct element_const_reference_type : public kth_element_const_reference_type<ColorBase, 0> {};
232 
233 
234 namespace detail {
235 
236 // compile-time recursion for per-element operations on color bases
237 template <int N>
238 struct element_recursion
239 {
240 
241 #if defined(BOOST_GCC) && (BOOST_GCC >= 40900)
242 #pragma GCC diagnostic push
243 #pragma GCC diagnostic ignored "-Wconversion"
244 #pragma GCC diagnostic ignored "-Wfloat-equal"
245 #endif
246 
247  template <typename P1,typename P2>
248  static bool static_equal(const P1& p1, const P2& p2)
249  {
250  return element_recursion<N-1>::static_equal(p1,p2) &&
251  semantic_at_c<N-1>(p1)==semantic_at_c<N-1>(p2);
252  }
253 
254  template <typename P1,typename P2>
255  static void static_copy(const P1& p1, P2& p2)
256  {
257  element_recursion<N-1>::static_copy(p1,p2);
258  semantic_at_c<N-1>(p2)=semantic_at_c<N-1>(p1);
259  }
260 
261  template <typename P,typename T2>
262  static void static_fill(P& p, T2 v)
263  {
264  element_recursion<N-1>::static_fill(p,v);
265  semantic_at_c<N-1>(p)=v;
266  }
267 
268  template <typename Dst,typename Op>
269  static void static_generate(Dst& dst, Op op)
270  {
271  element_recursion<N-1>::static_generate(dst,op);
272  semantic_at_c<N-1>(dst)=op();
273  }
274 
275 #if defined(BOOST_GCC) && (BOOST_GCC >= 40900)
276 #pragma GCC diagnostic pop
277 #endif
278 
279  //static_for_each with one source
280  template <typename P1,typename Op>
281  static Op static_for_each(P1& p1, Op op) {
282  Op op2(element_recursion<N-1>::static_for_each(p1,op));
283  op2(semantic_at_c<N-1>(p1));
284  return op2;
285  }
286  template <typename P1,typename Op>
287  static Op static_for_each(const P1& p1, Op op) {
288  Op op2(element_recursion<N-1>::static_for_each(p1,op));
289  op2(semantic_at_c<N-1>(p1));
290  return op2;
291  }
292  //static_for_each with two sources
293  template <typename P1,typename P2,typename Op>
294  static Op static_for_each(P1& p1, P2& p2, Op op) {
295  Op op2(element_recursion<N-1>::static_for_each(p1,p2,op));
296  op2(semantic_at_c<N-1>(p1), semantic_at_c<N-1>(p2));
297  return op2;
298  }
299  template <typename P1,typename P2,typename Op>
300  static Op static_for_each(P1& p1, const P2& p2, Op op) {
301  Op op2(element_recursion<N-1>::static_for_each(p1,p2,op));
302  op2(semantic_at_c<N-1>(p1), semantic_at_c<N-1>(p2));
303  return op2;
304  }
305  template <typename P1,typename P2,typename Op>
306  static Op static_for_each(const P1& p1, P2& p2, Op op) {
307  Op op2(element_recursion<N-1>::static_for_each(p1,p2,op));
308  op2(semantic_at_c<N-1>(p1), semantic_at_c<N-1>(p2));
309  return op2;
310  }
311  template <typename P1,typename P2,typename Op>
312  static Op static_for_each(const P1& p1, const P2& p2, Op op) {
313  Op op2(element_recursion<N-1>::static_for_each(p1,p2,op));
314  op2(semantic_at_c<N-1>(p1), semantic_at_c<N-1>(p2));
315  return op2;
316  }
317  //static_for_each with three sources
318  template <typename P1,typename P2,typename P3,typename Op>
319  static Op static_for_each(P1& p1, P2& p2, P3& p3, Op op) {
320  Op op2(element_recursion<N-1>::static_for_each(p1,p2,p3,op));
321  op2(semantic_at_c<N-1>(p1), semantic_at_c<N-1>(p2), semantic_at_c<N-1>(p3));
322  return op2;
323  }
324  template <typename P1,typename P2,typename P3,typename Op>
325  static Op static_for_each(P1& p1, P2& p2, const P3& p3, Op op) {
326  Op op2(element_recursion<N-1>::static_for_each(p1,p2,p3,op));
327  op2(semantic_at_c<N-1>(p1), semantic_at_c<N-1>(p2), semantic_at_c<N-1>(p3));
328  return op2;
329  }
330  template <typename P1,typename P2,typename P3,typename Op>
331  static Op static_for_each(P1& p1, const P2& p2, P3& p3, Op op) {
332  Op op2(element_recursion<N-1>::static_for_each(p1,p2,p3,op));
333  op2(semantic_at_c<N-1>(p1), semantic_at_c<N-1>(p2), semantic_at_c<N-1>(p3));
334  return op2;
335  }
336  template <typename P1,typename P2,typename P3,typename Op>
337  static Op static_for_each(P1& p1, const P2& p2, const P3& p3, Op op) {
338  Op op2(element_recursion<N-1>::static_for_each(p1,p2,p3,op));
339  op2(semantic_at_c<N-1>(p1), semantic_at_c<N-1>(p2), semantic_at_c<N-1>(p3));
340  return op2;
341  }
342  template <typename P1,typename P2,typename P3,typename Op>
343  static Op static_for_each(const P1& p1, P2& p2, P3& p3, Op op) {
344  Op op2(element_recursion<N-1>::static_for_each(p1,p2,p3,op));
345  op2(semantic_at_c<N-1>(p1), semantic_at_c<N-1>(p2), semantic_at_c<N-1>(p3));
346  return op2;
347  }
348  template <typename P1,typename P2,typename P3,typename Op>
349  static Op static_for_each(const P1& p1, P2& p2, const P3& p3, Op op) {
350  Op op2(element_recursion<N-1>::static_for_each(p1,p2,p3,op));
351  op2(semantic_at_c<N-1>(p1), semantic_at_c<N-1>(p2), semantic_at_c<N-1>(p3));
352  return op2;
353  }
354  template <typename P1,typename P2,typename P3,typename Op>
355  static Op static_for_each(const P1& p1, const P2& p2, P3& p3, Op op) {
356  Op op2(element_recursion<N-1>::static_for_each(p1,p2,p3,op));
357  op2(semantic_at_c<N-1>(p1), semantic_at_c<N-1>(p2), semantic_at_c<N-1>(p3));
358  return op2;
359  }
360  template <typename P1,typename P2,typename P3,typename Op>
361  static Op static_for_each(const P1& p1, const P2& p2, const P3& p3, Op op) {
362  Op op2(element_recursion<N-1>::static_for_each(p1,p2,p3,op));
363  op2(semantic_at_c<N-1>(p1), semantic_at_c<N-1>(p2), semantic_at_c<N-1>(p3));
364  return op2;
365  }
366  //static_transform with one source
367  template <typename P1,typename Dst,typename Op>
368  static Op static_transform(P1& src, Dst& dst, Op op) {
369  Op op2(element_recursion<N-1>::static_transform(src,dst,op));
370  semantic_at_c<N-1>(dst)=op2(semantic_at_c<N-1>(src));
371  return op2;
372  }
373  template <typename P1,typename Dst,typename Op>
374  static Op static_transform(const P1& src, Dst& dst, Op op) {
375  Op op2(element_recursion<N-1>::static_transform(src,dst,op));
376  semantic_at_c<N-1>(dst)=op2(semantic_at_c<N-1>(src));
377  return op2;
378  }
379  //static_transform with two sources
380  template <typename P1,typename P2,typename Dst,typename Op>
381  static Op static_transform(P1& src1, P2& src2, Dst& dst, Op op) {
382  Op op2(element_recursion<N-1>::static_transform(src1,src2,dst,op));
383  semantic_at_c<N-1>(dst)=op2(semantic_at_c<N-1>(src1), semantic_at_c<N-1>(src2));
384  return op2;
385  }
386  template <typename P1,typename P2,typename Dst,typename Op>
387  static Op static_transform(P1& src1, const P2& src2, Dst& dst, Op op) {
388  Op op2(element_recursion<N-1>::static_transform(src1,src2,dst,op));
389  semantic_at_c<N-1>(dst)=op2(semantic_at_c<N-1>(src1), semantic_at_c<N-1>(src2));
390  return op2;
391  }
392  template <typename P1,typename P2,typename Dst,typename Op>
393  static Op static_transform(const P1& src1, P2& src2, Dst& dst, Op op) {
394  Op op2(element_recursion<N-1>::static_transform(src1,src2,dst,op));
395  semantic_at_c<N-1>(dst)=op2(semantic_at_c<N-1>(src1), semantic_at_c<N-1>(src2));
396  return op2;
397  }
398  template <typename P1,typename P2,typename Dst,typename Op>
399  static Op static_transform(const P1& src1, const P2& src2, Dst& dst, Op op) {
400  Op op2(element_recursion<N-1>::static_transform(src1,src2,dst,op));
401  semantic_at_c<N-1>(dst)=op2(semantic_at_c<N-1>(src1), semantic_at_c<N-1>(src2));
402  return op2;
403  }
404 };
405 
406 // Termination condition of the compile-time recursion for element operations on a color base
407 template<> struct element_recursion<0> {
408  //static_equal
409  template <typename P1,typename P2>
410  static bool static_equal(const P1&, const P2&) { return true; }
411  //static_copy
412  template <typename P1,typename P2>
413  static void static_copy(const P1&, const P2&) {}
414  //static_fill
415  template <typename P, typename T2>
416  static void static_fill(const P&, T2) {}
417  //static_generate
418  template <typename Dst,typename Op>
419  static void static_generate(const Dst&,Op){}
420  //static_for_each with one source
421  template <typename P1,typename Op>
422  static Op static_for_each(const P1&,Op op){return op;}
423  //static_for_each with two sources
424  template <typename P1,typename P2,typename Op>
425  static Op static_for_each(const P1&,const P2&,Op op){return op;}
426  //static_for_each with three sources
427  template <typename P1,typename P2,typename P3,typename Op>
428  static Op static_for_each(const P1&,const P2&,const P3&,Op op){return op;}
429  //static_transform with one source
430  template <typename P1,typename Dst,typename Op>
431  static Op static_transform(const P1&,const Dst&,Op op){return op;}
432  //static_transform with two sources
433  template <typename P1,typename P2,typename Dst,typename Op>
434  static Op static_transform(const P1&,const P2&,const Dst&,Op op){return op;}
435 };
436 
437 // std::min and std::max don't have the mutable overloads...
438 template <typename Q> inline const Q& mutable_min(const Q& x, const Q& y) { return x<y ? x : y; }
439 template <typename Q> inline Q& mutable_min( Q& x, Q& y) { return x<y ? x : y; }
440 template <typename Q> inline const Q& mutable_max(const Q& x, const Q& y) { return x<y ? y : x; }
441 template <typename Q> inline Q& mutable_max( Q& x, Q& y) { return x<y ? y : x; }
442 
443 
444 // compile-time recursion for min/max element
445 template <int N>
446 struct min_max_recur {
447  template <typename P> static typename element_const_reference_type<P>::type max_(const P& p) {
448  return mutable_max(min_max_recur<N-1>::max_(p),semantic_at_c<N-1>(p));
449  }
450  template <typename P> static typename element_reference_type<P>::type max_( P& p) {
451  return mutable_max(min_max_recur<N-1>::max_(p),semantic_at_c<N-1>(p));
452  }
453  template <typename P> static typename element_const_reference_type<P>::type min_(const P& p) {
454  return mutable_min(min_max_recur<N-1>::min_(p),semantic_at_c<N-1>(p));
455  }
456  template <typename P> static typename element_reference_type<P>::type min_( P& p) {
457  return mutable_min(min_max_recur<N-1>::min_(p),semantic_at_c<N-1>(p));
458  }
459 };
460 
461 // termination condition of the compile-time recursion for min/max element
462 template <>
463 struct min_max_recur<1> {
464  template <typename P> static typename element_const_reference_type<P>::type max_(const P& p) { return semantic_at_c<0>(p); }
465  template <typename P> static typename element_reference_type<P>::type max_( P& p) { return semantic_at_c<0>(p); }
466  template <typename P> static typename element_const_reference_type<P>::type min_(const P& p) { return semantic_at_c<0>(p); }
467  template <typename P> static typename element_reference_type<P>::type min_( P& p) { return semantic_at_c<0>(p); }
468 };
469 } // namespace detail
470 
483 
484 template <typename P>
485 BOOST_FORCEINLINE
486 typename element_const_reference_type<P>::type static_max(const P& p) { return detail::min_max_recur<size<P>::value>::max_(p); }
487 
488 template <typename P>
489 BOOST_FORCEINLINE
490 typename element_reference_type<P>::type static_max( P& p) { return detail::min_max_recur<size<P>::value>::max_(p); }
491 
492 template <typename P>
493 BOOST_FORCEINLINE
494 typename element_const_reference_type<P>::type static_min(const P& p) { return detail::min_max_recur<size<P>::value>::min_(p); }
495 
496 template <typename P>
497 BOOST_FORCEINLINE
498 typename element_reference_type<P>::type static_min( P& p) { return detail::min_max_recur<size<P>::value>::min_(p); }
500 
515 
516 template <typename P1,typename P2>
517 BOOST_FORCEINLINE
518 bool static_equal(const P1& p1, const P2& p2) { return detail::element_recursion<size<P1>::value>::static_equal(p1,p2); }
519 
521 
536 
537 template <typename Src,typename Dst>
538 BOOST_FORCEINLINE
539 void static_copy(const Src& src, Dst& dst)
540 {
541  detail::element_recursion<size<Dst>::value>::static_copy(src, dst);
542 }
543 
545 
557 
558 template <typename P,typename V>
559 BOOST_FORCEINLINE
560 void static_fill(P& p, const V& v)
561 {
562  detail::element_recursion<size<P>::value>::static_fill(p,v);
563 }
564 
566 
585 
586 template <typename P1,typename Op>
587 BOOST_FORCEINLINE
588 void static_generate(P1& dst,Op op) { detail::element_recursion<size<P1>::value>::static_generate(dst,op); }
590 
616 
617 //static_transform with one source
618 template <typename Src,typename Dst,typename Op>
619 BOOST_FORCEINLINE
620 Op static_transform(Src& src,Dst& dst,Op op) { return detail::element_recursion<size<Dst>::value>::static_transform(src,dst,op); }
621 template <typename Src,typename Dst,typename Op>
622 BOOST_FORCEINLINE
623 Op static_transform(const Src& src,Dst& dst,Op op) { return detail::element_recursion<size<Dst>::value>::static_transform(src,dst,op); }
624 //static_transform with two sources
625 template <typename P2,typename P3,typename Dst,typename Op>
626 BOOST_FORCEINLINE
627 Op static_transform(P2& p2,P3& p3,Dst& dst,Op op) { return detail::element_recursion<size<Dst>::value>::static_transform(p2,p3,dst,op); }
628 template <typename P2,typename P3,typename Dst,typename Op>
629 BOOST_FORCEINLINE
630 Op static_transform(P2& p2,const P3& p3,Dst& dst,Op op) { return detail::element_recursion<size<Dst>::value>::static_transform(p2,p3,dst,op); }
631 template <typename P2,typename P3,typename Dst,typename Op>
632 BOOST_FORCEINLINE
633 Op static_transform(const P2& p2,P3& p3,Dst& dst,Op op) { return detail::element_recursion<size<Dst>::value>::static_transform(p2,p3,dst,op); }
634 template <typename P2,typename P3,typename Dst,typename Op>
635 BOOST_FORCEINLINE
636 Op static_transform(const P2& p2,const P3& p3,Dst& dst,Op op) { return detail::element_recursion<size<Dst>::value>::static_transform(p2,p3,dst,op); }
638 
663 
664 //static_for_each with one source
665 template <typename P1,typename Op>
666 BOOST_FORCEINLINE
667 Op static_for_each( P1& p1, Op op) { return detail::element_recursion<size<P1>::value>::static_for_each(p1,op); }
668 template <typename P1,typename Op>
669 BOOST_FORCEINLINE
670 Op static_for_each(const P1& p1, Op op) { return detail::element_recursion<size<P1>::value>::static_for_each(p1,op); }
671 //static_for_each with two sources
672 template <typename P1,typename P2,typename Op>
673 BOOST_FORCEINLINE
674 Op static_for_each(P1& p1, P2& p2, Op op) { return detail::element_recursion<size<P1>::value>::static_for_each(p1,p2,op); }
675 template <typename P1,typename P2,typename Op>
676 BOOST_FORCEINLINE
677 Op static_for_each(P1& p1,const P2& p2, Op op) { return detail::element_recursion<size<P1>::value>::static_for_each(p1,p2,op); }
678 template <typename P1,typename P2,typename Op>
679 BOOST_FORCEINLINE
680 Op static_for_each(const P1& p1, P2& p2, Op op) { return detail::element_recursion<size<P1>::value>::static_for_each(p1,p2,op); }
681 template <typename P1,typename P2,typename Op>
682 BOOST_FORCEINLINE
683 Op static_for_each(const P1& p1,const P2& p2, Op op) { return detail::element_recursion<size<P1>::value>::static_for_each(p1,p2,op); }
684 //static_for_each with three sources
685 template <typename P1,typename P2,typename P3,typename Op>
686 BOOST_FORCEINLINE
687 Op static_for_each(P1& p1,P2& p2,P3& p3,Op op) { return detail::element_recursion<size<P1>::value>::static_for_each(p1,p2,p3,op); }
688 template <typename P1,typename P2,typename P3,typename Op>
689 BOOST_FORCEINLINE
690 Op static_for_each(P1& p1,P2& p2,const P3& p3,Op op) { return detail::element_recursion<size<P1>::value>::static_for_each(p1,p2,p3,op); }
691 template <typename P1,typename P2,typename P3,typename Op>
692 BOOST_FORCEINLINE
693 Op static_for_each(P1& p1,const P2& p2,P3& p3,Op op) { return detail::element_recursion<size<P1>::value>::static_for_each(p1,p2,p3,op); }
694 template <typename P1,typename P2,typename P3,typename Op>
695 BOOST_FORCEINLINE
696 Op static_for_each(P1& p1,const P2& p2,const P3& p3,Op op) { return detail::element_recursion<size<P1>::value>::static_for_each(p1,p2,p3,op); }
697 template <typename P1,typename P2,typename P3,typename Op>
698 BOOST_FORCEINLINE
699 Op static_for_each(const P1& p1,P2& p2,P3& p3,Op op) { return detail::element_recursion<size<P1>::value>::static_for_each(p1,p2,p3,op); }
700 template <typename P1,typename P2,typename P3,typename Op>
701 BOOST_FORCEINLINE
702 Op static_for_each(const P1& p1,P2& p2,const P3& p3,Op op) { return detail::element_recursion<size<P1>::value>::static_for_each(p1,p2,p3,op); }
703 template <typename P1,typename P2,typename P3,typename Op>
704 BOOST_FORCEINLINE
705 Op static_for_each(const P1& p1,const P2& p2,P3& p3,Op op) { return detail::element_recursion<size<P1>::value>::static_for_each(p1,p2,p3,op); }
706 template <typename P1,typename P2,typename P3,typename Op>
707 BOOST_FORCEINLINE
708 Op static_for_each(const P1& p1,const P2& p2,const P3& p3,Op op) { return detail::element_recursion<size<P1>::value>::static_for_each(p1,p2,p3,op); }
710 
711 } } // namespace boost::gil
712 
713 #endif
Specifies the return type of the constant element accessor by color name, get_color(color_base,...
Definition: color_base_algorithm.hpp:185
Specifies the element type of a homogeneous color base.
Definition: color_base_algorithm.hpp:221
Specifies the type of the K-th semantic element of a color base.
Definition: color_base_algorithm.hpp:77
Specifies the return type of the mutable semantic_at_c<K>(color_base);.
Definition: color_base_algorithm.hpp:90
A predicate metafunction determining whether a given color base contains a given color.
Definition: color_base_algorithm.hpp:165
auto semantic_at_c(ColorBase const &p) -> typename kth_semantic_element_const_reference_type< ColorBase, K >::type
A constant accessor to the K-th semantic element of a color base.
Definition: color_base_algorithm.hpp:133
Specifies the return type of the mutable element accessor at_c of a homogeneous color base.
Definition: color_base.hpp:40
Specifies the type of the element associated with a given color tag.
Definition: color_base_algorithm.hpp:175
Specifies the return type of the mutable element accessor by color name, get_color(color_base,...
Definition: color_base_algorithm.hpp:180
Returns an integral constant type specifying the number of elements in a color base.
Definition: color_base_algorithm.hpp:42
Specifies the return type of the constant semantic_at_c<K>(color_base);.
Definition: color_base_algorithm.hpp:104
Returns the index corresponding to the first occurrance of a given given type in.
Definition: utilities.hpp:249
color_element_const_reference_type< ColorBase, Color >::type get_color(const ColorBase &cb, Color=Color())
Constant accessor to the element associated with a given color name.
Definition: color_base_algorithm.hpp:197