Вопрос

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