20#ifndef _vctDynamicMatrixBase_h
21#define _vctDynamicMatrixBase_h
41template <
class _matrixOwnerType,
typename _elementType>
78 return this->
Matrix.begin();
90 return this->
Matrix.rbegin();
96 return this->
Matrix.rend();
143 pointer
Pointer(size_type rowIndex, size_type colIndex) {
144 return this->
Matrix.Pointer(rowIndex, colIndex);
151 return this->
Matrix.Pointer();
155 const_pointer
Pointer(size_type rowIndex, size_type colIndex)
const {
173 return (
begin())[index];
187 reference
at(size_type rowIndex, size_type colIndex)
CISST_THROW(std::out_of_range) {
189 return *(
Pointer(rowIndex, colIndex));
193 const_reference
at(size_type rowIndex, size_type colIndex)
const CISST_THROW(std::out_of_range) {
200 return this->
at(rowIndex, colIndex);
214 reference
Element(size_type rowIndex, size_type colIndex) {
215 return *(
Pointer(rowIndex, colIndex));
219 const_reference
Element(size_type rowIndex, size_type colIndex)
const {
263 cmnThrow(std::runtime_error(
"vctDynamicMatrix: RowPointers requires compact rows"));
265 const size_type
rows = this->rows();
267 rowPointers.SetSize(
rows);
269 for (index = 0; index <
rows; ++index) {
270 rowPointers[index] = this->
Row(index).Pointer();
278 return BaseType::Row(index);
283 return BaseType::Column(index);
288 return BaseType::Diagonal();
293 return BaseType::RowPointers(rowPointers);
302 const size_type startRow = 0,
const size_type startCol = 0)
CISST_THROW(
std::out_of_range) {
303 if (((startRow +
rows) > this->rows())
304 || ((startCol +
cols) > this->cols())) {
305 cmnThrow(std::out_of_range(
"vctDynamicMatrixBase::Ref: reference is out of range"));
314 const size_type startRow = 0,
const size_type startCol = 0) const
CISST_THROW(
std::out_of_range) {
315 return BaseType::Ref(
rows,
cols, startRow, startCol);
321 void ExchangeRows(
const size_type row1Index,
const size_type row2Index) {
324 row1.SwapElementsWith(row2);
331 col1.SwapElementsWith(col2);
336 template <
class __inputMatrixOwnerType,
class __indexVectorOwnerType>
341 Run(*
this, inputMatrix, rowIndexVector);
345 template <
class __inputMatrixOwnerType,
class __indexVectorOwnerType>
349 this->
TransposeRef().SelectRowsFrom(inputMatrix.TransposeRef(), colIndexVector);
366 template <
class __matrixOwnerType>
368 const index_type permutedRowIndexes[])
370 const size_type numRows = this->
rows();
371 size_type thisRowIndex;
372 for (thisRowIndex = 0; thisRowIndex < numRows; ++thisRowIndex) {
373 Row(thisRowIndex).Assign( inputMatrix.Row(permutedRowIndexes[thisRowIndex]) );
390 template <
class __matrixOwnerType>
392 const index_type permutedRowIndexes[])
394 const size_type numRows = this->
rows();
395 size_type thisRowIndex;
396 for (thisRowIndex = 0; thisRowIndex < numRows; ++thisRowIndex) {
397 Row(permutedRowIndexes[thisRowIndex]).Assign( inputMatrix.Row(thisRowIndex) );
413 template <
class __matrixOwnerType>
415 const index_type permutedColumnIndexes[])
417 const size_type numCols = this->
cols();
418 size_type thisColumnIndex;
419 for (thisColumnIndex = 0; thisColumnIndex < numCols; ++thisColumnIndex) {
420 Column(thisColumnIndex).Assign( inputMatrix.Column(permutedColumnIndexes[thisColumnIndex]) );
436 template <
class __matrixOwnerType>
438 const index_type permutedColumnIndexes[])
440 const size_type numCols = this->
cols();
441 size_type thisColumnIndex;
442 for (thisColumnIndex = 0; thisColumnIndex < numCols; ++thisColumnIndex) {
443 Column(permutedColumnIndexes[thisColumnIndex]).Assign( inputMatrix.Column(thisColumnIndex) );
453 vctDynamicMatrixLoopEngines::
454 MioSi<typename vctStoreBackBinaryOperations<value_type>::SecondOperand>::
475 const stride_type rowStride = this->
row_stride();
476 pointer currentPointer = this->
Pointer();
477 const pointer endPointer = currentPointer + this->
rows() * rowStride;
479 currentPointer != endPointer;
480 currentPointer += rowStride) {
481 memset(currentPointer, 0, sizeOfRow);
487 const stride_type colStride = this->
col_stride();
488 pointer currentPointer = this->
Pointer();
489 const pointer endPointer = currentPointer + this->
cols() * colStride;
491 currentPointer != endPointer;
492 currentPointer += colStride) {
493 memset(currentPointer, 0, sizeOfCol);
508 template <
class __matrixOwnerType>
513 vctDynamicMatrixLoopEngines::
515 typename __matrixOwnerType::value_type>::Identity>::
529 template <
class __matrixOwnerType,
typename __elementType>
531 vctDynamicMatrixLoopEngines::
533 typename __matrixOwnerType::value_type>::Identity>::
538 template <
class __matrixOwnerType,
typename __elementType>
540 return this->
Assign(other);
543 template <size_type __rows, size_type __cols,
544 stride_type __rowStride, stride_type __colStride,
545 class __elementType,
class __dataPtrType>
548 vctDynamicMatrixLoopEngines::
549 MoMi<typename vctUnaryOperations<value_type, __elementType>::Identity>::
579 template <
class __matrixOwnerType,
typename __elementType>
581 return this->
Assign(other);
584 template <size_type __rows, size_type __cols,
585 stride_type __rowStride, stride_type __colStride,
586 class __elementType,
class __dataPtrType>
588 __rowStride, __colStride,
589 __elementType, __dataPtrType> & other) {
590 return this->
Assign(other);
677 template <
class __matrixOwnerType>
685 template <
size_type __rows,
size_type __cols, str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
721 const difference_type inputRowStride = (inputIsRowMajor) ? this->
cols() : 1;
722 const difference_type inputColStride = (inputIsRowMajor) ? 1 : this->
rows();
724 inputRowStride, inputColStride, elements );
752 va_start(nextArg, element0);
753 for (; iter !=
end(); ++iter) {
771 return BaseType::TransposeRef();
790 template <
class __matrixOwnerType1,
class __matrixOwnerType2>
793 vctDynamicMatrixLoopEngines::
794 MoMiMi< typename vctBinaryOperations<value_type>::Addition >
795 ::Run(*
this, matrix1, matrix2);
800 template <
class __matrixOwnerType1,
class __matrixOwnerType2>
803 vctDynamicMatrixLoopEngines::
804 MoMiMi< typename vctBinaryOperations<value_type>::Subtraction >
805 ::Run(*
this, matrix1, matrix2);
810 template <
class __matrixOwnerType1,
class __matrixOwnerType2>
813 vctDynamicMatrixLoopEngines::
814 MoMiMi< typename vctBinaryOperations<value_type>::Multiplication >
815 ::Run(*
this, matrix1, matrix2);
820 template <
class __matrixOwnerType1,
class __matrixOwnerType2>
823 vctDynamicMatrixLoopEngines::
824 MoMiMi< typename vctBinaryOperations<value_type>::Division >
825 ::Run(*
this, matrix1, matrix2);
830 template <
class __matrixOwnerType1,
class __matrixOwnerType2>
833 vctDynamicMatrixLoopEngines::
834 MoMiMi< typename vctBinaryOperations<value_type>::Minimum >
835 ::Run(*
this, matrix1, matrix2);
840 template <
class __matrixOwnerType1,
class __matrixOwnerType2>
843 vctDynamicMatrixLoopEngines::
844 MoMiMi< typename vctBinaryOperations<value_type>::Maximum >
845 ::Run(*
this, matrix1, matrix2);
868 template <
class __matrixOwnerType>
870 vctDynamicMatrixLoopEngines::
871 MioMi<typename vctStoreBackBinaryOperations<value_type>::Addition >::
872 Run(*
this, otherMatrix);
877 template <
class __matrixOwnerType>
879 vctDynamicMatrixLoopEngines::
880 MioMi< typename vctStoreBackBinaryOperations<value_type>::Subtraction >::
881 Run(*
this, otherMatrix);
886 template <
class __matrixOwnerType>
888 vctDynamicMatrixLoopEngines::
889 MioMi< typename vctStoreBackBinaryOperations<value_type>::Multiplication >::
890 Run(*
this, otherMatrix);
895 template <
class __matrixOwnerType>
897 vctDynamicMatrixLoopEngines::
898 MioMi< typename vctStoreBackBinaryOperations<value_type>::Division >::
899 Run(*
this, otherMatrix);
904 template <
class __matrixOwnerType>
906 vctDynamicMatrixLoopEngines::
907 MioMi< typename vctStoreBackBinaryOperations<value_type>::Minimum >::
908 Run(*
this, otherMatrix);
913 template <
class __matrixOwnerType>
915 vctDynamicMatrixLoopEngines::
916 MioMi< typename vctStoreBackBinaryOperations<value_type>::Maximum >::
917 Run(*
this, otherMatrix);
922 template <
class __matrixOwnerType>
924 return this->
Add(otherMatrix);
928 template <
class __matrixOwnerType>
950 template <
class __matrixOwnerType>
953 vctDynamicMatrixLoopEngines::
954 MoMiSi< typename vctBinaryOperations<value_type>::Addition >::
955 Run(*
this, matrix, scalar);
960 template <
class __matrixOwnerType>
963 vctDynamicMatrixLoopEngines::
964 MoMiSi< typename vctBinaryOperations<value_type>::Subtraction >::
965 Run(*
this, matrix, scalar);
970 template <
class __matrixOwnerType>
973 vctDynamicMatrixLoopEngines::
974 MoMiSi< typename vctBinaryOperations<value_type>::Multiplication >::
975 Run(*
this, matrix, scalar);
980 template <
class __matrixOwnerType>
983 vctDynamicMatrixLoopEngines::
984 MoMiSi< typename vctBinaryOperations<value_type>::Division >::
985 Run(*
this, matrix, scalar);
990 template <
class __matrixOwnerType>
993 vctDynamicMatrixLoopEngines::
994 MoMiSi<typename vctBinaryOperations<value_type>::Minimum>::
995 Run(*
this, matrix, lowerBound);
1000 template <
class __matrixOwnerType>
1003 vctDynamicMatrixLoopEngines::
1004 MoMiSi< typename vctBinaryOperations<value_type>::Maximum >::
1005 Run(*
this, matrix, upperBound);
1027 template <
class __matrixOwnerType>
1030 vctDynamicMatrixLoopEngines::
1031 MoSiMi< typename vctBinaryOperations<value_type>::Addition >::
1032 Run(*
this, scalar, matrix);
1037 template <
class __matrixOwnerType>
1040 vctDynamicMatrixLoopEngines::
1041 MoSiMi< typename vctBinaryOperations<value_type>::Subtraction >::
1042 Run(*
this, scalar, matrix);
1047 template <
class __matrixOwnerType>
1050 vctDynamicMatrixLoopEngines::
1051 MoSiMi< typename vctBinaryOperations<value_type>::Multiplication >::
1052 Run(*
this, scalar, matrix);
1057 template <
class __matrixOwnerType>
1060 vctDynamicMatrixLoopEngines::
1061 MoSiMi< typename vctBinaryOperations<value_type>::Division >::
1062 Run(*
this, scalar, matrix);
1067 template <
class __matrixOwnerType>
1070 vctDynamicMatrixLoopEngines::
1071 MoSiMi< typename vctBinaryOperations<value_type>::Minimum >::
1072 Run(*
this, upperBound, matrix);
1077 template <
class __matrixOwnerType>
1080 vctDynamicMatrixLoopEngines::
1081 MoSiMi< typename vctBinaryOperations<value_type>::Maximum >::
1082 Run(*
this, lowerBound, matrix);
1105 vctDynamicMatrixLoopEngines::
1106 MioSi< typename vctStoreBackBinaryOperations<value_type>::Addition >::
1113 vctDynamicMatrixLoopEngines::
1114 MioSi< typename vctStoreBackBinaryOperations<value_type>::Subtraction >::
1121 vctDynamicMatrixLoopEngines::
1122 MioSi< typename vctStoreBackBinaryOperations<value_type>::Multiplication >::
1129 vctDynamicMatrixLoopEngines::
1130 MioSi< typename vctStoreBackBinaryOperations<value_type>::Division >::
1137 vctDynamicMatrixLoopEngines::
1138 MioSi< typename vctStoreBackBinaryOperations<value_type>::Minimum >::
1139 Run(*
this, upperBound);
1145 vctDynamicMatrixLoopEngines::
1146 MioSi< typename vctStoreBackBinaryOperations<value_type>::Maximum >::
1147 Run(*
this, lowerBound);
1153 return this->
Add(scalar);
1168 return this->
Divide(scalar);
1173 template <
class __matrixOwnerType>
1177 vctDynamicMatrixLoopEngines::
1181 Run(*
this, scalar, otherMatrix);
1186 template <
class __matrixOwnerType1,
class __matrixOwnerType2>
1190 vctDynamicMatrixLoopEngines::
1194 Run(*
this, matrix1, matrix2);
1212 template <
class __matrixOwnerType>
1214 vctDynamicMatrixLoopEngines::
1215 MoMi<typename vctUnaryOperations<value_type>::AbsValue>::
1216 Run(*
this, otherMatrix);
1221 template <
class __matrixOwnerType>
1223 vctDynamicMatrixLoopEngines::
1224 MoMi<typename vctUnaryOperations<value_type>::Negation>::
1225 Run(*
this, otherMatrix);
1230 template <
class __matrixOwnerType>
1232 vctDynamicMatrixLoopEngines::
1233 MoMi<typename vctUnaryOperations<value_type>::Floor>::
1234 Run(*
this, otherMatrix);
1239 template <
class __matrixOwnerType>
1241 vctDynamicMatrixLoopEngines::
1242 MoMi<typename vctUnaryOperations<value_type>::Ceil>::
1243 Run(*
this, otherMatrix);
1247 template <
class __matrixOwnerType>
1249 Assign(otherMatrix.TransposeRef());
1266 vctDynamicMatrixLoopEngines::
1267 Mio<typename vctStoreBackUnaryOperations<value_type>::MakeAbs>::
1274 vctDynamicMatrixLoopEngines::
1275 Mio<typename vctStoreBackUnaryOperations<value_type>::MakeNegation>::
1282 vctDynamicMatrixLoopEngines::
1283 Mio<typename vctStoreBackUnaryOperations<value_type>::MakeFloor>::
1290 vctDynamicMatrixLoopEngines::
1291 Mio<typename vctStoreBackUnaryOperations<value_type>::MakeCeil>::
1306 template <
class __matrixOwnerType1,
class __matrixOwnerType2>
1311 typedef typename Input1MatrixType::ConstRowRefType Input1RowRefType;
1312 typedef typename Input2MatrixType::ConstColumnRefType Input2ColumnRefType;
1313 vctDynamicMatrixLoopEngines::
1314 Product<typename vctBinaryOperations<value_type, Input1RowRefType, Input2ColumnRefType>::DotProduct>::
1315 Run((*
this), matrix1, matrix2);
1321 template <
class __vectorOwnerType1,
class __vectorOwnerType2>
1326 colMatrix.
SetRef(colVector.size(), 1, colVector.stride(), 1, colVector.Pointer(0));
1327 rowMatrix.
SetRef(1, rowVector.size(), 1, rowVector.stride(), rowVector.Pointer(0));
cmnVaArgPromotion< _elementType >::Type VaArgPromotion
Definition cmnTypeTraits.h:167
Returns the product of the two InputType object.
Definition vctBinaryOperations.h:116
Definition vctForwardDeclarations.h:145
Dynamic matrix referencing existing memory (const).
Definition vctDynamicConstMatrixRef.h:81
void SetRef(size_type rows, size_type cols, stride_type rowStride, stride_type colStride, pointer dataPointer)
Definition vctDynamicConstMatrixRef.h:248
Definition vctForwardDeclarations.h:119
Definition vctDynamicMatrixBase.h:1352
vctDynamicMatrixRef< value_type > Type
Definition vctDynamicMatrixBase.h:1354
Definition vctDynamicMatrixBase.h:43
ConstRefTransposeType TransposeRef(void) const
Definition vctDynamicMatrixBase.h:770
ThisType & Assign(const vctFixedSizeConstMatrixBase< __rows, __cols, __rowStride, __colStride, __elementType, __dataPtrType > &other)
Definition vctDynamicMatrixBase.h:546
void SelectColsFrom(const vctDynamicConstMatrixBase< __inputMatrixOwnerType, _elementType > &inputMatrix, const vctDynamicConstVectorBase< __indexVectorOwnerType, index_type > &colIndexVector)
Definition vctDynamicMatrixBase.h:346
DiagonalRefType Diagonal(void)
Definition vctDynamicMatrixBase.h:239
vctDynamicMatrixRef< _elementType > Ref(const size_type rows, const size_type cols, const size_type startRow=0, const size_type startCol=0) CISST_THROW(std
Definition vctDynamicMatrixBase.h:301
const_pointer Pointer(void) const
Definition vctDynamicMatrixBase.h:160
ThisType & operator*=(const value_type scalar)
Definition vctDynamicMatrixBase.h:1162
pointer Pointer(size_type rowIndex, size_type colIndex)
Definition vctDynamicMatrixBase.h:143
ThisType & Multiply(const value_type scalar)
Definition vctDynamicMatrixBase.h:1120
ThisType & FloorSelf(void)
Definition vctDynamicMatrixBase.h:1281
BaseType::RefTransposeType RefTransposeType
Definition vctDynamicMatrixBase.h:69
_matrixOwnerType OwnerType
Definition vctDynamicMatrixBase.h:52
OwnerType & Owner(void)
Definition vctDynamicMatrixBase.h:135
ThisType & AbsSelf(void)
Definition vctDynamicMatrixBase.h:1265
ThisType & Assign(const vctDynamicConstMatrixBase< __matrixOwnerType, value_type > &other)
Definition vctDynamicMatrixBase.h:509
RowRefType Row(size_type index) CISST_THROW(std
Definition vctDynamicMatrixBase.h:227
ThisType & Assign(const value_type *elements, bool inputIsRowMajor=true)
Definition vctDynamicMatrixBase.h:716
ThisType & Add(const value_type scalar)
Definition vctDynamicMatrixBase.h:1104
ThisType & operator/=(const value_type scalar)
Definition vctDynamicMatrixBase.h:1167
BaseType::ConstRefTransposeType ConstRefTransposeType
Definition vctDynamicMatrixBase.h:68
ThisType & operator-=(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
Definition vctDynamicMatrixBase.h:929
ThisType & TransposeOf(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
Definition vctDynamicMatrixBase.h:1248
BaseType::RowRefType RowRefType
Definition vctDynamicMatrixBase.h:60
ThisType & ElementwiseMin(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
Definition vctDynamicMatrixBase.h:905
void RowInversePermutationOf(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &inputMatrix, const index_type permutedRowIndexes[])
Definition vctDynamicMatrixBase.h:391
void ProductOf(const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2)
Definition vctDynamicMatrixBase.h:1307
ConstRowRefType Row(size_type index) const CISST_THROW(std
Definition vctDynamicMatrixBase.h:277
ThisType & ForceAssign(const vctDynamicConstMatrixBase< __matrixOwnerType, __elementType > &other)
Definition vctDynamicMatrixBase.h:580
ThisType & Divide(const value_type scalar)
Definition vctDynamicMatrixBase.h:1128
ThisType & DifferenceOf(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix, const value_type scalar)
Definition vctDynamicMatrixBase.h:961
reverse_iterator rend(void)
Definition vctDynamicMatrixBase.h:95
ThisType & DifferenceOf(const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2)
Definition vctDynamicMatrixBase.h:801
ThisType & Assign(const value_type element0,...)
Definition vctDynamicMatrixBase.h:746
ThisType & operator+=(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
Definition vctDynamicMatrixBase.h:923
VectorPointerType & RowPointers(VectorPointerType &rowPointers) CISST_THROW(std
Definition vctDynamicMatrixBase.h:261
const_reverse_iterator rbegin(void) const
Definition vctDynamicMatrixBase.h:110
ThisType & Add(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
Definition vctDynamicMatrixBase.h:869
BaseType::reverse_iterator reverse_iterator
Definition vctDynamicMatrixBase.h:55
ThisType & DifferenceOf(const value_type scalar, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix)
Definition vctDynamicMatrixBase.h:1038
RowRefType operator[](size_type index)
Definition vctDynamicMatrixBase.h:121
reference at(size_type index) CISST_THROW(std
Definition vctDynamicMatrixBase.h:171
BaseType::VectorPointerType VectorPointerType
Definition vctDynamicMatrixBase.h:72
BaseType::DiagonalRefType DiagonalRefType
Definition vctDynamicMatrixBase.h:66
ThisType & ElementwiseDivide(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
Definition vctDynamicMatrixBase.h:896
ThisType & ElementwiseMaxOf(const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2)
Definition vctDynamicMatrixBase.h:841
ThisType & NegationOf(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
Definition vctDynamicMatrixBase.h:1222
BaseType::iterator iterator
Definition vctDynamicMatrixBase.h:54
reverse_iterator rbegin(void)
Definition vctDynamicMatrixBase.h:89
vctDynamicConstMatrixBase< _matrixOwnerType, _elementType > BaseType
Definition vctDynamicMatrixBase.h:50
pointer Pointer(void)
Definition vctDynamicMatrixBase.h:150
BaseType::const_iterator const_iterator
Definition vctDynamicMatrixBase.h:56
ThisType & CeilOf(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
Definition vctDynamicMatrixBase.h:1240
void OuterProductOf(const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &colVector, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &rowVector)
Definition vctDynamicMatrixBase.h:1322
BaseType::ColumnRefType ColumnRefType
Definition vctDynamicMatrixBase.h:63
const_reference at(size_type index) const CISST_THROW(std
Definition vctDynamicMatrixBase.h:178
ThisType & ForceAssign(const vctFixedSizeConstMatrixBase< __rows, __cols, __rowStride, __colStride, __elementType, __dataPtrType > &other)
Definition vctDynamicMatrixBase.h:587
RefTransposeType TransposeRef(void)
Definition vctDynamicMatrixBase.h:764
BaseType::ConstColumnRefType ConstColumnRefType
Definition vctDynamicMatrixBase.h:62
const_pointer Pointer(size_type rowIndex, size_type colIndex) const
Definition vctDynamicMatrixBase.h:155
ThisType & ClippedBelowOf(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix, const value_type upperBound)
Definition vctDynamicMatrixBase.h:1001
ThisType & SumOf(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix, const value_type scalar)
Definition vctDynamicMatrixBase.h:951
ThisType & AddProductOf(const value_type scalar, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
Definition vctDynamicMatrixBase.h:1174
bool FastCopyOf(const vctFixedSizeConstMatrixBase< __rows, __cols, __rowStride, __colStride, value_type, __dataPtrType > &source, bool performSafetyChecks=vctFastCopy::PerformChecks) CISST_THROW(std
Definition vctDynamicMatrixBase.h:686
void ExchangeRows(const size_type row1Index, const size_type row2Index)
Definition vctDynamicMatrixBase.h:321
const_reverse_iterator rend(void) const
Definition vctDynamicMatrixBase.h:115
ThisType & SumOf(const value_type scalar, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix)
Definition vctDynamicMatrixBase.h:1028
ThisType & AddElementwiseProductOf(const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2)
Definition vctDynamicMatrixBase.h:1187
ThisType & ClippedAboveOf(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix, const value_type lowerBound)
Definition vctDynamicMatrixBase.h:991
iterator begin(void)
Definition vctDynamicMatrixBase.h:77
const_iterator begin(void) const
Definition vctDynamicMatrixBase.h:100
vctDynamicConstMatrixRef< _elementType > Ref(const size_type rows, const size_type cols, const size_type startRow=0, const size_type startCol=0) const CISST_THROW(std
Definition vctDynamicMatrixBase.h:313
ThisType & ClipBelow(const value_type lowerBound)
Definition vctDynamicMatrixBase.h:1144
BaseType::const_reverse_iterator const_reverse_iterator
Definition vctDynamicMatrixBase.h:57
reference Element(size_type rowIndex, size_type colIndex)
Definition vctDynamicMatrixBase.h:214
VCT_CONTAINER_TRAITS_TYPEDEFS(_elementType)
bool FastCopyOf(const vctDynamicConstMatrixBase< __matrixOwnerType, value_type > &source, bool performSafetyChecks=vctFastCopy::PerformChecks) CISST_THROW(std
Definition vctDynamicMatrixBase.h:678
ThisType & ClipAbove(const value_type upperBound)
Definition vctDynamicMatrixBase.h:1136
ThisType & Subtract(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
Definition vctDynamicMatrixBase.h:878
ThisType & ElementwiseRatioOf(const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2)
Definition vctDynamicMatrixBase.h:821
const_iterator end(void) const
Definition vctDynamicMatrixBase.h:105
ThisType & operator=(const vctDynamicConstMatrixBase< __matrixOwnerType, __elementType > &other)
Definition vctDynamicMatrixBase.h:539
reference operator()(size_type rowIndex, size_type colIndex) CISST_THROW(std
Definition vctDynamicMatrixBase.h:199
ThisType & Assign(const vctDynamicConstMatrixBase< __matrixOwnerType, __elementType > &other)
Definition vctDynamicMatrixBase.h:530
const OwnerType & Owner(void) const
Definition vctDynamicMatrixBase.h:132
ThisType & NegationSelf(void)
Definition vctDynamicMatrixBase.h:1273
void RowPermutationOf(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &inputMatrix, const index_type permutedRowIndexes[])
Definition vctDynamicMatrixBase.h:367
ColumnRefType Column(size_type index) CISST_THROW(std
Definition vctDynamicMatrixBase.h:233
void ExchangeColumns(const size_type col1Index, const size_type col2Index)
Definition vctDynamicMatrixBase.h:328
BaseType::ConstRowRefType ConstRowRefType
Definition vctDynamicMatrixBase.h:59
ThisType & ElementwiseMultiply(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
Definition vctDynamicMatrixBase.h:887
ThisType & ElementwiseProductOf(const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2)
Definition vctDynamicMatrixBase.h:811
ConstColumnRefType Column(size_type index) const CISST_THROW(std
Definition vctDynamicMatrixBase.h:282
void ColumnPermutationOf(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &inputMatrix, const index_type permutedColumnIndexes[])
Definition vctDynamicMatrixBase.h:414
ConstVectorPointerType RowPointers(ConstVectorPointerType &rowPointers) const CISST_THROW(std
Definition vctDynamicMatrixBase.h:292
ThisType & CeilSelf(void)
Definition vctDynamicMatrixBase.h:1289
void ColumnInversePermutationOf(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &inputMatrix, const index_type permutedColumnIndexes[])
Definition vctDynamicMatrixBase.h:437
BaseType::ConstVectorPointerType ConstVectorPointerType
Definition vctDynamicMatrixBase.h:71
const_reference Element(size_type rowIndex, size_type colIndex) const
Definition vctDynamicMatrixBase.h:219
ConstRowRefType operator[](size_type index) const
Definition vctDynamicMatrixBase.h:126
ThisType & RatioOf(const value_type scalar, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix)
Definition vctDynamicMatrixBase.h:1058
ThisType & SumOf(const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2)
Definition vctDynamicMatrixBase.h:791
const_reference at(size_type rowIndex, size_type colIndex) const CISST_THROW(std
Definition vctDynamicMatrixBase.h:193
ThisType & RatioOf(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix, const value_type scalar)
Definition vctDynamicMatrixBase.h:981
value_type SetAll(const value_type value)
Definition vctDynamicMatrixBase.h:452
iterator end(void)
Definition vctDynamicMatrixBase.h:83
BaseType::ConstDiagonalRefType ConstDiagonalRefType
Definition vctDynamicMatrixBase.h:65
void SelectRowsFrom(const vctDynamicConstMatrixBase< __inputMatrixOwnerType, _elementType > &inputMatrix, const vctDynamicConstVectorBase< __indexVectorOwnerType, index_type > &rowIndexVector)
Definition vctDynamicMatrixBase.h:337
ThisType & ClippedBelowOf(const value_type lowerBound, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix)
Definition vctDynamicMatrixBase.h:1078
ThisType & FloorOf(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
Definition vctDynamicMatrixBase.h:1231
ThisType & ElementwiseMax(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
Definition vctDynamicMatrixBase.h:914
bool Zeros(void)
Definition vctDynamicMatrixBase.h:468
ThisType & ProductOf(const value_type scalar, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix)
Definition vctDynamicMatrixBase.h:1048
ThisType & ElementwiseMinOf(const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2)
Definition vctDynamicMatrixBase.h:831
ThisType & AbsOf(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
Definition vctDynamicMatrixBase.h:1213
ThisType & ProductOf(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix, const value_type scalar)
Definition vctDynamicMatrixBase.h:971
ThisType & ClippedAboveOf(const value_type upperBound, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix)
Definition vctDynamicMatrixBase.h:1068
ConstDiagonalRefType Diagonal(void) const
Definition vctDynamicMatrixBase.h:287
vctDynamicMatrixBase ThisType
Definition vctDynamicMatrixBase.h:48
reference at(size_type rowIndex, size_type colIndex) CISST_THROW(std
Definition vctDynamicMatrixBase.h:187
ThisType & Subtract(const value_type scalar)
Definition vctDynamicMatrixBase.h:1112
static void Run(_outputMatrixType &outputMatrix, const _inputMatrixType &inputMatrix, const _indexVectorType &indexVector)
Definition vctDynamicMatrixLoopEngines.h:1036
Dynamic matrix referencing existing memory.
Definition vctDynamicMatrixRef.h:75
vctDynamicMatrixRef()
Definition vctDynamicMatrixRef.h:90
reverse_iterator rbegin(void)
Definition vctDynamicNArrayBase.h:117
const OwnerType & Owner(void) const
Definition vctDynamicNArrayBase.h:143
SliceRefType operator[](size_type index)
Definition vctDynamicNArrayBase.h:320
iterator end(void)
Definition vctDynamicNArrayBase.h:104
OwnerType::reverse_iterator reverse_iterator
Definition vctDynamicNArrayBase.h:62
OwnerType::const_reverse_iterator const_reverse_iterator
Definition vctDynamicNArrayBase.h:63
iterator begin(void)
Definition vctDynamicNArrayBase.h:91
OwnerType::const_iterator const_iterator
Definition vctDynamicNArrayBase.h:61
reference at(size_type metaIndex) CISST_THROW(std
Definition vctDynamicNArrayBase.h:184
reverse_iterator rend(void)
Definition vctDynamicNArrayBase.h:130
reference Element(const nsize_type &coordinates)
Definition vctDynamicNArrayBase.h:239
reference operator()(const nsize_type &coordinates) CISST_THROW(std
Definition vctDynamicNArrayBase.h:220
pointer Pointer(void)
Definition vctDynamicNArrayBase.h:168
OwnerType::iterator iterator
Definition vctDynamicNArrayBase.h:60
static bool MatrixCopy(_destinationMatrixType &destination, const _sourceMatrixType &source, bool performSafetyChecks)
Definition vctFastCopy.h:208
static const bool PerformChecks
Definition vctFastCopy.h:119
A template for a fixed size matrix with fixed spacing in memory.
Definition vctFixedSizeConstMatrixBase.h:104
Returns the sum of the two InputType object.
Definition vctStoreBackBinaryOperations.h:76
Define unary operations on an object as classes.
Definition vctUnaryOperations.h:56
#define CISST_THROW(exceptionParameter)
Somewhat portable compilation warning message. This works with very recent versions of gcc (4....
Definition cmnPortability.h:559
void cmnThrow(const _exceptionType &except, cmnLogLevel lod=CMN_LOG_LEVEL_INIT_ERROR)
Definition cmnThrow.h:76
Declaration of vctDynamicConstMatrixBase.
size_type cols() const
Definition vctDynamicConstMatrixBase.h:243
OwnerType Matrix
Definition vctDynamicConstMatrixBase.h:167
difference_type col_stride() const
Definition vctDynamicConstMatrixBase.h:268
difference_type row_stride() const
Definition vctDynamicConstMatrixBase.h:263
size_type size(void) const
Definition vctDynamicConstMatrixBase.h:228
bool IsCompact(void) const
Definition vctDynamicConstMatrixBase.h:641
void ThrowUnlessValidColIndex(size_type index) const CISST_THROW(std
Definition vctDynamicConstMatrixBase.h:194
size_type rows() const
Definition vctDynamicConstMatrixBase.h:238
void ThrowUnlessValidIndex(size_type index) const CISST_THROW(std
Definition vctDynamicConstMatrixBase.h:171
void ThrowUnlessValidRowIndex(size_type index) const CISST_THROW(std
Definition vctDynamicConstMatrixBase.h:187
bool FastCopyCompatible(const vctDynamicConstMatrixBase< __matrixOwnerType, value_type > &source) const
Definition vctDynamicConstMatrixBase.h:677
Declaration of vctStoreBackBinaryOperations.
Declaration of vctStoreBackUnaryOperations.