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

Function/is correlation #315

Merged
merged 5 commits into from
Jul 5, 2024

Conversation

atrayees
Copy link
Contributor

@atrayees atrayees commented Jul 5, 2024

wrote the function is_correlation_matrix() inside volesti/include, and further updates the example sampler which calls this very function.

this example calls the is_correlation_matrix() function that is present in include/matrix_operations/EigenvaluesProblems.h
Copy link
Contributor

@vfisikop vfisikop left a 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++){
Copy link
Contributor

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

Copy link
Contributor Author

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;
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@TolisChal TolisChal merged commit f1abc36 into GeomScale:develop Jul 5, 2024
25 of 27 checks passed
TolisChal pushed a commit that referenced this pull request Jul 7, 2024
* 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
TolisChal pushed a commit that referenced this pull request Jul 7, 2024
* 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
TolisChal pushed a commit to TolisChal/volume_approximation that referenced this pull request Jul 7, 2024
* 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
TolisChal pushed a commit to TolisChal/volume_approximation that referenced this pull request Jul 7, 2024
* 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
TolisChal pushed a commit to TolisChal/volume_approximation that referenced this pull request Jul 8, 2024
* 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
TolisChal pushed a commit to TolisChal/volume_approximation that referenced this pull request Jul 8, 2024
* 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
TolisChal pushed a commit to TolisChal/volume_approximation that referenced this pull request Jul 8, 2024
* 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
TolisChal pushed a commit that referenced this pull request Jul 17, 2024
* 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
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

Successfully merging this pull request may close these issues.

3 participants