On Tuesday, April 15, 2014 05:35:27 AM Spencer Lyon wrote:
> It seems to me that this would be fairly standard functionality. I am sure 
> there is a benefit to having the default getindex methods deal in “index 
> units” instead of physical ones, but I can’t tell what that benefit is? Is 
> there a reason you chose to have it set up the way it is?

When physical units = indexing units, you save one multiply and one add on 
each interpolation operation. So it's best to implement the base operation 
"minimally," and add wrapper types that require more operations around it. 
I've not personally ever needed anything else (I mostly do interpolation on 
images), and no one else has added it to Grid, either.

If you wanted to add your wrapper type to Grid, I think that would be great. 
Some additional things to think about:
- Derivatives (here, the chain rule is your friend)
- Dimensions higher than 1
- It's no longer just a shift, it's also scaled, so a name change might be in 
order.

--Tim

Reply via email to