Skip to content

Commit 356c49c

Browse files
abelsiqueiradpo
authored andcommitted
Removes {h,v,hv}cat between arbitrary number of operators and matrices
hcat and vcat are still defined between one operator and one matrix. Also updates travis and appveyor to run on Julia 1.3. Closes #100
1 parent b3a6816 commit 356c49c

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ julia:
99
- 1.0
1010
- 1.1
1111
- 1.2
12+
- 1.3
1213
- nightly
1314

1415
matrix:
1516
allow_failures:
17+
- julia: 1.3
1618
- julia: nightly
1719

1820
notifications:

appveyor.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ environment:
22
matrix:
33
- julia_version: 1.0
44
- julia_version: 1.1
5+
- julia_version: 1.2
6+
- julia_version: 1.3
57
- julia_version: nightly
68

79
platform:
@@ -10,6 +12,7 @@ platform:
1012

1113
matrix:
1214
allow_failures:
15+
- julia_version: 1.3
1316
- julia_version: nightly
1417

1518
branches:

src/LinearOperators.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ function hcat(A :: AbstractLinearOperator, B :: AbstractLinearOperator)
558558
LinearOperator{S}(nrow, ncol, false, false, prod, tprod, ctprod)
559559
end
560560

561-
function hcat(ops :: OperatorOrMatrix...)
561+
function hcat(ops :: AbstractLinearOperator...)
562562
op = ops[1]
563563
for i = 2:length(ops)
564564
op = [op ops[i]]
@@ -585,7 +585,7 @@ function vcat(A :: AbstractLinearOperator, B :: AbstractLinearOperator)
585585
return LinearOperator{S}(nrow, ncol, false, false, prod, tprod, ctprod)
586586
end
587587

588-
function vcat(ops :: OperatorOrMatrix...)
588+
function vcat(ops :: AbstractLinearOperator...)
589589
op = ops[1]
590590
for i = 2:length(ops)
591591
op = [op; ops[i]]
@@ -594,9 +594,9 @@ function vcat(ops :: OperatorOrMatrix...)
594594
end
595595

596596
# Removed by https://github.com/JuliaLang/julia/pull/24017
597-
function hvcat(rows :: Tuple{Vararg{Int}}, ops :: OperatorOrMatrix...)
597+
function hvcat(rows :: Tuple{Vararg{Int}}, ops :: AbstractLinearOperator...)
598598
nbr = length(rows)
599-
rs = Array{OperatorOrMatrix,1}(undef, nbr)
599+
rs = Array{AbstractLinearOperator,1}(undef, nbr)
600600
a = 1
601601
for i = 1:nbr
602602
rs[i] = hcat(ops[a:a-1+rows[i]]...)

test/test_cat.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function test_cat()
3434
@test(norm(Do2 * rhs - D * rhs) <= rtol * norm(D * rhs))
3535

3636
@test_throws LinearOperatorException [LinearOperator(ones(5,5)) ; opEye(3)]
37-
K = [Matrix(1.0I, 2, 2) opZeros(2,3) ; opZeros(3,2) opEye(3)]
37+
K = [opEye(2) opZeros(2,3) ; opZeros(3,2) opEye(3)]
3838
v = simple_vector(Float64, 5)
3939
@test all(v .== K * v)
4040

0 commit comments

Comments
 (0)