Skip to content

Commit 1fb1716

Browse files
authored
document OffsetVector and OffsetMatrix (#160)
* document OffsetVector and OffsetMatrix * add to generated docs
1 parent e064d10 commit 1fb1716

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

docs/src/reference.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
```@docs
44
OffsetArray
5+
OffsetVector
6+
OffsetMatrix
57
OffsetArrays.Origin
68
OffsetArrays.IdOffsetRange
79
OffsetArrays.no_offset_view

src/OffsetArrays.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,19 @@ struct OffsetArray{T,N,AA<:AbstractArray} <: AbstractArray{T,N}
9797
new{T, N, AA}(parent, offsets)
9898
end
9999
end
100+
101+
"""
102+
OffsetVector(v, index)
103+
104+
Type alias and convenience constructor for one-dimensional [`OffsetArray`](@ref)s.
105+
"""
100106
const OffsetVector{T,AA<:AbstractArray} = OffsetArray{T,1,AA}
107+
108+
"""
109+
OffsetMatrix(A, index1, index2)
110+
111+
Type alias and convenience constructor for two-dimensional [`OffsetArray`](@ref)s.
112+
"""
101113
const OffsetMatrix{T,AA<:AbstractArray} = OffsetArray{T,2,AA}
102114

103115
function overflow_check(r, offset::T) where T

0 commit comments

Comments
 (0)