Skip to content

Docs: add dedicated partitions/compositions vignettes and refresh README#60

Merged
jwood000 merged 22 commits intomainfrom
docs-distinct-compositions
Mar 7, 2026
Merged

Docs: add dedicated partitions/compositions vignettes and refresh README#60
jwood000 merged 22 commits intomainfrom
docs-distinct-compositions

Conversation

@jwood000
Copy link
Owner

@jwood000 jwood000 commented Mar 7, 2026

Documentation-focused PR.

Summary

This PR focuses primarily on documentation and website improvements, including a reorganization of vignette content around integer partitions and integer compositions, along with a refreshed README that better highlights the package’s capabilities.

It also introduces a small type-safety improvement in the distinct compositions implementation and minor repository housekeeping changes.

Key Changes

  • Added two new vignettes:

    • Integer Partitions in RcppAlgos
    • Integer Compositions in RcppAlgos
  • Refactored the constraints vignette to focus on constraint-driven enumeration and link to the new partition/composition articles.

  • Expanded documentation and benchmarks related to compositions (including distinct parts and restricted targets).

  • Migrated vignette output from rmarkdown::html_vignette to prettydoc::html_pretty.

  • Updated README structure and messaging to better highlight key features and new documentation.

  • Repository housekeeping:

    • moved CRAN release checklist to dev/
    • added dev/ to .Rbuildignore
  • Minor C++ cleanup:

    • replaced static_cast<int>(nRows) comparisons with std::size_t comparisons in the distinct compositions generator.

Motivation

The goal is to provide dedicated documentation for integer partitions and integer compositions, which had previously been embedded within the constraints vignette. This separation improves clarity and makes it easier for users to discover functionality related to these topics.

Impact

  • User-facing API: unchanged
  • Documentation: significantly expanded and reorganized
  • Runtime behavior: unchanged (aside from a small type-safety improvement in C++)

Notes for Reviewers

  • Verify vignette rendering with the new prettydoc output format.
  • Confirm that documentation claims regarding compositions (distinct parts and restricted targets) match current functionality.

Document `partitionsGeneral` usage across standard, distinct, and
multiset partitions, including `freqs`, `table()` input, and `nThreads`
examples
Use ISO date format in YAML header and wrap URL targets in angle
brackets for R Markdown compatibility
Add prettydoc to Suggests, update vignette YAML to use
`prettydoc::html_pretty` with the architect theme, and replace LaTeX
inputenc with UTF-8 encoding tags
- Retitle vignette and switch HTML output to prettydoc
- Replace detailed partitions/compositions sections with brief overview
  and links
- We focus solely on constraints now and have dedicated vignettes
  for other topics
Refresh the URL-wrapping regex to handle http/https and add a snippet
for updating vignette dates.
Refresh link text in GeneralCombinatorics and point SubsetSum references
to the IntegerPartitions vignette instead of the constraints section.
Keep AI_REVIEW_MODEL override behavior unchanged
Document standard, weak, and distinct compositions with
`compositionsGeneral()`, including comparisons to `permuteGeneral()` and
performance examples.
- Document unranking/sampling for distinct-part and target-restricted
  compositions
- Add specialized composition benchmarks and clarify
  iterator/composition notes
- Explain `target` semantics for integer partitions and fix minor
  typos/formatting
Clarify the Rcpp modules -> S4/external pointer transition, add
accessor-caching benchmarks/profiling, and update headings, examples,
and vignette date/output.
Update setup details (hardware/software versions) and recorded timings,
fix a typo, and add specialized composition benchmark sections/examples
Add sections documenting `target` usage for partitions and new
composition sampling/unranking capabilities, and refresh vignette dates,
links, and timing outputs.
Add `dev/` to `.Rbuildignore` to keep release notes out of the build
Improve accessibility by adding descriptive `alt` attributes and
standardizing HTML formatting for embedded screenshots.
Delete Jekyll/pkgdown config, CSS/JS, and reference images that are no
longer needed.
Expand package description and feature list, refresh sections/links, and
modernize R code snippets for consistency and clarity
* Improve README with clearer introduction and feature overview
* Add “What Makes RcppAlgos Unique” section highlighting specialized algorithms
* Mention prime utilities and acknowledge Kim Walisch’s work
* Refine usage examples and iterator demonstration
* Regenerate vignette outputs and documentation under doc/
* Update links to new articles for partitions, compositions, and constraints

This commit refreshes the project documentation to better highlight
RcppAlgos capabilities and align the README with the pkgdown site.
Cast `v.size()` to `int` when checking `first_idx` to prevent
mismatched-type comparisons.
@jwood000 jwood000 merged commit d12de73 into main Mar 7, 2026
13 checks passed
@jwood000 jwood000 deleted the docs-distinct-compositions branch March 7, 2026 22:26
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