File: liboctave_4.html

package info (click to toggle)
octave 2.0.16-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 26,276 kB
  • ctags: 16,450
  • sloc: cpp: 67,548; fortran: 41,514; ansic: 26,682; sh: 7,361; makefile: 4,077; lex: 2,008; yacc: 1,849; lisp: 1,702; perl: 1,676; exp: 123
file content (528 lines) | stat: -rw-r--r-- 16,196 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
<HTML>
<HEAD>
<!-- This HTML file has been created by texi2html 1.51
     from ./liboctave.texi on 9 October 1998 -->

<TITLE>Octave C++ Classes - Arrays</TITLE>
</HEAD>
<BODY>
Go to the <A HREF="liboctave_1.html">first</A>, <A HREF="liboctave_3.html">previous</A>, <A HREF="liboctave_5.html">next</A>, <A HREF="liboctave_18.html">last</A> section, <A HREF="liboctave_toc.html">table of contents</A>.
<P><HR><P>


<H1><A NAME="SEC8" HREF="liboctave_toc.html#TOC8">Arrays</A></H1>
<P>
<A NAME="IDX6"></A>

</P>



<H2><A NAME="SEC9" HREF="liboctave_toc.html#TOC9">Constructors and Assignment</A></H2>

<P>
<DL>
<DT><U>Constructor:</U>  <B>Array&#60;T&#62;::Array</B> <I>(void)</I>
<DD><A NAME="IDX7"></A>
Create an array with no elements.
</DL>

</P>
<P>
<DL>
<DT><U>Constructor:</U>  <B>Array&#60;T&#62;::Array</B> <I>(int <VAR>n</VAR> [, const T &#38;<VAR>val</VAR>])</I>
<DD><A NAME="IDX8"></A>
Create an array with <VAR>n</VAR> elements.  If the optional argument
<VAR>val</VAR> is supplied, the elements are initialized to <VAR>val</VAR>;
otherwise, they are left uninitialized.  If <VAR>n</VAR> is less than zero,
the current error handler is invoked (see section <A HREF="liboctave_14.html#SEC26">Error Handling</A>).
</DL>

</P>
<P>
<DL>
<DT><U>Constructor:</U>  <B>Array&#60;T&#62;::Array</B> <I>(const Array&#60;T&#62; &#38;<VAR>a</VAR>)</I>
<DD><A NAME="IDX9"></A>
Create a copy of the <VAR>Array&#60;T&#62;</VAR> object <VAR>a</VAR>.  Memory for the
<VAR>Array&#60;T&#62;</VAR> class is managed using a reference counting scheme, so
the cost of this operation is independent of the size of the array.
</DL>

</P>
<P>
<DL>
<DT><U>Operator:</U> Array&#60;T&#62;&#38; <B>Array&#60;T&#62;::operator =</B> <I>(const Array&#60;T&#62; &#38;<VAR>a</VAR>)</I>
<DD><A NAME="IDX10"></A>
Assignment operator.  Memory for the <VAR>Array&#60;T&#62;</VAR> class is managed
using a reference counting scheme, so the cost of this operation is
independent of the size of the array.
</DL>

</P>
<P>
<DL>
<DT><U>Method:</U> int <B>Array&#60;T&#62;::capacity</B> <I>(void) const</I>
<DD><A NAME="IDX11"></A>
<DT><U>Method:</U> int <B>Array&#60;T&#62;::length</B> <I>(void) const</I>
<DD><A NAME="IDX12"></A>
Return the length of the array.
</DL>

</P>
<P>
<DL>
<DT><U>Method:</U> T&#38; <B>Array&#60;T&#62;::elem</B> <I>(int <VAR>n</VAR>)</I>
<DD><A NAME="IDX13"></A>
<DT><U>Method:</U> T&#38; <B>Array&#60;T&#62;::checkelem</B> <I>(int <VAR>n</VAR>)</I>
<DD><A NAME="IDX14"></A>
<DT><U>Method:</U> T&#38; <B>Array&#60;T&#62;::operator ()</B> <I>(int <VAR>n</VAR>)</I>
<DD><A NAME="IDX15"></A>
If <VAR>n</VAR> is within the bounds of the array, return a reference to the
element indexed by <VAR>n</VAR>; otherwise, the current error handler is
invoked (see section <A HREF="liboctave_14.html#SEC26">Error Handling</A>).
</DL>

</P>
<P>
<DL>
<DT><U>Method:</U> T <B>Array&#60;T&#62;::elem</B> <I>(int <VAR>n</VAR>) const</I>
<DD><A NAME="IDX16"></A>
<DT><U>Method:</U> T <B>Array&#60;T&#62;::checkelem</B> <I>(int <VAR>n</VAR>) const</I>
<DD><A NAME="IDX17"></A>
<DT><U>Method:</U> T <B>Array&#60;T&#62;::operator</B> <I>() (int <VAR>n</VAR>) const</I>
<DD><A NAME="IDX18"></A>
If <VAR>n</VAR> is within the bounds of the array, return the value indexed
by <VAR>n</VAR>; otherwise, call the current error handler.
See section <A HREF="liboctave_14.html#SEC26">Error Handling</A>.
</DL>

</P>
<P>
<DL>
<DT><U>Method:</U> T&#38; <B>Array&#60;T&#62;::xelem</B> <I>(int <VAR>n</VAR>)</I>
<DD><A NAME="IDX19"></A>
<DT><U>Method:</U> T <B>Array&#60;T&#62;::xelem</B> <I>(int <VAR>n</VAR>) const</I>
<DD><A NAME="IDX20"></A>
Return a reference to, or the value of, the element indexed by <VAR>n</VAR>.
These methods never perform bounds checking.
</DL>

</P>
<P>
<DL>
<DT><U>Method:</U> void <B>Array&#60;T&#62;::resize</B> <I>(int <VAR>n</VAR> [, const T &#38;<VAR>val</VAR>])</I>
<DD><A NAME="IDX21"></A>
Change the size of the array to be <VAR>n</VAR> elements.  All elements are
unchanged, except that if <VAR>n</VAR> is greater than the current size and
the optional argument <VAR>val</VAR> is provided, the additional elements are
initialized to <VAR>val</VAR>; otherwise, any additional elements are left
uninitialized.  In the current implementation, if <VAR>n</VAR> is less than
the current size, the length is updated but no memory is released.
</DL>

</P>
<P>
<DL>
<DT><U>Method:</U> const T* <B>Array&#60;T&#62;::data</B> <I>(void) const</I>
<DD><A NAME="IDX22"></A>
</DL>

</P>

<P>
<DL>
<DT><U>:</U>  <B>Array2</B> <I>(void)</I>
<DD><A NAME="IDX23"></A>
<DT><U>:</U>  <B>Array2</B> <I>(int <VAR>n</VAR>, int <VAR>m</VAR>)</I>
<DD><A NAME="IDX24"></A>
<DT><U>:</U>  <B>Array2</B> <I>(int <VAR>n</VAR>, int <VAR>m</VAR>, const T &#38;<VAR>val</VAR>)</I>
<DD><A NAME="IDX25"></A>
<DT><U>:</U>  <B>Array2</B> <I>(const Array2&#60;T&#62; &#38;<VAR>a</VAR>)</I>
<DD><A NAME="IDX26"></A>
<DT><U>:</U>  <B>Array2</B> <I>(const DiagArray&#60;T&#62; &#38;<VAR>a</VAR>)</I>
<DD><A NAME="IDX27"></A>
</DL>

</P>
<P>
<DL>
<DT><U>:</U> Array2&#60;T&#62;&#38; <B>operator =</B> <I>(const Array2&#60;T&#62; &#38;<VAR>a</VAR>)</I>
<DD><A NAME="IDX28"></A>
</DL>

</P>
<P>
<DL>
<DT><U>:</U> int <B>dim1</B> <I>(void) const</I>
<DD><A NAME="IDX29"></A>
<DT><U>:</U> int <B>rows</B> <I>(void) const</I>
<DD><A NAME="IDX30"></A>
</DL>

</P>
<P>
<DL>
<DT><U>:</U> int <B>dim2</B> <I>(void) const</I>
<DD><A NAME="IDX31"></A>
<DT><U>:</U> int <B>cols</B> <I>(void) const</I>
<DD><A NAME="IDX32"></A>
<DT><U>:</U> int <B>columns</B> <I>(void) const</I>
<DD><A NAME="IDX33"></A>
</DL>

</P>
<P>
<DL>
<DT><U>:</U> T&#38; <B>elem</B> <I>(int <VAR>i</VAR>, int <VAR>j</VAR>)</I>
<DD><A NAME="IDX34"></A>
<DT><U>:</U> T&#38; <B>checkelem</B> <I>(int <VAR>i</VAR>, int <VAR>j</VAR>)</I>
<DD><A NAME="IDX35"></A>
<DT><U>:</U> T&#38; <B>operator ()</B> <I>(int <VAR>i</VAR>, int <VAR>j</VAR>)</I>
<DD><A NAME="IDX36"></A>
</DL>

</P>

<P>
<DL>
<DT><U>:</U> void <B>resize</B> <I>(int <VAR>n</VAR>, int <VAR>m</VAR>)</I>
<DD><A NAME="IDX37"></A>
<DT><U>:</U> void <B>resize</B> <I>(int <VAR>n</VAR>, int <VAR>m</VAR>, const T &#38;<VAR>val</VAR>)</I>
<DD><A NAME="IDX38"></A>
</DL>

</P>
<P>
<DL>
<DT><U>:</U> Array3 <B>(void)</B>
<DD><A NAME="IDX39"></A>
<DT><U>:</U> Array3 <B>(int</B> <I><VAR>n</VAR>, int <VAR>m</VAR>, int <VAR>k</VAR>)</I>
<DD><A NAME="IDX40"></A>
<DT><U>:</U> Array3 <B>(int</B> <I><VAR>n</VAR>, int <VAR>m</VAR>, int <VAR>k</VAR>, const T &#38;<VAR>val</VAR>)</I>
<DD><A NAME="IDX41"></A>
<DT><U>:</U> Array3 <B>(const</B> <I>Array3&#60;T&#62; &#38;<VAR>a</VAR>)</I>
<DD><A NAME="IDX42"></A>
</DL>

</P>
<P>
<DL>
<DT><U>:</U> Array3&#60;T&#62;&#38; <B>operator =</B> <I>(const Array3&#60;T&#62; &#38;<VAR>a</VAR>)</I>
<DD><A NAME="IDX43"></A>
</DL>

</P>
<P>
<DL>
<DT><U>:</U> int <B>dim1</B> <I>(void) const</I>
<DD><A NAME="IDX44"></A>
<DT><U>:</U> int <B>dim2</B> <I>(void) const</I>
<DD><A NAME="IDX45"></A>
<DT><U>:</U> int <B>dim3</B> <I>(void) const</I>
<DD><A NAME="IDX46"></A>
</DL>

</P>
<P>
<DL>
<DT><U>:</U> T&#38; <B>elem</B> <I>(int <VAR>i</VAR>, int <VAR>j</VAR>, int <VAR>k</VAR>)</I>
<DD><A NAME="IDX47"></A>
<DT><U>:</U> T&#38; <B>checkelem</B> <I>(int <VAR>i</VAR>, int <VAR>j</VAR>, int <VAR>k</VAR>)</I>
<DD><A NAME="IDX48"></A>
<DT><U>:</U> T&#38; <B>operator ()</B> <I>(int <VAR>i</VAR>, int <VAR>j</VAR>, int <VAR>k</VAR>)</I>
<DD><A NAME="IDX49"></A>
</DL>

</P>

<P>
<DL>
<DT><U>:</U> void <B>resize</B> <I>(int <VAR>n</VAR>, int <VAR>m</VAR>, int <VAR>k</VAR>)</I>
<DD><A NAME="IDX50"></A>
<DT><U>:</U> void <B>resize</B> <I>(int <VAR>n</VAR>, int <VAR>m</VAR>, int <VAR>k</VAR>, const T &#38;<VAR>val</VAR>)</I>
<DD><A NAME="IDX51"></A>
</DL>

</P>
<P>
<DL>
<DT><U>:</U> {}DiagArray <B>(void)</B>
<DD><A NAME="IDX52"></A>
<DT><U>:</U> {}DiagArray <B>(int</B> <I><VAR>n</VAR>)</I>
<DD><A NAME="IDX53"></A>
<DT><U>:</U> {}DiagArray <B>(int</B> <I><VAR>n</VAR>, const T &#38;<VAR>val</VAR>)</I>
<DD><A NAME="IDX54"></A>
<DT><U>:</U> {}DiagArray <B>(int</B> <I><VAR>r</VAR>, int <VAR>c</VAR>)</I>
<DD><A NAME="IDX55"></A>
<DT><U>:</U> {}DiagArray <B>(int</B> <I><VAR>r</VAR>, int <VAR>c</VAR>, const T &#38;<VAR>val</VAR>)</I>
<DD><A NAME="IDX56"></A>
<DT><U>:</U> {}DiagArray <B>(const</B> <I>Array&#60;T&#62; &#38;<VAR>a</VAR>)</I>
<DD><A NAME="IDX57"></A>
<DT><U>:</U> {}DiagArray <B>(const</B> <I>DiagArray&#60;T&#62; &#38;<VAR>a</VAR>)</I>
<DD><A NAME="IDX58"></A>
</DL>

</P>
<P>
<DL>
<DT><U>:</U> DiagArray&#60;T&#62;&#38; <B>operator =</B> <I>(const DiagArray&#60;T&#62; &#38;<VAR>a</VAR>)</I>
<DD><A NAME="IDX59"></A>
</DL>

</P>
<P>
<DL>
<DT><U>:</U> int <B>dim1</B> <I>(void) const</I>
<DD><A NAME="IDX60"></A>
<DT><U>:</U> int <B>rows</B> <I>(void) const</I>
<DD><A NAME="IDX61"></A>
</DL>

</P>
<P>
<DL>
<DT><U>:</U> int <B>dim2</B> <I>(void) const</I>
<DD><A NAME="IDX62"></A>
<DT><U>:</U> int <B>cols</B> <I>(void) const</I>
<DD><A NAME="IDX63"></A>
<DT><U>:</U> int <B>columns</B> <I>(void) const</I>
<DD><A NAME="IDX64"></A>
</DL>

</P>
<P>
<DL>
<DT><U>:</U> T&#38; <B>elem</B> <I>(int <VAR>r</VAR>, int <VAR>c</VAR>)</I>
<DD><A NAME="IDX65"></A>
<DT><U>:</U> T&#38; <B>checkelem</B> <I>(int <VAR>r</VAR>, int <VAR>c</VAR>)</I>
<DD><A NAME="IDX66"></A>
<DT><U>:</U> T&#38; <B>operator ()</B> <I>(int <VAR>r</VAR>, int <VAR>c</VAR>)</I>
<DD><A NAME="IDX67"></A>
</DL>

</P>

<P>
<DL>
<DT><U>:</U> void <B>resize</B> <I>(int <VAR>n</VAR>, int <VAR>m</VAR>)</I>
<DD><A NAME="IDX68"></A>
<DT><U>:</U> void <B>resize</B> <I>(int <VAR>n</VAR>, int <VAR>m</VAR>, const T &#38;<VAR>val</VAR>)</I>
<DD><A NAME="IDX69"></A>
</DL>
The real and complex <CODE>ColumnVector</CODE> and <CODE>RowVector</CODE> classes
all have the following functions.  These will eventually be part of an
<CODE>MArray&#60;T&#62;</CODE> class, derived from the <CODE>Array&#60;T&#62;</CODE> class.  Then
the <CODE>ColumnVector</CODE> and <CODE>RowVector</CODE> classes will be derived
from the <CODE>MArray&#60;T&#62;</CODE> class.

</P>
<P>
Element by element vector by scalar ops.

</P>
<P>
<DL>
<DT><U>:</U> RowVector <B>operator +</B> <I>(const RowVector &#38;<VAR>a</VAR>, const double &#38;<VAR>s</VAR>)</I>
<DD><A NAME="IDX70"></A>
<DT><U>:</U> RowVector <B>operator -</B> <I>(const RowVector &#38;<VAR>a</VAR>, const double &#38;<VAR>s</VAR>)</I>
<DD><A NAME="IDX71"></A>
<DT><U>:</U> RowVector <B>operator *</B> <I>(const RowVector &#38;<VAR>a</VAR>, const double &#38;<VAR>s</VAR>)</I>
<DD><A NAME="IDX72"></A>
<DT><U>:</U> RowVector <B>operator /</B> <I>(const RowVector &#38;<VAR>a</VAR>, const double &#38;<VAR>s</VAR>)</I>
<DD><A NAME="IDX73"></A>
</DL>

</P>
<P>
Element by element scalar by vector ops.

</P>
<P>
<DL>
<DT><U>:</U> RowVector <B>operator +</B> <I>(const double &#38;<VAR>s</VAR>, const RowVector &#38;<VAR>a</VAR>)</I>
<DD><A NAME="IDX74"></A>
<DT><U>:</U> RowVector <B>operator -</B> <I>(const double &#38;<VAR>s</VAR>, const RowVector &#38;<VAR>a</VAR>)</I>
<DD><A NAME="IDX75"></A>
<DT><U>:</U> RowVector <B>operator *</B> <I>(const double &#38;<VAR>s</VAR>, const RowVector &#38;<VAR>a</VAR>)</I>
<DD><A NAME="IDX76"></A>
<DT><U>:</U> RowVector <B>operator /</B> <I>(const double &#38;<VAR>s</VAR>, const RowVector &#38;<VAR>a</VAR>)</I>
<DD><A NAME="IDX77"></A>
</DL>

</P>
<P>
Element by element vector by vector ops.

</P>
<P>
<DL>
<DT><U>:</U> RowVector <B>operator +</B> <I>(const RowVector &#38;<VAR>a</VAR>, const RowVector &#38;<VAR>b</VAR>)</I>
<DD><A NAME="IDX78"></A>
<DT><U>:</U> RowVector <B>operator -</B> <I>(const RowVector &#38;<VAR>a</VAR>, const RowVector &#38;<VAR>b</VAR>)</I>
<DD><A NAME="IDX79"></A>
</DL>

</P>
<P>
<DL>
<DT><U>:</U> RowVector <B>product</B> <I>(const RowVector &#38;<VAR>a</VAR>, const RowVector &#38;<VAR>b</VAR>)</I>
<DD><A NAME="IDX80"></A>
<DT><U>:</U> RowVector <B>quotient</B> <I>(const RowVector &#38;<VAR>a</VAR>, const RowVector &#38;<VAR>b</VAR>)</I>
<DD><A NAME="IDX81"></A>
</DL>

</P>
<P>
Unary MArray ops.

</P>
<P>
<DL>
<DT><U>:</U> RowVector <B>operator -</B> <I>(const RowVector &#38;<VAR>a</VAR>)</I>
<DD><A NAME="IDX82"></A>
</DL>

</P>

<P>
The <CODE>Matrix</CODE> classes share the following functions.  These will
eventually be part of an <CODE>MArray2&#60;T&#62;</CODE> class, derived from the
<CODE>Array2&#60;T&#62;</CODE> class.  Then the <CODE>Matrix</CODE> class will be derived
from the <CODE>MArray&#60;T&#62;</CODE> class.

</P>
<P>
Element by element matrix by scalar ops.

</P>
<P>
<DL>
<DT><U>:</U> Matrix <B>operator +</B> <I>(const Matrix &#38;<VAR>a</VAR>, const double &#38;<VAR>s</VAR>)</I>
<DD><A NAME="IDX83"></A>
<DT><U>:</U> Matrix <B>operator -</B> <I>(const Matrix &#38;<VAR>a</VAR>, const double &#38;<VAR>s</VAR>)</I>
<DD><A NAME="IDX84"></A>
<DT><U>:</U> Matrix <B>operator *</B> <I>(const Matrix &#38;<VAR>a</VAR>, const double &#38;<VAR>s</VAR>)</I>
<DD><A NAME="IDX85"></A>
<DT><U>:</U> Matrix <B>operator /</B> <I>(const Matrix &#38;<VAR>a</VAR>, const double &#38;<VAR>s</VAR>)</I>
<DD><A NAME="IDX86"></A>
</DL>

</P>
<P>
Element by element scalar by matrix ops.

</P>
<P>
<DL>
<DT><U>:</U> Matrix <B>operator +</B> <I>(const double &#38;<VAR>s</VAR>, const Matrix &#38;<VAR>a</VAR>)</I>
<DD><A NAME="IDX87"></A>
<DT><U>:</U> Matrix <B>operator -</B> <I>(const double &#38;<VAR>s</VAR>, const Matrix &#38;<VAR>a</VAR>)</I>
<DD><A NAME="IDX88"></A>
<DT><U>:</U> Matrix <B>operator *</B> <I>(const double &#38;<VAR>s</VAR>, const Matrix &#38;<VAR>a</VAR>)</I>
<DD><A NAME="IDX89"></A>
<DT><U>:</U> Matrix <B>operator /</B> <I>(const double &#38;<VAR>s</VAR>, const Matrix &#38;<VAR>a</VAR>)</I>
<DD><A NAME="IDX90"></A>
</DL>

</P>
<P>
Element by element matrix by matrix ops.

</P>
<P>
<DL>
<DT><U>:</U> Matrix <B>operator +</B> <I>(const Matrix &#38;<VAR>a</VAR>, const Matrix &#38;<VAR>b</VAR>)</I>
<DD><A NAME="IDX91"></A>
<DT><U>:</U> Matrix <B>operator -</B> <I>(const Matrix &#38;<VAR>a</VAR>, const Matrix &#38;<VAR>b</VAR>)</I>
<DD><A NAME="IDX92"></A>
</DL>

</P>
<P>
<DL>
<DT><U>:</U> Matrix <B>product</B> <I>(const Matrix &#38;<VAR>a</VAR>, const Matrix &#38;<VAR>b</VAR>)</I>
<DD><A NAME="IDX93"></A>
<DT><U>:</U> Matrix <B>quotient</B> <I>(const Matrix &#38;<VAR>a</VAR>, const Matrix &#38;<VAR>b</VAR>)</I>
<DD><A NAME="IDX94"></A>
</DL>

</P>
<P>
Unary matrix ops.

</P>
<P>
<DL>
<DT><U>:</U> Matrix <B>operator -</B> <I>(const Matrix &#38;<VAR>a</VAR>)</I>
<DD><A NAME="IDX95"></A>
</DL>

</P>

<P>
The <CODE>DiagMatrix</CODE> classes share the following functions.  These will
eventually be part of an <CODE>MDiagArray&#60;T&#62;</CODE> class, derived from the
<CODE>DiagArray&#60;T&#62;</CODE> class.  Then the <CODE>DiagMatrix</CODE> class will be
derived from the <CODE>MDiagArray&#60;T&#62;</CODE> class.

</P>
<P>
Element by element MDiagArray by scalar ops.

</P>
<P>
<DL>
<DT><U>:</U> DiagMatrix <B>operator *</B> <I>(const DiagMatrix &#38;<VAR>a</VAR>, const double &#38;<VAR>s</VAR>)</I>
<DD><A NAME="IDX96"></A>
<DT><U>:</U> DiagMatrix <B>operator /</B> <I>(const DiagMatrix &#38;<VAR>a</VAR>, const double &#38;<VAR>s</VAR>)</I>
<DD><A NAME="IDX97"></A>
</DL>

</P>
<P>
Element by element scalar by MDiagArray ops.

</P>
<P>
<DL>
<DT><U>:</U> DiagMatrix <B>operator *</B> <I>(const double &#38;<VAR>s</VAR>, const DiagMatrix &#38;<VAR>a</VAR>)</I>
<DD><A NAME="IDX98"></A>
</DL>

</P>
<P>
Element by element MDiagArray by MDiagArray ops.

</P>
<P>
<DL>
<DT><U>:</U> DiagMatrix <B>operator +</B> <I>(const DiagMatrix &#38;<VAR>a</VAR>, const DiagMatrix &#38;<VAR>b</VAR>)</I>
<DD><A NAME="IDX99"></A>
<DT><U>:</U> DiagMatrix <B>operator -</B> <I>(const DiagMatrix &#38;<VAR>a</VAR>, const DiagMatrix &#38;<VAR>b</VAR>)</I>
<DD><A NAME="IDX100"></A>
</DL>

</P>
<P>
<DL>
<DT><U>:</U> DiagMatrix <B>product</B> <I>(const DiagMatrix &#38;<VAR>a</VAR>, const DiagMatrix &#38;<VAR>b</VAR>)</I>
<DD><A NAME="IDX101"></A>
</DL>

</P>
<P>
Unary MDiagArray ops.

</P>
<P>
<DL>
<DT><U>:</U> DiagMatrix <B>operator -</B> <I>(const DiagMatrix &#38;<VAR>a</VAR>)</I>
<DD><A NAME="IDX102"></A>
</DL>

</P>

<P><HR><P>
Go to the <A HREF="liboctave_1.html">first</A>, <A HREF="liboctave_3.html">previous</A>, <A HREF="liboctave_5.html">next</A>, <A HREF="liboctave_18.html">last</A> section, <A HREF="liboctave_toc.html">table of contents</A>.
</BODY>
</HTML>