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
Public Types | Static Public Member Functions | List of all members
ndarray::ArrayTraits< T, N, C > Struct Template Reference

Dimension-specialized traits shared by Array and ArrayRef. More...

#include <ArrayTraits.h>

Inheritance diagram for ndarray::ArrayTraits< T, N, C >:
ndarray::ExpressionTraits< Array< T, N, C > > ndarray::ExpressionTraits< ArrayRef< T, N, C > >

Public Types

typedef T Element
 
typedef boost::mpl::int_< N > ND
 
typedef boost::mpl::int_< C > RMC
 
typedef detail::NestedIterator
< T, N, C > 
Iterator
 
typedef ArrayRef< T, N-1,(N==C)?(N-1):((C >
0)?C:0)> 
Reference
 
typedef Array< T, N-1,(N==C)?(N-1):((C >
0)?C:0)> 
Value
 
typedef detail::Core< N > Core
 
typedef Core::ConstPtr CorePtr
 

Static Public Member Functions

static Reference makeReference (Element *data, CorePtr const &core)
 
static Iterator makeIterator (Element *data, CorePtr const &core, int stride)
 
static void fill (Iterator iter, Iterator const &end, Element value)
 

Detailed Description

template<typename T, int N, int C>
struct ndarray::ArrayTraits< T, N, C >

Dimension-specialized traits shared by Array and ArrayRef.

Definition at line 56 of file ArrayTraits.h.

Member Typedef Documentation

template<typename T, int N, int C>
typedef detail::Core<N> ndarray::ArrayTraits< T, N, C >::Core

Definition at line 63 of file ArrayTraits.h.

template<typename T, int N, int C>
typedef Core::ConstPtr ndarray::ArrayTraits< T, N, C >::CorePtr

Definition at line 64 of file ArrayTraits.h.

template<typename T, int N, int C>
typedef T ndarray::ArrayTraits< T, N, C >::Element

Definition at line 57 of file ArrayTraits.h.

template<typename T, int N, int C>
typedef detail::NestedIterator<T,N,C> ndarray::ArrayTraits< T, N, C >::Iterator

Definition at line 60 of file ArrayTraits.h.

template<typename T, int N, int C>
typedef boost::mpl::int_<N> ndarray::ArrayTraits< T, N, C >::ND

Definition at line 58 of file ArrayTraits.h.

template<typename T, int N, int C>
typedef ArrayRef<T,N-1,(N==C)?(N-1):((C>0)?C:0)> ndarray::ArrayTraits< T, N, C >::Reference

Definition at line 61 of file ArrayTraits.h.

template<typename T, int N, int C>
typedef boost::mpl::int_<C> ndarray::ArrayTraits< T, N, C >::RMC

Definition at line 59 of file ArrayTraits.h.

template<typename T, int N, int C>
typedef Array<T,N-1,(N==C)?(N-1):((C>0)?C:0)> ndarray::ArrayTraits< T, N, C >::Value

Definition at line 62 of file ArrayTraits.h.

Member Function Documentation

template<typename T, int N, int C>
static void ndarray::ArrayTraits< T, N, C >::fill ( Iterator  iter,
Iterator const &  end,
Element  value 
)
inlinestatic

Definition at line 72 of file ArrayTraits.h.

72  {
73  // We can't use std::fill here because NestedIterator is not formally an STL ForwardIterator;
74  // it has random access traversal, but it does not dereference to an addressable type (see
75  // http://www.boost.org/doc/libs/1_55_0/libs/iterator/doc/new-iter-concepts.html#motivation)
76  // Most C++ standard libraries have a fill implementation that will accept NestedIterator
77  // anyway, but Clang's libc++ is more strictly compliant and does not.
78  for (; iter != end; ++iter) {
79  *iter = value;
80  }
81  }
int iter
template<typename T, int N, int C>
static Iterator ndarray::ArrayTraits< T, N, C >::makeIterator ( Element data,
CorePtr const &  core,
int  stride 
)
inlinestatic

Definition at line 69 of file ArrayTraits.h.

69  {
70  return Iterator(Reference(data, core), stride);
71  }
ArrayRef< T, N-1,(N==C)?(N-1):((C >0)?C:0)> Reference
Definition: ArrayTraits.h:61
detail::NestedIterator< T, N, C > Iterator
Definition: ArrayTraits.h:60
template<typename T, int N, int C>
static Reference ndarray::ArrayTraits< T, N, C >::makeReference ( Element data,
CorePtr const &  core 
)
inlinestatic

Definition at line 66 of file ArrayTraits.h.

66  {
67  return Reference(data, core);
68  }
ArrayRef< T, N-1,(N==C)?(N-1):((C >0)?C:0)> Reference
Definition: ArrayTraits.h:61

The documentation for this struct was generated from the following file: