qsort

버전 1.2 (1.47 KB) 작성자: Malcolm McLean
C-style qsort routine that takes comparison function.
다운로드 수: 831
업데이트 날짜: 2014/11/29

라이선스 보기

Simple implementation of quicksort algorithm in Matlab. It's O(N log N) but the only optimisation is that the pivot point is the central element (to prevent pathological behaviour on sorted input). It takes a C-style comparison function. If the vector to sort is a cell array, the comparison function works on cell contents. Any type of data can be sorted, as long as you can write a comparator for it.

인용 양식

Malcolm McLean (2024). qsort (https://www.mathworks.com/matlabcentral/fileexchange/26612-qsort), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2009b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

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

Toolbox

1.1.0.0

Patch to reduce the number of recursions when fed data of all equal value.

1.0.0.0