1 /* linbox/matrix/matrix-traits.h 2 * Copyright (C) 2013 the LinBox group 3 * 4 * Written by : 5 * Brice Boyer (briceboyer) <boyer.brice@gmail.com> 6 * 7 * ========LICENCE======== 8 * This file is part of the library LinBox. 9 * 10 * LinBox is free software: you can redistribute it and/or modify 11 * it under the terms of the GNU Lesser General Public 12 * License as published by the Free Software Foundation; either 13 * version 2.1 of the License, or (at your option) any later version. 14 * 15 * This library is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 * Lesser General Public License for more details. 19 * 20 * You should have received a copy of the GNU Lesser General Public 21 * License along with this library; if not, write to the Free Software 22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 23 * ========LICENCE======== 24 */ 25 26 #ifndef __LINBOX_matrix_matrix_traits_H 27 #define __LINBOX_matrix_matrix_traits_H 28 29 #include "linbox/util/debug.h" 30 #include "linbox/linbox-config.h" 31 #include "linbox/matrix/matrix-category.h" 32 33 namespace LinBox { 34 35 36 //! @brief NO DOC. 37 template <class Matrix> 38 struct MatrixTraits { 39 typedef Matrix MatrixType; 40 typedef typename MatrixCategories::BlackboxTag MatrixCategory; 41 }; 42 43 44 //! NODOC 45 template <class Matrix> 46 class MatrixContainerTrait { 47 public: 48 typedef MatrixContainerCategory::Blackbox Type; 49 }; 50 51 52 //! try to map a blackbox over a homorphic ring 53 //! The most suitable type 54 template <class Blackbox, class Field> 55 struct MatrixHomTrait { 56 // static_assert(false,"should not be instanciated"); 57 //typedef ... FBlackbox 58 // donot know 59 // typedef Blackbox value_type; 60 }; 61 62 /// limited doc so far 63 namespace IndexedTags 64 { 65 struct HasIndexed{}; 66 struct HasNext{}; 67 struct NoIndexed{}; 68 } 69 70 /// Trait to show whether or not the BB class has a Indexed iterator 71 template<class BB> 72 struct IndexedCategory { 73 typedef IndexedTags::NoIndexed Tag; 74 }; 75 76 template<class Field, class Vect> 77 struct SparseVectorTranslate { 78 typedef Vect other_t; 79 }; 80 81 82 } // LinBox 83 84 #endif // __LINBOX_matrix_matrix_traits_H 85 86 // Local Variables: 87 // mode: C++ 88 // tab-width: 4 89 // indent-tabs-mode: nil 90 // c-basic-offset: 4 91 // End: 92 // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 93