Abstract

A simple algorithm for averaging a stochastic sequence of 1D arrays in a moving, expanding window is provided. The samples are grouped in bins which increase exponentially in size so that a constant fraction of the samples is retained at any point in the sequence. The algorithm is shown to have particular relevance for a class of Monte Carlo sampling problems which includes one characteristic of iterative reconstruction in computed tomography. The code is available in the CPC program library in both Fortran 95 and C and is also available in R through CRAN. Program summaryProgram title: mewAvgCatalogue identifier: AEXA_v1_0Program summary URL:http://cpc.cs.qub.ac.uk/summaries/AEXA_v1_0.htmlProgram obtainable from: CPC Program Library, Queen’s University, Belfast, N. IrelandLicensing provisions: Standard CPC licence, http://cpc.cs.qub.ac.uk/licence/licence.htmlNo. of lines in distributed program, including test data, etc.: 4757No. of bytes in distributed program, including test data, etc.: 67572Distribution format: tar.gzProgramming language: Fortran 95 or C.Computer: Personal computer or larger.Operating system: Red Hat Enterprise Linux 6, but probably cross platform.RAM: kB to GB depending on the applicationClassification: 4.13.Nature of problem: Some problems require both a self-consistent solution and Monte Carlo sampling. Monte Carlo samples based on early iterates may not be useful, but discarding all samples and resampling every time solution parameters change can be wasteful.Solution method: The solution is to keep a fixed fraction of the samples, such as the most recent half. The trick implemented here involves exponentially expanding windows so that a fixed fraction of the samples can be retained using a fixed amount of physical memory.Additional comments: The subprograms are intended to be integrated into a larger program of the user. Small driver programs are provided to illustrate the usage.Running time: Microseconds to seconds per iteration

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call