| 1 | <refentry id="linearalgebraopcodes"> |
| 2 | <indexterm id="Indexlinearalgebra"> |
| 3 | <primary>Linear algebra opcodes</primary> |
| 4 | </indexterm> |
| 5 | <refentryinfo> |
| 6 | <title>Mathematical Operations</title> |
| 7 | </refentryinfo> |
| 8 | <refmeta> |
| 9 | <refentrytitle>Linear Algebra Opcodes</refentrytitle> |
| 10 | </refmeta> |
| 11 | |
| 12 | <refnamediv> |
| 13 | <refname>Linear Algebra Opcodes</refname> |
| 14 | <refpurpose> |
| 15 | Scalar, vector, and matrix arithmetic on real and complex values. |
| 16 | </refpurpose> |
| 17 | </refnamediv> |
| 18 | |
| 19 | <refsect1> |
| 20 | <title>Description</title> |
| 21 | <para>Plugin opcodes in linear_algebra. This opcode is part of the plugin repository and has to be installed separately. |
| 22 | The plugin repository can be found here: <ulink url="https://github.com/csound/plugins"><citetitle>https://github.com/csound/plugins</citetitle></ulink></para> |
| 23 | <para>These opcodes implement many linear algebra operations, |
| 24 | from scalar, vector, and matrix arithmetic up to |
| 25 | and including QR based eigenvalue decompositions. |
| 26 | The opcodes are designed for digital signal processing, |
| 27 | and of course other mathematical operations, |
| 28 | in the Csound orchestra language.</para> |
| 29 | |
| 30 | <para>The numerical implementation uses the gmm++ library |
| 31 | from <ulink url="https://getfem.org/gmm/index.html"><citetitle>getfem.org/gmm/index.html</citetitle></ulink>.</para> |
| 32 | |
| 33 | <warning> |
| 34 | <para> |
| 35 | For applications with f-sig variables, array arithmetic must be |
| 36 | performed only when the f-sig is "current," because f-rate |
| 37 | is some fraction of k-rate; currency can be determined with the |
| 38 | la_k_current_f opcode. |
| 39 | </para> |
| 40 | |
| 41 | <para> |
| 42 | For applications using assignments between real vectors and |
| 43 | a-rate variables, array arithmetic must be performed only when the |
| 44 | vectors are "current", because the size of the vector may be |
| 45 | some integral multiple of ksmps; currency can be determined |
| 46 | by means of the la_k_current_vr opcode. |
| 47 | </para> |
| 48 | </warning> |
| 49 | |
| 50 | <table id="LinearAlgebraDataTypes" frame="all" colsep="1"> |
| 51 | <title>Linear Algebra Data Types</title> |
| 52 | <tgroup cols="3"> |
| 53 | <thead> |
| 54 | <row> |
| 55 | <entry>Mathematical Type</entry> |
| 56 | <entry>Code</entry> |
| 57 | <entry>Corresponding Csound Type or Types</entry> |
| 58 | </row> |
| 59 | </thead> |
| 60 | <tbody> |
| 61 | <row> |
| 62 | <entry>real scalar </entry> |
| 63 | <entry>r</entry> |
| 64 | <entry>i-rate or k-rate variable</entry> |
| 65 | </row> |
| 66 | <row> |
| 67 | <entry>complex scalar</entry> |
| 68 | <entry>c</entry> |
| 69 | <entry>pair of i-rate or k-rate variables, e.g. "kr, ki"</entry> |
| 70 | </row> |
| 71 | <row> |
| 72 | <entry>real vector</entry> |
| 73 | <entry>vr</entry> |
| 74 | <entry>i-rate variable holding address of array</entry> |
| 75 | </row> |
| 76 | <row> |
| 77 | <entry>real vector</entry> |
| 78 | <entry>a</entry> |
| 79 | <entry>a-rate variable</entry> |
| 80 | </row> |
| 81 | <row> |
| 82 | <entry>real vector</entry> |
| 83 | <entry>t</entry> |
| 84 | <entry>function table number</entry> |
| 85 | </row> |
| 86 | <row> |
| 87 | <entry>complex vector</entry> |
| 88 | <entry>vc</entry> |
| 89 | <entry>i-rate variable holding address of array</entry> |
| 90 | </row> |
| 91 | <row> |
| 92 | <entry>complex vector</entry> |
| 93 | <entry>f</entry> |
| 94 | <entry>fsig variable</entry> |
| 95 | </row> |
| 96 | <row> |
| 97 | <entry>real matrix</entry> |
| 98 | <entry>mr</entry> |
| 99 | <entry>i-rate variable holding address of array</entry> |
| 100 | </row> |
| 101 | <row> |
| 102 | <entry>complex matrix</entry> |
| 103 | <entry>mc</entry> |
| 104 | <entry>i-rate variable holding address of array</entry> |
| 105 | </row> |
| 106 | </tbody> |
| 107 | </tgroup> |
| 108 | </table> |
| 109 | <para>All arrays are 0-based; the first index iterates rows to give columns, |
| 110 | the second index iterates columns to give elements.</para> |
| 111 | |
| 112 | <para>All arrays are general and dense; banded, Hermitian, symmetric |
| 113 | and sparse routines are not implemented.</para> |
| 114 | |
| 115 | <para>An array can be of type code vr, vc, mr, or mc |
| 116 | and is stored in an i-rate object. |
| 117 | In orchestra code, an array is passed as a |
| 118 | MYFLT i-rate variable that contains the address |
| 119 | of the array object, which is actually stored |
| 120 | in the allocator opcode instance. |
| 121 | Although array variables are i-rate, of course |
| 122 | their values and even shapes may change at i-rate or k-rate. |
| 123 | </para> |
| 124 | |
| 125 | <para>All operands must be pre-allocated; except for the creation |
| 126 | opcodes, no opcode ever allocates any arrays. |
| 127 | This is true even if the array appears on the |
| 128 | left-hand side of an opcode! However, some operations |
| 129 | may reshape arrays to hold results. |
| 130 | </para> |
| 131 | |
| 132 | <para> |
| 133 | Arrays are automatically deallocated when their instrument |
| 134 | is deallocated. |
| 135 | </para> |
| 136 | |
| 137 | <para> |
| 138 | Not only for more efficient performance, |
| 139 | but also to make it easier to remember opcode names, |
| 140 | the performance rate, output value types, operation names, |
| 141 | and input value types are deterministically |
| 142 | encoded into the opcode name: |
| 143 | </para> |
| 144 | |
| 145 | <orderedlist> |
| 146 | <listitem>"la" for "linear algebra opcode family".</listitem> |
| 147 | <listitem>"i" or "k" for performance rate.</listitem> |
| 148 | <listitem>Type code(s) (see above table) for output value(s), but only if the type is not implicit from the input values.</listitem> |
| 149 | <listitem>Operation name: common mathematical name (preferred) or abbreviation.</listitem> |
| 150 | <listitem>Type code(s) for input values, if not implicit.</listitem> |
| 151 | </orderedlist> |
| 152 | |
| 153 | <para>For additional details, see the gmm++ documentation at |
| 154 | <ulink url="http://download.gna.org/getfem/doc/gmmuser.pdf"><citetitle>http://download.gna.org/getfem/doc/gmmuser.pdf</citetitle></ulink>. |
| 155 | </para> |
| 156 | </refsect1> |
| 157 | |
| 158 | <refsect1> |
| 159 | <title>Syntax</title> |
| 160 | <bridgehead> |
| 161 | Array Creation |
| 162 | </bridgehead> |
| 163 | |
| 164 | <synopsis>ivr <command>la_i_vr_create</command> irows</synopsis> |
| 165 | <para> |
| 166 | Create a real vector with irows rows. |
| 167 | </para> |
| 168 | <synopsis>ivc <command>la_i_vc_create</command> irows</synopsis> |
| 169 | <para> |
| 170 | Create a complex vector with irows rows. |
| 171 | </para> |
| 172 | <synopsis>imr <command>la_i_mr_create</command> irows, icolumns [, odiagonal]</synopsis> |
| 173 | <para> |
| 174 | Create a real matrix with irows rows and icolumns columns, with an optional value on the diagonal. |
| 175 | </para> |
| 176 | <synopsis>imc <command>la_i_mc_create</command> irows, icolumns [, odiagonal_r, odiagonal_i]</synopsis> |
| 177 | <para> |
| 178 | Create a complex matrix with irows rows and icolumns columns, with an optional complex value on the diagonal. |
| 179 | </para> |
| 180 | |
| 181 | <bridgehead> |
| 182 | Array Introspection |
| 183 | </bridgehead> |
| 184 | |
| 185 | <synopsis>irows <command>la_i_size_vr</command> ivr</synopsis> |
| 186 | <para>Return the number of rows in real vector ivr.</para> |
| 187 | <synopsis>irows <command>la_i_size_vc</command> ivc</synopsis> |
| 188 | <para>Return the number of rows in complex vector ivc.</para> |
| 189 | <synopsis>irows, icolumns <command>la_i_size_mr</command> imr</synopsis> |
| 190 | <para>Return the number of rows and columns in real matrix imr.</para> |
| 191 | <synopsis>irows, icolumns <command>la_i_size_mc</command> imc</synopsis> |
| 192 | <para>Return the number of rows and columns in complex matrix imc.</para> |
| 193 | |
| 194 | <synopsis>kfiscurrent <command>la_k_current_f</command> fsig</synopsis> |
| 195 | <para>Return 1 if fsig is current, that is, if the value of fsig will change on the next kperiod.</para> |
| 196 | <synopsis>kvriscurrent <command>la_k_current_vr</command> ivr</synopsis> |
| 197 | <para>Return 1 if the real vector ivr is current, that is, if Csound's current audio sample frame stands at index 0 of the vector.</para> |
| 198 | |
| 199 | <synopsis> <command>la_i_print_vr</command> ivr</synopsis> |
| 200 | <para>Print the value of real vector ivr.</para> |
| 201 | <synopsis> <command>la_i_print_vc</command> ivc</synopsis> |
| 202 | <para>Print the value of complex vector ivc.</para> |
| 203 | <synopsis> <command>la_i_print_mr</command> imr</synopsis> |
| 204 | <para>Print the value of real matrix imr.</para> |
| 205 | <synopsis> <command>la_i_print_mc</command> imc</synopsis> |
| 206 | <para>Print the value of complex matrix imc.</para> |
| 207 | |
| 208 | <bridgehead> |
| 209 | Array Assignment and Conversion |
| 210 | </bridgehead> |
| 211 | |
| 212 | <synopsis>ivr <command>la_i_assign_vr</command> ivr</synopsis> |
| 213 | <para>Assign the value of the real vector on the right-hand side to the real vector on the left-hand side, at i-rate.</para> |
| 214 | <synopsis>ivr <command>la_k_assign_vr</command> ivr</synopsis> |
| 215 | <para>Assign the value of the real vector on the right-hand side to the real vector on the left-hand side, at k-rate.</para> |
| 216 | <synopsis>ivc <command>la_i_assign_vc</command> ivc</synopsis> |
| 217 | <synopsis>ivc <command>la_k_assign_vc</command> ivr</synopsis> |
| 218 | <synopsis>imr <command>la_i_assign_mr</command> imr</synopsis> |
| 219 | <synopsis>imr <command>la_k_assign_mr</command> imr</synopsis> |
| 220 | <synopsis>imc <command>la_i_assign_mc</command> imc</synopsis> |
| 221 | <synopsis>imc <command>la_k_assign_mc</command> imr</synopsis> |
| 222 | |
| 223 | <warning> |
| 224 | <para> |
| 225 | Assignments to vectors from tables or fsigs may resize the vectors. |
| 226 | </para> |
| 227 | <para> |
| 228 | Assignments to vectors from a-rate variables, or to a-rate variables |
| 229 | from vectors, will be performed incrementally, one chunk of ksmps elements |
| 230 | per kperiod. Therefore, array arithmetic on such vectors should only be |
| 231 | performed when the vectors are current, as determined by the la_k_currrent_vr opcode. |
| 232 | </para> |
| 233 | </warning> |
| 234 | |
| 235 | <synopsis>ivr <command>la_k_assign_a</command> asig</synopsis> |
| 236 | <synopsis>ivr <command>la_i_assign_t</command> itablenumber</synopsis> |
| 237 | <synopsis>ivr <command>la_k_assign_t</command> itablenumber</synopsis> |
| 238 | <synopsis>ivc <command>la_k_assign_f</command> fsig</synopsis> |
| 239 | |
| 240 | <synopsis>asig <command>la_k_a_assign</command> ivr</synopsis> |
| 241 | <synopsis>itablenum <command>la_i_t_assign</command> ivr</synopsis> |
| 242 | <synopsis>itablenum <command>la_k_t_assign</command> ivr</synopsis> |
| 243 | <synopsis>fsig <command>la_k_f_assign</command> ivc</synopsis> |
| 244 | |
| 245 | <bridgehead> |
| 246 | Fill Arrays with Random Elements |
| 247 | </bridgehead> |
| 248 | |
| 249 | <synopsis>ivr <command>la_i_random_vr</command> [ifill_fraction]</synopsis> |
| 250 | <synopsis>ivr <command>la_k_random_vr</command> [kfill_fraction]</synopsis> |
| 251 | <synopsis>ivc <command>la_i_random_vc</command> [ifill_fraction]</synopsis> |
| 252 | <synopsis>ivc <command>la_k_random_vc</command> [kfill_fraction]</synopsis> |
| 253 | <synopsis>imr <command>la_i_random_mr</command> [ifill_fraction]</synopsis> |
| 254 | <synopsis>imr <command>la_k_random_mr</command> [kfill_fraction]</synopsis> |
| 255 | <synopsis>imc <command>la_i_random_mc</command> [ifill_fraction]</synopsis> |
| 256 | <synopsis>imc <command>la_k_random_mc</command> [kfill_fraction]</synopsis> |
| 257 | |
| 258 | <bridgehead> |
| 259 | Array Element Access |
| 260 | </bridgehead> |
| 261 | |
| 262 | <synopsis>ivr <command>la_i_vr_set</command> irow, ivalue</synopsis> |
| 263 | <synopsis>kvr <command>la_k_vr_set</command> krow, kvalue</synopsis> |
| 264 | <synopsis>ivc <command>la_i_vc_set</command> irow, ivalue_r, ivalue_i</synopsis> |
| 265 | <synopsis>kvc <command>la_k_vc_set</command> krow, kvalue_r, kvalue_i</synopsis> |
| 266 | <synopsis>imr <command>la_i mr_set</command> irow, icolumn, ivalue</synopsis> |
| 267 | <synopsis>kmr <command>la_k mr_set</command> krow, kcolumn, ivalue</synopsis> |
| 268 | <synopsis>imc <command>la_i_mc_set</command> irow, icolumn, ivalue_r, ivalue_i</synopsis> |
| 269 | <synopsis>kmc <command>la_k_mc_set</command> krow, kcolumn, kvalue_r, kvalue_i</synopsis> |
| 270 | |
| 271 | <synopsis>ivalue <command>la_i_get_vr</command> ivr, irow</synopsis> |
| 272 | <synopsis>kvalue <command>la_k_get_vr</command> ivr, krow</synopsis> |
| 273 | <synopsis>ivalue_r, ivalue_i <command>la_i_get_vc</command> ivc, irow</synopsis> |
| 274 | <synopsis>kvalue_r, kvalue_i <command>la_k_get_vc</command> ivc, krow</synopsis> |
| 275 | <synopsis>ivalue <command>la_i_get_mr</command> imr, irow, icolumn</synopsis> |
| 276 | <synopsis>kvalue <command>la_k_get_mr</command> imr, krow, kcolumn</synopsis> |
| 277 | <synopsis>ivalue_r, ivalue_i <command>la_i_get_mc</command> imc, irow, icolumn</synopsis> |
| 278 | <synopsis>kvalue_r, kvalue_i <command>la_k_get_mc</command> imc, krow, kcolumn</synopsis> |
| 279 | |
| 280 | <bridgehead> |
| 281 | Single Array Operations |
| 282 | </bridgehead> |
| 283 | |
| 284 | <synopsis>imr <command>la_i_transpose_mr</command> imr</synopsis> |
| 285 | <synopsis>imr <command>la_k_transpose_mr</command> imr</synopsis> |
| 286 | <synopsis>imc <command>la_i_transpose_mc</command> imc</synopsis> |
| 287 | <synopsis>imc <command>la_k_transpose_mc</command> imc</synopsis> |
| 288 | |
| 289 | <synopsis>ivr <command>la_i_conjugate_vr</command> ivr</synopsis> |
| 290 | <synopsis>ivr <command>la_k_conjugate_vr</command> ivr</synopsis> |
| 291 | <synopsis>ivc <command>la_i_conjugate_vc</command> ivc</synopsis> |
| 292 | <synopsis>ivc <command>la_k_conjugate_vc</command> ivc</synopsis> |
| 293 | <synopsis>imr <command>la_i_conjugate_mr</command> imr</synopsis> |
| 294 | <synopsis>imr <command>la_k_conjugate_mr</command> imr</synopsis> |
| 295 | <synopsis>imc <command>la_i_conjugate_mc</command> imc</synopsis> |
| 296 | <synopsis>imc <command>la_k_conjugate_mc</command> imc</synopsis> |
| 297 | |
| 298 | <bridgehead> |
| 299 | Scalar Operations |
| 300 | </bridgehead> |
| 301 | |
| 302 | <synopsis>ir <command>la_i_norm1_vr</command> ivr</synopsis> |
| 303 | <synopsis>kr <command>la_k_norm1_vr</command> ivc</synopsis> |
| 304 | <synopsis>ir <command>la_i_norm1_vc</command> ivc</synopsis> |
| 305 | <synopsis>kr <command>la_k_norm1_vc</command> ivc</synopsis> |
| 306 | <synopsis>ir <command>la_i_norm1_mr</command> imr</synopsis> |
| 307 | <synopsis>kr <command>la_k_norm1_mr</command> imr</synopsis> |
| 308 | <synopsis>ir <command>la_i_norm1_mc</command> imc</synopsis> |
| 309 | <synopsis>kr <command>la_k_norm1_mc</command> imc</synopsis> |
| 310 | |
| 311 | <synopsis>ir <command>la_i_norm_euclid_vr</command> ivr</synopsis> |
| 312 | <synopsis>kr <command>la_k_norm_euclid_vr</command> ivr</synopsis> |
| 313 | <synopsis>ir <command>la_i_norm_euclid_vc</command> ivc</synopsis> |
| 314 | <synopsis>kr <command>la_k_norm_euclid_vc</command> ivc</synopsis> |
| 315 | <synopsis>ir <command>la_i_norm_euclid_mr</command> mvr</synopsis> |
| 316 | <synopsis>kr <command>la_k_norm_euclid_mr</command> mvr</synopsis> |
| 317 | <synopsis>ir <command>la_i_norm_euclid_mc</command> mvc</synopsis> |
| 318 | <synopsis>kr <command>la_k_norm_euclid_mc</command> mvc</synopsis> |
| 319 | |
| 320 | <synopsis>ir <command>la_i_distance_vr</command> ivr</synopsis> |
| 321 | <synopsis>kr <command>la_k_distance_vr</command> ivr</synopsis> |
| 322 | <synopsis>ir <command>la_i_distance_vc</command> ivc</synopsis> |
| 323 | <synopsis>kr <command>la_k_distance_vc</command> ivc</synopsis> |
| 324 | |
| 325 | <synopsis>ir <command>la_i_norm_max</command> imr</synopsis> |
| 326 | <synopsis>kr <command>la_k_norm_max</command> imc</synopsis> |
| 327 | <synopsis>ir <command>la_i_norm_max</command> imr</synopsis> |
| 328 | <synopsis>kr <command>la_k_norm_max</command> imc</synopsis> |
| 329 | |
| 330 | <synopsis>ir <command>la_i_norm_inf_vr</command> ivr</synopsis> |
| 331 | <synopsis>kr <command>la_k_norm_inf_vr</command> ivr</synopsis> |
| 332 | <synopsis>ir <command>la_i_norm_inf_vc</command> ivc</synopsis> |
| 333 | <synopsis>kr <command>la_k_norm_inf_vc</command> ivc</synopsis> |
| 334 | <synopsis>ir <command>la_i_norm_inf_mr</command> imr</synopsis> |
| 335 | <synopsis>kr <command>la_k_norm_inf_mr</command> imr</synopsis> |
| 336 | <synopsis>ir <command>la_i_norm_inf_mc</command> imc</synopsis> |
| 337 | <synopsis>kr <command>la_k_norm_inf_mc</command> imc</synopsis> |
| 338 | |
| 339 | <synopsis>ir <command>la_i_trace_mr</command> imr</synopsis> |
| 340 | <synopsis>kr <command>la_k_trace_mr</command> imr</synopsis> |
| 341 | <synopsis>ir, ii <command>la_i_trace_mc</command> imc</synopsis> |
| 342 | <synopsis>kr, ki <command>la_k_trace_mc</command> imc</synopsis> |
| 343 | |
| 344 | <synopsis>ir <command>la_i_lu_det</command> imr</synopsis> |
| 345 | <synopsis>kr <command>la_k_lu_det</command> imr</synopsis> |
| 346 | <synopsis>ir <command>la_i_lu_det</command> imc</synopsis> |
| 347 | <synopsis>kr <command>la_k_lu_det</command> imc</synopsis> |
| 348 | |
| 349 | <bridgehead> |
| 350 | Elementwise Array-Array Operations |
| 351 | </bridgehead> |
| 352 | |
| 353 | <synopsis>ivr <command>la_i_add_vr</command> ivr_a, ivr_b</synopsis> |
| 354 | <synopsis>ivc <command>la_k_add_vc</command> ivc_a, ivc_b</synopsis> |
| 355 | <synopsis>imr <command>la_i_add_mr</command> imr_a, imr_b</synopsis> |
| 356 | <synopsis>imc <command>la_k_add_mc</command> imc_a, imc_b</synopsis> |
| 357 | |
| 358 | <synopsis>ivr <command>la_i_subtract_vr</command> ivr_a, ivr_b</synopsis> |
| 359 | <synopsis>ivc <command>la_k_subtract_vc</command> ivc_a, ivc_b</synopsis> |
| 360 | <synopsis>imr <command>la_i_subtract_mr</command> imr_a, imr_b</synopsis> |
| 361 | <synopsis>imc <command>la_k_subtract_mc</command> imc_a, imc_b</synopsis> |
| 362 | |
| 363 | <synopsis>ivr <command>la_i_multiply_vr</command> ivr_a, ivr_b</synopsis> |
| 364 | <synopsis>ivc <command>la_k_multiply_vc</command> ivc_a, ivc_b</synopsis> |
| 365 | <synopsis>imr <command>la_i_multiply_mr</command> imr_a, imr_b</synopsis> |
| 366 | <synopsis>imc <command>la_k_multiply_mc</command> imc_a, imc_b</synopsis> |
| 367 | |
| 368 | <synopsis>ivr <command>la_i_divide_vr</command> ivr_a, ivr_b</synopsis> |
| 369 | <synopsis>ivc <command>la_k_divide_vc</command> ivc_a, ivc_b</synopsis> |
| 370 | <synopsis>imr <command>la_i_divide_mr</command> imr_a, imr_b</synopsis> |
| 371 | <synopsis>imc <command>la_k_divide_mc</command> imc_a, imc_b</synopsis> |
| 372 | |
| 373 | <bridgehead> |
| 374 | Inner Products |
| 375 | </bridgehead> |
| 376 | |
| 377 | <synopsis>ir <command>la_i_dot_vr</command> ivr_a, ivr_b</synopsis> |
| 378 | <synopsis>kr <command>la_k_dot_vr</command> ivr_a, ivr_b</synopsis> |
| 379 | <synopsis>ir, ii <command>la_i_dot_vc</command> ivc_a, ivc_b</synopsis> |
| 380 | <synopsis>kr, ki <command>la_k_dot_vc</command> ivc_a, ivc_b</synopsis> |
| 381 | |
| 382 | <synopsis>imr <command>la_i_dot_mr</command> imr_a, imr_b</synopsis> |
| 383 | <synopsis>imr <command>la_k_dot_mr</command> imr_a, imr_b</synopsis> |
| 384 | <synopsis>imc <command>la_i_dot_mc</command> imc_a, imc_b</synopsis> |
| 385 | <synopsis>imc <command>la_k_dot_mc</command> imc_a, imc_b</synopsis> |
| 386 | |
| 387 | <synopsis>ivr <command>la_i_dot_mr_vr</command> imr_a, ivr_b</synopsis> |
| 388 | <synopsis>ivr <command>la_k_dot_mr_vr</command> imr_a, ivr_b</synopsis> |
| 389 | <synopsis>ivc <command>la_i_dot_mc_vc</command> imc_a, ivc_b</synopsis> |
| 390 | <synopsis>ivc <command>la_k_dot_mc_vc</command> imc_a, ivc_b</synopsis> |
| 391 | |
| 392 | <bridgehead> |
| 393 | Matrix Inversion |
| 394 | </bridgehead> |
| 395 | |
| 396 | <synopsis>imr, icondition <command>la_i_invert_mr</command> imr</synopsis> |
| 397 | <synopsis>imr, kcondition <command>la_k_invert_mr</command> imr</synopsis> |
| 398 | <synopsis>imc, icondition <command>la_i_invert_mc</command> imc</synopsis> |
| 399 | <synopsis>imc, kcondition <command>la_k_invert_mc</command> imc</synopsis> |
| 400 | |
| 401 | <bridgehead> |
| 402 | Matrix Decompositions and Solvers |
| 403 | </bridgehead> |
| 404 | |
| 405 | <synopsis>ivr <command>la_i_upper_solve_mr</command> imr [, j_1_diagonal]</synopsis> |
| 406 | <synopsis>ivr <command>la_k_upper_solve_mr</command> imr [, j_1_diagonal]</synopsis> |
| 407 | <synopsis>ivc <command>la_i_upper_solve_mc</command> imc [, j_1_diagonal]</synopsis> |
| 408 | <synopsis>ivc <command>la_k_upper_solve_mc</command> imc [, j_1_diagonal]</synopsis> |
| 409 | |
| 410 | <synopsis>ivr <command>la_i_lower_solve_mr</command> imr [, j_1_diagonal]</synopsis> |
| 411 | <synopsis>ivr <command>la_k_lower_solve_mr</command> imr [, j_1_diagonal]</synopsis> |
| 412 | <synopsis>ivc <command>la_i_lower_solve_mc</command> imc [, j_1_diagonal]</synopsis> |
| 413 | <synopsis>ivc <command>la_k_lower_solve_mc</command> imc [, j_1_diagonal]</synopsis> |
| 414 | |
| 415 | <synopsis>imr, ivr_pivot, isize <command>la_i_lu_factor_mr</command> imr</synopsis> |
| 416 | <synopsis>imr, ivr_pivot, ksize <command>la_k_lu_factor_mr</command> imr</synopsis> |
| 417 | <synopsis>imc, ivr_pivot, isize <command>la_i_lu_factor_mc</command> imc</synopsis> |
| 418 | <synopsis>imc, ivr_pivot, ksize <command>la_k_lu_factor_mc</command> imc</synopsis> |
| 419 | |
| 420 | <synopsis>ivr_x <command>la_i_lu_solve_mr</command> imr, ivr_b</synopsis> |
| 421 | <synopsis>ivr_x <command>la_k_lu_solve_mr</command> imr, ivr_b</synopsis> |
| 422 | <synopsis>ivc_x <command>la_i_lu_solve_mc</command> imc, ivc_b</synopsis> |
| 423 | <synopsis>ivc_x <command>la_k_lu_solve_mc</command> imc, ivc_b</synopsis> |
| 424 | |
| 425 | <synopsis>imr_q, imr_r <command>la_i_qr_factor_mr</command> imr</synopsis> |
| 426 | <synopsis>imr_q, imr_r <command>la_k_qr_factor_mr</command> imr</synopsis> |
| 427 | <synopsis>imc_q, imc_r <command>la_i_qr_factor_mc</command> imc</synopsis> |
| 428 | <synopsis>imc_q, imc_r <command>la_k_qr_factor_mc</command> imc</synopsis> |
| 429 | |
| 430 | <synopsis>ivr_eig_vals <command>la_i_qr_eigen_mr</command> imr, i_tolerance</synopsis> |
| 431 | <synopsis>ivr_eig_vals <command>la_k_qr_eigen_mr</command> imr, k_tolerance</synopsis> |
| 432 | <synopsis>ivr_eig_vals <command>la_i_qr_eigen_mc</command> imc, i_tolerance</synopsis> |
| 433 | <synopsis>ivr_eig_vals <command>la_k_qr_eigen_mc</command> imc, k_tolerance</synopsis> |
| 434 | |
| 435 | <warning> |
| 436 | Matrix must be Hermitian in order to compute eigenvectors. |
| 437 | </warning> |
| 438 | |
| 439 | <synopsis>ivr_eig_vals, imr_eig_vecs <command>la_i_qr_sym_eigen_mr</command> imr, i_tolerance</synopsis> |
| 440 | <synopsis>ivr_eig_vals, imr_eig_vecs <command>la_k_qr_sym_eigen_mr</command> imr, k_tolerance</synopsis> |
| 441 | <synopsis>ivc_eig_vals, imc_eig_vecs <command>la_i_qr_sym_eigen_mc</command> imc, i_tolerance</synopsis> |
| 442 | <synopsis>ivc_eig_vals, imc_eig_vecs <command>la_k_qr_sym_eigen_mc</command> imc, k_tolerance</synopsis> |
| 443 | </refsect1> |
| 444 | |
| 445 | <refsect1> |
| 446 | <title>See also</title> |
| 447 | <para> For other information on the Linear Algebra Opcodes, see the <ulink url="https://csoundjournal.com/issue22/linearAlgebra.html"><citetitle>Csound Journal.</citetitle></ulink></para> |
| 448 | </refsect1> |
| 449 | |
| 450 | <refsect1> |
| 451 | <title>Credits</title> |
| 452 | <para>Michael Gogins</para> |
| 453 | <para>New in Csound version 5.09</para> |
| 454 | </refsect1> |
| 455 | </refentry> |