2
0
mirror of https://github.com/boostorg/ublas.git synced 2026-02-22 03:42:19 +00:00

functional.hpp:

* added triangular_type definitions
* added transposed_layout to basic_row_major and basic_column_major
* fix #2800 : transposed_structure has to switch row major and column major



[SVN r51764]
This commit is contained in:
Gunter Winkler
2009-03-13 21:07:16 +00:00
parent 5c9035a226
commit 831f2b65e2

View File

@@ -1343,6 +1343,9 @@ namespace boost { namespace numeric { namespace ublas {
}
};
// forward declaration
template <class Z, class D> struct basic_column_major;
// This functor defines storage layout and it's properties
// matrix (i,j) -> storage [i * size_i + j]
template <class Z, class D>
@@ -1350,6 +1353,7 @@ namespace boost { namespace numeric { namespace ublas {
typedef Z size_type;
typedef D difference_type;
typedef row_major_tag orientation_category;
typedef basic_column_major<Z,D> transposed_layout;
static
BOOST_UBLAS_INLINE
@@ -1527,6 +1531,7 @@ namespace boost { namespace numeric { namespace ublas {
typedef Z size_type;
typedef D difference_type;
typedef column_major_tag orientation_category;
typedef basic_row_major<Z,D> transposed_layout;
static
BOOST_UBLAS_INLINE
@@ -1776,7 +1781,7 @@ namespace boost { namespace numeric { namespace ublas {
static
BOOST_UBLAS_INLINE
size_type element (LAYOUT l, size_type i, size_type size_i, size_type j, size_type size_j) {
return L::element(l, j, size_j, i, size_i);
return L::element(typename LAYOUT::transposed_layout(), j, size_j, i, size_i);
}
static
@@ -1826,6 +1831,7 @@ namespace boost { namespace numeric { namespace ublas {
template <class Z>
struct basic_lower {
typedef Z size_type;
typedef lower_tag triangular_type;
template<class L>
static
@@ -1912,6 +1918,7 @@ namespace boost { namespace numeric { namespace ublas {
template <class Z>
struct basic_unit_lower : public basic_lower<Z> {
typedef Z size_type;
typedef unit_lower_tag triangular_type;
template<class L>
static
@@ -1971,6 +1978,7 @@ namespace boost { namespace numeric { namespace ublas {
template <class Z>
struct basic_strict_lower : public basic_unit_lower<Z> {
typedef Z size_type;
typedef strict_lower_tag triangular_type;
template<class L>
static
@@ -2033,15 +2041,21 @@ namespace boost { namespace numeric { namespace ublas {
template <class Z>
struct basic_upper : public detail::transposed_structure<basic_lower<Z> >
{ };
{
typedef upper_tag triangular_type;
};
template <class Z>
struct basic_unit_upper : public detail::transposed_structure<basic_unit_lower<Z> >
{ };
{
typedef unit_upper_tag triangular_type;
};
template <class Z>
struct basic_strict_upper : public detail::transposed_structure<basic_strict_lower<Z> >
{ };
{
typedef strict_upper_tag triangular_type;
};
}}}