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 | Public Member Functions | Public Attributes | List of all members
ndarray::View< Seq_ > Struct Template Reference

A template meta-sequence that defines an arbitrary view into an unspecified array. More...

#include <views.h>

Public Types

typedef Seq_ Sequence
 A boost::fusion sequence type. More...
 
typedef View< typename
boost::fusion::result_of::push_back
< Sequence const, index::Full >
::type > 
Full
 The View that results from chaining an full dimension index () to this. More...
 
typedef View< typename
boost::fusion::result_of::push_back
< Sequence const, index::Range >
::type > 
Range
 The View that results from chaining a range (start,stop) to this. More...
 
typedef View< typename
boost::fusion::result_of::push_back
< Sequence const, index::Slice >
::type > 
Slice
 The View that results from chaining a slice (start,stop,step) to this. More...
 
typedef View< typename
boost::fusion::result_of::push_back
< Sequence const,
index::Scalar >::type > 
Scalar
 The View that results from chaining a scalar (n) to this. More...
 

Public Member Functions

 View (Sequence seq)
 
template<typename OtherSequence >
 View (OtherSequence const &other)
 
template<typename OtherSequence >
 View (View< OtherSequence > const &other)
 
Full operator() () const
 Chain the full next dimension to this. More...
 
Range operator() (int start, int stop) const
 Chain a contiguous range of the next dimension to this. More...
 
Slice operator() (int start, int stop, int step) const
 Chain a noncontiguous slice of the next dimension to this. More...
 
Scalar operator() (int n) const
 Chain a single element of the next dimension to this. More...
 

Public Attributes

Sequence _seq
 A boost::fusion sequence of index objects. More...
 

Detailed Description

template<typename Seq_ = boost::fusion::vector<>>
struct ndarray::View< Seq_ >

A template meta-sequence that defines an arbitrary view into an unspecified array.

A View is constructed from a call to the global view() function and subsequent chained calls to operator().

Definition at line 84 of file views.h.

Member Typedef Documentation

template<typename Seq_ = boost::fusion::vector<>>
typedef View<typename boost::fusion::result_of::push_back<Sequence const,index::Full>::type> ndarray::View< Seq_ >::Full

The View that results from chaining an full dimension index () to this.

Definition at line 97 of file views.h.

template<typename Seq_ = boost::fusion::vector<>>
typedef View<typename boost::fusion::result_of::push_back<Sequence const,index::Range>::type> ndarray::View< Seq_ >::Range

The View that results from chaining a range (start,stop) to this.

Definition at line 100 of file views.h.

template<typename Seq_ = boost::fusion::vector<>>
typedef View<typename boost::fusion::result_of::push_back<Sequence const,index::Scalar>::type> ndarray::View< Seq_ >::Scalar

The View that results from chaining a scalar (n) to this.

Definition at line 106 of file views.h.

template<typename Seq_ = boost::fusion::vector<>>
typedef Seq_ ndarray::View< Seq_ >::Sequence

A boost::fusion sequence type.

Definition at line 85 of file views.h.

template<typename Seq_ = boost::fusion::vector<>>
typedef View<typename boost::fusion::result_of::push_back<Sequence const,index::Slice>::type> ndarray::View< Seq_ >::Slice

The View that results from chaining a slice (start,stop,step) to this.

Definition at line 103 of file views.h.

Constructor & Destructor Documentation

template<typename Seq_ = boost::fusion::vector<>>
ndarray::View< Seq_ >::View ( Sequence  seq)
inlineexplicit

Definition at line 88 of file views.h.

88 : _seq(seq) {}
Sequence _seq
A boost::fusion sequence of index objects.
Definition: views.h:86
template<typename Seq_ = boost::fusion::vector<>>
template<typename OtherSequence >
ndarray::View< Seq_ >::View ( OtherSequence const &  other)
inlineexplicit

Definition at line 91 of file views.h.

91 : _seq(other) {}
Sequence _seq
A boost::fusion sequence of index objects.
Definition: views.h:86
template<typename Seq_ = boost::fusion::vector<>>
template<typename OtherSequence >
ndarray::View< Seq_ >::View ( View< OtherSequence > const &  other)
inline

Definition at line 94 of file views.h.

94 : _seq(other._seq) {}
Sequence _seq
A boost::fusion sequence of index objects.
Definition: views.h:86

Member Function Documentation

template<typename Seq_ = boost::fusion::vector<>>
Full ndarray::View< Seq_ >::operator() ( ) const
inline

Chain the full next dimension to this.

Definition at line 109 of file views.h.

109 { return Full(boost::fusion::push_back(_seq, index::Full())); }
View< typename boost::fusion::result_of::push_back< Sequence const, index::Full >::type > Full
The View that results from chaining an full dimension index () to this.
Definition: views.h:97
Sequence _seq
A boost::fusion sequence of index objects.
Definition: views.h:86
template<typename Seq_ = boost::fusion::vector<>>
Range ndarray::View< Seq_ >::operator() ( int  start,
int  stop 
) const
inline

Chain a contiguous range of the next dimension to this.

Definition at line 112 of file views.h.

112  {
113  return Range(boost::fusion::push_back(_seq, index::Range(start, stop)));
114  }
View< typename boost::fusion::result_of::push_back< Sequence const, index::Range >::type > Range
The View that results from chaining a range (start,stop) to this.
Definition: views.h:100
Sequence _seq
A boost::fusion sequence of index objects.
Definition: views.h:86
template<typename Seq_ = boost::fusion::vector<>>
Slice ndarray::View< Seq_ >::operator() ( int  start,
int  stop,
int  step 
) const
inline

Chain a noncontiguous slice of the next dimension to this.

Definition at line 117 of file views.h.

117  {
118  return Slice(boost::fusion::push_back(_seq, index::Slice(start, stop, step)));
119  }
Sequence _seq
A boost::fusion sequence of index objects.
Definition: views.h:86
View< typename boost::fusion::result_of::push_back< Sequence const, index::Slice >::type > Slice
The View that results from chaining a slice (start,stop,step) to this.
Definition: views.h:103
template<typename Seq_ = boost::fusion::vector<>>
Scalar ndarray::View< Seq_ >::operator() ( int  n) const
inline

Chain a single element of the next dimension to this.

Definition at line 122 of file views.h.

122  {
123  return Scalar(boost::fusion::push_back(_seq, index::Scalar(n)));
124  }
View< typename boost::fusion::result_of::push_back< Sequence const, index::Scalar >::type > Scalar
The View that results from chaining a scalar (n) to this.
Definition: views.h:106
Sequence _seq
A boost::fusion sequence of index objects.
Definition: views.h:86

Member Data Documentation

template<typename Seq_ = boost::fusion::vector<>>
Sequence ndarray::View< Seq_ >::_seq

A boost::fusion sequence of index objects.

Definition at line 86 of file views.h.


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