Einstein summation library
klknn
klknn.gh at gmail.com
Wed Jan 18 21:32:50 UTC 2023
On Monday, 16 January 2023 at 10:00:53 UTC, Zenw wrote:
> https://code.dlang.org/packages/gged/~main
>
> I have been working on extending the functionality of
> multidimensional arrays using mir.ndslice, and now einstein
> summation is available.
>
> It may not be practical, but it can be described nicely, like
> below, so I will introduce this.
>
> ```D
> auto A = iota(9.).array.gged!double(3,3);
> auto x = iota(3.).gged!double(3);
> auto Ax = Einsum | A.ij*x.j; // [5, 14, 23]
> ```
Very nice. Do you plan to make it `@nogc nothrow` like
mir-algorithm?
More information about the Digitalmars-d-announce
mailing list