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> using DimensionalData
julia> X(1)
X 1
julia> X(1), Y(2), Z(3)
(↓ X 1, → Y 2, ↗ Z 3)
You can also create Dim
dimensions with any name:
julia> Dim{:a}(1), Dim{:b}(1)
(↓ a 1, → b 1)
The wrapped value can be retrieved with val
:
julia> val(X(1))
1
DimensionalData.jl uses Dimensions
everywhere:
Dimension
s are returned fromdims
to specify the names of the dimensions of an objectThey can wrap
Lookups
to associate the lookups with those namesTo index into these objects, they can wrap indices like
Int
or aSelector
This symmetry means we can ignore how data is organized, and label and access it by name, letting DD work out the details for us.
Dimensions are defined in the Dimensions
submodule, and some Dimension-specific methods can be brought into scope with:
using DimensionalData.Dimensions