Row.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_VIEWS_ROW_H_
36 #define _BLAZE_MATH_VIEWS_ROW_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
74 #include <blaze/util/DisableIf.h>
75 #include <blaze/util/EnableIf.h>
78 #include <blaze/util/mpl/And.h>
79 #include <blaze/util/mpl/Or.h>
80 #include <blaze/util/TrueType.h>
81 #include <blaze/util/Types.h>
82 
83 
84 namespace blaze {
85 
86 //=================================================================================================
87 //
88 // GLOBAL FUNCTION
89 //
90 //=================================================================================================
91 
92 //*************************************************************************************************
124 template< typename MT // Type of the matrix
125  , bool SO > // Storage order
126 inline DisableIf_< Or< IsComputation<MT>, IsTransExpr<MT>, IsDeclExpr<MT> >
127  , RowExprTrait_<MT> >
128  row( Matrix<MT,SO>& matrix, size_t index )
129 {
131 
132  return RowExprTrait_<MT>( ~matrix, index );
133 }
134 //*************************************************************************************************
135 
136 
137 //*************************************************************************************************
169 template< typename MT // Type of the matrix
170  , bool SO > // Storage order
171 inline const DisableIf_< Or< IsComputation<MT>, IsTransExpr<MT>, IsDeclExpr<MT> >
173  row( const Matrix<MT,SO>& matrix, size_t index )
174 {
176 
177  return RowExprTrait_<const MT>( ~matrix, index );
178 }
179 //*************************************************************************************************
180 
181 
182 //*************************************************************************************************
196 template< typename MT // Type of the matrix
197  , bool SO > // Storage order
198 inline DisableIf_< Or< IsComputation<MT>, IsTransExpr<MT>, IsDeclExpr<MT> >
200  row( Matrix<MT,SO>&& matrix, size_t index )
201 {
203 
204  return RowExprTrait_<MT>( ~matrix, index );
205 }
206 //*************************************************************************************************
207 
208 
209 
210 
211 //=================================================================================================
212 //
213 // GLOBAL RESTRUCTURING OPERATORS
214 //
215 //=================================================================================================
216 
217 //*************************************************************************************************
229 template< typename MT // Type of the matrix
230  , bool SO > // Storage order
232  row( const Matrix<MT,SO>& matrix, size_t index )
233 {
235 
236  return row( (~matrix).leftOperand(), index ) + row( (~matrix).rightOperand(), index );
237 }
239 //*************************************************************************************************
240 
241 
242 //*************************************************************************************************
254 template< typename MT // Type of the matrix
255  , bool SO > // Storage order
257  row( const Matrix<MT,SO>& matrix, size_t index )
258 {
260 
261  return row( (~matrix).leftOperand(), index ) - row( (~matrix).rightOperand(), index );
262 }
264 //*************************************************************************************************
265 
266 
267 //*************************************************************************************************
279 template< typename MT // Type of the matrix
280  , bool SO > // Storage order
282  row( const Matrix<MT,SO>& matrix, size_t index )
283 {
285 
286  return row( (~matrix).leftOperand(), index ) * (~matrix).rightOperand();
287 }
289 //*************************************************************************************************
290 
291 
292 //*************************************************************************************************
303 template< typename MT // Type of the matrix
304  , bool SO > // Storage order
306  row( const Matrix<MT,SO>& matrix, size_t index )
307 {
309 
310  return (~matrix).leftOperand()[index] * (~matrix).rightOperand();
311 }
313 //*************************************************************************************************
314 
315 
316 //*************************************************************************************************
328 template< typename MT // Type of the matrix
329  , bool SO > // Storage order
331  row( const Matrix<MT,SO>& matrix, size_t index )
332 {
334 
335  return row( (~matrix).leftOperand(), index ) * (~matrix).rightOperand();
336 }
338 //*************************************************************************************************
339 
340 
341 //*************************************************************************************************
353 template< typename MT // Type of the matrix
354  , bool SO > // Storage order
356  row( const Matrix<MT,SO>& matrix, size_t index )
357 {
359 
360  return row( (~matrix).leftOperand(), index ) / (~matrix).rightOperand();
361 }
363 //*************************************************************************************************
364 
365 
366 //*************************************************************************************************
378 template< typename MT // Type of the matrix
379  , bool SO > // Storage order
381  row( const Matrix<MT,SO>& matrix, size_t index )
382 {
384 
385  return forEach( row( (~matrix).operand(), index ), (~matrix).operation() );
386 }
388 //*************************************************************************************************
389 
390 
391 //*************************************************************************************************
403 template< typename MT // Type of the matrix
404  , bool SO > // Storage order
406  row( const Matrix<MT,SO>& matrix, size_t index )
407 {
409 
410  return eval( row( (~matrix).operand(), index ) );
411 }
413 //*************************************************************************************************
414 
415 
416 //*************************************************************************************************
428 template< typename MT // Type of the matrix
429  , bool SO > // Storage order
431  row( const Matrix<MT,SO>& matrix, size_t index )
432 {
434 
435  return serial( row( (~matrix).operand(), index ) );
436 }
438 //*************************************************************************************************
439 
440 
441 //*************************************************************************************************
453 template< typename MT // Type of the matrix
454  , bool SO > // Storage order
456  row( const Matrix<MT,SO>& matrix, size_t index )
457 {
459 
460  return row( (~matrix).operand(), index );
461 }
463 //*************************************************************************************************
464 
465 
466 //*************************************************************************************************
478 template< typename MT // Type of the matrix
479  , bool SO > // Storage order
481  row( const Matrix<MT,SO>& matrix, size_t index )
482 {
484 
485  return trans( column( (~matrix).operand(), index ) );
486 }
488 //*************************************************************************************************
489 
490 
491 
492 
493 
494 
495 
496 
497 //=================================================================================================
498 //
499 // ROW OPERATORS
500 //
501 //=================================================================================================
502 
503 //*************************************************************************************************
506 template< typename MT, bool SO, bool DF, bool SF >
507 inline void reset( Row<MT,SO,DF,SF>& row );
508 
509 template< typename MT, bool SO, bool DF, bool SF >
510 inline void reset( Row<MT,SO,DF,SF>&& row );
511 
512 template< typename MT, bool SO, bool DF, bool SF >
513 inline void clear( Row<MT,SO,DF,SF>& row );
514 
515 template< typename MT, bool SO, bool DF, bool SF >
516 inline void clear( Row<MT,SO,DF,SF>&& row );
517 
518 template< bool RF, typename MT, bool SO, bool DF, bool SF >
519 inline bool isDefault( const Row<MT,SO,DF,SF>& row );
520 
521 template< typename MT, bool SO, bool DF, bool SF >
522 inline bool isIntact( const Row<MT,SO,DF,SF>& row ) noexcept;
523 
524 template< typename MT, bool SO, bool DF, bool SF >
525 inline bool isSame( const Row<MT,SO,DF,SF>& a, const Row<MT,SO,DF,SF>& b ) noexcept;
527 //*************************************************************************************************
528 
529 
530 //*************************************************************************************************
537 template< typename MT // Type of the matrix
538  , bool SO // Storage order
539  , bool DF // Density flag
540  , bool SF > // Symmetry flag
541 inline void reset( Row<MT,SO,DF,SF>& row )
542 {
543  row.reset();
544 }
545 //*************************************************************************************************
546 
547 
548 //*************************************************************************************************
555 template< typename MT // Type of the matrix
556  , bool SO // Storage order
557  , bool DF // Density flag
558  , bool SF > // Symmetry flag
559 inline void reset( Row<MT,SO,DF,SF>&& row )
560 {
561  row.reset();
562 }
563 //*************************************************************************************************
564 
565 
566 //*************************************************************************************************
575 template< typename MT // Type of the matrix
576  , bool SO // Storage order
577  , bool DF // Density flag
578  , bool SF > // Symmetry flag
579 inline void clear( Row<MT,SO,DF,SF>& row )
580 {
581  row.reset();
582 }
583 //*************************************************************************************************
584 
585 
586 //*************************************************************************************************
595 template< typename MT // Type of the matrix
596  , bool SO // Storage order
597  , bool DF // Density flag
598  , bool SF > // Symmetry flag
599 inline void clear( Row<MT,SO,DF,SF>&& row )
600 {
601  row.reset();
602 }
603 //*************************************************************************************************
604 
605 
606 //*************************************************************************************************
631 template< bool RF // Relaxation flag
632  , typename MT // Type of the matrix
633  , bool SO // Storage order
634  , bool DF // Density flag
635  , bool SF > // Symmetry flag
636 inline bool isDefault( const Row<MT,SO,DF,SF>& row )
637 {
638  for( size_t i=0UL; i<row.size(); ++i )
639  if( !isDefault<RF>( row[i] ) ) return false;
640  return true;
641 }
642 //*************************************************************************************************
643 
644 
645 //*************************************************************************************************
664 template< bool RF // Relaxation flag
665  , typename MT // Type of the sparse matrix
666  , bool SO // Storage order
667  , bool SF > // Symmetry flag
668 inline bool isDefault( const Row<MT,SO,false,SF>& row )
669 {
671 
672  const ConstIterator end( row.end() );
673  for( ConstIterator element=row.begin(); element!=end; ++element )
674  if( !isDefault<RF>( element->value() ) ) return false;
675  return true;
676 }
678 //*************************************************************************************************
679 
680 
681 //*************************************************************************************************
698 template< typename MT // Type of the matrix
699  , bool SO // Storage order
700  , bool DF // Density flag
701  , bool SF > // Symmetry flag
702 inline bool isIntact( const Row<MT,SO,DF,SF>& row ) noexcept
703 {
704  return ( row.row_ <= row.matrix_.rows() &&
705  isIntact( row.matrix_ ) );
706 }
707 //*************************************************************************************************
708 
709 
710 //*************************************************************************************************
722 template< typename MT // Type of the matrix
723  , bool SO // Storage order
724  , bool DF // Density flag
725  , bool SF > // Symmetry flag
726 inline bool isSame( const Row<MT,SO,DF,SF>& a, const Row<MT,SO,DF,SF>& b ) noexcept
727 {
728  return ( isSame( a.matrix_, b.matrix_ ) && ( a.row_ == b.row_ ) );
729 }
730 //*************************************************************************************************
731 
732 
733 //*************************************************************************************************
748 template< typename MT // Type of the matrix
749  , bool SO // Storage order
750  , bool DF // Density flag
751  , bool SF // Symmetry flag
752  , typename VT > // Type of the right-hand side vector
753 inline bool tryAssign( const Row<MT,SO,DF,SF>& lhs, const Vector<VT,true>& rhs, size_t index )
754 {
755  BLAZE_INTERNAL_ASSERT( index <= lhs.size(), "Invalid vector access index" );
756  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.size() - index, "Invalid vector size" );
757 
758  return tryAssign( lhs.matrix_, ~rhs, lhs.row_, index );
759 }
761 //*************************************************************************************************
762 
763 
764 //*************************************************************************************************
779 template< typename MT // Type of the matrix
780  , bool SO // Storage order
781  , bool DF // Density flag
782  , bool SF // Symmetry flag
783  , typename VT > // Type of the right-hand side vector
784 inline bool tryAddAssign( const Row<MT,SO,DF,SF>& lhs, const Vector<VT,true>& rhs, size_t index )
785 {
786  BLAZE_INTERNAL_ASSERT( index <= lhs.size(), "Invalid vector access index" );
787  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.size() - index, "Invalid vector size" );
788 
789  return tryAddAssign( lhs.matrix_, ~rhs, lhs.row_, index );
790 }
792 //*************************************************************************************************
793 
794 
795 //*************************************************************************************************
810 template< typename MT // Type of the matrix
811  , bool SO // Storage order
812  , bool DF // Density flag
813  , bool SF // Symmetry flag
814  , typename VT > // Type of the right-hand side vector
815 inline bool trySubAssign( const Row<MT,SO,DF,SF>& lhs, const Vector<VT,true>& rhs, size_t index )
816 {
817  BLAZE_INTERNAL_ASSERT( index <= lhs.size(), "Invalid vector access index" );
818  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.size() - index, "Invalid vector size" );
819 
820  return trySubAssign( lhs.matrix_, ~rhs, lhs.row_, index );
821 }
823 //*************************************************************************************************
824 
825 
826 //*************************************************************************************************
841 template< typename MT // Type of the matrix
842  , bool SO // Storage order
843  , bool DF // Density flag
844  , bool SF // Symmetry flag
845  , typename VT > // Type of the right-hand side vector
846 inline bool tryMultAssign( const Row<MT,SO,DF,SF>& lhs, const Vector<VT,true>& rhs, size_t index )
847 {
848  BLAZE_INTERNAL_ASSERT( index <= lhs.size(), "Invalid vector access index" );
849  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.size() - index, "Invalid vector size" );
850 
851  return tryMultAssign( lhs.matrix_, ~rhs, lhs.row_, index );
852 }
854 //*************************************************************************************************
855 
856 
857 //*************************************************************************************************
872 template< typename MT // Type of the matrix
873  , bool SO // Storage order
874  , bool DF // Density flag
875  , bool SF // Symmetry flag
876  , typename VT > // Type of the right-hand side vector
877 inline bool tryDivAssign( const Row<MT,SO,DF,SF>& lhs, const Vector<VT,true>& rhs, size_t index )
878 {
879  BLAZE_INTERNAL_ASSERT( index <= lhs.size(), "Invalid vector access index" );
880  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.size() - index, "Invalid vector size" );
881 
882  return tryDivAssign( lhs.matrix_, ~rhs, lhs.row_, index );
883 }
885 //*************************************************************************************************
886 
887 
888 //*************************************************************************************************
903 template< typename MT // Type of the matrix
904  , bool SO // Storage order
905  , bool DF // Density flag
906  , bool SF > // Symmetry flag
907 inline DerestrictTrait_< Row<MT,SO,DF,SF> > derestrict( Row<MT,SO,DF,SF>& row )
908 {
910  return ReturnType( derestrict( row.matrix_ ), row.row_ );
911 }
913 //*************************************************************************************************
914 
915 
916 
917 
918 //=================================================================================================
919 //
920 // ISRESTRICTED SPECIALIZATIONS
921 //
922 //=================================================================================================
923 
924 //*************************************************************************************************
926 template< typename MT, bool SO, bool DF, bool SF >
927 struct IsRestricted< Row<MT,SO,DF,SF> >
928  : public BoolConstant< IsRestricted<MT>::value >
929 {};
931 //*************************************************************************************************
932 
933 
934 
935 
936 //=================================================================================================
937 //
938 // DERESTRICTTRAIT SPECIALIZATIONS
939 //
940 //=================================================================================================
941 
942 //*************************************************************************************************
944 template< typename MT, bool SO, bool DF, bool SF >
945 struct DerestrictTrait< Row<MT,SO,DF,SF> >
946 {
948 };
950 //*************************************************************************************************
951 
952 
953 
954 
955 //=================================================================================================
956 //
957 // HASCONSTDATAACCESS SPECIALIZATIONS
958 //
959 //=================================================================================================
960 
961 //*************************************************************************************************
963 template< typename MT, bool SO, bool SF >
964 struct HasConstDataAccess< Row<MT,SO,true,SF> >
965  : public BoolConstant< HasConstDataAccess<MT>::value >
966 {};
968 //*************************************************************************************************
969 
970 
971 
972 
973 //=================================================================================================
974 //
975 // HASMUTABLEDATAACCESS SPECIALIZATIONS
976 //
977 //=================================================================================================
978 
979 //*************************************************************************************************
981 template< typename MT, bool SO, bool SF >
982 struct HasMutableDataAccess< Row<MT,SO,true,SF> >
983  : public BoolConstant< HasMutableDataAccess<MT>::value >
984 {};
986 //*************************************************************************************************
987 
988 
989 
990 
991 //=================================================================================================
992 //
993 // ISALIGNED SPECIALIZATIONS
994 //
995 //=================================================================================================
996 
997 //*************************************************************************************************
999 template< typename MT, bool SO, bool SF >
1000 struct IsAligned< Row<MT,SO,true,SF> >
1001  : public BoolConstant< And< IsAligned<MT>, Or< IsRowMajorMatrix<MT>, IsSymmetric<MT> > >::value >
1002 {};
1004 //*************************************************************************************************
1005 
1006 
1007 
1008 
1009 //=================================================================================================
1010 //
1011 // ISPADDED SPECIALIZATIONS
1012 //
1013 //=================================================================================================
1014 
1015 //*************************************************************************************************
1017 template< typename MT, bool SO, bool SF >
1018 struct IsPadded< Row<MT,SO,true,SF> >
1019  : public BoolConstant< And< IsPadded<MT>, Or< IsRowMajorMatrix<MT>, IsSymmetric<MT> > >::value >
1020 {};
1022 //*************************************************************************************************
1023 
1024 
1025 
1026 
1027 //=================================================================================================
1028 //
1029 // ISOPPOSEDVIEW SPECIALIZATIONS
1030 //
1031 //=================================================================================================
1032 
1033 //*************************************************************************************************
1035 template< typename MT, bool DF >
1036 struct IsOpposedView< Row<MT,false,DF,false> >
1037  : public TrueType
1038 {};
1040 //*************************************************************************************************
1041 
1042 
1043 
1044 
1045 //=================================================================================================
1046 //
1047 // ADDTRAIT SPECIALIZATIONS
1048 //
1049 //=================================================================================================
1050 
1051 //*************************************************************************************************
1053 template< typename MT, bool SO, bool DF, bool SF, typename T >
1054 struct AddTrait< Row<MT,SO,DF,SF>, T >
1055 {
1056  using Type = AddTrait_< RowTrait_<MT>, T >;
1057 };
1058 
1059 template< typename T, typename MT, bool SO, bool DF, bool SF >
1060 struct AddTrait< T, Row<MT,SO,DF,SF> >
1061 {
1062  using Type = AddTrait_< T, RowTrait_<MT> >;
1063 };
1065 //*************************************************************************************************
1066 
1067 
1068 
1069 
1070 //=================================================================================================
1071 //
1072 // SUBTRAIT SPECIALIZATIONS
1073 //
1074 //=================================================================================================
1075 
1076 //*************************************************************************************************
1078 template< typename MT, bool SO, bool DF, bool SF, typename T >
1079 struct SubTrait< Row<MT,SO,DF,SF>, T >
1080 {
1081  using Type = SubTrait_< RowTrait_<MT>, T >;
1082 };
1083 
1084 template< typename T, typename MT, bool SO, bool DF, bool SF >
1085 struct SubTrait< T, Row<MT,SO,DF,SF> >
1086 {
1087  using Type = SubTrait_< T, RowTrait_<MT> >;
1088 };
1090 //*************************************************************************************************
1091 
1092 
1093 
1094 
1095 //=================================================================================================
1096 //
1097 // MULTTRAIT SPECIALIZATIONS
1098 //
1099 //=================================================================================================
1100 
1101 //*************************************************************************************************
1103 template< typename MT, bool SO, bool DF, bool SF, typename T >
1104 struct MultTrait< Row<MT,SO,DF,SF>, T >
1105 {
1106  using Type = MultTrait_< RowTrait_<MT>, T >;
1107 };
1108 
1109 template< typename T, typename MT, bool SO, bool DF, bool SF >
1110 struct MultTrait< T, Row<MT,SO,DF,SF> >
1111 {
1112  using Type = MultTrait_< T, RowTrait_<MT> >;
1113 };
1115 //*************************************************************************************************
1116 
1117 
1118 
1119 
1120 //=================================================================================================
1121 //
1122 // CROSSTRAIT SPECIALIZATIONS
1123 //
1124 //=================================================================================================
1125 
1126 //*************************************************************************************************
1128 template< typename MT, bool SO, bool DF, bool SF, typename T >
1129 struct CrossTrait< Row<MT,SO,DF,SF>, T >
1130 {
1131  using Type = CrossTrait_< RowTrait_<MT>, T >;
1132 };
1133 
1134 template< typename T, typename MT, bool SO, bool DF, bool SF >
1135 struct CrossTrait< T, Row<MT,SO,DF,SF> >
1136 {
1137  using Type = CrossTrait_< T, RowTrait_<MT> >;
1138 };
1140 //*************************************************************************************************
1141 
1142 
1143 
1144 
1145 //=================================================================================================
1146 //
1147 // DIVTRAIT SPECIALIZATIONS
1148 //
1149 //=================================================================================================
1150 
1151 //*************************************************************************************************
1153 template< typename MT, bool SO, bool DF, bool SF, typename T >
1154 struct DivTrait< Row<MT,SO,DF,SF>, T >
1155 {
1156  using Type = DivTrait_< RowTrait_<MT>, T >;
1157 };
1158 
1159 template< typename T, typename MT, bool SO, bool DF, bool SF >
1160 struct DivTrait< T, Row<MT,SO,DF,SF> >
1161 {
1162  using Type = DivTrait_< T, RowTrait_<MT> >;
1163 };
1165 //*************************************************************************************************
1166 
1167 
1168 
1169 
1170 //=================================================================================================
1171 //
1172 // SUBVECTORTRAIT SPECIALIZATIONS
1173 //
1174 //=================================================================================================
1175 
1176 //*************************************************************************************************
1178 template< typename MT, bool SO, bool DF, bool SF >
1179 struct SubvectorTrait< Row<MT,SO,DF,SF> >
1180 {
1182 };
1184 //*************************************************************************************************
1185 
1186 } // namespace blaze
1187 
1188 #endif
typename DerestrictTrait< T >::Type DerestrictTrait_
Auxiliary alias declaration for the DerestrictTrait type trait.The DerestrictTrait_ alias declaration...
Definition: DerestrictTrait.h:110
Compile time check for low-level access to constant data.This type trait tests whether the given data...
Definition: HasConstDataAccess.h:75
Header file for the subtraction trait.
BLAZE_ALWAYS_INLINE bool isSame(const Matrix< MT1, SO1 > &a, const Matrix< MT2, SO2 > &b) noexcept
Returns whether the two given matrices represent the same observable state.
Definition: Matrix.h:721
Header file for basic type definitions.
Header file for the row trait.
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector) noexcept
Returns the current size/dimension of the vector.
Definition: Vector.h:261
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
Compile time check for resizable data types.This type trait tests whether the given data type is an o...
Definition: IsOpposedView.h:81
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:533
Row specialization for dense matrices.
Header file for the And class template.
Header file for the IsTransExpr type trait class.
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:721
typename MultTrait< T1, T2 >::Type MultTrait_
Auxiliary alias declaration for the MultTrait class template.The MultTrait_ alias declaration provide...
Definition: MultTrait.h:245
Row specialization for sparse matrices.
Header file for the IsMatMatAddExpr type trait class.
Base template for the CrossTrait class.
Definition: CrossTrait.h:110
Compile time check for data types with restricted data access.This type trait tests whether the given...
Definition: IsRestricted.h:82
Base template for the SubvectorTrait class.
Definition: SubvectorTrait.h:120
Header file for the IsMatTransExpr type trait class.
Compile time check for low-level access to mutable data.This type trait tests whether the given data ...
Definition: HasMutableDataAccess.h:75
Compile time check for the alignment of data types.This type trait tests whether the given data type ...
Definition: IsAligned.h:87
Header file for the DisableIf class template.
typename RowExprTrait< MT >::Type RowExprTrait_
Auxiliary alias declaration for the RowExprTrait type trait.The RowExprTrait_ alias declaration provi...
Definition: RowExprTrait.h:134
Header file for the implementation of the Row base template.
Header file for the multiplication trait.
Header file for the IsSymmetric type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the IsVecTVecMultExpr type trait class.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2939
Compile time check for data types with padding.This type trait tests whether the given data type empl...
Definition: IsPadded.h:76
Header file for the Or class template.
Header file for the IsMatMatMultExpr type trait class.
typename SubvectorTrait< VT >::Type SubvectorTrait_
Auxiliary alias declaration for the SubvectorTrait type trait.The SubvectorTrait_ alias declaration p...
Definition: SubvectorTrait.h:155
const DMatForEachExpr< MT, OP, SO > forEach(const DenseMatrix< MT, SO > &dm, OP op)
Evaluates the given custom operation on each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1046
Header file for the IsMatSerialExpr type trait class.
Header file for the IsMatScalarMultExpr type trait class.
Header file for the subvector trait.
Header file for the IsAligned type trait.
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT >, IsDeclExpr< MT > >, RowExprTrait_< MT > > row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:128
Header file for the IsOpposedView type trait.
Header file for the IsMatEvalExpr type trait class.
typename CrossTrait< T1, T2 >::Type CrossTrait_
Auxiliary alias declaration for the CrossTrait class template.The CrossTrait_ alias declaration provi...
Definition: CrossTrait.h:135
BLAZE_ALWAYS_INLINE MT::Iterator end(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:260
Header file for the RowExprTrait class template.
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT >, IsDeclExpr< MT > >, ColumnExprTrait_< MT > > column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:128
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:553
typename DivTrait< T1, T2 >::Type DivTrait_
Auxiliary alias declaration for the DivTrait class template.The DivTrait_ alias declaration provides ...
Definition: DivTrait.h:245
Reference to a specific row of a dense or sparse matrix.The Row template represents a reference to a ...
Definition: Forward.h:48
Header file for the HasConstDataAccess type trait.
Header file for the Matrix base class.
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2934
Base template for the AddTrait class.
Definition: AddTrait.h:143
Header file for the IsMatScalarDivExpr type trait class.
Base template for the MultTrait class.
Definition: MultTrait.h:143
Header file for the addition trait.
Header file for the cross product trait.
Header file for the division trait.
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:93
Base class for matrices.The Matrix class is a base class for all dense and sparse matrix classes with...
Definition: Forward.h:94
Header file for the HasMutableDataAccess type trait.
const DMatEvalExpr< MT, SO > eval(const DenseMatrix< MT, SO > &dm)
Forces the evaluation of the given dense matrix expression dm.
Definition: DMatEvalExpr.h:703
Header file for the IsMatMatSubExpr type trait class.
Evaluation of the return type of the derestrict function.Via this type trait it is possible to evalua...
Definition: DerestrictTrait.h:73
Header file for the IsDeclExpr type trait class.
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:223
Base template for the DivTrait class.
Definition: DivTrait.h:143
typename T::ConstIterator ConstIterator_
Alias declaration for nested ConstIterator type definitions.The ConstIterator_ alias declaration prov...
Definition: Aliases.h:103
Header file for the IsRowMajorMatrix type trait.
Base class for N-dimensional vectors.The Vector class is a base class for all arbitrarily sized (N-di...
Definition: Forward.h:164
const DMatTransExpr< MT,!SO > trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:733
Header file for the IsComputation type trait class.
typename SubTrait< T1, T2 >::Type SubTrait_
Auxiliary alias declaration for the SubTrait class template.The SubTrait_ alias declaration provides ...
Definition: SubTrait.h:245
Header file for the IntegralConstant class template.
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:249
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:573
Base template for the SubTrait class.
Definition: SubTrait.h:143
Header file for the IsMatForEachExpr type trait class.
typename AddTrait< T1, T2 >::Type AddTrait_
Auxiliary alias declaration for the AddTrait class template.The AddTrait_ alias declaration provides ...
Definition: AddTrait.h:245
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
Header file for the TrueType type/value trait base class.
Header file for the function trace functionality.