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 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: