I was going through the GSL documentation and was curious why there were no vector * matrix functions. I get that vector * matrix is the same as matrix_transpose * vector. Why is it done this way as opposed to writing a function to do multiplication with the vector on the left hand side?

有帮助吗?

解决方案

I cannot look into the heads of GSL developers, but I imagine that they just didn't see a need for it: matrix transposition can be done in-place by iterating differently over the indices, so adding another function would just add more overhead. (In my own projects using GSL I've always wrapped GSL functions inside some higher-level functionality, thus hiding this kind of details)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top