Show
Ignore:
Timestamp:
08/30/09 22:13:15 (15 years ago)
Author:
smidl
Message:

doc

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"/> 
    35<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 --> 
    811<script type="text/javascript"> 
    912<!-- 
     
    6063</div> 
    6164<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> 
    6368<div class="fragment"><pre class="fragment"><span class="preprocessor">#include &lt;itpp/itbase.h&gt;</span> 
    6469 
     
    7883 
    7984        <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">&quot;0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0&quot;</span>; 
    8186 
    8287        <span class="comment">//Add two vectors:</span> 
     
    8489 
    8590        <span class="comment">//Print results:</span> 
    86         cout &lt;&lt; <span class="stringliteral">"a = "</span> &lt;&lt; a &lt;&lt; endl; 
    87         cout &lt;&lt; <span class="stringliteral">"b = "</span> &lt;&lt; b &lt;&lt; endl; 
    88         cout &lt;&lt; <span class="stringliteral">"c = "</span> &lt;&lt; c &lt;&lt; endl; 
     91        cout &lt;&lt; <span class="stringliteral">&quot;a = &quot;</span> &lt;&lt; a &lt;&lt; endl; 
     92        cout &lt;&lt; <span class="stringliteral">&quot;b = &quot;</span> &lt;&lt; b &lt;&lt; endl; 
     93        cout &lt;&lt; <span class="stringliteral">&quot;c = &quot;</span> &lt;&lt; c &lt;&lt; endl; 
    8994 
    9095        <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">&quot;1.0 2.0;3.0 4.0&quot;</span>; 
    9297 
    9398        <span class="comment">//Calculate the inverse of matrix A:</span> 
     
    95100 
    96101        <span class="comment">//Print results:</span> 
    97         cout &lt;&lt; <span class="stringliteral">"A = "</span> &lt;&lt; A &lt;&lt; endl; 
    98         cout &lt;&lt; <span class="stringliteral">"B = "</span> &lt;&lt; B &lt;&lt; endl; 
     102        cout &lt;&lt; <span class="stringliteral">&quot;A = &quot;</span> &lt;&lt; A &lt;&lt; endl; 
     103        cout &lt;&lt; <span class="stringliteral">&quot;B = &quot;</span> &lt;&lt; B &lt;&lt; endl; 
    99104 
    100105        <span class="comment">//Exit program:</span> 
     
    102107 
    103108} 
    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> 
    106110<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] 
    107111b = [0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1] 
     
    111115B = [[-2 1] 
    112116 [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:43 2009 for mixpp by&nbsp; 
     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&nbsp; 
    116120<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> 
    118122</body> 
    119123</html>