Class Slice

Class Documentation

class Slice

Slice object used in SliceOption.

Public Functions

inline Slice()

Constructor, with start, stop and step default to 0.

inline Slice(dsize_t start, dsize_t stop, dsize_t step)

Constructor.

Parameters
  • start[in] Starting integer specifying where to start the slicing.

  • stop[in] Ending integer specifying where to stop the slicing.

  • step[in] An integer specifying the step of the slicing.

Example
/* Slice dimension from 2 to 10 with step 2. */
Slice(0, 10, 2);
inline Slice(dsize_t start, dsize_t stop)

Constructor, with step=1.

Parameters
  • start[in] Starting integer specifying where to start the slicing.

  • stop[in] Ending integer specifying where to stop the slicing.

Example
/* Slice dimension from 5 to 10 with step 1. */
Slice(5, 10);
inline explicit Slice(dsize_t stop)

Constructor, with start=0 and step=1.

Parameters

stop[in] Ending integer specifying where to stop the slicing.

Example
/* Slice dimension from 0 to 5 with step 1. */
Slice(5);