C-XSC - A C++ Class Library for Extended Scientific Computing  2.5.4
simatrix.hpp
1 /*
2 ** CXSC is a C++ library for eXtended Scientific Computing (V 2.5.4)
3 **
4 ** Copyright (C) 1990-2000 Institut fuer Angewandte Mathematik,
5 ** Universitaet Karlsruhe, Germany
6 ** (C) 2000-2014 Wiss. Rechnen/Softwaretechnologie
7 ** Universitaet Wuppertal, Germany
8 **
9 ** This library is free software; you can redistribute it and/or
10 ** modify it under the terms of the GNU Library General Public
11 ** License as published by the Free Software Foundation; either
12 ** version 2 of the License, or (at your option) any later version.
13 **
14 ** This library is distributed in the hope that it will be useful,
15 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 ** Library General Public License for more details.
18 **
19 ** You should have received a copy of the GNU Library General Public
20 ** License along with this library; if not, write to the Free
21 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23 
24 /* CVS $Id: simatrix.hpp,v 1.20 2014/01/30 17:23:48 cxsc Exp $ */
25 
26 #ifndef _CXSC_SIMATRIX_HPP_INCLUDED
27 #define _CXSC_SIMATRIX_HPP_INCLUDED
28 
29 #include <interval.hpp>
30 #include <imatrix.hpp>
31 #include <ivector.hpp>
32 #include <sivector.hpp>
33 #include <vector>
34 #include <algorithm>
35 #include <iostream>
36 #include <cidot.hpp>
37 #include <sparseidot.hpp>
38 #include <sparsematrix.hpp>
39 #include <srmatrix.hpp>
40 
41 namespace cxsc {
42 
43 //definiert in srmatrix.hpp
44 //enum STORAGE_TYPE{triplet,compressed_row,compressed_column};
45 
46 class simatrix_slice;
47 class simatrix_subv;
48 class scimatrix;
49 class scimatrix_slice;
50 class scimatrix_subv;
51 
52 inline bool comp_pair_i(std::pair<int,interval> p1, std::pair<int,interval> p2) {
53  return p1.first < p2.first;
54 }
55 
57 
69 class simatrix {
70 
71  private:
72  std::vector<int> p;
73  std::vector<int> ind;
74  std::vector<interval> x;
75  int m;
76  int n;
77  int lb1,ub1,lb2,ub2;
78 
79  public:
80 
82  std::vector<int>& column_pointers() {
83  return p;
84  }
85 
87  std::vector<int>& row_indices() {
88  return ind;
89  }
90 
92  std::vector<interval>& values() {
93  return x;
94  }
95 
97  const std::vector<int>& column_pointers() const {
98  return p;
99  }
100 
102  const std::vector<int>& row_indices() const {
103  return ind;
104  }
105 
107  const std::vector<interval>& values() const {
108  return x;
109  }
110 
113  p.push_back(0);
114  m = n = 0;
115  lb1 = lb2 = ub1 = ub2 = 0;
116  }
117 
119  simatrix(const int r, const int c) : m(r),n(c),lb1(1),ub1(r),lb2(1),ub2(c) {
120  p = std::vector<int>((n>0) ? n+1 : 1, 0);
121  ind.reserve(2*(m+n));
122  x.reserve(2*(m+n));
123 
124  p[0] = 0;
125  }
126 
128  simatrix(const int r, const int c, const int e) : m(r),n(c),lb1(1),ub1(r),lb2(1),ub2(c) {
129  p = std::vector<int>((n>0) ? n+1 : 1, 0);
130  ind.reserve(e);
131  x.reserve(e);
132 
133  p[0] = 0;
134  }
135 
137 
143  simatrix(const int m, const int n, const int nnz, const intvector& rows, const intvector& cols, const ivector& values, const enum STORAGE_TYPE t = triplet) {
144  if(t == triplet) {
145  this->m = m;
146  this->n = n;
147  p = std::vector<int>(n+1,0);
148  ind.reserve(nnz);
149  x.reserve(nnz);
150  lb1 = lb2 = 1;
151  ub1 = m; ub2 = n;
152 
153  std::vector<triplet_store<interval> > work;
154  work.reserve(nnz);
155 
156  for(int k=0 ; k<nnz ; k++) {
157  work.push_back(triplet_store<interval>(rows[Lb(rows)+k],cols[Lb(cols)+k],values[Lb(values)+k]));
158  }
159 
160  sort(work.begin(), work.end());
161 
162  int i=0;
163 
164  for(int j=0 ; j<n ; j++) {
165 
166  while((unsigned int)i < work.size() && work[i].col == j ) {
167  ind.push_back(work[i].row);
168  x.push_back(work[i].val);
169  i++;
170  }
171 
172  p[j+1] = i;
173  }
174 
175  } else if(t == compressed_row) {
176 
177  this->m = m;
178  this->n = n;
179  p = std::vector<int>(n+1,0);
180  ind.reserve(nnz);
181  x.reserve(nnz);
182  lb1 = lb2 = 1;
183  ub1 = m; ub2 = n;
184 
185  for(int i=0 ; i<n+1 ; i++)
186  p[i] = rows[Lb(rows)+i];
187 
188  std::vector<triplet_store<interval> > work;
189  work.reserve(nnz);
190 
191  for(int j=0 ; j<n ; j++) {
192  for(int k=p[j] ; k<p[j+1] ; k++) {
193  work.push_back(triplet_store<interval>(j,cols[Lb(cols)+k],values[Lb(values)+k]));
194  }
195  }
196 
197  sort(work.begin(), work.end());
198 
199  int i=0;
200 
201  for(int j=0 ; j<n ; j++) {
202 
203  while((unsigned int)i < work.size() && work[i].col == j ) {
204  ind.push_back(work[i].row);
205  x.push_back(work[i].val);
206  i++;
207  }
208 
209  p[j+1] = i;
210  }
211 
212  } else if(t == compressed_column) {
213  this->m = m;
214  this->n = n;
215  p = std::vector<int>(n+1,0);
216  ind.reserve(nnz);
217  x.reserve(nnz);
218  lb1 = lb2 = 1;
219  ub1 = m; ub2 = n;
220 
221  for(int i=0 ; i<n+1 ; i++)
222  p[i] = rows[Lb(rows)+i];
223 
224  std::vector<std::pair<int,interval> > work;
225  work.reserve(n);
226 
227  for(int j=0 ; j<n ; j++) {
228  work.clear();
229 
230  for(int k=p[j] ; k<p[j+1] ; k++) {
231  work.push_back(std::make_pair(cols[Lb(cols)+k],values[Lb(values)+k]));
232  }
233 
234  std::sort(work.begin(),work.end(),comp_pair_i);
235 
236  for(unsigned int i=0 ; i<work.size() ; i++) {
237  ind.push_back(work[i].first);
238  x.push_back(work[i].second);
239  }
240  }
241 
242  }
243 
244  }
245 
247 
254  simatrix(const int m, const int n, const int nnz, const int* rows, const int* cols, const interval* values, const enum STORAGE_TYPE t = triplet) {
255  if(t == triplet) {
256  this->m = m;
257  this->n = n;
258  p = std::vector<int>(n+1,0);
259  ind.reserve(nnz);
260  x.reserve(nnz);
261  lb1 = lb2 = 1;
262  ub1 = m; ub2 = n;
263 
264  std::vector<triplet_store<interval> > work;
265  work.reserve(nnz);
266 
267  for(int k=0 ; k<nnz ; k++) {
268  work.push_back(triplet_store<interval>(rows[k],cols[k],values[k]));
269  }
270 
271  sort(work.begin(), work.end());
272 
273  int i=0;
274 
275  for(int j=0 ; j<n ; j++) {
276 
277  while((unsigned int)i < work.size() && work[i].col == j ) {
278  ind.push_back(work[i].row);
279  x.push_back(work[i].val);
280  i++;
281  }
282 
283  p[j+1] = i;
284  }
285 
286  } else if(t == compressed_row) {
287 
288  this->m = m;
289  this->n = n;
290  p = std::vector<int>(n+1,0);
291  ind.reserve(nnz);
292  x.reserve(nnz);
293  lb1 = lb2 = 1;
294  ub1 = m; ub2 = n;
295 
296  for(int i=0 ; i<n+1 ; i++)
297  p[i] = rows[i];
298 
299  std::vector<triplet_store<interval> > work;
300  work.reserve(nnz);
301 
302  for(int j=0 ; j<n ; j++) {
303  for(int k=p[j] ; k<p[j+1] ; k++) {
304  work.push_back(triplet_store<interval>(j,cols[k],values[k]));
305  }
306  }
307 
308  sort(work.begin(), work.end());
309 
310  int i=0;
311 
312  for(int j=0 ; j<n ; j++) {
313 
314  while((unsigned int)i < work.size() && work[i].col == j ) {
315  ind.push_back(work[i].row);
316  x.push_back(work[i].val);
317  i++;
318  }
319 
320  p[j+1] = i;
321  }
322 
323  } else if(t == compressed_column) {
324  this->m = m;
325  this->n = n;
326  p = std::vector<int>(n+1,0);
327  ind.reserve(nnz);
328  x.reserve(nnz);
329  lb1 = lb2 = 1;
330  ub1 = m; ub2 = n;
331 
332  for(int i=0 ; i<n+1 ; i++)
333  p[i] = rows[i];
334 
335  std::vector<std::pair<int,interval> > work;
336  work.reserve(n);
337 
338  for(int j=0 ; j<n ; j++) {
339  work.clear();
340 
341  for(int k=p[j] ; k<p[j+1] ; k++) {
342  work.push_back(std::make_pair(cols[k],values[k]));
343  }
344 
345  std::sort(work.begin(),work.end(),comp_pair_i);
346 
347  for(unsigned int i=0 ; i<work.size() ; i++) {
348  ind.push_back(work[i].first);
349  x.push_back(work[i].second);
350  }
351  }
352 
353  }
354 
355  }
356 
357 
359  simatrix(const srmatrix& A) : p(A.p), ind(A.ind), m(A.m), n(A.n), lb1(A.lb1), ub1(A.ub1), lb2(A.lb2), ub2(A.ub2) {
360  x.reserve(A.get_nnz());
361  for(unsigned int i=0 ; i<A.x.size() ; i++)
362  x.push_back(interval(A.x[i]));
363  }
364 
365 
367  simatrix(const rmatrix& A) : m(ColLen(A)),n(RowLen(A)),lb1(Lb(A,1)),ub1(Ub(A,1)),lb2(Lb(A,2)),ub2(Ub(A,2)) {
368  p = std::vector<int>((n>0) ? n+1 : 1, 0);
369  ind.reserve((m*n*0.1 < 2*m) ? (int)(m*n*0.1) : 2*m);
370  x.reserve((m*n*0.1 < 2*m) ? (int)(m*n*0.1) : 2*m);
371 
372  p[0] = 0;
373  int nnz = 0;
374 
375  for(int j=0 ; j<n ; j++) {
376  for(int i=0 ; i<m ; i++) {
377  if(A[i+lb1][j+lb2] != 0.0) {
378  ind.push_back(i);
379  x.push_back(interval(A[i+lb1][j+lb2]));
380  nnz++;
381  }
382  }
383 
384  p[j+1] = nnz;
385  }
386 
387  }
388 
390  simatrix(const imatrix& A) : m(ColLen(A)),n(RowLen(A)),lb1(Lb(A,1)),ub1(Ub(A,1)),lb2(Lb(A,2)),ub2(Ub(A,2)) {
391  p = std::vector<int>((n>0) ? n+1 : 1, 0);
392  ind.reserve((m*n*0.1 < 2*m) ? (int)(m*n*0.1) : 2*m);
393  x.reserve((m*n*0.1 < 2*m) ? (int)(m*n*0.1) : 2*m);
394 
395  p[0] = 0;
396  int nnz = 0;
397 
398  for(int j=0 ; j<n ; j++) {
399  for(int i=0 ; i<m ; i++) {
400  if(A[i+lb1][j+lb2] != 0.0) {
401  ind.push_back(i);
402  x.push_back(interval(A[i+lb1][j+lb2]));
403  nnz++;
404  }
405  }
406 
407  p[j+1] = nnz;
408  }
409 
410  }
411 
413 
416  simatrix(const int ms, const int ns, const imatrix& A) : m(ms), n(ns), lb1(1), ub1(ms), lb2(1), ub2(ns) {
417  //Banded matrix constructor
418  int nnz = RowLen(A)*ColLen(A);
419  p = std::vector<int>((n>0) ? n+1 : 1, 0);
420  ind.reserve(nnz);
421  x.reserve(nnz);
422 
423  std::vector<triplet_store<interval> > work;
424  work.reserve(nnz);
425 
426 
427  for(int i=0 ; i<ColLen(A) ; i++) {
428  for(int j=Lb(A,2) ; j<=Ub(A,2) ; j++) {
429  if(i+j >=0 && i+j < n) {
430  work.push_back(triplet_store<interval>(i,i+j,A[i+Lb(A,1)][j]));
431  }
432  }
433  }
434 
435  sort(work.begin(), work.end());
436 
437  int i=0;
438 
439  for(int j=0 ; j<n ; j++) {
440 
441  while((unsigned int)i < work.size() && work[i].col == j ) {
442  ind.push_back(work[i].row);
443  x.push_back(work[i].val);
444  i++;
445  }
446 
447  p[j+1] = i;
448  }
449 
450  }
451 
453  simatrix(const srmatrix_slice&);
455  simatrix(const simatrix_slice&);
456 
458  void full(imatrix& A) const {
459  A = imatrix(lb1,ub1,lb2,ub2);
460  A = 0.0;
461  for(int j=0 ; j<n ; j++) {
462  for(int k=p[j] ; k<p[j+1] ; k++) {
463  A[ind[k]+lb1][j+lb2] = x[k];
464  }
465  }
466  }
467 
469 
473  void dropzeros() {
474  std::vector<int> pnew(n+1,0);
475  std::vector<int> indnew;
476  std::vector<interval> xnew;
477  int nnznew = 0;
478 
479  for(int j=0 ; j<n ; j++) {
480  for(int k=p[j] ; k<p[j+1] ; k++) {
481  if(x[k] != 0.0) {
482  xnew.push_back(x[k]);
483  indnew.push_back(ind[k]);
484  nnznew++;
485  }
486  }
487  pnew[j+1] = nnznew;
488  }
489 
490  p = pnew;
491  ind = indnew;
492  x = xnew;
493  }
494 
495 
497  simatrix& operator=(const real& A) {
498  return sp_ms_assign<simatrix,real,interval>(*this,A);
499  }
500 
503  return sp_ms_assign<simatrix,interval,interval>(*this,A);
504  }
505 
508  return spf_mm_assign<simatrix,rmatrix,interval>(*this,A);
509  }
510 
513  return spf_mm_assign<simatrix,imatrix,interval>(*this,A);
514  }
515 
518  return spf_mm_assign<simatrix,rmatrix_slice,interval>(*this,A);
519  }
520 
523  return spf_mm_assign<simatrix,imatrix_slice,interval>(*this,A);
524  }
525 
528  m = A.m;
529  n = A.n;
530  p = A.p;
531  ind = A.ind;
532  x.clear();
533  x.reserve(A.get_nnz());
534  for(unsigned int i=0 ; i<A.x.size() ; i++)
535  x.push_back(interval(A.x[i]));
536  return *this;
537  }
538 
539  /* simatrix& operator=(const simatrix& A) {
540  p = A.p;
541  ind = A.ind;
542  x = A.x;
543  return *this;
544  } */
545 
550 
552 
558  const interval operator()(int i, int j) const {
559 #if(CXSC_INDEX_CHECK)
560  if(i<lb1 || i>ub1 || j<lb2 || j>ub2)
561  cxscthrow(ROW_OR_COL_NOT_IN_MAT("simatrix::operator()(int, int)"));
562 #endif
563  interval r(0.0);
564  for(int k=p[j-lb2] ; k<p[j-lb2+1] && ind[k]<=i-lb1 ; k++) {
565  if(ind[k] == i-lb1) r = x[k];
566  }
567  return r;
568  }
569 
571 
579  interval& element(int i, int j) {
580 #if(CXSC_INDEX_CHECK)
581  if(i<lb1 || i>ub1 || j<lb2 || j>ub2)
582  cxscthrow(ROW_OR_COL_NOT_IN_MAT("simatrix::operator()(int, int)"));
583 #endif
584  int k;
585  for(k=p[j-lb2] ; k<p[j-lb2+1] && ind[k]<=i-lb1 ; k++) {
586  if(ind[k] == i-lb1) return x[k];
587  }
588 
589  //Nicht gefunden, Element muss angelegt werden, da Schreibzugriff moeglich
590  std::vector<int>::iterator ind_it = ind.begin() + k;
591  std::vector<interval>::iterator x_it = x.begin() + k;
592  ind.insert(ind_it, i-lb1);
593  x_it = x.insert(x_it, interval(0.0));
594  for(k=j-lb2+1 ; k<(int)p.size() ; k++)
595  p[k]++;
596 
597  return *x_it;
598  }
599 
601  simatrix_subv operator[](const cxscmatrix_column&);
603  simatrix_subv operator[](const int);
605  const simatrix_subv operator[](const cxscmatrix_column&) const;
607  const simatrix_subv operator[](const int) const;
608 
610  simatrix_slice operator()(const int, const int , const int, const int);
612  const simatrix_slice operator()(const int, const int , const int, const int) const;
613 
615  simatrix operator()(const intvector& pervec, const intvector& q) {
616  simatrix A(m,n,get_nnz());
617  intvector per = perminv(pervec);
618 
619  int nnz=0;
620  for(int k=0 ; k<n ; k++) {
621  A.p[k] = nnz;
622 
623  std::map<int,interval> work;
624  for(int j=p[q[Lb(q)+k]] ; j<p[q[Lb(q)+k]+1] ; j++)
625  work.insert(std::make_pair(per[Lb(per)+ind[j]], x[j]));
626 
627  for(std::map<int,interval>::iterator it = work.begin() ; it != work.end() ; it++) {
628  A.ind.push_back(it->first);
629  A.x.push_back(it->second);
630  }
631 
632  nnz += work.size();
633 
634  }
635 
636  A.p[n] = nnz;
637 
638  return A;
639  }
640 
642  simatrix operator()(const intvector& pervec) {
643  simatrix A(m,n,get_nnz());
644  intvector per = perminv(pervec);
645 
646  for(int k=0 ; k<n ; k++) {
647  A.p[k] = p[k];
648 
649  std::map<int,interval> work;
650  for(int j=p[k] ; j<p[k+1] ; j++)
651  work.insert(std::make_pair(per[Lb(per)+ind[j]], x[j]));
652 
653  for(std::map<int,interval>::iterator it = work.begin() ; it != work.end() ; it++) {
654  A.ind.push_back(it->first);
655  A.x.push_back(it->second);
656  }
657 
658  }
659 
660  A.p[n] = p[n];
661 
662  return A;
663  }
664 
666  simatrix operator()(const intmatrix& P, const intmatrix& Q) {
667  intvector p = permvec(P);
668  intvector q = perminv(permvec(Q));
669  return (*this)(p,q);
670  }
671 
674  intvector p = permvec(P);
675  return (*this)(p);
676  }
677 
679  real density() const {
680  return p[n]/((double)m*n);
681  }
682 
684  int get_nnz() const {
685  return p[n];
686  }
687 
690  return spf_mm_addassign<simatrix,rmatrix,imatrix>(*this,B);
691  }
692 
695  return spf_mm_addassign<simatrix,imatrix,imatrix>(*this,B);
696  }
697 
700  return spf_mm_addassign<simatrix,rmatrix_slice,imatrix>(*this,B);
701  }
702 
705  return spf_mm_addassign<simatrix,imatrix_slice,imatrix>(*this,B);
706  }
707 
710  return spsp_mm_addassign<simatrix,srmatrix,interval>(*this,B);
711  }
712 
715  return spsp_mm_addassign<simatrix,simatrix,interval>(*this,B);
716  }
717 
720  return spf_mm_subassign<simatrix,rmatrix,imatrix>(*this,B);
721  }
722 
725  return spf_mm_subassign<simatrix,imatrix,imatrix>(*this,B);
726  }
727 
730  return spf_mm_subassign<simatrix,rmatrix_slice,imatrix>(*this,B);
731  }
732 
735  return spf_mm_subassign<simatrix,imatrix_slice,imatrix>(*this,B);
736  }
737 
740  return spsp_mm_subassign<simatrix,srmatrix,interval>(*this,B);
741  }
742 
745  return spsp_mm_subassign<simatrix,simatrix,interval>(*this,B);
746  }
747 
750  return spf_mm_multassign<simatrix,imatrix,sparse_idot,imatrix>(*this,B);
751  }
752 
755  return spf_mm_multassign<simatrix,rmatrix,sparse_idot,imatrix>(*this,B);
756  }
757 
760  return spf_mm_multassign<simatrix,rmatrix_slice,sparse_idot,imatrix>(*this,B);
761  }
762 
765  return spf_mm_multassign<simatrix,imatrix_slice,sparse_idot,imatrix>(*this,B);
766  }
767 
770  return spsp_mm_multassign<simatrix,srmatrix,sparse_idot,interval>(*this,B);
771  }
772 
775  return spsp_mm_multassign<simatrix,simatrix,sparse_idot,interval>(*this,B);
776  }
777 
779  simatrix& operator*=(const real& r) {
780  return sp_ms_multassign(*this,r);
781  }
782 
785  return sp_ms_multassign(*this,r);
786  }
787 
789  simatrix& operator/=(const real& r) {
790  return sp_ms_divassign(*this,r);
791  }
792 
795  return sp_ms_divassign(*this,r);
796  }
797 
800  return spf_mm_hullassign<simatrix,rmatrix,imatrix>(*this,B);
801  }
802 
805  return spf_mm_hullassign<simatrix,imatrix,imatrix>(*this,B);
806  }
807 
810  return spf_mm_hullassign<simatrix,rmatrix_slice,imatrix>(*this,B);
811  }
812 
815  return spf_mm_hullassign<simatrix,imatrix_slice,imatrix>(*this,B);
816  }
817 
820  return spsp_mm_hullassign<simatrix,srmatrix,interval>(*this,B);
821  }
822 
825  return spsp_mm_hullassign<simatrix,simatrix,interval>(*this,B);
826  }
827 
830  return spf_mm_intersectassign<simatrix,imatrix,imatrix>(*this,B);
831  }
832 
835  return spf_mm_intersectassign<simatrix,imatrix_slice,imatrix>(*this,B);
836  }
837 
840  return spsp_mm_intersectassign<simatrix,simatrix,interval>(*this,B);
841  }
842 
843  friend void SetLb(simatrix&, const int, const int);
844  friend void SetUb(simatrix&, const int, const int);
845  friend int Lb(const simatrix&, int);
846  friend int Ub(const simatrix&, int);
847  friend int RowLen(const simatrix&);
848  friend int ColLen(const simatrix&);
849  friend srmatrix Inf(const simatrix&);
850  friend srmatrix Sup(const simatrix&);
851  friend simatrix Re(const scimatrix&);
852  friend simatrix Im(const scimatrix&);
853  friend simatrix abs(const simatrix&);
854  friend srmatrix mid(const simatrix&);
855  friend srmatrix diam(const simatrix&);
856  friend simatrix abs(const scimatrix&);
857  friend srmatrix absmin(const simatrix&);
858  friend srmatrix absmax(const simatrix&);
859 
860  friend simatrix transp(const simatrix&);
861  friend simatrix Id(const simatrix&);
862  friend srmatrix CompMat(const simatrix&);
863 
864  friend std::istream& operator>>(std::istream&, simatrix_slice&);
865  friend std::istream& operator>>(std::istream&, simatrix_subv&);
866 
867  friend class srmatrix_slice;
868  friend class srmatrix_subv;
869  friend class srvector;
870  friend class simatrix_slice;
871  friend class simatrix_subv;
872  friend class sivector;
873  friend class scimatrix;
874  friend class scimatrix_slice;
875  friend class scimatrix_subv;
876  friend class scivector;
877  friend class rmatrix;
878  friend class imatrix;
879  friend class cimatrix;
880 
881 #include "matrix_friend_declarations.inl"
882 };
883 
884 inline imatrix::imatrix(const srmatrix& A) {
885  dat = new interval[A.m*A.n];
886  lb1 = A.lb1; lb2 = A.lb2; ub1 = A.ub1; ub2 = A.ub2;
887  xsize = A.n;
888  ysize = A.m;
889  *this = 0.0;
890  for(int j=0 ; j<A.n ; j++) {
891  for(int k=A.p[j] ; k<A.p[j+1] ; k++) {
892  dat[A.ind[k]*A.n+j] = A.x[k];
893  }
894  }
895 }
896 
897 inline imatrix::imatrix(const simatrix& A) {
898  dat = new interval[A.m*A.n];
899  lb1 = A.lb1; lb2 = A.lb2; ub1 = A.ub1; ub2 = A.ub2;
900  xsize = A.n;
901  ysize = A.m;
902  *this = 0.0;
903  for(int j=0 ; j<A.n ; j++) {
904  for(int k=A.p[j] ; k<A.p[j+1] ; k++) {
905  dat[A.ind[k]*A.n+j] = A.x[k];
906  }
907  }
908 }
909 
911 inline simatrix Id(const simatrix& A) {
912  simatrix I(A.m, A.n, (A.m>A.n) ? A.m : A.n);
913  I.lb1 = A.lb1; I.lb2 = A.lb2;
914  I.ub1 = A.ub1; I.ub2 = A.ub2;
915 
916  if(A.m < A.n) {
917  for(int i=0 ; i<A.m ; i++) {
918  I.p[i+1] = I.p[i] + 1;
919  I.ind.push_back(i);
920  I.x.push_back(interval(1.0));
921  }
922  } else {
923  for(int i=0 ; i<A.n ; i++) {
924  I.p[i+1] = I.p[i] + 1;
925  I.ind.push_back(i);
926  I.x.push_back(interval(1.0));
927  }
928  }
929 
930  return I;
931 }
932 
934 inline simatrix transp(const simatrix& A) {
935  simatrix B(A.n, A.m, A.get_nnz());
936 
937  //NIchtnullen pro Zeile bestimmen
938  std::vector<int> w(A.m,0);
939  for(unsigned int i=0 ; i<A.ind.size() ; i++)
940  w[A.ind[i]]++;
941 
942  //Spalten"pointer" setzen
943  B.p.resize(A.m+1);
944  B.p[0] = 0;
945  for(unsigned int i=1 ; i<B.p.size() ; i++)
946  B.p[i] = w[i-1] + B.p[i-1];
947 
948  //w vorbereiten
949  w.insert(w.begin(), 0);
950  for(unsigned int i=1 ; i<w.size() ; i++) {
951  w[i] += w[i-1];
952  }
953 
954  //neuer zeilenindex und wert wird gesetzt
955  int q;
956  B.ind.resize(A.get_nnz());
957  B.x.resize(A.get_nnz());
958  for(int j=0 ; j<A.n ; j++) {
959  for(int k=A.p[j] ; k<A.p[j+1] ; k++) {
960  q = w[A.ind[k]]++;
961  B.ind[q] = j;
962  B.x[q] = A.x[k];
963  }
964  }
965 
966  return B;
967 }
968 
970 
974 inline void SetLb(simatrix& A, const int i, const int j) {
975  if(i==1) {
976  A.lb1 = j;
977  A.ub1 = j + A.m - 1;
978  } else if(i==2) {
979  A.lb2 = j;
980  A.ub2 = j + A.n - 1;
981  }
982 }
983 
985 
989 inline void SetUb(simatrix& A, const int i, const int j) {
990  if(i==1) {
991  A.ub1 = j;
992  A.lb1 = j - A.m + 1;
993  } else if(i==2) {
994  A.ub2 = j;
995  A.lb2 = j - A.n + 1;
996  }
997 }
998 
1000 
1003 inline int Lb(const simatrix& A, int i) {
1004  if(i==1)
1005  return A.lb1;
1006  else if(i==2)
1007  return A.lb2;
1008  else
1009  return 1;
1010 }
1011 
1013 
1016 inline int Ub(const simatrix& A, int i) {
1017  if(i==1)
1018  return A.ub1;
1019  else if(i==2)
1020  return A.ub2;
1021  else
1022  return 1;
1023 }
1024 
1026 inline int RowLen(const simatrix& A) {
1027  return A.n;
1028 }
1029 
1031 inline int ColLen(const simatrix& A) {
1032  return A.m;
1033 }
1034 
1036 inline void Resize(simatrix& A) {
1037  sp_m_resize(A);
1038 }
1039 
1041 inline void Resize(simatrix& A, const int m, const int n) {
1042  sp_m_resize(A,m,n);
1043 }
1044 
1046 inline void Resize(simatrix& A, const int l1, const int u1, const int l2, const int u2) {
1047  sp_m_resize(A,l1,u1,l2,u2);
1048 }
1049 
1051 inline srmatrix Inf(const simatrix& A) {
1052  srmatrix res(A.m,A.n,A.get_nnz());
1053  res.lb1 = A.lb1;
1054  res.lb2 = A.lb2;
1055  res.ub1 = A.ub1;
1056  res.ub2 = A.ub2;
1057  res.p = A.p;
1058  res.ind = A.ind;
1059 
1060  for(int i=0 ; i<res.get_nnz() ; i++)
1061  res.x.push_back(Inf(A.x[i]));
1062 
1063  res.dropzeros();
1064 
1065  return res;
1066 }
1067 
1069 inline srmatrix Sup(const simatrix& A) {
1070  srmatrix res(A.m,A.n,A.get_nnz());
1071  res.lb1 = A.lb1;
1072  res.lb2 = A.lb2;
1073  res.ub1 = A.ub1;
1074  res.ub2 = A.ub2;
1075  res.p = A.p;
1076  res.ind = A.ind;
1077 
1078  for(int i=0 ; i<res.get_nnz() ; i++)
1079  res.x.push_back(Sup(A.x[i]));
1080 
1081  res.dropzeros();
1082 
1083  return res;
1084 }
1085 
1087 inline simatrix abs(const simatrix& A) {
1088  simatrix res(A.m,A.n,A.get_nnz());
1089  res.lb1 = A.lb1;
1090  res.lb2 = A.lb2;
1091  res.ub1 = A.ub1;
1092  res.ub2 = A.ub2;
1093  res.p = A.p;
1094  res.ind = A.ind;
1095 
1096  for(int i=0 ; i<res.get_nnz() ; i++)
1097  res.x.push_back(abs(A.x[i]));
1098 
1099  res.dropzeros();
1100 
1101  return res;
1102 }
1103 
1105 inline srmatrix absmin(const simatrix& A) {
1106  srmatrix res(A.m,A.n,A.get_nnz());
1107  res.lb1 = A.lb1;
1108  res.lb2 = A.lb2;
1109  res.ub1 = A.ub1;
1110  res.ub2 = A.ub2;
1111  res.p = A.p;
1112  res.ind = A.ind;
1113 
1114  for(int i=0 ; i<res.get_nnz() ; i++)
1115  res.x.push_back(AbsMin(A.x[i]));
1116 
1117  res.dropzeros();
1118 
1119  return res;
1120 }
1121 
1123 inline srmatrix absmax(const simatrix& A) {
1124  srmatrix res(A.m,A.n,A.get_nnz());
1125  res.lb1 = A.lb1;
1126  res.lb2 = A.lb2;
1127  res.ub1 = A.ub1;
1128  res.ub2 = A.ub2;
1129  res.p = A.p;
1130  res.ind = A.ind;
1131 
1132  for(int i=0 ; i<res.get_nnz() ; i++)
1133  res.x.push_back(AbsMax(A.x[i]));
1134 
1135  res.dropzeros();
1136 
1137  return res;
1138 }
1139 
1141 inline srmatrix CompMat(const simatrix& A) {
1142  srmatrix res(A.m,A.n,A.get_nnz());
1143  res.lb1 = A.lb1;
1144  res.lb2 = A.lb2;
1145  res.ub1 = A.ub1;
1146  res.ub2 = A.ub2;
1147  res.p = A.p;
1148  res.ind = A.ind;
1149  res.p[A.n] = A.p[A.n];
1150 
1151  for(int j=0 ; j<res.n ; j++) {
1152  for(int k=A.p[j] ; k<A.p[j+1] ; k++) {
1153  if(A.ind[k] == j)
1154  res.x.push_back(AbsMin(A.x[k]));
1155  else
1156  res.x.push_back(-AbsMax(A.x[k]));
1157  }
1158  }
1159 
1160  res.dropzeros();
1161 
1162  return res;
1163 }
1164 
1166 inline srmatrix mid(const simatrix& A) {
1167  srmatrix res(A.m,A.n,A.get_nnz());
1168  res.lb1 = A.lb1;
1169  res.lb2 = A.lb2;
1170  res.ub1 = A.ub1;
1171  res.ub2 = A.ub2;
1172  res.p = A.p;
1173  res.ind = A.ind;
1174 
1175  for(int i=0 ; i<res.get_nnz() ; i++)
1176  res.x.push_back(mid(A.x[i]));
1177 
1178  res.dropzeros();
1179 
1180  return res;
1181 }
1182 
1184 inline srmatrix diam(const simatrix& A) {
1185  srmatrix res(A.m,A.n,A.get_nnz());
1186  res.lb1 = A.lb1;
1187  res.lb2 = A.lb2;
1188  res.ub1 = A.ub1;
1189  res.ub2 = A.ub2;
1190  res.p = A.p;
1191  res.ind = A.ind;
1192 
1193  for(int i=0 ; i<res.get_nnz() ; i++)
1194  res.x.push_back(diam(A.x[i]));
1195 
1196  res.dropzeros();
1197 
1198  return res;
1199 }
1200 
1201 
1203 
1209 inline imatrix operator*(const imatrix& A, const srmatrix& B) {
1210  return fsp_mm_mult<imatrix,srmatrix,imatrix,sparse_idot>(A,B);
1211 }
1212 
1214 
1220 inline imatrix operator*(const rmatrix& A, const simatrix& B) {
1221  return fsp_mm_mult<rmatrix,simatrix,imatrix,sparse_idot>(A,B);
1222 }
1223 
1225 
1231 inline imatrix operator*(const imatrix& A, const simatrix& B) {
1232  return fsp_mm_mult<imatrix,simatrix,imatrix,sparse_idot>(A,B);
1233 }
1234 
1236 
1242 inline imatrix operator*(const simatrix& A, const rmatrix& B) {
1243  return spf_mm_mult<simatrix,rmatrix,imatrix,sparse_idot>(A,B);
1244 }
1245 
1247 
1253 inline imatrix operator*(const srmatrix& A, const imatrix& B) {
1254  return spf_mm_mult<srmatrix,imatrix,imatrix,sparse_idot>(A,B);
1255 }
1256 
1258 
1264 inline imatrix operator*(const simatrix& A, const imatrix& B) {
1265  return spf_mm_mult<simatrix,imatrix,imatrix,sparse_idot>(A,B);
1266 }
1267 
1269 
1275 inline imatrix operator*(const imatrix_slice& A, const srmatrix& B) {
1276  return fsp_mm_mult<imatrix_slice,srmatrix,imatrix,sparse_idot>(A,B);
1277 }
1278 
1280 
1286 inline imatrix operator*(const rmatrix_slice& A, const simatrix& B) {
1287  return fsp_mm_mult<rmatrix_slice,simatrix,imatrix,sparse_idot>(A,B);
1288 }
1289 
1291 
1297 inline imatrix operator*(const imatrix_slice& A, const simatrix& B) {
1298  return fsp_mm_mult<imatrix_slice,simatrix,imatrix,sparse_idot>(A,B);
1299 }
1300 
1302 
1308 inline imatrix operator*(const simatrix& A, const rmatrix_slice& B) {
1309  return spf_mm_mult<simatrix,rmatrix_slice,imatrix,sparse_idot>(A,B);
1310 }
1311 
1313 
1319 inline imatrix operator*(const srmatrix& A, const imatrix_slice& B) {
1320  return spf_mm_mult<srmatrix,imatrix_slice,imatrix,sparse_idot>(A,B);
1321 }
1322 
1324 
1330 inline imatrix operator*(const simatrix& A, const imatrix_slice& B) {
1331  return spf_mm_mult<simatrix,imatrix_slice,imatrix,sparse_idot>(A,B);
1332 }
1333 
1335 
1341 inline simatrix operator*(const simatrix& A, const srmatrix& B) {
1342  return spsp_mm_mult<simatrix,srmatrix,simatrix,sparse_idot,interval>(A,B);
1343 }
1344 
1346 
1352 inline simatrix operator*(const srmatrix& A, const simatrix& B) {
1353  return spsp_mm_mult<srmatrix,simatrix,simatrix,sparse_idot,interval>(A,B);
1354 }
1355 
1357 
1363 inline simatrix operator*(const simatrix& A, const simatrix& B) {
1364  return spsp_mm_mult<simatrix,simatrix,simatrix,sparse_idot,interval>(A,B);
1365 }
1366 
1368 inline simatrix operator/(const simatrix& A, const real& r) {
1369  return sp_ms_div<simatrix,real,simatrix>(A,r);
1370 }
1371 
1373 inline simatrix operator/(const simatrix& A, const interval& r) {
1374  return sp_ms_div<simatrix,interval,simatrix>(A,r);
1375 }
1376 
1378 inline simatrix operator/(const srmatrix& A, const interval& r) {
1379  return sp_ms_div<srmatrix,interval,simatrix>(A,r);
1380 }
1381 
1383 inline simatrix operator*(const simatrix& A, const real& r) {
1384  return sp_ms_mult<simatrix,real,simatrix>(A,r);
1385 }
1386 
1388 inline simatrix operator*(const simatrix& A, const interval& r) {
1389  return sp_ms_mult<simatrix,interval,simatrix>(A,r);
1390 }
1391 
1393 inline simatrix operator*(const srmatrix& A, const interval& r) {
1394  return sp_ms_mult<srmatrix,interval,simatrix>(A,r);
1395 }
1396 
1398 inline simatrix operator*(const real& r, const simatrix& A) {
1399  return sp_sm_mult<real,simatrix,simatrix>(r,A);
1400 }
1401 
1403 inline simatrix operator*(const interval& r, const simatrix& A) {
1404  return sp_sm_mult<interval,simatrix,simatrix>(r,A);
1405 }
1406 
1408 inline simatrix operator*(const interval& r, const srmatrix& A) {
1409  return sp_sm_mult<interval,srmatrix,simatrix>(r,A);
1410 }
1411 
1413 
1419 inline ivector operator*(const simatrix& A, const rvector& v) {
1420  return spf_mv_mult<simatrix,rvector,ivector,sparse_idot>(A,v);
1421 }
1422 
1424 
1430 inline ivector operator*(const srmatrix& A, const ivector& v) {
1431  return spf_mv_mult<srmatrix,ivector,ivector,sparse_idot>(A,v);
1432 }
1433 
1435 
1441 inline ivector operator*(const simatrix& A, const ivector& v) {
1442  return spf_mv_mult<simatrix,ivector,ivector,sparse_idot>(A,v);
1443 }
1444 
1446 
1452 inline ivector operator*(const simatrix& A, const rvector_slice& v) {
1453  return spf_mv_mult<simatrix,rvector_slice,ivector,sparse_idot>(A,v);
1454 }
1455 
1457 
1463 inline ivector operator*(const srmatrix& A, const ivector_slice& v) {
1464  return spf_mv_mult<srmatrix,ivector_slice,ivector,sparse_idot>(A,v);
1465 }
1466 
1468 
1474 inline ivector operator*(const simatrix& A, const ivector_slice& v) {
1475  return spf_mv_mult<simatrix,ivector_slice,ivector,sparse_idot>(A,v);
1476 }
1477 
1479 
1485 inline sivector operator*(const simatrix& A, const srvector& v) {
1486  return spsp_mv_mult<simatrix,srvector,sivector,sparse_idot,interval>(A,v);
1487 }
1488 
1490 
1496 inline sivector operator*(const srmatrix& A, const sivector& v) {
1497  return spsp_mv_mult<srmatrix,sivector,sivector,sparse_idot,interval>(A,v);
1498 }
1499 
1501 
1507 inline sivector operator*(const simatrix& A, const sivector& v) {
1508  return spsp_mv_mult<simatrix,sivector,sivector,sparse_idot,interval>(A,v);
1509 }
1510 
1512 
1518 inline sivector operator*(const simatrix& A, const srvector_slice& v) {
1519  return spsl_mv_mult<simatrix,srvector_slice,sivector,sparse_idot,interval>(A,v);
1520 }
1521 
1523 
1529 inline sivector operator*(const srmatrix& A, const sivector_slice& v) {
1530  return spsl_mv_mult<srmatrix,sivector_slice,sivector,sparse_idot,interval>(A,v);
1531 }
1532 
1534 
1540 inline sivector operator*(const simatrix& A, const sivector_slice& v) {
1541  return spsl_mv_mult<simatrix,sivector_slice,sivector,sparse_idot,interval>(A,v);
1542 }
1543 
1545 
1551 inline ivector operator*(const imatrix& A, const srvector& v) {
1552  return fsp_mv_mult<imatrix,srvector,ivector,sparse_idot>(A,v);
1553 }
1554 
1556 
1562 inline ivector operator*(const rmatrix& A, const sivector& v) {
1563  return fsp_mv_mult<rmatrix,sivector,ivector,sparse_idot>(A,v);
1564 }
1565 
1567 
1573 inline ivector operator*(const imatrix& A, const sivector& v) {
1574  return fsp_mv_mult<imatrix,sivector,ivector,sparse_idot>(A,v);
1575 }
1576 
1578 
1584 inline ivector operator*(const imatrix_slice& A, const srvector& v) {
1585  return fsp_mv_mult<imatrix_slice,srvector,ivector,sparse_idot>(A,v);
1586 }
1587 
1589 
1595 inline ivector operator*(const rmatrix_slice& A, const sivector& v) {
1596  return fsp_mv_mult<rmatrix_slice,sivector,ivector,sparse_idot>(A,v);
1597 }
1598 
1600 
1606 inline ivector operator*(const imatrix_slice& A, const sivector& v) {
1607  return fsp_mv_mult<imatrix_slice,sivector,ivector,sparse_idot>(A,v);
1608 }
1609 
1611 
1617 inline ivector operator*(const imatrix& A, const srvector_slice& v) {
1618  return fsl_mv_mult<imatrix,srvector_slice,ivector,sparse_idot>(A,v);
1619 }
1620 
1622 
1628 inline ivector operator*(const rmatrix& A, const sivector_slice& v) {
1629  return fsl_mv_mult<rmatrix,sivector_slice,ivector,sparse_idot>(A,v);
1630 }
1631 
1633 
1639 inline ivector operator*(const imatrix& A, const sivector_slice& v) {
1640  return fsl_mv_mult<imatrix,sivector_slice,ivector,sparse_idot>(A,v);
1641 }
1642 
1644 
1650 inline ivector operator*(const imatrix_slice& A, const srvector_slice& v) {
1651  return fsl_mv_mult<imatrix_slice,srvector_slice,ivector,sparse_idot>(A,v);
1652 }
1653 
1655 
1661 inline ivector operator*(const rmatrix_slice& A, const sivector_slice& v) {
1662  return fsl_mv_mult<rmatrix_slice,sivector_slice,ivector,sparse_idot>(A,v);
1663 }
1664 
1666 
1672 inline ivector operator*(const imatrix_slice& A, const sivector_slice& v) {
1673  return fsl_mv_mult<imatrix_slice,sivector_slice,ivector,sparse_idot>(A,v);
1674 }
1675 
1677 inline imatrix operator+(const imatrix& A, const srmatrix& B) {
1678  return fsp_mm_add<imatrix,srmatrix,imatrix>(A,B);
1679 }
1680 
1682 inline imatrix operator+(const rmatrix& A, const simatrix& B) {
1683  return fsp_mm_add<rmatrix,simatrix,imatrix>(A,B);
1684 }
1685 
1687 inline imatrix operator+(const imatrix& A, const simatrix& B) {
1688  return fsp_mm_add<imatrix,simatrix,imatrix>(A,B);
1689 }
1690 
1692 inline imatrix operator+(const simatrix& A, const rmatrix& B) {
1693  return spf_mm_add<simatrix,rmatrix,imatrix>(A,B);
1694 }
1695 
1697 inline imatrix operator+(const srmatrix& A, const imatrix& B) {
1698  return spf_mm_add<srmatrix,imatrix,imatrix>(A,B);
1699 }
1700 
1702 inline imatrix operator+(const simatrix& A, const imatrix& B) {
1703  return spf_mm_add<simatrix,imatrix,imatrix>(A,B);
1704 }
1705 
1707 inline imatrix operator+(const imatrix_slice& A, const srmatrix& B) {
1708  return fsp_mm_add<imatrix_slice,srmatrix,imatrix>(A,B);
1709 }
1710 
1712 inline imatrix operator+(const rmatrix_slice& A, const simatrix& B) {
1713  return fsp_mm_add<rmatrix_slice,simatrix,imatrix>(A,B);
1714 }
1715 
1717 inline imatrix operator+(const imatrix_slice& A, const simatrix& B) {
1718  return fsp_mm_add<imatrix_slice,simatrix,imatrix>(A,B);
1719 }
1720 
1722 inline imatrix operator+(const simatrix& A, const rmatrix_slice& B) {
1723  return spf_mm_add<simatrix,rmatrix_slice,imatrix>(A,B);
1724 }
1725 
1727 inline imatrix operator+(const srmatrix& A, const imatrix_slice& B) {
1728  return spf_mm_add<srmatrix,imatrix_slice,imatrix>(A,B);
1729 }
1730 
1732 inline imatrix operator+(const simatrix& A, const imatrix_slice& B) {
1733  return spf_mm_add<simatrix,imatrix_slice,imatrix>(A,B);
1734 }
1735 
1737 inline simatrix operator+(const simatrix& A, const srmatrix& B) {
1738  return spsp_mm_add<simatrix,srmatrix,simatrix,interval>(A,B);
1739 }
1740 
1742 inline simatrix operator+(const srmatrix& A, const simatrix& B) {
1743  return spsp_mm_add<srmatrix,simatrix,simatrix,interval>(A,B);
1744 }
1745 
1747 inline simatrix operator+(const simatrix& A, const simatrix& B) {
1748  return spsp_mm_add<simatrix,simatrix,simatrix,interval>(A,B);
1749 }
1750 
1752 inline imatrix operator-(const imatrix& A, const srmatrix& B) {
1753  return fsp_mm_sub<imatrix,srmatrix,imatrix>(A,B);
1754 }
1755 
1757 inline imatrix operator-(const rmatrix& A, const simatrix& B) {
1758  return fsp_mm_sub<rmatrix,simatrix,imatrix>(A,B);
1759 }
1760 
1762 inline imatrix operator-(const imatrix& A, const simatrix& B) {
1763  return fsp_mm_sub<imatrix,simatrix,imatrix>(A,B);
1764 }
1765 
1767 inline imatrix operator-(const simatrix& A, const rmatrix& B) {
1768  return spf_mm_sub<simatrix,rmatrix,imatrix>(A,B);
1769 }
1770 
1772 inline imatrix operator-(const srmatrix& A, const imatrix& B) {
1773  return spf_mm_sub<srmatrix,imatrix,imatrix>(A,B);
1774 }
1775 
1777 inline imatrix operator-(const simatrix& A, const imatrix& B) {
1778  return spf_mm_sub<simatrix,imatrix,imatrix>(A,B);
1779 }
1780 
1782 inline imatrix operator-(const imatrix_slice& A, const srmatrix& B) {
1783  return fsp_mm_sub<imatrix_slice,srmatrix,imatrix>(A,B);
1784 }
1785 
1787 inline imatrix operator-(const rmatrix_slice& A, const simatrix& B) {
1788  return fsp_mm_sub<rmatrix_slice,simatrix,imatrix>(A,B);
1789 }
1790 
1792 inline imatrix operator-(const imatrix_slice& A, const simatrix& B) {
1793  return fsp_mm_sub<imatrix_slice,simatrix,imatrix>(A,B);
1794 }
1795 
1797 inline imatrix operator-(const simatrix& A, const rmatrix_slice& B) {
1798  return spf_mm_sub<simatrix,rmatrix_slice,imatrix>(A,B);
1799 }
1800 
1802 inline imatrix operator-(const srmatrix& A, const imatrix_slice& B) {
1803  return spf_mm_sub<srmatrix,imatrix_slice,imatrix>(A,B);
1804 }
1805 
1807 inline imatrix operator-(const simatrix& A, const imatrix_slice& B) {
1808  return spf_mm_sub<simatrix,imatrix_slice,imatrix>(A,B);
1809 }
1810 
1812 inline simatrix operator-(const simatrix& A, const srmatrix& B) {
1813  return spsp_mm_sub<simatrix,srmatrix,simatrix,interval>(A,B);
1814 }
1815 
1817 inline simatrix operator-(const srmatrix& A, const simatrix& B) {
1818  return spsp_mm_sub<srmatrix,simatrix,simatrix,interval>(A,B);
1819 }
1820 
1822 inline simatrix operator-(const simatrix& A, const simatrix& B) {
1823  return spsp_mm_sub<simatrix,simatrix,simatrix,interval>(A,B);
1824 }
1825 
1827 inline imatrix operator|(const imatrix& A, const srmatrix& B) {
1828  return fsp_mm_hull<imatrix,srmatrix,imatrix>(A,B);
1829 }
1830 
1832 inline imatrix operator|(const rmatrix& A, const simatrix& B) {
1833  return fsp_mm_hull<rmatrix,simatrix,imatrix>(A,B);
1834 }
1835 
1837 inline imatrix operator|(const imatrix& A, const simatrix& B) {
1838  return fsp_mm_hull<imatrix,simatrix,imatrix>(A,B);
1839 }
1840 
1842 inline imatrix operator|(const simatrix& A, const rmatrix& B) {
1843  return spf_mm_hull<simatrix,rmatrix,imatrix>(A,B);
1844 }
1845 
1847 inline imatrix operator|(const srmatrix& A, const imatrix& B) {
1848  return spf_mm_hull<srmatrix,imatrix,imatrix>(A,B);
1849 }
1850 
1852 inline imatrix operator|(const simatrix& A, const imatrix& B) {
1853  return spf_mm_hull<simatrix,imatrix,imatrix>(A,B);
1854 }
1855 
1857 inline imatrix operator|(const imatrix_slice& A, const srmatrix& B) {
1858  return fsp_mm_hull<imatrix_slice,srmatrix,imatrix>(A,B);
1859 }
1860 
1862 inline imatrix operator|(const rmatrix_slice& A, const simatrix& B) {
1863  return fsp_mm_hull<rmatrix_slice,simatrix,imatrix>(A,B);
1864 }
1865 
1867 inline imatrix operator|(const imatrix_slice& A, const simatrix& B) {
1868  return fsp_mm_hull<imatrix_slice,simatrix,imatrix>(A,B);
1869 }
1870 
1872 inline imatrix operator|(const simatrix& A, const rmatrix_slice& B) {
1873  return spf_mm_hull<simatrix,rmatrix_slice,imatrix>(A,B);
1874 }
1875 
1877 inline imatrix operator|(const srmatrix& A, const imatrix_slice& B) {
1878  return spf_mm_hull<srmatrix,imatrix_slice,imatrix>(A,B);
1879 }
1880 
1882 inline imatrix operator|(const simatrix& A, const imatrix_slice& B) {
1883  return spf_mm_hull<simatrix,imatrix_slice,imatrix>(A,B);
1884 }
1885 
1887 inline simatrix operator|(const simatrix& A, const srmatrix& B) {
1888  return spsp_mm_hull<simatrix,srmatrix,simatrix,interval>(A,B);
1889 }
1890 
1892 inline simatrix operator|(const srmatrix& A, const simatrix& B) {
1893  return spsp_mm_hull<srmatrix,simatrix,simatrix,interval>(A,B);
1894 }
1895 
1897 inline simatrix operator|(const simatrix& A, const simatrix& B) {
1898  return spsp_mm_hull<simatrix,simatrix,simatrix,interval>(A,B);
1899 }
1900 
1902 inline imatrix operator|(const rmatrix& A, const srmatrix& B) {
1903  return fsp_mm_hull<rmatrix,srmatrix,imatrix>(A,B);
1904 }
1905 
1907 inline imatrix operator|(const srmatrix& A, const rmatrix& B) {
1908  return spf_mm_hull<srmatrix,rmatrix,imatrix>(A,B);
1909 }
1910 
1912 inline imatrix operator|(const rmatrix_slice& A, const srmatrix& B) {
1913  return fsp_mm_hull<rmatrix_slice,srmatrix,imatrix>(A,B);
1914 }
1915 
1917 inline imatrix operator|(const srmatrix& A, const rmatrix_slice& B) {
1918  return spf_mm_hull<srmatrix,rmatrix_slice,imatrix>(A,B);
1919 }
1920 
1922 inline simatrix operator|(const srmatrix& A, const srmatrix& B) {
1923  return spsp_mm_hull<srmatrix,srmatrix,simatrix,interval>(A,B);
1924 }
1925 
1927 inline imatrix operator&(const imatrix& A, const simatrix& B) {
1928  return fsp_mm_intersect<imatrix,simatrix,imatrix>(A,B);
1929 }
1930 
1932 inline imatrix operator&(const simatrix& A, const imatrix& B) {
1933  return spf_mm_intersect<simatrix,imatrix,imatrix>(A,B);
1934 }
1935 
1937 inline imatrix operator&(const imatrix_slice& A, const simatrix& B) {
1938  return fsp_mm_intersect<imatrix_slice,simatrix,imatrix>(A,B);
1939 }
1940 
1942 inline imatrix operator&(const simatrix& A, const imatrix_slice& B) {
1943  return spf_mm_intersect<simatrix,imatrix_slice,imatrix>(A,B);
1944 }
1945 
1947 inline simatrix operator&(const simatrix& A, const simatrix& B) {
1948  return spsp_mm_intersect<simatrix,simatrix,simatrix,interval>(A,B);
1949 }
1950 
1952 inline simatrix operator-(const simatrix& M) {
1953  return sp_m_negative<simatrix,simatrix>(M);
1954 }
1955 
1957 inline simatrix& operator+(simatrix& A) {
1958  return A;
1959 }
1960 
1962  *this = rmatrix(B);
1963  return *this;
1964 }
1965 
1967  *this = imatrix(B);
1968  return *this;
1969 }
1970 
1972  return fsp_mm_addassign(*this,B);
1973 }
1974 
1976  return fsp_mm_addassign(*this,B);
1977 }
1978 
1980  return fsp_mm_addassign(*this,B);
1981 }
1982 
1984  return fsp_mm_addassign(*this,B);
1985 }
1986 
1988  return fsp_mm_subassign(*this,B);
1989 }
1990 
1992  return fsp_mm_subassign(*this,B);
1993 }
1994 
1996  return fsp_mm_subassign(*this,B);
1997 }
1998 
2000  return fsp_mm_subassign(*this,B);
2001 }
2002 
2004  return fsp_mm_multassign<imatrix,srmatrix,sparse_idot,imatrix>(*this,B);
2005 }
2006 
2008  return fsp_mm_multassign<imatrix,simatrix,sparse_idot,imatrix>(*this,B);
2009 }
2010 
2012  return fsp_mm_multassign<imatrix_slice,srmatrix,sparse_idot,imatrix>(*this,B);
2013 }
2014 
2016  return fsp_mm_multassign<imatrix_slice,simatrix,sparse_idot,imatrix>(*this,B);
2017 }
2018 
2020  return fsp_mm_hullassign(*this,B);
2021 }
2022 
2024  return fsp_mm_hullassign(*this,B);
2025 }
2026 
2028  return fsp_mm_hullassign(*this,B);
2029 }
2030 
2032  return fsp_mm_hullassign(*this,B);
2033 }
2034 
2036  return fsp_mm_intersectassign(*this,B);
2037 }
2038 
2040  return fsp_mm_intersectassign(*this,B);
2041 }
2042 
2044  return fsp_mm_intersectassign(*this,B);
2045 }
2046 
2048  return fsp_mm_intersectassign(*this,B);
2049 }
2050 
2052 inline bool operator==(const simatrix& A, const srmatrix& B) {
2053  return spsp_mm_comp(A,B);
2054 }
2055 
2057 inline bool operator==(const srmatrix& A, const simatrix& B) {
2058  return spsp_mm_comp(A,B);
2059 }
2060 
2062 inline bool operator==(const simatrix& A, const simatrix& B) {
2063  return spsp_mm_comp(A,B);
2064 }
2065 
2067 inline bool operator==(const simatrix& A, const rmatrix& B) {
2068  return spf_mm_comp(A,B);
2069 }
2070 
2072 inline bool operator==(const srmatrix& A, const imatrix& B) {
2073  return spf_mm_comp(A,B);
2074 }
2075 
2077 inline bool operator==(const simatrix& A, const imatrix& B) {
2078  return spf_mm_comp(A,B);
2079 }
2080 
2082 inline bool operator==(const imatrix& A, const srmatrix& B) {
2083  return fsp_mm_comp(A,B);
2084 }
2085 
2087 inline bool operator==(const rmatrix& A, const simatrix& B) {
2088  return fsp_mm_comp(A,B);
2089 }
2090 
2092 inline bool operator==(const imatrix& A, const simatrix& B) {
2093  return fsp_mm_comp(A,B);
2094 }
2095 
2097 inline bool operator==(const imatrix_slice& A, const srmatrix& B) {
2098  return fsp_mm_comp(A,B);
2099 }
2100 
2102 inline bool operator==(const rmatrix_slice& A, const simatrix& B) {
2103  return fsp_mm_comp(A,B);
2104 }
2105 
2107 inline bool operator==(const imatrix_slice& A, const simatrix& B) {
2108  return fsp_mm_comp(A,B);
2109 }
2110 
2112 inline bool operator==(const simatrix& A, const rmatrix_slice& B) {
2113  return spf_mm_comp(A,B);
2114 }
2115 
2117 inline bool operator==(const srmatrix& A, const imatrix_slice& B) {
2118  return spf_mm_comp(A,B);
2119 }
2120 
2122 inline bool operator==(const simatrix& A, const imatrix_slice& B) {
2123  return spf_mm_comp(A,B);
2124 }
2125 
2127 inline bool operator!=(const simatrix& A, const srmatrix& B) {
2128  return !spsp_mm_comp(A,B);
2129 }
2130 
2132 inline bool operator!=(const srmatrix& A, const simatrix& B) {
2133  return !spsp_mm_comp(A,B);
2134 }
2135 
2137 inline bool operator!=(const simatrix& A, const simatrix& B) {
2138  return !spsp_mm_comp(A,B);
2139 }
2140 
2142 inline bool operator!=(const simatrix& A, const rmatrix& B) {
2143  return !spf_mm_comp(A,B);
2144 }
2145 
2147 inline bool operator!=(const srmatrix& A, const imatrix& B) {
2148  return !spf_mm_comp(A,B);
2149 }
2150 
2152 inline bool operator!=(const simatrix& A, const imatrix& B) {
2153  return !spf_mm_comp(A,B);
2154 }
2155 
2157 inline bool operator!=(const imatrix& A, const srmatrix& B) {
2158  return !fsp_mm_comp(A,B);
2159 }
2160 
2162 inline bool operator!=(const rmatrix& A, const simatrix& B) {
2163  return !fsp_mm_comp(A,B);
2164 }
2165 
2167 inline bool operator!=(const imatrix& A, const simatrix& B) {
2168  return !fsp_mm_comp(A,B);
2169 }
2170 
2172 inline bool operator!=(const imatrix_slice& A, const srmatrix& B) {
2173  return !fsp_mm_comp(A,B);
2174 }
2175 
2177 inline bool operator!=(const rmatrix_slice& A, const simatrix& B) {
2178  return !fsp_mm_comp(A,B);
2179 }
2180 
2182 inline bool operator!=(const imatrix_slice& A, const simatrix& B) {
2183  return !fsp_mm_comp(A,B);
2184 }
2185 
2187 inline bool operator!=(const simatrix& A, const rmatrix_slice& B) {
2188  return !spf_mm_comp(A,B);
2189 }
2190 
2192 inline bool operator!=(const srmatrix& A, const imatrix_slice& B) {
2193  return !spf_mm_comp(A,B);
2194 }
2195 
2197 inline bool operator!=(const simatrix& A, const imatrix_slice& B) {
2198  return !spf_mm_comp(A,B);
2199 }
2200 
2202 inline bool operator<(const srmatrix& A, const simatrix& B) {
2203  return spsp_mm_less<srmatrix,simatrix,interval>(A,B);
2204 }
2205 
2207 inline bool operator<(const simatrix& A, const simatrix& B) {
2208  return spsp_mm_less<simatrix,simatrix,interval>(A,B);
2209 }
2210 
2212 inline bool operator<(const srmatrix& A, const imatrix& B) {
2213  return spf_mm_less<srmatrix,imatrix,interval>(A,B);
2214 }
2215 
2217 inline bool operator<(const simatrix& A, const imatrix& B) {
2218  return spf_mm_less<simatrix,imatrix,interval>(A,B);
2219 }
2220 
2222 inline bool operator<(const rmatrix& A, const simatrix& B) {
2223  return fsp_mm_less<rmatrix,simatrix,interval>(A,B);
2224 }
2225 
2227 inline bool operator<(const imatrix& A, const simatrix& B) {
2228  return fsp_mm_less<imatrix,simatrix,interval>(A,B);
2229 }
2230 
2232 inline bool operator<(const rmatrix_slice& A, const simatrix& B) {
2233  return fsp_mm_less<rmatrix_slice,simatrix,interval>(A,B);
2234 }
2235 
2237 inline bool operator<(const imatrix_slice& A, const simatrix& B) {
2238  return fsp_mm_less<imatrix_slice,simatrix,interval>(A,B);
2239 }
2240 
2242 inline bool operator<(const srmatrix& A, const imatrix_slice& B) {
2243  return spf_mm_less<srmatrix,imatrix_slice,interval>(A,B);
2244 }
2245 
2247 inline bool operator<(const simatrix& A, const imatrix_slice& B) {
2248  return spf_mm_less<simatrix,imatrix_slice,interval>(A,B);
2249 }
2250 
2252 inline bool operator<=(const srmatrix& A, const simatrix& B) {
2253  return spsp_mm_leq<srmatrix,simatrix,interval>(A,B);
2254 }
2255 
2257 inline bool operator<=(const simatrix& A, const simatrix& B) {
2258  return spsp_mm_leq<simatrix,simatrix,interval>(A,B);
2259 }
2260 
2262 inline bool operator<=(const srmatrix& A, const imatrix& B) {
2263  return spf_mm_leq<srmatrix,imatrix,interval>(A,B);
2264 }
2265 
2267 inline bool operator<=(const simatrix& A, const imatrix& B) {
2268  return spf_mm_leq<simatrix,imatrix,interval>(A,B);
2269 }
2270 
2272 inline bool operator<=(const rmatrix& A, const simatrix& B) {
2273  return fsp_mm_leq<rmatrix,simatrix,interval>(A,B);
2274 }
2275 
2277 inline bool operator<=(const imatrix& A, const simatrix& B) {
2278  return fsp_mm_leq<imatrix,simatrix,interval>(A,B);
2279 }
2280 
2282 inline bool operator<=(const rmatrix_slice& A, const simatrix& B) {
2283  return fsp_mm_leq<rmatrix_slice,simatrix,interval>(A,B);
2284 }
2285 
2287 inline bool operator<=(const imatrix_slice& A, const simatrix& B) {
2288  return fsp_mm_leq<imatrix_slice,simatrix,interval>(A,B);
2289 }
2290 
2292 inline bool operator<=(const srmatrix& A, const imatrix_slice& B) {
2293  return spf_mm_leq<srmatrix,imatrix_slice,interval>(A,B);
2294 }
2295 
2297 inline bool operator<=(const simatrix& A, const imatrix_slice& B) {
2298  return spf_mm_leq<simatrix,imatrix_slice,interval>(A,B);
2299 }
2300 
2302 inline bool operator>(const simatrix& A, const srmatrix& B) {
2303  return spsp_mm_greater<simatrix,srmatrix,interval>(A,B);
2304 }
2305 
2307 inline bool operator>(const simatrix& A, const simatrix& B) {
2308  return spsp_mm_greater<simatrix,simatrix,interval>(A,B);
2309 }
2310 
2312 inline bool operator>(const simatrix& A, const rmatrix& B) {
2313  return spf_mm_greater<simatrix,rmatrix,interval>(A,B);
2314 }
2315 
2317 inline bool operator>(const simatrix& A, const imatrix& B) {
2318  return spf_mm_greater<simatrix,imatrix,interval>(A,B);
2319 }
2320 
2322 inline bool operator>(const imatrix& A, const srmatrix& B) {
2323  return fsp_mm_greater<imatrix,srmatrix,interval>(A,B);
2324 }
2325 
2327 inline bool operator>(const imatrix& A, const simatrix& B) {
2328  return fsp_mm_greater<imatrix,simatrix,interval>(A,B);
2329 }
2330 
2332 inline bool operator>(const imatrix_slice& A, const srmatrix& B) {
2333  return fsp_mm_greater<imatrix_slice,srmatrix,interval>(A,B);
2334 }
2335 
2337 inline bool operator>(const imatrix_slice& A, const simatrix& B) {
2338  return fsp_mm_greater<imatrix_slice,simatrix,interval>(A,B);
2339 }
2340 
2342 inline bool operator>(const simatrix& A, const rmatrix_slice& B) {
2343  return spf_mm_greater<simatrix,rmatrix_slice,interval>(A,B);
2344 }
2345 
2347 inline bool operator>(const simatrix& A, const imatrix_slice& B) {
2348  return spf_mm_greater<simatrix,imatrix_slice,interval>(A,B);
2349 }
2350 
2352 inline bool operator>=(const simatrix& A, const srmatrix& B) {
2353  return spsp_mm_geq<simatrix,srmatrix,interval>(A,B);
2354 }
2355 
2357 inline bool operator>=(const simatrix& A, const simatrix& B) {
2358  return spsp_mm_geq<simatrix,simatrix,interval>(A,B);
2359 }
2360 
2362 inline bool operator>=(const simatrix& A, const rmatrix& B) {
2363  return spf_mm_geq<simatrix,rmatrix,interval>(A,B);
2364 }
2365 
2367 inline bool operator>=(const simatrix& A, const imatrix& B) {
2368  return spf_mm_geq<simatrix,imatrix,interval>(A,B);
2369 }
2370 
2372 inline bool operator>=(const imatrix& A, const srmatrix& B) {
2373  return fsp_mm_geq<imatrix,srmatrix,interval>(A,B);
2374 }
2375 
2377 inline bool operator>=(const imatrix& A, const simatrix& B) {
2378  return fsp_mm_geq<imatrix,simatrix,interval>(A,B);
2379 }
2380 
2382 inline bool operator>=(const imatrix_slice& A, const srmatrix& B) {
2383  return fsp_mm_geq<imatrix_slice,srmatrix,interval>(A,B);
2384 }
2385 
2387 inline bool operator>=(const imatrix_slice& A, const simatrix& B) {
2388  return fsp_mm_geq<imatrix_slice,simatrix,interval>(A,B);
2389 }
2390 
2392 inline bool operator>=(const simatrix& A, const rmatrix_slice& B) {
2393  return spf_mm_geq<simatrix,rmatrix_slice,interval>(A,B);
2394 }
2395 
2397 inline bool operator>=(const simatrix& A, const imatrix_slice& B) {
2398  return spf_mm_geq<simatrix,imatrix_slice,interval>(A,B);
2399 }
2400 
2402 inline bool operator!(const simatrix& A) {
2403  return sp_m_not(A);
2404 }
2405 
2407 
2412 inline std::ostream& operator<<(std::ostream& os, const simatrix& A) {
2413  return sp_m_output<simatrix,interval>(os,A);
2414 }
2415 
2417 
2422 inline std::istream& operator>>(std::istream& is, simatrix& A) {
2423  return sp_m_input<simatrix,interval>(is,A);
2424 }
2425 
2427 
2432  public:
2433  simatrix A;
2434  simatrix* M; //Originalmatrix
2435 
2436  private:
2437  simatrix_slice(simatrix& Mat, int sl1l, int sl1u, int sl2l, int sl2u) {
2438  A.lb1 = sl1l;
2439  A.lb2 = sl2l;
2440  A.ub1 = sl1u;
2441  A.ub2 = sl2u;
2442  A.m = sl1u-sl1l+1;
2443  A.n = sl2u-sl2l+1;
2444 
2445  //Kopieren der Werte aus A
2446  A.p = std::vector<int>(A.n+1, 0);
2447  A.ind.reserve(A.m + A.n);
2448  A.x.reserve(A.m + A.n);
2449 
2450  for(int i=0 ; i<A.n ; i++) {
2451  A.p[i+1] = A.p[i];
2452  for(int j=Mat.p[sl2l-Mat.lb2+i] ; j<Mat.p[sl2l-Mat.lb2+i+1] ; j++) {
2453  if(Mat.ind[j] >= sl1l-Mat.lb1 && Mat.ind[j] <= sl1u-Mat.lb1) {
2454  A.ind.push_back(Mat.ind[j]-(sl1l-Mat.lb1));
2455  A.x.push_back(Mat.x[j]);
2456  A.p[i+1]++;
2457  }
2458  }
2459  }
2460 
2461  //Zeiger auf A fuer Datenmanipulationen
2462  M = &Mat;
2463  }
2464 
2465  simatrix_slice(const simatrix& Mat, int sl1l, int sl1u, int sl2l, int sl2u) {
2466  A.lb1 = sl1l;
2467  A.lb2 = sl2l;
2468  A.ub1 = sl1u;
2469  A.ub2 = sl2u;
2470  A.m = sl1u-sl1l+1;
2471  A.n = sl2u-sl2l+1;
2472 
2473  //Kopieren der Werte aus A
2474  A.p = std::vector<int>(A.n+1, 0);
2475  A.ind.reserve(A.m + A.n);
2476  A.x.reserve(A.m + A.n);
2477 
2478  for(int i=0 ; i<A.n ; i++) {
2479  A.p[i+1] = A.p[i];
2480  for(int j=Mat.p[sl2l-Mat.lb2+i] ; j<Mat.p[sl2l-Mat.lb2+i+1] ; j++) {
2481  if(Mat.ind[j] >= sl1l-Mat.lb1 && Mat.ind[j] <= sl1u-Mat.lb1) {
2482  A.ind.push_back(Mat.ind[j]-(sl1l-Mat.lb1));
2483  A.x.push_back(Mat.x[j]);
2484  A.p[i+1]++;
2485  }
2486  }
2487  }
2488 
2489  //Zeiger auf A fuer Datenmanipulationen
2490  M = const_cast<simatrix*>(&Mat); //Vorgehen noetig um Schreibweise A[i][j] bei auslesen von const A zu ermoeglichen
2491  }
2492 
2493 
2494  public:
2497  return sl_ms_assign<simatrix_slice, real, std::vector<interval>::iterator, interval>(*this,C);
2498  }
2499 
2502  return sl_ms_assign<simatrix_slice, interval, std::vector<interval>::iterator, interval>(*this,C);
2503  }
2504 
2507  return slsp_mm_assign<simatrix_slice, srmatrix, std::vector<interval>::iterator>(*this,C);
2508  }
2509 
2512  return slsp_mm_assign<simatrix_slice, simatrix, std::vector<interval>::iterator>(*this,C);
2513  }
2514 
2517  return slf_mm_assign<simatrix_slice, rmatrix, std::vector<interval>::iterator, interval>(*this,C);
2518  }
2519 
2522  return slf_mm_assign<simatrix_slice, imatrix, std::vector<interval>::iterator, interval>(*this,C);
2523  }
2524 
2527  return slf_mm_assign<simatrix_slice, rmatrix_slice, std::vector<interval>::iterator, interval>(*this,C);
2528  }
2529 
2532  return slf_mm_assign<simatrix_slice, imatrix_slice, std::vector<interval>::iterator, interval>(*this,C);
2533  }
2534 
2537  *this = C.A;
2538  return *this;
2539  }
2540 
2543  *this = C.A;
2544  return *this;
2545  }
2546 
2549  *this = A*M.A;
2550  return *this;
2551  }
2552 
2555  *this = A*M.A;
2556  return *this;
2557  }
2558 
2561  *this = A*M;
2562  return *this;
2563  }
2564 
2567  *this = A*M;
2568  return *this;
2569  }
2570 
2573  *this = A*M;
2574  return *this;
2575  }
2576 
2579  *this = A*M;
2580  return *this;
2581  }
2582 
2585  *this = A*M;
2586  return *this;
2587  }
2588 
2591  *this = A*M;
2592  return *this;
2593  }
2594 
2597  *this = A*r;
2598  return *this;
2599  }
2600 
2603  *this = A*r;
2604  return *this;
2605  }
2606 
2609  *this = A/r;
2610  return *this;
2611  }
2612 
2615  *this = A/r;
2616  return *this;
2617  }
2618 
2621  *this = A+M.A;
2622  return *this;
2623  }
2624 
2627  *this = A+M.A;
2628  return *this;
2629  }
2630 
2633  *this = A+M;
2634  return *this;
2635  }
2636 
2639  *this = A+M;
2640  return *this;
2641  }
2642 
2645  *this = A+M;
2646  return *this;
2647  }
2648 
2651  *this = A+M;
2652  return *this;
2653  }
2654 
2657  *this = A+M;
2658  return *this;
2659  }
2660 
2663  *this = A+M;
2664  return *this;
2665  }
2666 
2669  *this = A-M.A;
2670  return *this;
2671  }
2672 
2675  *this = A-M.A;
2676  return *this;
2677  }
2678 
2681  *this = A-M;
2682  return *this;
2683  }
2684 
2687  *this = A-M;
2688  return *this;
2689  }
2690 
2693  *this = A-M;
2694  return *this;
2695  }
2696 
2699  *this = A-M;
2700  return *this;
2701  }
2702 
2705  *this = A-M;
2706  return *this;
2707  }
2708 
2711  *this = A-M;
2712  return *this;
2713  }
2714 
2717  *this = A|M.A;
2718  return *this;
2719  }
2720 
2723  *this = A|M.A;
2724  return *this;
2725  }
2726 
2729  *this = A|M;
2730  return *this;
2731  }
2732 
2735  *this = A|M;
2736  return *this;
2737  }
2738 
2741  *this = A|M;
2742  return *this;
2743  }
2744 
2747  *this = A|M;
2748  return *this;
2749  }
2750 
2753  *this = A|M;
2754  return *this;
2755  }
2756 
2759  *this = A|M;
2760  return *this;
2761  }
2762 
2764 
2768  const interval operator()(const int i, const int j) const {
2769 #if(CXSC_INDEX_CHECK)
2770  if(i<A.lb1 || i>A.ub1 || j<A.lb2 || j>A.ub2)
2771  cxscthrow(ELEMENT_NOT_IN_VEC("simatrix_slice::operator()(int, int)"));
2772 #endif
2773  interval r = A(i,j);
2774  return r;
2775  }
2776 
2778 
2782  interval& element(const int i, const int j) {
2783 #if(CXSC_INDEX_CHECK)
2784  if(i<A.lb1 || i>A.ub1 || j<A.lb2 || j>A.ub2)
2785  cxscthrow(ELEMENT_NOT_IN_VEC("simatrix_slice::element(int, int)"));
2786 #endif
2787  return M->element(i,j);
2788  }
2789 
2791  simatrix_subv operator[](const int);
2793  simatrix_subv operator[](const cxscmatrix_column&);
2795  const simatrix_subv operator[](const int) const;
2797  const simatrix_subv operator[](const cxscmatrix_column&) const;
2798 
2799  friend std::ostream& operator<<(std::ostream&, const simatrix_slice&);
2800 
2801  friend int Lb(const simatrix_slice&, const int);
2802  friend int Ub(const simatrix_slice&, const int);
2803  friend srmatrix Inf(const simatrix_slice&);
2804  friend srmatrix Sup(const simatrix_slice&);
2805  friend simatrix abs(const simatrix_slice&);
2806  friend srmatrix mid(const simatrix_slice&);
2807  friend srmatrix diam(const simatrix_slice&);
2808  friend int RowLen(const simatrix_slice&);
2809  friend int ColLen(const simatrix_slice&);
2810 
2811  friend class srmatrix;
2812  friend class srmatrix_subv;
2813  friend class srvector;
2814  friend class simatrix;
2815  friend class simatrix_subv;
2816  friend class sivector;
2817  friend class scimatrix;
2818  friend class scimatrix_subv;
2819  friend class scimatrix_slice;
2820  friend class scivector;
2821  friend class imatrix;
2822  friend class cimatrix;
2823 
2824 
2825 #include "matrix_friend_declarations.inl"
2826 };
2827 
2829  dat = new interval[A.A.m*A.A.n];
2830  lb1 = A.A.lb1; lb2 = A.A.lb2; ub1 = A.A.ub1; ub2 = A.A.ub2;
2831  xsize = A.A.n;
2832  ysize = A.A.m;
2833  *this = 0.0;
2834  for(int j=0 ; j<A.A.n ; j++) {
2835  for(int k=A.A.p[j] ; k<A.A.p[j+1] ; k++) {
2836  dat[A.A.ind[k]*A.A.n+j] = A.A.x[k];
2837  }
2838  }
2839 }
2840 
2842  dat = new interval[A.A.m*A.A.n];
2843  lb1 = A.A.lb1; lb2 = A.A.lb2; ub1 = A.A.ub1; ub2 = A.A.ub2;
2844  xsize = A.A.n;
2845  ysize = A.A.m;
2846  *this = 0.0;
2847  for(int j=0 ; j<A.A.n ; j++) {
2848  for(int k=A.A.p[j] ; k<A.A.p[j+1] ; k++) {
2849  dat[A.A.ind[k]*A.A.n+j] = A.A.x[k];
2850  }
2851  }
2852 }
2853 
2855 inline int RowLen(const simatrix_slice& S) {
2856  return RowLen(S.A);
2857 }
2858 
2860 inline int ColLen(const simatrix_slice& S) {
2861  return ColLen(S.A);
2862 }
2863 
2864 inline simatrix_slice simatrix::operator()(const int i, const int j, const int k, const int l) {
2865 #if(CXSC_INDEX_CHECK)
2866  if(i<lb1 || j>ub1 || k<lb2 || l>ub2)
2867  cxscthrow(ROW_OR_COL_NOT_IN_MAT("simatrix::operator()(int, int, int, int)"));
2868 #endif
2869  return simatrix_slice(*this, i, j, k, l);
2870 }
2871 
2872 inline const simatrix_slice simatrix::operator()(const int i, const int j, const int k, const int l) const {
2873 #if(CXSC_INDEX_CHECK)
2874  if(i<lb1 || j>ub1 || k<lb2 || l>ub2)
2875  cxscthrow(ROW_OR_COL_NOT_IN_MAT("simatrix::operator()(int, int, int, int) const"));
2876 #endif
2877  return simatrix_slice(*this, i, j, k, l);
2878 }
2879 
2881 inline int Lb(const simatrix_slice& S, const int i) {
2882  return Lb(S.A, i);
2883 }
2884 
2886 inline int Ub(const simatrix_slice& S, const int i) {
2887  return Ub(S.A, i);
2888 }
2889 
2891 inline srmatrix Inf(const simatrix_slice& S) {
2892  return Inf(S.A);
2893 }
2894 
2896 inline srmatrix Sup(const simatrix_slice& S) {
2897  return Sup(S.A);
2898 }
2899 
2901 inline simatrix abs(const simatrix_slice& S) {
2902  return abs(S.A);
2903 }
2904 
2906 inline srmatrix mid(const simatrix_slice& S) {
2907  return mid(S.A);
2908 }
2909 
2911 inline srmatrix diam(const simatrix_slice& S) {
2912  return diam(S.A);
2913 }
2914 
2916  m = S.A.m;
2917  n = S.A.n;
2918  lb1 = S.A.lb1;
2919  ub1 = S.A.ub1;
2920  lb2 = S.A.lb2;
2921  ub2 = S.A.ub2;
2922  *this = S.A;
2923 }
2924 
2926  m = S.A.m;
2927  n = S.A.n;
2928  lb1 = S.A.lb1;
2929  ub1 = S.A.ub1;
2930  lb2 = S.A.lb2;
2931  ub2 = S.A.ub2;
2932  *this = S.A;
2933 }
2934 
2936  *this = S.A;
2937  return *this;
2938 }
2939 
2941  *this = S.A;
2942  return *this;
2943 }
2944 
2946  *this = rmatrix(M);
2947  return *this;
2948 }
2949 
2951  *this = imatrix(M);
2952  return *this;
2953 }
2954 
2956  *this += M.A;
2957  return *this;
2958 }
2959 
2961  *this += M.A;
2962  return *this;
2963 }
2964 
2966  *this += M.A;
2967  return *this;
2968 }
2969 
2971  *this += M.A;
2972  return *this;
2973 }
2974 
2976  *this -= M.A;
2977  return *this;
2978 }
2979 
2981  *this -= M.A;
2982  return *this;
2983 }
2984 
2986  *this -= M.A;
2987  return *this;
2988 }
2989 
2991  *this -= M.A;
2992  return *this;
2993 }
2994 
2996  *this *= M.A;
2997  return *this;
2998 }
2999 
3001  *this *= M.A;
3002  return *this;
3003 }
3004 
3006  *this *= M.A;
3007  return *this;
3008 }
3009 
3011  *this *= M.A;
3012  return *this;
3013 }
3014 
3016  *this |= M.A;
3017  return *this;
3018 }
3019 
3021  *this |= M.A;
3022  return *this;
3023 }
3024 
3026  *this |= M.A;
3027  return *this;
3028 }
3029 
3031  *this |= M.A;
3032  return *this;
3033 }
3034 
3036  *this &= M.A;
3037  return *this;
3038 }
3039 
3041  *this &= M.A;
3042  return *this;
3043 }
3044 
3046  *this &= M.A;
3047  return *this;
3048 }
3049 
3051  *this &= M.A;
3052  return *this;
3053 }
3054 
3056 inline simatrix operator-(const simatrix_slice& M) {
3057  return sp_m_negative<simatrix,simatrix>(M.A);
3058 }
3059 
3061 inline simatrix operator+(const simatrix_slice& M) {
3062  return M.A;
3063 }
3064 
3066 
3072 inline simatrix operator*(const simatrix_slice& M1, const srmatrix_slice& M2) {
3073  return spsp_mm_mult<simatrix,srmatrix,simatrix,sparse_idot,interval>(M1.A,M2.A);
3074 }
3075 
3077 
3083 inline simatrix operator*(const srmatrix_slice& M1, const simatrix_slice& M2) {
3084  return spsp_mm_mult<srmatrix,simatrix,simatrix,sparse_idot,interval>(M1.A,M2.A);
3085 }
3086 
3088 
3094 inline simatrix operator*(const simatrix_slice& M1, const simatrix_slice& M2) {
3095  return spsp_mm_mult<simatrix,simatrix,simatrix,sparse_idot,interval>(M1.A,M2.A);
3096 }
3097 
3099 
3105 inline simatrix operator*(const simatrix_slice& M1, const srmatrix& M2) {
3106  return spsp_mm_mult<simatrix,srmatrix,simatrix,sparse_idot,interval>(M1.A,M2);
3107 }
3108 
3110 
3116 inline simatrix operator*(const srmatrix_slice& M1, const simatrix& M2) {
3117  return spsp_mm_mult<srmatrix,simatrix,simatrix,sparse_idot,interval>(M1.A,M2);
3118 }
3119 
3121 
3127 inline simatrix operator*(const simatrix_slice& M1, const simatrix& M2) {
3128  return spsp_mm_mult<simatrix,simatrix,simatrix,sparse_idot,interval>(M1.A,M2);
3129 }
3130 
3132 
3138 inline simatrix operator*(const simatrix& M1, const srmatrix_slice& M2) {
3139  return spsp_mm_mult<simatrix,srmatrix,simatrix,sparse_idot,interval>(M1,M2.A);
3140 }
3141 
3143 
3149 inline simatrix operator*(const srmatrix& M1, const simatrix_slice& M2) {
3150  return spsp_mm_mult<srmatrix,simatrix,simatrix,sparse_idot,interval>(M1,M2.A);
3151 }
3152 
3154 
3160 inline simatrix operator*(const simatrix& M1, const simatrix_slice& M2) {
3161  return spsp_mm_mult<simatrix,simatrix,simatrix,sparse_idot,interval>(M1,M2.A);
3162 }
3163 
3165 
3171 inline imatrix operator*(const simatrix_slice& M1, const rmatrix& M2) {
3172  return spf_mm_mult<simatrix,rmatrix,imatrix,sparse_idot>(M1.A,M2);
3173 }
3174 
3176 
3182 inline imatrix operator*(const srmatrix_slice& M1, const imatrix& M2) {
3183  return spf_mm_mult<srmatrix,imatrix,imatrix,sparse_idot>(M1.A,M2);
3184 }
3185 
3187 
3193 inline imatrix operator*(const simatrix_slice& M1, const imatrix& M2) {
3194  return spf_mm_mult<simatrix,imatrix,imatrix,sparse_idot>(M1.A,M2);
3195 }
3196 
3198 
3204 inline imatrix operator*(const imatrix& M1, const srmatrix_slice& M2) {
3205  return fsp_mm_mult<imatrix,srmatrix,imatrix,sparse_idot>(M1,M2.A);
3206 }
3207 
3209 
3215 inline imatrix operator*(const rmatrix& M1, const simatrix_slice& M2) {
3216  return fsp_mm_mult<rmatrix,simatrix,imatrix,sparse_idot>(M1,M2.A);
3217 }
3218 
3220 
3226 inline imatrix operator*(const imatrix& M1, const simatrix_slice& M2) {
3227  return fsp_mm_mult<imatrix,simatrix,imatrix,sparse_idot>(M1,M2.A);
3228 }
3229 
3231 
3237 inline imatrix operator*(const simatrix_slice& M1, const rmatrix_slice& M2) {
3238  return spf_mm_mult<simatrix,rmatrix_slice,imatrix,sparse_idot>(M1.A,M2);
3239 }
3240 
3242 
3248 inline imatrix operator*(const srmatrix_slice& M1, const imatrix_slice& M2) {
3249  return spf_mm_mult<srmatrix,imatrix_slice,imatrix,sparse_idot>(M1.A,M2);
3250 }
3251 
3253 
3259 inline imatrix operator*(const simatrix_slice& M1, const imatrix_slice& M2) {
3260  return spf_mm_mult<simatrix,imatrix_slice,imatrix,sparse_idot>(M1.A,M2);
3261 }
3262 
3264 
3270 inline imatrix operator*(const imatrix_slice& M1, const srmatrix_slice& M2) {
3271  return fsp_mm_mult<imatrix,srmatrix,imatrix,sparse_idot>(M1,M2.A);
3272 }
3273 
3275 
3281 inline imatrix operator*(const rmatrix_slice& M1, const simatrix_slice& M2) {
3282  return fsp_mm_mult<rmatrix,simatrix,imatrix,sparse_idot>(M1,M2.A);
3283 }
3284 
3286 
3292 inline imatrix operator*(const imatrix_slice& M1, const simatrix_slice& M2) {
3293  return fsp_mm_mult<imatrix,simatrix,imatrix,sparse_idot>(M1,M2.A);
3294 }
3295 
3297 
3303 inline sivector operator*(const simatrix_slice& M, const srvector& v) {
3304  return spsp_mv_mult<simatrix,srvector,sivector,sparse_idot,interval>(M.A,v);
3305 }
3306 
3308 
3314 inline sivector operator*(const srmatrix_slice& M, const sivector& v) {
3315  return spsp_mv_mult<srmatrix,sivector,sivector,sparse_idot,interval>(M.A,v);
3316 }
3317 
3319 
3325 inline sivector operator*(const simatrix_slice& M, const sivector& v) {
3326  return spsp_mv_mult<simatrix,sivector,sivector,sparse_idot,interval>(M.A,v);
3327 }
3328 
3330 
3336 inline sivector operator*(const simatrix_slice& M, const srvector_slice& v) {
3337  return spsl_mv_mult<simatrix,srvector_slice,sivector,sparse_idot,interval>(M.A,v);
3338 }
3339 
3341 
3347 inline sivector operator*(const srmatrix_slice& M, const sivector_slice& v) {
3348  return spsl_mv_mult<srmatrix,sivector_slice,sivector,sparse_idot,interval>(M.A,v);
3349 }
3350 
3352 
3358 inline sivector operator*(const simatrix_slice& M, const sivector_slice& v) {
3359  return spsl_mv_mult<simatrix,sivector_slice,sivector,sparse_idot,interval>(M.A,v);
3360 }
3361 
3363 
3369 inline ivector operator*(const simatrix_slice& M, const rvector& v) {
3370  return spf_mv_mult<simatrix,rvector,ivector,sparse_idot>(M.A,v);
3371 }
3372 
3374 
3380 inline ivector operator*(const srmatrix_slice& M, const ivector& v) {
3381  return spf_mv_mult<srmatrix,ivector,ivector,sparse_idot>(M.A,v);
3382 }
3383 
3385 
3391 inline ivector operator*(const simatrix_slice& M, const ivector& v) {
3392  return spf_mv_mult<simatrix,ivector,ivector,sparse_idot>(M.A,v);
3393 }
3394 
3396 
3402 inline ivector operator*(const simatrix_slice& M, const rvector_slice& v) {
3403  return spf_mv_mult<simatrix,rvector_slice,ivector,sparse_idot>(M.A,v);
3404 }
3405 
3407 
3413 inline ivector operator*(const srmatrix_slice& M, const ivector_slice& v) {
3414  return spf_mv_mult<srmatrix,ivector_slice,ivector,sparse_idot>(M.A,v);
3415 }
3416 
3418 
3424 inline ivector operator*(const simatrix_slice& M, const ivector_slice& v) {
3425  return spf_mv_mult<simatrix,ivector_slice,ivector,sparse_idot>(M.A,v);
3426 }
3427 
3429 inline simatrix operator/(const simatrix_slice& M, const real& r) {
3430  return sp_ms_div<simatrix,real,simatrix>(M.A,r);
3431 }
3432 
3434 inline simatrix operator/(const simatrix_slice& M, const interval& r) {
3435  return sp_ms_div<simatrix,interval,simatrix>(M.A,r);
3436 }
3437 
3439 inline simatrix operator/(const srmatrix_slice& M, const interval& r) {
3440  return sp_ms_div<srmatrix,interval,simatrix>(M.A,r);
3441 }
3442 
3444 inline simatrix operator*(const simatrix_slice& M, const real& r) {
3445  return sp_ms_mult<simatrix,real,simatrix>(M.A,r);
3446 }
3447 
3449 inline simatrix operator*(const simatrix_slice& M, const interval& r) {
3450  return sp_ms_mult<simatrix,interval,simatrix>(M.A,r);
3451 }
3452 
3454 inline simatrix operator*(const srmatrix_slice& M, const interval& r) {
3455  return sp_ms_mult<srmatrix,interval,simatrix>(M.A,r);
3456 }
3457 
3459 inline simatrix operator*(const real& r, const simatrix_slice& M) {
3460  return sp_sm_mult<real,simatrix,simatrix>(r,M.A);
3461 }
3462 
3464 inline simatrix operator*(const interval& r, const srmatrix_slice& M) {
3465  return sp_sm_mult<interval,srmatrix,simatrix>(r,M.A);
3466 }
3467 
3469 inline simatrix operator*(const interval& r, const simatrix_slice& M) {
3470  return sp_sm_mult<interval,simatrix,simatrix>(r,M.A);
3471 }
3472 
3474 inline simatrix operator+(const simatrix_slice& M1, const srmatrix_slice& M2) {
3475  return spsp_mm_add<simatrix,srmatrix,simatrix,interval>(M1.A,M2.A);
3476 }
3477 
3479 inline simatrix operator+(const srmatrix_slice& M1, const simatrix_slice& M2) {
3480  return spsp_mm_add<srmatrix,simatrix,simatrix,interval>(M1.A,M2.A);
3481 }
3482 
3484 inline simatrix operator+(const simatrix_slice& M1, const simatrix_slice& M2) {
3485  return spsp_mm_add<simatrix,simatrix,simatrix,interval>(M1.A,M2.A);
3486 }
3487 
3489 inline simatrix operator+(const simatrix_slice& M1, const srmatrix& M2) {
3490  return spsp_mm_add<simatrix,srmatrix,simatrix,interval>(M1.A,M2);
3491 }
3492 
3494 inline simatrix operator+(const srmatrix_slice& M1, const simatrix& M2) {
3495  return spsp_mm_add<srmatrix,simatrix,simatrix,interval>(M1.A,M2);
3496 }
3497 
3499 inline simatrix operator+(const simatrix_slice& M1, const simatrix& M2) {
3500  return spsp_mm_add<simatrix,simatrix,simatrix,interval>(M1.A,M2);
3501 }
3502 
3504 inline simatrix operator+(const simatrix& M1, const srmatrix_slice& M2) {
3505  return spsp_mm_add<simatrix,srmatrix,simatrix,interval>(M1,M2.A);
3506 }
3507 
3509 inline simatrix operator+(const srmatrix& M1, const simatrix_slice& M2) {
3510  return spsp_mm_add<srmatrix,simatrix,simatrix,interval>(M1,M2.A);
3511 }
3512 
3514 inline simatrix operator+(const simatrix& M1, const simatrix_slice& M2) {
3515  return spsp_mm_add<simatrix,simatrix,simatrix,interval>(M1,M2.A);
3516 }
3517 
3519 inline imatrix operator+(const simatrix_slice& M1, const rmatrix& M2) {
3520  return spf_mm_add<simatrix,rmatrix,imatrix>(M1.A,M2);
3521 }
3522 
3524 inline imatrix operator+(const srmatrix_slice& M1, const imatrix& M2) {
3525  return spf_mm_add<srmatrix,imatrix,imatrix>(M1.A,M2);
3526 }
3527 
3529 inline imatrix operator+(const simatrix_slice& M1, const imatrix& M2) {
3530  return spf_mm_add<simatrix,imatrix,imatrix>(M1.A,M2);
3531 }
3532 
3534 inline imatrix operator+(const imatrix& M1, const srmatrix_slice& M2) {
3535  return fsp_mm_add<imatrix,srmatrix,imatrix>(M1,M2.A);
3536 }
3537 
3539 inline imatrix operator+(const rmatrix& M1, const simatrix_slice& M2) {
3540  return fsp_mm_add<rmatrix,simatrix,imatrix>(M1,M2.A);
3541 }
3542 
3544 inline imatrix operator+(const imatrix& M1, const simatrix_slice& M2) {
3545  return fsp_mm_add<imatrix,simatrix,imatrix>(M1,M2.A);
3546 }
3547 
3549 inline imatrix operator+(const simatrix_slice& M1, const rmatrix_slice& M2) {
3550  return spf_mm_add<simatrix,rmatrix_slice,imatrix>(M1.A,M2);
3551 }
3552 
3554 inline imatrix operator+(const srmatrix_slice& M1, const imatrix_slice& M2) {
3555  return spf_mm_add<srmatrix,imatrix_slice,imatrix>(M1.A,M2);
3556 }
3557 
3559 inline imatrix operator+(const simatrix_slice& M1, const imatrix_slice& M2) {
3560  return spf_mm_add<simatrix,imatrix_slice,imatrix>(M1.A,M2);
3561 }
3562 
3564 inline imatrix operator+(const imatrix_slice& M1, const srmatrix_slice& M2) {
3565  return fsp_mm_add<imatrix_slice,srmatrix,imatrix>(M1,M2.A);
3566 }
3567 
3569 inline imatrix operator+(const rmatrix_slice& M1, const simatrix_slice& M2) {
3570  return fsp_mm_add<rmatrix_slice,simatrix,imatrix>(M1,M2.A);
3571 }
3572 
3574 inline imatrix operator+(const imatrix_slice& M1, const simatrix_slice& M2) {
3575  return fsp_mm_add<imatrix_slice,simatrix,imatrix>(M1,M2.A);
3576 }
3577 
3579 inline simatrix operator-(const simatrix_slice& M1, const srmatrix_slice& M2) {
3580  return spsp_mm_sub<simatrix,srmatrix,simatrix,interval>(M1.A,M2.A);
3581 }
3582 
3584 inline simatrix operator-(const srmatrix_slice& M1, const simatrix_slice& M2) {
3585  return spsp_mm_sub<srmatrix,simatrix,simatrix,interval>(M1.A,M2.A);
3586 }
3587 
3589 inline simatrix operator-(const simatrix_slice& M1, const simatrix_slice& M2) {
3590  return spsp_mm_sub<simatrix,simatrix,simatrix,interval>(M1.A,M2.A);
3591 }
3592 
3594 inline simatrix operator-(const simatrix_slice& M1, const srmatrix& M2) {
3595  return spsp_mm_sub<simatrix,srmatrix,simatrix,interval>(M1.A,M2);
3596 }
3597 
3599 inline simatrix operator-(const srmatrix_slice& M1, const simatrix& M2) {
3600  return spsp_mm_sub<srmatrix,simatrix,simatrix,interval>(M1.A,M2);
3601 }
3602 
3604 inline simatrix operator-(const simatrix_slice& M1, const simatrix& M2) {
3605  return spsp_mm_sub<simatrix,simatrix,simatrix,interval>(M1.A,M2);
3606 }
3607 
3609 inline simatrix operator-(const simatrix& M1, const srmatrix_slice& M2) {
3610  return spsp_mm_sub<simatrix,srmatrix,simatrix,interval>(M1,M2.A);
3611 }
3612 
3614 inline simatrix operator-(const srmatrix& M1, const simatrix_slice& M2) {
3615  return spsp_mm_sub<srmatrix,simatrix,simatrix,interval>(M1,M2.A);
3616 }
3617 
3619 inline simatrix operator-(const simatrix& M1, const simatrix_slice& M2) {
3620  return spsp_mm_sub<simatrix,simatrix,simatrix,interval>(M1,M2.A);
3621 }
3622 
3624 inline imatrix operator-(const simatrix_slice& M1, const rmatrix& M2) {
3625  return spf_mm_sub<simatrix,rmatrix,imatrix>(M1.A,M2);
3626 }
3627 
3629 inline imatrix operator-(const srmatrix_slice& M1, const imatrix& M2) {
3630  return spf_mm_sub<srmatrix,imatrix,imatrix>(M1.A,M2);
3631 }
3632 
3634 inline imatrix operator-(const simatrix_slice& M1, const imatrix& M2) {
3635  return spf_mm_sub<simatrix,imatrix,imatrix>(M1.A,M2);
3636 }
3637 
3639 inline imatrix operator-(const imatrix& M1, const srmatrix_slice& M2) {
3640  return fsp_mm_sub<imatrix,srmatrix,imatrix>(M1,M2.A);
3641 }
3642 
3644 inline imatrix operator-(const rmatrix& M1, const simatrix_slice& M2) {
3645  return fsp_mm_sub<rmatrix,simatrix,imatrix>(M1,M2.A);
3646 }
3647 
3649 inline imatrix operator-(const imatrix& M1, const simatrix_slice& M2) {
3650  return fsp_mm_sub<imatrix,simatrix,imatrix>(M1,M2.A);
3651 }
3652 
3654 inline imatrix operator-(const simatrix_slice& M1, const rmatrix_slice& M2) {
3655  return spf_mm_sub<simatrix,rmatrix_slice,imatrix>(M1.A,M2);
3656 }
3657 
3659 inline imatrix operator-(const srmatrix_slice& M1, const imatrix_slice& M2) {
3660  return spf_mm_sub<srmatrix,imatrix_slice,imatrix>(M1.A,M2);
3661 }
3662 
3664 inline imatrix operator-(const simatrix_slice& M1, const imatrix_slice& M2) {
3665  return spf_mm_sub<simatrix,imatrix_slice,imatrix>(M1.A,M2);
3666 }
3667 
3669 inline imatrix operator-(const imatrix_slice& M1, const srmatrix_slice& M2) {
3670  return fsp_mm_sub<imatrix_slice,srmatrix,imatrix>(M1,M2.A);
3671 }
3672 
3674 inline imatrix operator-(const rmatrix_slice& M1, const simatrix_slice& M2) {
3675  return fsp_mm_sub<rmatrix_slice,simatrix,imatrix>(M1,M2.A);
3676 }
3677 
3679 inline imatrix operator-(const imatrix_slice& M1, const simatrix_slice& M2) {
3680  return fsp_mm_sub<imatrix_slice,simatrix,imatrix>(M1,M2.A);
3681 }
3682 
3684 inline simatrix operator|(const simatrix_slice& M1, const srmatrix_slice& M2) {
3685  return spsp_mm_hull<simatrix,srmatrix,simatrix,interval>(M1.A,M2.A);
3686 }
3687 
3689 inline simatrix operator|(const srmatrix_slice& M1, const simatrix_slice& M2) {
3690  return spsp_mm_hull<srmatrix,simatrix,simatrix,interval>(M1.A,M2.A);
3691 }
3692 
3694 inline simatrix operator|(const simatrix_slice& M1, const simatrix_slice& M2) {
3695  return spsp_mm_hull<simatrix,simatrix,simatrix,interval>(M1.A,M2.A);
3696 }
3697 
3699 inline simatrix operator|(const simatrix_slice& M1, const srmatrix& M2) {
3700  return spsp_mm_hull<simatrix,srmatrix,simatrix,interval>(M1.A,M2);
3701 }
3702 
3704 inline simatrix operator|(const srmatrix_slice& M1, const simatrix& M2) {
3705  return spsp_mm_hull<srmatrix,simatrix,simatrix,interval>(M1.A,M2);
3706 }
3707 
3709 inline simatrix operator|(const simatrix_slice& M1, const simatrix& M2) {
3710  return spsp_mm_hull<simatrix,simatrix,simatrix,interval>(M1.A,M2);
3711 }
3712 
3714 inline simatrix operator|(const simatrix& M1, const srmatrix_slice& M2) {
3715  return spsp_mm_hull<simatrix,srmatrix,simatrix,interval>(M1,M2.A);
3716 }
3717 
3719 inline simatrix operator|(const srmatrix& M1, const simatrix_slice& M2) {
3720  return spsp_mm_hull<srmatrix,simatrix,simatrix,interval>(M1,M2.A);
3721 }
3722 
3724 inline simatrix operator|(const simatrix& M1, const simatrix_slice& M2) {
3725  return spsp_mm_hull<simatrix,simatrix,simatrix,interval>(M1,M2.A);
3726 }
3727 
3729 inline imatrix operator|(const simatrix_slice& M1, const rmatrix& M2) {
3730  return spf_mm_hull<simatrix,rmatrix,imatrix>(M1.A,M2);
3731 }
3732 
3734 inline imatrix operator|(const srmatrix_slice& M1, const imatrix& M2) {
3735  return spf_mm_hull<srmatrix,imatrix,imatrix>(M1.A,M2);
3736 }
3737 
3739 inline imatrix operator|(const simatrix_slice& M1, const imatrix& M2) {
3740  return spf_mm_hull<simatrix,imatrix,imatrix>(M1.A,M2);
3741 }
3742 
3744 inline imatrix operator|(const imatrix& M1, const srmatrix_slice& M2) {
3745  return fsp_mm_hull<imatrix,srmatrix,imatrix>(M1,M2.A);
3746 }
3747 
3749 inline imatrix operator|(const rmatrix& M1, const simatrix_slice& M2) {
3750  return fsp_mm_hull<rmatrix,simatrix,imatrix>(M1,M2.A);
3751 }
3752 
3754 inline imatrix operator|(const imatrix& M1, const simatrix_slice& M2) {
3755  return fsp_mm_hull<imatrix,simatrix,imatrix>(M1,M2.A);
3756 }
3757 
3759 inline imatrix operator|(const simatrix_slice& M1, const rmatrix_slice& M2) {
3760  return spf_mm_hull<simatrix,rmatrix_slice,imatrix>(M1.A,M2);
3761 }
3762 
3764 inline imatrix operator|(const srmatrix_slice& M1, const imatrix_slice& M2) {
3765  return spf_mm_hull<srmatrix,imatrix_slice,imatrix>(M1.A,M2);
3766 }
3767 
3769 inline imatrix operator|(const simatrix_slice& M1, const imatrix_slice& M2) {
3770  return spf_mm_hull<simatrix,imatrix_slice,imatrix>(M1.A,M2);
3771 }
3772 
3774 inline imatrix operator|(const imatrix_slice& M1, const srmatrix_slice& M2) {
3775  return fsp_mm_hull<imatrix_slice,srmatrix,imatrix>(M1,M2.A);
3776 }
3777 
3779 inline imatrix operator|(const rmatrix_slice& M1, const simatrix_slice& M2) {
3780  return fsp_mm_hull<rmatrix_slice,simatrix,imatrix>(M1,M2.A);
3781 }
3782 
3784 inline imatrix operator|(const imatrix_slice& M1, const simatrix_slice& M2) {
3785  return fsp_mm_hull<imatrix_slice,simatrix,imatrix>(M1,M2.A);
3786 }
3787 
3789 inline simatrix operator|(const srmatrix_slice& M1, const srmatrix_slice& M2) {
3790  return spsp_mm_hull<srmatrix,srmatrix,simatrix,interval>(M1.A,M2.A);
3791 }
3792 
3794 inline simatrix operator|(const srmatrix_slice& M1, const srmatrix& M2) {
3795  return spsp_mm_hull<srmatrix,srmatrix,simatrix,interval>(M1.A,M2);
3796 }
3797 
3799 inline simatrix operator|(const srmatrix& M1, const srmatrix_slice& M2) {
3800  return spsp_mm_hull<srmatrix,srmatrix,simatrix,interval>(M1,M2.A);
3801 }
3802 
3804 inline imatrix operator|(const srmatrix_slice& M1, const rmatrix& M2) {
3805  return spf_mm_hull<srmatrix,rmatrix,imatrix>(M1.A,M2);
3806 }
3807 
3809 inline imatrix operator|(const rmatrix& M1, const srmatrix_slice& M2) {
3810  return fsp_mm_hull<rmatrix,srmatrix,imatrix>(M1,M2.A);
3811 }
3812 
3814 inline imatrix operator|(const srmatrix_slice& M1, const rmatrix_slice& M2) {
3815  return spf_mm_hull<srmatrix,rmatrix_slice,imatrix>(M1.A,M2);
3816 }
3817 
3819 inline imatrix operator|(const rmatrix_slice& M1, const srmatrix_slice& M2) {
3820  return fsp_mm_hull<rmatrix_slice,srmatrix,imatrix>(M1,M2.A);
3821 }
3822 
3824 inline simatrix operator&(const simatrix_slice& M1, const simatrix_slice& M2) {
3825  return spsp_mm_intersect<simatrix,simatrix,simatrix,interval>(M1.A,M2.A);
3826 }
3827 
3829 inline simatrix operator&(const simatrix_slice& M1, const simatrix& M2) {
3830  return spsp_mm_intersect<simatrix,simatrix,simatrix,interval>(M1.A,M2);
3831 }
3832 
3834 inline simatrix operator&(const simatrix& M1, const simatrix_slice& M2) {
3835  return spsp_mm_intersect<simatrix,simatrix,simatrix,interval>(M1,M2.A);
3836 }
3837 
3839 inline imatrix operator&(const simatrix_slice& M1, const imatrix& M2) {
3840  return spf_mm_intersect<simatrix,imatrix,imatrix>(M1.A,M2);
3841 }
3842 
3844 inline imatrix operator&(const imatrix& M1, const simatrix_slice& M2) {
3845  return fsp_mm_intersect<imatrix,simatrix,imatrix>(M1,M2.A);
3846 }
3847 
3849 inline imatrix operator&(const simatrix_slice& M1, const imatrix_slice& M2) {
3850  return spf_mm_intersect<simatrix,imatrix_slice,imatrix>(M1.A,M2);
3851 }
3852 
3854 inline imatrix operator&(const imatrix_slice& M1, const simatrix_slice& M2) {
3855  return fsp_mm_intersect<imatrix_slice,simatrix,imatrix>(M1,M2.A);
3856 }
3857 
3859 inline bool operator==(const simatrix_slice& M1, const srmatrix_slice& M2) {
3860  return spsp_mm_comp(M1.A,M2.A);
3861 }
3862 
3864 inline bool operator==(const srmatrix_slice& M1, const simatrix_slice& M2) {
3865  return spsp_mm_comp(M1.A,M2.A);
3866 }
3867 
3869 inline bool operator==(const simatrix_slice& M1, const simatrix_slice& M2) {
3870  return spsp_mm_comp(M1.A,M2.A);
3871 }
3872 
3874 inline bool operator==(const simatrix_slice& M1, const srmatrix& M2) {
3875  return spsp_mm_comp(M1.A,M2);
3876 }
3877 
3879 inline bool operator==(const srmatrix_slice& M1, const simatrix& M2) {
3880  return spsp_mm_comp(M1.A,M2);
3881 }
3882 
3884 inline bool operator==(const simatrix_slice& M1, const simatrix& M2) {
3885  return spsp_mm_comp(M1.A,M2);
3886 }
3887 
3889 inline bool operator==(const simatrix& M1, const srmatrix_slice& M2) {
3890  return spsp_mm_comp(M1,M2.A);
3891 }
3892 
3894 inline bool operator==(const srmatrix& M1, const simatrix_slice& M2) {
3895  return spsp_mm_comp(M1,M2.A);
3896 }
3897 
3899 inline bool operator==(const simatrix& M1, const simatrix_slice& M2) {
3900  return spsp_mm_comp(M1,M2.A);
3901 }
3902 
3904 inline bool operator==(const simatrix_slice& M1, const rmatrix& M2) {
3905  return spf_mm_comp(M1.A,M2);
3906 }
3907 
3909 inline bool operator==(const srmatrix_slice& M1, const imatrix& M2) {
3910  return spf_mm_comp(M1.A,M2);
3911 }
3912 
3914 inline bool operator==(const simatrix_slice& M1, const imatrix& M2) {
3915  return spf_mm_comp(M1.A,M2);
3916 }
3917 
3919 inline bool operator==(const imatrix& M1, const srmatrix_slice& M2) {
3920  return fsp_mm_comp(M1,M2.A);
3921 }
3922 
3924 inline bool operator==(const rmatrix& M1, const simatrix_slice& M2) {
3925  return fsp_mm_comp(M1,M2.A);
3926 }
3927 
3929 inline bool operator==(const imatrix& M1, const simatrix_slice& M2) {
3930  return fsp_mm_comp(M1,M2.A);
3931 }
3932 
3934 inline bool operator==(const imatrix_slice& M1, const srmatrix_slice& M2) {
3935  return fsp_mm_comp(M1,M2.A);
3936 }
3937 
3939 inline bool operator==(const rmatrix_slice& M1, const simatrix_slice& M2) {
3940  return fsp_mm_comp(M1,M2.A);
3941 }
3942 
3944 inline bool operator==(const imatrix_slice& M1, const simatrix_slice& M2) {
3945  return fsp_mm_comp(M1,M2.A);
3946 }
3947 
3949 inline bool operator==(const simatrix_slice& M1, const rmatrix_slice& M2) {
3950  return spf_mm_comp(M1.A,M2);
3951 }
3952 
3954 inline bool operator==(const srmatrix_slice& M1, const imatrix_slice& M2) {
3955  return spf_mm_comp(M1.A,M2);
3956 }
3957 
3959 inline bool operator==(const simatrix_slice& M1, const imatrix_slice& M2) {
3960  return spf_mm_comp(M1.A,M2);
3961 }
3962 
3964 inline bool operator!=(const simatrix_slice& M1, const srmatrix_slice& M2) {
3965  return !spsp_mm_comp(M1.A,M2.A);
3966 }
3967 
3969 inline bool operator!=(const srmatrix_slice& M1, const simatrix_slice& M2) {
3970  return !spsp_mm_comp(M1.A,M2.A);
3971 }
3972 
3974 inline bool operator!=(const simatrix_slice& M1, const simatrix_slice& M2) {
3975  return !spsp_mm_comp(M1.A,M2.A);
3976 }
3977 
3979 inline bool operator!=(const simatrix_slice& M1, const srmatrix& M2) {
3980  return !spsp_mm_comp(M1.A,M2);
3981 }
3982 
3984 inline bool operator!=(const srmatrix_slice& M1, const simatrix& M2) {
3985  return !spsp_mm_comp(M1.A,M2);
3986 }
3987 
3989 inline bool operator!=(const simatrix_slice& M1, const simatrix& M2) {
3990  return !spsp_mm_comp(M1.A,M2);
3991 }
3992 
3994 inline bool operator!=(const simatrix& M1, const srmatrix_slice& M2) {
3995  return !spsp_mm_comp(M1,M2.A);
3996 }
3997 
3999 inline bool operator!=(const srmatrix& M1, const simatrix_slice& M2) {
4000  return !spsp_mm_comp(M1,M2.A);
4001 }
4002 
4004 inline bool operator!=(const simatrix& M1, const simatrix_slice& M2) {
4005  return !spsp_mm_comp(M1,M2.A);
4006 }
4007 
4009 inline bool operator!=(const simatrix_slice& M1, const rmatrix& M2) {
4010  return !spf_mm_comp(M1.A,M2);
4011 }
4012 
4014 inline bool operator!=(const srmatrix_slice& M1, const imatrix& M2) {
4015  return !spf_mm_comp(M1.A,M2);
4016 }
4017 
4019 inline bool operator!=(const simatrix_slice& M1, const imatrix& M2) {
4020  return !spf_mm_comp(M1.A,M2);
4021 }
4022 
4024 inline bool operator!=(const imatrix& M1, const srmatrix_slice& M2) {
4025  return !fsp_mm_comp(M1,M2.A);
4026 }
4027 
4029 inline bool operator!=(const rmatrix& M1, const simatrix_slice& M2) {
4030  return !fsp_mm_comp(M1,M2.A);
4031 }
4032 
4034 inline bool operator!=(const imatrix& M1, const simatrix_slice& M2) {
4035  return !fsp_mm_comp(M1,M2.A);
4036 }
4037 
4039 inline bool operator!=(const imatrix_slice& M1, const srmatrix_slice& M2) {
4040  return !fsp_mm_comp(M1,M2.A);
4041 }
4042 
4044 inline bool operator!=(const rmatrix_slice& M1, const simatrix_slice& M2) {
4045  return !fsp_mm_comp(M1,M2.A);
4046 }
4047 
4049 inline bool operator!=(const imatrix_slice& M1, const simatrix_slice& M2) {
4050  return !fsp_mm_comp(M1,M2.A);
4051 }
4052 
4054 inline bool operator!=(const simatrix_slice& M1, const rmatrix_slice& M2) {
4055  return !spf_mm_comp(M1.A,M2);
4056 }
4057 
4059 inline bool operator!=(const srmatrix_slice& M1, const imatrix_slice& M2) {
4060  return !spf_mm_comp(M1.A,M2);
4061 }
4062 
4064 inline bool operator!=(const simatrix_slice& M1, const imatrix_slice& M2) {
4065  return !spf_mm_comp(M1.A,M2);
4066 }
4067 
4069 inline bool operator<(const srmatrix_slice& M1, const simatrix_slice& M2) {
4070  return spsp_mm_less<srmatrix,simatrix,interval>(M1.A,M2.A);
4071 }
4072 
4074 inline bool operator<(const simatrix_slice& M1, const simatrix_slice& M2) {
4075  return spsp_mm_less<simatrix,simatrix,interval>(M1.A,M2.A);
4076 }
4077 
4079 inline bool operator<(const srmatrix_slice& M1, const simatrix& M2) {
4080  return spsp_mm_less<srmatrix,simatrix,interval>(M1.A,M2);
4081 }
4082 
4084 inline bool operator<(const simatrix_slice& M1, const simatrix& M2) {
4085  return spsp_mm_less<simatrix,simatrix,interval>(M1.A,M2);
4086 }
4087 
4089 inline bool operator<(const srmatrix& M1, const simatrix_slice& M2) {
4090  return spsp_mm_less<srmatrix,simatrix,interval>(M1,M2.A);
4091 }
4092 
4094 inline bool operator<(const simatrix& M1, const simatrix_slice& M2) {
4095  return spsp_mm_less<simatrix,simatrix,interval>(M1,M2.A);
4096 }
4097 
4099 inline bool operator<(const srmatrix_slice& M1, const imatrix& M2) {
4100  return spf_mm_less<srmatrix,imatrix,interval>(M1.A,M2);
4101 }
4102 
4104 inline bool operator<(const simatrix_slice& M1, const imatrix& M2) {
4105  return spf_mm_less<simatrix,imatrix,interval>(M1.A,M2);
4106 }
4107 
4109 inline bool operator<(const rmatrix& M1, const simatrix_slice& M2) {
4110  return fsp_mm_less<rmatrix,simatrix,interval>(M1,M2.A);
4111 }
4112 
4114 inline bool operator<(const imatrix& M1, const simatrix_slice& M2) {
4115  return fsp_mm_less<imatrix,simatrix,interval>(M1,M2.A);
4116 }
4117 
4119 inline bool operator<(const rmatrix_slice& M1, const simatrix_slice& M2) {
4120  return fsp_mm_less<rmatrix_slice,simatrix,interval>(M1,M2.A);
4121 }
4122 
4124 inline bool operator<(const imatrix_slice& M1, const simatrix_slice& M2) {
4125  return fsp_mm_less<imatrix_slice,simatrix,interval>(M1,M2.A);
4126 }
4127 
4129 inline bool operator<(const srmatrix_slice& M1, const imatrix_slice& M2) {
4130  return spf_mm_less<srmatrix,imatrix_slice,interval>(M1.A,M2);
4131 }
4132 
4134 inline bool operator<(const simatrix_slice& M1, const imatrix_slice& M2) {
4135  return spf_mm_less<simatrix,imatrix_slice,interval>(M1.A,M2);
4136 }
4137 
4139 inline bool operator<=(const srmatrix_slice& M1, const simatrix_slice& M2) {
4140  return spsp_mm_leq<srmatrix,simatrix,interval>(M1.A,M2.A);
4141 }
4142 
4144 inline bool operator<=(const simatrix_slice& M1, const simatrix_slice& M2) {
4145  return spsp_mm_leq<simatrix,simatrix,interval>(M1.A,M2.A);
4146 }
4147 
4149 inline bool operator<=(const srmatrix_slice& M1, const simatrix& M2) {
4150  return spsp_mm_leq<srmatrix,simatrix,interval>(M1.A,M2);
4151 }
4152 
4154 inline bool operator<=(const simatrix_slice& M1, const simatrix& M2) {
4155  return spsp_mm_leq<simatrix,simatrix,interval>(M1.A,M2);
4156 }
4157 
4159 inline bool operator<=(const srmatrix& M1, const simatrix_slice& M2) {
4160  return spsp_mm_leq<srmatrix,simatrix,interval>(M1,M2.A);
4161 }
4162 
4164 inline bool operator<=(const simatrix& M1, const simatrix_slice& M2) {
4165  return spsp_mm_leq<simatrix,simatrix,interval>(M1,M2.A);
4166 }
4167 
4169 inline bool operator<=(const srmatrix_slice& M1, const imatrix& M2) {
4170  return spf_mm_leq<srmatrix,imatrix,interval>(M1.A,M2);
4171 }
4172 
4174 inline bool operator<=(const simatrix_slice& M1, const imatrix& M2) {
4175  return spf_mm_leq<simatrix,imatrix,interval>(M1.A,M2);
4176 }
4177 
4179 inline bool operator<=(const rmatrix& M1, const simatrix_slice& M2) {
4180  return fsp_mm_leq<rmatrix,simatrix,interval>(M1,M2.A);
4181 }
4182 
4184 inline bool operator<=(const imatrix& M1, const simatrix_slice& M2) {
4185  return fsp_mm_leq<imatrix,simatrix,interval>(M1,M2.A);
4186 }
4187 
4189 inline bool operator<=(const rmatrix_slice& M1, const simatrix_slice& M2) {
4190  return fsp_mm_leq<rmatrix_slice,simatrix,interval>(M1,M2.A);
4191 }
4192 
4194 inline bool operator<=(const imatrix_slice& M1, const simatrix_slice& M2) {
4195  return fsp_mm_leq<imatrix_slice,simatrix,interval>(M1,M2.A);
4196 }
4197 
4199 inline bool operator<=(const srmatrix_slice& M1, const imatrix_slice& M2) {
4200  return spf_mm_leq<srmatrix,imatrix_slice,interval>(M1.A,M2);
4201 }
4202 
4204 inline bool operator<=(const simatrix_slice& M1, const imatrix_slice& M2) {
4205  return spf_mm_leq<simatrix,imatrix_slice,interval>(M1.A,M2);
4206 }
4207 
4209 inline bool operator>(const simatrix_slice& M1, const srmatrix_slice& M2) {
4210  return spsp_mm_greater<simatrix,srmatrix,interval>(M1.A,M2.A);
4211 }
4212 
4214 inline bool operator>(const simatrix_slice& M1, const simatrix_slice& M2) {
4215  return spsp_mm_greater<simatrix,simatrix,interval>(M1.A,M2.A);
4216 }
4217 
4219 inline bool operator>(const simatrix_slice& M1, const srmatrix& M2) {
4220  return spsp_mm_greater<simatrix,srmatrix,interval>(M1.A,M2);
4221 }
4222 
4224 inline bool operator>(const simatrix_slice& M1, const simatrix& M2) {
4225  return spsp_mm_greater<simatrix,simatrix,interval>(M1.A,M2);
4226 }
4227 
4229 inline bool operator>(const simatrix& M1, const srmatrix_slice& M2) {
4230  return spsp_mm_greater<simatrix,srmatrix,interval>(M1,M2.A);
4231 }
4232 
4234 inline bool operator>(const simatrix& M1, const simatrix_slice& M2) {
4235  return spsp_mm_greater<simatrix,simatrix,interval>(M1,M2.A);
4236 }
4237 
4239 inline bool operator>(const simatrix_slice& M1, const rmatrix& M2) {
4240  return spf_mm_greater<simatrix,rmatrix,interval>(M1.A,M2);
4241 }
4242 
4244 inline bool operator>(const simatrix_slice& M1, const imatrix& M2) {
4245  return spf_mm_greater<simatrix,imatrix,interval>(M1.A,M2);
4246 }
4247 
4249 inline bool operator>(const imatrix& M1, const srmatrix_slice& M2) {
4250  return fsp_mm_greater<imatrix,srmatrix,interval>(M1,M2.A);
4251 }
4252 
4254 inline bool operator>(const imatrix& M1, const simatrix_slice& M2) {
4255  return fsp_mm_greater<imatrix,simatrix,interval>(M1,M2.A);
4256 }
4257 
4259 inline bool operator>(const imatrix_slice& M1, const srmatrix_slice& M2) {
4260  return fsp_mm_greater<imatrix,srmatrix,interval>(M1,M2.A);
4261 }
4262 
4264 inline bool operator>(const imatrix_slice& M1, const simatrix_slice& M2) {
4265  return fsp_mm_greater<imatrix_slice,simatrix,interval>(M1,M2.A);
4266 }
4267 
4269 inline bool operator>(const simatrix_slice& M1, const rmatrix_slice& M2) {
4270  return spf_mm_greater<simatrix,rmatrix_slice,interval>(M1.A,M2);
4271 }
4272 
4274 inline bool operator>(const simatrix_slice& M1, const imatrix_slice& M2) {
4275  return spf_mm_greater<simatrix,imatrix_slice,interval>(M1.A,M2);
4276 }
4277 
4279 inline bool operator>=(const simatrix_slice& M1, const srmatrix_slice& M2) {
4280  return spsp_mm_geq<simatrix,srmatrix,interval>(M1.A,M2.A);
4281 }
4282 
4284 inline bool operator>=(const simatrix_slice& M1, const simatrix_slice& M2) {
4285  return spsp_mm_geq<simatrix,simatrix,interval>(M1.A,M2.A);
4286 }
4287 
4289 inline bool operator>=(const simatrix_slice& M1, const srmatrix& M2) {
4290  return spsp_mm_geq<simatrix,srmatrix,interval>(M1.A,M2);
4291 }
4292 
4294 inline bool operator>=(const simatrix_slice& M1, const simatrix& M2) {
4295  return spsp_mm_geq<simatrix,simatrix,interval>(M1.A,M2);
4296 }
4297 
4299 inline bool operator>=(const simatrix& M1, const srmatrix_slice& M2) {
4300  return spsp_mm_geq<simatrix,srmatrix,interval>(M1,M2.A);
4301 }
4302 
4304 inline bool operator>=(const simatrix& M1, const simatrix_slice& M2) {
4305  return spsp_mm_geq<simatrix,simatrix,interval>(M1,M2.A);
4306 }
4307 
4309 inline bool operator>=(const simatrix_slice& M1, const rmatrix& M2) {
4310  return spf_mm_geq<simatrix,rmatrix,interval>(M1.A,M2);
4311 }
4312 
4314 inline bool operator>=(const simatrix_slice& M1, const imatrix& M2) {
4315  return spf_mm_geq<simatrix,imatrix,interval>(M1.A,M2);
4316 }
4317 
4319 inline bool operator>=(const imatrix& M1, const srmatrix_slice& M2) {
4320  return fsp_mm_geq<imatrix,srmatrix,interval>(M1,M2.A);
4321 }
4322 
4324 inline bool operator>=(const imatrix& M1, const simatrix_slice& M2) {
4325  return fsp_mm_geq<imatrix,simatrix,interval>(M1,M2.A);
4326 }
4327 
4329 inline bool operator>=(const imatrix_slice& M1, const srmatrix_slice& M2) {
4330  return fsp_mm_geq<imatrix,srmatrix,interval>(M1,M2.A);
4331 }
4332 
4334 inline bool operator>=(const imatrix_slice& M1, const simatrix_slice& M2) {
4335  return fsp_mm_geq<imatrix_slice,simatrix,interval>(M1,M2.A);
4336 }
4337 
4339 inline bool operator>=(const simatrix_slice& M1, const rmatrix_slice& M2) {
4340  return spf_mm_geq<simatrix,rmatrix_slice,interval>(M1.A,M2);
4341 }
4342 
4344 inline bool operator>=(const simatrix_slice& M1, const imatrix_slice& M2) {
4345  return spf_mm_geq<simatrix,imatrix_slice,interval>(M1.A,M2);
4346 }
4347 
4349 inline bool operator!(const simatrix_slice& M) {
4350  return sp_m_not(M.A);
4351 }
4352 
4354 
4359 inline std::ostream& operator<<(std::ostream& os, const simatrix_slice& M) {
4360  return sp_m_output<simatrix,interval>(os, M.A);
4361 }
4362 
4364 
4369 inline std::istream& operator>>(std::istream& is, simatrix_slice& M) {
4370  simatrix tmp(M.A.m, M.A.n);
4371  sp_m_input<simatrix,interval>(is, tmp);
4372  M = tmp;
4373  return is;
4374 }
4375 
4376 
4378 
4384  private:
4385  simatrix_slice dat;
4386  bool row;
4387  int index;
4388 
4389  simatrix_subv(simatrix& A, bool r, int i, int j, int k, int l) : dat(A,i,j,k,l), row(r) {
4390  if(row) index=i; else index=k;
4391  }
4392 
4393  simatrix_subv(const simatrix& A, bool r, int i, int j, int k, int l) : dat(A,i,j,k,l), row(r) {
4394  if(row) index=i; else index=k;
4395  }
4396 
4397  public:
4399 
4403  interval& operator[](const int i) {
4404  if(row) {
4405 #if(CXSC_INDEX_CHECK)
4406  if(i<dat.A.lb2 || i>dat.A.ub2)
4407  cxscthrow(ELEMENT_NOT_IN_VEC("simatrix_subv::operator[](int)"));
4408 #endif
4409  return dat.element(index,i);
4410  } else {
4411 #if(CXSC_INDEX_CHECK)
4412  if(i<dat.A.lb1 || i>dat.A.ub1)
4413  cxscthrow(ELEMENT_NOT_IN_VEC("simatrix_subv::operator[](int)"));
4414 #endif
4415  return dat.element(i,index);
4416  }
4417  }
4418 
4420 
4423  const interval operator[](const int i) const{
4424  if(row) {
4425 #if(CXSC_INDEX_CHECK)
4426  if(i<dat.A.lb2 || i>dat.A.ub2)
4427  cxscthrow(ELEMENT_NOT_IN_VEC("simatrix_subv::operator[](int)"));
4428 #endif
4429  return dat(index,i);
4430  } else {
4431 #if(CXSC_INDEX_CHECK)
4432  if(i<dat.A.lb1 || i>dat.A.ub1)
4433  cxscthrow(ELEMENT_NOT_IN_VEC("simatrix_subv::operator[](int)"));
4434 #endif
4435  return dat(i,index);
4436  }
4437  }
4438 
4441  return sv_vs_assign(*this,v);
4442  }
4443 
4446  return sv_vs_assign(*this,v);
4447  }
4448 
4451  return svsp_vv_assign(*this,v);
4452  }
4453 
4456  return svsp_vv_assign(*this,v);
4457  }
4458 
4461  return svsl_vv_assign(*this,v);
4462  }
4463 
4466  return svsl_vv_assign(*this,v);
4467  }
4468 
4471  return svf_vv_assign(*this,v);
4472  }
4473 
4476  return svf_vv_assign(*this,v);
4477  }
4478 
4481  return svf_vv_assign(*this,v);
4482  }
4483 
4486  return svf_vv_assign(*this,v);
4487  }
4488 
4491  return svsp_vv_assign(*this,srvector(v));
4492  }
4493 
4496  return svsp_vv_assign(*this,sivector(v));
4497  }
4498 
4500  simatrix_subv& operator*=(const real&);
4504  simatrix_subv& operator/=(const real&);
4512  simatrix_subv& operator+=(const rvector&);
4520  simatrix_subv& operator-=(const rvector&);
4528  simatrix_subv& operator+=(const ivector&);
4536  simatrix_subv& operator-=(const ivector&);
4544  simatrix_subv& operator|=(const rvector&);
4552  simatrix_subv& operator|=(const ivector&);
4555 
4556  friend sivector operator-(const simatrix_subv&);
4557 
4558  friend std::istream& operator>>(std::istream&, simatrix_subv&);
4559 
4560  friend int Lb(const simatrix_subv&);
4561  friend int Ub(const simatrix_subv&);
4562  friend int VecLen(const simatrix_subv&);
4563  friend srvector Inf(const simatrix_subv&);
4564  friend srvector Sup(const simatrix_subv&);
4565 
4566  friend class srvector;
4567  friend class srmatrix;
4568  friend class srmatrix_slice;
4569  friend class sivector;
4570  friend class simatrix;
4571  friend class simatrix_slice;
4572  friend class scivector;
4573  friend class scimatrix;
4574  friend class scimatrix_slice;
4575 
4576 #include "vector_friend_declarations.inl"
4577 };
4578 
4580 inline int Lb(const simatrix_subv& S) {
4581  if(S.row)
4582  return Lb(S.dat, 2);
4583  else
4584  return Lb(S.dat, 1);
4585 }
4586 
4588 inline int Ub(const simatrix_subv& S) {
4589  if(S.row)
4590  return Ub(S.dat, 2);
4591  else
4592  return Ub(S.dat, 1);
4593 }
4594 
4596 inline int VecLen(const simatrix_subv& S) {
4597  return Ub(S)-Lb(S)+1;
4598 }
4599 
4601 inline srvector Inf(const simatrix_subv& S) {
4602  return Inf(sivector(S));
4603 }
4604 
4606 inline srvector Sup(const simatrix_subv& S) {
4607  return Sup(sivector(S));
4608 }
4609 
4611 inline srvector mid(const simatrix_subv& S) {
4612  return mid(sivector(S));
4613 }
4614 
4616 inline srvector diam(const simatrix_subv& S) {
4617  return diam(sivector(S));
4618 }
4619 
4621 inline sivector abs(const simatrix_subv& S) {
4622  return abs(sivector(S));
4623 }
4624 
4626 inline std::ostream& operator<<(std::ostream& os, const simatrix_subv& v) {
4627  os << sivector(v);
4628  return os;
4629 }
4630 
4632 inline std::istream& operator>>(std::istream& is, simatrix_subv& v) {
4633  int n = 0;
4634  if(v.row) n=v.dat.A.n; else n=v.dat.A.m;
4635  sivector tmp(n);
4636  is >> tmp;
4637  v = tmp;
4638  return is;
4639 }
4640 
4641 inline simatrix_subv simatrix::operator[](const cxscmatrix_column& c) {
4642 #if(CXSC_INDEX_CHECK)
4643  if(c.col()<lb2 || c.col()>ub2)
4644  cxscthrow(ROW_OR_COL_NOT_IN_MAT("simatrix::operator[](const cxscmatrix_column&)"));
4645 #endif
4646  return simatrix_subv(*this, false, lb1, ub1, c.col(), c.col());
4647 }
4648 
4650 #if(CXSC_INDEX_CHECK)
4651  if(i<lb1 || i>ub1)
4652  cxscthrow(ROW_OR_COL_NOT_IN_MAT("simatrix::operator[](const int)"));
4653 #endif
4654  return simatrix_subv(*this, true, i, i, lb2, ub2);
4655 }
4656 
4657 inline const simatrix_subv simatrix::operator[](const cxscmatrix_column& c) const {
4658 #if(CXSC_INDEX_CHECK)
4659  if(c.col()<lb2 || c.col()>ub2)
4660  cxscthrow(ROW_OR_COL_NOT_IN_MAT("simatrix::operator[](const cxscmatrix_column&)"));
4661 #endif
4662  return simatrix_subv(*this, false, lb1, ub1, c.col(), c.col());
4663 }
4664 
4665 inline const simatrix_subv simatrix::operator[](const int i) const {
4666 #if(CXSC_INDEX_CHECK)
4667  if(i<lb1 || i>ub1)
4668  cxscthrow(ROW_OR_COL_NOT_IN_MAT("simatrix::operator[](const int)"));
4669 #endif
4670  return simatrix_subv(*this, true, i, i, lb2, ub2);
4671 }
4672 
4674 #if(CXSC_INDEX_CHECK)
4675  if(i<A.lb1 || i>A.ub1)
4676  cxscthrow(ROW_OR_COL_NOT_IN_MAT("simatrix::operator[](const int"));
4677 #endif
4678  return simatrix_subv(*M, true, i, i, A.lb2, A.ub2);
4679 }
4680 
4681 inline simatrix_subv simatrix_slice::operator[](const cxscmatrix_column& c) {
4682 #if(CXSC_INDEX_CHECK)
4683  if(c.col()<A.lb2 || c.col()>A.ub2)
4684  cxscthrow(ROW_OR_COL_NOT_IN_MAT("simatrix::operator[](const cxscmatrix_column&)"));
4685 #endif
4686  return simatrix_subv(*M, false, A.lb1, A.ub1, c.col(), c.col());
4687 }
4688 
4689 inline const simatrix_subv simatrix_slice::operator[](const int i) const {
4690 #if(CXSC_INDEX_CHECK)
4691  if(i<A.lb1 || i>A.ub1)
4692  cxscthrow(ROW_OR_COL_NOT_IN_MAT("simatrix::operator[](const int"));
4693 #endif
4694  return simatrix_subv(*M, true, i, i, A.lb2, A.ub2);
4695 }
4696 
4697 inline const simatrix_subv simatrix_slice::operator[](const cxscmatrix_column& c) const {
4698 #if(CXSC_INDEX_CHECK)
4699  if(c.col()<A.lb2 || c.col()>A.ub2)
4700  cxscthrow(ROW_OR_COL_NOT_IN_MAT("simatrix::operator[](const cxscmatrix_column&)"));
4701 #endif
4702  return simatrix_subv(*M, false, A.lb1, A.ub1, c.col(), c.col());
4703 }
4704 
4706  int nnz = A.dat.A.get_nnz();
4707  p.reserve(nnz);
4708  x.reserve(nnz);
4709 
4710  if(A.row) {
4711  lb = A.dat.A.lb2;
4712  ub = A.dat.A.ub2;
4713  n = ub-lb+1;
4714 
4715  for(int j=0 ; j<n ; j++) {
4716  for(int k=A.dat.A.p[j] ; k<A.dat.A.p[j+1] ; k++) {
4717  p.push_back(j);
4718  x.push_back(A.dat.A.x[k]);
4719  }
4720  }
4721 
4722  } else {
4723  lb = A.dat.A.lb1;
4724  ub = A.dat.A.ub1;
4725  n = ub-lb+1;
4726 
4727  for(unsigned int k=0 ; k<A.dat.A.ind.size() ; k++) {
4728  p.push_back(A.dat.A.ind[k]);
4729  x.push_back(A.dat.A.x[k]);
4730  }
4731  }
4732 }
4733 
4735 inline sivector operator-(const simatrix_subv& v) {
4736  sivector s(v);
4737  return -s;
4738 }
4739 
4741 inline sivector operator/(const simatrix_subv& v1, const real& v2) {
4742  return sivector(v1) / v2;
4743 }
4744 
4746 inline sivector operator/(const simatrix_subv& v1, const interval& v2) {
4747  return sivector(v1) / v2;
4748 }
4749 
4751 inline sivector operator/(const srmatrix_subv& v1, const interval& v2) {
4752  return srvector(v1) / v2;
4753 }
4754 
4756 inline sivector operator*(const simatrix_subv& v1, const real& v2) {
4757  return sivector(v1) * v2;
4758 }
4759 
4761 inline sivector operator*(const simatrix_subv& v1, const interval& v2) {
4762  return sivector(v1) * v2;
4763 }
4764 
4766 inline sivector operator*(const srmatrix_subv& v1, const interval& v2) {
4767  return srvector(v1) * v2;
4768 }
4769 
4771 inline sivector operator*(const real& v1, const simatrix_subv& v2) {
4772  return v1 * sivector(v2);
4773 }
4774 
4776 inline sivector operator*(const interval& v1, const simatrix_subv& v2) {
4777  return v1 * sivector(v2);
4778 }
4779 
4781 inline sivector operator*(const interval& v1, const srmatrix_subv& v2) {
4782  return v1 * srvector(v2);
4783 }
4784 
4786 
4792 inline interval operator*(const simatrix_subv& v1, const srvector& v2) {
4793  return sivector(v1) * v2;
4794 }
4795 
4797 
4803 inline interval operator*(const srmatrix_subv& v1, const sivector& v2) {
4804  return srvector(v1) * v2;
4805 }
4806 
4808 
4814 inline interval operator*(const simatrix_subv& v1, const sivector& v2) {
4815  return sivector(v1) * v2;
4816 }
4817 
4819 
4825 inline interval operator*(const simatrix_subv& v1, const srvector_slice& v2) {
4826  return sivector(v1) * v2;
4827 }
4828 
4830 
4836 inline interval operator*(const srmatrix_subv& v1, const sivector_slice& v2) {
4837  return srvector(v1) * v2;
4838 }
4839 
4841 
4847 inline interval operator*(const simatrix_subv& v1, const sivector_slice& v2) {
4848  return sivector(v1) * v2;
4849 }
4850 
4852 
4858 inline interval operator*(const simatrix_subv& v1, const rvector& v2) {
4859  return sivector(v1) * v2;
4860 }
4861 
4863 
4869 inline interval operator*(const srmatrix_subv& v1, const ivector& v2) {
4870  return srvector(v1) * v2;
4871 }
4872 
4874 
4880 inline interval operator*(const simatrix_subv& v1, const ivector& v2) {
4881  return sivector(v1) * v2;
4882 }
4883 
4885 
4891 inline interval operator*(const simatrix_subv& v1, const rvector_slice& v2) {
4892  return sivector(v1) * v2;
4893 }
4894 
4896 
4902 inline interval operator*(const srmatrix_subv& v1, const ivector_slice& v2) {
4903  return srvector(v1) * v2;
4904 }
4905 
4907 
4913 inline interval operator*(const simatrix_subv& v1, const ivector_slice& v2) {
4914  return sivector(v1) * v2;
4915 }
4916 
4918 
4924 inline interval operator*(const sivector& v1, const srmatrix_subv& v2) {
4925  return v1 * srvector(v2);
4926 }
4927 
4929 
4935 inline interval operator*(const srvector& v1, const simatrix_subv& v2) {
4936  return v1 * sivector(v2);
4937 }
4938 
4940 
4946 inline interval operator*(const sivector& v1, const simatrix_subv& v2) {
4947  return v1 * sivector(v2);
4948 }
4949 
4951 
4957 inline interval operator*(const sivector_slice& v1, const srmatrix_subv& v2) {
4958  return v1 * srvector(v2);
4959 }
4960 
4962 
4968 inline interval operator*(const srvector_slice& v1, const simatrix_subv& v2) {
4969  return v1 * sivector(v2);
4970 }
4971 
4973 
4979 inline interval operator*(const sivector_slice& v1, const simatrix_subv& v2) {
4980  return v1 * sivector(v2);
4981 }
4982 
4984 
4990 inline interval operator*(const ivector& v1, const srmatrix_subv& v2) {
4991  return v1 * srvector(v2);
4992 }
4993 
4995 
5001 inline interval operator*(const rvector& v1, const simatrix_subv& v2) {
5002  return v1 * sivector(v2);
5003 }
5004 
5006 
5012 inline interval operator*(const ivector& v1, const simatrix_subv& v2) {
5013  return v1 * sivector(v2);
5014 }
5015 
5017 
5023 inline interval operator*(const ivector_slice& v1, const srmatrix_subv& v2) {
5024  return v1 * srvector(v2);
5025 }
5026 
5028 
5034 inline interval operator*(const rvector_slice& v1, const simatrix_subv& v2) {
5035  return v1 * sivector(v2);
5036 }
5037 
5039 
5045 inline interval operator*(const ivector_slice& v1, const simatrix_subv& v2) {
5046  return v1 * sivector(v2);
5047 }
5048 
5050 inline sivector operator+(const simatrix_subv& v1, const srvector& v2) {
5051  return sivector(v1) + v2;
5052 }
5053 
5055 inline sivector operator+(const srmatrix_subv& v1, const sivector& v2) {
5056  return srvector(v1) + v2;
5057 }
5058 
5060 inline sivector operator+(const simatrix_subv& v1, const sivector& v2) {
5061  return sivector(v1) + v2;
5062 }
5063 
5065 inline sivector operator+(const simatrix_subv& v1, const srvector_slice& v2) {
5066  return sivector(v1) + v2;
5067 }
5068 
5070 inline sivector operator+(const srmatrix_subv& v1, const sivector_slice& v2) {
5071  return srvector(v1) + v2;
5072 }
5073 
5075 inline sivector operator+(const simatrix_subv& v1, const sivector_slice& v2) {
5076  return sivector(v1) + v2;
5077 }
5078 
5080 inline ivector operator+(const simatrix_subv& v1, const rvector& v2) {
5081  return sivector(v1) + v2;
5082 }
5083 
5085 inline ivector operator+(const srmatrix_subv& v1, const ivector& v2) {
5086  return srvector(v1) + v2;
5087 }
5088 
5090 inline ivector operator+(const simatrix_subv& v1, const ivector& v2) {
5091  return sivector(v1) + v2;
5092 }
5093 
5095 inline ivector operator+(const simatrix_subv& v1, const rvector_slice& v2) {
5096  return sivector(v1) + v2;
5097 }
5098 
5100 inline ivector operator+(const srmatrix_subv& v1, const ivector_slice& v2) {
5101  return srvector(v1) + v2;
5102 }
5103 
5105 inline ivector operator+(const simatrix_subv& v1, const ivector_slice& v2) {
5106  return sivector(v1) + v2;
5107 }
5108 
5110 inline sivector operator+(const sivector& v1, const srmatrix_subv& v2) {
5111  return v1 + srvector(v2);
5112 }
5113 
5115 inline sivector operator+(const srvector& v1, const simatrix_subv& v2) {
5116  return v1 + sivector(v2);
5117 }
5118 
5120 inline sivector operator+(const sivector& v1, const simatrix_subv& v2) {
5121  return v1 + sivector(v2);
5122 }
5123 
5125 inline sivector operator+(const sivector_slice& v1, const srmatrix_subv& v2) {
5126  return v1 + srvector(v2);
5127 }
5128 
5130 inline sivector operator+(const srvector_slice& v1, const simatrix_subv& v2) {
5131  return v1 + sivector(v2);
5132 }
5133 
5135 inline sivector operator+(const sivector_slice& v1, const simatrix_subv& v2) {
5136  return v1 + sivector(v2);
5137 }
5138 
5140 inline ivector operator+(const ivector& v1, const srmatrix_subv& v2) {
5141  return v1 + srvector(v2);
5142 }
5143 
5145 inline ivector operator+(const rvector& v1, const simatrix_subv& v2) {
5146  return v1 + sivector(v2);
5147 }
5148 
5150 inline ivector operator+(const ivector& v1, const simatrix_subv& v2) {
5151  return v1 + sivector(v2);
5152 }
5153 
5155 inline ivector operator+(const ivector_slice& v1, const srmatrix_subv& v2) {
5156  return v1 + srvector(v2);
5157 }
5158 
5160 inline ivector operator+(const rvector_slice& v1, const simatrix_subv& v2) {
5161  return v1 + sivector(v2);
5162 }
5163 
5165 inline ivector operator+(const ivector_slice& v1, const simatrix_subv& v2) {
5166  return v1 + sivector(v2);
5167 }
5168 
5170 inline sivector operator-(const simatrix_subv& v1, const srvector& v2) {
5171  return sivector(v1) - v2;
5172 }
5173 
5175 inline sivector operator-(const srmatrix_subv& v1, const sivector& v2) {
5176  return srvector(v1) - v2;
5177 }
5178 
5180 inline sivector operator-(const simatrix_subv& v1, const sivector& v2) {
5181  return sivector(v1) - v2;
5182 }
5183 
5185 inline sivector operator-(const simatrix_subv& v1, const srvector_slice& v2) {
5186  return sivector(v1) - v2;
5187 }
5188 
5190 inline sivector operator-(const srmatrix_subv& v1, const sivector_slice& v2) {
5191  return srvector(v1) - v2;
5192 }
5193 
5195 inline sivector operator-(const simatrix_subv& v1, const sivector_slice& v2) {
5196  return sivector(v1) - v2;
5197 }
5198 
5200 inline ivector operator-(const simatrix_subv& v1, const rvector& v2) {
5201  return sivector(v1) - v2;
5202 }
5203 
5205 inline ivector operator-(const srmatrix_subv& v1, const ivector& v2) {
5206  return srvector(v1) - v2;
5207 }
5208 
5210 inline ivector operator-(const simatrix_subv& v1, const ivector& v2) {
5211  return sivector(v1) - v2;
5212 }
5213 
5215 inline ivector operator-(const simatrix_subv& v1, const rvector_slice& v2) {
5216  return sivector(v1) - v2;
5217 }
5218 
5220 inline ivector operator-(const srmatrix_subv& v1, const ivector_slice& v2) {
5221  return srvector(v1) - v2;
5222 }
5223 
5225 inline ivector operator-(const simatrix_subv& v1, const ivector_slice& v2) {
5226  return sivector(v1) - v2;
5227 }
5228 
5230 inline sivector operator-(const sivector& v1, const srmatrix_subv& v2) {
5231  return v1 - srvector(v2);
5232 }
5233 
5235 inline sivector operator-(const srvector& v1, const simatrix_subv& v2) {
5236  return v1 - sivector(v2);
5237 }
5238 
5240 inline sivector operator-(const sivector& v1, const simatrix_subv& v2) {
5241  return v1 - sivector(v2);
5242 }
5243 
5245 inline sivector operator-(const sivector_slice& v1, const srmatrix_subv& v2) {
5246  return v1 - srvector(v2);
5247 }
5248 
5250 inline sivector operator-(const srvector_slice& v1, const simatrix_subv& v2) {
5251  return v1 - sivector(v2);
5252 }
5253 
5255 inline sivector operator-(const sivector_slice& v1, const simatrix_subv& v2) {
5256  return v1 - sivector(v2);
5257 }
5258 
5260 inline ivector operator-(const ivector& v1, const srmatrix_subv& v2) {
5261  return v1 - srvector(v2);
5262 }
5263 
5265 inline ivector operator-(const rvector& v1, const simatrix_subv& v2) {
5266  return v1 - sivector(v2);
5267 }
5268 
5270 inline ivector operator-(const ivector& v1, const simatrix_subv& v2) {
5271  return v1 - sivector(v2);
5272 }
5273 
5275 inline ivector operator-(const ivector_slice& v1, const srmatrix_subv& v2) {
5276  return v1 - srvector(v2);
5277 }
5278 
5280 inline ivector operator-(const rvector_slice& v1, const simatrix_subv& v2) {
5281  return v1 - sivector(v2);
5282 }
5283 
5285 inline ivector operator-(const ivector_slice& v1, const simatrix_subv& v2) {
5286  return v1 - sivector(v2);
5287 }
5288 
5290 inline sivector operator|(const simatrix_subv& v1, const srvector& v2) {
5291  return sivector(v1) | v2;
5292 }
5293 
5295 inline sivector operator|(const srmatrix_subv& v1, const sivector& v2) {
5296  return srvector(v1) | v2;
5297 }
5298 
5300 inline sivector operator|(const simatrix_subv& v1, const sivector& v2) {
5301  return sivector(v1) | v2;
5302 }
5303 
5305 inline sivector operator|(const simatrix_subv& v1, const srvector_slice& v2) {
5306  return sivector(v1) | v2;
5307 }
5308 
5310 inline sivector operator|(const srmatrix_subv& v1, const sivector_slice& v2) {
5311  return srvector(v1) | v2;
5312 }
5313 
5315 inline sivector operator|(const simatrix_subv& v1, const sivector_slice& v2) {
5316  return sivector(v1) | v2;
5317 }
5318 
5320 inline ivector operator|(const simatrix_subv& v1, const rvector& v2) {
5321  return sivector(v1) | v2;
5322 }
5323 
5325 inline ivector operator|(const srmatrix_subv& v1, const ivector& v2) {
5326  return srvector(v1) | v2;
5327 }
5328 
5330 inline ivector operator|(const simatrix_subv& v1, const ivector& v2) {
5331  return sivector(v1) | v2;
5332 }
5333 
5335 inline ivector operator|(const simatrix_subv& v1, const rvector_slice& v2) {
5336  return sivector(v1) | v2;
5337 }
5338 
5340 inline ivector operator|(const srmatrix_subv& v1, const ivector_slice& v2) {
5341  return srvector(v1) | v2;
5342 }
5343 
5345 inline ivector operator|(const simatrix_subv& v1, const ivector_slice& v2) {
5346  return sivector(v1) | v2;
5347 }
5348 
5350 inline sivector operator|(const sivector& v1, const srmatrix_subv& v2) {
5351  return v1 | srvector(v2);
5352 }
5353 
5355 inline sivector operator|(const srvector& v1, const simatrix_subv& v2) {
5356  return v1 | sivector(v2);
5357 }
5358 
5360 inline sivector operator|(const sivector& v1, const simatrix_subv& v2) {
5361  return v1 | sivector(v2);
5362 }
5363 
5365 inline sivector operator|(const sivector_slice& v1, const srmatrix_subv& v2) {
5366  return v1 | srvector(v2);
5367 }
5368 
5370 inline sivector operator|(const srvector_slice& v1, const simatrix_subv& v2) {
5371  return v1 | sivector(v2);
5372 }
5373 
5375 inline sivector operator|(const sivector_slice& v1, const simatrix_subv& v2) {
5376  return v1 | sivector(v2);
5377 }
5378 
5380 inline ivector operator|(const ivector& v1, const srmatrix_subv& v2) {
5381  return v1 | srvector(v2);
5382 }
5383 
5385 inline ivector operator|(const rvector& v1, const simatrix_subv& v2) {
5386  return v1 | sivector(v2);
5387 }
5388 
5390 inline ivector operator|(const ivector& v1, const simatrix_subv& v2) {
5391  return v1 | sivector(v2);
5392 }
5393 
5395 inline ivector operator|(const ivector_slice& v1, const srmatrix_subv& v2) {
5396  return v1 | srvector(v2);
5397 }
5398 
5400 inline ivector operator|(const rvector_slice& v1, const simatrix_subv& v2) {
5401  return v1 | sivector(v2);
5402 }
5403 
5405 inline ivector operator|(const ivector_slice& v1, const simatrix_subv& v2) {
5406  return v1 | sivector(v2);
5407 }
5408 
5410 inline sivector operator|(const srmatrix_subv& v1, const srvector& v2) {
5411  return srvector(v1) | v2;
5412 }
5413 
5415 inline sivector operator|(const srmatrix_subv& v1, const srvector_slice& v2) {
5416  return srvector(v1) | v2;
5417 }
5418 
5420 inline ivector operator|(const srmatrix_subv& v1, const rvector& v2) {
5421  return srvector(v1) | v2;
5422 }
5423 
5425 inline ivector operator|(const srmatrix_subv& v1, const rvector_slice& v2) {
5426  return srvector(v1) | v2;
5427 }
5428 
5430 inline sivector operator|(const srvector& v1, const srmatrix_subv& v2) {
5431  return v1 | srvector(v2);
5432 }
5433 
5435 inline sivector operator|(const srvector_slice& v1, const srmatrix_subv& v2) {
5436  return v1 | srvector(v2);
5437 }
5438 
5440 inline ivector operator|(const rvector& v1, const srmatrix_subv& v2) {
5441  return v1 | srvector(v2);
5442 }
5443 
5445 inline ivector operator|(const rvector_slice& v1, const srmatrix_subv& v2) {
5446  return v1 | srvector(v2);
5447 }
5448 
5450  *this = *this * v;
5451  return *this;
5452 }
5453 
5455  *this = *this * v;
5456  return *this;
5457 }
5458 
5460  *this = *this / v;
5461  return *this;
5462 }
5463 
5465  *this = *this / v;
5466  return *this;
5467 }
5468 
5470  *this = *this + v;
5471  return *this;
5472 }
5473 
5475  *this = *this + v;
5476  return *this;
5477 }
5478 
5480  *this = *this + v;
5481  return *this;
5482 }
5483 
5485  *this = *this + v;
5486  return *this;
5487 }
5488 
5490  *this = *this - v;
5491  return *this;
5492 }
5493 
5495  *this = *this - v;
5496  return *this;
5497 }
5498 
5500  *this = *this - v;
5501  return *this;
5502 }
5503 
5505  *this = *this - v;
5506  return *this;
5507 }
5508 
5510  *this = *this + v;
5511  return *this;
5512 }
5513 
5515  *this = *this + v;
5516  return *this;
5517 }
5518 
5520  *this = *this + v;
5521  return *this;
5522 }
5523 
5525  *this = *this + v;
5526  return *this;
5527 }
5528 
5530  *this = *this - v;
5531  return *this;
5532 }
5533 
5535  *this = *this - v;
5536  return *this;
5537 }
5538 
5540  *this = *this - v;
5541  return *this;
5542 }
5543 
5545  *this = *this - v;
5546  return *this;
5547 }
5548 
5550  *this = *this | v;
5551  return *this;
5552 }
5553 
5555  *this = *this | v;
5556  return *this;
5557 }
5558 
5560  *this = *this | v;
5561  return *this;
5562 }
5563 
5565  *this = *this | v;
5566  return *this;
5567 }
5568 
5570  *this = *this | v;
5571  return *this;
5572 }
5573 
5575  *this = *this | v;
5576  return *this;
5577 }
5578 
5580  *this = *this | v;
5581  return *this;
5582 }
5583 
5585  *this = *this | v;
5586  return *this;
5587 }
5588 
5590  *this += rvector(v);
5591  return *this;
5592 }
5593 
5595  *this += ivector(v);
5596  return *this;
5597 }
5598 
5600  *this += rvector(v);
5601  return *this;
5602 }
5603 
5605  *this += ivector(v);
5606  return *this;
5607 }
5608 
5610  *this += rvector(v);
5611  return *this;
5612 }
5613 
5615  *this += ivector(v);
5616  return *this;
5617 }
5618 
5620  *this -= rvector(v);
5621  return *this;
5622 }
5623 
5625  *this -= ivector(v);
5626  return *this;
5627 }
5628 
5630  *this -= rvector(v);
5631  return *this;
5632 }
5633 
5635  *this -= ivector(v);
5636  return *this;
5637 }
5638 
5640  *this -= rvector(v);
5641  return *this;
5642 }
5643 
5645  *this -= ivector(v);
5646  return *this;
5647 }
5648 
5650  *this |= rvector(v);
5651  return *this;
5652 }
5653 
5655  *this |= ivector(v);
5656  return *this;
5657 }
5658 
5660  *this |= rvector(v);
5661  return *this;
5662 }
5663 
5665  *this |= ivector(v);
5666  return *this;
5667 }
5668 
5670  *this |= rvector(v);
5671  return *this;
5672 }
5673 
5675  *this |= ivector(v);
5676  return *this;
5677 }
5678 
5680  *this &= rvector(v);
5681  return *this;
5682 }
5683 
5685  *this &= ivector(v);
5686  return *this;
5687 }
5688 
5690  *this &= rvector(v);
5691  return *this;
5692 }
5693 
5695  *this &= ivector(v);
5696  return *this;
5697 }
5698 
5700  *this &= rvector(v);
5701  return *this;
5702 }
5703 
5705  *this &= ivector(v);
5706  return *this;
5707 }
5708 
5710  *this = rvector(v);
5711  return *this;
5712 }
5713 
5715  *this = ivector(v);
5716  return *this;
5717 }
5718 
5720  *this = rvector(v);
5721  return *this;
5722 }
5723 
5725  *this = ivector(v);
5726  return *this;
5727 }
5728 
5730  *this = rvector(v);
5731  return *this;
5732 }
5733 
5735  *this = ivector(v);
5736  return *this;
5737 }
5738 
5740 inline bool operator==(const simatrix_subv& v1, const srvector& v2) {
5741  return sivector(v1) == v2;
5742 }
5743 
5745 inline bool operator==(const srmatrix_subv& v1, const sivector& v2) {
5746  return srvector(v1) == v2;
5747 }
5748 
5750 inline bool operator==(const simatrix_subv& v1, const sivector& v2) {
5751  return sivector(v1) == v2;
5752 }
5753 
5755 inline bool operator==(const simatrix_subv& v1, const srvector_slice& v2) {
5756  return sivector(v1) == v2;
5757 }
5758 
5760 inline bool operator==(const srmatrix_subv& v1, const sivector_slice& v2) {
5761  return srvector(v1) == v2;
5762 }
5763 
5765 inline bool operator==(const simatrix_subv& v1, const sivector_slice& v2) {
5766  return sivector(v1) == v2;
5767 }
5768 
5770 inline bool operator==(const simatrix_subv& v1, const rvector& v2) {
5771  return sivector(v1) == v2;
5772 }
5773 
5775 inline bool operator==(const srmatrix_subv& v1, const ivector& v2) {
5776  return srvector(v1) == v2;
5777 }
5778 
5780 inline bool operator==(const simatrix_subv& v1, const ivector& v2) {
5781  return sivector(v1) == v2;
5782 }
5783 
5785 inline bool operator==(const simatrix_subv& v1, const rvector_slice& v2) {
5786  return sivector(v1) == v2;
5787 }
5788 
5790 inline bool operator==(const srmatrix_subv& v1, const ivector_slice& v2) {
5791  return srvector(v1) == v2;
5792 }
5793 
5795 inline bool operator==(const simatrix_subv& v1, const ivector_slice& v2) {
5796  return sivector(v1) == v2;
5797 }
5798 
5800 inline bool operator==(const sivector& v1, const srmatrix_subv& v2) {
5801  return v1 == srvector(v2);
5802 }
5803 
5805 inline bool operator==(const srvector& v1, const simatrix_subv& v2) {
5806  return v1 == sivector(v2);
5807 }
5808 
5810 inline bool operator==(const sivector& v1, const simatrix_subv& v2) {
5811  return v1 == sivector(v2);
5812 }
5813 
5815 inline bool operator==(const sivector_slice& v1, const srmatrix_subv& v2) {
5816  return v1 == srvector(v2);
5817 }
5818 
5820 inline bool operator==(const srvector_slice& v1, const simatrix_subv& v2) {
5821  return v1 == sivector(v2);
5822 }
5823 
5825 inline bool operator==(const sivector_slice& v1, const simatrix_subv& v2) {
5826  return v1 == sivector(v2);
5827 }
5828 
5830 inline bool operator==(const ivector& v1, const srmatrix_subv& v2) {
5831  return v1 == srvector(v2);
5832 }
5833 
5835 inline bool operator==(const rvector& v1, const simatrix_subv& v2) {
5836  return v1 == sivector(v2);
5837 }
5838 
5840 inline bool operator==(const ivector& v1, const simatrix_subv& v2) {
5841  return v1 == sivector(v2);
5842 }
5843 
5845 inline bool operator==(const ivector_slice& v1, const srmatrix_subv& v2) {
5846  return v1 == srvector(v2);
5847 }
5848 
5850 inline bool operator==(const rvector_slice& v1, const simatrix_subv& v2) {
5851  return v1 == sivector(v2);
5852 }
5853 
5855 inline bool operator==(const ivector_slice& v1, const simatrix_subv& v2) {
5856  return v1 == sivector(v2);
5857 }
5858 
5860 inline bool operator!=(const simatrix_subv& v1, const srvector& v2) {
5861  return sivector(v1) != v2;
5862 }
5863 
5865 inline bool operator!=(const srmatrix_subv& v1, const sivector& v2) {
5866  return srvector(v1) != v2;
5867 }
5868 
5870 inline bool operator!=(const simatrix_subv& v1, const sivector& v2) {
5871  return sivector(v1) != v2;
5872 }
5873 
5875 inline bool operator!=(const simatrix_subv& v1, const srvector_slice& v2) {
5876  return sivector(v1) != v2;
5877 }
5878 
5880 inline bool operator!=(const srmatrix_subv& v1, const sivector_slice& v2) {
5881  return srvector(v1) != v2;
5882 }
5883 
5885 inline bool operator!=(const simatrix_subv& v1, const sivector_slice& v2) {
5886  return sivector(v1) != v2;
5887 }
5888 
5890 inline bool operator!=(const simatrix_subv& v1, const rvector& v2) {
5891  return sivector(v1) != v2;
5892 }
5893 
5895 inline bool operator!=(const srmatrix_subv& v1, const ivector& v2) {
5896  return srvector(v1) != v2;
5897 }
5898 
5900 inline bool operator!=(const simatrix_subv& v1, const ivector& v2) {
5901  return sivector(v1) != v2;
5902 }
5903 
5905 inline bool operator!=(const simatrix_subv& v1, const rvector_slice& v2) {
5906  return sivector(v1) != v2;
5907 }
5908 
5910 inline bool operator!=(const srmatrix_subv& v1, const ivector_slice& v2) {
5911  return srvector(v1) != v2;
5912 }
5913 
5915 inline bool operator!=(const simatrix_subv& v1, const ivector_slice& v2) {
5916  return sivector(v1) != v2;
5917 }
5918 
5920 inline bool operator!=(const sivector& v1, const srmatrix_subv& v2) {
5921  return v1 != srvector(v2);
5922 }
5923 
5925 inline bool operator!=(const srvector& v1, const simatrix_subv& v2) {
5926  return v1 != sivector(v2);
5927 }
5928 
5930 inline bool operator!=(const sivector& v1, const simatrix_subv& v2) {
5931  return v1 != sivector(v2);
5932 }
5933 
5935 inline bool operator!=(const sivector_slice& v1, const srmatrix_subv& v2) {
5936  return v1 != srvector(v2);
5937 }
5938 
5940 inline bool operator!=(const srvector_slice& v1, const simatrix_subv& v2) {
5941  return v1 != sivector(v2);
5942 }
5943 
5945 inline bool operator!=(const sivector_slice& v1, const simatrix_subv& v2) {
5946  return v1 != sivector(v2);
5947 }
5948 
5950 inline bool operator!=(const ivector& v1, const srmatrix_subv& v2) {
5951  return v1 != srvector(v2);
5952 }
5953 
5955 inline bool operator!=(const rvector& v1, const simatrix_subv& v2) {
5956  return v1 != sivector(v2);
5957 }
5958 
5960 inline bool operator!=(const ivector& v1, const simatrix_subv& v2) {
5961  return v1 != sivector(v2);
5962 }
5963 
5965 inline bool operator!=(const ivector_slice& v1, const srmatrix_subv& v2) {
5966  return v1 != srvector(v2);
5967 }
5968 
5970 inline bool operator!=(const rvector_slice& v1, const simatrix_subv& v2) {
5971  return v1 != sivector(v2);
5972 }
5973 
5975 inline bool operator!=(const ivector_slice& v1, const simatrix_subv& v2) {
5976  return v1 != sivector(v2);
5977 }
5978 
5980 inline bool operator<(const srmatrix_subv& v1, const sivector& v2) {
5981  return srvector(v1) < v2;
5982 }
5983 
5985 inline bool operator<(const simatrix_subv& v1, const sivector& v2) {
5986  return sivector(v1) < v2;
5987 }
5988 
5990 inline bool operator<(const srmatrix_subv& v1, const sivector_slice& v2) {
5991  return srvector(v1) < v2;
5992 }
5993 
5995 inline bool operator<(const simatrix_subv& v1, const sivector_slice& v2) {
5996  return sivector(v1) < v2;
5997 }
5998 
6000 inline bool operator<(const srmatrix_subv& v1, const ivector& v2) {
6001  return srvector(v1) < v2;
6002 }
6003 
6005 inline bool operator<(const simatrix_subv& v1, const ivector& v2) {
6006  return sivector(v1) < v2;
6007 }
6008 
6010 inline bool operator<(const srmatrix_subv& v1, const ivector_slice& v2) {
6011  return srvector(v1) < v2;
6012 }
6013 
6015 inline bool operator<(const simatrix_subv& v1, const ivector_slice& v2) {
6016  return sivector(v1) < v2;
6017 }
6018 
6020 inline bool operator<(const srvector& v1, const simatrix_subv& v2) {
6021  return v1 < sivector(v2);
6022 }
6023 
6025 inline bool operator<(const sivector& v1, const simatrix_subv& v2) {
6026  return v1 < sivector(v2);
6027 }
6028 
6030 inline bool operator<(const srvector_slice& v1, const simatrix_subv& v2) {
6031  return v1 < sivector(v2);
6032 }
6033 
6035 inline bool operator<(const sivector_slice& v1, const simatrix_subv& v2) {
6036  return v1 < sivector(v2);
6037 }
6038 
6040 inline bool operator<(const rvector& v1, const simatrix_subv& v2) {
6041  return v1 < sivector(v2);
6042 }
6043 
6045 inline bool operator<(const ivector& v1, const simatrix_subv& v2) {
6046  return v1 < sivector(v2);
6047 }
6048 
6050 inline bool operator<(const rvector_slice& v1, const simatrix_subv& v2) {
6051  return v1 < sivector(v2);
6052 }
6053 
6055 inline bool operator<(const ivector_slice& v1, const simatrix_subv& v2) {
6056  return v1 < sivector(v2);
6057 }
6058 
6060 inline bool operator<=(const srmatrix_subv& v1, const sivector& v2) {
6061  return srvector(v1) <= v2;
6062 }
6063 
6065 inline bool operator<=(const simatrix_subv& v1, const sivector& v2) {
6066  return sivector(v1) <= v2;
6067 }
6068 
6070 inline bool operator<=(const srmatrix_subv& v1, const sivector_slice& v2) {
6071  return srvector(v1) <= v2;
6072 }
6073 
6075 inline bool operator<=(const simatrix_subv& v1, const sivector_slice& v2) {
6076  return sivector(v1) <= v2;
6077 }
6078 
6080 inline bool operator<=(const srmatrix_subv& v1, const ivector& v2) {
6081  return srvector(v1) <= v2;
6082 }
6083 
6085 inline bool operator<=(const simatrix_subv& v1, const ivector& v2) {
6086  return sivector(v1) <= v2;
6087 }
6088 
6090 inline bool operator<=(const srmatrix_subv& v1, const ivector_slice& v2) {
6091  return srvector(v1) <= v2;
6092 }
6093 
6095 inline bool operator<=(const simatrix_subv& v1, const ivector_slice& v2) {
6096  return sivector(v1) <= v2;
6097 }
6098 
6100 inline bool operator<=(const srvector& v1, const simatrix_subv& v2) {
6101  return v1 <= sivector(v2);
6102 }
6103 
6105 inline bool operator<=(const sivector& v1, const simatrix_subv& v2) {
6106  return v1 <= sivector(v2);
6107 }
6108 
6110 inline bool operator<=(const srvector_slice& v1, const simatrix_subv& v2) {
6111  return v1 <= sivector(v2);
6112 }
6113 
6115 inline bool operator<=(const sivector_slice& v1, const simatrix_subv& v2) {
6116  return v1 <= sivector(v2);
6117 }
6118 
6120 inline bool operator<=(const rvector& v1, const simatrix_subv& v2) {
6121  return v1 <= sivector(v2);
6122 }
6123 
6125 inline bool operator<=(const ivector& v1, const simatrix_subv& v2) {
6126  return v1 <= sivector(v2);
6127 }
6128 
6130 inline bool operator<=(const rvector_slice& v1, const simatrix_subv& v2) {
6131  return v1 <= sivector(v2);
6132 }
6133 
6135 inline bool operator<=(const ivector_slice& v1, const simatrix_subv& v2) {
6136  return v1 <= sivector(v2);
6137 }
6138 
6140 inline bool operator>(const simatrix_subv& v1, const srvector& v2) {
6141  return sivector(v1) > v2;
6142 }
6143 
6145 inline bool operator>(const simatrix_subv& v1, const sivector& v2) {
6146  return sivector(v1) > v2;
6147 }
6148 
6150 inline bool operator>(const simatrix_subv& v1, const srvector_slice& v2) {
6151  return sivector(v1) > v2;
6152 }
6153 
6155 inline bool operator>(const simatrix_subv& v1, const sivector_slice& v2) {
6156  return sivector(v1) > v2;
6157 }
6158 
6160 inline bool operator>(const simatrix_subv& v1, const rvector& v2) {
6161  return sivector(v1) > v2;
6162 }
6163 
6165 inline bool operator>(const simatrix_subv& v1, const ivector& v2) {
6166  return sivector(v1) > v2;
6167 }
6168 
6170 inline bool operator>(const simatrix_subv& v1, const rvector_slice& v2) {
6171  return sivector(v1) > v2;
6172 }
6173 
6175 inline bool operator>(const simatrix_subv& v1, const ivector_slice& v2) {
6176  return sivector(v1) > v2;
6177 }
6178 
6180 inline bool operator>(const sivector& v1, const srmatrix_subv& v2) {
6181  return v1 > srvector(v2);
6182 }
6183 
6185 inline bool operator>(const sivector& v1, const simatrix_subv& v2) {
6186  return v1 > sivector(v2);
6187 }
6188 
6190 inline bool operator>(const sivector_slice& v1, const srmatrix_subv& v2) {
6191  return v1 > srvector(v2);
6192 }
6193 
6195 inline bool operator>(const sivector_slice& v1, const simatrix_subv& v2) {
6196  return v1 > sivector(v2);
6197 }
6198 
6200 inline bool operator>(const ivector& v1, const srmatrix_subv& v2) {
6201  return v1 > srvector(v2);
6202 }
6203 
6205 inline bool operator>(const ivector& v1, const simatrix_subv& v2) {
6206  return v1 > sivector(v2);
6207 }
6208 
6210 inline bool operator>(const ivector_slice& v1, const srmatrix_subv& v2) {
6211  return v1 > srvector(v2);
6212 }
6213 
6215 inline bool operator>(const ivector_slice& v1, const simatrix_subv& v2) {
6216  return v1 > sivector(v2);
6217 }
6218 
6220 inline bool operator>=(const simatrix_subv& v1, const srvector& v2) {
6221  return sivector(v1) >= v2;
6222 }
6223 
6225 inline bool operator>=(const simatrix_subv& v1, const sivector& v2) {
6226  return sivector(v1) >= v2;
6227 }
6228 
6230 inline bool operator>=(const simatrix_subv& v1, const srvector_slice& v2) {
6231  return sivector(v1) >= v2;
6232 }
6233 
6235 inline bool operator>=(const simatrix_subv& v1, const sivector_slice& v2) {
6236  return sivector(v1) >= v2;
6237 }
6238 
6240 inline bool operator>=(const simatrix_subv& v1, const rvector& v2) {
6241  return sivector(v1) >= v2;
6242 }
6243 
6245 inline bool operator>=(const simatrix_subv& v1, const ivector& v2) {
6246  return sivector(v1) >= v2;
6247 }
6248 
6250 inline bool operator>=(const simatrix_subv& v1, const rvector_slice& v2) {
6251  return sivector(v1) >= v2;
6252 }
6253 
6255 inline bool operator>=(const simatrix_subv& v1, const ivector_slice& v2) {
6256  return sivector(v1) >= v2;
6257 }
6258 
6260 inline bool operator>=(const sivector& v1, const srmatrix_subv& v2) {
6261  return v1 >= srvector(v2);
6262 }
6263 
6265 inline bool operator>=(const sivector& v1, const simatrix_subv& v2) {
6266  return v1 >= sivector(v2);
6267 }
6268 
6270 inline bool operator>=(const sivector_slice& v1, const srmatrix_subv& v2) {
6271  return v1 >= srvector(v2);
6272 }
6273 
6275 inline bool operator>=(const sivector_slice& v1, const simatrix_subv& v2) {
6276  return v1 >= sivector(v2);
6277 }
6278 
6280 inline bool operator>=(const ivector& v1, const srmatrix_subv& v2) {
6281  return v1 >= srvector(v2);
6282 }
6283 
6285 inline bool operator>=(const ivector& v1, const simatrix_subv& v2) {
6286  return v1 >= sivector(v2);
6287 }
6288 
6290 inline bool operator>=(const ivector_slice& v1, const srmatrix_subv& v2) {
6291  return v1 >= srvector(v2);
6292 }
6293 
6295 inline bool operator>=(const ivector_slice& v1, const simatrix_subv& v2) {
6296  return v1 >= sivector(v2);
6297 }
6298 
6300 inline bool operator!(const simatrix_subv& x) {
6301  return sv_v_not(x);
6302 }
6303 
6305 
6308 inline void accumulate(idotprecision& dot, const simatrix_subv& v1, const simatrix_subv& v2) {
6309  spsp_vv_accu<idotprecision,sivector,sivector,sparse_idot>(dot, sivector(v1), sivector(v2));
6310 }
6311 
6313 
6316 inline void accumulate(idotprecision& dot, const simatrix_subv& v1, const srmatrix_subv& v2) {
6317  spsp_vv_accu<idotprecision,sivector,srvector,sparse_idot>(dot, sivector(v1), srvector(v2));
6318 }
6319 
6321 
6324 inline void accumulate(idotprecision& dot, const srmatrix_subv& v1, const simatrix_subv& v2) {
6325  spsp_vv_accu<idotprecision,srvector,sivector,sparse_idot>(dot, srvector(v1), sivector(v2));
6326 }
6327 
6329 
6332 inline void accumulate(idotprecision& dot, const simatrix_subv& v1, const sivector& v2) {
6333  spsp_vv_accu<idotprecision,sivector,sivector,sparse_idot>(dot, sivector(v1), v2);
6334 }
6335 
6337 
6340 inline void accumulate(idotprecision& dot, const simatrix_subv& v1, const srvector& v2) {
6341  spsp_vv_accu<idotprecision,sivector,srvector,sparse_idot>(dot, sivector(v1), v2);
6342 }
6343 
6345 
6348 inline void accumulate(idotprecision& dot, const srmatrix_subv& v1, const sivector& v2) {
6349  spsp_vv_accu<idotprecision,srvector,sivector,sparse_idot>(dot, srvector(v1), v2);
6350 }
6351 
6353 
6356 inline void accumulate(idotprecision& dot, const simatrix_subv& v1, const sivector_slice& v2) {
6357  spsl_vv_accu<idotprecision,sivector,sivector_slice,sparse_idot>(dot, sivector(v1), v2);
6358 }
6359 
6361 
6364 inline void accumulate(idotprecision& dot, const simatrix_subv& v1, const srvector_slice& v2) {
6365  spsl_vv_accu<idotprecision,sivector,srvector_slice,sparse_idot>(dot, sivector(v1), v2);
6366 }
6367 
6369 
6372 inline void accumulate(idotprecision& dot, const srmatrix_subv& v1, const sivector_slice& v2) {
6373  spsl_vv_accu<idotprecision,srvector,sivector_slice,sparse_idot>(dot, srvector(v1), v2);
6374 }
6375 
6377 
6380 inline void accumulate(idotprecision& dot, const simatrix_subv& v1, const ivector& v2) {
6381  spf_vv_accu<idotprecision,sivector,ivector,sparse_idot>(dot, sivector(v1), v2);
6382 }
6383 
6385 
6388 inline void accumulate(idotprecision& dot, const simatrix_subv& v1, const rvector& v2) {
6389  spf_vv_accu<idotprecision,sivector,rvector,sparse_idot>(dot, sivector(v1), v2);
6390 }
6391 
6393 
6396 inline void accumulate(idotprecision& dot, const srmatrix_subv& v1, const ivector& v2) {
6397  spf_vv_accu<idotprecision,srvector,ivector,sparse_idot>(dot, srvector(v1), v2);
6398 }
6399 
6401 
6404 inline void accumulate(idotprecision& dot, const simatrix_subv& v1, const ivector_slice& v2) {
6405  spf_vv_accu<idotprecision,sivector,ivector_slice,sparse_idot>(dot, sivector(v1), v2);
6406 }
6407 
6409 
6412 inline void accumulate(idotprecision& dot, const simatrix_subv& v1, const rvector_slice& v2) {
6413  spf_vv_accu<idotprecision,sivector,rvector_slice,sparse_idot>(dot, sivector(v1), v2);
6414 }
6415 
6417 
6420 inline void accumulate(idotprecision& dot, const srmatrix_subv& v1, const ivector_slice& v2) {
6421  spf_vv_accu<idotprecision,srvector,ivector_slice,sparse_idot>(dot, srvector(v1), v2);
6422 }
6423 
6425 
6428 inline void accumulate(idotprecision& dot, const sivector& v1, const simatrix_subv& v2) {
6429  spsp_vv_accu<idotprecision,sivector,sivector,sparse_idot>(dot, v1, sivector(v2));
6430 }
6431 
6433 
6436 inline void accumulate(idotprecision& dot, const sivector& v1, const srmatrix_subv& v2) {
6437  spsp_vv_accu<idotprecision,sivector,srvector,sparse_idot>(dot, v1, srvector(v2));
6438 }
6439 
6441 
6444 inline void accumulate(idotprecision& dot, const srvector& v1, const simatrix_subv& v2) {
6445  spsp_vv_accu<idotprecision,srvector,sivector,sparse_idot>(dot, v1, sivector(v2));
6446 }
6447 
6449 
6452 inline void accumulate(idotprecision& dot, const sivector_slice& v1, const simatrix_subv& v2) {
6453  slsp_vv_accu<idotprecision,sivector_slice,sivector,sparse_idot>(dot, v1, sivector(v2));
6454 }
6455 
6457 
6460 inline void accumulate(idotprecision& dot, const sivector_slice& v1, const srmatrix_subv& v2) {
6461  slsp_vv_accu<idotprecision,sivector_slice,srvector,sparse_idot>(dot, v1, srvector(v2));
6462 }
6463 
6465 
6468 inline void accumulate(idotprecision& dot, const srvector_slice& v1, const simatrix_subv& v2) {
6469  slsp_vv_accu<idotprecision,srvector_slice,sivector,sparse_idot>(dot, v1, sivector(v2));
6470 }
6471 
6473 
6476 inline void accumulate(idotprecision& dot, const ivector& v1, const simatrix_subv& v2) {
6477  fsp_vv_accu<idotprecision,ivector,sivector,sparse_idot>(dot, v1, sivector(v2));
6478 }
6479 
6481 
6484 inline void accumulate(idotprecision& dot, const ivector& v1, const srmatrix_subv& v2) {
6485  fsp_vv_accu<idotprecision,ivector,srvector,sparse_idot>(dot, v1, srvector(v2));
6486 }
6487 
6489 
6492 inline void accumulate(idotprecision& dot, const rvector& v1, const simatrix_subv& v2) {
6493  fsp_vv_accu<idotprecision,rvector,sivector,sparse_idot>(dot, v1, sivector(v2));
6494 }
6495 
6497 
6500 inline void accumulate(idotprecision& dot, const ivector_slice& v1, const simatrix_subv& v2) {
6501  fsp_vv_accu<idotprecision,ivector_slice,sivector,sparse_idot>(dot, v1, sivector(v2));
6502 }
6503 
6505 
6508 inline void accumulate(idotprecision& dot, const ivector_slice& v1, const srmatrix_subv& v2) {
6509  fsp_vv_accu<idotprecision,ivector_slice,srvector,sparse_idot>(dot, v1, srvector(v2));
6510 }
6511 
6513 
6516 inline void accumulate(idotprecision& dot, const rvector_slice& v1, const simatrix_subv& v2) {
6517  fsp_vv_accu<idotprecision,rvector_slice,sivector,sparse_idot>(dot, v1, sivector(v2));
6518 }
6519 
6521 
6524 inline void accumulate(cidotprecision& dot, const simatrix_subv& v1, const simatrix_subv& v2) {
6525  idotprecision tmp(0.0);
6526  tmp.set_k(dot.get_k());
6527  accumulate(tmp,sivector(v1),sivector(v2));
6528  SetRe(dot, Re(dot) + tmp);
6529 }
6530 
6532 
6535 inline void accumulate(cidotprecision& dot, const simatrix_subv& v1, const srmatrix_subv& v2) {
6536  idotprecision tmp(0.0);
6537  tmp.set_k(dot.get_k());
6538  accumulate(tmp,sivector(v1),srvector(v2));
6539  SetRe(dot, Re(dot) + tmp);
6540 }
6541 
6543 
6546 inline void accumulate(cidotprecision& dot, const srmatrix_subv& v1, const simatrix_subv& v2) {
6547  idotprecision tmp(0.0);
6548  tmp.set_k(dot.get_k());
6549  accumulate(tmp,srvector(v1),sivector(v2));
6550  SetRe(dot, Re(dot) + tmp);
6551 }
6552 
6554 
6557 inline void accumulate(cidotprecision& dot, const simatrix_subv& v1, const sivector& v2) {
6558  idotprecision tmp(0.0);
6559  tmp.set_k(dot.get_k());
6560  accumulate(tmp,sivector(v1),v2);
6561  SetRe(dot, Re(dot) + tmp);
6562 }
6563 
6565 
6568 inline void accumulate(cidotprecision& dot, const simatrix_subv& v1, const srvector& v2) {
6569  idotprecision tmp(0.0);
6570  tmp.set_k(dot.get_k());
6571  accumulate(tmp,sivector(v1),v2);
6572  SetRe(dot, Re(dot) + tmp);
6573 }
6574 
6576 
6579 inline void accumulate(cidotprecision& dot, const srmatrix_subv& v1, const sivector& v2) {
6580  idotprecision tmp(0.0);
6581  tmp.set_k(dot.get_k());
6582  accumulate(tmp,srvector(v1),v2);
6583  SetRe(dot, Re(dot) + tmp);
6584 }
6585 
6587 
6590 inline void accumulate(cidotprecision& dot, const simatrix_subv& v1, const sivector_slice& v2) {
6591  idotprecision tmp(0.0);
6592  tmp.set_k(dot.get_k());
6593  accumulate(tmp,sivector(v1),v2);
6594  SetRe(dot, Re(dot) + tmp);
6595 }
6596 
6598 
6601 inline void accumulate(cidotprecision& dot, const simatrix_subv& v1, const srvector_slice& v2) {
6602  idotprecision tmp(0.0);
6603  tmp.set_k(dot.get_k());
6604  accumulate(tmp,sivector(v1),v2);
6605  SetRe(dot, Re(dot) + tmp);
6606 }
6607 
6609 
6612 inline void accumulate(cidotprecision& dot, const srmatrix_subv& v1, const sivector_slice& v2) {
6613  idotprecision tmp(0.0);
6614  tmp.set_k(dot.get_k());
6615  accumulate(tmp,srvector(v1),v2);
6616  SetRe(dot, Re(dot) + tmp);
6617 }
6618 
6620 
6623 inline void accumulate(cidotprecision& dot, const simatrix_subv& v1, const ivector& v2) {
6624  idotprecision tmp(0.0);
6625  tmp.set_k(dot.get_k());
6626  accumulate(tmp,sivector(v1),v2);
6627  SetRe(dot, Re(dot) + tmp);
6628 }
6629 
6631 
6634 inline void accumulate(cidotprecision& dot, const simatrix_subv& v1, const rvector& v2) {
6635  idotprecision tmp(0.0);
6636  tmp.set_k(dot.get_k());
6637  accumulate(tmp,sivector(v1),v2);
6638  SetRe(dot, Re(dot) + tmp);
6639 }
6640 
6642 
6645 inline void accumulate(cidotprecision& dot, const srmatrix_subv& v1, const ivector& v2) {
6646  idotprecision tmp(0.0);
6647  tmp.set_k(dot.get_k());
6648  accumulate(tmp,srvector(v1),v2);
6649  SetRe(dot, Re(dot) + tmp);
6650 }
6651 
6653 
6656 inline void accumulate(cidotprecision& dot, const simatrix_subv& v1, const ivector_slice& v2) {
6657  idotprecision tmp(0.0);
6658  tmp.set_k(dot.get_k());
6659  accumulate(tmp,sivector(v1),v2);
6660  SetRe(dot, Re(dot) + tmp);
6661 }
6662 
6664 
6667 inline void accumulate(cidotprecision& dot, const simatrix_subv& v1, const rvector_slice& v2) {
6668  idotprecision tmp(0.0);
6669  tmp.set_k(dot.get_k());
6670  accumulate(tmp,sivector(v1),v2);
6671  SetRe(dot, Re(dot) + tmp);
6672 }
6673 
6675 
6678 inline void accumulate(cidotprecision& dot, const srmatrix_subv& v1, const ivector_slice& v2) {
6679  idotprecision tmp(0.0);
6680  tmp.set_k(dot.get_k());
6681  accumulate(tmp,srvector(v1),v2);
6682  SetRe(dot, Re(dot) + tmp);
6683 }
6684 
6686 
6689 inline void accumulate(cidotprecision& dot, const sivector& v1, const simatrix_subv& v2) {
6690  idotprecision tmp(0.0);
6691  tmp.set_k(dot.get_k());
6692  accumulate(tmp,v1,sivector(v2));
6693  SetRe(dot, Re(dot) + tmp);
6694 }
6695 
6697 
6700 inline void accumulate(cidotprecision& dot, const sivector& v1, const srmatrix_subv& v2) {
6701  idotprecision tmp(0.0);
6702  tmp.set_k(dot.get_k());
6703  accumulate(tmp,v1,srvector(v2));
6704  SetRe(dot, Re(dot) + tmp);
6705 }
6706 
6708 
6711 inline void accumulate(cidotprecision& dot, const srvector& v1, const simatrix_subv& v2) {
6712  idotprecision tmp(0.0);
6713  tmp.set_k(dot.get_k());
6714  accumulate(tmp,v1,sivector(v2));
6715  SetRe(dot, Re(dot) + tmp);
6716 }
6717 
6719 
6722 inline void accumulate(cidotprecision& dot, const sivector_slice& v1, const simatrix_subv& v2) {
6723  idotprecision tmp(0.0);
6724  tmp.set_k(dot.get_k());
6725  accumulate(tmp,v1,sivector(v2));
6726  SetRe(dot, Re(dot) + tmp);
6727 }
6728 
6730 
6733 inline void accumulate(cidotprecision& dot, const sivector_slice& v1, const srmatrix_subv& v2) {
6734  idotprecision tmp(0.0);
6735  tmp.set_k(dot.get_k());
6736  accumulate(tmp,v1,srvector(v2));
6737  SetRe(dot, Re(dot) + tmp);
6738 }
6739 
6741 
6744 inline void accumulate(cidotprecision& dot, const srvector_slice& v1, const simatrix_subv& v2) {
6745  idotprecision tmp(0.0);
6746  tmp.set_k(dot.get_k());
6747  accumulate(tmp,v1,sivector(v2));
6748  SetRe(dot, Re(dot) + tmp);
6749 }
6750 
6752 
6755 inline void accumulate(cidotprecision& dot, const ivector& v1, const simatrix_subv& v2) {
6756  idotprecision tmp(0.0);
6757  tmp.set_k(dot.get_k());
6758  accumulate(tmp,v1,sivector(v2));
6759  SetRe(dot, Re(dot) + tmp);
6760 }
6761 
6763 
6766 inline void accumulate(cidotprecision& dot, const ivector& v1, const srmatrix_subv& v2) {
6767  idotprecision tmp(0.0);
6768  tmp.set_k(dot.get_k());
6769  accumulate(tmp,v1,srvector(v2));
6770  SetRe(dot, Re(dot) + tmp);
6771 }
6772 
6774 
6777 inline void accumulate(cidotprecision& dot, const rvector& v1, const simatrix_subv& v2) {
6778  idotprecision tmp(0.0);
6779  tmp.set_k(dot.get_k());
6780  accumulate(tmp,v1,sivector(v2));
6781  SetRe(dot, Re(dot) + tmp);
6782 }
6783 
6785 
6788 inline void accumulate(cidotprecision& dot, const ivector_slice& v1, const simatrix_subv& v2) {
6789  idotprecision tmp(0.0);
6790  tmp.set_k(dot.get_k());
6791  accumulate(tmp,v1,sivector(v2));
6792  SetRe(dot, Re(dot) + tmp);
6793 }
6794 
6796 
6799 inline void accumulate(cidotprecision& dot, const ivector_slice& v1, const srmatrix_subv& v2) {
6800  idotprecision tmp(0.0);
6801  tmp.set_k(dot.get_k());
6802  accumulate(tmp,v1,srvector(v2));
6803  SetRe(dot, Re(dot) + tmp);
6804 }
6805 
6807 
6810 inline void accumulate(cidotprecision& dot, const rvector_slice& v1, const simatrix_subv& v2) {
6811  idotprecision tmp(0.0);
6812  tmp.set_k(dot.get_k());
6813  accumulate(tmp,v1,sivector(v2));
6814  SetRe(dot, Re(dot) + tmp);
6815 }
6816 
6817 } //namespace cxsc;
6818 
6819 #include "sparsematrix.inl"
6820 
6821 #endif
6822 
simatrix_slice & operator-=(const rmatrix &M)
Assigns the element wise difference of the sparse slice and M to the slice.
Definition: simatrix.hpp:2692
simatrix_slice & operator+=(const rmatrix &M)
Assigns the element wise sum of the sparse slice and M to the slice.
Definition: simatrix.hpp:2644
friend void SetUb(simatrix &, const int, const int)
Sets the upper index bound of the rows (i==ROW) or columns (i==COL) to j.
Definition: simatrix.hpp:989
friend srmatrix mid(const simatrix &)
Returns the midpoint matrix for A.
Definition: simatrix.hpp:1166
imatrix & operator-=(const simatrix &)
Implementation of substraction and assignment operator.
Definition: simatrix.hpp:1991
simatrix_slice & operator=(const interval &C)
Assing C to all elements of the slice.
Definition: simatrix.hpp:2501
simatrix_slice & operator|=(const simatrix_slice &M)
Assigns the element wise convex hull of the sparse slice and M to the slice.
Definition: simatrix.hpp:2722
simatrix_subv & operator=(const srvector_slice &v)
Assigns a vector to a subvector.
Definition: simatrix.hpp:4460
The Data Type rmatrix_slice.
Definition: rmatrix.hpp:1442
simatrix & operator*=(const simatrix &B)
Multiply the sparse matrix by B and assign the result to it.
Definition: simatrix.hpp:774
interval & operator[](const int i)
Returns a reference to the i-th element of the subvector.
Definition: simatrix.hpp:4403
simatrix(const int ms, const int ns, const imatrix &A)
Constructor for banded matrices.
Definition: simatrix.hpp:416
sivector()
Default constructor, creates an empty vector of size 0.
Definition: sivector.hpp:69
simatrix & operator&=(const imatrix &B)
Form the intersection of a sparse matrix and B and assign the result to it.
Definition: simatrix.hpp:829
The Data Type imatrix_subv.
Definition: imatrix.hpp:55
The Data Type idotprecision.
Definition: idot.hpp:47
simatrix & operator+=(const imatrix &B)
Add B to the sparse matrix and assign the result to it.
Definition: simatrix.hpp:694
friend simatrix Im(const scimatrix &)
Returns the imaginary part of the matrix A.
Definition: scimatrix.hpp:1401
std::vector< int > & row_indices()
Returns a reference to the vector containing the row indices (the array)
Definition: simatrix.hpp:87
friend int Lb(const simatrix &, int)
Returns the lower index bound for the rows or columns of A.
Definition: simatrix.hpp:1003
const std::vector< interval > & values() const
Returns a constant reference to the vector containing the stored values (the array) ...
Definition: simatrix.hpp:107
interval & element(const int i, const int j)
Returns a reference to the element (i,j) of the matrix.
Definition: simatrix.hpp:2782
imatrix_slice & operator*=(const imatrix &m)
Implementation of multiplication and allocation operation.
Definition: imatrix.inl:1094
The Data Type intmatrix.
Definition: intmatrix.hpp:313
simatrix(const int m, const int n, const int nnz, const int *rows, const int *cols, const interval *values, const enum STORAGE_TYPE t=triplet)
Creates a sparse matrix out of three arrays forming a matrix stored in triplet, compressed row or com...
Definition: simatrix.hpp:254
simatrix_slice & operator*=(const srmatrix_slice &M)
Assigns the product of the sparse slice and M to the slice.
Definition: simatrix.hpp:2548
simatrix(const int m, const int n, const int nnz, const intvector &rows, const intvector &cols, const ivector &values, const enum STORAGE_TYPE t=triplet)
Creates a sparse matrix out of three vectors (arrays) forming a matrix stored in triplet, compressed row or compressed column storage.
Definition: simatrix.hpp:143
simatrix_slice & operator*=(const real &r)
Assigns the component wise product of the sparse slice and r to the slice.
Definition: simatrix.hpp:2596
Represents a row or column vector of a sparse matrix.
Definition: simatrix.hpp:4383
simatrix & operator*=(const rmatrix &B)
Multiply the sparse matrix by B and assign the result to it.
Definition: simatrix.hpp:754
simatrix & operator=(const interval &A)
Assigns an interval value to all elements of the matrix (resulting in a dense matrix!) ...
Definition: simatrix.hpp:502
simatrix_slice & operator*=(const imatrix_slice &M)
Assigns the product of the sparse slice and M to the slice.
Definition: simatrix.hpp:2590
simatrix & operator|=(const imatrix_slice &B)
Form the convex hull of a sparse matrix and B and assign the result to it.
Definition: simatrix.hpp:814
simatrix & operator-=(const rmatrix_slice &B)
Subtract B from the sparse matrix and assign the result to it.
Definition: simatrix.hpp:729
const std::vector< int > & row_indices() const
Returns a constant reference to the vector containing the row indices (the array) ...
Definition: simatrix.hpp:102
The namespace cxsc, providing all functionality of the class library C-XSC.
Definition: cdot.cpp:29
civector operator*(const cimatrix_subv &rv, const cinterval &s)
Implementation of multiplication operation.
Definition: cimatrix.inl:731
simatrix & operator&=(const imatrix_slice &B)
Form the convex hull of a sparse matrix and B and assign the result to it.
Definition: simatrix.hpp:834
simatrix_slice & operator|=(const rmatrix_slice &M)
Assigns the element wise convex hull of the sparse slice and M to the slice.
Definition: simatrix.hpp:2752
simatrix_slice & operator=(const imatrix &C)
Assing C to the slice.
Definition: simatrix.hpp:2521
simatrix(const imatrix &A)
Creates a sparse matrix out of a dense matrix A. Only the non zero elements of A are stored explicitl...
Definition: simatrix.hpp:390
simatrix_slice & operator/=(const interval &r)
Assigns the component wise division of the sparse slice and M to the slice.
Definition: simatrix.hpp:2614
simatrix & operator*=(const rmatrix_slice &B)
Multiply the sparse matrix by B and assign the result to it.
Definition: simatrix.hpp:759
simatrix & operator=(const rmatrix_slice &A)
Assigns a dense matrix slice to the sparse matrix. Only the non zero entries of the dense matrix are ...
Definition: simatrix.hpp:517
simatrix_slice & operator|=(const srmatrix &M)
Assigns the element wise convex hull of the sparse slice and M to the slice.
Definition: simatrix.hpp:2728
simatrix_subv operator[](const int)
Returns a row of the matrix.
Definition: simatrix.hpp:4673
simatrix & operator|=(const simatrix &B)
Form the convex hull of a sparse matrix and B and assign the result to it.
Definition: simatrix.hpp:824
The Scalar Type interval.
Definition: interval.hpp:54
simatrix & operator+=(const imatrix_slice &B)
Add B to the sparse matrix and assign the result to it.
Definition: simatrix.hpp:704
imatrix_slice & operator&=(const imatrix &m1)
Allocates the intersection of the arguments to the first argument.
Definition: imatrix.inl:1564
const interval operator()(const int i, const int j) const
Returns a copy of the element (i,j) of the matrix.
Definition: simatrix.hpp:2768
A sparse interval vector.
Definition: sivector.hpp:59
simatrix_subv & operator=(const srvector &v)
Assigns a vector to a subvector.
Definition: simatrix.hpp:4450
real AbsMin(const interval &x)
Computes the smallest absolute value .
Definition: interval.cpp:293
int VecLen(const scimatrix_subv &S)
Returns the length of the subvector.
Definition: scimatrix.hpp:9966
simatrix_subv & operator=(const interval &v)
Assigns v to all elements of the subvector.
Definition: simatrix.hpp:4445
friend std::istream & operator>>(std::istream &, simatrix_slice &)
Standard input operator for sparse matrix slice.
Definition: simatrix.hpp:4369
simatrix & operator-=(const rmatrix &B)
Subtract B from the sparse matrix and assign the result to it.
Definition: simatrix.hpp:719
simatrix_slice & operator=(const imatrix_slice &C)
Assing C to the slice.
Definition: simatrix.hpp:2531
imatrix_subv & operator&=(const sivector &rv)
Implementation of subtraction and allocation operation.
Definition: simatrix.hpp:5694
int get_nnz() const
Returns the number of non-zero entries (including explicitly stored zeros).
Definition: simatrix.hpp:684
A sparse complex interval matrix.
Definition: scimatrix.hpp:71
friend simatrix abs(const simatrix &)
Returns the componentwise absolute value as the interval hull of .
Definition: simatrix.hpp:1087
A sparse real matrix.
Definition: srmatrix.hpp:77
simatrix & operator*=(const imatrix &B)
Multiply the sparse matrix by B and assign the result to it.
Definition: simatrix.hpp:749
simatrix_slice & operator-=(const srmatrix_slice &M)
Assigns the element wise difference of the sparse slice and M to the slice.
Definition: simatrix.hpp:2668
interval & element(int i, int j)
Returns a reference to the element (i,j) of the matrix.
Definition: simatrix.hpp:579
simatrix_slice & operator*=(const simatrix &M)
Assigns the product of the sparse slice and M to the slice.
Definition: simatrix.hpp:2566
simatrix_slice & operator-=(const imatrix &M)
Assigns the element wise difference of the sparse slice and M to the slice.
Definition: simatrix.hpp:2698
void dropzeros()
Drops explicitly stored zeros from the data structure.
Definition: simatrix.hpp:473
simatrix & operator=(const imatrix_slice &A)
Assigns a dense matrix slice to the sparse matrix. Only the non zero entries of the dense matrix are ...
Definition: simatrix.hpp:522
imatrix & operator+=(const simatrix &)
Implementation of addition and assignment operator.
Definition: simatrix.hpp:1975
const interval operator[](const int i) const
Returns a copy of the i-th element of the subvector.
Definition: simatrix.hpp:4423
simatrix & operator*=(const imatrix_slice &B)
Multiply the sparse matrix by B and assign the result to it.
Definition: simatrix.hpp:764
simatrix_slice & operator-=(const srmatrix &M)
Assigns the element wise difference of the sparse slice and M to the slice.
Definition: simatrix.hpp:2680
simatrix_slice & operator+=(const rmatrix_slice &M)
Assigns the element wise sum of the sparse slice and M to the slice.
Definition: simatrix.hpp:2656
simatrix_slice & operator+=(const srmatrix_slice &M)
Assigns the element wise sum of the sparse slice and M to the slice.
Definition: simatrix.hpp:2620
simatrix & operator+=(const rmatrix_slice &B)
Add B to the sparse matrix and assign the result to it.
Definition: simatrix.hpp:699
friend simatrix Id(const simatrix &)
Return a sparse unity matrix of the same dimension as A.
Definition: simatrix.hpp:911
simatrix_subv & operator=(const real &v)
Assigns v to all elements of the subvector.
Definition: simatrix.hpp:4440
A sparse complex interval vector.
Definition: scivector.hpp:62
imatrix_slice & operator+=(const imatrix &m1)
Implementation of addition and allocation operation.
Definition: imatrix.inl:1352
simatrix operator()(const intmatrix &P)
Performs a row permutation using the permutation matrix P. Faster than explicitly computing the produ...
Definition: simatrix.hpp:673
friend srmatrix absmax(const simatrix &)
Returns the componentwise maximum absolute value.
Definition: simatrix.hpp:1123
The Data Type ivector_slice.
Definition: ivector.hpp:962
simatrix_slice & operator|=(const imatrix_slice &M)
Assigns the element wise convex hull of the sparse slice and M to the slice.
Definition: simatrix.hpp:2758
friend srmatrix Sup(const simatrix &)
Returns the Supremum of the matrix A.
Definition: simatrix.hpp:1069
simatrix_slice & operator-=(const imatrix_slice &M)
Assigns the element wise difference of the sparse slice and M to the slice.
Definition: simatrix.hpp:2710
The Data Type cidotprecision.
Definition: cidot.hpp:57
std::vector< interval > & values()
Returns a reference to the vector containing the stored values (the array)
Definition: simatrix.hpp:92
The Data Type imatrix_slice.
Definition: imatrix.hpp:1441
A sparse real vector.
Definition: srvector.hpp:58
The Data Type rvector_slice.
Definition: rvector.hpp:1063
friend int Ub(const simatrix &, int)
Returns the upper index bound for the rows or columns of A.
Definition: simatrix.hpp:1016
friend simatrix Re(const scimatrix &)
Returns the real part of the matrix A.
Definition: scimatrix.hpp:1383
imatrix & operator&=(const simatrix &)
Implementation of intersection and assignment operator.
Definition: simatrix.hpp:2039
simatrix_subv & operator=(const srmatrix_subv &v)
Assigns a vector to a subvector.
Definition: simatrix.hpp:4490
void full(imatrix &A) const
Creates a full matrix out of the sparse matrix and stores it in A. This should normally be done using...
Definition: simatrix.hpp:458
simatrix & operator+=(const simatrix &B)
Add B to the sparse matrix and assign the result to it.
Definition: simatrix.hpp:714
A slice of a sparse real interval matrix.
Definition: simatrix.hpp:2431
simatrix_subv & operator*=(const real &)
Assign the componentwise product of the subvector with a scalar to the subvector. ...
Definition: simatrix.hpp:5449
imatrix_subv & operator=(const simatrix_subv &rv)
Implementation of standard assigning operator.
Definition: simatrix.hpp:5734
std::vector< int > & column_pointers()
Returns a reference to the vector containing the column pointers (the array)
Definition: simatrix.hpp:82
simatrix & operator=(const rmatrix &A)
Assigns a dense matrix to the sparse matrix. Only the non zero entries of the dense matrix are used...
Definition: simatrix.hpp:507
simatrix_slice & operator*=(const imatrix &M)
Assigns the product of the sparse slice and M to the slice.
Definition: simatrix.hpp:2578
simatrix_slice & operator-=(const simatrix_slice &M)
Assigns the element wise difference of the sparse slice and M to the slice.
Definition: simatrix.hpp:2674
simatrix & operator-=(const simatrix &B)
Subtract B from the sparse matrix and assign the result to it.
Definition: simatrix.hpp:744
The Data Type rvector.
Definition: rvector.hpp:57
const interval operator()(int i, int j) const
Returns a copy of the element in row i and column j.
Definition: simatrix.hpp:558
friend srmatrix Inf(const simatrix &)
Returns the Infimum of the matrix A.
Definition: simatrix.hpp:1051
friend srmatrix CompMat(const simatrix &)
Returns Ostroswkis comparison matrix for A.
Definition: simatrix.hpp:1141
simatrix(const int r, const int c)
Creates an empty matrix with r rows and c columns, pre-reserving space for 2*(r+c) elements...
Definition: simatrix.hpp:119
simatrix_slice & operator|=(const rmatrix &M)
Assigns the element wise convex hull of the sparse slice and M to the slice.
Definition: simatrix.hpp:2740
simatrix & operator&=(const simatrix &B)
Form the convex hull of a sparse matrix and B and assign the result to it.
Definition: simatrix.hpp:839
simatrix_slice & operator+=(const simatrix &M)
Assigns the element wise sum of the sparse slice and M to the slice.
Definition: simatrix.hpp:2638
int get_nnz() const
Returns the number of non-zero entries (including explicitly stored zeros).
Definition: srmatrix.hpp:630
simatrix & operator+=(const srmatrix &B)
Add B to the sparse matrix and assign the result to it.
Definition: simatrix.hpp:709
A slice of a sparse real matrix.
Definition: srmatrix.hpp:1360
friend int RowLen(const simatrix &)
Returns the number of columns of the matrix.
Definition: simatrix.hpp:1026
simatrix operator()(const intvector &pervec, const intvector &q)
Performs a row and column permutation using two permutation vectors.
Definition: simatrix.hpp:615
simatrix_slice & operator|=(const simatrix &M)
Assigns the element wise convex hull of the sparse slice and M to the slice.
Definition: simatrix.hpp:2734
imatrix_subv & operator+=(const interval &c)
Implementation of addition and allocation operation.
Definition: imatrix.inl:492
simatrix & operator=(const srmatrix &A)
Assign a sparse real to a sparse interval matrix.
Definition: simatrix.hpp:527
friend srmatrix diam(const simatrix &)
Returns the componentwise diameter of A.
Definition: simatrix.hpp:1184
real density() const
Returns the density (the number of non-zeros divided by the number of elements) of the matrix...
Definition: simatrix.hpp:679
void set_k(unsigned int i)
Set precision for computation of dot products.
Definition: idot.hpp:88
void Resize(cimatrix &A)
Resizes the matrix.
Definition: cimatrix.inl:1211
simatrix_slice & operator=(const rmatrix_slice &C)
Assing C to the slice.
Definition: simatrix.hpp:2526
simatrix & operator|=(const rmatrix &B)
Form the convex hull of a sparse matrix and B and assign the result to it.
Definition: simatrix.hpp:799
simatrix_slice & operator=(const rmatrix &C)
Assing C to the slice.
Definition: simatrix.hpp:2516
simatrix_slice & operator+=(const imatrix_slice &M)
Assigns the element wise sum of the sparse slice and M to the slice.
Definition: simatrix.hpp:2662
Helper class for slices of sparse vectors.
Definition: sivector.hpp:1831
simatrix & operator/=(const real &r)
Divide all elements of the sparse matrix by r and assign the result to it.
Definition: simatrix.hpp:789
simatrix & operator|=(const imatrix &B)
Form the convex hull of a sparse matrix and B and assign the result to it.
Definition: simatrix.hpp:804
simatrix_slice & operator=(const real &C)
Assing C to all elements of the slice.
Definition: simatrix.hpp:2496
friend void SetLb(simatrix &, const int, const int)
Sets the lower index bound of the rows (i==ROW) or columns (i==COL) to j.
Definition: simatrix.hpp:974
simatrix & operator|=(const srmatrix &B)
Form the convex hull of a sparse matrix and B and assign the result to it.
Definition: simatrix.hpp:819
simatrix_subv & operator+=(const srvector &)
Assign the sum of the subvector with a vector to the subvector.
Definition: simatrix.hpp:5469
Represents a row or column vector of a sparse matrix.
Definition: srmatrix.hpp:2157
The Data Type rmatrix.
Definition: rmatrix.hpp:470
simatrix_slice & operator+=(const simatrix_slice &M)
Assigns the element wise sum of the sparse slice and M to the slice.
Definition: simatrix.hpp:2626
simatrix_slice & operator=(const simatrix &C)
Assing C to the slice.
Definition: simatrix.hpp:2511
simatrix_slice & operator=(const srmatrix_slice &C)
Assing C to the slice.
Definition: simatrix.hpp:2536
real AbsMax(const interval &x)
Computes the greatest absolute value .
Definition: interval.cpp:303
simatrix & operator|=(const rmatrix_slice &B)
Form the convex hull of a sparse matrix and B and assign the result to it.
Definition: simatrix.hpp:809
simatrix_subv & operator=(const simatrix_subv &v)
Assigns a vector to a subvector.
Definition: simatrix.hpp:4495
simatrix_slice & operator+=(const srmatrix &M)
Assigns the element wise sum of the sparse slice and M to the slice.
Definition: simatrix.hpp:2632
simatrix & operator-=(const imatrix &B)
Subtract B from the sparse matrix and assign the result to it.
Definition: simatrix.hpp:724
simatrix(const srmatrix &A)
Creates a sparse interval matrix out of a sparse real matrix A.
Definition: simatrix.hpp:359
simatrix_slice & operator*=(const srmatrix &M)
Assigns the product of the sparse slice and M to the slice.
Definition: simatrix.hpp:2560
The Data Type ivector.
Definition: ivector.hpp:54
simatrix_slice & operator*=(const rmatrix &M)
Assigns the product of the sparse slice and M to the slice.
Definition: simatrix.hpp:2572
simatrix_subv & operator|=(const srvector &)
Assign the convex hull of the subvector and a vector to the subvector.
Definition: simatrix.hpp:5549
int get_k() const
Get currently set precision for computation of dot products.
Definition: cidot.hpp:89
simatrix_slice & operator*=(const simatrix_slice &M)
Assigns the product of the sparse slice and M to the slice.
Definition: simatrix.hpp:2554
simatrix_subv & operator=(const sivector_slice &v)
Assigns a vector to a subvector.
Definition: simatrix.hpp:4465
simatrix & operator/=(const interval &r)
Divide all elements of the sparse matrix by r and assign the result to it.
Definition: simatrix.hpp:794
simatrix_subv operator[](const cxscmatrix_column &)
Returns a column of the matrix as a sparse subvector object.
Definition: simatrix.hpp:4641
simatrix_slice & operator/=(const real &r)
Assigns the component wise division of the sparse slice and M to the slice.
Definition: simatrix.hpp:2608
simatrix_subv & operator-=(const srvector &)
Assign the difference of the subvector with a vector to the subvector.
Definition: simatrix.hpp:5489
const std::vector< int > & column_pointers() const
Returns a constant reference to the vector containing the column pointers (the array) ...
Definition: simatrix.hpp:97
simatrix_slice & operator|=(const imatrix &M)
Assigns the element wise convex hull of the sparse slice and M to the slice.
Definition: simatrix.hpp:2746
simatrix & operator-=(const srmatrix &B)
Subtract B from the sparse matrix and assign the result to it.
Definition: simatrix.hpp:739
simatrix & operator-=(const imatrix_slice &B)
Subtract B from the sparse matrix and assign the result to it.
Definition: simatrix.hpp:734
simatrix_subv & operator/=(const real &)
Assign the componentwise division of the subvector with a scalar to the subvector.
Definition: simatrix.hpp:5459
simatrix_subv & operator=(const sivector &v)
Assigns a vector to a subvector.
Definition: simatrix.hpp:4455
simatrix_slice & operator+=(const imatrix &M)
Assigns the element wise sum of the sparse slice and M to the slice.
Definition: simatrix.hpp:2650
simatrix & operator*=(const interval &r)
Multiply all elements of the sparse matrix by r and assign the result to it.
Definition: simatrix.hpp:784
simatrix_subv & operator=(const ivector_slice &v)
Assigns a vector to a subvector.
Definition: simatrix.hpp:4485
imatrix & operator|=(const simatrix &)
Implementation of convex hull and assignment operator.
Definition: simatrix.hpp:2023
simatrix(const rmatrix &A)
Creates a sparse matrix out of a dense matrix A. Only the non zero elements of A are stored explicitl...
Definition: simatrix.hpp:367
The Data Type imatrix.
Definition: imatrix.hpp:659
simatrix & operator=(const imatrix &A)
Assigns a dense matrix to the sparse matrix. Only the non zero entries of the dense matrix are used...
Definition: simatrix.hpp:512
Represents a row or column vector of a sparse matrix.
Definition: scimatrix.hpp:9628
simatrix_subv & operator=(const rvector_slice &v)
Assigns a vector to a subvector.
Definition: simatrix.hpp:4480
imatrix_slice & operator-=(const imatrix &m1)
Implementation of subtraction and allocation operation.
Definition: imatrix.inl:1410
STORAGE_TYPE
Enumeration depicting the storage type of a sparse matrix (Triplet storage, Compressed column storage...
Definition: srmatrix.hpp:42
simatrix & operator=(const real &A)
Assigns a real value to all elements of the matrix (resulting in a dense matrix!) ...
Definition: simatrix.hpp:497
simatrix_slice & operator=(const simatrix_slice &C)
Assing C to the slice.
Definition: simatrix.hpp:2542
Helper class for slices of sparse vectors.
Definition: srvector.hpp:868
simatrix_slice & operator*=(const rmatrix_slice &M)
Assigns the product of the sparse slice and M to the slice.
Definition: simatrix.hpp:2584
friend int ColLen(const simatrix &)
Returns the number of rows of the matrix.
Definition: simatrix.hpp:1031
simatrix_slice & operator|=(const srmatrix_slice &M)
Assigns the element wise convex hull of the sparse slice and M to the slice.
Definition: simatrix.hpp:2716
simatrix & operator*=(const real &r)
Multiply all elements of the sparse matrix by r and assign the result to it.
Definition: simatrix.hpp:779
imatrix_slice & operator|=(const imatrix &m1)
Allocates the convex hull of the arguments to the first argument.
Definition: imatrix.inl:1508
civector operator/(const cimatrix_subv &rv, const cinterval &s)
Implementation of division operation.
Definition: cimatrix.inl:730
imatrix_subv & operator|=(const sivector &rv)
Implementation of addition and allocation operation.
Definition: simatrix.hpp:5664
simatrix & operator+=(const rmatrix &B)
Add B to the sparse matrix and assign the result to it.
Definition: simatrix.hpp:689
friend simatrix transp(const simatrix &)
Returns the transpose of A.
Definition: simatrix.hpp:934
A slice of a sparse complex interval matrix.
Definition: scimatrix.hpp:4918
simatrix_slice & operator*=(const interval &r)
Assigns the component wise product of the sparse slice and r to the slice.
Definition: simatrix.hpp:2602
simatrix()
Standard constructor, creates an empty matrix of dimension 0x0.
Definition: simatrix.hpp:112
simatrix operator()(const intmatrix &P, const intmatrix &Q)
Performs row and column permutations using the two permutation matrices P and Q. Faster than explicit...
Definition: simatrix.hpp:666
The Scalar Type real.
Definition: real.hpp:113
simatrix operator()(const intvector &pervec)
Performs a row permutation using a permutation vector.
Definition: simatrix.hpp:642
simatrix_slice & operator-=(const simatrix &M)
Assigns the element wise difference of the sparse slice and M to the slice.
Definition: simatrix.hpp:2686
simatrix_subv & operator=(const rvector &v)
Assigns a vector to a subvector.
Definition: simatrix.hpp:4470
imatrix & operator*=(const simatrix &)
Implementation of product and assignment operator.
Definition: simatrix.hpp:2007
The Data Type intvector.
Definition: intvector.hpp:51
simatrix_slice & operator-=(const rmatrix_slice &M)
Assigns the element wise difference of the sparse slice and M to the slice.
Definition: simatrix.hpp:2704
friend srmatrix absmin(const simatrix &)
Returns the componentwise minimum absolute value.
Definition: simatrix.hpp:1105
imatrix & operator=(const interval &r)
Implementation of standard assigning operator.
Definition: imatrix.inl:416
simatrix_slice & operator=(const srmatrix &C)
Assing C to the slice.
Definition: simatrix.hpp:2506
simatrix & operator*=(const srmatrix &B)
Multiply the sparse matrix by B and assign the result to it.
Definition: simatrix.hpp:769
A sparse interval matrix.
Definition: simatrix.hpp:69
simatrix_subv & operator=(const ivector &v)
Assigns a vector to a subvector.
Definition: simatrix.hpp:4475
The Data Type cimatrix.
Definition: cimatrix.hpp:907
imatrix_subv & operator-=(const interval &c)
Implementation of subtraction and allocation operation.
Definition: imatrix.inl:493
imatrix()
Constructor of class imatrix.
Definition: imatrix.inl:31
simatrix(const int r, const int c, const int e)
Creates an empty matrix with r rows and c columns, pre-reserving space for e elements.
Definition: simatrix.hpp:128