These are chat archives for libmir/public

14th
Sep 2016
Ilya Yaroshenko
@9il
Sep 14 2016 05:45
Please wrote your opinion on this issue libmir/mir#337
Edwin van Leeuwen
@BlackEdder
Sep 14 2016 11:40
Stupid question, but does mir support basic matrix operations/arithmatic?
I tried:
```D
Sorry keeps pressing enter to soon :)
Ilya Yaroshenko
@9il
Sep 14 2016 11:41
Like matrix multiplication - No, see libmir/mir#327
Edwin van Leeuwen
@BlackEdder
Sep 14 2016 11:41
Ah :(
Ilya Yaroshenko
@9il
Sep 14 2016 11:41
But operations like a[] += b; are supported
v0.17.0-alpha3 has matrix multiplication
Edwin van Leeuwen
@BlackEdder
Sep 14 2016 11:42

Hmm I tried:

[1.0,1.0].sliced([2,1]) -[1.0,1.0].sliced([2,1])

This resulted in an error: incompatible types for ((x) - (mu)): 'Slice!(2LU, double)' and 'Slice!(2LU, double)'

Matrix transposation?
Edwin van Leeuwen
@BlackEdder
Sep 14 2016 11:44
Any clue on my error when trying subtraction?
Ilya Yaroshenko
@9il
Sep 14 2016 11:44
[1.0,1.0].sliced([2,1]) -[1.0,1.0].sliced([2,1]) - this does not work, because ndslice follows D array syntax - no allocations for arithmetic ops
only a[] op= b; are supported
Edwin van Leeuwen
@BlackEdder
Sep 14 2016 11:45
ah
Edwin van Leeuwen
@BlackEdder
Sep 14 2016 11:49
Thanks! It might be nice to write a tutorial on this. It seems to be quite difficult to discover these things without knowing glass/blas inside out.
The term gemm is not very informative for me :)
Ah I see the issue you linked to is about this already :)
Never mind.
Edwin van Leeuwen
@BlackEdder
Sep 14 2016 12:08
One more question :) Is there a way to calculate the determinant?
Ilya Yaroshenko
@9il
Sep 14 2016 12:09
No, will be done after few months. You cab use scid library for now.
but it does not support ndslice
it uses lapack internally to compute determinant
Edwin van Leeuwen
@BlackEdder
Sep 14 2016 12:11
Thanks! Will probably use scid for now.
Ilya Yaroshenko
@9il
Sep 14 2016 12:12
Another way is to use lapack with mir
But it requires time to lears few lapack funcitons
Edwin van Leeuwen
@BlackEdder
Sep 14 2016 12:13
Any clue if a simple recursive implementation would be (much) slower than using scid?
Ilya Yaroshenko
@9il
Sep 14 2016 12:15
Yes, any simple implementation will be slower