home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
90%
| dexvert
| Hypertext Markup Language File (text/html)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| HTML document text
| default (weak)
| |
99%
| file
| LaTeX document text
| default
| |
98%
| file
| exported SGML document text
| default
| |
97%
| file
| exported SGML document, ASCII text, with CRLF, LF line terminators
| default
| |
80%
| TrID
| HyperText Markup Language with DOCTYPE
| default
| |
19%
| TrID
| HyperText Markup Language
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/281 LaTeX (Subdocument)
| default
| |
100%
| gt2
| HTML (Hyper Text Markup Language) Datei
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| text/html
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3c 21 44 4f 43 54 59 50 | 45 20 48 54 4d 4c 20 50 |<!DOCTYP|E HTML P|
|00000010| 55 42 4c 49 43 20 22 2d | 2f 2f 57 33 43 2f 2f 44 |UBLIC "-|//W3C//D|
|00000020| 54 44 20 48 54 4d 4c 20 | 33 2e 32 20 46 69 6e 61 |TD HTML |3.2 Fina|
|00000030| 6c 2f 2f 65 6e 22 3e 0a | 0a 3c 21 2d 2d 43 6f 6e |l//en">.|.<!--Con|
|00000040| 76 65 72 74 65 64 20 77 | 69 74 68 20 4c 61 54 65 |verted w|ith LaTe|
|00000050| 58 32 48 54 4d 4c 20 32 | 30 32 32 20 28 52 65 6c |X2HTML 2|022 (Rel|
|00000060| 65 61 73 65 64 20 4a 61 | 6e 75 61 72 79 20 31 2c |eased Ja|nuary 1,|
|00000070| 20 32 30 32 32 29 20 2d | 2d 3e 0a 3c 48 54 4d 4c | 2022) -|->.<HTML|
|00000080| 20 6c 61 6e 67 3d 22 65 | 6e 22 3e 0a 3c 48 45 41 | lang="e|n">.<HEA|
|00000090| 44 3e 0a 3c 54 49 54 4c | 45 3e 43 6f 6e 74 65 6e |D>.<TITL|E>Conten|
|000000a0| 74 73 20 6f 66 20 57 68 | 61 74 20 69 73 20 74 68 |ts of Wh|at is th|
|000000b0| 65 20 50 72 6f 62 6c 65 | 6d 3f 3c 2f 54 49 54 4c |e Proble|m?</TITL|
|000000c0| 45 3e 0a 0a 3c 4d 45 54 | 41 20 48 54 54 50 2d 45 |E>..<MET|A HTTP-E|
|000000d0| 51 55 49 56 3d 22 43 6f | 6e 74 65 6e 74 2d 54 79 |QUIV="Co|ntent-Ty|
|000000e0| 70 65 22 20 43 4f 4e 54 | 45 4e 54 3d 22 74 65 78 |pe" CONT|ENT="tex|
|000000f0| 74 2f 68 74 6d 6c 3b 20 | 63 68 61 72 73 65 74 3d |t/html; |charset=|
|00000100| 75 74 66 2d 38 22 3e 0a | 3c 4d 45 54 41 20 4e 41 |utf-8">.|<META NA|
|00000110| 4d 45 3d 22 76 69 65 77 | 70 6f 72 74 22 20 43 4f |ME="view|port" CO|
|00000120| 4e 54 45 4e 54 3d 22 77 | 69 64 74 68 3d 64 65 76 |NTENT="w|idth=dev|
|00000130| 69 63 65 2d 77 69 64 74 | 68 2c 20 69 6e 69 74 69 |ice-widt|h, initi|
|00000140| 61 6c 2d 73 63 61 6c 65 | 3d 31 2e 30 22 3e 0a 3c |al-scale|=1.0">.<|
|00000150| 4d 45 54 41 20 4e 41 4d | 45 3d 22 47 65 6e 65 72 |META NAM|E="Gener|
|00000160| 61 74 6f 72 22 20 43 4f | 4e 54 45 4e 54 3d 22 4c |ator" CO|NTENT="L|
|00000170| 61 54 65 58 32 48 54 4d | 4c 20 76 32 30 32 32 22 |aTeX2HTM|L v2022"|
|00000180| 3e 0a 0a 3c 4c 49 4e 4b | 20 52 45 4c 3d 22 53 54 |>..<LINK| REL="ST|
|00000190| 59 4c 45 53 48 45 45 54 | 22 20 48 52 45 46 3d 22 |YLESHEET|" HREF="|
|000001a0| 69 6e 74 72 6f 2e 63 73 | 73 22 3e 0a 0a 3c 4c 49 |intro.cs|s">..<LI|
|000001b0| 4e 4b 20 52 45 4c 3d 22 | 6e 65 78 74 22 20 48 52 |NK REL="|next" HR|
|000001c0| 45 46 3d 22 6e 6f 64 65 | 33 5f 6d 6e 2e 68 74 6d |EF="node|3_mn.htm|
|000001d0| 6c 22 3e 0a 3c 4c 49 4e | 4b 20 52 45 4c 3d 22 70 |l">.<LIN|K REL="p|
|000001e0| 72 65 76 69 6f 75 73 22 | 20 48 52 45 46 3d 22 6e |revious"| HREF="n|
|000001f0| 6f 64 65 31 5f 6d 6e 2e | 68 74 6d 6c 22 3e 0a 3c |ode1_mn.|html">.<|
|00000200| 4c 49 4e 4b 20 52 45 4c | 3d 22 75 70 22 20 48 52 |LINK REL|="up" HR|
|00000210| 45 46 3d 22 6e 6f 64 65 | 31 5f 6d 6e 2e 68 74 6d |EF="node|1_mn.htm|
|00000220| 6c 22 3e 0a 3c 4c 49 4e | 4b 20 52 45 4c 3d 22 6e |l">.<LIN|K REL="n|
|00000230| 65 78 74 22 20 48 52 45 | 46 3d 22 6e 6f 64 65 33 |ext" HRE|F="node3|
|00000240| 5f 6d 6e 2e 68 74 6d 6c | 22 3e 0a 3c 2f 48 45 41 |_mn.html|">.</HEA|
|00000250| 44 3e 0a 20 0a 3c 42 4f | 44 59 20 62 67 63 6f 6c |D>. .<BO|DY bgcol|
|00000260| 6f 72 3d 22 23 66 66 66 | 66 66 66 22 20 74 65 78 |or="#fff|fff" tex|
|00000270| 74 3d 22 23 30 30 30 30 | 30 30 22 20 6c 69 6e 6b |t="#0000|00" link|
|00000280| 3d 22 23 39 39 34 34 45 | 45 22 20 76 6c 69 6e 6b |="#9944E|E" vlink|
|00000290| 3d 22 23 30 30 30 30 66 | 66 22 20 61 6c 69 6e 6b |="#0000f|f" alink|
|000002a0| 3d 22 23 30 30 66 66 30 | 30 22 3e 0a 0a 3c 48 31 |="#00ff0|0">..<H1|
|000002b0| 3e 3c 41 20 49 44 3d 22 | 53 45 43 54 49 4f 4e 30 |><A ID="|SECTION0|
|000002c0| 30 31 31 30 30 30 30 30 | 30 30 30 30 30 30 30 30 |01100000|00000000|
|000002d0| 30 30 30 22 3e 0a 57 68 | 61 74 20 69 73 20 74 68 |000">.Wh|at is th|
|000002e0| 65 20 50 72 6f 62 6c 65 | 6d 3f 3c 2f 41 3e 0a 3c |e Proble|m?</A>.<|
|000002f0| 2f 48 31 3e 0d 0a 49 20 | 77 72 6f 74 65 20 74 68 |/H1>..I |wrote th|
|00000300| 69 73 20 63 6f 64 65 20 | 74 6f 20 73 6f 6c 76 65 |is code |to solve|
|00000310| 20 73 6f 6d 65 20 6f 66 | 20 6d 79 20 6d 61 74 72 | some of| my matr|
|00000320| 69 78 20 61 6c 67 65 62 | 72 61 0d 0a 70 72 6f 62 |ix algeb|ra..prob|
|00000330| 6c 65 6d 73 20 66 6f 72 | 20 6d 79 20 72 65 73 65 |lems for| my rese|
|00000340| 61 72 63 68 2e 20 49 20 | 6e 65 65 64 65 64 20 61 |arch. I |needed a|
|00000350| 20 67 65 6e 65 72 69 63 | 20 70 72 6f 67 72 61 6d | generic| program|
|00000360| 20 74 68 61 74 0d 0a 63 | 6f 75 6c 64 20 68 61 6e | that..c|ould han|
|00000370| 64 6c 65 20 6d 61 74 72 | 69 78 20 61 6c 67 65 62 |dle matr|ix algeb|
|00000380| 72 61 20 6f 6e 20 61 20 | 50 43 2c 20 66 6f 72 20 |ra on a |PC, for |
|00000390| 69 6e 73 74 61 6e 63 65 | 20 0d 0a 3c 50 3e 3c 21 |instance| ..<P><!|
|000003a0| 2d 2d 20 4d 41 54 48 0a | 20 5c 62 65 67 69 6e 7b |-- MATH.| \begin{|
|000003b0| 64 69 73 70 6c 61 79 6d | 61 74 68 7d 0a 5c 68 61 |displaym|ath}.\ha|
|000003c0| 74 20 5c 62 65 74 61 20 | 3d 20 28 58 27 58 29 5e |t \beta |= (X'X)^|
|000003d0| 7b 2d 31 7d 58 27 79 0a | 5c 65 6e 64 7b 64 69 73 |{-1}X'y.|\end{dis|
|000003e0| 70 6c 61 79 6d 61 74 68 | 7d 0a 20 2d 2d 3e 0a 3c |playmath|}. -->.<|
|000003f0| 2f 50 3e 0a 3c 44 49 56 | 20 41 4c 49 47 4e 3d 22 |/P>.<DIV| ALIGN="|
|00000400| 43 45 4e 54 45 52 22 3e | 0a 3c 49 4d 47 0a 20 53 |CENTER">|.<IMG. S|
|00000410| 54 59 4c 45 3d 22 68 65 | 69 67 68 74 3a 20 31 39 |TYLE="he|ight: 19|
|00000420| 36 2e 32 35 65 78 3b 20 | 76 65 72 74 69 63 61 6c |6.25ex; |vertical|
|00000430| 2d 61 6c 69 67 6e 3a 20 | 2d 30 2e 35 37 65 78 3b |-align: |-0.57ex;|
|00000440| 20 22 20 53 52 43 3d 22 | 69 6d 67 31 2e 70 6e 67 | " SRC="|img1.png|
|00000450| 22 0a 20 41 4c 54 3d 22 | 24 5c 64 69 73 70 6c 61 |". ALT="|$\displa|
|00000460| 79 73 74 79 6c 65 20 5c | 68 61 74 7b 5c 62 65 74 |ystyle \|hat{\bet|
|00000470| 61 7d 24 22 3e 20 3d 20 | 28 3c 49 3e 58 27 58 3c |a}$"> = |(<I>X'X<|
|00000480| 2f 49 3e 29 3c 53 55 50 | 3e 2d 31 3c 2f 53 55 50 |/I>)<SUP|>-1</SUP|
|00000490| 3e 3c 49 3e 58 27 79 3c | 2f 49 3e 0a 3c 2f 44 49 |><I>X'y<|/I>.</DI|
|000004a0| 56 3e 3c 50 3e 3c 2f 50 | 3e 0a 54 68 65 20 63 6f |V><P></P|>.The co|
|000004b0| 6d 70 75 74 65 72 20 6c | 61 6e 67 75 61 67 65 73 |mputer l|anguages|
|000004c0| 20 49 27 76 65 20 75 73 | 65 64 20 66 6f 72 20 74 | I've us|ed for t|
|000004d0| 68 69 73 20 70 72 6f 62 | 6c 65 6d 20 6a 75 73 74 |his prob|lem just|
|000004e0| 20 77 65 72 65 0d 0a 6e | 6f 74 20 61 67 69 6c 65 | were..n|ot agile|
|000004f0| 20 65 6e 6f 75 67 68 20 | 74 6f 20 68 61 6e 64 6c | enough |to handl|
|00000500| 65 20 61 6c 6f 74 20 6f | 66 20 6d 61 74 72 69 78 |e alot o|f matrix|
|00000510| 20 61 6c 67 65 62 72 61 | 20 28 46 4f 52 54 52 41 | algebra| (FORTRA|
|00000520| 4e 2c 0d 0a 50 61 73 63 | 61 6c 20 61 6e 64 20 43 |N,..Pasc|al and C|
|00000530| 29 2e 20 54 68 69 73 20 | 43 2b 2b 20 69 6e 63 61 |). This |C++ inca|
|00000540| 72 6e 61 74 69 6f 6e 20 | 6f 66 20 6d 79 20 61 74 |rnation |of my at|
|00000550| 74 65 6d 70 74 73 20 74 | 6f 20 73 6f 6c 76 65 0d |tempts t|o solve.|
|00000560| 0a 74 68 69 73 20 70 72 | 6f 62 6c 65 6d 20 77 6f |.this pr|oblem wo|
|00000570| 75 6c 64 20 63 6f 64 65 | 20 74 68 65 20 65 71 75 |uld code| the equ|
|00000580| 61 74 69 6f 6e 20 61 62 | 6f 76 65 20 61 73 0a 0a |ation ab|ove as..|
|00000590| 3c 50 3e 0a 3c 50 52 45 | 3e 0d 0a 20 20 20 20 20 |<P>.<PRE|>.. |
|000005a0| 20 56 4d 61 74 72 69 78 | 20 62 2c 58 2c 59 3b 0d | VMatrix| b,X,Y;.|
|000005b0| 0a 20 20 20 20 20 20 2f | 2f 20 63 6f 64 65 20 74 |. /|/ code t|
|000005c0| 6f 20 72 65 61 64 20 69 | 6e 20 58 20 61 6e 64 20 |o read i|n X and |
|000005d0| 59 0d 0a 20 20 20 20 20 | 20 20 20 20 20 20 2e 0d |Y.. | ..|
|000005e0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 2e 0d 0a 20 |. | ... |
|000005f0| 20 20 20 20 20 20 20 20 | 20 20 2e 0d 0a 20 20 20 | | ... |
|00000600| 20 20 20 62 20 3d 20 49 | 6e 76 28 54 72 61 6e 28 | b = I|nv(Tran(|
|00000610| 58 29 2a 58 29 2a 54 72 | 61 6e 28 58 29 2a 59 3b |X)*X)*Tr|an(X)*Y;|
|00000620| 0a 3c 2f 50 52 45 3e 0a | 0a 3c 50 3e 0a 77 68 65 |.</PRE>.|.<P>.whe|
|00000630| 72 65 20 62 2c 20 58 2c | 20 61 6e 64 20 59 20 61 |re b, X,| and Y a|
|00000640| 72 65 20 6d 61 74 72 69 | 63 65 73 2e 20 54 68 69 |re matri|ces. Thi|
|00000650| 73 20 6e 6f 74 20 71 75 | 69 74 65 20 61 73 0d 0a |s not qu|ite as..|
|00000660| 70 6f 77 65 72 66 75 6c | 20 61 73 20 73 6f 6d 65 |powerful| as some|
|00000670| 20 6d 61 74 72 69 78 20 | 69 6e 74 65 72 70 72 65 | matrix |interpre|
|00000680| 74 65 72 73 2c 20 62 75 | 74 20 69 74 20 77 6f 72 |ters, bu|t it wor|
|00000690| 6b 73 2e 20 43 2b 2b 20 | 69 73 0d 0a 70 6f 77 65 |ks. C++ |is..powe|
|000006a0| 72 66 75 6c 20 65 6e 6f | 75 67 68 20 66 6f 72 20 |rful eno|ugh for |
|000006b0| 74 68 69 73 20 70 72 6f | 62 6c 65 6d 20 73 69 6e |this pro|blem sin|
|000006c0| 63 65 20 69 74 20 63 61 | 6e 20 6f 76 65 72 6c 6f |ce it ca|n overlo|
|000006d0| 61 64 0d 0a 66 75 6e 63 | 74 69 6f 6e 73 20 66 6f |ad..func|tions fo|
|000006e0| 72 20 6f 62 6a 65 63 74 | 73 2e 20 49 74 20 61 6c |r object|s. It al|
|000006f0| 73 6f 20 66 6c 65 78 69 | 62 6c 65 20 65 6e 6f 75 |so flexi|ble enou|
|00000700| 67 68 20 74 6f 20 68 61 | 6e 64 6c 65 0d 0a 74 68 |gh to ha|ndle..th|
|00000710| 65 20 72 65 63 75 72 73 | 69 76 65 20 61 6e 64 20 |e recurs|ive and |
|00000720| 6e 65 73 74 65 64 20 66 | 75 6e 63 74 69 6f 6e 20 |nested f|unction |
|00000730| 63 61 6c 6c 73 20 6e 65 | 65 64 65 64 20 66 6f 72 |calls ne|eded for|
|00000740| 20 6d 61 74 72 69 78 0d | 0a 61 6c 67 65 62 72 61 | matrix.|.algebra|
|00000750| 2e 0a 0a 3c 50 3e 0a 54 | 68 65 20 6e 65 78 74 20 |...<P>.T|he next |
|00000760| 70 72 6f 62 6c 65 6d 20 | 77 61 73 20 74 6f 20 6d |problem |was to m|
|00000770| 69 6e 69 6d 69 7a 65 20 | 74 68 65 20 6f 76 65 72 |inimize |the over|
|00000780| 68 65 61 64 20 6f 66 0d | 0a 6d 61 6e 69 70 75 6c |head of.|.manipul|
|00000790| 61 74 69 6e 67 20 74 68 | 65 20 64 61 74 61 20 73 |ating th|e data s|
|000007a0| 74 72 75 63 74 75 72 65 | 73 20 72 65 71 75 69 72 |tructure|s requir|
|000007b0| 65 64 20 66 6f 72 20 6b | 65 65 70 69 6e 67 20 74 |ed for k|eeping t|
|000007c0| 72 61 63 6b 0d 0a 6f 66 | 20 61 6c 6c 20 6f 66 20 |rack..of| all of |
|000007d0| 74 68 65 20 6d 61 74 72 | 69 63 65 73 2e 20 54 68 |the matr|ices. Th|
|000007e0| 65 20 61 62 69 6c 69 74 | 79 20 74 6f 20 62 69 6e |e abilit|y to bin|
|000007f0| 64 20 66 75 6e 63 74 69 | 6f 6e 73 20 74 6f 0d 0a |d functi|ons to..|
|00000800| 64 61 74 61 20 73 74 72 | 75 63 74 75 72 65 73 20 |data str|uctures |
|00000810| 75 73 69 6e 67 20 6f 62 | 6a 65 63 74 73 20 73 6f |using ob|jects so|
|00000820| 6c 76 65 64 20 74 68 69 | 73 20 70 72 6f 62 6c 65 |lved thi|s proble|
|00000830| 6d 2e 20 49 74 20 77 61 | 73 0d 0a 72 65 61 73 6f |m. It wa|s..reaso|
|00000840| 6e 61 62 6c 79 20 65 61 | 73 79 20 74 6f 20 77 72 |nably ea|sy to wr|
|00000850| 69 74 65 20 61 20 73 74 | 61 63 6b 20 6f 66 20 6d |ite a st|ack of m|
|00000860| 61 74 72 69 63 65 73 20 | 74 6f 20 6b 65 65 70 20 |atrices |to keep |
|00000870| 74 72 61 63 6b 0d 0a 6f | 66 20 74 68 65 20 69 6e |track..o|f the in|
|00000880| 74 65 72 6d 65 64 69 61 | 74 65 20 63 61 6c 63 75 |termedia|te calcu|
|00000890| 6c 61 74 69 6f 6e 73 2c | 20 61 6e 64 20 74 68 65 |lations,| and the|
|000008a0| 6e 20 64 65 6c 65 74 65 | 20 74 68 65 0d 0a 75 6e |n delete| the..un|
|000008b0| 6e 65 63 65 73 73 61 72 | 79 20 6d 61 74 72 69 63 |necessar|y matric|
|000008c0| 65 73 2e 20 49 74 20 61 | 6c 73 6f 20 6d 61 64 65 |es. It a|lso made|
|000008d0| 20 69 74 20 72 65 61 73 | 6f 6e 61 62 6c 79 20 65 | it reas|onably e|
|000008e0| 61 73 79 20 74 6f 0d 0a | 61 73 73 69 67 6e 20 6d |asy to..|assign m|
|000008f0| 61 74 72 69 63 65 73 20 | 75 73 69 6e 67 20 74 68 |atrices |using th|
|00000900| 65 20 65 71 75 61 6c 73 | 20 6f 70 65 72 61 74 6f |e equals| operato|
|00000910| 72 2e 0a 0a 3c 50 3e 0a | 54 68 65 20 6e 65 78 74 |r...<P>.|The next|
|00000920| 20 70 72 6f 62 6c 65 6d | 20 77 61 73 20 74 68 65 | problem| was the|
|00000930| 20 36 34 30 4b 20 62 61 | 72 72 69 65 72 20 6f 6e | 640K ba|rrier on|
|00000940| 20 74 68 65 20 50 43 20 | 63 6c 61 73 73 0d 0a 6d | the PC |class..m|
|00000950| 61 63 68 69 6e 65 73 2e | 20 4d 6f 73 74 20 6f 66 |achines.| Most of|
|00000960| 20 6d 79 20 70 72 6f 62 | 6c 65 6d 73 20 61 72 65 | my prob|lems are|
|00000970| 20 74 6f 6f 20 62 69 67 | 20 74 6f 20 6b 65 65 70 | too big| to keep|
|00000980| 20 61 6c 6c 20 6f 66 0d | 0a 74 68 65 20 64 61 74 | all of.|.the dat|
|00000990| 61 20 69 6e 20 52 41 4d | 2c 20 73 6f 20 49 20 68 |a in RAM|, so I h|
|000009a0| 61 76 65 20 74 6f 20 72 | 65 73 6f 72 74 20 74 6f |ave to r|esort to|
|000009b0| 20 73 70 65 63 69 61 6c | 20 64 61 74 61 20 49 4f | special| data IO|
|000009c0| 0d 0a 74 72 69 63 6b 73 | 2e 20 54 68 69 73 20 69 |..tricks|. This i|
|000009d0| 73 20 66 69 6e 65 20 66 | 6f 72 20 61 6e 79 20 73 |s fine f|or any s|
|000009e0| 69 6e 67 6c 65 20 70 72 | 6f 62 6c 65 6d 2c 20 62 |ingle pr|oblem, b|
|000009f0| 75 74 20 69 74 20 64 6f | 65 73 0d 0a 6e 6f 74 20 |ut it do|es..not |
|00000a00| 67 65 6e 65 72 61 6c 69 | 7a 65 20 76 65 72 79 20 |generali|ze very |
|00000a10| 77 65 6c 6c 2e 20 49 20 | 66 6f 75 6e 64 20 61 20 |well. I |found a |
|00000a20| 76 69 72 74 75 61 6c 20 | 6d 65 6d 6f 72 79 20 61 |virtual |memory a|
|00000a30| 6c 6c 6f 63 61 74 6f 72 | 0d 0a 74 6f 20 73 6f 6c |llocator|..to sol|
|00000a40| 76 65 20 74 68 69 73 20 | 70 72 6f 62 6c 65 6d 2e |ve this |problem.|
|00000a50| 20 49 74 20 77 72 69 74 | 65 73 20 74 6f 20 61 20 | It writ|es to a |
|00000a60| 64 69 73 6b 20 66 69 6c | 65 2e 20 54 68 65 20 6e |disk fil|e. The n|
|00000a70| 65 77 0d 0a 63 6c 61 73 | 73 20 6f 66 20 33 38 36 |ew..clas|s of 386|
|00000a80| 20 6d 61 63 68 69 6e 65 | 73 20 63 61 6e 20 6b 65 | machine|s can ke|
|00000a90| 65 70 20 52 41 4d 20 64 | 69 73 6b 73 20 69 6e 20 |ep RAM d|isks in |
|00000aa0| 65 78 74 65 6e 64 65 64 | 0d 0a 6d 65 6d 6f 72 79 |extended|..memory|
|00000ab0| 2c 20 73 6f 20 74 68 65 | 72 65 20 69 73 20 6f 6e |, so the|re is on|
|00000ac0| 6c 79 20 61 20 6d 6f 64 | 65 73 74 20 70 65 72 66 |ly a mod|est perf|
|00000ad0| 6f 72 6d 61 6e 63 65 20 | 70 65 6e 61 6c 74 79 20 |ormance |penalty |
|00000ae0| 66 6f 72 0d 0a 61 63 63 | 65 73 73 69 6e 67 20 74 |for..acc|essing t|
|00000af0| 68 65 20 64 61 74 61 20 | 69 6e 20 65 6c 65 63 74 |he data |in elect|
|00000b00| 72 6f 6e 69 63 20 6d 65 | 6d 6f 72 79 2e 20 20 54 |ronic me|mory. T|
|00000b10| 68 65 20 76 69 72 74 75 | 61 6c 0d 0a 6d 65 6d 6f |he virtu|al..memo|
|00000b20| 72 79 20 73 63 68 65 6d | 65 20 6f 6e 6c 79 20 6b |ry schem|e only k|
|00000b30| 65 65 70 73 20 61 62 6f | 75 74 20 36 34 20 65 6c |eeps abo|ut 64 el|
|00000b40| 65 6d 65 6e 74 73 20 69 | 6e 20 52 41 4d 2c 20 73 |ements i|n RAM, s|
|00000b50| 6f 0d 0a 66 69 6e 64 69 | 6e 67 20 65 6c 65 6d 65 |o..findi|ng eleme|
|00000b60| 6e 74 73 20 69 6e 20 61 | 20 6c 61 72 67 65 20 6d |nts in a| large m|
|00000b70| 61 74 72 69 78 20 69 73 | 20 73 6c 6f 77 65 72 20 |atrix is| slower |
|00000b80| 74 68 61 6e 20 64 69 72 | 65 63 74 0d 0a 61 63 63 |than dir|ect..acc|
|00000b90| 65 73 73 20 74 6f 20 74 | 68 65 20 68 65 61 70 2e |ess to t|he heap.|
|00000ba0| 20 54 68 69 73 20 74 72 | 61 64 65 6f 66 66 20 73 | This tr|adeoff s|
|00000bb0| 75 69 74 65 64 20 6d 65 | 20 73 69 6e 63 65 20 49 |uited me| since I|
|00000bc0| 20 77 6f 75 6c 64 0d 0a | 72 61 74 68 65 72 20 62 | would..|rather b|
|00000bd0| 65 20 61 62 6c 65 20 74 | 6f 20 75 73 65 20 6d 61 |e able t|o use ma|
|00000be0| 74 72 69 63 65 73 20 74 | 68 61 74 20 61 72 65 20 |trices t|hat are |
|00000bf0| 70 6f 74 65 6e 74 69 61 | 6c 6c 79 20 6c 61 72 67 |potentia|lly larg|
|00000c00| 65 72 0d 0a 74 68 61 6e | 20 36 34 30 4b 2e 20 41 |er..than| 640K. A|
|00000c10| 20 33 20 6f 72 20 34 20 | 6d 65 67 20 52 41 4d 20 | 3 or 4 |meg RAM |
|00000c20| 64 69 73 6b 20 77 6f 75 | 6c 64 20 73 75 69 74 20 |disk wou|ld suit |
|00000c30| 6d 6f 73 74 20 6f 66 20 | 6d 79 0d 0a 6e 65 65 64 |most of |my..need|
|00000c40| 73 2e 20 54 68 65 20 68 | 61 72 64 20 64 72 69 76 |s. The h|ard driv|
|00000c50| 65 20 63 61 6e 20 62 65 | 20 75 73 65 64 20 74 6f |e can be| used to|
|00000c60| 6f 2e 20 41 67 61 69 6e | 2c 20 69 74 20 61 69 6e |o. Again|, it ain|
|00000c70| 27 74 0d 0a 66 61 73 74 | 2c 20 62 75 74 20 69 74 |'t..fast|, but it|
|00000c80| 20 77 6f 72 6b 73 2e 0a | 0a 3c 50 3e 0a 54 68 65 | works..|.<P>.The|
|00000c90| 20 70 72 6f 70 65 72 74 | 69 65 73 20 6f 66 20 43 | propert|ies of C|
|00000ca0| 2b 2b 20 68 65 6c 70 65 | 64 20 73 6f 6c 76 65 20 |++ helpe|d solve |
|00000cb0| 74 68 65 73 65 20 70 72 | 6f 62 6c 65 6d 73 2e 20 |these pr|oblems. |
|00000cc0| 54 68 69 73 0d 0a 64 6f | 63 75 6d 65 6e 74 20 77 |This..do|cument w|
|00000cd0| 69 6c 6c 20 64 65 76 65 | 6c 6f 70 20 61 20 6d 61 |ill deve|lop a ma|
|00000ce0| 74 72 69 78 20 63 6c 61 | 73 73 20 66 72 6f 6d 20 |trix cla|ss from |
|00000cf0| 6c 6f 77 65 72 20 6c 65 | 76 65 6c 0d 0a 66 75 6e |lower le|vel..fun|
|00000d00| 63 74 69 6f 6e 73 2e 20 | 54 68 65 20 66 69 72 73 |ctions. |The firs|
|00000d10| 74 20 73 74 65 70 20 69 | 73 20 74 6f 20 65 78 70 |t step i|s to exp|
|00000d20| 6c 61 69 6e 20 74 68 65 | 20 76 69 72 74 75 61 6c |lain the| virtual|
|00000d30| 20 6d 65 6d 6f 72 79 0d | 0a 61 6c 6c 6f 63 61 74 | memory.|.allocat|
|00000d40| 6f 72 2e 20 54 68 65 20 | 6e 65 78 74 20 73 74 65 |or. The |next ste|
|00000d50| 70 20 69 73 20 74 6f 20 | 65 78 70 6c 61 69 6e 20 |p is to |explain |
|00000d60| 74 68 65 20 73 74 72 69 | 6e 67 0d 0a 66 75 6e 63 |the stri|ng..func|
|00000d70| 74 69 6f 6e 73 2e 20 54 | 68 65 20 74 68 69 72 64 |tions. T|he third|
|00000d80| 20 73 74 65 70 20 69 73 | 20 74 6f 20 64 65 76 65 | step is| to deve|
|00000d90| 6c 6f 70 20 61 20 76 65 | 63 74 6f 72 20 63 6c 61 |lop a ve|ctor cla|
|00000da0| 73 73 0d 0a 62 61 73 65 | 64 20 6f 6e 20 74 68 65 |ss..base|d on the|
|00000db0| 20 76 69 72 74 75 61 6c | 20 6d 65 6d 6f 72 79 20 | virtual| memory |
|00000dc0| 61 6c 6c 6f 63 61 74 6f | 72 2e 20 54 68 65 20 6e |allocato|r. The n|
|00000dd0| 65 78 74 20 73 74 65 70 | 20 69 73 20 74 6f 0d 0a |ext step| is to..|
|00000de0| 65 78 70 6c 61 69 6e 20 | 74 68 65 20 6d 61 74 72 |explain |the matr|
|00000df0| 69 78 20 63 6c 61 73 73 | 20 61 6e 64 20 6d 61 74 |ix class| and mat|
|00000e00| 72 69 78 20 73 74 61 63 | 6b 20 63 6c 61 73 73 65 |rix stac|k classe|
|00000e10| 73 2e 20 54 68 65 0d 0a | 76 69 72 74 75 61 6c 20 |s. The..|virtual |
|00000e20| 76 65 63 74 6f 72 20 63 | 6c 61 73 73 20 69 73 20 |vector c|lass is |
|00000e30| 74 68 65 20 62 61 73 65 | 20 63 6c 61 73 73 20 66 |the base| class f|
|00000e40| 6f 72 20 74 68 65 20 6d | 61 74 72 69 78 0d 0a 63 |or the m|atrix..c|
|00000e50| 6c 61 73 73 2e 20 54 68 | 65 20 6d 61 74 72 69 78 |lass. Th|e matrix|
|00000e60| 20 73 74 61 63 6b 20 69 | 73 20 64 65 72 69 76 65 | stack i|s derive|
|00000e70| 64 20 66 72 6f 6d 20 74 | 68 65 20 6d 61 74 72 69 |d from t|he matri|
|00000e80| 78 20 63 6c 61 73 73 2e | 0d 0a 44 65 76 65 6c 6f |x class.|..Develo|
|00000e90| 70 69 6e 67 20 61 20 67 | 65 6e 65 72 61 6c 20 6d |ping a g|eneral m|
|00000ea0| 61 74 72 69 78 20 70 72 | 6f 67 72 61 6d 20 69 73 |atrix pr|ogram is|
|00000eb0| 20 68 61 72 64 20 77 69 | 74 68 6f 75 74 0d 0a 65 | hard wi|thout..e|
|00000ec0| 6e 63 61 70 73 75 6c 61 | 74 69 6f 6e 20 61 6e 64 |ncapsula|tion and|
|00000ed0| 20 69 6e 68 65 72 69 74 | 61 6e 63 65 2e 0a 0a 3c | inherit|ance...<|
|00000ee0| 50 3e 0a 0a 3c 48 52 3e | 0a 0a 3c 2f 42 4f 44 59 |P>..<HR>|..</BODY|
|00000ef0| 3e 0a 3c 2f 48 54 4d 4c | 3e 0a |>.</HTML|>. |
+--------+-------------------------+-------------------------+--------+--------+