Boost logo

Ublas :

Subject: Re: [ublas] whole ublas matrix as vector
From: Gunter Winkler (guwi17_at_[hidden])
Date: 2009-07-24 15:02:27

Am Tuesday 21 July 2009 schrieb Michael Norel:
> Hello!
> Sometimes i need some vector specific functions (per element) like
> "norm_2" and "inner" and so on. for matrices .
> I don't want to write my own implementation, so my question is
> How to represent whole mtrix expression as vector expression for
> vector specific operations?

You can access the member data() of a dense matrix. This member is a
one-dimensional array (of type unbounded_array or bounded_array). Then
you can use the readonly_array_adaptor from
to get a vector view.