matrix multiplication

Sep 15, 2015 at 5:47pm
I have 2 arrays a & b. They are the same length. I want to multiply one array by the other. I have a script/code block that does this anyway. I want to know are their any functions that could multiply a[] x b[] into a product without a script?
Sep 15, 2015 at 6:22pm
Generally you overload the * operator in your class Matrix.

For the algorithm , easy find on Google .

1
2
3
4
5
6
7
8
Matrix& operator * (const Matrix& matrix1 , const Matrix& matrix2)
{
     Matrix mat;

   //The code
 
  return mat;
}
Sep 16, 2015 at 1:10am
Hi Ericool

Re:

//The code

Does the code include any single function matrix manipulators. a[1-5] x b[1-5] = ab[1ab-5ab]
Like I said (we) can write the scripts to do this, but, like OpenCV, does windows have any library functions that specifically perform matrix operations?

Foo a[n] x b[n]

Thank you for your time
Last edited on Sep 16, 2015 at 1:12am
Sep 19, 2015 at 4:54pm
Not sure if this will suit your purposes, but GLM is a library (intended for graphics processing) for all kinds of matrix operations:

http://glm.g-truc.net/0.9.4/index.html
Oct 6, 2015 at 3:32pm
Great suggestion. may be compatible OpenCV...
Oct 6, 2015 at 10:46pm
not with x , the characters to overload are limited.
Topic archived. No new replies allowed.