Boost logo

Ublas :

From: Pieter (PieterB_at_[hidden])
Date: 2008-02-22 17:09:45


LS,
 
I would really appreciate it when someone could explain to me why the code
snippet below does not work; I would like to extract unit_lower or
strict_lower triangular matrices from a general matrix, but it seems I am
doing something wrong. Any help would be highly appreciated!
 
Kind regards,
 
Pieter Ober
 
// **********
 
matrix<double> M (3, 3);
 
triangular_matrix<double,lower> L;
triangular_matrix<double,unit_lower> UL;
triangular_matrix<double,strict_lower> SL;
 
L = triangular_adaptor<matrix<double>, lower> (M);
UL = triangular_adaptor<matrix<double>, unit_lower> (M); // throws a
"boost::numeric::ublas::bad_index" exception
SL = triangular_adaptor<matrix<double>, strict_lower> (M); // throws a
"boost::numeric::ublas::bad_index" exception
 
// **********