The following link @Tamas_Papp posted in the solution might help everyone with similar questions.
Right now I try to understand how specialization and parametric types interact. The following all came up when trying to design a sliding window iterator (iterator that shall return a slided view of an array in each iteration step)
Code so far, not yet working as we are missing an iterate function etc:
using IdentityRanges struct SlidingWindowIterator #1 array::AbstractArray #2 range::CartesianIndices #3 validindices::CartesianIndices #3 end
#3 is the set of indices of
array that have all needed indices for
range as valid indices around them.
Objectives: Make it specialize for the array type and the dimension (Are there other attributes that should be parametrized for performance reasons?). Also enforce all 3 arguments to be of the same dimension. And have a constructor that fills in all parameter types automatically. How to do that?