Skip to content

Change documenation of c++ part#11

Merged
veitveit merged 4 commits intomasterfrom
devel
Nov 19, 2025
Merged

Change documenation of c++ part#11
veitveit merged 4 commits intomasterfrom
devel

Conversation

@veitveit
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the C++ implementation of fuzzy c-means clustering by improving documentation and renaming functions to be more descriptive and self-documenting.

Key changes:

  • Renamed internal C++ functions to be more descriptive (e.g., cmeans_setupallocate_distance_matrix, cmeans_dissimilaritiesupdate_all_distances)
  • Added clear, concise documentation comments explaining the purpose of each function
  • Updated R interface files to reflect the renamed exported functions (c_plusplus_meansrun_fuzzy_cmeans, fill_missing_vals_and_ratioflag_missing_entries)

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
src/vsclust_algo.cpp Renamed 11 functions and added comprehensive C++-style documentation comments explaining each function's purpose
src/RcppExports.cpp Updated Rcpp export bindings to reflect renamed C++ functions
R/RunClustering.R Updated function call from c_plusplus_means to run_fuzzy_cmeans
R/RcppExports.R Updated R wrapper functions with new names, but introduced syntax issues with quote style and removed PACKAGE parameter

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread R/RcppExports.R Outdated
Comment thread R/RcppExports.R Outdated
Comment thread R/RcppExports.R Outdated
fill_missing_vals_and_ratio <- function(feature_mat, missing_vals, ratio_missing_vals, missing_value = NA_real_) {
invisible(.Call('_vsclust_fill_missing_vals_and_ratio', PACKAGE = 'vsclust', feature_mat, missing_vals, ratio_missing_vals, missing_value))
flag_missing_entries <- function(feature_mat, missing_vals, ratio_missing_vals, missing_value = NA_real_) {
invisible(.Call(`_vsclust_flag_missing_entries`, feature_mat, missing_vals, ratio_missing_vals, missing_value))
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

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

The quote style for the .Call function has changed from string quotes to backticks. In the original code, '_vsclust_fill_missing_vals_and_ratio' uses string quotes, but the new version uses backticks: `_vsclust_flag_missing_entries`. This changes the behavior - backticks are for non-standard evaluation/variable names, not string literals. This should use string quotes: '_vsclust_flag_missing_entries'.

Suggested change
invisible(.Call(`_vsclust_flag_missing_entries`, feature_mat, missing_vals, ratio_missing_vals, missing_value))
invisible(.Call('_vsclust_flag_missing_entries', feature_mat, missing_vals, ratio_missing_vals, missing_value))

Copilot uses AI. Check for mistakes.
Comment thread R/RcppExports.R Outdated
veitveit and others added 2 commits November 19, 2025 11:30
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@veitveit veitveit merged commit 44aedd2 into master Nov 19, 2025
5 of 7 checks passed
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.

2 participants