30 # include <itpp/config.h>
32 # include <itpp/config_msvc.h>
35 #if defined (HAVE_BLAS)
36 # include <itpp/base/blas.h>
49 int Vec<int>::parse_token(
const std::string &s)
const
52 std::istringstream buffer(s);
53 if (s.find(
'x', 1) != std::string::npos) {
54 buffer >> std::hex >> out;
56 else if (((s[0] ==
'0')
57 || (((s[0] ==
'-') || (s[0] ==
'+')) && (s[1] ==
'0')))
58 && (s.find(
'8', 1) == std::string::npos)
59 && (s.find(
'9', 1) == std::string::npos)) {
60 buffer >> std::oct >> out;
63 buffer >> std::dec >> out;
69 double Vec<double>::parse_token(
const std::string &s)
const
72 if ((s ==
"NaN") || (s ==
"nan") || (s ==
"NAN")) {
73 if (std::numeric_limits<double>::has_quiet_NaN)
74 out = std::numeric_limits<double>::quiet_NaN();
75 else if (std::numeric_limits<double>::has_signaling_NaN)
76 out = std::numeric_limits<double>::signaling_NaN();
78 it_error(
"Vec<double>::set(): NaN not supported");
80 else if ((s ==
"-Inf") || (s ==
"-inf") || (s ==
"-INF")) {
81 out = -std::numeric_limits<double>::infinity();
83 else if ((s ==
"Inf") || (s ==
"inf") || (s ==
"INF") ||
84 (s ==
"+Inf") || (s ==
"+inf") || (s ==
"+INF")) {
85 out = std::numeric_limits<double>::infinity();
88 std::istringstream buffer(s);
90 it_assert(!buffer.fail(),
"Vec<double>::set(): Stream operation failed "
98 void Vec<bin>::set(
const std::string &str)
101 std::vector<std::string> tokens = tokenize(str, abc_format);
102 it_assert(!abc_format,
"Vec<bin>::set(): \"a:b:c\" format string not "
103 "supported for binary vectors");
104 set_size(
int(tokens.size()));
105 for (std::vector<std::string>::size_type i = 0; i < tokens.size(); ++i) {
106 std::istringstream buffer(tokens[i]);
108 it_assert(!buffer.fail(),
"Vec<bin>::set(): Stream operation failed "
114 void Vec<short int>::set(
const std::string &str)
122 void Vec<int>::set(
const std::string &str)
125 std::vector<std::string> tokens = tokenize(str, abc_format);
128 set_size(
int(tokens.size()));
129 for (std::vector<std::string>::size_type i = 0; i < tokens.size(); ++i)
130 data[i] = parse_token(tokens[i]);
134 set_size((tokens.size() > 20) ?
int(tokens.size()) : 20);
135 for (std::vector<std::string>::size_type i = 0; i < tokens.size(); ++i) {
137 if (tokens[i].
find(
':', 1) == std::string::npos) {
138 if (++pos > datasize) {
139 set_size(2 * datasize,
true);
141 data[pos-1] = parse_token(tokens[i]);
145 parse_abc_token(tokens[i], a, b, c);
146 if (++pos > datasize) {
147 set_size(2 * datasize,
true);
151 if ((b > 0) && (c >= a)) {
152 while ((data[pos-1] + b) <= c) {
153 if (++pos > datasize) {
154 set_size(2 * datasize,
true);
156 data[pos-1] = data[pos-2] + b;
159 else if ((b < 0) && (c <= a)) {
160 while ((data[pos-1] + b) >= c) {
161 if (++pos > datasize) {
162 set_size(2 * datasize,
true);
164 data[pos-1] = data[pos-2] + b;
167 else if (b == 0 && c == a) {
171 it_error(
"Vec<int>::set(): Improper data string (a:b:c)");
181 void Vec<double>::set(
const std::string &str)
184 std::vector<std::string> tokens = tokenize(str, abc_format);
187 set_size(
int(tokens.size()));
188 for (std::vector<std::string>::size_type i = 0; i < tokens.size(); ++i)
189 data[i] = parse_token(tokens[i]);
193 set_size((tokens.size() > 20) ?
int(tokens.size()) : 20);
194 for (std::vector<std::string>::size_type i = 0; i < tokens.size(); ++i) {
196 if (tokens[i].
find(
':', 1) == std::string::npos) {
197 if (++pos > datasize) {
198 set_size(2 * datasize,
true);
200 data[pos-1] = parse_token(tokens[i]);
204 parse_abc_token(tokens[i], a, b, c);
205 if (++pos > datasize) {
206 set_size(2 * datasize,
true);
211 double eps_margin = std::fabs((c - a) / b) *
eps;
212 if ((b > 0) && (c >= a)) {
213 while ((data[pos-1] + b) <= (c + eps_margin)) {
214 if (++pos > datasize) {
215 set_size(2 * datasize,
true);
217 data[pos-1] = data[pos-2] + b;
220 else if ((b < 0) && (c <= a)) {
221 while ((data[pos-1] + b) >= (c - eps_margin)) {
222 if (++pos > datasize) {
223 set_size(2 * datasize,
true);
225 data[pos-1] = data[pos-2] + b;
228 else if (b == 0 && c == a) {
232 it_error(
"Vec<double>::set(): Improper data string (a:b:c)");
241 void Vec<std::complex<double> >::set(
const std::string &str)
244 std::vector<std::string> tokens = tokenize(str, abc_format);
245 it_assert(!abc_format,
"Vec<bin>::set(): \"a:b:c\" format string not "
246 "supported for binary vectors");
247 set_size(
int(tokens.size()));
248 for (std::vector<std::string>::size_type i = 0; i < tokens.size(); ++i) {
249 std::istringstream buffer(tokens[i]);
251 it_assert(!buffer.fail(),
"Vec<complex>::set(): Stream operation failed "
256 #if defined(HAVE_BLAS)
258 double dot(
const vec &v1,
const vec &v2)
260 it_assert_debug(v1.length() == v2.length(),
"vec::dot(): Wrong sizes");
261 int incr = 1;
int v1_l = v1.length();
262 return blas::ddot_(&v1_l, v1._data(), &incr, v2._data(), &incr);
266 double dot(
const vec &v1,
const vec &v2)
268 it_assert_debug(v1.length() == v2.length(),
"vec::dot(): Wrong sizes");
270 for (
int i = 0; i < v1.length(); ++i)
271 r += v1._data()[i] * v2._data()[i];
276 #if defined(HAVE_BLAS)
281 "Vec::outer_product:: Input vector of zero size");
282 int v1_l = v1.length();
int v2_l = v2.length();
287 blas::dger_(&v1_l, &v2_l, &alpha, v1._data(), &incr,
288 v2._data(), &incr, out._data(), &v1_l);
293 cmat
outer_product(
const cvec &v1,
const cvec &v2,
bool hermitian)
296 "Vec::outer_product:: Input vector of zero size");
297 int v1_l = v1.length();
int v2_l = v2.length();
298 cmat out(v1_l, v2_l);
300 std::complex<double> alpha(1.0);
303 blas::zgerc_(&v1_l, &v2_l, &alpha, v1._data(), &incr,
304 v2._data(), &incr, out._data(), &v1_l);
307 blas::zgeru_(&v1_l, &v2_l, &alpha, v1._data(), &incr,
308 v2._data(), &incr, out._data(), &v1_l);
317 "Vec::outer_product:: Input vector of zero size");
318 int v1_l = v1.length();
int v2_l = v2.length();
320 for (
int i = 0; i < v1_l; ++i) {
321 for (
int j = 0; j < v2_l; ++j) {
322 out(i, j) = v1._data()[i] * v2._data()[j];
329 cmat
outer_product(
const cvec &v1,
const cvec &v2,
bool hermitian)
332 "Vec::outer_product:: Input vector of zero size");
333 int v1_l = v1.length();
int v2_l = v2.length();
334 cmat out(v1_l, v2_l);
336 for (
int i = 0; i < v1_l; ++i) {
337 for (
int j = 0; j < v2_l; ++j) {
338 out(i, j) = v1._data()[i] *
conj(v2._data()[j]);
343 for (
int i = 0; i < v1_l; ++i) {
344 for (
int j = 0; j < v2_l; ++j) {
345 out(i, j) = v1._data()[i] * v2._data()[j];
355 bvec Vec<std::complex<double> >::operator<=(std::complex<double>)
const
357 it_error(
"operator<=: not implemented for complex");
363 bvec Vec<std::complex<double> >::operator>(std::complex<double>)
const
365 it_error(
"operator>: not implemented for complex");
371 bvec Vec<std::complex<double> >::operator<(std::complex<double>)
const
373 it_error(
"operator<: not implemented for complex");
379 bvec Vec<std::complex<double> >::operator>=(std::complex<double>)
const
381 it_error(
"operator>=: not implemented for complex");
389 Mat<std::complex<double> > temp(1, datasize);
390 for (
int i = 0; i < datasize; i++)
401 template class ITPP_EXPORT Vec<double>;
402 template class ITPP_EXPORT Vec<int>;
403 template class ITPP_EXPORT Vec<short int>;
404 template class ITPP_EXPORT Vec<std::complex<double> >;
405 template class ITPP_EXPORT Vec<bin>;
409 template ITPP_EXPORT vec
operator+(
const vec &v1,
const vec &v2);
410 template ITPP_EXPORT cvec
operator+(
const cvec &v1,
const cvec &v2);
411 template ITPP_EXPORT ivec
operator+(
const ivec &v1,
const ivec &v2);
412 template ITPP_EXPORT svec
operator+(
const svec &v1,
const svec &v2);
413 template ITPP_EXPORT bvec
operator+(
const bvec &v1,
const bvec &v2);
415 template ITPP_EXPORT vec
operator+(
const vec &v1,
double t);
416 template ITPP_EXPORT cvec
operator+(
const cvec &v1, std::complex<double> t);
417 template ITPP_EXPORT ivec
operator+(
const ivec &v1,
int t);
418 template ITPP_EXPORT svec
operator+(
const svec &v1,
short t);
419 template ITPP_EXPORT bvec
operator+(
const bvec &v1, bin t);
421 template ITPP_EXPORT vec
operator+(
double t,
const vec &v1);
422 template ITPP_EXPORT cvec
operator+(std::complex<double> t,
const cvec &v1);
423 template ITPP_EXPORT ivec
operator+(
int t,
const ivec &v1);
424 template ITPP_EXPORT svec
operator+(
short t,
const svec &v1);
425 template ITPP_EXPORT bvec
operator+(bin t,
const bvec &v1);
429 template ITPP_EXPORT vec
operator-(
const vec &v1,
const vec &v2);
430 template ITPP_EXPORT cvec
operator-(
const cvec &v1,
const cvec &v2);
431 template ITPP_EXPORT ivec
operator-(
const ivec &v1,
const ivec &v2);
432 template ITPP_EXPORT svec
operator-(
const svec &v1,
const svec &v2);
433 template ITPP_EXPORT bvec
operator-(
const bvec &v1,
const bvec &v2);
435 template ITPP_EXPORT vec
operator-(
const vec &v,
double t);
436 template ITPP_EXPORT cvec
operator-(
const cvec &v, std::complex<double> t);
437 template ITPP_EXPORT ivec
operator-(
const ivec &v,
int t);
438 template ITPP_EXPORT svec
operator-(
const svec &v,
short t);
439 template ITPP_EXPORT bvec
operator-(
const bvec &v, bin t);
441 template ITPP_EXPORT vec
operator-(
double t,
const vec &v);
442 template ITPP_EXPORT cvec
operator-(std::complex<double> t,
const cvec &v);
443 template ITPP_EXPORT ivec
operator-(
int t,
const ivec &v);
444 template ITPP_EXPORT svec
operator-(
short t,
const svec &v);
445 template ITPP_EXPORT bvec
operator-(bin t,
const bvec &v);
449 template ITPP_EXPORT vec
operator-(
const vec &v);
450 template ITPP_EXPORT cvec
operator-(
const cvec &v);
451 template ITPP_EXPORT ivec
operator-(
const ivec &v);
452 template ITPP_EXPORT svec
operator-(
const svec &v);
453 template ITPP_EXPORT bvec
operator-(
const bvec &v);
456 template ITPP_EXPORT std::complex<double>
dot(
const cvec &v1,
const cvec &v2);
457 template ITPP_EXPORT
int dot(
const ivec &v1,
const ivec &v2);
458 template ITPP_EXPORT
short dot(
const svec &v1,
const svec &v2);
459 template ITPP_EXPORT bin
dot(
const bvec &v1,
const bvec &v2);
461 template ITPP_EXPORT
double operator*(
const vec &v1,
const vec &v2);
462 template ITPP_EXPORT std::complex<double>
operator*(
const cvec &v1,
const cvec &v2);
463 template ITPP_EXPORT
int operator*(
const ivec &v1,
const ivec &v2);
464 template ITPP_EXPORT
short operator*(
const svec &v1,
const svec &v2);
465 template ITPP_EXPORT bin
operator*(
const bvec &v1,
const bvec &v2);
467 template ITPP_EXPORT imat
outer_product(
const ivec &v1,
const ivec &v2,
bool hermitian);
468 template ITPP_EXPORT smat
outer_product(
const svec &v1,
const svec &v2,
bool hermitian);
469 template ITPP_EXPORT
bmat outer_product(
const bvec &v1,
const bvec &v2,
bool hermitian);
471 template ITPP_EXPORT vec
operator*(
const vec &v,
double t);
472 template ITPP_EXPORT cvec
operator*(
const cvec &v, std::complex<double> t);
473 template ITPP_EXPORT ivec
operator*(
const ivec &v,
int t);
474 template ITPP_EXPORT svec
operator*(
const svec &v,
short t);
475 template ITPP_EXPORT bvec
operator*(
const bvec &v, bin t);
477 template ITPP_EXPORT vec
operator*(
double t,
const vec &v);
478 template ITPP_EXPORT cvec
operator*(std::complex<double> t,
const cvec &v);
479 template ITPP_EXPORT ivec
operator*(
int t,
const ivec &v);
480 template ITPP_EXPORT svec
operator*(
short t,
const svec &v);
481 template ITPP_EXPORT bvec
operator*(bin t,
const bvec &v);
485 template ITPP_EXPORT vec
elem_mult(
const vec &a,
const vec &b);
486 template ITPP_EXPORT cvec
elem_mult(
const cvec &a,
const cvec &b);
487 template ITPP_EXPORT ivec
elem_mult(
const ivec &a,
const ivec &b);
488 template ITPP_EXPORT svec
elem_mult(
const svec &a,
const svec &b);
489 template ITPP_EXPORT bvec
elem_mult(
const bvec &a,
const bvec &b);
491 template ITPP_EXPORT
void elem_mult_out(
const vec &a,
const vec &b, vec &out);
492 template ITPP_EXPORT
void elem_mult_out(
const cvec &a,
const cvec &b, cvec &out);
493 template ITPP_EXPORT
void elem_mult_out(
const ivec &a,
const ivec &b, ivec &out);
494 template ITPP_EXPORT
void elem_mult_out(
const svec &a,
const svec &b, svec &out);
495 template ITPP_EXPORT
void elem_mult_out(
const bvec &a,
const bvec &b, bvec &out);
497 template ITPP_EXPORT vec
elem_mult(
const vec &a,
const vec &b,
const vec &c);
498 template ITPP_EXPORT cvec
elem_mult(
const cvec &a,
const cvec &b,
const cvec &c);
499 template ITPP_EXPORT ivec
elem_mult(
const ivec &a,
const ivec &b,
const ivec &c);
500 template ITPP_EXPORT svec
elem_mult(
const svec &a,
const svec &b,
const svec &c);
501 template ITPP_EXPORT bvec
elem_mult(
const bvec &a,
const bvec &b,
const bvec &c);
503 template ITPP_EXPORT
void elem_mult_out(
const vec &a,
const vec &b,
const vec &c,
505 template ITPP_EXPORT
void elem_mult_out(
const cvec &a,
const cvec &b,
const cvec &c,
507 template ITPP_EXPORT
void elem_mult_out(
const ivec &a,
const ivec &b,
const ivec &c,
509 template ITPP_EXPORT
void elem_mult_out(
const svec &a,
const svec &b,
const svec &c,
511 template ITPP_EXPORT
void elem_mult_out(
const bvec &a,
const bvec &b,
const bvec &c,
514 template ITPP_EXPORT vec
elem_mult(
const vec &a,
const vec &b,
const vec &c,
516 template ITPP_EXPORT cvec
elem_mult(
const cvec &a,
const cvec &b,
const cvec &c,
518 template ITPP_EXPORT ivec
elem_mult(
const ivec &a,
const ivec &b,
const ivec &c,
520 template ITPP_EXPORT svec
elem_mult(
const svec &a,
const svec &b,
const svec &c,
522 template ITPP_EXPORT bvec
elem_mult(
const bvec &a,
const bvec &b,
const bvec &c,
525 template ITPP_EXPORT
void elem_mult_out(
const vec &a,
const vec &b,
const vec &c,
526 const vec &d, vec &out);
527 template ITPP_EXPORT
void elem_mult_out(
const cvec &a,
const cvec &b,
const cvec &c,
528 const cvec &d, cvec &out);
529 template ITPP_EXPORT
void elem_mult_out(
const ivec &a,
const ivec &b,
const ivec &c,
530 const ivec &d, ivec &out);
531 template ITPP_EXPORT
void elem_mult_out(
const svec &a,
const svec &b,
const svec &c,
532 const svec &d, svec &out);
533 template ITPP_EXPORT
void elem_mult_out(
const bvec &a,
const bvec &b,
const bvec &c,
534 const bvec &d, bvec &out);
546 template ITPP_EXPORT
double elem_mult_sum(
const vec &a,
const vec &b);
547 template ITPP_EXPORT std::complex<double>
elem_mult_sum(
const cvec &a,
const cvec &b);
548 template ITPP_EXPORT
int elem_mult_sum(
const ivec &a,
const ivec &b);
549 template ITPP_EXPORT
short elem_mult_sum(
const svec &a,
const svec &b);
550 template ITPP_EXPORT bin
elem_mult_sum(
const bvec &a,
const bvec &b);
554 template ITPP_EXPORT vec
operator/(
const vec &v,
double t);
555 template ITPP_EXPORT cvec
operator/(
const cvec &v, std::complex<double> t);
556 template ITPP_EXPORT ivec
operator/(
const ivec &v,
int t);
557 template ITPP_EXPORT svec
operator/(
const svec &v,
short t);
558 template ITPP_EXPORT bvec
operator/(
const bvec &v, bin t);
560 template ITPP_EXPORT vec
operator/(
double t,
const vec &v);
561 template ITPP_EXPORT cvec
operator/(std::complex<double> t,
const cvec &v);
562 template ITPP_EXPORT ivec
operator/(
int t,
const ivec &v);
563 template ITPP_EXPORT svec
operator/(
short t,
const svec &v);
564 template ITPP_EXPORT bvec
operator/(bin t,
const bvec &v);
568 template ITPP_EXPORT vec
elem_div(
const vec &a,
const vec &b);
569 template ITPP_EXPORT cvec
elem_div(
const cvec &a,
const cvec &b);
570 template ITPP_EXPORT ivec
elem_div(
const ivec &a,
const ivec &b);
571 template ITPP_EXPORT svec
elem_div(
const svec &a,
const svec &b);
572 template ITPP_EXPORT bvec
elem_div(
const bvec &a,
const bvec &b);
574 template ITPP_EXPORT vec
elem_div(
double t,
const vec &v);
575 template ITPP_EXPORT cvec
elem_div(std::complex<double> t,
const cvec &v);
576 template ITPP_EXPORT ivec
elem_div(
int t,
const ivec &v);
577 template ITPP_EXPORT svec
elem_div(
short t,
const svec &v);
578 template ITPP_EXPORT bvec
elem_div(bin t,
const bvec &v);
580 template ITPP_EXPORT
void elem_div_out(
const vec &a,
const vec &b, vec &out);
581 template ITPP_EXPORT
void elem_div_out(
const cvec &a,
const cvec &b, cvec &out);
582 template ITPP_EXPORT
void elem_div_out(
const ivec &a,
const ivec &b, ivec &out);
583 template ITPP_EXPORT
void elem_div_out(
const svec &a,
const svec &b, svec &out);
584 template ITPP_EXPORT
void elem_div_out(
const bvec &a,
const bvec &b, bvec &out);
588 template ITPP_EXPORT
double elem_div_sum(
const vec &a,
const vec &b);
589 template ITPP_EXPORT std::complex<double>
elem_div_sum(
const cvec &a,
const cvec &b);
590 template ITPP_EXPORT
int elem_div_sum(
const ivec &a,
const ivec &b);
591 template ITPP_EXPORT
short elem_div_sum(
const svec &a,
const svec &b);
592 template ITPP_EXPORT bin
elem_div_sum(
const bvec &a,
const bvec &b);
596 template ITPP_EXPORT vec
concat(
const vec &v,
double a);
597 template ITPP_EXPORT cvec
concat(
const cvec &v, std::complex<double> a);
598 template ITPP_EXPORT ivec
concat(
const ivec &v,
int a);
599 template ITPP_EXPORT svec
concat(
const svec &v,
short a);
600 template ITPP_EXPORT bvec
concat(
const bvec &v, bin a);
602 template ITPP_EXPORT vec
concat(
double a,
const vec &v);
603 template ITPP_EXPORT cvec
concat(std::complex<double> a,
const cvec &v);
604 template ITPP_EXPORT ivec
concat(
int a,
const ivec &v);
605 template ITPP_EXPORT svec
concat(
short a,
const svec &v);
606 template ITPP_EXPORT bvec
concat(bin a,
const bvec &v);
608 template ITPP_EXPORT vec
concat(
const vec &v1,
const vec &v2);
609 template ITPP_EXPORT cvec
concat(
const cvec &v1,
const cvec &v2);
610 template ITPP_EXPORT ivec
concat(
const ivec &v1,
const ivec &v2);
611 template ITPP_EXPORT svec
concat(
const svec &v1,
const svec &v2);
612 template ITPP_EXPORT bvec
concat(
const bvec &v1,
const bvec &v2);
614 template ITPP_EXPORT vec
concat(
const vec &v1,
const vec &v2,
const vec &v3);
615 template ITPP_EXPORT cvec
concat(
const cvec &v1,
const cvec &v2,
const cvec &v3);
616 template ITPP_EXPORT ivec
concat(
const ivec &v1,
const ivec &v2,
const ivec &v3);
617 template ITPP_EXPORT svec
concat(
const svec &v1,
const svec &v2,
const svec &v3);
618 template ITPP_EXPORT bvec
concat(
const bvec &v1,
const bvec &v2,
const bvec &v3);
620 template ITPP_EXPORT vec
concat(
const vec &v1,
const vec &v2,
621 const vec &v3,
const vec &v4);
622 template ITPP_EXPORT cvec
concat(
const cvec &v1,
const cvec &v2,
623 const cvec &v3,
const cvec &v4);
624 template ITPP_EXPORT ivec
concat(
const ivec &v1,
const ivec &v2,
625 const ivec &v3,
const ivec &v4);
626 template ITPP_EXPORT svec
concat(
const svec &v1,
const svec &v2,
627 const svec &v3,
const svec &v4);
628 template ITPP_EXPORT bvec
concat(
const bvec &v1,
const bvec &v2,
629 const bvec &v3,
const bvec &v4);
631 template ITPP_EXPORT vec
concat(
const vec &v1,
const vec &v2,
const vec &v3,
632 const vec &v4,
const vec &v5);
633 template ITPP_EXPORT cvec
concat(
const cvec &v1,
const cvec &v2,
const cvec &v3,
634 const cvec &v4,
const cvec &v5);
635 template ITPP_EXPORT ivec
concat(
const ivec &v1,
const ivec &v2,
const ivec &v3,
636 const ivec &v4,
const ivec &v5);
637 template ITPP_EXPORT svec
concat(
const svec &v1,
const svec &v2,
const svec &v3,
638 const svec &v4,
const svec &v5);
639 template ITPP_EXPORT bvec
concat(
const bvec &v1,
const bvec &v2,
const bvec &v3,
640 const bvec &v4,
const bvec &v5);
644 template ITPP_EXPORT std::ostream &
operator<<(std::ostream& os,
const vec &vect);
645 template ITPP_EXPORT std::ostream &
operator<<(std::ostream& os,
const cvec &vect);
646 template ITPP_EXPORT std::ostream &
operator<<(std::ostream& os,
const svec &vect);
647 template ITPP_EXPORT std::ostream &
operator<<(std::ostream& os,
const ivec &vect);
648 template ITPP_EXPORT std::ostream &
operator<<(std::ostream& os,
const bvec &vect);
649 template ITPP_EXPORT std::istream &
operator>>(std::istream& is, vec &vect);
650 template ITPP_EXPORT std::istream &
operator>>(std::istream& is, cvec &vect);
651 template ITPP_EXPORT std::istream &
operator>>(std::istream& is, svec &vect);
652 template ITPP_EXPORT std::istream &
operator>>(std::istream& is, ivec &vect);
653 template ITPP_EXPORT std::istream &
operator>>(std::istream& is, bvec &vect);