Structured matrix algorithms for solving Helmholtz equation