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"> |
---|
3 | <title>mixpp: itpp::Sparse_Mat< T > Class Template Reference</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 --> |
---|
8 | <script type="text/javascript"> |
---|
9 | <!-- |
---|
10 | function changeDisplayState (e){ |
---|
11 | var num=this.id.replace(/[^[0-9]/g,''); |
---|
12 | var button=this.firstChild; |
---|
13 | var sectionDiv=document.getElementById('dynsection'+num); |
---|
14 | if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){ |
---|
15 | sectionDiv.style.display='block'; |
---|
16 | button.src='open.gif'; |
---|
17 | }else{ |
---|
18 | sectionDiv.style.display='none'; |
---|
19 | button.src='closed.gif'; |
---|
20 | } |
---|
21 | } |
---|
22 | function initDynSections(){ |
---|
23 | var divs=document.getElementsByTagName('div'); |
---|
24 | var sectionCounter=1; |
---|
25 | for(var i=0;i<divs.length-1;i++){ |
---|
26 | if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){ |
---|
27 | var header=divs[i]; |
---|
28 | var section=divs[i+1]; |
---|
29 | var button=header.firstChild; |
---|
30 | if (button!='IMG'){ |
---|
31 | divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild); |
---|
32 | button=document.createElement('img'); |
---|
33 | divs[i].insertBefore(button,divs[i].firstChild); |
---|
34 | } |
---|
35 | header.style.cursor='pointer'; |
---|
36 | header.onclick=changeDisplayState; |
---|
37 | header.id='dynheader'+sectionCounter; |
---|
38 | button.src='closed.gif'; |
---|
39 | section.id='dynsection'+sectionCounter; |
---|
40 | section.style.display='none'; |
---|
41 | section.style.marginLeft='14px'; |
---|
42 | sectionCounter++; |
---|
43 | } |
---|
44 | } |
---|
45 | } |
---|
46 | window.onload = initDynSections; |
---|
47 | --> |
---|
48 | </script> |
---|
49 | <div class="navigation" id="top"> |
---|
50 | <div class="tabs"> |
---|
51 | <ul> |
---|
52 | <li><a href="main.html"><span>Main Page</span></a></li> |
---|
53 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
---|
54 | <li><a href="modules.html"><span>Modules</span></a></li> |
---|
55 | <li class="current"><a href="annotated.html"><span>Classes</span></a></li> |
---|
56 | <li><a href="files.html"><span>Files</span></a></li> |
---|
57 | </ul> |
---|
58 | </div> |
---|
59 | <div class="tabs"> |
---|
60 | <ul> |
---|
61 | <li><a href="annotated.html"><span>Class List</span></a></li> |
---|
62 | <li><a href="classes.html"><span>Class Index</span></a></li> |
---|
63 | <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> |
---|
64 | <li><a href="functions.html"><span>Class Members</span></a></li> |
---|
65 | </ul> |
---|
66 | </div> |
---|
67 | <div class="navpath"><b>itpp</b>::<a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a> |
---|
68 | </div> |
---|
69 | </div> |
---|
70 | <div class="contents"> |
---|
71 | <h1>itpp::Sparse_Mat< T > Class Template Reference</h1><!-- doxytag: class="itpp::Sparse_Mat" -->Templated Sparse Matrix Class. |
---|
72 | <a href="#_details">More...</a> |
---|
73 | <p> |
---|
74 | <code>#include <<a class="el" href="smat_8h-source.html">smat.h</a>></code> |
---|
75 | <p> |
---|
76 | |
---|
77 | <p> |
---|
78 | <a href="classitpp_1_1Sparse__Mat-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> |
---|
79 | <tr><td></td></tr> |
---|
80 | <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> |
---|
81 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bc8361f34d846404fb7b491c94aef595"></a><!-- doxytag: member="itpp::Sparse_Mat::Sparse_Mat" ref="bc8361f34d846404fb7b491c94aef595" args="()" --> |
---|
82 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#bc8361f34d846404fb7b491c94aef595">Sparse_Mat</a> ()</td></tr> |
---|
83 | |
---|
84 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br></td></tr> |
---|
85 | <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#721a28a89f8082a9c753a9dfcd0b24ed">Sparse_Mat</a> (int rows, int cols, int row_data_init=200)</td></tr> |
---|
86 | |
---|
87 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Initiate an empty sparse matrix. <a href="#721a28a89f8082a9c753a9dfcd0b24ed"></a><br></td></tr> |
---|
88 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b9c06a886adcb6c4cb97b2a7710152b9"></a><!-- doxytag: member="itpp::Sparse_Mat::Sparse_Mat" ref="b9c06a886adcb6c4cb97b2a7710152b9" args="(const Sparse_Mat< T > &m)" --> |
---|
89 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#b9c06a886adcb6c4cb97b2a7710152b9">Sparse_Mat</a> (const <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > &m)</td></tr> |
---|
90 | |
---|
91 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Initiate a new sparse matrix. The elements of <code>m</code> are copied into the new sparse matrix. <br></td></tr> |
---|
92 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="18f755291e07f729eafb09d207984d50"></a><!-- doxytag: member="itpp::Sparse_Mat::Sparse_Mat" ref="18f755291e07f729eafb09d207984d50" args="(const Mat< T > &m)" --> |
---|
93 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#18f755291e07f729eafb09d207984d50">Sparse_Mat</a> (const <a class="el" href="classitpp_1_1Mat.html">Mat</a>< T > &m)</td></tr> |
---|
94 | |
---|
95 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Initiate a new sparse matrix from a dense matrix. The elements of <code>m</code> are copied into the new sparse matrix. <br></td></tr> |
---|
96 | <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#922d170164eeaa595b17c7962931a073">Sparse_Mat</a> (const <a class="el" href="classitpp_1_1Mat.html">Mat</a>< T > &m, T epsilon)</td></tr> |
---|
97 | |
---|
98 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Initiate a new sparse matrix from a dense matrix. Elements of <code>m</code> larger than <code>epsilon</code> are copied into the new sparse matrix. <a href="#922d170164eeaa595b17c7962931a073"></a><br></td></tr> |
---|
99 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="77cb0033b6f39bd586543769b3a8d50a"></a><!-- doxytag: member="itpp::Sparse_Mat::~Sparse_Mat" ref="77cb0033b6f39bd586543769b3a8d50a" args="()" --> |
---|
100 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#77cb0033b6f39bd586543769b3a8d50a">~Sparse_Mat</a> ()</td></tr> |
---|
101 | |
---|
102 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <br></td></tr> |
---|
103 | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#bede37fe2203b2bae86c7000c6fa78f4">set_size</a> (int rows, int cols, int row_data_init=-1)</td></tr> |
---|
104 | |
---|
105 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the size of the sparse matrix. <a href="#bede37fe2203b2bae86c7000c6fa78f4"></a><br></td></tr> |
---|
106 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="98f82f4aca56a2b8083df057f0c5c359"></a><!-- doxytag: member="itpp::Sparse_Mat::rows" ref="98f82f4aca56a2b8083df057f0c5c359" args="() const " --> |
---|
107 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#98f82f4aca56a2b8083df057f0c5c359">rows</a> () const </td></tr> |
---|
108 | |
---|
109 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of rows of the sparse matrix. <br></td></tr> |
---|
110 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="18ab90bb7cd0db31722374889e3d74c8"></a><!-- doxytag: member="itpp::Sparse_Mat::cols" ref="18ab90bb7cd0db31722374889e3d74c8" args="() const " --> |
---|
111 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#18ab90bb7cd0db31722374889e3d74c8">cols</a> () const </td></tr> |
---|
112 | |
---|
113 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of columns of the sparse matrix. <br></td></tr> |
---|
114 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="28166b919565d9e50895569b7204c9c4"></a><!-- doxytag: member="itpp::Sparse_Mat::nnz" ref="28166b919565d9e50895569b7204c9c4" args="()" --> |
---|
115 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#28166b919565d9e50895569b7204c9c4">nnz</a> ()</td></tr> |
---|
116 | |
---|
117 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The number of non-zero elements in the sparse matrix. <br></td></tr> |
---|
118 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="43589606be7d9563d82fc3355f97c107"></a><!-- doxytag: member="itpp::Sparse_Mat::density" ref="43589606be7d9563d82fc3355f97c107" args="()" --> |
---|
119 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#43589606be7d9563d82fc3355f97c107">density</a> ()</td></tr> |
---|
120 | |
---|
121 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the density of the sparse matrix: (number of non-zero elements)/(total number of elements). <br></td></tr> |
---|
122 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="29bf2d6f6a05709a35c156c137226de5"></a><!-- doxytag: member="itpp::Sparse_Mat::compact" ref="29bf2d6f6a05709a35c156c137226de5" args="()" --> |
---|
123 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#29bf2d6f6a05709a35c156c137226de5">compact</a> ()</td></tr> |
---|
124 | |
---|
125 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the maximum number of non-zero elements in each column equal to the actual number of non-zero elements in each column. <br></td></tr> |
---|
126 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d4b0d7f6c49a884e048c62f1c81bb7a9"></a><!-- doxytag: member="itpp::Sparse_Mat::full" ref="d4b0d7f6c49a884e048c62f1c81bb7a9" args="(Mat< T > &m) const " --> |
---|
127 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#d4b0d7f6c49a884e048c62f1c81bb7a9">full</a> (<a class="el" href="classitpp_1_1Mat.html">Mat</a>< T > &m) const </td></tr> |
---|
128 | |
---|
129 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a full, dense matrix in <code>m</code>. <br></td></tr> |
---|
130 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b3cd8be888ec514a4817770a74fd4948"></a><!-- doxytag: member="itpp::Sparse_Mat::full" ref="b3cd8be888ec514a4817770a74fd4948" args="() const " --> |
---|
131 | <a class="el" href="classitpp_1_1Mat.html">Mat</a>< T > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#b3cd8be888ec514a4817770a74fd4948">full</a> () const </td></tr> |
---|
132 | |
---|
133 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a full, dense matrix. <br></td></tr> |
---|
134 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="404ced4fa4a5a8a7a6050851caa312d2"></a><!-- doxytag: member="itpp::Sparse_Mat::operator()" ref="404ced4fa4a5a8a7a6050851caa312d2" args="(int r, int c) const " --> |
---|
135 | T </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#404ced4fa4a5a8a7a6050851caa312d2">operator()</a> (int r, int c) const </td></tr> |
---|
136 | |
---|
137 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns element of row <code>r</code> and column <code>c</code>. <br></td></tr> |
---|
138 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2e2d250f37e9795b516b1ce3fe28e2fa"></a><!-- doxytag: member="itpp::Sparse_Mat::set" ref="2e2d250f37e9795b516b1ce3fe28e2fa" args="(int r, int c, T v)" --> |
---|
139 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#2e2d250f37e9795b516b1ce3fe28e2fa">set</a> (int r, int c, T v)</td></tr> |
---|
140 | |
---|
141 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set element (<code>r</code>, <code>c</code> ) equal to <code>v</code>. <br></td></tr> |
---|
142 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2d45bc984af880390d434d03afb2c8c"></a><!-- doxytag: member="itpp::Sparse_Mat::set_new" ref="a2d45bc984af880390d434d03afb2c8c" args="(int r, int c, T v)" --> |
---|
143 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#a2d45bc984af880390d434d03afb2c8c">set_new</a> (int r, int c, T v)</td></tr> |
---|
144 | |
---|
145 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set a new element with index (<code>r</code>, <code>c</code> ) equal to <code>v</code>. <br></td></tr> |
---|
146 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ddb256b1bc9bdf0a57b56c019ab2b1f5"></a><!-- doxytag: member="itpp::Sparse_Mat::add_elem" ref="ddb256b1bc9bdf0a57b56c019ab2b1f5" args="(const int r, const int c, const T v)" --> |
---|
147 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#ddb256b1bc9bdf0a57b56c019ab2b1f5">add_elem</a> (const int r, const int c, const T v)</td></tr> |
---|
148 | |
---|
149 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Add the element in row <code>r</code> and column <code>c</code> with <code>v</code>. <br></td></tr> |
---|
150 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4d10d2107caa9f08e2f724bee5e10090"></a><!-- doxytag: member="itpp::Sparse_Mat::zeros" ref="4d10d2107caa9f08e2f724bee5e10090" args="()" --> |
---|
151 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#4d10d2107caa9f08e2f724bee5e10090">zeros</a> ()</td></tr> |
---|
152 | |
---|
153 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the sparse matrix to the all zero matrix (removes all non-zero elements). <br></td></tr> |
---|
154 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="597931c72c2ae675c0ecc2522774474d"></a><!-- doxytag: member="itpp::Sparse_Mat::zero_elem" ref="597931c72c2ae675c0ecc2522774474d" args="(const int r, const int c)" --> |
---|
155 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#597931c72c2ae675c0ecc2522774474d">zero_elem</a> (const int r, const int c)</td></tr> |
---|
156 | |
---|
157 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the element in row <code>r</code> and column <code>c</code> to zero (i.e. clear that element if it contains a non-zero value). <br></td></tr> |
---|
158 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="12b5fb55f2b16c350c462ee876ec7ade"></a><!-- doxytag: member="itpp::Sparse_Mat::clear" ref="12b5fb55f2b16c350c462ee876ec7ade" args="()" --> |
---|
159 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#12b5fb55f2b16c350c462ee876ec7ade">clear</a> ()</td></tr> |
---|
160 | |
---|
161 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Clear all non-zero elements of the sparse matrix. <br></td></tr> |
---|
162 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5f9083bb9615a53c6abfce4ca28be21a"></a><!-- doxytag: member="itpp::Sparse_Mat::clear_elem" ref="5f9083bb9615a53c6abfce4ca28be21a" args="(const int r, const int c)" --> |
---|
163 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#5f9083bb9615a53c6abfce4ca28be21a">clear_elem</a> (const int r, const int c)</td></tr> |
---|
164 | |
---|
165 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Clear the element in row <code>r</code> and column <code>c</code> (if it contains a non-zero value). <br></td></tr> |
---|
166 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="133ec46db675573d8736296ae388ad09"></a><!-- doxytag: member="itpp::Sparse_Mat::set_submatrix" ref="133ec46db675573d8736296ae388ad09" args="(int r1, int r2, int c1, int c2, const Mat< T > &m)" --> |
---|
167 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#133ec46db675573d8736296ae388ad09">set_submatrix</a> (int r1, int r2, int c1, int c2, const <a class="el" href="classitpp_1_1Mat.html">Mat</a>< T > &m)</td></tr> |
---|
168 | |
---|
169 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set submatrix defined by rows r1,r2 and columns c1,c2 to matrix m. <br></td></tr> |
---|
170 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="02715ff681128d656bcb661573633b91"></a><!-- doxytag: member="itpp::Sparse_Mat::set_submatrix" ref="02715ff681128d656bcb661573633b91" args="(int r, int c, const Mat< T > &m)" --> |
---|
171 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#02715ff681128d656bcb661573633b91">set_submatrix</a> (int r, int c, const <a class="el" href="classitpp_1_1Mat.html">Mat</a>< T > &m)</td></tr> |
---|
172 | |
---|
173 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set submatrix defined by upper-left element (<code>r</code>,<code>c</code>) and the size of matrix <code>m</code> to <code>m</code>. <br></td></tr> |
---|
174 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e969584f109b897c04fb85c71ab6fc9a"></a><!-- doxytag: member="itpp::Sparse_Mat::get_submatrix" ref="e969584f109b897c04fb85c71ab6fc9a" args="(int r1, int r2, int c1, int c2) const " --> |
---|
175 | <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#e969584f109b897c04fb85c71ab6fc9a">get_submatrix</a> (int r1, int r2, int c1, int c2) const </td></tr> |
---|
176 | |
---|
177 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the sub-matrix from rows <code>r1</code> to <code>r2</code> and columns <code>c1</code> to <code>c2</code>. <br></td></tr> |
---|
178 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="aecf3287d3bb4192eb7555b93d5dfac1"></a><!-- doxytag: member="itpp::Sparse_Mat::get_submatrix_cols" ref="aecf3287d3bb4192eb7555b93d5dfac1" args="(int c1, int c2) const " --> |
---|
179 | <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#aecf3287d3bb4192eb7555b93d5dfac1">get_submatrix_cols</a> (int c1, int c2) const </td></tr> |
---|
180 | |
---|
181 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the sub-matrix from columns <code>c1</code> to <code>c2</code> (all rows). <br></td></tr> |
---|
182 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9b9759f1df3016d2004ee6a0d347d0ca"></a><!-- doxytag: member="itpp::Sparse_Mat::get_col" ref="9b9759f1df3016d2004ee6a0d347d0ca" args="(int c, Sparse_Vec< T > &v) const " --> |
---|
183 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#9b9759f1df3016d2004ee6a0d347d0ca">get_col</a> (int c, <a class="el" href="classitpp_1_1Sparse__Vec.html">Sparse_Vec</a>< T > &v) const </td></tr> |
---|
184 | |
---|
185 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns column <code>c</code> of the <a class="el" href="classitpp_1_1Sparse__Mat.html" title="Templated Sparse Matrix Class.">Sparse_Mat</a> in the <a class="el" href="classitpp_1_1Sparse__Vec.html" title="Templated sparse vector class.">Sparse_Vec</a> <code>v</code>. <br></td></tr> |
---|
186 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="422dbcfed4a9aaad5b4a590e4bd427ff"></a><!-- doxytag: member="itpp::Sparse_Mat::get_col" ref="422dbcfed4a9aaad5b4a590e4bd427ff" args="(int c) const " --> |
---|
187 | <a class="el" href="classitpp_1_1Sparse__Vec.html">Sparse_Vec</a>< T > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#422dbcfed4a9aaad5b4a590e4bd427ff">get_col</a> (int c) const </td></tr> |
---|
188 | |
---|
189 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns column <code>c</code> of the <a class="el" href="classitpp_1_1Sparse__Mat.html" title="Templated Sparse Matrix Class.">Sparse_Mat</a>. <br></td></tr> |
---|
190 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e15d124adfa11120960ecfd11ad90ef0"></a><!-- doxytag: member="itpp::Sparse_Mat::set_col" ref="e15d124adfa11120960ecfd11ad90ef0" args="(int c, const Sparse_Vec< T > &v)" --> |
---|
191 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#e15d124adfa11120960ecfd11ad90ef0">set_col</a> (int c, const <a class="el" href="classitpp_1_1Sparse__Vec.html">Sparse_Vec</a>< T > &v)</td></tr> |
---|
192 | |
---|
193 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set column <code>c</code> of the <a class="el" href="classitpp_1_1Sparse__Mat.html" title="Templated Sparse Matrix Class.">Sparse_Mat</a>. <br></td></tr> |
---|
194 | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#5b12be950cd135b8fb0f345a9d73348d">transpose</a> (<a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > &m) const </td></tr> |
---|
195 | |
---|
196 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#da0c107ad90b5445d8cb7c55b48ef8b3">transpose</a> () const </td></tr> |
---|
197 | |
---|
198 | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#cf3ddc3a3af57157e51c00b3d6e423ce">operator=</a> (const <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > &m)</td></tr> |
---|
199 | |
---|
200 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Assign sparse matrix the value and dimensions of the sparse matrix <code>m</code>. <a href="#cf3ddc3a3af57157e51c00b3d6e423ce"></a><br></td></tr> |
---|
201 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0b32c38c1aa5ea999817190afc9f8858"></a><!-- doxytag: member="itpp::Sparse_Mat::operator=" ref="0b32c38c1aa5ea999817190afc9f8858" args="(const Mat< T > &m)" --> |
---|
202 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#0b32c38c1aa5ea999817190afc9f8858">operator=</a> (const <a class="el" href="classitpp_1_1Mat.html">Mat</a>< T > &m)</td></tr> |
---|
203 | |
---|
204 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Assign sparse matrix the value and dimensions of the dense matrix <code>m</code>. <br></td></tr> |
---|
205 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1eb8891a51aa9c69fadcb8ab623c5d36"></a><!-- doxytag: member="itpp::Sparse_Mat::operator-" ref="1eb8891a51aa9c69fadcb8ab623c5d36" args="() const " --> |
---|
206 | <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#1eb8891a51aa9c69fadcb8ab623c5d36">operator-</a> () const </td></tr> |
---|
207 | |
---|
208 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the sign inverse of all elements in the sparse matrix. <br></td></tr> |
---|
209 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ee53a24c0f6be2927b512b64fadd650b"></a><!-- doxytag: member="itpp::Sparse_Mat::operator==" ref="ee53a24c0f6be2927b512b64fadd650b" args="(const Sparse_Mat< T > &m) const " --> |
---|
210 | bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#ee53a24c0f6be2927b512b64fadd650b">operator==</a> (const <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > &m) const </td></tr> |
---|
211 | |
---|
212 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Compare two sparse matricies. False if wrong sizes or different values. <br></td></tr> |
---|
213 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="901025d686820e6e2379701fcc4786fc"></a><!-- doxytag: member="itpp::Sparse_Mat::operator+=" ref="901025d686820e6e2379701fcc4786fc" args="(const Sparse_Mat< T > &v)" --> |
---|
214 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#901025d686820e6e2379701fcc4786fc">operator+=</a> (const <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > &v)</td></tr> |
---|
215 | |
---|
216 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Add sparse matrix <code>v</code> to all non-zero elements of the sparse matrix. <br></td></tr> |
---|
217 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6ea4483a0a1077ee71ed24ed4bba7659"></a><!-- doxytag: member="itpp::Sparse_Mat::operator+=" ref="6ea4483a0a1077ee71ed24ed4bba7659" args="(const Mat< T > &v)" --> |
---|
218 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#6ea4483a0a1077ee71ed24ed4bba7659">operator+=</a> (const <a class="el" href="classitpp_1_1Mat.html">Mat</a>< T > &v)</td></tr> |
---|
219 | |
---|
220 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Add matrix <code>v</code> to all non-zero elements of the sparse matrix. <br></td></tr> |
---|
221 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9f42dce24f97723ed307eb2d2988de57"></a><!-- doxytag: member="itpp::Sparse_Mat::operator-=" ref="9f42dce24f97723ed307eb2d2988de57" args="(const Sparse_Mat< T > &v)" --> |
---|
222 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#9f42dce24f97723ed307eb2d2988de57">operator-=</a> (const <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > &v)</td></tr> |
---|
223 | |
---|
224 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Subtract sparse matrix <code>v</code> from all non-zero elements of the sparse matrix. <br></td></tr> |
---|
225 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="998709bb09b76a7502da3a67a4a3e1f1"></a><!-- doxytag: member="itpp::Sparse_Mat::operator-=" ref="998709bb09b76a7502da3a67a4a3e1f1" args="(const Mat< T > &v)" --> |
---|
226 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#998709bb09b76a7502da3a67a4a3e1f1">operator-=</a> (const <a class="el" href="classitpp_1_1Mat.html">Mat</a>< T > &v)</td></tr> |
---|
227 | |
---|
228 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Subtract matrix <code>v</code> from all non-zero elements of the sparse matrix. <br></td></tr> |
---|
229 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f209ca65dde352cc53fa7b0db747d698"></a><!-- doxytag: member="itpp::Sparse_Mat::operator*=" ref="f209ca65dde352cc53fa7b0db747d698" args="(const T &v)" --> |
---|
230 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#f209ca65dde352cc53fa7b0db747d698">operator*=</a> (const T &v)</td></tr> |
---|
231 | |
---|
232 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Multiply all non-zero elements of the sparse matrix with the scalar <code>v</code>. <br></td></tr> |
---|
233 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5962d40e4865536207f2ae9c204d9796"></a><!-- doxytag: member="itpp::Sparse_Mat::operator/=" ref="5962d40e4865536207f2ae9c204d9796" args="(const T &v)" --> |
---|
234 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#5962d40e4865536207f2ae9c204d9796">operator/=</a> (const T &v)</td></tr> |
---|
235 | |
---|
236 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Divide all non-zero elements of the sparse matrix with the scalar <code>v</code>. <br></td></tr> |
---|
237 | <tr><td colspan="2"><br><h2>Friends</h2></td></tr> |
---|
238 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="41244aefc385831a03990c552dcefc21"></a><!-- doxytag: member="itpp::Sparse_Mat::operator+" ref="41244aefc385831a03990c552dcefc21" args="(const Sparse_Mat< T > &m1, const Sparse_Mat< T > &m2)" --> |
---|
239 | <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#41244aefc385831a03990c552dcefc21">operator+</a> (const <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > &m1, const <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > &m2)</td></tr> |
---|
240 | |
---|
241 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Addition m1+m2 where m1 and m2 are sparse matrices. <br></td></tr> |
---|
242 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4423491d9bdcbfd3a49f89c71defddf2"></a><!-- doxytag: member="itpp::Sparse_Mat::operator*" ref="4423491d9bdcbfd3a49f89c71defddf2" args="(const T &c, const Sparse_Mat< T > &m)" --> |
---|
243 | <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#4423491d9bdcbfd3a49f89c71defddf2">operator*</a> (const T &c, const <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > &m)</td></tr> |
---|
244 | |
---|
245 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Multiplication c*m where c is a scalar and m is a sparse matrix. <br></td></tr> |
---|
246 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e7fabd47cc7e65a34de900a8265c4206"></a><!-- doxytag: member="itpp::Sparse_Mat::operator*" ref="e7fabd47cc7e65a34de900a8265c4206" args="(const Sparse_Mat< T > &m1, const Sparse_Mat< T > &m2)" --> |
---|
247 | <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#e7fabd47cc7e65a34de900a8265c4206">operator*</a> (const <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > &m1, const <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > &m2)</td></tr> |
---|
248 | |
---|
249 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Multiplication m1*m2 where m1 and m2 are sparse matrices. <br></td></tr> |
---|
250 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="678f39b40f59ef54ed199b4c4dd0a4bf"></a><!-- doxytag: member="itpp::Sparse_Mat::operator*" ref="678f39b40f59ef54ed199b4c4dd0a4bf" args="(const Sparse_Mat< T > &m, const Sparse_Vec< T > &v)" --> |
---|
251 | <a class="el" href="classitpp_1_1Sparse__Vec.html">Sparse_Vec</a>< T > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#678f39b40f59ef54ed199b4c4dd0a4bf">operator*</a> (const <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > &m, const <a class="el" href="classitpp_1_1Sparse__Vec.html">Sparse_Vec</a>< T > &v)</td></tr> |
---|
252 | |
---|
253 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Multiplication m*v where m is a sparse matrix and v is a sparse vector. <br></td></tr> |
---|
254 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ec91aa61f7fd97ee24ec8235d6dd47cf"></a><!-- doxytag: member="itpp::Sparse_Mat::operator*" ref="ec91aa61f7fd97ee24ec8235d6dd47cf" args="(const Sparse_Mat< T > &m, const Vec< T > &v)" --> |
---|
255 | <a class="el" href="classitpp_1_1Vec.html">Vec</a>< T > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#ec91aa61f7fd97ee24ec8235d6dd47cf">operator*</a> (const <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > &m, const <a class="el" href="classitpp_1_1Vec.html">Vec</a>< T > &v)</td></tr> |
---|
256 | |
---|
257 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Multiplication m*v where m is a sparse matrix and v is a full column vector. <br></td></tr> |
---|
258 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7328cb265fc03f7de997051d7d86643f"></a><!-- doxytag: member="itpp::Sparse_Mat::operator*" ref="7328cb265fc03f7de997051d7d86643f" args="(const Vec< T > &v, const Sparse_Mat< T > &m)" --> |
---|
259 | <a class="el" href="classitpp_1_1Vec.html">Vec</a>< T > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#7328cb265fc03f7de997051d7d86643f">operator*</a> (const <a class="el" href="classitpp_1_1Vec.html">Vec</a>< T > &v, const <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > &m)</td></tr> |
---|
260 | |
---|
261 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Multiplication v'*m where m is a sparse matrix and v is a full column vector. <br></td></tr> |
---|
262 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ee53ab430b8380514435e051401443f9"></a><!-- doxytag: member="itpp::Sparse_Mat::trans_mult" ref="ee53ab430b8380514435e051401443f9" args="(const Sparse_Mat< T > &m)" --> |
---|
263 | <a class="el" href="classitpp_1_1Mat.html">Mat</a>< T > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#ee53ab430b8380514435e051401443f9">trans_mult</a> (const <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > &m)</td></tr> |
---|
264 | |
---|
265 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Multiplication m'*m where m is a sparse matrix. Returns a full, dense matrix. <br></td></tr> |
---|
266 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="210f5f71734d0c40af28e9bb5c930c77"></a><!-- doxytag: member="itpp::Sparse_Mat::trans_mult_s" ref="210f5f71734d0c40af28e9bb5c930c77" args="(const Sparse_Mat< T > &m)" --> |
---|
267 | <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#210f5f71734d0c40af28e9bb5c930c77">trans_mult_s</a> (const <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > &m)</td></tr> |
---|
268 | |
---|
269 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Multiplication m'*m where m is a sparse matrix, Returns a sparse matrix. <br></td></tr> |
---|
270 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="32bf683507bae44d72f36b249eed80cc"></a><!-- doxytag: member="itpp::Sparse_Mat::trans_mult" ref="32bf683507bae44d72f36b249eed80cc" args="(const Sparse_Mat< T > &m1, const Sparse_Mat< T > &m2)" --> |
---|
271 | <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#32bf683507bae44d72f36b249eed80cc">trans_mult</a> (const <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > &m1, const <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > &m2)</td></tr> |
---|
272 | |
---|
273 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Multiplication m1'*m2 where m1 and m2 are sparse matrices. <br></td></tr> |
---|
274 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="649ca4315a77473495a41a68a32a5e3d"></a><!-- doxytag: member="itpp::Sparse_Mat::trans_mult" ref="649ca4315a77473495a41a68a32a5e3d" args="(const Sparse_Mat< T > &m, const Vec< T > &v)" --> |
---|
275 | <a class="el" href="classitpp_1_1Vec.html">Vec</a>< T > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#649ca4315a77473495a41a68a32a5e3d">trans_mult</a> (const <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > &m, const <a class="el" href="classitpp_1_1Vec.html">Vec</a>< T > &v)</td></tr> |
---|
276 | |
---|
277 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Multiplication m'*v where m is a sparse matrix and v is a full column vector. <br></td></tr> |
---|
278 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="545e940ab9c28581e4f230140d234ecc"></a><!-- doxytag: member="itpp::Sparse_Mat::mult_trans" ref="545e940ab9c28581e4f230140d234ecc" args="(const Sparse_Mat< T > &m1, const Sparse_Mat< T > &m2)" --> |
---|
279 | <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#545e940ab9c28581e4f230140d234ecc">mult_trans</a> (const <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > &m1, const <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > &m2)</td></tr> |
---|
280 | |
---|
281 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Multiplication m1*m2' where m1 and m2 are sparse matrices. <br></td></tr> |
---|
282 | <tr><td colspan="2"><br><h2>Related Functions</h2></td></tr> |
---|
283 | <tr><td colspan="2">(Note that these are not member functions.) <br><br></td></tr> |
---|
284 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="781278e3d947fb084c54e568110c09d6"></a><!-- doxytag: member="itpp::Sparse_Mat::sparse_imat" ref="781278e3d947fb084c54e568110c09d6" args="" --> |
---|
285 | typedef <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< int > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#781278e3d947fb084c54e568110c09d6">sparse_imat</a></td></tr> |
---|
286 | |
---|
287 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Sparse integer matrix. <br></td></tr> |
---|
288 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8575a5d0dd547034677dc41da3f85138"></a><!-- doxytag: member="itpp::Sparse_Mat::sparse_mat" ref="8575a5d0dd547034677dc41da3f85138" args="" --> |
---|
289 | typedef <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< double > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#8575a5d0dd547034677dc41da3f85138">sparse_mat</a></td></tr> |
---|
290 | |
---|
291 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Sparse double matrix. <br></td></tr> |
---|
292 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1cc7ca3875e7da48495a7d67b14ea716"></a><!-- doxytag: member="itpp::Sparse_Mat::sparse_cmat" ref="1cc7ca3875e7da48495a7d67b14ea716" args="" --> |
---|
293 | typedef <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a><br class="typebreak"> |
---|
294 | < std::complex< double > > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Sparse__Mat.html#1cc7ca3875e7da48495a7d67b14ea716">sparse_cmat</a></td></tr> |
---|
295 | |
---|
296 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Sparse complex<double> matrix. <br></td></tr> |
---|
297 | </table> |
---|
298 | <hr><a name="_details"></a><h2>Detailed Description</h2> |
---|
299 | <h3>template<class T><br> |
---|
300 | class itpp::Sparse_Mat< T ></h3> |
---|
301 | |
---|
302 | Templated Sparse Matrix Class. |
---|
303 | <p> |
---|
304 | <dl class="author" compact><dt><b>Author:</b></dt><dd>Tony Ottosson and Tobias Ringstrom</dd></dl> |
---|
305 | A sparse matrix is a matrix where most elements are zero. The maximum number of non-zero elements in each column is a parameter to the constructor.<p> |
---|
306 | The implementation is based on representing all columns as sparse vectors. Thus, column access generally is much faster than row access. The elements in each vector are stored in random order, i.e. they are not sorted. <hr><h2>Constructor & Destructor Documentation</h2> |
---|
307 | <a class="anchor" name="721a28a89f8082a9c753a9dfcd0b24ed"></a><!-- doxytag: member="itpp::Sparse_Mat::Sparse_Mat" ref="721a28a89f8082a9c753a9dfcd0b24ed" args="(int rows, int cols, int row_data_init=200)" --> |
---|
308 | <div class="memitem"> |
---|
309 | <div class="memproto"> |
---|
310 | <div class="memtemplate"> |
---|
311 | template<class T > </div> |
---|
312 | <table class="memname"> |
---|
313 | <tr> |
---|
314 | <td class="memname"><a class="el" href="classitpp_1_1Sparse__Mat.html">itpp::Sparse_Mat</a>< T >::<a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a> </td> |
---|
315 | <td>(</td> |
---|
316 | <td class="paramtype">int </td> |
---|
317 | <td class="paramname"> <em>rows</em>, </td> |
---|
318 | </tr> |
---|
319 | <tr> |
---|
320 | <td class="paramkey"></td> |
---|
321 | <td></td> |
---|
322 | <td class="paramtype">int </td> |
---|
323 | <td class="paramname"> <em>cols</em>, </td> |
---|
324 | </tr> |
---|
325 | <tr> |
---|
326 | <td class="paramkey"></td> |
---|
327 | <td></td> |
---|
328 | <td class="paramtype">int </td> |
---|
329 | <td class="paramname"> <em>row_data_init</em> = <code>200</code></td><td> </td> |
---|
330 | </tr> |
---|
331 | <tr> |
---|
332 | <td></td> |
---|
333 | <td>)</td> |
---|
334 | <td></td><td></td><td><code> [inline]</code></td> |
---|
335 | </tr> |
---|
336 | </table> |
---|
337 | </div> |
---|
338 | <div class="memdoc"> |
---|
339 | |
---|
340 | <p> |
---|
341 | Initiate an empty sparse matrix. |
---|
342 | <p> |
---|
343 | A <a class="el" href="classitpp_1_1Sparse__Mat.html" title="Templated Sparse Matrix Class.">Sparse_Mat</a> consists of colums that have the type <a class="el" href="classitpp_1_1Sparse__Vec.html" title="Templated sparse vector class.">Sparse_Vec</a>. The maximum number of non-zero elements is each column is denoted <code>row_data_init</code>.<p> |
---|
344 | <dl compact><dt><b>Parameters:</b></dt><dd> |
---|
345 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
346 | <tr><td valign="top"></td><td valign="top"><em>rows</em> </td><td>Number of rows in the matrix </td></tr> |
---|
347 | <tr><td valign="top"></td><td valign="top"><em>cols</em> </td><td>Number of columns in the matrix </td></tr> |
---|
348 | <tr><td valign="top"></td><td valign="top"><em>row_data_init</em> </td><td>The maximum number of non-zero elements in each column (default value is 200) </td></tr> |
---|
349 | </table> |
---|
350 | </dl> |
---|
351 | |
---|
352 | </div> |
---|
353 | </div><p> |
---|
354 | <a class="anchor" name="922d170164eeaa595b17c7962931a073"></a><!-- doxytag: member="itpp::Sparse_Mat::Sparse_Mat" ref="922d170164eeaa595b17c7962931a073" args="(const Mat< T > &m, T epsilon)" --> |
---|
355 | <div class="memitem"> |
---|
356 | <div class="memproto"> |
---|
357 | <div class="memtemplate"> |
---|
358 | template<class T> </div> |
---|
359 | <table class="memname"> |
---|
360 | <tr> |
---|
361 | <td class="memname"><a class="el" href="classitpp_1_1Sparse__Mat.html">itpp::Sparse_Mat</a>< T >::<a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a> </td> |
---|
362 | <td>(</td> |
---|
363 | <td class="paramtype">const <a class="el" href="classitpp_1_1Mat.html">Mat</a>< T > & </td> |
---|
364 | <td class="paramname"> <em>m</em>, </td> |
---|
365 | </tr> |
---|
366 | <tr> |
---|
367 | <td class="paramkey"></td> |
---|
368 | <td></td> |
---|
369 | <td class="paramtype">T </td> |
---|
370 | <td class="paramname"> <em>epsilon</em></td><td> </td> |
---|
371 | </tr> |
---|
372 | <tr> |
---|
373 | <td></td> |
---|
374 | <td>)</td> |
---|
375 | <td></td><td></td><td><code> [inline]</code></td> |
---|
376 | </tr> |
---|
377 | </table> |
---|
378 | </div> |
---|
379 | <div class="memdoc"> |
---|
380 | |
---|
381 | <p> |
---|
382 | Initiate a new sparse matrix from a dense matrix. Elements of <code>m</code> larger than <code>epsilon</code> are copied into the new sparse matrix. |
---|
383 | <p> |
---|
384 | <dl class="note" compact><dt><b>Note:</b></dt><dd>If the type T is double complex, then the elements of <code>m</code> larger than <code>abs(epsilon)</code> are copied into the new sparse matrix. </dd></dl> |
---|
385 | |
---|
386 | <p>References <a class="el" href="fix__functions_8cpp-source.html#l00076">itpp::abs()</a>, <a class="el" href="mat_8h-source.html#l00241">itpp::Mat< Num_T >::cols()</a>, and <a class="el" href="mat_8h-source.html#l00243">itpp::Mat< Num_T >::rows()</a>.</p> |
---|
387 | |
---|
388 | </div> |
---|
389 | </div><p> |
---|
390 | <hr><h2>Member Function Documentation</h2> |
---|
391 | <a class="anchor" name="cf3ddc3a3af57157e51c00b3d6e423ce"></a><!-- doxytag: member="itpp::Sparse_Mat::operator=" ref="cf3ddc3a3af57157e51c00b3d6e423ce" args="(const Sparse_Mat< T > &m)" --> |
---|
392 | <div class="memitem"> |
---|
393 | <div class="memproto"> |
---|
394 | <div class="memtemplate"> |
---|
395 | template<class T> </div> |
---|
396 | <table class="memname"> |
---|
397 | <tr> |
---|
398 | <td class="memname">void <a class="el" href="classitpp_1_1Sparse__Mat.html">itpp::Sparse_Mat</a>< T >::operator= </td> |
---|
399 | <td>(</td> |
---|
400 | <td class="paramtype">const <a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > & </td> |
---|
401 | <td class="paramname"> <em>m</em> </td> |
---|
402 | <td> ) </td> |
---|
403 | <td><code> [inline]</code></td> |
---|
404 | </tr> |
---|
405 | </table> |
---|
406 | </div> |
---|
407 | <div class="memdoc"> |
---|
408 | |
---|
409 | <p> |
---|
410 | Assign sparse matrix the value and dimensions of the sparse matrix <code>m</code>. |
---|
411 | <p> |
---|
412 | Returns the transpose of the sparse matrix<p> |
---|
413 | Note: this function can be slow for large matrices. |
---|
414 | <p>References <a class="el" href="smat_8h-source.html#l00314">itpp::Sparse_Mat< T >::col</a>, <a class="el" href="smat_8h-source.html#l00313">itpp::Sparse_Mat< T >::n_cols</a>, and <a class="el" href="smat_8h-source.html#l00313">itpp::Sparse_Mat< T >::n_rows</a>.</p> |
---|
415 | |
---|
416 | </div> |
---|
417 | </div><p> |
---|
418 | <a class="anchor" name="bede37fe2203b2bae86c7000c6fa78f4"></a><!-- doxytag: member="itpp::Sparse_Mat::set_size" ref="bede37fe2203b2bae86c7000c6fa78f4" args="(int rows, int cols, int row_data_init=-1)" --> |
---|
419 | <div class="memitem"> |
---|
420 | <div class="memproto"> |
---|
421 | <div class="memtemplate"> |
---|
422 | template<class T > </div> |
---|
423 | <table class="memname"> |
---|
424 | <tr> |
---|
425 | <td class="memname">void <a class="el" href="classitpp_1_1Sparse__Mat.html">itpp::Sparse_Mat</a>< T >::set_size </td> |
---|
426 | <td>(</td> |
---|
427 | <td class="paramtype">int </td> |
---|
428 | <td class="paramname"> <em>rows</em>, </td> |
---|
429 | </tr> |
---|
430 | <tr> |
---|
431 | <td class="paramkey"></td> |
---|
432 | <td></td> |
---|
433 | <td class="paramtype">int </td> |
---|
434 | <td class="paramname"> <em>cols</em>, </td> |
---|
435 | </tr> |
---|
436 | <tr> |
---|
437 | <td class="paramkey"></td> |
---|
438 | <td></td> |
---|
439 | <td class="paramtype">int </td> |
---|
440 | <td class="paramname"> <em>row_data_init</em> = <code>-1</code></td><td> </td> |
---|
441 | </tr> |
---|
442 | <tr> |
---|
443 | <td></td> |
---|
444 | <td>)</td> |
---|
445 | <td></td><td></td><td><code> [inline]</code></td> |
---|
446 | </tr> |
---|
447 | </table> |
---|
448 | </div> |
---|
449 | <div class="memdoc"> |
---|
450 | |
---|
451 | <p> |
---|
452 | Set the size of the sparse matrix. |
---|
453 | <p> |
---|
454 | A <a class="el" href="classitpp_1_1Sparse__Mat.html" title="Templated Sparse Matrix Class.">Sparse_Mat</a> consists of colums that have the type <a class="el" href="classitpp_1_1Sparse__Vec.html" title="Templated sparse vector class.">Sparse_Vec</a>. The maximum number of non-zero elements is each column is denoted <code>row_data_init</code>, with default value =-1 indicating that the number of data elements is not changed.<p> |
---|
455 | <dl compact><dt><b>Parameters:</b></dt><dd> |
---|
456 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
457 | <tr><td valign="top"></td><td valign="top"><em>rows</em> </td><td>Number of rows in the matrix </td></tr> |
---|
458 | <tr><td valign="top"></td><td valign="top"><em>cols</em> </td><td>Number of columns in the matrix </td></tr> |
---|
459 | <tr><td valign="top"></td><td valign="top"><em>row_data_init</em> </td><td>The maximum number of non-zero elements in each column (default value -1 <code>=></code> allocated size for the data is not changed) </td></tr> |
---|
460 | </table> |
---|
461 | </dl> |
---|
462 | |
---|
463 | <p>Referenced by <a class="el" href="smat_8h-source.html#l00636">itpp::Sparse_Mat< T >::transpose()</a>.</p> |
---|
464 | |
---|
465 | </div> |
---|
466 | </div><p> |
---|
467 | <a class="anchor" name="da0c107ad90b5445d8cb7c55b48ef8b3"></a><!-- doxytag: member="itpp::Sparse_Mat::transpose" ref="da0c107ad90b5445d8cb7c55b48ef8b3" args="() const " --> |
---|
468 | <div class="memitem"> |
---|
469 | <div class="memproto"> |
---|
470 | <div class="memtemplate"> |
---|
471 | template<class T> </div> |
---|
472 | <table class="memname"> |
---|
473 | <tr> |
---|
474 | <td class="memname"><a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > <a class="el" href="classitpp_1_1Sparse__Mat.html">itpp::Sparse_Mat</a>< T >::transpose </td> |
---|
475 | <td>(</td> |
---|
476 | <td class="paramname"> </td> |
---|
477 | <td> ) </td> |
---|
478 | <td> const<code> [inline]</code></td> |
---|
479 | </tr> |
---|
480 | </table> |
---|
481 | </div> |
---|
482 | <div class="memdoc"> |
---|
483 | |
---|
484 | <p> |
---|
485 | Returns the transpose of the sparse matrix<p> |
---|
486 | Note: this function can be slow for large matrices. |
---|
487 | </div> |
---|
488 | </div><p> |
---|
489 | <a class="anchor" name="5b12be950cd135b8fb0f345a9d73348d"></a><!-- doxytag: member="itpp::Sparse_Mat::transpose" ref="5b12be950cd135b8fb0f345a9d73348d" args="(Sparse_Mat< T > &m) const " --> |
---|
490 | <div class="memitem"> |
---|
491 | <div class="memproto"> |
---|
492 | <div class="memtemplate"> |
---|
493 | template<class T> </div> |
---|
494 | <table class="memname"> |
---|
495 | <tr> |
---|
496 | <td class="memname">void <a class="el" href="classitpp_1_1Sparse__Mat.html">itpp::Sparse_Mat</a>< T >::transpose </td> |
---|
497 | <td>(</td> |
---|
498 | <td class="paramtype"><a class="el" href="classitpp_1_1Sparse__Mat.html">Sparse_Mat</a>< T > & </td> |
---|
499 | <td class="paramname"> <em>m</em> </td> |
---|
500 | <td> ) </td> |
---|
501 | <td> const<code> [inline]</code></td> |
---|
502 | </tr> |
---|
503 | </table> |
---|
504 | </div> |
---|
505 | <div class="memdoc"> |
---|
506 | |
---|
507 | <p> |
---|
508 | Transpose the sparse matrix, return the result in <code>m</code> <p> |
---|
509 | Note: this function can be slow for large matrices. |
---|
510 | <p>References <a class="el" href="smat_8h-source.html#l00314">itpp::Sparse_Mat< T >::col</a>, and <a class="el" href="smat_8h-source.html#l00441">itpp::Sparse_Mat< T >::set_size()</a>.</p> |
---|
511 | |
---|
512 | <p>Referenced by <a class="el" href="gf2mat_8cpp-source.html#l00217">itpp::GF2mat_sparse_alist::from_sparse()</a>, and <a class="el" href="gf2mat_8cpp-source.html#l00193">itpp::GF2mat_sparse_alist::to_sparse()</a>.</p> |
---|
513 | |
---|
514 | </div> |
---|
515 | </div><p> |
---|
516 | <hr>The documentation for this class was generated from the following file:<ul> |
---|
517 | <li><a class="el" href="smat_8h-source.html">smat.h</a></ul> |
---|
518 | </div> |
---|
519 | <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:19 2009 for mixpp by |
---|
520 | <a href="http://www.doxygen.org/index.html"> |
---|
521 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> |
---|
522 | </body> |
---|
523 | </html> |
---|