A STL container (as wrapper) for arrays of constant size defined at compile time - Users will most likely prefer to use CArrayPOD and its derived classes instead.
This code is an adapted version from Boost, modifed for its integration within MRPT (JLBC, Dec/2009) (Renamed array -> CArray to avoid possible potential conflicts).
See http://www.josuttis.com/cppcode for details and the latest version. See http://www.boost.org/libs/array for Documentation. for documentation.
(C) Copyright Nicolai M. Josuttis 2001. Permission to copy, use, modify, sell and distribute this software is granted provided this copyright notice appears in all copies. This software is provided "as is" without express or implied warranty, and with no claim as to its suitability for any purpose.
29 Jan 2004 - minor fixes (Nico Josuttis) 04 Dec 2003 - update to synch with library TR1 (Alisdair Meredith) 23 Aug 2002 - fix for Non-MSVC compilers combined with MSVC libraries. 05 Aug 2001 - minor update (Nico Josuttis) 20 Jan 2001 - STLport fix (Beman Dawes) 29 Sep 2000 - Initial Revision (Nico Josuttis)
Jan 30, 2004
#include <mrpt/math/CArray.h>
Public Types | |
enum | { static_size = N } |
typedef T | value_type |
typedef T * | iterator |
typedef const T * | const_iterator |
typedef T & | reference |
typedef const T & | const_reference |
typedef std::size_t | size_type |
typedef std::ptrdiff_t | difference_type |
typedef std::reverse_iterator< iterator > | reverse_iterator |
typedef std::reverse_iterator< const_iterator > | const_reverse_iterator |
Public Member Functions | |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
reverse_iterator | rbegin () |
const_reverse_iterator | rbegin () const |
reverse_iterator | rend () |
const_reverse_iterator | rend () const |
reference | operator[] (size_type i) |
const_reference | operator[] (size_type i) const |
reference | at (size_type i) |
const_reference | at (size_type i) const |
reference | front () |
const_reference | front () const |
reference | back () |
const_reference | back () const |
void | resize (const size_t nElements) |
This method has no effects in this class, but raises an exception if the expected size does not match. | |
void | swap (CArray< T, N > &y) |
const T * | data () const |
T * | data () |
template<typename T2 > | |
CArray< T, N > & | operator= (const CArray< T2, N > &rhs) |
void | assign (const T &value) |
void | assign (const size_t n, const T &value) |
template<typename I > | |
void | assign (I b, const I &e) |
Static Public Member Functions | |
static size_type | size () |
static bool | empty () |
static size_type | max_size () |
Public Attributes | |
T | elems [N] |
Static Private Member Functions | |
static void | rangecheck (size_type i) |
typedef const T* mrpt::math::CArray< T, N >::const_iterator |
typedef const T& mrpt::math::CArray< T, N >::const_reference |
typedef std::reverse_iterator<const_iterator> mrpt::math::CArray< T, N >::const_reverse_iterator |
typedef std::ptrdiff_t mrpt::math::CArray< T, N >::difference_type |
typedef T* mrpt::math::CArray< T, N >::iterator |
typedef T& mrpt::math::CArray< T, N >::reference |
typedef std::reverse_iterator<iterator> mrpt::math::CArray< T, N >::reverse_iterator |
typedef std::size_t mrpt::math::CArray< T, N >::size_type |
typedef T mrpt::math::CArray< T, N >::value_type |
anonymous enum |
|
inline |
Definition at line 150 of file CArray.h.
References mrpt::math::CArray< T, N >::elems.
|
inline |
Definition at line 145 of file CArray.h.
References mrpt::math::CArray< T, N >::elems.
|
inline |
Definition at line 159 of file CArray.h.
References mrpt::math::CArray< T, N >::begin(), and mrpt::math::CArray< T, N >::end().
|
inline |
Definition at line 105 of file CArray.h.
References mrpt::math::CArray< T, N >::elems, and mrpt::math::CArray< T, N >::rangecheck().
|
inline |
Definition at line 106 of file CArray.h.
References mrpt::math::CArray< T, N >::elems, and mrpt::math::CArray< T, N >::rangecheck().
|
inline |
Definition at line 111 of file CArray.h.
References mrpt::math::CArray< T, N >::elems.
|
inline |
Definition at line 112 of file CArray.h.
References mrpt::math::CArray< T, N >::elems.
|
inline |
Definition at line 70 of file CArray.h.
References mrpt::math::CArray< T, N >::elems.
Referenced by mrpt::math::CArray< T, N >::assign(), mrpt::math::operator<(), mrpt::math::CArray< T, N >::operator=(), mrpt::math::operator==(), mrpt::math::CArray< T, N >::rend(), mrpt::math::CArray< T, 0 >::rend(), and mrpt::math::CArray< T, N >::swap().
|
inline |
Definition at line 71 of file CArray.h.
References mrpt::math::CArray< T, N >::elems.
|
inline |
Definition at line 135 of file CArray.h.
References mrpt::math::CArray< T, N >::elems.
|
inline |
Definition at line 132 of file CArray.h.
References mrpt::math::CArray< T, N >::elems.
|
inlinestatic |
|
inline |
Definition at line 72 of file CArray.h.
References mrpt::math::CArray< T, N >::elems.
Referenced by mrpt::math::CArray< T, N >::assign(), mrpt::math::operator<(), mrpt::math::CArray< T, N >::operator=(), mrpt::math::operator==(), mrpt::math::CArray< T, N >::rbegin(), mrpt::math::CArray< T, 0 >::rbegin(), and mrpt::math::CArray< T, N >::swap().
|
inline |
Definition at line 73 of file CArray.h.
References mrpt::math::CArray< T, N >::elems.
|
inline |
Definition at line 109 of file CArray.h.
References mrpt::math::CArray< T, N >::elems.
|
inline |
Definition at line 110 of file CArray.h.
References mrpt::math::CArray< T, N >::elems.
|
inlinestatic |
|
inline |
Definition at line 139 of file CArray.h.
References mrpt::math::CArray< T, N >::begin(), and mrpt::math::CArray< T, N >::end().
|
inline |
Definition at line 101 of file CArray.h.
References mrpt::math::CArray< T, N >::elems.
|
inline |
Definition at line 102 of file CArray.h.
References mrpt::math::CArray< T, N >::elems.
|
inlinestaticprivate |
Definition at line 168 of file CArray.h.
References mrpt::math::CArray< T, N >::size().
Referenced by mrpt::math::CArray< T, N >::at().
|
inline |
Definition at line 91 of file CArray.h.
References mrpt::math::CArray< T, N >::end().
|
inline |
Definition at line 92 of file CArray.h.
References mrpt::math::CArray< T, N >::end().
|
inline |
Definition at line 95 of file CArray.h.
References mrpt::math::CArray< T, N >::begin().
|
inline |
Definition at line 96 of file CArray.h.
References mrpt::math::CArray< T, N >::begin().
|
inline |
This method has no effects in this class, but raises an exception if the expected size does not match.
Definition at line 121 of file CArray.h.
References mrpt::format().
|
inlinestatic |
Definition at line 115 of file CArray.h.
Referenced by mrpt::math::CArray< T, N >::rangecheck().
|
inline |
Definition at line 127 of file CArray.h.
References mrpt::math::CArray< T, N >::begin(), and mrpt::math::CArray< T, N >::end().
T mrpt::math::CArray< T, N >::elems[N] |
Definition at line 57 of file CArray.h.
Referenced by mrpt::math::CArray< T, N >::assign(), mrpt::math::CArray< T, N >::at(), mrpt::math::CArray< T, N >::back(), mrpt::math::CArray< T, N >::begin(), mrpt::math::CArray< T, N >::data(), mrpt::math::CArray< T, N >::end(), mrpt::math::CArray< T, N >::front(), and mrpt::math::CArray< T, N >::operator[]().
Page generated by Doxygen 1.9.6 for MRPT 1.4.0 SVN: at Tue Jan 17 22:27:43 UTC 2023 |