-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
times() is not overloaded for Mat x Vec #4
Comments
Yes, this is a good point and it would be nice to support. Currently the only way to perform operations on two tensors of varying rank is by representing the lower rank tensor as an instance of the higher rank with extra dimensions of
This is also a good point. Earlier, we played with both If you feel like submitting a PR, I'll be happy to review it. Appreciate the suggestions! |
I've actually taken the dimension stuff and combined it with EJML backed matrices in https://github.com/FRCTeam4069/Keigen, simply because I wanted something thrown together that I could try this with. In that case, I simply made the vector type a typealias:
That code would take some adapting because it's using EJML instead of rolling a matrix backend from scratch but it could certainly be adapted for use in this project |
That's a neat solution, thanks for the tip! I'd like to use a linear algebra backend such as ND4J, Commons Math or EJML, but haven't gotten around to it yet. Another library you might want to check out is KMath. |
After giving this some more thought, I believe either representation could make sense, e.g. representing a Vector as a subtype of Matrix with |
In the current state of the library, it is impossible to multiply a m x n matrix with an n-dimensional vector. I've gotten around this by adding functions to convert between the types, however this is a construct I think should be supported by the library
I've glanced through the source, and it seems as though the inheritance relationship between these types is backwards. Mat is a subclass of Vec<Vec<E, Cols>, Rows>, however it seems as though Mat should be a top level type, while Vec is the special case where Cols=1.
The text was updated successfully, but these errors were encountered: