An approximation algorithm for irregular-ripple filters