changeset 264:8ffd9c2e2119 boundary_conditions

Update documentation and formating
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Wed, 04 Dec 2019 19:13:55 +0100
parents b577b5f64530
children 4308b500d6e7
files LazyTensors/src/lazy_operations.jl
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/LazyTensors/src/lazy_operations.jl	Wed Dec 04 19:02:18 2019 +0100
+++ b/LazyTensors/src/lazy_operations.jl	Wed Dec 04 19:13:55 2019 +0100
@@ -42,26 +42,26 @@
     LazyElementwiseOperation{T,D,Op,T1,T2} <: LazyArray{T,D}
 Struct allowing for lazy evaluation of elementwise operations on AbstractArrays.
 
-A LazyElementwiseOperation contains two AbstractArrays of equal size,
-together with an operation. The operations are carried out when the
-LazyElementwiseOperation is indexed.
+A LazyElementwiseOperation contains two datatypes T1, and T2, together with an operation,
+where at least one of T1 and T2 is an AbstractArray, and one may be a Real.
+The operations are carried out when the LazyElementwiseOperation is indexed.
 """
-struct LazyElementwiseOperation{T,D,Op, T1, T2} <: LazyArray{T,D}
+struct LazyElementwiseOperation{T,D,Op,T1,T2} <: LazyArray{T,D}
     a::T1
     b::T2
 
-    @inline function LazyElementwiseOperation{T,D,Op}(a::T1,b::T2) where {T,D,Op, T1<:AbstractArray{T,D}, T2<:AbstractArray{T,D}}
+    @inline function LazyElementwiseOperation{T,D,Op}(a::T1,b::T2) where {T,D,Op,T1<:AbstractArray{T,D},T2<:AbstractArray{T,D}}
         @boundscheck if size(a) != size(b)
             throw(DimensionMismatch("dimensions must match"))
         end
         return new{T,D,Op,T1,T2}(a,b)
     end
 
-    @inline function LazyElementwiseOperation{T,D,Op}(a::T1,b::T2) where {T,D,Op, T1<:AbstractArray{T,D}, T2<:Real}
+    @inline function LazyElementwiseOperation{T,D,Op}(a::T1,b::T2) where {T,D,Op,T1<:AbstractArray{T,D},T2<:Real}
         return new{T,D,Op,T1,T2}(a,b)
     end
 
-    @inline function LazyElementwiseOperation{T,D,Op}(a::T1,b::T2) where {T,D,Op, T1<:Real, T2<:AbstractArray{T,D}}
+    @inline function LazyElementwiseOperation{T,D,Op}(a::T1,b::T2) where {T,D,Op,T1<:Real,T2<:AbstractArray{T,D}}
         return new{T,D,Op,T1,T2}(a,b)
     end
 end