Skip to content

Commit bdbfe00

Browse files
authored
Bump Documenter version to v1+ (#215)
1 parent 82a6a82 commit bdbfe00

File tree

10 files changed

+41
-30
lines changed

10 files changed

+41
-30
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "LinearMaps"
22
uuid = "7a12625a-238d-50fd-b39a-03d52299707e"
3-
version = "3.11.0"
3+
version = "3.11.1"
44

55
[deps]
66
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"

docs/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
77

88
[compat]
99
BenchmarkTools = "1"
10-
Documenter = "0.25, 0.26, 0.27"
10+
Documenter = "1"
1111
Literate = "2"

docs/make.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ Literate.markdown(joinpath(@__DIR__, "src", "custom.jl"), joinpath(@__DIR__, "sr
88

99
makedocs(
1010
sitename = "LinearMaps.jl",
11-
format = Documenter.HTML(),
12-
modules = [LinearMaps],
11+
modules = [LinearMaps,
12+
isdefined(Base, :get_extension) ? Base.get_extension(LinearMaps, :LinearMapsSparseArraysExt) :
13+
LinearMaps.LinearMapsSparseArraysExt],
1314
pages = Any[
1415
"Home" => "index.md",
1516
"Version history" => "history.md",

docs/src/types.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ Type for representing a scalar multiple of any `LinearMap` type. A
4343
objects are multiplied by real or complex scalars from the left or from the
4444
right.
4545

46+
```@docs
47+
LinearMaps.ScaledMap
48+
```
49+
4650
### `UniformScalingMap`
4751

4852
Type for representing a scalar multiple of the identity map (a.k.a. uniform
@@ -98,6 +102,12 @@ Base.hcat
98102
Base.vcat
99103
Base.hvcat
100104
Base.cat
105+
```
106+
107+
With `using SparseArrays`, yet another method is available for creating lazy block-diagonal
108+
maps.
109+
110+
```@docs
101111
SparseArrays.blockdiag
102112
```
103113

src/LinearMaps.jl

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,12 @@ Compute the action of the linear map `A` on the vector `x`.
118118
julia> A=LinearMap([1.0 2.0; 3.0 4.0]); x=[1.0, 1.0];
119119
120120
julia> A*x
121-
2-element Array{Float64,1}:
121+
2-element Vector{Float64}:
122122
3.0
123123
7.0
124124
125125
julia> A(x)
126-
2-element Array{Float64,1}:
126+
2-element Vector{Float64}:
127127
3.0
128128
7.0
129129
```
@@ -147,17 +147,13 @@ with either `A` or `B`.
147147
148148
## Examples
149149
```jldoctest; setup=(using LinearAlgebra, LinearMaps)
150-
julia> A=LinearMap([1.0 2.0; 3.0 4.0]); B=ones(2); Y = similar(B); mul!(Y, A, B);
151-
152-
julia> Y
153-
2-element Array{Float64,1}:
150+
julia> A = LinearMap([1.0 2.0; 3.0 4.0]); B = ones(2); Y = similar(B); mul!(Y, A, B)
151+
2-element Vector{Float64}:
154152
3.0
155153
7.0
156154
157-
julia> A=LinearMap([1.0 2.0; 3.0 4.0]); B=ones(4,4); Y = similar(B); mul!(Y, A, B);
158-
159-
julia> Y
160-
2×2 Array{Float64,2}:
155+
julia> A = LinearMap([1.0 2.0; 3.0 4.0]); B = ones(2,2); Y = similar(B); mul!(Y, A, B)
156+
2×2 Matrix{Float64}:
161157
3.0 3.0
162158
7.0 7.0
163159
```
@@ -211,7 +207,7 @@ julia> mul!(C, A, B, 100.0, 10.0) === C
211207
true
212208
213209
julia> C
214-
2-element Array{Float64,1}:
210+
2-element Vector{Float64}:
215211
310.0
216212
730.0
217213
@@ -221,7 +217,7 @@ julia> mul!(C, A, B, 100.0, 10.0) === C
221217
true
222218
223219
julia> C
224-
2×2 Array{Float64,2}:
220+
2×2 Matrix{Float64}:
225221
310.0 320.0
226222
730.0 740.0
227223
```

src/blockmap.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ function _getranges(maps, dim, inds=1:length(maps))
3030
return UnitRange.(starts, ends)
3131
end
3232

33-
"""
34-
rowcolranges(maps, rows)
33+
# """
34+
# rowcolranges(maps, rows)
3535

36-
Determines the range of rows for each block row and the range of columns for each
37-
map in `maps`, according to its position in a virtual matrix representation of the
38-
block linear map obtained from `hvcat(rows, maps...)`.
39-
"""
36+
# Determines the range of rows for each block row and the range of columns for each
37+
# map in `maps`, according to its position in a virtual matrix representation of the
38+
# block linear map obtained from `hvcat(rows, maps...)`.
39+
# """
4040
function rowcolranges(maps, rows)
4141
# find indices of the row-wise first maps
4242
firstmapinds = vcat(1, Base.front(rows)...)
@@ -75,7 +75,7 @@ julia> CS = LinearMap{Int}(cumsum, 3)::LinearMaps.FunctionMap;
7575
julia> L = [CS LinearMap(ones(Int, 3, 3))]::LinearMaps.BlockMap;
7676
7777
julia> L * ones(Int, 6)
78-
3-element Array{Int64,1}:
78+
3-element Vector{Int64}:
7979
4
8080
5
8181
6
@@ -110,7 +110,7 @@ julia> CS = LinearMap{Int}(cumsum, 3)::LinearMaps.FunctionMap;
110110
julia> L = [CS; LinearMap(ones(Int, 3, 3))]::LinearMaps.BlockMap;
111111
112112
julia> L * ones(Int, 3)
113-
6-element Array{Int64,1}:
113+
6-element Vector{Int64}:
114114
1
115115
2
116116
3
@@ -153,7 +153,7 @@ julia> L.rows
153153
(2, 2)
154154
155155
julia> L * ones(Int, 6)
156-
6-element Array{Int64,1}:
156+
6-element Vector{Int64}:
157157
2
158158
4
159159
6

src/kronecker.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ julia> E = spdiagm(-1 => trues(1)); D = E + E' - 2I;
3737
julia> Δ = kron(D, J) + kron(J, D); # discrete 2D-Laplace operator
3838
3939
julia> Matrix(Δ)
40-
4×4 Array{Int64,2}:
40+
4×4 Matrix{Int64}:
4141
-4 1 1 0
4242
1 -4 0 1
4343
1 0 -4 1

src/left.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ and return an adjoint vector.
1616
## Examples
1717
```jldoctest; setup=(using LinearAlgebra, LinearMaps)
1818
julia> A=LinearMap([1.0 2.0; 3.0 4.0]); x=[1.0, 1.0]; x'A
19-
1×2 Adjoint{Float64,Array{Float64,1}}:
19+
1×2 adjoint(::Vector{Float64}) with eltype Float64:
2020
4.0 6.0
2121
```
2222
"""
@@ -31,7 +31,7 @@ and return a transpose vector.
3131
## Examples
3232
```jldoctest; setup=(using LinearAlgebra, LinearMaps)
3333
julia> A=LinearMap([1.0 2.0; 3.0 4.0]); x=[1.0, 1.0]; transpose(x)*A
34-
1×2 Transpose{Float64,Array{Float64,1}}:
34+
1×2 transpose(::Vector{Float64}) with eltype Float64:
3535
4.0 6.0
3636
```
3737
"""
@@ -52,7 +52,7 @@ either `A` or `B`. The computation `C = A*B` is performed via `C' = B'A'`.
5252
julia> A=[1.0 1.0; 1.0 1.0]; B=LinearMap([1.0 2.0; 3.0 4.0]); C = similar(A); mul!(C, A, B);
5353
5454
julia> C
55-
2×2 Array{Float64,2}:
55+
2×2 Matrix{Float64}:
5656
4.0 6.0
5757
4.0 6.0
5858
```

test/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
33
BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"
44
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
55
ChainRulesTestUtils = "cdddcdb0-9152-4a09-a978-84456f9df70a"
6+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
67
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
78
IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153"
89
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
@@ -17,6 +18,7 @@ Aqua = "0.5, 0.6, 0.7"
1718
BlockArrays = "0.16"
1819
ChainRulesCore = "1"
1920
ChainRulesTestUtils = "1.9"
21+
Documenter = "1"
2022
Octonions = "0.1, 0.2"
2123
Quaternions = "0.5, 0.6, 0.7"
2224
julia = "1.6"

test/runtests.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
using Test, LinearMaps, Aqua
1+
using Test, Documenter, LinearMaps, Aqua
22

33
@testset "code quality" begin
44
Aqua.test_all(LinearMaps, project_toml_formatting = VERSIONv"1.7", piracy = (broken=true,))
55
end
66

7+
doctest(LinearMaps)
8+
79
include("linearmaps.jl")
810

911
include("transpose.jl")

0 commit comments

Comments
 (0)