Hi I'm new to interpolations.
I'm looking for documentation to understand how inverse distance algorithm works and how to code it.
Well, Wikipedia is the place to look at.
what you do is:
1) compute the distance between your location and the observations
2) define the weights as 1/distance^p
3) sum the weighted value of each observation
4) normalise the result by the sum of the weights
Note that IDW relies on one parameter(p), the power of the distance. The larger it is, the more infuence you give to the closest observation. the extreme value 0 and infinity yield a simple average and a thiessen polygonsation, respectively. The optimal parameter can be found based on cross-validation methods (but this add computational cost, of course).
Note also that you can limit the number of neighbours that are taken into account to remove the influence of far away points.
IDW is one of the fastest interpolation method, but not the one I prefer...
In addition to what radouxju said, I'd just add a couple links to useful things:
If you're familiar with MATLAB, here's a method: http://www.mathworks.com/matlabcentral/fileexchange/24477-inverse-distance-weight