资源描述:
《Algorithms, 4th Edition Errata.pdf》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、页码,1/11(W)ERRATA,FIRSTPRINTING(MARCH2011)CHAPTER1p.16i++isthesameasi=i+1andhasthevalueiinanexpression.Similarly,i--isthesamePrinted:asi=i-1.Thecode++iand--iarethesameexceptthattheexpressionvalueistakenaftertheincrement/decrement,notbefore.++iisthesam
2、easi=i+1;bothhavethevaluei+1inanexpression.Similarly,--iisFixed:thesameasi=i-1.Thecodei++andi--arethesameexceptthattheexpressionvalueisthevaluebeforetheincrement/decrement,notafter.ReportedbyDavidDurst,15-Sep-11.p.23Printed:if(c>0)returnDouble.NaN;Fi
3、xed:if(c<0)returnDouble.NaN;ReportedbyAliTekin,05-Sep-11.p.30,StdRandomAPIPrinted:initialize(seed)Fixed:setSeed(seed)ReportedbyPeterDrake,27-Jan-12.p.42,topfigurePrinted:StdDraw.line(x0,y0,x1,y1)Fixed:StdDraw.line(x1,y1,x2,y2)ReportedbyPieterAudenaer
4、t,12-Mar-12.p.52Printed:10&6is14Fixed:10
5、6is14ReportedbyZheLu,05-Jul-11.p.55,Exercise1.1.7cPrinted:for(intj=0;j6、al(N-1,k,p)andbinomial(N-1,k-1,p)ReportedbyDavidSprague,28-May-11.2012-07-15页码,2/11(W)p.59,Exercise1.1.27Printed:if((N==0
7、
8、(k<0))return1.0;Fixed:if(N==0&&k==0)return1.0;andif(N<0
9、
10、k<0)return0.0;ReportedbyDavidSprague,28-May-11.p.76,testclientPrinted:
11、Interval1DxandInterval1DyFixed:Interval1DxintervalandInterval1DyintervalReportedbySamKramer,17-May-11.p.76,testclientPrinted:PointFixed:Point2DReportedbySamKramer,17-May-11.p.76,testclientPrinted:box.draw()drawboxusingxlo,xhi,ylo,andyhiandremovedraw(
12、)methodsfromInterval1DandFixed:Interval2DorprovideaccessormethodsinInterval1Dtoaccessendpoints.ReportedbySamKramer,17-May-11.p.81Printed:s.rank(".");Fixed:s.indexOf(".");ReportedbyPradeepRao,05-May-11.p.94-95Printed:avg()Fixed:mean()ReportedbySamKram
13、er,29-Jun-11.p.99,WhitelistclientPrinted:set.rank(key)==-1Fixed:!set.contains(key)ReportedbyKevinWayne,02-Mar-11.p.104,orphanedobjectfigurePrinted:b=a;Fixed:a=b;andcorrespondingfixintextReportedbyWangNing,15-Mar-11.p.126implementationofthereadDoubles