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

Operator[] on functions confusing #220

Closed
gchabert opened this issue Jul 19, 2016 · 0 comments
Closed

Operator[] on functions confusing #220

gchabert opened this issue Jul 19, 2016 · 0 comments
Assignees

Comments

@gchabert
Copy link
Contributor

gchabert commented Jul 19, 2016

Currently, if f is a n_m matrix-valued function, the components of f are the n_m entries.
We would expect f[0] to be the first row, not the entry (0,0).

The code is easy to change but we may lose memory optimization. E.g, building the function f:x -> eye(10) will actually build only 11 functions (the diagonal entries + one null function) whereas introducing each row function will lead to 30 functions (one for each row, one for each "zero" function inside the row, and one for the diagonal element).
In the other hand, we also improve efficiency when one has to evaluate a row simultaneously.

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

No branches or pull requests

1 participant