Re: [Bayes++] Usage clarification for linear algebra classes
Brought to you by:
mistevens
From: Michael S. <ma...@mi...> - 2007-05-10 15:42:39
|
On Wednesday 09 May 2007 17:36, yon wrote: > Dear Michael, Dear List, > > Can someone provide a quick indication of usage compatibility and > conversion between the different linear algebra classes? > > Specifically, which of FM::Vec, ublas::vector<float>, and the bayes++ > column_matrix implementations are compatible, and how to convert > between them? I became stuck on this and re-implemented two > functions for which I could not figure out the conversions, but it > would be better that I handle the conversions correctly. 'FM::Vec' is derived from 'ublas::vector<double>'. It is therefore type compatible with a ublas::vector<double> but NOT with a ublas::vector<float>. I assume by 'column_matrix' you mean a 'ublas::matrix_column'? The uBlas 'column( matrix, col )' function allows you to create a 'matrix_column' which references a given matrix. A good reference for the type of usage possible look at SIRFlt.cpp itself. The 'matrix_column' class has no type relationship with any vector class. However the generic assignment and expression operations in uBLAS allow you to use it where a the other vector classes can be used. You own code will also have to be generic (use templates) if it want to be able to operate on the different types as defined by the uBLAS Vector concept. Michael -- ___________________________________ Michael Stevens Systems Engineering 34128 Kassel, Germany Phone/Fax: +49 561 5218038 Navigation Systems, Estimation and Bayesian Filtering http://bayesclasses.sf.net ___________________________________ |