Ask Your Question

AllanGH's profile - activity

2015-04-30 09:30:03 -0600 asked a question Construct a Mat of pointers to a Mat

Hi all!

I've tried to google this a lot - but without any luck. Hope you can help!

Basically I want to construct the following cyclic matrix

M =
|a *b *c|
|
b c *a|
|
c *a *b|

where the elements are pointers to a 1D Mat

v = (a b c)

Such that whenever I change a value in the vector the matrix is then updated accordingly, and I can multiply the matrix M with another matrix for instance.

Am I supposed to use something like Ptr<mat> to initialise M? And how do I assign pointers to this matrix? I'm using C++.

Best Al