#include <slice.h>
Public Member Functions | |
Slice () | |
Default constructor initializes everything to zero. | |
Slice (int start, int stop) | |
This constructor sets start and stop as specified, and defaults stride to 1. | |
Slice (int start, int stop, int stride) | |
This constructor lets the caller specify all three values. | |
int | start () const |
Accessor function for the value of start. | |
int | stop () const |
Accessor function for the value of stop. | |
int | stride () const |
Accessor function for the value of stride. |
This is modeled after std::slice, but has "stop" instead of "size," and permits negative indexing.
Definition at line 27 of file slice.h.
dlr::numeric::Slice::Slice | ( | ) | [inline] |
dlr::numeric::Slice::Slice | ( | int | start, | |
int | stop | |||
) | [inline] |
dlr::numeric::Slice::Slice | ( | int | start, | |
int | stop, | |||
int | stride | |||
) | [inline] |
This constructor lets the caller specify all three values.
start | This argument specifies the desired first element. | |
stop | This argument specifies an element one beyond the desired last element. | |
stride | This argument specifies how many elements to skip with each step. |
int dlr::numeric::Slice::start | ( | ) | const [inline] |
int dlr::numeric::Slice::stop | ( | ) | const [inline] |
int dlr::numeric::Slice::stride | ( | ) | const [inline] |