Skip to content

Tests cpp interface#47

Open
Nowosad wants to merge 5 commits into
drostlab:masterfrom
Nowosad:test-cpp-interface
Open

Tests cpp interface#47
Nowosad wants to merge 5 commits into
drostlab:masterfrom
Nowosad:test-cpp-interface

Conversation

@Nowosad

@Nowosad Nowosad commented Jan 27, 2026

Copy link
Copy Markdown
Contributor

adds line // [[Rcpp::interfaces(r, cpp)]] in src/dist_matrix.cpp and then run devtools::document() -- this adds the rest of the files exporting all cpp functions in the cpp file

 and then devtools::document()
@brownag

brownag commented May 27, 2026

Copy link
Copy Markdown
Contributor

This looks good to me!

@Nowosad

Nowosad commented May 27, 2026

Copy link
Copy Markdown
Contributor Author

Hi @brownag -- could you take one more look at the new changes? In relation to your comment at #46 (comment), I moved distance_cpp from dist_matrix.cpp to utils.h, and also stopped exporting utils in C++. What do you think? An alternative to this could be to create a new file (e.g., distance_cpp.h) just for the distance_cpp and related functions.

@brownag

brownag commented May 27, 2026

Copy link
Copy Markdown
Contributor

Ya, this is essentially what I had in mind, as far as moving some things out of dist_matrix.cpp
Te organization into multiple files I guess depends on how often utils.h may need to be used more generically without the distance functions. So distance_cpp.h or similar would good organization since that is a bit more specialized?

@Nowosad

Nowosad commented May 27, 2026

Copy link
Copy Markdown
Contributor Author

@brownag Ok -- I made it even cleaner. Now:

  • the distance_cpp (and related) is in src/distance_cpp.cpp
  • the utils.h is now split into utils.h and utils.cpp
  • the dist_matrix.cpp is now renamed to dist_functions.cpp

I think it is ready for review (and merge)

CC: @HajkD

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