StrictlyUpperMatrix.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_ADAPTORS_STRICTLYUPPERMATRIX_H_
36 #define _BLAZE_MATH_ADAPTORS_STRICTLYUPPERMATRIX_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
48 #include <blaze/math/Forward.h>
68 
69 
70 namespace blaze {
71 
72 //=================================================================================================
73 //
74 // STRICTLYUPPERMATRIX OPERATORS
75 //
76 //=================================================================================================
77 
78 //*************************************************************************************************
81 template< typename MT, bool SO, bool DF >
82 inline void reset( StrictlyUpperMatrix<MT,SO,DF>& m );
83 
84 template< typename MT, bool SO, bool DF >
85 inline void reset( StrictlyUpperMatrix<MT,SO,DF>& m, size_t i );
86 
87 template< typename MT, bool SO, bool DF >
88 inline void clear( StrictlyUpperMatrix<MT,SO,DF>& m );
89 
90 template< typename MT, bool SO, bool DF >
91 inline bool isDefault( const StrictlyUpperMatrix<MT,SO,DF>& m );
92 
93 template< typename MT, bool SO, bool DF >
94 inline void swap( StrictlyUpperMatrix<MT,SO,DF>& a, StrictlyUpperMatrix<MT,SO,DF>& b ) /* throw() */;
96 //*************************************************************************************************
97 
98 
99 //*************************************************************************************************
106 template< typename MT // Type of the adapted matrix
107  , bool SO // Storage order of the adapted matrix
108  , bool DF > // Density flag
110 {
111  m.reset();
112 }
113 //*************************************************************************************************
114 
115 
116 //*************************************************************************************************
129 template< typename MT // Type of the adapted matrix
130  , bool SO // Storage order of the adapted matrix
131  , bool DF > // Density flag
132 inline void reset( StrictlyUpperMatrix<MT,SO,DF>& m, size_t i )
133 {
134  m.reset( i );
135 }
136 //*************************************************************************************************
137 
138 
139 //*************************************************************************************************
146 template< typename MT // Type of the adapted matrix
147  , bool SO // Storage order of the adapted matrix
148  , bool DF > // Density flag
150 {
151  m.clear();
152 }
153 //*************************************************************************************************
154 
155 
156 //*************************************************************************************************
167 template< typename MT // Type of the adapted matrix
168  , bool SO // Storage order of the adapted matrix
169  , bool DF > // Density flag
170 inline bool isDefault_backend( const StrictlyUpperMatrix<MT,SO,DF>& m, TrueType )
171 {
172  return ( m.rows() == 0UL );
173 }
175 //*************************************************************************************************
176 
177 
178 //*************************************************************************************************
189 template< typename MT // Type of the adapted matrix
190  , bool SO // Storage order of the adapted matrix
191  , bool DF > // Density flag
192 inline bool isDefault_backend( const StrictlyUpperMatrix<MT,SO,DF>& m, FalseType )
193 {
194  return isIdentity( m );
195 }
197 //*************************************************************************************************
198 
199 
200 //*************************************************************************************************
220 template< typename MT // Type of the adapted matrix
221  , bool SO // Storage order of the adapted matrix
222  , bool DF > // Density flag
224 {
225  return isDefault_backend( m, typename IsResizable<MT>::Type() );
226 }
227 //*************************************************************************************************
228 
229 
230 //*************************************************************************************************
239 template< typename MT // Type of the adapted matrix
240  , bool SO // Storage order of the adapted matrix
241  , bool DF > // Density flag
243 {
244  a.swap( b );
245 }
246 //*************************************************************************************************
247 
248 
249 //*************************************************************************************************
263 template< typename MT // Type of the adapted matrix
264  , bool SO // Storage order of the adapted matrix
265  , bool DF > // Density flag
266 inline MT& derestrict( StrictlyUpperMatrix<MT,SO,DF>& m )
267 {
268  return m.matrix_;
269 }
271 //*************************************************************************************************
272 
273 
274 
275 
276 //=================================================================================================
277 //
278 // ROWS SPECIALIZATIONS
279 //
280 //=================================================================================================
281 
282 //*************************************************************************************************
284 template< typename MT, bool SO, bool DF >
285 struct Rows< StrictlyUpperMatrix<MT,SO,DF> > : public Rows<MT>
286 {};
288 //*************************************************************************************************
289 
290 
291 
292 
293 //=================================================================================================
294 //
295 // COLUMNS SPECIALIZATIONS
296 //
297 //=================================================================================================
298 
299 //*************************************************************************************************
301 template< typename MT, bool SO, bool DF >
302 struct Columns< StrictlyUpperMatrix<MT,SO,DF> > : public Columns<MT>
303 {};
305 //*************************************************************************************************
306 
307 
308 
309 
310 //=================================================================================================
311 //
312 // ISSQUARE SPECIALIZATIONS
313 //
314 //=================================================================================================
315 
316 //*************************************************************************************************
318 template< typename MT, bool SO, bool DF >
319 struct IsSquare< StrictlyUpperMatrix<MT,SO,DF> > : public TrueType
320 {
321  enum { value = 1 };
322  typedef TrueType Type;
323 };
325 //*************************************************************************************************
326 
327 
328 
329 
330 //=================================================================================================
331 //
332 // ISSTRICTLYUPPER SPECIALIZATIONS
333 //
334 //=================================================================================================
335 
336 //*************************************************************************************************
338 template< typename MT, bool SO, bool DF >
339 struct IsStrictlyUpper< StrictlyUpperMatrix<MT,SO,DF> > : public TrueType
340 {
341  enum { value = 1 };
342  typedef TrueType Type;
343 };
345 //*************************************************************************************************
346 
347 
348 
349 
350 //=================================================================================================
351 //
352 // ISADAPTOR SPECIALIZATIONS
353 //
354 //=================================================================================================
355 
356 //*************************************************************************************************
358 template< typename MT, bool SO, bool DF >
359 struct IsAdaptor< StrictlyUpperMatrix<MT,SO,DF> > : public TrueType
360 {
361  enum { value = 1 };
362  typedef TrueType Type;
363 };
365 //*************************************************************************************************
366 
367 
368 
369 
370 //=================================================================================================
371 //
372 // ISRESTRICTED SPECIALIZATIONS
373 //
374 //=================================================================================================
375 
376 //*************************************************************************************************
378 template< typename MT, bool SO, bool DF >
379 struct IsRestricted< StrictlyUpperMatrix<MT,SO,DF> > : public TrueType
380 {
381  enum { value = 1 };
382  typedef TrueType Type;
383 };
385 //*************************************************************************************************
386 
387 
388 
389 
390 //=================================================================================================
391 //
392 // HASCONSTDATAACCESS SPECIALIZATIONS
393 //
394 //=================================================================================================
395 
396 //*************************************************************************************************
398 template< typename MT, bool SO >
399 struct HasConstDataAccess< StrictlyUpperMatrix<MT,SO,true> > : public TrueType
400 {
401  enum { value = 1 };
402  typedef TrueType Type;
403 };
405 //*************************************************************************************************
406 
407 
408 
409 
410 //=================================================================================================
411 //
412 // ISRESIZABLE SPECIALIZATIONS
413 //
414 //=================================================================================================
415 
416 //*************************************************************************************************
418 template< typename MT, bool SO, bool DF >
419 struct IsResizable< StrictlyUpperMatrix<MT,SO,DF> > : public IsResizable<MT>::Type
420 {
421  enum { value = IsResizable<MT>::value };
422  typedef typename IsResizable<MT>::Type Type;
423 };
425 //*************************************************************************************************
426 
427 
428 
429 
430 //=================================================================================================
431 //
432 // REMOVEADAPTOR SPECIALIZATIONS
433 //
434 //=================================================================================================
435 
436 //*************************************************************************************************
438 template< typename MT, bool SO, bool DF >
439 struct RemoveAdaptor< StrictlyUpperMatrix<MT,SO,DF> >
440 {
441  typedef MT Type;
442 };
444 //*************************************************************************************************
445 
446 
447 
448 
449 //=================================================================================================
450 //
451 // DERESTRICTTRAIT SPECIALIZATIONS
452 //
453 //=================================================================================================
454 
455 //*************************************************************************************************
457 template< typename MT, bool SO, bool DF >
458 struct DerestrictTrait< StrictlyUpperMatrix<MT,SO,DF> >
459 {
460  typedef MT& Type;
461 };
463 //*************************************************************************************************
464 
465 
466 
467 
468 //=================================================================================================
469 //
470 // ADDTRAIT SPECIALIZATIONS
471 //
472 //=================================================================================================
473 
474 //*************************************************************************************************
476 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
477 struct AddTrait< StrictlyUpperMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
478 {
479  typedef typename AddTrait< MT, StaticMatrix<T,M,N,SO2> >::Type Type;
480 };
481 
482 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
483 struct AddTrait< StaticMatrix<T,M,N,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
484 {
485  typedef typename AddTrait< StaticMatrix<T,M,N,SO1>, MT >::Type Type;
486 };
487 
488 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
489 struct AddTrait< StrictlyUpperMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
490 {
491  typedef typename AddTrait< MT, HybridMatrix<T,M,N,SO2> >::Type Type;
492 };
493 
494 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
495 struct AddTrait< HybridMatrix<T,M,N,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
496 {
497  typedef typename AddTrait< HybridMatrix<T,M,N,SO1>, MT >::Type Type;
498 };
499 
500 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
501 struct AddTrait< StrictlyUpperMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
502 {
503  typedef typename AddTrait< MT, DynamicMatrix<T,SO2> >::Type Type;
504 };
505 
506 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
507 struct AddTrait< DynamicMatrix<T,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
508 {
509  typedef typename AddTrait< DynamicMatrix<T,SO1>, MT >::Type Type;
510 };
511 
512 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
513 struct AddTrait< StrictlyUpperMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
514 {
515  typedef typename AddTrait< MT, CompressedMatrix<T,SO2> >::Type Type;
516 };
517 
518 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
519 struct AddTrait< CompressedMatrix<T,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
520 {
521  typedef typename AddTrait< CompressedMatrix<T,SO1>, MT >::Type Type;
522 };
523 
524 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
525 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
526 {
527  typedef typename AddTrait<MT1,MT2>::Type Type;
528 };
529 
530 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
531 struct AddTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, StrictlyUpperMatrix<MT2,SO2,DF2> >
532 {
533  typedef typename AddTrait<MT1,MT2>::Type Type;
534 };
535 
536 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
537 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
538 {
539  typedef typename AddTrait<MT1,MT2>::Type Type;
540 };
541 
542 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
543 struct AddTrait< LowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
544 {
545  typedef typename AddTrait<MT1,MT2>::Type Type;
546 };
547 
548 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
549 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
550 {
551  typedef typename AddTrait<MT1,MT2>::Type Type;
552 };
553 
554 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
555 struct AddTrait< UniLowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
556 {
557  typedef typename AddTrait<MT1,MT2>::Type Type;
558 };
559 
560 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
561 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
562 {
563  typedef typename AddTrait<MT1,MT2>::Type Type;
564 };
565 
566 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
567 struct AddTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
568 {
569  typedef typename AddTrait<MT1,MT2>::Type Type;
570 };
571 
572 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
573 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
574 {
575  typedef UpperMatrix< typename AddTrait<MT1,MT2>::Type > Type;
576 };
577 
578 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
579 struct AddTrait< UpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
580 {
581  typedef UpperMatrix< typename AddTrait<MT1,MT2>::Type > Type;
582 };
583 
584 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
585 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
586 {
587  typedef UniUpperMatrix< typename AddTrait<MT1,MT2>::Type > Type;
588 };
589 
590 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
591 struct AddTrait< UniUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
592 {
593  typedef UniUpperMatrix< typename AddTrait<MT1,MT2>::Type > Type;
594 };
595 
596 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
597 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
598 {
599  typedef StrictlyUpperMatrix< typename AddTrait<MT1,MT2>::Type > Type;
600 };
602 //*************************************************************************************************
603 
604 
605 
606 
607 //=================================================================================================
608 //
609 // SUBTRAIT SPECIALIZATIONS
610 //
611 //=================================================================================================
612 
613 //*************************************************************************************************
615 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
616 struct SubTrait< StrictlyUpperMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
617 {
618  typedef typename SubTrait< MT, StaticMatrix<T,M,N,SO2> >::Type Type;
619 };
620 
621 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
622 struct SubTrait< StaticMatrix<T,M,N,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
623 {
624  typedef typename SubTrait< StaticMatrix<T,M,N,SO1>, MT >::Type Type;
625 };
626 
627 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
628 struct SubTrait< StrictlyUpperMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
629 {
630  typedef typename SubTrait< MT, HybridMatrix<T,M,N,SO2> >::Type Type;
631 };
632 
633 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
634 struct SubTrait< HybridMatrix<T,M,N,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
635 {
636  typedef typename SubTrait< HybridMatrix<T,M,N,SO1>, MT >::Type Type;
637 };
638 
639 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
640 struct SubTrait< StrictlyUpperMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
641 {
642  typedef typename SubTrait< MT, DynamicMatrix<T,SO2> >::Type Type;
643 };
644 
645 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
646 struct SubTrait< DynamicMatrix<T,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
647 {
648  typedef typename SubTrait< DynamicMatrix<T,SO1>, MT >::Type Type;
649 };
650 
651 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
652 struct SubTrait< StrictlyUpperMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
653 {
654  typedef typename SubTrait< MT, CompressedMatrix<T,SO2> >::Type Type;
655 };
656 
657 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
658 struct SubTrait< CompressedMatrix<T,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
659 {
660  typedef typename SubTrait< CompressedMatrix<T,SO1>, MT >::Type Type;
661 };
662 
663 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
664 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
665 {
666  typedef typename SubTrait<MT1,MT2>::Type Type;
667 };
668 
669 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
670 struct SubTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, StrictlyUpperMatrix<MT2,SO2,DF2> >
671 {
672  typedef typename SubTrait<MT1,MT2>::Type Type;
673 };
674 
675 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
676 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
677 {
678  typedef typename SubTrait<MT1,MT2>::Type Type;
679 };
680 
681 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
682 struct SubTrait< LowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
683 {
684  typedef typename SubTrait<MT1,MT2>::Type Type;
685 };
686 
687 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
688 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
689 {
690  typedef typename SubTrait<MT1,MT2>::Type Type;
691 };
692 
693 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
694 struct SubTrait< UniLowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
695 {
696  typedef typename SubTrait<MT1,MT2>::Type Type;
697 };
698 
699 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
700 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
701 {
702  typedef typename SubTrait<MT1,MT2>::Type Type;
703 };
704 
705 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
706 struct SubTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
707 {
708  typedef typename SubTrait<MT1,MT2>::Type Type;
709 };
710 
711 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
712 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
713 {
714  typedef UpperMatrix< typename SubTrait<MT1,MT2>::Type > Type;
715 };
716 
717 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
718 struct SubTrait< UpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
719 {
720  typedef UpperMatrix< typename SubTrait<MT1,MT2>::Type > Type;
721 };
722 
723 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
724 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
725 {
726  typedef UpperMatrix< typename SubTrait<MT1,MT2>::Type > Type;
727 };
728 
729 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
730 struct SubTrait< UniUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
731 {
732  typedef UniUpperMatrix< typename SubTrait<MT1,MT2>::Type > Type;
733 };
734 
735 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
736 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
737 {
738  typedef StrictlyUpperMatrix< typename SubTrait<MT1,MT2>::Type > Type;
739 };
741 //*************************************************************************************************
742 
743 
744 
745 
746 //=================================================================================================
747 //
748 // MULTTRAIT SPECIALIZATIONS
749 //
750 //=================================================================================================
751 
752 //*************************************************************************************************
754 template< typename MT, bool SO, bool DF, typename T >
755 struct MultTrait< StrictlyUpperMatrix<MT,SO,DF>, T >
756 {
757  typedef StrictlyUpperMatrix< typename MultTrait<MT,T>::Type > Type;
759 };
760 
761 template< typename T, typename MT, bool SO, bool DF >
762 struct MultTrait< T, StrictlyUpperMatrix<MT,SO,DF> >
763 {
764  typedef StrictlyUpperMatrix< typename MultTrait<T,MT>::Type > Type;
766 };
767 
768 template< typename MT, bool SO, bool DF, typename T, size_t N >
769 struct MultTrait< StrictlyUpperMatrix<MT,SO,DF>, StaticVector<T,N,false> >
770 {
771  typedef typename MultTrait< MT, StaticVector<T,N,false> >::Type Type;
772 };
773 
774 template< typename T, size_t N, typename MT, bool SO, bool DF >
775 struct MultTrait< StaticVector<T,N,true>, StrictlyUpperMatrix<MT,SO,DF> >
776 {
777  typedef typename MultTrait< StaticVector<T,N,true>, MT >::Type Type;
778 };
779 
780 template< typename MT, bool SO, bool DF, typename T, size_t N >
781 struct MultTrait< StrictlyUpperMatrix<MT,SO,DF>, HybridVector<T,N,false> >
782 {
783  typedef typename MultTrait< MT, HybridVector<T,N,false> >::Type Type;
784 };
785 
786 template< typename T, size_t N, typename MT, bool SO, bool DF >
787 struct MultTrait< HybridVector<T,N,true>, StrictlyUpperMatrix<MT,SO,DF> >
788 {
789  typedef typename MultTrait< HybridVector<T,N,true>, MT >::Type Type;
790 };
791 
792 template< typename MT, bool SO, bool DF, typename T >
793 struct MultTrait< StrictlyUpperMatrix<MT,SO,DF>, DynamicVector<T,false> >
794 {
795  typedef typename MultTrait< MT, DynamicVector<T,false> >::Type Type;
796 };
797 
798 template< typename T, typename MT, bool SO, bool DF >
799 struct MultTrait< DynamicVector<T,true>, StrictlyUpperMatrix<MT,SO,DF> >
800 {
801  typedef typename MultTrait< DynamicVector<T,true>, MT >::Type Type;
802 };
803 
804 template< typename MT, bool SO, bool DF, typename T >
805 struct MultTrait< StrictlyUpperMatrix<MT,SO,DF>, CompressedVector<T,false> >
806 {
807  typedef typename MultTrait< MT, CompressedVector<T,false> >::Type Type;
808 };
809 
810 template< typename T, typename MT, bool SO, bool DF >
811 struct MultTrait< CompressedVector<T,true>, StrictlyUpperMatrix<MT,SO,DF> >
812 {
813  typedef typename MultTrait< CompressedVector<T,true>, MT >::Type Type;
814 };
815 
816 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
817 struct MultTrait< StrictlyUpperMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
818 {
819  typedef typename MultTrait< MT, StaticMatrix<T,M,N,SO2> >::Type Type;
820 };
821 
822 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
823 struct MultTrait< StaticMatrix<T,M,N,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
824 {
825  typedef typename MultTrait< StaticMatrix<T,M,N,SO1>, MT >::Type Type;
826 };
827 
828 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
829 struct MultTrait< StrictlyUpperMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
830 {
831  typedef typename MultTrait< MT, HybridMatrix<T,M,N,SO2> >::Type Type;
832 };
833 
834 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
835 struct MultTrait< HybridMatrix<T,M,N,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
836 {
837  typedef typename MultTrait< HybridMatrix<T,M,N,SO1>, MT >::Type Type;
838 };
839 
840 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
841 struct MultTrait< StrictlyUpperMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
842 {
843  typedef typename MultTrait< MT, DynamicMatrix<T,SO2> >::Type Type;
844 };
845 
846 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
847 struct MultTrait< DynamicMatrix<T,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
848 {
849  typedef typename MultTrait< DynamicMatrix<T,SO1>, MT >::Type Type;
850 };
851 
852 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
853 struct MultTrait< StrictlyUpperMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
854 {
855  typedef typename MultTrait< MT, CompressedMatrix<T,SO2> >::Type Type;
856 };
857 
858 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
859 struct MultTrait< CompressedMatrix<T,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
860 {
861  typedef typename MultTrait< CompressedMatrix<T,SO1>, MT >::Type Type;
862 };
863 
864 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
865 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
866 {
867  typedef typename MultTrait<MT1,MT2>::Type Type;
868 };
869 
870 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
871 struct MultTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, StrictlyUpperMatrix<MT2,SO2,DF2> >
872 {
873  typedef typename MultTrait<MT1,MT2>::Type Type;
874 };
875 
876 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
877 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
878 {
879  typedef typename MultTrait<MT1,MT2>::Type Type;
880 };
881 
882 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
883 struct MultTrait< LowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
884 {
885  typedef typename MultTrait<MT1,MT2>::Type Type;
886 };
887 
888 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
889 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
890 {
891  typedef typename MultTrait<MT1,MT2>::Type Type;
892 };
893 
894 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
895 struct MultTrait< UniLowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
896 {
897  typedef typename MultTrait<MT1,MT2>::Type Type;
898 };
899 
900 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
901 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
902 {
903  typedef typename MultTrait<MT1,MT2>::Type Type;
904 };
905 
906 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
907 struct MultTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
908 {
909  typedef typename MultTrait<MT1,MT2>::Type Type;
910 };
911 
912 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
913 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
914 {
915  typedef StrictlyUpperMatrix< typename MultTrait<MT1,MT2>::Type > Type;
916 };
917 
918 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
919 struct MultTrait< UpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
920 {
921  typedef StrictlyUpperMatrix< typename MultTrait<MT1,MT2>::Type > Type;
922 };
923 
924 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
925 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
926 {
927  typedef StrictlyUpperMatrix< typename MultTrait<MT1,MT2>::Type > Type;
928 };
929 
930 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
931 struct MultTrait< UniUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
932 {
933  typedef StrictlyUpperMatrix< typename MultTrait<MT1,MT2>::Type > Type;
934 };
935 
936 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
937 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
938 {
939  typedef StrictlyUpperMatrix< typename MultTrait<MT1,MT2>::Type > Type;
940 };
942 //*************************************************************************************************
943 
944 
945 
946 
947 //=================================================================================================
948 //
949 // DIVTRAIT SPECIALIZATIONS
950 //
951 //=================================================================================================
952 
953 //*************************************************************************************************
955 template< typename MT, bool SO, bool DF, typename T >
956 struct DivTrait< StrictlyUpperMatrix<MT,SO,DF>, T >
957 {
958  typedef StrictlyUpperMatrix< typename DivTrait<MT,T>::Type > Type;
960 };
962 //*************************************************************************************************
963 
964 
965 
966 
967 //=================================================================================================
968 //
969 // MATHTRAIT SPECIALIZATIONS
970 //
971 //=================================================================================================
972 
973 //*************************************************************************************************
975 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
976 struct MathTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
977 {
978  typedef StrictlyUpperMatrix< typename MathTrait<MT1,MT2>::HighType > HighType;
979  typedef StrictlyUpperMatrix< typename MathTrait<MT1,MT2>::LowType > LowType;
980 };
982 //*************************************************************************************************
983 
984 
985 
986 
987 //=================================================================================================
988 //
989 // SUBMATRIXTRAIT SPECIALIZATIONS
990 //
991 //=================================================================================================
992 
993 //*************************************************************************************************
995 template< typename MT, bool SO, bool DF >
996 struct SubmatrixTrait< StrictlyUpperMatrix<MT,SO,DF> >
997 {
998  typedef typename SubmatrixTrait<MT>::Type Type;
999 };
1001 //*************************************************************************************************
1002 
1003 
1004 
1005 
1006 //=================================================================================================
1007 //
1008 // ROWTRAIT SPECIALIZATIONS
1009 //
1010 //=================================================================================================
1011 
1012 //*************************************************************************************************
1014 template< typename MT, bool SO, bool DF >
1015 struct RowTrait< StrictlyUpperMatrix<MT,SO,DF> >
1016 {
1017  typedef typename RowTrait<MT>::Type Type;
1018 };
1020 //*************************************************************************************************
1021 
1022 
1023 
1024 
1025 //=================================================================================================
1026 //
1027 // COLUMNTRAIT SPECIALIZATIONS
1028 //
1029 //=================================================================================================
1030 
1031 //*************************************************************************************************
1033 template< typename MT, bool SO, bool DF >
1034 struct ColumnTrait< StrictlyUpperMatrix<MT,SO,DF> >
1035 {
1036  typedef typename ColumnTrait<MT>::Type Type;
1037 };
1039 //*************************************************************************************************
1040 
1041 } // namespace blaze
1042 
1043 #endif
Constraint on the data type.
Header file for the Rows type trait.
Header file for the subtraction trait.
Header file for the row trait.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:821
StrictlyUpperMatrix specialization for sparse matrices.
Header file for the implementation of the base template of the UniUpperMatrix.
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:861
Header file for the implementation of the base template of the UpperMatrix.
StrictlyUpperMatrix specialization for dense matrices.
Header file for the IsSquare type trait.
Header file for the multiplication trait.
Header file for the IsStrictlyUpper type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Matrix adapter for strictly upper triangular matrices.
Definition: Forward.h:50
Header file for all forward declarations of the math module.
Header file for the Columns type trait.
Header file for the RemoveAdaptor type trait.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:841
Header file for the IsAdaptor type trait.
Header file for the implementation of the base template of the StrictlyUpperMatrix.
Header file for the DerestrictTrait class template.
Header file for the HasConstDataAccess type trait.
Compile time check for resizable data types.This type trait tests whether the given data type is a re...
Definition: IsResizable.h:75
Header file for the addition trait.
Header file for the division trait.
Header file for the submatrix trait.
#define BLAZE_CONSTRAINT_MUST_BE_NUMERIC_TYPE(T)
Constraint on the data type.In case the given data type T is not a numeric (integral or floating poin...
Definition: Numeric.h:79
Header file for the column trait.
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b)
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:200
Header file for the mathematical trait.
boost::false_type FalseType
Type/value traits base class.The FalseType class is used as base class for type traits and value trai...
Definition: FalseType.h:61
boost::true_type TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: TrueType.h:61
Header file for the IsResizable type trait.
Header file for the IsRestricted type trait.
bool isIdentity(const DenseMatrix< MT, SO > &dm)
Checks if the give dense matrix is an identity matrix.
Definition: DenseMatrix.h:1525