brc_naive


brc_naive, a C++ code which reads a file of randomly generated temperature readings, associated with weather stations at 413 world cities, and computes the minimum, mean, and maximum temperature for each weather station. It also reports the total execution time. Processing such a data file with one billion records is the substance of the billion record challenge (BRC).

A typical data file consists of n rows. Each row lists a city name representing a weather station, a semicolon, and then a temperature measurement. Here is a sample of a few lines from such a file:

Kansas City;-0.8
Damascus;19.8
Kansas City;28.0
La Ceiba;17.0
Darwin;29.1
New York City;2.1
As you might guess, the temperature is in Centigrade. Moreover, the city names appear in random order, and may be repeated.

Usage:

brc_naive filename
where

Licensing:

The information on this web page is distributed under the MIT license.

Languages:

brc_naive is available in a C version and a C++ version and a MATLAB version.

Author:

Original C version by Danny van Kooten. This version by John Burkardt.

Related Data and Programs:

brc_naive_test

brc_data, a C++ code which creates a file of randomly generated temperature readings to be associated with weather stations at 413 world cities. A file like this, with 1 billion records, is used for the one billion row challenge.

Source Code:


Last revised on 19 October 2024.