Mercurial > repos > public > sbplib_julia
changeset 198:b5c9be7f391c boundary_conditions
Fix up some formatting
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 20 Jun 2019 23:28:02 +0200 |
parents | a340fa91b1fc |
children | a22b419bbdf0 9d9f7b0e514b |
files | LazyTensors/src/lazy_operations.jl LazyTensors/test/runtests.jl |
diffstat | 2 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/LazyTensors/src/lazy_operations.jl Thu Jun 20 23:26:43 2019 +0200 +++ b/LazyTensors/src/lazy_operations.jl Thu Jun 20 23:28:02 2019 +0200 @@ -8,6 +8,8 @@ abstract type LazyArray{T,D} <: AbstractArray{T,D} end export LazyArray + + """ LazyTensorMappingApplication{T,R,D} <: LazyArray{T,R} @@ -29,7 +31,6 @@ Base.size(ta::LazyTensorMappingApplication{T,R,D}) where {T,R,D} = range_size(ta.t,size(ta.o)) # TODO: What else is needed to implement the AbstractArray interface? - # # We need the associativity to be a→b→c = a→(b→c), which is the case for '→' Base.:*(args::Union{TensorMapping{T}, AbstractArray{T}}...) where T = foldr(*,args) # # Should we overload some other infix binary operator?
--- a/LazyTensors/test/runtests.jl Thu Jun 20 23:26:43 2019 +0200 +++ b/LazyTensors/test/runtests.jl Thu Jun 20 23:28:02 2019 +0200 @@ -1,8 +1,6 @@ using Test using LazyTensors - - @testset "Generic Mapping methods" begin struct DummyMapping{T,R,D} <: TensorMapping{T,R,D} end LazyTensors.apply(m::DummyMapping{T,R,D}, v, i) where {T,R,D} = :apply @@ -57,4 +55,4 @@ @test (m*m*v)[6] == (:apply,m*v,6) @test_broken BoundsError == (m*m*v)[0] @test_broken BoundsError == (m*m*v)[7] -end \ No newline at end of file +end