From a0af20cad1df76846d06df9a7c64c2b282b4fa8c Mon Sep 17 00:00:00 2001 From: Simon Byrne Date: Sat, 27 Oct 2018 12:14:26 -0700 Subject: [PATCH] remove scalem --- src/SDiagonal.jl | 9 --------- test/SDiagonal.jl | 3 --- 2 files changed, 12 deletions(-) diff --git a/src/SDiagonal.jl b/src/SDiagonal.jl index 9c7a7600..53819eca 100644 --- a/src/SDiagonal.jl +++ b/src/SDiagonal.jl @@ -3,15 +3,6 @@ import Base: ==, -, +, *, /, \, abs, real, imag, conj -@generated function scalem(a::StaticMatrix{M,N}, b::StaticVector{N}) where {M, N} - expr = vec([:(a[$j,$i]*b[$i]) for j=1:M, i=1:N]) - :(@_inline_meta; let val1 = ($(expr[1])); similar_type(SMatrix{M,N},typeof(val1))(val1, $(expr[2:end]...)); end) -end -@generated function scalem(a::StaticVector{M}, b::StaticMatrix{M, N}) where {M, N} - expr = vec([:(b[$j,$i]*a[$j]) for j=1:M, i=1:N]) - :(@_inline_meta; let val1 = ($(expr[1])); similar_type(SMatrix{M,N},typeof(val1))(val1, $(expr[2:end]...)); end) -end - const SDiagonal = Diagonal{T,SVector{N,T}} where {N,T} SDiagonal(x...) = Diagonal(SVector(x...)) diff --git a/test/SDiagonal.jl b/test/SDiagonal.jl index 39363c86..a5f23507 100644 --- a/test/SDiagonal.jl +++ b/test/SDiagonal.jl @@ -22,9 +22,6 @@ using StaticArrays, Test, LinearAlgebra @testset "Methods" begin - @test StaticArrays.scalem(@SMatrix([1 1 1;1 1 1; 1 1 1]), @SVector [1,2,3]) === @SArray [1 2 3; 1 2 3; 1 2 3] - @test StaticArrays.scalem(@SVector([1,2,3]),@SMatrix [1 1 1;1 1 1; 1 1 1])' === @SArray [1 2 3; 1 2 3; 1 2 3] - m = SDiagonal(@SVector [11, 12, 13, 14]) @test diag(m) === m.diag