Interesting. A weighed average between at least two values in an array? Makes sense in the context of computer graphics. Thanks for the correction.
Sampling modes customize how the value calculation is done. Some will simply round the index to the nearest integer texel, resulting in only one value being accessed (cheap.)
Others will interpolate via weighted average as you're thinking, in the 1D case. Then there's the 2D and 3D cases... plus mipmaps... plus anti-aliasing patterns... at which point you could easily have 16+ samples bearing little resemblance to "indexing an array", especially as one can apply all these interpolation techniques to generic functions such as perlin noise which aren't array based.
Double -> Int
Which is also exactly why having an int type is important. It otherwise becomes much harder to talk about the meaning of those functions.