00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef MTL_COLLECTION_INCLUDE
00013 #define MTL_COLLECTION_INCLUDE
00014
00015 #include <boost/type_traits.hpp>
00016 #include <boost/numeric/mtl/mtl_fwd.hpp>
00017 #include <vector>
00018
00019 #ifdef __GXX_CONCEPTS__
00020 # include <concepts>
00021 #else
00022 # include <boost/numeric/linear_algebra/pseudo_concept.hpp>
00023 #endif
00024
00025 namespace mtl {
00026
00031 #ifdef __GXX_CONCEPTS__
00032 auto concept Collection<typename T>
00033 {
00034 typename value_type;
00035 typename const_reference;
00036 typename size_type;
00037 };
00038 #else
00039
00040 template <typename T>
00041 struct Collection
00042 {
00044 typedef associated_type value_type;
00045
00047 typedef associated_type const_reference;
00048
00050 typedef associated_type size_type;
00051 };
00052 #endif
00053
00054
00055 #ifdef __GXX_CONCEPTS__
00056 auto concept MutableCollection<typename T>
00057 : Collection<T>
00058 {
00059 typename reference;
00060 }
00061 #else
00062
00063 template <typename T>
00064 struct MutableCollection
00065 : public Collection<T>
00066 {
00068 typedef associated_type reference;
00069 };
00070 #endif
00071
00072
00073 #ifdef __GXX_CONCEPTS__
00074 concept ConstantSizeCollection<typename T>
00075 : Collection<T>
00076 {};
00077 #else
00078
00079
00080
00081
00082
00083 template <typename T>
00084 struct ConstantSizeCollection
00085 : Collection<T>
00086 {};
00087 #endif
00088
00089
00090 #ifdef __GXX_CONCEPTS__
00091 auto concept AlgebraicCollection<typename T>
00092 : Collection<T>
00093 {
00094 size_type num_rows(T);
00095 size_type num_cols(T);
00096 size_type size(T);
00097 };
00098 #else
00099
00100
00114 template <typename T>
00115 struct AlgebraicCollection
00116 : public Collection<T>
00117 {};
00118 #endif
00119
00120
00121 #ifdef __GXX_CONCEPTS__
00122 auto concept ConstantSizeAlgebraicCollection<typename T>
00123 : AlgebraicCollection<T>,
00124 ConstantSizeCollection<T>
00125 {
00126 #if 0
00127
00128 static Collection<T>::size_type T::static_num_rows;
00129 static Collection<T>::size_type T::static_num_cols;
00130 static Collection<T>::size_type T::static_size;
00131 #endif
00132 };
00133 #else
00134
00135
00155 template <typename T>
00156 struct ConstantSizeAlgebraicCollection
00157 : public AlgebraicCollection<T>,
00158 public ConstantSizeCollection<T>
00159 {
00161 typedef associated_type static_num_rows;
00163 typedef associated_type static_num_cols;
00165 typedef associated_type static_size;
00166 };
00167 #endif
00168
00169
00170
00171 #ifdef __GXX_CONCEPTS__
00172 auto concept TraversableCollection<typename Tag, typename C>
00173 : Collection<C>
00174 {
00175 #if 0
00176
00177 typename cursor_type;
00178
00179 cursor_type begin<Tag>(const C& c);
00180 cursor_type end<Tag>(const C& c);
00181 #endif
00182
00183
00184 typename cursor_type;
00185
00186 cursor_type begin(const C& c, Tag);
00187 cursor_type end(const C& c, Tag);
00188 }
00189 #else
00190
00191 template <typename Tag, typename C>
00192 struct TraversableCollection
00193 : public Collection<C>
00194 {
00196 typedef associated_type cursor_type;
00197
00199
00200 cursor_type begin(const C& c);
00201
00203
00204 cursor_type end(const C& c);
00205 };
00206 #endif
00207
00208
00209 #ifdef __GXX_CONCEPTS__
00210 auto concept TraversableMutableCollection<typename Tag, typename C>
00211 : MutableCollection<C>
00212 {
00213 #if 0
00214 typename cursor_type;
00215
00216 cursor_type begin<Tag>(C& c);
00217 cursor_type end<Tag>(C& c);
00218 #endif
00219
00220
00221 typename cursor_type;
00222
00223 cursor_type begin(C& c, Tag);
00224 cursor_type end(C& c, Tag);
00225 }
00226 #else
00227
00228 template <typename Tag, typename C>
00229 struct TraversableMutableCollection
00230 : public MutableCollection<C>
00231 {
00233 typedef associated_type cursor_type;
00234
00236
00237 cursor_type begin(const C& c);
00238
00240
00241 cursor_type end(const C& c);
00242 };
00243 #endif
00244
00245
00246
00247
00248 #ifdef __GXX_CONCEPTS__
00249 #if 0
00250 concept CategorizedType<typename T>
00251 {
00252 typedef associated_type type;
00253 };
00254 #endif
00255 #endif
00256
00257
00258 #ifdef __GXX_CONCEPTS__
00259 concept OrientedCollection<typename T>
00260 : Collection<T>
00261 {
00262 typename orientation;
00263
00264 };
00265 #else
00266
00267
00275 template <typename T>
00276 struct OrientedCollection
00277 : public Collection<T>
00278 {
00280 typedef typename T::orientation orientation;
00281 };
00282 #endif
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294 #ifdef __GXX_CONCEPTS__
00295
00296
00297 #else
00298 template <typename Value, typename Parameters>
00299 struct Collection<dense2D<Value, Parameters> >
00300 {
00301 typedef Value value_type;
00302 typedef const Value& const_reference;
00303
00304 typedef typename mtl::dense2D<Value, Parameters>::size_type size_type;
00305 };
00306 #endif
00307
00308
00309 #ifdef __GXX_CONCEPTS__
00310
00311 #else
00312 template <typename Value, unsigned long Mask, typename Parameters>
00313 struct Collection<mtl::matrix::morton_dense<Value, Mask, Parameters> >
00314 {
00315 typedef Value value_type;
00316 typedef const Value& const_reference;
00317 typedef typename mtl::matrix::morton_dense<Value, Mask, Parameters>::size_type size_type;
00318 };
00319 #endif
00320
00321
00322 #ifdef __GXX_CONCEPTS__
00323 template <typename Value, typename Parameters>
00324 concept_map Collection<compressed2D<Value, Parameters> >
00325 {
00326 typedef Value value_type;
00327 typedef Value const_reference;
00328 typedef typename compressed2D<Value, Parameters>::size_type size_type;
00329 };
00330 #else
00331 template <typename Value, typename Parameters>
00332 struct Collection<compressed2D<Value, Parameters> >
00333 {
00334 typedef Value value_type;
00335 typedef Value const_reference;
00336 typedef typename compressed2D<Value, Parameters>::size_type size_type;
00337 };
00338
00339 #endif
00340
00341
00342 #ifdef __GXX_CONCEPTS__
00343 template <typename Vector>
00344 concept_map Collection<multi_vector<Vector> >
00345 {
00346 typedef typename multi_vector<Vector>::value_type value_type;
00347 typedef typename multi_vector<Vector>::value_type const_reference;
00348 typedef typename multi_vector<Vector>::size_type size_type;
00349 };
00350 #else
00351 template <typename Vector>
00352 struct Collection<multi_vector<Vector> >
00353 {
00354 typedef typename multi_vector<Vector>::value_type value_type;
00355 typedef typename multi_vector<Vector>::value_type const_reference;
00356 typedef typename multi_vector<Vector>::size_type size_type;
00357 };
00358
00359 #endif
00360
00361
00362 #ifdef __GXX_CONCEPTS__
00363 template <typename Scaling, typename Coll>
00364 concept_map Collection<matrix::scaled_view<Scaling, Coll> >
00365 {
00366 typedef typename matrix::scaled_view<Scaling, Coll>::value_type value_type;
00367 typedef typename matrix::scaled_view<Scaling, Coll>::const_reference const_reference;
00368 typedef typename matrix::scaled_view<Scaling, Coll>::size_type size_type;
00369 };
00370 #else
00371 template <typename Scaling, typename Coll>
00372 struct Collection<matrix::scaled_view<Scaling, Coll> >
00373 {
00374 typedef typename matrix::scaled_view<Scaling, Coll>::value_type value_type;
00375 typedef typename matrix::scaled_view<Scaling, Coll>::const_reference const_reference;
00376 typedef typename matrix::scaled_view<Scaling, Coll>::size_type size_type;
00377 };
00378 #endif
00379
00380
00381 #ifdef __GXX_CONCEPTS__
00382 template <typename Coll, typename RScaling>
00383 concept_map Collection<matrix::rscaled_view<Coll,RScaling> >
00384 {
00385 typedef typename matrix::rscaled_view<Coll,RScaling>::value_type value_type;
00386 typedef typename matrix::rscaled_view<Coll,RScaling>::const_reference const_reference;
00387 typedef typename matrix::rscaled_view<Coll,RScaling>::size_type size_type;
00388 };
00389 #else
00390 template <typename Coll, typename RScaling>
00391 struct Collection<matrix::rscaled_view<Coll,RScaling> >
00392 {
00393 typedef typename matrix::rscaled_view<Coll,RScaling>::value_type value_type;
00394 typedef typename matrix::rscaled_view<Coll,RScaling>::const_reference const_reference;
00395 typedef typename matrix::rscaled_view<Coll,RScaling>::size_type size_type;
00396 };
00397 #endif
00398
00399
00400 #ifdef __GXX_CONCEPTS__
00401 template <typename Scaling, typename Coll>
00402 concept_map Collection<vector::scaled_view<Scaling, Coll> >
00403 {
00404 typedef typename vector::scaled_view<Scaling, Coll>::value_type value_type;
00405 typedef typename vector::scaled_view<Scaling, Coll>::const_reference const_reference;
00406 typedef typename vector::scaled_view<Scaling, Coll>::size_type size_type;
00407 };
00408 #else
00409 template <typename Scaling, typename Coll>
00410 struct Collection<vector::scaled_view<Scaling, Coll> >
00411 {
00412 typedef typename vector::scaled_view<Scaling, Coll>::value_type value_type;
00413 typedef typename vector::scaled_view<Scaling, Coll>::const_reference const_reference;
00414 typedef typename vector::scaled_view<Scaling, Coll>::size_type size_type;
00415 };
00416 #endif
00417
00418
00419 #ifdef __GXX_CONCEPTS__
00420 template <typename Coll, typename RScaling>
00421 concept_map Collection<vector::rscaled_view<Coll,RScaling> >
00422 {
00423 typedef typename vector::rscaled_view<Coll,RScaling>::value_type value_type;
00424 typedef typename vector::rscaled_view<Coll,RScaling>::const_reference const_reference;
00425 typedef typename vector::rscaled_view<Coll,RScaling>::size_type size_type;
00426 };
00427 #else
00428 template <typename Coll, typename RScaling>
00429 struct Collection<vector::rscaled_view<Coll,RScaling> >
00430 {
00431 typedef typename vector::rscaled_view<Coll,RScaling>::value_type value_type;
00432 typedef typename vector::rscaled_view<Coll,RScaling>::const_reference const_reference;
00433 typedef typename vector::rscaled_view<Coll,RScaling>::size_type size_type;
00434 };
00435 #endif
00436
00437
00438 #ifdef __GXX_CONCEPTS__
00439 template <typename Coll>
00440 concept_map Collection<matrix::conj_view<Coll> >
00441 {
00442 typedef typename matrix::conj_view<Coll>::value_type value_type;
00443 typedef typename matrix::conj_view<Coll>::const_reference const_reference;
00444 typedef typename matrix::conj_view<Coll>::size_type size_type;
00445 };
00446 #else
00447 template <typename Coll>
00448 struct Collection<matrix::conj_view<Coll> >
00449 {
00450 typedef typename matrix::conj_view<Coll>::value_type value_type;
00451 typedef typename matrix::conj_view<Coll>::const_reference const_reference;
00452 typedef typename matrix::conj_view<Coll>::size_type size_type;
00453 };
00454 #endif
00455
00456
00457 #ifdef __GXX_CONCEPTS__
00458 template <typename Coll>
00459 concept_map Collection<vector::conj_view<Coll> >
00460 {
00461 typedef typename vector::conj_view<Coll>::value_type value_type;
00462 typedef typename vector::conj_view<Coll>::const_reference const_reference;
00463 typedef typename vector::conj_view<Coll>::size_type size_type;
00464 };
00465 #else
00466 template <typename Coll>
00467 struct Collection<vector::conj_view<Coll> >
00468 {
00469 typedef typename vector::conj_view<Coll>::value_type value_type;
00470 typedef typename vector::conj_view<Coll>::const_reference const_reference;
00471 typedef typename vector::conj_view<Coll>::size_type size_type;
00472 };
00473 #endif
00474
00475
00476 #ifdef __GXX_CONCEPTS__
00477 template <typename Functor, typename Coll>
00478 concept_map Collection< vector::map_view<Functor, Coll> >
00479 {
00480 typedef typename vector::map_view<Functor, Coll>::value_type value_type;
00481 typedef typename vector::map_view<Functor, Coll>::const_reference const_reference;
00482 typedef typename vector::map_view<Functor, Coll>::size_type size_type;
00483 };
00484 #else
00485 template <typename Functor, typename Coll>
00486 struct Collection< vector::map_view<Functor, Coll> >
00487 {
00488 typedef typename vector::map_view<Functor, Coll>::value_type value_type;
00489 typedef typename vector::map_view<Functor, Coll>::const_reference const_reference;
00490 typedef typename vector::map_view<Functor, Coll>::size_type size_type;
00491 };
00492 #endif
00493
00494
00495 #ifdef __GXX_CONCEPTS__
00496 template <typename Matrix>
00497 concept_map Collection<transposed_view<Matrix> >
00498 {
00499 typedef typename transposed_view<Matrix>::value_type value_type;
00500 typedef typename transposed_view<Matrix>::const_reference const_reference;
00501 typedef typename transposed_view<Matrix>::size_type size_type;
00502 };
00503 #else
00504 template <typename Matrix>
00505 struct Collection<transposed_view<Matrix> >
00506 {
00507 typedef typename transposed_view<Matrix>::value_type value_type;
00508 typedef typename transposed_view<Matrix>::const_reference const_reference;
00509 typedef typename transposed_view<Matrix>::size_type size_type;
00510 };
00511 #endif
00512
00513
00514 #ifdef __GXX_CONCEPTS__
00515 template <typename Matrix>
00516 concept_map Collection<matrix::hermitian_view<Matrix> >
00517 {
00518 typedef typename Collection<Matrix>::value_type value_type;
00519 typedef typename Collection<Matrix>::const_reference const_reference;
00520 typedef typename Collection<Matrix>::size_type size_type;
00521 };
00522 #else
00523 template <typename Matrix>
00524 struct Collection<matrix::hermitian_view<Matrix> >
00525 {
00526 typedef typename Collection<Matrix>::value_type value_type;
00527 typedef typename Collection<Matrix>::const_reference const_reference;
00528 typedef typename Collection<Matrix>::size_type size_type;
00529 };
00530 #endif
00531
00532 #ifdef __GXX_CONCEPTS__
00533 template <typename Coll>
00534 concept_map Collection< matrix::banded_view<Coll> >
00535 {
00536 typedef typename matrix::banded_view<Coll>::value_type value_type;
00537 typedef typename matrix::banded_view<Coll>::const_reference const_reference;
00538 typedef typename matrix::banded_view<Coll>::size_type size_type;
00539 };
00540 #else
00541 template <typename Coll>
00542 struct Collection< matrix::banded_view<Coll> >
00543 {
00544 typedef typename matrix::banded_view<Coll>::value_type value_type;
00545 typedef typename matrix::banded_view<Coll>::const_reference const_reference;
00546 typedef typename matrix::banded_view<Coll>::size_type size_type;
00547 };
00548 #endif
00549
00550 #ifdef __GXX_CONCEPTS__
00551
00552 #else
00553 template <typename Matrix, typename Tag, int level>
00554 struct Collection<traits::detail::sub_matrix_cursor<Matrix, Tag, level> >
00555 {
00556 typedef typename Collection<Matrix>::value_type value_type;
00557 typedef typename Collection<Matrix>::const_reference const_reference;
00558 typedef typename Collection<Matrix>::size_type size_type;
00559 };
00560 #endif
00561
00562
00563 #ifdef __GXX_CONCEPTS__
00564
00565 #else
00566 template <typename Value, typename Parameters>
00567 struct Collection<mtl::vector::dense_vector<Value, Parameters> >
00568 {
00569 typedef Value value_type;
00570 typedef const Value& const_reference;
00571 typedef typename mtl::vector::dense_vector<Value, Parameters>::size_type size_type;
00572 };
00573 #endif
00574
00575 #ifdef __GXX_CONCEPTS__
00576
00577 #else
00578 template <typename Value, typename Parameters>
00579 struct Collection<mtl::vector::strided_vector_ref<Value, Parameters> >
00580 {
00581 typedef typename boost::remove_const<Value>::type value_type;
00582 typedef const Value& const_reference;
00583 typedef typename mtl::vector::strided_vector_ref<Value, Parameters>::size_type size_type;
00584 };
00585 #endif
00586
00587 #ifdef __GXX_CONCEPTS__
00588
00589 #else
00590
00591 template <typename T>
00592 struct Collection<T const>
00593 : Collection<T>
00594 {};
00595 #endif
00596
00597
00598 #ifdef __GXX_CONCEPTS__
00599
00600 #else
00601 template <typename Value>
00602 struct Collection<std::vector<Value> >
00603 {
00604 typedef typename std::vector<Value>::value_type value_type;
00605 typedef typename std::vector<Value>::const_reference const_reference;
00606 typedef typename std::vector<Value>::size_type size_type;
00607 };
00608 #endif
00609
00610
00611 #ifdef __GXX_CONCEPTS__
00612 template <typename Value, typename Parameters>
00613 concept_map MutableCollection<dense2D<Value, Parameters> >
00614 {
00615 typedef Value value_type;
00616 typedef const Value& const_reference;
00617 typedef typename dense2D<Value, Parameters>::size_type size_type;
00618
00619 typedef Value& reference;
00620 };
00621 #else
00622 template <typename Value, typename Parameters>
00623 struct MutableCollection<dense2D<Value, Parameters> >
00624 : public Collection<dense2D<Value, Parameters> >
00625 {
00626 typedef Value& reference;
00627 };
00628 #endif
00629
00630 #ifdef __GXX_CONCEPTS__
00631
00632 template <typename Value, unsigned long Mask, typename Parameters>
00633 concept_map MutableCollection<morton_dense<Value, Mask, Parameters> >
00634 {
00635 typedef Value value_type;
00636 typedef const Value& const_reference;
00637 typedef typename morton_dense<Value, Mask, Parameters>::size_type size_type;
00638
00639 typedef Value& reference;
00640 };
00641
00642 #else
00643
00644 template <typename Value, unsigned long Mask, typename Parameters>
00645 struct MutableCollection<morton_dense<Value, Mask, Parameters> >
00646 : public Collection<morton_dense<Value, Mask, Parameters> >
00647 {
00648 typedef Value& reference;
00649 };
00650
00651 #endif
00652
00653
00654 #ifdef __GXX_CONCEPTS__
00655 template <typename Value, typename Parameters>
00656 concept_map MutableCollection<mtl::vector::strided_vector_ref<Value, Parameters> >
00657 {
00658 typedef typename boost::remove_const<Value>::type value_type;
00659 typedef const Value& const_reference;
00660 typedef typename mtl::vector::strided_vector_ref<Value, Parameters>::size_type size_type;
00661
00662 typedef Value& reference;
00663 };
00664 #else
00665 template <typename Value, typename Parameters>
00666 struct MutableCollection<mtl::vector::strided_vector_ref<Value, Parameters> >
00667 : public Collection<mtl::vector::strided_vector_ref<Value, Parameters> >
00668 {
00669 typedef Value& reference;
00670 };
00671 #endif
00672
00673
00674
00675 #ifdef __GXX_CONCEPTS__
00676 template <typename Value>
00677 concept_map MutableCollection<<std::vector<Value> >
00678 {
00679 typedef typename std::vector<Value>::value_type value_type;
00680 typedef typename std::vector<Value>::const_reference const_reference;
00681 typedef typename std::vector<Value>::size_type size_type;
00682
00683 typedef typename std::vector<Value>::reference reference;
00684 };
00685 #else
00686 template <typename Value>
00687 struct MutableCollection<std::vector<Value> >
00688 : public Collection<std::vector<Value> >
00689 {
00690 typedef typename std::vector<Value>::reference reference;
00691 };
00692 #endif
00693
00694
00695
00696
00697 #ifdef __GXX_CONCEPTS__
00698 template <typename Value, typename Parameters>
00699 concept_map OrientedCollection<dense2D<Value, Parameters> >
00700 {
00701 typedef Value value_type;
00702 typedef const Value& const_reference;
00703 typedef typename dense2D<Value, Parameters>::size_type size_type;
00704
00705 typedef typename dense2D<Value, Parameters>::orientation orientation;
00706 };
00707 #else
00708 template <typename Value, typename Parameters>
00709 struct OrientedCollection<dense2D<Value, Parameters> >
00710 : public Collection<dense2D<Value, Parameters> >
00711 {
00712 typedef typename dense2D<Value, Parameters>::orientation orientation;
00713 };
00714 #endif
00715
00716 #ifdef __GXX_CONCEPTS__
00717
00718 template <typename Value, unsigned long Mask, typename Parameters>
00719 concept_map OrientedCollection<morton_dense<Value, Mask, Parameters> >
00720 {
00721 typedef Value value_type;
00722 typedef const Value& const_reference;
00723 typedef typename morton_dense<Value, Mask, Parameters>::size_type size_type;
00724
00725 typedef typename morton_dense<Value, Mask, Parameters>::orientation orientation;
00726 };
00727
00728 #else
00729
00730 template <typename Value, unsigned long Mask, typename Parameters>
00731 struct OrientedCollection<morton_dense<Value, Mask, Parameters> >
00732 : public Collection<morton_dense<Value, Mask, Parameters> >
00733 {
00734 typedef typename morton_dense<Value, Mask, Parameters>::orientation orientation;
00735 };
00736
00737 #endif
00738
00739 #ifdef __GXX_CONCEPTS__
00740 template <typename Value, typename Parameters>
00741 concept_map OrientedCollection<compressed2D<Value, Parameters> >
00742 {
00743 typedef Value value_type;
00744 typedef const Value& const_reference;
00745 typedef typename compressed2D<Value, Parameters>::size_type size_type;
00746
00747 typedef typename compressed2D<Value, Parameters>::orientation orientation;
00748 };
00749 #else
00750 template <typename Value, typename Parameters>
00751 struct OrientedCollection<compressed2D<Value, Parameters> >
00752 : public Collection<compressed2D<Value, Parameters> >
00753 {
00754 typedef typename compressed2D<Value, Parameters>::orientation orientation;
00755 };
00756 #endif
00757
00758
00759 #ifdef __GXX_CONCEPTS__
00760 template <typename Value, typename Parameters>
00761 concept_map OrientedCollection<mtl::vector::dense_vector<Value, Parameters> >
00762 {
00763 typedef Value value_type;
00764 typedef const Value& const_reference;
00765 typedef typename mtl::vector::dense_vector<Value, Parameters>::size_type size_type;
00766
00767 typedef typename mtl::vector::dense_vector<Value, Parameters>::orientation orientation;
00768 };
00769 #else
00770 template <typename Value, typename Parameters>
00771 struct OrientedCollection<mtl::vector::dense_vector<Value, Parameters> >
00772 : public Collection<mtl::vector::dense_vector<Value, Parameters> >
00773 {
00774 typedef typename mtl::vector::dense_vector<Value, Parameters>::orientation orientation;
00775 };
00776 #endif
00777
00778 #ifdef __GXX_CONCEPTS__
00779 template <typename Value, typename Parameters>
00780 concept_map OrientedCollection<mtl::vector::strided_vector_ref<Value, Parameters> >
00781 {
00782 typedef typename boost::remove_const<Value>::type value_type;
00783 typedef const Value& const_reference;
00784 typedef typename mtl::vector::strided_vector_ref<Value, Parameters>::size_type size_type;
00785
00786 typedef typename mtl::vector::strided_vector_ref<Value, Parameters>::orientation orientation;
00787 };
00788 #else
00789 template <typename Value, typename Parameters>
00790 struct OrientedCollection<mtl::vector::strided_vector_ref<Value, Parameters> >
00791 : public Collection<mtl::vector::strided_vector_ref<Value, Parameters> >
00792 {
00793 typedef typename mtl::vector::strided_vector_ref<Value, Parameters>::orientation orientation;
00794 };
00795 #endif
00796
00797
00798
00799 #ifdef __GXX_CONCEPTS__
00800 template <typename Value>
00801 concept_map OrientedCollection<std::vector<Value> >
00802 {
00803 typedef Value value_type;
00804 typedef const Value& const_reference;
00805 typedef typename std::vector<Value>::size_type size_type;
00806
00807 typedef mtl::tag::col_major orientation;
00808 };
00809 #else
00810 template <typename Value>
00811 struct OrientedCollection<std::vector<Value> >
00812 : public Collection<std::vector<Value> >
00813 {
00814 typedef mtl::tag::col_major orientation;
00815 };
00816 #endif
00817
00818
00819 #ifdef __GXX_CONCEPTS__
00820 template <typename Scaling, typename Coll>
00821 concept_map OrientedCollection< matrix::scaled_view<Scaling, Coll> >
00822 {
00823 typedef typename matrix::scaled_view<Scaling, Coll>::value_type value_type;
00824 typedef typename matrix::scaled_view<Scaling, Coll>::const_reference const_reference;
00825 typedef typename matrix::scaled_view<Scaling, Coll>::size_type size_type;
00826
00827 typedef typename OrientedCollection<Coll>::orientation orientation;
00828 };
00829 #else
00830 template <typename Scaling, typename Coll>
00831 struct OrientedCollection< matrix::scaled_view<Scaling, Coll> >
00832 : public Collection< matrix::scaled_view<Scaling, Coll> >
00833 {
00834 typedef typename OrientedCollection<Coll>::orientation orientation;
00835 };
00836 #endif
00837
00838
00839 #ifdef __GXX_CONCEPTS__
00840 template <typename Coll, typename RScaling>
00841 concept_map OrientedCollection< matrix::rscaled_view<Coll,RScaling> >
00842 {
00843 typedef typename matrix::rscaled_view<Coll,RScaling>::value_type value_type;
00844 typedef typename matrix::rscaled_view<Coll,RScaling>::const_reference const_reference;
00845 typedef typename matrix::rscaled_view<Coll,RScaling>::size_type size_type;
00846
00847 typedef typename OrientedCollection<Coll>::orientation orientation;
00848 };
00849 #else
00850 template <typename Coll, typename RScaling>
00851 struct OrientedCollection< matrix::rscaled_view<Coll,RScaling> >
00852 : public Collection< matrix::rscaled_view<Coll,RScaling> >
00853 {
00854 typedef typename OrientedCollection<Coll>::orientation orientation;
00855 };
00856 #endif
00857
00858
00859 #ifdef __GXX_CONCEPTS__
00860 template <typename Scaling, typename Coll>
00861 concept_map OrientedCollection< mtl::vector::scaled_view<Scaling, Coll> >
00862 {
00863 typedef typename mtl::vector::scaled_view<Scaling, Coll>::value_type value_type;
00864 typedef typename mtl::vector::scaled_view<Scaling, Coll>::const_reference const_reference;
00865 typedef typename mtl::vector::scaled_view<Scaling, Coll>::size_type size_type;
00866
00867 typedef typename OrientedCollection<Coll>::orientation orientation;
00868 };
00869 #else
00870 template <typename Scaling, typename Coll>
00871 struct OrientedCollection< mtl::vector::scaled_view<Scaling, Coll> >
00872 : public Collection< mtl::vector::scaled_view<Scaling, Coll> >
00873 {
00874 typedef typename OrientedCollection<Coll>::orientation orientation;
00875 };
00876 #endif
00877
00878
00879 #ifdef __GXX_CONCEPTS__
00880 template <typename Coll, typename RScaling>
00881 concept_map OrientedCollection< mtl::vector::rscaled_view<Coll,RScaling> >
00882 {
00883 typedef typename mtl::vector::rscaled_view<Coll,RScaling>::value_type value_type;
00884 typedef typename mtl::vector::rscaled_view<Coll,RScaling>::const_reference const_reference;
00885 typedef typename mtl::vector::rscaled_view<Coll,RScaling>::size_type size_type;
00886
00887 typedef typename OrientedCollection<Coll>::orientation orientation;
00888 };
00889 #else
00890 template <typename Coll, typename RScaling>
00891 struct OrientedCollection< mtl::vector::rscaled_view<Coll,RScaling> >
00892 : public Collection< mtl::vector::rscaled_view<Coll,RScaling> >
00893 {
00894 typedef typename OrientedCollection<Coll>::orientation orientation;
00895 };
00896 #endif
00897
00898
00899 #ifdef __GXX_CONCEPTS__
00900 template <typename Coll>
00901 concept_map OrientedCollection<matrix::conj_view<Coll> >
00902 {
00903 typedef typename matrix::conj_view<Coll>::value_type value_type;
00904 typedef typename matrix::conj_view<Coll>::const_reference const_reference;
00905 typedef typename matrix::conj_view<Coll>::size_type size_type;
00906
00907 typedef typename OrientedCollection<Coll>::orientation orientation;
00908 };
00909 #else
00910 template <typename Coll>
00911 struct OrientedCollection<matrix::conj_view<Coll> >
00912 : public Collection<matrix::conj_view<Coll> >
00913 {
00914 typedef typename OrientedCollection<Coll>::orientation orientation;
00915 };
00916 #endif
00917
00918
00919 #ifdef __GXX_CONCEPTS__
00920 template <typename Coll>
00921 concept_map OrientedCollection<mtl::vector::conj_view<Coll> >
00922 {
00923 typedef typename mtl::vector::conj_view<Coll>::value_type value_type;
00924 typedef typename mtl::vector::conj_view<Coll>::const_reference const_reference;
00925 typedef typename mtl::vector::conj_view<Coll>::size_type size_type;
00926
00927 typedef typename OrientedCollection<Coll>::orientation orientation;
00928 };
00929 #else
00930 template <typename Coll>
00931 struct OrientedCollection<mtl::vector::conj_view<Coll> >
00932 : public Collection<mtl::vector::conj_view<Coll> >
00933 {
00934 typedef typename OrientedCollection<Coll>::orientation orientation;
00935 };
00936 #endif
00937
00938
00939 #ifdef __GXX_CONCEPTS__
00940 template <typename Functor, typename Coll>
00941 concept_map OrientedCollection< mtl::vector::map_view<Functor, Coll> >
00942 {
00943 typedef typename mtl::vector::map_view<Functor, Coll>::value_type value_type;
00944 typedef typename mtl::vector::map_view<Functor, Coll>::const_reference const_reference;
00945 typedef typename mtl::vector::map_view<Functor, Coll>::size_type size_type;
00946
00947 typedef typename OrientedCollection<Coll>::orientation orientation;
00948 };
00949 #else
00950 template <typename Functor, typename Coll>
00951 struct OrientedCollection< mtl::vector::map_view<Functor, Coll> >
00952 : public Collection< mtl::vector::map_view<Functor, Coll> >
00953 {
00954 typedef typename OrientedCollection<Coll>::orientation orientation;
00955 };
00956 #endif
00957
00958
00959 #ifdef __GXX_CONCEPTS__
00960 template <typename Coll>
00961 concept_map OrientedCollection<transposed_view<Coll> >
00962 {
00963 typedef typename transposed_view<Coll>::value_type value_type;
00964 typedef typename transposed_view<Coll>::const_reference const_reference;
00965 typedef typename transposed_view<Coll>::size_type size_type;
00966
00967 typedef typename transposed_orientation<typename OrientedCollection<Coll>::orientation>::type orientation;
00968 };
00969 #else
00970 template <typename Coll>
00971 struct OrientedCollection<transposed_view<Coll> >
00972 : public Collection<transposed_view<Coll> >
00973 {
00974 typedef typename transposed_orientation<typename OrientedCollection<Coll>::orientation>::type orientation;
00975 };
00976 #endif
00977
00978 #ifdef __GXX_CONCEPTS__
00979 template <typename Coll>
00980 concept_map OrientedCollection<matrix::hermitian_view<Coll> >
00981 {
00982 typedef typename matrix::hermitian_view<Coll>::value_type value_type;
00983 typedef typename matrix::hermitian_view<Coll>::const_reference const_reference;
00984 typedef typename matrix::hermitian_view<Coll>::size_type size_type;
00985
00986 typedef typename transposed_orientation<typename OrientedCollection<Coll>::orientation>::type orientation;
00987 };
00988 #else
00989 template <typename Coll>
00990 struct OrientedCollection<matrix::hermitian_view<Coll> >
00991 : public Collection<matrix::hermitian_view<Coll> >
00992 {
00993 typedef typename transposed_orientation<typename OrientedCollection<Coll>::orientation>::type orientation;
00994 };
00995 #endif
00996
00997
00998
01000
01001 }
01002
01003 #endif // MTL_COLLECTION_INCLUDE