Dimensions
Dimensions are "wrapper types" that can be used to wrap any object to associate it with a named dimension.
X, Y, Z, Ti are predefined as types:
julia
julia> using DimensionalData
julia> X(1)X 1julia
julia> X(1), Y(2), Z(3)↓ X 1, → Y 2, ↗ Z 3You can also make Dim dimensions with any name:
julia
julia> Dim{:a}(1), Dim{:b}(1)↓ a 1, → b 1The wrapped value can be retrieved with val:
julia
julia> val(X(1))1DimensionalData.jl uses Dimensions everywhere:
Dimensionare returned fromdimsto specify the names of the dimensions of an objectthey wrap
Lookupsto associate the lookups with those namesto index into these objects, they wrap indices like
Intor aSelector
This symmetry means we can ignore how data is organised, and label and access it by name, letting DD work out the details for us.
Dimensions are defined in the Dimensions submodule, some Dimension-specific methods can be brought into scope with:
julia
using DimensionalData.Dimensions