c10-3 (779541), страница 2
Текст из файла (страница 2)
(The simplex method of linear programming,Sample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5)Copyright (C) 1988-1992 by Cambridge University Press.Programs Copyright (C) 1988-1992 by Numerical Recipes Software.Permission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copying of machinereadable files (including this one) to any servercomputer, is strictly prohibited.
To order Numerical Recipes books,diskettes, or CDROMsvisit website http://www.nr.com or call 1-800-872-7423 (North America only),or send email to trade@cup.cam.ac.uk (outside North America).}}du=(*df)(u);Now all the housekeeping, sigh.if (fu <= fx) {if (u >= x) a=x; else b=x;MOV3(v,fv,dv, w,fw,dw)MOV3(w,fw,dw, x,fx,dx)MOV3(x,fx,dx, u,fu,du)} else {if (u < x) a=u; else b=u;if (fu <= fw || w == x) {MOV3(v,fv,dv, w,fw,dw)MOV3(w,fw,dw, u,fu,du)} else if (fu < fv || v == x || v == w) {MOV3(v,fv,dv, u,fu,du)}}.