withNeighboursSum.withNeighboursSum

  1. auto withNeighboursSum(Slice!(Iterator, N, kind) slice)
    template withNeighboursSum(alias fun = "a + b")
    @optmath
    static if(__traits(isSame, naryFun!fun, fun))
    @optmath
    withNeighboursSum
    (
    Iterator
    size_t N
    SliceKind kind
    )
    (
    Slice!(Iterator, N, kind) slice
    )
  2. auto withNeighboursSum(S[] slice)
  3. auto withNeighboursSum(S slice)
  4. alias withNeighboursSum = .withNeighboursSum!(naryFun!fun)

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