20#ifndef _vctFixedSizeMatrixBase_h
21#define _vctFixedSizeMatrixBase_h
38 class _elementType,
class _dataPtrType,
class _matrixOwnerType>
57 class _elementType,
class _dataPtrType>
59<_rows, _cols, _rowStride, _colStride, _elementType, _dataPtrType>
70 _rowStride, _colStride, _elementType, _dataPtrType>
ThisType;
161 pointer
Pointer(size_type rowIndex, size_type colIndex) {
173 const_pointer
Pointer(size_type rowIndex, size_type colIndex)
const {
189 return (
begin())[index];
202 reference
at(size_type rowIndex, size_type colIndex)
CISST_THROW(std::out_of_range) {
204 return *(
Pointer(rowIndex, colIndex));
208 const_reference
at(size_type rowIndex, size_type colIndex)
const CISST_THROW(std::out_of_range) {
216 return at(rowIndex, colIndex);
231 reference
Element(size_type rowIndex, size_type colIndex) {
232 return *(
Pointer(rowIndex, colIndex));
236 const_reference
Element(size_type rowIndex, size_type colIndex)
const {
276 template <vct::
size_type __subRows, vct::
size_type __subCols>
278 Ref(
const size_type startRow = 0,
const size_type startCol = 0)
CISST_THROW(
std::out_of_range) {
280 result(*
this, startRow, startCol);
284 template <vct::
size_type __subRows, vct::
size_type __subCols>
286 Ref(
const size_type startRow = 0,
const size_type startCol = 0) const
CISST_THROW(
std::out_of_range) {
293 void ExchangeRows(
const size_type row1Index,
const size_type row2Index) {
296 row1.SwapElementsWith(row2);
303 col1.SwapElementsWith(col2);
308 template <size_type __rows, stride_type __rowStride, stride_type __colStride,
class __dataPtrType,
309 stride_type __indexStride,
class __indexDataPtrType>
314 Run(*
this, inputMatrix, rowIndexVector);
318 template <size_type __cols, stride_type __rowStride, stride_type __colStride,
class __dataPtrType,
319 stride_type __indexStride,
class __indexDataPtrType>
339 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
341 _elementType, __dataPtrType> & inputMatrix,
const index_type permutedRowIndexes[])
343 index_type thisRowIndex;
344 for (thisRowIndex = 0; thisRowIndex <
ROWS; ++thisRowIndex) {
345 Row(thisRowIndex).Assign( inputMatrix.Row(permutedRowIndexes[thisRowIndex]) );
361 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
363 _elementType, __dataPtrType> & inputMatrix,
const index_type permutedRowIndexes[])
365 index_type thisRowIndex;
366 for (thisRowIndex = 0; thisRowIndex <
ROWS; ++thisRowIndex) {
367 Row(permutedRowIndexes[thisRowIndex]).Assign( inputMatrix.Row(thisRowIndex) );
383 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
385 _elementType, __dataPtrType> & inputMatrix,
const index_type permutedColumnIndexes[])
387 index_type thisColumnIndex;
388 for (thisColumnIndex = 0; thisColumnIndex <
COLS; ++thisColumnIndex) {
389 Column(thisColumnIndex).Assign( inputMatrix.Column(permutedColumnIndexes[thisColumnIndex]) );
405 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
407 _elementType, __dataPtrType> & inputMatrix,
const index_type permutedColumnIndexes[])
409 index_type thisColumnIndex;
410 for (thisColumnIndex = 0; thisColumnIndex <
COLS; ++thisColumnIndex) {
411 Column(permutedColumnIndexes[thisColumnIndex]).Assign( inputMatrix.Column(thisColumnIndex) );
422 vctFixedSizeMatrixLoopEngines::
423 MioSi<typename vctStoreBackBinaryOperations<value_type>::SecondOperand>::
444 const stride_type rowStride = this->
row_stride();
445 pointer currentPointer = this->
Pointer();
446 const pointer endPointer = currentPointer + this->
rows() * rowStride;
448 currentPointer != endPointer;
449 currentPointer += rowStride) {
450 memset(currentPointer, 0, sizeOfRow);
456 const stride_type colStride = this->
col_stride();
457 pointer currentPointer = this->
Pointer();
458 const pointer endPointer = currentPointer + this->
cols() * colStride;
460 currentPointer != endPointer;
461 currentPointer += colStride) {
462 memset(currentPointer, 0, sizeOfCol);
474 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __elementType,
class __dataPtrType>
476 vctFixedSizeMatrixLoopEngines::
477 MoMi<typename vctUnaryOperations<value_type, __elementType>::Identity>::
507 va_start(nextArg, element0);
508 for (; iter !=
end(); ++iter) {
562 template <
class __matrixOwnerType>
587 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __elementType,
class __dataPtrType>
589 __elementType, __dataPtrType> & other) {
590 return this->
Assign(other);
593 template <
class __matrixOwnerType>
595 return this->
Assign(other);
668 template <
class __matrixOwnerType>
676 template <
class __dataPtrType>
715 template <stride_type __input1RowStride, stride_type __input1ColStride,
class __input1DataPtrType,
716 stride_type __input2RowStride, stride_type __input2ColStride,
class __input2DataPtrType>
718 value_type, __input1DataPtrType> & input1Matrix,
720 value_type, __input2DataPtrType> & input2Matrix) {
722 ::Run(*
this, input1Matrix, input2Matrix);
727 template <stride_type __input1RowStride, stride_type __input1ColStride,
class __input1DataPtrType,
728 stride_type __input2RowStride, stride_type __input2ColStride,
class __input2DataPtrType>
730 value_type, __input1DataPtrType> & input1Matrix,
732 value_type, __input2DataPtrType> & input2Matrix) {
734 ::Run(*
this, input1Matrix, input2Matrix);
739 template <stride_type __input1RowStride, stride_type __input1ColStride,
class __input1DataPtrType,
740 stride_type __input2RowStride, stride_type __input2ColStride,
class __input2DataPtrType>
742 value_type, __input1DataPtrType> & input1Matrix,
744 value_type, __input2DataPtrType> & input2Matrix) {
746 ::Run(*
this, input1Matrix, input2Matrix);
751 template <stride_type __input1RowStride, stride_type __input1ColStride,
class __input1DataPtrType,
752 stride_type __input2RowStride, stride_type __input2ColStride,
class __input2DataPtrType>
754 value_type, __input1DataPtrType> & input1Matrix,
756 value_type, __input2DataPtrType> & input2Matrix) {
758 ::Run(*
this, input1Matrix, input2Matrix);
763 template <stride_type __input1RowStride, stride_type __input1ColStride,
class __input1DataPtrType,
764 stride_type __input2RowStride, stride_type __input2ColStride,
class __input2DataPtrType>
766 value_type, __input1DataPtrType> & input1Matrix,
768 value_type, __input2DataPtrType> & input2Matrix) {
770 ::Run(*
this, input1Matrix, input2Matrix);
775 template <stride_type __input1RowStride, stride_type __input1ColStride,
class __input1DataPtrType,
776 stride_type __input2RowStride, stride_type __input2ColStride,
class __input2DataPtrType>
778 value_type, __input1DataPtrType> & input1Matrix,
780 value_type, __input2DataPtrType> & input2Matrix) {
782 ::Run(*
this, input1Matrix, input2Matrix);
805 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
807 vctFixedSizeMatrixLoopEngines::
808 MioMi<typename vctStoreBackBinaryOperations<value_type>::Addition>::
809 Run(*
this, otherMatrix);
814 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
816 vctFixedSizeMatrixLoopEngines::
817 MioMi<typename vctStoreBackBinaryOperations<value_type>::Subtraction>::
818 Run(*
this, otherMatrix);
823 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
825 vctFixedSizeMatrixLoopEngines::
826 MioMi<typename vctStoreBackBinaryOperations<value_type>::Multiplication>::
827 Run(*
this, otherMatrix);
832 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
834 vctFixedSizeMatrixLoopEngines::
835 MioMi<typename vctStoreBackBinaryOperations<value_type>::Division>::
836 Run(*
this, otherMatrix);
841 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
843 vctFixedSizeMatrixLoopEngines::
844 MioMi<typename vctStoreBackBinaryOperations<value_type>::Minimum>::
845 Run(*
this, otherMatrix);
850 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
852 vctFixedSizeMatrixLoopEngines::
853 MioMi<typename vctStoreBackBinaryOperations<value_type>::Maximum>::
854 Run(*
this, otherMatrix);
859 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
861 return this->
Add(otherMatrix);
865 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
888 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
891 vctFixedSizeMatrixLoopEngines::
892 MoMiSi<typename vctBinaryOperations<value_type>::Addition>::
893 Run(*
this, matrix, scalar);
898 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
901 vctFixedSizeMatrixLoopEngines::
902 MoMiSi<typename vctBinaryOperations<value_type>::Subtraction>::
903 Run(*
this, matrix, scalar);
908 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
911 vctFixedSizeMatrixLoopEngines::
912 MoMiSi<typename vctBinaryOperations<value_type>::Multiplication>::
913 Run(*
this, matrix, scalar);
918 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
921 vctFixedSizeMatrixLoopEngines::
922 MoMiSi<typename vctBinaryOperations<value_type>::Division>::
923 Run(*
this, matrix, scalar);
928 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
931 vctFixedSizeMatrixLoopEngines::
932 MoMiSi<typename vctBinaryOperations<value_type>::Minimum>::
933 Run(*
this, matrix, upperBound);
938 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
941 vctFixedSizeMatrixLoopEngines::
942 MoMiSi<typename vctBinaryOperations<value_type>::Maximum>::
943 Run(*
this, matrix, lowerBound);
965 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
968 vctFixedSizeMatrixLoopEngines::
969 MoSiMi<typename vctBinaryOperations<value_type>::Addition>::
970 Run(*
this, scalar, matrix);
975 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
978 vctFixedSizeMatrixLoopEngines::
979 MoSiMi<typename vctBinaryOperations<value_type>::Subtraction>::
980 Run(*
this, scalar, matrix);
985 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
988 vctFixedSizeMatrixLoopEngines::
989 MoSiMi<typename vctBinaryOperations<value_type>::Multiplication>::
990 Run(*
this, scalar, matrix);
995 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
998 vctFixedSizeMatrixLoopEngines::
999 MoSiMi<typename vctBinaryOperations<value_type>::Division>::
1000 Run(*
this, scalar, matrix);
1005 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
1008 vctFixedSizeMatrixLoopEngines::
1009 MoSiMi<typename vctBinaryOperations<value_type>::Minimum>::
1010 Run(*
this, upperBound, matrix);
1015 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
1018 vctFixedSizeMatrixLoopEngines::
1019 MoSiMi<typename vctBinaryOperations<value_type>::Maximum>::
1020 Run(*
this, lowerBound, matrix);
1041 vctFixedSizeMatrixLoopEngines::
1042 MioSi<typename vctStoreBackBinaryOperations<value_type>::Addition>::
1049 vctFixedSizeMatrixLoopEngines::
1050 MioSi<typename vctStoreBackBinaryOperations<value_type>::Subtraction>::
1057 vctFixedSizeMatrixLoopEngines::
1058 MioSi<typename vctStoreBackBinaryOperations<value_type>::Multiplication>::
1065 vctFixedSizeMatrixLoopEngines::
1066 MioSi<typename vctStoreBackBinaryOperations<value_type>::Division>::
1073 vctFixedSizeMatrixLoopEngines::
1074 MioSi<typename vctStoreBackBinaryOperations<value_type>::Minimum>::
1075 Run(*
this, upperBound);
1081 vctFixedSizeMatrixLoopEngines::
1082 MioSi<typename vctStoreBackBinaryOperations<value_type>::Maximum>::
1083 Run(*
this, lowerBound);
1089 return this->
Add(scalar);
1104 return this->
Divide(scalar);
1109 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
1113 vctFixedSizeMatrixLoopEngines::
1117 Run(*
this, scalar, otherMatrix);
1122 template <stride_type __rowStride1, stride_type __colStride1,
class __dataPtrType1,
1123 stride_type __rowStride2, stride_type __colStride2,
class __dataPtrType2>
1127 vctFixedSizeMatrixLoopEngines::
1131 Run(*
this, matrix1, matrix2);
1149 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
1151 vctFixedSizeMatrixLoopEngines::
1152 MoMi<typename vctUnaryOperations<value_type>::AbsValue>::
1153 Run(*
this, otherMatrix);
1158 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
1160 vctFixedSizeMatrixLoopEngines::
1161 MoMi<typename vctUnaryOperations<value_type>::Negation>::
1162 Run(*
this, otherMatrix);
1167 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
1169 vctFixedSizeMatrixLoopEngines::
1170 MoMi<typename vctUnaryOperations<value_type>::Floor>::
1171 Run(*
this, otherMatrix);
1176 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
1178 vctFixedSizeMatrixLoopEngines::
1179 MoMi<typename vctUnaryOperations<value_type>::Ceil>::
1180 Run(*
this, otherMatrix);
1187 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
1206 vctFixedSizeMatrixLoopEngines::
1207 Mio<typename vctStoreBackUnaryOperations<value_type>::MakeAbs>::
1214 vctFixedSizeMatrixLoopEngines::
1215 Mio<typename vctStoreBackUnaryOperations<value_type>::MakeNegation>::
1222 vctFixedSizeMatrixLoopEngines::
1223 Mio<typename vctStoreBackUnaryOperations<value_type>::MakeFloor>::
1230 vctFixedSizeMatrixLoopEngines::
1231 Mio<typename vctStoreBackUnaryOperations<value_type>::MakeCeil>::
1246 template <size_type __input1Cols, stride_type __input1RowStride, stride_type __input1ColStride,
class __input1DataPtrType,
1247 stride_type __input2RowStride, stride_type __input2ColStride,
class __input2DataPtrType>
1249 _elementType, __input1DataPtrType> & input1Matrix,
1251 _elementType, __input2DataPtrType> & input2Matrix) {
1253 _elementType, __input1DataPtrType> Input1MatrixType;
1255 _elementType, __input2DataPtrType> Input2MatrixType;
1256 typedef typename Input1MatrixType::ConstRowRefType Input1RowRefType;
1257 typedef typename Input2MatrixType::ConstColumnRefType Input2ColumnRefType;
1258 vctFixedSizeMatrixLoopEngines::
1259 Product<typename vctBinaryOperations<value_type, Input1RowRefType, Input2ColumnRefType>::DotProduct>::
1260 Run((*
this), input1Matrix, input2Matrix);
1265 template <str
ide_type __str
ide1,
class __dataPtrType1, str
ide_type __str
ide2,
class __dataPtrType2>
1271 typedef typename InputColumnType::ColConstMatrixRefType ColMatrixType;
1272 typedef typename InputRowType::RowConstMatrixRefType RowMatrixType;
1273 const ColMatrixType colMatrix = columnVector.
AsColMatrix();
1274 const RowMatrixType rowMatrix = rowVector.
AsRowMatrix();
1292 template <
size_type _subRows,
size_type _subCols>
1304 const size_type myRows = this->
rows();
1305 const size_type myCols = this->
cols();
1306 size_type indexRow, indexCol;
1310 for (indexRow = 0; (indexRow < myRows) && valid; ++indexRow) {
1311 for (indexCol = 0; (indexCol < myCols) && valid; ++indexCol) {
1312 inputStream >> temp.
Element(indexRow, indexCol);
1313 if (inputStream.fail()) {
1315 inputStream.clear();
1318 if (valid && !isspace(delimiter) && (indexCol < myCols-1)) {
1325 if (valid && !isspace(delimiter) && (indexRow < myRows-1)) {
1341 const size_type myRows = this->
rows();
1342 const size_type myCols = this->
cols();
1343 size_type indexRow, indexCol;
1345 for (indexRow = 0; indexRow < myRows; ++indexRow) {
1346 for (indexCol = 0; indexCol < myCols; ++indexCol) {
cmnVaArgPromotion< _elementType >::Type VaArgPromotion
Definition cmnTypeTraits.h:167
Returns the product of the two InputType object.
Definition vctBinaryOperations.h:116
Definition vctForwardDeclarations.h:145
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
vctFixedSizeVector< _elementType, COLS > RowValueType
Definition vctFixedSizeConstMatrixBase.h:172
size_type cols() const
Definition vctFixedSizeConstMatrixBase.h:282
vctFixedSizeVector< _elementType, ROWS > ColumnValueType
Definition vctFixedSizeConstMatrixBase.h:175
vctFixedSizeConstMatrixRef< _elementType, __subRows, __subCols, _rowStride, _colStride > Ref(const size_type startRow=0, const size_type startCol=0) const CISST_THROW(std
Definition vctFixedSizeConstMatrixBase.h:418
difference_type row_stride() const
Definition vctFixedSizeConstMatrixBase.h:303
vctFixedSizeVectorRef< _elementType, COLS, COLSTRIDE > RowRefType
Definition vctFixedSizeConstMatrixBase.h:152
bool IsCompact(void) const
Definition vctFixedSizeConstMatrixBase.h:639
size_type rows() const
Definition vctFixedSizeConstMatrixBase.h:277
vctFixedSizeConstMatrixRef< _elementType, _cols, _rows, _colStride, _rowStride > ConstRefTransposeType
Definition vctFixedSizeConstMatrixBase.h:187
vctFixedSizeConstVectorRef< _elementType, DIAGONAL_LENGTH, DIAGONAL_STRIDE > ConstDiagonalRefType
Definition vctFixedSizeConstMatrixBase.h:164
vctFixedSizeConstVectorRef< _elementType, ROWS, ROWSTRIDE > ConstColumnRefType
Definition vctFixedSizeConstMatrixBase.h:156
difference_type col_stride() const
Definition vctFixedSizeConstMatrixBase.h:309
vctFixedSizeConstVectorRef< _elementType, COLS, COLSTRIDE > ConstRowRefType
Definition vctFixedSizeConstMatrixBase.h:148
vctFixedSizeMatrixRef< _elementType, _cols, _rows, _colStride, _rowStride > RefTransposeType
Definition vctFixedSizeConstMatrixBase.h:192
const_reverse_iterator rbegin() const
Definition vctFixedSizeConstMatrixBase.h:252
const_reference Element(size_type rowIndex, size_type colIndex) const
Definition vctFixedSizeConstMatrixBase.h:397
vctFixedSizeVectorRef< _elementType, ROWS, ROWSTRIDE > ColumnRefType
Definition vctFixedSizeConstMatrixBase.h:160
ConstColumnRefType Column(size_type index) const
Definition vctFixedSizeConstMatrixBase.h:406
const_reference at(size_type index) const CISST_THROW(std
Definition vctFixedSizeConstMatrixBase.h:368
size_type size() const
Definition vctFixedSizeConstMatrixBase.h:266
const_pointer Pointer(void) const
Definition vctFixedSizeConstMatrixBase.h:336
ConstRowRefType operator[](size_type index) const
Definition vctFixedSizeConstMatrixBase.h:321
ConstDiagonalRefType Diagonal(void) const
Definition vctFixedSizeConstMatrixBase.h:410
const_reverse_iterator rend() const
Definition vctFixedSizeConstMatrixBase.h:259
const_reference operator()(size_type rowIndex, size_type colIndex) const CISST_THROW(std
Definition vctFixedSizeConstMatrixBase.h:386
vctFixedSizeVectorRef< _elementType, DIAGONAL_LENGTH, DIAGONAL_STRIDE > DiagonalRefType
Definition vctFixedSizeConstMatrixBase.h:168
ConstRowRefType Row(size_type index) const
Definition vctFixedSizeConstMatrixBase.h:402
void ThrowUnlessValidIndex(size_type index) const CISST_THROW(std
Definition vctFixedSizeConstMatrixBase.h:220
const_iterator begin() const
Definition vctFixedSizeConstMatrixBase.h:238
const_iterator end() const
Definition vctFixedSizeConstMatrixBase.h:245
DataType Data
Definition vctFixedSizeConstMatrixBase.h:216
ConstRefTransposeType TransposeRef(void) const
Definition vctFixedSizeConstMatrixRef.h:172
Definition vctForwardDeclarations.h:106
A template for a fixed length vector with fixed spacing in memory.
Definition vctFixedSizeConstVectorBase.h:108
RowConstMatrixRefType AsRowMatrix(void) const
Definition vctFixedSizeConstVectorBase.h:399
ColConstMatrixRefType AsColMatrix(void) const
Definition vctFixedSizeConstVectorBase.h:404
Definition vctFixedSizeMatrixBase.h:1294
vctFixedSizeMatrixRef< value_type, _subRows, _subCols, ROWSTRIDE, COLSTRIDE > Type
Definition vctFixedSizeMatrixBase.h:1297
A template for a fixed size matrix with fixed spacings in memory.
Definition vctFixedSizeMatrixBase.h:60
ThisType & ForceAssign(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, __elementType, __dataPtrType > &other)
Definition vctFixedSizeMatrixBase.h:588
void SelectRowsFrom(const vctFixedSizeConstMatrixBase< __rows, _cols, __rowStride, __colStride, _elementType, __dataPtrType > &inputMatrix, const vctFixedSizeConstVectorBase< _rows, __indexStride, index_type, __indexDataPtrType > &rowIndexVector)
Definition vctFixedSizeMatrixBase.h:310
ThisType & ElementwiseMinOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __input1RowStride, __input1ColStride, value_type, __input1DataPtrType > &input1Matrix, const vctFixedSizeConstMatrixBase< _rows, _cols, __input2RowStride, __input2ColStride, value_type, __input2DataPtrType > &input2Matrix)
Definition vctFixedSizeMatrixBase.h:765
reference operator()(size_type rowIndex, size_type colIndex) CISST_THROW(std
Definition vctFixedSizeMatrixBase.h:215
void DeSerializeRaw(std::istream &inputStream)
Definition vctFixedSizeMatrixBase.h:1339
ThisType & Divide(const value_type scalar)
Definition vctFixedSizeMatrixBase.h:1064
bool FromStreamRaw(std::istream &inputStream, const char delimiter=' ')
Definition vctFixedSizeMatrixBase.h:1302
ThisType & ClippedAboveOf(const value_type upperBound, const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix)
Definition vctFixedSizeMatrixBase.h:1006
ThisType & AbsSelf(void)
Definition vctFixedSizeMatrixBase.h:1205
ConstRowRefType operator[](size_type index) const
Definition vctFixedSizeMatrixBase.h:153
ThisType & ElementwiseProductOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __input1RowStride, __input1ColStride, value_type, __input1DataPtrType > &input1Matrix, const vctFixedSizeConstMatrixBase< _rows, _cols, __input2RowStride, __input2ColStride, value_type, __input2DataPtrType > &input2Matrix)
Definition vctFixedSizeMatrixBase.h:741
ThisType & SumOf(const value_type scalar, const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix)
Definition vctFixedSizeMatrixBase.h:966
void ProductOf(const vctFixedSizeConstMatrixBase< _rows, __input1Cols, __input1RowStride, __input1ColStride, _elementType, __input1DataPtrType > &input1Matrix, const vctFixedSizeConstMatrixBase< __input1Cols, _cols, __input2RowStride, __input2ColStride, _elementType, __input2DataPtrType > &input2Matrix)
Definition vctFixedSizeMatrixBase.h:1248
ThisType & operator-=(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition vctFixedSizeMatrixBase.h:866
void RowPermutationOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, _elementType, __dataPtrType > &inputMatrix, const index_type permutedRowIndexes[])
Definition vctFixedSizeMatrixBase.h:340
void ExchangeRows(const size_type row1Index, const size_type row2Index)
Definition vctFixedSizeMatrixBase.h:293
reverse_iterator rend()
Definition vctFixedSizeMatrixBase.h:135
bool Zeros(void)
Definition vctFixedSizeMatrixBase.h:437
ThisType & FloorOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition vctFixedSizeMatrixBase.h:1168
vctFixedSizeConstMatrixRef< _elementType, __subRows, __subCols, _rowStride, _colStride > Ref(const size_type startRow=0, const size_type startCol=0) const CISST_THROW(std
Definition vctFixedSizeMatrixBase.h:286
pointer Pointer(void)
Definition vctFixedSizeMatrixBase.h:168
ConstColumnRefType Column(size_type index) const
Definition vctFixedSizeMatrixBase.h:264
void SelectColsFrom(const vctFixedSizeConstMatrixBase< _rows, __cols, __rowStride, __colStride, _elementType, __dataPtrType > &inputMatrix, const vctFixedSizeConstVectorBase< _cols, __indexStride, index_type, __indexDataPtrType > &colIndexVector)
Definition vctFixedSizeMatrixBase.h:320
BaseType::ConstDiagonalRefType ConstDiagonalRefType
Definition vctFixedSizeMatrixBase.h:89
ThisType & ForceAssign(const vctDynamicConstMatrixBase< __matrixOwnerType, value_type > &other)
Definition vctFixedSizeMatrixBase.h:594
ThisType & TransposeOf(const vctFixedSizeConstMatrixBase< _cols, _rows, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition vctFixedSizeMatrixBase.h:1188
pointer Pointer(size_type rowIndex, size_type colIndex)
Definition vctFixedSizeMatrixBase.h:161
ThisType & operator/=(const value_type scalar)
Definition vctFixedSizeMatrixBase.h:1103
const_pointer Pointer(size_type rowIndex, size_type colIndex) const
Definition vctFixedSizeMatrixBase.h:173
BaseType::ConstRowRefType ConstRowRefType
Definition vctFixedSizeMatrixBase.h:86
MatrixTraits::const_iterator const_iterator
Definition vctFixedSizeMatrixBase.h:80
ThisType & Add(const value_type scalar)
Definition vctFixedSizeMatrixBase.h:1040
ColumnRefType Column(size_type index)
Definition vctFixedSizeMatrixBase.h:249
void ExchangeColumns(const size_type col1Index, const size_type col2Index)
Definition vctFixedSizeMatrixBase.h:300
ConstDiagonalRefType Diagonal(void) const
Definition vctFixedSizeMatrixBase.h:269
BaseType::ColumnRefType ColumnRefType
Definition vctFixedSizeMatrixBase.h:85
ThisType & ElementwiseRatioOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __input1RowStride, __input1ColStride, value_type, __input1DataPtrType > &input1Matrix, const vctFixedSizeConstMatrixBase< _rows, _cols, __input2RowStride, __input2ColStride, value_type, __input2DataPtrType > &input2Matrix)
Definition vctFixedSizeMatrixBase.h:753
BaseType::ConstColumnRefType ConstColumnRefType
Definition vctFixedSizeMatrixBase.h:87
BaseType::RowValueType RowValueType
Definition vctFixedSizeMatrixBase.h:92
ThisType & Assign(const value_type *elements, bool inputIsRowMajor=true)
Definition vctFixedSizeMatrixBase.h:537
vctFixedSizeMatrixTraits< _elementType, _rows, _cols, _rowStride, _colStride > MatrixTraits
Definition vctFixedSizeMatrixBase.h:77
bool FastCopyOf(const vctDynamicConstMatrixBase< __matrixOwnerType, value_type > &source, bool performSafetyChecks=vctFastCopy::PerformChecks) CISST_THROW(std
Definition vctFixedSizeMatrixBase.h:669
ThisType & DifferenceOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __input1RowStride, __input1ColStride, value_type, __input1DataPtrType > &input1Matrix, const vctFixedSizeConstMatrixBase< _rows, _cols, __input2RowStride, __input2ColStride, value_type, __input2DataPtrType > &input2Matrix)
Definition vctFixedSizeMatrixBase.h:729
ConstRefTransposeType TransposeRef(void) const
Definition vctFixedSizeMatrixBase.h:694
VCT_CONTAINER_TRAITS_TYPEDEFS(_elementType)
ThisType & operator*=(const value_type scalar)
Definition vctFixedSizeMatrixBase.h:1098
ThisType & Multiply(const value_type scalar)
Definition vctFixedSizeMatrixBase.h:1056
BaseType::ColumnValueType ColumnValueType
Definition vctFixedSizeMatrixBase.h:93
@ ROWSTRIDE
Definition vctFixedSizeMatrixBase.h:99
@ COLSTRIDE
Definition vctFixedSizeMatrixBase.h:100
ThisType & DifferenceOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix, const value_type scalar)
Definition vctFixedSizeMatrixBase.h:899
ThisType & ElementwiseMaxOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __input1RowStride, __input1ColStride, value_type, __input1DataPtrType > &input1Matrix, const vctFixedSizeConstMatrixBase< _rows, _cols, __input2RowStride, __input2ColStride, value_type, __input2DataPtrType > &input2Matrix)
Definition vctFixedSizeMatrixBase.h:777
ThisType & RatioOf(const value_type scalar, const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix)
Definition vctFixedSizeMatrixBase.h:996
@ COLS
Definition vctFixedSizeMatrixBase.h:96
@ ROWS
Definition vctFixedSizeMatrixBase.h:96
@ LENGTH
Definition vctFixedSizeMatrixBase.h:97
ThisType & NegationOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition vctFixedSizeMatrixBase.h:1159
void ColumnInversePermutationOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, _elementType, __dataPtrType > &inputMatrix, const index_type permutedColumnIndexes[])
Definition vctFixedSizeMatrixBase.h:406
vctFixedSizeMatrixRef< _elementType, __subRows, __subCols, _rowStride, _colStride > Ref(const size_type startRow=0, const size_type startCol=0) CISST_THROW(std
Definition vctFixedSizeMatrixBase.h:278
MatrixTraits::const_reverse_iterator const_reverse_iterator
Definition vctFixedSizeMatrixBase.h:82
const_reverse_iterator rbegin() const
Definition vctFixedSizeMatrixBase.h:129
RefTransposeType TransposeRef(void)
RowRefType Row(size_type index)
Definition vctFixedSizeMatrixBase.h:244
ThisType & NegationSelf(void)
Definition vctFixedSizeMatrixBase.h:1213
ThisType & CeilSelf(void)
Definition vctFixedSizeMatrixBase.h:1229
ThisType & ClippedAboveOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix, const value_type upperBound)
Definition vctFixedSizeMatrixBase.h:929
const_reverse_iterator rend() const
Definition vctFixedSizeMatrixBase.h:141
const_pointer Pointer(void) const
Definition vctFixedSizeMatrixBase.h:178
BaseType::RowRefType RowRefType
Definition vctFixedSizeMatrixBase.h:84
ThisType & Subtract(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition vctFixedSizeMatrixBase.h:815
ConstRowRefType Row(size_type index) const
Definition vctFixedSizeMatrixBase.h:259
ThisType & ClippedBelowOf(const value_type lowerBound, const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix)
Definition vctFixedSizeMatrixBase.h:1016
ThisType & ClipBelow(const value_type lowerBound)
Definition vctFixedSizeMatrixBase.h:1080
ThisType & ClippedBelowOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix, const value_type lowerBound)
Definition vctFixedSizeMatrixBase.h:939
ThisType & Assign(const vctDynamicConstMatrixBase< __matrixOwnerType, value_type > &other)
Definition vctFixedSizeMatrixBase.h:563
MatrixTraits::reverse_iterator reverse_iterator
Definition vctFixedSizeMatrixBase.h:81
void ColumnPermutationOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, _elementType, __dataPtrType > &inputMatrix, const index_type permutedColumnIndexes[])
Definition vctFixedSizeMatrixBase.h:384
DiagonalRefType Diagonal(void)
Definition vctFixedSizeMatrixBase.h:254
const_iterator begin() const
Definition vctFixedSizeMatrixBase.h:109
ThisType & DifferenceOf(const value_type scalar, const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix)
Definition vctFixedSizeMatrixBase.h:976
ThisType & ElementwiseMultiply(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition vctFixedSizeMatrixBase.h:824
ThisType & ClipAbove(const value_type upperBound)
Definition vctFixedSizeMatrixBase.h:1072
ThisType & ProductOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix, const value_type scalar)
Definition vctFixedSizeMatrixBase.h:909
ThisType & ProductOf(const value_type scalar, const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix)
Definition vctFixedSizeMatrixBase.h:986
BaseType::RefTransposeType RefTransposeType
Definition vctFixedSizeMatrixBase.h:90
iterator end()
Definition vctFixedSizeMatrixBase.h:114
ThisType & ElementwiseMin(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition vctFixedSizeMatrixBase.h:842
ThisType & AddProductOf(const value_type scalar, const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition vctFixedSizeMatrixBase.h:1110
void RowInversePermutationOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, _elementType, __dataPtrType > &inputMatrix, const index_type permutedRowIndexes[])
Definition vctFixedSizeMatrixBase.h:362
ThisType & CeilOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition vctFixedSizeMatrixBase.h:1177
ThisType & ElementwiseMax(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition vctFixedSizeMatrixBase.h:851
BaseType::ConstRefTransposeType ConstRefTransposeType
Definition vctFixedSizeMatrixBase.h:91
const_reference operator()(size_type rowIndex, size_type colIndex) const CISST_THROW(std
Definition vctFixedSizeMatrixBase.h:220
ThisType & SumOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix, const value_type scalar)
Definition vctFixedSizeMatrixBase.h:889
RowRefType operator[](size_type index)
Definition vctFixedSizeMatrixBase.h:148
reference at(size_type rowIndex, size_type colIndex) CISST_THROW(std
Definition vctFixedSizeMatrixBase.h:202
ThisType & AbsOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition vctFixedSizeMatrixBase.h:1150
ThisType & RatioOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix, const value_type scalar)
Definition vctFixedSizeMatrixBase.h:919
vctFixedSizeMatrixBase< _rows, _cols, _rowStride, _colStride, _elementType, typename vctFixedSizeMatrixTraits< _elementType, _rows, _cols, _rowMajor?_cols:1, _rowMajor?1:_rows >::array > ThisType
Definition vctFixedSizeMatrixBase.h:70
ThisType & SumOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __input1RowStride, __input1ColStride, value_type, __input1DataPtrType > &input1Matrix, const vctFixedSizeConstMatrixBase< _rows, _cols, __input2RowStride, __input2ColStride, value_type, __input2DataPtrType > &input2Matrix)
Definition vctFixedSizeMatrixBase.h:717
reverse_iterator rbegin()
Definition vctFixedSizeMatrixBase.h:124
iterator begin()
Definition vctFixedSizeMatrixBase.h:104
const_reference Element(size_type rowIndex, size_type colIndex) const
Definition vctFixedSizeMatrixBase.h:236
bool FastCopyOf(const vctFixedSizeConstMatrixBase< ROWS, COLS, ROWSTRIDE, COLSTRIDE, value_type, __dataPtrType > &source, bool performSafetyChecks=vctFastCopy::PerformChecks) CISST_THROW(std
Definition vctFixedSizeMatrixBase.h:677
ThisType & Subtract(const value_type scalar)
Definition vctFixedSizeMatrixBase.h:1048
const_iterator end() const
Definition vctFixedSizeMatrixBase.h:119
const_reference at(size_type rowIndex, size_type colIndex) const CISST_THROW(std
Definition vctFixedSizeMatrixBase.h:208
ThisType & Add(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition vctFixedSizeMatrixBase.h:806
ThisType & ElementwiseDivide(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition vctFixedSizeMatrixBase.h:833
const_reference at(size_type index) const CISST_THROW(std
Definition vctFixedSizeMatrixBase.h:193
ThisType & FloorSelf(void)
Definition vctFixedSizeMatrixBase.h:1221
reference at(size_type index) CISST_THROW(std
Definition vctFixedSizeMatrixBase.h:187
MatrixTraits::iterator iterator
Definition vctFixedSizeMatrixBase.h:79
value_type SetAll(const value_type value)
Definition vctFixedSizeMatrixBase.h:421
BaseType::DiagonalRefType DiagonalRefType
Definition vctFixedSizeMatrixBase.h:88
reference Element(size_type rowIndex, size_type colIndex)
Definition vctFixedSizeMatrixBase.h:231
ThisType & Assign(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, __elementType, __dataPtrType > &other)
Definition vctFixedSizeMatrixBase.h:475
vctFixedSizeConstMatrixBase< _rows, _cols, _rowStride, _colStride, _elementType, typename vctFixedSizeMatrixTraits< _elementType, _rows, _cols, _rowMajor?_cols:1, _rowMajor?1:_rows >::array > BaseType
Definition vctFixedSizeMatrixBase.h:74
ThisType & operator+=(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition vctFixedSizeMatrixBase.h:860
ThisType & AddElementwiseProductOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride1, __colStride1, value_type, __dataPtrType1 > &matrix1, const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride2, __colStride2, value_type, __dataPtrType2 > &matrix2)
Definition vctFixedSizeMatrixBase.h:1124
void OuterProductOf(const vctFixedSizeConstVectorBase< _rows, __stride1, _elementType, __dataPtrType1 > &columnVector, const vctFixedSizeConstVectorBase< _cols, __stride2, _elementType, __dataPtrType2 > &rowVector)
Definition vctFixedSizeMatrixBase.h:1266
Definition vctFixedSizeMatrixLoopEngines.h:76
static void Run(_outputMatrixType &outputMatrix, const _inputMatrixType &inputMatrix, const _indexVectorType &indexVector)
Definition vctFixedSizeMatrixLoopEngines.h:812
Definition vctForwardDeclarations.h:110
Define common container related types based on the properties of a fixed size container.
Definition vctFixedSizeMatrixTraits.h:47
vctFixedStrideMatrixConstIterator< _elementType, -_colStride, _cols, -_rowStride > const_reverse_iterator
Definition vctFixedSizeMatrixTraits.h:62
@ COLSTRIDE
Definition vctFixedSizeMatrixTraits.h:74
@ ROWSTRIDE
Definition vctFixedSizeMatrixTraits.h:74
vctFixedStrideMatrixIterator< _elementType, _colStride, _cols, _rowStride > iterator
Definition vctFixedSizeMatrixTraits.h:53
@ ROWS
Definition vctFixedSizeMatrixTraits.h:67
@ LENGTH
Definition vctFixedSizeMatrixTraits.h:67
@ COLS
Definition vctFixedSizeMatrixTraits.h:67
vctFixedStrideMatrixConstIterator< _elementType, _colStride, _cols, _rowStride > const_iterator
Definition vctFixedSizeMatrixTraits.h:56
vctFixedStrideMatrixIterator< _elementType, -_colStride, _cols, -_rowStride > reverse_iterator
Definition vctFixedSizeMatrixTraits.h:59
Returns the sum of the two InputType object.
Definition vctStoreBackBinaryOperations.h:76
void cmnDeSerializeRaw(std::istream &inputStream, _elementType &data) CISST_THROW(std
Definition cmnDeSerializer.h:82
Portability across compilers and operating systems tools.
#define CISST_THROW(exceptionParameter)
Somewhat portable compilation warning message. This works with very recent versions of gcc (4....
Definition cmnPortability.h:559
Declaration of the class cmnTypeTraits.
size_t size_type
Definition vctContainerTraits.h:35
ptrdiff_t stride_type
Definition vctContainerTraits.h:37
const_iterator end(void) const
Definition vctDynamicConstMatrixBase.h:209
void vctFixedSizeMatrixBaseAssignDynamicConstMatrixBase(vctFixedSizeMatrixBase< _rows, _cols, _rowStride, _colStride, _elementType, _dataPtrType > &fixedSizeMatrix, const vctDynamicConstMatrixBase< _matrixOwnerType, _elementType > &dynamicMatrix)
Definition vctDynamicConstMatrixBase.h:1199
OwnerType::iterator iterator
Definition vctDynamicConstMatrixBase.h:92
const_iterator begin(void) const
Definition vctDynamicConstMatrixBase.h:203
vctDynamicConstMatrixBase< _matrixOwnerType, _elementType > ThisType
Definition vctDynamicConstMatrixBase.h:86
Declaration of vctFixedSizeConstMatrixBase.