00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef MTL_MATRIX_STRICT_UPPER_INCLUDE
00013 #define MTL_MATRIX_STRICT_UPPER_INCLUDE
00014
00015 #include <boost/numeric/mtl/matrix/bands.hpp>
00016
00017 namespace mtl { namespace matrix {
00018
00019 namespace traits {
00020
00021 template <typename Matrix>
00022 struct strict_upper
00023 {
00024 typedef typename bands<Matrix>::type type;
00025 };
00026 }
00027
00029 template <typename Matrix>
00030 typename traits::strict_upper<Matrix>::type
00031 inline strict_upper(const Matrix& A)
00032 {
00033 return bands(A, 1, std::numeric_limits<long>::max());
00034 }
00035
00037 template <typename Matrix>
00038 typename traits::strict_upper<Matrix>::type
00039 inline triu(const Matrix& A, long d= 0)
00040 {
00041 return bands(A, d, std::numeric_limits<long>::max());
00042 }
00043
00044
00045 }}
00046
00047 #endif // MTL_MATRIX_STRICT_UPPER_INCLUDE