Boost logo

Ublas :

Subject: [ublas] Testing tptri
From: Jesse Perla (jesseperla_at_[hidden])
Date: 2009-03-19 13:00:59


Rutger/Karl:
Again, sorry for taking so long to test. Travel and a computer rebuild.

> This is right, trtri is meant for normal dense matrices (=storage format)
of
> which you say they are triangular. I've added support for uplo detection
in
> trtri, to use it now please use ublas' triangular adaptor to indicate
>whether it is upper/lower.

Thanks for reminding me about triangular storage formats. I think I get it
now, how to use the triangular adaptor if I have dense storage.

I tried the following code:

ublas::triangular_matrix<double, ublas::lower, ublas::column_major> A(2,2);
lapack::tptri('N', A);

And got a bunch of missing traits:
1>C:\working\libraries\boost\boost/numeric/bindings/lapack/computational/tptri.hpp(75):
error: class
"boost::numeric::bindings::traits::matrix_traits<boost::numeric::ublas::triangular_matrix<double,
boost::numeric::ublas::lower, boost::numeric::ublas::column_major,
boost::numeric::ublas::unbounded_array<double,
std::allocator<QuantLib::Real={double}>>>>" has no member "value_type"
1> typedef typename traits::matrix_traits< MatrixAP >::value_type
value_type;

1>C:\working\libraries\boost\boost/numeric/bindings/lapack/computational/tptri.hpp(56):
error: class "boost::numeric::bindings::traits::type_traits<<error-type>>"
has no member "real_type"
1> typedef typename traits::type_traits<ValueType>::real_type
real_type;

1>C:\working\libraries\boost\boost/numeric/bindings/traits/matrix_traits.hpp(139):
error: class
"boost::numeric::bindings::traits::matrix_traits<boost::numeric::ublas::triangular_matrix<double,
boost::numeric::ublas::lower, boost::numeric::ublas::column_major,
boost::numeric::ublas::unbounded_array<double,
std::allocator<QuantLib::Real={double}>>>>" has no member "uplo_type"
1> typedef typename matrix_traits<SymmM>::uplo_type uplo_t;

It sure would be nice if when the higher level interfaces are developed they
would dispatch to the correct LAPACK routine based on the packed vs. dense
storage.

Thanks,
Jesse