LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Public Types | Public Member Functions | Private Attributes | List of all members
ndarray::detail::CountingExpression Class Reference

#include <arange.h>

Inheritance diagram for ndarray::detail::CountingExpression:
ndarray::ExpressionBase< CountingExpression >

Public Types

typedef ExpressionTraits
< CountingExpression >
::Element 
Element
 
typedef ExpressionTraits
< CountingExpression >::ND 
ND
 
typedef ExpressionTraits
< CountingExpression >
::Iterator 
Iterator
 
typedef ExpressionTraits
< CountingExpression >::Value 
Value
 
typedef ExpressionTraits
< CountingExpression >
::Reference 
Reference
 
typedef Vector< int, 1 > Index
 
- Public Types inherited from ndarray::ExpressionBase< CountingExpression >
typedef ExpressionTraits
< CountingExpression >
::Element 
Element
 Data type of expression elements. More...
 
typedef ExpressionTraits
< CountingExpression >::ND 
ND
 Number of dimensions (boost::mpl::int_). More...
 
typedef ExpressionTraits
< CountingExpression >
::Iterator 
Iterator
 Nested expression or element iterator. More...
 
typedef ExpressionTraits
< CountingExpression >
::Reference 
Reference
 Nested expression or element reference. More...
 
typedef ExpressionTraits
< CountingExpression >::Value 
Value
 Nested expression or element value type. More...
 
typedef Vector< int, ND::value > Index
 Vector type for N-dimensional indices. More...
 
typedef CountingExpression 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
 

Public Member Functions

 CountingExpression (int stop=0)
 
Reference operator[] (int n) const
 
Iterator begin () const
 
Iterator end () const
 
template<int P>
int getSize () const
 
Index getShape () const
 
- Public Member Functions inherited from ndarray::ExpressionBase< CountingExpression >
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...
 
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 Attributes

int _stop
 

Additional Inherited Members

- Protected Member Functions inherited from ndarray::ExpressionBase< CountingExpression >
SelfgetSelf ()
 
Self const & getSelf () const
 

Detailed Description

Definition at line 60 of file arange.h.

Member Typedef Documentation

Definition at line 62 of file arange.h.

Definition at line 67 of file arange.h.

Definition at line 64 of file arange.h.

Definition at line 63 of file arange.h.

Definition at line 66 of file arange.h.

Definition at line 65 of file arange.h.

Constructor & Destructor Documentation

ndarray::detail::CountingExpression::CountingExpression ( int  stop = 0)
inline

Definition at line 69 of file arange.h.

69 : _stop(stop) { NDARRAY_ASSERT(stop >= 0); }
#define NDARRAY_ASSERT(ARG)
Definition: ndarray_fwd.h:51

Member Function Documentation

Iterator ndarray::detail::CountingExpression::begin ( ) const
inline

Definition at line 75 of file arange.h.

75  {
76  return Iterator(0);
77  }
ExpressionTraits< CountingExpression >::Iterator Iterator
Definition: arange.h:64
Iterator ndarray::detail::CountingExpression::end ( ) const
inline

Definition at line 79 of file arange.h.

79  {
80  return Iterator(_stop);
81  }
ExpressionTraits< CountingExpression >::Iterator Iterator
Definition: arange.h:64
Index ndarray::detail::CountingExpression::getShape ( ) const
inline

Definition at line 88 of file arange.h.

88  {
89  return makeVector(_stop);
90  }
Vector< T, N > makeVector(T v1, T v2,..., T vN)
Variadic constructor for Vector.
template<int P>
int ndarray::detail::CountingExpression::getSize ( ) const
inline

Definition at line 83 of file arange.h.

83  {
84  BOOST_STATIC_ASSERT(P==0);
85  return _stop;
86  }
Reference ndarray::detail::CountingExpression::operator[] ( int  n) const
inline

Definition at line 71 of file arange.h.

71  {
72  return n;
73  }

Member Data Documentation

int ndarray::detail::CountingExpression::_stop
private

Definition at line 93 of file arange.h.


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