  Standard numerical algorithms like the fast multipole method or
$\mathcal{H}$-matrix schemes rely on low-rank approximations of the underlying
kernel function. For high-frequency problems, the ranks grow rapidly as the
mesh is refined, and standard techniques are no longer attractive.
  Directional compression techniques solve this problem by using decompositions
based on plane waves. Taking advantage of hierarchical relations between these
waves' directions, an efficient approximation is obtained.
  This paper is dedicated to directional $\mathcal{H}^2$-matrices that employ
local low-rank approximations to handle directional representations
efficiently.
  The key result is an algorithm that takes an arbitrary matrix and finds a
quasi-optimal approximation of this matrix as a directional
$\mathcal{H}^2$-matrix using a prescribed block tree. The algorithm can reach
any given accuracy, and the approximation requires only $\mathcal{O}(n k +
\kappa^2 k^2 \log n)$ units of storage, where $n$ is the matrix dimension,
$\kappa$ is the wave number, and $k$ is the local rank. In particular, we have
a complexity of $\mathcal{O}(n k)$ if $\kappa$ is constant and $\mathcal{O}(n
k^2 \log n)$ for high-frequency problems characterized by $\kappa^2 \sim n$.
  Since the algorithm can be applied to arbitrary matrices, it can serve as the
foundation of fast techniques for constructing preconditioners.
