public Double getQuantile ( int quantile , int base ) { if ( getCount ( ) == 0 ) return null ; if ( ( quantile > base ) || ( quantile <= 0 ) || ( base <= 0 ) ) throw new IllegalArgumentException ( "Incorrect quantile/base specified." ) ; double quantileFraq = ( double ) quantile / base ; int index = ( int ) Math . round ( quantileFraq * ( getCount ( ) - 1 ) ) ; return ( double ) data . get ( index ) + shift ; }
Returns quantile over base value .