cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
vctFixedSizeVectorBase.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-09-30
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 _vctFixedSizeVectorBase_h
21 #define _vctFixedSizeVectorBase_h
22 
30 
31 #include <cstdarg>
32 
33 
34 
35 #ifndef DOXYGEN
36 // forward declaration of auxiliary function to multiply matrix*vector
37 template <vct::size_type _resultSize, vct::stride_type _resultStride, class _resultElementType, class _resultDataPtrType,
38  vct::size_type _matrixCols, vct::stride_type _matrixRowStride, vct::stride_type _matrixColStride, class _matrixDataPtrType,
39  vct::stride_type _vectorStride, class _vectorDataPtrType>
40 inline void MultiplyMatrixVector(
42  const vctFixedSizeConstMatrixBase<_resultSize, _matrixCols, _matrixRowStride, _matrixColStride,
43  _resultElementType, _matrixDataPtrType> & matrix,
45 
46 // forward declaration of auxiliary function to multiply vector*matrix
47 template <vct::size_type _resultSize, vct::stride_type _resultStride, class _resultElementType, class _resultDataPtrType,
48  vct::size_type _vectorSize, vct::stride_type _vectorStride, class _vectorDataPtrType,
49  vct::stride_type _matrixRowStride, vct::stride_type _matrixColStride, class _matrixDataPtrType >
50 inline void MultiplyVectorMatrix(
53  const vctFixedSizeConstMatrixBase<_vectorSize, _resultSize, _matrixRowStride, _matrixColStride,
54  _resultElementType, _matrixDataPtrType> & matrix);
55 
56 // forward declaration of Assign method from dynamic vector to fixed size
57 template <vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType, class _vectorOwnerType>
61 
62 #endif // DOXYGEN
63 
64 
75 template <vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
76 class vctFixedSizeVectorBase : public vctFixedSizeConstVectorBase<_size, _stride, _elementType, _dataPtrType>
77 {
78  public:
79  /* define most types from vctContainerTraits */
80  VCT_CONTAINER_TRAITS_TYPEDEFS(_elementType);
81 
86  /* documented in the base class */
90  typedef typename BaseType::CopyType CopyType;
92 
93  /* Declare the container-defined typed required by STL, plus the
94  types completed by our traits class */
95  typedef typename VectorTraits::iterator iterator;
99 
105 
110 
113  enum {SIZEMINUSONE = SIZE - 1};
114 
117  inline iterator begin(void) {
118  return iterator(this->Data);
119  }
120 
121 
122  /* documented in base class */
123  inline const_iterator begin(void) const {
124  return BaseType::begin();
125  }
126 
127 
130  iterator end(void) {
131  return iterator(this->Data + STRIDE * SIZE);
132  }
133 
134 
135  /* documented in base class */
136  inline const_iterator end(void) const {
137  return BaseType::end();
138  }
139 
140 
144  return reverse_iterator(this->Data + STRIDE * (SIZE - 1));
145  }
146 
147 
148  /* documented in base class */
150  return BaseType::rbegin();
151  }
152 
153 
157  return reverse_iterator(this->Data - STRIDE);
158  }
159 
160 
161  /* documented in base class */
163  return BaseType::rend();
164  }
165 
166 
169  reference operator[](size_type index) {
170  return *(Pointer(index));
171  }
172 
173 
174  /* documented in base class */
175  const_reference operator[](size_type index) const {
176  return BaseType::operator[](index);
177  }
178 
185  reference at(size_type index) throw(std::out_of_range) {
186  this->ThrowUnlessValidIndex(index);
187  return *(Pointer(index));
188  }
189 
190  /* documented in base class */
191  const_reference at(size_type index) const throw(std::out_of_range) {
192  return BaseType::at(index);
193  }
194 
195 #ifndef SWIG
196 
198  reference operator()(size_type index) throw(std::out_of_range) {
199  return at(index);
200  }
201 
202  /* documented in base class */
203  const_reference operator()(size_type index) const throw(std::out_of_range) {
204  return BaseType::operator()(index);
205  }
206 #endif
207 
208 
213  reference Element(size_type index) {
214  return *(Pointer(index));
215  }
216 
217  /* documented in base class */
218  const_reference Element(size_type index) const {
219  return BaseType::Element(index);
220  }
221 
222 
226  pointer Pointer(size_type index = 0) {
227  return this->Data + STRIDE * index;
228  }
229 
230 
231  /* documented in base class */
232  const_pointer Pointer(size_type index = 0) const {
233  return BaseType::Pointer(index);
234  }
235 
236 
241  inline value_type SetAll(const value_type & value) {
243  SoVoSi<typename vctBinaryOperations<value_type>::SecondOperand>::
244  Unfold(*this, value);
245  }
246 
247 
256  inline bool Zeros(void) {
257  if (this->IsCompact()) {
258  memset(this->Pointer(), 0, this->size() * sizeof(value_type));
259  return true;
260  } else {
261  this->SetAll(static_cast<value_type>(0));
262  return false;
263  }
264  }
265 
266 
273  template <stride_type __stride, class __elementType, class __dataPtrType>
276  VoVi< typename vctUnaryOperations<value_type, __elementType>::Identity >::
277  Unfold(*this, other);
278  return *this;
279  }
280 
281  template <stride_type __stride, class __elementType, class __dataPtrType>
283  return this->Assign(other);
284  }
286 
299  inline ThisType & Assign(const value_type element0) throw(std::runtime_error)
300  {
301  if (this->size() != 1) {
302  cmnThrow(std::runtime_error("Mismatch between number of arguments assigned (1) and vector size"));
303  }
304  (*this)[0] = element0;
305  return *this;
306  }
307 
308  inline ThisType & Assign(const value_type element0, const value_type element1) throw(std::runtime_error)
309  {
310  if (this->size() != 2) {
311  cmnThrow(std::runtime_error("Mismatch between number of arguments assigned (2) and vector size"));
312  }
313  (*this)[0] = element0;
314  (*this)[1] = element1;
315  return *this;
316  }
317 
318  inline ThisType & Assign(const value_type element0, const value_type element1,
319  const value_type element2) throw(std::runtime_error)
320  {
321  if (this->size() != 3) {
322  cmnThrow(std::runtime_error("Mismatch between number of arguments assigned (3) and vector size"));
323  }
324  (*this)[0] = element0;
325  (*this)[1] = element1;
326  (*this)[2] = element2;
327  return *this;
328  }
329 
330  inline ThisType & Assign(const value_type element0, const value_type element1,
331  const value_type element2, const value_type element3) throw(std::runtime_error)
332  {
333  if (this->size() != 4) {
334  cmnThrow(std::runtime_error("Mismatch between number of arguments assigned (4) and vector size"));
335  }
336  (*this)[0] = element0;
337  (*this)[1] = element1;
338  (*this)[2] = element2;
339  (*this)[3] = element3;
340  return *this;
341  }
343 
357  inline ThisType & Assign(const value_type element0, const value_type element1,
358  const value_type element2, const value_type element3, const value_type element4, ...)
359  {
360  (*this)[0] = element0;
361  (*this)[1] = element1;
362  (*this)[2] = element2;
363  (*this)[3] = element3;
364  (*this)[4] = element4;
365  va_list nextArg;
366  va_start(nextArg, element4);
367  index_type i;
368  for (i = 5; i < _size; ++i) {
369  (*this)[i] = static_cast<value_type>(va_arg(nextArg, typename TypeTraits::VaArgPromotion));
370  }
371  va_end(nextArg);
372  return *this;
373  }
374 
375 
388  inline ThisType & Assign(const value_type * elements)
389  {
391  VoVi< typename vctUnaryOperations<value_type>::Identity >::
392  Unfold(*this, elements);
393  return *this;
394  }
395 
396 
407  template <class __vectorOwnerType>
410  return *this;
411  }
412 
413 
432  template <stride_type __stride, class __elementType, class __dataPtrType>
434  return this->Assign(other);
435  }
436 
437  template <class __vectorOwnerType>
439  return this->Assign(other);
440  }
442 
443 
503  template <class __vectorOwnerType>
505  bool performSafetyChecks = true)
506  throw(std::runtime_error)
507  {
508  return vctFastCopy::VectorCopy(*this, source, performSafetyChecks);
509  }
510 
511  template <class __dataPtrType>
513  bool performSafetyChecks = true)
514  throw(std::runtime_error)
515  {
516  return vctFastCopy::VectorCopy(*this, source, performSafetyChecks);
517  }
519 
520 
521 
526  template <stride_type __stride, class __elementTypeVector, class __dataPtrType, class __elementType>
528  __elementType last) {
529  // recursive copy for the first size-1 elements
531  VoVi<typename vctUnaryOperations<value_type, __elementTypeVector>::Identity>::
532  Unfold(*this, other);
533  // cast and assign last element
534  (*this)[SIZEMINUSONE] = value_type(last);
535  return *this;
536  }
537 
538 
539 
556 
559  value_type & X(void) {
560  CMN_ASSERT(_size > 0);
561  return *(Pointer(0));
562  }
563 
564  /* documented in base class */
565  const value_type & X(void) const {
566  return BaseType::X();
567  }
568 
569 
572  value_type & Y(void) {
573  CMN_ASSERT(_size > 1);
574  return *(Pointer(1));
575  }
576 
577  /* documented in base class */
578  const value_type & Y(void) const {
579  return BaseType::Y();
580  }
581 
582 
585  value_type & Z(void) {
586  CMN_ASSERT(_size > 2);
587  return *(Pointer(2));
588  }
589 
590  /* documented in base class */
591  const value_type & Z(void) const {
592  return BaseType::Z();
593  }
594 
597  value_type & W(void) {
598  CMN_ASSERT(_size > 3);
599  return *(Pointer(3));
600  }
601 
602  /* documented in base class */
603  const value_type & W(void) const {
604  return BaseType::W();
605  }
606 
607 
611  CMN_ASSERT(_size > 1);
613  }
614 
618  CMN_ASSERT(_size > 2);
620  }
621 
625  CMN_ASSERT(_size > 3);
627  }
628 
632  CMN_ASSERT(_size > 2);
634  }
635 
639  CMN_ASSERT(_size > 3);
641  }
642 
646  CMN_ASSERT(_size > 3);
648  }
649 
650  /* documented in base class */
652  return BaseType::XY();
653  }
654 
655  /* documented in base class */
657  return BaseType::XZ();
658  }
659 
660  /* documented in base class */
662  return BaseType::XW();
663  }
664 
665  /* documented in base class */
667  return BaseType::YZ();
668  }
669 
670  /* documented in base class */
672  return BaseType::YW();
673  }
674 
675  /* documented in base class */
677  return BaseType::ZW();
678  }
679 
685  CMN_ASSERT(_size > 2);
687  }
688 
689 
693  CMN_ASSERT(_size > 3);
695  }
696 
697  /* documented in base class */
699  return BaseType::XYZ();
700  }
701 
702  /* documented in base class */
704  return BaseType::YZW();
705  }
706 
712  CMN_ASSERT(_size > 3);
714  }
715 
716  /* documented in base class */
718  return BaseType::XYZW();
719  }
721 
727  {
728  return BaseType::AsRowMatrix();
729  }
730 
732  {
733  return RowMatrixRefType(Pointer());
734  }
735 
737  {
738  return BaseType::AsColMatrix();
739  }
740 
742  {
743  return ColMatrixRefType(Pointer());
744  }
746 
749  template <vct::size_type __subSize>
751  Ref(const size_type startPosition = 0) const throw (std::out_of_range) {
752  return BaseType::Ref(startPosition);
753  }
754 
755  template <vct::size_type __subSize>
757  Ref(const size_type startPosition = 0) throw (std::out_of_range) {
758  vctFixedSizeVectorRef<_elementType, __subSize, _stride> result(*this, startPosition);
759  return result;
760  }
762 
768  template <size_type __inputSize, stride_type __inputStride, class __inputDataPtrType,
769  stride_type __indexStride, class __indexDataPtrType>
772  {
774  }
775 
776 
781  template <stride_type __stride1, class __dataPtr1Type, stride_type __stride2, class __dataPtr2Type>
784  {
785  CMN_ASSERT(SIZE == 3);
786  (*this)[0] = inputVector1[1] * inputVector2[2] - inputVector1[2] * inputVector2[1];
787  (*this)[1] = inputVector1[2] * inputVector2[0] - inputVector1[0] * inputVector2[2];
788  (*this)[2] = inputVector1[0] * inputVector2[1] - inputVector1[1] * inputVector2[0];
789  }
790 
791 
808  template <stride_type __stride1, class __dataPtrType1, stride_type __stride2, class __dataPtrType2>
812  VoViVi< typename vctBinaryOperations<value_type>::Addition >
813  ::Unfold(*this, vector1, vector2);
814  return *this;
815  }
816 
817 
818  /* documented above */
819  template <stride_type __stride1, class __dataPtrType1, stride_type __stride2, class __dataPtrType2>
823  VoViVi< typename vctBinaryOperations<value_type>::Subtraction >
824  ::Unfold(*this, vector1, vector2);
825  return *this;
826  }
827 
828  /* documented above */
829  template <stride_type __stride1, class __dataPtrType1, stride_type __stride2, class __dataPtrType2>
833  VoViVi< typename vctBinaryOperations<value_type>::Multiplication >
834  ::Unfold(*this, vector1, vector2);
835  return *this;
836  }
837 
838  /* documented above */
839  template <stride_type __stride1, class __dataPtrType1, stride_type __stride2, class __dataPtrType2>
843  VoViVi< typename vctBinaryOperations<value_type>::Division >
844  ::Unfold(*this, vector1, vector2);
845  return *this;
846  }
847 
848  /* documented above */
849  template <stride_type __stride1, class __dataPtrType1, stride_type __stride2, class __dataPtrType2>
853  VoViVi< typename vctBinaryOperations<value_type>::Minimum >
854  ::Unfold(*this, vector1, vector2);
855  return *this;
856  }
857 
858  /* documented above */
859  template <stride_type __stride1, class __dataPtrType1, stride_type __stride2, class __dataPtrType2>
863  VoViVi< typename vctBinaryOperations<value_type>::Maximum >
864  ::Unfold(*this, vector1, vector2);
865  return *this;
866  }
868 
885  template <stride_type __stride, class __dataPtrType>
888  VioVi< typename vctStoreBackBinaryOperations<value_type>::Addition >::
889  Unfold(*this, otherVector);
890  return *this;
891  }
892 
893  /* documented above */
894  template <stride_type __stride, class __dataPtrType>
897  VioVi< typename vctStoreBackBinaryOperations<value_type>::Subtraction >::
898  Unfold(*this, otherVector);
899  return *this;
900  }
901 
902  /* documented above */
903  template <stride_type __stride, class __dataPtrType>
906  VioVi< typename vctStoreBackBinaryOperations<value_type>::Multiplication >::
907  Unfold(*this, otherVector);
908  return *this;
909  }
910 
911  /* documented above */
912  template <stride_type __stride, class __dataPtrType>
915  VioVi< typename vctStoreBackBinaryOperations<value_type>::Division >::
916  Unfold(*this, otherVector);
917  return *this;
918  }
919 
920  /* documented above */
921  template <stride_type __stride, class __dataPtrType>
924  VioVi< typename vctStoreBackBinaryOperations<value_type>::Minimum >::
925  Unfold(*this, otherVector);
926  return *this;
927  }
928 
929  /* documented above */
930  template <stride_type __stride, class __dataPtrType>
933  VioVi< typename vctStoreBackBinaryOperations<value_type>::Maximum >::
934  Unfold(*this, otherVector);
935  return *this;
936  }
937 
938  /* documented above */
939  template <stride_type __stride, class __dataPtrType>
941  return this->Add(otherVector);
942  }
943 
944  /* documented above */
945  template <stride_type __stride, class __dataPtrType>
947  return this->Subtract(otherVector);
948  }
950 
951 
957  template <stride_type __stride, class __dataPtrType>
960  VioVio< typename vctStoreBackBinaryOperations<value_type>::Swap >::
961  Unfold(*this, otherVector);
962  return *this;
963  }
965 
966 
982  template <stride_type __stride, class __dataPtrType>
984  const value_type scalar) {
986  VoViSi< typename vctBinaryOperations<value_type>::Addition >::
987  Unfold(*this, vector, scalar);
988  return *this;
989  }
990 
991  /* documented above */
992  template <stride_type __stride, class __dataPtrType>
994  const value_type scalar) {
996  VoViSi< typename vctBinaryOperations<value_type>::Subtraction >::
997  Unfold(*this, vector, scalar);
998  return *this;
999  }
1000 
1001  /* documented above */
1002  template <stride_type __stride, class __dataPtrType>
1004  const value_type scalar) {
1006  VoViSi< typename vctBinaryOperations<value_type>::Multiplication >::
1007  Unfold(*this, vector, scalar);
1008  return *this;
1009  }
1010 
1011  /* documented above */
1012  template <stride_type __stride, class __dataPtrType>
1014  const value_type scalar) {
1016  VoViSi< typename vctBinaryOperations<value_type>::Division >::
1017  Unfold(*this, vector, scalar);
1018  return *this;
1019  }
1020 
1021  /* documented above */
1022  template <stride_type __stride, class __dataPtrType>
1024  const value_type upperBound) {
1026  VoViSi<typename vctBinaryOperations<value_type>::Minimum>::
1027  Unfold(*this, vector, upperBound);
1028  return *this;
1029  }
1030 
1031  /* documented above */
1032  template <stride_type __stride, class __dataPtrType>
1034  const value_type lowerBound) {
1036  VoViSi< typename vctBinaryOperations<value_type>::Maximum >::
1037  Unfold(*this, vector, lowerBound);
1038  return *this;
1039  }
1041 
1042 
1043 
1059  template <stride_type __stride, class __dataPtrType>
1060  inline ThisType & SumOf(const value_type scalar,
1063  VoSiVi< typename vctBinaryOperations<value_type>::Addition >::
1064  Unfold(*this, scalar, vector);
1065  return *this;
1066  }
1067 
1068  /* documented above */
1069  template <stride_type __stride, class __dataPtrType>
1070  inline ThisType & DifferenceOf(const value_type scalar,
1073  VoSiVi< typename vctBinaryOperations<value_type>::Subtraction >::
1074  Unfold(*this, scalar, vector);
1075  return *this;
1076  }
1077 
1078  /* documented above */
1079  template <stride_type __stride, class __dataPtrType>
1080  inline ThisType & ProductOf(const value_type scalar,
1083  VoSiVi< typename vctBinaryOperations<value_type>::Multiplication >::
1084  Unfold(*this, scalar, vector);
1085  return *this;
1086  }
1087 
1088  /* documented above */
1089  template <stride_type __stride, class __dataPtrType>
1090  inline ThisType & RatioOf(const value_type scalar,
1093  VoSiVi< typename vctBinaryOperations<value_type>::Division >::
1094  Unfold(*this, scalar, vector);
1095  return *this;
1096  }
1097 
1098  /* documented above */
1099  template <stride_type __stride, class __dataPtrType>
1100  inline ThisType & ClippedAboveOf(const value_type upperBound,
1103  VoSiVi< typename vctBinaryOperations<value_type>::Minimum >::
1104  Unfold(*this, upperBound, vector);
1105  return *this;
1106  }
1107 
1108  /* documented above */
1109  template <stride_type __stride, class __dataPtrType>
1110  inline ThisType & ClippedBelowOf(const value_type lowerBound,
1113  VoSiVi< typename vctBinaryOperations<value_type>::Maximum >::
1114  Unfold(*this, lowerBound, vector);
1115  return *this;
1116  }
1117 
1119 
1135  inline ThisType & Add(const value_type scalar) {
1137  VioSi< typename vctStoreBackBinaryOperations<value_type>::Addition >::
1138  Unfold(*this, scalar);
1139  return *this;
1140  }
1141 
1142  /* documented above */
1143  inline ThisType & Subtract(const value_type scalar) {
1145  VioSi< typename vctStoreBackBinaryOperations<value_type>::Subtraction >::
1146  Unfold(*this, scalar);
1147  return *this;
1148  }
1149 
1150  /* documented above */
1151  inline ThisType & Multiply(const value_type scalar) {
1153  VioSi< typename vctStoreBackBinaryOperations<value_type>::Multiplication >::
1154  Unfold(*this, scalar);
1155  return *this;
1156  }
1157 
1158  /* documented above */
1159  inline ThisType & Divide(const value_type scalar) {
1161  VioSi< typename vctStoreBackBinaryOperations<value_type>::Division >::
1162  Unfold(*this, scalar);
1163  return *this;
1164  }
1165 
1166  /* documented above */
1167  inline ThisType & ClipAbove(const value_type upperBound) {
1169  VioSi< typename vctStoreBackBinaryOperations<value_type>::Minimum >::
1170  Unfold(*this, upperBound);
1171  return *this;
1172  }
1173 
1174  /* documented above */
1175  inline ThisType & ClipBelow(const value_type lowerBound) {
1177  VioSi< typename vctStoreBackBinaryOperations<value_type>::Maximum >::
1178  Unfold(*this, lowerBound);
1179  return *this;
1180  }
1181 
1182  /* documented above */
1183  inline ThisType & operator += (const value_type scalar) {
1184  return this->Add(scalar);
1185  }
1186 
1187  /* documented above */
1188  inline ThisType & operator -= (const value_type scalar) {
1189  return this->Subtract(scalar);
1190  }
1191 
1192  /* documented above */
1193  inline ThisType & operator *= (const value_type scalar) {
1194  return this->Multiply(scalar);
1195  }
1196 
1197  /* documented above */
1198  inline ThisType & operator /= (const value_type scalar) {
1199  return this->Divide(scalar);
1200  }
1202 
1203 
1204  template <stride_type __stride, class __dataPtrType>
1205  inline ThisType & AddProductOf(const value_type scalar,
1207  {
1209  VioSiVi<
1212  Unfold(*this, scalar, otherVector);
1213  return *this;
1214  }
1215 
1216  template <stride_type __stride1, class __dataPtrType1,
1217  stride_type __stride2, class __dataPtrType2>
1220 
1221  {
1223  VioViVi<
1226  Unfold(*this, vector1, vector2);
1227  return *this;
1228  }
1229 
1242  template <size_type __matrixCols, stride_type __matrixRowStride, stride_type __matrixColStride, class __matrixDataPtrType,
1243  stride_type __vectorStride, class __vectorDataPtrType>
1246  {
1247  MultiplyMatrixVector(*this, inputMatrix, inputVector);
1248  return *this;
1249  }
1250 
1251  template <size_type __vectorSize, stride_type __vectorStride, class __vectorDataPtrType,
1252  stride_type __matrixRowStride, stride_type __matrixColStride, class __matrixDataPtrType>
1255  {
1256  MultiplyVectorMatrix(*this, inputVector, inputMatrix);
1257  return *this;
1258  }
1260 
1261 
1262 
1276  template <stride_type __stride, class __dataPtrType>
1279  VoVi< typename vctUnaryOperations<value_type>::AbsValue >::
1280  Unfold(*this, otherVector);
1281  return *this;
1282  }
1283 
1284  /* documented above */
1285  template <stride_type __stride, class __dataPtrType>
1288  VoVi< typename vctUnaryOperations<value_type>::Negation >::
1289  Unfold(*this, otherVector);
1290  return *this;
1291  }
1292 
1293  /* documented above */
1294  template <stride_type __stride, class __dataPtrType>
1297  VoVi< typename vctUnaryOperations<value_type>::Floor >::
1298  Unfold(*this, otherVector);
1299  return *this;
1300  }
1301 
1302  /* documented above */
1303  template <stride_type __stride, class __dataPtrType>
1306  VoVi< typename vctUnaryOperations<value_type>::Ceil>::
1307  Unfold(*this, otherVector);
1308  return *this;
1309  }
1310 
1311  /* documented above */
1312  template <stride_type __stride, class __dataPtrType>
1314  *this = otherVector;
1315  this->NormalizedSelf();
1316  return *this;
1317  }
1319 
1331  inline ThisType & AbsSelf(void) {
1333  Vio< typename vctStoreBackUnaryOperations<value_type>::MakeAbs >::
1334  Unfold(*this);
1335  return *this;
1336  }
1337 
1338  /* documented above */
1339  inline ThisType & NegationSelf(void) {
1341  Vio< typename vctStoreBackUnaryOperations<value_type>::MakeNegation >::
1342  Unfold(*this);
1343  return *this;
1344  }
1345 
1346  /* documented above */
1347  inline ThisType & FloorSelf(void) {
1349  Vio< typename vctStoreBackUnaryOperations<value_type>::MakeFloor >::
1350  Unfold(*this);
1351  return *this;
1352  }
1353 
1354  /* documented above */
1355  inline ThisType & CeilSelf(void) {
1357  Vio< typename vctStoreBackUnaryOperations<value_type>::MakeCeil >::
1358  Unfold(*this);
1359  return *this;
1360  }
1361 
1362  /* documented above */
1363  inline ThisType & NormalizedSelf(void) throw(std::runtime_error) {
1364  value_type norm = value_type(this->Norm());
1365  if (norm >= TypeTraits::Tolerance()) {
1366  this->Divide(norm);
1367  } else {
1368  cmnThrow(std::runtime_error("Division by quasi zero detected in vctFixedSizeVector NormalizedSelf()"));
1369  }
1370  return *this;
1371  }
1373 
1374 
1375 #if 0 // eliminating definition of GetSubsequence and GetConstSubsequence methods
1376 
1383  template <class _subsequenceType>
1384  void GetSubsequence(size_type position, _subsequenceType & result) {
1385  CMN_ASSERT( (_subsequenceType::STRIDE % ThisType::STRIDE) == 0 );
1386  CMN_ASSERT( position +
1387  ((_subsequenceType::SIZE-1) * (_subsequenceType::STRIDE / ThisType::STRIDE))
1388  <= (ThisType::SIZE-1) );
1389  result.SetRef( Pointer(position) );
1390  }
1391 
1392  template <class _subsequenceType>
1393  void GetConstSubsequence(size_type position, _subsequenceType & result) {
1394  BaseType::GetConstSubsequence(position, result);
1395  }
1396 #endif // eliminate definition
1397 
1415  template <size_type _subSize>
1416  class Subvector {
1417  public:
1419  };
1420 
1421 };
1422 
1423 
1424 #endif // _vctFixedSizeVectorBase_h
size_t index_type
Definition: vctContainerTraits.h:36
ThisType & Assign(const value_type element0, const value_type element1, const value_type element2, const value_type element3)
Definition: vctFixedSizeVectorBase.h:330
value_type & Y(void)
Definition: vctFixedSizeVectorBase.h:572
A template for a fixed size matrix with fixed spacing in memory.
Definition: vctFixedSizeConstMatrixBase.h:103
cmnTypeTraits< value_type > TypeTraits
Definition: vctFixedSizeVectorBase.h:91
Definition: vctFixedStrideVectorIterator.h:224
ColConstMatrixRefType AsColMatrix(void) const
Definition: vctFixedSizeVectorBase.h:736
ThisType & SumOf(const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &vector, const value_type scalar)
Definition: vctFixedSizeVectorBase.h:983
ThisType & CeilOf(const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector)
Definition: vctFixedSizeVectorBase.h:1304
vctFixedSizeConstVectorRef< _elementType, 4, _stride > XYZW(void) const
Definition: vctFixedSizeConstVectorBase.h:388
ThisType & AbsSelf(void)
Definition: vctFixedSizeVectorBase.h:1331
vctFixedSizeConstVectorRef< _elementType, 3, _stride > XYZ(void) const
Definition: vctFixedSizeConstVectorBase.h:372
const_iterator end(void) const
Definition: vctFixedSizeConstVectorBase.h:184
#define CMN_ASSERT(expr)
Definition: cmnAssert.h:90
NormType Norm(void) const
Definition: vctFixedSizeConstVectorBase.h:453
const_reverse_iterator rend(void) const
Definition: vctFixedSizeVectorBase.h:162
const_reference operator[](size_type index) const
Definition: vctFixedSizeVectorBase.h:175
vctFixedSizeVectorRef< _elementType, 2, 2 *_stride > YW(void)
Definition: vctFixedSizeVectorBase.h:638
const_reverse_iterator rbegin(void) const
Definition: vctFixedSizeVectorBase.h:149
ThisType & AddElementwiseProductOf(const vctFixedSizeConstVectorBase< _size, __stride1, value_type, __dataPtrType1 > &vector1, const vctFixedSizeConstVectorBase< _size, __stride2, value_type, __dataPtrType2 > &vector2)
Definition: vctFixedSizeVectorBase.h:1218
const_reference operator()(size_type index) const
Definition: vctFixedSizeVectorBase.h:203
VectorTraits::reverse_iterator reverse_iterator
Definition: vctFixedSizeVectorBase.h:97
vctFixedSizeConstVectorRef< _elementType, 2, 2 *_stride > YW(void) const
Definition: vctFixedSizeVectorBase.h:671
const_reference at(size_type index) const
Definition: vctFixedSizeConstVectorBase.h:241
const_reference at(size_type index) const
Definition: vctFixedSizeVectorBase.h:191
ThisType & NormalizedOf(const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector)
Definition: vctFixedSizeVectorBase.h:1313
ThisType & ElementwiseDivide(const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector)
Definition: vctFixedSizeVectorBase.h:913
vctFixedSizeConstVectorRef< _elementType, 2, _stride > ZW(void) const
Definition: vctFixedSizeConstVectorBase.h:363
ThisType & ElementwiseMax(const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector)
Definition: vctFixedSizeVectorBase.h:931
ThisType & AddProductOf(const value_type scalar, const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector)
Definition: vctFixedSizeVectorBase.h:1205
BaseType::RowMatrixRefType RowMatrixRefType
Definition: vctFixedSizeVectorBase.h:103
An implementation of the ``abstract'' vctFixedSizeVectorBase.
Definition: vctFixedSizeVectorRef.h:46
const value_type & W(void) const
Definition: vctFixedSizeVectorBase.h:603
ThisType & Assign(const value_type element0, const value_type element1, const value_type element2)
Definition: vctFixedSizeVectorBase.h:318
vctFixedSizeVectorRef< _elementType, 3, _stride > YZW(void)
Definition: vctFixedSizeVectorBase.h:692
ThisType & ClipAbove(const value_type upperBound)
Definition: vctFixedSizeVectorBase.h:1167
ThisType & DifferenceOf(const value_type scalar, const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &vector)
Definition: vctFixedSizeVectorBase.h:1070
ThisType & ForceAssign(const vctFixedSizeConstVectorBase< _size, __stride, __elementType, __dataPtrType > &other)
Definition: vctFixedSizeVectorBase.h:433
ThisType & SwapElementsWith(vctFixedSizeVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector)
Definition: vctFixedSizeVectorBase.h:958
static Type Tolerance(void)
Definition: cmnTypeTraits.h:170
BaseType::CopyType CopyType
Definition: vctFixedSizeVectorBase.h:90
ThisType & ElementwiseMin(const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector)
Definition: vctFixedSizeVectorBase.h:922
RowMatrixRefType AsRowMatrix(void)
Definition: vctFixedSizeVectorBase.h:731
vctFixedSizeConstVectorRef< _elementType, 2, _stride > YZ(void) const
Definition: vctFixedSizeConstVectorBase.h:349
static bool VectorCopy(_destinationVectorType &destination, const _sourceVectorType &source, bool performSafetyChecks)
Definition: vctFastCopy.h:165
ThisType & ClippedAboveOf(const value_type upperBound, const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &vector)
Definition: vctFixedSizeVectorBase.h:1100
const value_type & Y(void) const
Definition: vctFixedSizeConstVectorBase.h:306
ThisType & ElementwiseProductOf(const vctFixedSizeConstVectorBase< _size, __stride1, value_type, __dataPtrType1 > &vector1, const vctFixedSizeConstVectorBase< _size, __stride2, value_type, __dataPtrType2 > &vector2)
Definition: vctFixedSizeVectorBase.h:830
ThisType & ElementwiseMinOf(const vctFixedSizeConstVectorBase< _size, __stride1, value_type, __dataPtrType1 > &vector1, const vctFixedSizeConstVectorBase< _size, __stride2, value_type, __dataPtrType2 > &vector2)
Definition: vctFixedSizeVectorBase.h:850
Definition: vctFixedSizeVectorBase.h:1416
bool FastCopyOf(const vctDynamicConstVectorBase< __vectorOwnerType, value_type > &source, bool performSafetyChecks=true)
Definition: vctFixedSizeVectorBase.h:504
bool IsCompact(void) const
Definition: vctFixedSizeConstVectorBase.h:625
cmnVaArgPromotion< _elementType >::Type VaArgPromotion
Definition: cmnTypeTraits.h:167
ThisType & operator/=(const value_type scalar)
Definition: vctFixedSizeVectorBase.h:1198
ThisType & Add(const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector)
Definition: vctFixedSizeVectorBase.h:886
An implementation of the ``abstract'' vctFixedSizeConstVectorBase.
Definition: vctFixedSizeConstVectorRef.h:50
ThisType & NormalizedSelf(void)
Definition: vctFixedSizeVectorBase.h:1363
ThisType & CeilSelf(void)
Definition: vctFixedSizeVectorBase.h:1355
size_t size_type
Definition: vctContainerTraits.h:35
ThisType & Subtract(const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector)
Definition: vctFixedSizeVectorBase.h:895
const_iterator end(void) const
Definition: vctFixedSizeVectorBase.h:136
ThisType & Assign(const value_type element0, const value_type element1, const value_type element2, const value_type element3, const value_type element4,...)
Definition: vctFixedSizeVectorBase.h:357
ThisType & Assign(const value_type *elements)
Definition: vctFixedSizeVectorBase.h:388
vctFixedSizeConstVectorRef< _elementType, 3, _stride > YZW(void) const
Definition: vctFixedSizeVectorBase.h:703
ThisType & Assign(const value_type element0, const value_type element1)
Definition: vctFixedSizeVectorBase.h:308
ThisType & DifferenceOf(const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &vector, const value_type scalar)
Definition: vctFixedSizeVectorBase.h:993
ThisType & FloorSelf(void)
Definition: vctFixedSizeVectorBase.h:1347
iterator begin(void)
Definition: vctFixedSizeVectorBase.h:117
void SelectFrom(const vctFixedSizeConstVectorBase< __inputSize, __inputStride, _elementType, __inputDataPtrType > &input, const vctFixedSizeConstVectorBase< _size, __indexStride, index_type, __indexDataPtrType > &index)
Definition: vctFixedSizeVectorBase.h:770
vctFixedSizeVectorRef< _elementType, 2, _stride > XY(void)
Definition: vctFixedSizeVectorBase.h:610
Definition: vctFixedSizeConstVectorBase.h:146
ThisType & ProductOf(const vctFixedSizeConstVectorBase< __vectorSize, __vectorStride, _elementType, __vectorDataPtrType > &inputVector, const vctFixedSizeConstMatrixBase< __vectorSize, _size, __matrixRowStride, __matrixColStride, _elementType, __matrixDataPtrType > &inputMatrix)
Definition: vctFixedSizeVectorBase.h:1253
vctFixedSizeConstVectorRef< _elementType, 3, _stride > XYZ(void) const
Definition: vctFixedSizeVectorBase.h:698
Definition: vctFixedSizeVectorBase.h:113
ThisType & Add(const value_type scalar)
Definition: vctFixedSizeVectorBase.h:1135
VectorTraits::iterator iterator
Definition: vctFixedSizeVectorBase.h:95
ThisType & Divide(const value_type scalar)
Definition: vctFixedSizeVectorBase.h:1159
vctFixedSizeVectorRef< value_type, _subSize, STRIDE > Type
Definition: vctFixedSizeVectorBase.h:1418
Returns the sum of the two InputType object.
Definition: vctStoreBackBinaryOperations.h:76
ThisType & Assign(const vctFixedSizeConstVectorBase< _size, __stride, __elementType, __dataPtrType > &other)
Definition: vctFixedSizeVectorBase.h:274
ThisType & AbsOf(const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector)
Definition: vctFixedSizeVectorBase.h:1277
Implementation of a fixed-size vector using template metaprogramming.
Definition: vctFixedSizeVector.h:52
ThisType & operator*=(const value_type scalar)
Definition: vctFixedSizeVectorBase.h:1193
VCT_CONTAINER_TRAITS_TYPEDEFS(_elementType)
Definition: vctFixedSizeVectorBase.h:112
reverse_iterator rbegin(void)
Definition: vctFixedSizeVectorBase.h:143
ThisType & SumOf(const value_type scalar, const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &vector)
Definition: vctFixedSizeVectorBase.h:1060
Definition: vctFixedSizeConstVectorBase.h:149
bool FastCopyOf(const vctFixedSizeConstVectorBase< SIZE, STRIDE, value_type, __dataPtrType > &source, bool performSafetyChecks=true)
Definition: vctFixedSizeVectorBase.h:512
Definition: vctFixedStrideVectorIterator.h:62
vctFixedSizeVectorRef< _elementType, 3, _stride > XYZ(void)
Definition: vctFixedSizeVectorBase.h:684
ThisType & NegationOf(const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector)
Definition: vctFixedSizeVectorBase.h:1286
value_type & X(void)
Definition: vctFixedSizeVectorBase.h:559
ThisType & Assign(const vctDynamicConstVectorBase< __vectorOwnerType, value_type > &other)
Definition: vctFixedSizeVectorBase.h:408
ThisType & ElementwiseRatioOf(const vctFixedSizeConstVectorBase< _size, __stride1, value_type, __dataPtrType1 > &vector1, const vctFixedSizeConstVectorBase< _size, __stride2, value_type, __dataPtrType2 > &vector2)
Definition: vctFixedSizeVectorBase.h:840
const_reference Element(size_type index) const
Definition: vctFixedSizeConstVectorBase.h:260
const value_type & Z(void) const
Definition: vctFixedSizeVectorBase.h:591
vctFixedSizeVectorBase< _size, _stride, _elementType, _dataPtrType > ThisType
Definition: vctFixedSizeVectorBase.h:87
BaseType::RowConstMatrixRefType RowConstMatrixRefType
Definition: vctFixedSizeVectorBase.h:102
iterator end(void)
Definition: vctFixedSizeVectorBase.h:130
vctFixedSizeConstVectorRef< _elementType, __subSize, _stride > Ref(const size_type startPosition=0) const
Definition: vctFixedSizeConstVectorBase.h:413
ColMatrixRefType AsColMatrix(void)
Definition: vctFixedSizeVectorBase.h:741
BaseType::ColMatrixRefType ColMatrixRefType
Definition: vctFixedSizeVectorBase.h:108
ThisType & operator-=(const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector)
Definition: vctFixedSizeVectorBase.h:946
vctFixedSizeVectorRef< _elementType, __subSize, _stride > Ref(const size_type startPosition=0)
Definition: vctFixedSizeVectorBase.h:757
vctFixedSizeConstVectorRef< _elementType, 2, 2 *_stride > YW(void) const
Definition: vctFixedSizeConstVectorBase.h:356
const_pointer Pointer(size_type index=0) const
Definition: vctFixedSizeVectorBase.h:232
ThisType & ClippedAboveOf(const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &vector, const value_type upperBound)
Definition: vctFixedSizeVectorBase.h:1023
const value_type & X(void) const
Definition: vctFixedSizeVectorBase.h:565
ThisType & ProductOf(const vctFixedSizeConstMatrixBase< _size, __matrixCols, __matrixRowStride, __matrixColStride, _elementType, __matrixDataPtrType > &inputMatrix, const vctFixedSizeConstVectorBase< __matrixCols, __vectorStride, _elementType, __vectorDataPtrType > &inputVector)
Definition: vctFixedSizeVectorBase.h:1244
void ThrowUnlessValidIndex(size_type index) const
Definition: vctFixedSizeConstVectorBase.h:168
ThisType & operator+=(const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector)
Definition: vctFixedSizeVectorBase.h:940
Define common container related types based on the properties of a fixed size container.
Definition: vctFixedSizeVectorTraits.h:45
const_reverse_iterator rend(void) const
Definition: vctFixedSizeConstVectorBase.h:198
RowConstMatrixRefType AsRowMatrix(void) const
Definition: vctFixedSizeConstVectorBase.h:399
An implementation of the ``abstract'' vctFixedSizeMatrixBase.
Definition: vctFixedSizeMatrixRef.h:46
size_type size(void) const
Definition: vctFixedSizeConstVectorBase.h:205
Definition: vctFixedSizeVectorBase.h:111
_dataPtrType Data
Definition: vctFixedSizeConstVectorBase.h:164
ThisType & ElementwiseMaxOf(const vctFixedSizeConstVectorBase< _size, __stride1, value_type, __dataPtrType1 > &vector1, const vctFixedSizeConstVectorBase< _size, __stride2, value_type, __dataPtrType2 > &vector2)
Definition: vctFixedSizeVectorBase.h:860
const_pointer Pointer(size_type index=0) const
Definition: vctFixedSizeConstVectorBase.h:268
vctFixedSizeConstVectorRef< _elementType, 2, _stride > XY(void) const
Definition: vctFixedSizeConstVectorBase.h:328
ThisType & operator=(const vctFixedSizeConstVectorBase< _size, __stride, __elementType, __dataPtrType > &other)
Definition: vctFixedSizeVectorBase.h:282
void vctFixedSizeVectorBaseAssignDynamicConstVectorBase(vctFixedSizeVectorBase< _size, _stride, _elementType, _dataPtrType > &fixedSizeVector, const vctDynamicConstVectorBase< _vectorOwnerType, _elementType > &dynamicVector)
Definition: vctDynamicConstVectorBase.h:1124
vctFixedSizeConstVectorRef< _elementType, 2, _stride > YZ(void) const
Definition: vctFixedSizeVectorBase.h:666
const value_type & X(void) const
Definition: vctFixedSizeConstVectorBase.h:298
ThisType & Multiply(const value_type scalar)
Definition: vctFixedSizeVectorBase.h:1151
ThisType & ClippedBelowOf(const value_type lowerBound, const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &vector)
Definition: vctFixedSizeVectorBase.h:1110
const_iterator begin(void) const
Definition: vctFixedSizeConstVectorBase.h:177
#define cmnThrow(a)
Definition: MinimalCmn.h:4
vctFixedSizeVectorRef< _elementType, 2, _stride > YZ(void)
Definition: vctFixedSizeVectorBase.h:631
reference operator[](size_type index)
Definition: vctFixedSizeVectorBase.h:169
vctFixedSizeVectorRef< _elementType, 2, 2 *_stride > XZ(void)
Definition: vctFixedSizeVectorBase.h:617
vctFixedSizeConstVectorRef< _elementType, 4, _stride > XYZW(void) const
Definition: vctFixedSizeVectorBase.h:717
reverse_iterator rend(void)
Definition: vctFixedSizeVectorBase.h:156
const value_type & W(void) const
Definition: vctFixedSizeConstVectorBase.h:321
ThisType & ForceAssign(const vctDynamicConstVectorBase< __vectorOwnerType, value_type > &other)
Definition: vctFixedSizeVectorBase.h:438
RowConstMatrixRefType AsRowMatrix(void) const
Definition: vctFixedSizeVectorBase.h:726
bool Zeros(void)
Definition: vctFixedSizeVectorBase.h:256
value_type SetAll(const value_type &value)
Definition: vctFixedSizeVectorBase.h:241
const value_type & Y(void) const
Definition: vctFixedSizeVectorBase.h:578
const_reverse_iterator rbegin(void) const
Definition: vctFixedSizeConstVectorBase.h:191
vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType > BaseType
Definition: vctFixedSizeVectorBase.h:89
A template for a fixed length vector with fixed spacing in memory.
Definition: vctFixedSizeVectorBase.h:76
vctFixedSizeVectorTraits< _elementType, _size, _stride > VectorTraits
Definition: vctFixedSizeVectorBase.h:85
Declaration of vctFixedSizeConstVectorBase.
BaseType::ColConstMatrixRefType ColConstMatrixRefType
Definition: vctFixedSizeVectorBase.h:107
vctFixedSizeVectorRef< _elementType, 2, _stride > ZW(void)
Definition: vctFixedSizeVectorBase.h:645
static void Unfold(_outputVectorType &output, const _inputVectorType &input, const _indexVectorType &index)
Definition: vctFixedSizeVectorRecursiveEngines.h:918
void CrossProductOf(const vctFixedSizeConstVectorBase< 3, __stride1, _elementType, __dataPtr1Type > &inputVector1, const vctFixedSizeConstVectorBase< 3, __stride2, _elementType, __dataPtr2Type > &inputVector2)
Definition: vctFixedSizeVectorBase.h:782
reference operator()(size_type index)
Definition: vctFixedSizeVectorBase.h:198
ThisType & RatioOf(const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &vector, const value_type scalar)
Definition: vctFixedSizeVectorBase.h:1013
ptrdiff_t stride_type
Definition: vctContainerTraits.h:37
ThisType & ProductOf(const value_type scalar, const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &vector)
Definition: vctFixedSizeVectorBase.h:1080
vctFixedSizeConstVectorRef< _elementType, 3, _stride > YZW(void) const
Definition: vctFixedSizeConstVectorBase.h:379
void MultiplyVectorMatrix(vctFixedSizeVectorBase< _resultSize, _resultStride, _resultElementType, _resultDataPtrType > &result, const vctFixedSizeConstVectorBase< _vectorSize, _vectorStride, _resultElementType, _vectorDataPtrType > &vector, const vctFixedSizeConstMatrixBase< _vectorSize, _resultSize, _matrixRowStride, _matrixColStride, _resultElementType, _matrixDataPtrType > &matrix)
Definition: vctFixedSizeMatrixRef.h:227
ThisType & NegationSelf(void)
Definition: vctFixedSizeVectorBase.h:1339
ThisType & SumOf(const vctFixedSizeConstVectorBase< _size, __stride1, value_type, __dataPtrType1 > &vector1, const vctFixedSizeConstVectorBase< _size, __stride2, value_type, __dataPtrType2 > &vector2)
Definition: vctFixedSizeVectorBase.h:809
ThisType & ClipBelow(const value_type lowerBound)
Definition: vctFixedSizeVectorBase.h:1175
reference Element(size_type index)
Definition: vctFixedSizeVectorBase.h:213
Definition: vctDynamicConstVectorBase.h:77
An implementation of the ``abstract'' vctFixedSizeConstMatrixBase.
Definition: vctFixedSizeConstMatrixRef.h:50
const value_type & Z(void) const
Definition: vctFixedSizeConstVectorBase.h:314
A template for a fixed length vector with fixed spacing in memory.
Definition: vctFixedSizeConstVectorBase.h:107
VectorTraits::const_iterator const_iterator
Definition: vctFixedSizeVectorBase.h:96
pointer Pointer(size_type index=0)
Definition: vctFixedSizeVectorBase.h:226
ThisType & ConcatenationOf(const vctFixedSizeConstVectorBase< SIZEMINUSONE, __stride, __elementTypeVector, __dataPtrType > &other, __elementType last)
Definition: vctFixedSizeVectorBase.h:527
Declaration of cmnDeSerializer and functions cmnDeSerializeRaw.
ThisType & ClippedBelowOf(const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &vector, const value_type lowerBound)
Definition: vctFixedSizeVectorBase.h:1033
value_type & Z(void)
Definition: vctFixedSizeVectorBase.h:585
const_reference operator()(size_type index) const
Definition: vctFixedSizeConstVectorBase.h:250
void MultiplyMatrixVector(vctFixedSizeVectorBase< _resultSize, _resultStride, _resultElementType, _resultDataPtrType > &result, const vctFixedSizeConstMatrixBase< _resultSize, _matrixCols, _matrixRowStride, _matrixColStride, _resultElementType, _matrixDataPtrType > &matrix, const vctFixedSizeConstVectorBase< _matrixCols, _vectorStride, _resultElementType, _vectorDataPtrType > &vector)
Definition: vctFixedSizeMatrixRef.h:207
vctFixedSizeVectorRef< _elementType, 2, 3 *_stride > XW(void)
Definition: vctFixedSizeVectorBase.h:624
const_reference operator[](size_type index) const
Definition: vctFixedSizeConstVectorBase.h:232
vctFixedSizeConstVectorRef< _elementType, 2, 3 *_stride > XW(void) const
Definition: vctFixedSizeConstVectorBase.h:342
A collection of useful information about the C++ basic types, represented in a generic programming wa...
Definition: cmnTypeTraits.h:155
const_reference Element(size_type index) const
Definition: vctFixedSizeVectorBase.h:218
ThisType & FloorOf(const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector)
Definition: vctFixedSizeVectorBase.h:1295
Returns the product of the two InputType object.
Definition: vctBinaryOperations.h:116
ThisType & ElementwiseMultiply(const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector)
Definition: vctFixedSizeVectorBase.h:904
ThisType & RatioOf(const value_type scalar, const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &vector)
Definition: vctFixedSizeVectorBase.h:1090
vctFixedSizeConstVectorRef< _elementType, 2, _stride > ZW(void) const
Definition: vctFixedSizeVectorBase.h:676
vctFixedSizeConstVectorRef< _elementType, 2, 2 *_stride > XZ(void) const
Definition: vctFixedSizeVectorBase.h:656
vctFixedSizeConstVectorRef< _elementType, 2, 2 *_stride > XZ(void) const
Definition: vctFixedSizeConstVectorBase.h:335
ThisType & DifferenceOf(const vctFixedSizeConstVectorBase< _size, __stride1, value_type, __dataPtrType1 > &vector1, const vctFixedSizeConstVectorBase< _size, __stride2, value_type, __dataPtrType2 > &vector2)
Definition: vctFixedSizeVectorBase.h:820
vctFixedSizeConstVectorRef< _elementType, 2, 3 *_stride > XW(void) const
Definition: vctFixedSizeVectorBase.h:661
reference at(size_type index)
Definition: vctFixedSizeVectorBase.h:185
vctFixedSizeConstVectorRef< _elementType, 2, _stride > XY(void) const
Definition: vctFixedSizeVectorBase.h:651
vctFixedSizeConstVectorRef< _elementType, __subSize, _stride > Ref(const size_type startPosition=0) const
Definition: vctFixedSizeVectorBase.h:751
ThisType & Assign(const value_type element0)
Definition: vctFixedSizeVectorBase.h:299
Container class for the recursive engines.
Definition: vctFixedSizeVectorRecursiveEngines.h:76
VectorTraits::const_reverse_iterator const_reverse_iterator
Definition: vctFixedSizeVectorBase.h:98
ThisType & Subtract(const value_type scalar)
Definition: vctFixedSizeVectorBase.h:1143
value_type & W(void)
Definition: vctFixedSizeVectorBase.h:597
ColConstMatrixRefType AsColMatrix(void) const
Definition: vctFixedSizeConstVectorBase.h:404
ThisType & ProductOf(const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &vector, const value_type scalar)
Definition: vctFixedSizeVectorBase.h:1003
vctFixedSizeVectorRef< _elementType, 4, _stride > XYZW(void)
Definition: vctFixedSizeVectorBase.h:711
const_iterator begin(void) const
Definition: vctFixedSizeVectorBase.h:123