Skip to content

Conversation

@Marmaa0
Copy link

@Marmaa0 Marmaa0 commented Dec 8, 2024

Description

Added a geometric mean to the averages.rs file, whilst mean, median and mode are certainly more standard than the geometric mean, it is often used within finance, and a valuable average when confronted with sequences which have a multiplicative nature. I've tried to follow the same style as the previous averages, I'm very new to rust and programming in general so I apologise in advance if I have made some obvious or glaring errors.

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Checklist:

  • I ran bellow commands using the latest version of rust nightly.
  • I ran cargo clippy --all -- -D warnings just before my last commit and fixed any issue that was found.
  • I ran cargo fmt just before my last commit.
  • I ran cargo test just before my last commit and all tests passed.
  • I added my algorithm to the corresponding mod.rs file within its own folder, and in any parent folder(s).
  • I added my algorithm to DIRECTORY.md with the correct link.
  • I checked COUNTRIBUTING.md and my code follows its guidelines.

…s the previous averages. This is a core average function used in finance amongst other areas. I've added some tests to go with it.
@Marmaa0 Marmaa0 requested review from imp2002 and vil02 as code owners December 8, 2024 15:52
@Marmaa0 Marmaa0 changed the title Added geometric mean to av erages.rs Added geometric mean to averages.rs Dec 8, 2024
@codecov-commenter
Copy link

codecov-commenter commented Dec 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.48%. Comparing base (f66f836) to head (1e56398).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #846      +/-   ##
==========================================
+ Coverage   95.44%   95.48%   +0.04%     
==========================================
  Files         316      316              
  Lines       22750    22974     +224     
==========================================
+ Hits        21713    21937     +224     
  Misses       1037     1037              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Marmaa0 and others added 4 commits December 30, 2024 19:19
@Marmaa0 Marmaa0 closed this by deleting the head repository Jan 1, 2025
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