Skip to content

weighted jaccard functions#3

Open
jefferis wants to merge 8 commits into
masterfrom
feature/weighted-jaccard
Open

weighted jaccard functions#3
jefferis wants to merge 8 commits into
masterfrom
feature/weighted-jaccard

Conversation

@jefferis

@jefferis jefferis commented Apr 4, 2026

Copy link
Copy Markdown
Collaborator
  • brewing in coconat but wanted C++ versions for speed/memory reasons
  • now suggests Matrix

@jefferis jefferis force-pushed the feature/weighted-jaccard branch from 6a1df1f to cc7e20f Compare April 4, 2026 08:38
jefferis added 6 commits April 4, 2026 16:03
* this mean that it can be tested for equivalence
* and rename both functions
* this should halve memory usage
* 4 threads are a good compromise in tests
c_weighted_jaccard_sparse() gains:
- triangle=FALSE: return dgCMatrix (general) by default, dsCMatrix on TRUE
- distance=TRUE: return 1 - similarity (with warning about densification)

Companion changes:
- importFrom(methods, as); methods added to Imports
- expanded test coverage (+70 lines)
- src/Makevars: replace $(shell Rscript ... RcppThread::LdFlags()) with
  $(SHLIB_OPENMP_CXXFLAGS) — drops GNU make extension flagged by R CMD
  check WARNING, while still pulling in pthread/OpenMP per platform
Use \link[Matrix:dgCMatrix-class]{dgCMatrix} in roxygen for the
hand-written R/weighted_jaccard.R and the cpp roxygen blocks in
src/weighted_jaccard.cpp, regenerating RcppExports and the .Rd files.
WORDLIST picks up the new spelling terms surfaced by spelling::spell_check_package().
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.

1 participant