API

Modules

Types and constants

Functions and macros

Documentation

StaticThings.StaticThingsModule
StaticThings

StaticThings provides tools to help write generic code that works with both static and non-static values and arrays.

source
StaticThings.AxesLikeType
AxesLike = Union{Tuple{},Tuple{Vararg{AbstractVector{<:IntegerLike}}}}

Something that can represent axes of a collection.

source
StaticThings.StaticAxesLikeType
StaticAxesLike = Tuple{Vararg{Union{StaticArrays.SOneTo,StaticArrays.SUnitRange,Static.SUnitRange}}}

Something that can represent axes of a statically sized collection.

source
StaticThings.StaticOneToType
const StaticOneTo{T} = StaticArrays.SOneTo{T}

The StaticThings default type for static one-based unit ranges.

Currently an alias for StaticArrays.SOneTo.

source
StaticThings.StaticUnitRangeType
StaticUnitRange

The StaticThings default type for static unit ranges.

Currently an alias for StaticArrays.SUnitRange, if it exists, otherwise an alias for Static.SUnitRange.

source
StaticThings.OneToLikeType
OneToLike = Union{Base.OneTo,StaticArrays.SOneTo,Static.SOneTo}

Alias for unit ranges that start at one.

source
StaticThings.SizeLikeType
SizeLike = Union{Tuple{},Tuple{Vararg{IntegerLike}},StaticArrays.Size}

Something that can represent the size of a collection.

source
StaticThings.StaticSizeLikeType
StaticSizeLike = Union{Tuple{Vararg{StaticInteger}},StaticArrays.Size}

Something that can represent the size of a statically sized collection.

source
StaticThings.asaxesFunction
asaxes(axs::AxesLike)
asaxes(sz::SizeLike)
asaxes(len::IntegerLike)

Converts axes or a size or a length of a collection to axes.

One-based indexing will be used if the indexing offset can't be inferred from the given dimensions.

source
StaticThings.axes2sizeFunction
StaticThings.axes2size(x::Tuple)
StaticThings.axes2size(x::StaticArrays.Size)

Get the size of a collection-like object from it's axes.

source
StaticThings.maybestatic_fillFunction
maybestatic_fill(x, sz::NTuple{N,<:IntegerLike}) where N

Creates an array of size sz filled with x.

The result will typically be either a FillArrays.Fill or a StaticArrays.StaticArray.

source
StaticThings.size2axesFunction
size2axes(sz::Tuple)
size2axes(sz::StaticArrays.Size)

Get one-based indexing axes from a size of a collection-like object.

source