41 template<
class T,
int length>
281 template<
typename _CharT,
class _Traits,
class T,
int length>
282 std::basic_ostream<_CharT, _Traits>&
287 std::basic_ostringstream<_CharT, _Traits> s;
288 s.flags(__os.flags());
289 s.imbue(__os.getloc());
290 s.precision(__os.precision());
295 for(
int j = 1;j<in.get_len();++j)
299 return __os << s.str();
303 template<
class T,
int length>
306 for(
int j = 0;j<length; ++j)
307 if(data_[j] != b.
data_[j])
312 template<
class T,
int length>
314 for(
int j = 0;j<length; ++j)
315 data_[j] = y.
data_[j];
317 template<
class T,
int length>
319 if(i<0 || i>= length)
320 throw std::runtime_error(
"Tuple range error");
323 template<
class T,
int length>
325 if(i<0 || i>= length)
326 throw std::runtime_error(
"Tuple range error");
329 template<
class T,
int length>
332 for(
int j = 0;j<length; ++j)
333 tmp.
data_[j] = -data_[j];
336 template<
class T,
int length>
340 for(
int j = 0;j<length; ++j)
344 template<
class T,
int length>
347 for(
int j = 0;j<length; ++j)
348 tmp.
data_[j] = y + data_[j];
351 template<
class T,
int length>
353 for(
int j = 0;j<length; ++j)
354 data_[j] += y.
data_[j] ;
357 template<
class T,
int length>
359 for(
int j = 0;j<length; ++j)
364 template<
class T,
int length>
367 for(
int j = 0;j<length; ++j)
371 template<
class T,
int length>
374 for(
int j = 0;j<length; ++j)
375 tmp.
data_[j] = -y + data_[j];
378 template<
class T,
int length>
380 for(
int j = 0;j<length; ++j)
381 data_[j] -= y.
data_[j] ;
384 template<
class T,
int length>
386 for(
int j = 0;j<length; ++j)
391 template<
class T,
int length>
394 for(
int j = 0;j<length; ++j){
399 template<
class T,
int length>
402 for(
int j = 0;j<length; ++j){
403 tmp.
data_[j] = data_[j] * y ;
407 template<
class T,
int length>
409 for(
int j = 0;j<length; ++j)
410 data_[j] *= y.
data_[j] ;
412 template<
class T,
int length>
414 for(
int j = 0;j<length; ++j)
420 template<
class T,
int length>
422 for(
int j = 0;j<length; ++j)
423 data_[j] /= y.
data_[j] ;
426 template<
class T,
int length>
428 for(
int j = 0;j<length; ++j)
431 template<
class T,
int length>
434 for(
int j = 0;j<length; ++j)
442 template<
class T,
int length>
446 for(
int j = 0;j<length; ++j)
447 cout<<data_[j] <<
"\t";
451 template<
class T,
int length>
454 for(
int j = 0;j<length; ++j)
455 tmp += data_[j]*data_[j] ;
458 template<
class T,
int length>
461 return sqrt(magnitude_sqr());
463 template<
class T,
int length>
467 for(
int j = 0;j<length; ++j)
468 tmp += data_[j]*y.
data_[j] ;
472 template<
class T,
int length>
476 for(
int j = 0;j<length; ++j)
481 template<
class T,
int length>
485 for(
int j = 0;j<length; ++j)
489 template<
class T,
int length>
493 for(
int j = 1;j<length; ++j)
498 template<
class T,
int length>
502 for(
int j = 1;j<length; ++j)
508 template<
class T,
int length>
511 for(
int j = 0;j<length; ++j)
514 template<
class T,
int length>
522 template<
class T,
int length>
524 for(
int j = 0;j<length; ++j)
528 template<
class T,
int length>
531 for(
int j = 0;j<length; ++j)
539 template<
class T,
int length>
541 for(
int j = 0;j<length; ++j)
542 data_[j] = y.
data_[j];
545 template<
class T,
int length>
548 for(
int j = 0;j<length; ++j)
555 template<
class T,
int length>
560 for(
int j = 0;j<length;++j)
562 T tmp =(data_[j]-y.
data_[j]);
568 template<
class T,
int length>
575 template<
class T,
int length>
578 for(
int j = 0; j<length;++j)
583 template<
class T,
int length>
587 throw std::logic_error(
"Tuple, using wrong number of arguments for this instantiation");
593 template<
class T,
int length>
597 throw std::logic_error(
"Tuple, using wrong number of arguments for this instantiation");
604 template<
class T,
int length>
607 for(
int j = 0;j<length;++j)
611 template<
class T,
int length>
617 template<
class T,
int length>