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

Simple structure defining a noncontiguous range of indices. More...

#include <views.h>

Public Member Functions

 Slice (int start_, int stop_, int step_)
 
int computeSize () const
 

Public Attributes

int start
 
int stop
 
int step
 

Detailed Description

Simple structure defining a noncontiguous range of indices.

Definition at line 41 of file views.h.

Constructor & Destructor Documentation

ndarray::index::Slice::Slice ( int  start_,
int  stop_,
int  step_ 
)
inline

Definition at line 46 of file views.h.

46 : start(start_), stop(stop_), step(step_) {}

Member Function Documentation

int ndarray::index::Slice::computeSize ( ) const
inline

Definition at line 48 of file views.h.

48 { return (step > 1) ? (stop - start + 1) / step : stop - start; }

Member Data Documentation

int ndarray::index::Slice::start

Definition at line 42 of file views.h.

int ndarray::index::Slice::step

Definition at line 44 of file views.h.

int ndarray::index::Slice::stop

Definition at line 43 of file views.h.


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