#include "tensorstore/index_interval.h"
template <ContainerKind LabelCKind = container>
class tensorstore::IndexDomainDimension
   
 : public OptionallyImplicitIndexInterval;

Represents an index interval with optionally-implicit bounds and an optionally dimension label.

Template Parameters:
ContainerKind LabelCKind = container

Specifies how the dimension label is stored.

Types

using Label = std::conditional_t<LabelCKind == container,
                                
 std::string,
                                
 std::string_view>;

Dimension label representation.

Constructors

IndexDomainDimension();

Constructs an unlabeled dimension with infinite, implicit bounds.

IndexDomainDimension(const OptionallyImplicitIndexIntervalinterval);

Constructs an unlabeled dimension with the specified bounds.

IndexDomainDimension(const OptionallyImplicitIndexIntervalinterval,
                     
Label label);

Constructs a dimension with the given bounds and label.

IndexDomainDimension(const IndexDomainDimension<OtherCKind>other);

Converts the label storage kind.

Methods

IndexDomainDimension&
operator=(const IndexDomainDimension<OtherCKind>other);

Assigns the label and bounds.

const OptionallyImplicitIndexInterval&
optionally_implicit_interval() const;
OptionallyImplicitIndexIntervaloptionally_implicit_interval();

Returns the dimension bounds.

std::string_view label() const;
Labellabel();

Returns the dimension label.

Friend functions

friend bool operator==(const IndexDomainDimension<container>a,
                       
const IndexDomainDimension<container>b);
friend bool operator==(const IndexDomainDimension<view>a,
                       
const IndexDomainDimension<view>b);
friend bool operator==(const IndexDomainDimension<view>a,
                       
const IndexDomainDimension<container>b);
friend bool operator==(const IndexDomainDimension<container>a,
                       
const IndexDomainDimension<view>b);

Compares the bounds and labels.

Result<std::string_view>
tensorstore::MergeDimensionLabels(std::string_view a,
                                  
std::string_view b);

Merges two dimension labels.