A long product of random transfer matrices is frequently used to model disordered one-dimensional photonic bandgap
structures in order to investigate optical Anderson localization. The Lyapunov exponent of this long matrix product,
known to exist from Furstenberg's theorem, is identified as the localization factor (inverse localization length). It is not
unusual to have 5,000,000 random matrices with Monte Carlo chosen elements in one product to calculate a single
Lyapunov exponent, and then have results averaged over as many as 10,000 ensembles. The entire process has to be
repeated for 100 or more frequencies to clearly show the frequency dependence of the optical localization effects. This
paper instead uses a non-Monte Carlo numerical technique to calculate the Lyapunov exponents. This technique, by
Froyland and Aihara, is especially suited to the case where the disorder in the photonic bandgap structure is discrete.
Namely, it is used to calculate the probability distribution of the direction of the vector propagated by the long chain of
random matrices by finding the left eigenvector of a certain sparse row-stochastic matrix. This distribution is used in
Furstenberg's integral formula to calculate the Lyapunov exponent. Now this technique is extended to the case where the
random elements of the photonic bandgap transfer matrices are intended to be chosen from a continuous distribution.
Specifically, discrete probability mass functions whose moments increasingly match those of a uniform probability
density function are used with the Froyland-Aihara method. A very significant savings in computation time is noted
compared to Monte Carlo approaches.