Conversation
|
For vectors, the direct sum is The present function seems to treat any mix of vectors & matrices as if they were matrices: |
Ah, you're right!
Should mixing matrix and vector be undefined? And should in that case the user explicitly then provide a 1-column matrix instead?
Ah, that is a neat trick I just learned!
To be honest, I'm not sure. But I remember reading somewhere (hopefully not taking it out of context), that it should follow In that sense, it can be generalized. Maybe something like this But it seems there is a time penalty for generalizing) |
Implements
directsum(https://en.wikipedia.org/wiki/Matrix_addition#Direct_sum) and unicode operator⊕. Currently it is limited to matrices but it could be extended to support multiple dimentsions (similar to the current behavior betweenVector ⊕ Matrix)