26#ifndef _CXSC_SIVECTOR_HPP_INCLUDED
27#define _CXSC_SIVECTOR_HPP_INCLUDED
29#include <interval.hpp>
34#include <srvector.hpp>
35#include <sparseidot.hpp>
36#include <sparsevector.hpp>
62 std::vector<interval> x;
73 explicit sivector(
const int s) : lb(1), ub(s), n(s) {
74 p.reserve((
int)(s*0.1));
75 x.reserve((
int)(s*0.1));
79 sivector(
const int s,
const int b) : lb(1), ub(s), n(s) {
86 for(
int i=lb ; i<=ub ; i++) {
96 for(
int i=lb ; i<=ub ; i++) {
107 for(
int i=0 ; i<nnz ; i++) {
109 p.push_back(index[
Lb(index)+i]);
118 for(
int i=0 ; i<nnz ; i++) {
120 p.push_back(index[i]);
129 for(
int i=0 ; i<v.
get_nnz() ; i++)
176 const std::vector<interval>&
values()
const {
187 return (
double)x.size()/n;
192 for(
int i=0 ; i<
get_nnz() ; i++) {
194 x.erase(x.begin()+i);
195 p.erase(p.begin()+i);
213 for(
unsigned int i=0 ; i<v.x.size() ; i++)
220 return sp_vs_assign<sivector,real,interval>(*
this,v);
225 return sp_vs_assign<sivector,interval,interval>(*
this,v);
230 return spf_vv_assign<sivector,rvector,interval>(*
this,v);
235 return spf_vv_assign<sivector,ivector,interval>(*
this,v);
240 return spf_vv_assign<sivector,rvector_slice,interval>(*
this,v);
245 return spf_vv_assign<sivector,ivector_slice,interval>(*
this,v);
260 if(i<lb || i>ub) cxscthrow(ELEMENT_NOT_IN_VEC(
"sivector::operator[](const int)"));
264 for(k=0 ; k<
get_nnz() && p[k]<=i-lb ; k++) {
269 p.insert(p.begin() + k, i-lb);
270 x.insert(x.begin() + k,
interval(0.0));
282 if(i<lb || i>ub) cxscthrow(ELEMENT_NOT_IN_VEC(
"sivector::operator[](const int)"));
294 if(i<lb || i>ub) cxscthrow(ELEMENT_NOT_IN_VEC(
"sivector::operator()(const int)"));
298 for(
int k=0 ; k<
get_nnz() && p[k]<=i-lb ; k++) {
314 std::map<int,interval> work;
315 for(
int i=0 ; i<
get_nnz() ; i++) {
316 work.insert(std::make_pair(pinv[
Lb(pinv)+p[i]], x[i]));
319 for(std::map<int,interval>::iterator it=work.begin() ; it!=work.end() ; it++) {
320 v.p.push_back(it->first);
321 v.x.push_back(it->second);
346 return sp_vs_multassign(*
this,s);
351 return sp_vs_multassign(*
this,s);
356 return sp_vs_divassign(*
this,s);
361 return sp_vs_divassign(*
this,s);
366 return spf_vv_addassign(*
this,v);
371 return spf_vv_addassign(*
this,v);
376 return spf_vv_addassign(*
this,v);
381 return spf_vv_addassign(*
this,v);
386 return spsp_vv_addassign(*
this,v);
391 return spsp_vv_addassign(*
this,v);
396 return spf_vv_subassign(*
this,v);
401 return spf_vv_subassign(*
this,v);
406 return spf_vv_subassign(*
this,v);
411 return spf_vv_subassign(*
this,v);
416 return spsp_vv_subassign(*
this,v);
421 return spsp_vv_subassign(*
this,v);
426 return spf_vv_hullassign(*
this,v);
431 return spf_vv_hullassign(*
this,v);
436 return spf_vv_hullassign(*
this,v);
441 return spf_vv_hullassign(*
this,v);
446 return spsp_vv_hullassign(*
this,v);
451 return spsp_vv_hullassign(*
this,v);
456 return spf_vv_intersectassign(*
this,v);
461 return spsp_vv_intersectassign(*
this,v);
501#include "vector_friend_declarations.inl"
509 for(
int i=0 ; i<v.n ; i++)
511 for(
int i=0 ; i<v.
get_nnz() ; i++)
512 dat[v.p[i]] = v.x[i];
520 for(
int i=0 ; i<v.n ; i++)
522 for(
int i=0 ; i<v.
get_nnz() ; i++)
523 dat[v.p[i]] = v.x[i];
527 return fsp_vv_assign<ivector,sivector,interval>(*
this,v);
531 return fsl_vv_assign<ivector,sivector_slice,interval>(*
this,v);
535 return fsp_vv_assign<ivector,srvector,interval>(*
this,v);
539 return fsl_vv_assign<ivector,srvector_slice,interval>(*
this,v);
548 v.ub = v.lb + v.n - 1;
557 v.lb = v.ub - v.n + 1;
598 for(
int i=0 ; i<v.
get_nnz() ; i++)
599 res.x[i] = Inf(v.x[i]);
609 for(
int i=0 ; i<v.
get_nnz() ; i++)
610 res.x[i] = Sup(v.x[i]);
620 for(
int i=0 ; i<v.
get_nnz() ; i++)
621 res.x.push_back(
abs(v.x[i]));
631 for(
int i=0 ; i<v.
get_nnz() ; i++)
632 res.x.push_back(
AbsMin(v.x[i]));
643 for(
int i=0 ; i<v.
get_nnz() ; i++)
644 res.x.push_back(
AbsMax(v.x[i]));
655 for(
int i=0 ; i<v.
get_nnz() ; i++) {
656 res.x.push_back(
mid(v.x[i]));
667 for(
int i=0 ; i<v.
get_nnz() ; i++)
668 res.x.push_back(
diam(v.x[i]));
680 for(
unsigned int i=0 ; i<v.x.size() ; i++)
681 res.x[i] =
Blow(v.x[i],eps);
687 for(
int i=0 ; i<
VecLen(v1) ; i++)
688 if(!
in(v1(i+
Lb(v1)), v2(i+
Lb(v2))))
return false;
694 for(
int i=0 ; i<
VecLen(v1) ; i++)
695 if(v1(i+
Lb(v1)) != 0.0)
return false;
701 return sp_v_negative(v);
712 return spf_vv_mult<sivector,ivector,interval,sparse_idot>(v1,v2);
723 return spf_vv_mult<sivector,rvector,interval,sparse_idot>(v1,v2);
734 return spf_vv_mult<srvector,ivector,interval,sparse_idot>(v1,v2);
745 return fsp_vv_mult<rvector,sivector,interval,sparse_idot>(v1,v2);
756 return fsp_vv_mult<ivector,srvector,interval,sparse_idot>(v1,v2);
767 return fsp_vv_mult<ivector,sivector,interval,sparse_idot>(v1,v2);
778 return spf_vv_mult<sivector,rvector_slice,interval,sparse_idot>(v1,v2);
789 return spf_vv_mult<sivector,ivector_slice,interval,sparse_idot>(v1,v2);
800 return spf_vv_mult<srvector,ivector_slice,interval,sparse_idot>(v1,v2);
811 return fsp_vv_mult<ivector_slice,srvector,interval,sparse_idot>(v1,v2);
822 return fsp_vv_mult<ivector_slice,sivector,interval,sparse_idot>(v1,v2);
833 return fsp_vv_mult<rvector_slice,sivector,interval,sparse_idot>(v1,v2);
844 return spsp_vv_mult<sivector,srvector,interval,sparse_idot>(v1,v2);
855 return spsp_vv_mult<srvector,sivector,interval,sparse_idot>(v1,v2);
866 return spsp_vv_mult<sivector,sivector,interval,sparse_idot>(v1,v2);
871 return sp_vs_mult<sivector,real,sivector>(v,s);
876 return sp_vs_mult<sivector,interval,sivector>(v,s);
881 return sp_vs_mult<srvector,interval,sivector>(v,s);
886 return sp_vs_div<sivector,real,sivector>(v,s);
891 return sp_vs_div<sivector,interval,sivector>(v,s);
896 return sp_vs_div<srvector,interval,sivector>(v,s);
901 return sp_sv_mult<real,sivector,sivector>(s,v);
906 return sp_sv_mult<interval,sivector,sivector>(s,v);
911 return sp_sv_mult<interval,srvector,sivector>(s,v);
916 return fsp_vv_add<ivector,srvector,ivector>(v1,v2);
921 return fsp_vv_add<rvector,sivector,ivector>(v1,v2);
926 return fsp_vv_add<ivector,sivector,ivector>(v1,v2);
931 return spf_vv_add<sivector,rvector,ivector>(v1,v2);
936 return spf_vv_add<srvector,ivector,ivector>(v1,v2);
941 return spf_vv_add<sivector,ivector,ivector>(v1,v2);
946 return fsp_vv_add<ivector_slice,srvector,ivector>(v1,v2);
951 return fsp_vv_add<rvector_slice,sivector,ivector>(v1,v2);
956 return fsp_vv_add<ivector_slice,sivector,ivector>(v1,v2);
961 return spf_vv_add<sivector,rvector_slice,ivector>(v1,v2);
966 return spf_vv_add<srvector,ivector_slice,ivector>(v1,v2);
971 return spf_vv_add<sivector,ivector_slice,ivector>(v1,v2);
976 return spsp_vv_add<sivector,srvector,sivector,interval>(v1,v2);
981 return spsp_vv_add<srvector,sivector,sivector,interval>(v1,v2);
986 return spsp_vv_add<sivector,sivector,sivector,interval>(v1,v2);
991 return fsp_vv_sub<ivector,srvector,ivector>(v1,v2);
996 return fsp_vv_sub<rvector,sivector,ivector>(v1,v2);
1001 return fsp_vv_sub<ivector,sivector,ivector>(v1,v2);
1006 return spf_vv_sub<sivector,rvector,ivector>(v1,v2);
1011 return spf_vv_sub<srvector,ivector,ivector>(v1,v2);
1016 return spf_vv_sub<sivector,ivector,ivector>(v1,v2);
1021 return fsp_vv_sub<ivector_slice,srvector,ivector>(v1,v2);
1026 return fsp_vv_sub<rvector_slice,sivector,ivector>(v1,v2);
1031 return fsp_vv_sub<ivector_slice,sivector,ivector>(v1,v2);
1036 return spf_vv_sub<sivector,rvector_slice,ivector>(v1,v2);
1041 return spf_vv_sub<srvector,ivector_slice,ivector>(v1,v2);
1046 return spf_vv_sub<sivector,ivector_slice,ivector>(v1,v2);
1051 return spsp_vv_sub<sivector,srvector,sivector,interval>(v1,v2);
1056 return spsp_vv_sub<srvector,sivector,sivector,interval>(v1,v2);
1061 return spsp_vv_sub<sivector,sivector,sivector,interval>(v1,v2);
1066 return fsp_vv_hull<rvector,srvector,ivector>(v1,v2);
1071 return spf_vv_hull<srvector,rvector,ivector>(v1,v2);
1076 return fsp_vv_hull<rvector_slice,srvector,ivector>(v1,v2);
1081 return spf_vv_hull<srvector,rvector_slice,ivector>(v1,v2);
1086 return spsp_vv_hull<srvector,srvector,sivector,interval>(v1,v2);
1091 return fsp_vv_hull<ivector,srvector,ivector>(v1,v2);
1096 return fsp_vv_hull<rvector,sivector,ivector>(v1,v2);
1101 return fsp_vv_hull<ivector,sivector,ivector>(v1,v2);
1106 return spf_vv_hull<sivector,rvector,ivector>(v1,v2);
1111 return spf_vv_hull<srvector,ivector,ivector>(v1,v2);
1116 return spf_vv_hull<sivector,ivector,ivector>(v1,v2);
1121 return fsp_vv_hull<ivector_slice,srvector,ivector>(v1,v2);
1126 return fsp_vv_hull<rvector_slice,sivector,ivector>(v1,v2);
1131 return fsp_vv_hull<ivector_slice,sivector,ivector>(v1,v2);
1136 return spf_vv_hull<sivector,rvector_slice,ivector>(v1,v2);
1141 return spf_vv_hull<srvector,ivector_slice,ivector>(v1,v2);
1146 return spf_vv_hull<sivector,ivector_slice,ivector>(v1,v2);
1151 return spsp_vv_hull<sivector,srvector,sivector,interval>(v1,v2);
1156 return spsp_vv_hull<srvector,sivector,sivector,interval>(v1,v2);
1161 return spsp_vv_hull<sivector,sivector,sivector,interval>(v1,v2);
1166 return fsp_vv_intersect<ivector,sivector,ivector>(v1,v2);
1171 return spf_vv_intersect<sivector,ivector,ivector>(v1,v2);
1176 return fsp_vv_intersect<ivector_slice,sivector,ivector>(v1,v2);
1181 return spf_vv_intersect<sivector,ivector_slice,ivector>(v1,v2);
1186 return spsp_vv_intersect<sivector,sivector,sivector,interval>(v1,v2);
1190 return fsp_vv_addassign(*
this,v2);
1194 return fsp_vv_addassign(*
this,v2);
1198 return fsp_vv_addassign(*
this,v2);
1202 return fsp_vv_addassign(*
this,v2);
1206 return fsp_vv_subassign(*
this,v2);
1210 return fsp_vv_subassign(*
this,v2);
1214 return fsp_vv_subassign(*
this,v2);
1218 return fsp_vv_subassign(*
this,v2);
1222 return fsp_vv_hullassign(*
this,v2);
1226 return fsp_vv_hullassign(*
this,v2);
1230 return fsp_vv_hullassign(*
this,v2);
1234 return fsp_vv_hullassign(*
this,v2);
1238 return fsp_vv_intersectassign(*
this,v2);
1242 return fsp_vv_intersectassign(*
this,v2);
1250 return spsp_vv_comp(v1,v2);
1258 return spsp_vv_comp(v1,v2);
1266 return spsp_vv_comp(v1,v2);
1274 return spf_vv_comp(v1,v2);
1282 return spf_vv_comp(v1,v2);
1290 return spf_vv_comp(v1,v2);
1298 return fsp_vv_comp(v1,v2);
1306 return fsp_vv_comp(v1,v2);
1314 return fsp_vv_comp(v1,v2);
1322 return spf_vv_comp(v1,v2);
1330 return spf_vv_comp(v1,v2);
1338 return spf_vv_comp(v1,v2);
1346 return fsp_vv_comp(v1,v2);
1354 return fsp_vv_comp(v1,v2);
1362 return fsp_vv_comp(v1,v2);
1370 return !spsp_vv_comp(v1,v2);
1378 return !spsp_vv_comp(v1,v2);
1386 return !spsp_vv_comp(v1,v2);
1394 return !spf_vv_comp(v1,v2);
1402 return !spf_vv_comp(v1,v2);
1410 return !spf_vv_comp(v1,v2);
1418 return !fsp_vv_comp(v1,v2);
1426 return !fsp_vv_comp(v1,v2);
1434 return !fsp_vv_comp(v1,v2);
1442 return !spf_vv_comp(v1,v2);
1450 return !spf_vv_comp(v1,v2);
1458 return !spf_vv_comp(v1,v2);
1466 return !fsp_vv_comp(v1,v2);
1474 return !fsp_vv_comp(v1,v2);
1482 return !fsp_vv_comp(v1,v2);
1490 return spsp_vv_less<sivector,sivector,interval>(v1,v2);
1498 return spsp_vv_less<srvector,sivector,interval>(v1,v2);
1506 return spf_vv_less<srvector,ivector,interval>(v1,v2);
1514 return spf_vv_less<sivector,ivector,interval>(v1,v2);
1522 return fsp_vv_less<rvector,sivector,interval>(v1,v2);
1530 return fsp_vv_less<ivector,sivector,interval>(v1,v2);
1538 return spf_vv_less<srvector,ivector_slice,interval>(v1,v2);
1546 return spf_vv_less<sivector,ivector_slice,interval>(v1,v2);
1554 return fsp_vv_less<rvector_slice,sivector,interval>(v1,v2);
1562 return fsp_vv_less<ivector_slice,sivector,interval>(v1,v2);
1570 return spsp_vv_leq<sivector,sivector,interval>(v1,v2);
1578 return spsp_vv_leq<srvector,sivector,interval>(v1,v2);
1586 return spf_vv_leq<srvector,ivector,interval>(v1,v2);
1594 return spf_vv_leq<sivector,ivector,interval>(v1,v2);
1602 return fsp_vv_leq<rvector,sivector,interval>(v1,v2);
1610 return fsp_vv_leq<ivector,sivector,interval>(v1,v2);
1618 return spf_vv_leq<srvector,ivector_slice,interval>(v1,v2);
1626 return spf_vv_leq<sivector,ivector_slice,interval>(v1,v2);
1634 return fsp_vv_leq<rvector_slice,sivector,interval>(v1,v2);
1642 return fsp_vv_leq<ivector_slice,sivector,interval>(v1,v2);
1650 return spsp_vv_greater<sivector,sivector,interval>(v1,v2);
1658 return spsp_vv_greater<sivector,srvector,interval>(v1,v2);
1666 return spf_vv_greater<sivector,rvector,interval>(v1,v2);
1674 return spf_vv_greater<sivector,ivector,interval>(v1,v2);
1682 return fsp_vv_greater<ivector,srvector,interval>(v1,v2);
1690 return fsp_vv_greater<ivector,sivector,interval>(v1,v2);
1698 return spf_vv_greater<sivector,rvector_slice,interval>(v1,v2);
1706 return spf_vv_greater<sivector,ivector_slice,interval>(v1,v2);
1714 return fsp_vv_greater<ivector_slice,srvector,interval>(v1,v2);
1722 return fsp_vv_greater<ivector_slice,sivector,interval>(v1,v2);
1730 return spsp_vv_geq<sivector,sivector,interval>(v1,v2);
1738 return spsp_vv_geq<sivector,srvector,interval>(v1,v2);
1746 return spf_vv_geq<sivector,rvector,interval>(v1,v2);
1754 return spf_vv_geq<sivector,ivector,interval>(v1,v2);
1762 return fsp_vv_geq<ivector,srvector,interval>(v1,v2);
1770 return fsp_vv_geq<ivector,sivector,interval>(v1,v2);
1778 return spf_vv_geq<sivector,rvector_slice,interval>(v1,v2);
1786 return spf_vv_geq<sivector,ivector_slice,interval>(v1,v2);
1794 return fsp_vv_geq<ivector_slice,srvector,interval>(v1,v2);
1802 return fsp_vv_geq<ivector_slice,sivector,interval>(v1,v2);
1811inline std::ostream& operator<<(std::ostream& os,
const sivector& v) {
1812 return sp_v_output<sivector,interval>(os,v);
1821inline std::istream& operator>>(std::istream& is,
sivector& v) {
1822 return sp_v_input<sivector,interval>(is,v);
1833 std::vector<int>& p;
1834 std::vector<interval>& x;
1851 for(i=0 ; i<v.
get_nnz() && p[i]<lb-v.lb ; i++);
1855 for(i=start ; i<v.
get_nnz() && p[i]<=ub-v.lb ; i++);
1872 return (
double)nnz/n;
1881#if(CXSC_INDEX_CHECK)
1882 if(i<lb || i>ub) cxscthrow(ELEMENT_NOT_IN_VEC(
"sivector_slice::operator[](const int)"));
1886 for(k=start ; k<end+1 && p[k]-start<=i-lb ; k++) {
1887 if(p[k]-offset == i-lb)
1891 p.insert(p.begin() + k, i-lb);
1892 x.insert(x.begin() + k,
interval(0.0));
1904#if(CXSC_INDEX_CHECK)
1905 if(i<lb || i>ub) cxscthrow(ELEMENT_NOT_IN_VEC(
"sivector_slice::operator[](const int)"));
1916#if(CXSC_INDEX_CHECK)
1917 if(i<lb || i>ub) cxscthrow(ELEMENT_NOT_IN_VEC(
"srvector_slice::operator()(const int)"));
1921 for(
int k=start ; k<end && p[k]-start<=i-lb ; k++) {
1922 if(p[k]-start == i-lb)
1931 return sl_vs_assign<sivector_slice,real,interval,std::vector<interval>::iterator>(*
this,v);
1936 return sl_vs_assign<sivector_slice,interval,interval,std::vector<interval>::iterator>(*
this,v);
1941 return slsl_vv_assign<sivector_slice,srvector_slice,interval,std::vector<interval>::iterator>(*
this,v);
1946 return slsl_vv_assign<sivector_slice,sivector_slice,interval,std::vector<interval>::iterator>(*
this,v);
1951 return slsp_vv_assign<sivector_slice,srvector,interval,std::vector<interval>::iterator>(*
this,v);
1956 return slsp_vv_assign<sivector_slice,sivector,interval,std::vector<interval>::iterator>(*
this,v);
1961 return slf_vv_assign<sivector_slice,rvector,interval,std::vector<interval>::iterator>(*
this,v);
1966 return slf_vv_assign<sivector_slice,ivector,interval,std::vector<interval>::iterator>(*
this,v);
1971 return slf_vv_assign<sivector_slice,rvector_slice,interval,std::vector<interval>::iterator>(*
this,v);
1976 return slf_vv_assign<sivector_slice,ivector_slice,interval,std::vector<interval>::iterator>(*
this,v);
1981 return sl_vs_multassign(*
this,s);
1986 return sl_vs_multassign(*
this,s);
1991 return sl_vs_divassign(*
this,s);
1996 return sl_vs_divassign(*
this,s);
2001 return slf_vv_addassign<sivector_slice,rvector,interval>(*
this,v);
2006 return slf_vv_addassign<sivector_slice,ivector,interval>(*
this,v);
2011 return slf_vv_addassign<sivector_slice,rvector_slice,interval>(*
this,v);
2016 return slf_vv_addassign<sivector_slice,ivector_slice,interval>(*
this,v);
2021 return slsp_vv_addassign(*
this,v);
2026 return slsp_vv_addassign(*
this,v);
2031 return slsl_vv_addassign(*
this,v);
2036 return slsl_vv_addassign(*
this,v);
2041 return slf_vv_subassign<sivector_slice,rvector,interval>(*
this,v);
2046 return slf_vv_subassign<sivector_slice,ivector,interval>(*
this,v);
2051 return slf_vv_subassign<sivector_slice,rvector_slice,interval>(*
this,v);
2056 return slf_vv_subassign<sivector_slice,ivector_slice,interval>(*
this,v);
2061 return slsp_vv_subassign(*
this,v);
2066 return slsp_vv_subassign(*
this,v);
2071 return slsl_vv_subassign(*
this,v);
2076 return slsl_vv_subassign(*
this,v);
2081 return slf_vv_hullassign<sivector_slice,rvector,interval>(*
this,v);
2086 return slf_vv_hullassign<sivector_slice,ivector,interval>(*
this,v);
2091 return slf_vv_hullassign<sivector_slice,rvector_slice,interval>(*
this,v);
2096 return slf_vv_hullassign<sivector_slice,ivector_slice,interval>(*
this,v);
2101 return slsp_vv_hullassign(*
this,v);
2106 return slsp_vv_hullassign(*
this,v);
2111 return slsl_vv_hullassign(*
this,v);
2116 return slsl_vv_hullassign(*
this,v);
2121 return slf_vv_intersectassign<sivector_slice,ivector,interval>(*
this,v);
2126 return slf_vv_intersectassign<sivector_slice,ivector_slice,interval>(*
this,v);
2131 return slsp_vv_intersectassign(*
this,v);
2136 return slsl_vv_intersectassign(*
this,v);
2159#include "vector_friend_declarations.inl"
2167 for(
int i=0 ; i<v.n ; i++)
2169 for(
int i=v.start ; i<=v.end ; i++)
2170 dat[v.p[i]] = v.x[i];
2178 for(
int i=0 ; i<v.n ; i++)
2180 for(
int i=v.start ; i<=v.end ; i++)
2181 dat[v.p[i]] = v.x[i];
2208 for(
int i=s.start ; i<=s.end ; i++) {
2209 p.push_back(s.p[i]-s.offset);
2219 for(
int i=s.start ; i<=s.end ; i++) {
2220 p.push_back(s.p[i]-s.offset);
2221 x.push_back(s.x[i]);
2227 return spsl_vv_assign<sivector,srvector_slice,interval>(*
this,v);
2231 return spsl_vv_assign<sivector,sivector_slice,interval>(*
this,v);
2235#if(CXSC_INDEX_CHECK)
2236 if(i<lb || j>ub) cxscthrow(ELEMENT_NOT_IN_VEC(
"sivector::operator()(const int,const int)"));
2243 return sl_v_negative<sivector_slice,sivector>(v);
2272 for(
int i=v.start ; i<=v.end ; i++)
2273 res.x.push_back(
abs(v.x[i]));
2283 for(
int i=v.start ; i<=v.end ; i++)
2284 res.x.push_back(
mid(v.x[i]));
2294 for(
int i=v.start ; i<v.end ; i++)
2295 res.x.push_back(
diam(v.x[i]));
2312 return slf_vv_mult<sivector_slice,rvector,interval,sparse_idot>(v1,v2);
2323 return slf_vv_mult<srvector_slice,ivector,interval,sparse_idot>(v1,v2);
2334 return slf_vv_mult<sivector_slice,ivector,interval,sparse_idot>(v1,v2);
2345 return fsl_vv_mult<ivector,srvector_slice,interval,sparse_idot>(v1,v2);
2356 return fsl_vv_mult<rvector,sivector_slice,interval,sparse_idot>(v1,v2);
2367 return fsl_vv_mult<ivector,sivector_slice,interval,sparse_idot>(v1,v2);
2378 return slf_vv_mult<sivector_slice,rvector_slice,interval,sparse_idot>(v1,v2);
2389 return slf_vv_mult<srvector_slice,ivector_slice,interval,sparse_idot>(v1,v2);
2400 return slf_vv_mult<sivector_slice,ivector_slice,interval,sparse_idot>(v1,v2);
2411 return fsl_vv_mult<ivector_slice,srvector_slice,interval,sparse_idot>(v1,v2);
2422 return fsl_vv_mult<rvector_slice,sivector_slice,interval,sparse_idot>(v1,v2);
2433 return fsl_vv_mult<ivector_slice,sivector_slice,interval,sparse_idot>(v1,v2);
2444 return spsl_vv_mult<sivector,srvector_slice,interval,sparse_idot>(v1,v2);
2455 return spsl_vv_mult<srvector,sivector_slice,interval,sparse_idot>(v1,v2);
2466 return spsl_vv_mult<sivector,sivector_slice,interval,sparse_idot>(v1,v2);
2477 return slsp_vv_mult<sivector_slice,srvector,interval,sparse_idot>(v1,v2);
2488 return slsp_vv_mult<srvector_slice,sivector,interval,sparse_idot>(v1,v2);
2499 return slsp_vv_mult<sivector_slice,sivector,interval,sparse_idot>(v1,v2);
2510 return slsl_vv_mult<sivector_slice,srvector_slice,interval,sparse_idot>(v1,v2);
2521 return slsl_vv_mult<srvector_slice,sivector_slice,interval,sparse_idot>(v1,v2);
2532 return slsl_vv_mult<sivector_slice,sivector_slice,interval,sparse_idot>(v1,v2);
2537 return sp_vs_mult<sivector_slice,real,sivector>(v,s);
2542 return sp_vs_mult<sivector_slice,interval,sivector>(v,s);
2547 return sp_vs_mult<srvector_slice,interval,sivector>(v,s);
2552 return sp_vs_div<sivector_slice,real,sivector>(v,s);
2557 return sp_vs_div<sivector_slice,interval,sivector>(v,s);
2562 return sp_vs_div<srvector_slice,interval,sivector>(v,s);
2567 return sp_sv_mult<real,sivector_slice,sivector>(s,v);
2572 return sp_sv_mult<interval,sivector_slice,sivector>(s,v);
2577 return sp_sv_mult<interval,srvector_slice,sivector>(s,v);
2582 return fsl_vv_add<ivector,srvector_slice,ivector>(v1,v2);
2587 return fsl_vv_add<rvector,sivector_slice,ivector>(v1,v2);
2592 return fsl_vv_add<ivector,sivector_slice,ivector>(v1,v2);
2597 return slf_vv_add<sivector_slice,rvector,ivector>(v1,v2);
2602 return slf_vv_add<srvector_slice,ivector,ivector>(v1,v2);
2607 return slf_vv_add<sivector_slice,ivector,ivector>(v1,v2);
2612 return fsl_vv_add<ivector_slice,srvector_slice,ivector>(v1,v2);
2617 return fsl_vv_add<rvector_slice,sivector_slice,ivector>(v1,v2);
2622 return fsl_vv_add<ivector_slice,sivector_slice,ivector>(v1,v2);
2627 return slf_vv_add<sivector_slice,rvector_slice,ivector>(v1,v2);
2632 return slf_vv_add<srvector_slice,ivector_slice,ivector>(v1,v2);
2637 return slf_vv_add<sivector_slice,ivector_slice,ivector>(v1,v2);
2642 return slsl_vv_add<sivector_slice,srvector_slice,sivector,interval>(v1,v2);
2647 return slsl_vv_add<srvector_slice,sivector_slice,sivector,interval>(v1,v2);
2652 return slsl_vv_add<sivector_slice,sivector_slice,sivector,interval>(v1,v2);
2657 return spsl_vv_add<sivector,srvector_slice,sivector,interval>(v1,v2);
2662 return spsl_vv_add<srvector,sivector_slice,sivector,interval>(v1,v2);
2667 return spsl_vv_add<sivector,sivector_slice,sivector,interval>(v1,v2);
2672 return slsp_vv_add<sivector_slice,srvector,sivector,interval>(v1,v2);
2677 return slsp_vv_add<srvector_slice,sivector,sivector,interval>(v1,v2);
2682 return slsp_vv_add<sivector_slice,sivector,sivector,interval>(v1,v2);
2687 return fsl_vv_sub<ivector,srvector_slice,ivector>(v1,v2);
2692 return fsl_vv_sub<rvector,sivector_slice,ivector>(v1,v2);
2697 return fsl_vv_sub<ivector,sivector_slice,ivector>(v1,v2);
2702 return slf_vv_sub<sivector_slice,rvector,ivector>(v1,v2);
2707 return slf_vv_sub<srvector_slice,ivector,ivector>(v1,v2);
2712 return slf_vv_sub<sivector_slice,ivector,ivector>(v1,v2);
2717 return fsl_vv_sub<ivector_slice,srvector_slice,ivector>(v1,v2);
2722 return fsl_vv_sub<rvector_slice,sivector_slice,ivector>(v1,v2);
2727 return fsl_vv_sub<ivector_slice,sivector_slice,ivector>(v1,v2);
2732 return slf_vv_sub<sivector_slice,rvector_slice,ivector>(v1,v2);
2737 return slf_vv_sub<srvector_slice,ivector_slice,ivector>(v1,v2);
2742 return slf_vv_sub<sivector_slice,ivector_slice,ivector>(v1,v2);
2747 return slsl_vv_sub<sivector_slice,srvector_slice,sivector,interval>(v1,v2);
2752 return slsl_vv_sub<srvector_slice,sivector_slice,sivector,interval>(v1,v2);
2757 return slsl_vv_sub<sivector_slice,sivector_slice,sivector,interval>(v1,v2);
2762 return spsl_vv_sub<sivector,srvector_slice,sivector,interval>(v1,v2);
2767 return spsl_vv_sub<srvector,sivector_slice,sivector,interval>(v1,v2);
2772 return spsl_vv_sub<sivector,sivector_slice,sivector,interval>(v1,v2);
2777 return slsp_vv_sub<sivector_slice,srvector,sivector,interval>(v1,v2);
2782 return slsp_vv_sub<srvector_slice,sivector,sivector,interval>(v1,v2);
2787 return slsp_vv_sub<sivector_slice,sivector,sivector,interval>(v1,v2);
2792 return fsl_vv_hull<rvector,srvector_slice,ivector>(v1,v2);
2797 return slf_vv_hull<srvector_slice,rvector,ivector>(v1,v2);
2802 return fsl_vv_hull<rvector_slice,srvector_slice,ivector>(v1,v2);
2807 return slf_vv_hull<srvector_slice,rvector_slice,ivector>(v1,v2);
2812 return slsl_vv_hull<srvector_slice,srvector_slice,sivector,interval>(v1,v2);
2817 return spsl_vv_hull<srvector,srvector_slice,sivector,interval>(v1,v2);
2822 return slsp_vv_hull<srvector_slice,srvector,sivector,interval>(v1,v2);
2827 return fsl_vv_hull<ivector,srvector_slice,ivector>(v1,v2);
2832 return fsl_vv_hull<rvector,sivector_slice,ivector>(v1,v2);
2837 return fsl_vv_hull<ivector,sivector_slice,ivector>(v1,v2);
2842 return slf_vv_hull<sivector_slice,rvector,ivector>(v1,v2);
2847 return slf_vv_hull<srvector_slice,ivector,ivector>(v1,v2);
2852 return slf_vv_hull<sivector_slice,ivector,ivector>(v1,v2);
2857 return fsl_vv_hull<ivector_slice,srvector_slice,ivector>(v1,v2);
2862 return fsl_vv_hull<rvector_slice,sivector_slice,ivector>(v1,v2);
2867 return fsl_vv_hull<ivector_slice,sivector_slice,ivector>(v1,v2);
2872 return slf_vv_hull<sivector_slice,rvector_slice,ivector>(v1,v2);
2877 return slf_vv_hull<srvector_slice,ivector_slice,ivector>(v1,v2);
2882 return slf_vv_hull<sivector_slice,ivector_slice,ivector>(v1,v2);
2887 return slsl_vv_hull<sivector_slice,srvector_slice,sivector,interval>(v1,v2);
2892 return slsl_vv_hull<srvector_slice,sivector_slice,sivector,interval>(v1,v2);
2897 return slsl_vv_hull<sivector_slice,sivector_slice,sivector,interval>(v1,v2);
2902 return spsl_vv_hull<sivector,srvector_slice,sivector,interval>(v1,v2);
2907 return spsl_vv_hull<srvector,sivector_slice,sivector,interval>(v1,v2);
2912 return spsl_vv_hull<sivector,sivector_slice,sivector,interval>(v1,v2);
2917 return slsp_vv_hull<sivector_slice,srvector,sivector,interval>(v1,v2);
2922 return slsp_vv_hull<srvector_slice,sivector,sivector,interval>(v1,v2);
2927 return slsp_vv_hull<sivector_slice,sivector,sivector,interval>(v1,v2);
2932 return fsl_vv_intersect<ivector,sivector_slice,ivector>(v1,v2);
2937 return slf_vv_intersect<sivector_slice,ivector,ivector>(v1,v2);
2942 return fsl_vv_intersect<ivector_slice,sivector_slice,ivector>(v1,v2);
2947 return slf_vv_intersect<sivector_slice,ivector_slice,ivector>(v1,v2);
2952 return slsl_vv_intersect<sivector_slice,sivector_slice,sivector,interval>(v1,v2);
2957 return spsl_vv_intersect<sivector,sivector_slice,sivector,interval>(v1,v2);
2962 return slsp_vv_intersect<sivector_slice,sivector,sivector,interval>(v1,v2);
2966 return fsl_vv_addassign(*
this,v2);
2970 return fsl_vv_addassign(*
this,v2);
2974 return fsl_vv_addassign(*
this,v2);
2978 return fsl_vv_addassign(*
this,v2);
2982 return spsl_vv_addassign(*
this,v2);
2986 return spsl_vv_addassign(*
this,v2);
2990 return fsl_vv_subassign(*
this,v2);
2994 return fsl_vv_subassign(*
this,v2);
2998 return fsl_vv_subassign(*
this,v2);
3002 return fsl_vv_subassign(*
this,v2);
3006 return spsl_vv_subassign(*
this,v2);
3010 return spsl_vv_subassign(*
this,v2);
3014 return fsl_vv_hullassign(*
this,v2);
3018 return fsl_vv_hullassign(*
this,v2);
3022 return fsl_vv_hullassign(*
this,v2);
3026 return fsl_vv_hullassign(*
this,v2);
3030 return fsl_vv_intersectassign(*
this,v2);
3034 return fsl_vv_intersectassign(*
this,v2);
3042 return slsl_vv_comp(v1,v2);
3050 return slsl_vv_comp(v1,v2);
3058 return slsl_vv_comp(v1,v2);
3066 return slsp_vv_comp(v1,v2);
3074 return slsp_vv_comp(v1,v2);
3082 return slsp_vv_comp(v1,v2);
3090 return spsl_vv_comp(v1,v2);
3098 return spsl_vv_comp(v1,v2);
3106 return spsl_vv_comp(v1,v2);
3114 return slf_vv_comp(v1,v2);
3122 return slf_vv_comp(v1,v2);
3130 return slf_vv_comp(v1,v2);
3138 return fsl_vv_comp(v1,v2);
3146 return fsl_vv_comp(v1,v2);
3154 return fsl_vv_comp(v1,v2);
3162 return slf_vv_comp(v1,v2);
3170 return slf_vv_comp(v1,v2);
3178 return slf_vv_comp(v1,v2);
3186 return fsl_vv_comp(v1,v2);
3194 return fsl_vv_comp(v1,v2);
3202 return fsl_vv_comp(v1,v2);
3210 return !slsl_vv_comp(v1,v2);
3218 return !slsl_vv_comp(v1,v2);
3226 return !slsl_vv_comp(v1,v2);
3234 return !slf_vv_comp(v1,v2);
3242 return !slf_vv_comp(v1,v2);
3250 return !slf_vv_comp(v1,v2);
3258 return !fsl_vv_comp(v1,v2);
3266 return !fsl_vv_comp(v1,v2);
3274 return !fsl_vv_comp(v1,v2);
3282 return !slsp_vv_comp(v1,v2);
3290 return !slsp_vv_comp(v1,v2);
3298 return !slsp_vv_comp(v1,v2);
3306 return !spsl_vv_comp(v1,v2);
3314 return !spsl_vv_comp(v1,v2);
3322 return !spsl_vv_comp(v1,v2);
3330 return !slf_vv_comp(v1,v2);
3338 return !slf_vv_comp(v1,v2);
3346 return !slf_vv_comp(v1,v2);
3354 return !fsl_vv_comp(v1,v2);
3362 return !fsl_vv_comp(v1,v2);
3370 return !fsl_vv_comp(v1,v2);
3378 return slsl_vv_less<srvector_slice,sivector_slice,interval>(v1,v2);
3386 return slsl_vv_less<sivector_slice,sivector_slice,interval>(v1,v2);
3394 return slsp_vv_less<srvector_slice,sivector,interval>(v1,v2);
3402 return slsp_vv_less<sivector_slice,sivector,interval>(v1,v2);
3410 return spsl_vv_less<srvector,sivector_slice,interval>(v1,v2);
3418 return spsl_vv_less<sivector,sivector_slice,interval>(v1,v2);
3426 return slf_vv_less<srvector_slice,ivector,interval>(v1,v2);
3434 return slf_vv_less<sivector_slice,ivector,interval>(v1,v2);
3442 return fsl_vv_less<rvector,sivector_slice,interval>(v1,v2);
3450 return fsl_vv_less<ivector,sivector_slice,interval>(v1,v2);
3458 return slf_vv_less<srvector_slice,ivector_slice,interval>(v1,v2);
3466 return slf_vv_less<sivector_slice,ivector_slice,interval>(v1,v2);
3474 return fsl_vv_less<rvector_slice,sivector_slice,interval>(v1,v2);
3482 return fsl_vv_less<ivector_slice,sivector_slice,interval>(v1,v2);
3490 return slsl_vv_leq<sivector_slice,sivector_slice,interval>(v1,v2);
3498 return slsp_vv_leq<srvector_slice,sivector,interval>(v1,v2);
3506 return slsp_vv_leq<sivector_slice,sivector,interval>(v1,v2);
3514 return spsl_vv_leq<srvector,sivector_slice,interval>(v1,v2);
3522 return spsl_vv_leq<sivector,sivector_slice,interval>(v1,v2);
3530 return slf_vv_leq<srvector_slice,ivector,interval>(v1,v2);
3538 return slf_vv_leq<sivector_slice,ivector,interval>(v1,v2);
3546 return fsl_vv_leq<rvector,sivector_slice,interval>(v1,v2);
3554 return fsl_vv_leq<ivector,sivector_slice,interval>(v1,v2);
3562 return slf_vv_leq<srvector_slice,ivector_slice,interval>(v1,v2);
3570 return slf_vv_leq<sivector_slice,ivector_slice,interval>(v1,v2);
3578 return fsl_vv_leq<rvector_slice,sivector_slice,interval>(v1,v2);
3586 return fsl_vv_leq<ivector_slice,sivector_slice,interval>(v1,v2);
3594 return slsl_vv_greater<sivector_slice,srvector_slice,interval>(v1,v2);
3602 return slsl_vv_greater<sivector_slice,sivector_slice,interval>(v1,v2);
3610 return slsp_vv_greater<sivector_slice,srvector,interval>(v1,v2);
3618 return slsp_vv_greater<sivector_slice,sivector,interval>(v1,v2);
3626 return spsl_vv_greater<sivector,srvector_slice,interval>(v1,v2);
3634 return spsl_vv_greater<sivector,sivector_slice,interval>(v1,v2);
3642 return slf_vv_greater<sivector_slice,rvector,interval>(v1,v2);
3650 return slf_vv_greater<sivector_slice,ivector,interval>(v1,v2);
3658 return fsl_vv_greater<ivector,srvector_slice,interval>(v1,v2);
3666 return fsl_vv_greater<ivector,sivector_slice,interval>(v1,v2);
3674 return slf_vv_greater<sivector_slice,rvector_slice,interval>(v1,v2);
3682 return slf_vv_greater<sivector_slice,ivector_slice,interval>(v1,v2);
3690 return fsl_vv_greater<ivector_slice,srvector_slice,interval>(v1,v2);
3698 return fsl_vv_greater<ivector_slice,sivector_slice,interval>(v1,v2);
3706 return slsl_vv_geq<sivector_slice,srvector_slice,interval>(v1,v2);
3714 return slsl_vv_geq<sivector_slice,sivector_slice,interval>(v1,v2);
3722 return slsp_vv_geq<sivector_slice,srvector,interval>(v1,v2);
3730 return slsp_vv_geq<sivector_slice,sivector,interval>(v1,v2);
3738 return spsl_vv_geq<sivector,srvector_slice,interval>(v1,v2);
3746 return spsl_vv_geq<sivector,sivector_slice,interval>(v1,v2);
3754 return slf_vv_geq<sivector_slice,rvector,interval>(v1,v2);
3762 return slf_vv_geq<sivector_slice,ivector,interval>(v1,v2);
3770 return fsl_vv_geq<ivector,srvector_slice,interval>(v1,v2);
3778 return fsl_vv_geq<ivector,sivector_slice,interval>(v1,v2);
3786 return slf_vv_geq<sivector_slice,rvector_slice,interval>(v1,v2);
3794 return slf_vv_geq<sivector_slice,ivector_slice,interval>(v1,v2);
3802 return fsl_vv_geq<ivector_slice,srvector_slice,interval>(v1,v2);
3810 return fsl_vv_geq<ivector_slice,sivector_slice,interval>(v1,v2);
3820 return sl_v_output<sivector_slice,interval>(os,v);
3830 return sl_v_input<sivector_slice,interval>(is,v);
3838 spsp_vv_accu<idotprecision,sivector,sivector,sparse_idot>(dot,x,y);
3846 spsp_vv_accu<idotprecision,sivector,srvector,sparse_idot>(dot,x,y);
3854 spsp_vv_accu<idotprecision,srvector,sivector,sparse_idot>(dot,x,y);
3862 spf_vv_accu<idotprecision,sivector,ivector,sparse_idot>(dot,x,y);
3870 spf_vv_accu<idotprecision,sivector,rvector,sparse_idot>(dot,x,y);
3878 spf_vv_accu<idotprecision,srvector,ivector,sparse_idot>(dot,x,y);
3886 spf_vv_accu<idotprecision,sivector,ivector_slice,sparse_idot>(dot,x,y);
3894 spf_vv_accu<idotprecision,sivector,rvector_slice,sparse_idot>(dot,x,y);
3902 spf_vv_accu<idotprecision,srvector,ivector_slice,sparse_idot>(dot,x,y);
3910 fsp_vv_accu<idotprecision,ivector,sivector,sparse_idot>(dot,x,y);
3918 fsp_vv_accu<idotprecision,ivector,srvector,sparse_idot>(dot,x,y);
3926 fsp_vv_accu<idotprecision,rvector,sivector,sparse_idot>(dot,x,y);
3934 fsp_vv_accu<idotprecision,ivector_slice,sivector,sparse_idot>(dot,x,y);
3942 fsp_vv_accu<idotprecision,ivector_slice,srvector,sparse_idot>(dot,x,y);
3950 fsp_vv_accu<idotprecision,rvector_slice,sivector,sparse_idot>(dot,x,y);
3958 slf_vv_accu<idotprecision,sivector_slice,ivector,sparse_idot>(dot,x,y);
3966 slf_vv_accu<idotprecision,sivector_slice,rvector,sparse_idot>(dot,x,y);
3974 slf_vv_accu<idotprecision,srvector_slice,ivector,sparse_idot>(dot,x,y);
3982 slf_vv_accu<idotprecision,sivector_slice,ivector_slice,sparse_idot>(dot,x,y);
3990 slf_vv_accu<idotprecision,sivector_slice,rvector_slice,sparse_idot>(dot,x,y);
3998 slf_vv_accu<idotprecision,srvector_slice,ivector_slice,sparse_idot>(dot,x,y);
4006 fsl_vv_accu<idotprecision,ivector,sivector_slice,sparse_idot>(dot,x,y);
4014 fsl_vv_accu<idotprecision,ivector,srvector_slice,sparse_idot>(dot,x,y);
4022 fsl_vv_accu<idotprecision,rvector,sivector_slice,sparse_idot>(dot,x,y);
4030 fsl_vv_accu<idotprecision,ivector_slice,sivector_slice,sparse_idot>(dot,x,y);
4038 fsl_vv_accu<idotprecision,ivector_slice,srvector_slice,sparse_idot>(dot,x,y);
4046 fsl_vv_accu<idotprecision,rvector_slice,sivector_slice,sparse_idot>(dot,x,y);
4054 slsl_vv_accu<idotprecision,sivector_slice,sivector_slice,sparse_idot>(dot,x,y);
4062 slsl_vv_accu<idotprecision,sivector_slice,srvector_slice,sparse_idot>(dot,x,y);
4070 slsl_vv_accu<idotprecision,srvector_slice,sivector_slice,sparse_idot>(dot,x,y);
4078 spsl_vv_accu<idotprecision,sivector,sivector_slice,sparse_idot>(dot,x,y);
4086 spsl_vv_accu<idotprecision,sivector,srvector_slice,sparse_idot>(dot,x,y);
4094 spsl_vv_accu<idotprecision,srvector,sivector_slice,sparse_idot>(dot,x,y);
4102 slsp_vv_accu<idotprecision,sivector_slice,sivector,sparse_idot>(dot,x,y);
4110 slsp_vv_accu<idotprecision,sivector_slice,srvector,sparse_idot>(dot,x,y);
4118 slsp_vv_accu<idotprecision,srvector_slice,sivector,sparse_idot>(dot,x,y);
4128 accumulate(tmp,x,y);
4129 SetRe(dot, Re(dot) + tmp);
4139 accumulate(tmp,x,y);
4140 SetRe(dot, Re(dot) + tmp);
4150 accumulate(tmp,x,y);
4151 SetRe(dot, Re(dot) + tmp);
4161 accumulate(tmp,x,y);
4162 SetRe(dot, Re(dot) + tmp);
4172 accumulate(tmp,x,y);
4173 SetRe(dot, Re(dot) + tmp);
4183 accumulate(tmp,x,y);
4184 SetRe(dot, Re(dot) + tmp);
4194 accumulate(tmp,x,y);
4195 SetRe(dot, Re(dot) + tmp);
4205 accumulate(tmp,x,y);
4206 SetRe(dot, Re(dot) + tmp);
4216 accumulate(tmp,x,y);
4217 SetRe(dot, Re(dot) + tmp);
4227 accumulate(tmp,x,y);
4228 SetRe(dot, Re(dot) + tmp);
4238 accumulate(tmp,x,y);
4239 SetRe(dot, Re(dot) + tmp);
4249 accumulate(tmp,x,y);
4250 SetRe(dot, Re(dot) + tmp);
4260 accumulate(tmp,x,y);
4261 SetRe(dot, Re(dot) + tmp);
4271 accumulate(tmp,x,y);
4272 SetRe(dot, Re(dot) + tmp);
4282 accumulate(tmp,x,y);
4283 SetRe(dot, Re(dot) + tmp);
4293 accumulate(tmp,x,y);
4294 SetRe(dot, Re(dot) + tmp);
4304 accumulate(tmp,x,y);
4305 SetRe(dot, Re(dot) + tmp);
4315 accumulate(tmp,x,y);
4316 SetRe(dot, Re(dot) + tmp);
4326 accumulate(tmp,x,y);
4327 SetRe(dot, Re(dot) + tmp);
4337 accumulate(tmp,x,y);
4338 SetRe(dot, Re(dot) + tmp);
4348 accumulate(tmp,x,y);
4349 SetRe(dot, Re(dot) + tmp);
4359 accumulate(tmp,x,y);
4360 SetRe(dot, Re(dot) + tmp);
4370 accumulate(tmp,x,y);
4371 SetRe(dot, Re(dot) + tmp);
4381 accumulate(tmp,x,y);
4382 SetRe(dot, Re(dot) + tmp);
4392 accumulate(tmp,x,y);
4393 SetRe(dot, Re(dot) + tmp);
4403 accumulate(tmp,x,y);
4404 SetRe(dot, Re(dot) + tmp);
4414 accumulate(tmp,x,y);
4415 SetRe(dot, Re(dot) + tmp);
4425 accumulate(tmp,x,y);
4426 SetRe(dot, Re(dot) + tmp);
4436 accumulate(tmp,x,y);
4437 SetRe(dot, Re(dot) + tmp);
4447 accumulate(tmp,x,y);
4448 SetRe(dot, Re(dot) + tmp);
4458 accumulate(tmp,x,y);
4459 SetRe(dot, Re(dot) + tmp);
4469 accumulate(tmp,x,y);
4470 SetRe(dot, Re(dot) + tmp);
4480 accumulate(tmp,x,y);
4481 SetRe(dot, Re(dot) + tmp);
4491 accumulate(tmp,x,y);
4492 SetRe(dot, Re(dot) + tmp);
4502 accumulate(tmp,x,y);
4503 SetRe(dot, Re(dot) + tmp);
4513 accumulate(tmp,x,y);
4514 SetRe(dot, Re(dot) + tmp);
4519#include "sparsevector.inl"
The Data Type cidotprecision.
int get_k() const
Get currently set precision for computation of dot products.
The Data Type civector_slice.
The Data Type idotprecision.
void set_k(unsigned int i)
Set precision for computation of dot products.
The Scalar Type interval.
The Data Type ivector_slice.
ivector_slice & operator|=(const ivector &rv) noexcept
Allocates the convex hull of the arguments to the first argument.
ivector_slice & operator+=(const ivector &rv) noexcept
Implementation of addition and allocation operation.
ivector_slice & operator-=(const ivector &rv) noexcept
Implementation of subtraction and allocation operation.
ivector_slice & operator=(const sivector &sl)
Implementation of standard assigning operator.
ivector_slice & operator&=(const ivector &rv) noexcept
Allocates the intersection of the arguments to the first argument.
ivector & operator|=(const srvector &)
Implementation of assignment and hull operator
ivector & operator-=(const srvector &)
Implementation of assignment and substraction operator
ivector & operator&=(const sivector &)
Implementation of assignment and intersection operator
ivector & operator=(const ivector &rv) noexcept
Implementation of standard assigning operator.
ivector & operator+=(const srvector &)
Implementation of assignment and addition operator
ivector() noexcept
Constructor of class ivector.
The Data Type rvector_slice.
Helper class for slices of sparse vectors.
A sparse complex interval vector.
Represents a row or column vector of a sparse matrix.
Helper class for slices of sparse vectors.
real density() const
Returns the density of the vector slice (the number of non zero elements divided by the number of ele...
friend srvector mid(const sivector_slice &)
Computes the midpoint vector of v.
sivector_slice & operator*=(const real &s)
Operator for multiplication with a scalar, result is assigned to the vector slice.
sivector_slice & operator-=(const rvector_slice &v)
Operator for element-wise subtraction with a vector, result is assigned to the vector slice.
friend int Ub(const sivector_slice &)
Returns the upper index bound of the vector slice v.
sivector_slice & operator&=(const sivector_slice &v)
Operator for element-wise intersection with a vector, result is assigned to the vector slice.
const interval operator()(const int i) const
Returns a copy of the i-th (according to the currently used indexing) element of the vector slice.
sivector_slice & operator|=(const srvector_slice &v)
Operator for element-wise convex hull with a vector, result is assigned to the vector slice.
sivector_slice & operator-=(const sivector &v)
Operator for element-wise subtraction with a vector, result is assigned to the vector slice.
friend sivector abs(const sivector_slice &)
Computes the component-wise absolute values as the interval hull of for a vector v.
friend srvector diam(const sivector_slice &)
Computes the diameter of v.
sivector_slice & operator|=(const rvector_slice &v)
Operator for element-wise convex hull with a vector, result is assigned to the vector slice.
sivector_slice & operator+=(const srvector &v)
Operator for element-wise addition with a vector, result is assigned to the vector slice.
sivector_slice & operator=(const sivector &v)
Overwrite the vector slice with the elements of v.
sivector_slice & operator&=(const ivector &v)
Operator for element-wise intersection with a vector, result is assigned to the vector slice.
sivector_slice & operator+=(const sivector &v)
Operator for element-wise addition with a vector, result is assigned to the vector slice.
sivector_slice & operator+=(const rvector &v)
Operator for element-wise addition with a vector, result is assigned to the vector slice.
sivector_slice & operator-=(const srvector_slice &v)
Operator for element-wise subtraction with a vector, result is assigned to the vector slice.
sivector_slice & operator+=(const sivector_slice &v)
Operator for element-wise addition with a vector, result is assigned to the vector slice.
sivector_slice & operator|=(const rvector &v)
Operator for element-wise convex hull with a vector, result is assigned to the vector slice.
sivector_slice & operator=(const rvector &v)
Overwrite the vector slice with the elements of v.
sivector_slice & operator|=(const srvector &v)
Operator for element-wise convex hull with a vector, result is assigned to the vector slice.
sivector_slice & operator-=(const rvector &v)
Operator for element-wise subtraction with a vector, result is assigned to the vector slice.
sivector_slice & operator=(const srvector &v)
Overwrite the vector slice with the elements of v.
sivector_slice & operator+=(const ivector_slice &v)
Operator for element-wise addition with a vector, result is assigned to the vector slice.
sivector_slice & operator-=(const ivector_slice &v)
Operator for element-wise subtraction with a vector, result is assigned to the vector slice.
sivector_slice & operator-=(const sivector_slice &v)
Operator for element-wise subtraction with a vector, result is assigned to the vector slice.
sivector_slice & operator-=(const ivector &v)
Operator for element-wise subtraction with a vector, result is assigned to the vector slice.
int get_nnz() const
Returns the number of non zero elements of this vector slice (note that this includes explicitly stor...
sivector_slice & operator|=(const sivector &v)
Operator for element-wise convex hull with a vector, result is assigned to the vector slice.
sivector_slice & operator+=(const rvector_slice &v)
Operator for element-wise addition with a vector, result is assigned to the vector slice.
friend int VecLen(const sivector_slice &)
Returns the length of the vector slice.
sivector_slice & operator/=(const real &s)
Operator for division of each element of the vector slice with a scalar, result is assigned to the ve...
sivector_slice & operator=(const rvector_slice &v)
Overwrite the vector slice with the elements of v.
sivector_slice & operator-=(const srvector &v)
Operator for element-wise subtraction with a vector, result is assigned to the vector slice.
sivector_slice & operator&=(const ivector_slice &v)
Operator for element-wise intersection with a vector, result is assigned to the vector slice.
sivector_slice & operator+=(const ivector &v)
Operator for element-wise addition with a vector, result is assigned to the vector slice.
sivector_slice & operator=(const ivector &v)
Overwrite the vector slice with the elements of v.
sivector_slice & operator=(const sivector_slice &v)
Overwrite the vector slice with the elements of v.
sivector_slice & operator*=(const interval &s)
Operator for multiplication with an interval, result is assigned to the vector slice.
sivector_slice & operator=(const srvector_slice &v)
Overwrite the vector slice with the elements of v.
sivector_slice & operator&=(const sivector &v)
Operator for element-wise intersection with a vector, result is assigned to the vector slice.
interval operator[](const int i) const
Returns a copy of the i-th (according to the currently used indexing) element of the vector slice.
sivector_slice & operator|=(const ivector_slice &v)
Operator for element-wise convex hull with a vector, result is assigned to the vector slice.
sivector_slice & operator=(const real &v)
Assigns v to all elements of the vector slice.
friend srvector Inf(const sivector_slice &)
Returns the infimum vector slice v.
interval & operator[](const int i)
Returns a reference to the i-th (according to the currently used indexing) element of the vector slic...
sivector_slice & operator|=(const ivector &v)
Operator for element-wise convex hull with a vector, result is assigned to the vector slice.
sivector_slice & operator/=(const interval &s)
Operator for division of each element of the vector slice with an interval, result is assigned to the...
friend srvector Sup(const sivector_slice &)
Returns the supremum of the vector slice v.
friend int Lb(const sivector_slice &)
Returns the lower index bound of the vector slice v.
sivector_slice & operator+=(const srvector_slice &v)
Operator for element-wise addition with a vector, result is assigned to the vector slice.
sivector_slice & operator=(const ivector_slice &v)
Overwrite the vector slice with the elements of v.
sivector_slice & operator=(const interval &v)
Assigns v to all elements of the vector slice.
sivector_slice & operator|=(const sivector_slice &v)
Operator for element-wise convex hull with a vector, result is assigned to the vector slice.
A sparse interval vector.
sivector & operator|=(const srvector &v)
Operator for element-wise convex hull with another vector, result is assigned to the vector.
real density() const
Returns the density of the vector (the number of non zero elements divided by the number of elements)
sivector()
Default constructor, creates an empty vector of size 0.
friend sivector Im(const scivector &)
Returns the imaginary part of the vector v.
sivector(const ivector &v)
Constructor for creating a sparse vector our of a dense vector v. Only the non-zero elements of v are...
sivector & operator=(const rvector_slice &v)
Assign the dense vector slice v to a sparse vector. Only the non zero elements of v are used.
friend srvector Inf(const sivector &)
Returns the infimum of the interval vector as a new sparse point vector.
sivector & operator-=(const rvector &v)
Operator for element-wise subtraction with a vector, result is assigned to the vector.
friend void SetLb(sivector &, const int)
Sets the lower index bound of the vector v to i.
sivector & operator+=(const rvector_slice &v)
Operator for element-wise addition with a vector, result is assigned to the vector.
sivector & operator*=(const real &s)
Operator for multiplication with a scalar, result is assigned to the vector.
void dropzeros()
Erases explicitly stored zeros from the data structure.
friend srvector Sup(const sivector &)
Returns the supremum of the interval vector as a new sparse point vector.
sivector(const rvector &v)
Constructor for creating a sparse vector our of a dense vector v. Only the non-zero elements of v are...
sivector & operator/=(const interval &s)
Operator for division of each element of the vector with an interval, result is assigned to the vecto...
sivector & operator|=(const sivector &v)
Operator for element-wise convex hull with another vector, result is assigned to the vector.
friend int Ub(const sivector &)
Returns the upper index bound of the vector v.
sivector & operator=(const ivector_slice &v)
Assign the dense vector slice v to a sparse vector. Only the non zero elements of v are used.
sivector & operator&=(const ivector_slice &v)
Operator for element-wise intersection with another vector, result is assigned to the vector.
sivector & operator+=(const rvector &v)
Operator for element-wise addition with a vector, result is assigned to the vector.
interval & operator[](const int i)
Returns a reference to the i-th (according to the currently used indexing) element of the vector.
const interval operator()(const int i) const
Returns a copy of the i-th (according to the currently used indexing) element of the vector.
friend srvector mid(const sivector &)
Compute the midpoint vector of v.
sivector & operator+=(const ivector &v)
Operator for element-wise addition with a vector, result is assigned to the vector.
sivector & operator*=(const interval &s)
Operator for multiplication with an interval, result is assigned to the vector.
friend srvector diam(const sivector &)
Computes the diameter of v.
sivector & operator=(const real &v)
Assigns v to all elements of the vector (resulting in a dense vector!)
sivector(const srmatrix_subv &A)
Creates a sparse interval vector out of a row or column of a sparse real matrix.
sivector & operator+=(const ivector_slice &v)
Operator for element-wise addition with a vector, result is assigned to the vector.
friend void SetUb(sivector &, const int)
Sets the upper index bound of the vector v to i.
sivector & operator-=(const ivector_slice &v)
Operator for element-wise subtraction with a vector, result is assigned to the vector.
sivector & operator+=(const sivector &v)
Operator for element-wise addition with a vector, result is assigned to the vector.
sivector & operator-=(const srvector &v)
Operator for element-wise subtraction with a vector, result is assigned to the vector.
sivector & operator-=(const ivector &v)
Operator for element-wise subtraction with a vector, result is assigned to the vector.
friend srvector absmin(const sivector &)
Computes the component-wise minimum absolute values for a vector v.
friend int Lb(const sivector &)
Returns the lower index bound of the vector v.
sivector operator()(const intvector &per)
Returns a vector whose elemnts are rearranged according to a given permutation vector.
sivector & operator-=(const rvector_slice &v)
Operator for element-wise subtraction with a vector, result is assigned to the vector.
interval operator[](const int i) const
Returns a copy of the i-th (according to the currently used indexing) element of the vector.
friend sivector Blow(const sivector &, const real &)
Performs an epsilon inflation of the vector v.
sivector & operator|=(const rvector &v)
Operator for element-wise convex hull with another vector, result is assigned to the vector.
sivector & operator=(const rvector &v)
Assign the dense vector v to a sparse vector. Only the non zero elements of v are used.
sivector operator()(const intmatrix &P)
Returns a vector whose elemnts are rearranged according to a given permutation matrix.
const std::vector< interval > & values() const
Returns a reference to the STL-vector storing the values of the non zero elements.
sivector(const int n, const int nnz, const intvector &index, const ivector &values)
Creates a sparse vector of dimension n with nnz non zeros, who are defined by the elements of index a...
std::vector< int > & row_indices()
Returns a reference to the STL-vector storing the row indices of the non zero elements.
sivector(const int n, const int nnz, const int *index, const interval *values)
Creates a sparse vector of dimension n with nnz non zeros, who are defined by the elements of index a...
sivector(const int s)
Constructor for creating an empty vector of size s.
sivector & operator-=(const sivector &v)
Operator for element-wise subtraction with a vector, result is assigned to the vector.
sivector & operator&=(const sivector &v)
Operator for element-wise intersection with another vector, result is assigned to the vector.
sivector(const int s, const int b)
Constructor for creating an empty vector of size s and reserving memory for b elements.
sivector & operator=(const interval &v)
Assigns v to all elements of the vector (resulting in a dense vector!)
sivector & operator=(const srvector &v)
Assign a sparse real vector to a sparse interval vector.
friend sivector Re(const scivector &)
Returns the real part of the vector v.
int get_nnz() const
Returns the number of non zero elements of this vector (note that this includes explicitly stored zer...
friend sivector abs(const sivector &)
Computes the component-wise absolute values as the interval hull of for a vector v.
sivector & operator|=(const ivector_slice &v)
Operator for element-wise convex hull with another vector, result is assigned to the vector.
sivector & operator/=(const real &s)
Operator for division of each element of the vector with a scalar, result is assigned to the vector.
friend srvector absmax(const sivector &)
Computes the component-wise maximum absolute values for a vector v.
const std::vector< int > & row_indices() const
Returns a reference to the STL-vector storing the row indices of the non zero elements.
sivector & operator+=(const srvector &v)
Operator for element-wise addition with a vector, result is assigned to the vector.
sivector(const srvector &v)
Creates a sparse interval vector out of a sparse real vector.
std::vector< interval > & values()
Returns a reference to the STL-vector storing the values of the non zero elements.
sivector & operator=(const ivector &v)
Assign the dense vector v to a sparse vector. Only the non zero elements of v are used.
sivector & operator|=(const ivector &v)
Operator for element-wise convex hull with another vector, result is assigned to the vector.
friend int VecLen(const sivector &)
Returns the length of the vector (the dimension)
sivector & operator|=(const rvector_slice &v)
Operator for element-wise convex hull with another vector, result is assigned to the vector.
Represents a row or column vector of a sparse matrix.
Helper class for slices of sparse vectors.
void dropzeros()
Erases explicitly stored zeros from the data structure.
int get_nnz() const
Returns the number of non zero elements of this vector (note that this includes explicitly stored zer...
The namespace cxsc, providing all functionality of the class library C-XSC.
int VecLen(const scimatrix_subv &S)
Returns the length of the subvector.
civector operator/(const cimatrix_subv &rv, const cinterval &s) noexcept
Implementation of division operation.
cvector diam(const cimatrix_subv &mv) noexcept
Returns the diameter of the matrix.
rvector absmax(const imatrix_subv &mv) noexcept
Returns the absolute maximum value of the matrix.
int Ub(const cimatrix &rm, const int &i) noexcept
Returns the upper bound index.
cimatrix & SetLb(cimatrix &m, const int &i, const int &j) noexcept
Sets the lower bound index.
int in(const cinterval &x, const cinterval &y)
Checks if first argument is part of second argument.
rvector absmin(const imatrix_subv &mv) noexcept
Returns the absolute minimum value of the matrix.
real AbsMax(const interval &x)
Computes the greatest absolute value .
ivector abs(const cimatrix_subv &mv) noexcept
Returns the absolute value of the matrix.
cvector mid(const cimatrix_subv &mv) noexcept
Returns the middle of the matrix.
civector operator*(const cimatrix_subv &rv, const cinterval &s) noexcept
Implementation of multiplication operation.
void Resize(cimatrix &A) noexcept
Resizes the matrix.
cimatrix & SetUb(cimatrix &m, const int &i, const int &j) noexcept
Sets the upper bound index.
int Lb(const cimatrix &rm, const int &i) noexcept
Returns the lower bound index.
int Zero(ivector &x)
Checks if vector is zero vector.
cinterval Blow(cinterval x, const real &eps)
Performs an epsilon inflation.
real AbsMin(const interval &x)
Computes the smallest absolute value .