-
#include "tensorstore/index_space/dimension_identifier.h" -
Result<DimensionIndex>
tensorstore::NormalizeDimensionLabel(std::string_view label,
span<const std::string> labels); -
Result<DimensionIndex> tensorstore::NormalizeDimensionLabel(
std::string_view label,
span<const std::string_view> labels); Converts a dimension label to a dimension index.
- Parameters:¶
- std::string_view label¶
The dimension label to convert.
- span<const std::string> labels¶
- span<const std::string_view> labels
The dimension labels.
- Returns:¶
The unique dimension index
ifor whichlabels[i] == label.- Error absl::StatusCode::kInvalidArgument:¶
if there is not a unique index
isuch thatlabels[i] == label.