16 #ifndef SERIALBOX_CORE_SLICE_H 17 #define SERIALBOX_CORE_SLICE_H 69 assert(stop < 0 || stop >=
start);
93 assert(stop < 0 || stop >=
start);
100 bool empty() const noexcept {
return sliceTriples_.empty(); }
103 void swap(
Slice& other) noexcept { sliceTriples_.swap(other.sliceTriples_); }
106 std::vector<SliceTriple>&
sliceTriples() noexcept {
return sliceTriples_; }
107 const std::vector<SliceTriple>& sliceTriples()
const noexcept {
return sliceTriples_; }
110 std::vector<SliceTriple> sliceTriples_;
int step
Step of the slice.
Slice & operator()(int start=0, int stop=-1, int step=1) noexcept
Append a slice to the i-th dimension where i is the current size() of the sliceTriples vector...
int start
Starting index of the slice.
Namespace of the serialbox library.
void swap(Slice &other) noexcept
Swap with other
int stop
Stopping index of the slice (index stop is not included)
std::vector< SliceTriple > & sliceTriples() noexcept
Get slice triples.
bool empty() const noexcept
Check if slice is empty.
Specification of the slice indices which is used for partial loading of serialized data...
Slice(int start=0, int stop=-1, int step=1) noexcept
Initialize the slice of the first dimension.