Skip to content

Commit

Permalink
Merge pull request #59 from ros/clalancette/fix-docs
Browse files Browse the repository at this point in the history
Change function signature to use pointer instead of array.
  • Loading branch information
jonbinney authored Nov 4, 2021
2 parents bbb45fd + 4f05592 commit 5507bc5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/filters/median.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ namespace filters
Series: Prentice-Hall Series in Automatic Computation
---------------------------------------------------------------------------*/
template<typename elem_type>
elem_type kth_smallest(elem_type a[], int n, int k)
elem_type kth_smallest(elem_type * a, int n, int k)
{
int i, j, l, m;
elem_type x;
Expand All @@ -86,7 +86,7 @@ elem_type kth_smallest(elem_type a[], int n, int k)
}

template<typename elem_type>
elem_type median(elem_type a[], int n)
elem_type median(elem_type * a, int n)
{
return kth_smallest(a, n, (((n) & 1) ? ((n) / 2) : (((n) / 2) - 1)));
}
Expand Down

0 comments on commit 5507bc5

Please sign in to comment.