www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - matrix operations

reply =?UTF-8?B?UmVuw6k=?= Heldmaier <rene.heldmaier gmail.com> writes:
Hi,

I'm looking for some basic matrix/vector operations and other 
numeric stuff.

I spent quite a lot time in reading through the mir 
documentation, but i kinda miss the bigger picture. I'm not a 


I have also looked at the documentation of the lubeck package.

What i have seen right now reminds me of the saying "Real 
programmers can write FORTRAN in any language".

Is there a type to do matrix operations with nice syntax (e.g. 
using * operator for multiplication)?
Nov 27 2019
next sibling parent jmh530 <john.michael.hall gmail.com> writes:
On Wednesday, 27 November 2019 at 16:16:04 UTC, René Heldmaier 
wrote:
 Hi,

 I'm looking for some basic matrix/vector operations and other 
 numeric stuff.

 I spent quite a lot time in reading through the mir 
 documentation, but i kinda miss the bigger picture. I'm not a 


 I have also looked at the documentation of the lubeck package.

 What i have seen right now reminds me of the saying "Real 
 programmers can write FORTRAN in any language".

 Is there a type to do matrix operations with nice syntax (e.g. 
 using * operator for multiplication)?
Matrix/vector operations can be done with lubeck, which itself is built upon mir. mtimes is the one for matrix multiplication. I would not bank on any changes in operator overloading (e.g. allowing an operator for matrix multiplication) any time soon.
Nov 27 2019
prev sibling next sibling parent reply bachmeier <no spam.net> writes:
On Wednesday, 27 November 2019 at 16:16:04 UTC, René Heldmaier 
wrote:
 Hi,

 I'm looking for some basic matrix/vector operations and other 
 numeric stuff.

 I spent quite a lot time in reading through the mir 
 documentation, but i kinda miss the bigger picture. I'm not a 


 I have also looked at the documentation of the lubeck package.

 What i have seen right now reminds me of the saying "Real 
 programmers can write FORTRAN in any language".

 Is there a type to do matrix operations with nice syntax (e.g. 
 using * operator for multiplication)?
I do have all that for my own use. I've never bothered to turn it into something others could use because I love the garbage collector, but that's a turnoff for others. But I'm more than happy to share if you're really interested. I'm also working on an R -> D compiler, but it's not helpful at this point. It wouldn't take much to create a simple wrapper over mir/lubeck to do operator overloading. This is low-hanging fruit for someone that wants to contribute to the language. Until I win the lottery, I won't have time to do it myself.
Nov 27 2019
parent reply =?UTF-8?B?UmVuw6k=?= Heldmaier <rene.heldmaier gmail.com> writes:
On Wednesday, 27 November 2019 at 16:35:40 UTC, bachmeier wrote:

 I do have all that for my own use. I've never bothered to turn 
 it into something others could use because I love the garbage 
 collector, but that's a turnoff for others. But I'm more than 
 happy to share if you're really interested. I'm also working on 
 an R -> D compiler, but it's not helpful at this point.
I would actually like it to be garbage collected, because i would use it for some skripts instead of matlab. Matlab is really horrible, but if you want to do something quick, e.g. analyse sensor data, you have everything you need in an easy to use interface. I think D could really shine in this area...
 It wouldn't take much to create a simple wrapper over 
 mir/lubeck to do operator overloading. This is low-hanging 
 fruit for someone that wants to contribute to the language. 
 Until I win the lottery, I won't have time to do it myself.
Yeah, i thought about that also... Is there any good article about mir/ndslice beside the documentation? I mean something more abstract, like a general overview.
Nov 27 2019
parent bachmeier <no spam.net> writes:
On Wednesday, 27 November 2019 at 18:10:36 UTC, René Heldmaier 
wrote:
 On Wednesday, 27 November 2019 at 16:35:40 UTC, bachmeier wrote:

 I do have all that for my own use. I've never bothered to turn 
 it into something others could use because I love the garbage 
 collector, but that's a turnoff for others. But I'm more than 
 happy to share if you're really interested. I'm also working 
 on an R -> D compiler, but it's not helpful at this point.
I would actually like it to be garbage collected, because i would use it for some skripts instead of matlab. Matlab is really horrible, but if you want to do something quick, e.g. analyse sensor data, you have everything you need in an easy to use interface. I think D could really shine in this area...
Absolutely. In fact, it has been shining for me.
 It wouldn't take much to create a simple wrapper over 
 mir/lubeck to do operator overloading. This is low-hanging 
 fruit for someone that wants to contribute to the language. 
 Until I win the lottery, I won't have time to do it myself.
Yeah, i thought about that also... Is there any good article about mir/ndslice beside the documentation? I mean something more abstract, like a general overview.
Not that I'm aware. I've not spent much time on it, since I already had my libraries working before Mir was a thing.
Nov 27 2019
prev sibling parent Ferhat =?UTF-8?B?S3VydHVsbXXFnw==?= <aferust gmail.com> writes:
On Wednesday, 27 November 2019 at 16:16:04 UTC, René Heldmaier 
wrote:
 Hi,

 I'm looking for some basic matrix/vector operations and other 
 numeric stuff.

 I spent quite a lot time in reading through the mir 
 documentation, but i kinda miss the bigger picture. I'm not a 


 I have also looked at the documentation of the lubeck package.

 What i have seen right now reminds me of the saying "Real 
 programmers can write FORTRAN in any language".

 Is there a type to do matrix operations with nice syntax (e.g. 
 using * operator for multiplication)?
Probably you should go for mir packages. But if you live with c++ linkage and matrix support of opencv is enough for your case, there is OpenCV binding for D. https://github.com/aferust/opencvd
Nov 27 2019