Changeset 651 for library/doc/html/vector_and_matrix.html
- Timestamp:
- 10/12/09 13:49:39 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/doc/html/vector_and_matrix.html
r641 r651 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"/> 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"> 5 3 <title>mixpp: A very simple tutorial about vectors and matrixes</title> 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 --> 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.9 --> 11 8 <script type="text/javascript"> 12 9 <!-- … … 63 60 </div> 64 61 <div class="contents"> 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> 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> 68 63 <div class="fragment"><pre class="fragment"><span class="preprocessor">#include <itpp/itbase.h></span> 69 64 … … 83 78 84 79 <span class="comment">//Use a string of values to define a vector:</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>;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>; 86 81 87 82 <span class="comment">//Add two vectors:</span> … … 89 84 90 85 <span class="comment">//Print results:</span> 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;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; 94 89 95 90 <span class="comment">//Use a string to define a matrix:</span> 96 A = <span class="stringliteral"> "1.0 2.0;3.0 4.0"</span>;91 A = <span class="stringliteral">"1.0 2.0;3.0 4.0"</span>; 97 92 98 93 <span class="comment">//Calculate the inverse of matrix A:</span> … … 100 95 101 96 <span class="comment">//Print results:</span> 102 cout << <span class="stringliteral"> "A = "</span> << A << endl;103 cout << <span class="stringliteral"> "B = "</span> << B << endl;97 cout << <span class="stringliteral">"A = "</span> << A << endl; 98 cout << <span class="stringliteral">"B = "</span> << B << endl; 104 99 105 100 <span class="comment">//Exit program:</span> … … 107 102 108 103 } 109 </pre></div><p>When you run this program, the output shall look like this</p> 104 </pre></div><p> 105 When you run this program, the output shall look like this<p> 110 106 <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] 111 107 b = [0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1] … … 115 111 B = [[-2 1] 116 112 [1.5 -0.5]] 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 Sep 27 00:49:05 2009 for mixpp by 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 Wed Oct 7 17:34:45 2009 for mixpp by 120 116 <a href="http://www.doxygen.org/index.html"> 121 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1</small></address>117 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address> 122 118 </body> 123 119 </html>