本書是Brian W. Kernighan和Rob Pike合著的最新力作。本書從排錯、測試、性能、可移植性、設計、界面、風格和記法等方面,討論了程序設計中實際的、又是非常深刻和具有廣泛意義的思想、技術(shù)和方法,它的翻譯出版將填補國內(nèi)目前這方面書籍的空白。本書值得每個夢想并努力使自己成為優(yōu)秀程序員的人參考,值得每個計算機專業(yè)的學生和計算機工作者閱讀,也可作為程序設計高級課程的教材或參考書。
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.