opatIO-cpp 0.3.0a
Open Parametrized Array Table
Loading...
Searching...
No Matches
opat::Slice Struct Reference

Structure to represent a slice of data. More...

#include <opatIO.h>

Public Attributes

uint32_t start
 Start index of the slice.
 
uint32_t end
 End index of the slice.
 

Friends

std::ostream & operator<< (std::ostream &os, const Slice &slice)
 Stream insertion operator for printing the slice.
 

Detailed Description

Structure to represent a slice of data.

A Slice defines a range of rows or columns to extract from a table.

Note
This Slice does not support defining step sizes, just ranges.

Example:

// Assume you have an opat file loaded into the variable opat
Slice rowSlice(6, 12);
Slice colSlice(1, 3);
FloatIndexVector index({0.35, 0.004});
opat::OPATTable table = opat[index]["data"].slice(rowSlice, colSlice);
Definition indexVector.h:38
Definition opatIO.cpp:37
Structure to hold the data of an OPAT table.
Definition opatIO.h:259
Structure to represent a slice of data.
Definition opatIO.h:239

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
const Slice & slice )
friend

Stream insertion operator for printing the slice.

Parameters
osOutput stream.
sliceSlice to print.
Returns
Reference to the output stream.

Member Data Documentation

◆ end

uint32_t opat::Slice::end

End index of the slice.

◆ start

uint32_t opat::Slice::start

Start index of the slice.


The documentation for this struct was generated from the following file: