Boost logo

Ublas :

Subject: Re: [ublas] Matrix with vector interface.
From: Joaquim Duran (jduran.gm_at_[hidden])
Date: 2012-09-19 04:17:17


2012/9/18 Gunter Winkler <guwi17_at_[hidden]>:
> Am Tuesday 18 September 2012 schrieb Joaquim Duran:
>
>> I'm developing classes to represent signals (think in DSP, AD
>> conversor,...) and implement operations to filter data, down-sampling
>> and related operations. Currently all classes are implemented based
>> on bounded_vector (to represent a signal or a sample of a set of
>> signals) and bounded_matrix (to represent a set of signals with the
>> same number of samples for each signal). The advantage of bounded
>> containers is that the resize operations (add or remove signals or
>> samples) don't generate new delete/operations.
>
> in this case I'd suggest to have a look at MTL4
> http://www.simunova.com/en/node/24 . They provide a more general (and
> sometimes more abstract) interface to matrices. And (unfortunately) they
> have better performance with many operations ...

I know that there are many other libraries out there that implements
algebra elements: armadillo (http://arma.sourceforge.net/),
eigen (http://eigen.tuxfamily.org/index.php?title=Main_Page),... but
ublas was already included in boost. The code will execute
in an embedded device so I was avoiding a new dependence with another
library. I don't have to deal with 'very big' matrices,
mainly 12x16 (12 signals x 16 samples).

> Regarding uBlas: Long time ago there was a design decision to not handle
> a matrix as a set of vectors in order to avoid bad surprises when
> playing with the storage layout and iteration order. However, I'd gladly
> accept a new matrix view as list of vectors using boost:range .

I understand that, so I was asking for a proxy or a similar object.
The main problem that I see is that operator* of iterators returns
a const_reference and not a matrix_row or matrix_column, so IMHO new
types of iterators should be defined.