Changeset 591 for library/doc/html/vector_and_matrix.html
- Timestamp:
- 08/30/09 22:13:15 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/doc/html/vector_and_matrix.html
r590 r591 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> 3 5 <title>mixpp: A very simple tutorial about vectors and matrixes</title> 4 <link href="tabs.css" rel="stylesheet" type="text/css"> 5 <link href="doxygen.css" rel="stylesheet" type="text/css"> 6 </head><body> 7 <!-- Generated by Doxygen 1.5.8 --> 6 <link href="tabs.css" rel="stylesheet" type="text/css"/> 7 <link href="doxygen.css" rel="stylesheet" type="text/css"/> 8 </head> 9 <body> 10 <!-- Generated by Doxygen 1.6.1 --> 8 11 <script type="text/javascript"> 9 12 <!-- … … 60 63 </div> 61 64 <div class="contents"> 62 <h1><a class="anchor" name="vector_and_matrix">A very simple tutorial about vectors and matrixes </a></h1>Let's start with a really simple example. Try to complile the following program:<p> 65 66 67 <h1><a class="anchor" id="vector_and_matrix">A very simple tutorial about vectors and matrixes </a></h1><p>Let's start with a really simple example. Try to complile the following program:</p> 63 68 <div class="fragment"><pre class="fragment"><span class="preprocessor">#include <itpp/itbase.h></span> 64 69 … … 78 83 79 84 <span class="comment">//Use a string of values to define a vector:</span> 80 b = <span class="stringliteral"> "0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0"</span>;85 b = <span class="stringliteral">"0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0"</span>; 81 86 82 87 <span class="comment">//Add two vectors:</span> … … 84 89 85 90 <span class="comment">//Print results:</span> 86 cout << <span class="stringliteral"> "a = "</span> << a << endl;87 cout << <span class="stringliteral"> "b = "</span> << b << endl;88 cout << <span class="stringliteral"> "c = "</span> << c << endl;91 cout << <span class="stringliteral">"a = "</span> << a << endl; 92 cout << <span class="stringliteral">"b = "</span> << b << endl; 93 cout << <span class="stringliteral">"c = "</span> << c << endl; 89 94 90 95 <span class="comment">//Use a string to define a matrix:</span> 91 A = <span class="stringliteral"> "1.0 2.0;3.0 4.0"</span>;96 A = <span class="stringliteral">"1.0 2.0;3.0 4.0"</span>; 92 97 93 98 <span class="comment">//Calculate the inverse of matrix A:</span> … … 95 100 96 101 <span class="comment">//Print results:</span> 97 cout << <span class="stringliteral"> "A = "</span> << A << endl;98 cout << <span class="stringliteral"> "B = "</span> << B << endl;102 cout << <span class="stringliteral">"A = "</span> << A << endl; 103 cout << <span class="stringliteral">"B = "</span> << B << endl; 99 104 100 105 <span class="comment">//Exit program:</span> … … 102 107 103 108 } 104 </pre></div><p> 105 When you run this program, the output shall look like this<p> 109 </pre></div><p>When you run this program, the output shall look like this</p> 106 110 <div class="fragment"><pre class="fragment">a = [1 1.11111 1.22222 1.33333 1.44444 1.55556 1.66667 1.77778 1.88889 2] 107 111 b = [0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1] … … 111 115 B = [[-2 1] 112 116 [1.5 -0.5]] 113 </pre></div><p> 114 If this is what you see, then congratulations! You have managed to compile your first it++ program!</div>115 <hr size="1" ><address style="text-align: right;"><small>Generated on Sat Aug 29 20:49:432009 for mixpp by 117 </pre></div><p>If this is what you see, then congratulations! You have managed to compile your first it++ program! </p> 118 </div> 119 <hr size="1"/><address style="text-align: right;"><small>Generated on Sun Aug 30 22:10:50 2009 for mixpp by 116 120 <a href="http://www.doxygen.org/index.html"> 117 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8</small></address>121 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> 118 122 </body> 119 123 </html>