Mercurial > repos > public > sbplib_julia
comparison LazyTensors/src/lazy_operations.jl @ 203:19e579a5031f boundary_conditions
Add (/) operation for LazyArrays and enable corresponding broken tests.
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Mon, 24 Jun 2019 10:51:39 +0200 |
parents | 9e737d19fcfe |
children | 70e1f3401d82 |
comparison
equal
deleted
inserted
replaced
202:9e737d19fcfe | 203:19e579a5031f |
---|---|
107 Base.@propagate_inbounds Base.:+(a::AbstractArray{T,D}, b::LazyArray{T,D}) where {T,D} = b + a | 107 Base.@propagate_inbounds Base.:+(a::AbstractArray{T,D}, b::LazyArray{T,D}) where {T,D} = b + a |
108 Base.@propagate_inbounds Base.:-(a::LazyArray{T,D}, b::AbstractArray{T,D}) where {T,D} = a -̃ b | 108 Base.@propagate_inbounds Base.:-(a::LazyArray{T,D}, b::AbstractArray{T,D}) where {T,D} = a -̃ b |
109 Base.@propagate_inbounds Base.:-(a::AbstractArray{T,D}, b::LazyArray{T,D}) where {T,D} = a -̃ b | 109 Base.@propagate_inbounds Base.:-(a::AbstractArray{T,D}, b::LazyArray{T,D}) where {T,D} = a -̃ b |
110 Base.@propagate_inbounds Base.:*(a::LazyArray{T,D}, b::AbstractArray{T,D}) where {T,D} = a *̃ b | 110 Base.@propagate_inbounds Base.:*(a::LazyArray{T,D}, b::AbstractArray{T,D}) where {T,D} = a *̃ b |
111 Base.@propagate_inbounds Base.:*(a::AbstractArray{T,D}, b::LazyArray{T,D}) where {T,D} = b * a | 111 Base.@propagate_inbounds Base.:*(a::AbstractArray{T,D}, b::LazyArray{T,D}) where {T,D} = b * a |
112 # TODO: / seems to be ambiguous | 112 # NOTE: Need to define (/) for AbstractVectorOrMat and Union of LazyArrays in order to avoid ambiguities |
113 # Base.:/(a::LazyArray{T,D},b::AbstractArray{T,D}) where {T,D} = a /̃ b | 113 # with (/) in the LinearAlgebra package. Not sure if it actually could be usefull. |
114 # Base.:/(a::AbstractArray{T,D},b::LazyArray{T,D}) where {T,D} = a /̃ b | 114 Base.@propagate_inbounds Base.:/(a::AbstractVecOrMat, b::Union{LazyArray{T,1}, LazyArray{T,2}}) where {T} = a /̃ b |
115 Base.@propagate_inbounds Base.:/(a::Union{LazyArray{T,1}, LazyArray{T,2}}, b::AbstractVecOrMat) where {T} = a /̃ b | |
116 Base.@propagate_inbounds Base.:/(a::LazyArray{T,D}, b::AbstractArray{T,D}) where {T,D} = a /̃ b | |
117 Base.@propagate_inbounds Base.:/(a::AbstractArray{T,D}, b::LazyArray{T,D}) where {T,D} = a /̃ b | |
118 | |
115 | 119 |
116 export +̃, -̃, *̃, /̃ | 120 export +̃, -̃, *̃, /̃ |
117 | 121 |
118 | 122 |
119 | 123 |