本書是Brian W. Kernighan和Rob Pike合著的最新力作。本書從排錯(cuò)、測(cè)試、性能、可移植性、設(shè)計(jì)、界面、風(fēng)格和記法等方面,討論了程序設(shè)計(jì)中實(shí)際的、又是非常深刻和具有廣泛意義的思想、技術(shù)和方法,它的翻譯出版將填補(bǔ)國(guó)內(nèi)目前這方面書籍的空白。本書值得每個(gè)夢(mèng)想并努力使自己成為優(yōu)秀程序員的人參考,值得每個(gè)計(jì)算機(jī)專業(yè)的學(xué)生和計(jì)算機(jī)工作者閱讀,也可作為程序設(shè)計(jì)高級(jí)課程的教材或參考書。
Returns weighted percentiles of a sample given the weight vector w
% The idea is to give more emphasis in some examples of data as compared to
% others by giving more weight. For example, we could give lower weights to
% the outliers.
% The motivation to write this function is to compute percentiles for Monte
% Carlos simulations where some simulations are very bad (in terms of goodness
% of fit between simulated and actual value) than the others and to give
% the lower weights based on some goodness of fit criteria.