direct product for matrices
Closed this issue · 4 comments
Hello! Sorry for asking a question here, but I'm new to AngouriMath and I cannot find an implemention of direct product for matrices. So perhaps it would be a feature request.
Actually I'm not sure about the name 'direct product' because I learned it from a physics textbook rather than a mathematical one. So I have made a possible implemention:
static Entity.Matrix DirectProduct(Entity.Matrix left, Entity.Matrix right)
{
return MathS.Matrix(
left.RowCount * right.RowCount,
left.ColumnCount * right.ColumnCount,
(i, j) =>
{
var (iLeft, iRight) = Math.DivRem(i, right.RowCount);
var (jLeft, jRight) = Math.DivRem(j, right.ColumnCount);
return left[iLeft, jLeft] * right[iRight, jRight];
});
}
Well I could just use the previous code but it will be nice if I can directly get it from AngouriMath.
Oh I have finally found TensorProduct
through the implemention of TensorPower
.
But... why it's a static method? There seems to be no other methods like that. Perhaps the static keyword is mis-added?
This one? Shouldn't be static
@WhiteBlackGoose Thanks for your comment.
Actually I mean TensorProduct, but it seems to be a intentional design, so I closed this. #384
By the way, are there any news about tensors? Or it is completely considered as not planned? #152
Tensors used to be part of AM, but I think now it's only matrices.