Jive reference manual
List of all members | Public Member Functions
jem::SliceAll Class Reference

A class for creating a contiguous slice that contains all elements of an array-like object. More...

#include <jem/base/Slice.h>

Inheritance diagram for jem::SliceAll:
Inheritance graph

Public Member Functions

 SliceAll ()
 Creates a new SliceAll instance. More...
 
- Public Member Functions inherited from jem::SliceFrom
 SliceFrom (int first)
 Creates a SliceFrom with a given begin index. More...
 
- Public Member Functions inherited from jem::Slice
 Slice ()
 Creates an empty Slice. More...
 
 Slice (int first, int last, int stride=1)
 Constructs a Slice with a given begin index, end index and stride. More...
 
int first () const
 Returns the begin index. More...
 
int last () const
 Returns the end index. More...
 
int last (int ubound) const
 Returns a clipped end index. More...
 
int stride () const
 Returns the stride. More...
 

Additional Inherited Members

- Static Public Attributes inherited from jem::Slice
static const int MAX_INDEX
 The largest representable integer. More...
 

Detailed Description

A SliceAll is basically a SliceFrom with a begin index equal to zero. It is primarily used to take slices out of multi-dimensional arrays. For one-dimensional arrays it is not very useful. For convenience, there exists a pre-defined instance of this class, named ALL, that can be passed directly to a slice operator.

See also
slice(), Array.

Constructor & Destructor Documentation

jem::SliceAll::SliceAll ( )

Creates a new SliceAll instance.

Postcondition
this->first() == 0 &&
this->last() == Slice::INIFINITY &&
this->stride() == 1