LSSTApplications
10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
|
A multidimensional strided array. More...
#include <Array.h>
Public Member Functions | |
Array () | |
Default constructor. More... | |
Array (Array const &other) | |
Non-converting copy constructor. More... | |
template<typename T_ , int C_> | |
Array (Array< T_, N, C_ > const &other) | |
Converting copy constructor. More... | |
template<typename T_ , int C_> | |
Array (ArrayRef< T_, N, C_ > const &other) | |
Converting copy constructor. More... | |
Array & | operator= (Array const &other) |
Non-converting shallow assignment. More... | |
template<typename T_ , int C_> | |
Array & | operator= (Array< T_, N, C_ > const &other) |
Converting shallow assignment. More... | |
template<typename T_ , int C_> | |
Array & | operator= (ArrayRef< T_, N, C_ > const &other) |
Converting shallow assignment. More... | |
template<typename T_ , int N_, int C_> | |
bool | operator== (Array< T_, N_, C_ > const &other) const |
Shallow equality comparison: return true if the arrays share data and have the same shape and strides. More... | |
template<typename T_ , int N_, int C_> | |
bool | operator!= (Array< T_, N_, C_ > const &other) const |
Shallow inequality comparison. More... | |
void | swap (Array &other) |
Lightweight shallow swap. More... | |
bool | isUnique () const |
Return true if the Array is definitely unique. More... | |
![]() | |
Reference | operator[] (int n) const |
Return a single subarray. More... | |
Element & | operator[] (Index const &i) const |
Return a single element from the array. More... | |
ResultOf< View< Seq > >::Type | operator[] (View< Seq > const &def) const |
Return a general view into this array (see Tutorial). More... | |
Iterator | begin () const |
Return an Iterator to the beginning of the array. More... | |
Iterator | end () const |
Return an Iterator to one past the end of the array. More... | |
Element * | getData () const |
Return a raw pointer to the first element of the array. More... | |
bool | isEmpty () const |
Return true if the array has a null data point. More... | |
Manager::Ptr | getManager () const |
Return the opaque object responsible for memory management. More... | |
int | getSize () const |
Return the size of a specific dimension. More... | |
int | getStride () const |
Return the stride in a specific dimension. More... | |
Index | getShape () const |
Return a Vector of the sizes of all dimensions. More... | |
Index | getStrides () const |
Return a Vector of the strides of all dimensions. More... | |
int | getNumElements () const |
Return the total number of elements in the array. More... | |
FullTranspose | transpose () const |
Return a view of the array with the order of the dimensions reversed. More... | |
Transpose | transpose (Index const &order) const |
Return a view of the array with the dimensions permuted. More... | |
Shallow const | shallow () const |
Return a Array view to this. More... | |
Deep const | deep () const |
Return an ArrayRef view to this. More... | |
EigenView< Element, ND::value, RMC::value, XprKind, Rows, Cols > | asEigen () const |
EigenView< Element, ND::value, RMC::value, XprKind > | asEigen () const |
EigenView< Element, ND::value, RMC::value, Eigen::MatrixXpr, Rows, Cols > | asEigen () const |
EigenView< Element, ND::value, RMC::value, Eigen::MatrixXpr > | asEigen () const |
![]() | |
Reference | operator[] (int n) const |
Return a single nested expression or element. More... | |
Reference | front () const |
Return the first nested expression or element. More... | |
Reference | back () const |
Return the last nested expression or element. More... | |
Iterator | begin () const |
Return an Iterator to the beginning of the expression. More... | |
Iterator | end () const |
Return an Iterator to one past the end of the expression. More... | |
template<int P> | |
int | getSize () const |
Return the size of a specific dimension. More... | |
Index | getShape () const |
Return a Vector of the sizes of all dimensions. More... | |
int | getNumElements () const |
Return the total number of elements in the expression. More... | |
size_type | size () const |
Return the size of the first dimension. More... | |
bool | empty () const |
Return true if the first dimension has no elements. More... | |
Private Types | |
typedef ArrayBaseN< Array > | Super |
typedef Super::Core | Core |
typedef Super::CorePtr | CorePtr |
Private Member Functions | |
Array (T *data, CorePtr const &core) | |
Friends | |
template<typename T_ , int N_, int C_> | |
class | Array |
template<typename T_ , int N_, int C_> | |
class | ArrayRef |
template<typename T_ , int N_, int C_> | |
struct | ArrayTraits |
template<typename Derived > | |
class | ArrayBase |
template<typename Array_ > | |
class | detail::ArrayAccess |
Additional Inherited Members | |
![]() | |
typedef Super::Element | Element |
![]() | |
typedef Traits::Element | Element |
Data type of array elements. More... | |
typedef Traits::Iterator | Iterator |
Nested array or element iterator. More... | |
typedef Traits::Reference | Reference |
Nested array or element reference. More... | |
typedef Traits::Value | Value |
Nested array or element value type. More... | |
typedef Traits::ND | ND |
Number of dimensions (boost::mpl::int_). More... | |
typedef Traits::RMC | RMC |
Number of guaranteed row-major contiguous dimensions, counted from the end (boost::mpl::int_). More... | |
typedef Vector< int, ND::value > | Index |
Vector type for N-dimensional indices. More... | |
typedef ArrayRef< Element, ND::value,-RMC::value > | FullTranspose |
ArrayRef to a reverse-ordered contiguous array; the result of a call to transpose(). More... | |
typedef ArrayRef< Element, ND::value, 0 > | Transpose |
ArrayRef to a noncontiguous array; the result of a call to transpose(...). More... | |
typedef Array< Element, ND::value, RMC::value > | Shallow |
The corresponding Array type. More... | |
typedef ArrayRef< Element, ND::value, RMC::value > | Deep |
The corresponding ArrayRef type. More... | |
![]() | |
typedef ExpressionTraits < Derived >::Element | Element |
Data type of expression elements. More... | |
typedef ExpressionTraits < Derived >::ND | ND |
Number of dimensions (boost::mpl::int_). More... | |
typedef ExpressionTraits < Derived >::Iterator | Iterator |
Nested expression or element iterator. More... | |
typedef ExpressionTraits < Derived >::Reference | Reference |
Nested expression or element reference. More... | |
typedef ExpressionTraits < Derived >::Value | Value |
Nested expression or element value type. More... | |
typedef Vector< int, ND::value > | Index |
Vector type for N-dimensional indices. More... | |
typedef Derived | Self |
CRTP derived type. More... | |
typedef Value | value_type |
typedef Iterator | iterator |
typedef Iterator | const_iterator |
typedef Reference | reference |
typedef Reference | const_reference |
typedef Iterator | pointer |
typedef int | difference_type |
typedef int | size_type |
![]() | |
typedef Super::Core | Core |
typedef Super::CorePtr | CorePtr |
![]() | |
typedef ExpressionTraits < Array< T, N, C > > | Traits |
typedef Traits::Core | Core |
typedef Traits::CorePtr | CorePtr |
![]() | |
ArrayBase (Element *data, CorePtr const &core) | |
void | operator= (ArrayBase const &other) |
![]() | |
Self & | getSelf () |
Self const & | getSelf () const |
![]() | |
Element * | _data |
CorePtr | _core |
A multidimensional strided array.
Array is the workhorse class of the ndarray library.
|
private |
|
private |
|
private |
|
inline |
|
inline |
|
inline |
Converting copy constructor.
Implicit conversion is allowed for non-const to const and for more guaranteed RMC to less guaranteed RMC (see LSST Documentation).
Definition at line 72 of file Array.h.
|
inline |
Converting copy constructor.
Implicit conversion is allowed for non-const to const and for more guaranteed RMC to less guaranteed RMC (see LSST Documentation).
Definition at line 86 of file Array.h.
|
inlineprivate |
|
inline |
|
inline |
Shallow inequality comparison.
Definition at line 155 of file Array.h.
|
inline |
|
inline |
Converting shallow assignment.
Implicit conversion is allowed for non-const -> const and for more guaranteed RMC -> less guaranteed RMC (see LSST Documentation).
Definition at line 116 of file Array.h.
|
inline |
Converting shallow assignment.
Implicit conversion is allowed for non-const -> const and for more guaranteed RMC -> less guaranteed RMC (see LSST Documentation).
Definition at line 134 of file Array.h.
|
inline |
Shallow equality comparison: return true if the arrays share data and have the same shape and strides.
Definition at line 145 of file Array.h.
|
inline |
Lightweight shallow swap.
Definition at line 160 of file Array.h.
|
friend |
|
friend |
|
friend |