  A visibility algorithm maps time series into complex networks following a
simple criterion. The resulting visibility graph has recently proven to be a
powerful tool for time series analysis. However its straightforward computation
is time-consuming and rigid, motivating the development of more efficient
algorithms. Here we present a highly efficient method to compute visibility
graphs with the further benefit of flexibility: on-line computation. We propose
an encoder/decoder approach, with an on-line adjustable binary search tree
codec for time series as well as its corresponding decoder for visibility
graphs. The empirical evidence suggests the proposed method for computation of
visibility graphs offers an on-line computation solution at no additional
computation time cost. The source code is available online.
