You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assume we have a 2D matrix A with A1xA2 dimensions.
Assume we have a 2D matrix B with B1xB2 dimensions where B1<A1 and B2<A2.
Basically B "fits in" A.
Then I don't think there is a way to add B to a sub matrix (same size) of A efficiently. This rather popular operation in certain types of algorithms (which use merging and elimination of matrices). Note that this has been implemented in other libraries by using "projections" or "views". You just select a sub matrix of A without making any copies and then use it to do normal additions. You then can just dispose of the view because the data gets updated properly - and you can use all the normal operators you'd use (although only some of them probably make sense).
Do you just need to be able to basic operations, like addition, subtraction, and other element-wise ops?
To keep things simple sub-matrices were not included in EJML by design. I could create a wrapper class, but that would have a noticeable speed hit. Having the implementation create a local copy of the inner matrix might be faster and would have full access to all operations.
Assume we have a 2D matrix A with A1xA2 dimensions.
Assume we have a 2D matrix B with B1xB2 dimensions where B1<A1 and B2<A2.
Basically B "fits in" A.
Then I don't think there is a way to add B to a sub matrix (same size) of A efficiently. This rather popular operation in certain types of algorithms (which use merging and elimination of matrices). Note that this has been implemented in other libraries by using "projections" or "views". You just select a sub matrix of A without making any copies and then use it to do normal additions. You then can just dispose of the view because the data gets updated properly - and you can use all the normal operators you'd use (although only some of them probably make sense).
Please see Breeze.
The text was updated successfully, but these errors were encountered: