2 // Copyright (c) 2000-2002
3 // Joerg Walter, Mathias Koch
5 // Distributed under the Boost Software License, Version 1.0. (See
6 // accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
9 // The authors gratefully acknowledge the support of
10 // GeNeSys mbH & Co. KG in producing this work.
13 #ifndef _BOOST_UBLAS_CONCEPTS_
14 #define _BOOST_UBLAS_CONCEPTS_
16 #include <boost/concept_check.hpp>
18 // Concept checks based on ideas of Jeremy Siek
20 namespace boost { namespace numeric { namespace ublas {
24 struct Indexed1DIteratorConcept {
25 typedef I iterator_type;
28 iterator_type it = iterator_type ();
35 struct IndexedBidirectional1DIteratorConcept {
36 typedef I iterator_type;
39 function_requires< BidirectionalIteratorConcept<iterator_type> >();
40 function_requires< Indexed1DIteratorConcept<iterator_type> >();
45 struct Mutable_IndexedBidirectional1DIteratorConcept {
46 typedef I iterator_type;
49 function_requires< Mutable_BidirectionalIteratorConcept<iterator_type> >();
50 function_requires< Indexed1DIteratorConcept<iterator_type> >();
55 struct IndexedRandomAccess1DIteratorConcept {
56 typedef I iterator_type;
59 function_requires< RandomAccessIteratorConcept<iterator_type> >();
60 function_requires< Indexed1DIteratorConcept<iterator_type> >();
65 struct Mutable_IndexedRandomAccess1DIteratorConcept {
66 typedef I iterator_type;
69 function_requires< Mutable_RandomAccessIteratorConcept<iterator_type> >();
70 function_requires< Indexed1DIteratorConcept<iterator_type> >();
75 struct Indexed2DIteratorConcept {
76 typedef I iterator_type;
77 typedef typename I::dual_iterator_type dual_iterator_type;
78 typedef typename I::dual_reverse_iterator_type dual_reverse_iterator_type;
81 iterator_type it = iterator_type ();
86 dual_iterator_type it_begin (it.begin ());
87 dual_iterator_type it_end (it.end ());
88 // Reverse iterator begin/end
89 dual_reverse_iterator_type it_rbegin (it.rbegin ());
90 dual_reverse_iterator_type it_rend (it.rend ());
91 ignore_unused_variable_warning (it_begin);
92 ignore_unused_variable_warning (it_end);
93 ignore_unused_variable_warning (it_rbegin);
94 ignore_unused_variable_warning (it_rend);
98 template<class I1, class I2>
99 struct IndexedBidirectional2DIteratorConcept {
100 typedef I1 subiterator1_type;
101 typedef I2 subiterator2_type;
103 void constraints () {
104 function_requires< BidirectionalIteratorConcept<subiterator1_type> >();
105 function_requires< BidirectionalIteratorConcept<subiterator2_type> >();
106 function_requires< Indexed2DIteratorConcept<subiterator1_type> >();
107 function_requires< Indexed2DIteratorConcept<subiterator2_type> >();
111 template<class I1, class I2>
112 struct Mutable_IndexedBidirectional2DIteratorConcept {
113 typedef I1 subiterator1_type;
114 typedef I2 subiterator2_type;
116 void constraints () {
117 function_requires< Mutable_BidirectionalIteratorConcept<subiterator1_type> >();
118 function_requires< Mutable_BidirectionalIteratorConcept<subiterator2_type> >();
119 function_requires< Indexed2DIteratorConcept<subiterator1_type> >();
120 function_requires< Indexed2DIteratorConcept<subiterator2_type> >();
124 template<class I1, class I2>
125 struct IndexedRandomAccess2DIteratorConcept {
126 typedef I1 subiterator1_type;
127 typedef I2 subiterator2_type;
129 void constraints () {
130 function_requires< RandomAccessIteratorConcept<subiterator1_type> >();
131 function_requires< RandomAccessIteratorConcept<subiterator2_type> >();
132 function_requires< Indexed2DIteratorConcept<subiterator1_type> >();
133 function_requires< Indexed2DIteratorConcept<subiterator2_type> >();
137 template<class I1, class I2>
138 struct Mutable_IndexedRandomAccess2DIteratorConcept {
139 typedef I1 subiterator1_type;
140 typedef I2 subiterator2_type;
142 void constraints () {
143 function_requires< Mutable_RandomAccessIteratorConcept<subiterator1_type> >();
144 function_requires< Mutable_RandomAccessIteratorConcept<subiterator2_type> >();
145 function_requires< Indexed2DIteratorConcept<subiterator1_type> >();
146 function_requires< Indexed2DIteratorConcept<subiterator2_type> >();
151 struct StorageArrayConcept {
152 typedef C container_type;
153 typedef typename C::size_type size_type;
154 typedef typename C::value_type value_type;
156 void constraints () {
157 function_requires< RandomAccessContainerConcept<container_type> >();
159 // Sizing constructor
160 container_type c = container_type (n);
161 // Initialised sizing constructor
162 container_type (n, value_type (5));
163 ignore_unused_variable_warning (c);
168 struct Mutable_StorageArrayConcept {
169 typedef C container_type;
170 typedef typename C::size_type size_type;
171 typedef typename C::value_type value_type;
172 typedef typename C::iterator iterator_type;
174 void constraints () {
175 function_requires< Mutable_RandomAccessContainerConcept<container_type> > ();
177 // Sizing constructor
178 container_type c = container_type (n);
179 // Initialised sizing constructor
180 c = container_type (n, value_type (3));
182 c.resize (n, value_type (5));
183 // Resize - none preserving
189 struct StorageSparseConcept {
190 typedef C container_type;
191 typedef typename C::size_type size_type;
193 void constraints () {
194 function_requires< ReversibleContainerConcept<container_type> > ();
199 struct Mutable_StorageSparseConcept {
200 typedef C container_type;
201 typedef typename C::size_type size_type;
202 typedef typename C::value_type value_type;
203 typedef typename C::iterator iterator_type;
205 void constraints () {
206 // NOTE - Not Mutable_ReversibleContainerConcept
207 function_requires< ReversibleContainerConcept<container_type> >();
208 container_type c = container_type ();
209 value_type t = value_type ();
210 iterator_type it = iterator_type (), it1 = iterator_type (), it2 = iterator_type ();
223 struct IndexSetConcept {
224 typedef G generator_type;
225 typedef typename G::size_type size_type;
226 typedef typename G::value_type value_type;
228 void constraints () {
229 function_requires< AssignableConcept<generator_type> >();
230 function_requires< ReversibleContainerConcept<generator_type> >();
231 generator_type g = generator_type ();
236 ignore_unused_variable_warning (t);
240 /** \brief Scalar expression concept.
243 * \li \c SE::value_type is the type of the scalar expression
244 * \li \c SE must be convertable to \c SE::value_type
245 * \li the constant \c SE::complexity must exist
247 * \param SE the type of the scalar expression
250 struct ScalarExpressionConcept {
251 typedef SE scalar_expression_type;
252 typedef typename SE::value_type value_type;
254 static const unsigned complexity = SE::complexity;
256 void constraints () {
257 scalar_expression_type *sp;
258 scalar_expression_type s = *sp;
262 ignore_unused_variable_warning (t);
266 /** \brief Vector expression concept.
269 * \li \c VE::value_type is the type of the elements
270 * \li \c VE::const_reference The return type when accessing an element of a constant vector
271 * expression. Must be convertable to a \c value_type.
272 * \li \c VE::size_type is the (unsigned) type of the indices
273 * \li \c VE::difference_type is the (signed) type of distances between indices
274 * \li \c VE::category
276 * \li the constant \c SE::complexity must exist
278 * \param SE the type of the scalar expression
281 struct VectorExpressionConcept {
282 typedef VE vector_expression_type;
283 typedef typename VE::type_category type_category;
284 typedef typename VE::size_type size_type;
285 typedef typename VE::difference_type difference_type;
286 typedef typename VE::value_type value_type;
287 typedef typename VE::const_reference const_reference;
288 typedef typename VE::const_iterator const_iterator_type;
289 typedef typename VE::const_reverse_iterator const_reverse_iterator_type;
291 void constraints () {
292 vector_expression_type *vp;
293 const vector_expression_type *cvp;
294 vector_expression_type v = *vp;
295 const vector_expression_type cv = *cvp;
296 size_type n (0), i (0);
299 const_iterator_type cit (v.find (i));
300 // Beginning of range
301 const_iterator_type cit_begin (v.begin ());
303 const_iterator_type cit_end (v.end ());
306 // Beginning of reverse range
307 const_reverse_iterator_type crit_begin (cv.rbegin ());
308 // End of reverse range
309 const_reverse_iterator_type crit_end (cv.rend ());
312 ignore_unused_variable_warning (n);
313 ignore_unused_variable_warning (cit);
314 ignore_unused_variable_warning (cit_begin);
315 ignore_unused_variable_warning (cit_end);
316 ignore_unused_variable_warning (crit_begin);
317 ignore_unused_variable_warning (crit_end);
318 ignore_unused_variable_warning (t);
323 struct Mutable_VectorExpressionConcept {
324 typedef VE vector_expression_type;
325 typedef typename VE::size_type size_type;
326 typedef typename VE::value_type value_type;
327 typedef typename VE::iterator iterator_type;
328 typedef typename VE::reverse_iterator reverse_iterator_type;
330 void constraints () {
331 function_requires< AssignableConcept<vector_expression_type> >();
332 function_requires< VectorExpressionConcept<vector_expression_type> >();
333 vector_expression_type *vp;
334 vector_expression_type v = *vp, v1 = *vp, v2 = *vp;
336 value_type t = value_type ();
338 iterator_type it (v.find (i));
339 // Beginning of range
340 iterator_type it_begin (v.begin ());
342 iterator_type it_end (v.end ());
345 // Beginning of reverse range
346 reverse_iterator_type rit_begin (v.rbegin ());
347 // End of reverse range
348 reverse_iterator_type rit_end (v.rend ());
355 v2.minus_assign (v1);
357 ignore_unused_variable_warning (it);
358 ignore_unused_variable_warning (it_begin);
359 ignore_unused_variable_warning (it_end);
360 ignore_unused_variable_warning (rit_begin);
361 ignore_unused_variable_warning (rit_end);
366 struct MatrixExpressionConcept {
367 typedef ME matrix_expression_type;
368 typedef typename ME::type_category type_category;
369 typedef typename ME::size_type size_type;
370 typedef typename ME::value_type value_type;
371 typedef typename ME::const_iterator1 const_subiterator1_type;
372 typedef typename ME::const_iterator2 const_subiterator2_type;
373 typedef typename ME::const_reverse_iterator1 const_reverse_subiterator1_type;
374 typedef typename ME::const_reverse_iterator2 const_reverse_subiterator2_type;
376 void constraints () {
377 matrix_expression_type *mp;
378 const matrix_expression_type *cmp;
379 matrix_expression_type m = *mp;
380 const matrix_expression_type cm = *cmp;
381 size_type n (0), i (0), j (0);
384 const_subiterator1_type cit1 (m.find1 (0, i, j));
385 const_subiterator2_type cit2 (m.find2 (0, i, j));
386 // Beginning of range
387 const_subiterator1_type cit1_begin (m.begin1 ());
388 const_subiterator2_type cit2_begin (m.begin2 ());
390 const_subiterator1_type cit1_end (m.end1 ());
391 const_subiterator2_type cit2_end (m.end2 ());
395 // Beginning of reverse range
396 const_reverse_subiterator1_type crit1_begin (cm.rbegin1 ());
397 const_reverse_subiterator2_type crit2_begin (cm.rbegin2 ());
398 // End of reverse range
399 const_reverse_subiterator1_type crit1_end (cm.rend1 ());
400 const_reverse_subiterator2_type crit2_end (cm.rend2 ());
403 ignore_unused_variable_warning (n);
404 ignore_unused_variable_warning (cit1);
405 ignore_unused_variable_warning (cit2);
406 ignore_unused_variable_warning (cit1_begin);
407 ignore_unused_variable_warning (cit2_begin);
408 ignore_unused_variable_warning (cit1_end);
409 ignore_unused_variable_warning (cit2_end);
410 ignore_unused_variable_warning (crit1_begin);
411 ignore_unused_variable_warning (crit2_begin);
412 ignore_unused_variable_warning (crit1_end);
413 ignore_unused_variable_warning (crit2_end);
414 ignore_unused_variable_warning (t);
419 struct Mutable_MatrixExpressionConcept {
420 typedef ME matrix_expression_type;
421 typedef typename ME::size_type size_type;
422 typedef typename ME::value_type value_type;
423 typedef typename ME::iterator1 subiterator1_type;
424 typedef typename ME::iterator2 subiterator2_type;
425 typedef typename ME::reverse_iterator1 reverse_subiterator1_type;
426 typedef typename ME::reverse_iterator2 reverse_subiterator2_type;
428 void constraints () {
429 function_requires< AssignableConcept<matrix_expression_type> >();
430 function_requires< MatrixExpressionConcept<matrix_expression_type> >();
431 matrix_expression_type *mp;
432 matrix_expression_type m = *mp, m1 = *mp, m2 = *mp;
433 size_type i (0), j (0);
434 value_type t = value_type ();
436 subiterator1_type it1 (m.find1 (0, i, j));
437 subiterator2_type it2 (m.find2 (0, i, j));
438 // Beginning of range
439 subiterator1_type it1_begin (m.begin1 ());
440 subiterator2_type it2_begin (m.begin2 ());
442 subiterator1_type it1_end (m.end1 ());
443 subiterator2_type it2_end (m.end2 ());
446 // Beginning of reverse range
447 reverse_subiterator1_type rit1_begin (m.rbegin1 ());
448 reverse_subiterator2_type rit2_begin (m.rbegin2 ());
449 // End of reverse range
450 reverse_subiterator1_type rit1_end (m.rend1 ());
451 reverse_subiterator2_type rit2_end (m.rend2 ());
458 m2.minus_assign (m1);
460 ignore_unused_variable_warning (it1);
461 ignore_unused_variable_warning (it2);
462 ignore_unused_variable_warning (it1_begin);
463 ignore_unused_variable_warning (it2_begin);
464 ignore_unused_variable_warning (it1_end);
465 ignore_unused_variable_warning (it2_end);
466 ignore_unused_variable_warning (rit1_begin);
467 ignore_unused_variable_warning (rit2_begin);
468 ignore_unused_variable_warning (rit1_end);
469 ignore_unused_variable_warning (rit2_end);
474 struct VectorConcept {
475 typedef V vector_type;
476 typedef typename V::size_type size_type;
477 typedef typename V::value_type value_type;
478 typedef const value_type *const_pointer;
480 void constraints () {
481 function_requires< VectorExpressionConcept<vector_type> >();
484 // Sizing constructor
487 const_pointer p = v.find_element (i);
489 ignore_unused_variable_warning (p);
494 struct Mutable_VectorConcept {
495 typedef V vector_type;
496 typedef typename V::size_type size_type;
497 typedef typename V::value_type value_type;
498 typedef value_type *pointer;
500 void constraints () {
501 function_requires< VectorConcept<vector_type> >();
502 function_requires< DefaultConstructible<vector_type> >();
503 function_requires< Mutable_VectorExpressionConcept<vector_type> >();
505 value_type t = value_type ();
509 pointer p = v.find_element (i);
510 // Element assignment
511 value_type r = v.insert_element (i, t);
512 v.insert_element (i, t) = r;
518 ignore_unused_variable_warning (p);
519 ignore_unused_variable_warning (r);
524 struct SparseVectorConcept {
525 typedef V vector_type;
526 typedef typename V::size_type size_type;
528 void constraints () {
529 function_requires< VectorConcept<vector_type> >();
534 struct Mutable_SparseVectorConcept {
535 typedef V vector_type;
536 typedef typename V::size_type size_type;
537 typedef typename V::value_type value_type;
539 void constraints () {
540 function_requires< SparseVectorConcept<vector_type> >();
541 function_requires< Mutable_VectorConcept<vector_type> >();
550 struct MatrixConcept {
551 typedef M matrix_type;
552 typedef typename M::size_type size_type;
553 typedef typename M::value_type value_type;
554 typedef const value_type *const_pointer;
556 void constraints () {
557 function_requires< MatrixExpressionConcept<matrix_type> >();
559 size_type i (0), j (0);
560 // Sizing constructor
561 matrix_type m (n, n);
564 const_pointer p = m.find_element (i, j);
567 ignore_unused_variable_warning (i);
568 ignore_unused_variable_warning (j);
570 ignore_unused_variable_warning (p);
575 struct Mutable_MatrixConcept {
576 typedef M matrix_type;
577 typedef typename M::size_type size_type;
578 typedef typename M::value_type value_type;
579 typedef value_type *pointer;
581 void constraints () {
582 function_requires< MatrixConcept<matrix_type> >();
583 function_requires< DefaultConstructible<matrix_type> >();
584 function_requires< Mutable_MatrixExpressionConcept<matrix_type> >();
586 value_type t = value_type ();
587 size_type i (0), j (0);
591 pointer p = m.find_element (i, j);
592 ignore_unused_variable_warning (i);
593 ignore_unused_variable_warning (j);
598 value_type r = m.insert_element (i, j, t);
599 m.insert_element (i, j, t) = r;
604 m.resize (n, n, false);
606 ignore_unused_variable_warning (p);
607 ignore_unused_variable_warning (r);
612 struct SparseMatrixConcept {
613 typedef M matrix_type;
614 typedef typename M::size_type size_type;
616 void constraints () {
617 function_requires< MatrixConcept<matrix_type> >();
622 struct Mutable_SparseMatrixConcept {
623 typedef M matrix_type;
624 typedef typename M::size_type size_type;
625 typedef typename M::value_type value_type;
627 void constraints () {
628 function_requires< SparseMatrixConcept<matrix_type> >();
629 function_requires< Mutable_MatrixConcept<matrix_type> >();
630 size_type i (0), j (0);
633 m.erase_element (i, j);
637 /** introduce anonymous namespace to make following functions
638 * local to the current compilation unit.
642 // Replaced the ZeroElement and OneElement functions with the templated versions
643 // because the former where giving warnings with clang
647 return static_cast<T> (0);
652 ZeroElement (vector<T>) {
653 return zero_vector<T> ();
658 ZeroElement (matrix<T>) {
659 return zero_matrix<T> ();
665 return static_cast<T> (1);
670 OneElement (matrix<T>) {
671 return identity_matrix<T> ();
675 template<class E1, class E2>
677 operator == (const vector_expression<E1> &e1, const vector_expression<E2> &e2) {
678 typedef typename promote_traits<typename E1::value_type,
679 typename E2::value_type>::promote_type value_type;
680 typedef typename type_traits<value_type>::real_type real_type;
681 return norm_inf (e1 - e2) == real_type/*zero*/();
683 template<class E1, class E2>
685 operator == (const matrix_expression<E1> &e1, const matrix_expression<E2> &e2) {
686 typedef typename promote_traits<typename E1::value_type,
687 typename E2::value_type>::promote_type value_type;
688 typedef typename type_traits<value_type>::real_type real_type;
689 return norm_inf (e1 - e2) == real_type/*zero*/();
693 struct AdditiveAbelianGroupConcept {
694 typedef T value_type;
696 void constraints () {
698 value_type a = value_type (), b = value_type (), c = value_type ();
699 r = (a + b) + c == a + (b + c);
700 r = ZeroElement (value_type ()) + a == a;
701 r = a + ZeroElement (value_type ()) == a;
702 r = a + (- a) == ZeroElement (value_type ());
703 r = (- a) + a == ZeroElement (value_type ());
705 ignore_unused_variable_warning (r);
710 struct MultiplicativeAbelianGroupConcept {
711 typedef T value_type;
713 void constraints () {
715 value_type a = value_type (), b = value_type (), c = value_type ();
716 r = (a * b) * c == a * (b * c);
717 r = OneElement (value_type ()) * a == a;
718 r = a * OneElement (value_type ()) == a;
719 r = a * (OneElement (value_type ()) / a) == a;
720 r = (OneElement (value_type ()) / a) * a == a;
722 ignore_unused_variable_warning (r);
727 struct RingWithIdentityConcept {
728 typedef T value_type;
730 void constraints () {
731 function_requires< AdditiveAbelianGroupConcept<value_type> >();
733 value_type a = value_type (), b = value_type (), c = value_type ();
734 r = (a * b) * c == a * (b * c);
735 r = (a + b) * c == a * c + b * c;
736 r = OneElement (value_type ()) * a == a;
737 r = a * OneElement (value_type ()) == a;
738 ignore_unused_variable_warning (r);
743 struct Prod_RingWithIdentityConcept {
744 typedef T value_type;
746 void constraints () {
747 function_requires< AdditiveAbelianGroupConcept<value_type> >();
749 value_type a = value_type (), b = value_type (), c = value_type ();
750 r = prod (T (prod (a, b)), c) == prod (a, T (prod (b, c)));
751 r = prod (a + b, c) == prod (a, c) + prod (b, c);
752 r = prod (OneElement (value_type ()), a) == a;
753 r = prod (a, OneElement (value_type ())) == a;
754 ignore_unused_variable_warning (r);
759 struct CommutativeRingWithIdentityConcept {
760 typedef T value_type;
762 void constraints () {
763 function_requires< RingWithIdentityConcept<value_type> >();
765 value_type a = value_type (), b = value_type ();
767 ignore_unused_variable_warning (r);
772 struct FieldConcept {
773 typedef T value_type;
775 void constraints () {
776 function_requires< CommutativeRingWithIdentityConcept<value_type> >();
778 value_type a = value_type ();
779 r = a == ZeroElement (value_type ()) || a * (OneElement (value_type ()) / a) == a;
780 r = a == ZeroElement (value_type ()) || (OneElement (value_type ()) / a) * a == a;
781 ignore_unused_variable_warning (r);
785 template<class T, class V>
786 struct VectorSpaceConcept {
787 typedef T value_type;
788 typedef V vector_type;
790 void constraints () {
791 function_requires< FieldConcept<value_type> >();
792 function_requires< AdditiveAbelianGroupConcept<vector_type> >();
794 value_type alpha = value_type (), beta = value_type ();
795 vector_type a = vector_type (), b = vector_type ();
796 r = alpha * (a + b) == alpha * a + alpha * b;
797 r = (alpha + beta) * a == alpha * a + beta * a;
798 r = (alpha * beta) * a == alpha * (beta * a);
799 r = OneElement (value_type ()) * a == a;
800 ignore_unused_variable_warning (r);
804 template<class T, class V, class M>
805 struct LinearOperatorConcept {
806 typedef T value_type;
807 typedef V vector_type;
808 typedef M matrix_type;
810 void constraints () {
811 function_requires< VectorSpaceConcept<value_type, vector_type> >();
813 value_type alpha = value_type (), beta = value_type ();
814 vector_type a = vector_type (), b = vector_type ();
815 matrix_type A = matrix_type ();
816 r = prod (A, alpha * a + beta * b) == alpha * prod (A, a) + beta * prod (A, b);
817 ignore_unused_variable_warning (r);
821 inline void concept_checks () {
823 // Allow tests to be group to keep down compiler storage requirement
825 #define INTERNAL_STORAGE
826 #define INTERNAL_VECTOR
827 #define INTERNAL_MATRIX
828 #define INTERNAL_SPECIAL
829 #define INTERNAL_SPARSE
830 #define INTERNAL_EXPRESSION
833 // TODO enable this for development
834 // #define VIEW_CONCEPTS
836 // Element value type for tests
840 #if defined (INTERNAL_STORAGE) || defined (INTERNAL_STORAGE_DENSE)
842 typedef std::vector<T> container_model;
843 function_requires< Mutable_StorageArrayConcept<container_model> >();
844 function_requires< RandomAccessIteratorConcept<container_model::const_iterator> >();
845 function_requires< Mutable_RandomAccessIteratorConcept<container_model::iterator> >();
849 typedef bounded_array<T, 1> container_model;
850 function_requires< Mutable_StorageArrayConcept<container_model> >();
851 function_requires< RandomAccessIteratorConcept<container_model::const_iterator> >();
852 function_requires< Mutable_RandomAccessIteratorConcept<container_model::iterator> >();
856 typedef unbounded_array<T> container_model;
857 function_requires< Mutable_StorageArrayConcept<container_model> >();
858 function_requires< RandomAccessIteratorConcept<container_model::const_iterator> >();
859 function_requires< Mutable_RandomAccessIteratorConcept<container_model::iterator> >();
862 /* FIXME array_adaptors are in progress
864 typedef array_adaptor<T> container_model;
865 function_requires< Mutable_StorageArrayConcept<container_model> >();
866 function_requires< RandomAccessIteratorConcept<container_model::const_iterator> >();
867 function_requires< Mutable_RandomAccessIteratorConcept<container_model::iterator> >();
872 typedef range container_model;
873 function_requires< IndexSetConcept<range> >();
874 function_requires< RandomAccessIteratorConcept<range::const_iterator> >();
878 typedef slice container_model;
879 function_requires< IndexSetConcept<range> >();
880 function_requires< RandomAccessIteratorConcept<range::const_iterator> >();
884 typedef indirect_array<> container_model;
885 function_requires< IndexSetConcept<range> >();
886 function_requires< RandomAccessIteratorConcept<range::const_iterator> >();
891 #if defined (INTERNAL_STORAGE) || defined (INTERNAL_STORAGE_SPARSE)
893 typedef map_array<std::size_t, T> container_model;
894 function_requires< Mutable_StorageSparseConcept<container_model> >();
895 function_requires< RandomAccessIteratorConcept<container_model::const_iterator> >();
896 function_requires< RandomAccessIteratorConcept<container_model::iterator> >();
900 typedef std::map<std::size_t, T> container_model;
901 function_requires< Mutable_StorageSparseConcept<container_model > >();
902 function_requires< BidirectionalIteratorConcept<container_model::const_iterator> >();
903 function_requires< BidirectionalIteratorConcept<container_model::iterator> >();
910 typedef vector_view<T> container_model;
911 function_requires< RandomAccessContainerConcept<container_model> >();
912 function_requires< VectorConcept<container_model> >();
913 function_requires< IndexedRandomAccess1DIteratorConcept<container_model::const_iterator> >();
914 function_requires< IndexedRandomAccess1DIteratorConcept<container_model::const_reverse_iterator> >();
919 #if defined (INTERNAL_VECTOR) || defined (INTERNAL_VECTOR_DENSE)
921 typedef vector<T> container_model;
922 function_requires< RandomAccessContainerConcept<container_model> >();
923 function_requires< Mutable_VectorConcept<container_model> >();
924 function_requires< IndexedRandomAccess1DIteratorConcept<container_model::const_iterator> >();
925 function_requires< Mutable_IndexedRandomAccess1DIteratorConcept<container_model::iterator> >();
926 function_requires< IndexedRandomAccess1DIteratorConcept<container_model::const_reverse_iterator> >();
927 function_requires< Mutable_IndexedRandomAccess1DIteratorConcept<container_model::reverse_iterator> >();
931 typedef zero_vector<T> container_model;
932 function_requires< VectorConcept<container_model> >();
933 function_requires< IndexedBidirectional1DIteratorConcept<container_model::const_iterator> >();
934 function_requires< IndexedBidirectional1DIteratorConcept<container_model::const_reverse_iterator> >();
938 typedef unit_vector<T> container_model;
939 function_requires< VectorConcept<container_model> >();
940 function_requires< IndexedBidirectional1DIteratorConcept<container_model::const_iterator> >();
941 function_requires< IndexedBidirectional1DIteratorConcept<container_model::const_reverse_iterator> >();
945 typedef scalar_vector<T> container_model;
946 function_requires< VectorConcept<container_model> >();
947 function_requires< IndexedRandomAccess1DIteratorConcept<container_model::const_iterator> >();
948 function_requires< IndexedRandomAccess1DIteratorConcept<container_model::const_reverse_iterator> >();
952 typedef c_vector<T, 1> container_model;
953 function_requires< Mutable_VectorConcept<container_model> >();
954 function_requires< IndexedRandomAccess1DIteratorConcept<container_model::const_iterator> >();
955 function_requires< Mutable_IndexedRandomAccess1DIteratorConcept<container_model::iterator> >();
956 function_requires< IndexedRandomAccess1DIteratorConcept<container_model::const_reverse_iterator> >();
957 function_requires< Mutable_IndexedRandomAccess1DIteratorConcept<container_model::reverse_iterator> >();
962 #if defined (INTERNAL_VECTOR) || defined (INTERNAL_VECTOR_PROXY)
964 typedef vector_range<vector<T> > container_model;
965 function_requires< Mutable_VectorExpressionConcept<container_model> >();
966 function_requires< IndexedRandomAccess1DIteratorConcept<container_model::const_iterator> >();
967 function_requires< Mutable_IndexedRandomAccess1DIteratorConcept<container_model::iterator> >();
968 function_requires< IndexedRandomAccess1DIteratorConcept<container_model::const_reverse_iterator> >();
969 function_requires< Mutable_IndexedRandomAccess1DIteratorConcept<container_model::reverse_iterator> >();
973 typedef vector_slice<vector<T> > container_model;
974 function_requires< Mutable_VectorExpressionConcept<container_model> >();
975 function_requires< IndexedRandomAccess1DIteratorConcept<container_model::const_iterator> >();
976 function_requires< Mutable_IndexedRandomAccess1DIteratorConcept<container_model::iterator> >();
977 function_requires< IndexedRandomAccess1DIteratorConcept<container_model::const_reverse_iterator> >();
978 function_requires< Mutable_IndexedRandomAccess1DIteratorConcept<container_model::reverse_iterator> >();
982 typedef vector_indirect<vector<T> > container_model;
983 function_requires< Mutable_VectorExpressionConcept<container_model> >();
984 function_requires< IndexedRandomAccess1DIteratorConcept<container_model::const_iterator> >();
985 function_requires< Mutable_IndexedRandomAccess1DIteratorConcept<container_model::iterator> >();
986 function_requires< IndexedRandomAccess1DIteratorConcept<container_model::const_reverse_iterator> >();
987 function_requires< Mutable_IndexedRandomAccess1DIteratorConcept<container_model::reverse_iterator> >();
992 #if defined (INTERNAL_SPARSE) || defined (INTERNAL_VECTOR_SPARSE)
994 typedef mapped_vector<T> container_model;
995 function_requires< Mutable_SparseVectorConcept<container_model> >();
996 function_requires< IndexedBidirectional1DIteratorConcept<container_model::const_iterator> >();
997 function_requires< Mutable_IndexedBidirectional1DIteratorConcept<container_model::iterator> >();
998 function_requires< IndexedBidirectional1DIteratorConcept<container_model::const_reverse_iterator> >();
999 function_requires< Mutable_IndexedBidirectional1DIteratorConcept<container_model::reverse_iterator> >();
1003 typedef compressed_vector<T> container_model;
1004 function_requires< Mutable_SparseVectorConcept<container_model> >();
1005 function_requires< IndexedBidirectional1DIteratorConcept<container_model::const_iterator> >();
1006 function_requires< Mutable_IndexedBidirectional1DIteratorConcept<container_model::iterator> >();
1007 function_requires< IndexedBidirectional1DIteratorConcept<container_model::const_reverse_iterator> >();
1008 function_requires< Mutable_IndexedBidirectional1DIteratorConcept<container_model::reverse_iterator> >();
1012 typedef coordinate_vector<T> container_model;
1013 function_requires< Mutable_SparseVectorConcept<container_model> >();
1014 function_requires< IndexedBidirectional1DIteratorConcept<container_model::const_iterator> >();
1015 function_requires< Mutable_IndexedBidirectional1DIteratorConcept<container_model::iterator> >();
1016 function_requires< IndexedBidirectional1DIteratorConcept<container_model::const_reverse_iterator> >();
1017 function_requires< Mutable_IndexedBidirectional1DIteratorConcept<container_model::reverse_iterator> >();
1022 #if defined (INTERNAL_MATRIX) || defined (INTERNAL_MATRIX_DENSE)
1024 typedef matrix<T> container_model;
1025 function_requires< Mutable_MatrixConcept<matrix<T> > >();
1026 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_iterator1, container_model::const_iterator2> >();
1027 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<container_model::iterator1, container_model::iterator2> >();
1028 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_reverse_iterator1, container_model::const_reverse_iterator2> >();
1029 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<container_model::reverse_iterator1, container_model::reverse_iterator2> >();
1033 typedef vector_of_vector<T> container_model;
1034 function_requires< Mutable_MatrixConcept<matrix<T> > >();
1035 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_iterator1, container_model::const_iterator2> >();
1036 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<container_model::iterator1, container_model::iterator2> >();
1037 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_reverse_iterator1, container_model::const_reverse_iterator2> >();
1038 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<container_model::reverse_iterator1, container_model::reverse_iterator2> >();
1042 typedef zero_matrix<T> container_model;
1043 function_requires< Mutable_MatrixConcept<matrix<T> > >();
1044 function_requires< IndexedBidirectional2DIteratorConcept<container_model::const_iterator1, container_model::const_iterator2> >();
1045 function_requires< IndexedBidirectional2DIteratorConcept<container_model::const_reverse_iterator1, container_model::const_reverse_iterator2> >();
1049 typedef identity_matrix<T> container_model;
1050 function_requires< Mutable_MatrixConcept<matrix<T> > >();
1051 function_requires< IndexedBidirectional2DIteratorConcept<container_model::const_iterator1, container_model::const_iterator2> >();
1052 function_requires< IndexedBidirectional2DIteratorConcept<container_model::const_reverse_iterator1, container_model::const_reverse_iterator2> >();
1056 typedef scalar_matrix<T> container_model;
1057 function_requires< Mutable_MatrixConcept<matrix<T> > >();
1058 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_iterator1, container_model::const_iterator2> >();
1059 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_reverse_iterator1, container_model::const_reverse_iterator2> >();
1063 typedef c_matrix<T, 1, 1> container_model;
1064 function_requires< Mutable_MatrixConcept<matrix<T> > >();
1065 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_iterator1, container_model::const_iterator2> >();
1066 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<container_model::iterator1, container_model::iterator2> >();
1067 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_reverse_iterator1, container_model::const_reverse_iterator2> >();
1068 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<container_model::reverse_iterator1, container_model::reverse_iterator2> >();
1073 #if defined (INTERNAL_MATRIX) || defined (INTERNAL_MATRIX_PROXY)
1075 typedef matrix_row<matrix<T> > container_model;
1076 function_requires< Mutable_VectorExpressionConcept<container_model> >();
1077 function_requires< IndexedRandomAccess1DIteratorConcept<container_model::const_iterator> >();
1078 function_requires< Mutable_IndexedRandomAccess1DIteratorConcept<container_model::iterator> >();
1079 function_requires< IndexedRandomAccess1DIteratorConcept<container_model::const_reverse_iterator> >();
1080 function_requires< Mutable_IndexedRandomAccess1DIteratorConcept<container_model::reverse_iterator> >();
1084 typedef matrix_column<matrix<T> > container_model;
1085 function_requires< Mutable_VectorExpressionConcept<container_model> >();
1086 function_requires< IndexedRandomAccess1DIteratorConcept<container_model::const_iterator> >();
1087 function_requires< Mutable_IndexedRandomAccess1DIteratorConcept<container_model::iterator> >();
1088 function_requires< IndexedRandomAccess1DIteratorConcept<container_model::const_reverse_iterator> >();
1089 function_requires< Mutable_IndexedRandomAccess1DIteratorConcept<container_model::reverse_iterator> >();
1093 typedef matrix_vector_range<matrix<T> > container_model;
1094 function_requires< Mutable_VectorExpressionConcept<container_model> >();
1095 function_requires< IndexedRandomAccess1DIteratorConcept<container_model::const_iterator> >();
1096 function_requires< Mutable_IndexedRandomAccess1DIteratorConcept<container_model::iterator> >();
1097 function_requires< IndexedRandomAccess1DIteratorConcept<container_model::const_reverse_iterator> >();
1098 function_requires< Mutable_IndexedRandomAccess1DIteratorConcept<container_model::reverse_iterator> >();
1102 typedef matrix_vector_slice<matrix<T> > container_model;
1103 function_requires< Mutable_VectorExpressionConcept<container_model> >();
1104 function_requires< IndexedRandomAccess1DIteratorConcept<container_model::const_iterator> >();
1105 function_requires< Mutable_IndexedRandomAccess1DIteratorConcept<container_model::iterator> >();
1106 function_requires< IndexedRandomAccess1DIteratorConcept<container_model::const_reverse_iterator> >();
1107 function_requires< Mutable_IndexedRandomAccess1DIteratorConcept<container_model::reverse_iterator> >();
1111 typedef matrix_vector_indirect<matrix<T> > container_model;
1112 function_requires< Mutable_VectorExpressionConcept<container_model> >();
1113 function_requires< IndexedRandomAccess1DIteratorConcept<container_model::const_iterator> >();
1114 function_requires< Mutable_IndexedRandomAccess1DIteratorConcept<container_model::iterator> >();
1115 function_requires< IndexedRandomAccess1DIteratorConcept<container_model::const_reverse_iterator> >();
1116 function_requires< Mutable_IndexedRandomAccess1DIteratorConcept<container_model::reverse_iterator> >();
1120 typedef matrix_range<matrix<T> > container_model;
1121 function_requires< Mutable_MatrixExpressionConcept<container_model> >();
1122 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_iterator1, container_model::const_iterator2> >();
1123 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<container_model::iterator1, container_model::iterator2> >();
1124 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_reverse_iterator1, container_model::const_reverse_iterator2> >();
1125 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<container_model::reverse_iterator1, container_model::reverse_iterator2> >();
1129 typedef matrix_slice<matrix<T> > container_model;
1130 function_requires< Mutable_MatrixExpressionConcept<container_model> >();
1131 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_iterator1, container_model::const_iterator2> >();
1132 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<container_model::iterator1, container_model::iterator2> >();
1133 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_reverse_iterator1, container_model::const_reverse_iterator2> >();
1134 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<container_model::reverse_iterator1, container_model::reverse_iterator2> >();
1138 typedef matrix_indirect<matrix<T> > container_model;
1139 function_requires< Mutable_MatrixExpressionConcept<container_model> >();
1140 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_iterator1, container_model::const_iterator2> >();
1141 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<container_model::iterator1, container_model::iterator2> >();
1142 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_reverse_iterator1, container_model::const_reverse_iterator2> >();
1143 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<container_model::reverse_iterator1, container_model::reverse_iterator2> >();
1148 #if defined (INTERNAL_SPECIAL) || defined (INTERNAL_BANDED)
1150 typedef banded_matrix<T> container_model;
1151 function_requires< Mutable_MatrixConcept<container_model> >();
1152 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_iterator1, container_model::const_iterator2> >();
1153 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<container_model::iterator1, container_model::iterator2> >();
1154 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_reverse_iterator1, container_model::const_reverse_iterator2> >();
1155 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<container_model::reverse_iterator1, container_model::reverse_iterator2> >();
1159 typedef banded_adaptor<matrix<T> > container_model;
1160 function_requires< Mutable_MatrixExpressionConcept<container_model> >();
1161 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_iterator1, container_model::const_iterator2> >();
1162 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<container_model::iterator1, container_model::iterator2> >();
1163 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_reverse_iterator1, container_model::const_reverse_iterator2> >();
1164 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<container_model::reverse_iterator1, container_model::reverse_iterator2> >();
1168 // Triangular Matrix
1169 #if defined (INTERNAL_SPECIAL) || defined (INTERNAL_TRIANGULAR)
1171 typedef triangular_matrix<T> container_model;
1172 function_requires< Mutable_MatrixConcept<container_model> >();
1173 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_iterator1, container_model::const_iterator2> >();
1174 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<container_model::iterator1, container_model::iterator2> >();
1175 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_reverse_iterator1, container_model::const_reverse_iterator2> >();
1176 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<container_model::reverse_iterator1, container_model::reverse_iterator2> >();
1180 typedef triangular_adaptor<matrix<T> > container_model;
1181 function_requires< Mutable_MatrixExpressionConcept<container_model> >();
1182 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_iterator1, container_model::const_iterator2> >();
1183 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<container_model::iterator1, container_model::iterator2> >();
1184 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_reverse_iterator1, container_model::const_reverse_iterator2> >();
1185 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<container_model::reverse_iterator1, container_model::reverse_iterator2> >();
1190 #if defined (INTERNA_SPECIAL) || defined (INTERNAL_SYMMETRIC)
1192 typedef symmetric_matrix<T> container_model;
1193 function_requires< Mutable_MatrixConcept<container_model> >();
1194 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_iterator1, container_model::const_iterator2> >();
1195 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<container_model::iterator1, container_model::iterator2> >();
1196 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_reverse_iterator1, container_model::const_reverse_iterator2> >();
1197 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<container_model::reverse_iterator1, container_model::reverse_iterator2> >();
1201 typedef banded_adaptor<matrix<T> > container_model;
1203 // const_iterator (iterator) constructor is bad
1204 function_requires< Mutable_MatrixExpressionConcept<container_model> >();
1206 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_iterator1, container_model::const_iterator2> >();
1207 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<container_model::iterator1, container_model::iterator2> >();
1208 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_reverse_iterator1, container_model::const_reverse_iterator2> >();
1209 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<container_model::reverse_iterator1, container_model::reverse_iterator2> >();
1214 #if defined (INTERNAL_SPECIAL) || defined (INTERNAL_HERMITIAN)
1216 typedef hermitian_matrix<T> container_model;
1217 function_requires< Mutable_MatrixConcept<container_model> >();
1218 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_iterator1, container_model::const_iterator2> >();
1219 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<container_model::iterator1, container_model::iterator2> >();
1220 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_reverse_iterator1, container_model::const_reverse_iterator2> >();
1221 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<container_model::reverse_iterator1, container_model::reverse_iterator2> >();
1225 typedef hermitian_adaptor<matrix<T> > container_model;
1227 // const_iterator (iterator) constructor is bad
1228 function_requires< Mutable_MatrixExpressionConcept<container_model> >();
1230 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_iterator1, container_model::const_iterator2> >();
1231 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<container_model::iterator1, container_model::iterator2> >();
1232 function_requires< IndexedRandomAccess2DIteratorConcept<container_model::const_reverse_iterator1, container_model::const_reverse_iterator2> >();
1233 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<container_model::reverse_iterator1, container_model::reverse_iterator2> >();
1238 #if defined (INTERNAL_SPARSE) || defined (INTERNAL_MATRIX_SPARSE)
1240 typedef mapped_matrix<T> container_model;
1241 function_requires< Mutable_SparseMatrixConcept<container_model> >();
1242 function_requires< IndexedBidirectional2DIteratorConcept<container_model::const_iterator1, container_model::const_iterator2> >();
1243 function_requires< Mutable_IndexedBidirectional2DIteratorConcept<container_model::iterator1, container_model::iterator2> >();
1244 function_requires< IndexedBidirectional2DIteratorConcept<container_model::const_reverse_iterator1, container_model::const_reverse_iterator2> >();
1245 function_requires< Mutable_IndexedBidirectional2DIteratorConcept<container_model::reverse_iterator1, container_model::reverse_iterator2> >();
1248 typedef mapped_vector_of_mapped_vector<T> container_model;
1249 function_requires< Mutable_SparseMatrixConcept<container_model> >();
1250 function_requires< IndexedBidirectional2DIteratorConcept<container_model::const_iterator1, container_model::const_iterator2> >();
1251 function_requires< Mutable_IndexedBidirectional2DIteratorConcept<container_model::iterator1, container_model::iterator2> >();
1252 function_requires< IndexedBidirectional2DIteratorConcept<container_model::const_reverse_iterator1, container_model::const_reverse_iterator2> >();
1253 function_requires< Mutable_IndexedBidirectional2DIteratorConcept<container_model::reverse_iterator1, container_model::reverse_iterator2> >();
1256 typedef compressed_matrix<T> container_model;
1257 function_requires< Mutable_SparseMatrixConcept<container_model> >();
1258 function_requires< IndexedBidirectional2DIteratorConcept<container_model::const_iterator1, container_model::const_iterator2> >();
1259 function_requires< Mutable_IndexedBidirectional2DIteratorConcept<container_model::iterator1, container_model::iterator2> >();
1260 function_requires< IndexedBidirectional2DIteratorConcept<container_model::const_reverse_iterator1, container_model::const_reverse_iterator2> >();
1261 function_requires< Mutable_IndexedBidirectional2DIteratorConcept<container_model::reverse_iterator1, container_model::reverse_iterator2> >();
1264 typedef coordinate_matrix<T> container_model;
1265 function_requires< Mutable_SparseMatrixConcept<container_model> >();
1266 function_requires< IndexedBidirectional2DIteratorConcept<container_model::const_iterator1, container_model::const_iterator2> >();
1267 function_requires< Mutable_IndexedBidirectional2DIteratorConcept<container_model::iterator1, container_model::iterator2> >();
1268 function_requires< IndexedBidirectional2DIteratorConcept<container_model::const_reverse_iterator1, container_model::const_reverse_iterator2> >();
1269 function_requires< Mutable_IndexedBidirectional2DIteratorConcept<container_model::reverse_iterator1, container_model::reverse_iterator2> >();
1272 typedef generalized_vector_of_vector<T, row_major, vector< coordinate_vector<T> > > container_model;
1273 function_requires< Mutable_SparseMatrixConcept<container_model> >();
1274 function_requires< IndexedBidirectional2DIteratorConcept<container_model::const_iterator1, container_model::const_iterator2> >();
1275 function_requires< Mutable_IndexedBidirectional2DIteratorConcept<container_model::iterator1, container_model::iterator2> >();
1276 function_requires< IndexedBidirectional2DIteratorConcept<container_model::const_reverse_iterator1, container_model::const_reverse_iterator2> >();
1277 function_requires< Mutable_IndexedBidirectional2DIteratorConcept<container_model::reverse_iterator1, container_model::reverse_iterator2> >();
1282 // Scalar Expressions
1283 #if defined (INTERNAL_EXPRESSION) || defined (INTERNAL_VECTOR_EXPRESSION)
1284 function_requires< ScalarExpressionConcept<scalar_value<T> > >();
1285 function_requires< ScalarExpressionConcept<scalar_reference<T> > >();
1287 // Vector Expressions
1289 typedef vector_reference<vector<T> > expression_model;
1290 function_requires< VectorExpressionConcept<expression_model> >();
1291 function_requires< Mutable_VectorExpressionConcept<expression_model> >();
1292 function_requires< IndexedRandomAccess1DIteratorConcept<expression_model::const_iterator> >();
1293 function_requires< Mutable_IndexedRandomAccess1DIteratorConcept<expression_model::iterator> >();
1294 function_requires< IndexedRandomAccess1DIteratorConcept<expression_model::const_reverse_iterator> >();
1295 function_requires< Mutable_IndexedRandomAccess1DIteratorConcept<expression_model::reverse_iterator> >();
1299 typedef vector_unary<vector<T>, scalar_identity<T> > expression_model;
1300 function_requires< VectorExpressionConcept<expression_model> >();
1301 function_requires< IndexedRandomAccess1DIteratorConcept<expression_model::const_iterator> >();
1302 function_requires< IndexedRandomAccess1DIteratorConcept<expression_model::const_reverse_iterator> >();
1306 typedef vector_binary<vector<T>, vector<T>, scalar_plus<T, T> > expression_model;
1307 function_requires< VectorExpressionConcept<expression_model> >();
1308 function_requires< IndexedRandomAccess1DIteratorConcept<expression_model::const_iterator> >();
1309 function_requires< IndexedRandomAccess1DIteratorConcept<expression_model::const_reverse_iterator> >();
1313 typedef vector_binary_scalar1<T, vector<T>, scalar_multiplies<T, T> > expression_model;
1314 function_requires< VectorExpressionConcept<expression_model> >();
1315 function_requires< IndexedRandomAccess1DIteratorConcept<expression_model::const_iterator> >();
1316 function_requires< IndexedRandomAccess1DIteratorConcept<expression_model::const_reverse_iterator> >();
1320 typedef vector_binary_scalar2<vector<T>, scalar_value<T>, scalar_multiplies<T, T> > expression_model;
1321 function_requires< VectorExpressionConcept<expression_model> >();
1322 function_requires< IndexedRandomAccess1DIteratorConcept<expression_model::const_iterator> >();
1323 function_requires< IndexedRandomAccess1DIteratorConcept<expression_model::const_reverse_iterator> >();
1327 typedef vector_binary_scalar1<scalar_value<T>, vector<T>, scalar_multiplies<T, T> > expression_model;
1328 function_requires< VectorExpressionConcept<expression_model> >();
1329 function_requires< IndexedRandomAccess1DIteratorConcept<expression_model::const_iterator> >();
1330 function_requires< IndexedRandomAccess1DIteratorConcept<expression_model::const_reverse_iterator> >();
1334 typedef vector_binary_scalar2<vector<T>, scalar_value<T>, scalar_multiplies<T, T> > expression_model;
1335 function_requires< VectorExpressionConcept<expression_model> >();
1336 function_requires< IndexedRandomAccess1DIteratorConcept<expression_model::const_iterator> >();
1337 function_requires< IndexedRandomAccess1DIteratorConcept<expression_model::const_reverse_iterator> >();
1340 function_requires< ScalarExpressionConcept<vector_scalar_unary<vector<T>, vector_sum<vector<T> > > > >();
1341 function_requires< ScalarExpressionConcept<vector_scalar_unary<vector<T>, vector_norm_1<vector<T> > > > >();
1342 function_requires< ScalarExpressionConcept<vector_scalar_unary<vector<T>, vector_norm_2<vector<T> > > > >();
1343 function_requires< ScalarExpressionConcept<vector_scalar_unary<vector<T>, vector_norm_inf<vector<T> > > > >();
1345 function_requires< ScalarExpressionConcept<vector_scalar_binary<vector<T>, vector<T>, vector_inner_prod<vector<T>, vector<T>, T> > > >();
1348 // Matrix Expressions
1349 #if defined (INTERNAL_EXPRESSION) || defined (INTERNAL_MATRIX_EXPRESSION)
1351 typedef matrix_reference<matrix<T> > expression_model;
1352 function_requires< MatrixExpressionConcept<expression_model> >();
1353 function_requires< Mutable_MatrixExpressionConcept<expression_model> >();
1354 function_requires< IndexedRandomAccess2DIteratorConcept<expression_model::const_iterator1, expression_model::const_iterator2> >();
1355 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<expression_model::iterator1, expression_model::iterator2> >();
1356 function_requires< IndexedRandomAccess2DIteratorConcept<expression_model::const_reverse_iterator1, expression_model::const_reverse_iterator2> >();
1357 function_requires< Mutable_IndexedRandomAccess2DIteratorConcept<expression_model::reverse_iterator1, expression_model::reverse_iterator2> >();
1361 typedef vector_matrix_binary<vector<T>, vector<T>, scalar_multiplies<T, T> > expression_model;
1362 function_requires< MatrixExpressionConcept<expression_model> >();
1363 function_requires< IndexedRandomAccess2DIteratorConcept<expression_model::const_iterator1, expression_model::const_iterator2> >();
1364 function_requires< IndexedRandomAccess2DIteratorConcept<expression_model::const_reverse_iterator1, expression_model::const_reverse_iterator2> >();
1368 typedef matrix_unary1<matrix<T>, scalar_identity<T> > expression_model;
1369 function_requires< MatrixExpressionConcept<expression_model> >();
1370 function_requires< IndexedRandomAccess2DIteratorConcept<expression_model::const_iterator1, expression_model::const_iterator2> >();
1371 function_requires< IndexedRandomAccess2DIteratorConcept<expression_model::const_reverse_iterator1, expression_model::const_reverse_iterator2> >();
1375 typedef matrix_unary2<matrix<T>, scalar_identity<T> > expression_model;
1376 function_requires< MatrixExpressionConcept<expression_model> >();
1377 function_requires< IndexedRandomAccess2DIteratorConcept<expression_model::const_iterator1, expression_model::const_iterator2> >();
1378 function_requires< IndexedRandomAccess2DIteratorConcept<expression_model::const_reverse_iterator1, expression_model::const_reverse_iterator2> >();
1382 typedef matrix_binary<matrix<T>, matrix<T>, scalar_plus<T, T> > expression_model;
1383 function_requires< MatrixExpressionConcept<expression_model> >();
1384 function_requires< IndexedRandomAccess2DIteratorConcept<expression_model::const_iterator1, expression_model::const_iterator2> >();
1385 function_requires< IndexedRandomAccess2DIteratorConcept<expression_model::const_reverse_iterator1, expression_model::const_reverse_iterator2> >();
1389 typedef matrix_binary_scalar1<T, matrix<T>, scalar_multiplies<T, T> > expression_model;
1390 function_requires< MatrixExpressionConcept<expression_model> >();
1391 function_requires< IndexedRandomAccess2DIteratorConcept<expression_model::const_iterator1, expression_model::const_iterator2> >();
1392 function_requires< IndexedRandomAccess2DIteratorConcept<expression_model::const_reverse_iterator1, expression_model::const_reverse_iterator2> >();
1396 typedef matrix_binary_scalar2<matrix<T>, T, scalar_multiplies<T, T> > expression_model;
1397 function_requires< MatrixExpressionConcept<expression_model> >();
1398 function_requires< IndexedRandomAccess2DIteratorConcept<expression_model::const_iterator1, expression_model::const_iterator2> >();
1399 function_requires< IndexedRandomAccess2DIteratorConcept<expression_model::const_reverse_iterator1, expression_model::const_reverse_iterator2> >();
1403 typedef matrix_binary_scalar1<scalar_value<T>, matrix<T>, scalar_multiplies<T, T> > expression_model;
1404 function_requires< MatrixExpressionConcept<expression_model> >();
1405 function_requires< IndexedRandomAccess2DIteratorConcept<expression_model::const_iterator1, expression_model::const_iterator2> >();
1406 function_requires< IndexedRandomAccess2DIteratorConcept<expression_model::const_reverse_iterator1, expression_model::const_reverse_iterator2> >();
1410 typedef matrix_binary_scalar2<matrix<T>, scalar_value<T>, scalar_multiplies<T, T> > expression_model;
1411 function_requires< MatrixExpressionConcept<expression_model> >();
1412 function_requires< IndexedRandomAccess2DIteratorConcept<expression_model::const_iterator1, expression_model::const_iterator2> >();
1413 function_requires< IndexedRandomAccess2DIteratorConcept<expression_model::const_reverse_iterator1, expression_model::const_reverse_iterator2> >();
1417 typedef matrix_vector_binary1<matrix<T>, vector<T>, matrix_vector_prod1<matrix<T>, vector<T>, T> > expression_model;
1418 function_requires< VectorExpressionConcept<expression_model> >();
1419 function_requires< IndexedRandomAccess1DIteratorConcept<expression_model::const_iterator> >();
1420 function_requires< IndexedRandomAccess1DIteratorConcept<expression_model::const_reverse_iterator> >();
1424 typedef matrix_vector_binary2<vector<T>, matrix<T>, matrix_vector_prod2<matrix<T>, vector<T>, T > > expression_model;
1425 function_requires< VectorExpressionConcept<expression_model> >();
1426 function_requires< IndexedRandomAccess1DIteratorConcept<expression_model::const_iterator> >();
1427 function_requires< IndexedRandomAccess1DIteratorConcept<expression_model::const_reverse_iterator> >();
1431 typedef matrix_matrix_binary<matrix<T>, matrix<T>, matrix_matrix_prod<matrix<T>, matrix<T>, T > > expression_model;
1432 function_requires< MatrixExpressionConcept<expression_model> >();
1433 function_requires< IndexedRandomAccess2DIteratorConcept<expression_model::const_iterator1, expression_model::const_iterator2> >();
1434 function_requires< IndexedRandomAccess2DIteratorConcept<expression_model::const_reverse_iterator1, expression_model::const_reverse_iterator2> >();
1437 function_requires< ScalarExpressionConcept<matrix_scalar_unary<matrix<T>, matrix_norm_1<vector<T> > > > >();
1438 function_requires< ScalarExpressionConcept<matrix_scalar_unary<matrix<T>, matrix_norm_frobenius<vector<T> > > > >();
1439 function_requires< ScalarExpressionConcept<matrix_scalar_unary<matrix<T>, matrix_norm_inf<vector<T> > > > >();
1443 function_requires< AdditiveAbelianGroupConcept<T> >();
1444 function_requires< CommutativeRingWithIdentityConcept<T> >();
1445 function_requires< FieldConcept<T> >();
1446 function_requires< VectorSpaceConcept<T, vector<T> > >();
1447 function_requires< Prod_RingWithIdentityConcept<matrix<T> > >();
1448 function_requires< VectorSpaceConcept<T, matrix<T> > >();
1449 function_requires< LinearOperatorConcept<T, vector<T>, matrix<T> > >();
1451 function_requires< AdditiveAbelianGroupConcept<std::complex<T> > >();
1452 function_requires< CommutativeRingWithIdentityConcept<std::complex<T> > >();
1453 function_requires< FieldConcept<std::complex<T> > >();
1454 function_requires< VectorSpaceConcept<std::complex<T>, vector<std::complex<T> > > >();
1455 function_requires< Prod_RingWithIdentityConcept<matrix<std::complex<T> > > >();
1456 function_requires< VectorSpaceConcept<std::complex<T>, matrix<std::complex<T> > > >();
1457 function_requires< LinearOperatorConcept<std::complex<T>, vector<std::complex<T> >, matrix<std::complex<T> > > >();
1461 } // end of anonymous namespace