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

Cleaning up vars, loops, etc #54

Merged
merged 1 commit into from
Oct 18, 2023
Merged

Cleaning up vars, loops, etc #54

merged 1 commit into from
Oct 18, 2023

Conversation

cjrolo
Copy link
Collaborator

@cjrolo cjrolo commented Oct 18, 2023

This PR addresses a few inconsistencies around variable names, function naming, etc

Also accepts the suggestions made in early PRs.

Copy link
Contributor

@rukai rukai left a comment

Choose a reason for hiding this comment

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

Nice! lets land this.

@@ -10,7 +10,7 @@ use std::cmp;
/// # Returns
///
/// The mean squared error, or an error message if the vector lengths are different.
pub fn calculate_error(vec1: &Vec<f64>, vec2: &Vec<f64>) -> Option<f64> {
pub fn calculate_error(vec1: &[f64], vec2: &Vec<f64>) -> Option<f64> {
Copy link
Contributor

Choose a reason for hiding this comment

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

heh, reviewing this again, I should have mentioned changing vec2 to &[f64] as well.
It doesnt currently affect anything though as we already have a vec to pass in for vec2 all the times we call calculate_error. Its just good practice.

@rukai rukai merged commit 2f51db2 into main Oct 18, 2023
2 checks passed
@cjrolo cjrolo deleted the cleanup branch January 10, 2024 08:48
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