Re: [eigen] Sums

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


Hi Gael

Interesting... I just tried the same (outputting the vector) and it seems work. May be this was a debugger display issue?

Sorry for the noise
Benjamin

Gael Guennebaud wrote:

Hi Benjamin,

I cannot reproduce your issue. I tried:

Matrix<float, 3, Dynamic> kern2(3, 100);
VectorXf grad_sum = kern2.rowwise().sum();
std::cout << grad_sum.rows() << " " << grad_sum.cols() << "\n";

and I get as output:

3 1

can you give us a wider view of your code ?

cheers,
Gael.

On Wed, Dec 3, 2008 at 4:40 PM, Benjamin Schindler <bschindler@xxxxxxxxxxxxxxx <mailto:bschindler@xxxxxxxxxxxxxxx>> wrote:

    Hi

    In my code, the following gets executed:

    VectorXf grad_sum = kern2.rowwise().sum();

    After executing, I noticed that the m_rows member is set to
    something really high, but kern2 is a 3xN Matrix, so the result
    should be a Vector of dimension 3
    Is this intended or a bug?

    Thanks
    Benjamin

    ---




---


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