Mercurial > repos > public > sbplib_julia
comparison src/LazyTensors/lazy_array.jl @ 1594:d68d02dd882f feature/boundary_conditions
Merge with default
author | Vidar Stiernström <vidar.stiernstrom@gmail.com> |
---|---|
date | Sat, 25 May 2024 16:07:10 -0700 |
parents | d7bc11053951 |
children | dfb43fdac9fc |
comparison
equal
deleted
inserted
replaced
1591:615eeb6e662e | 1594:d68d02dd882f |
---|---|
1 """ | 1 """ |
2 LazyArray{T,D} <: AbstractArray{T,D} | 2 LazyArray{T,D} <: AbstractArray{T,D} |
3 | 3 |
4 Array which is calcualted lazily when indexing. | 4 Array which is calculated lazily when indexing. |
5 | 5 |
6 A subtype of `LazyArray` will use lazy version of `+`, `-`, `*`, `/`. | 6 A subtype of `LazyArray` will use lazy version of `+`, `-`, `*`, `/`. |
7 """ | 7 """ |
8 abstract type LazyArray{T,D} <: AbstractArray{T,D} end | 8 abstract type LazyArray{T,D} <: AbstractArray{T,D} end |
9 export LazyArray | 9 export LazyArray |
40 end | 40 end |
41 | 41 |
42 | 42 |
43 """ | 43 """ |
44 LazyElementwiseOperation{T,D,Op} <: LazyArray{T,D} | 44 LazyElementwiseOperation{T,D,Op} <: LazyArray{T,D} |
45 Struct allowing for lazy evaluation of elementwise operations on `AbstractArray`s. | 45 Struct allowing for lazy evaluation of element-wise operations on `AbstractArray`s. |
46 | 46 |
47 A `LazyElementwiseOperation` contains two arrays together with an operation. | 47 A `LazyElementwiseOperation` contains two arrays together with an operation. |
48 The operations are carried out when the `LazyElementwiseOperation` is indexed. | 48 The operations are carried out when the `LazyElementwiseOperation` is indexed. |
49 """ | 49 """ |
50 struct LazyElementwiseOperation{T,D,Op,T1<:AbstractArray{T,D},T2<:AbstractArray{T,D}} <: LazyArray{T,D} | 50 struct LazyElementwiseOperation{T,D,Op,T1<:AbstractArray{T,D},T2<:AbstractArray{T,D}} <: LazyArray{T,D} |