#include "tensorstore/index_space/dimension_units.h"
using tensorstore::DimensionUnitsVector =
   
 std::vector<std::optional<Unit>>;

Vector specifying optional units for each dimension of an index space.

std::string tensorstore::DimensionUnitsToString(
    
span<const std::optional<Unit>> u);

Converts a dimension unit vector to a string for use in error messages.

absl::Status tensorstore::MergeDimensionUnits(
    
DimensionUnitsVectorexisting_units,
    
span<const std::optional<Unit>> new_units);

Merges new dimension units with existing dimension units.

Result<DimensionUnitsVector>
tensorstore::TransformInputDimensionUnits(
    
IndexTransformView<> transform,
    
DimensionUnitsVector input_units);

Converts dimension units for the input space to dimension units for the output space.

DimensionUnitsVector tensorstore::TransformOutputDimensionUnits(
    
IndexTransformView<> transform,
    
DimensionUnitsVector output_units);

Converts dimension units for the output space to dimension units for the input space.