UniUpperMatrix.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_ADAPTORS_UNIUPPERMATRIX_H_
36 #define _BLAZE_MATH_ADAPTORS_UNIUPPERMATRIX_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
47 #include <blaze/math/Forward.h>
67 
68 
69 namespace blaze {
70 
71 //=================================================================================================
72 //
73 // UNIUPPERMATRIX OPERATORS
74 //
75 //=================================================================================================
76 
77 //*************************************************************************************************
80 template< typename MT, bool SO, bool DF >
81 inline void reset( UniUpperMatrix<MT,SO,DF>& m );
82 
83 template< typename MT, bool SO, bool DF >
84 inline void reset( UniUpperMatrix<MT,SO,DF>& m, size_t i );
85 
86 template< typename MT, bool SO, bool DF >
87 inline void clear( UniUpperMatrix<MT,SO,DF>& m );
88 
89 template< typename MT, bool SO, bool DF >
90 inline bool isDefault( const UniUpperMatrix<MT,SO,DF>& m );
91 
92 template< typename MT, bool SO, bool DF >
93 inline void swap( UniUpperMatrix<MT,SO,DF>& a, UniUpperMatrix<MT,SO,DF>& b ) /* throw() */;
95 //*************************************************************************************************
96 
97 
98 //*************************************************************************************************
105 template< typename MT // Type of the adapted matrix
106  , bool SO // Storage order of the adapted matrix
107  , bool DF > // Density flag
109 {
110  m.reset();
111 }
112 //*************************************************************************************************
113 
114 
115 //*************************************************************************************************
128 template< typename MT // Type of the adapted matrix
129  , bool SO // Storage order of the adapted matrix
130  , bool DF > // Density flag
131 inline void reset( UniUpperMatrix<MT,SO,DF>& m, size_t i )
132 {
133  m.reset( i );
134 }
135 //*************************************************************************************************
136 
137 
138 //*************************************************************************************************
145 template< typename MT // Type of the adapted matrix
146  , bool SO // Storage order of the adapted matrix
147  , bool DF > // Density flag
149 {
150  m.clear();
151 }
152 //*************************************************************************************************
153 
154 
155 //*************************************************************************************************
165 template< typename MT // Type of the adapted matrix
166  , bool SO // Storage order of the adapted matrix
167  , bool DF > // Density flag
168 inline bool isDefault_backend( const UniUpperMatrix<MT,SO,DF>& m, TrueType )
169 {
170  return ( m.rows() == 0UL );
171 }
173 //*************************************************************************************************
174 
175 
176 //*************************************************************************************************
186 template< typename MT // Type of the adapted matrix
187  , bool SO // Storage order of the adapted matrix
188  , bool DF > // Density flag
189 inline bool isDefault_backend( const UniUpperMatrix<MT,SO,DF>& m, FalseType )
190 {
191  return isIdentity( m );
192 }
194 //*************************************************************************************************
195 
196 
197 //*************************************************************************************************
217 template< typename MT // Type of the adapted matrix
218  , bool SO // Storage order of the adapted matrix
219  , bool DF > // Density flag
220 inline bool isDefault( const UniUpperMatrix<MT,SO,DF>& m )
221 {
222  return isDefault_backend( m, typename IsResizable<MT>::Type() );
223 }
224 //*************************************************************************************************
225 
226 
227 //*************************************************************************************************
236 template< typename MT // Type of the adapted matrix
237  , bool SO // Storage order of the adapted matrix
238  , bool DF > // Density flag
239 inline void swap( UniUpperMatrix<MT,SO,DF>& a, UniUpperMatrix<MT,SO,DF>& b ) /* throw() */
240 {
241  a.swap( b );
242 }
243 //*************************************************************************************************
244 
245 
246 //*************************************************************************************************
260 template< typename MT // Type of the adapted matrix
261  , bool SO // Storage order of the adapted matrix
262  , bool DF > // Density flag
263 inline MT& derestrict( UniUpperMatrix<MT,SO,DF>& m )
264 {
265  return m.matrix_;
266 }
268 //*************************************************************************************************
269 
270 
271 
272 
273 //=================================================================================================
274 //
275 // ROWS SPECIALIZATIONS
276 //
277 //=================================================================================================
278 
279 //*************************************************************************************************
281 template< typename MT, bool SO, bool DF >
282 struct Rows< UniUpperMatrix<MT,SO,DF> > : public Rows<MT>
283 {};
285 //*************************************************************************************************
286 
287 
288 
289 
290 //=================================================================================================
291 //
292 // COLUMNS SPECIALIZATIONS
293 //
294 //=================================================================================================
295 
296 //*************************************************************************************************
298 template< typename MT, bool SO, bool DF >
299 struct Columns< UniUpperMatrix<MT,SO,DF> > : public Columns<MT>
300 {};
302 //*************************************************************************************************
303 
304 
305 
306 
307 //=================================================================================================
308 //
309 // ISSQUARE SPECIALIZATIONS
310 //
311 //=================================================================================================
312 
313 //*************************************************************************************************
315 template< typename MT, bool SO, bool DF >
316 struct IsSquare< UniUpperMatrix<MT,SO,DF> > : public TrueType
317 {
318  enum { value = 1 };
319  typedef TrueType Type;
320 };
322 //*************************************************************************************************
323 
324 
325 
326 
327 //=================================================================================================
328 //
329 // ISUNIUPPER SPECIALIZATIONS
330 //
331 //=================================================================================================
332 
333 //*************************************************************************************************
335 template< typename MT, bool SO, bool DF >
336 struct IsUniUpper< UniUpperMatrix<MT,SO,DF> > : public TrueType
337 {
338  enum { value = 1 };
339  typedef TrueType Type;
340 };
342 //*************************************************************************************************
343 
344 
345 
346 
347 //=================================================================================================
348 //
349 // ISADAPTOR SPECIALIZATIONS
350 //
351 //=================================================================================================
352 
353 //*************************************************************************************************
355 template< typename MT, bool SO, bool DF >
356 struct IsAdaptor< UniUpperMatrix<MT,SO,DF> > : public TrueType
357 {
358  enum { value = 1 };
359  typedef TrueType Type;
360 };
362 //*************************************************************************************************
363 
364 
365 
366 
367 //=================================================================================================
368 //
369 // ISRESTRICTED SPECIALIZATIONS
370 //
371 //=================================================================================================
372 
373 //*************************************************************************************************
375 template< typename MT, bool SO, bool DF >
376 struct IsRestricted< UniUpperMatrix<MT,SO,DF> > : public TrueType
377 {
378  enum { value = 1 };
379  typedef TrueType Type;
380 };
382 //*************************************************************************************************
383 
384 
385 
386 
387 //=================================================================================================
388 //
389 // HASCONSTDATAACCESS SPECIALIZATIONS
390 //
391 //=================================================================================================
392 
393 //*************************************************************************************************
395 template< typename MT, bool SO >
396 struct HasConstDataAccess< UniUpperMatrix<MT,SO,true> > : public TrueType
397 {
398  enum { value = 1 };
399  typedef TrueType Type;
400 };
402 //*************************************************************************************************
403 
404 
405 
406 
407 //=================================================================================================
408 //
409 // ISRESIZABLE SPECIALIZATIONS
410 //
411 //=================================================================================================
412 
413 //*************************************************************************************************
415 template< typename MT, bool SO, bool DF >
416 struct IsResizable< UniUpperMatrix<MT,SO,DF> > : public IsResizable<MT>::Type
417 {
418  enum { value = IsResizable<MT>::value };
419  typedef typename IsResizable<MT>::Type Type;
420 };
422 //*************************************************************************************************
423 
424 
425 
426 
427 //=================================================================================================
428 //
429 // REMOVEADAPTOR SPECIALIZATIONS
430 //
431 //=================================================================================================
432 
433 //*************************************************************************************************
435 template< typename MT, bool SO, bool DF >
436 struct RemoveAdaptor< UniUpperMatrix<MT,SO,DF> >
437 {
438  typedef MT Type;
439 };
441 //*************************************************************************************************
442 
443 
444 
445 
446 //=================================================================================================
447 //
448 // DERESTRICTTRAIT SPECIALIZATIONS
449 //
450 //=================================================================================================
451 
452 //*************************************************************************************************
454 template< typename MT, bool SO, bool DF >
455 struct DerestrictTrait< UniUpperMatrix<MT,SO,DF> >
456 {
457  typedef MT& Type;
458 };
460 //*************************************************************************************************
461 
462 
463 
464 
465 //=================================================================================================
466 //
467 // ADDTRAIT SPECIALIZATIONS
468 //
469 //=================================================================================================
470 
471 //*************************************************************************************************
473 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
474 struct AddTrait< UniUpperMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
475 {
476  typedef typename AddTrait< MT, StaticMatrix<T,M,N,SO2> >::Type Type;
477 };
478 
479 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
480 struct AddTrait< StaticMatrix<T,M,N,SO1>, UniUpperMatrix<MT,SO2,DF> >
481 {
482  typedef typename AddTrait< StaticMatrix<T,M,N,SO1>, MT >::Type Type;
483 };
484 
485 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
486 struct AddTrait< UniUpperMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
487 {
488  typedef typename AddTrait< MT, HybridMatrix<T,M,N,SO2> >::Type Type;
489 };
490 
491 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
492 struct AddTrait< HybridMatrix<T,M,N,SO1>, UniUpperMatrix<MT,SO2,DF> >
493 {
494  typedef typename AddTrait< HybridMatrix<T,M,N,SO1>, MT >::Type Type;
495 };
496 
497 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
498 struct AddTrait< UniUpperMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
499 {
500  typedef typename AddTrait< MT, DynamicMatrix<T,SO2> >::Type Type;
501 };
502 
503 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
504 struct AddTrait< DynamicMatrix<T,SO1>, UniUpperMatrix<MT,SO2,DF> >
505 {
506  typedef typename AddTrait< DynamicMatrix<T,SO1>, MT >::Type Type;
507 };
508 
509 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
510 struct AddTrait< UniUpperMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
511 {
512  typedef typename AddTrait< MT, CompressedMatrix<T,SO2> >::Type Type;
513 };
514 
515 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
516 struct AddTrait< CompressedMatrix<T,SO1>, UniUpperMatrix<MT,SO2,DF> >
517 {
518  typedef typename AddTrait< CompressedMatrix<T,SO1>, MT >::Type Type;
519 };
520 
521 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
522 struct AddTrait< UniUpperMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
523 {
524  typedef typename AddTrait<MT1,MT2>::Type Type;
525 };
526 
527 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
528 struct AddTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, UniUpperMatrix<MT2,SO2,DF2> >
529 {
530  typedef typename AddTrait<MT1,MT2>::Type Type;
531 };
532 
533 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
534 struct AddTrait< UniUpperMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
535 {
536  typedef typename AddTrait<MT1,MT2>::Type Type;
537 };
538 
539 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
540 struct AddTrait< LowerMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
541 {
542  typedef typename AddTrait<MT1,MT2>::Type Type;
543 };
544 
545 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
546 struct AddTrait< UniUpperMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
547 {
548  typedef typename AddTrait<MT1,MT2>::Type Type;
549 };
550 
551 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
552 struct AddTrait< UniLowerMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
553 {
554  typedef typename AddTrait<MT1,MT2>::Type Type;
555 };
556 
557 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
558 struct AddTrait< UniUpperMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
559 {
560  typedef typename AddTrait<MT1,MT2>::Type Type;
561 };
562 
563 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
564 struct AddTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
565 {
566  typedef typename AddTrait<MT1,MT2>::Type Type;
567 };
568 
569 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
570 struct AddTrait< UniUpperMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
571 {
572  typedef UpperMatrix< typename AddTrait<MT1,MT2>::Type > Type;
573 };
574 
575 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
576 struct AddTrait< UpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
577 {
578  typedef UpperMatrix< typename AddTrait<MT1,MT2>::Type > Type;
579 };
580 
581 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
582 struct AddTrait< UniUpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
583 {
584  typedef UpperMatrix< typename AddTrait<MT1,MT2>::Type > Type;
585 };
587 //*************************************************************************************************
588 
589 
590 
591 
592 //=================================================================================================
593 //
594 // SUBTRAIT SPECIALIZATIONS
595 //
596 //=================================================================================================
597 
598 //*************************************************************************************************
600 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
601 struct SubTrait< UniUpperMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
602 {
603  typedef typename SubTrait< MT, StaticMatrix<T,M,N,SO2> >::Type Type;
604 };
605 
606 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
607 struct SubTrait< StaticMatrix<T,M,N,SO1>, UniUpperMatrix<MT,SO2,DF> >
608 {
609  typedef typename SubTrait< StaticMatrix<T,M,N,SO1>, MT >::Type Type;
610 };
611 
612 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
613 struct SubTrait< UniUpperMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
614 {
615  typedef typename SubTrait< MT, HybridMatrix<T,M,N,SO2> >::Type Type;
616 };
617 
618 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
619 struct SubTrait< HybridMatrix<T,M,N,SO1>, UniUpperMatrix<MT,SO2,DF> >
620 {
621  typedef typename SubTrait< HybridMatrix<T,M,N,SO1>, MT >::Type Type;
622 };
623 
624 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
625 struct SubTrait< UniUpperMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
626 {
627  typedef typename SubTrait< MT, DynamicMatrix<T,SO2> >::Type Type;
628 };
629 
630 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
631 struct SubTrait< DynamicMatrix<T,SO1>, UniUpperMatrix<MT,SO2,DF> >
632 {
633  typedef typename SubTrait< DynamicMatrix<T,SO1>, MT >::Type Type;
634 };
635 
636 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
637 struct SubTrait< UniUpperMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
638 {
639  typedef typename SubTrait< MT, CompressedMatrix<T,SO2> >::Type Type;
640 };
641 
642 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
643 struct SubTrait< CompressedMatrix<T,SO1>, UniUpperMatrix<MT,SO2,DF> >
644 {
645  typedef typename SubTrait< CompressedMatrix<T,SO1>, MT >::Type Type;
646 };
647 
648 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
649 struct SubTrait< UniUpperMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
650 {
651  typedef typename SubTrait<MT1,MT2>::Type Type;
652 };
653 
654 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
655 struct SubTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, UniUpperMatrix<MT2,SO2,DF2> >
656 {
657  typedef typename SubTrait<MT1,MT2>::Type Type;
658 };
659 
660 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
661 struct SubTrait< UniUpperMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
662 {
663  typedef typename SubTrait<MT1,MT2>::Type Type;
664 };
665 
666 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
667 struct SubTrait< LowerMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
668 {
669  typedef typename SubTrait<MT1,MT2>::Type Type;
670 };
671 
672 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
673 struct SubTrait< UniUpperMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
674 {
675  typedef typename SubTrait<MT1,MT2>::Type Type;
676 };
677 
678 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
679 struct SubTrait< UniLowerMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
680 {
681  typedef typename SubTrait<MT1,MT2>::Type Type;
682 };
683 
684 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
685 struct SubTrait< UniUpperMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
686 {
687  typedef typename SubTrait<MT1,MT2>::Type Type;
688 };
689 
690 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
691 struct SubTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
692 {
693  typedef typename SubTrait<MT1,MT2>::Type Type;
694 };
695 
696 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
697 struct SubTrait< UniUpperMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
698 {
699  typedef UpperMatrix< typename SubTrait<MT1,MT2>::Type > Type;
700 };
701 
702 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
703 struct SubTrait< UpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
704 {
705  typedef UpperMatrix< typename SubTrait<MT1,MT2>::Type > Type;
706 };
707 
708 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
709 struct SubTrait< UniUpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
710 {
711  typedef UpperMatrix< typename SubTrait<MT1,MT2>::Type > Type;
712 };
714 //*************************************************************************************************
715 
716 
717 
718 
719 //=================================================================================================
720 //
721 // MULTTRAIT SPECIALIZATIONS
722 //
723 //=================================================================================================
724 
725 //*************************************************************************************************
727 template< typename MT, bool SO, bool DF, typename T >
728 struct MultTrait< UniUpperMatrix<MT,SO,DF>, T >
729 {
730  typedef UpperMatrix< typename MultTrait<MT,T>::Type > Type;
732 };
733 
734 template< typename T, typename MT, bool SO, bool DF >
735 struct MultTrait< T, UniUpperMatrix<MT,SO,DF> >
736 {
737  typedef UpperMatrix< typename MultTrait<T,MT>::Type > Type;
739 };
740 
741 template< typename MT, bool SO, bool DF, typename T, size_t N >
742 struct MultTrait< UniUpperMatrix<MT,SO,DF>, StaticVector<T,N,false> >
743 {
744  typedef typename MultTrait< MT, StaticVector<T,N,false> >::Type Type;
745 };
746 
747 template< typename T, size_t N, typename MT, bool SO, bool DF >
748 struct MultTrait< StaticVector<T,N,true>, UniUpperMatrix<MT,SO,DF> >
749 {
750  typedef typename MultTrait< StaticVector<T,N,true>, MT >::Type Type;
751 };
752 
753 template< typename MT, bool SO, bool DF, typename T, size_t N >
754 struct MultTrait< UniUpperMatrix<MT,SO,DF>, HybridVector<T,N,false> >
755 {
756  typedef typename MultTrait< MT, HybridVector<T,N,false> >::Type Type;
757 };
758 
759 template< typename T, size_t N, typename MT, bool SO, bool DF >
760 struct MultTrait< HybridVector<T,N,true>, UniUpperMatrix<MT,SO,DF> >
761 {
762  typedef typename MultTrait< HybridVector<T,N,true>, MT >::Type Type;
763 };
764 
765 template< typename MT, bool SO, bool DF, typename T >
766 struct MultTrait< UniUpperMatrix<MT,SO,DF>, DynamicVector<T,false> >
767 {
768  typedef typename MultTrait< MT, DynamicVector<T,false> >::Type Type;
769 };
770 
771 template< typename T, typename MT, bool SO, bool DF >
772 struct MultTrait< DynamicVector<T,true>, UniUpperMatrix<MT,SO,DF> >
773 {
774  typedef typename MultTrait< DynamicVector<T,true>, MT >::Type Type;
775 };
776 
777 template< typename MT, bool SO, bool DF, typename T >
778 struct MultTrait< UniUpperMatrix<MT,SO,DF>, CompressedVector<T,false> >
779 {
780  typedef typename MultTrait< MT, CompressedVector<T,false> >::Type Type;
781 };
782 
783 template< typename T, typename MT, bool SO, bool DF >
784 struct MultTrait< CompressedVector<T,true>, UniUpperMatrix<MT,SO,DF> >
785 {
786  typedef typename MultTrait< CompressedVector<T,true>, MT >::Type Type;
787 };
788 
789 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
790 struct MultTrait< UniUpperMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
791 {
792  typedef typename MultTrait< MT, StaticMatrix<T,M,N,SO2> >::Type Type;
793 };
794 
795 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
796 struct MultTrait< StaticMatrix<T,M,N,SO1>, UniUpperMatrix<MT,SO2,DF> >
797 {
798  typedef typename MultTrait< StaticMatrix<T,M,N,SO1>, MT >::Type Type;
799 };
800 
801 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
802 struct MultTrait< UniUpperMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
803 {
804  typedef typename MultTrait< MT, HybridMatrix<T,M,N,SO2> >::Type Type;
805 };
806 
807 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
808 struct MultTrait< HybridMatrix<T,M,N,SO1>, UniUpperMatrix<MT,SO2,DF> >
809 {
810  typedef typename MultTrait< HybridMatrix<T,M,N,SO1>, MT >::Type Type;
811 };
812 
813 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
814 struct MultTrait< UniUpperMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
815 {
816  typedef typename MultTrait< MT, DynamicMatrix<T,SO2> >::Type Type;
817 };
818 
819 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
820 struct MultTrait< DynamicMatrix<T,SO1>, UniUpperMatrix<MT,SO2,DF> >
821 {
822  typedef typename MultTrait< DynamicMatrix<T,SO1>, MT >::Type Type;
823 };
824 
825 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
826 struct MultTrait< UniUpperMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
827 {
828  typedef typename MultTrait< MT, CompressedMatrix<T,SO2> >::Type Type;
829 };
830 
831 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
832 struct MultTrait< CompressedMatrix<T,SO1>, UniUpperMatrix<MT,SO2,DF> >
833 {
834  typedef typename MultTrait< CompressedMatrix<T,SO1>, MT >::Type Type;
835 };
836 
837 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
838 struct MultTrait< UniUpperMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
839 {
840  typedef typename MultTrait<MT1,MT2>::Type Type;
841 };
842 
843 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
844 struct MultTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, UniUpperMatrix<MT2,SO2,DF2> >
845 {
846  typedef typename MultTrait<MT1,MT2>::Type Type;
847 };
848 
849 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
850 struct MultTrait< UniUpperMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
851 {
852  typedef typename MultTrait<MT1,MT2>::Type Type;
853 };
854 
855 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
856 struct MultTrait< LowerMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
857 {
858  typedef typename MultTrait<MT1,MT2>::Type Type;
859 };
860 
861 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
862 struct MultTrait< UniUpperMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
863 {
864  typedef typename MultTrait<MT1,MT2>::Type Type;
865 };
866 
867 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
868 struct MultTrait< UniLowerMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
869 {
870  typedef typename MultTrait<MT1,MT2>::Type Type;
871 };
872 
873 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
874 struct MultTrait< UniUpperMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
875 {
876  typedef typename MultTrait<MT1,MT2>::Type Type;
877 };
878 
879 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
880 struct MultTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
881 {
882  typedef typename MultTrait<MT1,MT2>::Type Type;
883 };
884 
885 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
886 struct MultTrait< UniUpperMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
887 {
888  typedef UpperMatrix< typename MultTrait<MT1,MT2>::Type > Type;
889 };
890 
891 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
892 struct MultTrait< UpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
893 {
894  typedef UpperMatrix< typename MultTrait<MT1,MT2>::Type > Type;
895 };
896 
897 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
898 struct MultTrait< UniUpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
899 {
900  typedef UniUpperMatrix< typename MultTrait<MT1,MT2>::Type > Type;
901 };
903 //*************************************************************************************************
904 
905 
906 
907 
908 //=================================================================================================
909 //
910 // DIVTRAIT SPECIALIZATIONS
911 //
912 //=================================================================================================
913 
914 //*************************************************************************************************
916 template< typename MT, bool SO, bool DF, typename T >
917 struct DivTrait< UniUpperMatrix<MT,SO,DF>, T >
918 {
919  typedef UpperMatrix< typename DivTrait<MT,T>::Type > Type;
921 };
923 //*************************************************************************************************
924 
925 
926 
927 
928 //=================================================================================================
929 //
930 // MATHTRAIT SPECIALIZATIONS
931 //
932 //=================================================================================================
933 
934 //*************************************************************************************************
936 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
937 struct MathTrait< UniUpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
938 {
939  typedef UniUpperMatrix< typename MathTrait<MT1,MT2>::HighType > HighType;
940  typedef UniUpperMatrix< typename MathTrait<MT1,MT2>::LowType > LowType;
941 };
943 //*************************************************************************************************
944 
945 
946 
947 
948 //=================================================================================================
949 //
950 // SUBMATRIXTRAIT SPECIALIZATIONS
951 //
952 //=================================================================================================
953 
954 //*************************************************************************************************
956 template< typename MT, bool SO, bool DF >
957 struct SubmatrixTrait< UniUpperMatrix<MT,SO,DF> >
958 {
959  typedef typename SubmatrixTrait<MT>::Type Type;
960 };
962 //*************************************************************************************************
963 
964 
965 
966 
967 //=================================================================================================
968 //
969 // ROWTRAIT SPECIALIZATIONS
970 //
971 //=================================================================================================
972 
973 //*************************************************************************************************
975 template< typename MT, bool SO, bool DF >
976 struct RowTrait< UniUpperMatrix<MT,SO,DF> >
977 {
978  typedef typename RowTrait<MT>::Type Type;
979 };
981 //*************************************************************************************************
982 
983 
984 
985 
986 //=================================================================================================
987 //
988 // COLUMNTRAIT SPECIALIZATIONS
989 //
990 //=================================================================================================
991 
992 //*************************************************************************************************
994 template< typename MT, bool SO, bool DF >
995 struct ColumnTrait< UniUpperMatrix<MT,SO,DF> >
996 {
997  typedef typename ColumnTrait<MT>::Type Type;
998 };
1000 //*************************************************************************************************
1001 
1002 } // namespace blaze
1003 
1004 #endif
Constraint on the data type.
Header file for the Rows type trait.
Header file for the IsUniUpper type trait.
Header file for the subtraction trait.
Header file for the row trait.
UniUpperMatrix specialization for sparse matrices.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:821
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.
Header file for the IsSquare type trait.
Header file for the multiplication trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
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 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
Matrix adapter for upper unitriangular matrices.
Definition: Forward.h:53
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
UniUpperMatrix specialization for dense matrices.
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