Skip to content

Add count_linear_extensions() R function for approximating linear extensions#41

Open
ChinmayRout9040895625 wants to merge 2 commits into
GeomScale:developfrom
ChinmayRout9040895625:feature-linear-extensions
Open

Add count_linear_extensions() R function for approximating linear extensions#41
ChinmayRout9040895625 wants to merge 2 commits into
GeomScale:developfrom
ChinmayRout9040895625:feature-linear-extensions

Conversation

@ChinmayRout9040895625
Copy link
Copy Markdown

Adds an R interface for counting linear extensions of partial orders via OrderPolytope
volume estimation. Depends on the corresponding volesti C++ changes.

(1) Changes

  • src/count_linear_extensions.cpp — Rcpp bridge wrapping the C++ OrderPolytope volume API
  • R/count_linear_extensions.R — R wrapper function with roxygen2 documentation
  • NAMESPACE — Exported count_linear_extensions

(2)Usage

(i)Chain: exactly 1 linear extension
count_linear_extensions(4, rbind(c(0,1), c(1,2), c(2,3)))
(ii)Antichain: exactly 4! = 24 linear extensions
count_linear_extensions(4, matrix(ncol=2, nrow=0))
(iii)With algorithm choice
count_linear_extensions(4, rbind(c(0,1), c(0,2)), algorithm = "CG")

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