-
-
Notifications
You must be signed in to change notification settings - Fork 193
Generalize view and size functions #1660
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
Generalize view and size functions #1660
Conversation
I think this error will be gone once #1628 is merged in. |
# Conflicts: # stan/math/prim/fun/cols.hpp # stan/math/prim/fun/transpose.hpp
Jenkins Console Log Machine informationProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G22010CPU: G++: Clang: |
This is now ready for a review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is missing some tests then its good to go. I flagged all functions that need them.
* @throw <code>std::out_of_range</code> if the index is out of range. | ||
*/ | ||
template <typename T, typename = require_eigen_vector_t<T>> | ||
inline void check_vector_index(const char* function, const char* name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is missing tests.
Jenkins Console Log Machine informationProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G22010CPU: G++: Clang: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding tests.
Summary
Generalizes inputs to view and size functions (
col
,row
,sub_col
,sub_row
,head
,tail
,diagonal
,transpose
,cols
,rows
,num_elements
,dims
).Tests
This is a refactor so no new tests.
Side Effects
None.
Checklist
Math issue Generalize matrix function signatures #1470
Copyright holder: Tadej Ciglarič
The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses:
- Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
- Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
the basic tests are passing
./runTests.py test/unit
)make test-headers
)make test-math-dependencies
)make doxygen
)make cpplint
)the code is written in idiomatic C++ and changes are documented in the doxygen
the new changes are tested