35 #ifndef _BLAZE_MATH_ADAPTORS_UNILOWERMATRIX_H_
36 #define _BLAZE_MATH_ADAPTORS_UNILOWERMATRIX_H_
80 template<
typename MT,
bool SO,
bool DF >
81 inline void reset( UniLowerMatrix<MT,SO,DF>& m );
83 template<
typename MT,
bool SO,
bool DF >
84 inline void reset( UniLowerMatrix<MT,SO,DF>& m,
size_t i );
86 template<
typename MT,
bool SO,
bool DF >
87 inline void clear( UniLowerMatrix<MT,SO,DF>& m );
89 template<
typename MT,
bool SO,
bool DF >
90 inline bool isDefault(
const UniLowerMatrix<MT,SO,DF>& m );
92 template<
typename MT,
bool SO,
bool DF >
93 inline void swap( UniLowerMatrix<MT,SO,DF>& a, UniLowerMatrix<MT,SO,DF>& b ) ;
105 template<
typename MT
128 template<
typename MT
145 template<
typename MT
165 template<
typename MT
168 inline bool isDefault_backend(
const UniLowerMatrix<MT,SO,DF>& m,
TrueType )
170 return ( m.rows() == 0UL );
186 template<
typename MT
189 inline bool isDefault_backend(
const UniLowerMatrix<MT,SO,DF>& m,
FalseType )
217 template<
typename MT
236 template<
typename MT
260 template<
typename MT
263 inline MT& derestrict( UniLowerMatrix<MT,SO,DF>& m )
281 template<
typename MT,
bool SO,
bool DF >
282 struct Rows< UniLowerMatrix<MT,SO,DF> > :
public Rows<MT>
298 template<
typename MT,
bool SO,
bool DF >
299 struct Columns< UniLowerMatrix<MT,SO,DF> > :
public Columns<MT>
315 template<
typename MT,
bool SO,
bool DF >
316 struct IsSquare< UniLowerMatrix<MT,SO,DF> > :
public TrueType
335 template<
typename MT,
bool SO,
bool DF >
336 struct IsUniLower< UniLowerMatrix<MT,SO,DF> > :
public TrueType
355 template<
typename MT,
bool SO,
bool DF >
356 struct IsAdaptor< UniLowerMatrix<MT,SO,DF> > :
public TrueType
375 template<
typename MT,
bool SO,
bool DF >
376 struct IsRestricted< UniLowerMatrix<MT,SO,DF> > :
public TrueType
395 template<
typename MT,
bool SO >
396 struct HasConstDataAccess< UniLowerMatrix<MT,SO,true> > :
public TrueType
415 template<
typename MT,
bool SO,
bool DF >
416 struct IsResizable< UniLowerMatrix<MT,SO,DF> > :
public IsResizable<MT>::Type
418 enum { value = IsResizable<MT>::value };
419 typedef typename IsResizable<MT>::Type Type;
435 template<
typename MT,
bool SO,
bool DF >
436 struct RemoveAdaptor< UniLowerMatrix<MT,SO,DF> >
454 template<
typename MT,
bool SO,
bool DF >
455 struct DerestrictTrait< UniLowerMatrix<MT,SO,DF> >
473 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
474 struct AddTrait< UniLowerMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
476 typedef typename AddTrait< MT, StaticMatrix<T,M,N,SO2> >::Type Type;
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>, UniLowerMatrix<MT,SO2,DF> >
482 typedef typename AddTrait< StaticMatrix<T,M,N,SO1>, MT >::Type Type;
485 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
486 struct AddTrait< UniLowerMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
488 typedef typename AddTrait< MT, HybridMatrix<T,M,N,SO2> >::Type Type;
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>, UniLowerMatrix<MT,SO2,DF> >
494 typedef typename AddTrait< HybridMatrix<T,M,N,SO1>, MT >::Type Type;
497 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
498 struct AddTrait< UniLowerMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
500 typedef typename AddTrait< MT, DynamicMatrix<T,SO2> >::Type Type;
503 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
504 struct AddTrait< DynamicMatrix<T,SO1>, UniLowerMatrix<MT,SO2,DF> >
506 typedef typename AddTrait< DynamicMatrix<T,SO1>, MT >::Type Type;
509 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
510 struct AddTrait< UniLowerMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
512 typedef typename AddTrait< MT, CompressedMatrix<T,SO2> >::Type Type;
515 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
516 struct AddTrait< CompressedMatrix<T,SO1>, UniLowerMatrix<MT,SO2,DF> >
518 typedef typename AddTrait< CompressedMatrix<T,SO1>, MT >::Type Type;
521 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2,
bool NF >
522 struct AddTrait< UniLowerMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
524 typedef typename AddTrait<MT1,MT2>::Type Type;
527 template<
typename MT1,
bool SO1,
bool DF1,
bool NF,
typename MT2,
bool SO2,
bool DF2 >
528 struct AddTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, UniLowerMatrix<MT2,SO2,DF2> >
530 typedef typename AddTrait<MT1,MT2>::Type Type;
533 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
534 struct AddTrait< UniLowerMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
536 typedef LowerMatrix< typename AddTrait<MT1,MT2>::Type > Type;
539 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
540 struct AddTrait< LowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
542 typedef LowerMatrix< typename AddTrait<MT1,MT2>::Type > Type;
545 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
546 struct AddTrait< UniLowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
548 typedef LowerMatrix< typename AddTrait<MT1,MT2>::Type > Type;
564 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
565 struct SubTrait< UniLowerMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
567 typedef typename SubTrait< MT, StaticMatrix<T,M,N,SO2> >::Type Type;
570 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
571 struct SubTrait< StaticMatrix<T,M,N,SO1>, UniLowerMatrix<MT,SO2,DF> >
573 typedef typename SubTrait< StaticMatrix<T,M,N,SO1>, MT >::Type Type;
576 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
577 struct SubTrait< UniLowerMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
579 typedef typename SubTrait< MT, HybridMatrix<T,M,N,SO2> >::Type Type;
582 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
583 struct SubTrait< HybridMatrix<T,M,N,SO1>, UniLowerMatrix<MT,SO2,DF> >
585 typedef typename SubTrait< HybridMatrix<T,M,N,SO1>, MT >::Type Type;
588 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
589 struct SubTrait< UniLowerMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
591 typedef typename SubTrait< MT, DynamicMatrix<T,SO2> >::Type Type;
594 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
595 struct SubTrait< DynamicMatrix<T,SO1>, UniLowerMatrix<MT,SO2,DF> >
597 typedef typename SubTrait< DynamicMatrix<T,SO1>, MT >::Type Type;
600 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
601 struct SubTrait< UniLowerMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
603 typedef typename SubTrait< MT, CompressedMatrix<T,SO2> >::Type Type;
606 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
607 struct SubTrait< CompressedMatrix<T,SO1>, UniLowerMatrix<MT,SO2,DF> >
609 typedef typename SubTrait< CompressedMatrix<T,SO1>, MT >::Type Type;
612 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2,
bool NF >
613 struct SubTrait< UniLowerMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
615 typedef typename SubTrait<MT1,MT2>::Type Type;
618 template<
typename MT1,
bool SO1,
bool DF1,
bool NF,
typename MT2,
bool SO2,
bool DF2 >
619 struct SubTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, UniLowerMatrix<MT2,SO2,DF2> >
621 typedef typename SubTrait<MT1,MT2>::Type Type;
624 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
625 struct SubTrait< UniLowerMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
627 typedef LowerMatrix< typename SubTrait<MT1,MT2>::Type > Type;
630 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
631 struct SubTrait< LowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
633 typedef LowerMatrix< typename SubTrait<MT1,MT2>::Type > Type;
636 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
637 struct SubTrait< UniLowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
639 typedef LowerMatrix< typename SubTrait<MT1,MT2>::Type > Type;
655 template<
typename MT,
bool SO,
bool DF,
typename T >
656 struct MultTrait< UniLowerMatrix<MT,SO,DF>, T >
658 typedef LowerMatrix< typename MultTrait<MT,T>::Type > Type;
662 template<
typename T,
typename MT,
bool SO,
bool DF >
663 struct MultTrait< T, UniLowerMatrix<MT,SO,DF> >
665 typedef LowerMatrix< typename MultTrait<T,MT>::Type > Type;
669 template<
typename MT,
bool SO,
bool DF,
typename T,
size_t N >
670 struct MultTrait< UniLowerMatrix<MT,SO,DF>, StaticVector<T,N,false> >
672 typedef typename MultTrait< MT, StaticVector<T,N,false> >::Type Type;
675 template<
typename T,
size_t N,
typename MT,
bool SO,
bool DF >
676 struct MultTrait< StaticVector<T,N,true>, UniLowerMatrix<MT,SO,DF> >
678 typedef typename MultTrait< StaticVector<T,N,true>, MT >::Type Type;
681 template<
typename MT,
bool SO,
bool DF,
typename T,
size_t N >
682 struct MultTrait< UniLowerMatrix<MT,SO,DF>, HybridVector<T,N,false> >
684 typedef typename MultTrait< MT, HybridVector<T,N,false> >::Type Type;
687 template<
typename T,
size_t N,
typename MT,
bool SO,
bool DF >
688 struct MultTrait< HybridVector<T,N,true>, UniLowerMatrix<MT,SO,DF> >
690 typedef typename MultTrait< HybridVector<T,N,true>, MT >::Type Type;
693 template<
typename MT,
bool SO,
bool DF,
typename T >
694 struct MultTrait< UniLowerMatrix<MT,SO,DF>, DynamicVector<T,false> >
696 typedef typename MultTrait< MT, DynamicVector<T,false> >::Type Type;
699 template<
typename T,
typename MT,
bool SO,
bool DF >
700 struct MultTrait< DynamicVector<T,true>, UniLowerMatrix<MT,SO,DF> >
702 typedef typename MultTrait< DynamicVector<T,true>, MT >::Type Type;
705 template<
typename MT,
bool SO,
bool DF,
typename T >
706 struct MultTrait< UniLowerMatrix<MT,SO,DF>, CompressedVector<T,false> >
708 typedef typename MultTrait< MT, CompressedVector<T,false> >::Type Type;
711 template<
typename T,
typename MT,
bool SO,
bool DF >
712 struct MultTrait< CompressedVector<T,true>, UniLowerMatrix<MT,SO,DF> >
714 typedef typename MultTrait< CompressedVector<T,true>, MT >::Type Type;
717 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
718 struct MultTrait< UniLowerMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
720 typedef typename MultTrait< MT, StaticMatrix<T,M,N,SO2> >::Type Type;
723 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
724 struct MultTrait< StaticMatrix<T,M,N,SO1>, UniLowerMatrix<MT,SO2,DF> >
726 typedef typename MultTrait< StaticMatrix<T,M,N,SO1>, MT >::Type Type;
729 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
730 struct MultTrait< UniLowerMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
732 typedef typename MultTrait< MT, HybridMatrix<T,M,N,SO2> >::Type Type;
735 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
736 struct MultTrait< HybridMatrix<T,M,N,SO1>, UniLowerMatrix<MT,SO2,DF> >
738 typedef typename MultTrait< HybridMatrix<T,M,N,SO1>, MT >::Type Type;
741 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
742 struct MultTrait< UniLowerMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
744 typedef typename MultTrait< MT, DynamicMatrix<T,SO2> >::Type Type;
747 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
748 struct MultTrait< DynamicMatrix<T,SO1>, UniLowerMatrix<MT,SO2,DF> >
750 typedef typename MultTrait< DynamicMatrix<T,SO1>, MT >::Type Type;
753 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
754 struct MultTrait< UniLowerMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
756 typedef typename MultTrait< MT, CompressedMatrix<T,SO2> >::Type Type;
759 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
760 struct MultTrait< CompressedMatrix<T,SO1>, UniLowerMatrix<MT,SO2,DF> >
762 typedef typename MultTrait< CompressedMatrix<T,SO1>, MT >::Type Type;
765 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2,
bool NF >
766 struct MultTrait< UniLowerMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
768 typedef typename MultTrait<MT1,MT2>::Type Type;
771 template<
typename MT1,
bool SO1,
bool DF1,
bool NF,
typename MT2,
bool SO2,
bool DF2 >
772 struct MultTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, UniLowerMatrix<MT2,SO2,DF2> >
774 typedef typename MultTrait<MT1,MT2>::Type Type;
777 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
778 struct MultTrait< UniLowerMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
780 typedef LowerMatrix< typename MultTrait<MT1,MT2>::Type > Type;
783 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
784 struct MultTrait< LowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
786 typedef LowerMatrix< typename MultTrait<MT1,MT2>::Type > Type;
789 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
790 struct MultTrait< UniLowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
792 typedef UniLowerMatrix< typename MultTrait<MT1,MT2>::Type > Type;
808 template<
typename MT,
bool SO,
bool DF,
typename T >
809 struct DivTrait< UniLowerMatrix<MT,SO,DF>, T >
811 typedef LowerMatrix< typename DivTrait<MT,T>::Type > Type;
828 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
829 struct MathTrait< UniLowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
831 typedef UniLowerMatrix< typename MathTrait<MT1,MT2>::HighType > HighType;
832 typedef UniLowerMatrix< typename MathTrait<MT1,MT2>::LowType > LowType;
848 template<
typename MT,
bool SO,
bool DF >
849 struct SubmatrixTrait< UniLowerMatrix<MT,SO,DF> >
851 typedef typename SubmatrixTrait<MT>::Type Type;
867 template<
typename MT,
bool SO,
bool DF >
868 struct RowTrait< UniLowerMatrix<MT,SO,DF> >
870 typedef typename RowTrait<MT>::Type Type;
886 template<
typename MT,
bool SO,
bool DF >
887 struct ColumnTrait< UniLowerMatrix<MT,SO,DF> >
889 typedef typename ColumnTrait<MT>::Type Type;
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
Header file for the IsUniLower type trait.
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:861
Header file for the IsSquare type trait.
UniLowerMatrix specialization for sparse matrices.
Header file for the multiplication trait.
Header file for the implementation of the base template of the LowerMatrix.
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
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
UniLowerMatrix specialization for dense matrices.
Matrix adapter for lower unitriangular matrices.
Definition: Forward.h:52
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
Header file for the implementation of the base template of the UniLowerMatrix.