Boost logo

Boost Users :

From: Heiko Bauke (Heiko.Bauke_at_[hidden])
Date: 2004-09-08 13:29:50


Dear all,
 
I discovered a problem in ublas identity_matrix class. I am doing
linear algebra in finite fields. So my matrices contain no floats nor
doubles. Instead I use some class that behaves like a number but does
arithmetic in a finite field.
 
Class instances are contructable by int, but _not_ default
constructable by int. I don't want to have this.
 
In matrix.hpp one finds the lines
 
template<class T>
typename identity_matrix<T>::value_type identity_matrix<T>::zero_=0;
template<class T>
typename identity_matrix<T>::value_type identity_matrix<T>::one_=1;
 
These lines are problematic and the reason why my number class works
not with the identity_matrix class. I think these lines should by
changed into
 
template<class T>
typename identity_matrix<T>::value_type
identity_matrix<T>::zero_=T(0);
template<class T>
typename identity_matrix<T>::value_type identity_matrix<T>::one_=T(1);
 
to make the ublas code more general.
 
 
        with regards
 
        Heiko
 
--
-- Gute Sitten haben für die Gesellschaft mehr Wert als alle
-- Berechnungen Newtons. (Friedrich II., der Große, 1712-1786)
-- Supercomputing in Magdeburg @ http://tina.nat.uni-magdeburg.de
-- Heiko Bauke @ http://www.uni-magdeburg.de/bauke
 


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net