The Open
D
Programming Language
Learn
Language
Library
Contribute
Blog
withNeighboursSum.withNeighboursSum
mir
ndslice
topology
withNeighboursSum
auto
withNeighboursSum
(Slice!(Iterator, N, kind) slice)
template
withNeighboursSum
(alias fun = "a + b")
@
fmamath
static if
(
__traits(isSame, naryFun!fun, fun)
)
@
fmamath
auto
withNeighboursSum
(
Iterator
size_t
N
SliceKind
kind
)
(
Slice
!(
Iterator
,
N
,
kind
)
slice
)
auto
withNeighboursSum
(S[] slice)
auto
withNeighboursSum
(S slice)
Parameters
slice
Slice
!(
Iterator
,
N
,
kind
)
ndslice or array
Return Value
Type:
auto
Lazy zip view of elements packed with sum of their neighbours.
Meta
Source
See Implementation
mir
ndslice
topology
withNeighboursSum
functions
withNeighboursSum