cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
vctFixedSizeMatrixBase.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3 
4 /*
5  Author(s): Ofri Sadowsky, Anton Deguet
6  Created on: 2003-11-04
7 
8  (C) Copyright 2003-2015 Johns Hopkins University (JHU), All Rights Reserved.
9 
10 --- begin cisst license - do not edit ---
11 
12 This software is provided "as is" under an open source license, with
13 no warranty. The complete license can be found in license.txt and
14 http://www.cisst.org/cisst/license.txt.
15 
16 --- end cisst license ---
17 */
18 
19 #pragma once
20 #ifndef _vctFixedSizeMatrixBase_h
21 #define _vctFixedSizeMatrixBase_h
22 
31 
32 #include <cstdarg>
33 
34 
35 // forward declaration of Assign method from dynamic matrix to fixed size
36 template <vct::size_type _rows, vct::size_type _cols,
37  vct::stride_type _rowStride, vct::stride_type _colStride,
38  class _elementType, class _dataPtrType, class _matrixOwnerType>
42 
43 
44 
55 template <vct::size_type _rows, vct::size_type _cols,
56  vct::stride_type _rowStride, vct::stride_type _colStride,
57  class _elementType, class _dataPtrType>
59 <_rows, _cols, _rowStride, _colStride, _elementType, _dataPtrType>
60 {
61  public:
62  /* Declare the container-defined typed required by STL, plus the
63  types completed by our traits class */
64 
65  /* define most types from vctContainerTraits */
66  VCT_CONTAINER_TRAITS_TYPEDEFS(_elementType);
67 
68  /* documented in base class */
69  typedef vctFixedSizeMatrixBase<_rows, _cols,
70  _rowStride, _colStride, _elementType, _dataPtrType> ThisType;
71 
73  typedef vctFixedSizeConstMatrixBase<_rows, _cols, _rowStride, _colStride,
74  _elementType, _dataPtrType> BaseType;
75 
76  typedef vctFixedSizeMatrixTraits<_elementType, _rows, _cols,
77  _rowStride, _colStride> MatrixTraits;
78 
79  typedef typename MatrixTraits::iterator iterator;
83 
84  typedef typename BaseType::RowRefType RowRefType;
94 
101 
102  public:
104  inline iterator begin() {
105  return iterator(this->Data, 0);
106  }
107 
108  /* documented in base class */
109  inline const_iterator begin() const {
110  return BaseType::begin();
111  }
112 
114  inline iterator end() {
115  return iterator(this->Data) + LENGTH;
116  }
117 
118  /* documented in base class */
119  inline const_iterator end() const {
120  return BaseType::end();
121  }
122 
125  return reverse_iterator(Pointer(ROWS - 1, COLS - 1), 0);
126  }
127 
128  /* documented in base class */
130  return BaseType::rbegin();
131  }
132 
136  return reverse_iterator(this->Data - ROWSTRIDE +
137  COLSTRIDE * (COLS - 1), 0);
138  }
139 
140  /* documented in base class */
142  return BaseType::rend();
143  }
144 
145 
149  return RowRefType(this->Data + ROWSTRIDE * index);
150  }
151 
152  /* documented in base class */
154  return BaseType::operator[](index);
155  }
156 
157 
161  pointer Pointer(size_type rowIndex, size_type colIndex) {
162  return this->Data + ROWSTRIDE * rowIndex + COLSTRIDE * colIndex;
163  }
164 
168  pointer Pointer(void) {
169  return this->Data;
170  }
171 
172  /* documented in base class */
173  const_pointer Pointer(size_type rowIndex, size_type colIndex) const {
174  return BaseType::Pointer(rowIndex, colIndex);
175  }
176 
177  /* documented in base class */
178  const_pointer Pointer(void) const {
179  return BaseType::Pointer();
180  }
181 
182 
187  reference at(size_type index) throw(std::out_of_range) {
188  this->ThrowUnlessValidIndex(index);
189  return (begin())[index];
190  }
191 
192  /* documented in base class */
193  const_reference at(size_type index) const throw(std::out_of_range) {
194  return BaseType::at(index);
195  }
196 
197 
202  reference at(size_type rowIndex, size_type colIndex) throw(std::out_of_range) {
203  this->ThrowUnlessValidIndex(rowIndex, colIndex);
204  return *(Pointer(rowIndex, colIndex));
205  }
206 
207  /* documented in base class */
208  const_reference at(size_type rowIndex, size_type colIndex) const throw(std::out_of_range) {
209  return BaseType::at(rowIndex, colIndex);
210  }
211 
212 #ifndef SWIG
213 
215  reference operator()(size_type rowIndex, size_type colIndex) throw(std::out_of_range) {
216  return at(rowIndex, colIndex);
217  }
218 
219  /* documented in base class */
220  const_reference operator()(size_type rowIndex, size_type colIndex) const throw(std::out_of_range) {
221  return BaseType::operator()(rowIndex, colIndex);
222  }
223 #endif
224 
225 
231  reference Element(size_type rowIndex, size_type colIndex) {
232  return *(Pointer(rowIndex, colIndex));
233  }
234 
235  /* documented in base class */
236  const_reference Element(size_type rowIndex, size_type colIndex) const {
237  return BaseType::Element(rowIndex, colIndex);
238  }
239 
240 
245  return RowRefType(this->Data + ROWSTRIDE * index);
246  }
247 
250  return ColumnRefType(this->Data + COLSTRIDE * index);
251  }
252 
255  return DiagonalRefType(this->Data);
256  }
257 
258  /* documented in base class */
260  return BaseType::Row(index);
261  }
262 
263  /* documented in base class */
265  return BaseType::Column(index);
266  }
267 
268  /* documented in base class */
270  return BaseType::Diagonal();
271  }
273 
276  template <vct::size_type __subRows, vct::size_type __subCols>
278  Ref(const size_type startRow = 0, const size_type startCol = 0) throw (std::out_of_range) {
280  result(*this, startRow, startCol);
281  return result;
282  }
283 
284  template <vct::size_type __subRows, vct::size_type __subCols>
286  Ref(const size_type startRow = 0, const size_type startCol = 0) const throw (std::out_of_range) {
287  return BaseType::Ref(startRow, startCol);
288  }
290 
292 
293  void ExchangeRows(const size_type row1Index, const size_type row2Index) {
294  RowRefType row1( Row(row1Index) );
295  RowRefType row2( Row(row2Index) );
296  row1.SwapElementsWith(row2);
297  }
298 
300  void ExchangeColumns(const size_type col1Index, const size_type col2Index) {
301  ColumnRefType col1( Column(col1Index) );
302  ColumnRefType col2( Column(col2Index) );
303  col1.SwapElementsWith(col2);
304  }
305 
307 
308  template <size_type __rows, stride_type __rowStride, stride_type __colStride, class __dataPtrType,
309  stride_type __indexStride, class __indexDataPtrType>
312  {
314  Run(*this, inputMatrix, rowIndexVector);
315  }
316 
318  template <size_type __cols, stride_type __rowStride, stride_type __colStride, class __dataPtrType,
319  stride_type __indexStride, class __indexDataPtrType>
322  {
323  this->TransposeRef().SelectRowsFrom(inputMatrix.TransposeRef(), colIndexVector);
324  }
326 
339  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
340  void RowPermutationOf(const vctFixedSizeConstMatrixBase<_rows, _cols, __rowStride, __colStride,
341  _elementType, __dataPtrType> & inputMatrix, const index_type permutedRowIndexes[])
342  {
343  index_type thisRowIndex;
344  for (thisRowIndex = 0; thisRowIndex < ROWS; ++thisRowIndex) {
345  Row(thisRowIndex).Assign( inputMatrix.Row(permutedRowIndexes[thisRowIndex]) );
346  }
347  }
348 
361  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
362  void RowInversePermutationOf(const vctFixedSizeConstMatrixBase<_rows, _cols, __rowStride, __colStride,
363  _elementType, __dataPtrType> & inputMatrix, const index_type permutedRowIndexes[])
364  {
365  index_type thisRowIndex;
366  for (thisRowIndex = 0; thisRowIndex < ROWS; ++thisRowIndex) {
367  Row(permutedRowIndexes[thisRowIndex]).Assign( inputMatrix.Row(thisRowIndex) );
368  }
369  }
370 
383  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
384  void ColumnPermutationOf(const vctFixedSizeConstMatrixBase<_rows, _cols, __rowStride, __colStride,
385  _elementType, __dataPtrType> & inputMatrix, const index_type permutedColumnIndexes[])
386  {
387  index_type thisColumnIndex;
388  for (thisColumnIndex = 0; thisColumnIndex < COLS; ++thisColumnIndex) {
389  Column(thisColumnIndex).Assign( inputMatrix.Column(permutedColumnIndexes[thisColumnIndex]) );
390  }
391  }
392 
405  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
406  void ColumnInversePermutationOf(const vctFixedSizeConstMatrixBase<_rows, _cols, __rowStride, __colStride,
407  _elementType, __dataPtrType> & inputMatrix, const index_type permutedColumnIndexes[])
408  {
409  index_type thisColumnIndex;
410  for (thisColumnIndex = 0; thisColumnIndex < COLS; ++thisColumnIndex) {
411  Column(permutedColumnIndexes[thisColumnIndex]).Assign( inputMatrix.Column(thisColumnIndex) );
412  }
413  }
415 
416 
421  inline value_type SetAll(const value_type value) {
424  Run(*this, value);
425  return value;
426  }
427 
428 
437  inline bool Zeros(void) {
438  if (this->IsCompact()) {
439  memset(this->Pointer(), 0, this->size() * sizeof(value_type));
440  return true;
441  } else if (this->col_stride() == 1) {
442  /* memset row by row */
443  const size_type sizeOfRow = this->cols() * sizeof(value_type);
444  const stride_type rowStride = this->row_stride();
445  pointer currentPointer = this->Pointer();
446  const pointer endPointer = currentPointer + this->rows() * rowStride;
447  for (;
448  currentPointer != endPointer;
449  currentPointer += rowStride) {
450  memset(currentPointer, 0, sizeOfRow);
451  }
452  return true;
453  } else if (this->row_stride() == 1) {
454  /* memset col by col */
455  const size_type sizeOfCol = this->rows() * sizeof(value_type);
456  const stride_type colStride = this->col_stride();
457  pointer currentPointer = this->Pointer();
458  const pointer endPointer = currentPointer + this->cols() * colStride;
459  for (;
460  currentPointer != endPointer;
461  currentPointer += colStride) {
462  memset(currentPointer, 0, sizeOfCol);
463  }
464  return true;
465  } else {
466  this->SetAll(static_cast<value_type>(0));
467  return false;
468  }
469  }
470 
471 
474  template <stride_type __rowStride, stride_type __colStride, class __elementType, class __dataPtrType>
478  Run(*this, other);
479  return *this;
480  }
481 
482 
501  inline ThisType & Assign(const value_type element0, ...)
502  {
503  iterator iter = begin();
504  (*iter) = element0;
505  ++iter;
506  va_list nextArg;
507  va_start(nextArg, element0);
508  for (; iter != end(); ++iter) {
509  (*iter) = static_cast<value_type>(va_arg(nextArg, typename cmnTypeTraits<value_type>::VaArgPromotion));
510  }
511  va_end(nextArg);
512  return *this;
513  }
514 
515 
537  inline ThisType & Assign(const value_type * elements, bool inputIsRowMajor = true)
538  {
539  if (inputIsRowMajor)
540  {
541  // row-major input means that the row-stride is equal to the number of elements
542  // in a row, i.e, COLS, and the column-stride is 1.
544  this->Assign(tmpRef);
545  }
546  else
547  {
548  // column-major input means that the column-stride is equal to the number of
549  // elements in a column, i.e., ROWS, and the row-stride is 1.
551  this->Assign(tmpRef);
552  }
553  return *this;
554  }
555 
556 
562  template <class __matrixOwnerType>
565  return *this;
566  }
567 
568 
587  template <stride_type __rowStride, stride_type __colStride, class __elementType, class __dataPtrType>
588  inline ThisType & ForceAssign(const vctFixedSizeConstMatrixBase<_rows, _cols, __rowStride, __colStride,
589  __elementType, __dataPtrType> & other) {
590  return this->Assign(other);
591  }
592 
593  template <class __matrixOwnerType>
595  return this->Assign(other);
596  }
598 
599 
668  template <class __matrixOwnerType>
670  bool performSafetyChecks = vctFastCopy::PerformChecks)
671  throw(std::runtime_error)
672  {
673  return vctFastCopy::MatrixCopy(*this, source, performSafetyChecks);
674  }
675 
676  template <class __dataPtrType>
678  bool performSafetyChecks = vctFastCopy::PerformChecks)
679  throw(std::runtime_error)
680  {
681  return vctFastCopy::MatrixCopy(*this, source, performSafetyChecks);
682  }
684 
685 
686 
692 
693  /* documented in base class */
695  return BaseType::TransposeRef();
696  }
697 
698 
715  template <stride_type __input1RowStride, stride_type __input1ColStride, class __input1DataPtrType,
716  stride_type __input2RowStride, stride_type __input2ColStride, class __input2DataPtrType>
717  inline ThisType & SumOf(const vctFixedSizeConstMatrixBase<_rows, _cols, __input1RowStride, __input1ColStride,
718  value_type, __input1DataPtrType> & input1Matrix,
719  const vctFixedSizeConstMatrixBase<_rows, _cols, __input2RowStride, __input2ColStride,
720  value_type, __input2DataPtrType> & input2Matrix) {
722  ::Run(*this, input1Matrix, input2Matrix);
723  return *this;
724  }
725 
726  /* documented above */
727  template <stride_type __input1RowStride, stride_type __input1ColStride, class __input1DataPtrType,
728  stride_type __input2RowStride, stride_type __input2ColStride, class __input2DataPtrType>
729  inline ThisType & DifferenceOf(const vctFixedSizeConstMatrixBase<_rows, _cols, __input1RowStride, __input1ColStride,
730  value_type, __input1DataPtrType> & input1Matrix,
731  const vctFixedSizeConstMatrixBase<_rows, _cols, __input2RowStride, __input2ColStride,
732  value_type, __input2DataPtrType> & input2Matrix) {
734  ::Run(*this, input1Matrix, input2Matrix);
735  return *this;
736  }
737 
738  /* documented above */
739  template <stride_type __input1RowStride, stride_type __input1ColStride, class __input1DataPtrType,
740  stride_type __input2RowStride, stride_type __input2ColStride, class __input2DataPtrType>
741  inline ThisType & ElementwiseProductOf(const vctFixedSizeConstMatrixBase<_rows, _cols, __input1RowStride, __input1ColStride,
742  value_type, __input1DataPtrType> & input1Matrix,
743  const vctFixedSizeConstMatrixBase<_rows, _cols, __input2RowStride, __input2ColStride,
744  value_type, __input2DataPtrType> & input2Matrix) {
746  ::Run(*this, input1Matrix, input2Matrix);
747  return *this;
748  }
749 
750  /* documented above */
751  template <stride_type __input1RowStride, stride_type __input1ColStride, class __input1DataPtrType,
752  stride_type __input2RowStride, stride_type __input2ColStride, class __input2DataPtrType>
753  inline ThisType & ElementwiseRatioOf(const vctFixedSizeConstMatrixBase<_rows, _cols, __input1RowStride, __input1ColStride,
754  value_type, __input1DataPtrType> & input1Matrix,
755  const vctFixedSizeConstMatrixBase<_rows, _cols, __input2RowStride, __input2ColStride,
756  value_type, __input2DataPtrType> & input2Matrix) {
758  ::Run(*this, input1Matrix, input2Matrix);
759  return *this;
760  }
761 
762  /* documented above */
763  template <stride_type __input1RowStride, stride_type __input1ColStride, class __input1DataPtrType,
764  stride_type __input2RowStride, stride_type __input2ColStride, class __input2DataPtrType>
765  inline ThisType & ElementwiseMinOf(const vctFixedSizeConstMatrixBase<_rows, _cols, __input1RowStride, __input1ColStride,
766  value_type, __input1DataPtrType> & input1Matrix,
767  const vctFixedSizeConstMatrixBase<_rows, _cols, __input2RowStride, __input2ColStride,
768  value_type, __input2DataPtrType> & input2Matrix) {
770  ::Run(*this, input1Matrix, input2Matrix);
771  return *this;
772  }
773 
774  /* documented above */
775  template <stride_type __input1RowStride, stride_type __input1ColStride, class __input1DataPtrType,
776  stride_type __input2RowStride, stride_type __input2ColStride, class __input2DataPtrType>
777  inline ThisType & ElementwiseMaxOf(const vctFixedSizeConstMatrixBase<_rows, _cols, __input1RowStride, __input1ColStride,
778  value_type, __input1DataPtrType> & input1Matrix,
779  const vctFixedSizeConstMatrixBase<_rows, _cols, __input2RowStride, __input2ColStride,
780  value_type, __input2DataPtrType> & input2Matrix) {
782  ::Run(*this, input1Matrix, input2Matrix);
783  return *this;
784  }
786 
787 
788 
805  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
809  Run(*this, otherMatrix);
810  return *this;
811  }
812 
813  /* documented above */
814  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
818  Run(*this, otherMatrix);
819  return *this;
820  }
821 
822  /* documented above */
823  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
827  Run(*this, otherMatrix);
828  return *this;
829  }
830 
831  /* documented above */
832  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
836  Run(*this, otherMatrix);
837  return *this;
838  }
839 
840  /* documented above */
841  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
845  Run(*this, otherMatrix);
846  return *this;
847  }
848 
849  /* documented above */
850  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
854  Run(*this, otherMatrix);
855  return *this;
856  }
857 
858  /* documented above */
859  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
861  return this->Add(otherMatrix);
862  }
863 
864  /* documented above */
865  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
867  return this->Subtract(otherMatrix);
868  }
870 
871 
872 
888  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
890  const value_type scalar) {
893  Run(*this, matrix, scalar);
894  return *this;
895  }
896 
897  /* documented above */
898  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
900  const value_type scalar) {
903  Run(*this, matrix, scalar);
904  return *this;
905  }
906 
907  /* documented above */
908  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
910  const value_type scalar) {
913  Run(*this, matrix, scalar);
914  return *this;
915  }
916 
917  /* documented above */
918  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
920  const value_type scalar) {
923  Run(*this, matrix, scalar);
924  return *this;
925  }
926 
927  /* documented above */
928  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
930  const value_type upperBound) {
933  Run(*this, matrix, upperBound);
934  return *this;
935  }
936 
937  /* documented above */
938  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
940  const value_type lowerBound) {
943  Run(*this, matrix, lowerBound);
944  return *this;
945  }
947 
948 
949 
965  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
966  inline ThisType & SumOf(const value_type scalar,
970  Run(*this, scalar, matrix);
971  return *this;
972  }
973 
974  /* documented above */
975  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
976  inline ThisType & DifferenceOf(const value_type scalar,
980  Run(*this, scalar, matrix);
981  return *this;
982  }
983 
984  /* documented above */
985  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
986  inline ThisType & ProductOf(const value_type scalar,
990  Run(*this, scalar, matrix);
991  return *this;
992  }
993 
994  /* documented above */
995  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
996  inline ThisType & RatioOf(const value_type scalar,
1000  Run(*this, scalar, matrix);
1001  return *this;
1002  }
1003 
1004  /* documented above */
1005  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
1006  inline ThisType & ClippedAboveOf(const value_type upperBound,
1010  Run(*this, upperBound, matrix);
1011  return *this;
1012  }
1013 
1014  /* documented above */
1015  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
1016  inline ThisType & ClippedBelowOf(const value_type lowerBound,
1020  Run(*this, lowerBound, matrix);
1021  return *this;
1022  }
1024 
1040  inline ThisType & Add(const value_type scalar) {
1043  Run(*this, scalar);
1044  return *this;
1045  }
1046 
1047  /* documented above */
1048  inline ThisType & Subtract(const value_type scalar) {
1051  Run(*this, scalar);
1052  return *this;
1053  }
1054 
1055  /* documented above */
1056  inline ThisType & Multiply(const value_type scalar) {
1059  Run(*this, scalar);
1060  return *this;
1061  }
1062 
1063  /* documented above */
1064  inline ThisType & Divide(const value_type scalar) {
1067  Run(*this, scalar);
1068  return *this;
1069  }
1070 
1071  /* documented above */
1072  inline ThisType & ClipAbove(const value_type upperBound) {
1075  Run(*this, upperBound);
1076  return *this;
1077  }
1078 
1079  /* documented above */
1080  inline ThisType & ClipBelow(const value_type lowerBound) {
1083  Run(*this, lowerBound);
1084  return *this;
1085  }
1086 
1087  /* documented above */
1088  inline ThisType & operator += (const value_type scalar) {
1089  return this->Add(scalar);
1090  }
1091 
1092  /* documented above */
1093  inline ThisType & operator -= (const value_type scalar) {
1094  return this->Subtract(scalar);
1095  }
1096 
1097  /* documented above */
1098  inline ThisType & operator *= (const value_type scalar) {
1099  return this->Multiply(scalar);
1100  }
1101 
1102  /* documented above */
1103  inline ThisType & operator /= (const value_type scalar) {
1104  return this->Divide(scalar);
1105  }
1107 
1108 
1109  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
1110  inline ThisType & AddProductOf(const value_type scalar,
1112  {
1114  MioSiMi<
1117  Run(*this, scalar, otherMatrix);
1118  return *this;
1119  }
1120 
1121 
1122  template <stride_type __rowStride1, stride_type __colStride1, class __dataPtrType1,
1123  stride_type __rowStride2, stride_type __colStride2, class __dataPtrType2>
1126  {
1128  MioMiMi<
1131  Run(*this, matrix1, matrix2);
1132  return *this;
1133  }
1134 
1135 
1149  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
1153  Run(*this, otherMatrix);
1154  return *this;
1155  }
1156 
1157  /* documented above */
1158  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
1162  Run(*this, otherMatrix);
1163  return *this;
1164  }
1165 
1166  /* documented above */
1167  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
1171  Run(*this, otherMatrix);
1172  return *this;
1173  }
1174 
1175  /* documented above */
1176  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
1180  Run(*this, otherMatrix);
1181  return *this;
1182  }
1184 
1185 
1186 
1187  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
1189  Assign(otherMatrix.TransposeRef());
1190  return *this;
1191  }
1192 
1193 
1194 
1205  inline ThisType & AbsSelf(void) {
1208  Run(*this);
1209  return *this;
1210  }
1211 
1212  /* documented above */
1213  inline ThisType & NegationSelf(void) {
1216  Run(*this);
1217  return *this;
1218  }
1219 
1220  /* documented above */
1221  inline ThisType & FloorSelf(void) {
1224  Run(*this);
1225  return *this;
1226  }
1227 
1228  /* documented above */
1229  inline ThisType & CeilSelf(void) {
1232  Run(*this);
1233  return *this;
1234  }
1236 
1237 
1246  template <size_type __input1Cols, stride_type __input1RowStride, stride_type __input1ColStride, class __input1DataPtrType,
1247  stride_type __input2RowStride, stride_type __input2ColStride, class __input2DataPtrType>
1248  void ProductOf(const vctFixedSizeConstMatrixBase<_rows, __input1Cols, __input1RowStride, __input1ColStride,
1249  _elementType, __input1DataPtrType> & input1Matrix,
1250  const vctFixedSizeConstMatrixBase<__input1Cols, _cols, __input2RowStride, __input2ColStride,
1251  _elementType, __input2DataPtrType> & input2Matrix) {
1252  typedef vctFixedSizeConstMatrixBase<_rows, __input1Cols, __input1RowStride, __input1ColStride,
1253  _elementType, __input1DataPtrType> Input1MatrixType;
1254  typedef vctFixedSizeConstMatrixBase<__input1Cols, _cols, __input2RowStride, __input2ColStride,
1255  _elementType, __input2DataPtrType> Input2MatrixType;
1256  typedef typename Input1MatrixType::ConstRowRefType Input1RowRefType;
1257  typedef typename Input2MatrixType::ConstColumnRefType Input2ColumnRefType;
1260  Run((*this), input1Matrix, input2Matrix);
1261  }
1262 
1265  template <stride_type __stride1, class __dataPtrType1, stride_type __stride2, class __dataPtrType2>
1268  {
1271  typedef typename InputColumnType::ColConstMatrixRefType ColMatrixType;
1272  typedef typename InputRowType::RowConstMatrixRefType RowMatrixType;
1273  const ColMatrixType colMatrix = columnVector.AsColMatrix();
1274  const RowMatrixType rowMatrix = rowVector.AsRowMatrix();
1275  this->ProductOf(colMatrix, rowMatrix);
1276  }
1277 
1278 
1292  template <size_type _subRows, size_type _subCols>
1294  {
1295  public:
1298  };
1299 
1302  bool FromStreamRaw(std::istream & inputStream, const char delimiter = ' ')
1303  {
1304  const size_type myRows = this->rows();
1305  const size_type myCols = this->cols();
1306  size_type indexRow, indexCol;
1307  char c;
1308  bool valid = true;
1309  ThisType temp;
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()) {
1314  valid = false;
1315  inputStream.clear();
1316  }
1317  // Look for the delimiter
1318  if (valid && !isspace(delimiter) && (indexCol < myCols-1)) {
1319  inputStream >> c;
1320  if (c != delimiter)
1321  valid = false;
1322  }
1323  } // end for cols
1324  // Look for the delimiter
1325  if (valid && !isspace(delimiter) && (indexRow < myRows-1)) {
1326  inputStream >> c;
1327  if (c != delimiter)
1328  valid = false;
1329  }
1330  } // end for rows
1331  if (valid) {
1332  // Only update the object if the parsing was successful for all elements.
1333  Assign(temp);
1334  }
1335  return valid;
1336  }
1337 
1339  void DeSerializeRaw(std::istream & inputStream)
1340  {
1341  const size_type myRows = this->rows();
1342  const size_type myCols = this->cols();
1343  size_type indexRow, indexCol;
1344 
1345  for (indexRow = 0; indexRow < myRows; ++indexRow) {
1346  for (indexCol = 0; indexCol < myCols; ++indexCol) {
1347  cmnDeSerializeRaw(inputStream, this->Element(indexRow, indexCol));
1348  }
1349  }
1350  }
1351 
1352 };
1353 
1354 
1355 #endif // _vctFixedSizeMatrixBase_h
size_t index_type
Definition: vctContainerTraits.h:36
ThisType & ForceAssign(const vctDynamicConstMatrixBase< __matrixOwnerType, value_type > &other)
Definition: vctFixedSizeMatrixBase.h:594
void ExchangeRows(const size_type row1Index, const size_type row2Index)
Definition: vctFixedSizeMatrixBase.h:293
A template for a fixed size matrix with fixed spacing in memory.
Definition: vctFixedSizeConstMatrixBase.h:103
ThisType & SumOf(const value_type scalar, const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix)
Definition: vctFixedSizeMatrixBase.h:966
void RowPermutationOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, _elementType, __dataPtrType > &inputMatrix, const index_type permutedRowIndexes[])
Definition: vctFixedSizeMatrixBase.h:340
vctFixedSizeMatrixRef< value_type, _subRows, _subCols, ROWSTRIDE, COLSTRIDE > Type
Definition: vctFixedSizeMatrixBase.h:1297
RefTransposeType TransposeRef(void)
Definition: vctFixedSizeConstMatrixRef.h:182
vctFixedSizeConstMatrixBase< _rows, _cols, _rowStride, _colStride, _elementType, _dataPtrType > BaseType
Definition: vctFixedSizeMatrixBase.h:74
ThisType & AddProductOf(const value_type scalar, const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition: vctFixedSizeMatrixBase.h:1110
Definition: vctFixedSizeMatrixTraits.h:67
const_reference at(size_type rowIndex, size_type colIndex) const
Definition: vctFixedSizeMatrixBase.h:208
ThisType & Subtract(const value_type scalar)
Definition: vctFixedSizeMatrixBase.h:1048
ThisType & Assign(const value_type *elements, bool inputIsRowMajor=true)
Definition: vctFixedSizeMatrixBase.h:537
void ProductOf(const vctFixedSizeConstMatrixBase< _rows, __input1Cols, __input1RowStride, __input1ColStride, _elementType, __input1DataPtrType > &input1Matrix, const vctFixedSizeConstMatrixBase< __input1Cols, _cols, __input2RowStride, __input2ColStride, _elementType, __input2DataPtrType > &input2Matrix)
Definition: vctFixedSizeMatrixBase.h:1248
ConstDiagonalRefType Diagonal(void) const
Definition: vctFixedSizeMatrixBase.h:269
vctFixedSizeMatrixTraits< _elementType, _rows, _cols, _rowStride, _colStride > MatrixTraits
Definition: vctFixedSizeMatrixBase.h:77
ThisType & CeilOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition: vctFixedSizeMatrixBase.h:1177
Portability across compilers and operating systems tools.
Definition: vctFixedSizeMatrixBase.h:1293
An implementation of the ``abstract'' vctFixedSizeVectorBase.
Definition: vctFixedSizeVectorRef.h:46
Definition: vctFixedSizeMatrixBase.h:99
iterator begin()
Definition: vctFixedSizeMatrixBase.h:104
ThisType & ElementwiseDivide(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition: vctFixedSizeMatrixBase.h:833
bool Zeros(void)
Definition: vctFixedSizeMatrixBase.h:437
ThisType & Assign(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, __elementType, __dataPtrType > &other)
Definition: vctFixedSizeMatrixBase.h:475
ThisType & SwapElementsWith(vctFixedSizeVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector)
Definition: vctFixedSizeVectorBase.h:958
void ColumnInversePermutationOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, _elementType, __dataPtrType > &inputMatrix, const index_type permutedColumnIndexes[])
Definition: vctFixedSizeMatrixBase.h:406
Definition: vctFixedSizeMatrixLoopEngines.h:690
ThisType & Add(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition: vctFixedSizeMatrixBase.h:806
ThisType & SumOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix, const value_type scalar)
Definition: vctFixedSizeMatrixBase.h:889
ThisType & AbsSelf(void)
Definition: vctFixedSizeMatrixBase.h:1205
void RowInversePermutationOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, _elementType, __dataPtrType > &inputMatrix, const index_type permutedRowIndexes[])
Definition: vctFixedSizeMatrixBase.h:362
const_reference operator()(size_type rowIndex, size_type colIndex) const
Definition: vctFixedSizeMatrixBase.h:220
reference at(size_type index)
Definition: vctFixedSizeMatrixBase.h:187
ThisType & DifferenceOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix, const value_type scalar)
Definition: vctFixedSizeMatrixBase.h:899
ThisType & ProductOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix, const value_type scalar)
Definition: vctFixedSizeMatrixBase.h:909
value_type SetAll(const value_type value)
Definition: vctFixedSizeMatrixBase.h:421
ThisType & operator+=(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition: vctFixedSizeMatrixBase.h:860
cmnVaArgPromotion< _elementType >::Type VaArgPromotion
Definition: cmnTypeTraits.h:167
Definition: vctFixedSizeMatrixLoopEngines.h:137
An implementation of the ``abstract'' vctFixedSizeConstVectorBase.
Definition: vctFixedSizeConstVectorRef.h:50
BaseType::ColumnValueType ColumnValueType
Definition: vctFixedSizeMatrixBase.h:93
Definition: vctFixedSizeMatrixTraits.h:67
BaseType::RowRefType RowRefType
Definition: vctFixedSizeMatrixBase.h:84
size_t size_type
Definition: vctContainerTraits.h:35
DiagonalRefType Diagonal(void)
Definition: vctFixedSizeMatrixBase.h:254
Definition: vctFixedStrideMatrixIterator.h:361
MatrixTraits::const_reverse_iterator const_reverse_iterator
Definition: vctFixedSizeMatrixBase.h:82
reference operator()(size_type rowIndex, size_type colIndex)
Definition: vctFixedSizeMatrixBase.h:215
ThisType & ClipBelow(const value_type lowerBound)
Definition: vctFixedSizeMatrixBase.h:1080
MatrixTraits::iterator iterator
Definition: vctFixedSizeMatrixBase.h:79
const_iterator end() const
Definition: vctFixedSizeMatrixBase.h:119
VCT_CONTAINER_TRAITS_TYPEDEFS(_elementType)
BaseType::ConstDiagonalRefType ConstDiagonalRefType
Definition: vctFixedSizeMatrixBase.h:89
Definition: vctFixedSizeMatrixBase.h:100
BaseType::ConstRowRefType ConstRowRefType
Definition: vctFixedSizeMatrixBase.h:86
static const bool PerformChecks
Definition: vctFastCopy.h:123
BaseType::ConstRefTransposeType ConstRefTransposeType
Definition: vctFixedSizeMatrixBase.h:91
Definition: vctFixedSizeMatrixBase.h:97
BaseType::ColumnRefType ColumnRefType
Definition: vctFixedSizeMatrixBase.h:85
void ColumnPermutationOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, _elementType, __dataPtrType > &inputMatrix, const index_type permutedColumnIndexes[])
Definition: vctFixedSizeMatrixBase.h:384
ThisType & AbsOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition: vctFixedSizeMatrixBase.h:1150
ThisType & CeilSelf(void)
Definition: vctFixedSizeMatrixBase.h:1229
ThisType & Multiply(const value_type scalar)
Definition: vctFixedSizeMatrixBase.h:1056
Returns the sum of the two InputType object.
Definition: vctStoreBackBinaryOperations.h:76
ThisType & NegationOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition: vctFixedSizeMatrixBase.h:1159
ThisType & Assign(const vctFixedSizeConstVectorBase< _size, __stride, __elementType, __dataPtrType > &other)
Definition: vctFixedSizeVectorBase.h:274
MatrixTraits::const_iterator const_iterator
Definition: vctFixedSizeMatrixBase.h:80
BaseType::DiagonalRefType DiagonalRefType
Definition: vctFixedSizeMatrixBase.h:88
Matrix iterator.
Definition: vctFixedStrideMatrixIterator.h:90
Definition: vctFixedSizeMatrixLoopEngines.h:267
reverse_iterator rbegin()
Definition: vctFixedSizeMatrixBase.h:124
Definition: vctDynamicConstMatrixBase.h:77
Implementation of a fixed-size vector using template metaprogramming.
Definition: vctFixedSizeVector.h:52
bool FastCopyOf(const vctDynamicConstMatrixBase< __matrixOwnerType, value_type > &source, bool performSafetyChecks=vctFastCopy::PerformChecks)
Definition: vctFixedSizeMatrixBase.h:669
MatrixTraits::reverse_iterator reverse_iterator
Definition: vctFixedSizeMatrixBase.h:81
ThisType & Subtract(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition: vctFixedSizeMatrixBase.h:815
static void Run(_outputMatrixType &outputMatrix, const _inputMatrixType &inputMatrix, const _indexVectorType &indexVector)
Definition: vctFixedSizeMatrixLoopEngines.h:814
reference Element(size_type rowIndex, size_type colIndex)
Definition: vctFixedSizeMatrixBase.h:231
static bool MatrixCopy(_destinationMatrixType &destination, const _sourceMatrixType &source, bool performSafetyChecks)
Definition: vctFastCopy.h:212
bool FastCopyOf(const vctFixedSizeConstMatrixBase< ROWS, COLS, ROWSTRIDE, COLSTRIDE, value_type, __dataPtrType > &source, bool performSafetyChecks=vctFastCopy::PerformChecks)
Definition: vctFixedSizeMatrixBase.h:677
A template for a fixed size matrix with fixed spacings in memory.
Definition: vctFixedSizeMatrixBase.h:58
Definition: vctFixedSizeMatrixTraits.h:67
ThisType & NegationSelf(void)
Definition: vctFixedSizeMatrixBase.h:1213
const_reverse_iterator rend() const
Definition: vctFixedSizeMatrixBase.h:141
reverse_iterator rend()
Definition: vctFixedSizeMatrixBase.h:135
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
RowRefType operator[](size_type index)
Definition: vctFixedSizeMatrixBase.h:148
Definition: vctFixedSizeMatrixLoopEngines.h:365
ThisType & ClippedAboveOf(const value_type upperBound, const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix)
Definition: vctFixedSizeMatrixBase.h:1006
ThisType & ProductOf(const value_type scalar, const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix)
Definition: vctFixedSizeMatrixBase.h:986
ThisType & operator-=(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition: vctFixedSizeMatrixBase.h:866
Declaration of the class cmnTypeTraits.
void cmnDeSerializeRaw(std::istream &inputStream, _elementType &data)
Definition: cmnDeSerializer.h:82
ThisType & TransposeOf(const vctFixedSizeConstMatrixBase< _cols, _rows, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition: vctFixedSizeMatrixBase.h:1188
Implement operation of the form for fixed size matrices.
Definition: vctFixedSizeMatrixLoopEngines.h:591
RowConstMatrixRefType AsRowMatrix(void) const
Definition: vctFixedSizeConstVectorBase.h:399
An implementation of the ``abstract'' vctFixedSizeMatrixBase.
Definition: vctFixedSizeMatrixRef.h:46
ConstRefTransposeType TransposeRef(void) const
Definition: vctFixedSizeMatrixBase.h:694
ThisType & operator*=(const value_type scalar)
Definition: vctFixedSizeMatrixBase.h:1098
Definition: vctFixedSizeMatrixTraits.h:74
ThisType & ElementwiseMax(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition: vctFixedSizeMatrixBase.h:851
RowRefType Row(size_type index)
Definition: vctFixedSizeMatrixBase.h:244
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 & operator/=(const value_type scalar)
Definition: vctFixedSizeMatrixBase.h:1103
ConstColumnRefType Column(size_type index) const
Definition: vctFixedSizeMatrixBase.h:264
ConstRefTransposeType TransposeRef(void) const
Definition: vctFixedSizeConstMatrixRef.h:172
Definition: vctFixedSizeMatrixTraits.h:74
ThisType & Assign(const value_type element0,...)
Definition: vctFixedSizeMatrixBase.h:501
ThisType & FloorOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition: vctFixedSizeMatrixBase.h:1168
ConstRowRefType operator[](size_type index) const
Definition: vctFixedSizeMatrixBase.h:153
void DeSerializeRaw(std::istream &inputStream)
Definition: vctFixedSizeMatrixBase.h:1339
const_pointer Pointer(void) const
Definition: vctFixedSizeMatrixBase.h:178
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
void vctFixedSizeMatrixBaseAssignDynamicConstMatrixBase(vctFixedSizeMatrixBase< _rows, _cols, _rowStride, _colStride, _elementType, _dataPtrType > &fixedSizeMatrix, const vctDynamicConstMatrixBase< _matrixOwnerType, _elementType > &dynamicMatrix)
Definition: vctDynamicConstMatrixBase.h:1199
Definition: vctFixedSizeMatrixBase.h:96
const_reference at(size_type index) const
Definition: vctFixedSizeMatrixBase.h:193
ThisType & ClippedAboveOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix, const value_type upperBound)
Definition: vctFixedSizeMatrixBase.h:929
const_reference Element(size_type rowIndex, size_type colIndex) const
Definition: vctFixedSizeMatrixBase.h:236
ConstRowRefType Row(size_type index) const
Definition: vctFixedSizeMatrixBase.h:259
ThisType & Divide(const value_type scalar)
Definition: vctFixedSizeMatrixBase.h:1064
iterator end()
Definition: vctFixedSizeMatrixBase.h:114
void ExchangeColumns(const size_type col1Index, const size_type col2Index)
Definition: vctFixedSizeMatrixBase.h:300
bool FromStreamRaw(std::istream &inputStream, const char delimiter= ' ')
Definition: vctFixedSizeMatrixBase.h:1302
ptrdiff_t stride_type
Definition: vctContainerTraits.h:37
void SelectColsFrom(const vctFixedSizeConstMatrixBase< _rows, __cols, __rowStride, __colStride, _elementType, __dataPtrType > &inputMatrix, const vctFixedSizeConstVectorBase< _cols, __indexStride, index_type, __indexDataPtrType > &colIndexVector)
Definition: vctFixedSizeMatrixBase.h:320
Definition: vctFixedSizeMatrixLoopEngines.h:185
ThisType & ClippedBelowOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix, const value_type lowerBound)
Definition: vctFixedSizeMatrixBase.h:939
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
ThisType & ForceAssign(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, __elementType, __dataPtrType > &other)
Definition: vctFixedSizeMatrixBase.h:588
ThisType & ClippedBelowOf(const value_type lowerBound, const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix)
Definition: vctFixedSizeMatrixBase.h:1016
vctFixedSizeMatrixRef< _elementType, __subRows, __subCols, _rowStride, _colStride > Ref(const size_type startRow=0, const size_type startCol=0)
Definition: vctFixedSizeMatrixBase.h:278
ThisType & RatioOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix, const value_type scalar)
Definition: vctFixedSizeMatrixBase.h:919
const_pointer Pointer(size_type rowIndex, size_type colIndex) const
Definition: vctFixedSizeMatrixBase.h:173
const_reverse_iterator rbegin() const
Definition: vctFixedSizeMatrixBase.h:129
An implementation of the ``abstract'' vctFixedSizeConstMatrixBase.
Definition: vctFixedSizeConstMatrixRef.h:50
A template for a fixed length vector with fixed spacing in memory.
Definition: vctFixedSizeConstVectorBase.h:107
void SelectRowsFrom(const vctFixedSizeConstMatrixBase< __rows, _cols, __rowStride, __colStride, _elementType, __dataPtrType > &inputMatrix, const vctFixedSizeConstVectorBase< _rows, __indexStride, index_type, __indexDataPtrType > &rowIndexVector)
Definition: vctFixedSizeMatrixBase.h:310
Definition: vctFixedSizeMatrixLoopEngines.h:219
vctFixedSizeConstMatrixRef< _elementType, __subRows, __subCols, _rowStride, _colStride > Ref(const size_type startRow=0, const size_type startCol=0) const
Definition: vctFixedSizeMatrixBase.h:286
ThisType & Assign(const vctDynamicConstMatrixBase< __matrixOwnerType, value_type > &other)
Definition: vctFixedSizeMatrixBase.h:563
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 & 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
void OuterProductOf(const vctFixedSizeConstVectorBase< _rows, __stride1, _elementType, __dataPtrType1 > &columnVector, const vctFixedSizeConstVectorBase< _cols, __stride2, _elementType, __dataPtrType2 > &rowVector)
Definition: vctFixedSizeMatrixBase.h:1266
ThisType & ElementwiseMin(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition: vctFixedSizeMatrixBase.h:842
Definition: vctFixedSizeMatrixLoopEngines.h:78
Returns the product of the two InputType object.
Definition: vctBinaryOperations.h:116
ColumnRefType Column(size_type index)
Definition: vctFixedSizeMatrixBase.h:249
reference at(size_type rowIndex, size_type colIndex)
Definition: vctFixedSizeMatrixBase.h:202
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
Define common container related types based on the properties of a fixed size container.
Definition: vctFixedSizeMatrixTraits.h:46
Implement operation of the form for fixed size matrices.
Definition: vctFixedSizeMatrixLoopEngines.h:517
BaseType::ConstColumnRefType ConstColumnRefType
Definition: vctFixedSizeMatrixBase.h:87
BaseType::RefTransposeType RefTransposeType
Definition: vctFixedSizeMatrixBase.h:90
vctFixedSizeMatrixBase< _rows, _cols, _rowStride, _colStride, _elementType, _dataPtrType > ThisType
Definition: vctFixedSizeMatrixBase.h:70
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
ThisType & DifferenceOf(const value_type scalar, const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix)
Definition: vctFixedSizeMatrixBase.h:976
BaseType::RowValueType RowValueType
Definition: vctFixedSizeMatrixBase.h:92
Definition: vctFixedSizeMatrixBase.h:96
ThisType & Add(const value_type scalar)
Definition: vctFixedSizeMatrixBase.h:1040
ColConstMatrixRefType AsColMatrix(void) const
Definition: vctFixedSizeConstVectorBase.h:404
const_iterator begin() const
Definition: vctFixedSizeMatrixBase.h:109
pointer Pointer(size_type rowIndex, size_type colIndex)
Definition: vctFixedSizeMatrixBase.h:161
ThisType & RatioOf(const value_type scalar, const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix)
Definition: vctFixedSizeMatrixBase.h:996
ThisType & FloorSelf(void)
Definition: vctFixedSizeMatrixBase.h:1221
Declaration of vctFixedSizeConstMatrixBase.
Definition: vctFixedSizeMatrixLoopEngines.h:316
pointer Pointer(void)
Definition: vctFixedSizeMatrixBase.h:168