cisst-saw
Loading...
Searching...
No Matches
vctDynamicConstNArrayBase.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
6 Author(s): Anton Deguet, Daniel Li, Ofri Sadowsky
7 Created on: 2006-06-23
8
9 (C) Copyright 2006-2018 Johns Hopkins University (JHU), All Rights Reserved.
10
11--- begin cisst license - do not edit ---
12
13This software is provided "as is" under an open source license, with
14no warranty. The complete license can be found in license.txt and
15http://www.cisst.org/cisst/license.txt.
16
17--- end cisst license ---
18*/
19
20#pragma once
21#ifndef _vctDynamicConstNArrayBase_h
22#define _vctDynamicConstNArrayBase_h
23
28
32
37
38
39template <class _nArrayOwnerType, class __nArrayOwnerType, class _elementType,
40 class _elementOperationType, vct::size_type _dimension>
44
45template <class _nArrayOwnerType, class _elementType, class _elementOperationType, vct::size_type _dimension>
48 const _elementType & scalar);
49
50
51/* Functions used to generate slices based on dimension, i.e. if
52 dimension is 1 return an element, otherwise return an NArray of
53 lesser dimension. The class below is used to specify which
54 function is used. */
55template <class _nArrayOwnerType, class _elementType, vct::size_type _dimension>
56inline vctDynamicNArrayRef<_elementType, _dimension - 1>
59 vct::index_type index);
60
61template <class _nArrayOwnerType, class _elementType>
62inline _elementType &
64 vct::index_type index);
65
66template <class _nArrayOwnerType, class _elementType, vct::size_type _dimension>
67inline vctDynamicConstNArrayRef<_elementType, _dimension - 1>
70 vct::index_type index);
71
72template <class _nArrayOwnerType, class _elementType>
73inline const _elementType &
75 vct::index_type index);
76
77#ifndef SWIG
78/* Class used to specify the type of a slice based on the dimension.
79 The class also provides a static method to select the right
80 function to call. Code couldn't be inline since it requires a full
81 definition of vctDynamicNArrayRef and vctDynamicConstNArrayRef.
82 This can't be solved just with forward declarations. */
83template <vct::size_type _dimension>
85{
86public:
87 template <class _elementType>
89 {
90 public:
91 typedef vctDynamicConstNArrayRef<_elementType, _dimension - 1> ConstSliceRefType;
92 typedef vctDynamicNArrayRef<_elementType, _dimension - 1> SliceRefType;
93
94 template <class _nArrayOwnerType>
99
100 template <class _nArrayOwnerType>
105 };
106};
107
108/* Specialisation of class for dimension 1. In this case, a slice is
109 a single element. */
110template <>
112{
113public:
114 template <class _elementType>
116 {
117 public:
118 typedef const _elementType & ConstSliceRefType;
119 typedef _elementType & SliceRefType;
120
121 template <class _nArrayOwnerType>
126
127 template <class _nArrayOwnerType>
132 };
133};
134#endif // SWIG
135
136
153template <class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
155{
156public:
157 /* define most types from vctContainerTraits and vctNArrayTraits */
160
163
165 typedef _nArrayOwnerType OwnerType;
166
167 enum {DIMENSION = OwnerType::DIMENSION};
168
171 typedef typename OwnerType::iterator iterator;
172 typedef typename OwnerType::const_iterator const_iterator;
173 typedef typename OwnerType::reverse_iterator reverse_iterator;
174 typedef typename OwnerType::const_reverse_iterator const_reverse_iterator;
176
183
190
194#ifndef SWIG
196#endif // SWIG
197 typedef typename SlicesTypes::ConstSliceRefType ConstSliceRefType;
198 typedef typename SlicesTypes::SliceRefType SliceRefType;
200
201
205
209
211
215 typedef typename TypeTraits::BoolType BoolType;
216
220
222
223
224protected:
227
229 inline void ThrowUnlessValidDimensionIndex(dimension_type dimensionIndex) const
230 CISST_THROW(std::out_of_range)
231 {
232 if (! ValidDimensionIndex(dimensionIndex))
233 {
234 cmnThrow(std::out_of_range("vctDynamicNArray: Invalid index"));
235 }
236 }
237
239 inline void ThrowUnlessValidIndex(size_type index) const
240 CISST_THROW(std::out_of_range)
241 {
242 if (! ValidIndex(index))
243 {
244 cmnThrow(std::out_of_range("vctDynamicNArray: Invalid index"));
245 }
246 }
247
249 inline void ThrowUnlessValidIndex(const nsize_type & indices) const
250 CISST_THROW(std::out_of_range)
251 {
252 if (! ValidIndex(indices))
253 {
254 cmnThrow(std::out_of_range("vctDynamicNArray: Invalid indices"));
255 }
256 }
257
259 inline void ThrowUnlessValidIndex(dimension_type dimension, size_type index) const
260 CISST_THROW(std::out_of_range)
261 {
262 if (! ValidIndex(dimension, index))
263 {
264 cmnThrow(std::out_of_range("vctDynamicNArray: Invalid index"));
265 }
266 }
267
268
269public:
273 {
274 return NArray.begin();
275 }
276
279 const_iterator end(void) const
280 {
281 return NArray.end();
282 }
283
287 {
288 return NArray.rbegin();
289 }
290
294 {
295 return NArray.rend();
296 }
297
301 size_type size(void) const
302 {
303 return NArray.size();
304 }
305
307 const nsize_type & sizes(void) const
308 {
309 return NArray.sizes();
310 }
311
313 size_type size(dimension_type dimension) const
314 {
315 return NArray.size(dimension);
316 }
317
319 const nstride_type & strides(void) const
320 {
321 return NArray.strides();
322 }
323
325 difference_type stride(dimension_type dimension) const
326 {
327 return NArray.stride(dimension);
328 }
329
331 dimension_type dimension(void) const
332 {
333 return NArray.dimension();
334 }
335
338 bool empty(void) const
339 {
340 return (size() == 0);
341 }
342
343
346 inline bool ValidDimension(dimension_type dimension) const
347 {
348 return (dimension == this->dimension());
349 }
350
352 inline bool ValidDimensionIndex(dimension_type dimensionIndex) const
353 {
354 return (dimensionIndex < this->dimension());
355 }
356
359 inline bool ValidIndex(size_type index) const
360 {
361 return (index < size());
362 }
363
365 inline bool ValidIndex(const nsize_type & indices) const
366 {
367 nsize_type sizes = this->NArray.sizes();
368 typename nsize_type::const_iterator sizesIter;
369 typename nsize_type::const_iterator indicesIter;
370
371 if (indices.size() != sizes.size())
372 return false;
373
374 for (sizesIter = sizes.begin(), indicesIter = indices.begin();
375 sizesIter != sizes.end();
376 sizesIter++, indicesIter++)
377 {
378 if (*indicesIter >= *sizesIter)
379 return false;
380 }
381
382 return true;
383 }
384
386 inline bool ValidIndex(dimension_type dimension, size_type index) const
387 {
388 return ( index < this->size(dimension) );
389 }
390
391
398 const_reference at(size_type metaIndex) const
399 CISST_THROW(std::out_of_range)
400 {
401 ThrowUnlessValidIndex(metaIndex);
402 return (begin())[metaIndex];
403 }
404
409 const_reference at(const nsize_type & coordinates) const
410 CISST_THROW(std::out_of_range)
411 {
412 ThrowUnlessValidIndex(coordinates);
413 return *(Pointer(coordinates));
414 }
415
417 const_reference operator () (const nsize_type & coordinates) const
418 CISST_THROW(std::out_of_range)
419 {
420 return this->at(coordinates);
421 }
422
423
427 const OwnerType & Owner(void) const {
428 return this->NArray;
429 }
430
431
435 const_pointer Pointer(void) const
436 {
437 return NArray.Pointer();
438 }
439
443 const_pointer Pointer(const nsize_type & indices) const
444 {
445 return NArray.Pointer(indices);
446 }
447
448
454 const_reference Element(const nsize_type & coordinates) const
455 {
456 return *(Pointer(coordinates));
457 }
458
459
466 ConstSubarrayRefType Subarray(const nsize_type & startPosition,
467 const nsize_type & lengths) const
468 {
469 ConstSubarrayRefType subarray;
470 subarray.SubarrayOf(*this, startPosition, lengths);
471 return subarray;
472 }
473
474
481 ConstPermutationRefType Permutation(const ndimension_type & dimensions) const
482 {
483 ConstPermutationRefType permutation;
484 permutation.PermutationOf(*this, dimensions);
485 return permutation;
486 }
487
488
497 ConstSliceRefType Slice(dimension_type dimension, size_type index) const
498 {
499 return SlicesTypes::ConstSliceOf(*this, dimension, index);
500 }
501
502
507 ConstSliceRefType operator [] (size_type index) const
508 {
509 return this->Slice(0, index);
510 }
511
512
516
519 inline value_type SumOfElements(void) const
520 {
522 SoNi<typename vctBinaryOperations<value_type>::Addition,
524 Run(*this);
525 }
526
529 inline value_type ProductOfElements(void) const
530 {
532 SoNi<typename vctBinaryOperations<value_type>::Multiplication,
534 Run(*this);
535 }
536
539 inline value_type NormSquare(void) const
540 {
542 SoNi<typename vctBinaryOperations<value_type>::Addition,
544 Run(*this);
545 }
546
549 inline NormType Norm(void) const
550 {
551 return sqrt(NormType(NormSquare()));
552 }
553
558 inline value_type L1Norm(void) const
559 {
561 SoNi<typename vctBinaryOperations<value_type>::Addition,
563 Run(*this);
564 }
565
570 inline value_type LinfNorm(void) const
571 {
572 return this->MaxAbsElement();
573 }
574
577 inline value_type MaxElement(void) const
578 {
580 SoNi<typename vctBinaryOperations<value_type>::Maximum,
582 Run(*this);
583 }
584
587 inline value_type MinElement(void) const
588 {
590 SoNi<typename vctBinaryOperations<value_type>::Minimum,
592 Run(*this);
593 }
594
601 inline value_type MaxAbsElement(void) const
602 {
604 SoNi<typename vctBinaryOperations<value_type>::Maximum,
606 Run(*this);
607 }
608
613 inline value_type MinAbsElement(void) const
614 {
616 SoNi<typename vctBinaryOperations<value_type>::Minimum,
618 Run(*this);
619 }
620
621
629 inline void MinAndMaxElement(value_type & minElement, value_type & maxElement) const
630 {
631 vctDynamicNArrayLoopEngines<DIMENSION>::MinAndMax::Run((*this), minElement, maxElement);
632 }
633
634
637 inline bool IsPositive(void) const
638 {
640 SoNi<typename vctBinaryOperations<bool>::And,
642 Run(*this);
643 }
644
647 inline bool IsNonNegative(void) const
648 {
650 SoNi<typename vctBinaryOperations<bool>::And,
652 Run(*this);
653 }
654
657 inline bool IsNonPositive(void) const
658 {
660 SoNi<typename vctBinaryOperations<bool>::And,
662 Run(*this);
663 }
664
667 inline bool IsNegative (void) const
668 {
670 SoNi< typename vctBinaryOperations<bool>::And,
672 Run(*this);
673 }
674
677 inline bool All(void) const
678 {
680 SoNi< typename vctBinaryOperations<bool>::And,
682 Run(*this);
683 }
684
687 inline bool Any(void) const
688 {
690 SoNi< typename vctBinaryOperations<bool>::Or,
692 Run(*this);
693 }
694
697 inline bool IsFinite(void) const {
699 SoNi< typename vctBinaryOperations<bool>::And,
701 Run(*this);
702 }
703
706 inline bool HasNaN(void) const {
708 SoNi< typename vctBinaryOperations<bool>::Or,
710 Run(*this);
711 }
712
713
714
717
723 inline bool IsCompact(void) const
724 {
725 return NArray.IsCompact();
726 }
727
728
729
732 template <class __nArrayOwnerType>
737
738
742
754 template <class __nArrayOwnerType>
756 {
758 SoNiNi<typename vctBinaryOperations<bool>::And,
760 Run(*this, otherNArray);
761 }
762
763 /* documented above */
764 template <class __nArrayOwnerType>
766 {
767 return Equal(otherNArray);
768 }
769
770 /* documented above */
771 template <class __nArrayOwnerType>
773 value_type tolerance) const
774 {
775 return ((*this - otherNArray).LinfNorm() <= tolerance);
776 }
777
778 /* documented above */
779 template <class __nArrayOwnerType>
781 {
782 return ((*this - otherNArray).LinfNorm() <= TypeTraits::Tolerance());
783 }
784
785 /* documented above */
786 template <class __nArrayOwnerType>
788 {
790 SoNiNi<typename vctBinaryOperations<bool>::Or,
792 Run(*this, otherNArray);
793 }
794
795 /* documented above */
796 template <class __nArrayOwnerType>
798 {
799 return NotEqual(otherNArray);
800 }
801
802 /* documented above */
803 template <class __nArrayOwnerType>
805 {
807 SoNiNi<typename vctBinaryOperations<bool>::And,
809 Run(*this, otherNArray);
810 }
811
812 /* documented above */
813 template <class __nArrayOwnerType>
815 {
817 SoNiNi<typename vctBinaryOperations<bool>::And,
819 Run(*this, otherNArray);
820 }
821
822 /* documented above */
823 template <class __nArrayOwnerType>
825 {
827 SoNiNi<typename vctBinaryOperations<bool>::And,
829 Run(*this, otherNArray);
830 }
831
832 /* documented above */
833 template <class __nArrayOwnerType>
835 {
837 SoNiNi<typename vctBinaryOperations<bool>::And,
839 Run(*this, otherNArray);
840 }
841
842
843
847
859 template <class __nArrayOwnerType>
862 {
863 return vctDynamicNArrayElementwiseCompareNArray<_nArrayOwnerType, __nArrayOwnerType, value_type,
865 }
866
867 /* documented above */
868 template <class __nArrayOwnerType>
875
876 /* documented above */
877 template <class __nArrayOwnerType>
884
885 /* documented above */
886 template <class __nArrayOwnerType>
893
894 /* documented above */
895 template <class __nArrayOwnerType>
902
903 /* documented above */
904 template <class __nArrayOwnerType>
911
913
914
918
930 inline bool Equal(const value_type & scalar) const
931 {
933 SoNiSi<typename vctBinaryOperations<bool>::And,
935 Run(*this, scalar);
936 }
937
938 /* documented above */
939 inline bool operator == (const value_type & scalar) const
940 {
941 return Equal(scalar);
942 }
943
944 /* documented above */
945 inline bool NotEqual(const value_type & scalar) const
946 {
948 SoNiSi<typename vctBinaryOperations<bool>::Or,
950 Run(*this, scalar);
951 }
952
953 /* documented above */
954 inline bool operator != (const value_type & scalar) const
955 {
956 return NotEqual(scalar);
957 }
958
959 /* documented above */
960 inline bool Lesser(const value_type & scalar) const
961 {
963 SoNiSi<typename vctBinaryOperations<bool>::And,
965 Run(*this, scalar);
966 }
967
968 /* documented above */
969 inline bool LesserOrEqual(const value_type & scalar) const
970 {
972 SoNiSi<typename vctBinaryOperations<bool>::And,
974 Run(*this, scalar);
975 }
976
977 /* documented above */
978 inline bool Greater(const value_type & scalar) const
979 {
981 SoNiSi<typename vctBinaryOperations<bool>::And,
983 Run(*this, scalar);
984 }
985
986 /* documented above */
987 inline bool GreaterOrEqual(const value_type & scalar) const
988 {
990 SoNiSi<typename vctBinaryOperations<bool>::And,
992 Run(*this, scalar);
993 }
994
995
996
1000
1012
1013 /* documented above */
1015
1016 /* documented above */
1018
1019 /* documented above */
1021
1022 /* documented above */
1024
1025 /* documented above */
1027
1029
1033
1040 inline NArrayReturnType Abs(void) const;
1041
1042 /* documented above */
1043 inline NArrayReturnType Negation(void) const;
1044
1045 /* documented above */
1046 inline NArrayReturnType Floor(void) const;
1047
1048 /* documented above */
1049 inline NArrayReturnType Ceil(void) const;
1051
1052
1054 std::string ToString(void)
1055 {
1056 std::stringstream outputStream;
1057 ToStream(outputStream);
1058 return outputStream.str();
1059 }
1060
1061
1063 void ToStream(std::ostream & outputStream) const {
1064 // preserve the formatting flags as they were
1065 const size_t width = outputStream.width(12);
1066 const size_t precision = outputStream.precision(6);
1067 bool showpoint = ((outputStream.flags() & std::ios_base::showpoint) != 0);
1068 outputStream << std::setprecision(6) << std::showpoint;
1069#if 0
1070 // this needs to be implemented using template based recursion on dimension, See [] operator implementation.
1071 this->ToStreamInternal(outputStream);
1072#endif
1073 // resume the formatting flags
1074 outputStream << std::setprecision(precision) << std::setw(width);
1075 if (!showpoint) {
1076 outputStream << std::noshowpoint;
1077 }
1078 }
1079};
1080
1081#ifndef DOXYGEN
1082/* documented in class. Implementation moved here for .Net 2003 */
1083template <class _nArrayOwnerType, class _elementType, vct::size_type _dimension>
1086{
1087 return vctDynamicNArrayElementwiseCompareScalar<_nArrayOwnerType, _elementType,
1089}
1090
1091/* documented in class. Implementation moved here for .Net 2003 */
1092template <class _nArrayOwnerType, class _elementType, vct::size_type _dimension>
1095{
1096 return vctDynamicNArrayElementwiseCompareScalar<_nArrayOwnerType, _elementType,
1098}
1099
1100/* documented in class. Implementation moved here for .Net 2003 */
1101template <class _nArrayOwnerType, class _elementType, vct::size_type _dimension>
1104{
1105 return vctDynamicNArrayElementwiseCompareScalar<_nArrayOwnerType, _elementType,
1107}
1108
1109/* documented in class. Implementation moved here for .Net 2003 */
1110template <class _nArrayOwnerType, class _elementType, vct::size_type _dimension>
1113{
1114 return vctDynamicNArrayElementwiseCompareScalar<_nArrayOwnerType, _elementType,
1116}
1117
1118/* documented in class. Implementation moved here for .Net 2003 */
1119template <class _nArrayOwnerType, class _elementType, vct::size_type _dimension>
1122{
1123 return vctDynamicNArrayElementwiseCompareScalar<_nArrayOwnerType, _elementType,
1125}
1126
1127/* documented in class. Implementation moved here for .Net 2003 */
1128template <class _nArrayOwnerType, class _elementType, vct::size_type _dimension>
1131{
1132 return vctDynamicNArrayElementwiseCompareScalar<_nArrayOwnerType, _elementType,
1134}
1135#endif // DOXYGEN
1136
1138template <class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
1140{
1141 return nArray.All();
1142}
1143
1145template <class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
1147 return nArray.Any();
1148}
1149
1151template <class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
1152std::ostream & operator << (std::ostream & output,
1154 nArray.ToStream(output);
1155 return output;
1156}
1157
1158
1159#endif // _vctDynamicConstNArrayBase_h
A collection of useful information about the C++ basic types, represented in a generic programming wa...
Definition cmnTypeTraits.h:155
bool BoolType
Definition cmnTypeTraits.h:164
static Type Tolerance(void)
Definition cmnTypeTraits.h:170
Test for equality between input1 and input2.
Definition vctBinaryOperations.h:282
Test if input1 is greater than input2.
Definition vctBinaryOperations.h:363
Test if input1 is greater than or equal to input2.
Definition vctBinaryOperations.h:384
Test if input1 is lesser than input2.
Definition vctBinaryOperations.h:322
Test if input1 is lesser than or equal to input2.
Definition vctBinaryOperations.h:343
Test for non equality between input1 and input2.
Definition vctBinaryOperations.h:302
Definition vctForwardDeclarations.h:171
Dynamic nArray referencing existing memory (const).
Definition vctDynamicConstNArrayRef.h:91
void SubarrayOf(const vctDynamicConstNArrayBase< __ownerType, value_type, DIMENSION > &otherNArray, const nsize_type &startPosition, const nsize_type &lengths)
Definition vctDynamicConstNArrayRef.h:210
void PermutationOf(const vctDynamicConstNArrayBase< __ownerType, value_type, DIMENSION > &otherNArray, const ndimension_type &dimensions)
Definition vctDynamicConstNArrayRef.h:226
Definition vctDynamicNArrayBase.h:41
Definition vctForwardDeclarations.h:183
static void Run(const _inputNArrayType &inputNArray, typename _inputNArrayType::value_type &minValue, typename _inputNArrayType::value_type &maxValue)
Definition vctDynamicNArrayLoopEngines.h:1005
Container class for the dynamic nArray engines.
Definition vctDynamicNArrayLoopEngines.h:42
Dynamic nArray referencing existing memory.
Definition vctDynamicNArrayRef.h:89
Definition vctDynamicConstNArrayBase.h:89
vctDynamicNArrayRef< _elementType, _dimension - 1 > SliceRefType
Definition vctDynamicConstNArrayBase.h:92
static SliceRefType SliceOf(vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension > &input, vct::size_type dimension, vct::index_type index)
Definition vctDynamicConstNArrayBase.h:101
static ConstSliceRefType ConstSliceOf(const vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension > &input, vct::size_type dimension, vct::index_type index)
Definition vctDynamicConstNArrayBase.h:95
vctDynamicConstNArrayRef< _elementType, _dimension - 1 > ConstSliceRefType
Definition vctDynamicConstNArrayBase.h:91
Definition vctDynamicConstNArrayBase.h:116
const _elementType & ConstSliceRefType
Definition vctDynamicConstNArrayBase.h:118
_elementType & SliceRefType
Definition vctDynamicConstNArrayBase.h:119
static SliceRefType SliceOf(vctDynamicNArrayBase< _nArrayOwnerType, _elementType, 1 > &input, vct::size_type CMN_UNUSED(dimension), vct::index_type index)
Definition vctDynamicConstNArrayBase.h:128
static ConstSliceRefType ConstSliceOf(const vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, 1 > &input, vct::size_type CMN_UNUSED(dimension), vct::index_type index)
Definition vctDynamicConstNArrayBase.h:122
Definition vctDynamicConstNArrayBase.h:85
static bool NArrayCopyCompatible(const _nArray1Type &nArray1, const _nArray2Type &nArray2)
Definition vctFastCopy.h:145
Definition vctDynamicNArray.h:272
Returns the absolute value of the input as an OutputType object.
Definition vctUnaryOperations.h:80
Returns the input as an OutputType object.
Definition vctUnaryOperations.h:65
Definition vctUnaryOperations.h:186
Definition vctUnaryOperations.h:194
Definition vctUnaryOperations.h:170
Definition vctUnaryOperations.h:154
Definition vctUnaryOperations.h:162
Definition vctUnaryOperations.h:178
Definition vctUnaryOperations.h:146
Returns the square of the input as an OutputType object.
Definition vctUnaryOperations.h:119
Assert macros definitions.
#define CMN_UNUSED(argument)
Definition cmnPortability.h:497
#define CISST_THROW(exceptionParameter)
Somewhat portable compilation warning message. This works with very recent versions of gcc (4....
Definition cmnPortability.h:559
Declaration of the template function cmnThrow.
Declaration of the class cmnTypeTraits.
void cmnThrow(const _exceptionType &except, cmnLogLevel lod=CMN_LOG_LEVEL_INIT_ERROR)
Definition cmnThrow.h:76
size_t size_type
Definition vctContainerTraits.h:35
size_t index_type
Definition vctContainerTraits.h:36
Basic traits for the cisstVector containers.
#define VCT_CONTAINER_TRAITS_TYPEDEFS(type)
Definition vctContainerTraits.h:50
#define VCT_NARRAY_TRAITS_TYPEDEFS(dimension)
Definition vctContainerTraits.h:68
value_type MaxElement(void) const
Definition vctDynamicConstMatrixBase.h:494
const_iterator end(void) const
Definition vctDynamicConstMatrixBase.h:209
bool AlmostEqual(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix, value_type tolerance) const
Definition vctDynamicConstMatrixBase.h:721
MatrixReturnType Negation(void) const
BoolMatrixReturnType ElementwiseEqual(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) const
Definition vctDynamicConstMatrixBase.h:801
MatrixReturnType Ceil(void) const
OwnerType::const_iterator const_iterator
Definition vctDynamicConstMatrixBase.h:95
bool GreaterOrEqual(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) const
Definition vctDynamicConstMatrixBase.h:776
const_reference at(size_type index) const CISST_THROW(std
Definition vctDynamicConstMatrixBase.h:289
bool vctAll(const vctDynamicConstMatrixBase< _matrixOwnerType, _elementType > &matrix)
Definition vctDynamicConstMatrixBase.h:1176
cmnTypeTraits< value_type > TypeTraits
Definition vctDynamicConstMatrixBase.h:147
bool IsNonPositive(void) const
Definition vctDynamicConstMatrixBase.h:566
@ DIMENSION
Definition vctDynamicConstMatrixBase.h:82
value_type MaxAbsElement(void) const
Definition vctDynamicConstMatrixBase.h:516
const OwnerType & Owner(void) const
Definition vctDynamicConstMatrixBase.h:298
bool IsNonNegative(void) const
Definition vctDynamicConstMatrixBase.h:557
value_type MinElement(void) const
Definition vctDynamicConstMatrixBase.h:503
OwnerType::iterator iterator
Definition vctDynamicConstMatrixBase.h:92
void MinAndMaxElement(value_type &minElement, value_type &maxElement) const
Definition vctDynamicConstMatrixBase.h:541
bool NotEqual(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) const
Definition vctDynamicConstMatrixBase.h:734
size_type size(void) const
Definition vctDynamicConstMatrixBase.h:228
bool IsCompact(void) const
Definition vctDynamicConstMatrixBase.h:641
value_type MinAbsElement(void) const
Definition vctDynamicConstMatrixBase.h:527
bool IsNegative(void) const
Definition vctDynamicConstMatrixBase.h:575
BoolMatrixReturnType ElementwiseGreater(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) const
Definition vctDynamicConstMatrixBase.h:833
void ToStream(std::ostream &outputStream) const
Definition vctDynamicConstMatrixBase.h:1014
bool empty() const
Definition vctDynamicConstMatrixBase.h:274
const_reverse_iterator rbegin(void) const
Definition vctDynamicConstMatrixBase.h:215
bool Any(void) const
Definition vctDynamicConstMatrixBase.h:593
MatrixReturnType Floor(void) const
std::string ToString(void)
Definition vctDynamicConstMatrixBase.h:1007
TypeTraits::BoolType BoolType
Definition vctDynamicConstMatrixBase.h:152
const nsize_type & sizes(void) const
Definition vctDynamicConstMatrixBase.h:233
ConstRowRefType operator[](size_type index) const
Definition vctDynamicConstMatrixBase.h:280
MatrixReturnType Abs(void) const
const_reverse_iterator rend(void) const
Definition vctDynamicConstMatrixBase.h:221
bool vctAny(const vctDynamicConstMatrixBase< _matrixOwnerType, _elementType > &matrix)
Definition vctDynamicConstMatrixBase.h:1182
size_type width() const
Definition vctDynamicConstMatrixBase.h:253
value_type L1Norm(void) const
Definition vctDynamicConstMatrixBase.h:475
bool All(void) const
Definition vctDynamicConstMatrixBase.h:584
const_reference Element(size_type rowIndex, size_type colIndex) const
Definition vctDynamicConstMatrixBase.h:362
_matrixOwnerType OwnerType
Definition vctDynamicConstMatrixBase.h:89
bool LesserOrEqual(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) const
Definition vctDynamicConstMatrixBase.h:758
const nstride_type & strides(void) const
Definition vctDynamicConstMatrixBase.h:258
bool Equal(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) const
Definition vctDynamicConstMatrixBase.h:706
const_pointer Pointer(index_type rowIndex, index_type colIndex) const
Definition vctDynamicConstMatrixBase.h:306
value_type LinfNorm(void) const
Definition vctDynamicConstMatrixBase.h:488
BoolMatrixReturnType ElementwiseLesser(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) const
Definition vctDynamicConstMatrixBase.h:817
bool HasNaN(void) const
Definition vctDynamicConstMatrixBase.h:611
value_type SumOfElements(void) const
Definition vctDynamicConstMatrixBase.h:432
value_type ProductOfElements(void) const
Definition vctDynamicConstMatrixBase.h:441
NormType Norm(void) const
Definition vctDynamicConstMatrixBase.h:467
const_iterator begin(void) const
Definition vctDynamicConstMatrixBase.h:203
value_type NormSquare(void) const
Definition vctDynamicConstMatrixBase.h:458
bool operator==(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) const
Definition vctDynamicConstMatrixBase.h:715
BoolMatrixReturnType ElementwiseNotEqual(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) const
Definition vctDynamicConstMatrixBase.h:809
void ThrowUnlessValidIndex(size_type index) const CISST_THROW(std
Definition vctDynamicConstMatrixBase.h:171
OwnerType::const_reverse_iterator const_reverse_iterator
Definition vctDynamicConstMatrixBase.h:101
bool Lesser(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) const
Definition vctDynamicConstMatrixBase.h:749
bool IsFinite(void) const
Definition vctDynamicConstMatrixBase.h:602
bool Greater(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) const
Definition vctDynamicConstMatrixBase.h:767
bool operator!=(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) const
Definition vctDynamicConstMatrixBase.h:743
vctDynamicConstMatrixBase< _matrixOwnerType, _elementType > ThisType
Definition vctDynamicConstMatrixBase.h:86
BoolMatrixReturnType ElementwiseLesserOrEqual(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) const
Definition vctDynamicConstMatrixBase.h:825
bool ValidIndex(size_type index) const
Definition vctDynamicConstMatrixBase.h:320
bool FastCopyCompatible(const vctDynamicConstMatrixBase< __matrixOwnerType, value_type > &source) const
Definition vctDynamicConstMatrixBase.h:677
bool IsPositive(void) const
Definition vctDynamicConstMatrixBase.h:548
const_reference operator()(size_type rowIndex, size_type colIndex) const CISST_THROW(std
Definition vctDynamicConstMatrixBase.h:352
BoolMatrixReturnType ElementwiseGreaterOrEqual(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) const
Definition vctDynamicConstMatrixBase.h:841
OwnerType::reverse_iterator reverse_iterator
Definition vctDynamicConstMatrixBase.h:98
vctDynamicNArray< value_type, DIMENSION > NArrayReturnType
Definition vctDynamicConstNArrayBase.h:208
bool ValidDimensionIndex(dimension_type dimensionIndex) const
Definition vctDynamicConstNArrayBase.h:352
vctDynamicConstNArrayRef< value_type, DIMENSION > ConstSubarrayRefType
Definition vctDynamicConstNArrayBase.h:180
_elementType & vctDynamicNArrayElementSlice(vctDynamicNArrayBase< _nArrayOwnerType, _elementType, 1 > &input, vct::index_type index)
Definition vctDynamicNArray.h:597
bool ValidDimension(dimension_type dimension) const
Definition vctDynamicConstNArrayBase.h:346
const _elementType & vctDynamicNArrayConstElementSlice(const vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, 1 > &input, vct::index_type index)
Definition vctDynamicNArray.h:618
vctDynamicConstNArrayRef< _elementType, _dimension - 1 > vctDynamicNArrayConstNArraySlice(const vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension > &input, vct::size_type dimension, vct::index_type index)
Definition vctDynamicNArray.h:606
vctDynamicNArrayTypes< DIMENSION >::template SlicesTypes< _elementType > SlicesTypes
Definition vctDynamicConstNArrayBase.h:195
void ThrowUnlessValidDimensionIndex(dimension_type dimensionIndex) const CISST_THROW(std
Definition vctDynamicConstNArrayBase.h:229
ConstSliceRefType Slice(dimension_type dimension, size_type index) const
Definition vctDynamicConstNArrayBase.h:497
std::ostream & operator<<(std::ostream &output, const vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension > &nArray)
Definition vctDynamicConstNArrayBase.h:1152
SlicesTypes::ConstSliceRefType ConstSliceRefType
Definition vctDynamicConstNArrayBase.h:197
vctReturnDynamicNArray< BoolType, DIMENSION > BoolNArrayReturnType
Definition vctDynamicConstNArrayBase.h:219
vctReturnDynamicNArray< bool, _dimension > vctDynamicNArrayElementwiseCompareNArray(const vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension > &nArray1, const vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension > &nArray2)
Definition vctDynamicNArray.h:560
vctReturnDynamicNArray< value_type, DIMENSION > NArrayValueType
Definition vctDynamicConstNArrayBase.h:204
vctDynamicConstNArrayRef< value_type, DIMENSION > ConstPermutationRefType
Definition vctDynamicConstNArrayBase.h:187
ConstPermutationRefType Permutation(const ndimension_type &dimensions) const
Definition vctDynamicConstNArrayBase.h:481
SlicesTypes::SliceRefType SliceRefType
Definition vctDynamicConstNArrayBase.h:198
vctDynamicNArrayRef< _elementType, _dimension - 1 > vctDynamicNArrayNArraySlice(vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension > &input, vct::size_type dimension, vct::index_type index)
Definition vctDynamicNArray.h:585
dimension_type dimension(void) const
Definition vctDynamicConstNArrayBase.h:331
ConstSubarrayRefType Subarray(const nsize_type &startPosition, const nsize_type &lengths) const
Definition vctDynamicConstNArrayBase.h:466
difference_type stride(dimension_type dimension) const
Definition vctDynamicConstNArrayBase.h:325
vctReturnDynamicNArray< bool, _dimension > vctDynamicNArrayElementwiseCompareScalar(const vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension > &nArray, const _elementType &scalar)
Definition vctDynamicNArray.h:572
vctDynamicNArrayRef< value_type, DIMENSION > SubarrayRefType
Definition vctDynamicConstNArrayBase.h:181
vctDynamicNArrayRef< value_type, DIMENSION > PermutationRefType
Definition vctDynamicConstNArrayBase.h:188
OwnerType NArray
Definition vctDynamicConstNArrayBase.h:226
Declaration of vctDynamicNArrayLoopEngines.
Declaration of vctFixedSizeVector.
Forward declarations and #define for cisstVector.