Math::WalshTransform

Fast Hadamard and Walsh Transforms
Download

Math::WalshTransform Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Peter Billam
  • Publisher web site:
  • http://search.cpan.org/~pjb/

Math::WalshTransform Tags


Math::WalshTransform Description

Fast Hadamard and Walsh Transforms Math::WalshTransform implement fast Hadamard and Walsh Transforms and their inverse transforms.Also included are routines for converting a Hadamard to a Walsh transform and vice versa, for calculating the Logical Convolution of two lists, or the Logical Autocorrelation of a list, and for calculating the Walsh Power Spectrum - in short, almost everything you ever wanted to do with a Walsh Transform.Intelligible speech can be reconstructed by transforming blocks of, say, 64 samples, deleting all but the several largest transform components, and inverse-transforming; in other words, these transforms extract from a time-series the most significant things that are going on. They should be useful for noticing important things, for example in software that monitors time-series data such as system or network administration data, share-price, currency, ecological, opinion poll, process management data, and so on.As from version 1.10, Math::WalshTransform uses C routines to perform the transforms. This runs 25 to 30 times faster than previous versions.Not yet included are multi-dimensional Hadamard and Walsh Transforms, conversion between Logical and Arithmetic Autocorrelation Functions, or conversion between the Walsh Power Spectrum and the Fourier Power Spectrum.SYNOPSIS use Math::WalshTransform; @f = (1.618, 2.718, 3.142, 4.669); # must be power-of-two long @FH1 = &fht(@f); # Hadamard transform @fh1 = &fhtinv(@FH1); # or @FW2 = &fwt(@f); # Walsh transform @fw2 = &fwtinv(@FW2); @FH2 = &walsh2hadamard(@FW2); @PS = &power_spectrum(@f); import Math::WalshTransform qw(:ALL); @whats_going_on = &biggest(9,&fwt(&sublist(\@time_series,-16))); @EVENT1 = &fwt(&sublist(\@time_series,478,16)); @EVENT2 = &fwt(&sublist(\@time_series,2316,16)); @EVENT3 = &fwt(&sublist(\@time_series,3261,16)); $EVENT1=0.0; $EVENT2=0.0; $EVENT3=0.0; # ignore constant @EVENT1 = &normalise(@EVENT1); # ignore scale @EVENT2 = &normalise(@EVENT2); @EVENT3 = &normalise(@EVENT3); @TYPICAL_EVENT = &average(\@EVENT1, \@EVENT2, \@EVENT3); ... @NOW = &fwt(&sublist(\@time_series,-16)); $NOW = 0.0; @NOW = &normalise(@NOW); if (&distance(\@NOW, \@TYPICAL_EVENT) < .28) { &get_worried(); } Requirements: · Perl


Math::WalshTransform Related Software