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 5
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 multiple dimenstions
- - support autovivification of tied hashes
- - set a per-instance mode for insertion or lookup
- - set up options to control extrapolation (fatal, constant, simple)
- - be smarter (proximity based direction) about searching when doing interpolation
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.