mirror of
https://github.com/aicodix/dsp.git
synced 2026-04-27 14:30:36 +00:00
added asserts for k and n
This commit is contained in:
parent
46403a7b0a
commit
6013451ee2
1 changed files with 1 additions and 0 deletions
|
|
@ -46,6 +46,7 @@ static TYPE select(TYPE *a, int l, int h, int k)
|
|||
template <typename TYPE>
|
||||
TYPE quick_select(TYPE *a, int k, int n)
|
||||
{
|
||||
assert(n && k < n);
|
||||
return QUICK::select(a, 0, n-1, k);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue