#include "tensorstore/index_interval.h"
class tensorstore::IndexIntervalRef;

Represents a mutable reference to an index interval stored as an inclusive_min, size pair.

Assignment modifies the referenced inclusive_min and size values.

Conversion operators

constexpr operator IndexInterval() const;

Converts to an IndexInterval.

Methods

constexpr IndexIntervalRef&
operator=(IndexInterval interval) noexcept;
constexpr IndexIntervalRef&
operator=(IndexIntervalRef interval) noexcept;

Assigns the referenced inclusive_min and size values.

constexpr Index inclusive_min() const;

Returns the inclusive lower bound.

constexpr Index size() const;

Returns the size of the interval.

constexpr bool empty() const;

Returns size() == 0.

constexpr Index exclusive_min() const;

Returns the exclusive lower bound.

constexpr Index exclusive_max() const;

Returns the inclusive upper bound of the interval. :returns: inclusive_min() + size().

constexpr Index inclusive_max() const;

Returns the inclusive upper bound of the interval.

static constexpr IndexIntervalRef
UncheckedSized(Indexinclusive_minIndexsize);

Returns an IndexIntervalRef that refers to the specified inclusive_min and size values.

Friend functions

friend std::ostreamoperator<<(std::ostreamosIndexIntervalRef x);

Prints a string representation.

friend constexpr bool
operator==(IndexIntervalRef aIndexIntervalRef b);

Compares two intervals for equality.