-
Notifications
You must be signed in to change notification settings - Fork 116
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
Function/is correlation #315
Conversation
this example calls the is_correlation_matrix() function that is present in include/matrix_operations/EigenvaluesProblems.h
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!
const double tol = 1e-8; | ||
|
||
//check if all the diagonal elements are ones | ||
for(int i=0 ; i<matrix.rows() ; i++){ |
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.
please leave one empty space between for
and (
, similar to if
etc
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.
done!
/// |param[in] matrix | ||
bool is_correlation_matrix(const MT& matrix){ | ||
|
||
const double tol = 1e-8; |
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 could be a function parameter with default value.
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.
done
* new function is_correlation_matrix * update example function call this example calls the is_correlation_matrix() function that is present in include/matrix_operations/EigenvaluesProblems.h * remove blank line * remove blank line * fix spaces, add function parameter
* new function is_correlation_matrix * update example function call this example calls the is_correlation_matrix() function that is present in include/matrix_operations/EigenvaluesProblems.h * remove blank line * remove blank line * fix spaces, add function parameter
* new function is_correlation_matrix * update example function call this example calls the is_correlation_matrix() function that is present in include/matrix_operations/EigenvaluesProblems.h * remove blank line * remove blank line * fix spaces, add function parameter
* new function is_correlation_matrix * update example function call this example calls the is_correlation_matrix() function that is present in include/matrix_operations/EigenvaluesProblems.h * remove blank line * remove blank line * fix spaces, add function parameter
* new function is_correlation_matrix * update example function call this example calls the is_correlation_matrix() function that is present in include/matrix_operations/EigenvaluesProblems.h * remove blank line * remove blank line * fix spaces, add function parameter
* new function is_correlation_matrix * update example function call this example calls the is_correlation_matrix() function that is present in include/matrix_operations/EigenvaluesProblems.h * remove blank line * remove blank line * fix spaces, add function parameter
* new function is_correlation_matrix * update example function call this example calls the is_correlation_matrix() function that is present in include/matrix_operations/EigenvaluesProblems.h * remove blank line * remove blank line * fix spaces, add function parameter
* new function is_correlation_matrix * update example function call this example calls the is_correlation_matrix() function that is present in include/matrix_operations/EigenvaluesProblems.h * remove blank line * remove blank line * fix spaces, add function parameter
wrote the function
is_correlation_matrix()
inside volesti/include, and further updates the example sampler which calls this very function.