added stubs for remaining median algorithms

This commit is contained in:
incredibleLeitman 2020-10-06 15:10:36 +02:00
parent f072f162b2
commit 3b6d9f349f
3 changed files with 20 additions and 0 deletions

3
MedianOfMedians.h Normal file
View File

@ -0,0 +1,3 @@
#pragma once
// https://en.wikipedia.org/wiki/Median_of_medians

14
RandomizedSelect.h Normal file
View File

@ -0,0 +1,14 @@
#pragma once
/*
// Anmerkung: code funktioniert!
RANDOMIZED-SELECT(A,p,r,i)
if (p==r) then return A[p]
q=RANDOMIZED_PARTITION(A,p,r) //Pivot Element A[q]
k=q-p+1 //Anzahl Elemente A[p..q]
if (i==k) then return A[q] //Pivot ist das gesuchte
elseif (i<k)
then return RANDOMIZED-SELECT(A,p,q-1,i)
else return RANDOMIZED-SELECT(A,q+1,r,i-k)
*/

3
Wirth.h Normal file
View File

@ -0,0 +1,3 @@
#pragma once
// http://ndevilla.free.fr/median/median/index.html