I'm just learning for the math exams and see that you can save matrix calculation overhead if you just don't calculate the full matrix. For example the Householder matrix:
H = I - 2*vv^T/v^T v
multiply with a vector to apply transformation:
H*x
This can be transformed into:
_Hx = x - 2v v^T_x/v^Tv
Here you only need to calculate two scalar products, a matrix scalar product and a vector subtraction.
Especially for high dimensional vectors this could be a great speed improvement.
The idea:
We make new transformations, prefix them maybe with 'Fast' or something like that, that contain a transformation chain inside where we push the vectors and not the complete calculated matrix. If you want you can call GetMatrix() and get it anyway, but when we add a 'Multiply(vector)' function to the transformation chains, that multiplies each step with the vector, we have this fast thing.
This won't work completely for Householder matrices (because you subtract the vector itself), but for linear systems this would work.
For non-linear systems we can make a new transformation class that applies such functions. We could then mix both systems together.
I'm just learning for the math exams and see that you can save matrix calculation overhead if you just don't calculate the full matrix. For example the Householder matrix: H = I - 2*vv^T/v^T v multiply with a vector to apply transformation: H*x This can be transformed into: _Hx = x - 2v v^T_x/v^Tv Here you only need to calculate two scalar products, a matrix scalar product and a vector subtraction. Especially for high dimensional vectors this could be a great speed improvement.
The idea: We make new transformations, prefix them maybe with 'Fast' or something like that, that contain a transformation chain inside where we push the vectors and not the complete calculated matrix. If you want you can call GetMatrix() and get it anyway, but when we add a 'Multiply(vector)' function to the transformation chains, that multiplies each step with the vector, we have this fast thing. This won't work completely for Householder matrices (because you subtract the vector itself), but for linear systems this would work. For non-linear systems we can make a new transformation class that applies such functions. We could then mix both systems together.