Skip to content
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

Extend MatrixView API with overloaded operators #53

Open
aleixgg opened this issue Aug 1, 2016 · 0 comments
Open

Extend MatrixView API with overloaded operators #53

aleixgg opened this issue Aug 1, 2016 · 0 comments

Comments

@aleixgg
Copy link

aleixgg commented Aug 1, 2016

As it currently stands, the MatrixView struct in scid.matrix only provides the functionality to access elements with the opIndex and opIndexAssign overloaded operators.

It would be nice to have the arithmetic operators overloaded to provide elementwise operations. This would allow code like:

auto matrix_3 = 2 * matrix_1 - 1.5 * matrix_2^^2

Also I couldn't find any dot product for matrices. Following the nomenclature in std.numeric we could call this function dotProduct, so we could have code like:

auto Z = dotProduct(X, Y)

Is there any reason I overlooked why this has not been included? If it is just a lack of contributors, I'm already developing some of this stuff, and I will open a pull request so others can improve or point out possible errors in my code. When it is ready, it would be nice to merge it into the main repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant