c2-3 (779461), страница 3
Текст из файла (страница 3)
The resulting routine tridag is one that we will use in later chapters.Naturally, one does not reserve storage for the full N × N matrix, but only forthe nonzero components, stored as three vectors. The set of equations to be solved is u1r1b 1 c1 0 · · · u2 r2 a2 b 2 c2 · · · ··· · · · · = · · · (2.4.1) uN−1rN−1· · · aN−1 bN−1 cN−1···0aNbNuNrNSample 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).which can be written as a 2N × 2N set of real equations, A −Cxb·=C Ayd.