Tannic
A C++ Tensor Library
Loading...
Searching...
No Matches
tannic::indexing::Range Struct Reference

Represents a half-open interval [start, stop) for slicing. More...

#include <indexing.hpp>

Public Attributes

int start = 0
 
int stop = -1
 

Detailed Description

Represents a half-open interval [start, stop) for slicing.

The Range struct mimics Python's slice behavior:

  • start is inclusive
  • stop is exclusive
  • Negative values are allowed and are interpreted relative to the size of the dimension being indexed.

By default:

  • start = 0 (beginning of the axis)
  • stop = -1 (interpreted as "until the end" when normalized)
See also
normalize(Range, Size)

Member Data Documentation

◆ start

int tannic::indexing::Range::start = 0

◆ stop

int tannic::indexing::Range::stop = -1

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