NAME
Tie::Hash::Interpolate - tied mathematical interpolation/extrapolation
SYNOPSIS
use Tie::Hash::Interpolate;
tie my %lut, 'Tie::Hash::Interpolate';
$lut{3} = 4;
$lut{5} = 6;
print $lut{4}; ## prints 4
print $lut{6}; ## prints 7
DESCRIPTION
Tie::Hash::Interpolate provides a mechanism for using a hash as a lookup table for interpolated and extrapolated values.
After your hash is tied, insert your known key-value pairs. If you then fetch a value that is not a key, an interpolation or extrapolation will be performed as necessary.
TO DO
- - support autovivification of tied hashes for interpolation in multiple dimenstions
- - set a package-wide mode for insertion or lookup
- - set up options to control extrapolation (fatal, constant, simple)
AUTHOR
Daniel B. Boorstein, <danboo@cpan.org>
COPYRIGHT AND LICENSE
Copyright 2004 by Daniel B. Boorstein
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.