View RefTypes.jl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module RefTypes | |
import .Base.Sys: ARCH, WORD_SIZE | |
export | |
AtomicRef, | |
ImmutableRef, | |
MutableRef, | |
StaticRef, | |
add!, |
View GraphTraits.jl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module GraphTraits | |
abstract type GraphStyle end | |
GraphStyle(x) = GraphStyle(typeof(x)) | |
GraphStyle(::Type{T}) where {T} = throw(MethodError(GraphStyle, T)) | |
vertex_type(x) = vertex_type(typeof(x)) | |
vertex_type(::Type{T}) where {T} = throw(MethodError(vertex_type, T)) |
View composable_indices.jl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract type AccessStyle end | |
struct LinearElement <: AccessStyle end | |
struct CartesianElement <: AccessStyle end | |
struct LinearCollection <: AccessStyle end | |
struct CartesianCollection <: AccessStyle end |
View layouts.jl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if VERSION < v"1.6" | |
struct ComposedFunction{O,I} <: Function | |
outer::O | |
inner::I | |
ComposedFunction{O, I}(outer, inner) where {O, I} = new{O, I}(outer, inner) | |
ComposedFunction(outer, inner) = new{Core.Typeof(outer),Core.Typeof(inner)}(outer, inner) | |
end | |
(c::ComposedFunction)(x...; kw...) = c.outer(c.inner(x...; kw...)) | |
end |
View AxisIndicesGraphs.jl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module AxisIndicesGraphs | |
using AxisIndices, LightGraphs, SimpleWeightedGraphs | |
using Base: to_index, @propagate_inbounds | |
struct AxisIndicesGraph{T,G<:AbstractGraph{T},AI} <: AbstractGraph{T} | |
graph::G | |
axes::AI |
View plot_tick_shortcuts.jl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
ticklabels(scene) | |
Returns the all the axis tick labels. | |
""" | |
function ticklabels(scene) | |
axis = scene[Axis] | |
@assert !isnothing(axis) | |
return axis.ticks.ranges_labels[][2] | |
end |
View named_array_traits.jl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Base: tail, to_dim | |
struct Dim{Sym} end | |
const TimeDim = Dim{:time}() | |
const ColorDim = Dim{:color}() | |
struct HasDimNames{T} end | |
HasDimNames(x::T) where T = HasDimNames(T) | |
HasDimNames(::Type{T}) where T = HasDimNames{false}() |