I would like to create a mapping from a list and I am wondering if there is a slick way of doing it.
For example, consider the list
ls = WaveletFilterCoefficients[DaubechiesWavelet[2], "PrimalHighpass"]
{{-2, -0.0915064},{-1, -0.158494},{0, 0.591506},{1, -0.341506}}
I would like to define a function that maps
-2 -> -0.0915064
-1 -> -0.158494
0 -> 0.591506
1 -> -0.341506
and all other integers to zero.
Any suggestions?