|
Graphically:
|
|
S = overall quantile summary SC = quantile summary for the current substream N = size of the current substream |
if ( SC != empty; )
{
/* ---------------------------------
Merge all levels of SC
--------------------------------- */
sall = s0;
for ( i = 1; i <= L; i++ )
{
sall = Merge(sall, si);
}
/* ------------------------------------------------
Compress to an ε-approximate quantile summary
------------------------------------------------ */
Sk = compress( sall, ε/2 );
}
/* --------------------------------------------------
Construct ε-approximate quantile summary
-------------------------------------------------- */
S = S0
for ( i = 1; i ≤ k; i++ )
S = Merge(S, Si);
Use S to answer quantile query;
|
|
|
Note: log scale !!!
|
Note: log scale !!!
|