Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost matix question from a newbie
From: Rob Desbois (rob.desbois_at_[hidden])
Date: 2011-12-13 12:42:02


On 13 December 2011 08:55, boostnewbie <markin_at_[hidden]> wrote:

> I want to use the boost matrices, and I have examples how to deal with
> that.
> But now, I want to
> store those matrix in a std-Array or an std-list. To do this, I must be
> able
> to name the type of for example a 3X3 matrix.
>
> I mean I nbeed an expressione similar to
> std::vector<matrix&lt;double>> trafos;
> but I don´t know how to say that the matrix is a 3X3 type.
>

This isn't directly possible with ublas' matrices since the dimensions are
not part of the type but are specified on construction of a matrix. You'll
need to extend or wrap the matrix or vector to perform a check on
insertions to ensure that non-3x3 matrices are not inserted.

-- 
Rob Desbois
Blog: http://theotherbranch.wordpress.com/
"I disapprove of what you say, but I’ll defend to the death your right to
say it", Voltaire


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