Bindings traits: tag::matrix_type is not defined for ublas::matrix

"Manuel Gonzalez" <[email protected]>
Newsgroups gmane.comp.lib.boost.ublas
Message-ID <[email protected]>
Hello,

I am using the traits system in the current version of the numeric bindings, in
particular the tag "boost::numeric::bindings::tag::matrix_type" which can take
the following values:

boost::numeric::bindings::tag::general
boost::numeric::bindings::tag::triangular
boost::numeric::bindings::tag::symmetric
boost::numeric::bindings::tag::hermitian
boost::numeric::bindings::tag::band

I have found that this tag is not defined for ublas::matrix, and I think it
should be defined with value "general".

This test program shows the problem:

--- START CODE ---

#define BOOST_ALL_NO_LIB 
#include <boost/numeric/bindings/tag.hpp> 
#include <boost/numeric/bindings/ublas/matrix.hpp> 
#include <boost/numeric/bindings/ublas/matrix_sparse.hpp> 

typedef boost::numeric::ublas::matrix<double>            test_type;
//typedef boost::numeric::ublas::compressed_matrix<double> test_type;
//typedef boost::numeric::ublas::coordinate_matrix<double> test_type;

void foo(const boost::numeric::bindings::tag::general& tag) { }

int main(void) {
	boost::numeric::bindings::detail::property_at< test_type,
boost::numeric::bindings::tag::matrix_type >::type prop;
	foo(prop);
	return 0;
}

--- END CODE ---

The linker stops due to an error because "prop" has type 'boost::mpl::void_'.
Uncommenting the typedefs show that the tag "matrix_type" is correctly defined
as "general" for sparse matrices.

To correct the problem, the following line:

        mpl::pair< tag::matrix_type, tag::general >,
		
should be included between lines 36 and 37 in file
"boost/numeric/bindings/ublas/matrix.hpp".

Best regards,
Manuel



_______________________________________________
ublas mailing list
[email protected]
http://lists.boost.org/mailman/listinfo.cgi/ublas
Sent to: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.