UpperMatrix.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_ADAPTORS_UPPERMATRIX_H_
36 #define _BLAZE_MATH_ADAPTORS_UPPERMATRIX_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
46 #include <blaze/math/Forward.h>
66 
67 
68 namespace blaze {
69 
70 //=================================================================================================
71 //
72 // UPPERMATRIX OPERATORS
73 //
74 //=================================================================================================
75 
76 //*************************************************************************************************
79 template< typename MT, bool SO, bool DF >
80 inline void reset( UpperMatrix<MT,SO,DF>& m );
81 
82 template< typename MT, bool SO, bool DF >
83 inline void reset( UpperMatrix<MT,SO,DF>& m, size_t i );
84 
85 template< typename MT, bool SO, bool DF >
86 inline void clear( UpperMatrix<MT,SO,DF>& m );
87 
88 template< typename MT, bool SO, bool DF >
89 inline bool isDefault( const UpperMatrix<MT,SO,DF>& m );
90 
91 template< typename MT, bool SO, bool DF >
92 inline void swap( UpperMatrix<MT,SO,DF>& a, UpperMatrix<MT,SO,DF>& b ) /* throw() */;
94 //*************************************************************************************************
95 
96 
97 //*************************************************************************************************
104 template< typename MT // Type of the adapted matrix
105  , bool SO // Storage order of the adapted matrix
106  , bool DF > // Density flag
107 inline void reset( UpperMatrix<MT,SO,DF>& m )
108 {
109  m.reset();
110 }
111 //*************************************************************************************************
112 
113 
114 //*************************************************************************************************
127 template< typename MT // Type of the adapted matrix
128  , bool SO // Storage order of the adapted matrix
129  , bool DF > // Density flag
130 inline void reset( UpperMatrix<MT,SO,DF>& m, size_t i )
131 {
132  m.reset( i );
133 }
134 //*************************************************************************************************
135 
136 
137 //*************************************************************************************************
144 template< typename MT // Type of the adapted matrix
145  , bool SO // Storage order of the adapted matrix
146  , bool DF > // Density flag
147 inline void clear( UpperMatrix<MT,SO,DF>& m )
148 {
149  m.clear();
150 }
151 //*************************************************************************************************
152 
153 
154 //*************************************************************************************************
172 template< typename MT // Type of the adapted matrix
173  , bool SO // Storage order of the adapted matrix
174  , bool DF > // Density flag
175 inline bool isDefault( const UpperMatrix<MT,SO,DF>& m )
176 {
177  return isDefault( m.matrix_ );
178 }
179 //*************************************************************************************************
180 
181 
182 //*************************************************************************************************
191 template< typename MT // Type of the adapted matrix
192  , bool SO // Storage order of the adapted matrix
193  , bool DF > // Density flag
194 inline void swap( UpperMatrix<MT,SO,DF>& a, UpperMatrix<MT,SO,DF>& b ) /* throw() */
195 {
196  a.swap( b );
197 }
198 //*************************************************************************************************
199 
200 
201 //*************************************************************************************************
215 template< typename MT // Type of the adapted matrix
216  , bool SO // Storage order of the adapted matrix
217  , bool DF > // Density flag
218 inline MT& derestrict( UpperMatrix<MT,SO,DF>& m )
219 {
220  return m.matrix_;
221 }
223 //*************************************************************************************************
224 
225 
226 
227 
228 //=================================================================================================
229 //
230 // ROWS SPECIALIZATIONS
231 //
232 //=================================================================================================
233 
234 //*************************************************************************************************
236 template< typename MT, bool SO, bool DF >
237 struct Rows< UpperMatrix<MT,SO,DF> > : public Rows<MT>
238 {};
240 //*************************************************************************************************
241 
242 
243 
244 
245 //=================================================================================================
246 //
247 // COLUMNS SPECIALIZATIONS
248 //
249 //=================================================================================================
250 
251 //*************************************************************************************************
253 template< typename MT, bool SO, bool DF >
254 struct Columns< UpperMatrix<MT,SO,DF> > : public Columns<MT>
255 {};
257 //*************************************************************************************************
258 
259 
260 
261 
262 //=================================================================================================
263 //
264 // ISSQUARE SPECIALIZATIONS
265 //
266 //=================================================================================================
267 
268 //*************************************************************************************************
270 template< typename MT, bool SO, bool DF >
271 struct IsSquare< UpperMatrix<MT,SO,DF> > : public TrueType
272 {
273  enum { value = 1 };
274  typedef TrueType Type;
275 };
277 //*************************************************************************************************
278 
279 
280 
281 
282 //=================================================================================================
283 //
284 // ISUPPER SPECIALIZATIONS
285 //
286 //=================================================================================================
287 
288 //*************************************************************************************************
290 template< typename MT, bool SO, bool DF >
291 struct IsUpper< UpperMatrix<MT,SO,DF> > : public TrueType
292 {
293  enum { value = 1 };
294  typedef TrueType Type;
295 };
297 //*************************************************************************************************
298 
299 
300 
301 
302 //=================================================================================================
303 //
304 // ISADAPTOR SPECIALIZATIONS
305 //
306 //=================================================================================================
307 
308 //*************************************************************************************************
310 template< typename MT, bool SO, bool DF >
311 struct IsAdaptor< UpperMatrix<MT,SO,DF> > : public TrueType
312 {
313  enum { value = 1 };
314  typedef TrueType Type;
315 };
317 //*************************************************************************************************
318 
319 
320 
321 
322 //=================================================================================================
323 //
324 // ISRESTRICTED SPECIALIZATIONS
325 //
326 //=================================================================================================
327 
328 //*************************************************************************************************
330 template< typename MT, bool SO, bool DF >
331 struct IsRestricted< UpperMatrix<MT,SO,DF> > : public TrueType
332 {
333  enum { value = 1 };
334  typedef TrueType Type;
335 };
337 //*************************************************************************************************
338 
339 
340 
341 
342 //=================================================================================================
343 //
344 // HASCONSTDATAACCESS SPECIALIZATIONS
345 //
346 //=================================================================================================
347 
348 //*************************************************************************************************
350 template< typename MT, bool SO >
351 struct HasConstDataAccess< UpperMatrix<MT,SO,true> > : public TrueType
352 {
353  enum { value = 1 };
354  typedef TrueType Type;
355 };
357 //*************************************************************************************************
358 
359 
360 
361 
362 //=================================================================================================
363 //
364 // ISRESIZABLE SPECIALIZATIONS
365 //
366 //=================================================================================================
367 
368 //*************************************************************************************************
370 template< typename MT, bool SO, bool DF >
371 struct IsResizable< UpperMatrix<MT,SO,DF> > : public IsResizable<MT>::Type
372 {
373  enum { value = IsResizable<MT>::value };
374  typedef typename IsResizable<MT>::Type Type;
375 };
377 //*************************************************************************************************
378 
379 
380 
381 
382 //=================================================================================================
383 //
384 // REMOVEADAPTOR SPECIALIZATIONS
385 //
386 //=================================================================================================
387 
388 //*************************************************************************************************
390 template< typename MT, bool SO, bool DF >
391 struct RemoveAdaptor< UpperMatrix<MT,SO,DF> >
392 {
393  typedef MT Type;
394 };
396 //*************************************************************************************************
397 
398 
399 
400 
401 //=================================================================================================
402 //
403 // DERESTRICTTRAIT SPECIALIZATIONS
404 //
405 //=================================================================================================
406 
407 //*************************************************************************************************
409 template< typename MT, bool SO, bool DF >
410 struct DerestrictTrait< UpperMatrix<MT,SO,DF> >
411 {
412  typedef MT& Type;
413 };
415 //*************************************************************************************************
416 
417 
418 
419 
420 //=================================================================================================
421 //
422 // ADDTRAIT SPECIALIZATIONS
423 //
424 //=================================================================================================
425 
426 //*************************************************************************************************
428 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
429 struct AddTrait< UpperMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
430 {
431  typedef typename AddTrait< MT, StaticMatrix<T,M,N,SO2> >::Type Type;
432 };
433 
434 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
435 struct AddTrait< StaticMatrix<T,M,N,SO1>, UpperMatrix<MT,SO2,DF> >
436 {
437  typedef typename AddTrait< StaticMatrix<T,M,N,SO1>, MT >::Type Type;
438 };
439 
440 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
441 struct AddTrait< UpperMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
442 {
443  typedef typename AddTrait< MT, HybridMatrix<T,M,N,SO2> >::Type Type;
444 };
445 
446 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
447 struct AddTrait< HybridMatrix<T,M,N,SO1>, UpperMatrix<MT,SO2,DF> >
448 {
449  typedef typename AddTrait< HybridMatrix<T,M,N,SO1>, MT >::Type Type;
450 };
451 
452 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
453 struct AddTrait< UpperMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
454 {
455  typedef typename AddTrait< MT, DynamicMatrix<T,SO2> >::Type Type;
456 };
457 
458 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
459 struct AddTrait< DynamicMatrix<T,SO1>, UpperMatrix<MT,SO2,DF> >
460 {
461  typedef typename AddTrait< DynamicMatrix<T,SO1>, MT >::Type Type;
462 };
463 
464 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
465 struct AddTrait< UpperMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
466 {
467  typedef typename AddTrait< MT, CompressedMatrix<T,SO2> >::Type Type;
468 };
469 
470 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
471 struct AddTrait< CompressedMatrix<T,SO1>, UpperMatrix<MT,SO2,DF> >
472 {
473  typedef typename AddTrait< CompressedMatrix<T,SO1>, MT >::Type Type;
474 };
475 
476 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
477 struct AddTrait< UpperMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
478 {
479  typedef typename AddTrait<MT1,MT2>::Type Type;
480 };
481 
482 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
483 struct AddTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, UpperMatrix<MT2,SO2,DF2> >
484 {
485  typedef typename AddTrait<MT1,MT2>::Type Type;
486 };
487 
488 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
489 struct AddTrait< UpperMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
490 {
491  typedef typename AddTrait<MT1,MT2>::Type Type;
492 };
493 
494 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
495 struct AddTrait< LowerMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
496 {
497  typedef typename AddTrait<MT1,MT2>::Type Type;
498 };
499 
500 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
501 struct AddTrait< UpperMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
502 {
503  typedef typename AddTrait<MT1,MT2>::Type Type;
504 };
505 
506 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
507 struct AddTrait< UniLowerMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
508 {
509  typedef typename AddTrait<MT1,MT2>::Type Type;
510 };
511 
512 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
513 struct AddTrait< UpperMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
514 {
515  typedef typename AddTrait<MT1,MT2>::Type Type;
516 };
517 
518 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
519 struct AddTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
520 {
521  typedef typename AddTrait<MT1,MT2>::Type Type;
522 };
523 
524 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
525 struct AddTrait< UpperMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
526 {
527  typedef UpperMatrix< typename AddTrait<MT1,MT2>::Type > Type;
528 };
530 //*************************************************************************************************
531 
532 
533 
534 
535 //=================================================================================================
536 //
537 // SUBTRAIT SPECIALIZATIONS
538 //
539 //=================================================================================================
540 
541 //*************************************************************************************************
543 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
544 struct SubTrait< UpperMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
545 {
546  typedef typename SubTrait< MT, StaticMatrix<T,M,N,SO2> >::Type Type;
547 };
548 
549 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
550 struct SubTrait< StaticMatrix<T,M,N,SO1>, UpperMatrix<MT,SO2,DF> >
551 {
552  typedef typename SubTrait< StaticMatrix<T,M,N,SO1>, MT >::Type Type;
553 };
554 
555 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
556 struct SubTrait< UpperMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
557 {
558  typedef typename SubTrait< MT, HybridMatrix<T,M,N,SO2> >::Type Type;
559 };
560 
561 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
562 struct SubTrait< HybridMatrix<T,M,N,SO1>, UpperMatrix<MT,SO2,DF> >
563 {
564  typedef typename SubTrait< HybridMatrix<T,M,N,SO1>, MT >::Type Type;
565 };
566 
567 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
568 struct SubTrait< UpperMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
569 {
570  typedef typename SubTrait< MT, DynamicMatrix<T,SO2> >::Type Type;
571 };
572 
573 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
574 struct SubTrait< DynamicMatrix<T,SO1>, UpperMatrix<MT,SO2,DF> >
575 {
576  typedef typename SubTrait< DynamicMatrix<T,SO1>, MT >::Type Type;
577 };
578 
579 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
580 struct SubTrait< UpperMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
581 {
582  typedef typename SubTrait< MT, CompressedMatrix<T,SO2> >::Type Type;
583 };
584 
585 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
586 struct SubTrait< CompressedMatrix<T,SO1>, UpperMatrix<MT,SO2,DF> >
587 {
588  typedef typename SubTrait< CompressedMatrix<T,SO1>, MT >::Type Type;
589 };
590 
591 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
592 struct SubTrait< UpperMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
593 {
594  typedef typename SubTrait<MT1,MT2>::Type Type;
595 };
596 
597 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
598 struct SubTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, UpperMatrix<MT2,SO2,DF2> >
599 {
600  typedef typename SubTrait<MT1,MT2>::Type Type;
601 };
602 
603 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
604 struct SubTrait< UpperMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
605 {
606  typedef typename SubTrait<MT1,MT2>::Type Type;
607 };
608 
609 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
610 struct SubTrait< LowerMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
611 {
612  typedef typename SubTrait<MT1,MT2>::Type Type;
613 };
614 
615 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
616 struct SubTrait< UpperMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
617 {
618  typedef typename SubTrait<MT1,MT2>::Type Type;
619 };
620 
621 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
622 struct SubTrait< UniLowerMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
623 {
624  typedef typename SubTrait<MT1,MT2>::Type Type;
625 };
626 
627 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
628 struct SubTrait< UpperMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
629 {
630  typedef typename SubTrait<MT1,MT2>::Type Type;
631 };
632 
633 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
634 struct SubTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
635 {
636  typedef typename SubTrait<MT1,MT2>::Type Type;
637 };
638 
639 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
640 struct SubTrait< UpperMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
641 {
642  typedef UpperMatrix< typename SubTrait<MT1,MT2>::Type > Type;
643 };
645 //*************************************************************************************************
646 
647 
648 
649 
650 //=================================================================================================
651 //
652 // MULTTRAIT SPECIALIZATIONS
653 //
654 //=================================================================================================
655 
656 //*************************************************************************************************
658 template< typename MT, bool SO, bool DF, typename T >
659 struct MultTrait< UpperMatrix<MT,SO,DF>, T >
660 {
661  typedef UpperMatrix< typename MultTrait<MT,T>::Type > Type;
663 };
664 
665 template< typename T, typename MT, bool SO, bool DF >
666 struct MultTrait< T, UpperMatrix<MT,SO,DF> >
667 {
668  typedef UpperMatrix< typename MultTrait<T,MT>::Type > Type;
670 };
671 
672 template< typename MT, bool SO, bool DF, typename T, size_t N >
673 struct MultTrait< UpperMatrix<MT,SO,DF>, StaticVector<T,N,false> >
674 {
675  typedef typename MultTrait< MT, StaticVector<T,N,false> >::Type Type;
676 };
677 
678 template< typename T, size_t N, typename MT, bool SO, bool DF >
679 struct MultTrait< StaticVector<T,N,true>, UpperMatrix<MT,SO,DF> >
680 {
681  typedef typename MultTrait< StaticVector<T,N,true>, MT >::Type Type;
682 };
683 
684 template< typename MT, bool SO, bool DF, typename T, size_t N >
685 struct MultTrait< UpperMatrix<MT,SO,DF>, HybridVector<T,N,false> >
686 {
687  typedef typename MultTrait< MT, HybridVector<T,N,false> >::Type Type;
688 };
689 
690 template< typename T, size_t N, typename MT, bool SO, bool DF >
691 struct MultTrait< HybridVector<T,N,true>, UpperMatrix<MT,SO,DF> >
692 {
693  typedef typename MultTrait< HybridVector<T,N,true>, MT >::Type Type;
694 };
695 
696 template< typename MT, bool SO, bool DF, typename T >
697 struct MultTrait< UpperMatrix<MT,SO,DF>, DynamicVector<T,false> >
698 {
699  typedef typename MultTrait< MT, DynamicVector<T,false> >::Type Type;
700 };
701 
702 template< typename T, typename MT, bool SO, bool DF >
703 struct MultTrait< DynamicVector<T,true>, UpperMatrix<MT,SO,DF> >
704 {
705  typedef typename MultTrait< DynamicVector<T,true>, MT >::Type Type;
706 };
707 
708 template< typename MT, bool SO, bool DF, typename T >
709 struct MultTrait< UpperMatrix<MT,SO,DF>, CompressedVector<T,false> >
710 {
711  typedef typename MultTrait< MT, CompressedVector<T,false> >::Type Type;
712 };
713 
714 template< typename T, typename MT, bool SO, bool DF >
715 struct MultTrait< CompressedVector<T,true>, UpperMatrix<MT,SO,DF> >
716 {
717  typedef typename MultTrait< CompressedVector<T,true>, MT >::Type Type;
718 };
719 
720 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
721 struct MultTrait< UpperMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
722 {
723  typedef typename MultTrait< MT, StaticMatrix<T,M,N,SO2> >::Type Type;
724 };
725 
726 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
727 struct MultTrait< StaticMatrix<T,M,N,SO1>, UpperMatrix<MT,SO2,DF> >
728 {
729  typedef typename MultTrait< StaticMatrix<T,M,N,SO1>, MT >::Type Type;
730 };
731 
732 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
733 struct MultTrait< UpperMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
734 {
735  typedef typename MultTrait< MT, HybridMatrix<T,M,N,SO2> >::Type Type;
736 };
737 
738 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
739 struct MultTrait< HybridMatrix<T,M,N,SO1>, UpperMatrix<MT,SO2,DF> >
740 {
741  typedef typename MultTrait< HybridMatrix<T,M,N,SO1>, MT >::Type Type;
742 };
743 
744 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
745 struct MultTrait< UpperMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
746 {
747  typedef typename MultTrait< MT, DynamicMatrix<T,SO2> >::Type Type;
748 };
749 
750 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
751 struct MultTrait< DynamicMatrix<T,SO1>, UpperMatrix<MT,SO2,DF> >
752 {
753  typedef typename MultTrait< DynamicMatrix<T,SO1>, MT >::Type Type;
754 };
755 
756 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
757 struct MultTrait< UpperMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
758 {
759  typedef typename MultTrait< MT, CompressedMatrix<T,SO2> >::Type Type;
760 };
761 
762 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
763 struct MultTrait< CompressedMatrix<T,SO1>, UpperMatrix<MT,SO2,DF> >
764 {
765  typedef typename MultTrait< CompressedMatrix<T,SO1>, MT >::Type Type;
766 };
767 
768 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
769 struct MultTrait< UpperMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
770 {
771  typedef typename MultTrait<MT1,MT2>::Type Type;
772 };
773 
774 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
775 struct MultTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, UpperMatrix<MT2,SO2,DF2> >
776 {
777  typedef typename MultTrait<MT1,MT2>::Type Type;
778 };
779 
780 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
781 struct MultTrait< UpperMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
782 {
783  typedef typename MultTrait<MT1,MT2>::Type Type;
784 };
785 
786 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
787 struct MultTrait< LowerMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
788 {
789  typedef typename MultTrait<MT1,MT2>::Type Type;
790 };
791 
792 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
793 struct MultTrait< UpperMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
794 {
795  typedef typename MultTrait<MT1,MT2>::Type Type;
796 };
797 
798 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
799 struct MultTrait< UniLowerMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
800 {
801  typedef typename MultTrait<MT1,MT2>::Type Type;
802 };
803 
804 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
805 struct MultTrait< UpperMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
806 {
807  typedef typename MultTrait<MT1,MT2>::Type Type;
808 };
809 
810 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
811 struct MultTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
812 {
813  typedef typename MultTrait<MT1,MT2>::Type Type;
814 };
815 
816 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
817 struct MultTrait< UpperMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
818 {
819  typedef UpperMatrix< typename MultTrait<MT1,MT2>::Type > Type;
820 };
822 //*************************************************************************************************
823 
824 
825 
826 
827 //=================================================================================================
828 //
829 // DIVTRAIT SPECIALIZATIONS
830 //
831 //=================================================================================================
832 
833 //*************************************************************************************************
835 template< typename MT, bool SO, bool DF, typename T >
836 struct DivTrait< UpperMatrix<MT,SO,DF>, T >
837 {
838  typedef UpperMatrix< typename DivTrait<MT,T>::Type > Type;
840 };
842 //*************************************************************************************************
843 
844 
845 
846 
847 //=================================================================================================
848 //
849 // MATHTRAIT SPECIALIZATIONS
850 //
851 //=================================================================================================
852 
853 //*************************************************************************************************
855 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
856 struct MathTrait< UpperMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
857 {
858  typedef UpperMatrix< typename MathTrait<MT1,MT2>::HighType > HighType;
859  typedef UpperMatrix< typename MathTrait<MT1,MT2>::LowType > LowType;
860 };
862 //*************************************************************************************************
863 
864 
865 
866 
867 //=================================================================================================
868 //
869 // SUBMATRIXTRAIT SPECIALIZATIONS
870 //
871 //=================================================================================================
872 
873 //*************************************************************************************************
875 template< typename MT, bool SO, bool DF >
876 struct SubmatrixTrait< UpperMatrix<MT,SO,DF> >
877 {
878  typedef typename SubmatrixTrait<MT>::Type Type;
879 };
881 //*************************************************************************************************
882 
883 
884 
885 
886 //=================================================================================================
887 //
888 // ROWTRAIT SPECIALIZATIONS
889 //
890 //=================================================================================================
891 
892 //*************************************************************************************************
894 template< typename MT, bool SO, bool DF >
895 struct RowTrait< UpperMatrix<MT,SO,DF> >
896 {
897  typedef typename RowTrait<MT>::Type Type;
898 };
900 //*************************************************************************************************
901 
902 
903 
904 
905 //=================================================================================================
906 //
907 // COLUMNTRAIT SPECIALIZATIONS
908 //
909 //=================================================================================================
910 
911 //*************************************************************************************************
913 template< typename MT, bool SO, bool DF >
914 struct ColumnTrait< UpperMatrix<MT,SO,DF> >
915 {
916  typedef typename ColumnTrait<MT>::Type Type;
917 };
919 //*************************************************************************************************
920 
921 } // namespace blaze
922 
923 #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
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.
UpperMatrix specialization for dense matrices.
Header file for the RemoveAdaptor type trait.
Matrix adapter for upper triangular matrices.
Definition: Forward.h:54
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.
UpperMatrix specialization for sparse matrices.
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.
Header file for the IsUpper type trait.
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.