gslice

gslice

class gslice {
public:
    gslice();
    gslice(size_t st,
        const valarray<size_t> len, const valarray<size_t> str);
    size_t start() const;
    const valarray<size_t> size() const;
    const valarray<size_t> stride() const;
    };

The class stores the parameters that characterize a gslice_array when an object of class gslice appears as a subscript for an object of class valarray<T>. The stored values include:

  • A starting index
  • A length vector of class valarray<size_t>
  • A stride vector of class valarray<size_t>

The two vectors must have the same length.