OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
newmat2.cpp
Go to the documentation of this file.
1 //$$ newmat2.cpp Matrix row and column operations
2 
3 // Copyright (C) 1991,2,3,4: R B Davies
4 
5 #define WANT_MATH
6 
7 #include <cmath>
8 #include <ossim/matrix/include.h>
9 
10 #include <ossim/matrix/newmat.h>
11 #include <ossim/matrix/newmatrc.h>
12 
13 #ifdef use_namespace
14 namespace NEWMAT {
15 #endif
16 
17 
18 #ifdef DO_REPORT
19 #define REPORT { static ExeCounter ExeCount(__LINE__,2); ++ExeCount; }
20 #else
21 #define REPORT {}
22 #endif
23 
24 //#define MONITOR(what,storage,store) { cout << what << " " << storage << " at " << (long)store << "\n"; }
25 
26 #define MONITOR(what,store,storage) {}
27 
28 /************************** Matrix Row/Col functions ************************/
29 
31 {
32  // THIS += mrc
33  REPORT
34  int f = mrc.skip; int l = f + mrc.storage; int lx = skip + storage;
35  if (f < skip) f = skip; if (l > lx) l = lx; l -= f;
36  if (l<=0) return;
37  Real* elx=data+(f-skip); Real* el=mrc.data+(f-mrc.skip);
38  while (l--) *elx++ += *el++;
39 }
40 
42 {
43  REPORT
44  // THIS += (mrc * x)
45  int f = mrc.skip; int l = f + mrc.storage; int lx = skip + storage;
46  if (f < skip) f = skip; if (l > lx) l = lx; l -= f;
47  if (l<=0) return;
48  Real* elx=data+(f-skip); Real* el=mrc.data+(f-mrc.skip);
49  while (l--) *elx++ += *el++ * x;
50 }
51 
53 {
54  REPORT
55  // THIS -= mrc
56  int f = mrc.skip; int l = f + mrc.storage; int lx = skip + storage;
57  if (f < skip) f = skip; if (l > lx) l = lx; l -= f;
58  if (l<=0) return;
59  Real* elx=data+(f-skip); Real* el=mrc.data+(f-mrc.skip);
60  while (l--) *elx++ -= *el++;
61 }
62 
64 // copy stored elements only
65 {
66  REPORT
67  int f = mrc.skip; int l = f + mrc.storage; int lx = skip + storage;
68  if (f < skip) f = skip; if (l > lx) l = lx; l -= f;
69  if (l<=0) return;
70  Real* elx=data+(f-skip); Real* ely=mrc.data+(f-mrc.skip);
71  while (l--) *elx++ = *ely++;
72 }
73 
74 Real DotProd(const MatrixRowCol& mrc1, const MatrixRowCol& mrc2)
75 {
76  REPORT // not accessed
77  int f = mrc1.skip; int f2 = mrc2.skip;
78  int l = f + mrc1.storage; int l2 = f2 + mrc2.storage;
79  if (f < f2) f = f2; if (l > l2) l = l2; l -= f;
80  if (l<=0) return 0.0;
81 
82  Real* el1=mrc1.data+(f-mrc1.skip); Real* el2=mrc2.data+(f-mrc2.skip);
83  Real sum = 0.0;
84  while (l--) sum += *el1++ * *el2++;
85  return sum;
86 }
87 
88 void MatrixRowCol::Add(const MatrixRowCol& mrc1, const MatrixRowCol& mrc2)
89 {
90  // THIS = mrc1 + mrc2
91  int f = skip; int l = skip + storage;
92  int f1 = mrc1.skip; int l1 = f1 + mrc1.storage;
93  if (f1<f) f1=f; if (l1>l) l1=l;
94  int f2 = mrc2.skip; int l2 = f2 + mrc2.storage;
95  if (f2<f) f2=f; if (l2>l) l2=l;
96  Real* el = data + (f-skip);
97  Real* el1 = mrc1.data+(f1-mrc1.skip); Real* el2 = mrc2.data+(f2-mrc2.skip);
98  if (f1<f2)
99  {
100  int i = f1-f; while (i--) *el++ = 0.0;
101  if (l1<=f2) // disjoint
102  {
103  REPORT // not accessed
104  i = l1-f1; while (i--) *el++ = *el1++;
105  i = f2-l1; while (i--) *el++ = 0.0;
106  i = l2-f2; while (i--) *el++ = *el2++;
107  i = l-l2; while (i--) *el++ = 0.0;
108  }
109  else
110  {
111  i = f2-f1; while (i--) *el++ = *el1++;
112  if (l1<=l2)
113  {
114  REPORT
115  i = l1-f2; while (i--) *el++ = *el1++ + *el2++;
116  i = l2-l1; while (i--) *el++ = *el2++;
117  i = l-l2; while (i--) *el++ = 0.0;
118  }
119  else
120  {
121  REPORT
122  i = l2-f2; while (i--) *el++ = *el1++ + *el2++;
123  i = l1-l2; while (i--) *el++ = *el1++;
124  i = l-l1; while (i--) *el++ = 0.0;
125  }
126  }
127  }
128  else
129  {
130  int i = f2-f; while (i--) *el++ = 0.0;
131  if (l2<=f1) // disjoint
132  {
133  REPORT // not accessed
134  i = l2-f2; while (i--) *el++ = *el2++;
135  i = f1-l2; while (i--) *el++ = 0.0;
136  i = l1-f1; while (i--) *el++ = *el1++;
137  i = l-l1; while (i--) *el++ = 0.0;
138  }
139  else
140  {
141  i = f1-f2; while (i--) *el++ = *el2++;
142  if (l2<=l1)
143  {
144  REPORT
145  i = l2-f1; while (i--) *el++ = *el1++ + *el2++;
146  i = l1-l2; while (i--) *el++ = *el1++;
147  i = l-l1; while (i--) *el++ = 0.0;
148  }
149  else
150  {
151  REPORT
152  i = l1-f1; while (i--) *el++ = *el1++ + *el2++;
153  i = l2-l1; while (i--) *el++ = *el2++;
154  i = l-l2; while (i--) *el++ = 0.0;
155  }
156  }
157  }
158 }
159 
160 void MatrixRowCol::Sub(const MatrixRowCol& mrc1, const MatrixRowCol& mrc2)
161 {
162  // THIS = mrc1 - mrc2
163  int f = skip; int l = skip + storage;
164  int f1 = mrc1.skip; int l1 = f1 + mrc1.storage;
165  if (f1<f) f1=f; if (l1>l) l1=l;
166  int f2 = mrc2.skip; int l2 = f2 + mrc2.storage;
167  if (f2<f) f2=f; if (l2>l) l2=l;
168  Real* el = data + (f-skip);
169  Real* el1 = mrc1.data+(f1-mrc1.skip); Real* el2 = mrc2.data+(f2-mrc2.skip);
170  if (f1<f2)
171  {
172  int i = f1-f; while (i--) *el++ = 0.0;
173  if (l1<=f2) // disjoint
174  {
175  REPORT // not accessed
176  i = l1-f1; while (i--) *el++ = *el1++;
177  i = f2-l1; while (i--) *el++ = 0.0;
178  i = l2-f2; while (i--) *el++ = - *el2++;
179  i = l-l2; while (i--) *el++ = 0.0;
180  }
181  else
182  {
183  i = f2-f1; while (i--) *el++ = *el1++;
184  if (l1<=l2)
185  {
186  REPORT
187  i = l1-f2; while (i--) *el++ = *el1++ - *el2++;
188  i = l2-l1; while (i--) *el++ = - *el2++;
189  i = l-l2; while (i--) *el++ = 0.0;
190  }
191  else
192  {
193  REPORT
194  i = l2-f2; while (i--) *el++ = *el1++ - *el2++;
195  i = l1-l2; while (i--) *el++ = *el1++;
196  i = l-l1; while (i--) *el++ = 0.0;
197  }
198  }
199  }
200  else
201  {
202  int i = f2-f; while (i--) *el++ = 0.0;
203  if (l2<=f1) // disjoint
204  {
205  REPORT // not accessed
206  i = l2-f2; while (i--) *el++ = - *el2++;
207  i = f1-l2; while (i--) *el++ = 0.0;
208  i = l1-f1; while (i--) *el++ = *el1++;
209  i = l-l1; while (i--) *el++ = 0.0;
210  }
211  else
212  {
213  i = f1-f2; while (i--) *el++ = - *el2++;
214  if (l2<=l1)
215  {
216  REPORT
217  i = l2-f1; while (i--) *el++ = *el1++ - *el2++;
218  i = l1-l2; while (i--) *el++ = *el1++;
219  i = l-l1; while (i--) *el++ = 0.0;
220  }
221  else
222  {
223  REPORT
224  i = l1-f1; while (i--) *el++ = *el1++ - *el2++;
225  i = l2-l1; while (i--) *el++ = - *el2++;
226  i = l-l2; while (i--) *el++ = 0.0;
227  }
228  }
229  }
230 }
231 
232 
234 {
235  // THIS = mrc1 + x
236  REPORT
237  if (!storage) return;
238  int f = mrc1.skip; int l = f + mrc1.storage; int lx = skip + storage;
239  if (f < skip) { f = skip; if (l < f) l = f; }
240  if (l > lx) { l = lx; if (f > lx) f = lx; }
241 
242  Real* elx = data; Real* ely = mrc1.data+(f-mrc1.skip);
243 
244  int l1 = f-skip; while (l1--) *elx++ = x;
245  l1 = l-f; while (l1--) *elx++ = *ely++ + x;
246  lx -= l; while (lx--) *elx++ = x;
247 }
248 
250 {
251  // THIS = x - mrc1
252  REPORT
253  if (!storage) return;
254  int f = mrc1.skip; int l = f + mrc1.storage; int lx = skip + storage;
255  if (f < skip) { f = skip; if (l < f) l = f; }
256  if (l > lx) { l = lx; if (f > lx) f = lx; }
257 
258  Real* elx = data; Real* ely = mrc1.data+(f-mrc1.skip);
259 
260  int l1 = f-skip; while (l1--) *elx++ = x;
261  l1 = l-f; while (l1--) *elx++ = x - *ely++;
262  lx -= l; while (lx--) *elx++ = x;
263 }
264 
266 {
267  // THIS = mrc - THIS
268  REPORT
269  if (!storage) return;
270  int f = mrc1.skip; int l = f + mrc1.storage; int lx = skip + storage;
271  if (f < skip) { f = skip; if (l < f) l = f; }
272  if (l > lx) { l = lx; if (f > lx) f = lx; }
273 
274  Real* elx = data; Real* ely = mrc1.data+(f-mrc1.skip);
275 
276  int l1 = f-skip; while (l1--) { *elx = - *elx; elx++; }
277  l1 = l-f; while (l1--) { *elx = *ely++ - *elx; elx++; }
278  lx -= l; while (lx--) { *elx = - *elx; elx++; }
279 }
280 
281 void MatrixRowCol::ConCat(const MatrixRowCol& mrc1, const MatrixRowCol& mrc2)
282 {
283  // THIS = mrc1 | mrc2
284  REPORT
285  int f1 = mrc1.skip; int l1 = f1 + mrc1.storage; int lx = skip + storage;
286  if (f1 < skip) { f1 = skip; if (l1 < f1) l1 = f1; }
287  if (l1 > lx) { l1 = lx; if (f1 > lx) f1 = lx; }
288 
289  Real* elx = data;
290 
291  int i = f1-skip; while (i--) *elx++ =0.0;
292  i = l1-f1;
293  if (i) // in case f1 would take ely out of range
294  { Real* ely = mrc1.data+(f1-mrc1.skip); while (i--) *elx++ = *ely++; }
295 
296  int f2 = mrc2.skip; int l2 = f2 + mrc2.storage; i = mrc1.length;
297  int skipx = l1 - i; lx -= i; // addresses rel to second seg, maybe -ve
298  if (f2 < skipx) { f2 = skipx; if (l2 < f2) l2 = f2; }
299  if (l2 > lx) { l2 = lx; if (f2 > lx) f2 = lx; }
300 
301  i = f2-skipx; while (i--) *elx++ = 0.0;
302  i = l2-f2;
303  if (i) // in case f2 would take ely out of range
304  { Real* ely = mrc2.data+(f2-mrc2.skip); while (i--) *elx++ = *ely++; }
305  lx -= l2; while (lx--) *elx++ = 0.0;
306 }
307 
309 // element by element multiply into
310 {
311  REPORT
312  if (!storage) return;
313  int f = mrc1.skip; int l = f + mrc1.storage; int lx = skip + storage;
314  if (f < skip) { f = skip; if (l < f) l = f; }
315  if (l > lx) { l = lx; if (f > lx) f = lx; }
316 
317  Real* elx = data; Real* ely = mrc1.data+(f-mrc1.skip);
318 
319  int l1 = f-skip; while (l1--) *elx++ = 0;
320  l1 = l-f; while (l1--) *elx++ *= *ely++;
321  lx -= l; while (lx--) *elx++ = 0;
322 }
323 
324 void MatrixRowCol::Multiply(const MatrixRowCol& mrc1, const MatrixRowCol& mrc2)
325 // element by element multiply
326 {
327  int f = skip; int l = skip + storage;
328  int f1 = mrc1.skip; int l1 = f1 + mrc1.storage;
329  if (f1<f) f1=f; if (l1>l) l1=l;
330  int f2 = mrc2.skip; int l2 = f2 + mrc2.storage;
331  if (f2<f) f2=f; if (l2>l) l2=l;
332  Real* el = data + (f-skip); int i;
333  if (f1<f2) f1 = f2; if (l1>l2) l1 = l2;
334  if (l1<=f1) { REPORT i = l-f; while (i--) *el++ = 0.0; } // disjoint
335  else
336  {
337  REPORT
338  Real* el1 = mrc1.data+(f1-mrc1.skip);
339  Real* el2 = mrc2.data+(f1-mrc2.skip);
340  i = f1-f ; while (i--) *el++ = 0.0;
341  i = l1-f1; while (i--) *el++ = *el1++ * *el2++;
342  i = l-l1; while (i--) *el++ = 0.0;
343  }
344 }
345 
346 void MatrixRowCol::KP(const MatrixRowCol& mrc1, const MatrixRowCol& mrc2)
347 // row for Kronecker product
348 {
349  int f = skip; int s = storage; Real* el = data; int i;
350 
351  i = mrc1.skip * mrc2.length;
352  if (i > f)
353  {
354  i -= f; f = 0; if (i > s) { i = s; s = 0; } else s -= i;
355  while (i--) *el++ = 0.0;
356  if (s == 0) return;
357  }
358  else f -= i;
359 
360  i = mrc1.storage; Real* el1 = mrc1.data;
361  int mrc2_skip = mrc2.skip; int mrc2_storage = mrc2.storage;
362  int mrc2_length = mrc2.length;
363  int mrc2_remain = mrc2_length - mrc2_skip - mrc2_storage;
364  while (i--)
365  {
366  int j; Real* el2 = mrc2.data; Real vel1 = *el1;
367  if (f == 0 && mrc2_length <= s)
368  {
369  j = mrc2_skip; s -= j; while (j--) *el++ = 0.0;
370  j = mrc2_storage; s -= j; while (j--) *el++ = vel1 * *el2++;
371  j = mrc2_remain; s -= j; while (j--) *el++ = 0.0;
372  }
373  else if (f >= mrc2_length) f -= mrc2_length;
374  else
375  {
376  j = mrc2_skip;
377  if (j > f)
378  {
379  j -= f; f = 0; if (j > s) { j = s; s = 0; } else s -= j;
380  while (j--) *el++ = 0.0;
381  }
382  else f -= j;
383 
384  j = mrc2_storage;
385  if (j > f)
386  {
387  j -= f; el2 += f; f = 0; if (j > s) { j = s; s = 0; } else s -= j;
388  while (j--) *el++ = vel1 * *el2++;
389  }
390  else f -= j;
391 
392  j = mrc2_remain;
393  if (j > f)
394  {
395  j -= f; f = 0; if (j > s) { j = s; s = 0; } else s -= j;
396  while (j--) *el++ = 0.0;
397  }
398  else f -= j;
399  }
400  if (s == 0) return;
401  ++el1;
402  }
403 
404  i = (mrc1.length - mrc1.skip - mrc1.storage) * mrc2.length;
405  if (i > f)
406  {
407  i -= f; if (i > s) i = s;
408  while (i--) *el++ = 0.0;
409  }
410 }
411 
412 
414 {
415  // THIS = mrc1
416  REPORT
417  if (!storage) return;
418  int f = mrc1.skip; int l = f + mrc1.storage; int lx = skip + storage;
419  if (f < skip) { f = skip; if (l < f) l = f; }
420  if (l > lx) { l = lx; if (f > lx) f = lx; }
421 
422  Real* elx = data; Real* ely = 0;
423 
424  if (l-f) ely = mrc1.data+(f-mrc1.skip);
425 
426  int l1 = f-skip; while (l1--) *elx++ = 0.0;
427  l1 = l-f; while (l1--) *elx++ = *ely++;
428  lx -= l; while (lx--) *elx++ = 0.0;
429 }
430 
432 // Throw an exception if this would lead to a loss of data
433 {
434  REPORT
435  if (!storage) return;
436  int f = mrc1.skip; int l = f + mrc1.storage; int lx = skip + storage;
437  if (f < skip || l > lx) Throw(ProgramException("Illegal Conversion"));
438 
439  Real* elx = data; Real* ely = mrc1.data+(f-mrc1.skip);
440 
441  int l1 = f-skip; while (l1--) *elx++ = 0.0;
442  l1 = l-f; while (l1--) *elx++ = *ely++;
443  lx -= l; while (lx--) *elx++ = 0.0;
444 }
445 
447 // Throw an exception if +=, -=, copy etc would lead to a loss of data
448 {
449  REPORT
450  int f = mrc1.skip; int l = f + mrc1.storage; int lx = skip + storage;
451  if (f < skip || l > lx) Throw(ProgramException("Illegal Conversion"));
452 }
453 
455 // Throw an exception if +=, -= of constant would lead to a loss of data
456 // that is: check full row is present
457 // may not be appropriate for symmetric matrices
458 {
459  REPORT
460  if (skip!=0 || storage!=length)
461  Throw(ProgramException("Illegal Conversion"));
462 }
463 
465 {
466  // THIS = -mrc1
467  REPORT
468  if (!storage) return;
469  int f = mrc1.skip; int l = f + mrc1.storage; int lx = skip + storage;
470  if (f < skip) { f = skip; if (l < f) l = f; }
471  if (l > lx) { l = lx; if (f > lx) f = lx; }
472 
473  Real* elx = data; Real* ely = mrc1.data+(f-mrc1.skip);
474 
475  int l1 = f-skip; while (l1--) *elx++ = 0.0;
476  l1 = l-f; while (l1--) *elx++ = - *ely++;
477  lx -= l; while (lx--) *elx++ = 0.0;
478 }
479 
481 {
482  // THIS = mrc1 * s
483  REPORT
484  if (!storage) return;
485  int f = mrc1.skip; int l = f + mrc1.storage; int lx = skip + storage;
486  if (f < skip) { f = skip; if (l < f) l = f; }
487  if (l > lx) { l = lx; if (f > lx) f = lx; }
488 
489  Real* elx = data; Real* ely = mrc1.data+(f-mrc1.skip);
490 
491  int l1 = f-skip; while (l1--) *elx++ = 0.0;
492  l1 = l-f; while (l1--) *elx++ = *ely++ * s;
493  lx -= l; while (lx--) *elx++ = 0.0;
494 }
495 
497 {
498  // mrc = mrc / mrc1 (elementwise)
499  REPORT
500  int f = mrc1.skip; int f0 = mrc.skip;
501  int l = f + mrc1.storage; int lx = f0 + mrc.storage;
502  if (f < f0) { f = f0; if (l < f) l = f; }
503  if (l > lx) { l = lx; if (f > lx) f = lx; }
504 
505  Real* elx = mrc.data; Real* eld = store+f;
506 
507  int l1 = f-f0; while (l1--) *elx++ = 0.0;
508  l1 = l-f; while (l1--) *elx++ /= *eld++;
509  lx -= l; while (lx--) *elx++ = 0.0;
510  // Solver makes sure input and output point to same memory
511 }
512 
514 {
515  // mrc = mrc / mrc1 (elementwise)
516  REPORT
517  int f = mrc1.skip; int f0 = mrc.skip;
518  int l = f + mrc1.storage; int lx = f0 + mrc.storage;
519  if (f < f0) { f = f0; if (l < f) l = f; }
520  if (l > lx) { l = lx; if (f > lx) f = lx; }
521 
522  Real* elx = mrc.data; Real eldv = *store;
523 
524  int l1 = f-f0; while (l1--) *elx++ = 0.0;
525  l1 = l-f; while (l1--) *elx++ /= eldv;
526  lx -= l; while (lx--) *elx++ = 0.0;
527  // Solver makes sure input and output point to same memory
528 }
529 
530 void MatrixRowCol::Copy(const Real*& r)
531 {
532  // THIS = *r
533  REPORT
534  Real* elx = data; const Real* ely = r+skip; r += length;
535  int l = storage; while (l--) *elx++ = *ely++;
536 }
537 
538 void MatrixRowCol::Copy(const int*& r)
539 {
540  // THIS = *r
541  REPORT
542  Real* elx = data; const int* ely = r+skip; r += length;
543  int l = storage; while (l--) *elx++ = *ely++;
544 }
545 
547 {
548  // THIS = r
549  REPORT Real* elx = data; int l = storage; while (l--) *elx++ = r;
550 }
551 
553 {
554  // THIS = 0
555  REPORT Real* elx = data; int l = storage; while (l--) *elx++ = 0;
556 }
557 
559 {
560  // THIS *= r
561  REPORT Real* elx = data; int l = storage; while (l--) *elx++ *= r;
562 }
563 
565 {
566  // THIS += r
567  REPORT
568  Real* elx = data; int l = storage; while (l--) *elx++ += r;
569 }
570 
572 {
573  REPORT
574  Real sum = 0.0; Real* elx = data; int l = storage;
575  while (l--) sum += std::fabs(*elx++);
576  return sum;
577 }
578 
579 // max absolute value of r and elements of row/col
580 // we use <= or >= in all of these so we are sure of getting
581 // r reset at least once.
583 {
584  REPORT
585  Real* elx = data; int l = storage; int li = -1;
586  while (l--) { Real f = std::fabs(*elx++); if (r <= f) { r = f; li = l; } }
587  i = (li >= 0) ? storage - li + skip : 0;
588  return r;
589 }
590 
591 // min absolute value of r and elements of row/col
593 {
594  REPORT
595  Real* elx = data; int l = storage; int li = -1;
596  while (l--) { Real f = std::fabs(*elx++); if (r >= f) { r = f; li = l; } }
597  i = (li >= 0) ? storage - li + skip : 0;
598  return r;
599 }
600 
601 // max value of r and elements of row/col
603 {
604  REPORT
605  Real* elx = data; int l = storage; int li = -1;
606  while (l--) { Real f = *elx++; if (r <= f) { r = f; li = l; } }
607  i = (li >= 0) ? storage - li + skip : 0;
608  return r;
609 }
610 
611 // min value of r and elements of row/col
613 {
614  REPORT
615  Real* elx = data; int l = storage; int li = -1;
616  while (l--) { Real f = *elx++; if (r >= f) { r = f; li = l; } }
617  i = (li >= 0) ? storage - li + skip : 0;
618  return r;
619 }
620 
622 {
623  REPORT
624  Real sum = 0.0; Real* elx = data; int l = storage;
625  while (l--) sum += *elx++;
626  return sum;
627 }
628 
629 void MatrixRowCol::SubRowCol(MatrixRowCol& mrc, int skip1, int l1) const
630 {
631  mrc.length = l1; int d = skip - skip1;
632  if (d<0) { mrc.skip = 0; mrc.data = data - d; }
633  else { mrc.skip = d; mrc.data = data; }
634  d = skip + storage - skip1;
635  d = ((l1 < d) ? l1 : d) - mrc.skip; mrc.storage = (d < 0) ? 0 : d;
636  mrc.cw = 0;
637 }
638 
639 #ifdef use_namespace
640 }
641 #endif
642 
ossim_uint32 x
Real DotProd(const MatrixRowCol &mrc1, const MatrixRowCol &mrc2)
Definition: newmat2.cpp:74
void Copy(const MatrixRowCol &)
Definition: newmat2.cpp:413
double Real
Definition: include.h:57
void NegAdd(const MatrixRowCol &, Real)
Definition: newmat2.cpp:249
Real Sum()
Definition: newmat2.cpp:621
void KP(const MatrixRowCol &, const MatrixRowCol &)
Definition: newmat2.cpp:346
void RevSub(const MatrixRowCol &)
Definition: newmat2.cpp:265
void Add(const MatrixRowCol &)
Definition: newmat2.cpp:30
#define REPORT
Definition: newmat2.cpp:21
void ConCat(const MatrixRowCol &, const MatrixRowCol &)
Definition: newmat2.cpp:281
void AddScaled(const MatrixRowCol &, Real)
Definition: newmat2.cpp:41
void CopyCheck(const MatrixRowCol &)
Definition: newmat2.cpp:431
void Check()
Definition: newmat2.cpp:454
void Negate(const MatrixRowCol &)
Definition: newmat2.cpp:464
Real * data
Definition: newmatrc.h:43
int storage
Definition: newmatrc.h:40
void Multiply(const MatrixRowCol &)
Definition: newmat2.cpp:308
Real Maximum1(Real r, int &i)
Definition: newmat2.cpp:602
void Sub(const MatrixRowCol &)
Definition: newmat2.cpp:52
LoadAndStoreFlag cw
Definition: newmatrc.h:44
void SubRowCol(MatrixRowCol &, int, int) const
Definition: newmat2.cpp:629
Real MaximumAbsoluteValue1(Real r, int &i)
Definition: newmat2.cpp:582
if(yy_init)
void Solver(MatrixColX &, const MatrixColX &)
Definition: newmat2.cpp:513
Real SumAbsoluteValue()
Definition: newmat2.cpp:571
void Solver(MatrixColX &, const MatrixColX &)
Definition: newmat2.cpp:496
Real MinimumAbsoluteValue1(Real r, int &i)
Definition: newmat2.cpp:592
void Inject(const MatrixRowCol &)
Definition: newmat2.cpp:63
void Zero()
Definition: newmat2.cpp:552
int length
Definition: newmatrc.h:38
Real Minimum1(Real r, int &i)
Definition: newmat2.cpp:612