Boost.Units and Ublas and Math

Hi, I have been trying to use ublas with a user-defined numeric type and have been having problems with that--problems with resolving sqrt etc since the sqrt in ublas invokes std::sqrt. I wanted to use the policy and exception handling in the Math library with the ublas class, but I haven't been able to figure out the helper functions that would allow the use of my numeric types. Can this be done? Any suggestions would be appreciated. My next step would be to add units to the numeric values--assuming this can be done in the context of ublas. Is it possible to use Boost.Units and Boost.Ublas together? For example create a ublas vector of positions? What's the best approach for arithmetic operations, units, vectors, matrices, and user-defined exceptions using Boost? Thanks for your help, Pat

*vector
is vector ... In
The problem being that ublas currently does not correctly resolve the
value type for arithmetic operations. For "normal" numeric types, even
if not strictly correct, this is usually not a problem : the type of
vector<double>*vector<double> is vector<double>. Since all the unit
magic in Boost.Units is encoded in the types, this isn't true with
quantities : the type of vector
participants (3)
-
Matthias Schabel
-
Pat Hawley
-
Steven Watanabe