A fast NCHOOSEK alternative for engineers who like fast NCHOOSEK alternatives

버전 1.1.0.0 (2.6 KB) 작성자: Jose
This code recursively generates K-subsets of an N-set.
다운로드 수: 421
업데이트 날짜: 2014/1/27

라이선스 보기

GETNEXTCOMBINATION returns the next K-subset of an N-set. It implements the "Revolving Door" (NEXKSB) algorithm found in "Combinatorial Algorithms", 2nd Ed., by Albert Nijenhuis and Herbert S. Wilf. It is a recursive alternative to the NCHOOSEK command that is extremely fast (O(1)), at the expense of slightly more user interaction. (You do get something that NCHOOSEK does not give you for
this extra effort: see input "m".) Apart from its efficiency, it is awesome because each new K-subset differs from the last by a single element and the last combination generated differs from the first combination by a single element.

인용 양식

Jose (2024). A fast NCHOOSEK alternative for engineers who like fast NCHOOSEK alternatives (https://www.mathworks.com/matlabcentral/fileexchange/45165-a-fast-nchoosek-alternative-for-engineers-who-like-fast-nchoosek-alternatives), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2012a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Whos에 대해 자세히 알아보기
태그 태그 추가

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.1.0.0

typos

1.0.0.0