Re: [eigen] Multiple dimensions Matrix

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


On 18.08.2015 at 00:35, Nuno Marques wrote:
Hi there guys,
What is the best way of creating a multiple size matrix, something like:
Matrix[dynamic,fixed,fixed]
The code I pretend to convert is float[EST_BUF_SIZE][3][2] , where EST_BUF_SIZE is variable. I've been trying to find something on Eigen that can be used but then I just see 2D Matrix definitions, no 3D.

As was already suggested, there is the not-stable-yet Tensor module. Depending on what you actually plan to do, a simple
  typedef Eigen::Matrix<float, 3, 2> Matrix32;
  std::vector<Matrix32> buffer;
might be sufficient, as well ...


Off-topic: Also, is there a way of doing memset() for a Matrix<> or is automatically done?

  matrix.setConstant(value); matrix.setZero(); matrix.setOnes();

Christoph


--
----------------------------------------------
Dipl.-Inf., Dipl.-Math. Christoph Hertzberg
Cartesium 0.049
Universität Bremen
Enrique-Schmidt-Straße 5
28359 Bremen

Tel: +49 (421) 218-64252
----------------------------------------------



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/